@arcgis/core 4.33.0-next.20250501 → 4.33.0-next.20250503

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 (179) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0219c3f9408d3fa3c9a0.js → 03ee9d0407c230b885ed.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{de16b771d2c8d816c738.js → 05c80002c37002ac99e8.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{5d40c4783f58af1ae0dc.js → 0e8181e7fc1386d08ffc.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{96e5d192c8d23c1e324f.js → 13e68c43acc8916520db.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{e6a5911ea21bef32834b.js → 1bc22af4cc4effcbcf2b.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{84f972d7851d982701a0.js → 1ca7e0d519ecbfe6976f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{9b2ab27159500315fbc1.js → 26850ec0917ee355ddb7.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{1bd4fe77ba6fb25322e7.js → 29e2b105f55adafc3a6d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{5d63dfa5a60c88e03b28.js → 2c77a543a174e5bc736a.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{d0ddf4f1c6a351b447c7.js → 30d7d2c7d6e9e5e2ecb9.js} +1 -1
  12. package/assets/esri/core/workers/chunks/3fb25912b274f264c84e.js +1 -0
  13. package/assets/esri/core/workers/chunks/{febae745a29a17ca130a.js → 4480e4b61affb3b2e9d6.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{4d4a271351fd288277d2.js → 49085a0b3a74e158f32f.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{392e64a573f67817db02.js → 4cb199b547e5b97e65fb.js} +1 -1
  16. package/assets/esri/core/workers/chunks/4df36ee2406861c7afa8.js +1 -0
  17. package/assets/esri/core/workers/chunks/{9652cfd4668b95036c87.js → 532088a72c3ddc50f3be.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{ba917175ca2a6681501e.js → 563594357f3648652a5c.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{abfc5f9ac16c3e885c5f.js → 56db71ea7eb8a5652d98.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{e56647e61296643c5f84.js → 5719471414810b6a9aec.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{235efd948ae470a6f238.js → 60b1365d25581ccf0485.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{3795793643f4db64af0e.js → 63c25455b9cf1b3df76a.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{909be86782af3deb448e.js → 654fe135d41af81daa13.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{cd9343c78a7c3acdbbcd.js → 681b2662f6ce936afd7e.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{65f2b22d8fc12e6d4a87.js → 7000d9158da929a16071.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{7551011117c3d36ff3db.js → 743cdbff5c4616ddc2b4.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{968956284f44187f0622.js → 8540fb31bd0b29ff1906.js} +1 -1
  28. package/assets/esri/core/workers/chunks/8c5cea49e48f8858f115.js +1 -0
  29. package/assets/esri/core/workers/chunks/{237a965bd41ba8903e03.js → 921c040d0497031fd8ff.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{96d2a0777f5c418055fb.js → 92b48e3365d1cc933113.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{5d485c07848164099859.js → 95a4da3150ad8e8e36d8.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{46fb6ba8900286d18b6f.js → 9d564f79b82d427fc1da.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{00612d6e05b1c8647668.js → 9fff43ffcd5602ccc50f.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{653ff3e631fea8ad393a.js → a0db1f3ca29e34dfa16f.js} +12 -12
  35. package/assets/esri/core/workers/chunks/{1cc5c566e68f2255d035.js → a6ca68ef6311ffc365b2.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{5a51c75a2932d9da001a.js → a8d043b73e087bee7c40.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{581180668e0229dcdc14.js → bf190d672dcbaedc1a41.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{ebfa4a0334401f5e004a.js → c12765e0c8b44e349c2a.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{afddb94ff4e1a70022c7.js → c3b2b05996e2008adbe3.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{4fb4884d2de42792abe3.js → d1a9e8db5ba403abe721.js} +1 -1
  41. package/assets/esri/core/workers/chunks/d35cd309ba7bb8968a22.js +1 -0
  42. package/assets/esri/core/workers/chunks/{6e6422eda398774acbc7.js → d60da671aba70485050e.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{7a8df1225abd54ff68ed.js → db298b292a4e43cba72d.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{2bda2cfc6e81818d7d33.js → dcaeb57c69d432118604.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{fb455fd89b74b70a6a2b.js → e613df03ceb39e29befa.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{05d7d8ff3e4cbad32580.js → e8dcaa7837b6fe7bff20.js} +1 -1
  47. package/assets/esri/core/workers/chunks/ec1a4b82cbc44ba45f83.js +1 -0
  48. package/assets/esri/core/workers/chunks/ec778cc7a55068f51937.js +1 -0
  49. package/assets/esri/core/workers/chunks/{51339193abddfe37745d.js → f2b63597ae956db74eb3.js} +1 -1
  50. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  51. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +14 -1
  52. package/assets/esri/themes/base/widgets/_SelectionList.scss +34 -0
  53. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +6 -0
  54. package/assets/esri/themes/dark/main.css +1 -1
  55. package/assets/esri/themes/light/main.css +1 -1
  56. package/assets/esri/themes/light/view.css +1 -1
  57. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  58. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  59. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList.json +1 -1
  60. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_en.json +1 -1
  61. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar.json +1 -1
  62. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_en.json +1 -1
  63. package/chunks/Bufferer-CicaNej1.js +1 -1
  64. package/chunks/Distance2DCalculator-C1KHhZwD.js +1 -1
  65. package/chunks/Envelope.js +1 -1
  66. package/chunks/Envelope2D.js +1 -1
  67. package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +1 -1
  68. package/chunks/Geometry.js +1 -1
  69. package/chunks/GeometryCleaner-BEJM7I4l.js +1 -1
  70. package/chunks/OperatorClip.js +1 -1
  71. package/chunks/OperatorCrosses.js +1 -1
  72. package/chunks/OperatorCut.js +1 -1
  73. package/chunks/OperatorGeneralize.js +1 -1
  74. package/chunks/OperatorGeodesicBuffer.js +1 -1
  75. package/chunks/OperatorGeodeticArea.js +1 -1
  76. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  77. package/chunks/OperatorGeodeticDistance.js +1 -1
  78. package/chunks/OperatorGeodeticLength.js +1 -1
  79. package/chunks/OperatorIntersects.js +1 -1
  80. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  81. package/chunks/OperatorOverlaps.js +1 -1
  82. package/chunks/OperatorProximity.js +1 -1
  83. package/chunks/OperatorProximityGeodesic.js +1 -1
  84. package/chunks/OperatorShapePreservingLength.js +1 -1
  85. package/chunks/OperatorShapePreservingProject.js +1 -1
  86. package/chunks/OperatorSimplifyOGC.js +1 -1
  87. package/chunks/OperatorTouches.js +1 -1
  88. package/chunks/OperatorWithin.js +1 -1
  89. package/chunks/Point2D.js +1 -1
  90. package/chunks/ProjectionTransformation.js +1 -1
  91. package/chunks/QuadraticBezier.js +1 -1
  92. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  93. package/chunks/Transformation2D.js +1 -1
  94. package/chunks/containsOperator.js +1 -1
  95. package/chunks/disjointOperator.js +1 -1
  96. package/chunks/equalsOperator.js +1 -1
  97. package/chunks/pe-wasm.js +1 -1
  98. package/chunks/pe.js +1 -1
  99. package/geometry/coordinateFormatter.js +1 -1
  100. package/geometry/operators/extendOperator.js +1 -1
  101. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  102. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  103. package/geometry/operators/gx/operatorBuffer.js +1 -1
  104. package/geometry/operators/gx/operatorDifference.js +1 -1
  105. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  106. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  107. package/geometry/operators/gx/operatorIntersection.js +1 -1
  108. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  109. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  110. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  111. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  112. package/geometry/operators/gx/operatorOffset.js +1 -1
  113. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  114. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  115. package/geometry/operators/gx/operatorSimplify.js +1 -1
  116. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  117. package/geometry/operators/gx/operatorUnion.js +1 -1
  118. package/geometry/operators/isNearOperator.js +1 -1
  119. package/geometry/operators/json/containsOperator.js +1 -1
  120. package/geometry/operators/json/disjointOperator.js +1 -1
  121. package/geometry/operators/reshapeOperator.js +1 -1
  122. package/geometry/operators/support/apiConverter.js +1 -1
  123. package/geometry/operators/support/initNoPeFactory.js +1 -1
  124. package/geometry/operators/support/jsonConverter.js +1 -1
  125. package/geometry/support/WKIDUnitConversion.js +1 -1
  126. package/interfaces.d.ts +31 -0
  127. package/package.json +1 -1
  128. package/support/revision.js +1 -1
  129. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/utils.js +1 -1
  130. package/views/3d/interactive/Manipulator3D.js +1 -1
  131. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  132. package/views/3d/layers/DrapedSubView3D.js +1 -1
  133. package/views/3d/layers/I3SMeshView3D.js +1 -1
  134. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  135. package/views/3d/layers/MediaLayerView3D.js +1 -1
  136. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  137. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  138. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  139. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  140. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  141. package/views/3d/support/StreamTextureCollection.js +1 -1
  142. package/views/3d/support/TextureCollection.js +1 -1
  143. package/views/3d/webgl-engine/Stage.js +1 -1
  144. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  145. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  146. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  147. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  148. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  149. package/views/3d/webgl-engine/parts/Model.js +1 -1
  150. package/widgets/Directions/css.js +5 -0
  151. package/widgets/Directions.js +1 -1
  152. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  153. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  154. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  155. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +5 -0
  156. package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
  157. package/widgets/OrientedImageryViewer/css.js +1 -1
  158. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  159. package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
  160. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +5 -0
  161. package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +5 -0
  162. package/widgets/OrientedImageryViewer.js +1 -1
  163. package/widgets/Sketch.js +1 -1
  164. package/widgets/support/SelectionList/LayerItem.js +1 -1
  165. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  166. package/widgets/support/SelectionList/VisibleElements.js +1 -1
  167. package/widgets/support/SelectionList.js +1 -1
  168. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  169. package/widgets/support/SelectionToolbar/VisibleElements.js +5 -0
  170. package/widgets/support/SelectionToolbar.js +1 -1
  171. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  172. package/assets/esri/core/workers/chunks/11b55e7e76e50fe11bbe.js +0 -1
  173. package/assets/esri/core/workers/chunks/7bfa18dd8771d4932533.js +0 -1
  174. package/assets/esri/core/workers/chunks/84d7ed2cf5fe23a0888f.js +0 -1
  175. package/assets/esri/core/workers/chunks/86931186095c23e47c0c.js +0 -1
  176. package/assets/esri/core/workers/chunks/a79511b926a2830bb160.js +0 -1
  177. package/assets/esri/core/workers/chunks/e3ef0451dcdc2e966628.js +0 -1
  178. package/views/3d/webgl-engine/lib/ContentObject.js +0 -5
  179. package/views/3d/webgl-engine/lib/ContentObjectType.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{P as e}from"./Point2D.js";import{f as t,G as n,t as r}from"./Geometry.js";import{Envelope2D as o}from"./Envelope2D.js";import{i}from"./ProjectionTransformation.js";function s(){return g(new e,-1,Number.NaN)}function g(e,t,n){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:n,m_bRightSide:!1,isEmpty:u}}function u(){return Number.isNaN(this.m_distance)}function c(e,r,i=-1,s=-1){if(e.isEmpty())return 3;const g=e.getGeometryType();if(t(g))return a(e,r,i,s);if(g===n.enumPolygon)return f(e,r,i,s);if(g===n.enumPolyline)return m(e,r,i,s);if(g===n.enumEnvelope){const t=new o;return e.queryEnvelope(t),t.contains(r)?t.containsExclusive(r)?1:2:0}return 3}function a(t,n,o,i){if(o>=0||i>=0)return r("");if(t.isDegenerate(0))return t.getStartXY().equals(n)?2:3;if(!t.isCurve()){const r=e.orientationRobust(n,t.getStartXY(),t.getEndXY());return r<0?1:r>0?0:2}const s=t.getClosestCoordinate(n,!1),g=t.getTangent(s),u=t.getCoord2D(s),c=e.orientationRobust(n,u,u.add(g));return c<0?1:c>0?0:2}function f(e,t,n,s){(n>=0||s>=0)&&r("");const g=new o;e.queryEnvelope(g);const u=i(e,t,0);return 0===u?0:1===u?1:2}function m(t,n,o,i){(o<0&&i>=0||o>=0&&i<0)&&r("");const s=t.querySegmentIterator();if(o<0){let t=Number.MAX_VALUE,r=0;for(;s.nextPath();)for(;s.hasNextSegment();){const g=s.nextSegment(),u=g.getClosestCoordinate(n,!1),c=g.getCoord2D(u),a=e.sqrDistance(c,n);a<t?(r=1,o=s.getStartPointIndex(),i=s.getPathIndex(),t=a):a===t&&r++}if(0===r)return 3;if(1===r){s.resetToVertex(o,i);return c(s.nextSegment(),n)}}const g=h(n,s,o,i);if(-1!==g.i1&&-1===g.i2)return g.bRight1?1:0;if(-1!==g.i1&&-1!==g.i2){if(g.bRight1===g.bRight2)return g.bRight1?1:0;{s.resetToVertex(g.i1,-1);const e=s.nextSegment().getTangent(1);s.resetToVertex(g.i2,-1);const t=s.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}s.resetToVertex(o,i);return c(s.nextSegment(),n)}function x(e,t,n){for(e.resetToVertex(t,n);e.hasNextSegment();){if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex()}for(e.resetToVertex(t,n);e.hasPreviousSegment();){if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function S(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();){if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function d(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();){if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function h(t,n,r,o){const i={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(i.i1=x(n,r,o),-1!==i.i1){n.resetToVertex(i.i1,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o),g=e.sqrDistance(s,t);{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight1=e.crossProduct(n)<0}if(i.i2=S(n,i.i1),-1!==i.i2){n.resetToVertex(i.i2,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o);if(e.sqrDistance(s,t)>g)i.i2=-1;else{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight2=e.crossProduct(n)<0}}if(-1===i.i2&&(i.i2=d(n,i.i1),-1!==i.i2)){n.resetToVertex(i.i2,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o);if(e.sqrDistance(s,t)>g)i.i2=-1;else{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight2=e.crossProduct(n)<0;const o=i.i1;i.i1=i.i2,i.i2=o;const g=i.bRight1;i.bRight1=i.bRight2,i.bRight2=g}}}return i}export{g as a,c,s as m};
5
+ import{P as e}from"./Point2D.js";import{f as t,G as n,a as r}from"./Geometry.js";import{Envelope2D as o}from"./Envelope2D.js";import{h as i}from"./ProjectionTransformation.js";function s(){return g(new e,-1,Number.NaN)}function g(e,t,n){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:n,m_bRightSide:!1,isEmpty:u}}function u(){return Number.isNaN(this.m_distance)}function a(e,r,i=-1,s=-1){if(e.isEmpty())return 3;const g=e.getGeometryType();if(t(g))return c(e,r,i,s);if(g===n.enumPolygon)return f(e,r,i,s);if(g===n.enumPolyline)return m(e,r,i,s);if(g===n.enumEnvelope){const t=new o;return e.queryEnvelope(t),t.contains(r)?t.containsExclusive(r)?1:2:0}return 3}function c(t,n,o,i){if(o>=0||i>=0)return r("");if(t.isDegenerate(0))return t.getStartXY().equals(n)?2:3;if(!t.isCurve()){const r=e.orientationRobust(n,t.getStartXY(),t.getEndXY());return r<0?1:r>0?0:2}const s=t.getClosestCoordinate(n,!1),g=t.getTangent(s),u=t.getCoord2D(s),a=e.orientationRobust(n,u,u.add(g));return a<0?1:a>0?0:2}function f(e,t,n,s){(n>=0||s>=0)&&r("");const g=new o;e.queryEnvelope(g);const u=i(e,t,0);return 0===u?0:1===u?1:2}function m(t,n,o,i){(o<0&&i>=0||o>=0&&i<0)&&r("");const s=t.querySegmentIterator();if(o<0){let t=Number.MAX_VALUE,r=0;for(;s.nextPath();)for(;s.hasNextSegment();){const g=s.nextSegment(),u=g.getClosestCoordinate(n,!1),a=g.getCoord2D(u),c=e.sqrDistance(a,n);c<t?(r=1,o=s.getStartPointIndex(),i=s.getPathIndex(),t=c):c===t&&r++}if(0===r)return 3;if(1===r){s.resetToVertex(o,i);return a(s.nextSegment(),n)}}const g=h(n,s,o,i);if(-1!==g.i1&&-1===g.i2)return g.bRight1?1:0;if(-1!==g.i1&&-1!==g.i2){if(g.bRight1===g.bRight2)return g.bRight1?1:0;{s.resetToVertex(g.i1,-1);const e=s.nextSegment().getTangent(1);s.resetToVertex(g.i2,-1);const t=s.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}s.resetToVertex(o,i);return a(s.nextSegment(),n)}function x(e,t,n){for(e.resetToVertex(t,n);e.hasNextSegment();){if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex()}for(e.resetToVertex(t,n);e.hasPreviousSegment();){if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function S(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();){if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function d(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();){if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function h(t,n,r,o){const i={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(i.i1=x(n,r,o),-1!==i.i1){n.resetToVertex(i.i1,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o),g=e.sqrDistance(s,t);{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight1=e.crossProduct(n)<0}if(i.i2=S(n,i.i1),-1!==i.i2){n.resetToVertex(i.i2,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o);if(e.sqrDistance(s,t)>g)i.i2=-1;else{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight2=e.crossProduct(n)<0}}if(-1===i.i2&&(i.i2=d(n,i.i1),-1!==i.i2)){n.resetToVertex(i.i2,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o);if(e.sqrDistance(s,t)>g)i.i2=-1;else{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight2=e.crossProduct(n)<0;const o=i.i1;i.i1=i.i2,i.i2=o;const g=i.bRight1;i.bRight1=i.bRight2,i.bRight2=g}}}return i}export{g as a,a as c,s as m};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{g as t,t as s,a as o}from"./Geometry.js";import{m as i,P as e,s as h,M as r,a,b as l}from"./Point2D.js";class y{constructor(t,s,o){if(t instanceof y)return this.data=t.data,this.N=t.N,this.M=t.M,t.data=null,t.N=0,void(t.M=0);this.data=t,this.N=s,this.M=o}assignCopy(s){return this===s||(t(this.N*this.M==s.N*s.M),this.data.set(s.data),this.N=s.N,this.M=s.M),this}setZero(){return this.data?.fill(0),this}setIdentity(){const t=0,s=1;for(let o=0;o<this.N;o++)for(let i=0;i<this.M;i++)this.setRowCol(o,i,o===i?s:t);return this}rows(){return this.N}cols(){return this.M}row(s){return t(0),{}}set(t,s){return this.data[t]=s,this}setRowCol(t,s,o){return this.data[t*this.M+s]=o,this}at(t){return this.data[t]}atRowCol(t,s){return this.data[t*this.M+s]}mulScalar(s,o){t(0)}mul(s,o){if(t(this.M===s.rows()),t(this.N===o.rows()),t(s.cols()===o.cols()),o===this){const t=new Float64Array(this.N*this.M),i=new y(t,this.N,this.M);return this.mul(s,i),void o.assignCopy(i)}if(o===s){const t=new Float64Array(s.N*s.M),i=new y(t,s.N,s.M);return this.mul(s,i),void o.assignCopy(i)}const i=s.cols();for(let t=0;t<this.N;t++)for(let e=0;e<i;e++){let i=0;for(let o=0;o<this.M;o++)i+=this.atRowCol(t,o)*s.atRowCol(o,e);o.setRowCol(t,e,i)}}mulTranspose(s,o){if(t(this.M===s.cols()),t(this.N===o.rows()),t(s.rows()===o.cols()),o===this){const t=new Float64Array(this.N*this.M),i=new y(t,this.N,this.M);return this.mulTranspose(s,i),void o.assignCopy(i)}if(o===s){const t=new Float64Array(s.N*s.M),i=new y(t,s.N,s.M);return this.mulTranspose(s,i),void o.assignCopy(i)}const i=s.rows();for(let t=0;t<this.N;t++)for(let e=0;e<i;e++){let i=0;for(let o=0;o<this.M;o++)i+=this.atRowCol(t,o)*s.atRowCol(e,o);o.setRowCol(t,e,i)}}mulLeft(s,o){t(0)}mulLeftTranspose(s,o){t(0)}mulDiag(s,o){if(t(this.M===s.N*s.M),t(this.N===o.rows()),t(this.M===o.cols()),o===this){const t=new Float64Array(this.N*this.M),i=new y(t,this.N,this.M);return this.mulDiag(s,i),void o.assignCopy(i)}const i=this.M;for(let t=0;t<this.N;t++)for(let e=0;e<i;e++)o.setRowCol(t,e,this.atRowCol(t,e)*s.at(e))}transposeInPlace(){if(this.N===this.M){for(let t=0;t<this.N;t++)for(let s=t+1;s<this.M;s++){const o=this.atRowCol(t,s);this.setRowCol(t,s,this.atRowCol(s,t)),this.setRowCol(s,t,o)}return this}const t=new Float64Array(this.N*this.M),s=new y(t,this.N,this.M);return s.assignCopy(this),this.M=l(this.N,this.N=this.M),s.transpose(this),this}transpose(t){if(this!==t){y.checkDims(t,this.M,this.N);for(let s=0;s<this.N;s++)for(let o=0;o<this.M;o++)t.setRowCol(o,s,this.atRowCol(s,o))}else t.transposeInPlace()}add(t,s){}svd(s,o,i,e=!1){if(y.checkDims(s,this.N,this.M),y.checkDims(o,this.M,1),y.checkDims(i,this.M,this.M),e){if(t(this.N===this.M),!this.symmetricEigen(o,i))return!1;for(let t=0;t<this.M;++t)o.at(t)<0&&o.set(t,0);return s.assignCopy(i),!0}let h,r,a,l,n,x,w,u=0,C=0,f=0,R=0,d=0;const c=this.M,M=this.N;s.assignCopy(this);const m=new Float64Array(c),N=new y(m,c,1),b=(t,s)=>s>=0?Math.abs(t):-Math.abs(t),p=(t,s)=>{if((t=Math.abs(t))>(s=Math.abs(s))){const o=s/t;return t*Math.sqrt(o*o+1)}if(s>0){const o=t/s;return s*Math.sqrt(o*o+1)}return 0};for(let t=0;t<c;t++){if(u=t+1,N.set(t,R*f),f=l=R=0,t<M){for(let o=t;o<M;o++)R+=Math.abs(s.atRowCol(o,t));if(R){for(let o=t;o<M;o++)s.setRowCol(o,t,s.atRowCol(o,t)/R),l+=s.atRowCol(o,t)*s.atRowCol(o,t);r=s.atRowCol(t,t),f=-b(Math.sqrt(l),r),a=r*f-l,s.setRowCol(t,t,r-f);for(let o=u;o<c;o++){l=0;for(let i=t;i<M;i++)l+=s.atRowCol(i,t)*s.atRowCol(i,o);r=l/a;for(let i=t;i<M;i++)s.setRowCol(i,o,s.atRowCol(i,o)+r*s.atRowCol(i,t))}for(let o=t;o<M;o++)s.setRowCol(o,t,s.atRowCol(o,t)*R)}}if(o.set(t,R*f),f=l=R=0,t<M&&t!==c-1){for(let o=u;o<c;o++)R+=Math.abs(s.atRowCol(t,o));if(R){for(let o=u;o<c;o++)s.setRowCol(t,o,s.atRowCol(t,o)/R),l+=s.atRowCol(t,o)*s.atRowCol(t,o);r=s.atRowCol(t,u),f=-b(Math.sqrt(l),r),a=r*f-l,s.setRowCol(t,u,r-f);for(let o=u;o<c;o++)N.set(o,s.atRowCol(t,o)/a);for(let o=u;o<M;o++){l=0;for(let i=u;i<c;i++)l+=s.atRowCol(o,i)*s.atRowCol(t,i);for(let t=u;t<c;t++)s.setRowCol(o,t,s.atRowCol(o,t)+l*N.at(t))}for(let o=u;o<c;o++)s.setRowCol(t,o,s.atRowCol(t,o)*R)}}const i=Math.abs(o.at(t))+Math.abs(N.at(t));d=i>d?i:d}for(let t=c-1;t>=0;t--){if(t<c-1){if(f){for(let o=u;o<c;o++)i.setRowCol(o,t,s.atRowCol(t,o)/s.atRowCol(t,u)/f);for(let o=u;o<c;o++){l=0;for(let e=u;e<c;e++)l+=s.atRowCol(t,e)*i.atRowCol(e,o);for(let s=u;s<c;s++)i.setRowCol(s,o,i.atRowCol(s,o)+l*i.atRowCol(s,t))}}for(let s=u;s<c;s++)i.setRowCol(t,s,0),i.setRowCol(s,t,0)}i.setRowCol(t,t,1),f=N.at(t),u=t}for(let t=(M<c?M:c)-1;t>=0;t--){u=t+1,f=o.at(t);for(let o=u;o<c;o++)s.setRowCol(t,o,0);if(f){f=1/f;for(let o=u;o<c;o++){l=0;for(let i=u;i<M;i++)l+=s.atRowCol(i,t)*s.atRowCol(i,o);r=l/s.atRowCol(t,t)*f;for(let i=t;i<M;i++)s.setRowCol(i,o,s.atRowCol(i,o)+r*s.atRowCol(i,t))}for(let o=t;o<M;o++)s.setRowCol(o,t,s.atRowCol(o,t)*f)}else for(let o=t;o<M;o++)s.setRowCol(o,t,0);s.setRowCol(t,t,s.atRowCol(t,t)+1)}for(let t=c-1;t>=0;t--)for(let e=1;;e++){let y=1;for(u=t;u>=0;u--){if(C=u-1,Math.abs(N.at(u))+d===d){y=0;break}if(Math.abs(o.at(C))+d===d)break}if(y){h=0,l=1;for(let i=u;i<=t&&(r=l*N.at(i),N.set(i,N.at(i)*h),Math.abs(r)+d!==d);i++){f=o.at(i),a=p(r,f),o.set(i,a),a=1/a,h=f*a,l=-r*a;for(let t=0;t<M;t++)x=s.atRowCol(t,C),w=s.atRowCol(t,i),s.setRowCol(t,C,x*h+w*l),s.setRowCol(t,i,w*h-x*l)}}if(w=o.at(t),u===t){if(w<0){o.set(t,-w);for(let s=0;s<c;s++)i.setRowCol(s,t,-i.atRowCol(s,t))}break}if(100===e)return!1;n=o.at(u),C=t-1,x=o.at(C),f=N.at(C),a=N.at(t),r=((x-w)*(x+w)+(f-a)*(f+a))/(2*a*x),f=p(r,1),r=((n-w)*(n+w)+a*(x/(r+b(f,r))-a))/n,h=l=1;for(let t=u;t<=C;t++){const e=t+1;f=N.at(e),x=o.at(e),a=l*f,f*=h,w=p(r,a),N.set(t,w),h=r/w,l=a/w,r=n*h+f*l,f=f*h-n*l,a=x*l,x*=h;for(let s=0;s<c;s++)n=i.atRowCol(s,t),w=i.atRowCol(s,e),i.setRowCol(s,t,n*h+w*l),i.setRowCol(s,e,w*h-n*l);w=p(r,a),o.set(t,w),w&&(w=1/w,h=r*w,l=a*w),r=h*f+l*x,n=h*x-l*f;for(let o=0;o<M;o++)x=s.atRowCol(o,t),w=s.atRowCol(o,e),s.setRowCol(o,t,x*h+w*l),s.setRowCol(o,e,w*h-x*l)}N.set(u,0),N.set(t,r),o.set(t,n)}const g=new Float64Array(this.N),v=new Float64Array(this.M),T=new y(g,this.N,1),I=new y(v,this.M,1);let A=1;do{A*=3,A++}while(A<=this.M);do{A/=3,A=Math.trunc(A);for(let t=A;t<this.M;t++){const e=o.at(t);for(let o=0;o<this.N;o++)T.set(o,s.atRowCol(o,t));for(let s=0;s<this.M;s++)I.set(s,i.atRowCol(s,t));let h=t;for(;o.at(h-A)<e;){o.set(h,o.at(h-A));for(let t=0;t<this.N;t++)s.setRowCol(t,h,s.atRowCol(t,h-A));for(let t=0;t<this.M;t++)i.setRowCol(t,h,i.atRowCol(t,h-A));if(h-=A,h<A)break}o.set(h,e);for(let t=0;t<this.N;t++)s.setRowCol(t,h,T.at(t));for(let t=0;t<this.M;t++)i.setRowCol(t,h,I.at(t))}}while(A>1);for(let t=0;t<this.M;t++){let o=0;for(let i=0;i<this.N;i++)s.atRowCol(i,t)<0&&o++;for(let s=0;s<this.M;s++)i.atRowCol(s,t)<0&&o++;if(o>Math.trunc((this.N+this.M)/2)){for(let o=0;o<this.N;o++)s.setRowCol(o,t,-s.atRowCol(o,t));for(let s=0;s<this.M;s++)i.setRowCol(s,t,-i.atRowCol(s,t))}}return!0}isSymmetric(){if(this.N!==this.M)return!1;for(let t=0;t<this.N;t++)for(let s=t+1;s<this.M;s++)if(this.atRowCol(t,s)!==this.atRowCol(s,t))return!1;return!0}isZero(){return t(0),!1}isIdentity(){return t(0),!1}equals(s,o){if(void 0!==o&&t(0),this.N!==s.N||this.M!==s.M)return!1;for(let t=0;t<this.N*this.M;t++)if(this.data[t]!==s.data[t])return!1;return!0}maxElement(){return t(0),0}minElement(){return t(0),0}determinant(){if(t(this.N===this.M),1===this.N)return this.data[0];if(2===this.N)return this.data[0]*this.data[3]-this.data[1]*this.data[2];if(3===this.N){const t=this;return t.atRowCol(0,0)*(t.atRowCol(1,1)*t.atRowCol(2,2)-t.atRowCol(1,2)*t.atRowCol(2,1))-t.atRowCol(0,1)*(t.atRowCol(1,0)*t.atRowCol(2,2)-t.atRowCol(2,0)*t.atRowCol(1,2))+t.atRowCol(0,2)*(t.atRowCol(1,0)*t.atRowCol(2,1)-t.atRowCol(1,1)*t.atRowCol(2,0))}const s=new Float64Array(this.N*this.N),o=new y(s,this.N,this.N),i=new Float64Array(this.N);if(!this.luDecomposition(o,i))return 0;let e=1;for(let t=0;t<this.N;t++)e*=o.atRowCol(t,t),i[t]!==t&&(e=-e);return e}submatrix(s,o,i){t(0)}inverse(s){t(0)}pseudoInverse(t,s=!1,o=2220446049250313e-31){if(t.setZero(),1===this.N&&1===this.M)return 0!==this.atRowCol(0,0)?t.setRowCol(0,0,1/this.atRowCol(0,0)):t.setRowCol(0,0,0),!0;if(2===this.N&&2===this.M){const s=this.atRowCol(0,0)*this.atRowCol(1,1)-this.atRowCol(0,1)*this.atRowCol(1,0),o=1e-5*(Math.abs(this.atRowCol(0,0)*this.atRowCol(1,1))+Math.abs(this.atRowCol(0,1)*this.atRowCol(1,0)));if(Math.abs(s)>o)return t.setRowCol(0,0,this.atRowCol(1,1)/s),t.setRowCol(0,1,-this.atRowCol(0,1)/s),t.setRowCol(1,0,-this.atRowCol(1,0)/s),t.setRowCol(1,1,this.atRowCol(0,0)/s),!0}const i=new Float64Array(this.N*this.M),e=new y(i,this.N,this.M),h=new Float64Array(this.M),r=new y(h,this.M,1),a=new Float64Array(this.M*this.M),l=new y(a,this.M,this.M);if(!this.svd(e,r,l,s))return!1;const n=Math.max(this.N,this.M),x=o*Math.abs(r.at(0))*n;for(let y=0;y<this.M;y++)r.at(y)>x?r.set(y,1/r.at(y)):r.set(y,0);return l.mulDiag(r,t),t.mulTranspose(e,t),!0}luDecomposition(s,o){return t(0),!1}symmetricEigen(s,o){t(this.rows()===this.cols()),t(this.rows()===s.rows()),t(o.rows()===o.cols()&&o.rows()===this.rows()),t(this.isSymmetric());const i=new Float64Array(this.N*this.M),e=new y(i,this.N,this.M);e.assignCopy(this);const h=100/Number.EPSILON,r=this.rows(),a=new Float64Array(r),l=new Float64Array(r),n=new y(a,r,1),x=new y(l,r,1);for(let t=0;t<r;t++)n.set(t,e.atRowCol(t,t)),s.set(t,e.atRowCol(t,t)),x.set(t,0);o.setIdentity();const w=()=>{const t=n;o.transposeInPlace();let i=1;do{i*=3,i++}while(i<=r);do{i/=3,i=Math.trunc(i);for(let e=i;e<r;e++){const h=s.at(e),r=Math.abs(h);for(let s=0;s<this.M;s++)t.set(s,o.atRowCol(s,e));let a=e;for(;Math.abs(s.at(a-i))<r;){s.set(a,s.at(a-i));for(let t=0;t<this.M;t++)o.setRowCol(t,a,o.atRowCol(t,a-i));if(a-=i,a<i)break}if(a!==e){s.set(a,h);for(let s=0;s<this.M;s++)o.setRowCol(s,a,t.at(s))}}}while(i>1)};for(let t=1;;t++){let i=0;for(let t=1;t<r;t++)for(let s=0;s<t;s++)i+=Math.abs(e.atRowCol(t,s));if(0===i)return w(),!0;const a=t<4?.2*i/(r*r):0;for(let l=0;l<r;l++)for(let i=l+1;i<r;i++){let y=h*Math.abs(e.atRowCol(i,l));if(t>4&&y<=Math.abs(s.at(l))&&y<=Math.abs(s.at(i)))e.setRowCol(i,l,0);else if(Math.abs(e.atRowCol(i,l))>a){let t,h=s.at(i)-s.at(l);if(y<Math.abs(h))t=e.atRowCol(i,l)/h;else{const s=.5*h/e.atRowCol(i,l);t=1/(Math.abs(s)+Math.sqrt(1+s*s)),s<0&&(t=-t)}const a=1/Math.sqrt(1+t*t),n=t*a,w=n/(1+a);h=t*e.atRowCol(i,l),x.set(l,x.at(l)-h),x.set(i,x.at(i)+h),s.set(l,s.at(l)-h),s.set(i,s.at(i)+h),e.setRowCol(i,l,0);let u=0;for(;u<l;u++)y=e.atRowCol(l,u),h=e.atRowCol(i,u),e.setRowCol(l,u,y-n*(h+y*w)),e.setRowCol(i,u,h+n*(y-h*w));for(u++;u<i;u++)y=e.atRowCol(u,l),h=e.atRowCol(i,u),e.setRowCol(u,l,y-n*(h+y*w)),e.setRowCol(i,u,h+n*(y-h*w));for(u++;u<r;u++)y=e.atRowCol(u,l),h=e.atRowCol(u,i),e.setRowCol(u,l,y-n*(h+y*w)),e.setRowCol(u,i,h+n*(y-h*w));for(u=0;u<r;u++)y=o.atRowCol(l,u),h=o.atRowCol(i,u),o.setRowCol(l,u,y-n*(h+y*w)),o.setRowCol(i,u,h+n*(y-h*w))}}for(let t=0;t<r;t++)n.set(t,n.at(t)+x.at(t)),s.set(t,n.at(t)),x.set(t,0)}}static checkDims(s,o,i){t(s.rows()===o&&s.cols()===i)}}class n extends y{constructor(t){if(t.copy){const s=new Float64Array(t.copy.N*t.copy.M);return super(s,t.copy.N,t.copy.M),this.buffer=s,void this.assignCopy(t.copy)}const s=new Float64Array(t.NN*t.MM);super(s,t.NN,t.MM),this.buffer=s,t.initializerList&&a(this.buffer,t.initializerList,0,0,t.initializerList.length)}assignCopy(t){return this===t||super.assignCopy(t),this}}class x{constructor(t){this.m_TransformationType=1,void 0===t?this.setIdentity():t instanceof x?this.set(t):this.setScale(t)}set(t){return this.xx=t.xx,this.xy=t.xy,this.xd=t.xd,this.yx=t.yx,this.yy=t.yy,this.yd=t.yd,this}clone(){return(new x).set(this)}setZero(){this.xx=0,this.yy=0,this.xy=0,this.yx=0,this.xd=0,this.yd=0}isEqual(t){return this===t||this.xx===t.xx&&this.xy===t.xy&&this.xd===t.xd&&this.yx===t.yx&&this.yy===t.yy&&this.yd===t.yd}transformInPlace(t){const s=this.xx*t.x+this.xy*t.y+this.xd,o=this.yx*t.x+this.yy*t.y+this.yd;t.x=s,t.y=o}transform(t){const s=t.clone();return this.transformInPlace(s),s}queryTransform(t,s){const o=this.xx*t.x+this.xy*t.y+this.xd,i=this.yx*t.x+this.yy*t.y+this.yd;s.setCoords(o,i)}transformEnvInPlace(t){if(t.isEmpty())return;const s=i(e,4);t.queryCorners(s),this.transformPoints2D(s,4,s),t.setFromPoints(s,4)}queryTransformEnv(s,o){t(0)}transformPoints2D(t,s,o){for(let i=0;i<s;++i)this.queryTransform(t[i],o[i])}transformInterleavedPoints(t,s,o){s*=2;const i=e.getNAN();for(let e=0;e<s;e+=2)i.x=t[e],i.y=t[e+1],this.transformInPlace(i),o[e]=i.x,o[e+1]=i.y}multiply(t){return x.st_multiply(this,t,this),this}mulLeft(s){return t(0),this}static st_multiply(t,s,o){const i=t.xx*s.xx+t.yx*s.xy,e=t.xy*s.xx+t.yy*s.xy,h=t.xd*s.xx+t.yd*s.xy+s.xd,r=t.xx*s.yx+t.yx*s.yy,a=t.xy*s.yx+t.yy*s.yy,l=t.xd*s.yx+t.yd*s.yy+s.yd;o.xx=i,o.xy=e,o.xd=h,o.yx=r,o.yy=a,o.yd=l}getCoefficients(s){t(s.length>=6),s[0]=this.xx,s[1]=this.xy,s[2]=this.xd,s[3]=this.yx,s[4]=this.yy,s[5]=this.yd}setCoefficients(s){t(s.length>=6),this.xx=s[0],this.xy=s[1],this.xd=s[2],this.yx=s[3],this.yy=s[4],this.yd=s[5]}copyTo(s){t(0)}initializeFromRect(t,s){t.isEmpty()||s.isEmpty()||!t.width()||!t.height()?this.setZero():(this.xy=this.yx=0,this.xx=s.width()/t.width(),this.yy=s.height()/t.height(),this.xd=s.xmin-t.xmin*this.xx,this.yd=s.ymin-t.ymin*this.yy)}initializeFromRectIsotropic(t,s){if(t.isEmpty()||!t.width()||!t.height()||s.isEmpty())this.setZero();else{this.yx=0,this.xy=0,this.xx=s.width()/t.width(),this.yy=s.height()/t.height(),this.xx>this.yy?this.xx=this.yy:this.yy=this.xx;const o=s.getCenter(),i=t.getCenter();this.xd=o.x-i.x*this.xx,this.yd=o.y-i.y*this.yy}}initializeFromTwoPointsArray(t,o){if(t[0].equals(o[0])&&t[1].equals(o[1]))return void this.setIdentity();if(t[0].equals(t[1])){if(o[0].equals(o[1]))return void this.setShift(o[0].sub(t[0]));s("")}if(!t[0].equals(t[1])&&o[0].equals(o[1]))return this.setZero(),void this.shift(o[0]);this.setShiftCoords(-t[0].x,-t[0].y);const i=e.distance(t[0],t[1]),h=e.distance(o[0],o[1]),r=h/i;this.scale(r,r);const a=t[1].sub(t[0]);a.divThis(i);const l=o[1].sub(o[0]);l.divThis(h);const y=a.crossProduct(l),n=a.dotProduct(l);this.rotate(n,y),this.shiftCoords(o[0].x,o[0].y)}initializeFromTwoPoints(t,s,o,i){const e=[t,s],h=[o,i];this.initializeFromTwoPointsArray(e,h)}transformSizeInPlace(s){t(0)}transformSize(s,o){t(0)}transformTol(s){return t(0),0}transformWithoutTranslateArray(t,s,o){for(let i=0;i<s;++i)this.transformWithoutTranslate(t[i],o[i])}transformWithoutTranslateInPlace(t){const s=this.xx*t.x+this.xy*t.y,o=this.yx*t.x+this.yy*t.y;t.setCoords(s,o)}transformWithoutTranslate(t,s){const o=this.xx*t.x+this.xy*t.y,i=this.yx*t.x+this.yy*t.y;s.setCoords(o,i)}setIdentity(){this.xx=1,this.xy=0,this.xd=0,this.yx=0,this.yy=1,this.yd=0}isIdentity(){return!(1!==this.xx||1!==this.yy||this.xy||this.xd||this.yx||this.yd)}isIdentityTol(t){const s=t*t;return!(h(this.xd)+h(this.yd)>s)&&(!(h(this.xy+this.xd)+h(this.yy+this.yd-1)>s)&&!(h(this.xx+this.xd-1)+h(this.yx+this.yd)>s))}isReflective(){return this.xx*this.yy-this.yx*this.xy<0}isUniform(t){const s=this.xx*this.xx+this.yx*this.yx,o=this.xy*this.xy+this.yy*this.yy,i=(s+o)*t;return Math.abs(s-o)<=i&&Math.abs(this.xx*this.xy+this.yx*this.yy)<=i}isUniformNoRotation(){return 0!==this.xx&&Math.abs(this.xx)===Math.abs(this.yy)&&0===this.xy&&0===this.yx}isTranslate(){return 1===this.xx&&1===this.yy&&!this.xy&&!this.yx}isTranslateTol(t){const s=new e;return s.setCoords(0,1),this.transformWithoutTranslateInPlace(s),s.y-=1,!(s.sqrLength()>t*t)&&(s.setCoords(1,0),this.transformWithoutTranslateInPlace(s),s.x-=1,s.sqrLength()<=t*t)}isOrthonormal(t){const s=new x;return s.xx=this.xx*this.xx+this.xy*this.xy,s.xy=this.xx*this.yx+this.xy*this.yy,s.yx=this.yx*this.xx+this.yy*this.xy,s.yy=this.yx*this.yx+this.yy*this.yy,s.xd=0,s.yd=0,s.isIdentityTol(t)}isDegenerate(t){return Math.abs(this.xx*this.yy-this.yx*this.xy)<=2*t*(Math.abs(this.xx*this.yy)+Math.abs(this.yx*this.xy))}isZero(){return 0===this.xx&&0===this.yy&&0===this.xy&&0===this.yx&&0===this.xd&&0===this.yd}isScaleAndTranslateTol(t){return this.xy*this.xy+this.yx*this.yx<=(this.xx*this.xx+this.yy*this.yy)*t}setTranslate(t,s){return this.xx=1,this.xy=0,this.xd=t,this.yx=0,this.yy=1,this.yd=s,this}setShiftCoords(t,s){return this.xx=1,this.xy=0,this.xd=t,this.yx=0,this.yy=1,this.yd=s,this}setShift(t){return this.xx=1,this.xy=0,this.xd=t.x,this.yx=0,this.yy=1,this.yd=t.y,this}setScaleCoords(t,s){return this.xx=t,this.xy=0,this.xd=0,this.yx=0,this.yy=s,this.yd=0,this}setScale(t){return this.setScaleCoords(t,t),this}setFlipX(t,s){return this.xx=-1,this.xy=0,this.xd=t+s,this.yx=0,this.yy=1,this.yd=0,this}setFlipY(t,s){return this.xx=1,this.xy=0,this.xd=0,this.yx=0,this.yy=-1,this.yd=t+s,this}setShear(t,s){return this.xx=1,this.xy=t,this.xd=0,this.yx=s,this.yy=1,this.yd=0,this}scale(t,s){return this.xx*=t,this.xy*=t,this.xd*=t,this.yx*=s,this.yy*=s,this.yd*=s,this}setRotateAngle(t){return this.setRotate(Math.cos(t),Math.sin(t))}setRotate(t,s){return this.xx=t,this.xy=-s,this.xd=0,this.yx=s,this.yy=t,this.yd=0,this}setRotateAngleAbout(t,s){return this.setRotateAbout(Math.cos(t),Math.sin(t),s)}setRotateAbout(t,s,o){return this.setTranslate(-o.x,-o.y),this.rotate(t,s),this.translate(o.x,o.y)}setSwapCoordinates(){return this.xx=0,this.xy=1,this.xd=0,this.yx=1,this.yy=0,this.yd=0,this}setRotateCw90(){return this.xx=0,this.xy=1,this.xd=0,this.yx=-1,this.yy=0,this.yd=0,this}setRotateCcw90(){return this.xx=0,this.xy=-1,this.xd=0,this.yx=1,this.yy=0,this.yd=0,this}shiftCoords(t,s){return this.xd+=t,this.yd+=s,this}shift(t){return this.xd+=t.x,this.yd+=t.y,this}translate(t,s){return this.xd+=t,this.yd+=s,this}flipX(t,s){return this.xx=-this.xx,this.xy=-this.xy,this.xd=t+s-this.xd,this}flipY(t,s){return this.yx=-this.yx,this.yy=-this.yy,this.yd=t+s-this.yd,this}shear(t,s){const o=new x;return o.setShear(t,s),this.multiply(o)}rotateAngle(t){const s=new x;return s.setRotateAngle(t),this.multiply(s)}rotate(t,s){const o=new x;return o.setRotate(t,s),this.multiply(o)}rotateAbout(t,s,o){return this.translate(-o.x,-o.y),this.rotate(t,s),this.translate(o.x,o.y)}rotateAngleAbout(t,s){return this.rotateAbout(Math.cos(t),Math.sin(t),s)}setInvert(t){return this.set(t),this.invertThis()}invertThis(){let t=this.xx*this.yy-this.xy*this.yx;if(0===t)return this.setZero(),this;t=1/t;const s=(this.xy*this.yd-this.xd*this.yy)*t,o=(this.xd*this.yx-this.xx*this.yd)*t,i=this.yy*t,e=-this.xy*t,h=-this.yx*t,r=this.xx*t;return this.xd=s,this.yd=o,this.xx=i,this.yy=r,this.xy=e,this.yx=h,this}invertPrecise(t){return this.set(t),this.invertPreciseThis()}invertPreciseThis(){const t=r.constructDouble(this.xy),s=r.constructDouble(this.xx),o=s.mulDouble(this.yy).sub(t.mulDouble(this.yx));if(o.isZero())return this.setZero(),this;const i=o.clone();i.invertThis();const e=r.constructDouble(this.xd),h=t.mulDouble(this.yd).sub(e.mulDouble(this.yy)).mul(i).toDouble(),a=e.mulDouble(this.yx).sub(s.mulDouble(this.yd)).mul(i).toDouble(),l=i.mulDouble(this.yy).toDouble(),y=i.mulDouble(-this.xy).toDouble(),n=i.mulDouble(-this.yx).toDouble(),x=i.mulDouble(this.xx).toDouble();return this.xd=h,this.yd=a,this.xx=l,this.yy=x,this.xy=y,this.yx=n,this}extractScaleTransform(t,s){const o=Math.sqrt(this.xx*this.xx+this.xy*this.xy),i=Math.sqrt(this.yx*this.yx+this.yy*this.yy);s.setScaleCoords(1/o,1/i),s.multiply(this),t.setScaleCoords(o,i)}setFromTwoTriangles(t,s){let o=!0;for(let e=0;e<3;++e)o=o&&t[e].equals(s[e]);if(o)return this.setIdentity(),!0;const i=new e;i.setSub(t[0],t[1]);const h=new e;h.setSub(t[0],t[2]);const r=new e;r.setSub(s[0],s[1]);const a=new e;a.setSub(s[0],s[2]);const l=4*Number.EPSILON*(Math.abs(i.x*h.y)+Math.abs(h.x*i.y));let y=i.x*h.y-i.y*h.x;return Math.abs(y)>l?(y=1/y,this.xx=(r.x*h.y-i.y*a.x)*y,this.xy=(i.x*a.x-r.x*h.x)*y,this.yx=(r.y*h.y-i.y*a.y)*y,this.yy=(i.x*a.y-r.y*h.x)*y,this.xd=s[0].x-(this.xx*t[0].x+this.xy*t[0].y),this.yd=s[0].y-(this.yx*t[0].x+this.yy*t[0].y),!0):(this.setZero(),!1)}initializeFromControlPoints(t,s,o,i,e=null){return 0===s?(this.setIdentity(),void(e&&e.setIdentity())):1===s?(this.setShift(i[0].sub(o[0])),void(e&&e.setShift(o[0].sub(i[0])))):(s<3&&(t=1),void(4===t&&s>2?C(this,s,o,i,e):f(t,this,s,o,i,e)))}calculateErrors(s,o,i,h){t(s>0&&null!==o&&null!==i);let r=0;for(let t=0;t<s;++t){const s=this.transform(o[t]),a=e.sqrDistance(i[t],s);r+=a,h&&(h[t]=Math.sqrt(a))}return Math.sqrt(r/s)}}const w=[43,11,41,9,61];function u(s,o){t(!(2!==o.rows()&&3!==o.rows()||2!==o.cols()&&3!==o.rows())),s.xx=o.atRowCol(0,0),s.xy=o.atRowCol(0,1),s.yx=o.atRowCol(1,0),s.yy=o.atRowCol(1,1),3===o.cols()?(s.xd=o.atRowCol(0,2),s.yd=o.atRowCol(1,2)):(s.xd=0,s.yd=0)}function C(t,s,i,h,r){const a=e.average(i,s),l=e.average(h,s),y=new n({NN:2,MM:2});y.setZero();const x=new n({NN:2,MM:2});x.setZero();for(let o=0;o<s;++o)y.setRowCol(0,0,y.atRowCol(0,0)+(i[o].x-a.x)*(i[o].x-a.x)),y.setRowCol(0,1,y.atRowCol(0,1)+(i[o].x-a.x)*(i[o].y-a.y)),y.setRowCol(1,1,y.atRowCol(1,1)+(i[o].y-a.y)*(i[o].y-a.y)),x.setRowCol(0,0,x.atRowCol(0,0)+(h[o].x-l.x)*(i[o].x-a.x)),x.setRowCol(0,1,x.atRowCol(0,1)+(h[o].x-l.x)*(i[o].y-a.y)),x.setRowCol(1,0,x.atRowCol(1,0)+(h[o].y-l.y)*(i[o].x-a.x)),x.setRowCol(1,1,x.atRowCol(1,1)+(h[o].y-l.y)*(i[o].y-a.y));y.setRowCol(1,0,y.atRowCol(0,1));const w=new n({NN:2,MM:2});y.pseudoInverse(w,!0)||o("Failed to compute pseudo inverse"),x.mul(w,x),u(t,x);const C=a.clone();t.transformInPlace(C),t.xd=l.x-C.x,t.yd=l.y-C.y,r&&(x.pseudoInverse(w,!1)||o("Failed to compute pseudo inverse"),u(r,w),r.transformInPlace(l),r.xd=a.x-l.x,r.yd=a.y-l.y)}function f(s,i,h,r,a,l){t(1===s||0===s||2===s||3===s),i.setIdentity();const y=e.average(r,h),C=e.average(a,h);if(t(s<w.length&&s>0),8&w[s]){const t=new n({NN:2,MM:2});t.setZero();for(let s=0;s<h;++s)t.setRowCol(0,0,t.atRowCol(0,0)+(a[s].x-C.x)*(r[s].x-y.x)),t.setRowCol(1,0,t.atRowCol(1,0)+(a[s].x-C.x)*(r[s].y-y.y)),t.setRowCol(0,1,t.atRowCol(0,1)+(a[s].y-C.y)*(r[s].x-y.x)),t.setRowCol(1,1,t.atRowCol(1,1)+(a[s].y-C.y)*(r[s].y-y.y));const e=new n({NN:2,MM:2}),l=new n({NN:2,MM:1}),f=new n({NN:2,MM:2});t.svd(e,l,f)||o("Failed to compute svd");const R=new n({NN:2,MM:2});e.transpose(R);const d=new n({NN:2,MM:2});if(f.mul(R,d),!(32&w[s])){d.determinant()<0&&(R.setRowCol(1,0,-R.atRowCol(1,0)),R.setRowCol(1,1,-R.atRowCol(1,1)),f.mul(R,d))}const c=new x;u(c,d),i.set(c)}if(2&w[s]){let t=0,s=0;for(let o=0;o<h;++o){const e=r[o].sub(y);t+=e.sqrLength(),i.transformInPlace(e),s+=e.dotProduct(a[o].sub(C))}if(0===t)0===s?i.setIdentity():i.setZero();else{const o=s/t;i.scale(o,o)}}else t(!(4&w[s]));const f=y.clone();i.transformInPlace(f),i.xd=C.x-f.x,i.yd=C.y-f.y,l&&(l.set(i),l.invertThis(),l.isZero()&&(l.xd=y.x,l.yd=y.y))}export{x as T};
5
+ import{g as t,a as s,b as o}from"./Geometry.js";import{m as i,P as e,a as h,M as r,b as a,c as l}from"./Point2D.js";class y{constructor(t,s,o){if(t instanceof y)return this.data=t.data,this.N=t.N,this.M=t.M,t.data=null,t.N=0,void(t.M=0);this.data=t,this.N=s,this.M=o}assignCopy(s){return this===s||(t(this.N*this.M==s.N*s.M),this.data.set(s.data),this.N=s.N,this.M=s.M),this}setZero(){return this.data?.fill(0),this}setIdentity(){const t=0,s=1;for(let o=0;o<this.N;o++)for(let i=0;i<this.M;i++)this.setRowCol(o,i,o===i?s:t);return this}rows(){return this.N}cols(){return this.M}row(s){return t(0),{}}set(t,s){return this.data[t]=s,this}setRowCol(t,s,o){return this.data[t*this.M+s]=o,this}at(t){return this.data[t]}atRowCol(t,s){return this.data[t*this.M+s]}mulScalar(s,o){t(0)}mul(s,o){if(t(this.M===s.rows()),t(this.N===o.rows()),t(s.cols()===o.cols()),o===this){const t=new Float64Array(this.N*this.M),i=new y(t,this.N,this.M);return this.mul(s,i),void o.assignCopy(i)}if(o===s){const t=new Float64Array(s.N*s.M),i=new y(t,s.N,s.M);return this.mul(s,i),void o.assignCopy(i)}const i=s.cols();for(let t=0;t<this.N;t++)for(let e=0;e<i;e++){let i=0;for(let o=0;o<this.M;o++)i+=this.atRowCol(t,o)*s.atRowCol(o,e);o.setRowCol(t,e,i)}}mulTranspose(s,o){if(t(this.M===s.cols()),t(this.N===o.rows()),t(s.rows()===o.cols()),o===this){const t=new Float64Array(this.N*this.M),i=new y(t,this.N,this.M);return this.mulTranspose(s,i),void o.assignCopy(i)}if(o===s){const t=new Float64Array(s.N*s.M),i=new y(t,s.N,s.M);return this.mulTranspose(s,i),void o.assignCopy(i)}const i=s.rows();for(let t=0;t<this.N;t++)for(let e=0;e<i;e++){let i=0;for(let o=0;o<this.M;o++)i+=this.atRowCol(t,o)*s.atRowCol(e,o);o.setRowCol(t,e,i)}}mulLeft(s,o){t(0)}mulLeftTranspose(s,o){t(0)}mulDiag(s,o){if(t(this.M===s.N*s.M),t(this.N===o.rows()),t(this.M===o.cols()),o===this){const t=new Float64Array(this.N*this.M),i=new y(t,this.N,this.M);return this.mulDiag(s,i),void o.assignCopy(i)}const i=this.M;for(let t=0;t<this.N;t++)for(let e=0;e<i;e++)o.setRowCol(t,e,this.atRowCol(t,e)*s.at(e))}transposeInPlace(){if(this.N===this.M){for(let t=0;t<this.N;t++)for(let s=t+1;s<this.M;s++){const o=this.atRowCol(t,s);this.setRowCol(t,s,this.atRowCol(s,t)),this.setRowCol(s,t,o)}return this}const t=new Float64Array(this.N*this.M),s=new y(t,this.N,this.M);return s.assignCopy(this),this.M=l(this.N,this.N=this.M),s.transpose(this),this}transpose(t){if(this!==t){y.checkDims(t,this.M,this.N);for(let s=0;s<this.N;s++)for(let o=0;o<this.M;o++)t.setRowCol(o,s,this.atRowCol(s,o))}else t.transposeInPlace()}add(t,s){}svd(s,o,i,e=!1){if(y.checkDims(s,this.N,this.M),y.checkDims(o,this.M,1),y.checkDims(i,this.M,this.M),e){if(t(this.N===this.M),!this.symmetricEigen(o,i))return!1;for(let t=0;t<this.M;++t)o.at(t)<0&&o.set(t,0);return s.assignCopy(i),!0}let h,r,a,l,n,x,w,u=0,C=0,f=0,R=0,d=0;const c=this.M,M=this.N;s.assignCopy(this);const m=new Float64Array(c),N=new y(m,c,1),b=(t,s)=>s>=0?Math.abs(t):-Math.abs(t),p=(t,s)=>{if((t=Math.abs(t))>(s=Math.abs(s))){const o=s/t;return t*Math.sqrt(o*o+1)}if(s>0){const o=t/s;return s*Math.sqrt(o*o+1)}return 0};for(let t=0;t<c;t++){if(u=t+1,N.set(t,R*f),f=l=R=0,t<M){for(let o=t;o<M;o++)R+=Math.abs(s.atRowCol(o,t));if(R){for(let o=t;o<M;o++)s.setRowCol(o,t,s.atRowCol(o,t)/R),l+=s.atRowCol(o,t)*s.atRowCol(o,t);r=s.atRowCol(t,t),f=-b(Math.sqrt(l),r),a=r*f-l,s.setRowCol(t,t,r-f);for(let o=u;o<c;o++){l=0;for(let i=t;i<M;i++)l+=s.atRowCol(i,t)*s.atRowCol(i,o);r=l/a;for(let i=t;i<M;i++)s.setRowCol(i,o,s.atRowCol(i,o)+r*s.atRowCol(i,t))}for(let o=t;o<M;o++)s.setRowCol(o,t,s.atRowCol(o,t)*R)}}if(o.set(t,R*f),f=l=R=0,t<M&&t!==c-1){for(let o=u;o<c;o++)R+=Math.abs(s.atRowCol(t,o));if(R){for(let o=u;o<c;o++)s.setRowCol(t,o,s.atRowCol(t,o)/R),l+=s.atRowCol(t,o)*s.atRowCol(t,o);r=s.atRowCol(t,u),f=-b(Math.sqrt(l),r),a=r*f-l,s.setRowCol(t,u,r-f);for(let o=u;o<c;o++)N.set(o,s.atRowCol(t,o)/a);for(let o=u;o<M;o++){l=0;for(let i=u;i<c;i++)l+=s.atRowCol(o,i)*s.atRowCol(t,i);for(let t=u;t<c;t++)s.setRowCol(o,t,s.atRowCol(o,t)+l*N.at(t))}for(let o=u;o<c;o++)s.setRowCol(t,o,s.atRowCol(t,o)*R)}}const i=Math.abs(o.at(t))+Math.abs(N.at(t));d=i>d?i:d}for(let t=c-1;t>=0;t--){if(t<c-1){if(f){for(let o=u;o<c;o++)i.setRowCol(o,t,s.atRowCol(t,o)/s.atRowCol(t,u)/f);for(let o=u;o<c;o++){l=0;for(let e=u;e<c;e++)l+=s.atRowCol(t,e)*i.atRowCol(e,o);for(let s=u;s<c;s++)i.setRowCol(s,o,i.atRowCol(s,o)+l*i.atRowCol(s,t))}}for(let s=u;s<c;s++)i.setRowCol(t,s,0),i.setRowCol(s,t,0)}i.setRowCol(t,t,1),f=N.at(t),u=t}for(let t=(M<c?M:c)-1;t>=0;t--){u=t+1,f=o.at(t);for(let o=u;o<c;o++)s.setRowCol(t,o,0);if(f){f=1/f;for(let o=u;o<c;o++){l=0;for(let i=u;i<M;i++)l+=s.atRowCol(i,t)*s.atRowCol(i,o);r=l/s.atRowCol(t,t)*f;for(let i=t;i<M;i++)s.setRowCol(i,o,s.atRowCol(i,o)+r*s.atRowCol(i,t))}for(let o=t;o<M;o++)s.setRowCol(o,t,s.atRowCol(o,t)*f)}else for(let o=t;o<M;o++)s.setRowCol(o,t,0);s.setRowCol(t,t,s.atRowCol(t,t)+1)}for(let t=c-1;t>=0;t--)for(let e=1;;e++){let y=1;for(u=t;u>=0;u--){if(C=u-1,Math.abs(N.at(u))+d===d){y=0;break}if(Math.abs(o.at(C))+d===d)break}if(y){h=0,l=1;for(let i=u;i<=t&&(r=l*N.at(i),N.set(i,N.at(i)*h),Math.abs(r)+d!==d);i++){f=o.at(i),a=p(r,f),o.set(i,a),a=1/a,h=f*a,l=-r*a;for(let t=0;t<M;t++)x=s.atRowCol(t,C),w=s.atRowCol(t,i),s.setRowCol(t,C,x*h+w*l),s.setRowCol(t,i,w*h-x*l)}}if(w=o.at(t),u===t){if(w<0){o.set(t,-w);for(let s=0;s<c;s++)i.setRowCol(s,t,-i.atRowCol(s,t))}break}if(100===e)return!1;n=o.at(u),C=t-1,x=o.at(C),f=N.at(C),a=N.at(t),r=((x-w)*(x+w)+(f-a)*(f+a))/(2*a*x),f=p(r,1),r=((n-w)*(n+w)+a*(x/(r+b(f,r))-a))/n,h=l=1;for(let t=u;t<=C;t++){const e=t+1;f=N.at(e),x=o.at(e),a=l*f,f*=h,w=p(r,a),N.set(t,w),h=r/w,l=a/w,r=n*h+f*l,f=f*h-n*l,a=x*l,x*=h;for(let s=0;s<c;s++)n=i.atRowCol(s,t),w=i.atRowCol(s,e),i.setRowCol(s,t,n*h+w*l),i.setRowCol(s,e,w*h-n*l);w=p(r,a),o.set(t,w),w&&(w=1/w,h=r*w,l=a*w),r=h*f+l*x,n=h*x-l*f;for(let o=0;o<M;o++)x=s.atRowCol(o,t),w=s.atRowCol(o,e),s.setRowCol(o,t,x*h+w*l),s.setRowCol(o,e,w*h-x*l)}N.set(u,0),N.set(t,r),o.set(t,n)}const g=new Float64Array(this.N),v=new Float64Array(this.M),T=new y(g,this.N,1),I=new y(v,this.M,1);let A=1;do{A*=3,A++}while(A<=this.M);do{A/=3,A=Math.trunc(A);for(let t=A;t<this.M;t++){const e=o.at(t);for(let o=0;o<this.N;o++)T.set(o,s.atRowCol(o,t));for(let s=0;s<this.M;s++)I.set(s,i.atRowCol(s,t));let h=t;for(;o.at(h-A)<e;){o.set(h,o.at(h-A));for(let t=0;t<this.N;t++)s.setRowCol(t,h,s.atRowCol(t,h-A));for(let t=0;t<this.M;t++)i.setRowCol(t,h,i.atRowCol(t,h-A));if(h-=A,h<A)break}o.set(h,e);for(let t=0;t<this.N;t++)s.setRowCol(t,h,T.at(t));for(let t=0;t<this.M;t++)i.setRowCol(t,h,I.at(t))}}while(A>1);for(let t=0;t<this.M;t++){let o=0;for(let i=0;i<this.N;i++)s.atRowCol(i,t)<0&&o++;for(let s=0;s<this.M;s++)i.atRowCol(s,t)<0&&o++;if(o>Math.trunc((this.N+this.M)/2)){for(let o=0;o<this.N;o++)s.setRowCol(o,t,-s.atRowCol(o,t));for(let s=0;s<this.M;s++)i.setRowCol(s,t,-i.atRowCol(s,t))}}return!0}isSymmetric(){if(this.N!==this.M)return!1;for(let t=0;t<this.N;t++)for(let s=t+1;s<this.M;s++)if(this.atRowCol(t,s)!==this.atRowCol(s,t))return!1;return!0}isZero(){return t(0),!1}isIdentity(){return t(0),!1}equals(s,o){if(void 0!==o&&t(0),this.N!==s.N||this.M!==s.M)return!1;for(let t=0;t<this.N*this.M;t++)if(this.data[t]!==s.data[t])return!1;return!0}maxElement(){return t(0),0}minElement(){return t(0),0}determinant(){if(t(this.N===this.M),1===this.N)return this.data[0];if(2===this.N)return this.data[0]*this.data[3]-this.data[1]*this.data[2];if(3===this.N){const t=this;return t.atRowCol(0,0)*(t.atRowCol(1,1)*t.atRowCol(2,2)-t.atRowCol(1,2)*t.atRowCol(2,1))-t.atRowCol(0,1)*(t.atRowCol(1,0)*t.atRowCol(2,2)-t.atRowCol(2,0)*t.atRowCol(1,2))+t.atRowCol(0,2)*(t.atRowCol(1,0)*t.atRowCol(2,1)-t.atRowCol(1,1)*t.atRowCol(2,0))}const s=new Float64Array(this.N*this.N),o=new y(s,this.N,this.N),i=new Float64Array(this.N);if(!this.luDecomposition(o,i))return 0;let e=1;for(let t=0;t<this.N;t++)e*=o.atRowCol(t,t),i[t]!==t&&(e=-e);return e}submatrix(s,o,i){t(0)}inverse(s){t(0)}pseudoInverse(t,s=!1,o=2220446049250313e-31){if(t.setZero(),1===this.N&&1===this.M)return 0!==this.atRowCol(0,0)?t.setRowCol(0,0,1/this.atRowCol(0,0)):t.setRowCol(0,0,0),!0;if(2===this.N&&2===this.M){const s=this.atRowCol(0,0)*this.atRowCol(1,1)-this.atRowCol(0,1)*this.atRowCol(1,0),o=1e-5*(Math.abs(this.atRowCol(0,0)*this.atRowCol(1,1))+Math.abs(this.atRowCol(0,1)*this.atRowCol(1,0)));if(Math.abs(s)>o)return t.setRowCol(0,0,this.atRowCol(1,1)/s),t.setRowCol(0,1,-this.atRowCol(0,1)/s),t.setRowCol(1,0,-this.atRowCol(1,0)/s),t.setRowCol(1,1,this.atRowCol(0,0)/s),!0}const i=new Float64Array(this.N*this.M),e=new y(i,this.N,this.M),h=new Float64Array(this.M),r=new y(h,this.M,1),a=new Float64Array(this.M*this.M),l=new y(a,this.M,this.M);if(!this.svd(e,r,l,s))return!1;const n=Math.max(this.N,this.M),x=o*Math.abs(r.at(0))*n;for(let y=0;y<this.M;y++)r.at(y)>x?r.set(y,1/r.at(y)):r.set(y,0);return l.mulDiag(r,t),t.mulTranspose(e,t),!0}luDecomposition(s,o){return t(0),!1}symmetricEigen(s,o){t(this.rows()===this.cols()),t(this.rows()===s.rows()),t(o.rows()===o.cols()&&o.rows()===this.rows()),t(this.isSymmetric());const i=new Float64Array(this.N*this.M),e=new y(i,this.N,this.M);e.assignCopy(this);const h=100/Number.EPSILON,r=this.rows(),a=new Float64Array(r),l=new Float64Array(r),n=new y(a,r,1),x=new y(l,r,1);for(let t=0;t<r;t++)n.set(t,e.atRowCol(t,t)),s.set(t,e.atRowCol(t,t)),x.set(t,0);o.setIdentity();const w=()=>{const t=n;o.transposeInPlace();let i=1;do{i*=3,i++}while(i<=r);do{i/=3,i=Math.trunc(i);for(let e=i;e<r;e++){const h=s.at(e),r=Math.abs(h);for(let s=0;s<this.M;s++)t.set(s,o.atRowCol(s,e));let a=e;for(;Math.abs(s.at(a-i))<r;){s.set(a,s.at(a-i));for(let t=0;t<this.M;t++)o.setRowCol(t,a,o.atRowCol(t,a-i));if(a-=i,a<i)break}if(a!==e){s.set(a,h);for(let s=0;s<this.M;s++)o.setRowCol(s,a,t.at(s))}}}while(i>1)};for(let t=1;;t++){let i=0;for(let t=1;t<r;t++)for(let s=0;s<t;s++)i+=Math.abs(e.atRowCol(t,s));if(0===i)return w(),!0;const a=t<4?.2*i/(r*r):0;for(let l=0;l<r;l++)for(let i=l+1;i<r;i++){let y=h*Math.abs(e.atRowCol(i,l));if(t>4&&y<=Math.abs(s.at(l))&&y<=Math.abs(s.at(i)))e.setRowCol(i,l,0);else if(Math.abs(e.atRowCol(i,l))>a){let t,h=s.at(i)-s.at(l);if(y<Math.abs(h))t=e.atRowCol(i,l)/h;else{const s=.5*h/e.atRowCol(i,l);t=1/(Math.abs(s)+Math.sqrt(1+s*s)),s<0&&(t=-t)}const a=1/Math.sqrt(1+t*t),n=t*a,w=n/(1+a);h=t*e.atRowCol(i,l),x.set(l,x.at(l)-h),x.set(i,x.at(i)+h),s.set(l,s.at(l)-h),s.set(i,s.at(i)+h),e.setRowCol(i,l,0);let u=0;for(;u<l;u++)y=e.atRowCol(l,u),h=e.atRowCol(i,u),e.setRowCol(l,u,y-n*(h+y*w)),e.setRowCol(i,u,h+n*(y-h*w));for(u++;u<i;u++)y=e.atRowCol(u,l),h=e.atRowCol(i,u),e.setRowCol(u,l,y-n*(h+y*w)),e.setRowCol(i,u,h+n*(y-h*w));for(u++;u<r;u++)y=e.atRowCol(u,l),h=e.atRowCol(u,i),e.setRowCol(u,l,y-n*(h+y*w)),e.setRowCol(u,i,h+n*(y-h*w));for(u=0;u<r;u++)y=o.atRowCol(l,u),h=o.atRowCol(i,u),o.setRowCol(l,u,y-n*(h+y*w)),o.setRowCol(i,u,h+n*(y-h*w))}}for(let t=0;t<r;t++)n.set(t,n.at(t)+x.at(t)),s.set(t,n.at(t)),x.set(t,0)}}static checkDims(s,o,i){t(s.rows()===o&&s.cols()===i)}}class n extends y{constructor(t){if(t.copy){const s=new Float64Array(t.copy.N*t.copy.M);return super(s,t.copy.N,t.copy.M),this.buffer=s,void this.assignCopy(t.copy)}const s=new Float64Array(t.NN*t.MM);super(s,t.NN,t.MM),this.buffer=s,t.initializerList&&a(this.buffer,t.initializerList,0,0,t.initializerList.length)}assignCopy(t){return this===t||super.assignCopy(t),this}}class x{constructor(t){this.m_TransformationType=1,void 0===t?this.setIdentity():t instanceof x?this.set(t):this.setScale(t)}set(t){return this.xx=t.xx,this.xy=t.xy,this.xd=t.xd,this.yx=t.yx,this.yy=t.yy,this.yd=t.yd,this}clone(){return(new x).set(this)}setZero(){this.xx=0,this.yy=0,this.xy=0,this.yx=0,this.xd=0,this.yd=0}isEqual(t){return this===t||this.xx===t.xx&&this.xy===t.xy&&this.xd===t.xd&&this.yx===t.yx&&this.yy===t.yy&&this.yd===t.yd}transformInPlace(t){const s=this.xx*t.x+this.xy*t.y+this.xd,o=this.yx*t.x+this.yy*t.y+this.yd;t.x=s,t.y=o}transform(t){const s=t.clone();return this.transformInPlace(s),s}queryTransform(t,s){const o=this.xx*t.x+this.xy*t.y+this.xd,i=this.yx*t.x+this.yy*t.y+this.yd;s.setCoords(o,i)}transformEnvInPlace(t){if(t.isEmpty())return;const s=i(e,4);t.queryCorners(s),this.transformPoints2D(s,4,s),t.setFromPoints(s,4)}queryTransformEnv(s,o){t(0)}transformPoints2D(t,s,o){for(let i=0;i<s;++i)this.queryTransform(t[i],o[i])}transformInterleavedPoints(t,s,o){s*=2;const i=e.getNAN();for(let e=0;e<s;e+=2)i.x=t[e],i.y=t[e+1],this.transformInPlace(i),o[e]=i.x,o[e+1]=i.y}multiply(t){return x.st_multiply(this,t,this),this}mulLeft(s){return t(0),this}static st_multiply(t,s,o){const i=t.xx*s.xx+t.yx*s.xy,e=t.xy*s.xx+t.yy*s.xy,h=t.xd*s.xx+t.yd*s.xy+s.xd,r=t.xx*s.yx+t.yx*s.yy,a=t.xy*s.yx+t.yy*s.yy,l=t.xd*s.yx+t.yd*s.yy+s.yd;o.xx=i,o.xy=e,o.xd=h,o.yx=r,o.yy=a,o.yd=l}getCoefficients(s){t(s.length>=6),s[0]=this.xx,s[1]=this.xy,s[2]=this.xd,s[3]=this.yx,s[4]=this.yy,s[5]=this.yd}setCoefficients(s){t(s.length>=6),this.xx=s[0],this.xy=s[1],this.xd=s[2],this.yx=s[3],this.yy=s[4],this.yd=s[5]}copyTo(s){t(0)}initializeFromRect(t,s){t.isEmpty()||s.isEmpty()||!t.width()||!t.height()?this.setZero():(this.xy=this.yx=0,this.xx=s.width()/t.width(),this.yy=s.height()/t.height(),this.xd=s.xmin-t.xmin*this.xx,this.yd=s.ymin-t.ymin*this.yy)}initializeFromRectIsotropic(t,s){if(t.isEmpty()||!t.width()||!t.height()||s.isEmpty())this.setZero();else{this.yx=0,this.xy=0,this.xx=s.width()/t.width(),this.yy=s.height()/t.height(),this.xx>this.yy?this.xx=this.yy:this.yy=this.xx;const o=s.getCenter(),i=t.getCenter();this.xd=o.x-i.x*this.xx,this.yd=o.y-i.y*this.yy}}initializeFromTwoPointsArray(t,o){if(t[0].equals(o[0])&&t[1].equals(o[1]))return void this.setIdentity();if(t[0].equals(t[1])){if(o[0].equals(o[1]))return void this.setShift(o[0].sub(t[0]));s("")}if(!t[0].equals(t[1])&&o[0].equals(o[1]))return this.setZero(),void this.shift(o[0]);this.setShiftCoords(-t[0].x,-t[0].y);const i=e.distance(t[0],t[1]),h=e.distance(o[0],o[1]),r=h/i;this.scale(r,r);const a=t[1].sub(t[0]);a.divThis(i);const l=o[1].sub(o[0]);l.divThis(h);const y=a.crossProduct(l),n=a.dotProduct(l);this.rotate(n,y),this.shiftCoords(o[0].x,o[0].y)}initializeFromTwoPoints(t,s,o,i){const e=[t,s],h=[o,i];this.initializeFromTwoPointsArray(e,h)}transformSizeInPlace(s){t(0)}transformSize(s,o){t(0)}transformTol(s){return t(0),0}transformWithoutTranslateArray(t,s,o){for(let i=0;i<s;++i)this.transformWithoutTranslate(t[i],o[i])}transformWithoutTranslateInPlace(t){const s=this.xx*t.x+this.xy*t.y,o=this.yx*t.x+this.yy*t.y;t.setCoords(s,o)}transformWithoutTranslate(t,s){const o=this.xx*t.x+this.xy*t.y,i=this.yx*t.x+this.yy*t.y;s.setCoords(o,i)}setIdentity(){this.xx=1,this.xy=0,this.xd=0,this.yx=0,this.yy=1,this.yd=0}isIdentity(){return!(1!==this.xx||1!==this.yy||this.xy||this.xd||this.yx||this.yd)}isIdentityTol(t){const s=t*t;return!(h(this.xd)+h(this.yd)>s)&&(!(h(this.xy+this.xd)+h(this.yy+this.yd-1)>s)&&!(h(this.xx+this.xd-1)+h(this.yx+this.yd)>s))}isReflective(){return this.xx*this.yy-this.yx*this.xy<0}isUniform(t){const s=this.xx*this.xx+this.yx*this.yx,o=this.xy*this.xy+this.yy*this.yy,i=(s+o)*t;return Math.abs(s-o)<=i&&Math.abs(this.xx*this.xy+this.yx*this.yy)<=i}isUniformNoRotation(){return 0!==this.xx&&Math.abs(this.xx)===Math.abs(this.yy)&&0===this.xy&&0===this.yx}isTranslate(){return 1===this.xx&&1===this.yy&&!this.xy&&!this.yx}isTranslateTol(t){const s=new e;return s.setCoords(0,1),this.transformWithoutTranslateInPlace(s),s.y-=1,!(s.sqrLength()>t*t)&&(s.setCoords(1,0),this.transformWithoutTranslateInPlace(s),s.x-=1,s.sqrLength()<=t*t)}isOrthonormal(t){const s=new x;return s.xx=this.xx*this.xx+this.xy*this.xy,s.xy=this.xx*this.yx+this.xy*this.yy,s.yx=this.yx*this.xx+this.yy*this.xy,s.yy=this.yx*this.yx+this.yy*this.yy,s.xd=0,s.yd=0,s.isIdentityTol(t)}isDegenerate(t){return Math.abs(this.xx*this.yy-this.yx*this.xy)<=2*t*(Math.abs(this.xx*this.yy)+Math.abs(this.yx*this.xy))}isZero(){return 0===this.xx&&0===this.yy&&0===this.xy&&0===this.yx&&0===this.xd&&0===this.yd}isScaleAndTranslateTol(t){return this.xy*this.xy+this.yx*this.yx<=(this.xx*this.xx+this.yy*this.yy)*t}setTranslate(t,s){return this.xx=1,this.xy=0,this.xd=t,this.yx=0,this.yy=1,this.yd=s,this}setShiftCoords(t,s){return this.xx=1,this.xy=0,this.xd=t,this.yx=0,this.yy=1,this.yd=s,this}setShift(t){return this.xx=1,this.xy=0,this.xd=t.x,this.yx=0,this.yy=1,this.yd=t.y,this}setScaleCoords(t,s){return this.xx=t,this.xy=0,this.xd=0,this.yx=0,this.yy=s,this.yd=0,this}setScale(t){return this.setScaleCoords(t,t),this}setFlipX(t,s){return this.xx=-1,this.xy=0,this.xd=t+s,this.yx=0,this.yy=1,this.yd=0,this}setFlipY(t,s){return this.xx=1,this.xy=0,this.xd=0,this.yx=0,this.yy=-1,this.yd=t+s,this}setShear(t,s){return this.xx=1,this.xy=t,this.xd=0,this.yx=s,this.yy=1,this.yd=0,this}scale(t,s){return this.xx*=t,this.xy*=t,this.xd*=t,this.yx*=s,this.yy*=s,this.yd*=s,this}setRotateAngle(t){return this.setRotate(Math.cos(t),Math.sin(t))}setRotate(t,s){return this.xx=t,this.xy=-s,this.xd=0,this.yx=s,this.yy=t,this.yd=0,this}setRotateAngleAbout(t,s){return this.setRotateAbout(Math.cos(t),Math.sin(t),s)}setRotateAbout(t,s,o){return this.setTranslate(-o.x,-o.y),this.rotate(t,s),this.translate(o.x,o.y)}setSwapCoordinates(){return this.xx=0,this.xy=1,this.xd=0,this.yx=1,this.yy=0,this.yd=0,this}setRotateCw90(){return this.xx=0,this.xy=1,this.xd=0,this.yx=-1,this.yy=0,this.yd=0,this}setRotateCcw90(){return this.xx=0,this.xy=-1,this.xd=0,this.yx=1,this.yy=0,this.yd=0,this}shiftCoords(t,s){return this.xd+=t,this.yd+=s,this}shift(t){return this.xd+=t.x,this.yd+=t.y,this}translate(t,s){return this.xd+=t,this.yd+=s,this}flipX(t,s){return this.xx=-this.xx,this.xy=-this.xy,this.xd=t+s-this.xd,this}flipY(t,s){return this.yx=-this.yx,this.yy=-this.yy,this.yd=t+s-this.yd,this}shear(t,s){const o=new x;return o.setShear(t,s),this.multiply(o)}rotateAngle(t){const s=new x;return s.setRotateAngle(t),this.multiply(s)}rotate(t,s){const o=new x;return o.setRotate(t,s),this.multiply(o)}rotateAbout(t,s,o){return this.translate(-o.x,-o.y),this.rotate(t,s),this.translate(o.x,o.y)}rotateAngleAbout(t,s){return this.rotateAbout(Math.cos(t),Math.sin(t),s)}setInvert(t){return this.set(t),this.invertThis()}invertThis(){let t=this.xx*this.yy-this.xy*this.yx;if(0===t)return this.setZero(),this;t=1/t;const s=(this.xy*this.yd-this.xd*this.yy)*t,o=(this.xd*this.yx-this.xx*this.yd)*t,i=this.yy*t,e=-this.xy*t,h=-this.yx*t,r=this.xx*t;return this.xd=s,this.yd=o,this.xx=i,this.yy=r,this.xy=e,this.yx=h,this}invertPrecise(t){return this.set(t),this.invertPreciseThis()}invertPreciseThis(){const t=r.constructDouble(this.xy),s=r.constructDouble(this.xx),o=s.mulDouble(this.yy).sub(t.mulDouble(this.yx));if(o.isZero())return this.setZero(),this;const i=o.clone();i.invertThis();const e=r.constructDouble(this.xd),h=t.mulDouble(this.yd).sub(e.mulDouble(this.yy)).mul(i).toDouble(),a=e.mulDouble(this.yx).sub(s.mulDouble(this.yd)).mul(i).toDouble(),l=i.mulDouble(this.yy).toDouble(),y=i.mulDouble(-this.xy).toDouble(),n=i.mulDouble(-this.yx).toDouble(),x=i.mulDouble(this.xx).toDouble();return this.xd=h,this.yd=a,this.xx=l,this.yy=x,this.xy=y,this.yx=n,this}extractScaleTransform(t,s){const o=Math.sqrt(this.xx*this.xx+this.xy*this.xy),i=Math.sqrt(this.yx*this.yx+this.yy*this.yy);s.setScaleCoords(1/o,1/i),s.multiply(this),t.setScaleCoords(o,i)}setFromTwoTriangles(t,s){let o=!0;for(let e=0;e<3;++e)o=o&&t[e].equals(s[e]);if(o)return this.setIdentity(),!0;const i=new e;i.setSub(t[0],t[1]);const h=new e;h.setSub(t[0],t[2]);const r=new e;r.setSub(s[0],s[1]);const a=new e;a.setSub(s[0],s[2]);const l=4*Number.EPSILON*(Math.abs(i.x*h.y)+Math.abs(h.x*i.y));let y=i.x*h.y-i.y*h.x;return Math.abs(y)>l?(y=1/y,this.xx=(r.x*h.y-i.y*a.x)*y,this.xy=(i.x*a.x-r.x*h.x)*y,this.yx=(r.y*h.y-i.y*a.y)*y,this.yy=(i.x*a.y-r.y*h.x)*y,this.xd=s[0].x-(this.xx*t[0].x+this.xy*t[0].y),this.yd=s[0].y-(this.yx*t[0].x+this.yy*t[0].y),!0):(this.setZero(),!1)}initializeFromControlPoints(t,s,o,i,e=null){return 0===s?(this.setIdentity(),void(e&&e.setIdentity())):1===s?(this.setShift(i[0].sub(o[0])),void(e&&e.setShift(o[0].sub(i[0])))):(s<3&&(t=1),void(4===t&&s>2?C(this,s,o,i,e):f(t,this,s,o,i,e)))}calculateErrors(s,o,i,h){t(s>0&&null!==o&&null!==i);let r=0;for(let t=0;t<s;++t){const s=this.transform(o[t]),a=e.sqrDistance(i[t],s);r+=a,h&&(h[t]=Math.sqrt(a))}return Math.sqrt(r/s)}}const w=[43,11,41,9,61];function u(s,o){t(!(2!==o.rows()&&3!==o.rows()||2!==o.cols()&&3!==o.rows())),s.xx=o.atRowCol(0,0),s.xy=o.atRowCol(0,1),s.yx=o.atRowCol(1,0),s.yy=o.atRowCol(1,1),3===o.cols()?(s.xd=o.atRowCol(0,2),s.yd=o.atRowCol(1,2)):(s.xd=0,s.yd=0)}function C(t,s,i,h,r){const a=e.average(i,s),l=e.average(h,s),y=new n({NN:2,MM:2});y.setZero();const x=new n({NN:2,MM:2});x.setZero();for(let o=0;o<s;++o)y.setRowCol(0,0,y.atRowCol(0,0)+(i[o].x-a.x)*(i[o].x-a.x)),y.setRowCol(0,1,y.atRowCol(0,1)+(i[o].x-a.x)*(i[o].y-a.y)),y.setRowCol(1,1,y.atRowCol(1,1)+(i[o].y-a.y)*(i[o].y-a.y)),x.setRowCol(0,0,x.atRowCol(0,0)+(h[o].x-l.x)*(i[o].x-a.x)),x.setRowCol(0,1,x.atRowCol(0,1)+(h[o].x-l.x)*(i[o].y-a.y)),x.setRowCol(1,0,x.atRowCol(1,0)+(h[o].y-l.y)*(i[o].x-a.x)),x.setRowCol(1,1,x.atRowCol(1,1)+(h[o].y-l.y)*(i[o].y-a.y));y.setRowCol(1,0,y.atRowCol(0,1));const w=new n({NN:2,MM:2});y.pseudoInverse(w,!0)||o("Failed to compute pseudo inverse"),x.mul(w,x),u(t,x);const C=a.clone();t.transformInPlace(C),t.xd=l.x-C.x,t.yd=l.y-C.y,r&&(x.pseudoInverse(w,!1)||o("Failed to compute pseudo inverse"),u(r,w),r.transformInPlace(l),r.xd=a.x-l.x,r.yd=a.y-l.y)}function f(s,i,h,r,a,l){t(1===s||0===s||2===s||3===s),i.setIdentity();const y=e.average(r,h),C=e.average(a,h);if(t(s<w.length&&s>0),8&w[s]){const t=new n({NN:2,MM:2});t.setZero();for(let s=0;s<h;++s)t.setRowCol(0,0,t.atRowCol(0,0)+(a[s].x-C.x)*(r[s].x-y.x)),t.setRowCol(1,0,t.atRowCol(1,0)+(a[s].x-C.x)*(r[s].y-y.y)),t.setRowCol(0,1,t.atRowCol(0,1)+(a[s].y-C.y)*(r[s].x-y.x)),t.setRowCol(1,1,t.atRowCol(1,1)+(a[s].y-C.y)*(r[s].y-y.y));const e=new n({NN:2,MM:2}),l=new n({NN:2,MM:1}),f=new n({NN:2,MM:2});t.svd(e,l,f)||o("Failed to compute svd");const R=new n({NN:2,MM:2});e.transpose(R);const d=new n({NN:2,MM:2});if(f.mul(R,d),!(32&w[s])){d.determinant()<0&&(R.setRowCol(1,0,-R.atRowCol(1,0)),R.setRowCol(1,1,-R.atRowCol(1,1)),f.mul(R,d))}const c=new x;u(c,d),i.set(c)}if(2&w[s]){let t=0,s=0;for(let o=0;o<h;++o){const e=r[o].sub(y);t+=e.sqrLength(),i.transformInPlace(e),s+=e.dotProduct(a[o].sub(C))}if(0===t)0===s?i.setIdentity():i.setZero();else{const o=s/t;i.scale(o,o)}}else t(!(4&w[s]));const f=y.clone();i.transformInPlace(f),i.xd=C.x-f.x,i.yd=C.y-f.y,l&&(l.set(i),l.invertThis(),l.isZero()&&(l.xd=y.x,l.yd=y.y))}export{x as T};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{O as e}from"./ProjectionTransformation.js";import{getSpatialReference as r,fromGeometry as t,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function n(e){const n=r(e);return s.accelerateGeometry(t(e),o(n),1)}function a(e,r){return s.execute(t(e),t(r),o(e.spatialReference),null)}const c=s.supportsCurves(),u=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:n,execute:a,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{n as a,u as c,a as e,c as s};
5
+ import{b as e}from"./ProjectionTransformation.js";import{getSpatialReference as r,fromGeometry as t,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function n(e){const n=r(e);return s.accelerateGeometry(t(e),o(n),1)}function a(e,r){return s.execute(t(e),t(r),o(e.spatialReference),null)}const c=s.supportsCurves(),u=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:n,execute:a,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{n as a,u as c,a as e,c as s};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{a as e}from"./ProjectionTransformation.js";import{getSpatialReference as r,fromGeometry as t,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function a(e){const a=r(e);return s.accelerateGeometry(t(e),o(a),1)}function n(e,r){return s.execute(t(e),t(r),o(e.spatialReference))}const c=s.supportsCurves(),p=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:a,execute:n,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{a,p as d,n as e,c as s};
5
+ import{d as e}from"./ProjectionTransformation.js";import{getSpatialReference as r,fromGeometry as t,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function a(e){const a=r(e);return s.accelerateGeometry(t(e),o(a),1)}function n(e,r){return s.execute(t(e),t(r),o(e.spatialReference))}const c=s.supportsCurves(),p=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:a,execute:n,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{a,p as d,n as e,c as s};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{d as e,r}from"./ProjectionTransformation.js";import{getSpatialReference as t,fromGeometry as o,fromSpatialReference as s}from"../geometry/operators/support/apiConverter.js";class n extends e{getOperatorType(){return 2}execute(e,t,o,s){return r(e,t,o,3,s)}}const a=new n;function u(e){const r=t(e);return a.accelerateGeometry(o(e),s(r),1)}function c(e,r){return a.execute(o(e),o(r),s(e.spatialReference),null)}const p=a.supportsCurves(),l=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:u,execute:c,supportsCurves:p},Symbol.toStringTag,{value:"Module"}));export{u as a,c as b,l as e,p as s};
5
+ import{e,r}from"./ProjectionTransformation.js";import{getSpatialReference as t,fromGeometry as o,fromSpatialReference as s}from"../geometry/operators/support/apiConverter.js";class n extends e{getOperatorType(){return 2}execute(e,t,o,s){return r(e,t,o,3,s)}}const a=new n;function u(e){const r=t(e);return a.accelerateGeometry(o(e),s(r),1)}function c(e,r){return a.execute(o(e),o(r),s(e.spatialReference),null)}const p=a.supportsCurves(),l=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:u,execute:c,supportsCurves:p},Symbol.toStringTag,{value:"Module"}));export{u as a,c as b,l as e,p as s};
package/chunks/pe-wasm.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{g as t}from"./_commonjsHelpers.js";var e,_={exports:{}};function r(){return e||(e=1,t=_,r="undefined"!=typeof document?document.currentScript?.src:void 0,"undefined"!=typeof __filename&&(r=r||__filename),o=function(t={}){var e,_,o,n,p=t,i=new Promise(((t,r)=>{e=t,_=r})),c="object"==typeof window,s="undefined"!=typeof WorkerGlobalScope,P="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&"renderer"!=process.type,a=Object.assign({},p),g="./this.program",y="";function d(t){return p.locateFile?p.locateFile(t,y):y+t}if(P){var u=require("fs"),b=require("path");y=__dirname+"/",n=t=>(t=q(t)?new URL(t):b.normalize(t),u.readFileSync(t)),o=(t,e=!0)=>(t=q(t)?new URL(t):b.normalize(t),new Promise(((_,r)=>{u.readFile(t,e?void 0:"utf8",((t,o)=>{t?r(t):_(e?o.buffer:o)}))}))),!p.thisProgram&&process.argv.length>1&&(g=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2)}else(c||s)&&(s?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),r&&(y=r),y=y.startsWith("blob:")?"":y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1),s&&(n=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),o=t=>q(t)?new Promise(((e,_)=>{var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?e(r.response):_(r.status)},r.onerror=_,r.send(null)})):fetch(t,{credentials:"same-origin"}).then((t=>t.ok?t.arrayBuffer():Promise.reject(new Error(t.status+" : "+t.url)))));var f,E,m=console.log.bind(console),T=console.error.bind(console);Object.assign(p,a),a=null;var O,S,h,N,l,M,D,v=!1;function A(t,e){t||X(e)}function j(){var t=E.buffer;p.HEAP8=O=new Int8Array(t),p.HEAP16=h=new Int16Array(t),p.HEAPU8=S=new Uint8Array(t),p.HEAPU16=new Uint16Array(t),p.HEAP32=N=new Int32Array(t),p.HEAPU32=l=new Uint32Array(t),p.HEAPF32=M=new Float32Array(t),p.HEAPF64=D=new Float64Array(t)}var R=[],G=[],C=[];function I(){tt(R)}function L(){tt(G)}function U(){tt(C)}function F(t){G.unshift(t)}var Y=0,w=null;function x(t){Y++}function H(t){if(0==--Y&&w){var e=w;w=null,e()}}function X(t){T(t="Aborted("+t+")"),v=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw _(e),e}var z,W="data:application/octet-stream;base64,",Z=t=>t.startsWith(W),q=t=>t.startsWith("file://");function B(){var t="pe-wasm.wasm";return Z(t)?t:d(t)}function K(t){if(n)return n(t);throw"both async and sync fetching of the wasm failed"}function V(t){return o(t).then((t=>new Uint8Array(t)),(()=>K(t)))}function k(t,e,_){return V(t).then((t=>WebAssembly.instantiate(t,e))).then(_,(t=>{T(`failed to asynchronously prepare wasm: ${t}`),X(t)}))}function $(t,e,_,r){return"function"!=typeof WebAssembly.instantiateStreaming||Z(e)||q(e)||P||"function"!=typeof fetch?k(e,_,r):fetch(e,{credentials:"same-origin"}).then((t=>WebAssembly.instantiateStreaming(t,_).then(r,(function(t){return T(`wasm streaming compile failed: ${t}`),T("falling back to ArrayBuffer instantiation"),k(e,_,r)}))))}function J(){return{a:vt}}function Q(){var t=J();function e(t,e){return At=t.exports,E=At.t,j(),F(At.u),H(),At}function r(t){e(t.instance)}return x(),z??=B(),$(f,z,t,r).catch(_),{}}var tt=t=>{for(;t.length>0;)t.shift()(p)};function et(t,e="i8"){switch(e.endsWith("*")&&(e="*"),e){case"i1":case"i8":return O[t];case"i16":return h[t>>1];case"i32":return N[t>>2];case"i64":X("to do getValue(i64) use WASM_BIGINT");case"float":return M[t>>2];case"double":return D[t>>3];case"*":return l[t>>2];default:X(`invalid type for getValue: ${e}`)}}var _t="undefined"!=typeof TextDecoder?new TextDecoder:void 0,rt=(t,e=0,_=NaN)=>{for(var r=e+_,o=e;t[o]&&!(o>=r);)++o;if(o-e>16&&t.buffer&&_t)return _t.decode(t.subarray(e,o));for(var n="";e<o;){var p=t[e++];if(128&p){var i=63&t[e++];if(192!=(224&p)){var c=63&t[e++];if((p=224==(240&p)?(15&p)<<12|i<<6|c:(7&p)<<18|i<<12|c<<6|63&t[e++])<65536)n+=String.fromCharCode(p);else{var s=p-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}}else n+=String.fromCharCode((31&p)<<6|i)}else n+=String.fromCharCode(p)}return n},ot=(t,e)=>t?rt(S,t,e):"";function nt(t,e,_){return 0}var pt=(t,e,_,r)=>{if(!(r>0))return 0;for(var o=_,n=_+r-1,p=0;p<t.length;++p){var i=t.charCodeAt(p);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&t.charCodeAt(++p)),i<=127){if(_>=n)break;e[_++]=i}else if(i<=2047){if(_+1>=n)break;e[_++]=192|i>>6,e[_++]=128|63&i}else if(i<=65535){if(_+2>=n)break;e[_++]=224|i>>12,e[_++]=128|i>>6&63,e[_++]=128|63&i}else{if(_+3>=n)break;e[_++]=240|i>>18,e[_++]=128|i>>12&63,e[_++]=128|i>>6&63,e[_++]=128|63&i}}return e[_]=0,_-o},it=(t,e,_)=>pt(t,S,e,_);function ct(t,e,_){return 0}function st(t,e,_,r){}var Pt=t=>t%4==0&&(t%100!=0||t%400==0),at=[0,31,60,91,121,152,182,213,244,274,305,335],gt=[0,31,59,90,120,151,181,212,243,273,304,334],yt=t=>(Pt(t.getFullYear())?at:gt)[t.getMonth()]+t.getDate()-1,dt=(t,e)=>e+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*e:NaN;function ut(t,e,_){var r=dt(t,e),o=new Date(1e3*r);N[_>>2]=o.getSeconds(),N[_+4>>2]=o.getMinutes(),N[_+8>>2]=o.getHours(),N[_+12>>2]=o.getDate(),N[_+16>>2]=o.getMonth(),N[_+20>>2]=o.getFullYear()-1900,N[_+24>>2]=o.getDay();var n=0|yt(o);N[_+28>>2]=n,N[_+36>>2]=-60*o.getTimezoneOffset();var p=new Date(o.getFullYear(),0,1),i=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=p.getTimezoneOffset(),s=0|(i!=c&&o.getTimezoneOffset()==Math.min(c,i));N[_+32>>2]=s}var bt=()=>2147483648,ft=(t,e)=>Math.ceil(t/e)*e,Et=t=>{var e=(t-E.buffer.byteLength+65535)/65536|0;try{return E.grow(e),j(),1}catch(_){}},mt={},Tt=()=>g||"./this.program",Ot=()=>{if(!Ot.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Tt()};for(var e in mt)void 0===mt[e]?delete t[e]:t[e]=mt[e];var _=[];for(var e in t)_.push(`${e}=${t[e]}`);Ot.strings=_}return Ot.strings},St=(t,e)=>{for(var _=0;_<t.length;++_)O[e++]=t.charCodeAt(_);O[e]=0};function ht(t,e,_,r,o){return 70}var Nt=[null,[],[]],lt=(t,e)=>{var _=Nt[t];0===e||10===e?((1===t?m:T)(rt(_)),_.length=0):_.push(e)},Mt=t=>{for(var e=0,_=0;_<t.length;++_){var r=t.charCodeAt(_);r<=127?e++:r<=2047?e+=2:r>=55296&&r<=57343?(e+=4,++_):e+=3}return e};function Dt(t,e,_){var r=Mt(t)+1,o=new Array(r);return pt(t,o,0,o.length),o}var vt={c:nt,q:(t,e,_)=>{},h:ct,d:st,o:t=>{},n:(t,e)=>{},p:(t,e,_)=>{},l:()=>{X("")},s:(t,e,_)=>S.copyWithin(t,e,e+_),j:ut,r:(t,e,_,r)=>{var o=(new Date).getFullYear(),n=new Date(o,0,1),p=new Date(o,6,1),i=n.getTimezoneOffset(),c=p.getTimezoneOffset(),s=Math.max(i,c);l[t>>2]=60*s,N[e>>2]=Number(i!=c);var P=t=>{var e=t>=0?"-":"+",_=Math.abs(t);return`UTC${e}${String(Math.floor(_/60)).padStart(2,"0")}${String(_%60).padStart(2,"0")}`},a=P(i),g=P(c);c<i?(it(a,_,17),it(g,r,17)):(it(a,r,17),it(g,_,17))},i:()=>Date.now(),m:t=>{var e=S.length;t>>>=0;var _=bt();if(t>_)return!1;for(var r=1;r<=4;r*=2){var o=e*(1+.2/r);o=Math.min(o,t+100663296);var n=Math.min(_,ft(Math.max(t,o),65536));if(Et(n))return!0}return!1},e:(t,e)=>{var _=0;return Ot().forEach(((r,o)=>{var n=e+_;l[t+4*o>>2]=n,St(r,n),_+=r.length+1})),0},f:(t,e)=>{var _=Ot();l[t>>2]=_.length;var r=0;return _.forEach((t=>r+=t.length+1)),l[e>>2]=r,0},a:t=>52,g:(t,e,_,r)=>52,k:ht,b:(t,e,_,r)=>{for(var o=0,n=0;n<_;n++){var p=l[e>>2],i=l[e+4>>2];e+=8;for(var c=0;c<i;c++)lt(t,S[p+c]);o+=i}return l[r>>2]=o,0}},At=Q();p._webidl_free=t=>(p._webidl_free=At.v)(t),p._webidl_malloc=t=>(p._webidl_malloc=At.w)(t);var jt,Rt=p._emscripten_bind_PeObject_getCode_0=t=>(Rt=p._emscripten_bind_PeObject_getCode_0=At.x)(t),Gt=p._emscripten_bind_PeObject_getName_1=(t,e)=>(Gt=p._emscripten_bind_PeObject_getName_1=At.y)(t,e),Ct=p._emscripten_bind_PeObject_getType_0=t=>(Ct=p._emscripten_bind_PeObject_getType_0=At.z)(t),It=p._emscripten_bind_PeCoordsys_isEqual_1=(t,e)=>(It=p._emscripten_bind_PeCoordsys_isEqual_1=At.A)(t,e),Lt=p._emscripten_bind_PeCoordsys_getCode_0=t=>(Lt=p._emscripten_bind_PeCoordsys_getCode_0=At.B)(t),Ut=p._emscripten_bind_PeCoordsys_getName_1=(t,e)=>(Ut=p._emscripten_bind_PeCoordsys_getName_1=At.C)(t,e),Ft=p._emscripten_bind_PeCoordsys_getType_0=t=>(Ft=p._emscripten_bind_PeCoordsys_getType_0=At.D)(t),Yt=p._emscripten_bind_PeUnit_getUnitFactor_0=t=>(Yt=p._emscripten_bind_PeUnit_getUnitFactor_0=At.E)(t),wt=p._emscripten_bind_PeUnit_getCode_0=t=>(wt=p._emscripten_bind_PeUnit_getCode_0=At.F)(t),xt=p._emscripten_bind_PeUnit_getName_1=(t,e)=>(xt=p._emscripten_bind_PeUnit_getName_1=At.G)(t,e),Ht=p._emscripten_bind_PeUnit_getType_0=t=>(Ht=p._emscripten_bind_PeUnit_getType_0=At.H)(t),Xt=p._emscripten_bind_VoidPtr___destroy___0=t=>(Xt=p._emscripten_bind_VoidPtr___destroy___0=At.I)(t),zt=p._emscripten_bind_PeAngunit_getCode_0=t=>(zt=p._emscripten_bind_PeAngunit_getCode_0=At.J)(t),Wt=p._emscripten_bind_PeAngunit_getName_1=(t,e)=>(Wt=p._emscripten_bind_PeAngunit_getName_1=At.K)(t,e),Zt=p._emscripten_bind_PeAngunit_getType_0=t=>(Zt=p._emscripten_bind_PeAngunit_getType_0=At.L)(t),qt=p._emscripten_bind_PeAngunit_getUnitFactor_0=t=>(qt=p._emscripten_bind_PeAngunit_getUnitFactor_0=At.M)(t),Bt=p._emscripten_bind_PeDatum_getSpheroid_0=t=>(Bt=p._emscripten_bind_PeDatum_getSpheroid_0=At.N)(t),Kt=p._emscripten_bind_PeDatum_getCode_0=t=>(Kt=p._emscripten_bind_PeDatum_getCode_0=At.O)(t),Vt=p._emscripten_bind_PeDatum_getName_1=(t,e)=>(Vt=p._emscripten_bind_PeDatum_getName_1=At.P)(t,e),kt=p._emscripten_bind_PeDatum_getType_0=t=>(kt=p._emscripten_bind_PeDatum_getType_0=At.Q)(t),$t=p._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=t=>($t=p._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=At.R)(t),Jt=p._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=t=>(Jt=p._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=At.S)(t),Qt=p._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=t=>(Qt=p._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=At.T)(t),te=p._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=t=>(te=p._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=At.U)(t),ee=p._emscripten_bind_PeDefs_get_PE_DD_MAX_0=t=>(ee=p._emscripten_bind_PeDefs_get_PE_DD_MAX_0=At.V)(t),_e=p._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=t=>(_e=p._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=At.W)(t),re=p._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=t=>(re=p._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=At.X)(t),oe=p._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=t=>(oe=p._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=At.Y)(t),ne=p._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=t=>(ne=p._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=At.Z)(t),pe=p._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=t=>(pe=p._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=At._)(t),ie=p._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=t=>(ie=p._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=At.$)(t),ce=p._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=t=>(ce=p._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=At.aa)(t),se=p._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=t=>(se=p._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=At.ba)(t),Pe=p._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=t=>(Pe=p._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=At.ca)(t),ae=p._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=t=>(ae=p._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=At.da)(t),ge=p._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=t=>(ge=p._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=At.ea)(t),ye=p._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=t=>(ye=p._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=At.fa)(t),de=p._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=t=>(de=p._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=At.ga)(t),ue=p._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=t=>(ue=p._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=At.ha)(t),be=p._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=t=>(be=p._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=At.ia)(t),fe=p._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=t=>(fe=p._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=At.ja)(t),Ee=p._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=t=>(Ee=p._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=At.ka)(t),me=p._emscripten_bind_PeDefs_get_PE_PARM_X0_0=t=>(me=p._emscripten_bind_PeDefs_get_PE_PARM_X0_0=At.la)(t),Te=p._emscripten_bind_PeDefs_get_PE_PARM_ND_0=t=>(Te=p._emscripten_bind_PeDefs_get_PE_PARM_ND_0=At.ma)(t),Oe=p._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=t=>(Oe=p._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=At.na)(t),Se=p._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=t=>(Se=p._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=At.oa)(t),he=p._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=t=>(he=p._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=At.pa)(t),Ne=p._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=t=>(Ne=p._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=At.qa)(t),le=p._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=t=>(le=p._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=At.ra)(t),Me=p._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=t=>(Me=p._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=At.sa)(t),De=p._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=t=>(De=p._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=At.ta)(t),ve=p._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=t=>(ve=p._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=At.ua)(t),Ae=p._emscripten_bind_PeDouble_PeDouble_1=t=>(Ae=p._emscripten_bind_PeDouble_PeDouble_1=At.va)(t),je=p._emscripten_bind_PeDouble_get_val_0=t=>(je=p._emscripten_bind_PeDouble_get_val_0=At.wa)(t),Re=p._emscripten_bind_PeDouble_set_val_1=(t,e)=>(Re=p._emscripten_bind_PeDouble_set_val_1=At.xa)(t,e),Ge=p._emscripten_bind_PeDouble___destroy___0=t=>(Ge=p._emscripten_bind_PeDouble___destroy___0=At.ya)(t),Ce=p._emscripten_bind_PeFactory_initialize_1=t=>(Ce=p._emscripten_bind_PeFactory_initialize_1=At.za)(t),Ie=p._emscripten_bind_PeFactory_factoryByType_2=(t,e)=>(Ie=p._emscripten_bind_PeFactory_factoryByType_2=At.Aa)(t,e),Le=p._emscripten_bind_PeFactory_fromString_2=(t,e)=>(Le=p._emscripten_bind_PeFactory_fromString_2=At.Ba)(t,e),Ue=p._emscripten_bind_PeFactory_getCode_1=t=>(Ue=p._emscripten_bind_PeFactory_getCode_1=At.Ca)(t),Fe=p._emscripten_bind_PeGCSExtent_PeGCSExtent_6=(t,e,_,r,o,n)=>(Fe=p._emscripten_bind_PeGCSExtent_PeGCSExtent_6=At.Da)(t,e,_,r,o,n),Ye=p._emscripten_bind_PeGCSExtent_getLLon_0=t=>(Ye=p._emscripten_bind_PeGCSExtent_getLLon_0=At.Ea)(t),we=p._emscripten_bind_PeGCSExtent_getSLat_0=t=>(we=p._emscripten_bind_PeGCSExtent_getSLat_0=At.Fa)(t),xe=p._emscripten_bind_PeGCSExtent_getRLon_0=t=>(xe=p._emscripten_bind_PeGCSExtent_getRLon_0=At.Ga)(t),He=p._emscripten_bind_PeGCSExtent_getNLat_0=t=>(He=p._emscripten_bind_PeGCSExtent_getNLat_0=At.Ha)(t),Xe=p._emscripten_bind_PeGCSExtent___destroy___0=t=>(Xe=p._emscripten_bind_PeGCSExtent___destroy___0=At.Ia)(t),ze=p._emscripten_bind_PeGeogcs_Delete_0=t=>(ze=p._emscripten_bind_PeGeogcs_Delete_0=At.Ja)(t),We=p._emscripten_bind_PeGeogcs_cloneAlterUnits_1=(t,e)=>(We=p._emscripten_bind_PeGeogcs_cloneAlterUnits_1=At.Ka)(t,e),Ze=p._emscripten_bind_PeGeogcs_getDatum_0=t=>(Ze=p._emscripten_bind_PeGeogcs_getDatum_0=At.La)(t),qe=p._emscripten_bind_PeGeogcs_getPrimem_0=t=>(qe=p._emscripten_bind_PeGeogcs_getPrimem_0=At.Ma)(t),Be=p._emscripten_bind_PeGeogcs_getUnit_0=t=>(Be=p._emscripten_bind_PeGeogcs_getUnit_0=At.Na)(t),Ke=p._emscripten_bind_PeGeogcs_isEqual_1=(t,e)=>(Ke=p._emscripten_bind_PeGeogcs_isEqual_1=At.Oa)(t,e),Ve=p._emscripten_bind_PeGeogcs_getCode_0=t=>(Ve=p._emscripten_bind_PeGeogcs_getCode_0=At.Pa)(t),ke=p._emscripten_bind_PeGeogcs_getName_1=(t,e)=>(ke=p._emscripten_bind_PeGeogcs_getName_1=At.Qa)(t,e),$e=p._emscripten_bind_PeGeogcs_getType_0=t=>($e=p._emscripten_bind_PeGeogcs_getType_0=At.Ra)(t),Je=p._emscripten_bind_PeGeogtran_isEqual_1=(t,e)=>(Je=p._emscripten_bind_PeGeogtran_isEqual_1=At.Sa)(t,e),Qe=p._emscripten_bind_PeGeogtran_getGeogcs1_0=t=>(Qe=p._emscripten_bind_PeGeogtran_getGeogcs1_0=At.Ta)(t),t_=p._emscripten_bind_PeGeogtran_getGeogcs2_0=t=>(t_=p._emscripten_bind_PeGeogtran_getGeogcs2_0=At.Ua)(t),e_=p._emscripten_bind_PeGeogtran_getParameters_0=t=>(e_=p._emscripten_bind_PeGeogtran_getParameters_0=At.Va)(t),__=p._emscripten_bind_PeGeogtran_loadConstants_0=t=>(__=p._emscripten_bind_PeGeogtran_loadConstants_0=At.Wa)(t),r_=p._emscripten_bind_PeGeogtran_getCode_0=t=>(r_=p._emscripten_bind_PeGeogtran_getCode_0=At.Xa)(t),o_=p._emscripten_bind_PeGeogtran_getName_1=(t,e)=>(o_=p._emscripten_bind_PeGeogtran_getName_1=At.Ya)(t,e),n_=p._emscripten_bind_PeGeogtran_getType_0=t=>(n_=p._emscripten_bind_PeGeogtran_getType_0=At.Za)(t),p_=p._emscripten_bind_PeGTlistExtended_getGTlist_6=(t,e,_,r,o,n)=>(p_=p._emscripten_bind_PeGTlistExtended_getGTlist_6=At._a)(t,e,_,r,o,n),i_=p._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=t=>(i_=p._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=At.$a)(t),c_=p._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=t=>(c_=p._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=At.ab)(t),s_=p._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=t=>(s_=p._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=At.bb)(t),P_=p._emscripten_bind_PeGTlistExtendedEntry_Delete_1=t=>(P_=p._emscripten_bind_PeGTlistExtendedEntry_Delete_1=At.cb)(t),a_=p._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=t=>(a_=p._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=At.db)(t),g_=p._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=t=>(g_=p._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=At.eb)(t),y_=p._emscripten_bind_PeHorizon_getNump_0=t=>(y_=p._emscripten_bind_PeHorizon_getNump_0=At.fb)(t),d_=p._emscripten_bind_PeHorizon_getKind_0=t=>(d_=p._emscripten_bind_PeHorizon_getKind_0=At.gb)(t),u_=p._emscripten_bind_PeHorizon_getInclusive_0=t=>(u_=p._emscripten_bind_PeHorizon_getInclusive_0=At.hb)(t),b_=p._emscripten_bind_PeHorizon_getSize_0=t=>(b_=p._emscripten_bind_PeHorizon_getSize_0=At.ib)(t),f_=p._emscripten_bind_PeHorizon_getCoord_0=t=>(f_=p._emscripten_bind_PeHorizon_getCoord_0=At.jb)(t),E_=p._emscripten_bind_PeInteger_PeInteger_1=t=>(E_=p._emscripten_bind_PeInteger_PeInteger_1=At.kb)(t),m_=p._emscripten_bind_PeInteger_get_val_0=t=>(m_=p._emscripten_bind_PeInteger_get_val_0=At.lb)(t),T_=p._emscripten_bind_PeInteger_set_val_1=(t,e)=>(T_=p._emscripten_bind_PeInteger_set_val_1=At.mb)(t,e),O_=p._emscripten_bind_PeInteger___destroy___0=t=>(O_=p._emscripten_bind_PeInteger___destroy___0=At.nb)(t),S_=p._emscripten_bind_PeLineType_geodetic_distance_10=(t,e,_,r,o,n,i,c,s,P)=>(S_=p._emscripten_bind_PeLineType_geodetic_distance_10=At.ob)(t,e,_,r,o,n,i,c,s,P),h_=p._emscripten_bind_PeLineType_geodetic_coordinate_9=(t,e,_,r,o,n,i,c,s)=>(h_=p._emscripten_bind_PeLineType_geodetic_coordinate_9=At.pb)(t,e,_,r,o,n,i,c,s),N_=p._emscripten_bind_PeLineType_geodesic_coordinate_8=(t,e,_,r,o,n,i,c)=>(N_=p._emscripten_bind_PeLineType_geodesic_coordinate_8=At.qb)(t,e,_,r,o,n,i,c),l_=p._emscripten_bind_PeLineType_great_elliptic_distance_9=(t,e,_,r,o,n,i,c,s)=>(l_=p._emscripten_bind_PeLineType_great_elliptic_distance_9=At.rb)(t,e,_,r,o,n,i,c,s),M_=p._emscripten_bind_PeMath_phi_to_eta_2=(t,e)=>(M_=p._emscripten_bind_PeMath_phi_to_eta_2=At.sb)(t,e),D_=p._emscripten_bind_PeMath_eta_to_phi_2=(t,e)=>(D_=p._emscripten_bind_PeMath_eta_to_phi_2=At.tb)(t,e),v_=p._emscripten_bind_PeMath_phi_to_phig_2=(t,e)=>(v_=p._emscripten_bind_PeMath_phi_to_phig_2=At.ub)(t,e),A_=p._emscripten_bind_PeMath_q_3=(t,e,_)=>(A_=p._emscripten_bind_PeMath_q_3=At.vb)(t,e,_),j_=p._emscripten_bind_PeMath_q90_2=(t,e)=>(j_=p._emscripten_bind_PeMath_q90_2=At.wb)(t,e),R_=p._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=t=>(R_=p._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=At.xb)(t),G_=p._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=t=>(G_=p._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=At.yb)(t),C_=p._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=t=>(C_=p._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=At.zb)(t),I_=p._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=t=>(I_=p._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=At.Ab)(t),L_=p._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=t=>(L_=p._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=At.Bb)(t),U_=p._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=t=>(U_=p._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=At.Cb)(t),F_=p._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=t=>(F_=p._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=At.Db)(t),Y_=p._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=t=>(Y_=p._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=At.Eb)(t),w_=p._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=t=>(w_=p._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=At.Fb)(t),x_=p._emscripten_bind_PeParameter_getValue_0=t=>(x_=p._emscripten_bind_PeParameter_getValue_0=At.Gb)(t),H_=p._emscripten_bind_PeParameter_getCode_0=t=>(H_=p._emscripten_bind_PeParameter_getCode_0=At.Hb)(t),X_=p._emscripten_bind_PeParameter_getName_1=(t,e)=>(X_=p._emscripten_bind_PeParameter_getName_1=At.Ib)(t,e),z_=p._emscripten_bind_PeParameter_getType_0=t=>(z_=p._emscripten_bind_PeParameter_getType_0=At.Jb)(t),W_=p._emscripten_bind_PePCSInfo_getCentralMeridian_0=t=>(W_=p._emscripten_bind_PePCSInfo_getCentralMeridian_0=At.Kb)(t),Z_=p._emscripten_bind_PePCSInfo_getDomainMinx_0=t=>(Z_=p._emscripten_bind_PePCSInfo_getDomainMinx_0=At.Lb)(t),q_=p._emscripten_bind_PePCSInfo_getDomainMiny_0=t=>(q_=p._emscripten_bind_PePCSInfo_getDomainMiny_0=At.Mb)(t),B_=p._emscripten_bind_PePCSInfo_getDomainMaxx_0=t=>(B_=p._emscripten_bind_PePCSInfo_getDomainMaxx_0=At.Nb)(t),K_=p._emscripten_bind_PePCSInfo_getDomainMaxy_0=t=>(K_=p._emscripten_bind_PePCSInfo_getDomainMaxy_0=At.Ob)(t),V_=p._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=t=>(V_=p._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=At.Pb)(t),k_=p._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=t=>(k_=p._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=At.Qb)(t),$_=p._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=t=>($_=p._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=At.Rb)(t),J_=p._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=t=>(J_=p._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=At.Sb)(t),Q_=p._emscripten_bind_PePCSInfo_isDensificationNeeded_0=t=>(Q_=p._emscripten_bind_PePCSInfo_isDensificationNeeded_0=At.Tb)(t),tr=p._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=t=>(tr=p._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=At.Ub)(t),er=p._emscripten_bind_PePCSInfo_isPannableRectangle_0=t=>(er=p._emscripten_bind_PePCSInfo_isPannableRectangle_0=At.Vb)(t),_r=p._emscripten_bind_PePCSInfo_generate_2=(t,e)=>(_r=p._emscripten_bind_PePCSInfo_generate_2=At.Wb)(t,e),rr=p._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=t=>(rr=p._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=At.Xb)(t),or=p._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=t=>(or=p._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=At.Yb)(t),nr=p._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=t=>(nr=p._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=At.Zb)(t),pr=p._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=t=>(pr=p._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=At._b)(t),ir=p._emscripten_bind_PePrimem_getLongitude_0=t=>(ir=p._emscripten_bind_PePrimem_getLongitude_0=At.$b)(t),cr=p._emscripten_bind_PePrimem_getCode_0=t=>(cr=p._emscripten_bind_PePrimem_getCode_0=At.ac)(t),sr=p._emscripten_bind_PePrimem_getName_1=(t,e)=>(sr=p._emscripten_bind_PePrimem_getName_1=At.bc)(t,e),Pr=p._emscripten_bind_PePrimem_getType_0=t=>(Pr=p._emscripten_bind_PePrimem_getType_0=At.cc)(t),ar=p._emscripten_bind_PeProjcs_Delete_0=t=>(ar=p._emscripten_bind_PeProjcs_Delete_0=At.dc)(t),gr=p._emscripten_bind_PeProjcs_getGeogcs_0=t=>(gr=p._emscripten_bind_PeProjcs_getGeogcs_0=At.ec)(t),yr=p._emscripten_bind_PeProjcs_getProjection_0=t=>(yr=p._emscripten_bind_PeProjcs_getProjection_0=At.fc)(t),dr=p._emscripten_bind_PeProjcs_getParameters_0=t=>(dr=p._emscripten_bind_PeProjcs_getParameters_0=At.gc)(t),ur=p._emscripten_bind_PeProjcs_getUnit_0=t=>(ur=p._emscripten_bind_PeProjcs_getUnit_0=At.hc)(t),br=p._emscripten_bind_PeProjcs_loadConstants_0=t=>(br=p._emscripten_bind_PeProjcs_loadConstants_0=At.ic)(t),fr=p._emscripten_bind_PeProjcs_horizonGcsGenerate_0=t=>(fr=p._emscripten_bind_PeProjcs_horizonGcsGenerate_0=At.jc)(t),Er=p._emscripten_bind_PeProjcs_horizonPcsGenerate_0=t=>(Er=p._emscripten_bind_PeProjcs_horizonPcsGenerate_0=At.kc)(t),mr=p._emscripten_bind_PeProjcs_isEqual_1=(t,e)=>(mr=p._emscripten_bind_PeProjcs_isEqual_1=At.lc)(t,e),Tr=p._emscripten_bind_PeProjcs_getCode_0=t=>(Tr=p._emscripten_bind_PeProjcs_getCode_0=At.mc)(t),Or=p._emscripten_bind_PeProjcs_getName_1=(t,e)=>(Or=p._emscripten_bind_PeProjcs_getName_1=At.nc)(t,e),Sr=p._emscripten_bind_PeProjcs_getType_0=t=>(Sr=p._emscripten_bind_PeProjcs_getType_0=At.oc)(t),hr=p._emscripten_bind_PeSpheroid_getAxis_0=t=>(hr=p._emscripten_bind_PeSpheroid_getAxis_0=At.pc)(t),Nr=p._emscripten_bind_PeSpheroid_getFlattening_0=t=>(Nr=p._emscripten_bind_PeSpheroid_getFlattening_0=At.qc)(t),lr=p._emscripten_bind_PeSpheroid_getCode_0=t=>(lr=p._emscripten_bind_PeSpheroid_getCode_0=At.rc)(t),Mr=p._emscripten_bind_PeSpheroid_getName_1=(t,e)=>(Mr=p._emscripten_bind_PeSpheroid_getName_1=At.sc)(t,e),Dr=p._emscripten_bind_PeSpheroid_getType_0=t=>(Dr=p._emscripten_bind_PeSpheroid_getType_0=At.tc)(t),vr=p._emscripten_bind_PeVersion_version_string_0=t=>(vr=p._emscripten_bind_PeVersion_version_string_0=At.uc)(t);function Ar(){function t(){jt||(jt=!0,p.calledRun=!0,v||(L(),e(p),U()))}Y>0||(I(),Y>0||t())}function jr(){}function Rr(t){return(t||jr).__cache__}function Gr(t,e){var _=Rr(e),r=_[t];return r||((r=Object.create((e||jr).prototype)).ptr=t,_[t]=r)}function Cr(t,e){return Gr(t.ptr,e)}function Ir(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete Rr(t.__class__)[t.ptr]}function Lr(t,e){return t.ptr===e.ptr}function Ur(t){return t.ptr}function Fr(t){return t.__class__}p._pe_getPeGTlistExtendedEntrySize=()=>(p._pe_getPeGTlistExtendedEntrySize=At.vc)(),p._pe_getPeGTlistExtendedGTsSize=()=>(p._pe_getPeGTlistExtendedGTsSize=At.wc)(),p._pe_getPeHorizonSize=()=>(p._pe_getPeHorizonSize=At.xc)(),p._pe_geog_to_geog=(t,e,_,r,o)=>(p._pe_geog_to_geog=At.zc)(t,e,_,r,o),p._pe_geog_to_proj=(t,e,_)=>(p._pe_geog_to_proj=At.Ac)(t,e,_),p._pe_geog_to_dd=(t,e,_,r,o)=>(p._pe_geog_to_dd=At.Bc)(t,e,_,r,o),p._pe_dd_to_geog=(t,e,_,r)=>(p._pe_dd_to_geog=At.Cc)(t,e,_,r),p._pe_geog_to_ddm=(t,e,_,r,o)=>(p._pe_geog_to_ddm=At.Dc)(t,e,_,r,o),p._pe_ddm_to_geog=(t,e,_,r)=>(p._pe_ddm_to_geog=At.Ec)(t,e,_,r),p._pe_geog_to_dms=(t,e,_,r,o)=>(p._pe_geog_to_dms=At.Fc)(t,e,_,r,o),p._pe_dms_to_geog=(t,e,_,r)=>(p._pe_dms_to_geog=At.Gc)(t,e,_,r),p._pe_geog_to_mgrs_extended=(t,e,_,r,o,n,i)=>(p._pe_geog_to_mgrs_extended=At.Hc)(t,e,_,r,o,n,i),p._pe_mgrs_to_geog_extended=(t,e,_,r,o)=>(p._pe_mgrs_to_geog_extended=At.Ic)(t,e,_,r,o),p._pe_geog_to_usng=(t,e,_,r,o,n,i)=>(p._pe_geog_to_usng=At.Jc)(t,e,_,r,o,n,i),p._pe_usng_to_geog=(t,e,_,r)=>(p._pe_usng_to_geog=At.Kc)(t,e,_,r),p._pe_geog_to_utm=(t,e,_,r,o)=>(p._pe_geog_to_utm=At.Lc)(t,e,_,r,o),p._pe_utm_to_geog=(t,e,_,r,o)=>(p._pe_utm_to_geog=At.Mc)(t,e,_,r,o),p._pe_object_to_string_ext=(t,e,_)=>(p._pe_object_to_string_ext=At.Nc)(t,e,_),p._pe_proj_to_geog_center=(t,e,_,r)=>(p._pe_proj_to_geog_center=At.Oc)(t,e,_,r),p.getValue=et,p.UTF8ToString=ot,w=function t(){jt||Ar(),jt||(w=t)},Ar(),jr.prototype=Object.create(jr.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},p.WrapperObject=jr,p.getCache=Rr,p.wrapPointer=Gr,p.castObject=Cr,p.NULL=Gr(0),p.destroy=Ir,p.compare=Lr,p.getPointer=Ur,p.getClass=Fr;var Yr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare(){if(Yr.needed){for(var t=0;t<Yr.temps.length;t++)p._webidl_free(Yr.temps[t]);Yr.temps.length=0,p._webidl_free(Yr.buffer),Yr.buffer=0,Yr.size+=Yr.needed,Yr.needed=0}Yr.buffer||(Yr.size+=128,Yr.buffer=p._webidl_malloc(Yr.size),A(Yr.buffer)),Yr.pos=0},alloc(t,e){A(Yr.buffer);var _,r=e.BYTES_PER_ELEMENT,o=t.length*r;return o=ft(o,8),Yr.pos+o>=Yr.size?(A(o>0),Yr.needed+=o,_=p._webidl_malloc(o),Yr.temps.push(_)):(_=Yr.buffer+Yr.pos,Yr.pos+=o),_},copy(t,e,_){_/=e.BYTES_PER_ELEMENT;for(var r=0;r<t.length;r++)e[_+r]=t[r]}};function wr(t){if("string"==typeof t){var e=Dt(t),_=Yr.alloc(e,O);return Yr.copy(e,O,_),_}return t}function xr(t){if("object"==typeof t){var e=Yr.alloc(t,O);return Yr.copy(t,O,e),e}return t}function Hr(t){if("object"==typeof t){var e=Yr.alloc(t,h);return Yr.copy(t,h,e),e}return t}function Xr(t){if("object"==typeof t){var e=Yr.alloc(t,N);return Yr.copy(t,N,e),e}return t}function zr(t){if("object"==typeof t){var e=Yr.alloc(t,M);return Yr.copy(t,M,e),e}return t}function Wr(t){if("object"==typeof t){var e=Yr.alloc(t,D);return Yr.copy(t,D,e),e}return t}function Zr(){throw"cannot construct a PeObject, no constructor in IDL"}function qr(){throw"cannot construct a PeCoordsys, no constructor in IDL"}function Br(){throw"cannot construct a PeUnit, no constructor in IDL"}function Kr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Vr(){throw"cannot construct a PeAngunit, no constructor in IDL"}function kr(){throw"cannot construct a PeDatum, no constructor in IDL"}function $r(){throw"cannot construct a PeDefs, no constructor in IDL"}function Jr(t){t&&"object"==typeof t&&(t=t.ptr),this.ptr=Ae(t),Rr(Jr)[this.ptr]=this}function Qr(){throw"cannot construct a PeFactory, no constructor in IDL"}function to(t,e,_,r,o,n){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),_&&"object"==typeof _&&(_=_.ptr),r&&"object"==typeof r&&(r=r.ptr),o&&"object"==typeof o&&(o=o.ptr),n&&"object"==typeof n&&(n=n.ptr),this.ptr=Fe(t,e,_,r,o,n),Rr(to)[this.ptr]=this}function eo(){throw"cannot construct a PeGeogcs, no constructor in IDL"}function _o(){throw"cannot construct a PeGeogtran, no constructor in IDL"}function ro(){throw"cannot construct a PeGTlistExtended, no constructor in IDL"}function oo(){throw"cannot construct a PeGTlistExtendedEntry, no constructor in IDL"}function no(){throw"cannot construct a PeGTlistExtendedGTs, no constructor in IDL"}function po(){throw"cannot construct a PeHorizon, no constructor in IDL"}function io(t){t&&"object"==typeof t&&(t=t.ptr),this.ptr=E_(t),Rr(io)[this.ptr]=this}function co(){throw"cannot construct a PeLineType, no constructor in IDL"}function so(){throw"cannot construct a PeMath, no constructor in IDL"}function Po(){throw"cannot construct a PeNotationMgrs, no constructor in IDL"}function ao(){throw"cannot construct a PeNotationUtm, no constructor in IDL"}function go(){throw"cannot construct a PeParameter, no constructor in IDL"}function yo(){throw"cannot construct a PePCSInfo, no constructor in IDL"}function uo(){throw"cannot construct a PePrimem, no constructor in IDL"}function bo(){throw"cannot construct a PeProjcs, no constructor in IDL"}function fo(){throw"cannot construct a PeSpheroid, no constructor in IDL"}function Eo(){throw"cannot construct a PeVersion, no constructor in IDL"}return Zr.prototype=Object.create(jr.prototype),Zr.prototype.constructor=Zr,Zr.prototype.__class__=Zr,Zr.__cache__={},p.PeObject=Zr,Zr.prototype.getCode=Zr.prototype.getCode=function(){var t=this.ptr;return Rt(t)},Zr.prototype.getName=Zr.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(Gt(e,t))},Zr.prototype.getType=Zr.prototype.getType=function(){var t=this.ptr;return Ct(t)},qr.prototype=Object.create(Zr.prototype),qr.prototype.constructor=qr,qr.prototype.__class__=qr,qr.__cache__={},p.PeCoordsys=qr,qr.prototype.isEqual=qr.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!It(e,t)},qr.prototype.getCode=qr.prototype.getCode=function(){var t=this.ptr;return Lt(t)},qr.prototype.getName=qr.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(Ut(e,t))},qr.prototype.getType=qr.prototype.getType=function(){var t=this.ptr;return Ft(t)},Br.prototype=Object.create(Zr.prototype),Br.prototype.constructor=Br,Br.prototype.__class__=Br,Br.__cache__={},p.PeUnit=Br,Br.prototype.getUnitFactor=Br.prototype.getUnitFactor=function(){var t=this.ptr;return Yt(t)},Br.prototype.getCode=Br.prototype.getCode=function(){var t=this.ptr;return wt(t)},Br.prototype.getName=Br.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(xt(e,t))},Br.prototype.getType=Br.prototype.getType=function(){var t=this.ptr;return Ht(t)},Kr.prototype=Object.create(jr.prototype),Kr.prototype.constructor=Kr,Kr.prototype.__class__=Kr,Kr.__cache__={},p.VoidPtr=Kr,Kr.prototype.__destroy__=Kr.prototype.__destroy__=function(){var t=this.ptr;Xt(t)},Vr.prototype=Object.create(Br.prototype),Vr.prototype.constructor=Vr,Vr.prototype.__class__=Vr,Vr.__cache__={},p.PeAngunit=Vr,Vr.prototype.getCode=Vr.prototype.getCode=function(){var t=this.ptr;return zt(t)},Vr.prototype.getName=Vr.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(Wt(e,t))},Vr.prototype.getType=Vr.prototype.getType=function(){var t=this.ptr;return Zt(t)},Vr.prototype.getUnitFactor=Vr.prototype.getUnitFactor=function(){var t=this.ptr;return qt(t)},kr.prototype=Object.create(Zr.prototype),kr.prototype.constructor=kr,kr.prototype.__class__=kr,kr.__cache__={},p.PeDatum=kr,kr.prototype.getSpheroid=kr.prototype.getSpheroid=function(){var t=this.ptr;return Gr(Bt(t),fo)},kr.prototype.getCode=kr.prototype.getCode=function(){var t=this.ptr;return Kt(t)},kr.prototype.getName=kr.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(Vt(e,t))},kr.prototype.getType=kr.prototype.getType=function(){var t=this.ptr;return kt(t)},$r.prototype=Object.create(jr.prototype),$r.prototype.constructor=$r,$r.prototype.__class__=$r,$r.__cache__={},p.PeDefs=$r,$r.prototype.get_PE_BUFFER_MAX=$r.prototype.get_PE_BUFFER_MAX=function(){var t=this.ptr;return $t(t)},Object.defineProperty($r.prototype,"PE_BUFFER_MAX",{get:$r.prototype.get_PE_BUFFER_MAX}),$r.prototype.get_PE_NAME_MAX=$r.prototype.get_PE_NAME_MAX=function(){var t=this.ptr;return Jt(t)},Object.defineProperty($r.prototype,"PE_NAME_MAX",{get:$r.prototype.get_PE_NAME_MAX}),$r.prototype.get_PE_MGRS_MAX=$r.prototype.get_PE_MGRS_MAX=function(){var t=this.ptr;return Qt(t)},Object.defineProperty($r.prototype,"PE_MGRS_MAX",{get:$r.prototype.get_PE_MGRS_MAX}),$r.prototype.get_PE_USNG_MAX=$r.prototype.get_PE_USNG_MAX=function(){var t=this.ptr;return te(t)},Object.defineProperty($r.prototype,"PE_USNG_MAX",{get:$r.prototype.get_PE_USNG_MAX}),$r.prototype.get_PE_DD_MAX=$r.prototype.get_PE_DD_MAX=function(){var t=this.ptr;return ee(t)},Object.defineProperty($r.prototype,"PE_DD_MAX",{get:$r.prototype.get_PE_DD_MAX}),$r.prototype.get_PE_DMS_MAX=$r.prototype.get_PE_DMS_MAX=function(){var t=this.ptr;return _e(t)},Object.defineProperty($r.prototype,"PE_DMS_MAX",{get:$r.prototype.get_PE_DMS_MAX}),$r.prototype.get_PE_DDM_MAX=$r.prototype.get_PE_DDM_MAX=function(){var t=this.ptr;return re(t)},Object.defineProperty($r.prototype,"PE_DDM_MAX",{get:$r.prototype.get_PE_DDM_MAX}),$r.prototype.get_PE_UTM_MAX=$r.prototype.get_PE_UTM_MAX=function(){var t=this.ptr;return oe(t)},Object.defineProperty($r.prototype,"PE_UTM_MAX",{get:$r.prototype.get_PE_UTM_MAX}),$r.prototype.get_PE_PARM_MAX=$r.prototype.get_PE_PARM_MAX=function(){var t=this.ptr;return ne(t)},Object.defineProperty($r.prototype,"PE_PARM_MAX",{get:$r.prototype.get_PE_PARM_MAX}),$r.prototype.get_PE_TYPE_NONE=$r.prototype.get_PE_TYPE_NONE=function(){var t=this.ptr;return pe(t)},Object.defineProperty($r.prototype,"PE_TYPE_NONE",{get:$r.prototype.get_PE_TYPE_NONE}),$r.prototype.get_PE_TYPE_GEOGCS=$r.prototype.get_PE_TYPE_GEOGCS=function(){var t=this.ptr;return ie(t)},Object.defineProperty($r.prototype,"PE_TYPE_GEOGCS",{get:$r.prototype.get_PE_TYPE_GEOGCS}),$r.prototype.get_PE_TYPE_PROJCS=$r.prototype.get_PE_TYPE_PROJCS=function(){var t=this.ptr;return ce(t)},Object.defineProperty($r.prototype,"PE_TYPE_PROJCS",{get:$r.prototype.get_PE_TYPE_PROJCS}),$r.prototype.get_PE_TYPE_GEOGTRAN=$r.prototype.get_PE_TYPE_GEOGTRAN=function(){var t=this.ptr;return se(t)},Object.defineProperty($r.prototype,"PE_TYPE_GEOGTRAN",{get:$r.prototype.get_PE_TYPE_GEOGTRAN}),$r.prototype.get_PE_TYPE_COORDSYS=$r.prototype.get_PE_TYPE_COORDSYS=function(){var t=this.ptr;return Pe(t)},Object.defineProperty($r.prototype,"PE_TYPE_COORDSYS",{get:$r.prototype.get_PE_TYPE_COORDSYS}),$r.prototype.get_PE_TYPE_UNIT=$r.prototype.get_PE_TYPE_UNIT=function(){var t=this.ptr;return ae(t)},Object.defineProperty($r.prototype,"PE_TYPE_UNIT",{get:$r.prototype.get_PE_TYPE_UNIT}),$r.prototype.get_PE_TYPE_LINUNIT=$r.prototype.get_PE_TYPE_LINUNIT=function(){var t=this.ptr;return ge(t)},Object.defineProperty($r.prototype,"PE_TYPE_LINUNIT",{get:$r.prototype.get_PE_TYPE_LINUNIT}),$r.prototype.get_PE_STR_OPTS_NONE=$r.prototype.get_PE_STR_OPTS_NONE=function(){var t=this.ptr;return ye(t)},Object.defineProperty($r.prototype,"PE_STR_OPTS_NONE",{get:$r.prototype.get_PE_STR_OPTS_NONE}),$r.prototype.get_PE_STR_AUTH_NONE=$r.prototype.get_PE_STR_AUTH_NONE=function(){var t=this.ptr;return de(t)},Object.defineProperty($r.prototype,"PE_STR_AUTH_NONE",{get:$r.prototype.get_PE_STR_AUTH_NONE}),$r.prototype.get_PE_STR_AUTH_TOP=$r.prototype.get_PE_STR_AUTH_TOP=function(){var t=this.ptr;return ue(t)},Object.defineProperty($r.prototype,"PE_STR_AUTH_TOP",{get:$r.prototype.get_PE_STR_AUTH_TOP}),$r.prototype.get_PE_STR_NAME_CANON=$r.prototype.get_PE_STR_NAME_CANON=function(){var t=this.ptr;return be(t)},Object.defineProperty($r.prototype,"PE_STR_NAME_CANON",{get:$r.prototype.get_PE_STR_NAME_CANON}),$r.prototype.get_PE_STR_FMT_WKT=$r.prototype.get_PE_STR_FMT_WKT=function(){var t=this.ptr;return fe(t)},Object.defineProperty($r.prototype,"PE_STR_FMT_WKT",{get:$r.prototype.get_PE_STR_FMT_WKT}),$r.prototype.get_PE_STR_FMT_WKT2=$r.prototype.get_PE_STR_FMT_WKT2=function(){var t=this.ptr;return Ee(t)},Object.defineProperty($r.prototype,"PE_STR_FMT_WKT2",{get:$r.prototype.get_PE_STR_FMT_WKT2}),$r.prototype.get_PE_PARM_X0=$r.prototype.get_PE_PARM_X0=function(){var t=this.ptr;return me(t)},Object.defineProperty($r.prototype,"PE_PARM_X0",{get:$r.prototype.get_PE_PARM_X0}),$r.prototype.get_PE_PARM_ND=$r.prototype.get_PE_PARM_ND=function(){var t=this.ptr;return Te(t)},Object.defineProperty($r.prototype,"PE_PARM_ND",{get:$r.prototype.get_PE_PARM_ND}),$r.prototype.get_PE_TRANSFORM_1_TO_2=$r.prototype.get_PE_TRANSFORM_1_TO_2=function(){var t=this.ptr;return Oe(t)},Object.defineProperty($r.prototype,"PE_TRANSFORM_1_TO_2",{get:$r.prototype.get_PE_TRANSFORM_1_TO_2}),$r.prototype.get_PE_TRANSFORM_2_TO_1=$r.prototype.get_PE_TRANSFORM_2_TO_1=function(){var t=this.ptr;return Se(t)},Object.defineProperty($r.prototype,"PE_TRANSFORM_2_TO_1",{get:$r.prototype.get_PE_TRANSFORM_2_TO_1}),$r.prototype.get_PE_TRANSFORM_P_TO_G=$r.prototype.get_PE_TRANSFORM_P_TO_G=function(){var t=this.ptr;return he(t)},Object.defineProperty($r.prototype,"PE_TRANSFORM_P_TO_G",{get:$r.prototype.get_PE_TRANSFORM_P_TO_G}),$r.prototype.get_PE_TRANSFORM_G_TO_P=$r.prototype.get_PE_TRANSFORM_G_TO_P=function(){var t=this.ptr;return Ne(t)},Object.defineProperty($r.prototype,"PE_TRANSFORM_G_TO_P",{get:$r.prototype.get_PE_TRANSFORM_G_TO_P}),$r.prototype.get_PE_HORIZON_RECT=$r.prototype.get_PE_HORIZON_RECT=function(){var t=this.ptr;return le(t)},Object.defineProperty($r.prototype,"PE_HORIZON_RECT",{get:$r.prototype.get_PE_HORIZON_RECT}),$r.prototype.get_PE_HORIZON_POLY=$r.prototype.get_PE_HORIZON_POLY=function(){var t=this.ptr;return Me(t)},Object.defineProperty($r.prototype,"PE_HORIZON_POLY",{get:$r.prototype.get_PE_HORIZON_POLY}),$r.prototype.get_PE_HORIZON_LINE=$r.prototype.get_PE_HORIZON_LINE=function(){var t=this.ptr;return De(t)},Object.defineProperty($r.prototype,"PE_HORIZON_LINE",{get:$r.prototype.get_PE_HORIZON_LINE}),$r.prototype.get_PE_HORIZON_DELTA=$r.prototype.get_PE_HORIZON_DELTA=function(){var t=this.ptr;return ve(t)},Object.defineProperty($r.prototype,"PE_HORIZON_DELTA",{get:$r.prototype.get_PE_HORIZON_DELTA}),Jr.prototype=Object.create(jr.prototype),Jr.prototype.constructor=Jr,Jr.prototype.__class__=Jr,Jr.__cache__={},p.PeDouble=Jr,Jr.prototype.get_val=Jr.prototype.get_val=function(){var t=this.ptr;return je(t)},Jr.prototype.set_val=Jr.prototype.set_val=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Re(e,t)},Object.defineProperty(Jr.prototype,"val",{get:Jr.prototype.get_val,set:Jr.prototype.set_val}),Jr.prototype.__destroy__=Jr.prototype.__destroy__=function(){var t=this.ptr;Ge(t)},Qr.prototype=Object.create(jr.prototype),Qr.prototype.constructor=Qr,Qr.prototype.__class__=Qr,Qr.__cache__={},p.PeFactory=Qr,Qr.prototype.initialize=Qr.prototype.initialize=function(t){Yr.prepare(),t=t&&"object"==typeof t?t.ptr:wr(t),Ce(t)},Qr.prototype.factoryByType=Qr.prototype.factoryByType=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Gr(Ie(t,e),Zr)},Qr.prototype.fromString=Qr.prototype.fromString=function(t,e){return Yr.prepare(),t&&"object"==typeof t&&(t=t.ptr),e=e&&"object"==typeof e?e.ptr:wr(e),Gr(Le(t,e),Zr)},Qr.prototype.getCode=Qr.prototype.getCode=function(t){return t&&"object"==typeof t&&(t=t.ptr),Ue(t)},to.prototype=Object.create(jr.prototype),to.prototype.constructor=to,to.prototype.__class__=to,to.__cache__={},p.PeGCSExtent=to,to.prototype.getLLon=to.prototype.getLLon=function(){var t=this.ptr;return Ye(t)},to.prototype.getSLat=to.prototype.getSLat=function(){var t=this.ptr;return we(t)},to.prototype.getRLon=to.prototype.getRLon=function(){var t=this.ptr;return xe(t)},to.prototype.getNLat=to.prototype.getNLat=function(){var t=this.ptr;return He(t)},to.prototype.__destroy__=to.prototype.__destroy__=function(){var t=this.ptr;Xe(t)},eo.prototype=Object.create(qr.prototype),eo.prototype.constructor=eo,eo.prototype.__class__=eo,eo.__cache__={},p.PeGeogcs=eo,eo.prototype.Delete=eo.prototype.Delete=function(){var t=this.ptr;ze(t)},eo.prototype.cloneAlterUnits=eo.prototype.cloneAlterUnits=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Gr(We(e,t),eo)},eo.prototype.getDatum=eo.prototype.getDatum=function(){var t=this.ptr;return Gr(Ze(t),kr)},eo.prototype.getPrimem=eo.prototype.getPrimem=function(){var t=this.ptr;return Gr(qe(t),uo)},eo.prototype.getUnit=eo.prototype.getUnit=function(){var t=this.ptr;return Gr(Be(t),Vr)},eo.prototype.isEqual=eo.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!Ke(e,t)},eo.prototype.getCode=eo.prototype.getCode=function(){var t=this.ptr;return Ve(t)},eo.prototype.getName=eo.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(ke(e,t))},eo.prototype.getType=eo.prototype.getType=function(){var t=this.ptr;return $e(t)},_o.prototype=Object.create(Zr.prototype),_o.prototype.constructor=_o,_o.prototype.__class__=_o,_o.__cache__={},p.PeGeogtran=_o,_o.prototype.isEqual=_o.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!Je(e,t)},_o.prototype.getGeogcs1=_o.prototype.getGeogcs1=function(){var t=this.ptr;return Gr(Qe(t),eo)},_o.prototype.getGeogcs2=_o.prototype.getGeogcs2=function(){var t=this.ptr;return Gr(t_(t),eo)},_o.prototype.getParameters=_o.prototype.getParameters=function(){var t=this.ptr;return e_(t)},_o.prototype.loadConstants=_o.prototype.loadConstants=function(){var t=this.ptr;return!!__(t)},_o.prototype.getCode=_o.prototype.getCode=function(){var t=this.ptr;return r_(t)},_o.prototype.getName=_o.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(o_(e,t))},_o.prototype.getType=_o.prototype.getType=function(){var t=this.ptr;return n_(t)},ro.prototype=Object.create(jr.prototype),ro.prototype.constructor=ro,ro.prototype.__class__=ro,ro.__cache__={},p.PeGTlistExtended=ro,ro.prototype.getGTlist=ro.prototype.getGTlist=function(t,e,_,r,o,n){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),_&&"object"==typeof _&&(_=_.ptr),r&&"object"==typeof r&&(r=r.ptr),o&&"object"==typeof o&&(o=o.ptr),n&&"object"==typeof n&&(n=n.ptr),Gr(p_(t,e,_,r,o,n),oo)},ro.prototype.get_PE_GTLIST_OPTS_COMMON=ro.prototype.get_PE_GTLIST_OPTS_COMMON=function(){var t=this.ptr;return i_(t)},Object.defineProperty(ro.prototype,"PE_GTLIST_OPTS_COMMON",{get:ro.prototype.get_PE_GTLIST_OPTS_COMMON}),oo.prototype=Object.create(jr.prototype),oo.prototype.constructor=oo,oo.prototype.__class__=oo,oo.__cache__={},p.PeGTlistExtendedEntry=oo,oo.prototype.getEntries=oo.prototype.getEntries=function(){var t=this.ptr;return Gr(c_(t),no)},oo.prototype.getSteps=oo.prototype.getSteps=function(){var t=this.ptr;return s_(t)},oo.prototype.Delete=oo.prototype.Delete=function(t){t&&"object"==typeof t&&(t=t.ptr),P_(t)},no.prototype=Object.create(jr.prototype),no.prototype.constructor=no,no.prototype.__class__=no,no.__cache__={},p.PeGTlistExtendedGTs=no,no.prototype.getDirection=no.prototype.getDirection=function(){var t=this.ptr;return a_(t)},no.prototype.getGeogtran=no.prototype.getGeogtran=function(){var t=this.ptr;return Gr(g_(t),_o)},po.prototype=Object.create(jr.prototype),po.prototype.constructor=po,po.prototype.__class__=po,po.__cache__={},p.PeHorizon=po,po.prototype.getNump=po.prototype.getNump=function(){var t=this.ptr;return y_(t)},po.prototype.getKind=po.prototype.getKind=function(){var t=this.ptr;return d_(t)},po.prototype.getInclusive=po.prototype.getInclusive=function(){var t=this.ptr;return u_(t)},po.prototype.getSize=po.prototype.getSize=function(){var t=this.ptr;return b_(t)},po.prototype.getCoord=po.prototype.getCoord=function(){var t=this.ptr;return f_(t)},io.prototype=Object.create(jr.prototype),io.prototype.constructor=io,io.prototype.__class__=io,io.__cache__={},p.PeInteger=io,io.prototype.get_val=io.prototype.get_val=function(){var t=this.ptr;return m_(t)},io.prototype.set_val=io.prototype.set_val=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),T_(e,t)},Object.defineProperty(io.prototype,"val",{get:io.prototype.get_val,set:io.prototype.set_val}),io.prototype.__destroy__=io.prototype.__destroy__=function(){var t=this.ptr;O_(t)},co.prototype=Object.create(jr.prototype),co.prototype.constructor=co,co.prototype.__class__=co,co.__cache__={},p.PeLineType=co,co.prototype.geodetic_distance=co.prototype.geodetic_distance=function(t,e,_,r,o,n,p,i,c,s){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),_&&"object"==typeof _&&(_=_.ptr),r&&"object"==typeof r&&(r=r.ptr),o&&"object"==typeof o&&(o=o.ptr),n&&"object"==typeof n&&(n=n.ptr),p&&"object"==typeof p&&(p=p.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),s&&"object"==typeof s&&(s=s.ptr),S_(t,e,_,r,o,n,p,i,c,s)},co.prototype.geodetic_coordinate=co.prototype.geodetic_coordinate=function(t,e,_,r,o,n,p,i,c){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),_&&"object"==typeof _&&(_=_.ptr),r&&"object"==typeof r&&(r=r.ptr),o&&"object"==typeof o&&(o=o.ptr),n&&"object"==typeof n&&(n=n.ptr),p&&"object"==typeof p&&(p=p.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),h_(t,e,_,r,o,n,p,i,c)},co.prototype.geodesic_coordinate=co.prototype.geodesic_coordinate=function(t,e,_,r,o,n,p,i){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),_&&"object"==typeof _&&(_=_.ptr),r&&"object"==typeof r&&(r=r.ptr),o&&"object"==typeof o&&(o=o.ptr),n&&"object"==typeof n&&(n=n.ptr),p&&"object"==typeof p&&(p=p.ptr),i&&"object"==typeof i&&(i=i.ptr),N_(t,e,_,r,o,n,p,i)},co.prototype.great_elliptic_distance=co.prototype.great_elliptic_distance=function(t,e,_,r,o,n,p,i,c){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),_&&"object"==typeof _&&(_=_.ptr),r&&"object"==typeof r&&(r=r.ptr),o&&"object"==typeof o&&(o=o.ptr),n&&"object"==typeof n&&(n=n.ptr),p&&"object"==typeof p&&(p=p.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),l_(t,e,_,r,o,n,p,i,c)},so.prototype=Object.create(jr.prototype),so.prototype.constructor=so,so.prototype.__class__=so,so.__cache__={},p.PeMath=so,so.prototype.phi_to_eta=so.prototype.phi_to_eta=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),M_(t,e)},so.prototype.eta_to_phi=so.prototype.eta_to_phi=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),D_(t,e)},so.prototype.phi_to_phig=so.prototype.phi_to_phig=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),v_(t,e)},so.prototype.q=so.prototype.q=function(t,e,_){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),_&&"object"==typeof _&&(_=_.ptr),A_(t,e,_)},so.prototype.q90=so.prototype.q90=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),j_(t,e)},Po.prototype=Object.create(jr.prototype),Po.prototype.constructor=Po,Po.prototype.__class__=Po,Po.__cache__={},p.PeNotationMgrs=Po,Po.prototype.get_PE_MGRS_STYLE_NEW=Po.prototype.get_PE_MGRS_STYLE_NEW=function(){var t=this.ptr;return R_(t)},Object.defineProperty(Po.prototype,"PE_MGRS_STYLE_NEW",{get:Po.prototype.get_PE_MGRS_STYLE_NEW}),Po.prototype.get_PE_MGRS_STYLE_OLD=Po.prototype.get_PE_MGRS_STYLE_OLD=function(){var t=this.ptr;return G_(t)},Object.defineProperty(Po.prototype,"PE_MGRS_STYLE_OLD",{get:Po.prototype.get_PE_MGRS_STYLE_OLD}),Po.prototype.get_PE_MGRS_STYLE_AUTO=Po.prototype.get_PE_MGRS_STYLE_AUTO=function(){var t=this.ptr;return C_(t)},Object.defineProperty(Po.prototype,"PE_MGRS_STYLE_AUTO",{get:Po.prototype.get_PE_MGRS_STYLE_AUTO}),Po.prototype.get_PE_MGRS_180_ZONE_1_PLUS=Po.prototype.get_PE_MGRS_180_ZONE_1_PLUS=function(){var t=this.ptr;return I_(t)},Object.defineProperty(Po.prototype,"PE_MGRS_180_ZONE_1_PLUS",{get:Po.prototype.get_PE_MGRS_180_ZONE_1_PLUS}),Po.prototype.get_PE_MGRS_ADD_SPACES=Po.prototype.get_PE_MGRS_ADD_SPACES=function(){var t=this.ptr;return L_(t)},Object.defineProperty(Po.prototype,"PE_MGRS_ADD_SPACES",{get:Po.prototype.get_PE_MGRS_ADD_SPACES}),ao.prototype=Object.create(jr.prototype),ao.prototype.constructor=ao,ao.prototype.__class__=ao,ao.__cache__={},p.PeNotationUtm=ao,ao.prototype.get_PE_UTM_OPTS_NONE=ao.prototype.get_PE_UTM_OPTS_NONE=function(){var t=this.ptr;return U_(t)},Object.defineProperty(ao.prototype,"PE_UTM_OPTS_NONE",{get:ao.prototype.get_PE_UTM_OPTS_NONE}),ao.prototype.get_PE_UTM_OPTS_NS=ao.prototype.get_PE_UTM_OPTS_NS=function(){var t=this.ptr;return F_(t)},Object.defineProperty(ao.prototype,"PE_UTM_OPTS_NS",{get:ao.prototype.get_PE_UTM_OPTS_NS}),ao.prototype.get_PE_UTM_OPTS_NS_STRICT=ao.prototype.get_PE_UTM_OPTS_NS_STRICT=function(){var t=this.ptr;return Y_(t)},Object.defineProperty(ao.prototype,"PE_UTM_OPTS_NS_STRICT",{get:ao.prototype.get_PE_UTM_OPTS_NS_STRICT}),ao.prototype.get_PE_UTM_OPTS_ADD_SPACES=ao.prototype.get_PE_UTM_OPTS_ADD_SPACES=function(){var t=this.ptr;return w_(t)},Object.defineProperty(ao.prototype,"PE_UTM_OPTS_ADD_SPACES",{get:ao.prototype.get_PE_UTM_OPTS_ADD_SPACES}),go.prototype=Object.create(Zr.prototype),go.prototype.constructor=go,go.prototype.__class__=go,go.__cache__={},p.PeParameter=go,go.prototype.getValue=go.prototype.getValue=function(){var t=this.ptr;return x_(t)},go.prototype.getCode=go.prototype.getCode=function(){var t=this.ptr;return H_(t)},go.prototype.getName=go.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(X_(e,t))},go.prototype.getType=go.prototype.getType=function(){var t=this.ptr;return z_(t)},yo.prototype=Object.create(jr.prototype),yo.prototype.constructor=yo,yo.prototype.__class__=yo,yo.__cache__={},p.PePCSInfo=yo,yo.prototype.getCentralMeridian=yo.prototype.getCentralMeridian=function(){var t=this.ptr;return W_(t)},yo.prototype.getDomainMinx=yo.prototype.getDomainMinx=function(){var t=this.ptr;return Z_(t)},yo.prototype.getDomainMiny=yo.prototype.getDomainMiny=function(){var t=this.ptr;return q_(t)},yo.prototype.getDomainMaxx=yo.prototype.getDomainMaxx=function(){var t=this.ptr;return B_(t)},yo.prototype.getDomainMaxy=yo.prototype.getDomainMaxy=function(){var t=this.ptr;return K_(t)},yo.prototype.getNorthPoleLocation=yo.prototype.getNorthPoleLocation=function(){var t=this.ptr;return V_(t)},yo.prototype.getNorthPoleGeometry=yo.prototype.getNorthPoleGeometry=function(){var t=this.ptr;return k_(t)},yo.prototype.getSouthPoleLocation=yo.prototype.getSouthPoleLocation=function(){var t=this.ptr;return $_(t)},yo.prototype.getSouthPoleGeometry=yo.prototype.getSouthPoleGeometry=function(){var t=this.ptr;return J_(t)},yo.prototype.isDensificationNeeded=yo.prototype.isDensificationNeeded=function(){var t=this.ptr;return!!Q_(t)},yo.prototype.isGcsHorizonMultiOverlap=yo.prototype.isGcsHorizonMultiOverlap=function(){var t=this.ptr;return!!tr(t)},yo.prototype.isPannableRectangle=yo.prototype.isPannableRectangle=function(){var t=this.ptr;return!!er(t)},yo.prototype.generate=yo.prototype.generate=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Gr(_r(t,e),yo)},yo.prototype.get_PE_PCSINFO_OPTION_NONE=yo.prototype.get_PE_PCSINFO_OPTION_NONE=function(){var t=this.ptr;return rr(t)},Object.defineProperty(yo.prototype,"PE_PCSINFO_OPTION_NONE",{get:yo.prototype.get_PE_PCSINFO_OPTION_NONE}),yo.prototype.get_PE_PCSINFO_OPTION_DOMAIN=yo.prototype.get_PE_PCSINFO_OPTION_DOMAIN=function(){var t=this.ptr;return or(t)},Object.defineProperty(yo.prototype,"PE_PCSINFO_OPTION_DOMAIN",{get:yo.prototype.get_PE_PCSINFO_OPTION_DOMAIN}),yo.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=yo.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=function(){var t=this.ptr;return nr(t)},Object.defineProperty(yo.prototype,"PE_POLE_OUTSIDE_BOUNDARY",{get:yo.prototype.get_PE_POLE_OUTSIDE_BOUNDARY}),yo.prototype.get_PE_POLE_POINT=yo.prototype.get_PE_POLE_POINT=function(){var t=this.ptr;return pr(t)},Object.defineProperty(yo.prototype,"PE_POLE_POINT",{get:yo.prototype.get_PE_POLE_POINT}),uo.prototype=Object.create(Zr.prototype),uo.prototype.constructor=uo,uo.prototype.__class__=uo,uo.__cache__={},p.PePrimem=uo,uo.prototype.getLongitude=uo.prototype.getLongitude=function(){var t=this.ptr;return ir(t)},uo.prototype.getCode=uo.prototype.getCode=function(){var t=this.ptr;return cr(t)},uo.prototype.getName=uo.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(sr(e,t))},uo.prototype.getType=uo.prototype.getType=function(){var t=this.ptr;return Pr(t)},bo.prototype=Object.create(qr.prototype),bo.prototype.constructor=bo,bo.prototype.__class__=bo,bo.__cache__={},p.PeProjcs=bo,bo.prototype.Delete=bo.prototype.Delete=function(){var t=this.ptr;ar(t)},bo.prototype.getGeogcs=bo.prototype.getGeogcs=function(){var t=this.ptr;return Gr(gr(t),eo)},bo.prototype.getProjection=bo.prototype.getProjection=function(){var t=this.ptr;return Gr(yr(t),Zr)},bo.prototype.getParameters=bo.prototype.getParameters=function(){var t=this.ptr;return dr(t)},bo.prototype.getUnit=bo.prototype.getUnit=function(){var t=this.ptr;return Gr(ur(t),Br)},bo.prototype.loadConstants=bo.prototype.loadConstants=function(){var t=this.ptr;return!!br(t)},bo.prototype.horizonGcsGenerate=bo.prototype.horizonGcsGenerate=function(){var t=this.ptr;return Gr(fr(t),po)},bo.prototype.horizonPcsGenerate=bo.prototype.horizonPcsGenerate=function(){var t=this.ptr;return Gr(Er(t),po)},bo.prototype.isEqual=bo.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!mr(e,t)},bo.prototype.getCode=bo.prototype.getCode=function(){var t=this.ptr;return Tr(t)},bo.prototype.getName=bo.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(Or(e,t))},bo.prototype.getType=bo.prototype.getType=function(){var t=this.ptr;return Sr(t)},fo.prototype=Object.create(Zr.prototype),fo.prototype.constructor=fo,fo.prototype.__class__=fo,fo.__cache__={},p.PeSpheroid=fo,fo.prototype.getAxis=fo.prototype.getAxis=function(){var t=this.ptr;return hr(t)},fo.prototype.getFlattening=fo.prototype.getFlattening=function(){var t=this.ptr;return Nr(t)},fo.prototype.getCode=fo.prototype.getCode=function(){var t=this.ptr;return lr(t)},fo.prototype.getName=fo.prototype.getName=function(t){var e=this.ptr;return Yr.prepare(),"object"==typeof t&&(t=xr(t)),ot(Mr(e,t))},fo.prototype.getType=fo.prototype.getType=function(){var t=this.ptr;return Dr(t)},Eo.prototype=Object.create(jr.prototype),Eo.prototype.constructor=Eo,Eo.prototype.__class__=Eo,Eo.__cache__={},p.PeVersion=Eo,Eo.prototype.version_string=Eo.prototype.version_string=function(){var t=this.ptr;return ot(vr(t))},p.ensureCache=Yr,p.ensureString=wr,p.ensureInt8=xr,p.ensureInt16=Hr,p.ensureInt32=Xr,p.ensureFloat32=zr,p.ensureFloat64=Wr,i},t.exports=o),_.exports;var t,r,o}const o=t(r()),n=Object.freeze(Object.defineProperty({__proto__:null,default:o},Symbol.toStringTag,{value:"Module"}));export{n as p};
5
+ var t=async function(t={}){var e,o,r,_=t,p=new Promise(((t,r)=>{e=t,o=r})),n="./this.program",i="",c="";function a(t){return _.locateFile?_.locateFile(t,c):c+t}try{c=new URL(".",i).href}catch{}r=async t=>{var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)};var y,s,P,g,u,f,b,E,d,T,O=console.log.bind(console),m=console.error.bind(console),h=!1;function S(t,e){t||R(e)}function N(){var t=s.buffer;P=new Int8Array(t),u=new Int16Array(t),g=new Uint8Array(t),f=new Int32Array(t),b=new Uint32Array(t),E=new Float32Array(t),T=new Float64Array(t),d=new BigInt64Array(t),new BigUint64Array(t)}function l(){Y(Mt),Dt.t()}var v,M=0,j=null;function D(t){M++}function A(t){if(0==--M&&j){var e=j;j=null,e()}}function R(t){m(t="Aborted("+t+")"),h=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function G(){return _.locateFile?a("pe-wasm.wasm"):new URL("pe-wasm.wasm","").href}function C(t){throw"both async and sync fetching of the wasm failed"}async function I(t){try{var e=await r(t);return new Uint8Array(e)}catch{}return C()}async function L(t,e){try{var o=await I(t);return await WebAssembly.instantiate(o,e)}catch(r){m(`failed to asynchronously prepare wasm: ${r}`),R(r)}}async function U(t,e,o){if("function"==typeof WebAssembly.instantiateStreaming)try{var r=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,o)}catch(_){m(`wasm streaming compile failed: ${_}`),m("falling back to ArrayBuffer instantiation")}return L(e,o)}function w(){return{a:jt}}async function F(){function t(t,e){return Dt=t.exports,s=Dt.s,N(),A(),Dt}function e(e){return t(e.instance)}D();var r=w();v??=G();try{return e(await U(y,v,r))}catch(_){return o(_),Promise.reject(_)}}var Y=t=>{for(;t.length>0;)t.shift()(_)};function X(t,e="i8"){switch(e.endsWith("*")&&(e="*"),e){case"i1":case"i8":return P[t];case"i16":return u[t>>1];case"i32":return f[t>>2];case"i64":return d[t>>3];case"float":return E[t>>2];case"double":return T[t>>3];case"*":return b[t>>2];default:R(`invalid type for getValue: ${e}`)}}var x="undefined"!=typeof TextDecoder?new TextDecoder:void 0,H=(t,e=0,o=NaN)=>{for(var r=e+o,_=e;t[_]&&!(_>=r);)++_;if(_-e>16&&t.buffer&&x)return x.decode(t.subarray(e,_));for(var p="";e<_;){var n=t[e++];if(128&n){var i=63&t[e++];if(192!=(224&n)){var c=63&t[e++];if((n=224==(240&n)?(15&n)<<12|i<<6|c:(7&n)<<18|i<<12|c<<6|63&t[e++])<65536)p+=String.fromCharCode(n);else{var a=n-65536;p+=String.fromCharCode(55296|a>>10,56320|1023&a)}}else p+=String.fromCharCode((31&n)<<6|i)}else p+=String.fromCharCode(n)}return p},z=(t,e)=>t?H(g,t,e):"";function Z(t,e,o){return 0}var W=(t,e,o)=>{};function B(t,e,o){return 0}function q(t,e,o,r){}var K=t=>{},V=(t,e)=>{},$=(t,e,o)=>{},k=()=>R(""),J=t=>t%4==0&&(t%100!=0||t%400==0),Q=[0,31,60,91,121,152,182,213,244,274,305,335],tt=[0,31,59,90,120,151,181,212,243,273,304,334],et=t=>(J(t.getFullYear())?Q:tt)[t.getMonth()]+t.getDate()-1,ot=9007199254740992,rt=-9007199254740992,_t=t=>t<rt||t>ot?NaN:Number(t);function pt(t,e){t=_t(t);var o=new Date(1e3*t);f[e>>2]=o.getSeconds(),f[e+4>>2]=o.getMinutes(),f[e+8>>2]=o.getHours(),f[e+12>>2]=o.getDate(),f[e+16>>2]=o.getMonth(),f[e+20>>2]=o.getFullYear()-1900,f[e+24>>2]=o.getDay();var r=0|et(o);f[e+28>>2]=r,f[e+36>>2]=-60*o.getTimezoneOffset();var _=new Date(o.getFullYear(),0,1),p=new Date(o.getFullYear(),6,1).getTimezoneOffset(),n=_.getTimezoneOffset(),i=0|(p!=n&&o.getTimezoneOffset()==Math.min(n,p));f[e+32>>2]=i}var nt=(t,e,o,r)=>{if(!(r>0))return 0;for(var _=o,p=o+r-1,n=0;n<t.length;++n){var i=t.charCodeAt(n);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&t.charCodeAt(++n)),i<=127){if(o>=p)break;e[o++]=i}else if(i<=2047){if(o+1>=p)break;e[o++]=192|i>>6,e[o++]=128|63&i}else if(i<=65535){if(o+2>=p)break;e[o++]=224|i>>12,e[o++]=128|i>>6&63,e[o++]=128|63&i}else{if(o+3>=p)break;e[o++]=240|i>>18,e[o++]=128|i>>12&63,e[o++]=128|i>>6&63,e[o++]=128|63&i}}return e[o]=0,o-_},it=(t,e,o)=>nt(t,g,e,o),ct=(t,e,o,r)=>{var _=(new Date).getFullYear(),p=new Date(_,0,1),n=new Date(_,6,1),i=p.getTimezoneOffset(),c=n.getTimezoneOffset(),a=Math.max(i,c);b[t>>2]=60*a,f[e>>2]=Number(i!=c);var y=t=>{var e=t>=0?"-":"+",o=Math.abs(t);return`UTC${e}${String(Math.floor(o/60)).padStart(2,"0")}${String(o%60).padStart(2,"0")}`},s=y(i),P=y(c);c<i?(it(s,o,17),it(P,r,17)):(it(s,r,17),it(P,o,17))},at=()=>Date.now(),yt=()=>2147483648,st=(t,e)=>Math.ceil(t/e)*e,Pt=t=>{var e=(t-s.buffer.byteLength+65535)/65536|0;try{return s.grow(e),N(),1}catch(o){}},gt=t=>{var e=g.length;t>>>=0;var o=yt();if(t>o)return!1;for(var r=1;r<=4;r*=2){var _=e*(1+.2/r);_=Math.min(_,t+100663296);var p=Math.min(o,st(Math.max(t,_),65536));if(Pt(p))return!0}return!1},ut={},ft=()=>n,bt=()=>{if(!bt.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ft()};for(var e in ut)void 0===ut[e]?delete t[e]:t[e]=ut[e];var o=[];for(var e in t)o.push(`${e}=${t[e]}`);bt.strings=o}return bt.strings},Et=(t,e)=>{var o=0,r=0;for(var _ of bt()){var p=e+o;b[t+r>>2]=p,o+=it(_,p,1/0)+1,r+=4}return 0},dt=t=>{for(var e=0,o=0;o<t.length;++o){var r=t.charCodeAt(o);r<=127?e++:r<=2047?e+=2:r>=55296&&r<=57343?(e+=4,++o):e+=3}return e},Tt=(t,e)=>{var o=bt();b[t>>2]=o.length;var r=0;for(var _ of o)r+=dt(_)+1;return b[e>>2]=r,0},Ot=t=>52,mt=(t,e,o,r)=>52;function ht(t,e,o,r){return 70}var St=[null,[],[]],Nt=(t,e)=>{var o=St[t];0===e||10===e?((1===t?O:m)(H(o)),o.length=0):o.push(e)},lt=(t,e,o,r)=>{for(var _=0,p=0;p<o;p++){var n=b[e>>2],i=b[e+4>>2];e+=8;for(var c=0;c<i;c++)Nt(t,g[n+c]);_+=i}return b[r>>2]=_,0},vt=(t,e,o)=>{var r=dt(t)+1,_=new Array(r);return nt(t,_,0,_.length),_},Mt=[];_.getValue=X,_.UTF8ToString=z;var jt={c:Z,o:W,i:B,d:q,m:K,l:V,n:$,j:k,p:pt,q:ct,r:at,k:gt,f:Et,g:Tt,a:Ot,h:mt,e:ht,b:lt},Dt=await F();Dt.t,_._webidl_free=Dt.u,_._webidl_malloc=Dt.v;var At=_._emscripten_bind_PeObject_getCode_0=Dt.w,Rt=_._emscripten_bind_PeObject_getName_1=Dt.x,Gt=_._emscripten_bind_PeObject_getType_0=Dt.y,Ct=_._emscripten_bind_PeCoordsys_isEqual_1=Dt.z,It=_._emscripten_bind_PeCoordsys_getCode_0=Dt.A,Lt=_._emscripten_bind_PeCoordsys_getName_1=Dt.B,Ut=_._emscripten_bind_PeCoordsys_getType_0=Dt.C,wt=_._emscripten_bind_PeUnit_getUnitFactor_0=Dt.D,Ft=_._emscripten_bind_PeUnit_getCode_0=Dt.E,Yt=_._emscripten_bind_PeUnit_getName_1=Dt.F,Xt=_._emscripten_bind_PeUnit_getType_0=Dt.G,xt=_._emscripten_bind_VoidPtr___destroy___0=Dt.H,Ht=_._emscripten_bind_PeAngunit_getCode_0=Dt.I,zt=_._emscripten_bind_PeAngunit_getName_1=Dt.J,Zt=_._emscripten_bind_PeAngunit_getType_0=Dt.K,Wt=_._emscripten_bind_PeAngunit_getUnitFactor_0=Dt.L,Bt=_._emscripten_bind_PeDatum_getSpheroid_0=Dt.M,qt=_._emscripten_bind_PeDatum_getCode_0=Dt.N,Kt=_._emscripten_bind_PeDatum_getName_1=Dt.O,Vt=_._emscripten_bind_PeDatum_getType_0=Dt.P,$t=_._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=Dt.Q,kt=_._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=Dt.R,Jt=_._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=Dt.S,Qt=_._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=Dt.T,te=_._emscripten_bind_PeDefs_get_PE_DD_MAX_0=Dt.U,ee=_._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=Dt.V,oe=_._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=Dt.W,re=_._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=Dt.X,_e=_._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=Dt.Y,pe=_._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=Dt.Z,ne=_._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=Dt._,ie=_._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=Dt.$,ce=_._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=Dt.aa,ae=_._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=Dt.ba,ye=_._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=Dt.ca,se=_._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=Dt.da,Pe=_._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=Dt.ea,ge=_._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=Dt.fa,ue=_._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=Dt.ga,fe=_._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=Dt.ha,be=_._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=Dt.ia,Ee=_._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=Dt.ja,de=_._emscripten_bind_PeDefs_get_PE_PARM_X0_0=Dt.ka,Te=_._emscripten_bind_PeDefs_get_PE_PARM_ND_0=Dt.la,Oe=_._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=Dt.ma,me=_._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=Dt.na,he=_._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=Dt.oa,Se=_._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=Dt.pa,Ne=_._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=Dt.qa,le=_._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=Dt.ra,ve=_._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=Dt.sa,Me=_._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=Dt.ta,je=_._emscripten_bind_PeDouble_PeDouble_1=Dt.ua,De=_._emscripten_bind_PeDouble_get_val_0=Dt.va,Ae=_._emscripten_bind_PeDouble_set_val_1=Dt.wa,Re=_._emscripten_bind_PeDouble___destroy___0=Dt.xa,Ge=_._emscripten_bind_PeFactory_initialize_1=Dt.ya,Ce=_._emscripten_bind_PeFactory_factoryByType_2=Dt.za,Ie=_._emscripten_bind_PeFactory_fromString_2=Dt.Aa,Le=_._emscripten_bind_PeFactory_getCode_1=Dt.Ba,Ue=_._emscripten_bind_PeGCSExtent_PeGCSExtent_6=Dt.Ca,we=_._emscripten_bind_PeGCSExtent_getLLon_0=Dt.Da,Fe=_._emscripten_bind_PeGCSExtent_getSLat_0=Dt.Ea,Ye=_._emscripten_bind_PeGCSExtent_getRLon_0=Dt.Fa,Xe=_._emscripten_bind_PeGCSExtent_getNLat_0=Dt.Ga,xe=_._emscripten_bind_PeGCSExtent___destroy___0=Dt.Ha,He=_._emscripten_bind_PeGeogcs_Delete_0=Dt.Ia,ze=_._emscripten_bind_PeGeogcs_cloneAlterUnits_1=Dt.Ja,Ze=_._emscripten_bind_PeGeogcs_getDatum_0=Dt.Ka,We=_._emscripten_bind_PeGeogcs_getPrimem_0=Dt.La,Be=_._emscripten_bind_PeGeogcs_getUnit_0=Dt.Ma,qe=_._emscripten_bind_PeGeogcs_isEqual_1=Dt.Na,Ke=_._emscripten_bind_PeGeogcs_getCode_0=Dt.Oa,Ve=_._emscripten_bind_PeGeogcs_getName_1=Dt.Pa,$e=_._emscripten_bind_PeGeogcs_getType_0=Dt.Qa,ke=_._emscripten_bind_PeGeogtran_isEqual_1=Dt.Ra,Je=_._emscripten_bind_PeGeogtran_getGeogcs1_0=Dt.Sa,Qe=_._emscripten_bind_PeGeogtran_getGeogcs2_0=Dt.Ta,to=_._emscripten_bind_PeGeogtran_getParameters_0=Dt.Ua,eo=_._emscripten_bind_PeGeogtran_loadConstants_0=Dt.Va,oo=_._emscripten_bind_PeGeogtran_getCode_0=Dt.Wa,ro=_._emscripten_bind_PeGeogtran_getName_1=Dt.Xa,_o=_._emscripten_bind_PeGeogtran_getType_0=Dt.Ya,po=_._emscripten_bind_PeGTlistExtended_getGTlist_6=Dt.Za,no=_._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=Dt._a,io=_._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=Dt.$a,co=_._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=Dt.ab,ao=_._emscripten_bind_PeGTlistExtendedEntry_Delete_1=Dt.bb,yo=_._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=Dt.cb,so=_._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=Dt.db,Po=_._emscripten_bind_PeHorizon_getNump_0=Dt.eb,go=_._emscripten_bind_PeHorizon_getKind_0=Dt.fb,uo=_._emscripten_bind_PeHorizon_getInclusive_0=Dt.gb,fo=_._emscripten_bind_PeHorizon_getSize_0=Dt.hb,bo=_._emscripten_bind_PeHorizon_getCoord_0=Dt.ib,Eo=_._emscripten_bind_PeInteger_PeInteger_1=Dt.jb,To=_._emscripten_bind_PeInteger_get_val_0=Dt.kb,Oo=_._emscripten_bind_PeInteger_set_val_1=Dt.lb,mo=_._emscripten_bind_PeInteger___destroy___0=Dt.mb,ho=_._emscripten_bind_PeLineType_geodetic_distance_10=Dt.nb,So=_._emscripten_bind_PeLineType_geodetic_coordinate_9=Dt.ob,No=_._emscripten_bind_PeLineType_geodesic_coordinate_8=Dt.pb,lo=_._emscripten_bind_PeLineType_great_elliptic_distance_9=Dt.qb,vo=_._emscripten_bind_PeMath_phi_to_eta_2=Dt.rb,Mo=_._emscripten_bind_PeMath_eta_to_phi_2=Dt.sb,jo=_._emscripten_bind_PeMath_phi_to_phig_2=Dt.tb,Do=_._emscripten_bind_PeMath_q_3=Dt.ub,Ao=_._emscripten_bind_PeMath_q90_2=Dt.vb,Ro=_._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=Dt.wb,Go=_._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=Dt.xb,Co=_._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=Dt.yb,Io=_._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=Dt.zb,Lo=_._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=Dt.Ab,Uo=_._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=Dt.Bb,wo=_._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=Dt.Cb,Fo=_._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=Dt.Db,Yo=_._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=Dt.Eb,Xo=_._emscripten_bind_PeParameter_getValue_0=Dt.Fb,xo=_._emscripten_bind_PeParameter_getCode_0=Dt.Gb,Ho=_._emscripten_bind_PeParameter_getName_1=Dt.Hb,zo=_._emscripten_bind_PeParameter_getType_0=Dt.Ib,Zo=_._emscripten_bind_PePCSInfo_getCentralMeridian_0=Dt.Jb,Wo=_._emscripten_bind_PePCSInfo_getDomainMinx_0=Dt.Kb,Bo=_._emscripten_bind_PePCSInfo_getDomainMiny_0=Dt.Lb,qo=_._emscripten_bind_PePCSInfo_getDomainMaxx_0=Dt.Mb,Ko=_._emscripten_bind_PePCSInfo_getDomainMaxy_0=Dt.Nb,Vo=_._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=Dt.Ob,$o=_._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=Dt.Pb,ko=_._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=Dt.Qb,Jo=_._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=Dt.Rb,Qo=_._emscripten_bind_PePCSInfo_isDensificationNeeded_0=Dt.Sb,tr=_._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=Dt.Tb,er=_._emscripten_bind_PePCSInfo_isPannableRectangle_0=Dt.Ub,or=_._emscripten_bind_PePCSInfo_generate_2=Dt.Vb,rr=_._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=Dt.Wb,_r=_._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=Dt.Xb,pr=_._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=Dt.Yb,nr=_._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=Dt.Zb,ir=_._emscripten_bind_PePrimem_getLongitude_0=Dt._b,cr=_._emscripten_bind_PePrimem_getCode_0=Dt.$b,ar=_._emscripten_bind_PePrimem_getName_1=Dt.ac,yr=_._emscripten_bind_PePrimem_getType_0=Dt.bc,sr=_._emscripten_bind_PeProjcs_Delete_0=Dt.cc,Pr=_._emscripten_bind_PeProjcs_getGeogcs_0=Dt.dc,gr=_._emscripten_bind_PeProjcs_getProjection_0=Dt.ec,ur=_._emscripten_bind_PeProjcs_getParameters_0=Dt.fc,fr=_._emscripten_bind_PeProjcs_getUnit_0=Dt.gc,br=_._emscripten_bind_PeProjcs_loadConstants_0=Dt.hc,Er=_._emscripten_bind_PeProjcs_horizonGcsGenerate_0=Dt.ic,dr=_._emscripten_bind_PeProjcs_horizonPcsGenerate_0=Dt.jc,Tr=_._emscripten_bind_PeProjcs_isEqual_1=Dt.kc,Or=_._emscripten_bind_PeProjcs_getCode_0=Dt.lc,mr=_._emscripten_bind_PeProjcs_getName_1=Dt.mc,hr=_._emscripten_bind_PeProjcs_getType_0=Dt.nc,Sr=_._emscripten_bind_PeSpheroid_getAxis_0=Dt.oc,Nr=_._emscripten_bind_PeSpheroid_getFlattening_0=Dt.pc,lr=_._emscripten_bind_PeSpheroid_getCode_0=Dt.qc,vr=_._emscripten_bind_PeSpheroid_getName_1=Dt.rc,Mr=_._emscripten_bind_PeSpheroid_getType_0=Dt.sc,jr=_._emscripten_bind_PeVersion_version_string_0=Dt.tc;function Dr(){function t(){_.calledRun=!0,h||(l(),e(_))}M>0||M>0?j=Dr:t()}function Ar(){}function Rr(t){return(t||Ar).__cache__}function Gr(t,e){var o=Rr(e),r=o[t];return r||((r=Object.create((e||Ar).prototype)).ptr=t,o[t]=r)}function Cr(t,e){return Gr(t.ptr,e)}function Ir(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete Rr(t.__class__)[t.ptr]}function Lr(t,e){return t.ptr===e.ptr}function Ur(t){return t.ptr}function wr(t){return t.__class__}_._pe_getPeGTlistExtendedEntrySize=Dt.uc,_._pe_getPeGTlistExtendedGTsSize=Dt.vc,_._pe_getPeHorizonSize=Dt.wc,_._pe_geog_to_geog=Dt.xc,_._pe_geog_to_proj=Dt.yc,_._pe_geog_to_dd=Dt.zc,_._pe_dd_to_geog=Dt.Ac,_._pe_geog_to_ddm=Dt.Bc,_._pe_ddm_to_geog=Dt.Cc,_._pe_geog_to_dms=Dt.Dc,_._pe_dms_to_geog=Dt.Ec,_._pe_geog_to_mgrs_extended=Dt.Fc,_._pe_mgrs_to_geog_extended=Dt.Gc,_._pe_geog_to_usng=Dt.Hc,_._pe_usng_to_geog=Dt.Ic,_._pe_geog_to_utm=Dt.Jc,_._pe_utm_to_geog=Dt.Kc,_._pe_object_to_string_ext=Dt.Lc,_._pe_proj_to_geog_center=Dt.Mc,Dr(),Ar.prototype=Object.create(Ar.prototype),Ar.prototype.constructor=Ar,Ar.prototype.__class__=Ar,Ar.__cache__={},_.WrapperObject=Ar,_.getCache=Rr,_.wrapPointer=Gr,_.castObject=Cr,_.NULL=Gr(0),_.destroy=Ir,_.compare=Lr,_.getPointer=Ur,_.getClass=wr;var Fr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare(){if(Fr.needed){for(var t=0;t<Fr.temps.length;t++)_._webidl_free(Fr.temps[t]);Fr.temps.length=0,_._webidl_free(Fr.buffer),Fr.buffer=0,Fr.size+=Fr.needed,Fr.needed=0}Fr.buffer||(Fr.size+=128,Fr.buffer=_._webidl_malloc(Fr.size),S(Fr.buffer)),Fr.pos=0},alloc(t,e){S(Fr.buffer);var o,r=e.BYTES_PER_ELEMENT,p=t.length*r;return p=st(p,8),Fr.pos+p>=Fr.size?(S(p>0),Fr.needed+=p,o=_._webidl_malloc(p),Fr.temps.push(o)):(o=Fr.buffer+Fr.pos,Fr.pos+=p),o},copy(t,e,o){o/=e.BYTES_PER_ELEMENT;for(var r=0;r<t.length;r++)e[o+r]=t[r]}};function Yr(t){if("string"==typeof t){var e=vt(t),o=Fr.alloc(e,P);return Fr.copy(e,P,o),o}return t}function Xr(t){if("object"==typeof t){var e=Fr.alloc(t,P);return Fr.copy(t,P,e),e}return t}function xr(t){if("object"==typeof t){var e=Fr.alloc(t,u);return Fr.copy(t,u,e),e}return t}function Hr(t){if("object"==typeof t){var e=Fr.alloc(t,f);return Fr.copy(t,f,e),e}return t}function zr(t){if("object"==typeof t){var e=Fr.alloc(t,E);return Fr.copy(t,E,e),e}return t}function Zr(t){if("object"==typeof t){var e=Fr.alloc(t,T);return Fr.copy(t,T,e),e}return t}function Wr(){throw"cannot construct a PeObject, no constructor in IDL"}function Br(){throw"cannot construct a PeCoordsys, no constructor in IDL"}function qr(){throw"cannot construct a PeUnit, no constructor in IDL"}function Kr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Vr(){throw"cannot construct a PeAngunit, no constructor in IDL"}function $r(){throw"cannot construct a PeDatum, no constructor in IDL"}function kr(){throw"cannot construct a PeDefs, no constructor in IDL"}function Jr(t){t&&"object"==typeof t&&(t=t.ptr),this.ptr=je(t),Rr(Jr)[this.ptr]=this}function Qr(){throw"cannot construct a PeFactory, no constructor in IDL"}function t_(t,e,o,r,_,p){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),this.ptr=Ue(t,e,o,r,_,p),Rr(t_)[this.ptr]=this}function e_(){throw"cannot construct a PeGeogcs, no constructor in IDL"}function o_(){throw"cannot construct a PeGeogtran, no constructor in IDL"}function r_(){throw"cannot construct a PeGTlistExtended, no constructor in IDL"}function __(){throw"cannot construct a PeGTlistExtendedEntry, no constructor in IDL"}function p_(){throw"cannot construct a PeGTlistExtendedGTs, no constructor in IDL"}function n_(){throw"cannot construct a PeHorizon, no constructor in IDL"}function i_(t){t&&"object"==typeof t&&(t=t.ptr),this.ptr=Eo(t),Rr(i_)[this.ptr]=this}function c_(){throw"cannot construct a PeLineType, no constructor in IDL"}function a_(){throw"cannot construct a PeMath, no constructor in IDL"}function y_(){throw"cannot construct a PeNotationMgrs, no constructor in IDL"}function s_(){throw"cannot construct a PeNotationUtm, no constructor in IDL"}function P_(){throw"cannot construct a PeParameter, no constructor in IDL"}function g_(){throw"cannot construct a PePCSInfo, no constructor in IDL"}function u_(){throw"cannot construct a PePrimem, no constructor in IDL"}function f_(){throw"cannot construct a PeProjcs, no constructor in IDL"}function b_(){throw"cannot construct a PeSpheroid, no constructor in IDL"}function E_(){throw"cannot construct a PeVersion, no constructor in IDL"}return Wr.prototype=Object.create(Ar.prototype),Wr.prototype.constructor=Wr,Wr.prototype.__class__=Wr,Wr.__cache__={},_.PeObject=Wr,Wr.prototype.getCode=Wr.prototype.getCode=function(){var t=this.ptr;return At(t)},Wr.prototype.getName=Wr.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(Rt(e,t))},Wr.prototype.getType=Wr.prototype.getType=function(){var t=this.ptr;return Gt(t)},Br.prototype=Object.create(Wr.prototype),Br.prototype.constructor=Br,Br.prototype.__class__=Br,Br.__cache__={},_.PeCoordsys=Br,Br.prototype.isEqual=Br.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!Ct(e,t)},Br.prototype.getCode=Br.prototype.getCode=function(){var t=this.ptr;return It(t)},Br.prototype.getName=Br.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(Lt(e,t))},Br.prototype.getType=Br.prototype.getType=function(){var t=this.ptr;return Ut(t)},qr.prototype=Object.create(Wr.prototype),qr.prototype.constructor=qr,qr.prototype.__class__=qr,qr.__cache__={},_.PeUnit=qr,qr.prototype.getUnitFactor=qr.prototype.getUnitFactor=function(){var t=this.ptr;return wt(t)},qr.prototype.getCode=qr.prototype.getCode=function(){var t=this.ptr;return Ft(t)},qr.prototype.getName=qr.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(Yt(e,t))},qr.prototype.getType=qr.prototype.getType=function(){var t=this.ptr;return Xt(t)},Kr.prototype=Object.create(Ar.prototype),Kr.prototype.constructor=Kr,Kr.prototype.__class__=Kr,Kr.__cache__={},_.VoidPtr=Kr,Kr.prototype.__destroy__=Kr.prototype.__destroy__=function(){var t=this.ptr;xt(t)},Vr.prototype=Object.create(qr.prototype),Vr.prototype.constructor=Vr,Vr.prototype.__class__=Vr,Vr.__cache__={},_.PeAngunit=Vr,Vr.prototype.getCode=Vr.prototype.getCode=function(){var t=this.ptr;return Ht(t)},Vr.prototype.getName=Vr.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(zt(e,t))},Vr.prototype.getType=Vr.prototype.getType=function(){var t=this.ptr;return Zt(t)},Vr.prototype.getUnitFactor=Vr.prototype.getUnitFactor=function(){var t=this.ptr;return Wt(t)},$r.prototype=Object.create(Wr.prototype),$r.prototype.constructor=$r,$r.prototype.__class__=$r,$r.__cache__={},_.PeDatum=$r,$r.prototype.getSpheroid=$r.prototype.getSpheroid=function(){var t=this.ptr;return Gr(Bt(t),b_)},$r.prototype.getCode=$r.prototype.getCode=function(){var t=this.ptr;return qt(t)},$r.prototype.getName=$r.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(Kt(e,t))},$r.prototype.getType=$r.prototype.getType=function(){var t=this.ptr;return Vt(t)},kr.prototype=Object.create(Ar.prototype),kr.prototype.constructor=kr,kr.prototype.__class__=kr,kr.__cache__={},_.PeDefs=kr,kr.prototype.get_PE_BUFFER_MAX=kr.prototype.get_PE_BUFFER_MAX=function(){var t=this.ptr;return $t(t)},Object.defineProperty(kr.prototype,"PE_BUFFER_MAX",{get:kr.prototype.get_PE_BUFFER_MAX}),kr.prototype.get_PE_NAME_MAX=kr.prototype.get_PE_NAME_MAX=function(){var t=this.ptr;return kt(t)},Object.defineProperty(kr.prototype,"PE_NAME_MAX",{get:kr.prototype.get_PE_NAME_MAX}),kr.prototype.get_PE_MGRS_MAX=kr.prototype.get_PE_MGRS_MAX=function(){var t=this.ptr;return Jt(t)},Object.defineProperty(kr.prototype,"PE_MGRS_MAX",{get:kr.prototype.get_PE_MGRS_MAX}),kr.prototype.get_PE_USNG_MAX=kr.prototype.get_PE_USNG_MAX=function(){var t=this.ptr;return Qt(t)},Object.defineProperty(kr.prototype,"PE_USNG_MAX",{get:kr.prototype.get_PE_USNG_MAX}),kr.prototype.get_PE_DD_MAX=kr.prototype.get_PE_DD_MAX=function(){var t=this.ptr;return te(t)},Object.defineProperty(kr.prototype,"PE_DD_MAX",{get:kr.prototype.get_PE_DD_MAX}),kr.prototype.get_PE_DMS_MAX=kr.prototype.get_PE_DMS_MAX=function(){var t=this.ptr;return ee(t)},Object.defineProperty(kr.prototype,"PE_DMS_MAX",{get:kr.prototype.get_PE_DMS_MAX}),kr.prototype.get_PE_DDM_MAX=kr.prototype.get_PE_DDM_MAX=function(){var t=this.ptr;return oe(t)},Object.defineProperty(kr.prototype,"PE_DDM_MAX",{get:kr.prototype.get_PE_DDM_MAX}),kr.prototype.get_PE_UTM_MAX=kr.prototype.get_PE_UTM_MAX=function(){var t=this.ptr;return re(t)},Object.defineProperty(kr.prototype,"PE_UTM_MAX",{get:kr.prototype.get_PE_UTM_MAX}),kr.prototype.get_PE_PARM_MAX=kr.prototype.get_PE_PARM_MAX=function(){var t=this.ptr;return _e(t)},Object.defineProperty(kr.prototype,"PE_PARM_MAX",{get:kr.prototype.get_PE_PARM_MAX}),kr.prototype.get_PE_TYPE_NONE=kr.prototype.get_PE_TYPE_NONE=function(){var t=this.ptr;return pe(t)},Object.defineProperty(kr.prototype,"PE_TYPE_NONE",{get:kr.prototype.get_PE_TYPE_NONE}),kr.prototype.get_PE_TYPE_GEOGCS=kr.prototype.get_PE_TYPE_GEOGCS=function(){var t=this.ptr;return ne(t)},Object.defineProperty(kr.prototype,"PE_TYPE_GEOGCS",{get:kr.prototype.get_PE_TYPE_GEOGCS}),kr.prototype.get_PE_TYPE_PROJCS=kr.prototype.get_PE_TYPE_PROJCS=function(){var t=this.ptr;return ie(t)},Object.defineProperty(kr.prototype,"PE_TYPE_PROJCS",{get:kr.prototype.get_PE_TYPE_PROJCS}),kr.prototype.get_PE_TYPE_GEOGTRAN=kr.prototype.get_PE_TYPE_GEOGTRAN=function(){var t=this.ptr;return ce(t)},Object.defineProperty(kr.prototype,"PE_TYPE_GEOGTRAN",{get:kr.prototype.get_PE_TYPE_GEOGTRAN}),kr.prototype.get_PE_TYPE_COORDSYS=kr.prototype.get_PE_TYPE_COORDSYS=function(){var t=this.ptr;return ae(t)},Object.defineProperty(kr.prototype,"PE_TYPE_COORDSYS",{get:kr.prototype.get_PE_TYPE_COORDSYS}),kr.prototype.get_PE_TYPE_UNIT=kr.prototype.get_PE_TYPE_UNIT=function(){var t=this.ptr;return ye(t)},Object.defineProperty(kr.prototype,"PE_TYPE_UNIT",{get:kr.prototype.get_PE_TYPE_UNIT}),kr.prototype.get_PE_TYPE_LINUNIT=kr.prototype.get_PE_TYPE_LINUNIT=function(){var t=this.ptr;return se(t)},Object.defineProperty(kr.prototype,"PE_TYPE_LINUNIT",{get:kr.prototype.get_PE_TYPE_LINUNIT}),kr.prototype.get_PE_STR_OPTS_NONE=kr.prototype.get_PE_STR_OPTS_NONE=function(){var t=this.ptr;return Pe(t)},Object.defineProperty(kr.prototype,"PE_STR_OPTS_NONE",{get:kr.prototype.get_PE_STR_OPTS_NONE}),kr.prototype.get_PE_STR_AUTH_NONE=kr.prototype.get_PE_STR_AUTH_NONE=function(){var t=this.ptr;return ge(t)},Object.defineProperty(kr.prototype,"PE_STR_AUTH_NONE",{get:kr.prototype.get_PE_STR_AUTH_NONE}),kr.prototype.get_PE_STR_AUTH_TOP=kr.prototype.get_PE_STR_AUTH_TOP=function(){var t=this.ptr;return ue(t)},Object.defineProperty(kr.prototype,"PE_STR_AUTH_TOP",{get:kr.prototype.get_PE_STR_AUTH_TOP}),kr.prototype.get_PE_STR_NAME_CANON=kr.prototype.get_PE_STR_NAME_CANON=function(){var t=this.ptr;return fe(t)},Object.defineProperty(kr.prototype,"PE_STR_NAME_CANON",{get:kr.prototype.get_PE_STR_NAME_CANON}),kr.prototype.get_PE_STR_FMT_WKT=kr.prototype.get_PE_STR_FMT_WKT=function(){var t=this.ptr;return be(t)},Object.defineProperty(kr.prototype,"PE_STR_FMT_WKT",{get:kr.prototype.get_PE_STR_FMT_WKT}),kr.prototype.get_PE_STR_FMT_WKT2=kr.prototype.get_PE_STR_FMT_WKT2=function(){var t=this.ptr;return Ee(t)},Object.defineProperty(kr.prototype,"PE_STR_FMT_WKT2",{get:kr.prototype.get_PE_STR_FMT_WKT2}),kr.prototype.get_PE_PARM_X0=kr.prototype.get_PE_PARM_X0=function(){var t=this.ptr;return de(t)},Object.defineProperty(kr.prototype,"PE_PARM_X0",{get:kr.prototype.get_PE_PARM_X0}),kr.prototype.get_PE_PARM_ND=kr.prototype.get_PE_PARM_ND=function(){var t=this.ptr;return Te(t)},Object.defineProperty(kr.prototype,"PE_PARM_ND",{get:kr.prototype.get_PE_PARM_ND}),kr.prototype.get_PE_TRANSFORM_1_TO_2=kr.prototype.get_PE_TRANSFORM_1_TO_2=function(){var t=this.ptr;return Oe(t)},Object.defineProperty(kr.prototype,"PE_TRANSFORM_1_TO_2",{get:kr.prototype.get_PE_TRANSFORM_1_TO_2}),kr.prototype.get_PE_TRANSFORM_2_TO_1=kr.prototype.get_PE_TRANSFORM_2_TO_1=function(){var t=this.ptr;return me(t)},Object.defineProperty(kr.prototype,"PE_TRANSFORM_2_TO_1",{get:kr.prototype.get_PE_TRANSFORM_2_TO_1}),kr.prototype.get_PE_TRANSFORM_P_TO_G=kr.prototype.get_PE_TRANSFORM_P_TO_G=function(){var t=this.ptr;return he(t)},Object.defineProperty(kr.prototype,"PE_TRANSFORM_P_TO_G",{get:kr.prototype.get_PE_TRANSFORM_P_TO_G}),kr.prototype.get_PE_TRANSFORM_G_TO_P=kr.prototype.get_PE_TRANSFORM_G_TO_P=function(){var t=this.ptr;return Se(t)},Object.defineProperty(kr.prototype,"PE_TRANSFORM_G_TO_P",{get:kr.prototype.get_PE_TRANSFORM_G_TO_P}),kr.prototype.get_PE_HORIZON_RECT=kr.prototype.get_PE_HORIZON_RECT=function(){var t=this.ptr;return Ne(t)},Object.defineProperty(kr.prototype,"PE_HORIZON_RECT",{get:kr.prototype.get_PE_HORIZON_RECT}),kr.prototype.get_PE_HORIZON_POLY=kr.prototype.get_PE_HORIZON_POLY=function(){var t=this.ptr;return le(t)},Object.defineProperty(kr.prototype,"PE_HORIZON_POLY",{get:kr.prototype.get_PE_HORIZON_POLY}),kr.prototype.get_PE_HORIZON_LINE=kr.prototype.get_PE_HORIZON_LINE=function(){var t=this.ptr;return ve(t)},Object.defineProperty(kr.prototype,"PE_HORIZON_LINE",{get:kr.prototype.get_PE_HORIZON_LINE}),kr.prototype.get_PE_HORIZON_DELTA=kr.prototype.get_PE_HORIZON_DELTA=function(){var t=this.ptr;return Me(t)},Object.defineProperty(kr.prototype,"PE_HORIZON_DELTA",{get:kr.prototype.get_PE_HORIZON_DELTA}),Jr.prototype=Object.create(Ar.prototype),Jr.prototype.constructor=Jr,Jr.prototype.__class__=Jr,Jr.__cache__={},_.PeDouble=Jr,Jr.prototype.get_val=Jr.prototype.get_val=function(){var t=this.ptr;return De(t)},Jr.prototype.set_val=Jr.prototype.set_val=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ae(e,t)},Object.defineProperty(Jr.prototype,"val",{get:Jr.prototype.get_val,set:Jr.prototype.set_val}),Jr.prototype.__destroy__=Jr.prototype.__destroy__=function(){var t=this.ptr;Re(t)},Qr.prototype=Object.create(Ar.prototype),Qr.prototype.constructor=Qr,Qr.prototype.__class__=Qr,Qr.__cache__={},_.PeFactory=Qr,Qr.prototype.initialize=Qr.prototype.initialize=function(t){Fr.prepare(),t=t&&"object"==typeof t?t.ptr:Yr(t),Ge(t)},Qr.prototype.factoryByType=Qr.prototype.factoryByType=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Gr(Ce(t,e),Wr)},Qr.prototype.fromString=Qr.prototype.fromString=function(t,e){return Fr.prepare(),t&&"object"==typeof t&&(t=t.ptr),e=e&&"object"==typeof e?e.ptr:Yr(e),Gr(Ie(t,e),Wr)},Qr.prototype.getCode=Qr.prototype.getCode=function(t){return t&&"object"==typeof t&&(t=t.ptr),Le(t)},t_.prototype=Object.create(Ar.prototype),t_.prototype.constructor=t_,t_.prototype.__class__=t_,t_.__cache__={},_.PeGCSExtent=t_,t_.prototype.getLLon=t_.prototype.getLLon=function(){var t=this.ptr;return we(t)},t_.prototype.getSLat=t_.prototype.getSLat=function(){var t=this.ptr;return Fe(t)},t_.prototype.getRLon=t_.prototype.getRLon=function(){var t=this.ptr;return Ye(t)},t_.prototype.getNLat=t_.prototype.getNLat=function(){var t=this.ptr;return Xe(t)},t_.prototype.__destroy__=t_.prototype.__destroy__=function(){var t=this.ptr;xe(t)},e_.prototype=Object.create(Br.prototype),e_.prototype.constructor=e_,e_.prototype.__class__=e_,e_.__cache__={},_.PeGeogcs=e_,e_.prototype.Delete=e_.prototype.Delete=function(){var t=this.ptr;He(t)},e_.prototype.cloneAlterUnits=e_.prototype.cloneAlterUnits=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Gr(ze(e,t),e_)},e_.prototype.getDatum=e_.prototype.getDatum=function(){var t=this.ptr;return Gr(Ze(t),$r)},e_.prototype.getPrimem=e_.prototype.getPrimem=function(){var t=this.ptr;return Gr(We(t),u_)},e_.prototype.getUnit=e_.prototype.getUnit=function(){var t=this.ptr;return Gr(Be(t),Vr)},e_.prototype.isEqual=e_.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!qe(e,t)},e_.prototype.getCode=e_.prototype.getCode=function(){var t=this.ptr;return Ke(t)},e_.prototype.getName=e_.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(Ve(e,t))},e_.prototype.getType=e_.prototype.getType=function(){var t=this.ptr;return $e(t)},o_.prototype=Object.create(Wr.prototype),o_.prototype.constructor=o_,o_.prototype.__class__=o_,o_.__cache__={},_.PeGeogtran=o_,o_.prototype.isEqual=o_.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!ke(e,t)},o_.prototype.getGeogcs1=o_.prototype.getGeogcs1=function(){var t=this.ptr;return Gr(Je(t),e_)},o_.prototype.getGeogcs2=o_.prototype.getGeogcs2=function(){var t=this.ptr;return Gr(Qe(t),e_)},o_.prototype.getParameters=o_.prototype.getParameters=function(){var t=this.ptr;return to(t)},o_.prototype.loadConstants=o_.prototype.loadConstants=function(){var t=this.ptr;return!!eo(t)},o_.prototype.getCode=o_.prototype.getCode=function(){var t=this.ptr;return oo(t)},o_.prototype.getName=o_.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(ro(e,t))},o_.prototype.getType=o_.prototype.getType=function(){var t=this.ptr;return _o(t)},r_.prototype=Object.create(Ar.prototype),r_.prototype.constructor=r_,r_.prototype.__class__=r_,r_.__cache__={},_.PeGTlistExtended=r_,r_.prototype.getGTlist=r_.prototype.getGTlist=function(t,e,o,r,_,p){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),Gr(po(t,e,o,r,_,p),__)},r_.prototype.get_PE_GTLIST_OPTS_COMMON=r_.prototype.get_PE_GTLIST_OPTS_COMMON=function(){var t=this.ptr;return no(t)},Object.defineProperty(r_.prototype,"PE_GTLIST_OPTS_COMMON",{get:r_.prototype.get_PE_GTLIST_OPTS_COMMON}),__.prototype=Object.create(Ar.prototype),__.prototype.constructor=__,__.prototype.__class__=__,__.__cache__={},_.PeGTlistExtendedEntry=__,__.prototype.getEntries=__.prototype.getEntries=function(){var t=this.ptr;return Gr(io(t),p_)},__.prototype.getSteps=__.prototype.getSteps=function(){var t=this.ptr;return co(t)},__.prototype.Delete=__.prototype.Delete=function(t){t&&"object"==typeof t&&(t=t.ptr),ao(t)},p_.prototype=Object.create(Ar.prototype),p_.prototype.constructor=p_,p_.prototype.__class__=p_,p_.__cache__={},_.PeGTlistExtendedGTs=p_,p_.prototype.getDirection=p_.prototype.getDirection=function(){var t=this.ptr;return yo(t)},p_.prototype.getGeogtran=p_.prototype.getGeogtran=function(){var t=this.ptr;return Gr(so(t),o_)},n_.prototype=Object.create(Ar.prototype),n_.prototype.constructor=n_,n_.prototype.__class__=n_,n_.__cache__={},_.PeHorizon=n_,n_.prototype.getNump=n_.prototype.getNump=function(){var t=this.ptr;return Po(t)},n_.prototype.getKind=n_.prototype.getKind=function(){var t=this.ptr;return go(t)},n_.prototype.getInclusive=n_.prototype.getInclusive=function(){var t=this.ptr;return uo(t)},n_.prototype.getSize=n_.prototype.getSize=function(){var t=this.ptr;return fo(t)},n_.prototype.getCoord=n_.prototype.getCoord=function(){var t=this.ptr;return bo(t)},i_.prototype=Object.create(Ar.prototype),i_.prototype.constructor=i_,i_.prototype.__class__=i_,i_.__cache__={},_.PeInteger=i_,i_.prototype.get_val=i_.prototype.get_val=function(){var t=this.ptr;return To(t)},i_.prototype.set_val=i_.prototype.set_val=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Oo(e,t)},Object.defineProperty(i_.prototype,"val",{get:i_.prototype.get_val,set:i_.prototype.set_val}),i_.prototype.__destroy__=i_.prototype.__destroy__=function(){var t=this.ptr;mo(t)},c_.prototype=Object.create(Ar.prototype),c_.prototype.constructor=c_,c_.prototype.__class__=c_,c_.__cache__={},_.PeLineType=c_,c_.prototype.geodetic_distance=c_.prototype.geodetic_distance=function(t,e,o,r,_,p,n,i,c,a){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),a&&"object"==typeof a&&(a=a.ptr),ho(t,e,o,r,_,p,n,i,c,a)},c_.prototype.geodetic_coordinate=c_.prototype.geodetic_coordinate=function(t,e,o,r,_,p,n,i,c){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),So(t,e,o,r,_,p,n,i,c)},c_.prototype.geodesic_coordinate=c_.prototype.geodesic_coordinate=function(t,e,o,r,_,p,n,i){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),No(t,e,o,r,_,p,n,i)},c_.prototype.great_elliptic_distance=c_.prototype.great_elliptic_distance=function(t,e,o,r,_,p,n,i,c){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),lo(t,e,o,r,_,p,n,i,c)},a_.prototype=Object.create(Ar.prototype),a_.prototype.constructor=a_,a_.prototype.__class__=a_,a_.__cache__={},_.PeMath=a_,a_.prototype.phi_to_eta=a_.prototype.phi_to_eta=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),vo(t,e)},a_.prototype.eta_to_phi=a_.prototype.eta_to_phi=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Mo(t,e)},a_.prototype.phi_to_phig=a_.prototype.phi_to_phig=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),jo(t,e)},a_.prototype.q=a_.prototype.q=function(t,e,o){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),Do(t,e,o)},a_.prototype.q90=a_.prototype.q90=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Ao(t,e)},y_.prototype=Object.create(Ar.prototype),y_.prototype.constructor=y_,y_.prototype.__class__=y_,y_.__cache__={},_.PeNotationMgrs=y_,y_.prototype.get_PE_MGRS_STYLE_NEW=y_.prototype.get_PE_MGRS_STYLE_NEW=function(){var t=this.ptr;return Ro(t)},Object.defineProperty(y_.prototype,"PE_MGRS_STYLE_NEW",{get:y_.prototype.get_PE_MGRS_STYLE_NEW}),y_.prototype.get_PE_MGRS_STYLE_OLD=y_.prototype.get_PE_MGRS_STYLE_OLD=function(){var t=this.ptr;return Go(t)},Object.defineProperty(y_.prototype,"PE_MGRS_STYLE_OLD",{get:y_.prototype.get_PE_MGRS_STYLE_OLD}),y_.prototype.get_PE_MGRS_STYLE_AUTO=y_.prototype.get_PE_MGRS_STYLE_AUTO=function(){var t=this.ptr;return Co(t)},Object.defineProperty(y_.prototype,"PE_MGRS_STYLE_AUTO",{get:y_.prototype.get_PE_MGRS_STYLE_AUTO}),y_.prototype.get_PE_MGRS_180_ZONE_1_PLUS=y_.prototype.get_PE_MGRS_180_ZONE_1_PLUS=function(){var t=this.ptr;return Io(t)},Object.defineProperty(y_.prototype,"PE_MGRS_180_ZONE_1_PLUS",{get:y_.prototype.get_PE_MGRS_180_ZONE_1_PLUS}),y_.prototype.get_PE_MGRS_ADD_SPACES=y_.prototype.get_PE_MGRS_ADD_SPACES=function(){var t=this.ptr;return Lo(t)},Object.defineProperty(y_.prototype,"PE_MGRS_ADD_SPACES",{get:y_.prototype.get_PE_MGRS_ADD_SPACES}),s_.prototype=Object.create(Ar.prototype),s_.prototype.constructor=s_,s_.prototype.__class__=s_,s_.__cache__={},_.PeNotationUtm=s_,s_.prototype.get_PE_UTM_OPTS_NONE=s_.prototype.get_PE_UTM_OPTS_NONE=function(){var t=this.ptr;return Uo(t)},Object.defineProperty(s_.prototype,"PE_UTM_OPTS_NONE",{get:s_.prototype.get_PE_UTM_OPTS_NONE}),s_.prototype.get_PE_UTM_OPTS_NS=s_.prototype.get_PE_UTM_OPTS_NS=function(){var t=this.ptr;return wo(t)},Object.defineProperty(s_.prototype,"PE_UTM_OPTS_NS",{get:s_.prototype.get_PE_UTM_OPTS_NS}),s_.prototype.get_PE_UTM_OPTS_NS_STRICT=s_.prototype.get_PE_UTM_OPTS_NS_STRICT=function(){var t=this.ptr;return Fo(t)},Object.defineProperty(s_.prototype,"PE_UTM_OPTS_NS_STRICT",{get:s_.prototype.get_PE_UTM_OPTS_NS_STRICT}),s_.prototype.get_PE_UTM_OPTS_ADD_SPACES=s_.prototype.get_PE_UTM_OPTS_ADD_SPACES=function(){var t=this.ptr;return Yo(t)},Object.defineProperty(s_.prototype,"PE_UTM_OPTS_ADD_SPACES",{get:s_.prototype.get_PE_UTM_OPTS_ADD_SPACES}),P_.prototype=Object.create(Wr.prototype),P_.prototype.constructor=P_,P_.prototype.__class__=P_,P_.__cache__={},_.PeParameter=P_,P_.prototype.getValue=P_.prototype.getValue=function(){var t=this.ptr;return Xo(t)},P_.prototype.getCode=P_.prototype.getCode=function(){var t=this.ptr;return xo(t)},P_.prototype.getName=P_.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(Ho(e,t))},P_.prototype.getType=P_.prototype.getType=function(){var t=this.ptr;return zo(t)},g_.prototype=Object.create(Ar.prototype),g_.prototype.constructor=g_,g_.prototype.__class__=g_,g_.__cache__={},_.PePCSInfo=g_,g_.prototype.getCentralMeridian=g_.prototype.getCentralMeridian=function(){var t=this.ptr;return Zo(t)},g_.prototype.getDomainMinx=g_.prototype.getDomainMinx=function(){var t=this.ptr;return Wo(t)},g_.prototype.getDomainMiny=g_.prototype.getDomainMiny=function(){var t=this.ptr;return Bo(t)},g_.prototype.getDomainMaxx=g_.prototype.getDomainMaxx=function(){var t=this.ptr;return qo(t)},g_.prototype.getDomainMaxy=g_.prototype.getDomainMaxy=function(){var t=this.ptr;return Ko(t)},g_.prototype.getNorthPoleLocation=g_.prototype.getNorthPoleLocation=function(){var t=this.ptr;return Vo(t)},g_.prototype.getNorthPoleGeometry=g_.prototype.getNorthPoleGeometry=function(){var t=this.ptr;return $o(t)},g_.prototype.getSouthPoleLocation=g_.prototype.getSouthPoleLocation=function(){var t=this.ptr;return ko(t)},g_.prototype.getSouthPoleGeometry=g_.prototype.getSouthPoleGeometry=function(){var t=this.ptr;return Jo(t)},g_.prototype.isDensificationNeeded=g_.prototype.isDensificationNeeded=function(){var t=this.ptr;return!!Qo(t)},g_.prototype.isGcsHorizonMultiOverlap=g_.prototype.isGcsHorizonMultiOverlap=function(){var t=this.ptr;return!!tr(t)},g_.prototype.isPannableRectangle=g_.prototype.isPannableRectangle=function(){var t=this.ptr;return!!er(t)},g_.prototype.generate=g_.prototype.generate=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Gr(or(t,e),g_)},g_.prototype.get_PE_PCSINFO_OPTION_NONE=g_.prototype.get_PE_PCSINFO_OPTION_NONE=function(){var t=this.ptr;return rr(t)},Object.defineProperty(g_.prototype,"PE_PCSINFO_OPTION_NONE",{get:g_.prototype.get_PE_PCSINFO_OPTION_NONE}),g_.prototype.get_PE_PCSINFO_OPTION_DOMAIN=g_.prototype.get_PE_PCSINFO_OPTION_DOMAIN=function(){var t=this.ptr;return _r(t)},Object.defineProperty(g_.prototype,"PE_PCSINFO_OPTION_DOMAIN",{get:g_.prototype.get_PE_PCSINFO_OPTION_DOMAIN}),g_.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=g_.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=function(){var t=this.ptr;return pr(t)},Object.defineProperty(g_.prototype,"PE_POLE_OUTSIDE_BOUNDARY",{get:g_.prototype.get_PE_POLE_OUTSIDE_BOUNDARY}),g_.prototype.get_PE_POLE_POINT=g_.prototype.get_PE_POLE_POINT=function(){var t=this.ptr;return nr(t)},Object.defineProperty(g_.prototype,"PE_POLE_POINT",{get:g_.prototype.get_PE_POLE_POINT}),u_.prototype=Object.create(Wr.prototype),u_.prototype.constructor=u_,u_.prototype.__class__=u_,u_.__cache__={},_.PePrimem=u_,u_.prototype.getLongitude=u_.prototype.getLongitude=function(){var t=this.ptr;return ir(t)},u_.prototype.getCode=u_.prototype.getCode=function(){var t=this.ptr;return cr(t)},u_.prototype.getName=u_.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(ar(e,t))},u_.prototype.getType=u_.prototype.getType=function(){var t=this.ptr;return yr(t)},f_.prototype=Object.create(Br.prototype),f_.prototype.constructor=f_,f_.prototype.__class__=f_,f_.__cache__={},_.PeProjcs=f_,f_.prototype.Delete=f_.prototype.Delete=function(){var t=this.ptr;sr(t)},f_.prototype.getGeogcs=f_.prototype.getGeogcs=function(){var t=this.ptr;return Gr(Pr(t),e_)},f_.prototype.getProjection=f_.prototype.getProjection=function(){var t=this.ptr;return Gr(gr(t),Wr)},f_.prototype.getParameters=f_.prototype.getParameters=function(){var t=this.ptr;return ur(t)},f_.prototype.getUnit=f_.prototype.getUnit=function(){var t=this.ptr;return Gr(fr(t),qr)},f_.prototype.loadConstants=f_.prototype.loadConstants=function(){var t=this.ptr;return!!br(t)},f_.prototype.horizonGcsGenerate=f_.prototype.horizonGcsGenerate=function(){var t=this.ptr;return Gr(Er(t),n_)},f_.prototype.horizonPcsGenerate=f_.prototype.horizonPcsGenerate=function(){var t=this.ptr;return Gr(dr(t),n_)},f_.prototype.isEqual=f_.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!Tr(e,t)},f_.prototype.getCode=f_.prototype.getCode=function(){var t=this.ptr;return Or(t)},f_.prototype.getName=f_.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(mr(e,t))},f_.prototype.getType=f_.prototype.getType=function(){var t=this.ptr;return hr(t)},b_.prototype=Object.create(Wr.prototype),b_.prototype.constructor=b_,b_.prototype.__class__=b_,b_.__cache__={},_.PeSpheroid=b_,b_.prototype.getAxis=b_.prototype.getAxis=function(){var t=this.ptr;return Sr(t)},b_.prototype.getFlattening=b_.prototype.getFlattening=function(){var t=this.ptr;return Nr(t)},b_.prototype.getCode=b_.prototype.getCode=function(){var t=this.ptr;return lr(t)},b_.prototype.getName=b_.prototype.getName=function(t){var e=this.ptr;return Fr.prepare(),"object"==typeof t&&(t=Xr(t)),z(vr(e,t))},b_.prototype.getType=b_.prototype.getType=function(){var t=this.ptr;return Mr(t)},E_.prototype=Object.create(Ar.prototype),E_.prototype.constructor=E_,E_.prototype.__class__=E_,E_.__cache__={},_.PeVersion=E_,E_.prototype.version_string=E_.prototype.version_string=function(){var t=this.ptr;return z(jr(t))},_.ensureCache=Fr,_.ensureString=Yr,_.ensureInt8=Xr,_.ensureInt16=xr,_.ensureInt32=Hr,_.ensureFloat32=zr,_.ensureFloat64=Zr,p};export{t as default};
package/chunks/pe.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{getAssetUrl as e}from"../assets.js";import has from"../core/has.js";let t,o=null;function r(){return!!o}function n(){return!!has("esri-wasm")}function _(){return t||(t=import("./pe-wasm.js").then((e=>e.p)).then((({default:t})=>t({locateFile:t=>e(`esri/geometry/support/${t}`)}))).then((e=>{d(e)})),t)}var P,s;!function(e){function t(e,t,r){o.ensureCache.prepare();const n=D(r),_=r===n,P=o.ensureFloat64(n),s=o._pe_geog_to_proj(o.getPointer(e),t,P);return s&&R(r,t,P,_),s}function r(e,o,r,_){switch(_){case s.PE_TRANSFORM_P_TO_G:return n(e,o,r);case s.PE_TRANSFORM_G_TO_P:return t(e,o,r)}return 0}function n(e,t,o){return _(e,t,o,0)}function _(e,t,r,n){o.ensureCache.prepare();const _=D(r),P=r===_,s=o.ensureFloat64(_),i=o._pe_proj_to_geog_center(o.getPointer(e),t,s,n);return i&&R(r,t,s,P),i}e.geogToProj=t,e.projGeog=r,e.projToGeog=n,e.projToGeogCenter=_}(P||(P={})),function(e){function t(){e.PE_BUFFER_MAX=o.PeDefs.prototype.PE_BUFFER_MAX,e.PE_NAME_MAX=o.PeDefs.prototype.PE_NAME_MAX,e.PE_MGRS_MAX=o.PeDefs.prototype.PE_MGRS_MAX,e.PE_USNG_MAX=o.PeDefs.prototype.PE_USNG_MAX,e.PE_DD_MAX=o.PeDefs.prototype.PE_DD_MAX,e.PE_DDM_MAX=o.PeDefs.prototype.PE_DDM_MAX,e.PE_DMS_MAX=o.PeDefs.prototype.PE_DMS_MAX,e.PE_UTM_MAX=o.PeDefs.prototype.PE_UTM_MAX,e.PE_PARM_MAX=o.PeDefs.prototype.PE_PARM_MAX,e.PE_TYPE_NONE=o.PeDefs.prototype.PE_TYPE_NONE,e.PE_TYPE_GEOGCS=o.PeDefs.prototype.PE_TYPE_GEOGCS,e.PE_TYPE_PROJCS=o.PeDefs.prototype.PE_TYPE_PROJCS,e.PE_TYPE_GEOGTRAN=o.PeDefs.prototype.PE_TYPE_GEOGTRAN,e.PE_TYPE_COORDSYS=o.PeDefs.prototype.PE_TYPE_COORDSYS,e.PE_TYPE_UNIT=o.PeDefs.prototype.PE_TYPE_UNIT,e.PE_TYPE_LINUNIT=o.PeDefs.prototype.PE_TYPE_LINUNIT,e.PE_STR_OPTS_NONE=o.PeDefs.prototype.PE_STR_OPTS_NONE,e.PE_STR_AUTH_NONE=o.PeDefs.prototype.PE_STR_AUTH_NONE,e.PE_STR_AUTH_TOP=o.PeDefs.prototype.PE_STR_AUTH_TOP,e.PE_STR_NAME_CANON=o.PeDefs.prototype.PE_STR_NAME_CANON,e.PE_STR_FMT_WKT=o.PeDefs.prototype.PE_STR_FMT_WKT,e.PE_STR_FMT_WKT2=o.PeDefs.prototype.PE_STR_FMT_WKT2,e.PE_PARM_X0=o.PeDefs.prototype.PE_PARM_X0,e.PE_PARM_ND=o.PeDefs.prototype.PE_PARM_ND,e.PE_TRANSFORM_1_TO_2=o.PeDefs.prototype.PE_TRANSFORM_1_TO_2,e.PE_TRANSFORM_2_TO_1=o.PeDefs.prototype.PE_TRANSFORM_2_TO_1,e.PE_TRANSFORM_P_TO_G=o.PeDefs.prototype.PE_TRANSFORM_P_TO_G,e.PE_TRANSFORM_G_TO_P=o.PeDefs.prototype.PE_TRANSFORM_G_TO_P,e.PE_HORIZON_RECT=o.PeDefs.prototype.PE_HORIZON_RECT,e.PE_HORIZON_POLY=o.PeDefs.prototype.PE_HORIZON_POLY,e.PE_HORIZON_LINE=o.PeDefs.prototype.PE_HORIZON_LINE,e.PE_HORIZON_DELTA=o.PeDefs.prototype.PE_HORIZON_DELTA}e.init=t}(s||(s={}));let i=null;var p;!function(e){const t={},r={},n=e=>{const t=e.getType();switch(t){case s.PE_TYPE_GEOGCS:e=o.castObject(e,o.PeGeogcs);break;case s.PE_TYPE_PROJCS:e=o.castObject(e,o.PeProjcs);break;case s.PE_TYPE_GEOGTRAN:e=o.castObject(e,o.PeGeogtran);break;default:t&s.PE_TYPE_UNIT&&(e=o.castObject(e,o.PeUnit))}return e};function _(){o.PeFactory.prototype.initialize(null)}function P(e){return i(s.PE_TYPE_COORDSYS,e)}function i(e,r){let _=null,P=t[e];if(P||(P={},t[e]=P),P.hasOwnProperty(String(r))&&(_=P[r],o.compare(_,o.NULL)&&(_=null)),!_){const t=o.PeFactory.prototype.factoryByType(e,r);o.compare(t,o.NULL)||(_=n(t),P[r]=_)}return _}function p(e,t){let _=null,P=r[e];if(P||(P={},r[e]=P),P.hasOwnProperty(t)&&(_=P[t],o.compare(_,o.NULL)&&(_=null)),!_){const r=o.PeFactory.prototype.fromString(e,t);o.compare(r,o.NULL)||(_=n(r),P[t]=_)}return _}function u(e){return i(s.PE_TYPE_GEOGCS,e)}function E(e){return i(s.PE_TYPE_GEOGTRAN,e)}function c(e){return o.PeFactory.prototype.getCode(e)}function a(e){return i(s.PE_TYPE_PROJCS,e)}function g(e){return i(s.PE_TYPE_UNIT,e)}e.initialize=_,e.coordsys=P,e.factoryByType=i,e.fromString=p,e.geogcs=u,e.geogtran=E,e.getCode=c,e.projcs=a,e.unit=g}(p||(p={}));let u=null;var E,c,a,g,T,f,l,y,S,O,N;function d(e){function t(e,t,o){e[t]=o(e[t])}o=e,s.init(),E.init(),l.init(),S.init(),O.init(),i=class extends o.PeDouble{constructor(e=NaN){super(e)}destroy(){o.destroy(this)}[Symbol.dispose](){this.destroy()}},u=class extends o.PeGCSExtent{destroy(){o.destroy(this)}[Symbol.dispose](){this.destroy()}};const r=[o.PeAngunit,o.PeDatum,o.PeGeogcs,o.PeGeogtran,o.PeObject,o.PeParameter,o.PePrimem,o.PeProjcs,o.PeSpheroid,o.PeUnit];for(const o of r)t(o.prototype,"getName",(e=>function(){return e.call(this,new Array(s.PE_NAME_MAX))}));for(const P of[o.PeGeogtran,o.PeProjcs])t(P.prototype,"getParameters",(e=>function(){const t=new Array(s.PE_PARM_MAX);let r=e.call(this);for(let e=0;e<t.length;e++){const n=o.getValue(r,"*");t[e]=n?o.wrapPointer(n,o.PeParameter):null,r+=Int32Array.BYTES_PER_ELEMENT}return t}));t(o.PeHorizon.prototype,"getCoord",(e=>function(t=!1){const o=this.getSize();if(!o)return null;const r=[];return R(r,o,e.call(this),t),r})),t(o.PeGTlistExtendedEntry.prototype,"getEntries",(e=>{const t=o._pe_getPeGTlistExtendedGTsSize();return function(){let r=null;const n=e.call(this);if(!o.compare(n,o.NULL)){r=[n];const e=this.getSteps();if(e>1){const _=o.getPointer(n);for(let n=1;n<e;n++)r.push(o.wrapPointer(_+t*n,o.PeGTlistExtendedGTs))}}return r}}));const n=o._pe_getPeHorizonSize(),_=e=>function(){let t=this._cache;if(t||(t=new Map,this._cache=t),t.has(e))return t.get(e);let r=null;const _=e.call(this);if(!o.compare(_,o.NULL)){r=[_];const e=_.getNump();if(e>1){const t=o.getPointer(_);for(let _=1;_<e;_++)r.push(o.wrapPointer(t+n*_,o.PeHorizon))}}return t.set(e,r),r};t(o.PeProjcs.prototype,"horizonGcsGenerate",_),t(o.PeProjcs.prototype,"horizonPcsGenerate",_),o.PeObject.prototype.toString=function(e=s.PE_STR_OPTS_NONE){o.ensureCache.prepare();const t=o.getPointer(this),r=o.ensureInt8(new Array(s.PE_BUFFER_MAX));return o.UTF8ToString(o._pe_object_to_string_ext(t,e,r))},o.PeGeogcs.prototype.destroy=function(){this.Delete(),M(this),this.ptr=0},o.PeGeogcs.prototype[Symbol.dispose]=function(){this.destroy()},o.PeProjcs.prototype.destroy=function(){this.Delete(),M(this),this.ptr=0},o.PeProjcs.prototype[Symbol.dispose]=function(){this.destroy()}}function M(e){if(!e)return;const t=o.getClass(e);if(!t)return;const r=o.getCache(t);if(!r)return;const n=o.getPointer(e);n&&delete r[n]}function A(e,t){const r=[],n=new Array(t);for(let _=0;_<e;_++)r.push(o.ensureInt8(n));return r}function D(e){return ArrayBuffer.isView(e)?e:Array.isArray(e[0])?e.flat():e}function R(e,t,r,n=!1){if(n)for(let _=0;_<2*t;_++)e[_]=o.getValue(r+_*Float64Array.BYTES_PER_ELEMENT,"double");else{const n=0===e.length;for(let _=0;_<t;_++)n&&(e[_]=new Array(2)),e[_][0]=o.getValue(r,"double"),e[_][1]=o.getValue(r+Float64Array.BYTES_PER_ELEMENT,"double"),r+=2*Float64Array.BYTES_PER_ELEMENT}}!function(e){let t;function r(){e.PE_GTLIST_OPTS_COMMON=o.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,t=o._pe_getPeGTlistExtendedEntrySize()}function n(e,r,n,_,P,s){let i=null;const p=new o.PeInteger(s);try{const u=o.PeGTlistExtended.prototype.getGTlist(e,r,n,_,P,p);if((s=p.val)&&(i=[u],s>1)){const e=o.getPointer(u);for(let r=1;r<s;r++)i.push(o.wrapPointer(e+t*r,o.PeGTlistExtendedEntry))}}finally{o.destroy(p)}return i}e.init=r,e.getGTlist=n}(E||(E={})),function(e){function t(e){if(e?.length){for(const t of e)M(t),t.getEntries().forEach((e=>{M(e);const t=e.getGeogtran();M(t),t.getParameters().forEach(M),[t.getGeogcs1(),t.getGeogcs2()].forEach((e=>{M(e);const t=e.getDatum();M(t),M(t.getSpheroid()),M(e.getPrimem()),M(e.getUnit())}))}));o.PeGTlistExtendedEntry.prototype.Delete(e[0])}}e.destroy=t}(c||(c={})),function(e){function t(e,t,r,n,_){o.ensureCache.prepare();const P=D(r),s=r===P,i=o.ensureFloat64(P);let p=0;n&&(p=o.ensureFloat64(n));const u=o._pe_geog_to_geog(o.getPointer(e),t,i,p,_);return u&&R(r,t,i,s),u}e.geogToGeog=t}(a||(a={})),function(e){function t(e,t,r,n,_,P,s,i){o.PeLineType.prototype.geodesic_coordinate(e,t,r,n,_,P,s,i)}function r(e,t,r,n,_,P,s,i,p){o.PeLineType.prototype.geodetic_coordinate(e,t,r,n,_,P,s,i,p)}function n(e,t,r,n,_,P,s,i,p,u){o.PeLineType.prototype.geodetic_distance(e,t,r,n,_,P,s,i,p,u)}function _(e,t,r,n,_,P,s,i,p){o.PeLineType.prototype.great_elliptic_distance(e,t,r,n,_,P,s,i,p)}e.geodesicCoordinate=t,e.geodeticCoordinate=r,e.geodeticDistance=n,e.greatEllipticDistance=_}(g||(g={})),function(e){function t(e,t){return o.PeMath.prototype.phi_to_eta(e,t)}function r(e,t){return o.PeMath.prototype.eta_to_phi(e,t)}function n(e,t){return o.PeMath.prototype.phi_to_phig(e,t)}function _(e,t,r){return o.PeMath.prototype.q(e,t,r)}function P(e,t){return o.PeMath.prototype.q90(e,t)}e.phiToEta=t,e.etaToPhi=r,e.phiToPhig=n,e.q=_,e.q90=P}(T||(T={})),function(e){const t=(e,t,r,n,_,P)=>{let i,p;switch(o.ensureCache.prepare(),e){case"dd":i=o._pe_geog_to_dd,p=s.PE_DD_MAX;break;case"ddm":i=o._pe_geog_to_ddm,p=s.PE_DDM_MAX;break;case"dms":i=o._pe_geog_to_dms,p=s.PE_DMS_MAX}let u=0;t&&(u=o.getPointer(t));const E=D(n),c=o.ensureFloat64(E),a=A(r,p),g=i(u,r,c,_,o.ensureInt32(a));if(g)for(let s=0;s<r;s++)P[s]=o.UTF8ToString(a[s]);return g},r=(e,t,r,n,_)=>{let P;switch(o.ensureCache.prepare(),e){case"dd":P=o._pe_dd_to_geog;break;case"ddm":P=o._pe_ddm_to_geog;break;case"dms":P=o._pe_dms_to_geog}let s=0;t&&(s=o.getPointer(t));const i=n.map((e=>o.ensureString(e))),p=o.ensureInt32(i),u=o.ensureFloat64(new Array(2*r)),E=P(s,r,p,u);return E&&R(_,r,u),E};function n(e,o,r,n,_){return t("dms",e,o,r,n,_)}function _(e,t,o,n){return r("dms",e,t,o,n)}function P(e,o,r,n,_){return t("ddm",e,o,r,n,_)}function i(e,t,o,n){return r("ddm",e,t,o,n)}function p(e,o,r,n,_){return t("dd",e,o,r,n,_)}function u(e,t,o,n){return r("dd",e,t,o,n)}e.geogToDms=n,e.dmsToGeog=_,e.geogToDdm=P,e.ddmToGeog=i,e.geogToDd=p,e.ddToGeog=u}(f||(f={})),function(e){function t(){e.PE_MGRS_STYLE_NEW=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,e.PE_MGRS_STYLE_OLD=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,e.PE_MGRS_STYLE_AUTO=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,e.PE_MGRS_180_ZONE_1_PLUS=o.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,e.PE_MGRS_ADD_SPACES=o.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}function r(e,t,r,n,_,P,i){o.ensureCache.prepare();let p=0;e&&(p=o.getPointer(e));const u=D(r),E=o.ensureFloat64(u),c=A(t,s.PE_MGRS_MAX),a=o.ensureInt32(c),g=o._pe_geog_to_mgrs_extended(p,t,E,n,_,P,a);if(g)for(let s=0;s<t;s++)i[s]=o.UTF8ToString(c[s]);return g}function n(e,t,r,n,_){o.ensureCache.prepare();let P=0;e&&(P=o.getPointer(e));const s=r.map((e=>o.ensureString(e))),i=o.ensureInt32(s),p=o.ensureFloat64(new Array(2*t)),u=o._pe_mgrs_to_geog_extended(P,t,i,n,p);return u&&R(_,t,p),u}e.init=t,e.geogToMgrsExtended=r,e.mgrsToGeogExtended=n}(l||(l={})),function(e){function t(e,t,r,n,_,P,i){o.ensureCache.prepare();let p=0;e&&(p=o.getPointer(e));const u=D(r),E=o.ensureFloat64(u),c=A(t,s.PE_MGRS_MAX),a=o.ensureInt32(c),g=o._pe_geog_to_usng(p,t,E,n,_,P,a);if(g)for(let s=0;s<t;s++)i[s]=o.UTF8ToString(c[s]);return g}function r(e,t,r,n){o.ensureCache.prepare();let _=0;e&&(_=o.getPointer(e));const P=r.map((e=>o.ensureString(e))),s=o.ensureInt32(P),i=o.ensureFloat64(new Array(2*t)),p=o._pe_usng_to_geog(_,t,s,i);return p&&R(n,t,i),p}e.geogToUsng=t,e.usngToGeog=r}(y||(y={})),function(e){function t(){e.PE_UTM_OPTS_NONE=o.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,e.PE_UTM_OPTS_ADD_SPACES=o.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,e.PE_UTM_OPTS_NS=o.PeNotationUtm.prototype.PE_UTM_OPTS_NS}function r(e,t,r,n,_){o.ensureCache.prepare();let P=0;e&&(P=o.getPointer(e));const i=D(r),p=o.ensureFloat64(i),u=A(t,s.PE_UTM_MAX),E=o.ensureInt32(u),c=o._pe_geog_to_utm(P,t,p,n,E);if(c)for(let s=0;s<t;s++)_[s]=o.UTF8ToString(u[s]);return c}function n(e,t,r,n,_){o.ensureCache.prepare();let P=0;e&&(P=o.getPointer(e));const s=r.map((e=>o.ensureString(e))),i=o.ensureInt32(s),p=o.ensureFloat64(new Array(2*t)),u=o._pe_utm_to_geog(P,t,i,n,p);return u&&R(_,t,p),u}e.init=t,e.geogToUtm=r,e.utmToGeog=n}(S||(S={})),function(e){const t=new Map;function r(){e.PE_PCSINFO_OPTION_NONE=o.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,e.PE_PCSINFO_OPTION_DOMAIN=o.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,e.PE_POLE_OUTSIDE_BOUNDARY=o.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,e.PE_POLE_POINT=o.PePCSInfo.prototype.PE_POLE_POINT}function n(r,n=e.PE_PCSINFO_OPTION_DOMAIN){let _=null,P=null;return t.has(r)&&(P=t.get(r),P[n]&&(_=P[n])),_||(_=o.PePCSInfo.prototype.generate(r,n),P||(P=[],t.set(r,P)),P[n]=_),_}e.init=r,e.generate=n}(O||(O={})),function(e){function t(){return o.PeVersion.prototype.version_string()}e.versionString=t}(N||(N={}));const G=Object.freeze(Object.defineProperty({__proto__:null,get PeCSTransformations(){return P},get PeDefs(){return s},get PeDouble(){return i},get PeFactory(){return p},get PeGCSExtent(){return u},get PeGTTransformations(){return a},get PeGTlistExtended(){return E},get PeGTlistExtendedEntry(){return c},get PeLineType(){return g},get PeMath(){return T},get PeNotationDms(){return f},get PeNotationMgrs(){return l},get PeNotationUsng(){return y},get PeNotationUtm(){return S},get PePCSInfo(){return O},get PeVersion(){return N},_init:d,get _pe(){return o},isLoaded:r,isSupported:n,load:_},Symbol.toStringTag,{value:"Module"}));export{p as P,o as _,s as a,n as b,f as c,l as d,y as e,S as f,P as g,a as h,r as i,O as j,i as k,_ as l,u as m,E as n,c as o,G as p,g as q,T as r,N as s,d as t};
5
+ import{getAssetUrl as e}from"../assets.js";import has from"../core/has.js";let t,o=null;function r(){return!!o}function n(){return!!has("esri-wasm")}function _(){return t||(t=import("./pe-wasm.js").then((({default:t})=>t({locateFile:t=>e(`esri/geometry/support/${t}`)}))).then((e=>{d(e)})),t)}var P,s;!function(e){function t(e,t,r){o.ensureCache.prepare();const n=D(r),_=r===n,P=o.ensureFloat64(n),s=o._pe_geog_to_proj(o.getPointer(e),t,P);return s&&R(r,t,P,_),s}function r(e,o,r,_){switch(_){case s.PE_TRANSFORM_P_TO_G:return n(e,o,r);case s.PE_TRANSFORM_G_TO_P:return t(e,o,r)}return 0}function n(e,t,o){return _(e,t,o,0)}function _(e,t,r,n){o.ensureCache.prepare();const _=D(r),P=r===_,s=o.ensureFloat64(_),i=o._pe_proj_to_geog_center(o.getPointer(e),t,s,n);return i&&R(r,t,s,P),i}e.geogToProj=t,e.projGeog=r,e.projToGeog=n,e.projToGeogCenter=_}(P||(P={})),function(e){function t(){e.PE_BUFFER_MAX=o.PeDefs.prototype.PE_BUFFER_MAX,e.PE_NAME_MAX=o.PeDefs.prototype.PE_NAME_MAX,e.PE_MGRS_MAX=o.PeDefs.prototype.PE_MGRS_MAX,e.PE_USNG_MAX=o.PeDefs.prototype.PE_USNG_MAX,e.PE_DD_MAX=o.PeDefs.prototype.PE_DD_MAX,e.PE_DDM_MAX=o.PeDefs.prototype.PE_DDM_MAX,e.PE_DMS_MAX=o.PeDefs.prototype.PE_DMS_MAX,e.PE_UTM_MAX=o.PeDefs.prototype.PE_UTM_MAX,e.PE_PARM_MAX=o.PeDefs.prototype.PE_PARM_MAX,e.PE_TYPE_NONE=o.PeDefs.prototype.PE_TYPE_NONE,e.PE_TYPE_GEOGCS=o.PeDefs.prototype.PE_TYPE_GEOGCS,e.PE_TYPE_PROJCS=o.PeDefs.prototype.PE_TYPE_PROJCS,e.PE_TYPE_GEOGTRAN=o.PeDefs.prototype.PE_TYPE_GEOGTRAN,e.PE_TYPE_COORDSYS=o.PeDefs.prototype.PE_TYPE_COORDSYS,e.PE_TYPE_UNIT=o.PeDefs.prototype.PE_TYPE_UNIT,e.PE_TYPE_LINUNIT=o.PeDefs.prototype.PE_TYPE_LINUNIT,e.PE_STR_OPTS_NONE=o.PeDefs.prototype.PE_STR_OPTS_NONE,e.PE_STR_AUTH_NONE=o.PeDefs.prototype.PE_STR_AUTH_NONE,e.PE_STR_AUTH_TOP=o.PeDefs.prototype.PE_STR_AUTH_TOP,e.PE_STR_NAME_CANON=o.PeDefs.prototype.PE_STR_NAME_CANON,e.PE_STR_FMT_WKT=o.PeDefs.prototype.PE_STR_FMT_WKT,e.PE_STR_FMT_WKT2=o.PeDefs.prototype.PE_STR_FMT_WKT2,e.PE_PARM_X0=o.PeDefs.prototype.PE_PARM_X0,e.PE_PARM_ND=o.PeDefs.prototype.PE_PARM_ND,e.PE_TRANSFORM_1_TO_2=o.PeDefs.prototype.PE_TRANSFORM_1_TO_2,e.PE_TRANSFORM_2_TO_1=o.PeDefs.prototype.PE_TRANSFORM_2_TO_1,e.PE_TRANSFORM_P_TO_G=o.PeDefs.prototype.PE_TRANSFORM_P_TO_G,e.PE_TRANSFORM_G_TO_P=o.PeDefs.prototype.PE_TRANSFORM_G_TO_P,e.PE_HORIZON_RECT=o.PeDefs.prototype.PE_HORIZON_RECT,e.PE_HORIZON_POLY=o.PeDefs.prototype.PE_HORIZON_POLY,e.PE_HORIZON_LINE=o.PeDefs.prototype.PE_HORIZON_LINE,e.PE_HORIZON_DELTA=o.PeDefs.prototype.PE_HORIZON_DELTA}e.init=t}(s||(s={}));let i=null;var p;!function(e){const t={},r={},n=e=>{const t=e.getType();switch(t){case s.PE_TYPE_GEOGCS:e=o.castObject(e,o.PeGeogcs);break;case s.PE_TYPE_PROJCS:e=o.castObject(e,o.PeProjcs);break;case s.PE_TYPE_GEOGTRAN:e=o.castObject(e,o.PeGeogtran);break;default:t&s.PE_TYPE_UNIT&&(e=o.castObject(e,o.PeUnit))}return e};function _(){o.PeFactory.prototype.initialize(null)}function P(e){return i(s.PE_TYPE_COORDSYS,e)}function i(e,r){let _=null,P=t[e];if(P||(P={},t[e]=P),P.hasOwnProperty(String(r))&&(_=P[r],o.compare(_,o.NULL)&&(_=null)),!_){const t=o.PeFactory.prototype.factoryByType(e,r);o.compare(t,o.NULL)||(_=n(t),P[r]=_)}return _}function p(e,t){let _=null,P=r[e];if(P||(P={},r[e]=P),P.hasOwnProperty(t)&&(_=P[t],o.compare(_,o.NULL)&&(_=null)),!_){const r=o.PeFactory.prototype.fromString(e,t);o.compare(r,o.NULL)||(_=n(r),P[t]=_)}return _}function u(e){return i(s.PE_TYPE_GEOGCS,e)}function E(e){return i(s.PE_TYPE_GEOGTRAN,e)}function c(e){return o.PeFactory.prototype.getCode(e)}function a(e){return i(s.PE_TYPE_PROJCS,e)}function g(e){return i(s.PE_TYPE_UNIT,e)}e.initialize=_,e.coordsys=P,e.factoryByType=i,e.fromString=p,e.geogcs=u,e.geogtran=E,e.getCode=c,e.projcs=a,e.unit=g}(p||(p={}));let u=null;var E,c,a,g,T,f,l,y,S,O,N;function d(e){function t(e,t,o){e[t]=o(e[t])}o=e,s.init(),E.init(),l.init(),S.init(),O.init(),i=class extends o.PeDouble{constructor(e=NaN){super(e)}destroy(){o.destroy(this)}[Symbol.dispose](){this.destroy()}},u=class extends o.PeGCSExtent{destroy(){o.destroy(this)}[Symbol.dispose](){this.destroy()}};const r=[o.PeAngunit,o.PeDatum,o.PeGeogcs,o.PeGeogtran,o.PeObject,o.PeParameter,o.PePrimem,o.PeProjcs,o.PeSpheroid,o.PeUnit];for(const o of r)t(o.prototype,"getName",(e=>function(){return e.call(this,new Array(s.PE_NAME_MAX))}));for(const P of[o.PeGeogtran,o.PeProjcs])t(P.prototype,"getParameters",(e=>function(){const t=new Array(s.PE_PARM_MAX);let r=e.call(this);for(let e=0;e<t.length;e++){const n=o.getValue(r,"*");t[e]=n?o.wrapPointer(n,o.PeParameter):null,r+=Int32Array.BYTES_PER_ELEMENT}return t}));t(o.PeHorizon.prototype,"getCoord",(e=>function(t=!1){const o=this.getSize();if(!o)return null;const r=[];return R(r,o,e.call(this),t),r})),t(o.PeGTlistExtendedEntry.prototype,"getEntries",(e=>{const t=o._pe_getPeGTlistExtendedGTsSize();return function(){let r=null;const n=e.call(this);if(!o.compare(n,o.NULL)){r=[n];const e=this.getSteps();if(e>1){const _=o.getPointer(n);for(let n=1;n<e;n++)r.push(o.wrapPointer(_+t*n,o.PeGTlistExtendedGTs))}}return r}}));const n=o._pe_getPeHorizonSize(),_=e=>function(){let t=this._cache;if(t||(t=new Map,this._cache=t),t.has(e))return t.get(e);let r=null;const _=e.call(this);if(!o.compare(_,o.NULL)){r=[_];const e=_.getNump();if(e>1){const t=o.getPointer(_);for(let _=1;_<e;_++)r.push(o.wrapPointer(t+n*_,o.PeHorizon))}}return t.set(e,r),r};t(o.PeProjcs.prototype,"horizonGcsGenerate",_),t(o.PeProjcs.prototype,"horizonPcsGenerate",_),o.PeObject.prototype.toString=function(e=s.PE_STR_OPTS_NONE){o.ensureCache.prepare();const t=o.getPointer(this),r=o.ensureInt8(new Array(s.PE_BUFFER_MAX));return o.UTF8ToString(o._pe_object_to_string_ext(t,e,r))},o.PeGeogcs.prototype.destroy=function(){this.Delete(),M(this),this.ptr=0},o.PeGeogcs.prototype[Symbol.dispose]=function(){this.destroy()},o.PeProjcs.prototype.destroy=function(){this.Delete(),M(this),this.ptr=0},o.PeProjcs.prototype[Symbol.dispose]=function(){this.destroy()}}function M(e){if(!e)return;const t=o.getClass(e);if(!t)return;const r=o.getCache(t);if(!r)return;const n=o.getPointer(e);n&&delete r[n]}function A(e,t){const r=[],n=new Array(t);for(let _=0;_<e;_++)r.push(o.ensureInt8(n));return r}function D(e){return ArrayBuffer.isView(e)?e:Array.isArray(e[0])?e.flat():e}function R(e,t,r,n=!1){if(n)for(let _=0;_<2*t;_++)e[_]=o.getValue(r+_*Float64Array.BYTES_PER_ELEMENT,"double");else{const n=0===e.length;for(let _=0;_<t;_++)n&&(e[_]=new Array(2)),e[_][0]=o.getValue(r,"double"),e[_][1]=o.getValue(r+Float64Array.BYTES_PER_ELEMENT,"double"),r+=2*Float64Array.BYTES_PER_ELEMENT}}!function(e){let t;function r(){e.PE_GTLIST_OPTS_COMMON=o.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,t=o._pe_getPeGTlistExtendedEntrySize()}function n(e,r,n,_,P,s){let i=null;const p=new o.PeInteger(s);try{const u=o.PeGTlistExtended.prototype.getGTlist(e,r,n,_,P,p);if((s=p.val)&&(i=[u],s>1)){const e=o.getPointer(u);for(let r=1;r<s;r++)i.push(o.wrapPointer(e+t*r,o.PeGTlistExtendedEntry))}}finally{o.destroy(p)}return i}e.init=r,e.getGTlist=n}(E||(E={})),function(e){function t(e){if(e?.length){for(const t of e)M(t),t.getEntries().forEach((e=>{M(e);const t=e.getGeogtran();M(t),t.getParameters().forEach(M),[t.getGeogcs1(),t.getGeogcs2()].forEach((e=>{M(e);const t=e.getDatum();M(t),M(t.getSpheroid()),M(e.getPrimem()),M(e.getUnit())}))}));o.PeGTlistExtendedEntry.prototype.Delete(e[0])}}e.destroy=t}(c||(c={})),function(e){function t(e,t,r,n,_){o.ensureCache.prepare();const P=D(r),s=r===P,i=o.ensureFloat64(P);let p=0;n&&(p=o.ensureFloat64(n));const u=o._pe_geog_to_geog(o.getPointer(e),t,i,p,_);return u&&R(r,t,i,s),u}e.geogToGeog=t}(a||(a={})),function(e){function t(e,t,r,n,_,P,s,i){o.PeLineType.prototype.geodesic_coordinate(e,t,r,n,_,P,s,i)}function r(e,t,r,n,_,P,s,i,p){o.PeLineType.prototype.geodetic_coordinate(e,t,r,n,_,P,s,i,p)}function n(e,t,r,n,_,P,s,i,p,u){o.PeLineType.prototype.geodetic_distance(e,t,r,n,_,P,s,i,p,u)}function _(e,t,r,n,_,P,s,i,p){o.PeLineType.prototype.great_elliptic_distance(e,t,r,n,_,P,s,i,p)}e.geodesicCoordinate=t,e.geodeticCoordinate=r,e.geodeticDistance=n,e.greatEllipticDistance=_}(g||(g={})),function(e){function t(e,t){return o.PeMath.prototype.phi_to_eta(e,t)}function r(e,t){return o.PeMath.prototype.eta_to_phi(e,t)}function n(e,t){return o.PeMath.prototype.phi_to_phig(e,t)}function _(e,t,r){return o.PeMath.prototype.q(e,t,r)}function P(e,t){return o.PeMath.prototype.q90(e,t)}e.phiToEta=t,e.etaToPhi=r,e.phiToPhig=n,e.q=_,e.q90=P}(T||(T={})),function(e){const t=(e,t,r,n,_,P)=>{let i,p;switch(o.ensureCache.prepare(),e){case"dd":i=o._pe_geog_to_dd,p=s.PE_DD_MAX;break;case"ddm":i=o._pe_geog_to_ddm,p=s.PE_DDM_MAX;break;case"dms":i=o._pe_geog_to_dms,p=s.PE_DMS_MAX}let u=0;t&&(u=o.getPointer(t));const E=D(n),c=o.ensureFloat64(E),a=A(r,p),g=i(u,r,c,_,o.ensureInt32(a));if(g)for(let s=0;s<r;s++)P[s]=o.UTF8ToString(a[s]);return g},r=(e,t,r,n,_)=>{let P;switch(o.ensureCache.prepare(),e){case"dd":P=o._pe_dd_to_geog;break;case"ddm":P=o._pe_ddm_to_geog;break;case"dms":P=o._pe_dms_to_geog}let s=0;t&&(s=o.getPointer(t));const i=n.map((e=>o.ensureString(e))),p=o.ensureInt32(i),u=o.ensureFloat64(new Array(2*r)),E=P(s,r,p,u);return E&&R(_,r,u),E};function n(e,o,r,n,_){return t("dms",e,o,r,n,_)}function _(e,t,o,n){return r("dms",e,t,o,n)}function P(e,o,r,n,_){return t("ddm",e,o,r,n,_)}function i(e,t,o,n){return r("ddm",e,t,o,n)}function p(e,o,r,n,_){return t("dd",e,o,r,n,_)}function u(e,t,o,n){return r("dd",e,t,o,n)}e.geogToDms=n,e.dmsToGeog=_,e.geogToDdm=P,e.ddmToGeog=i,e.geogToDd=p,e.ddToGeog=u}(f||(f={})),function(e){function t(){e.PE_MGRS_STYLE_NEW=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,e.PE_MGRS_STYLE_OLD=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,e.PE_MGRS_STYLE_AUTO=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,e.PE_MGRS_180_ZONE_1_PLUS=o.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,e.PE_MGRS_ADD_SPACES=o.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}function r(e,t,r,n,_,P,i){o.ensureCache.prepare();let p=0;e&&(p=o.getPointer(e));const u=D(r),E=o.ensureFloat64(u),c=A(t,s.PE_MGRS_MAX),a=o.ensureInt32(c),g=o._pe_geog_to_mgrs_extended(p,t,E,n,_,P,a);if(g)for(let s=0;s<t;s++)i[s]=o.UTF8ToString(c[s]);return g}function n(e,t,r,n,_){o.ensureCache.prepare();let P=0;e&&(P=o.getPointer(e));const s=r.map((e=>o.ensureString(e))),i=o.ensureInt32(s),p=o.ensureFloat64(new Array(2*t)),u=o._pe_mgrs_to_geog_extended(P,t,i,n,p);return u&&R(_,t,p),u}e.init=t,e.geogToMgrsExtended=r,e.mgrsToGeogExtended=n}(l||(l={})),function(e){function t(e,t,r,n,_,P,i){o.ensureCache.prepare();let p=0;e&&(p=o.getPointer(e));const u=D(r),E=o.ensureFloat64(u),c=A(t,s.PE_MGRS_MAX),a=o.ensureInt32(c),g=o._pe_geog_to_usng(p,t,E,n,_,P,a);if(g)for(let s=0;s<t;s++)i[s]=o.UTF8ToString(c[s]);return g}function r(e,t,r,n){o.ensureCache.prepare();let _=0;e&&(_=o.getPointer(e));const P=r.map((e=>o.ensureString(e))),s=o.ensureInt32(P),i=o.ensureFloat64(new Array(2*t)),p=o._pe_usng_to_geog(_,t,s,i);return p&&R(n,t,i),p}e.geogToUsng=t,e.usngToGeog=r}(y||(y={})),function(e){function t(){e.PE_UTM_OPTS_NONE=o.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,e.PE_UTM_OPTS_ADD_SPACES=o.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,e.PE_UTM_OPTS_NS=o.PeNotationUtm.prototype.PE_UTM_OPTS_NS}function r(e,t,r,n,_){o.ensureCache.prepare();let P=0;e&&(P=o.getPointer(e));const i=D(r),p=o.ensureFloat64(i),u=A(t,s.PE_UTM_MAX),E=o.ensureInt32(u),c=o._pe_geog_to_utm(P,t,p,n,E);if(c)for(let s=0;s<t;s++)_[s]=o.UTF8ToString(u[s]);return c}function n(e,t,r,n,_){o.ensureCache.prepare();let P=0;e&&(P=o.getPointer(e));const s=r.map((e=>o.ensureString(e))),i=o.ensureInt32(s),p=o.ensureFloat64(new Array(2*t)),u=o._pe_utm_to_geog(P,t,i,n,p);return u&&R(_,t,p),u}e.init=t,e.geogToUtm=r,e.utmToGeog=n}(S||(S={})),function(e){const t=new Map;function r(){e.PE_PCSINFO_OPTION_NONE=o.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,e.PE_PCSINFO_OPTION_DOMAIN=o.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,e.PE_POLE_OUTSIDE_BOUNDARY=o.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,e.PE_POLE_POINT=o.PePCSInfo.prototype.PE_POLE_POINT}function n(r,n=e.PE_PCSINFO_OPTION_DOMAIN){let _=null,P=null;return t.has(r)&&(P=t.get(r),P[n]&&(_=P[n])),_||(_=o.PePCSInfo.prototype.generate(r,n),P||(P=[],t.set(r,P)),P[n]=_),_}e.init=r,e.generate=n}(O||(O={})),function(e){function t(){return o.PeVersion.prototype.version_string()}e.versionString=t}(N||(N={}));const G=Object.freeze(Object.defineProperty({__proto__:null,get PeCSTransformations(){return P},get PeDefs(){return s},get PeDouble(){return i},get PeFactory(){return p},get PeGCSExtent(){return u},get PeGTTransformations(){return a},get PeGTlistExtended(){return E},get PeGTlistExtendedEntry(){return c},get PeLineType(){return g},get PeMath(){return T},get PeNotationDms(){return f},get PeNotationMgrs(){return l},get PeNotationUsng(){return y},get PeNotationUtm(){return S},get PePCSInfo(){return O},get PeVersion(){return N},_init:d,get _pe(){return o},isLoaded:r,isSupported:n,load:_},Symbol.toStringTag,{value:"Module"}));export{p as P,o as _,s as a,n as b,f as c,l as d,y as e,S as f,P as g,a as h,r as i,O as j,i as k,_ as l,u as m,E as n,c as o,G as p,g as q,T as r,N as s,d as t};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import n from"../core/Error.js";import{i as e,b as t,l as o,c as r,d as i,e as l,f as a,P as s,a as c}from"../chunks/pe.js";import u from"./Point.js";import d from"./SpatialReference.js";import{parseNumber as f}from"../intl/number.js";function _(){return e()}function S(){return t()}function w(){return o()}function E(n,e){const t=[];n=(n=(n=n.replaceAll(/[\u00B0\u00BA]/g,"^")).replaceAll("′","'")).replaceAll("″",'"');const o=R(e);return r.dmsToGeog(o,1,[n],t)?new u(t[0][0],t[0][1],e||d.WGS84):null}function g(n){return n&&_()?f(n)??E(`0° 0' 0" N | ${n}`)?.longitude??E(`0 | ${n}`)?.longitude??null:null}function m(n){return n&&_()?f(n)??E(`${n} | 0° 0' 0" E`)?.latitude??E(`${n} | 0`)?.latitude??null:null}function T(n,e,t){const o=[],r=b(t);if(-1===r)return console.warn(`invalid conversionMode: ${t}`),null;const l=R(e);return i.mgrsToGeogExtended(l,1,[n],r,o)?new u(o[0][0],o[0][1],e||d.WGS84):null}function P(n,e){const t=[];!e&&/\(.+27/.test(n)&&(e=d.GCS_NAD_1927);const o=R(e);return l.usngToGeog(o,1,[n],t)?new u(t[0][0],t[0][1],e||d.WGS84):null}function G(n,e,t){const o=[],r=A(t);if(-1===r)return console.warn(`invalid conversionMode: ${t}`),null;const i=R(e);return a.utmToGeog(i,1,[n],r,o)?new u(o[0][0],o[0][1],e||d.WGS84):null}function k(n,e,t=0){const o=[[n.x,n.y]],i=[],l=R(n.spatialReference);let a=0;switch(e){case"dd":a=r.geogToDd(l,1,o,t,i);break;case"ddm":a=r.geogToDdm(l,1,o,t,i);break;case"dms":a=r.geogToDms(l,1,o,t,i);break;default:return console.warn(`invalid format: ${e}`),null}return a?i[0]:null}function p(n,e,t=0,o=!1){const r=[[n.x,n.y]],l=[],a=R(n.spatialReference);let s=b(e);if(-1===s)return console.warn(`invalid conversionMode: ${e}`),null;o&&(s|=i.PE_MGRS_ADD_SPACES);return i.geogToMgrsExtended(a,1,r,t,!1,s,l)?l[0]:null}function M(n,e=0,t=!1){const o=[[n.x,n.y]],r=[],i=R(n.spatialReference);return l.geogToUsng(i,1,o,e,!1,t,r)?r[0]:null}function v(n,e,t=!1){const o=[[n.x,n.y]],r=[],i=R(n.spatialReference);let l=A(e);if(-1===l)return console.warn(`invalid conversionMode: ${e}`),null;t&&(l|=a.PE_UTM_OPTS_ADD_SPACES);return a.geogToUtm(i,1,o,l,r)?r[0]:null}function R(e){let t=null;if(e||(e=d.WGS84),e.wkid){if(t=s.geogcs(e.wkid),!t)throw new n("coordinate-formatter:invalid-spatial-reference","wkid is not valid")}else{if(!e.wkt2&&!e.wkt)throw new n("coordinate-formatter:invalid-spatial-reference","wkid and wkt are missing");if(t=s.fromString(c.PE_TYPE_GEOGCS,e.wkt2||e.wkt),!t)throw new n("coordinate-formatter:invalid-spatial-reference","wkt is not valid")}return t}function b(n){let e=-1;switch(n){case"automatic":e=i.PE_MGRS_STYLE_AUTO;break;case"new-180-in-zone-01":e=i.PE_MGRS_STYLE_NEW|i.PE_MGRS_180_ZONE_1_PLUS;break;case"new-180-in-zone-60":e=i.PE_MGRS_STYLE_NEW;break;case"old-180-in-zone-01":e=i.PE_MGRS_STYLE_OLD|i.PE_MGRS_180_ZONE_1_PLUS;break;case"old-180-in-zone-60":e=i.PE_MGRS_STYLE_OLD}return e}function A(n){let e=-1;switch(n){case"latitude-band-indicators":e=a.PE_UTM_OPTS_NONE;break;case"north-south-indicators":e=a.PE_UTM_OPTS_NS}return e}export{m as fromLatitude,E as fromLatitudeLongitude,g as fromLongitude,T as fromMgrs,P as fromUsng,G as fromUtm,_ as isLoaded,S as isSupported,w as load,k as toLatitudeLongitude,p as toMgrs,M as toUsng,v as toUtm};
5
+ import n from"../core/Error.js";import{i as e,b as t,l as r,c as o,d as i,e as l,f as u,P as a,a as s}from"../chunks/pe.js";import c from"./Point.js";import d from"./SpatialReference.js";import{parseNumber as f}from"../intl/number.js";function _(){return e()}function S(){return t()}function E(){return r()}function w(n,e){const t=k(e),r=n.replaceAll(/[\u00B0\u00BA]/g,"^").replaceAll("′","'").replaceAll("″",'"'),i=[];return o.dmsToGeog(t,1,[r],i)?new c(i[0][0],i[0][1],e||d.WGS84):null}function g(n){return n&&_()?f(n)??w(`0° 0' 0" N | ${n}`)?.longitude??w(`0 N | ${n}`)?.longitude??null:null}function m(n){return n&&_()?f(n)??w(`${n} | 0° 0' 0" E`)?.latitude??w(`${n} | 0 E`)?.latitude??null:null}function T(n,e,t){const r=[],o=A(t);if(-1===o)return console.warn(`invalid conversionMode: ${t}`),null;const l=k(e);return i.mgrsToGeogExtended(l,1,[n],o,r)?new c(r[0][0],r[0][1],e||d.WGS84):null}function P(n,e){const t=[];!e&&/\(.+27/.test(n)&&(e=d.GCS_NAD_1927);const r=k(e);return l.usngToGeog(r,1,[n],t)?new c(t[0][0],t[0][1],e||d.WGS84):null}function G(n,e,t){const r=[],o=D(t);if(-1===o)return console.warn(`invalid conversionMode: ${t}`),null;const i=k(e);return u.utmToGeog(i,1,[n],o,r)?new c(r[0][0],r[0][1],e||d.WGS84):null}function p(n,e,t=0){const r=[[n.x,n.y]],i=[],l=k(n.spatialReference);let u=0;switch(e){case"dd":u=o.geogToDd(l,1,r,t,i);break;case"ddm":u=o.geogToDdm(l,1,r,t,i);break;case"dms":u=o.geogToDms(l,1,r,t,i);break;default:return console.warn(`invalid format: ${e}`),null}return u?i[0]:null}function M(n,e,t=0,r=!1){const o=[[n.x,n.y]],l=[],u=k(n.spatialReference);let a=A(e);if(-1===a)return console.warn(`invalid conversionMode: ${e}`),null;r&&(a|=i.PE_MGRS_ADD_SPACES);return i.geogToMgrsExtended(u,1,o,t,!1,a,l)?l[0]:null}function v(n,e=0,t=!1){const r=[[n.x,n.y]],o=[],i=k(n.spatialReference);return l.geogToUsng(i,1,r,e,!1,t,o)?o[0]:null}function R(n,e,t=!1){const r=[[n.x,n.y]],o=[],i=k(n.spatialReference);let l=D(e);if(-1===l)return console.warn(`invalid conversionMode: ${e}`),null;t&&(l|=u.PE_UTM_OPTS_ADD_SPACES);return u.geogToUtm(i,1,r,l,o)?o[0]:null}function k(e){if(e??=d.WGS84,e.wkid){const t=a.geogcs(e.wkid);if(!t)throw new n("coordinate-formatter:invalid-spatial-reference","wkid is not valid");return t}const t=e.wkt2??e.wkt;if(t){const e=a.fromString(s.PE_TYPE_GEOGCS,t);if(!e)throw new n("coordinate-formatter:invalid-spatial-reference","wkt is not valid");return e}throw new n("coordinate-formatter:invalid-spatial-reference","wkid and wkt are missing")}function A(n){switch(n){case"automatic":return i.PE_MGRS_STYLE_AUTO;case"new-180-in-zone-01":return i.PE_MGRS_STYLE_NEW|i.PE_MGRS_180_ZONE_1_PLUS;case"new-180-in-zone-60":return i.PE_MGRS_STYLE_NEW;case"old-180-in-zone-01":return i.PE_MGRS_STYLE_OLD|i.PE_MGRS_180_ZONE_1_PLUS;case"old-180-in-zone-60":return i.PE_MGRS_STYLE_OLD;default:return-1}}function D(n){switch(n){case"latitude-band-indicators":return u.PE_UTM_OPTS_NONE;case"north-south-indicators":return u.PE_UTM_OPTS_NS;default:return-1}}export{m as fromLatitude,w as fromLatitudeLongitude,g as fromLongitude,T as fromMgrs,P as fromUsng,G as fromUtm,_ as isLoaded,S as isSupported,E as load,p as toLatitudeLongitude,M as toMgrs,v as toUsng,R as toUtm};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{t as e,o as t,G as n,b as r}from"../../chunks/Geometry.js";import{Envelope2D as o}from"../../chunks/Envelope2D.js";import{a as s,P as a,A as i,B as g}from"../../chunks/Envelope.js";import{S as m,f as u}from"../../chunks/QuadraticBezier.js";import{w as c}from"../../chunks/Point2D.js";import{getSpatialReference as l,fromPolyline as p,fromSpatialReference as d,toPolyline as h}from"./support/apiConverter.js";function f(t,n,r,a,i){if(t.isEmpty()||n.isEmpty())return null;if(8&a&&16&a)return null;2&a&&4&a&&e("");const g=new o,m=new o;t.queryEnvelope(g),n.queryEnvelope(m),g.mergeEnvelope2D(m);return P(t,n,s(r,g,!0).total(),a)}function P(e,o,s,i){t(e),t(o);let g,c=!1;const l=e.querySegmentIterator(),p=o.querySegmentIterator();let d=0;const h=new m,f=new a({vd:e.getDescription()}),P=new a({vd:e.getDescription()}),y=[],x=[];for(S(e,y,x);l.nextPath();){let t=!0,o=0;for(;2!==o;){if(0===o){l.nextSegment().getGeometryType()!==n.enumLine&&r(""),o++}else{l.resetToLastSegment();if(l.previousSegment().getGeometryType()!==n.enumLine&&r(""),c&&t){const n=l.getPathIndex();g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1}o++}let a=!1;if(d<x.length){const e=x[y[d]],t=l.getPathIndex();if(e.m_path===t){const t=1===o?l.getStartPointIndex():l.getEndPointIndex();e.m_pointIndex===t&&(a=!0,d++)}}if(1===o){if(8&i)continue}else if(16&i)continue;if(!a){1===o?l.previousSegment():l.nextSegment();const a=1===o?l.nextSegment():l.previousSegment(),m=a,d=m.calculateLength2D();p.resetToFirstPath();let y=!1,S=Number.NaN;for(;p.nextPath();){for(;p.hasNextSegment();){const e=p.nextSegment();e.getGeometryType()!==n.enumLine&&r("");const t=e,{bIntersect:a,t1:i,t2:g}=u(m,t);if(a){const e=t.calculateLength2D();if(g*e>=-s&&(1-g)*e>=-s)if(1===o){if(i*d<=-s)(Number.isNaN(S)||i>S)&&(S=i);else if(i*d<=s){S=Number.NaN,y=!0;break}}else if((1-i)*d<=-s)(Number.isNaN(S)||i<S)&&(S=i);else if((1-i)*d<=s){S=Number.NaN,y=!0;break}}}if(y)break}if(!Number.isNaN(S)){if(!c){g=e.createInstance();for(let t=0;t<l.getPathIndex();t++)g.addPath(e,t,!0)}if(1===o){a.queryCoord(S,f);const n=l.getPathIndex();if(2&i?e.getPointByVal(e.getPathStart(n),P):4&i&&P.setEmpty(),1&i||(h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),h.get().reverse(),g.addSegment(h.get(),!0),t=!1),g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),t),1&i){const e=g.getPathStart(n);g.setPointByVal(e,f)}if(2&i||4&i){const e=g.getPathStart(n),t=f.getXY();P.setXY(t),g.setPointByVal(e,P)}c=!0,t=!1}else{const n=l.getPathIndex();if(t&&(g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1),2&i?e.getPointByVal(e.getPathEnd(n)-1,P):4&i&&P.setEmpty(),a.queryCoord(S,f),1&i){const e=g.getPathEnd(n);g.setPointByVal(e-1,f)}else h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),g.addSegment(h.get(),!1);if(2&i||4&i){const e=g.getPathEnd(n),t=f.getXY();P.setXY(t),g.setPointByVal(e-1,P)}c=!0}}}}}return c?g:null}function y(e,t){return{m_path:e,m_pointIndex:t}}function S(e,t,n){const r=[],o=[],s=e.querySegmentIterator();for(;s.nextPath();){s.resetToFirstSegment();const e=s.nextSegment().getStartXY(),t=s.getPathIndex(),n=s.getStartPointIndex();r.push(e),o.push(y(t,n)),s.resetToLastSegment();const a=s.previousSegment().getEndXY(),i=s.getPathIndex(),g=s.getEndPointIndex();r.push(a),o.push(y(i,g))}const a=new i(0);for(let i=0;i<r.length;i++)a.add(i);const m={userSort(e,t,n){n.sort(e,t,((e,t)=>r[e].compare(r[t])))},getValue:e=>r[e].y};(new g).sort(a,0,a.size(),m);for(let i=0;i<a.size()-1;i++){const e=r[a.read(i)];if(e.equals(r[a.read(i+1)])){do{const e=o[a.read(i)];n.push(e),i++}while(i<a.size()&&e.equals(r[a.read(i)]));i--}}c(t,n.length,0);for(let i=0;i<n.length;i++)t[i]=i;t.sort(((e,t)=>{const r=n[e],o=n[t];return r.m_path<o.m_path?-1:r.m_path>o.m_path?1:r.m_pointIndex<o.m_pointIndex?-1:1}))}class x{getOperatorType(){return 10007}supportsCurves(){return!1}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,r,o){return f(e,t,n,r)}}const E=new x;function I(e,t,n){let r=0;n&&(n.relocateEnds&&(r|=1),n.keepEndAttributes&&(r|=2),n.noEndAttributes&&(r|=4),n.noExtendAtFrom&&(r|=8),n.noExtendAtTo&&(r|=16));const o=l(e),s=E.execute(p(e),p(t),d(o),r,null);return s?h(s,o):null}const N=E.supportsCurves();export{I as execute,N as supportsCurves};
5
+ import{a as e,o as t,G as n,t as r}from"../../chunks/Geometry.js";import{Envelope2D as o}from"../../chunks/Envelope2D.js";import{c as s,P as a,A as i,B as g}from"../../chunks/Envelope.js";import{S as m,f as u}from"../../chunks/QuadraticBezier.js";import{w as c}from"../../chunks/Point2D.js";import{getSpatialReference as l,fromPolyline as p,fromSpatialReference as d,toPolyline as h}from"./support/apiConverter.js";function f(t,n,r,a,i){if(t.isEmpty()||n.isEmpty())return null;if(8&a&&16&a)return null;2&a&&4&a&&e("");const g=new o,m=new o;t.queryEnvelope(g),n.queryEnvelope(m),g.mergeEnvelope2D(m);return P(t,n,s(r,g,!0).total(),a)}function P(e,o,s,i){t(e),t(o);let g,c=!1;const l=e.querySegmentIterator(),p=o.querySegmentIterator();let d=0;const h=new m,f=new a({vd:e.getDescription()}),P=new a({vd:e.getDescription()}),y=[],x=[];for(S(e,y,x);l.nextPath();){let t=!0,o=0;for(;2!==o;){if(0===o){l.nextSegment().getGeometryType()!==n.enumLine&&r(""),o++}else{l.resetToLastSegment();if(l.previousSegment().getGeometryType()!==n.enumLine&&r(""),c&&t){const n=l.getPathIndex();g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1}o++}let a=!1;if(d<x.length){const e=x[y[d]],t=l.getPathIndex();if(e.m_path===t){const t=1===o?l.getStartPointIndex():l.getEndPointIndex();e.m_pointIndex===t&&(a=!0,d++)}}if(1===o){if(8&i)continue}else if(16&i)continue;if(!a){1===o?l.previousSegment():l.nextSegment();const a=1===o?l.nextSegment():l.previousSegment(),m=a,d=m.calculateLength2D();p.resetToFirstPath();let y=!1,S=Number.NaN;for(;p.nextPath();){for(;p.hasNextSegment();){const e=p.nextSegment();e.getGeometryType()!==n.enumLine&&r("");const t=e,{bIntersect:a,t1:i,t2:g}=u(m,t);if(a){const e=t.calculateLength2D();if(g*e>=-s&&(1-g)*e>=-s)if(1===o){if(i*d<=-s)(Number.isNaN(S)||i>S)&&(S=i);else if(i*d<=s){S=Number.NaN,y=!0;break}}else if((1-i)*d<=-s)(Number.isNaN(S)||i<S)&&(S=i);else if((1-i)*d<=s){S=Number.NaN,y=!0;break}}}if(y)break}if(!Number.isNaN(S)){if(!c){g=e.createInstance();for(let t=0;t<l.getPathIndex();t++)g.addPath(e,t,!0)}if(1===o){a.queryCoord(S,f);const n=l.getPathIndex();if(2&i?e.getPointByVal(e.getPathStart(n),P):4&i&&P.setEmpty(),1&i||(h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),h.get().reverse(),g.addSegment(h.get(),!0),t=!1),g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),t),1&i){const e=g.getPathStart(n);g.setPointByVal(e,f)}if(2&i||4&i){const e=g.getPathStart(n),t=f.getXY();P.setXY(t),g.setPointByVal(e,P)}c=!0,t=!1}else{const n=l.getPathIndex();if(t&&(g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1),2&i?e.getPointByVal(e.getPathEnd(n)-1,P):4&i&&P.setEmpty(),a.queryCoord(S,f),1&i){const e=g.getPathEnd(n);g.setPointByVal(e-1,f)}else h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),g.addSegment(h.get(),!1);if(2&i||4&i){const e=g.getPathEnd(n),t=f.getXY();P.setXY(t),g.setPointByVal(e-1,P)}c=!0}}}}}return c?g:null}function y(e,t){return{m_path:e,m_pointIndex:t}}function S(e,t,n){const r=[],o=[],s=e.querySegmentIterator();for(;s.nextPath();){s.resetToFirstSegment();const e=s.nextSegment().getStartXY(),t=s.getPathIndex(),n=s.getStartPointIndex();r.push(e),o.push(y(t,n)),s.resetToLastSegment();const a=s.previousSegment().getEndXY(),i=s.getPathIndex(),g=s.getEndPointIndex();r.push(a),o.push(y(i,g))}const a=new i(0);for(let i=0;i<r.length;i++)a.add(i);const m={userSort(e,t,n){n.sort(e,t,((e,t)=>r[e].compare(r[t])))},getValue:e=>r[e].y};(new g).sort(a,0,a.size(),m);for(let i=0;i<a.size()-1;i++){const e=r[a.read(i)];if(e.equals(r[a.read(i+1)])){do{const e=o[a.read(i)];n.push(e),i++}while(i<a.size()&&e.equals(r[a.read(i)]));i--}}c(t,n.length,0);for(let i=0;i<n.length;i++)t[i]=i;t.sort(((e,t)=>{const r=n[e],o=n[t];return r.m_path<o.m_path?-1:r.m_path>o.m_path?1:r.m_pointIndex<o.m_pointIndex?-1:1}))}class x{getOperatorType(){return 10007}supportsCurves(){return!1}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,r,o){return f(e,t,n,r)}}const E=new x;function I(e,t,n){let r=0;n&&(n.relocateEnds&&(r|=1),n.keepEndAttributes&&(r|=2),n.noEndAttributes&&(r|=4),n.noExtendAtFrom&&(r|=8),n.noExtendAtTo&&(r|=16));const o=l(e),s=E.execute(p(e),p(t),d(o),r,null);return s?h(s,o):null}const N=E.supportsCurves();export{I as execute,N as supportsCurves};