@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{t as e,d as t,G as i,c as s,g as n}from"./Geometry.js";import{a,v as _,L as r}from"./QuadraticBezier.js";import{O as h}from"./OperatorDensify.js";import{v as o,g as m,y as l,a6 as p,aw as u,b as c,$ as g,I as d,z as f,a1 as E,ax as P,ay as S,G as A,H as x,S as y,az as R,_ as M,W as C}from"./ProjectionTransformation.js";import{n as T,d as w,P as N,K as q,l as b,s as I,E as v,p as $,f as z,b as D,x as G,y as O,z as L}from"./Point2D.js";import{Envelope2D as k}from"./Envelope2D.js";import{a as F,h as J}from"./Envelope.js";import{O as Y}from"./OperatorClip.js";import{O as U}from"./OperatorShapePreservingLength.js";import{b as X,c as j}from"./tslib.es6.js";import{T as B}from"./Transformation2D.js";import{a as H}from"./GeodeticDistanceCalculator-CcF1gMZX.js";class Q{constructor(e,t,i,s,n=100){this.m_startPt=e.clone(),this.m_endPt=t.clone(),this.m_cE2=s,this.m_cE=Math.sqrt(this.m_cE2),this.m_c1By2e=1/(2*this.m_cE),this.m_cRpu=i.getGCS().getUnit().getUnitToBaseFactor(),this.isPcs=2===i.getCoordinateSystemType(),this.PEProjcs=i.getPECoordSys(),this.m_points=w(2*n,Number.NaN)}setSegmentEndPoints(e,t){this.m_startPt.assign(e),this.m_endPt.assign(t)}makeFunctor(){return e=>{const t=[0,0];t[0]=this.m_startPt.x*(1-e)+this.m_endPt.x*e,t[1]=this.m_startPt.y*(1-e)+this.m_endPt.y*e,this.isPcs&&g.projToGeogCenter(this.PEProjcs,1,t,0);const i=Math.sin(t[1]*this.m_cRpu);if(0===this.m_cE2)return i;return-Math.log((1-this.m_cE*i)/(1+this.m_cE*i))*this.m_c1By2e+i/(1-this.m_cE2*i*i)}}}function V(e,t,i){const s=new k;e.queryEnvelope(s);const n=F(t,s,!0).total(),a=t.getPannableExtent();a.xmin=s.xmin-10*n,a.xmax=s.xmax+10*n;const r=(new Y).execute(e,a,t,i).getImpl().querySegmentIterator();r.stripAttributes();const h=d();t.querySpheroidData(h);const o=h.e2,m=0===o?2:1,l=new N(0,0),p=new N(0,0),u=new q(0),c=new Q(l,p,t,o,100);for(;r.nextPath();)for(;r.hasNextSegment();){const e=r.nextSegment();l.assign(e.getStartXY()),p.assign(e.getEndXY()),c.setSegmentEndPoints(l,p);const t=_(6,0,1,1e-12,1e-15,c.makeFunctor());u.pe((p.x-l.x)*t)}const g=h.majorSemiAxis;return m*g*g*(1-o)*Math.PI*u.getResult()/t.getPannableExtent().width()}function Z(e,t,i,s,n){const a=se(e,t,n);let _=W(e,a.first,i,s,n),r=1,h=0,o=0;do{if(r++,a.first*=.5,a.first<50*t.getTolerance(0))return _;a.second*=2,o=W(e,a.first,i,s,n),h=Math.abs(o-_),_=o}while(Math.abs(_)>1&&h>1e-8*Math.abs(_)&&(a.second<65e3&&r<8||r<4));return o}function W(e,t,i,s,n){const a=(new h).execute(e,t,0,0,n);let _;_=s?(new l).execute(a,s,n):a;const r=1===i.getUnit().getUnitToBaseFactor()?Math.PI/180:1,o=new k;_.queryEnvelope(o);const m=new k,p=new k,u=new k;m.setCoords({xmin:o.xmin,ymin:75*r,xmax:o.xmax,ymax:90*r}),p.setCoords({xmin:o.xmin,ymin:-60*r,xmax:o.xmax,ymax:75*r}),u.setCoords({xmin:o.xmin,ymin:-90*r,xmax:o.xmax,ymax:-60*r}),m.inflateCoords(.01*m.width(),0),p.inflateCoords(.01*p.width(),0),u.inflateCoords(.01*u.width(),0);let c=0;return c+=K(_,m,i,n),c+=K(_,p,i,n),c+=K(_,u,i,n),c}function K(e,t,i,s){const n=(new Y).execute(e,t,i,s);if(null!==n&&!n.isEmpty()){const e=new k;n.queryEnvelope(e);const{first:t,second:a}=ie(i,e,!1),_=o(i,t,null),r=(new l).execute(n,_,s).calculateArea2D();return a&&t.destroy(),r}return 0}const ee=[null,null,null,null,null,null,null];function te(e,t,i){const a=e.getUnit().getUnitToBaseFactor(),_=t.getCenter();_.scale(180*a/Math.PI);const r=new N;r.x=0,r.y=0;let h=0;if(0===h){_.y>45?(r.y=b,h=0):_.y<-45?(r.y=-b,h=1):_.x>=45&&_.x<135?(r.x=b,h=2):_.x>=135||_.x<-135?(r.x=b,h=3):_.x<-45&&_.x>=-135?(r.x=-b,h=4):(r.x=0,h=5);const e=a*Math.sqrt(I(t.xmin-t.xmax)+I(t.ymin-t.ymax)),i=r.clone(),s=t.getCenter();s.scale(a),h<2&&(i.x=s.x);if(N.distance(i,s)+.5*e>b)return null}const o=ee[h];if(null!==o&&o.getGCS().equalHorizontal(e))return o;const m=e.getText(),l=r.x,g=r.y,d=0,f=0;let E=0,P=-1;6!==h?P=p.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:(n(i),E=0,P=p.PE_PRJ_CYLINDRICAL_EQAREA);const S=u("EqualAreaPCS");let A;P===p.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?A=`PROJCS["${S}",${m},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",${d}],PARAMETER["False_Northing",${f}],PARAMETER["Central_Meridian",${l}],PARAMETER["Latitude_of_Origin",${g}],UNIT["Meter",1.0]]`:P===p.PE_PRJ_CYLINDRICAL_EQAREA?A=`PROJCS["${S}",${m},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",${d}],PARAMETER["False_Northing",${f}],PARAMETER["Central_Meridian",${l}],PARAMETER["Standard_Parallel_1",${E}],PARAMETER["Latitude_of_Origin",${g}],UNIT["Meter",1.0]]`:s("getEqualAreaPcsFixed");const x=c(A);return ee[h]&&ee[h].destroy(),ee[h]=x,x}function ie(e,t,i){const n=te(e,t,i);if(null!==n)return T(n,!1);const a=e.getText(),_=e.getUnit().getUnitToBaseFactor(),r=(t.xmin+t.width()/2)*_,h=(t.ymin+t.height()/2)*_,o=0,m=0;let l=0,g=0,d=-1;t.ymin*_>=75*Math.PI/180||t.ymax*_<=-60*Math.PI/180?d=p.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:t.ymin>0||t.ymax<0?(l=(t.ymin+1/3*t.height())*_,g=(t.ymin+2/3*t.height())*_,d=p.PE_PRJ_ALBERS):(l=(t.ymin+2/3*t.height())*_,d=p.PE_PRJ_CYLINDRICAL_EQAREA);const f=u("EqualAreaPCS");let E;return d===p.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?E=`PROJCS["${f}",${a},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",${o}],PARAMETER["False_Northing",${m}],PARAMETER["Central_Meridian",${r}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:d===p.PE_PRJ_ALBERS?E=`PROJCS["${f}",${a},PROJECTION["Albers"],PARAMETER["False_Easting",${o}],PARAMETER["False_Northing",${m}],PARAMETER["Central_Meridian",${r}],PARAMETER["Standard_Parallel_1",${l}],PARAMETER["Standard_Parallel_2",${g}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:d===p.PE_PRJ_CYLINDRICAL_EQAREA?E=`PROJCS["${f}",${a},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",${o}],PARAMETER["False_Northing",${m}],PARAMETER["Central_Meridian",${r}],PARAMETER["Standard_Parallel_1",${l}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:s("getEqualAreaPCSInstance"),T(c(E),!0)}function se(e,t,i){const s=e.calculateLength2D(),n=(new U).execute(e,t,i)/25e3,a=s/e.getSegmentCount()*2;let _=Math.min(a,s/n);0===_&&(_=1);return T(_,s/_)}class ne{getOperatorType(){return 10314}supportsCurves(){return!0}accelerateGeometry(e,t,i){return!1}canAccelerateGeometry(e){return!1}execute(s,n,_){if(0===n.getCoordinateSystemType()&&e(""),s.isEmpty()||s.getDimension()<2)return 0;if(t(s),s.getGeometryType()===i.enumEnvelope){const e=new a;return e.addEnvelope(s,!1),this.execute(e,n,_)}let r=s;s.getDescription().getAttributeCount()>1&&(r=s.clone(),r.dropAllAttributes());const l=(new h).execute(r,0,n.getTolerance(0),0,_);let p=null;const u=n.getGCS();u!==n&&(p=o(n,u));let c=(new m).execute(l,n,!1,_);return c.isEmpty()?0:(c===s&&(c=s.clone()),n.isPannable()?V(c,n,_):Z(c,n,u,p,_))}}function ae(){return{m_p_PCS:new N,m_factor:Number.NaN,setValues:_e,assign:re}}function _e(e,t){this.m_factor=e,this.m_p_PCS.assign(t)}function re(e){this.m_factor=e.m_factor,this.m_p_PCS.assign(e.m_p_PCS)}class he{constructor(e,t,i,s){this.m_ptStart=new J,this.m_ptEnd=new J,this.m_ptStart.assign(t),this.m_ptEnd.assign(i),this.m_deltaX=this.m_ptEnd.x-this.m_ptStart.x,this.m_deltaY=this.m_ptEnd.y-this.m_ptStart.y,this.m_e=Math.sqrt(e),this.m_e2=e,this.m_c1MinusE2=1-e;const n=Math.sin(s);let a;a=0===this.m_e2?2*n:n*(O(this.m_e*n)+1/(1-this.m_e2*n*n)),this.m_baseA=a}setSegmentEndPoints(e,t){this.m_ptStart.assign(e),this.m_ptEnd.assign(t),this.m_deltaX=this.m_ptEnd.x-this.m_ptStart.x,this.m_deltaY=this.m_ptEnd.y-this.m_ptStart.y}makeFunctor(){return e=>{const t=1-e,i=t*this.m_ptStart.x+e*this.m_ptEnd.x,s=t*this.m_ptStart.y+e*this.m_ptEnd.y,n=t*this.m_ptStart.z+e*this.m_ptEnd.z,a=i*i+s*s,_=n/Math.sqrt(n*n+this.m_c1MinusE2*this.m_c1MinusE2*a);let r;if(0===this.m_e2)r=2*_;else{r=_*(O(this.m_e*_)+1/(1-this.m_e2*_*_))}return(this.m_deltaY*i-this.m_deltaX*s)/a*(r-this.m_baseA)}}}function oe(){return{e:Number.NaN,one_p_e:Number.NaN,one_m_e:Number.NaN,one_m_e_2:Number.NaN,atanh_e_over_e:Number.NaN,half_qp:Number.NaN,f:Number.NaN,z:Number.NaN}}function me(){return{sin_phi:Number.NaN,one_p_sin_phi:Number.NaN,one_m_sin_phi:Number.NaN,one_m_e_2_sin_2_phi:Number.NaN,sin_half_phi_pf:Number.NaN,sin_half_phi_pz:Number.NaN,sin_half_asin_e_sin_phi_pf:Number.NaN,sin_half_asin_e_sin_phi_pz:Number.NaN,atanh_sin_phi:Number.NaN,atanh_esin_phi:Number.NaN,make_negative:!1,initialize:le,changeSign:pe,assign:ue,clone:ce}}function le(e,t,i,s){const n=.5*e;this.sin_phi=Math.sin(e);const a=t*this.sin_phi,_=.5*Math.asin(a);this.one_p_sin_phi=1+this.sin_phi,this.one_m_sin_phi=1-this.sin_phi,this.one_m_e_2_sin_2_phi=(1+a)*(1-a),this.sin_half_phi_pf=Math.sin(n+i),this.sin_half_phi_pz=Math.sin(n+s),this.sin_half_asin_e_sin_phi_pf=Math.sin(_+i),this.sin_half_asin_e_sin_phi_pz=Math.sin(_+s),this.atanh_sin_phi=Math.log(this.sin_half_phi_pf/this.sin_half_phi_pz),this.atanh_esin_phi=Math.log(this.sin_half_asin_e_sin_phi_pf/this.sin_half_asin_e_sin_phi_pz)}function pe(){this.sin_phi=-this.sin_phi;let e=this.one_p_sin_phi;this.one_p_sin_phi=this.one_m_sin_phi,this.one_m_sin_phi=e,e=this.sin_half_phi_pf,this.sin_half_phi_pf=this.sin_half_phi_pz,this.sin_half_phi_pz=e,e=this.sin_half_asin_e_sin_phi_pf,this.sin_half_asin_e_sin_phi_pf=this.sin_half_asin_e_sin_phi_pz,this.sin_half_asin_e_sin_phi_pz=e,this.atanh_sin_phi=-this.atanh_sin_phi,this.atanh_esin_phi=-this.atanh_esin_phi}function ue(e){this.sin_phi=e.sin_phi,this.one_p_sin_phi=e.one_p_sin_phi,this.one_m_sin_phi=e.one_m_sin_phi,this.one_m_e_2_sin_2_phi=e.one_m_e_2_sin_2_phi,this.sin_half_phi_pf=e.sin_half_phi_pf,this.sin_half_phi_pz=e.sin_half_phi_pz,this.sin_half_asin_e_sin_phi_pf=e.sin_half_asin_e_sin_phi_pf,this.sin_half_asin_e_sin_phi_pz=e.sin_half_asin_e_sin_phi_pz,this.atanh_sin_phi=e.atanh_sin_phi,this.atanh_esin_phi=e.atanh_esin_phi,this.make_negative=e.make_negative}function ce(){return{...this}}class ge{constructor(t,i,s){this.m_transformPCS2GCS=null,this.m_scaleToRadians=new B,this.m_scaleToDegrees=new B,this.m_progressTracker=s,n(4!==i),this.m_curveType=i,this.m_inputSR=t,t&&0!==t.getCoordinateSystemType()||e(""),this.m_inputGCS=t.getGCS(),this.m_a=0,this.m_eSquared=0,this.m_b=0,this.m_rpu=0}executePolygonGeodeticArea(e){let t,i=e.clone();if(i.dropAllAttributes(),e.hasNonLinearSegments()){i=(new h).execute(i,0,this.m_inputSR.getTolerance(0),0,this.m_progressTracker)}if(this.m_inputSR.isPannable()){const e=new k;i.queryEnvelope(e);const t=this.m_inputSR.getPannableExtent();if(!t.containsEnvelope(e)){const s=t.getCenterX()-e.getCenterX(),n=new B;n.setShiftCoords(s,0),i.applyTransformation(n),e.move(s,0);const a=new v;t.queryIntervalX(a);const _=new v;e.queryIntervalX(_),i=a.contains(_)?f(i,this.m_inputSR):(new l).foldInto360RangeGeodetic(i,this.m_inputSR,this.m_curveType)}}if(this.m_transformPCS2GCS?(i=(new m).execute(i,this.m_inputSR,!1,this.m_progressTracker),t=i.createInstance(),E(this.m_transformPCS2GCS,i,t,this.m_progressTracker)||(t=(new l).execute(i,this.m_transformPCS2GCS,this.m_progressTracker))):t=(new m).execute(i,this.m_inputGCS,!1,this.m_progressTracker),t.isEmpty())return 0;if(1===this.m_curveType){const e=d();return this.m_inputGCS.querySpheroidData(e),this.m_a=e.majorSemiAxis,this.m_eSquared=e.e2,this.loxodromeArea(t)}const s=t.getImpl();this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_scaleToRadians.setScale(this.m_rpu),s.applyTransformation(this.m_scaleToRadians),this.m_scaleToDegrees=this.m_scaleToRadians,this.m_scaleToDegrees.invertThis();const n=d();if(this.m_inputGCS.querySpheroidData(n),this.m_a=n.majorSemiAxis,this.m_b=n.minorSemiAxis,this.m_eSquared=n.e2,2===this.m_curveType)return this.executeClippedPolygonGreatEllipticArea(t);{const e={stack:[],error:void 0,hasError:!1};try{const i=P.unit(9101),s=this.m_inputGCS.getPECoordSys(),n=X(e,s.cloneAlterUnits(i),!1);let a,_,r=this.executeClippedPolygonGeodeticArea(t,n,0),h=0;do{h++,a=this.executeClippedPolygonGeodeticArea(t,n,h),_=Math.abs(a-r),r=a}while(Math.abs(a)>1&&_>1e-8*Math.abs(a)&&h<7);return a}catch(a){e.error=a,e.hasError=!0}finally{j(e)}}}executeClippedPolygonGeodeticArea(e,t,i){const s={stack:[],error:void 0,hasError:!1};try{const n=new k;e.queryEnvelope(n);const a=X(s,this.getEqualAreaPCSInstance(t,n),!1),_=e.clone();S(a,_);const r=50,h=_.getImpl().getAttributeStreamRef(0),o=e.getImpl().getAttributeStreamRef(0),m=X(s,new A,!1),l=X(s,new A,!1),p=40,u=[0,0],c=$(ae,p),d=w(p,-1),f=ae(),E=ae();let P,y;const R=a;let M=_.calculateArea2D();const C=new q(0),T=.5*Math.PI,b=1e-10*Math.abs(M)+1e-6,I=e.getPathCount();let v,D,G,O;const L=new N,F=new N,J=new N,Y=new N,U=new N,j=new N;let B,H;for(D=e.getPathStart(0),v=0;v<I;v++,D=G)for(G=e.getPathEnd(v),h.queryPoint2D(G-1<<1,J),o.queryPoint2D(G-1<<1,L),Math.abs(L.y)>T&&(L.y=z(T,L.y)),O=D;O<G;O++,J.assign(Y),L.assign(F)){if(h.queryPoint2D(O<<1,Y),o.queryPoint2D(O<<1,F),Math.abs(F.y)>T&&(F.y=z(T,F.y)),B=N.distance(J,Y),B<r||0===L.y&&0===F.y)continue;x.geodeticDistance(this.m_a,this.m_eSquared,L.x,L.y,F.x,F.y,m,l,null,this.m_curveType);const e=m.val,t=l.val;for(f.setValues(0,J),E.setValues(1,Y),y=i,c[0].assign(E),d[0]=i,P=0;P>=0;){H=.5*(f.m_factor+E.m_factor),x.geodeticCoordinate(this.m_a,this.m_eSquared,L.x,L.y,e*H,t,m,l,this.m_curveType),U.x=m.val,U.y=l.val,u[0]=U.x,u[1]=U.y,g.geogToProj(R,1,u),j.x=u[0],j.y=u[1];const i=-j.offset(f.m_p_PCS,E.m_p_PCS),s=.5*i*N.distance(f.m_p_PCS,E.m_p_PCS);if(C.pe(s),Math.abs(s)>b||Math.abs(s)>0&&y>0)E.setValues(H,j),P++,c[P].assign(E),Math.abs(s)<=b?(y--,d[P-1]=y,d[P]=y):(y=d[P-1],d[P]=y);else{if(P<=0)break;f.assign(E),P--,E.assign(c[P]),y=d[P]}}}return M+=C.getResult(),Math.abs(M)}catch(n){s.error=n,s.hasError=!0}finally{j(s)}}executeClippedPolygonGreatEllipticArea(e){const t=[],i=[],s=new N,n=new N,a=y(1,this.m_eSquared,new N(0,.5*Math.PI)),_=new q(0),r=new q(0),h=new q(0),o=new J,m=new J,l=new k;e.queryLooseEnvelope(l);let p=0;l.containsCoords(l.xmin,0)||(p=Math.abs(l.ymin)<Math.abs(l.ymax)?l.ymin:l.ymax);const u=new he(this.m_eSquared,o,m,p),c=this.m_a*this.m_a,g=e.getImpl().querySegmentIterator();for(g.stripAttributes();g.nextPath();)for(;g.hasNextSegment();){const e=g.nextSegment();s.assign(e.getStartXY()),n.assign(e.getEndXY()),n.x-s.x>Math.PI?s.x+=2*Math.PI:n.x-s.x<-Math.PI&&(n.x+=2*Math.PI),this.splitSegmentCrossingItegralThreshold(e,t,i);for(let i of t)o.assign(y(this.m_a,this.m_eSquared,i.getStartXY())),m.assign(y(this.m_a,this.m_eSquared,i.getEndXY())),u.setSegmentEndPoints(o,m),this.adaptiveIntegrationWithRomberg(u,_);for(let t of i){let e=t.getStartXY(),i=t.getEndXY(),s=p;e.y<0&&(i=D(e,e=i),e.y=-e.y,i.y=-i.y,s=-s);const n=y(1,this.m_eSquared,e),_=y(1,this.m_eSquared,i),o=Math.min(e.y,i.y),m=R(this.m_eSquared,e.x,i.x,s,o);r.pe(m);const l=Math.abs(R(this.m_eSquared,e.x,i.x,o,b)),u=new J;u.setSub(n,a);const g=new J;g.setSub(_,a);const d=new J;d.setCrossProductVector(u,g);let f=c*(l-.5*d.length());f=z(f,i.x-e.x),h.pe(f)}t.length=0,i.length=0}return h.getResult()+c*(.5*(1-this.m_eSquared)*_.getResult()+r.getResult())}getEqualAreaPCSInstance(e,t){const i=t.getCenterX(),s=0,n=0;let a,_;const r=t.height();let h,o;(h=t.ymin>45*Math.PI/180||t.ymax<45*-Math.PI/180)?a=z(.5*Math.PI,t.getCenterY()):(a=t.getCenterY(),_=t.ymin+r*(2/3));const m=u("EqualAreaPCS"),l=e.toString();return o=h?P.fromString(p.PE_TYPE_PROJCS,`PROJCS["${m}", ${l}, PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",${s}],PARAMETER["False_Northing", ${n}],PARAMETER["Central_Meridian", ${i}], PARAMETER["Latitude_of_Origin", ${a}], UNIT["Meter",1.0]]`):P.fromString(p.PE_TYPE_PROJCS,`PROJCS["${m}", ${l}, PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting", ${s}],PARAMETER["False_Northing", ${n}],PARAMETER["Central_Meridian", ${i}],PARAMETER["Standard_Parallel_1", ${_}],PARAMETER["Latitude_of_Origin", ${a}],UNIT["Meter",1.0]]`),o}splitSegmentCrossingItegralThreshold(e,t,i){const s=100,n=20,a=n*n,_=y(this.m_a,this.m_eSquared,new N(0,b)),h=y(this.m_a,this.m_eSquared,new N(0,-b)),o=this.splitSegmentPassingThroughPole(e);for(let m of o){const e=m.getStartXY(),o=m.getEndXY(),l=y(this.m_a,this.m_eSquared,e),p=y(this.m_a,this.m_eSquared,o),u=new N,c=new J;let g=J.sqrDistance(_,l),d=J.sqrDistance(l,p);if(g<=s){if(!(d>a)){i.push(new r({start:e,end:o}));continue}c.assign(p.sub(l)),c.normalizeThis(),c.assign(l.add(c.mul(n))),u.assign(M(this.m_a,this.m_eSquared,c)),i.push(new r({start:e,end:u})),e.assign(u)}if(l.assign(y(this.m_a,this.m_eSquared,e)),g=J.sqrDistance(_,p),d=J.sqrDistance(l,p),g<=s){if(!(d>a)){i.push(new r({start:e,end:o}));continue}c.assign(p.sub(l)),c.normalizeThis(),c.assign(p.sub(c.mul(n))),u.assign(M(this.m_a,this.m_eSquared,c)),i.push(new r({start:u,end:o})),o.assign(u)}if(l.assign(y(this.m_a,this.m_eSquared,e)),p.assign(y(this.m_a,this.m_eSquared,o)),g=J.sqrDistance(h,l),d=J.sqrDistance(l,p),g<=s){if(!(d>a)){i.push(new r({start:e,end:o}));continue}c.assign(p.sub(l)),c.normalizeThis(),c.assign(l.add(c.mul(n))),u.assign(M(this.m_a,this.m_eSquared,c)),i.push(new r({start:e,end:u})),e.assign(u)}if(l.assign(y(this.m_a,this.m_eSquared,e)),p.assign(y(this.m_a,this.m_eSquared,o)),g=J.sqrDistance(h,p),d=J.sqrDistance(l,p),g<=s){if(!(d>a)){i.push(new r({start:e,end:o}));continue}c.assign(p.sub(l)),c.normalizeThis(),c.assign(p.sub(c.mul(n))),u.assign(M(this.m_a,this.m_eSquared,c)),i.push(new r({start:u,end:o})),o.assign(u)}t.push(new r({start:e,end:o}))}}splitSegmentPassingThroughPole(e){const t={stack:[],error:void 0,hasError:!1};try{const i=[],s=new J,n=new J,a=new J,_=new N,h=20,o=3.124139361,m=10,l=e.getStartXY(),p=e.getEndXY(),u=X(t,new A,!1);if(x.geodeticDistance(this.m_a,this.m_eSquared,l.x,l.y,p.x,p.y,u,null,null,2),Math.abs(p.x-l.x)>o&&u.val>h){const e=new H(new N(0,90),l.divide(this.m_rpu),p.divide(this.m_rpu),this.m_inputGCS,2,2);let t=C(e.makeFunctor(),0,1,1e-10);if(t.second<=m&&t.first>0&&t.first<1)return s.assign(y(this.m_a,this.m_eSquared,l)),n.assign(y(this.m_a,this.m_eSquared,p)),G(s,n,t.first,a),_.assign(M(this.m_a,this.m_eSquared,a)),i.push(new r({start:l,end:_})),i.push(new r({start:_,end:p})),i;if(e.setPointDistFrom(new N(0,-90)),t=C(e.makeFunctor(),0,1,1e-10),t.second<=m&&t.first>0&&t.first<1)return s.assign(y(this.m_a,this.m_eSquared,l)),n.assign(y(this.m_a,this.m_eSquared,p)),G(s,n,t.first,a),_.assign(M(this.m_a,this.m_eSquared,a)),i.push(new r({start:l,end:_})),i.push(new r({start:_,end:p})),i}return i.push(new r({start:l,end:p})),i}catch(i){t.error=i,t.hasError=!0}finally{j(t)}}adaptiveIntegrationWithRomberg(e,t){const i=e.makeFunctor();let s=0,n=1,a=i(s),r=i(n);const h=1e-17,o=1e-14;let m=(s+n)/2,l=i(m),p=Math.abs(l-a),u=Math.abs(r-l),c=0;for(;c++<32&&(p/u<.1||u/p<.1);)p<u?(t.pe(_(5,s,m,o,h,i)),s=m,a=l):(t.pe(_(5,m,n,o,h,i)),n=m,r=l),m=(s+n)/2,l=Math.abs(i(m)),p=Math.abs(l-a),u=Math.abs(r-l);t.pe(_(5,s,n,o,h,i))}loxodromeAreaHemi(e,t,i,s,n){const a=i.clone(),_=n.clone();let r,h,o,m,l,p,u,c,g,d,f,E,P,S,A,x;return a.make_negative&&a.changeSign(),_.make_negative&&_.changeSign(),f=s-t,1===Math.abs(a.sin_phi)||1===Math.abs(_.sin_phi)?e.half_qp*f:a.sin_phi===_.sin_phi?(d=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+O(e.e*a.sin_phi))*f,d):(A=Math.log(_.sin_half_phi_pf*a.sin_half_phi_pz/(_.sin_half_phi_pz*a.sin_half_phi_pf)),x=Math.log(_.sin_half_asin_e_sin_phi_pf*a.sin_half_asin_e_sin_phi_pz/(_.sin_half_asin_e_sin_phi_pz*a.sin_half_asin_e_sin_phi_pf)),1===this.m_eSquared?(l=0,r=.5*(A+_.sin_phi/_.one_m_e_2_sin_2_phi-a.sin_phi/a.one_m_e_2_sin_2_phi),h=0):(l=-2*e.atanh_e_over_e*(Math.log(_.one_p_sin_phi/a.one_p_sin_phi)-e.e*x),r=(A-e.e*x)/e.one_m_e_2,h=(Math.log(_.one_m_e_2_sin_2_phi/a.one_m_e_2_sin_2_phi)+l/e.atanh_e_over_e)/e.one_m_e_2),o=-x*(a.atanh_esin_phi+_.atanh_esin_phi),m=1/a.one_m_e_2_sin_2_phi-1/_.one_m_e_2_sin_2_phi,p=L(_.one_m_sin_phi/e.one_p_e,e.e)-L(a.one_m_sin_phi/e.one_p_e,e.e),u=L(_.one_p_sin_phi/e.one_p_e,e.e)-L(a.one_p_sin_phi/e.one_p_e,e.e),c=L(a.one_m_sin_phi/-e.one_m_e,e.e)-L(_.one_m_sin_phi/-e.one_m_e,e.e),g=L(a.one_p_sin_phi/-e.one_m_e,e.e)-L(_.one_p_sin_phi/-e.one_m_e,e.e),d=.25/r*(h+o+m+l+.5*(p+u+c+g)),d+=e.half_qp,E=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+O(e.e*a.sin_phi)),P=.5*e.one_m_e_2*_.sin_phi*(1/_.one_m_e_2_sin_2_phi+O(e.e*_.sin_phi)),P<E&&(S=E,E=P,P=S),d<E&&(d=E),d>P&&(d=P),d*=f,d)}loxodromeArea(e){const t=Math.PI/180;let i=0;const s=oe(),n=me(),a=me();s.e=Math.sqrt(this.m_eSquared),s.one_p_e=1+s.e,s.one_m_e=1-s.e,s.one_m_e_2=1-this.m_eSquared,s.atanh_e_over_e=O(s.e),this.m_eSquared>=1?s.half_qp=1:s.half_qp=.5*(1+s.atanh_e_over_e*s.one_m_e_2),s.f=.25*Math.PI,s.z=.75*Math.PI,a.initialize(0,s.e,s.f,s.z);const _=e.getPathCount(),r=new N,h=new N,o=e.getImpl().getAttributeStreamRef(0);for(let m=0;m<_;m++){const _=e.getPathStart(m),l=e.getPathEnd(m);if(!(l-_<=1)){o.queryPoint2D(2*(l-1),r);for(let e=_;e<l;e++){o.queryPoint2D(2*e,h);const m=r.y*t,l=h.y*t;if(e===_?(n.initialize(m,s.e,s.f,s.z),n.make_negative=!1):n.assign(a),a.initialize(l,s.e,s.f,s.z),a.make_negative=!1,r.y*h.y<0){if(r.y>=90&&h.y<=-90||h.y>=90&&r.y<=-90)return Number.NaN;const e=me();e.initialize(0,s.e,s.f,s.z),e.make_negative=!1;const _=n.atanh_sin_phi-s.e*n.atanh_esin_phi,o=a.atanh_sin_phi-s.e*a.atanh_esin_phi,l=(o*r.x-_*h.x)/(o-_);m<0?(n.make_negative=!0,i-=this.loxodromeAreaHemi(s,r.x*t,n,l*t,e),n.make_negative=!1,i+=this.loxodromeAreaHemi(s,l*t,e,h.x*t,a)):(i+=this.loxodromeAreaHemi(s,r.x*t,n,l*t,e),a.make_negative=!0,i-=this.loxodromeAreaHemi(s,l*t,e,h.x*t,a),a.make_negative=!1)}else r.y>=0?i+=this.loxodromeAreaHemi(s,r.x*t,n,h.x*t,a):(n.make_negative=!0,a.make_negative=!0,i-=this.loxodromeAreaHemi(s,r.x*t,n,h.x*t,a),n.make_negative=!1,a.make_negative=!1);r.assign(h)}}}return this.m_a*i*this.m_a}calculate(e){if(e.isEmpty()||e.getDimension()<2)return 0;if(e.getGeometryType()===i.enumEnvelope){const t=new a;return t.addEnvelope(e,!1),this.calculate(t)}return this.m_inputSR!==this.m_inputGCS&&null===this.m_transformPCS2GCS&&(this.m_transformPCS2GCS=o(this.m_inputSR,this.m_inputGCS,null)),this.executePolygonGeodeticArea(e)}}class de{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,i){return!1}canAccelerateGeometry(e){return!1}execute(e,i,s,n){if(t(e),4===s)return(new ne).execute(e,i,n);return new ge(i,s,n).calculate(e)}}export{de as OperatorGeodeticArea};
5
+ import{a as e,d as t,G as i,c as s,g as n}from"./Geometry.js";import{a,v as _,L as r}from"./QuadraticBezier.js";import{O as h}from"./OperatorDensify.js";import{w as o,O as m,v as l,a6 as p,aw as u,a as c,K as g,J as d,F as f,N as E,ax as P,ay as S,P as A,x,y,az as R,I as M,B as C}from"./ProjectionTransformation.js";import{k as T,d as w,P as N,K as q,p as b,a as I,E as v,n as $,f as z,c as O,x as D,y as G,z as k}from"./Point2D.js";import{Envelope2D as L}from"./Envelope2D.js";import{c as F,d as J}from"./Envelope.js";import{O as Y}from"./OperatorClip.js";import{O as U}from"./OperatorShapePreservingLength.js";import{b as X,c as j}from"./tslib.es6.js";import{T as B}from"./Transformation2D.js";import{a as H}from"./GeodeticDistanceCalculator-CcF1gMZX.js";class Q{constructor(e,t,i,s,n=100){this.m_startPt=e.clone(),this.m_endPt=t.clone(),this.m_cE2=s,this.m_cE=Math.sqrt(this.m_cE2),this.m_c1By2e=1/(2*this.m_cE),this.m_cRpu=i.getGCS().getUnit().getUnitToBaseFactor(),this.isPcs=2===i.getCoordinateSystemType(),this.PEProjcs=i.getPECoordSys(),this.m_points=w(2*n,Number.NaN)}setSegmentEndPoints(e,t){this.m_startPt.assign(e),this.m_endPt.assign(t)}makeFunctor(){return e=>{const t=[0,0];t[0]=this.m_startPt.x*(1-e)+this.m_endPt.x*e,t[1]=this.m_startPt.y*(1-e)+this.m_endPt.y*e,this.isPcs&&g.projToGeogCenter(this.PEProjcs,1,t,0);const i=Math.sin(t[1]*this.m_cRpu);if(0===this.m_cE2)return i;return-Math.log((1-this.m_cE*i)/(1+this.m_cE*i))*this.m_c1By2e+i/(1-this.m_cE2*i*i)}}}function V(e,t,i){const s=new L;e.queryEnvelope(s);const n=F(t,s,!0).total(),a=t.getPannableExtent();a.xmin=s.xmin-10*n,a.xmax=s.xmax+10*n;const r=(new Y).execute(e,a,t,i).getImpl().querySegmentIterator();r.stripAttributes();const h=d();t.querySpheroidData(h);const o=h.e2,m=0===o?2:1,l=new N(0,0),p=new N(0,0),u=new q(0),c=new Q(l,p,t,o,100);for(;r.nextPath();)for(;r.hasNextSegment();){const e=r.nextSegment();l.assign(e.getStartXY()),p.assign(e.getEndXY()),c.setSegmentEndPoints(l,p);const t=_(6,0,1,1e-12,1e-15,c.makeFunctor());u.pe((p.x-l.x)*t)}const g=h.majorSemiAxis;return m*g*g*(1-o)*Math.PI*u.getResult()/t.getPannableExtent().width()}function Z(e,t,i,s,n){const a=se(e,t,n);let _=K(e,a.first,i,s,n),r=1,h=0,o=0;do{if(r++,a.first*=.5,a.first<50*t.getTolerance(0))return _;a.second*=2,o=K(e,a.first,i,s,n),h=Math.abs(o-_),_=o}while(Math.abs(_)>1&&h>1e-8*Math.abs(_)&&(a.second<65e3&&r<8||r<4));return o}function K(e,t,i,s,n){const a=(new h).execute(e,t,0,0,n);let _;_=s?(new l).execute(a,s,n):a;const r=1===i.getUnit().getUnitToBaseFactor()?Math.PI/180:1,o=new L;_.queryEnvelope(o);const m=new L,p=new L,u=new L;m.setCoords({xmin:o.xmin,ymin:75*r,xmax:o.xmax,ymax:90*r}),p.setCoords({xmin:o.xmin,ymin:-60*r,xmax:o.xmax,ymax:75*r}),u.setCoords({xmin:o.xmin,ymin:-90*r,xmax:o.xmax,ymax:-60*r}),m.inflateCoords(.01*m.width(),0),p.inflateCoords(.01*p.width(),0),u.inflateCoords(.01*u.width(),0);let c=0;return c+=W(_,m,i,n),c+=W(_,p,i,n),c+=W(_,u,i,n),c}function W(e,t,i,s){const n=(new Y).execute(e,t,i,s);if(null!==n&&!n.isEmpty()){const e=new L;n.queryEnvelope(e);const{first:t,second:a}=ie(i,e,!1),_=o(i,t,null),r=(new l).execute(n,_,s).calculateArea2D();return a&&t.destroy(),r}return 0}const ee=[null,null,null,null,null,null,null];function te(e,t,i){const a=e.getUnit().getUnitToBaseFactor(),_=t.getCenter();_.scale(180*a/Math.PI);const r=new N;r.x=0,r.y=0;let h=0;if(0===h){_.y>45?(r.y=b,h=0):_.y<-45?(r.y=-b,h=1):_.x>=45&&_.x<135?(r.x=b,h=2):_.x>=135||_.x<-135?(r.x=b,h=3):_.x<-45&&_.x>=-135?(r.x=-b,h=4):(r.x=0,h=5);const e=a*Math.sqrt(I(t.xmin-t.xmax)+I(t.ymin-t.ymax)),i=r.clone(),s=t.getCenter();s.scale(a),h<2&&(i.x=s.x);if(N.distance(i,s)+.5*e>b)return null}const o=ee[h];if(null!==o&&o.getGCS().equalHorizontal(e))return o;const m=e.getText(),l=r.x,g=r.y,d=0,f=0;let E=0,P=-1;6!==h?P=p.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:(n(i),E=0,P=p.PE_PRJ_CYLINDRICAL_EQAREA);const S=u("EqualAreaPCS");let A;P===p.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?A=`PROJCS["${S}",${m},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",${d}],PARAMETER["False_Northing",${f}],PARAMETER["Central_Meridian",${l}],PARAMETER["Latitude_of_Origin",${g}],UNIT["Meter",1.0]]`:P===p.PE_PRJ_CYLINDRICAL_EQAREA?A=`PROJCS["${S}",${m},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",${d}],PARAMETER["False_Northing",${f}],PARAMETER["Central_Meridian",${l}],PARAMETER["Standard_Parallel_1",${E}],PARAMETER["Latitude_of_Origin",${g}],UNIT["Meter",1.0]]`:s("getEqualAreaPcsFixed");const x=c(A);return ee[h]&&ee[h].destroy(),ee[h]=x,x}function ie(e,t,i){const n=te(e,t,i);if(null!==n)return T(n,!1);const a=e.getText(),_=e.getUnit().getUnitToBaseFactor(),r=(t.xmin+t.width()/2)*_,h=(t.ymin+t.height()/2)*_,o=0,m=0;let l=0,g=0,d=-1;t.ymin*_>=75*Math.PI/180||t.ymax*_<=-60*Math.PI/180?d=p.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:t.ymin>0||t.ymax<0?(l=(t.ymin+1/3*t.height())*_,g=(t.ymin+2/3*t.height())*_,d=p.PE_PRJ_ALBERS):(l=(t.ymin+2/3*t.height())*_,d=p.PE_PRJ_CYLINDRICAL_EQAREA);const f=u("EqualAreaPCS");let E;return d===p.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?E=`PROJCS["${f}",${a},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",${o}],PARAMETER["False_Northing",${m}],PARAMETER["Central_Meridian",${r}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:d===p.PE_PRJ_ALBERS?E=`PROJCS["${f}",${a},PROJECTION["Albers"],PARAMETER["False_Easting",${o}],PARAMETER["False_Northing",${m}],PARAMETER["Central_Meridian",${r}],PARAMETER["Standard_Parallel_1",${l}],PARAMETER["Standard_Parallel_2",${g}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:d===p.PE_PRJ_CYLINDRICAL_EQAREA?E=`PROJCS["${f}",${a},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",${o}],PARAMETER["False_Northing",${m}],PARAMETER["Central_Meridian",${r}],PARAMETER["Standard_Parallel_1",${l}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:s("getEqualAreaPCSInstance"),T(c(E),!0)}function se(e,t,i){const s=e.calculateLength2D(),n=(new U).execute(e,t,i)/25e3,a=s/e.getSegmentCount()*2;let _=Math.min(a,s/n);0===_&&(_=1);return T(_,s/_)}class ne{getOperatorType(){return 10314}supportsCurves(){return!0}accelerateGeometry(e,t,i){return!1}canAccelerateGeometry(e){return!1}execute(s,n,_){if(0===n.getCoordinateSystemType()&&e(""),s.isEmpty()||s.getDimension()<2)return 0;if(t(s),s.getGeometryType()===i.enumEnvelope){const e=new a;return e.addEnvelope(s,!1),this.execute(e,n,_)}let r=s;s.getDescription().getAttributeCount()>1&&(r=s.clone(),r.dropAllAttributes());const l=(new h).execute(r,0,n.getTolerance(0),0,_);let p=null;const u=n.getGCS();u!==n&&(p=o(n,u));let c=(new m).execute(l,n,!1,_);return c.isEmpty()?0:(c===s&&(c=s.clone()),n.isPannable()?V(c,n,_):Z(c,n,u,p,_))}}function ae(){return{m_p_PCS:new N,m_factor:Number.NaN,setValues:_e,assign:re}}function _e(e,t){this.m_factor=e,this.m_p_PCS.assign(t)}function re(e){this.m_factor=e.m_factor,this.m_p_PCS.assign(e.m_p_PCS)}class he{constructor(e,t,i,s){this.m_ptStart=new J,this.m_ptEnd=new J,this.m_ptStart.assign(t),this.m_ptEnd.assign(i),this.m_deltaX=this.m_ptEnd.x-this.m_ptStart.x,this.m_deltaY=this.m_ptEnd.y-this.m_ptStart.y,this.m_e=Math.sqrt(e),this.m_e2=e,this.m_c1MinusE2=1-e;const n=Math.sin(s);let a;a=0===this.m_e2?2*n:n*(G(this.m_e*n)+1/(1-this.m_e2*n*n)),this.m_baseA=a}setSegmentEndPoints(e,t){this.m_ptStart.assign(e),this.m_ptEnd.assign(t),this.m_deltaX=this.m_ptEnd.x-this.m_ptStart.x,this.m_deltaY=this.m_ptEnd.y-this.m_ptStart.y}makeFunctor(){return e=>{const t=1-e,i=t*this.m_ptStart.x+e*this.m_ptEnd.x,s=t*this.m_ptStart.y+e*this.m_ptEnd.y,n=t*this.m_ptStart.z+e*this.m_ptEnd.z,a=i*i+s*s,_=n/Math.sqrt(n*n+this.m_c1MinusE2*this.m_c1MinusE2*a);let r;if(0===this.m_e2)r=2*_;else{r=_*(G(this.m_e*_)+1/(1-this.m_e2*_*_))}return(this.m_deltaY*i-this.m_deltaX*s)/a*(r-this.m_baseA)}}}function oe(){return{e:Number.NaN,one_p_e:Number.NaN,one_m_e:Number.NaN,one_m_e_2:Number.NaN,atanh_e_over_e:Number.NaN,half_qp:Number.NaN,f:Number.NaN,z:Number.NaN}}function me(){return{sin_phi:Number.NaN,one_p_sin_phi:Number.NaN,one_m_sin_phi:Number.NaN,one_m_e_2_sin_2_phi:Number.NaN,sin_half_phi_pf:Number.NaN,sin_half_phi_pz:Number.NaN,sin_half_asin_e_sin_phi_pf:Number.NaN,sin_half_asin_e_sin_phi_pz:Number.NaN,atanh_sin_phi:Number.NaN,atanh_esin_phi:Number.NaN,make_negative:!1,initialize:le,changeSign:pe,assign:ue,clone:ce}}function le(e,t,i,s){const n=.5*e;this.sin_phi=Math.sin(e);const a=t*this.sin_phi,_=.5*Math.asin(a);this.one_p_sin_phi=1+this.sin_phi,this.one_m_sin_phi=1-this.sin_phi,this.one_m_e_2_sin_2_phi=(1+a)*(1-a),this.sin_half_phi_pf=Math.sin(n+i),this.sin_half_phi_pz=Math.sin(n+s),this.sin_half_asin_e_sin_phi_pf=Math.sin(_+i),this.sin_half_asin_e_sin_phi_pz=Math.sin(_+s),this.atanh_sin_phi=Math.log(this.sin_half_phi_pf/this.sin_half_phi_pz),this.atanh_esin_phi=Math.log(this.sin_half_asin_e_sin_phi_pf/this.sin_half_asin_e_sin_phi_pz)}function pe(){this.sin_phi=-this.sin_phi;let e=this.one_p_sin_phi;this.one_p_sin_phi=this.one_m_sin_phi,this.one_m_sin_phi=e,e=this.sin_half_phi_pf,this.sin_half_phi_pf=this.sin_half_phi_pz,this.sin_half_phi_pz=e,e=this.sin_half_asin_e_sin_phi_pf,this.sin_half_asin_e_sin_phi_pf=this.sin_half_asin_e_sin_phi_pz,this.sin_half_asin_e_sin_phi_pz=e,this.atanh_sin_phi=-this.atanh_sin_phi,this.atanh_esin_phi=-this.atanh_esin_phi}function ue(e){this.sin_phi=e.sin_phi,this.one_p_sin_phi=e.one_p_sin_phi,this.one_m_sin_phi=e.one_m_sin_phi,this.one_m_e_2_sin_2_phi=e.one_m_e_2_sin_2_phi,this.sin_half_phi_pf=e.sin_half_phi_pf,this.sin_half_phi_pz=e.sin_half_phi_pz,this.sin_half_asin_e_sin_phi_pf=e.sin_half_asin_e_sin_phi_pf,this.sin_half_asin_e_sin_phi_pz=e.sin_half_asin_e_sin_phi_pz,this.atanh_sin_phi=e.atanh_sin_phi,this.atanh_esin_phi=e.atanh_esin_phi,this.make_negative=e.make_negative}function ce(){return{...this}}class ge{constructor(t,i,s){this.m_transformPCS2GCS=null,this.m_scaleToRadians=new B,this.m_scaleToDegrees=new B,this.m_progressTracker=s,n(4!==i),this.m_curveType=i,this.m_inputSR=t,t&&0!==t.getCoordinateSystemType()||e(""),this.m_inputGCS=t.getGCS(),this.m_a=0,this.m_eSquared=0,this.m_b=0,this.m_rpu=0}executePolygonGeodeticArea(e){let t,i=e.clone();if(i.dropAllAttributes(),e.hasNonLinearSegments()){i=(new h).execute(i,0,this.m_inputSR.getTolerance(0),0,this.m_progressTracker)}if(this.m_inputSR.isPannable()){const e=new L;i.queryEnvelope(e);const t=this.m_inputSR.getPannableExtent();if(!t.containsEnvelope(e)){const s=t.getCenterX()-e.getCenterX(),n=new B;n.setShiftCoords(s,0),i.applyTransformation(n),e.move(s,0);const a=new v;t.queryIntervalX(a);const _=new v;e.queryIntervalX(_),i=a.contains(_)?f(i,this.m_inputSR):(new l).foldInto360RangeGeodetic(i,this.m_inputSR,this.m_curveType)}}if(this.m_transformPCS2GCS?(i=(new m).execute(i,this.m_inputSR,!1,this.m_progressTracker),t=i.createInstance(),E(this.m_transformPCS2GCS,i,t,this.m_progressTracker)||(t=(new l).execute(i,this.m_transformPCS2GCS,this.m_progressTracker))):t=(new m).execute(i,this.m_inputGCS,!1,this.m_progressTracker),t.isEmpty())return 0;if(1===this.m_curveType){const e=d();return this.m_inputGCS.querySpheroidData(e),this.m_a=e.majorSemiAxis,this.m_eSquared=e.e2,this.loxodromeArea(t)}const s=t.getImpl();this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_scaleToRadians.setScale(this.m_rpu),s.applyTransformation(this.m_scaleToRadians),this.m_scaleToDegrees=this.m_scaleToRadians,this.m_scaleToDegrees.invertThis();const n=d();if(this.m_inputGCS.querySpheroidData(n),this.m_a=n.majorSemiAxis,this.m_b=n.minorSemiAxis,this.m_eSquared=n.e2,2===this.m_curveType)return this.executeClippedPolygonGreatEllipticArea(t);{const e={stack:[],error:void 0,hasError:!1};try{const i=P.unit(9101),s=this.m_inputGCS.getPECoordSys(),n=X(e,s.cloneAlterUnits(i),!1);let a,_,r=this.executeClippedPolygonGeodeticArea(t,n,0),h=0;do{h++,a=this.executeClippedPolygonGeodeticArea(t,n,h),_=Math.abs(a-r),r=a}while(Math.abs(a)>1&&_>1e-8*Math.abs(a)&&h<7);return a}catch(a){e.error=a,e.hasError=!0}finally{j(e)}}}executeClippedPolygonGeodeticArea(e,t,i){const s={stack:[],error:void 0,hasError:!1};try{const n=new L;e.queryEnvelope(n);const a=X(s,this.getEqualAreaPCSInstance(t,n),!1),_=e.clone();S(a,_);const r=50,h=_.getImpl().getAttributeStreamRef(0),o=e.getImpl().getAttributeStreamRef(0),m=X(s,new A,!1),l=X(s,new A,!1),p=40,u=[0,0],c=$(ae,p),d=w(p,-1),f=ae(),E=ae();let P,y;const R=a;let M=_.calculateArea2D();const C=new q(0),T=.5*Math.PI,b=1e-10*Math.abs(M)+1e-6,I=e.getPathCount();let v,O,D,G;const k=new N,F=new N,J=new N,Y=new N,U=new N,j=new N;let B,H;for(O=e.getPathStart(0),v=0;v<I;v++,O=D)for(D=e.getPathEnd(v),h.queryPoint2D(D-1<<1,J),o.queryPoint2D(D-1<<1,k),Math.abs(k.y)>T&&(k.y=z(T,k.y)),G=O;G<D;G++,J.assign(Y),k.assign(F)){if(h.queryPoint2D(G<<1,Y),o.queryPoint2D(G<<1,F),Math.abs(F.y)>T&&(F.y=z(T,F.y)),B=N.distance(J,Y),B<r||0===k.y&&0===F.y)continue;x.geodeticDistance(this.m_a,this.m_eSquared,k.x,k.y,F.x,F.y,m,l,null,this.m_curveType);const e=m.val,t=l.val;for(f.setValues(0,J),E.setValues(1,Y),y=i,c[0].assign(E),d[0]=i,P=0;P>=0;){H=.5*(f.m_factor+E.m_factor),x.geodeticCoordinate(this.m_a,this.m_eSquared,k.x,k.y,e*H,t,m,l,this.m_curveType),U.x=m.val,U.y=l.val,u[0]=U.x,u[1]=U.y,g.geogToProj(R,1,u),j.x=u[0],j.y=u[1];const i=-j.offset(f.m_p_PCS,E.m_p_PCS),s=.5*i*N.distance(f.m_p_PCS,E.m_p_PCS);if(C.pe(s),Math.abs(s)>b||Math.abs(s)>0&&y>0)E.setValues(H,j),P++,c[P].assign(E),Math.abs(s)<=b?(y--,d[P-1]=y,d[P]=y):(y=d[P-1],d[P]=y);else{if(P<=0)break;f.assign(E),P--,E.assign(c[P]),y=d[P]}}}return M+=C.getResult(),Math.abs(M)}catch(n){s.error=n,s.hasError=!0}finally{j(s)}}executeClippedPolygonGreatEllipticArea(e){const t=[],i=[],s=new N,n=new N,a=y(1,this.m_eSquared,new N(0,.5*Math.PI)),_=new q(0),r=new q(0),h=new q(0),o=new J,m=new J,l=new L;e.queryLooseEnvelope(l);let p=0;l.containsCoords(l.xmin,0)||(p=Math.abs(l.ymin)<Math.abs(l.ymax)?l.ymin:l.ymax);const u=new he(this.m_eSquared,o,m,p),c=this.m_a*this.m_a,g=e.getImpl().querySegmentIterator();for(g.stripAttributes();g.nextPath();)for(;g.hasNextSegment();){const e=g.nextSegment();s.assign(e.getStartXY()),n.assign(e.getEndXY()),n.x-s.x>Math.PI?s.x+=2*Math.PI:n.x-s.x<-Math.PI&&(n.x+=2*Math.PI),this.splitSegmentCrossingItegralThreshold(e,t,i);for(let i of t)o.assign(y(this.m_a,this.m_eSquared,i.getStartXY())),m.assign(y(this.m_a,this.m_eSquared,i.getEndXY())),u.setSegmentEndPoints(o,m),this.adaptiveIntegrationWithRomberg(u,_);for(let t of i){let e=t.getStartXY(),i=t.getEndXY(),s=p;e.y<0&&(i=O(e,e=i),e.y=-e.y,i.y=-i.y,s=-s);const n=y(1,this.m_eSquared,e),_=y(1,this.m_eSquared,i),o=Math.min(e.y,i.y),m=R(this.m_eSquared,e.x,i.x,s,o);r.pe(m);const l=Math.abs(R(this.m_eSquared,e.x,i.x,o,b)),u=new J;u.setSub(n,a);const g=new J;g.setSub(_,a);const d=new J;d.setCrossProductVector(u,g);let f=c*(l-.5*d.length());f=z(f,i.x-e.x),h.pe(f)}t.length=0,i.length=0}return h.getResult()+c*(.5*(1-this.m_eSquared)*_.getResult()+r.getResult())}getEqualAreaPCSInstance(e,t){const i=t.getCenterX(),s=0,n=0;let a,_;const r=t.height();let h,o;(h=t.ymin>45*Math.PI/180||t.ymax<45*-Math.PI/180)?a=z(.5*Math.PI,t.getCenterY()):(a=t.getCenterY(),_=t.ymin+r*(2/3));const m=u("EqualAreaPCS"),l=e.toString();return o=h?P.fromString(p.PE_TYPE_PROJCS,`PROJCS["${m}", ${l}, PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",${s}],PARAMETER["False_Northing", ${n}],PARAMETER["Central_Meridian", ${i}], PARAMETER["Latitude_of_Origin", ${a}], UNIT["Meter",1.0]]`):P.fromString(p.PE_TYPE_PROJCS,`PROJCS["${m}", ${l}, PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting", ${s}],PARAMETER["False_Northing", ${n}],PARAMETER["Central_Meridian", ${i}],PARAMETER["Standard_Parallel_1", ${_}],PARAMETER["Latitude_of_Origin", ${a}],UNIT["Meter",1.0]]`),o}splitSegmentCrossingItegralThreshold(e,t,i){const s=100,n=20,a=n*n,_=y(this.m_a,this.m_eSquared,new N(0,b)),h=y(this.m_a,this.m_eSquared,new N(0,-b)),o=this.splitSegmentPassingThroughPole(e);for(let m of o){const e=m.getStartXY(),o=m.getEndXY(),l=y(this.m_a,this.m_eSquared,e),p=y(this.m_a,this.m_eSquared,o),u=new N,c=new J;let g=J.sqrDistance(_,l),d=J.sqrDistance(l,p);if(g<=s){if(!(d>a)){i.push(new r({start:e,end:o}));continue}c.assign(p.sub(l)),c.normalizeThis(),c.assign(l.add(c.mul(n))),u.assign(M(this.m_a,this.m_eSquared,c)),i.push(new r({start:e,end:u})),e.assign(u)}if(l.assign(y(this.m_a,this.m_eSquared,e)),g=J.sqrDistance(_,p),d=J.sqrDistance(l,p),g<=s){if(!(d>a)){i.push(new r({start:e,end:o}));continue}c.assign(p.sub(l)),c.normalizeThis(),c.assign(p.sub(c.mul(n))),u.assign(M(this.m_a,this.m_eSquared,c)),i.push(new r({start:u,end:o})),o.assign(u)}if(l.assign(y(this.m_a,this.m_eSquared,e)),p.assign(y(this.m_a,this.m_eSquared,o)),g=J.sqrDistance(h,l),d=J.sqrDistance(l,p),g<=s){if(!(d>a)){i.push(new r({start:e,end:o}));continue}c.assign(p.sub(l)),c.normalizeThis(),c.assign(l.add(c.mul(n))),u.assign(M(this.m_a,this.m_eSquared,c)),i.push(new r({start:e,end:u})),e.assign(u)}if(l.assign(y(this.m_a,this.m_eSquared,e)),p.assign(y(this.m_a,this.m_eSquared,o)),g=J.sqrDistance(h,p),d=J.sqrDistance(l,p),g<=s){if(!(d>a)){i.push(new r({start:e,end:o}));continue}c.assign(p.sub(l)),c.normalizeThis(),c.assign(p.sub(c.mul(n))),u.assign(M(this.m_a,this.m_eSquared,c)),i.push(new r({start:u,end:o})),o.assign(u)}t.push(new r({start:e,end:o}))}}splitSegmentPassingThroughPole(e){const t={stack:[],error:void 0,hasError:!1};try{const i=[],s=new J,n=new J,a=new J,_=new N,h=20,o=3.124139361,m=10,l=e.getStartXY(),p=e.getEndXY(),u=X(t,new A,!1);if(x.geodeticDistance(this.m_a,this.m_eSquared,l.x,l.y,p.x,p.y,u,null,null,2),Math.abs(p.x-l.x)>o&&u.val>h){const e=new H(new N(0,90),l.divide(this.m_rpu),p.divide(this.m_rpu),this.m_inputGCS,2,2);let t=C(e.makeFunctor(),0,1,1e-10);if(t.second<=m&&t.first>0&&t.first<1)return s.assign(y(this.m_a,this.m_eSquared,l)),n.assign(y(this.m_a,this.m_eSquared,p)),D(s,n,t.first,a),_.assign(M(this.m_a,this.m_eSquared,a)),i.push(new r({start:l,end:_})),i.push(new r({start:_,end:p})),i;if(e.setPointDistFrom(new N(0,-90)),t=C(e.makeFunctor(),0,1,1e-10),t.second<=m&&t.first>0&&t.first<1)return s.assign(y(this.m_a,this.m_eSquared,l)),n.assign(y(this.m_a,this.m_eSquared,p)),D(s,n,t.first,a),_.assign(M(this.m_a,this.m_eSquared,a)),i.push(new r({start:l,end:_})),i.push(new r({start:_,end:p})),i}return i.push(new r({start:l,end:p})),i}catch(i){t.error=i,t.hasError=!0}finally{j(t)}}adaptiveIntegrationWithRomberg(e,t){const i=e.makeFunctor();let s=0,n=1,a=i(s),r=i(n);const h=1e-17,o=1e-14;let m=(s+n)/2,l=i(m),p=Math.abs(l-a),u=Math.abs(r-l),c=0;for(;c++<32&&(p/u<.1||u/p<.1);)p<u?(t.pe(_(5,s,m,o,h,i)),s=m,a=l):(t.pe(_(5,m,n,o,h,i)),n=m,r=l),m=(s+n)/2,l=Math.abs(i(m)),p=Math.abs(l-a),u=Math.abs(r-l);t.pe(_(5,s,n,o,h,i))}loxodromeAreaHemi(e,t,i,s,n){const a=i.clone(),_=n.clone();let r,h,o,m,l,p,u,c,g,d,f,E,P,S,A,x;return a.make_negative&&a.changeSign(),_.make_negative&&_.changeSign(),f=s-t,1===Math.abs(a.sin_phi)||1===Math.abs(_.sin_phi)?e.half_qp*f:a.sin_phi===_.sin_phi?(d=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+G(e.e*a.sin_phi))*f,d):(A=Math.log(_.sin_half_phi_pf*a.sin_half_phi_pz/(_.sin_half_phi_pz*a.sin_half_phi_pf)),x=Math.log(_.sin_half_asin_e_sin_phi_pf*a.sin_half_asin_e_sin_phi_pz/(_.sin_half_asin_e_sin_phi_pz*a.sin_half_asin_e_sin_phi_pf)),1===this.m_eSquared?(l=0,r=.5*(A+_.sin_phi/_.one_m_e_2_sin_2_phi-a.sin_phi/a.one_m_e_2_sin_2_phi),h=0):(l=-2*e.atanh_e_over_e*(Math.log(_.one_p_sin_phi/a.one_p_sin_phi)-e.e*x),r=(A-e.e*x)/e.one_m_e_2,h=(Math.log(_.one_m_e_2_sin_2_phi/a.one_m_e_2_sin_2_phi)+l/e.atanh_e_over_e)/e.one_m_e_2),o=-x*(a.atanh_esin_phi+_.atanh_esin_phi),m=1/a.one_m_e_2_sin_2_phi-1/_.one_m_e_2_sin_2_phi,p=k(_.one_m_sin_phi/e.one_p_e,e.e)-k(a.one_m_sin_phi/e.one_p_e,e.e),u=k(_.one_p_sin_phi/e.one_p_e,e.e)-k(a.one_p_sin_phi/e.one_p_e,e.e),c=k(a.one_m_sin_phi/-e.one_m_e,e.e)-k(_.one_m_sin_phi/-e.one_m_e,e.e),g=k(a.one_p_sin_phi/-e.one_m_e,e.e)-k(_.one_p_sin_phi/-e.one_m_e,e.e),d=.25/r*(h+o+m+l+.5*(p+u+c+g)),d+=e.half_qp,E=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+G(e.e*a.sin_phi)),P=.5*e.one_m_e_2*_.sin_phi*(1/_.one_m_e_2_sin_2_phi+G(e.e*_.sin_phi)),P<E&&(S=E,E=P,P=S),d<E&&(d=E),d>P&&(d=P),d*=f,d)}loxodromeArea(e){const t=Math.PI/180;let i=0;const s=oe(),n=me(),a=me();s.e=Math.sqrt(this.m_eSquared),s.one_p_e=1+s.e,s.one_m_e=1-s.e,s.one_m_e_2=1-this.m_eSquared,s.atanh_e_over_e=G(s.e),this.m_eSquared>=1?s.half_qp=1:s.half_qp=.5*(1+s.atanh_e_over_e*s.one_m_e_2),s.f=.25*Math.PI,s.z=.75*Math.PI,a.initialize(0,s.e,s.f,s.z);const _=e.getPathCount(),r=new N,h=new N,o=e.getImpl().getAttributeStreamRef(0);for(let m=0;m<_;m++){const _=e.getPathStart(m),l=e.getPathEnd(m);if(!(l-_<=1)){o.queryPoint2D(2*(l-1),r);for(let e=_;e<l;e++){o.queryPoint2D(2*e,h);const m=r.y*t,l=h.y*t;if(e===_?(n.initialize(m,s.e,s.f,s.z),n.make_negative=!1):n.assign(a),a.initialize(l,s.e,s.f,s.z),a.make_negative=!1,r.y*h.y<0){if(r.y>=90&&h.y<=-90||h.y>=90&&r.y<=-90)return Number.NaN;const e=me();e.initialize(0,s.e,s.f,s.z),e.make_negative=!1;const _=n.atanh_sin_phi-s.e*n.atanh_esin_phi,o=a.atanh_sin_phi-s.e*a.atanh_esin_phi,l=(o*r.x-_*h.x)/(o-_);m<0?(n.make_negative=!0,i-=this.loxodromeAreaHemi(s,r.x*t,n,l*t,e),n.make_negative=!1,i+=this.loxodromeAreaHemi(s,l*t,e,h.x*t,a)):(i+=this.loxodromeAreaHemi(s,r.x*t,n,l*t,e),a.make_negative=!0,i-=this.loxodromeAreaHemi(s,l*t,e,h.x*t,a),a.make_negative=!1)}else r.y>=0?i+=this.loxodromeAreaHemi(s,r.x*t,n,h.x*t,a):(n.make_negative=!0,a.make_negative=!0,i-=this.loxodromeAreaHemi(s,r.x*t,n,h.x*t,a),n.make_negative=!1,a.make_negative=!1);r.assign(h)}}}return this.m_a*i*this.m_a}calculate(e){if(e.isEmpty()||e.getDimension()<2)return 0;if(e.getGeometryType()===i.enumEnvelope){const t=new a;return t.addEnvelope(e,!1),this.calculate(t)}return this.m_inputSR!==this.m_inputGCS&&null===this.m_transformPCS2GCS&&(this.m_transformPCS2GCS=o(this.m_inputSR,this.m_inputGCS,null)),this.executePolygonGeodeticArea(e)}}class de{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,i){return!1}canAccelerateGeometry(e){return!1}execute(e,i,s,n){if(t(e),4===s)return(new ne).execute(e,i,n);return new ge(i,s,n).calculate(e)}}export{de as OperatorGeodeticArea};
@@ -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{S as e,G as t}from"./SimpleGeometryCursor.js";import{c as r,b as s,t as n,d as i}from"./Geometry.js";import{x as m}from"./ProjectionTransformation.js";class o{getOperatorType(){return 10310}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,s,n){return new a(e,r,s,t,-1,-1,n)}execute(t,s,n,i,m){const o=new e([t]),a=this.executeMany(o,s,n,i,m).next();return a||r("null output"),a}}class a extends t{constructor(e,t,r,i,m,o,a){super(),this.m_progressTracker=a,o>0&&s(""),4!==r&&m>0&&s(""),t||n("");0===t.getCoordinateSystemType()&&n(""),i>0||m>0||n(""),this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=t,this.m_curveType=r,this.m_maxLengthMeters=i,this.m_maxDeviationMeters=m,this.m_maxAngle=o}next(){{let e;for(;e=this.m_inputGeoms.next();)return i(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.geodeticDensify(e);return null}}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}geodeticDensify(e){return m(e,this.m_spatialReference,this.m_curveType,this.m_maxLengthMeters,this.m_maxDeviationMeters,this.m_progressTracker)}}export{o as OperatorGeodeticDensifyByLength,a as OperatorGeodeticDensifyCursor};
5
+ import{S as e,G as t}from"./SimpleGeometryCursor.js";import{c as r,t as s,a as n,d as i}from"./Geometry.js";import{L as m}from"./ProjectionTransformation.js";class o{getOperatorType(){return 10310}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,s,n){return new a(e,r,s,t,-1,-1,n)}execute(t,s,n,i,m){const o=new e([t]),a=this.executeMany(o,s,n,i,m).next();return a||r("null output"),a}}class a extends t{constructor(e,t,r,i,m,o,a){super(),this.m_progressTracker=a,o>0&&s(""),4!==r&&m>0&&s(""),t||n("");0===t.getCoordinateSystemType()&&n(""),i>0||m>0||n(""),this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=t,this.m_curveType=r,this.m_maxLengthMeters=i,this.m_maxDeviationMeters=m,this.m_maxAngle=o}next(){{let e;for(;e=this.m_inputGeoms.next();)return i(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.geodeticDensify(e);return null}}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}geodeticDensify(e){return m(e,this.m_spatialReference,this.m_curveType,this.m_maxLengthMeters,this.m_maxDeviationMeters,this.m_progressTracker)}}export{o as OperatorGeodeticDensifyByLength,a as OperatorGeodeticDensifyCursor};
@@ -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{b as e,c as r}from"./tslib.es6.js";import{t,d as o}from"./Geometry.js";import{G as s,m as a}from"./GeodeticDistanceCalculator-CcF1gMZX.js";class u{getOperatorType(){return 10316}supportsCurves(){return!0}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}execute(e,r,t,o,s){return this.executeEx(e,r,t,o,s,null,null,Number.NaN)}executeEx(u,n,c,i,m,l,p,y){const N={stack:[],error:void 0,hasError:!1};try{if(0===c.getCoordinateSystemType()&&t(""),o(u),o(n),u.isEmpty()||n.isEmpty())return Number.NaN;Number.isNaN(y)&&(y=Number.MAX_VALUE);const r=e(N,new s(c,i,m,y,1),!1),E=a(),b=a(),x=r.calculate(u,n,E,b);return l&&l.outPoint.assign(E.outPoint),p&&p.outPoint.assign(b.outPoint),x}catch(E){N.error=E,N.hasError=!0}finally{r(N)}}}export{u as OperatorGeodeticDistance,a as makeOutput};
5
+ import{b as e,c as r}from"./tslib.es6.js";import{a as t,d as o}from"./Geometry.js";import{G as s,m as a}from"./GeodeticDistanceCalculator-CcF1gMZX.js";class u{getOperatorType(){return 10316}supportsCurves(){return!0}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}execute(e,r,t,o,s){return this.executeEx(e,r,t,o,s,null,null,Number.NaN)}executeEx(u,n,c,i,m,l,p,y){const N={stack:[],error:void 0,hasError:!1};try{if(0===c.getCoordinateSystemType()&&t(""),o(u),o(n),u.isEmpty()||n.isEmpty())return Number.NaN;Number.isNaN(y)&&(y=Number.MAX_VALUE);const r=e(N,new s(c,i,m,y,1),!1),E=a(),b=a(),x=r.calculate(u,n,E,b);return l&&l.outPoint.assign(E.outPoint),p&&p.outPoint.assign(b.outPoint),x}catch(E){N.error=E,N.hasError=!0}finally{r(N)}}}export{u as OperatorGeodeticDistance,a as makeOutput};
@@ -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{b as e,c as t}from"./tslib.es6.js";import{t as r,d as n,G as o,f as a}from"./Geometry.js";import{O as s}from"./OperatorShapePreservingLength.js";import{c as i,P as c}from"./QuadraticBezier.js";import{E as m}from"./Point2D.js";import{z as u,a0 as g,a1 as l,y as p,G as y,H as f,I as x}from"./ProjectionTransformation.js";import{O as h}from"./OperatorDensify.js";class d{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}execute(e,t,y,f){if(4===y)return(new s).execute(e,t,f);if(0===t.getCoordinateSystemType()&&r(""),n(e),e.isEmpty()||e.getDimension()<1)return 0;const d=t.getGCS(),S=x();d.querySpheroidData(S);const P=S.majorSemiAxis,G=S.e2,j=d.getUnit().getUnitToBaseFactor();let E;const T=e.getGeometryType();if(T===o.enumPolygon?E=e.getBoundary():T===o.enumEnvelope?E=i(e):a(T)?(E=new c({vd:e.getDescription()}),E.addSegment(e,!0)):E=e,E.hasNonLinearSegments()){E=(new h).execute(E,0,t.getTolerance(0),0,f)}if(d!==t){const r=t.getSRToGCSTransform();if(t.isPannable()){E=u(E,t),T===o.enumPolyline&&E===e&&(E=e.clone());const r=new m;t.getPannableExtent().queryIntervalX(r);for(let e=0,t=E.getPointCount();e<t;e++){const t=E.getXY(e);t.x=g(t.x,r),E.setXY(e,t)}}const n=E.createInstance();E=l(r,E,n,f)?n:(new p).execute(E,r,f)}return this._ExecuteMultiPathGeodeticLength(E,y,P,G,j)}_ExecuteMultiPathGeodeticLength(r,n,o,a,s){const i={stack:[],error:void 0,hasError:!1};try{const t=e(i,new y,!1);let c=0;const m=r.querySegmentIterator();for(;m.nextPath();)for(;m.hasNextSegment();){const e=m.nextSegment(),r=e.getStartXY(),i=e.getEndXY();r.scale(s),i.scale(s),f.geodeticDistance(o,a,r.x,r.y,i.x,i.y,t,null,null,n),c+=t.val}return c}catch(c){i.error=c,i.hasError=!0}finally{t(i)}}}export{d as OperatorGeodeticLength};
5
+ import{b as e,c as t}from"./tslib.es6.js";import{a as r,d as n,G as o,f as a}from"./Geometry.js";import{O as s}from"./OperatorShapePreservingLength.js";import{c as i,P as c}from"./QuadraticBezier.js";import{E as m}from"./Point2D.js";import{F as u,M as g,N as l,v as p,P as f,x as y,J as x}from"./ProjectionTransformation.js";import{O as h}from"./OperatorDensify.js";class d{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}execute(e,t,f,y){if(4===f)return(new s).execute(e,t,y);if(0===t.getCoordinateSystemType()&&r(""),n(e),e.isEmpty()||e.getDimension()<1)return 0;const d=t.getGCS(),P=x();d.querySpheroidData(P);const S=P.majorSemiAxis,j=P.e2,E=d.getUnit().getUnitToBaseFactor();let G;const v=e.getGeometryType();if(v===o.enumPolygon?G=e.getBoundary():v===o.enumEnvelope?G=i(e):a(v)?(G=new c({vd:e.getDescription()}),G.addSegment(e,!0)):G=e,G.hasNonLinearSegments()){G=(new h).execute(G,0,t.getTolerance(0),0,y)}if(d!==t){const r=t.getSRToGCSTransform();if(t.isPannable()){G=u(G,t),v===o.enumPolyline&&G===e&&(G=e.clone());const r=new m;t.getPannableExtent().queryIntervalX(r);for(let e=0,t=G.getPointCount();e<t;e++){const t=G.getXY(e);t.x=g(t.x,r),G.setXY(e,t)}}const n=G.createInstance();G=l(r,G,n,y)?n:(new p).execute(G,r,y)}return this._ExecuteMultiPathGeodeticLength(G,f,S,j,E)}_ExecuteMultiPathGeodeticLength(r,n,o,a,s){const i={stack:[],error:void 0,hasError:!1};try{const t=e(i,new f,!1);let c=0;const m=r.querySegmentIterator();for(;m.nextPath();)for(;m.hasNextSegment();){const e=m.nextSegment(),r=e.getStartXY(),i=e.getEndXY();r.scale(s),i.scale(s),y.geodeticDistance(o,a,r.x,r.y,i.x,i.y,t,null,null,n),c+=t.val}return c}catch(c){i.error=c,i.hasError=!0}finally{t(i)}}}export{d as OperatorGeodeticLength};
@@ -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 r,r as e}from"./ProjectionTransformation.js";class t extends r{getOperatorType(){return 4}execute(r,t,o,s){return!e(r,t,o,4,s)}}export{t as O};
5
+ import{e,r}from"./ProjectionTransformation.js";class t extends e{getOperatorType(){return 4}execute(e,t,o,s){return!r(e,t,o,4,s)}}export{t as O};
@@ -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 e}from"./SimpleGeometryCursor.js";import{E as t,n as s,a as r}from"./QuadraticBezier.js";import{d as n,G as o,g as a,t as i}from"./Geometry.js";import{Envelope2D as m}from"./Envelope2D.js";import{i as l,b as g,P as h}from"./Envelope.js";import{g as u,k as c,q as p,t as P,u as y,C as _}from"./ProjectionTransformation.js";class d{getOperatorType(){return 10700}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t,s,r=1){return new I(e,t,s,r)}}class I extends e{constructor(e,t,s,r){super(),this.m_progressTracker=s,this.m_inputGeoms=e,this.m_spatialReference=t,this.m_currentGeometry=null,this.m_singlePartIndex=-1,this.m_singlePartCount=-1,this.m_polygonStart=-1,this.m_index=-1,this.m_options=r}tock(){return!0}getRank(){return 1}next(){if(this.m_singlePartIndex===this.m_singlePartCount){const e=this.m_inputGeoms.next();if(null===e)return null;if(n(e),e.getGeometryType()===o.enumPolygon)if(1===this.m_options)this.m_currentGeometry=(new u).execute(e,this.m_spatialReference,!1,this.m_progressTracker);else if(2===this.m_options)if(e.getPathCount()<2)this.m_currentGeometry=e;else{const n=[0],o=e.getImpl().getIsSimple(0,n);if(l(o))this.m_currentGeometry=e;else{const n=new t,o=n.addGeometry(e);let i=null;if(n.hasCurves()){i=new _;const t=new m;e.queryEnvelope(t);const s=g(null,e,!0),r=c(s.total(),t);p(n,r,s.total(),12e3,null,i,null,this.m_progressTracker)}const l=n.createPathUserIndex();{let e=0;for(let t=n.getFirstPath(o);t!==s;t=n.getNextPath(t))n.setPathUserIndex(t,l,e++)}const h=P(n,o,this.m_progressTracker);a(h>=0);const u=[];for(let e=n.getFirstPath(o);e!==s;e=n.getNextPath(e))u.push(e);u.sort(((e,t)=>Math.abs(n.getPathUserIndex(e,h))-Math.abs(n.getPathUserIndex(t,h))));const y=e,d=new r({vd:e.getDescription()});d.reserveParts(y.getPointCount(),y.getPathCount());for(let e=0,t=u.length;e<t;e++){const t=u[e],s=n.getPathUserIndex(t,l),r=y.calculateRingArea2D(s)>0,o=n.getPathUserIndex(t,h)>=0;d.addPath(y,s,r===o)}this.m_currentGeometry=d}}else i("");else this.m_currentGeometry=e;this.m_singlePartCount=f(this.m_currentGeometry),this.m_singlePartIndex=0,this.m_polygonStart=0,this.m_index=this.m_inputGeoms.getGeometryID()}const e=this.getSingleGeometry(this.m_singlePartIndex,this.m_singlePartCount,this.m_polygonStart,this.m_currentGeometry);return e.getGeometryType()===o.enumPolygon&&(this.m_polygonStart+=e.getPathCount()),this.m_singlePartIndex++,e}getGeometryID(){return this.m_index}getSingleGeometry(e,t,s,r){let n=null;switch(r.getGeometryType()){case o.enumMultiPoint:n=new h({vd:r.getDescription()}),r.isEmpty()||r.getPointByVal(e,n);break;case o.enumPolyline:if(1===t)n=r;else{n=r.createInstance(),n.getImpl().addPath(r.getImpl(),e,!0);const t=[0],s=r.getImpl().getIsSimple(0,t);n.getImpl().setIsSimple(s,t[0],!0)}break;case o.enumPolygon:if(1===t)n=r;else{n=r.createInstance();const e=n.getImpl(),t=r.getImpl(),o=t.getPathFlagsStreamRef();let a=s;const i=t.getPathCount();do{e.addPath(t,a,!0),a++}while(a<i&&!(8&o.read(a)));e.getPathFlagsStreamRef().setBits(0,8);const m=[0],l=t.getIsSimple(0,m);e.setIsSimple(l,m[0],!0)}break;default:n=r}return n}}function f(e){return e.isEmpty()?1:y(e)}export{d as O};
5
+ import{G as e}from"./SimpleGeometryCursor.js";import{E as t,n as s,a as r}from"./QuadraticBezier.js";import{d as n,G as o,g as a,a as i}from"./Geometry.js";import{Envelope2D as m}from"./Envelope2D.js";import{i as l,b as g,P as h}from"./Envelope.js";import{O as u,k as c,q as p,t as P,u as y,C as _}from"./ProjectionTransformation.js";class d{getOperatorType(){return 10700}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t,s,r=1){return new I(e,t,s,r)}}class I extends e{constructor(e,t,s,r){super(),this.m_progressTracker=s,this.m_inputGeoms=e,this.m_spatialReference=t,this.m_currentGeometry=null,this.m_singlePartIndex=-1,this.m_singlePartCount=-1,this.m_polygonStart=-1,this.m_index=-1,this.m_options=r}tock(){return!0}getRank(){return 1}next(){if(this.m_singlePartIndex===this.m_singlePartCount){const e=this.m_inputGeoms.next();if(null===e)return null;if(n(e),e.getGeometryType()===o.enumPolygon)if(1===this.m_options)this.m_currentGeometry=(new u).execute(e,this.m_spatialReference,!1,this.m_progressTracker);else if(2===this.m_options)if(e.getPathCount()<2)this.m_currentGeometry=e;else{const n=[0],o=e.getImpl().getIsSimple(0,n);if(l(o))this.m_currentGeometry=e;else{const n=new t,o=n.addGeometry(e);let i=null;if(n.hasCurves()){i=new _;const t=new m;e.queryEnvelope(t);const s=g(null,e,!0),r=c(s.total(),t);p(n,r,s.total(),12e3,null,i,null,this.m_progressTracker)}const l=n.createPathUserIndex();{let e=0;for(let t=n.getFirstPath(o);t!==s;t=n.getNextPath(t))n.setPathUserIndex(t,l,e++)}const h=P(n,o,this.m_progressTracker);a(h>=0);const u=[];for(let e=n.getFirstPath(o);e!==s;e=n.getNextPath(e))u.push(e);u.sort(((e,t)=>Math.abs(n.getPathUserIndex(e,h))-Math.abs(n.getPathUserIndex(t,h))));const y=e,d=new r({vd:e.getDescription()});d.reserveParts(y.getPointCount(),y.getPathCount());for(let e=0,t=u.length;e<t;e++){const t=u[e],s=n.getPathUserIndex(t,l),r=y.calculateRingArea2D(s)>0,o=n.getPathUserIndex(t,h)>=0;d.addPath(y,s,r===o)}this.m_currentGeometry=d}}else i("");else this.m_currentGeometry=e;this.m_singlePartCount=f(this.m_currentGeometry),this.m_singlePartIndex=0,this.m_polygonStart=0,this.m_index=this.m_inputGeoms.getGeometryID()}const e=this.getSingleGeometry(this.m_singlePartIndex,this.m_singlePartCount,this.m_polygonStart,this.m_currentGeometry);return e.getGeometryType()===o.enumPolygon&&(this.m_polygonStart+=e.getPathCount()),this.m_singlePartIndex++,e}getGeometryID(){return this.m_index}getSingleGeometry(e,t,s,r){let n=null;switch(r.getGeometryType()){case o.enumMultiPoint:n=new h({vd:r.getDescription()}),r.isEmpty()||r.getPointByVal(e,n);break;case o.enumPolyline:if(1===t)n=r;else{n=r.createInstance(),n.getImpl().addPath(r.getImpl(),e,!0);const t=[0],s=r.getImpl().getIsSimple(0,t);n.getImpl().setIsSimple(s,t[0],!0)}break;case o.enumPolygon:if(1===t)n=r;else{n=r.createInstance();const e=n.getImpl(),t=r.getImpl(),o=t.getPathFlagsStreamRef();let a=s;const i=t.getPathCount();do{e.addPath(t,a,!0),a++}while(a<i&&!(8&o.read(a)));e.getPathFlagsStreamRef().setBits(0,8);const m=[0],l=t.getIsSimple(0,m);e.setIsSimple(l,m[0],!0)}break;default:n=r}return n}}function f(e){return e.isEmpty()?1:y(e)}export{d as O};
@@ -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 r,r as e}from"./ProjectionTransformation.js";class t extends r{getOperatorType(){return 9}execute(r,t,o,s){return e(r,t,o,32,s)}}export{t as O};
5
+ import{e,r}from"./ProjectionTransformation.js";class t extends e{getOperatorType(){return 9}execute(e,t,o,s){return r(e,t,o,32,s)}}export{t as O};
@@ -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,b as t,G as r}from"./Geometry.js";import{Envelope2D as n}from"./Envelope2D.js";import{m as s,a as o,c as i}from"./SideCalculator2D-BNwb5gvz.js";import{c as a}from"./Envelope.js";import{P as u}from"./Point2D.js";import{i as c}from"./ProjectionTransformation.js";class m{getOperatorType(){return 10500}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}getNearestCoordinate(n,o,i,a){if(o.isNAN()&&e("NAN xy coordinates are not allowed"),n.isEmpty())return s();switch(n.getGeometryType()){case r.enumPoint:return this.pointGetNearestVertex(n,o);case r.enumMultiPoint:return this.multiVertexGetNearestVertex(n,o);case r.enumPolyline:case r.enumPolygon:return this.multiPathGetNearestCoordinate(n,o,i,a);default:t("")}}getNearestVertex(n,o){if(o.isNAN()&&e("NAN xy coordinates are not allowed"),n.isEmpty())return s();switch(n.getGeometryType()){case r.enumPoint:return this.pointGetNearestVertex(n,o);case r.enumMultiPoint:case r.enumPolyline:case r.enumPolygon:return this.multiVertexGetNearestVertex(n,o);default:t("")}}getNearestVertices(n,s,o,i){if(0===i&&e(""),s.isNAN()&&e("NAN xy coordinates are not allowed"),n.isEmpty())return[];switch(n.getGeometryType()){case r.enumPoint:return this.pointGetNearestVertices(n,s,o,i);case r.enumMultiPoint:case r.enumPolyline:case r.enumPolygon:return this.multiVertexGetNearestVertices(n,s,o,i);default:t("")}}multiPathGetNearestCoordinate(t,s,m,l){if(t.getGeometryType()===r.enumPolygon&&m){const e=new n;t.queryEnvelope(e);const r=a(null,e,!1);let i;if(i=c(t,s,l?0:r),0!==i){const e=o(s,-1,0);return l&&(e.m_bRightSide=!0),e}}const g=t.querySegmentIterator(),y=new u;let N=-1,p=-1,f=Number.MAX_VALUE,d=0;for(;g.nextPath();)for(;g.hasNextSegment();){const e=g.nextSegment(),t=e.getClosestCoordinate(s,!1),r=e.getCoord2D(t),n=u.sqrDistance(r,s);n<f?(d=1,y.assign(r),N=g.getStartPointIndex(),p=g.getPathIndex(),f=n):n===f&&d++}-1===N&&e("");const h=o(y,N,Math.sqrt(f));if(l)if(t.getGeometryType()!==r.enumPolygon){let e=!1;if(d>1){const r=i(t,s,N,p);e=0!==r&&3!==r}else{g.resetToVertex(N,p);const t=g.nextSegment();e=0!==i(t,s)}h.m_bRightSide=e}else if(!m){0!==c(t,s,0)&&(h.m_bRightSide=!0)}return h}pointGetNearestVertex(e,t){const r=e.getXY(),n=u.distance(r,t);return o(r,0,n)}multiVertexGetNearestVertex(e,t){const r=e.getAttributeStreamRef(0),n=e.getPointCount();let s=-1;const i=new u;let a=Number.MAX_VALUE;const c=new u;for(let o=0;o<n;o++){r.queryPoint2D(2*o,c);const e=u.sqrDistance(c,t);e<a&&(i.assign(c),s=o,a=e)}return o(i,s,Math.sqrt(a))}pointGetNearestVertices(e,t,r,n){const s=[];if(0!==n){const n=r*r,i=e.getXY(),a=u.sqrDistance(i,t);a<=n&&s.push(o(i,0,Math.sqrt(a)))}return s}multiVertexGetNearestVertices(e,t,r,n){const s=[];if(0!==n){const i=e.getAttributeStreamRef(0),a=e.getPointCount();s.length=n+1;const c=r*r;for(let e=0;e<a;e++){const r=i.read(2*e),n=i.read(2*e+1),a=t.x-r,m=t.y-n,l=a*a+m*m;l<=c&&s.push(o(u.construct(r,n),e,Math.sqrt(l)))}s.sort(((e,t)=>e.m_distance-t.m_distance))}return s.slice(0,n)}}export{m as O};
5
+ import{a as e,t,G as r}from"./Geometry.js";import{Envelope2D as n}from"./Envelope2D.js";import{m as s,a as o,c as i}from"./SideCalculator2D-BNwb5gvz.js";import{a}from"./Envelope.js";import{P as u}from"./Point2D.js";import{h as c}from"./ProjectionTransformation.js";class m{getOperatorType(){return 10500}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}getNearestCoordinate(n,o,i,a){if(o.isNAN()&&e("NAN xy coordinates are not allowed"),n.isEmpty())return s();switch(n.getGeometryType()){case r.enumPoint:return this.pointGetNearestVertex(n,o);case r.enumMultiPoint:return this.multiVertexGetNearestVertex(n,o);case r.enumPolyline:case r.enumPolygon:return this.multiPathGetNearestCoordinate(n,o,i,a);default:t("")}}getNearestVertex(n,o){if(o.isNAN()&&e("NAN xy coordinates are not allowed"),n.isEmpty())return s();switch(n.getGeometryType()){case r.enumPoint:return this.pointGetNearestVertex(n,o);case r.enumMultiPoint:case r.enumPolyline:case r.enumPolygon:return this.multiVertexGetNearestVertex(n,o);default:t("")}}getNearestVertices(n,s,o,i){if(0===i&&e(""),s.isNAN()&&e("NAN xy coordinates are not allowed"),n.isEmpty())return[];switch(n.getGeometryType()){case r.enumPoint:return this.pointGetNearestVertices(n,s,o,i);case r.enumMultiPoint:case r.enumPolyline:case r.enumPolygon:return this.multiVertexGetNearestVertices(n,s,o,i);default:t("")}}multiPathGetNearestCoordinate(t,s,m,l){if(t.getGeometryType()===r.enumPolygon&&m){const e=new n;t.queryEnvelope(e);const r=a(null,e,!1);let i;if(i=c(t,s,l?0:r),0!==i){const e=o(s,-1,0);return l&&(e.m_bRightSide=!0),e}}const g=t.querySegmentIterator(),y=new u;let N=-1,p=-1,f=Number.MAX_VALUE,h=0;for(;g.nextPath();)for(;g.hasNextSegment();){const e=g.nextSegment(),t=e.getClosestCoordinate(s,!1),r=e.getCoord2D(t),n=u.sqrDistance(r,s);n<f?(h=1,y.assign(r),N=g.getStartPointIndex(),p=g.getPathIndex(),f=n):n===f&&h++}-1===N&&e("");const d=o(y,N,Math.sqrt(f));if(l)if(t.getGeometryType()!==r.enumPolygon){let e=!1;if(h>1){const r=i(t,s,N,p);e=0!==r&&3!==r}else{g.resetToVertex(N,p);const t=g.nextSegment();e=0!==i(t,s)}d.m_bRightSide=e}else if(!m){0!==c(t,s,0)&&(d.m_bRightSide=!0)}return d}pointGetNearestVertex(e,t){const r=e.getXY(),n=u.distance(r,t);return o(r,0,n)}multiVertexGetNearestVertex(e,t){const r=e.getAttributeStreamRef(0),n=e.getPointCount();let s=-1;const i=new u;let a=Number.MAX_VALUE;const c=new u;for(let o=0;o<n;o++){r.queryPoint2D(2*o,c);const e=u.sqrDistance(c,t);e<a&&(i.assign(c),s=o,a=e)}return o(i,s,Math.sqrt(a))}pointGetNearestVertices(e,t,r,n){const s=[];if(0!==n){const n=r*r,i=e.getXY(),a=u.sqrDistance(i,t);a<=n&&s.push(o(i,0,Math.sqrt(a)))}return s}multiVertexGetNearestVertices(e,t,r,n){const s=[];if(0!==n){const i=e.getAttributeStreamRef(0),a=e.getPointCount();s.length=n+1;const c=r*r;for(let e=0;e<a;e++){const r=i.read(2*e),n=i.read(2*e+1),a=t.x-r,m=t.y-n,l=a*a+m*m;l<=c&&s.push(o(u.construct(r,n),e,Math.sqrt(l)))}s.sort(((e,t)=>e.m_distance-t.m_distance))}return s.slice(0,n)}}export{m as O};
@@ -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{b as e,c as t}from"./tslib.es6.js";import{t as n,G as s,h as o,b as r,c as i,g as a}from"./Geometry.js";import{m as c,a as m,c as l}from"./SideCalculator2D-BNwb5gvz.js";import{a as u,b as g,S as f,s as y}from"./QuadraticBezier.js";import{m as S,P as d,d as N,b as x}from"./Point2D.js";import{P as h,h as p}from"./Envelope.js";import{G as A}from"./SimpleGeometryCursor.js";import{y as C,O as P,X as w,S as E,a2 as _,a3 as T,a4 as j,_ as G,a5 as I,I as D,G as b,H as v,a6 as R,a7 as U,a8 as q,a9 as B}from"./ProjectionTransformation.js";import{O as F}from"./OperatorShapePreservingDensify.js";class O{getOperatorType(){return 10501}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}getNearestCoordinate(e,t,y,S,N,x){if(t.isNAN()&&n("NAN xy coordinates are not allowed"),e.isEmpty())return c();if(Number.isNaN(S)&&(S=0),S>=0||n("maxDeviationMeters"),0===e.getDimension())return this.getNearestVertex(e,t,y);const A=e.getGeometryType();if(A===s.enumGeometryCollection){const n=e;let s=c();for(let e=0,o=n.getGeometryCount();e<o;++e){const o=n.getGeometry(e),r=this.getNearestCoordinate(o,t,y,S,N,x);if(!r.isEmpty()){if(0===r.m_distance)return r;r.m_distance>=s.m_distance||(s=r,s.m_geometryIndex=e)}}return s}if(A===s.enumEnvelope){const n=new u;return n.addEnvelope(e,!1),this.getNearestCoordinate(n,t,y,S,N,x)}o(A)||r("Operation is not implemented for this geometry type");const I=e;if((N||x)&&A===s.enumPolygon){const n=()=>{const e=m(t,-1,0);return e.m_bRightSide=!0,e};if(y.isPannable()){const s=(new C).foldInto360Range(new h(t),y);if(s.isEmpty())return c();const o=(new C).foldInto360Range(e,y);if(o.isEmpty())return c();if((new P).execute(o,s,y,null)&&N)return n()}else{const e=(new C).clipToSpatialReference(new h(t),y,null,1);if(e.isEmpty())return c();const s=w(I,y,0,null);if(s.isEmpty())return c();if((new P).execute(s,e,y,null)&&N)return n()}}const b=y!==y.getGCS()?y.getSRToGCSTransform():null,v=new d;if(b?(new C).transform(b,[t],1,[v],!1):v.assign(t),v.isNAN())return c();const R=X(I,t,y,1);let U=R.m_distance;if(0===U)return R;Number.isNaN(U)?U=Number.POSITIVE_INFINITY:U*=1+1e-7;const q=y.getGCS(),B=q.getUnit().getUnitToBaseFactor(),O=v.clone();O.scale(B);const V=D();y.querySpheroidData(V);const k=E(V.majorSemiAxis,V.e2,O),L=_(V.majorSemiAxis,V.e2),z=new M(I.querySegmentIterator());0===S&&(S=.01);const H=V.majorSemiAxis*g(45),Q=(new F).executeMany(z,y,H,S,0,null),J=[];let K=-1;const W=new p,Z=new f;for(let n=Q.next();null!==n;n=Q.next()){if(n.isEmpty())continue;const t=Q.getGeometryID(),s=e.getPathIndexFromPointIndex(t);e.isClosedPath(s)&&I.getPathEnd(s);const o=n;for(let e=0,n=o.getPathCount();e<n;++e){J.length=0;for(let t=o.getPathStart(e),r=o.getPathEnd(e);t<r;++t)J.push(o.getXY(t));if(b&&(new C).transform(b,J,J.length,J,!1),J.length>3){const e=Y(J,J.length,v,q,1);if(e.m_distance<U){U=e.m_distance,W.assign(E(V.majorSemiAxis,V.e2,e.m_coordinate.mul(B))),K=t;let n=e.m_vertexIndex;n+1===J.length&&(n-=1),o.getSegmentBuffer(n,Z,!0)}}J.forEach((e=>e.mulThis(B)));const n=E(V.majorSemiAxis,V.e2,J[0]),s=new p;for(let e=1,r=J.length;e<r;++e){const r=E(V.majorSemiAxis,V.e2,J[e]);if(T(L,k,n,r,s)<U){const{second:s}=j(V.majorSemiAxis,V.e2,k,n,r,2,null);if(s<=U){const s=new p,{second:i}=j(V.majorSemiAxis,V.e2,k,n,r,0,s);i<U&&(U=i,W.assign(s),K=t,o.getSegmentBuffer(e-1,Z,!0))}}n.assign(r)}}}if(!Number.isFinite(U))return c();-1===K&&n("");const $=G(V.majorSemiAxis,V.e2,W);$.divThis(B);const ee=$.clone(),te=y!==y.getGCS()?y.getGCSToSRTransform():null;te&&(new C).transform(te,[$],1,[ee],!1),ee.isNAN()&&i("closestPoint2DSr.isNAN()"),a(!Z.empty());const ne=Z.get().getClosestCoordinate(ee,!1);ee.assign(Z.get().getCoord2D(ne)),b?(new C).transform(b,[ee],1,[$],!1):$.assign(ee),a(!$.isNAN());const se=this.getNearestVertex(new h($),v,y.getGCS()),oe=m(ee,K,se.m_distance);if(x&&e.getDimension()>0){const n=l(e,t,-1,-1),s=0!==n&&3!==n;oe.m_bRightSide=s}return oe}getNearestVertex(e,t,o){if(t.isNAN()&&n("NAN xy coordinates are not allowed"),e.isEmpty())return c();switch(e.getGeometryType()){case s.enumPoint:return V(e,t,o);case s.enumMultiPoint:case s.enumPolyline:case s.enumPolygon:return X(e,t,o);default:r("")}}getNearestVertexPoint2D(e,t,n,s){return Y(e,t,n,s)}getNearestVertices(e,t,o,i,a){if(t.isNAN()&&n("NAN xy coordinates are not allowed"),e.isEmpty())return[];switch(e.getGeometryType()){case s.enumPoint:{const n=V(e,t,o);if(!n.isEmpty()&&n.m_distance<i&&a>=1){const e=[];return e.push(n),e}return[]}case s.enumMultiPoint:case s.enumPolyline:case s.enumPolygon:return k(e,t,o,i,a);default:r("")}}}function V(s,o,r){const i={stack:[],error:void 0,hasError:!1};try{if(0===r.getCoordinateSystemType()&&n("Cannot use local SR"),1!==r.getCoordinateSystemType()){const e=new Array(2);e[0]=s.getXY(),e[1]=o.clone();const t=S(d,2);2!==I(r,e,2,t)&&n("Point cannot be projected to GCS");const i=r.getGCS(),a=V(new h(t[0]),t[1],i);return m(a.m_coordinate,0,a.m_distance)}const t=r.getUnit().getUnitToBaseFactor(),a=s.getXY();a.scale(t);const c=o.clone();c.scale(t);const l=D();r.querySpheroidData(l);const u=e(i,new b,!1);v.geodeticDistance(l.majorSemiAxis,l.e2,a.x,a.y,c.x,c.y,u,null,null,R.PE_LINETYPE_GEODESIC);const g=s.getXY();return m(g,0,u.val)}catch(a){i.error=a,i.hasError=!0}finally{t(i)}}function X(s,o,r,i=0){0===r.getCoordinateSystemType()&&n("Cannot use local SR");let a=s.getAttributeStreamRef(0),c=s.getPointCount();const l=r.getGCS(),u=o.clone();if(1!==r.getCoordinateSystemType()){const e=r.getSRToGCSTransform();if(U(e,[o],1,[u],null),u.isNAN())return m(d.getNAN(),-1,Number.NaN);const t=(new C).execute(s,e,null);a=t.getAttributeStreamRef(0),c=t.getPointCount()}const g=l.getUnit().getUnitToBaseFactor(),f=N(c,0);for(let e=0;e<c;++e)f[e]=e;y(c,f);const S=D();l.querySpheroidData(S);const h=u.clone();h.scale(g);const A=E(S.majorSemiAxis,S.e2,h);let P=-1,w=Number.MAX_VALUE;const _=q(S.majorSemiAxis,S.e2);let T=c;const j=new d,G=new d;for(let e=0;e<T;){if(a.queryPoint2D(2*f[e],j),j.isNAN())continue;G.assign(j),G.scale(g);const t=E(S.majorSemiAxis,S.e2,G);if(p.distance(t,A)>w){f[T-1]=x(f[e],f[e]=f[T-1]),T--;continue}const n=B(_,t,A);n<w&&(P=f[e],w=n),e++}if(0!==S.e2){const n={stack:[],error:void 0,hasError:!1};try{const t=e(n,new b,!1);for(let e=0;e<T;e++){if(a.queryPoint2D(2*f[e],j),j.isNAN())continue;G.assign(j),G.scale(g);const n=E(S.majorSemiAxis,S.e2,G);p.distance(n,A)>w||(v.geodeticDistance(S.majorSemiAxis,S.e2,h.x,h.y,G.x,G.y,t,null,null,i),t.val<w&&(P=f[e],w=t.val))}}catch(R){n.error=R,n.hasError=!0}finally{t(n)}}const I=new d;return-1!==P&&I.assign(s.getXY(P)),m(I,P,w)}function Y(s,o,r,i,a=0){0===i.getCoordinateSystemType()&&n("Cannot use local SR");const l=i.getGCS(),u=r.clone();if(1!==i.getCoordinateSystemType()){const e=i.getSRToGCSTransform();if(U(e,[r],1,[u],null),u.isNAN())return c();const t=S(d,o);U(e,s,o,t,null);const n=Y(t,o,r,l,a);return n.isEmpty()?n:m(s[n.m_vertexIndex],n.m_vertexIndex,n.m_distance)}const g=l.getUnit().getUnitToBaseFactor(),f=N(o,0);for(let e=0;e<o;++e)f[e]=e;y(o,f);const h=D();l.querySpheroidData(h);const A=u.clone();A.scale(g);const C=E(h.majorSemiAxis,h.e2,A);let P=-1,w=Number.MAX_VALUE;const _=q(h.majorSemiAxis,h.e2);let T=o;for(let e=0;e<T;){const t=s[f[e]];if(t.isNAN())continue;const n=t.clone();n.scale(g);const o=E(h.majorSemiAxis,h.e2,n);if(p.distance(o,C)>w){f[T-1]=x(f[e],f[e]=f[T-1]),T--;continue}const r=B(_,o,C);r<w&&(P=f[e],w=r),e++}if(0!==h.e2){const n={stack:[],error:void 0,hasError:!1};try{const t=e(n,new b,!1);for(let e=0;e<T;e++){const n=s[f[e]];if(n.isNAN())continue;const o=n.clone();o.scale(g);const r=E(h.majorSemiAxis,h.e2,o);p.distance(r,C)>w||(v.geodeticDistance(h.majorSemiAxis,h.e2,A.x,A.y,o.x,o.y,t,null,null,a),t.val<w&&(P=f[e],w=t.val))}}catch(G){n.error=G,n.hasError=!0}finally{t(n)}}const j=new d;return-1!==P&&j.assign(s[P]),m(j,P,w)}function k(s,o,r,i,a){const c={stack:[],error:void 0,hasError:!1};try{0===r.getCoordinateSystemType()&&n("Cannot use local SR");let t=s.getAttributeStreamRef(0),l=s.getPointCount();const u=r.getGCS(),g=o.clone();if(1!==r.getCoordinateSystemType()){const e=r.getSRToGCSTransform();if(U(e,[o],1,[g],null),g.isNAN())return[];const n=(new C).execute(s,e,null);t=n.getAttributeStreamRef(0),l=n.getPointCount()}const f=u.getUnit().getUnitToBaseFactor(),S=N(l,0);for(let e=0;e<l;++e)S[e]=e;y(l,S);const h=D();u.querySpheroidData(h);const A=g.clone();A.scale(f);const P=E(h.majorSemiAxis,h.e2,A),w=[];let _=l;const T=new d,j=new d;for(let e=0;e<_;){if(t.queryPoint2D(2*S[e],T),T.isNAN())continue;j.assign(T),j.scale(f);const n=E(h.majorSemiAxis,h.e2,j);p.distance(n,P)>i?(S[_-1]=x(S[e],S[e]=S[_-1]),_--):e++}const G=(e,t)=>e.m_distance-t.m_distance,I=e(c,new b,!1);for(let e=0;e<_;e++)t.queryPoint2D(2*S[e],T),T.isNAN()||(v.geodeticDistance(h.majorSemiAxis,h.e2,A.x,A.y,T.x*f,T.y*f,I,null,null,R.PE_LINETYPE_GEODESIC),I.val<i&&w.push(m(T,S[e],I.val)));return w.sort(G),w.slice(0,a)}catch(l){c.error=l,c.hasError=!0}finally{t(c)}}class M extends A{constructor(e){super(),this.m_first=!0,this.m_segIter=e,this.m_segIter.stripAttributes()}tock(){return!0}getRank(){return 1}next(){if(this.m_first){if(!this.m_segIter.nextPath())return null;this.m_first=!1}for(;;){if(this.m_segIter.hasNextSegment())return this.m_segIter.nextSegment().clone();if(!this.m_segIter.nextPath())break}return null}getGeometryID(){return this.m_segIter.getStartPointIndex()}}export{O as OperatorProximityGeodesic};
5
+ import{b as e,c as t}from"./tslib.es6.js";import{a as n,G as s,h as o,t as r,c as i,g as a}from"./Geometry.js";import{m as c,a as m,c as l}from"./SideCalculator2D-BNwb5gvz.js";import{a as u,b as g,S as f,s as y}from"./QuadraticBezier.js";import{m as S,P as d,d as N,c as x}from"./Point2D.js";import{P as h,d as p}from"./Envelope.js";import{G as A}from"./SimpleGeometryCursor.js";import{v as C,b as P,D as w,y as E,a2 as _,a3 as T,a4 as j,I as G,a5 as I,J as D,P as v,x as b,a6 as R,a7 as U,a8 as q,a9 as B}from"./ProjectionTransformation.js";import{O as F}from"./OperatorShapePreservingDensify.js";class V{getOperatorType(){return 10501}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}getNearestCoordinate(e,t,y,S,N,x){if(t.isNAN()&&n("NAN xy coordinates are not allowed"),e.isEmpty())return c();if(Number.isNaN(S)&&(S=0),S>=0||n("maxDeviationMeters"),0===e.getDimension())return this.getNearestVertex(e,t,y);const A=e.getGeometryType();if(A===s.enumGeometryCollection){const n=e;let s=c();for(let e=0,o=n.getGeometryCount();e<o;++e){const o=n.getGeometry(e),r=this.getNearestCoordinate(o,t,y,S,N,x);if(!r.isEmpty()){if(0===r.m_distance)return r;r.m_distance>=s.m_distance||(s=r,s.m_geometryIndex=e)}}return s}if(A===s.enumEnvelope){const n=new u;return n.addEnvelope(e,!1),this.getNearestCoordinate(n,t,y,S,N,x)}o(A)||r("Operation is not implemented for this geometry type");const I=e;if((N||x)&&A===s.enumPolygon){const n=()=>{const e=m(t,-1,0);return e.m_bRightSide=!0,e};if(y.isPannable()){const s=(new C).foldInto360Range(new h(t),y);if(s.isEmpty())return c();const o=(new C).foldInto360Range(e,y);if(o.isEmpty())return c();if((new P).execute(o,s,y,null)&&N)return n()}else{const e=(new C).clipToSpatialReference(new h(t),y,null,1);if(e.isEmpty())return c();const s=w(I,y,0,null);if(s.isEmpty())return c();if((new P).execute(s,e,y,null)&&N)return n()}}const v=y!==y.getGCS()?y.getSRToGCSTransform():null,b=new d;if(v?(new C).transform(v,[t],1,[b],!1):b.assign(t),b.isNAN())return c();const R=k(I,t,y,1);let U=R.m_distance;if(0===U)return R;Number.isNaN(U)?U=Number.POSITIVE_INFINITY:U*=1+1e-7;const q=y.getGCS(),B=q.getUnit().getUnitToBaseFactor(),V=b.clone();V.scale(B);const Y=D();y.querySpheroidData(Y);const X=E(Y.majorSemiAxis,Y.e2,V),L=_(Y.majorSemiAxis,Y.e2),z=new M(I.querySegmentIterator());0===S&&(S=.01);const J=Y.majorSemiAxis*g(45),Q=(new F).executeMany(z,y,J,S,0,null),H=[];let K=-1;const W=new p,Z=new f;for(let n=Q.next();null!==n;n=Q.next()){if(n.isEmpty())continue;const t=Q.getGeometryID(),s=e.getPathIndexFromPointIndex(t);e.isClosedPath(s)&&I.getPathEnd(s);const o=n;for(let e=0,n=o.getPathCount();e<n;++e){H.length=0;for(let t=o.getPathStart(e),r=o.getPathEnd(e);t<r;++t)H.push(o.getXY(t));if(v&&(new C).transform(v,H,H.length,H,!1),H.length>3){const e=O(H,H.length,b,q,1);if(e.m_distance<U){U=e.m_distance,W.assign(E(Y.majorSemiAxis,Y.e2,e.m_coordinate.mul(B))),K=t;let n=e.m_vertexIndex;n+1===H.length&&(n-=1),o.getSegmentBuffer(n,Z,!0)}}H.forEach((e=>e.mulThis(B)));const n=E(Y.majorSemiAxis,Y.e2,H[0]),s=new p;for(let e=1,r=H.length;e<r;++e){const r=E(Y.majorSemiAxis,Y.e2,H[e]);if(T(L,X,n,r,s)<U){const{second:s}=j(Y.majorSemiAxis,Y.e2,X,n,r,2,null);if(s<=U){const s=new p,{second:i}=j(Y.majorSemiAxis,Y.e2,X,n,r,0,s);i<U&&(U=i,W.assign(s),K=t,o.getSegmentBuffer(e-1,Z,!0))}}n.assign(r)}}}if(!Number.isFinite(U))return c();-1===K&&n("");const $=G(Y.majorSemiAxis,Y.e2,W);$.divThis(B);const ee=$.clone(),te=y!==y.getGCS()?y.getGCSToSRTransform():null;te&&(new C).transform(te,[$],1,[ee],!1),ee.isNAN()&&i("closestPoint2DSr.isNAN()"),a(!Z.empty());const ne=Z.get().getClosestCoordinate(ee,!1);ee.assign(Z.get().getCoord2D(ne)),v?(new C).transform(v,[ee],1,[$],!1):$.assign(ee),a(!$.isNAN());const se=this.getNearestVertex(new h($),b,y.getGCS()),oe=m(ee,K,se.m_distance);if(x&&e.getDimension()>0){const n=l(e,t,-1,-1),s=0!==n&&3!==n;oe.m_bRightSide=s}return oe}getNearestVertex(e,t,o){if(t.isNAN()&&n("NAN xy coordinates are not allowed"),e.isEmpty())return c();switch(e.getGeometryType()){case s.enumPoint:return Y(e,t,o);case s.enumMultiPoint:case s.enumPolyline:case s.enumPolygon:return k(e,t,o);default:r("")}}getNearestVertexPoint2D(e,t,n,s){return O(e,t,n,s)}getNearestVertices(e,t,o,i,a){if(t.isNAN()&&n("NAN xy coordinates are not allowed"),e.isEmpty())return[];switch(e.getGeometryType()){case s.enumPoint:{const n=Y(e,t,o);if(!n.isEmpty()&&n.m_distance<i&&a>=1){const e=[];return e.push(n),e}return[]}case s.enumMultiPoint:case s.enumPolyline:case s.enumPolygon:return X(e,t,o,i,a);default:r("")}}}function Y(s,o,r){const i={stack:[],error:void 0,hasError:!1};try{if(0===r.getCoordinateSystemType()&&n("Cannot use local SR"),1!==r.getCoordinateSystemType()){const e=new Array(2);e[0]=s.getXY(),e[1]=o.clone();const t=S(d,2);2!==I(r,e,2,t)&&n("Point cannot be projected to GCS");const i=r.getGCS(),a=Y(new h(t[0]),t[1],i);return m(a.m_coordinate,0,a.m_distance)}const t=r.getUnit().getUnitToBaseFactor(),a=s.getXY();a.scale(t);const c=o.clone();c.scale(t);const l=D();r.querySpheroidData(l);const u=e(i,new v,!1);b.geodeticDistance(l.majorSemiAxis,l.e2,a.x,a.y,c.x,c.y,u,null,null,R.PE_LINETYPE_GEODESIC);const g=s.getXY();return m(g,0,u.val)}catch(a){i.error=a,i.hasError=!0}finally{t(i)}}function k(s,o,r,i=0){0===r.getCoordinateSystemType()&&n("Cannot use local SR");let a=s.getAttributeStreamRef(0),c=s.getPointCount();const l=r.getGCS(),u=o.clone();if(1!==r.getCoordinateSystemType()){const e=r.getSRToGCSTransform();if(U(e,[o],1,[u],null),u.isNAN())return m(d.getNAN(),-1,Number.NaN);const t=(new C).execute(s,e,null);a=t.getAttributeStreamRef(0),c=t.getPointCount()}const g=l.getUnit().getUnitToBaseFactor(),f=N(c,0);for(let e=0;e<c;++e)f[e]=e;y(c,f);const S=D();l.querySpheroidData(S);const h=u.clone();h.scale(g);const A=E(S.majorSemiAxis,S.e2,h);let P=-1,w=Number.MAX_VALUE;const _=q(S.majorSemiAxis,S.e2);let T=c;const j=new d,G=new d;for(let e=0;e<T;){if(a.queryPoint2D(2*f[e],j),j.isNAN())continue;G.assign(j),G.scale(g);const t=E(S.majorSemiAxis,S.e2,G);if(p.distance(t,A)>w){f[T-1]=x(f[e],f[e]=f[T-1]),T--;continue}const n=B(_,t,A);n<w&&(P=f[e],w=n),e++}if(0!==S.e2){const n={stack:[],error:void 0,hasError:!1};try{const t=e(n,new v,!1);for(let e=0;e<T;e++){if(a.queryPoint2D(2*f[e],j),j.isNAN())continue;G.assign(j),G.scale(g);const n=E(S.majorSemiAxis,S.e2,G);p.distance(n,A)>w||(b.geodeticDistance(S.majorSemiAxis,S.e2,h.x,h.y,G.x,G.y,t,null,null,i),t.val<w&&(P=f[e],w=t.val))}}catch(R){n.error=R,n.hasError=!0}finally{t(n)}}const I=new d;return-1!==P&&I.assign(s.getXY(P)),m(I,P,w)}function O(s,o,r,i,a=0){0===i.getCoordinateSystemType()&&n("Cannot use local SR");const l=i.getGCS(),u=r.clone();if(1!==i.getCoordinateSystemType()){const e=i.getSRToGCSTransform();if(U(e,[r],1,[u],null),u.isNAN())return c();const t=S(d,o);U(e,s,o,t,null);const n=O(t,o,r,l,a);return n.isEmpty()?n:m(s[n.m_vertexIndex],n.m_vertexIndex,n.m_distance)}const g=l.getUnit().getUnitToBaseFactor(),f=N(o,0);for(let e=0;e<o;++e)f[e]=e;y(o,f);const h=D();l.querySpheroidData(h);const A=u.clone();A.scale(g);const C=E(h.majorSemiAxis,h.e2,A);let P=-1,w=Number.MAX_VALUE;const _=q(h.majorSemiAxis,h.e2);let T=o;for(let e=0;e<T;){const t=s[f[e]];if(t.isNAN())continue;const n=t.clone();n.scale(g);const o=E(h.majorSemiAxis,h.e2,n);if(p.distance(o,C)>w){f[T-1]=x(f[e],f[e]=f[T-1]),T--;continue}const r=B(_,o,C);r<w&&(P=f[e],w=r),e++}if(0!==h.e2){const n={stack:[],error:void 0,hasError:!1};try{const t=e(n,new v,!1);for(let e=0;e<T;e++){const n=s[f[e]];if(n.isNAN())continue;const o=n.clone();o.scale(g);const r=E(h.majorSemiAxis,h.e2,o);p.distance(r,C)>w||(b.geodeticDistance(h.majorSemiAxis,h.e2,A.x,A.y,o.x,o.y,t,null,null,a),t.val<w&&(P=f[e],w=t.val))}}catch(G){n.error=G,n.hasError=!0}finally{t(n)}}const j=new d;return-1!==P&&j.assign(s[P]),m(j,P,w)}function X(s,o,r,i,a){const c={stack:[],error:void 0,hasError:!1};try{0===r.getCoordinateSystemType()&&n("Cannot use local SR");let t=s.getAttributeStreamRef(0),l=s.getPointCount();const u=r.getGCS(),g=o.clone();if(1!==r.getCoordinateSystemType()){const e=r.getSRToGCSTransform();if(U(e,[o],1,[g],null),g.isNAN())return[];const n=(new C).execute(s,e,null);t=n.getAttributeStreamRef(0),l=n.getPointCount()}const f=u.getUnit().getUnitToBaseFactor(),S=N(l,0);for(let e=0;e<l;++e)S[e]=e;y(l,S);const h=D();u.querySpheroidData(h);const A=g.clone();A.scale(f);const P=E(h.majorSemiAxis,h.e2,A),w=[];let _=l;const T=new d,j=new d;for(let e=0;e<_;){if(t.queryPoint2D(2*S[e],T),T.isNAN())continue;j.assign(T),j.scale(f);const n=E(h.majorSemiAxis,h.e2,j);p.distance(n,P)>i?(S[_-1]=x(S[e],S[e]=S[_-1]),_--):e++}const G=(e,t)=>e.m_distance-t.m_distance,I=e(c,new v,!1);for(let e=0;e<_;e++)t.queryPoint2D(2*S[e],T),T.isNAN()||(b.geodeticDistance(h.majorSemiAxis,h.e2,A.x,A.y,T.x*f,T.y*f,I,null,null,R.PE_LINETYPE_GEODESIC),I.val<i&&w.push(m(T,S[e],I.val)));return w.sort(G),w.slice(0,a)}catch(l){c.error=l,c.hasError=!0}finally{t(c)}}class M extends A{constructor(e){super(),this.m_first=!0,this.m_segIter=e,this.m_segIter.stripAttributes()}tock(){return!0}getRank(){return 1}next(){if(this.m_first){if(!this.m_segIter.nextPath())return null;this.m_first=!1}for(;;){if(this.m_segIter.hasNextSegment())return this.m_segIter.nextSegment().clone();if(!this.m_segIter.nextPath())break}return null}getGeometryID(){return this.m_segIter.getStartPointIndex()}}export{V as OperatorProximityGeodesic};
@@ -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,G as t,f as s,c as n}from"./Geometry.js";import{$ as o,f as r,v as a,S as i,I as m}from"./ProjectionTransformation.js";import{a as c,P as g}from"./QuadraticBezier.js";import{p as u,d as p,P as h}from"./Point2D.js";import{h as y}from"./Envelope.js";import{Envelope2D as f}from"./Envelope2D.js";import{O as l}from"./OperatorDensify.js";import{O as _}from"./OperatorClip.js";function x(){return{m_pGcs:new h,m_xyz:new y,m_factor:Number.NaN,m_geoLength:Number.NaN,setValues:d,setLength:S,assign:P}}function d(e,t,s,n){this.m_factor=e,this.m_pGcs.assign(t),this.m_xyz.assign(n),this.m_geoLength=s}function S(e){this.m_geoLength=e}function P(e){this.m_pGcs.assign(e.m_pGcs),this.m_xyz.assign(e.m_xyz),this.m_factor=e.m_factor,this.m_geoLength=e.m_geoLength}class w{getOperatorType(){return 10315}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}_ExecuteShapePreservingLength(e,t,s,n,a){if(e.hasNonLinearSegments()){e=(new l).execute(e,0,t.getTolerance(0),0,a)}if(t.isPannable()){let n=90,r=-90;if(1===s.getUnit().getUnitToBaseFactor()&&(n*=Math.PI/180,r*=Math.PI/180),2===t.getCoordinateSystemType()){let e=null;const s=[0,0,0,0];e=t.getPECoordSys(),s[0]=0,s[1]=n,s[2]=0,s[3]=r,o.geogToProj(e,2,s),n=s[1],r=s[3]}const i=new f;e.queryEnvelope(i),i.ymin=r,i.ymax=n,e=(new _).execute(e,i,t,a)}else{const s=t.getPCSHorizon();if((e=(new r).execute(e,s,t,a))===s){const t=e.clone();e=t}}return e.isEmpty()?0:this._ExecuteIterativeApproach(e,t,s,n,1,a)}_ExecuteIterativeApproach(e,t,s,r,a,i){const c=m();s.querySpheroidData(c);const g=c.majorSemiAxis,f=c.e2,l=s.getUnit().getUnitToBaseFactor(),_=40,d=u(x,_),S=p(_,Number.NaN),P=x(),w=x();let E;const G=[0,0,0,0],j=t.getPECoordSys(),v=new h,L=new h,T=new h,D=new h,b=new h;let z=0;const I=e.querySegmentIterator();for(;I.nextPath();)for(;I.hasNextSegment();){const e=I.nextSegment();v.assign(e.getStartXY()),L.assign(e.getEndXY()),2===t.getCoordinateSystemType()?(G[0]=v.x,G[1]=v.y,G[2]=L.x,G[3]=L.y,o.projToGeog(j,2,G),T.x=G[0]*l,T.y=G[1]*l,D.x=G[2]*l,D.y=G[3]*l):(T.setCoordsPoint2D(v),D.setCoordsPoint2D(L),T.scale(l),D.scale(l));const s=new y,r=new y;N(g,f,T,s),N(g,f,D,r);let i=C(g,s,r);P.setValues(0,T,Number.NaN,s),w.setValues(1,D,i,r),E=a,d[0].assign(w),S[0]=a;let m=0;for(;;){m>128&&n("iterations exceeded");const s=.5*(P.m_factor+w.m_factor),r=e.getCoord2D(s);2===t.getCoordinateSystemType()?(G[0]=r.x,G[1]=r.y,o.projToGeog(j,1,G),b.x=G[0]*l,b.y=G[1]*l):(b.setCoordsPoint2D(r),b.scale(l)),T.setCoordsPoint2D(P.m_pGcs),D.setCoordsPoint2D(w.m_pGcs);const c=new y;N(g,f,b,c);const u=C(g,P.m_xyz,c),p=C(g,w.m_xyz,c);i=w.m_geoLength,Number.isNaN(i)&&(i=C(g,P.m_xyz,w.m_xyz));const h=u+p,x=E===a&&h>=20&&Math.abs(h-i)>1e-8*(i+h);if(m+2<_&&(x||Math.abs(h-i)>0&&E>0))w.setLength(p),d[m].assign(w),w.setValues(s,b,u,c),d[++m].assign(w),x?(E=a,S[m]=a):(E--,S[m-1]=E,S[m]=E);else{if(z+=h,0===m)break;P.assign(w),w.assign(d[--m]),E=S[m]}}}return z}execute(n,o,r){if(o&&0!==o.getCoordinateSystemType()||e(""),n.isEmpty()||n.getDimension()<1)return 0;let i=null;const m=o.getGCS();m!==o&&(i=a(o,m,null));const u=n.getGeometryType();if(u===t.enumEnvelope){const e=new c;return e.addEnvelope(n,!1),this._ExecuteShapePreservingLength(e,o,m,i,r)}if(s(u)){const e=new g;return e.addSegment(n,!0),this._ExecuteShapePreservingLength(e,o,m,i,r)}return this._ExecuteShapePreservingLength(n,o,m,i,r)}}function N(e,t,s,n){n.assign(i(e,t,s))}function C(e,t,s){const n=e,o=new y;o.setSub(t,s);const r=o.length();return 2*n*Math.asin(r/(2*n))}export{w as O};
5
+ import{a as e,G as t,f as s,c as n}from"./Geometry.js";import{K as o,g as r,w as a,y as i,J as m}from"./ProjectionTransformation.js";import{a as c,P as g}from"./QuadraticBezier.js";import{n as u,d as p,P as h}from"./Point2D.js";import{d as y}from"./Envelope.js";import{Envelope2D as f}from"./Envelope2D.js";import{O as l}from"./OperatorDensify.js";import{O as _}from"./OperatorClip.js";function x(){return{m_pGcs:new h,m_xyz:new y,m_factor:Number.NaN,m_geoLength:Number.NaN,setValues:d,setLength:P,assign:S}}function d(e,t,s,n){this.m_factor=e,this.m_pGcs.assign(t),this.m_xyz.assign(n),this.m_geoLength=s}function P(e){this.m_geoLength=e}function S(e){this.m_pGcs.assign(e.m_pGcs),this.m_xyz.assign(e.m_xyz),this.m_factor=e.m_factor,this.m_geoLength=e.m_geoLength}class w{getOperatorType(){return 10315}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}_ExecuteShapePreservingLength(e,t,s,n,a){if(e.hasNonLinearSegments()){e=(new l).execute(e,0,t.getTolerance(0),0,a)}if(t.isPannable()){let n=90,r=-90;if(1===s.getUnit().getUnitToBaseFactor()&&(n*=Math.PI/180,r*=Math.PI/180),2===t.getCoordinateSystemType()){let e=null;const s=[0,0,0,0];e=t.getPECoordSys(),s[0]=0,s[1]=n,s[2]=0,s[3]=r,o.geogToProj(e,2,s),n=s[1],r=s[3]}const i=new f;e.queryEnvelope(i),i.ymin=r,i.ymax=n,e=(new _).execute(e,i,t,a)}else{const s=t.getPCSHorizon();if((e=(new r).execute(e,s,t,a))===s){const t=e.clone();e=t}}return e.isEmpty()?0:this._ExecuteIterativeApproach(e,t,s,n,1,a)}_ExecuteIterativeApproach(e,t,s,r,a,i){const c=m();s.querySpheroidData(c);const g=c.majorSemiAxis,f=c.e2,l=s.getUnit().getUnitToBaseFactor(),_=40,d=u(x,_),P=p(_,Number.NaN),S=x(),w=x();let E;const G=[0,0,0,0],j=t.getPECoordSys(),L=new h,T=new h,v=new h,D=new h,b=new h;let z=0;const O=e.querySegmentIterator();for(;O.nextPath();)for(;O.hasNextSegment();){const e=O.nextSegment();L.assign(e.getStartXY()),T.assign(e.getEndXY()),2===t.getCoordinateSystemType()?(G[0]=L.x,G[1]=L.y,G[2]=T.x,G[3]=T.y,o.projToGeog(j,2,G),v.x=G[0]*l,v.y=G[1]*l,D.x=G[2]*l,D.y=G[3]*l):(v.setCoordsPoint2D(L),D.setCoordsPoint2D(T),v.scale(l),D.scale(l));const s=new y,r=new y;N(g,f,v,s),N(g,f,D,r);let i=C(g,s,r);S.setValues(0,v,Number.NaN,s),w.setValues(1,D,i,r),E=a,d[0].assign(w),P[0]=a;let m=0;for(;;){m>128&&n("iterations exceeded");const s=.5*(S.m_factor+w.m_factor),r=e.getCoord2D(s);2===t.getCoordinateSystemType()?(G[0]=r.x,G[1]=r.y,o.projToGeog(j,1,G),b.x=G[0]*l,b.y=G[1]*l):(b.setCoordsPoint2D(r),b.scale(l)),v.setCoordsPoint2D(S.m_pGcs),D.setCoordsPoint2D(w.m_pGcs);const c=new y;N(g,f,b,c);const u=C(g,S.m_xyz,c),p=C(g,w.m_xyz,c);i=w.m_geoLength,Number.isNaN(i)&&(i=C(g,S.m_xyz,w.m_xyz));const h=u+p,x=E===a&&h>=20&&Math.abs(h-i)>1e-8*(i+h);if(m+2<_&&(x||Math.abs(h-i)>0&&E>0))w.setLength(p),d[m].assign(w),w.setValues(s,b,u,c),d[++m].assign(w),x?(E=a,P[m]=a):(E--,P[m-1]=E,P[m]=E);else{if(z+=h,0===m)break;S.assign(w),w.assign(d[--m]),E=P[m]}}}return z}execute(n,o,r){if(o&&0!==o.getCoordinateSystemType()||e(""),n.isEmpty()||n.getDimension()<1)return 0;let i=null;const m=o.getGCS();m!==o&&(i=a(o,m,null));const u=n.getGeometryType();if(u===t.enumEnvelope){const e=new c;return e.addEnvelope(n,!1),this._ExecuteShapePreservingLength(e,o,m,i,r)}if(s(u)){const e=new g;return e.addSegment(n,!0),this._ExecuteShapePreservingLength(e,o,m,i,r)}return this._ExecuteShapePreservingLength(n,o,m,i,r)}}function N(e,t,s,n){n.assign(i(e,t,s))}function C(e,t,s){const n=e,o=new y;o.setSub(t,s);const r=o.length();return 2*n*Math.asin(r/(2*n))}export{w as O};
@@ -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"./SimpleGeometryCursor.js";import{t as e,d as s,o as i,p as n,g as o,G as r,f as h,h as m,b as a}from"./Geometry.js";import{E as c,P as l}from"./Envelope.js";import{Envelope2D as u}from"./Envelope2D.js";import{L as f,S as g,P as _}from"./QuadraticBezier.js";import{k as d,P as p,d as P}from"./Point2D.js";import{T}from"./Transformation2D.js";import{y as b,aa as D,z as S,ab as x,g as I,f as F,e as C,r as N,i as y,ac as w,ad as E,V as G,ae as v,U as z}from"./ProjectionTransformation.js";import{c as k}from"./OperatorClip.js";function q(t){const e=t.getInputSR(),s=t.getOutputSR();let i=!1;do{if(e.equals(s)){i=!1;break}if(!O(e)||!O(s)){i=!1;break}if(2===e.getCoordinateSystemType()){i=!0;break}if(2===s.getCoordinateSystemType()){i=!0;break}const n=t.getGeographicTransformations();if(null!==n&&n.count()>0){i=!0;break}}while(0);return i}class L{constructor(t,e,s,i){this.m_horizon2Env=new u,this.m_horizon2=t,this.m_sr=e,this.m_bInclusive2=s,this.m_pannableExtent=i.clone(),this.m_segIter=null,this.m_qtIter=null,null!==t?(t.queryEnvelope(this.m_horizon2Env),this.m_gcs360=i.width(),this.m_gcs180=.5*this.m_gcs360,this.m_gcs90=.25*this.m_gcs360,this.m_pannableFactor=1,this.m_horizon2Env.width()-this.m_gcs360>0&&(this.m_pannableFactor+=Math.ceil((this.m_horizon2Env.width()-this.m_gcs360)/this.m_gcs360)),this.m_period=this.m_gcs360):(this.m_horizon2Env.setEmpty(),this.m_gcs360=Number.NaN,this.m_gcs180=Number.NaN,this.m_gcs90=Number.NaN,this.m_pannableFactor=Number.NaN,this.m_period=Number.NaN),this.m_gcsTolerance=null!=e?e.getTolerance(0):Number.NaN}isPointStartInHorizon(t,e){if(!this.m_horizon2)return!0;let s=nt(new l(t),this.m_horizon2,!0,this.m_period);do{const e=t.clone();if(e.x-=s*this.m_period,this.m_horizon2.getGeometryType()===r.enumPolygon){let t;if(t=this.m_horizon2Env.contains(e)?y(this.m_horizon2,e,0):0,this.m_bInclusive2){if(0===t)return!1}else if(1===t)return!1}else{const t=this.m_horizon2Env.contains(e);if(this.m_bInclusive2){if(!t)return!1}else if(t)return!1}}while(this.m_horizon2Env.xmin+ ++s*this.m_period<t.x);return!0}isAdjoiningLineInHorizon(t,e,s){if(!this.m_horizon2)return!0;const i=new p,n=new p;rt(t,e,this.m_gcs90,this.m_gcs180,this.m_gcs360,i,n);const h=Math.max(i.x,n.x),m=new f;m.setStart2D(i),m.setEnd2D(n);let a=nt(m,this.m_horizon2,!0,this.m_period);const c=!1;do{const t=i.clone(),e=n.clone();if(t.x-=a*this.m_period,e.x-=a*this.m_period,this.m_horizon2.getGeometryType()===r.enumPolygon){const s=new f;s.setStartXY(t),s.setEndXY(e);const i=new u,n=new u;if(s.queryEnvelope(i),n.setCoords({env2D:i}),n.inflateCoords(this.m_gcsTolerance,this.m_gcsTolerance),this.m_horizon2Env.isIntersecting(n)){const t=this.m_horizon2.getImpl(),e=t.getAccelerators();if(null!==e){null!==e.getRasterizedGeometry()&&o(0)}{let i=null;if(null!==e&&(i=e.getQuadTree()),null!==i){this.m_qtIter||(this.m_qtIter=i.getIteratorForQT()),this.m_qtIter.resetIterator(s,this.m_gcsTolerance),this.m_segIter||(this.m_segIter=t.querySegmentIterator());for(let t=this.m_qtIter.next();-1!==t;t=this.m_qtIter.next()){const e=i.getElement(t);this.m_segIter.resetToVertex(e,-1);if(this.m_segIter.nextSegment().isIntersecting(s,this.m_gcsTolerance))return!1}}else for(this.m_segIter||(this.m_segIter=t.querySegmentIterator()),this.m_segIter.resetToFirstPath();this.m_segIter.nextPath();)for(;this.m_segIter.hasNextSegment();){const t=this.m_segIter.nextSegment(),e=new u;if(t.queryEnvelope(e),e.isIntersecting(n)&&t.isIntersecting(s,this.m_gcsTolerance))return!1}}}}else if(this.m_bInclusive2){const s=this.m_horizon2Env.contains(t),i=this.m_horizon2Env.contains(e);if(s&&i)return!0}else{const s=this.m_horizon2Env.clone();s.inflateCoords(this.m_gcsTolerance,this.m_gcsTolerance);if(!(0===s.clipLine(t,e)))return!1}}while(this.m_horizon2Env.xmin+ ++a*this.m_period<h);return!this.m_bInclusive2||c}isEnvelopeInHorizon(t,e){if(!this.m_horizon2)return!0;const s=new c({env2D:t});let i=nt(s,this.m_horizon2,!0,this.m_period);do{const n=t.clone();n.move(-i*this.m_period,0),s.setCoords(n.xmin,n.ymin,n.xmax,n.ymax);if(!st(s,this.m_horizon2,this.m_sr,this.m_bInclusive2,e))return!1}while(this.m_horizon2Env.xmin+ ++i*this.m_period<t.xmax);return!0}}class R{constructor(t,e,s){this.m_splitLines2=null,this.m_scalars=[],this.m_splitIter=null,this.m_splitLines2=t,this.m_transform1=e,this.m_pannableExtent=s.clone(),this.m_gcs360=s.width(),this.m_gcs180=.5*this.m_gcs360,this.m_gcs90=.25*this.m_gcs360,null!==e?(this.m_gcsTolerance=this.m_transform1.getOutputSR().getTolerance(0),this.m_halfGcsTolerance=.5*this.m_gcsTolerance,this.m_gcsToleranceSq=this.m_gcsTolerance*this.m_gcsTolerance):(this.m_gcsTolerance=Number.NaN,this.m_halfGcsTolerance=Number.NaN,this.m_gcsToleranceSq=Number.NaN)}hasSplitLines(){return null!=this.m_splitLines2}getSplitLineFactorEx(t,e,s,i,n,o){const r=new p,h=new p;rt(i,n,this.m_gcs90,this.m_gcs180,this.m_gcs360,r,h);const m=new f;for(m.setStartXY(r),m.setEndXY(h),this.m_splitIter?this.m_splitIter.resetToFirstPath():this.m_splitIter=this.m_splitLines2.getImpl().querySegmentIterator();this.m_splitIter.nextPath();)for(;this.m_splitIter.hasNextSegment();){const i=this.m_splitIter.nextSegment(),n=.5*(i.getStartX()+i.getEndX());Z(this.m_gcs180,this.m_gcs360,n,m);const r=new u;m.queryEnvelope(r),r.inflateCoords(this.m_gcsTolerance,this.m_gcsTolerance);const h=new u;if(i.queryEnvelope(h),!r.isIntersecting(h))continue;this.m_scalars.length<2&&(this.m_scalars.length=2);if(1===m.intersect(i,null,this.m_scalars,null,this.m_gcsTolerance)&&(this.m_scalars[0]>0&&this.m_scalars[0]<1)){const n=ct(e,s,this.m_scalars[0]),r=Q(t.getCoord2D(n),this.m_transform1);if(i.isIntersectingPoint(r,this.m_halfGcsTolerance))return n;return this.getSplitLineFactor(t,e,s,i,o)}}return-1}getSplitLineFactor(t,e,s,i,n){let o=e,r=s;const h=.5*(i.getStartX()+i.getEndX()),m=new f,a=t.getCoord2D(o),c=t.getCoord2D(r),l=Q(a,this.m_transform1),u=Q(c,this.m_transform1);for(;o<r;){const e=new p,s=new p;rt(l,u,this.m_gcs90,this.m_gcs180,this.m_gcs360,e,s),m.setStartXY(e),m.setEndXY(s),Z(this.m_gcs180,this.m_gcs360,h,m);const n=p.sqrDistance(m.getStartXY(),m.getEndXY());if(n<=this.m_gcsToleranceSq)break;if(Number.isNaN(n))return Number.NaN;let f=ct(o,r,this.m_scalars[0]);if(o<f&&f<r||(f=.5*(r+o)),o===f||f===r)return f;const g=t.getCoord2D(f),_=Q(g,this.m_transform1),d=new p;rt(l,_,this.m_gcs90,this.m_gcs180,this.m_gcs360,e,d),m.setStartXY(e),m.setEndXY(d),Z(this.m_gcs180,this.m_gcs360,h,m);let P=m.intersect(i,null,this.m_scalars,null,this.m_halfGcsTolerance);if(0!==P){if(1===this.m_scalars[0])return f;r=f,c.setCoordsPoint2D(g),u.setCoordsPoint2D(_)}else{if(rt(_,u,this.m_gcs90,this.m_gcs180,this.m_gcs360,d,s),m.setStartXY(d),m.setEndXY(s),Z(this.m_gcs180,this.m_gcs360,h,m),P=m.intersect(i,null,this.m_scalars,null,this.m_halfGcsTolerance),0===P)return f;if(0===this.m_scalars[0])return f;o=f,a.setCoordsPoint2D(g),l.setCoordsPoint2D(_)}}return.5*(r+o)}}class M{constructor(){this.m_bPrepared=!1,this.m_bNeedsShapePreservingProject=!1,this.m_inputTransform=null,this.m_transform1=null,this.m_transform2=null,this.m_extentFrom=null,this.m_horizon1=null,this.m_horizon2=null,this.m_pannableExtentFrom=new u,this.m_pannableExtentTo=new u,this.m_pannableExtentGcsTo=new u,this.m_bClipTopBottomFrom=!1,this.m_bNeedsGeoTransform=!1,this.m_bIsPannableFrom=!1,this.m_bIsPannableTo=!1,this.m_bInclusive1=!1,this.m_bInclusive2=!1,this.m_bSrFromIsPcs=!1,this.m_bSrToIsPcs=!1,this.m_fromTolerance=Number.NaN,this.m_toTolerance=Number.NaN,this.m_gcsToTolerance=Number.NaN,this.m_aFrom=Number.NaN,this.m_mpuFrom=Number.NaN,this.m_rpuFrom=Number.NaN,this.m_rpuGcsTo=Number.NaN,this.m_aTo=Number.NaN,this.m_mpuTo=Number.NaN,this.m_stages=0}prepare(t,s,i){this.m_bPrepared&&n(""),t||e("");const r=t.getInputSR(),h=t.getOutputSR();O(r)&&O(h)||e("shape preserving project requires PCS or GCS");const m=r.getCoordinateSystemType(),a=h.getCoordinateSystemType();this.m_bSrFromIsPcs=2===m,this.m_bSrToIsPcs=2===a;let c=null,l=null,u=null,f=null;this.m_bSrFromIsPcs?(c=r,u=r.getGCS(),this.m_aFrom=at(u),this.m_mpuFrom=mt(c),this.m_rpuFrom=Number.NaN):(u=r,this.m_rpuFrom=ht(u),this.m_aFrom=Number.NaN),this.m_bSrToIsPcs?(l=h,f=h.getGCS(),this.m_aTo=at(f),this.m_mpuTo=mt(l)):(f=h,this.m_aTo=Number.NaN,this.m_mpuTo=Number.NaN),this.m_rpuGcsTo=ht(f);const g=t.getGeographicTransformations();this.m_bNeedsGeoTransform=null!==g&&g.count()>0;const _=r.equals(h);if(this.m_bNeedsShapePreservingProject=!_&&(this.m_bSrFromIsPcs||this.m_bSrToIsPcs||this.m_bNeedsGeoTransform),!this.m_bNeedsShapePreservingProject)return this.m_inputTransform=t,this.m_extentFrom=s?s.clone():null,void(this.m_bPrepared=!0);if(this.m_bIsPannableFrom=r.isPannable(),this.m_bIsPannableTo=h.isPannable(),this.m_bIsPannableFrom&&(this.m_pannableExtentFrom=r.getPannableExtent()),this.m_bIsPannableTo&&(this.m_pannableExtentTo=h.getPannableExtent()),this.m_bSrToIsPcs){this.m_pannableExtentGcsTo=f.getPannableExtent();const t=l.getCentralMeridian(),e=this.m_pannableExtentGcsTo.getCenter();e.x=t,this.m_pannableExtentGcsTo.centerAt(e)}else this.m_pannableExtentGcsTo=this.m_pannableExtentTo.clone();this.m_fromTolerance=r.getTolerance(0),this.m_toTolerance=h.getTolerance(0),this.m_gcsToTolerance=f.getTolerance(0);{const e=t.getExtendedParams(),n=e.clipWithInputHorizon,o=e.clipWithOutputHorizon;n&&this.setHorizon1(t,s,i),o&&this.setHorizon2(t,i),this.checkAndSetStages(t,i)}const d=w();d.setFlag(1073741824,!0),d.setFlag(536870912,!0);const p=E();if(p.clipWithInputHorizon=!1,p.clipWithOutputHorizon=!1,1===this.m_stages)this.m_transform1=D(!1,r,h,g,p,d);else if(2===this.m_stages){d.setFlag(2147483648,!0),this.m_transform1=D(!1,r,f,g,p,d);const t=w();this.m_transform2=D(!1,f,h,null,p,t)}else{o(null!=l),p.centralMeridianOfOutputGCS=l.getCentralMeridian(),this.m_transform1=D(!1,r,f,g,p,d);const t=w();t.setFlag(2147483648,!0),this.m_transform2=D(!1,f,h,null,p,t)}this.m_inputTransform=t,this.m_extentFrom=s?s.clone():null,this.m_bPrepared=!0}execute(t,e,s,i){this.m_bPrepared||n(""),o(!t.hasAttribute(10));return this.execute_(t,e,s,i)}checkIfNeedsReset(t,e){return o(0),!1}setHorizon1(t,e,s){const i=t.getInputSR();let n,o=null;const r=new u;if(this.m_bSrFromIsPcs){n=!0,o=i.getPCSHorizon(),o.queryEnvelope(r),this.m_bIsPannableFrom&&(o=new c({xmin:this.m_pannableExtentFrom.xmin,ymin:r.ymin,xmax:this.m_pannableExtentFrom.xmax,ymax:r.ymax}));let t=!1;null!=e&&(t=et(e,o,i,n,this.m_bIsPannableFrom,this.m_pannableExtentFrom,s)),t||(this.m_horizon1=o,this.m_bInclusive1=n)}else this.m_bClipTopBottomFrom=!0,this.m_bInclusive1=!0}setHorizon2(t,e){const s=t.getOutputSR();if(1===s.getCoordinateSystemType())return this.m_horizon2=null,void(this.m_bInclusive2=!1);let i=null;const n=new u,o=s.getGCSHorisonIsInclusive();i=s.getGCSHorizon(),i.queryEnvelope(n);const r=s.getCentralMeridian();if(this.m_bIsPannableTo){const t=new c({xmin:this.m_pannableExtentGcsTo.xmin,ymin:n.ymin,xmax:this.m_pannableExtentGcsTo.xmax,ymax:n.ymax});t.centerAt(r,0),i=t}this.m_horizon2=i,this.m_bInclusive2=o}checkAndSetStages(t,e){const s=t.getOutputSR().getGCSSplitLines();if(!this.m_horizon2&&!s)return void(this.m_stages=1);if(this.m_horizon2.getGeometryType()===r.enumEnvelope){const t=new u;this.m_horizon2.queryEnvelope(t);const e=t.width(),s=t.height();e>=d/this.m_rpuGcsTo&&s>=Math.PI/this.m_rpuGcsTo&&(this.m_horizon2=null)}if(this.m_horizon2||s){if(null!==this.m_horizon2&&!this.m_bNeedsGeoTransform&&!this.m_bSrFromIsPcs){const e=t.getOutputSR().getGCS();return t.getInputSR().equals(e)?(this.m_horizon1=this.m_horizon2,this.m_bInclusive1=this.m_bInclusive2,this.m_bClipTopBottomFrom=!1,this.m_horizon2=null,this.m_bInclusive2=!1,void(this.m_stages=1)):void(this.m_stages=2)}this.m_stages=3}else this.m_stages=1}execute_(t,e,n,o){if(!this.m_bNeedsShapePreservingProject)return(new b).execute(t,this.m_inputTransform,o);if(!t)return null;s(t),i(t);let a,c=t.getGeometryType();return h(c)?(a=W(t),c=r.enumPolyline):a=t,a.isEmpty()?a:m(c)?this.executeEx(t,e,n,o):(new b).execute(t,this.m_inputTransform,o)}executeEx(t,e,s,i){let n;t.hasNonLinearSegments()&&a(""),n=this.m_bIsPannableFrom?(new b).foldInto360Range(t,this.m_transform1.getInputSR()):t;let o,r=s;return r>0||(r=100*this.m_toTolerance),o=1===this.m_stages?this.executeGood(n,e,r,i):2===this.m_stages?this.executeBad(n,e,r,i):this.executeUgly(n,e,r,i),this.filterOverDensification(o,this.m_inputTransform.getOutputSR(),r,i)}executeGood(t,e,s,i){const n=s*s;let o,r;return o=e>0?this.getMinLengthInSrFrom(e):this.getMinLengthInSrFrom(1e-5),r=this.m_bClipTopBottomFrom?S(t,this.m_transform1.getInputSR()):$(t,this.m_transform1.getInputSR(),this.m_horizon1,this.m_bInclusive1,this.m_bIsPannableFrom,this.m_pannableExtentFrom,!0,Number.NaN,i),r=x(r,this.m_transform1.getOutputSR(),i),r=j(r,this.m_transform1,this.m_bIsPannableFrom,this.m_pannableExtentFrom,this.m_bIsPannableTo,this.m_pannableExtentTo,null,null,null,null,o,n,i),r=(new b).execute(r,this.m_transform1,i),r}executeBad(t,e,s,i){let n;n=e>0?e*(Math.PI/180/this.m_rpuGcsTo):Math.PI/180/this.m_rpuGcsTo*1e-5;const o=s*s;let r;return r=this.m_bClipTopBottomFrom?S(t,this.m_transform1.getInputSR()):t,r=(new b).execute(r,this.m_transform1,i),r=$(r,this.m_transform2.getInputSR(),this.m_horizon2,this.m_bInclusive2,!0,this.m_pannableExtentGcsTo,!0,Number.NaN,i),r=x(r,this.m_transform2.getOutputSR(),i),r=j(r,this.m_transform2,!0,this.m_pannableExtentGcsTo,this.m_bIsPannableTo,this.m_pannableExtentTo,null,null,null,null,n,o,i),r=(new b).execute(r,this.m_transform2,i),r}executeUgly(t,e,s,i){const n=s*s;let o;o=e>0?this.getMinLengthInSrFrom(e):this.getMinLengthInSrFrom(1e-5);let r=null;r=this.m_bClipTopBottomFrom?S(t,this.m_transform1.getInputSR()):$(t,this.m_transform1.getInputSR(),this.m_horizon1,this.m_bInclusive1,this.m_bIsPannableFrom,this.m_pannableExtentFrom,!0,Number.NaN,i);let h=r;const m=new L(this.m_horizon2,this.m_transform2.getInputSR(),this.m_bInclusive2,this.m_pannableExtentGcsTo),a=this.m_transform2.getOutputSR().getGCSSplitLines(),c=new R(a,this.m_transform1,this.m_pannableExtentGcsTo);if(r=j(r,this.m_transform1,this.m_bIsPannableFrom,this.m_pannableExtentFrom,this.m_bIsPannableTo,this.m_pannableExtentTo,this.m_transform2,m,this.m_pannableExtentGcsTo,c,o,n,i),null!==r){h=null,r=(new b).execute(r,this.m_transform1,i);const t=Math.PI/180/this.m_rpuGcsTo*2;return r=$(r,this.m_transform2.getInputSR(),this.m_horizon2,this.m_bInclusive2,!0,this.m_pannableExtentGcsTo,!1,t,i),r=(new b).execute(r,this.m_transform2,i),r}let l=Number.NaN;l=s>0?s:100*this.m_toTolerance,l/=this.m_rpuGcsTo*this.m_aTo/this.m_mpuTo;const u=l*l;let f;return r=j(h,this.m_transform1,this.m_bIsPannableFrom,this.m_pannableExtentFrom,!0,this.m_pannableExtentGcsTo,null,null,null,null,o,u,i),h=null,r=(new b).execute(r,this.m_transform1,i),f=e>0?e*(Math.PI/180/this.m_rpuGcsTo):Math.PI/180/this.m_rpuGcsTo*1e-5,r=$(r,this.m_transform2.getInputSR(),this.m_horizon2,this.m_bInclusive2,!0,this.m_pannableExtentGcsTo,!1,Number.NaN,i),r=x(r,this.m_transform2.getOutputSR(),i),r=j(r,this.m_transform2,!0,this.m_pannableExtentGcsTo,this.m_bIsPannableTo,this.m_pannableExtentTo,null,null,null,null,f,n,i),r=(new b).execute(r,this.m_transform2,i),r}getMinLengthInSrFrom(t){let e;return e=this.m_bSrFromIsPcs?this.m_aFrom*(t*Math.PI/180)/this.m_mpuFrom:t*Math.PI/180*(1/this.m_rpuFrom),e}filterOverDensification(t,e,s,i){let n=X(t,s);return n.dropAttribute(10),n!==t&&n.getGeometryType()===r.enumPolygon&&(n=(new I).execute(n,e,!1,i)),n}}function X(t,e){if(t.isEmpty()||!t.hasAttribute(10))return t;const s=e*e;let i=t.getAttributeStreamRef(10),n=!1;const o=new f,r=[];let h=!1;for(let a=0,c=t.getPathCount();a<c;a++){const e=t.getPathStart(a),m=t.getPathEnd(a),c=t.isClosedPath(a);if(!(m>e))continue;{const t=c?e:m-1;0===i.read(e)&&0===i.read(t)||(n||(i=i.clone(),n=!0),i.write(e,0),i.write(t,0))}const l=c?m+1:m;let u=e;for(let a=e;a<l;a++){const c=a===m?e:a;if(0===i.read(c)){if(a-u>1){r.push({from:u,to:a});const c=new p;for(;r.length>0;){const a=r.at(-1);r.pop(),o.setStartXY(t.getXY(a.from));const l=a.to===m?e:a.to;o.setEndXY(t.getXY(l));let u=s,f=-1;for(let e=a.from+1,s=a.to;e<s;e++){const s=t.getXY(e),i=o.getClosestCoordinate(s,!1);o.queryCoord2D(i,c);const n=p.sqrDistance(c,s);u<n&&(u=n,f=e)}f>=0?(n||(i=i.clone(),n=!0),i.write(f,0),f-a.from>1&&r.push({from:a.from,to:f}),a.to-f>1&&r.push({from:f,to:a.to})):h=!0}}u=c}}}if(!h)return t;const m=Y(t,i,1);return m.dropAttribute(10),m}function Y(t,e,s){const i=t.createInstance(),n=new l;for(let o=0,r=t.getPathCount();o<r;o++){let r=!0,h=0,m=0;const a=t.getPathStart(o),c=t.getPathEnd(o);let l=!0;for(let u=a;u<c;u++){e.read(u)===s?(!l&&m>0&&(i.addSegmentsFromPath(t,o,h-a,m,r),m=0),l=!0):l?(l=!1,t.getPointByVal(u,n),r?(i.startPathPoint(n),r=!1):i.lineToPoint(n),h=u):m++}m>0&&i.addSegmentsFromPath(t,o,h-a,m,r)}return i}const A=8;function H(t,e){const s=.5;for(let i=0;i<t;i++){let n=Math.ceil(i/2)/(t+1);i%2!=0&&(n=-n);const o=s+n;e[i]=o}}function O(t){if(!t)return!1;const e=t.getCoordinateSystemType();return 2===e||1===e}function j(t,e,s,i,n,o,r,h,m,a,c,l,u){const f=t.createInstance();f.addAttribute(10);const _=t.querySegmentIterator(),d=[],p=[],P=new g,T=t.getDescription().getAttributeCount()>1,b=new lt(e,s,i,n,o,r,h,a,c,l,T?p:null,d,u);for(;_.nextPath();)for(;_.hasNextSegment();){const t=_.nextSegment(),e=t.getStartXY(),s=t.getEndXY(),i=e.compare(s)>0,n=J(i,t,P);d.length=0,p.length=0;if(!b.densifySegment(_.isFirstSegmentInPath(),n))return null;i&&K(T?p:null,d),d.at(-1).setCoordsPoint2D(t.getEndXY());const o=f.getPointCount();if(T){const e=J(i,t,P);U(_.isFirstSegmentInPath(),_.isLastSegmentInPath()&&!_.isPathClosed(),t,e,p,d,f)}else B(_.isFirstSegmentInPath(),_.isLastSegmentInPath()&&!_.isPathClosed(),d,f);if(b.needsPostFiltering()){f.addAttribute(10);const t=f.getAttributeStreamRef(10);for(let e=1,s=d.length-1;e<s;e++)t.write(e+o,1)}}return f}function B(t,e,s,i){t&&i.insertPath2D(-1,null,0,0,!0);const n=i.getPathCount()-1;e?i.insertPointsFromPoints(n,-1,s,0,s.length,!0):i.insertPointsFromPoints(n,-1,s,0,s.length-1,!0)}function U(t,e,s,i,n,o,r){r.reserve(r.getPointCount()+o.length-1);const h=new l;if(s.queryStart(h),t?r.startPathPoint(h):r.lineToPoint(h),o.length>2){const t=i.calculateLength2D();for(let e=1;e<o.length-1;e++){const s=i.lengthToT(n[e]*t);i.queryCoord(s,h),h.setXY(o[e]),r.lineToPoint(h)}}e&&(s.queryEnd(h),r.lineToPoint(h))}function W(t){const e=new _({vd:t.getDescription()});return e.addSegment(t,!0),e}function Q(t,e){const s=e.getInputSR(),i=e.getOutputSR(),n=new p;2===s.getCoordinateSystemType()?(n.setCoordsPoint2D(t),G(s,0,[n],1)):n.setCoordsPoint2D(t);const o=new p;o.setCoordsPoint2D(n),v(e,[o],null,1,!1);const r=new p;return 2===i.getCoordinateSystemType()?(r.setCoordsPoint2D(o),z(i,[r],1,!1)):r.setCoordsPoint2D(o),r}function V(t,e,s,i,n,o,r,h){if(n){const n=o.width(),m=.5*n;if(i){const i=.25*n;let o=!1;const a=new p,c=new p;if(Math.abs(t.y)===i?(a.setCoords(s.x,t.y),c.setCoordsPoint2D(s),o=!0):Math.abs(s.y)===i&&(c.setCoords(t.x,s.y),a.setCoordsPoint2D(t),o=!0),Math.abs(e.y)===i&&(o||(a.setCoordsPoint2D(t),c.setCoordsPoint2D(s),o=!0),a.x=e.x),o)return ot(e,a,m,n,r),ot(e,c,m,n,h),!0}let a=0;t.x-e.x>m&&s.x-e.x>m?a-=n:e.x-t.x>m&&e.x-s.x>m&&(a+=n),Math.abs(e.x-(t.x+a))<m?(r.setCoordsPoint2D(t),ot(r,s,m,n,h),r.x+=a,h.x+=a):(r.setCoordsPoint2D(s),ot(r,t,m,n,h),r.x+=a,h.x+=a)}else r.setCoordsPoint2D(t),h.setCoordsPoint2D(s);return!1}function J(t,e,s){return t?(s.create(e.getGeometryType()),e.copyTo(s.get()),s.get().reverse(),s.get()):e}function K(t,e){e.reverse(),null!==t&&t.reverse()}function Z(t,e,s,i){const n=.5*(i.getStartX()+i.getEndX());if(n-s>t){const t=new T;t.setShiftCoords(-e,0),i.applyTransformation(t)}else if(s-n>t){const t=new T;t.setShiftCoords(e,0),i.applyTransformation(t)}}function $(t,e,s,i,n,o,r,h,m){const a=[!1];r&&tt(t,e,s,i,n,o,!0,h,a,m);let c=t;return a[0]||(c=tt(c,e,s,i,n,o,!1,h,null,m)),c=it(c,n,o,c!==t),c}function tt(t,e,s,i,n,o,h,m,a,c){if(h&&(a[0]=!1),null==s)return t;const l=new u,f=new u;s.queryEnvelope(l),t.queryEnvelope(f);const g=t.getGeometryType(),_=s.getGeometryType(),d=e.getTolerance(0);if(!n){if(h)return a[0]=st(t,s,e,i,c),null;let n;return n=i?_===r.enumEnvelope?k(t,l,d,m,c):(new F).execute(t,s,e,c):(new C).execute(t,s,e,c),n===s&&(n=s.clone()),n}const p=o.width(),P=p*Math.ceil(l.width()/p);let b=null;if(i){let o=nt(t,s,n,P),D=0;const S=new T;do{let n=null;if(_===r.enumEnvelope){const r=s.clone();if(S.setShiftCoords(o*P,0),r.applyTransformation(S),h){if(a[0]=st(t,r,e,i,c),!a[0])return null}else{const e=new u;r.queryEnvelope(e),n=k(t,e,d,m,c)}}else{const r=t.clone();if(S.setShiftCoords(-o*P,0),r.applyTransformation(S),h){if(a[0]=st(r,s,e,i,c),!a[0])return null}else n=(new F).execute(r,s,e,c),n===s&&(n=s.clone())}if(!h){if(n.isEmpty())continue;if(g===r.enumPolygon){const t=new u;if(n.queryEnvelope(t),t.width()<=d)continue}_===r.enumEnvelope&&(S.setShiftCoords(-o*P,0),n===t&&(n=n.clone()),n.applyTransformation(S)),null===b?b=n===t?n.clone():n:b.add(n,!1)}D++}while(l.xmin+ ++o*P<f.xmax);if(h)return null;null===b&&(b=t.createInstance()),g===r.enumPolygon&&D>1&&p-f.width()<=10*d&&(b=(new I).execute(b,e,!0,c))}else{let o=nt(t,s,n,P);if(b=t.clone(),0!==o){const t=new T;t.setShiftCoords(-o*P,0),b.applyTransformation(t)}do{if(h){if(a[0]=st(b,s,e,i,c),!a[0])return null}else if(b=(new C).execute(b,s,e,c),b===s&&(b=s.clone()),b.isEmpty())break;const t=new T;t.setShiftCoords(-P,0),b.applyTransformation(t)}while(l.xmin+ ++o*P<f.xmax);if(h)return null;if(!b.isEmpty()&&0!==o){const t=new T;t.setShiftCoords(o*P,0),b.applyTransformation(t)}}return b}function et(t,e,s,i,n,o,r){const h=[!1];return tt(t,s,e,i,n,o,!0,Number.NaN,h,r),h[0]}function st(t,e,s,i,n){let o;if(e.getGeometryType()===r.enumPolygon)if(i){o=N(e,t,s,64,n)}else{o=N(e,t,s,4,n)}else if(i){const s=new u,i=new u;e.queryEnvelope(s),t.queryEnvelope(i);o=s.containsEnvelope(i)}else{o=N(e,t,s,4,n)}return o}function it(t,e,s,i){let n;if(!e)return t;const o=s.getCenter().x,r=s.width(),h=.5*r,m=new u;t.queryEnvelope(m);const a=m.getCenter().x;let c=0;if(a-o>h){c=-Math.ceil((a-o-h)/r)*r}else if(o-a>h){c=Math.ceil((o-a-h)/r)*r}if(0!==c){n=i?t:t.clone();const e=new T;e.setShiftCoords(c,0),n.applyTransformation(e)}else n=t;return n}function nt(t,e,s,i){if(!s)return 0;let n=0;const o=new u;e.queryEnvelope(o);const r=new u;t.queryEnvelope(r);const h=o.xmin+i;for(;h+i+n*i>r.xmin;)n--;for(;h+n*i<r.xmin;)n++;return n}function ot(t,e,s,i,n){e.x-t.x>s?n.setCoords(e.x-i,e.y):t.x-e.x>s?n.setCoords(e.x+i,e.y):n.setCoordsPoint2D(e)}function rt(t,e,s,i,n,o,r){Math.abs(t.y)===s?(o.setCoords(e.x,t.y),r.setCoordsPoint2D(e)):Math.abs(e.y)===s?(o.setCoordsPoint2D(t),r.setCoords(t.x,e.y)):(o.setCoordsPoint2D(t),ot(o,e,i,n,r))}function ht(t){return t.getUnit().getUnitToBaseFactor()}function mt(t){return t.getUnit().getUnitToBaseFactor()}function at(t){return t.getPECoordSys().getDatum().getSpheroid().getAxis()}function ct(t,e,s){return s<=.5?t+(e-t)*s:e-(e-t)*(1-s)}class lt{checkSegment(){for(let t=0;t<this.n;t++){if(null!==this.pSplitLines2Info&&this.pSplitLines2Info.hasSplitLines()&&!this.bCheckIfNoDensificationNeededForCurve){const t=this.pSplitLines2Info.getSplitLineFactorEx(this.rectifiedSegment,this.leftFactor,this.rightFactor,this.leftGcsToDensifiedPoint,this.rightGcsToDensifiedPoint,this.progressTracker);if(Number.isNaN(t))return-1;if(-1!==t&&this.leftFactor<t&&t<this.rightFactor)return this.cutFactor=t,this.cutFromDensifiedPoint.assign(this.rectifiedSegment.getCoord2D(this.cutFactor)),this.cutToDensifiedPoint.assign(Q(this.cutFromDensifiedPoint,this.transform)),this.cutGcsToDensifiedPoint.setCoordsPoint2D(this.cutToDensifiedPoint),this.cutToDensifiedPoint.assign(Q(this.cutGcsToDensifiedPoint,this.transform2)),this.midFactor=this.cutFactor,this.midFromDensifiedPoint.setCoordsPoint2D(this.cutFromDensifiedPoint),this.midToDensifiedPoint.setCoordsPoint2D(this.cutToDensifiedPoint),this.midGcsToDensifiedPoint.setCoordsPoint2D(this.cutGcsToDensifiedPoint),1}if(this.cutFactor=ct(this.leftFactor,this.rightFactor,this.scalars[t]),this.cutFromDensifiedPoint.assign(this.rectifiedSegment.getCoord2D(this.cutFactor)),this.cutToDensifiedPoint.assign(Q(this.cutFromDensifiedPoint,this.transform)),null!==this.transform2&&(this.cutGcsToDensifiedPoint.setCoordsPoint2D(this.cutToDensifiedPoint),this.cutToDensifiedPoint.assign(Q(this.cutGcsToDensifiedPoint,this.transform2))),0===t&&(this.midFactor=this.cutFactor,this.midFromDensifiedPoint.setCoordsPoint2D(this.cutFromDensifiedPoint),this.midToDensifiedPoint.setCoordsPoint2D(this.cutToDensifiedPoint),this.midGcsToDensifiedPoint.setCoordsPoint2D(this.cutGcsToDensifiedPoint)),this.bIsPannableFrom&&!this.bCheckIfNoDensificationNeededForCurve&&Math.abs(this.leftFromDensifiedPoint.x-this.rightFromDensifiedPoint.x)>=.25*this.pannableExtentFrom.width())return 1;let e;if(this.bCheckIfNoDensificationNeededForCurve){const t=this.projCurveSegment.get().getClosestCoordinate(this.cutToDensifiedPoint,!1),s=this.projCurveSegment.get().getCoord2D(t);e=p.sqrDistance(this.cutToDensifiedPoint,s)}else{const s=new p,i=new p,n=V(this.leftToDensifiedPoint,this.cutToDensifiedPoint,this.rightToDensifiedPoint,this.bSrToIsGcs,this.bIsPannableTo,this.pannableExtentTo,s,i);this.line.setStartXY(s),this.line.setEndXY(i);const o=this.line.getClosestCoordinate(this.cutToDensifiedPoint,!0);if(n||t>0||Math.abs(o-this.scalars[t])<.3){const t=this.line.getCoord2D(o);e=p.sqrDistance(this.cutToDensifiedPoint,t)}else e=2*this.maxDeviationInSrToSq,this.bNeedPostFiltering=!0}if(e>this.maxDeviationInSrToSq)return this.bCheckIfNoDensificationNeededForCurve=!1,1}return 0}constructor(t,e,s,i,n,o,r,h,m,a,c,l,_){this.leftFromDensifiedPoint=new p,this.rightFromDensifiedPoint=new p,this.cutFromDensifiedPoint=new p,this.midFromDensifiedPoint=new p,this.leftToDensifiedPoint=new p,this.rightToDensifiedPoint=new p,this.cutToDensifiedPoint=new p,this.midToDensifiedPoint=new p,this.line=new f,this.leftGcsToDensifiedPoint=new p,this.rightGcsToDensifiedPoint=new p,this.cutGcsToDensifiedPoint=new p,this.midGcsToDensifiedPoint=new p,this.bSrToIsGcs=!1,this.bIsCurve=!1,this.leftFactor=0,this.rightFactor=0,this.bIsFirstInPath=!1,this.rectifiedSegment=null,this.transform=null,this.bIsPannableFrom=!1,this.pannableExtentFrom=new u,this.bIsPannableTo=!1,this.bNeedPostFiltering=!1,this.pannableExtentTo=new u,this.transform2=null,this.pHorizon2Info=null,this.pSplitLines2Info=null,this.minLengthInSrFrom=0,this.maxDeviationInSrToSq=0,this.cutFactor=0,this.midFactor=0,this.pDensifiedFactors=null,this.pDensifiedPoints=[],this.rightFromDensifiedPointsStack=[],this.rightToDensifiedPointsStack=[],this.rightGcsToDensifiedPointsStack=[],this.rightFactorsStack=[],this.projCurveSegment=new g,this.n=0,this.bCheckIfNoDensificationNeededForCurve=!1,this.scalars=P(A-1,Number.NaN),this.progressTracker=_,this.transform=t,this.bIsPannableFrom=e,this.pannableExtentFrom.assign(s),this.bIsPannableTo=i,this.pannableExtentTo.assign(n),this.transform2=o,this.pHorizon2Info=r,this.pSplitLines2Info=h,this.minLengthInSrFrom=m,this.maxDeviationInSrToSq=a,this.pDensifiedFactors=c,this.pDensifiedPoints=l,this.progressTracker=_,this.bNeedPostFiltering=!1}needsPostFiltering(){return this.bNeedPostFiltering}densifySegment(t,e){if(this.bIsFirstInPath=t,this.rectifiedSegment=e,this.leftGcsToDensifiedPoint.setNAN(),this.rightGcsToDensifiedPoint.setNAN(),this.cutGcsToDensifiedPoint.setNAN(),this.midGcsToDensifiedPoint.setNAN(),this.bSrToIsGcs=null!=this.transform2?1===this.transform2.getOutputSR().getCoordinateSystemType():1===this.transform.getOutputSR().getCoordinateSystemType(),this.bIsCurve=this.rectifiedSegment.isCurve(),this.leftFactor=0,this.rightFactor=1,this.leftFromDensifiedPoint.assign(this.rectifiedSegment.getStartXY()),this.rightFromDensifiedPoint.assign(this.rectifiedSegment.getEndXY()),this.leftToDensifiedPoint.assign(Q(this.leftFromDensifiedPoint,this.transform)),this.rightToDensifiedPoint.assign(Q(this.rightFromDensifiedPoint,this.transform)),null!==this.transform2&&(this.leftGcsToDensifiedPoint.setCoordsPoint2D(this.leftToDensifiedPoint),this.rightGcsToDensifiedPoint.setCoordsPoint2D(this.rightToDensifiedPoint),this.leftToDensifiedPoint.assign(Q(this.leftGcsToDensifiedPoint,this.transform2)),this.rightToDensifiedPoint.assign(Q(this.rightGcsToDensifiedPoint,this.transform2)),this.bIsFirstInPath&&!this.pHorizon2Info.isPointStartInHorizon(this.leftGcsToDensifiedPoint,this.progressTracker)))return!1;this.rightFromDensifiedPointsStack.length=0,this.rightToDensifiedPointsStack.length=0,this.rightGcsToDensifiedPointsStack.length=0,this.rightFactorsStack.length=0,this.rightFromDensifiedPointsStack.push(this.rightFromDensifiedPoint.clone()),this.rightToDensifiedPointsStack.push(this.rightToDensifiedPoint.clone()),this.rightFactorsStack.push(this.rightFactor),null!=this.transform2&&this.rightGcsToDensifiedPointsStack.push(this.rightGcsToDensifiedPoint.clone()),null!==this.pDensifiedPoints&&this.pDensifiedPoints.push(this.leftFromDensifiedPoint.clone()),null!==this.pDensifiedFactors&&this.pDensifiedFactors.push(this.leftFactor),this.bIsCurve?this.rectifiedSegment.getGeometryType()===r.enumBezier?this.n=A-1:this.n=5:this.n=3,H(this.n,this.scalars);const s=this.rectifiedSegment.calculateLength2D();if(this.bCheckIfNoDensificationNeededForCurve=!1,this.bIsCurve){const t=new _({vd:this.rectifiedSegment.getDescription()});let e=(new b).execute(t,this.transform,this.progressTracker);if(null!==this.transform2){const t=new u;if(e.queryEnvelope(t),!this.pHorizon2Info.isEnvelopeInHorizon(t,this.progressTracker))return!1;e=(new b).execute(e,this.transform2,this.progressTracker)}e.getSegmentBuffer(0,this.projCurveSegment,!1),this.bCheckIfNoDensificationNeededForCurve=!0}for(;this.rightFromDensifiedPointsStack.length>0;){let t=!1;if(this.cutFactor=Number.NaN,this.midFactor=Number.NaN,this.midFromDensifiedPoint.setNAN(),this.midToDensifiedPoint.setNAN(),(this.rightFactor-this.leftFactor)*s>this.minLengthInSrFrom){const e=this.checkSegment();if(-1===e)return!1;t=0!==e}if(t)this.rightFromDensifiedPoint.setCoordsPoint2D(this.midFromDensifiedPoint),this.rightToDensifiedPoint.setCoordsPoint2D(this.midToDensifiedPoint),this.rightFactor=this.midFactor,this.rightFromDensifiedPointsStack.push(this.rightFromDensifiedPoint.clone()),this.rightToDensifiedPointsStack.push(this.rightToDensifiedPoint.clone()),this.rightFactorsStack.push(this.rightFactor),null!==this.transform2&&(this.rightGcsToDensifiedPoint.setCoordsPoint2D(this.midGcsToDensifiedPoint),this.rightGcsToDensifiedPointsStack.push(this.rightGcsToDensifiedPoint.clone()));else{if(null!==this.transform2&&!this.pHorizon2Info.isAdjoiningLineInHorizon(this.leftGcsToDensifiedPoint,this.rightGcsToDensifiedPoint,this.progressTracker))return!1;if(this.rightFromDensifiedPointsStack.pop(),this.rightToDensifiedPointsStack.pop(),this.rightFactorsStack.pop(),null!==this.transform2&&this.rightGcsToDensifiedPointsStack.pop(),null!==this.pDensifiedPoints&&this.pDensifiedPoints.push(this.rightFromDensifiedPoint.clone()),null!==this.pDensifiedFactors&&this.pDensifiedFactors.push(this.rightFactor),this.rightFromDensifiedPointsStack.length>0){this.leftFromDensifiedPoint.setCoordsPoint2D(this.rightFromDensifiedPoint),this.leftToDensifiedPoint.setCoordsPoint2D(this.rightToDensifiedPoint),this.leftFactor=this.rightFactor;const t=this.rightFromDensifiedPointsStack.at(-1),e=this.rightToDensifiedPointsStack.at(-1);if(this.rightFromDensifiedPoint.setCoordsPoint2D(t),this.rightToDensifiedPoint.setCoordsPoint2D(e),this.rightFactor=this.rightFactorsStack.at(-1),null!==this.transform2){this.leftGcsToDensifiedPoint.setCoordsPoint2D(this.rightGcsToDensifiedPoint);const t=this.rightGcsToDensifiedPointsStack.at(-1);this.rightGcsToDensifiedPoint.setCoordsPoint2D(t)}}}}return!0}}class ut{getOperatorType(){return 10315}supportsCurves(){return!1}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}executeMany(t,e,s,i,n,o){return q(s)?new ft(t,e,s,i,n,o):(new b).executeMany(t,s,o)}execute(t,e,s,i,n){if(!q(e))return(new b).execute(t,e,n);const o=new M;return o.prepare(e,null,n),o.execute(t,s,i,n)}}class ft extends t{constructor(t,s,i,n,o,r){super(),this.m_spp=null,this.m_index=-1,t||e(""),this.m_progressTracker=r,this.m_geometries=t,this.m_geometriesExtent=s?s.clone():null,this.m_transform=i,this.m_minSegmentLengthInDegrees=n,this.m_maxDeviationInSrTo=o}tock(){return!0}getRank(){return 1}next(){this.m_spp||(this.m_spp=new M,this.m_spp.prepare(this.m_transform,this.m_geometriesExtent,this.m_progressTracker));const t=this.m_geometries.next();return s(t),i(t),null!=t?(this.m_index=this.m_geometries.getGeometryID(),this.m_spp.execute(t,this.m_minSegmentLengthInDegrees,this.m_maxDeviationInSrTo,this.m_progressTracker)):null}getGeometryID(){return this.m_index}}export{ut as OperatorShapePreservingProject};
5
+ import{G as t}from"./SimpleGeometryCursor.js";import{a as e,d as s,o as i,p as n,g as o,G as r,f as h,h as m,t as a}from"./Geometry.js";import{E as c,P as l}from"./Envelope.js";import{Envelope2D as u}from"./Envelope2D.js";import{L as f,S as g,P as _}from"./QuadraticBezier.js";import{o as d,P as p,d as P}from"./Point2D.js";import{T}from"./Transformation2D.js";import{v as b,aa as D,F as S,ab as x,O as I,g as F,f as C,r as N,h as y,ac as w,ad as E,A as v,ae as G,z}from"./ProjectionTransformation.js";import{c as k}from"./OperatorClip.js";function q(t){const e=t.getInputSR(),s=t.getOutputSR();let i=!1;do{if(e.equals(s)){i=!1;break}if(!H(e)||!H(s)){i=!1;break}if(2===e.getCoordinateSystemType()){i=!0;break}if(2===s.getCoordinateSystemType()){i=!0;break}const n=t.getGeographicTransformations();if(null!==n&&n.count()>0){i=!0;break}}while(0);return i}class L{constructor(t,e,s,i){this.m_horizon2Env=new u,this.m_horizon2=t,this.m_sr=e,this.m_bInclusive2=s,this.m_pannableExtent=i.clone(),this.m_segIter=null,this.m_qtIter=null,null!==t?(t.queryEnvelope(this.m_horizon2Env),this.m_gcs360=i.width(),this.m_gcs180=.5*this.m_gcs360,this.m_gcs90=.25*this.m_gcs360,this.m_pannableFactor=1,this.m_horizon2Env.width()-this.m_gcs360>0&&(this.m_pannableFactor+=Math.ceil((this.m_horizon2Env.width()-this.m_gcs360)/this.m_gcs360)),this.m_period=this.m_gcs360):(this.m_horizon2Env.setEmpty(),this.m_gcs360=Number.NaN,this.m_gcs180=Number.NaN,this.m_gcs90=Number.NaN,this.m_pannableFactor=Number.NaN,this.m_period=Number.NaN),this.m_gcsTolerance=null!=e?e.getTolerance(0):Number.NaN}isPointStartInHorizon(t,e){if(!this.m_horizon2)return!0;let s=nt(new l(t),this.m_horizon2,!0,this.m_period);do{const e=t.clone();if(e.x-=s*this.m_period,this.m_horizon2.getGeometryType()===r.enumPolygon){let t;if(t=this.m_horizon2Env.contains(e)?y(this.m_horizon2,e,0):0,this.m_bInclusive2){if(0===t)return!1}else if(1===t)return!1}else{const t=this.m_horizon2Env.contains(e);if(this.m_bInclusive2){if(!t)return!1}else if(t)return!1}}while(this.m_horizon2Env.xmin+ ++s*this.m_period<t.x);return!0}isAdjoiningLineInHorizon(t,e,s){if(!this.m_horizon2)return!0;const i=new p,n=new p;rt(t,e,this.m_gcs90,this.m_gcs180,this.m_gcs360,i,n);const h=Math.max(i.x,n.x),m=new f;m.setStart2D(i),m.setEnd2D(n);let a=nt(m,this.m_horizon2,!0,this.m_period);const c=!1;do{const t=i.clone(),e=n.clone();if(t.x-=a*this.m_period,e.x-=a*this.m_period,this.m_horizon2.getGeometryType()===r.enumPolygon){const s=new f;s.setStartXY(t),s.setEndXY(e);const i=new u,n=new u;if(s.queryEnvelope(i),n.setCoords({env2D:i}),n.inflateCoords(this.m_gcsTolerance,this.m_gcsTolerance),this.m_horizon2Env.isIntersecting(n)){const t=this.m_horizon2.getImpl(),e=t.getAccelerators();if(null!==e){null!==e.getRasterizedGeometry()&&o(0)}{let i=null;if(null!==e&&(i=e.getQuadTree()),null!==i){this.m_qtIter||(this.m_qtIter=i.getIteratorForQT()),this.m_qtIter.resetIterator(s,this.m_gcsTolerance),this.m_segIter||(this.m_segIter=t.querySegmentIterator());for(let t=this.m_qtIter.next();-1!==t;t=this.m_qtIter.next()){const e=i.getElement(t);this.m_segIter.resetToVertex(e,-1);if(this.m_segIter.nextSegment().isIntersecting(s,this.m_gcsTolerance))return!1}}else for(this.m_segIter||(this.m_segIter=t.querySegmentIterator()),this.m_segIter.resetToFirstPath();this.m_segIter.nextPath();)for(;this.m_segIter.hasNextSegment();){const t=this.m_segIter.nextSegment(),e=new u;if(t.queryEnvelope(e),e.isIntersecting(n)&&t.isIntersecting(s,this.m_gcsTolerance))return!1}}}}else if(this.m_bInclusive2){const s=this.m_horizon2Env.contains(t),i=this.m_horizon2Env.contains(e);if(s&&i)return!0}else{const s=this.m_horizon2Env.clone();s.inflateCoords(this.m_gcsTolerance,this.m_gcsTolerance);if(!(0===s.clipLine(t,e)))return!1}}while(this.m_horizon2Env.xmin+ ++a*this.m_period<h);return!this.m_bInclusive2||c}isEnvelopeInHorizon(t,e){if(!this.m_horizon2)return!0;const s=new c({env2D:t});let i=nt(s,this.m_horizon2,!0,this.m_period);do{const n=t.clone();n.move(-i*this.m_period,0),s.setCoords(n.xmin,n.ymin,n.xmax,n.ymax);if(!st(s,this.m_horizon2,this.m_sr,this.m_bInclusive2,e))return!1}while(this.m_horizon2Env.xmin+ ++i*this.m_period<t.xmax);return!0}}class R{constructor(t,e,s){this.m_splitLines2=null,this.m_scalars=[],this.m_splitIter=null,this.m_splitLines2=t,this.m_transform1=e,this.m_pannableExtent=s.clone(),this.m_gcs360=s.width(),this.m_gcs180=.5*this.m_gcs360,this.m_gcs90=.25*this.m_gcs360,null!==e?(this.m_gcsTolerance=this.m_transform1.getOutputSR().getTolerance(0),this.m_halfGcsTolerance=.5*this.m_gcsTolerance,this.m_gcsToleranceSq=this.m_gcsTolerance*this.m_gcsTolerance):(this.m_gcsTolerance=Number.NaN,this.m_halfGcsTolerance=Number.NaN,this.m_gcsToleranceSq=Number.NaN)}hasSplitLines(){return null!=this.m_splitLines2}getSplitLineFactorEx(t,e,s,i,n,o){const r=new p,h=new p;rt(i,n,this.m_gcs90,this.m_gcs180,this.m_gcs360,r,h);const m=new f;for(m.setStartXY(r),m.setEndXY(h),this.m_splitIter?this.m_splitIter.resetToFirstPath():this.m_splitIter=this.m_splitLines2.getImpl().querySegmentIterator();this.m_splitIter.nextPath();)for(;this.m_splitIter.hasNextSegment();){const i=this.m_splitIter.nextSegment(),n=.5*(i.getStartX()+i.getEndX());Z(this.m_gcs180,this.m_gcs360,n,m);const r=new u;m.queryEnvelope(r),r.inflateCoords(this.m_gcsTolerance,this.m_gcsTolerance);const h=new u;if(i.queryEnvelope(h),!r.isIntersecting(h))continue;this.m_scalars.length<2&&(this.m_scalars.length=2);if(1===m.intersect(i,null,this.m_scalars,null,this.m_gcsTolerance)&&(this.m_scalars[0]>0&&this.m_scalars[0]<1)){const n=ct(e,s,this.m_scalars[0]),r=Q(t.getCoord2D(n),this.m_transform1);if(i.isIntersectingPoint(r,this.m_halfGcsTolerance))return n;return this.getSplitLineFactor(t,e,s,i,o)}}return-1}getSplitLineFactor(t,e,s,i,n){let o=e,r=s;const h=.5*(i.getStartX()+i.getEndX()),m=new f,a=t.getCoord2D(o),c=t.getCoord2D(r),l=Q(a,this.m_transform1),u=Q(c,this.m_transform1);for(;o<r;){const e=new p,s=new p;rt(l,u,this.m_gcs90,this.m_gcs180,this.m_gcs360,e,s),m.setStartXY(e),m.setEndXY(s),Z(this.m_gcs180,this.m_gcs360,h,m);const n=p.sqrDistance(m.getStartXY(),m.getEndXY());if(n<=this.m_gcsToleranceSq)break;if(Number.isNaN(n))return Number.NaN;let f=ct(o,r,this.m_scalars[0]);if(o<f&&f<r||(f=.5*(r+o)),o===f||f===r)return f;const g=t.getCoord2D(f),_=Q(g,this.m_transform1),d=new p;rt(l,_,this.m_gcs90,this.m_gcs180,this.m_gcs360,e,d),m.setStartXY(e),m.setEndXY(d),Z(this.m_gcs180,this.m_gcs360,h,m);let P=m.intersect(i,null,this.m_scalars,null,this.m_halfGcsTolerance);if(0!==P){if(1===this.m_scalars[0])return f;r=f,c.setCoordsPoint2D(g),u.setCoordsPoint2D(_)}else{if(rt(_,u,this.m_gcs90,this.m_gcs180,this.m_gcs360,d,s),m.setStartXY(d),m.setEndXY(s),Z(this.m_gcs180,this.m_gcs360,h,m),P=m.intersect(i,null,this.m_scalars,null,this.m_halfGcsTolerance),0===P)return f;if(0===this.m_scalars[0])return f;o=f,a.setCoordsPoint2D(g),l.setCoordsPoint2D(_)}}return.5*(r+o)}}class M{constructor(){this.m_bPrepared=!1,this.m_bNeedsShapePreservingProject=!1,this.m_inputTransform=null,this.m_transform1=null,this.m_transform2=null,this.m_extentFrom=null,this.m_horizon1=null,this.m_horizon2=null,this.m_pannableExtentFrom=new u,this.m_pannableExtentTo=new u,this.m_pannableExtentGcsTo=new u,this.m_bClipTopBottomFrom=!1,this.m_bNeedsGeoTransform=!1,this.m_bIsPannableFrom=!1,this.m_bIsPannableTo=!1,this.m_bInclusive1=!1,this.m_bInclusive2=!1,this.m_bSrFromIsPcs=!1,this.m_bSrToIsPcs=!1,this.m_fromTolerance=Number.NaN,this.m_toTolerance=Number.NaN,this.m_gcsToTolerance=Number.NaN,this.m_aFrom=Number.NaN,this.m_mpuFrom=Number.NaN,this.m_rpuFrom=Number.NaN,this.m_rpuGcsTo=Number.NaN,this.m_aTo=Number.NaN,this.m_mpuTo=Number.NaN,this.m_stages=0}prepare(t,s,i){this.m_bPrepared&&n(""),t||e("");const r=t.getInputSR(),h=t.getOutputSR();H(r)&&H(h)||e("shape preserving project requires PCS or GCS");const m=r.getCoordinateSystemType(),a=h.getCoordinateSystemType();this.m_bSrFromIsPcs=2===m,this.m_bSrToIsPcs=2===a;let c=null,l=null,u=null,f=null;this.m_bSrFromIsPcs?(c=r,u=r.getGCS(),this.m_aFrom=at(u),this.m_mpuFrom=mt(c),this.m_rpuFrom=Number.NaN):(u=r,this.m_rpuFrom=ht(u),this.m_aFrom=Number.NaN),this.m_bSrToIsPcs?(l=h,f=h.getGCS(),this.m_aTo=at(f),this.m_mpuTo=mt(l)):(f=h,this.m_aTo=Number.NaN,this.m_mpuTo=Number.NaN),this.m_rpuGcsTo=ht(f);const g=t.getGeographicTransformations();this.m_bNeedsGeoTransform=null!==g&&g.count()>0;const _=r.equals(h);if(this.m_bNeedsShapePreservingProject=!_&&(this.m_bSrFromIsPcs||this.m_bSrToIsPcs||this.m_bNeedsGeoTransform),!this.m_bNeedsShapePreservingProject)return this.m_inputTransform=t,this.m_extentFrom=s?s.clone():null,void(this.m_bPrepared=!0);if(this.m_bIsPannableFrom=r.isPannable(),this.m_bIsPannableTo=h.isPannable(),this.m_bIsPannableFrom&&(this.m_pannableExtentFrom=r.getPannableExtent()),this.m_bIsPannableTo&&(this.m_pannableExtentTo=h.getPannableExtent()),this.m_bSrToIsPcs){this.m_pannableExtentGcsTo=f.getPannableExtent();const t=l.getCentralMeridian(),e=this.m_pannableExtentGcsTo.getCenter();e.x=t,this.m_pannableExtentGcsTo.centerAt(e)}else this.m_pannableExtentGcsTo=this.m_pannableExtentTo.clone();this.m_fromTolerance=r.getTolerance(0),this.m_toTolerance=h.getTolerance(0),this.m_gcsToTolerance=f.getTolerance(0);{const e=t.getExtendedParams(),n=e.clipWithInputHorizon,o=e.clipWithOutputHorizon;n&&this.setHorizon1(t,s,i),o&&this.setHorizon2(t,i),this.checkAndSetStages(t,i)}const d=w();d.setFlag(1073741824,!0),d.setFlag(536870912,!0);const p=E();if(p.clipWithInputHorizon=!1,p.clipWithOutputHorizon=!1,1===this.m_stages)this.m_transform1=D(!1,r,h,g,p,d);else if(2===this.m_stages){d.setFlag(2147483648,!0),this.m_transform1=D(!1,r,f,g,p,d);const t=w();this.m_transform2=D(!1,f,h,null,p,t)}else{o(null!=l),p.centralMeridianOfOutputGCS=l.getCentralMeridian(),this.m_transform1=D(!1,r,f,g,p,d);const t=w();t.setFlag(2147483648,!0),this.m_transform2=D(!1,f,h,null,p,t)}this.m_inputTransform=t,this.m_extentFrom=s?s.clone():null,this.m_bPrepared=!0}execute(t,e,s,i){this.m_bPrepared||n(""),o(!t.hasAttribute(10));return this.execute_(t,e,s,i)}checkIfNeedsReset(t,e){return o(0),!1}setHorizon1(t,e,s){const i=t.getInputSR();let n,o=null;const r=new u;if(this.m_bSrFromIsPcs){n=!0,o=i.getPCSHorizon(),o.queryEnvelope(r),this.m_bIsPannableFrom&&(o=new c({xmin:this.m_pannableExtentFrom.xmin,ymin:r.ymin,xmax:this.m_pannableExtentFrom.xmax,ymax:r.ymax}));let t=!1;null!=e&&(t=et(e,o,i,n,this.m_bIsPannableFrom,this.m_pannableExtentFrom,s)),t||(this.m_horizon1=o,this.m_bInclusive1=n)}else this.m_bClipTopBottomFrom=!0,this.m_bInclusive1=!0}setHorizon2(t,e){const s=t.getOutputSR();if(1===s.getCoordinateSystemType())return this.m_horizon2=null,void(this.m_bInclusive2=!1);let i=null;const n=new u,o=s.getGCSHorisonIsInclusive();i=s.getGCSHorizon(),i.queryEnvelope(n);const r=s.getCentralMeridian();if(this.m_bIsPannableTo){const t=new c({xmin:this.m_pannableExtentGcsTo.xmin,ymin:n.ymin,xmax:this.m_pannableExtentGcsTo.xmax,ymax:n.ymax});t.centerAt(r,0),i=t}this.m_horizon2=i,this.m_bInclusive2=o}checkAndSetStages(t,e){const s=t.getOutputSR().getGCSSplitLines();if(!this.m_horizon2&&!s)return void(this.m_stages=1);if(this.m_horizon2.getGeometryType()===r.enumEnvelope){const t=new u;this.m_horizon2.queryEnvelope(t);const e=t.width(),s=t.height();e>=d/this.m_rpuGcsTo&&s>=Math.PI/this.m_rpuGcsTo&&(this.m_horizon2=null)}if(this.m_horizon2||s){if(null!==this.m_horizon2&&!this.m_bNeedsGeoTransform&&!this.m_bSrFromIsPcs){const e=t.getOutputSR().getGCS();return t.getInputSR().equals(e)?(this.m_horizon1=this.m_horizon2,this.m_bInclusive1=this.m_bInclusive2,this.m_bClipTopBottomFrom=!1,this.m_horizon2=null,this.m_bInclusive2=!1,void(this.m_stages=1)):void(this.m_stages=2)}this.m_stages=3}else this.m_stages=1}execute_(t,e,n,o){if(!this.m_bNeedsShapePreservingProject)return(new b).execute(t,this.m_inputTransform,o);if(!t)return null;s(t),i(t);let a,c=t.getGeometryType();return h(c)?(a=W(t),c=r.enumPolyline):a=t,a.isEmpty()?a:m(c)?this.executeEx(t,e,n,o):(new b).execute(t,this.m_inputTransform,o)}executeEx(t,e,s,i){let n;t.hasNonLinearSegments()&&a(""),n=this.m_bIsPannableFrom?(new b).foldInto360Range(t,this.m_transform1.getInputSR()):t;let o,r=s;return r>0||(r=100*this.m_toTolerance),o=1===this.m_stages?this.executeGood(n,e,r,i):2===this.m_stages?this.executeBad(n,e,r,i):this.executeUgly(n,e,r,i),this.filterOverDensification(o,this.m_inputTransform.getOutputSR(),r,i)}executeGood(t,e,s,i){const n=s*s;let o,r;return o=e>0?this.getMinLengthInSrFrom(e):this.getMinLengthInSrFrom(1e-5),r=this.m_bClipTopBottomFrom?S(t,this.m_transform1.getInputSR()):$(t,this.m_transform1.getInputSR(),this.m_horizon1,this.m_bInclusive1,this.m_bIsPannableFrom,this.m_pannableExtentFrom,!0,Number.NaN,i),r=x(r,this.m_transform1.getOutputSR(),i),r=j(r,this.m_transform1,this.m_bIsPannableFrom,this.m_pannableExtentFrom,this.m_bIsPannableTo,this.m_pannableExtentTo,null,null,null,null,o,n,i),r=(new b).execute(r,this.m_transform1,i),r}executeBad(t,e,s,i){let n;n=e>0?e*(Math.PI/180/this.m_rpuGcsTo):Math.PI/180/this.m_rpuGcsTo*1e-5;const o=s*s;let r;return r=this.m_bClipTopBottomFrom?S(t,this.m_transform1.getInputSR()):t,r=(new b).execute(r,this.m_transform1,i),r=$(r,this.m_transform2.getInputSR(),this.m_horizon2,this.m_bInclusive2,!0,this.m_pannableExtentGcsTo,!0,Number.NaN,i),r=x(r,this.m_transform2.getOutputSR(),i),r=j(r,this.m_transform2,!0,this.m_pannableExtentGcsTo,this.m_bIsPannableTo,this.m_pannableExtentTo,null,null,null,null,n,o,i),r=(new b).execute(r,this.m_transform2,i),r}executeUgly(t,e,s,i){const n=s*s;let o;o=e>0?this.getMinLengthInSrFrom(e):this.getMinLengthInSrFrom(1e-5);let r=null;r=this.m_bClipTopBottomFrom?S(t,this.m_transform1.getInputSR()):$(t,this.m_transform1.getInputSR(),this.m_horizon1,this.m_bInclusive1,this.m_bIsPannableFrom,this.m_pannableExtentFrom,!0,Number.NaN,i);let h=r;const m=new L(this.m_horizon2,this.m_transform2.getInputSR(),this.m_bInclusive2,this.m_pannableExtentGcsTo),a=this.m_transform2.getOutputSR().getGCSSplitLines(),c=new R(a,this.m_transform1,this.m_pannableExtentGcsTo);if(r=j(r,this.m_transform1,this.m_bIsPannableFrom,this.m_pannableExtentFrom,this.m_bIsPannableTo,this.m_pannableExtentTo,this.m_transform2,m,this.m_pannableExtentGcsTo,c,o,n,i),null!==r){h=null,r=(new b).execute(r,this.m_transform1,i);const t=Math.PI/180/this.m_rpuGcsTo*2;return r=$(r,this.m_transform2.getInputSR(),this.m_horizon2,this.m_bInclusive2,!0,this.m_pannableExtentGcsTo,!1,t,i),r=(new b).execute(r,this.m_transform2,i),r}let l=Number.NaN;l=s>0?s:100*this.m_toTolerance,l/=this.m_rpuGcsTo*this.m_aTo/this.m_mpuTo;const u=l*l;let f;return r=j(h,this.m_transform1,this.m_bIsPannableFrom,this.m_pannableExtentFrom,!0,this.m_pannableExtentGcsTo,null,null,null,null,o,u,i),h=null,r=(new b).execute(r,this.m_transform1,i),f=e>0?e*(Math.PI/180/this.m_rpuGcsTo):Math.PI/180/this.m_rpuGcsTo*1e-5,r=$(r,this.m_transform2.getInputSR(),this.m_horizon2,this.m_bInclusive2,!0,this.m_pannableExtentGcsTo,!1,Number.NaN,i),r=x(r,this.m_transform2.getOutputSR(),i),r=j(r,this.m_transform2,!0,this.m_pannableExtentGcsTo,this.m_bIsPannableTo,this.m_pannableExtentTo,null,null,null,null,f,n,i),r=(new b).execute(r,this.m_transform2,i),r}getMinLengthInSrFrom(t){let e;return e=this.m_bSrFromIsPcs?this.m_aFrom*(t*Math.PI/180)/this.m_mpuFrom:t*Math.PI/180*(1/this.m_rpuFrom),e}filterOverDensification(t,e,s,i){let n=X(t,s);return n.dropAttribute(10),n!==t&&n.getGeometryType()===r.enumPolygon&&(n=(new I).execute(n,e,!1,i)),n}}function X(t,e){if(t.isEmpty()||!t.hasAttribute(10))return t;const s=e*e;let i=t.getAttributeStreamRef(10),n=!1;const o=new f,r=[];let h=!1;for(let a=0,c=t.getPathCount();a<c;a++){const e=t.getPathStart(a),m=t.getPathEnd(a),c=t.isClosedPath(a);if(!(m>e))continue;{const t=c?e:m-1;0===i.read(e)&&0===i.read(t)||(n||(i=i.clone(),n=!0),i.write(e,0),i.write(t,0))}const l=c?m+1:m;let u=e;for(let a=e;a<l;a++){const c=a===m?e:a;if(0===i.read(c)){if(a-u>1){r.push({from:u,to:a});const c=new p;for(;r.length>0;){const a=r.at(-1);r.pop(),o.setStartXY(t.getXY(a.from));const l=a.to===m?e:a.to;o.setEndXY(t.getXY(l));let u=s,f=-1;for(let e=a.from+1,s=a.to;e<s;e++){const s=t.getXY(e),i=o.getClosestCoordinate(s,!1);o.queryCoord2D(i,c);const n=p.sqrDistance(c,s);u<n&&(u=n,f=e)}f>=0?(n||(i=i.clone(),n=!0),i.write(f,0),f-a.from>1&&r.push({from:a.from,to:f}),a.to-f>1&&r.push({from:f,to:a.to})):h=!0}}u=c}}}if(!h)return t;const m=A(t,i,1);return m.dropAttribute(10),m}function A(t,e,s){const i=t.createInstance(),n=new l;for(let o=0,r=t.getPathCount();o<r;o++){let r=!0,h=0,m=0;const a=t.getPathStart(o),c=t.getPathEnd(o);let l=!0;for(let u=a;u<c;u++){e.read(u)===s?(!l&&m>0&&(i.addSegmentsFromPath(t,o,h-a,m,r),m=0),l=!0):l?(l=!1,t.getPointByVal(u,n),r?(i.startPathPoint(n),r=!1):i.lineToPoint(n),h=u):m++}m>0&&i.addSegmentsFromPath(t,o,h-a,m,r)}return i}const Y=8;function O(t,e){const s=.5;for(let i=0;i<t;i++){let n=Math.ceil(i/2)/(t+1);i%2!=0&&(n=-n);const o=s+n;e[i]=o}}function H(t){if(!t)return!1;const e=t.getCoordinateSystemType();return 2===e||1===e}function j(t,e,s,i,n,o,r,h,m,a,c,l,u){const f=t.createInstance();f.addAttribute(10);const _=t.querySegmentIterator(),d=[],p=[],P=new g,T=t.getDescription().getAttributeCount()>1,b=new lt(e,s,i,n,o,r,h,a,c,l,T?p:null,d,u);for(;_.nextPath();)for(;_.hasNextSegment();){const t=_.nextSegment(),e=t.getStartXY(),s=t.getEndXY(),i=e.compare(s)>0,n=J(i,t,P);d.length=0,p.length=0;if(!b.densifySegment(_.isFirstSegmentInPath(),n))return null;i&&K(T?p:null,d),d.at(-1).setCoordsPoint2D(t.getEndXY());const o=f.getPointCount();if(T){const e=J(i,t,P);U(_.isFirstSegmentInPath(),_.isLastSegmentInPath()&&!_.isPathClosed(),t,e,p,d,f)}else B(_.isFirstSegmentInPath(),_.isLastSegmentInPath()&&!_.isPathClosed(),d,f);if(b.needsPostFiltering()){f.addAttribute(10);const t=f.getAttributeStreamRef(10);for(let e=1,s=d.length-1;e<s;e++)t.write(e+o,1)}}return f}function B(t,e,s,i){t&&i.insertPath2D(-1,null,0,0,!0);const n=i.getPathCount()-1;e?i.insertPointsFromPoints(n,-1,s,0,s.length,!0):i.insertPointsFromPoints(n,-1,s,0,s.length-1,!0)}function U(t,e,s,i,n,o,r){r.reserve(r.getPointCount()+o.length-1);const h=new l;if(s.queryStart(h),t?r.startPathPoint(h):r.lineToPoint(h),o.length>2){const t=i.calculateLength2D();for(let e=1;e<o.length-1;e++){const s=i.lengthToT(n[e]*t);i.queryCoord(s,h),h.setXY(o[e]),r.lineToPoint(h)}}e&&(s.queryEnd(h),r.lineToPoint(h))}function W(t){const e=new _({vd:t.getDescription()});return e.addSegment(t,!0),e}function Q(t,e){const s=e.getInputSR(),i=e.getOutputSR(),n=new p;2===s.getCoordinateSystemType()?(n.setCoordsPoint2D(t),v(s,0,[n],1)):n.setCoordsPoint2D(t);const o=new p;o.setCoordsPoint2D(n),G(e,[o],null,1,!1);const r=new p;return 2===i.getCoordinateSystemType()?(r.setCoordsPoint2D(o),z(i,[r],1,!1)):r.setCoordsPoint2D(o),r}function V(t,e,s,i,n,o,r,h){if(n){const n=o.width(),m=.5*n;if(i){const i=.25*n;let o=!1;const a=new p,c=new p;if(Math.abs(t.y)===i?(a.setCoords(s.x,t.y),c.setCoordsPoint2D(s),o=!0):Math.abs(s.y)===i&&(c.setCoords(t.x,s.y),a.setCoordsPoint2D(t),o=!0),Math.abs(e.y)===i&&(o||(a.setCoordsPoint2D(t),c.setCoordsPoint2D(s),o=!0),a.x=e.x),o)return ot(e,a,m,n,r),ot(e,c,m,n,h),!0}let a=0;t.x-e.x>m&&s.x-e.x>m?a-=n:e.x-t.x>m&&e.x-s.x>m&&(a+=n),Math.abs(e.x-(t.x+a))<m?(r.setCoordsPoint2D(t),ot(r,s,m,n,h),r.x+=a,h.x+=a):(r.setCoordsPoint2D(s),ot(r,t,m,n,h),r.x+=a,h.x+=a)}else r.setCoordsPoint2D(t),h.setCoordsPoint2D(s);return!1}function J(t,e,s){return t?(s.create(e.getGeometryType()),e.copyTo(s.get()),s.get().reverse(),s.get()):e}function K(t,e){e.reverse(),null!==t&&t.reverse()}function Z(t,e,s,i){const n=.5*(i.getStartX()+i.getEndX());if(n-s>t){const t=new T;t.setShiftCoords(-e,0),i.applyTransformation(t)}else if(s-n>t){const t=new T;t.setShiftCoords(e,0),i.applyTransformation(t)}}function $(t,e,s,i,n,o,r,h,m){const a=[!1];r&&tt(t,e,s,i,n,o,!0,h,a,m);let c=t;return a[0]||(c=tt(c,e,s,i,n,o,!1,h,null,m)),c=it(c,n,o,c!==t),c}function tt(t,e,s,i,n,o,h,m,a,c){if(h&&(a[0]=!1),null==s)return t;const l=new u,f=new u;s.queryEnvelope(l),t.queryEnvelope(f);const g=t.getGeometryType(),_=s.getGeometryType(),d=e.getTolerance(0);if(!n){if(h)return a[0]=st(t,s,e,i,c),null;let n;return n=i?_===r.enumEnvelope?k(t,l,d,m,c):(new F).execute(t,s,e,c):(new C).execute(t,s,e,c),n===s&&(n=s.clone()),n}const p=o.width(),P=p*Math.ceil(l.width()/p);let b=null;if(i){let o=nt(t,s,n,P),D=0;const S=new T;do{let n=null;if(_===r.enumEnvelope){const r=s.clone();if(S.setShiftCoords(o*P,0),r.applyTransformation(S),h){if(a[0]=st(t,r,e,i,c),!a[0])return null}else{const e=new u;r.queryEnvelope(e),n=k(t,e,d,m,c)}}else{const r=t.clone();if(S.setShiftCoords(-o*P,0),r.applyTransformation(S),h){if(a[0]=st(r,s,e,i,c),!a[0])return null}else n=(new F).execute(r,s,e,c),n===s&&(n=s.clone())}if(!h){if(n.isEmpty())continue;if(g===r.enumPolygon){const t=new u;if(n.queryEnvelope(t),t.width()<=d)continue}_===r.enumEnvelope&&(S.setShiftCoords(-o*P,0),n===t&&(n=n.clone()),n.applyTransformation(S)),null===b?b=n===t?n.clone():n:b.add(n,!1)}D++}while(l.xmin+ ++o*P<f.xmax);if(h)return null;null===b&&(b=t.createInstance()),g===r.enumPolygon&&D>1&&p-f.width()<=10*d&&(b=(new I).execute(b,e,!0,c))}else{let o=nt(t,s,n,P);if(b=t.clone(),0!==o){const t=new T;t.setShiftCoords(-o*P,0),b.applyTransformation(t)}do{if(h){if(a[0]=st(b,s,e,i,c),!a[0])return null}else if(b=(new C).execute(b,s,e,c),b===s&&(b=s.clone()),b.isEmpty())break;const t=new T;t.setShiftCoords(-P,0),b.applyTransformation(t)}while(l.xmin+ ++o*P<f.xmax);if(h)return null;if(!b.isEmpty()&&0!==o){const t=new T;t.setShiftCoords(o*P,0),b.applyTransformation(t)}}return b}function et(t,e,s,i,n,o,r){const h=[!1];return tt(t,s,e,i,n,o,!0,Number.NaN,h,r),h[0]}function st(t,e,s,i,n){let o;if(e.getGeometryType()===r.enumPolygon)if(i){o=N(e,t,s,64,n)}else{o=N(e,t,s,4,n)}else if(i){const s=new u,i=new u;e.queryEnvelope(s),t.queryEnvelope(i);o=s.containsEnvelope(i)}else{o=N(e,t,s,4,n)}return o}function it(t,e,s,i){let n;if(!e)return t;const o=s.getCenter().x,r=s.width(),h=.5*r,m=new u;t.queryEnvelope(m);const a=m.getCenter().x;let c=0;if(a-o>h){c=-Math.ceil((a-o-h)/r)*r}else if(o-a>h){c=Math.ceil((o-a-h)/r)*r}if(0!==c){n=i?t:t.clone();const e=new T;e.setShiftCoords(c,0),n.applyTransformation(e)}else n=t;return n}function nt(t,e,s,i){if(!s)return 0;let n=0;const o=new u;e.queryEnvelope(o);const r=new u;t.queryEnvelope(r);const h=o.xmin+i;for(;h+i+n*i>r.xmin;)n--;for(;h+n*i<r.xmin;)n++;return n}function ot(t,e,s,i,n){e.x-t.x>s?n.setCoords(e.x-i,e.y):t.x-e.x>s?n.setCoords(e.x+i,e.y):n.setCoordsPoint2D(e)}function rt(t,e,s,i,n,o,r){Math.abs(t.y)===s?(o.setCoords(e.x,t.y),r.setCoordsPoint2D(e)):Math.abs(e.y)===s?(o.setCoordsPoint2D(t),r.setCoords(t.x,e.y)):(o.setCoordsPoint2D(t),ot(o,e,i,n,r))}function ht(t){return t.getUnit().getUnitToBaseFactor()}function mt(t){return t.getUnit().getUnitToBaseFactor()}function at(t){return t.getPECoordSys().getDatum().getSpheroid().getAxis()}function ct(t,e,s){return s<=.5?t+(e-t)*s:e-(e-t)*(1-s)}class lt{checkSegment(){for(let t=0;t<this.n;t++){if(null!==this.pSplitLines2Info&&this.pSplitLines2Info.hasSplitLines()&&!this.bCheckIfNoDensificationNeededForCurve){const t=this.pSplitLines2Info.getSplitLineFactorEx(this.rectifiedSegment,this.leftFactor,this.rightFactor,this.leftGcsToDensifiedPoint,this.rightGcsToDensifiedPoint,this.progressTracker);if(Number.isNaN(t))return-1;if(-1!==t&&this.leftFactor<t&&t<this.rightFactor)return this.cutFactor=t,this.cutFromDensifiedPoint.assign(this.rectifiedSegment.getCoord2D(this.cutFactor)),this.cutToDensifiedPoint.assign(Q(this.cutFromDensifiedPoint,this.transform)),this.cutGcsToDensifiedPoint.setCoordsPoint2D(this.cutToDensifiedPoint),this.cutToDensifiedPoint.assign(Q(this.cutGcsToDensifiedPoint,this.transform2)),this.midFactor=this.cutFactor,this.midFromDensifiedPoint.setCoordsPoint2D(this.cutFromDensifiedPoint),this.midToDensifiedPoint.setCoordsPoint2D(this.cutToDensifiedPoint),this.midGcsToDensifiedPoint.setCoordsPoint2D(this.cutGcsToDensifiedPoint),1}if(this.cutFactor=ct(this.leftFactor,this.rightFactor,this.scalars[t]),this.cutFromDensifiedPoint.assign(this.rectifiedSegment.getCoord2D(this.cutFactor)),this.cutToDensifiedPoint.assign(Q(this.cutFromDensifiedPoint,this.transform)),null!==this.transform2&&(this.cutGcsToDensifiedPoint.setCoordsPoint2D(this.cutToDensifiedPoint),this.cutToDensifiedPoint.assign(Q(this.cutGcsToDensifiedPoint,this.transform2))),0===t&&(this.midFactor=this.cutFactor,this.midFromDensifiedPoint.setCoordsPoint2D(this.cutFromDensifiedPoint),this.midToDensifiedPoint.setCoordsPoint2D(this.cutToDensifiedPoint),this.midGcsToDensifiedPoint.setCoordsPoint2D(this.cutGcsToDensifiedPoint)),this.bIsPannableFrom&&!this.bCheckIfNoDensificationNeededForCurve&&Math.abs(this.leftFromDensifiedPoint.x-this.rightFromDensifiedPoint.x)>=.25*this.pannableExtentFrom.width())return 1;let e;if(this.bCheckIfNoDensificationNeededForCurve){const t=this.projCurveSegment.get().getClosestCoordinate(this.cutToDensifiedPoint,!1),s=this.projCurveSegment.get().getCoord2D(t);e=p.sqrDistance(this.cutToDensifiedPoint,s)}else{const s=new p,i=new p,n=V(this.leftToDensifiedPoint,this.cutToDensifiedPoint,this.rightToDensifiedPoint,this.bSrToIsGcs,this.bIsPannableTo,this.pannableExtentTo,s,i);this.line.setStartXY(s),this.line.setEndXY(i);const o=this.line.getClosestCoordinate(this.cutToDensifiedPoint,!0);if(n||t>0||Math.abs(o-this.scalars[t])<.3){const t=this.line.getCoord2D(o);e=p.sqrDistance(this.cutToDensifiedPoint,t)}else e=2*this.maxDeviationInSrToSq,this.bNeedPostFiltering=!0}if(e>this.maxDeviationInSrToSq)return this.bCheckIfNoDensificationNeededForCurve=!1,1}return 0}constructor(t,e,s,i,n,o,r,h,m,a,c,l,_){this.leftFromDensifiedPoint=new p,this.rightFromDensifiedPoint=new p,this.cutFromDensifiedPoint=new p,this.midFromDensifiedPoint=new p,this.leftToDensifiedPoint=new p,this.rightToDensifiedPoint=new p,this.cutToDensifiedPoint=new p,this.midToDensifiedPoint=new p,this.line=new f,this.leftGcsToDensifiedPoint=new p,this.rightGcsToDensifiedPoint=new p,this.cutGcsToDensifiedPoint=new p,this.midGcsToDensifiedPoint=new p,this.bSrToIsGcs=!1,this.bIsCurve=!1,this.leftFactor=0,this.rightFactor=0,this.bIsFirstInPath=!1,this.rectifiedSegment=null,this.transform=null,this.bIsPannableFrom=!1,this.pannableExtentFrom=new u,this.bIsPannableTo=!1,this.bNeedPostFiltering=!1,this.pannableExtentTo=new u,this.transform2=null,this.pHorizon2Info=null,this.pSplitLines2Info=null,this.minLengthInSrFrom=0,this.maxDeviationInSrToSq=0,this.cutFactor=0,this.midFactor=0,this.pDensifiedFactors=null,this.pDensifiedPoints=[],this.rightFromDensifiedPointsStack=[],this.rightToDensifiedPointsStack=[],this.rightGcsToDensifiedPointsStack=[],this.rightFactorsStack=[],this.projCurveSegment=new g,this.n=0,this.bCheckIfNoDensificationNeededForCurve=!1,this.scalars=P(Y-1,Number.NaN),this.progressTracker=_,this.transform=t,this.bIsPannableFrom=e,this.pannableExtentFrom.assign(s),this.bIsPannableTo=i,this.pannableExtentTo.assign(n),this.transform2=o,this.pHorizon2Info=r,this.pSplitLines2Info=h,this.minLengthInSrFrom=m,this.maxDeviationInSrToSq=a,this.pDensifiedFactors=c,this.pDensifiedPoints=l,this.progressTracker=_,this.bNeedPostFiltering=!1}needsPostFiltering(){return this.bNeedPostFiltering}densifySegment(t,e){if(this.bIsFirstInPath=t,this.rectifiedSegment=e,this.leftGcsToDensifiedPoint.setNAN(),this.rightGcsToDensifiedPoint.setNAN(),this.cutGcsToDensifiedPoint.setNAN(),this.midGcsToDensifiedPoint.setNAN(),this.bSrToIsGcs=null!=this.transform2?1===this.transform2.getOutputSR().getCoordinateSystemType():1===this.transform.getOutputSR().getCoordinateSystemType(),this.bIsCurve=this.rectifiedSegment.isCurve(),this.leftFactor=0,this.rightFactor=1,this.leftFromDensifiedPoint.assign(this.rectifiedSegment.getStartXY()),this.rightFromDensifiedPoint.assign(this.rectifiedSegment.getEndXY()),this.leftToDensifiedPoint.assign(Q(this.leftFromDensifiedPoint,this.transform)),this.rightToDensifiedPoint.assign(Q(this.rightFromDensifiedPoint,this.transform)),null!==this.transform2&&(this.leftGcsToDensifiedPoint.setCoordsPoint2D(this.leftToDensifiedPoint),this.rightGcsToDensifiedPoint.setCoordsPoint2D(this.rightToDensifiedPoint),this.leftToDensifiedPoint.assign(Q(this.leftGcsToDensifiedPoint,this.transform2)),this.rightToDensifiedPoint.assign(Q(this.rightGcsToDensifiedPoint,this.transform2)),this.bIsFirstInPath&&!this.pHorizon2Info.isPointStartInHorizon(this.leftGcsToDensifiedPoint,this.progressTracker)))return!1;this.rightFromDensifiedPointsStack.length=0,this.rightToDensifiedPointsStack.length=0,this.rightGcsToDensifiedPointsStack.length=0,this.rightFactorsStack.length=0,this.rightFromDensifiedPointsStack.push(this.rightFromDensifiedPoint.clone()),this.rightToDensifiedPointsStack.push(this.rightToDensifiedPoint.clone()),this.rightFactorsStack.push(this.rightFactor),null!=this.transform2&&this.rightGcsToDensifiedPointsStack.push(this.rightGcsToDensifiedPoint.clone()),null!==this.pDensifiedPoints&&this.pDensifiedPoints.push(this.leftFromDensifiedPoint.clone()),null!==this.pDensifiedFactors&&this.pDensifiedFactors.push(this.leftFactor),this.bIsCurve?this.rectifiedSegment.getGeometryType()===r.enumBezier?this.n=Y-1:this.n=5:this.n=3,O(this.n,this.scalars);const s=this.rectifiedSegment.calculateLength2D();if(this.bCheckIfNoDensificationNeededForCurve=!1,this.bIsCurve){const t=new _({vd:this.rectifiedSegment.getDescription()});let e=(new b).execute(t,this.transform,this.progressTracker);if(null!==this.transform2){const t=new u;if(e.queryEnvelope(t),!this.pHorizon2Info.isEnvelopeInHorizon(t,this.progressTracker))return!1;e=(new b).execute(e,this.transform2,this.progressTracker)}e.getSegmentBuffer(0,this.projCurveSegment,!1),this.bCheckIfNoDensificationNeededForCurve=!0}for(;this.rightFromDensifiedPointsStack.length>0;){let t=!1;if(this.cutFactor=Number.NaN,this.midFactor=Number.NaN,this.midFromDensifiedPoint.setNAN(),this.midToDensifiedPoint.setNAN(),(this.rightFactor-this.leftFactor)*s>this.minLengthInSrFrom){const e=this.checkSegment();if(-1===e)return!1;t=0!==e}if(t)this.rightFromDensifiedPoint.setCoordsPoint2D(this.midFromDensifiedPoint),this.rightToDensifiedPoint.setCoordsPoint2D(this.midToDensifiedPoint),this.rightFactor=this.midFactor,this.rightFromDensifiedPointsStack.push(this.rightFromDensifiedPoint.clone()),this.rightToDensifiedPointsStack.push(this.rightToDensifiedPoint.clone()),this.rightFactorsStack.push(this.rightFactor),null!==this.transform2&&(this.rightGcsToDensifiedPoint.setCoordsPoint2D(this.midGcsToDensifiedPoint),this.rightGcsToDensifiedPointsStack.push(this.rightGcsToDensifiedPoint.clone()));else{if(null!==this.transform2&&!this.pHorizon2Info.isAdjoiningLineInHorizon(this.leftGcsToDensifiedPoint,this.rightGcsToDensifiedPoint,this.progressTracker))return!1;if(this.rightFromDensifiedPointsStack.pop(),this.rightToDensifiedPointsStack.pop(),this.rightFactorsStack.pop(),null!==this.transform2&&this.rightGcsToDensifiedPointsStack.pop(),null!==this.pDensifiedPoints&&this.pDensifiedPoints.push(this.rightFromDensifiedPoint.clone()),null!==this.pDensifiedFactors&&this.pDensifiedFactors.push(this.rightFactor),this.rightFromDensifiedPointsStack.length>0){this.leftFromDensifiedPoint.setCoordsPoint2D(this.rightFromDensifiedPoint),this.leftToDensifiedPoint.setCoordsPoint2D(this.rightToDensifiedPoint),this.leftFactor=this.rightFactor;const t=this.rightFromDensifiedPointsStack.at(-1),e=this.rightToDensifiedPointsStack.at(-1);if(this.rightFromDensifiedPoint.setCoordsPoint2D(t),this.rightToDensifiedPoint.setCoordsPoint2D(e),this.rightFactor=this.rightFactorsStack.at(-1),null!==this.transform2){this.leftGcsToDensifiedPoint.setCoordsPoint2D(this.rightGcsToDensifiedPoint);const t=this.rightGcsToDensifiedPointsStack.at(-1);this.rightGcsToDensifiedPoint.setCoordsPoint2D(t)}}}}return!0}}class ut{getOperatorType(){return 10315}supportsCurves(){return!1}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}executeMany(t,e,s,i,n,o){return q(s)?new ft(t,e,s,i,n,o):(new b).executeMany(t,s,o)}execute(t,e,s,i,n){if(!q(e))return(new b).execute(t,e,n);const o=new M;return o.prepare(e,null,n),o.execute(t,s,i,n)}}class ft extends t{constructor(t,s,i,n,o,r){super(),this.m_spp=null,this.m_index=-1,t||e(""),this.m_progressTracker=r,this.m_geometries=t,this.m_geometriesExtent=s?s.clone():null,this.m_transform=i,this.m_minSegmentLengthInDegrees=n,this.m_maxDeviationInSrTo=o}tock(){return!0}getRank(){return 1}next(){this.m_spp||(this.m_spp=new M,this.m_spp.prepare(this.m_transform,this.m_geometriesExtent,this.m_progressTracker));const t=this.m_geometries.next();return s(t),i(t),null!=t?(this.m_index=this.m_geometries.getGeometryID(),this.m_spp.execute(t,this.m_minSegmentLengthInDegrees,this.m_maxDeviationInSrTo,this.m_progressTracker)):null}getGeometryID(){return this.m_index}}export{ut as OperatorShapePreservingProject};
@@ -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{S as e,G as r}from"./SimpleGeometryCursor.js";import{c as t,t as s,d as n}from"./Geometry.js";import{n as i,o}from"./ProjectionTransformation.js";class m{getOperatorType(){return 10104}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}isSimple(e,r,t,s,n){return 5===i(e,r,t,s,n)}executeMany(e,r,t,s){return new u(e,r,t,s)}execute(r,s,n,i){const o=new e([r]),m=this.executeMany(o,s,n,i).next();return m||t("null output"),m}}class u extends r{constructor(e,r,t,n){super(),e||s(""),this.m_progressTracker=n,this.m_bForceSimplify=t,this.m_index=-1,this.m_inputGeometryCursor=e,this.m_spatialReference=r}next(){const e=this.m_inputGeometryCursor.next();return e?(n(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.simplify(e)):null}getGeometryID(){return this.m_index}tock(){return!1}getRank(){return 1}simplify(e){e||s("");return o(e,this.m_spatialReference,this.m_bForceSimplify,this.m_progressTracker)}}export{m as O};
5
+ import{S as e,G as r}from"./SimpleGeometryCursor.js";import{c as t,a as s,d as n}from"./Geometry.js";import{n as i,o}from"./ProjectionTransformation.js";class m{getOperatorType(){return 10104}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}isSimple(e,r,t,s,n){return 5===i(e,r,t,s,n)}executeMany(e,r,t,s){return new u(e,r,t,s)}execute(r,s,n,i){const o=new e([r]),m=this.executeMany(o,s,n,i).next();return m||t("null output"),m}}class u extends r{constructor(e,r,t,n){super(),e||s(""),this.m_progressTracker=n,this.m_bForceSimplify=t,this.m_index=-1,this.m_inputGeometryCursor=e,this.m_spatialReference=r}next(){const e=this.m_inputGeometryCursor.next();return e?(n(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.simplify(e)):null}getGeometryID(){return this.m_index}tock(){return!1}getRank(){return 1}simplify(e){e||s("");return o(e,this.m_spatialReference,this.m_bForceSimplify,this.m_progressTracker)}}export{m as O};
@@ -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 r,r as e}from"./ProjectionTransformation.js";class t extends r{getOperatorType(){return 5}execute(r,t,o,s){return e(r,t,o,8,s)}}export{t as O};
5
+ import{e,r}from"./ProjectionTransformation.js";class t extends e{getOperatorType(){return 5}execute(e,t,o,s){return r(e,t,o,8,s)}}export{t as O};
@@ -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 r,r as e}from"./ProjectionTransformation.js";class t extends r{getOperatorType(){return 7}execute(r,t,o,s){return e(r,t,o,2,s)}}export{t as O};
5
+ import{e,r}from"./ProjectionTransformation.js";class t extends e{getOperatorType(){return 7}execute(e,t,o,s){return r(e,t,o,2,s)}}export{t as O};