@arcgis/core 4.34.0-next.28 → 4.34.0-next.29

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 (91) hide show
  1. package/applications/Components/featureUtils.d.ts +6 -0
  2. package/applications/Components/featureUtils.js +5 -0
  3. package/arcade/arcade.js +1 -1
  4. package/arcade/arcadeAsyncRuntime.js +1 -1
  5. package/arcade/arcadeCompiler.js +1 -1
  6. package/arcade/arcadeRuntime.js +1 -1
  7. package/arcade/functions/feature.js +1 -1
  8. package/arcade/functions/track.js +5 -0
  9. package/arcade/treeAnalysis.js +1 -1
  10. package/arcade.js +1 -1
  11. package/assets/esri/core/workers/RemoteClient.js +1 -1
  12. package/assets/esri/core/workers/chunks/086f3bc5938bf9a37274.js +1 -0
  13. package/assets/esri/core/workers/chunks/{7e5d3735a9c718591d64.js → 22f38cad0213f2112394.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{746c78e1c84f9612d69b.js → 2f54776ff86f397adc55.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{edfd8b482182803b44ca.js → 2fdf457786d2d5d7414f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/5192f38682f1f9be7da0.js +1 -0
  17. package/assets/esri/core/workers/chunks/{7ee50f75914d8d650af4.js → 63cb3dcd359e96733b1b.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{e49a95f2126ef9a994d3.js → 6ccd6171d3c572883034.js} +1 -1
  19. package/assets/esri/core/workers/chunks/89999baefa341bd3329c.js +1 -0
  20. package/assets/esri/core/workers/chunks/{629a924e99d5d6eb1998.js → 90a9b618058dc41294de.js} +1 -1
  21. package/assets/esri/core/workers/chunks/98f6d4ea026ed96fd3f3.js +1 -0
  22. package/assets/esri/core/workers/chunks/d3b1d1c389d70919fb02.js +1 -0
  23. package/assets/esri/core/workers/chunks/db81d881805f6f92a2e4.js +1 -0
  24. package/assets/esri/core/workers/chunks/e89698fc404379627349.js +1 -0
  25. package/assets/esri/core/workers/chunks/{0254ef9fb7f8ebb25304.js → ecc15622d6c434ea842b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{aa781b28dbe457427afc.js → fb71e533995c54cd806f.js} +1 -1
  27. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  28. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  29. package/chunks/OperatorGeodesicBuffer.js +1 -1
  30. package/chunks/OperatorGeodeticArea.js +1 -1
  31. package/chunks/OperatorGeodeticLength.js +1 -1
  32. package/chunks/OperatorProximityGeodesic.js +1 -1
  33. package/chunks/OperatorShapePreservingLength.js +1 -1
  34. package/chunks/OperatorShapePreservingProject.js +1 -1
  35. package/chunks/Terrain.glsl.js +11 -11
  36. package/chunks/UnitFactory.js +1 -1
  37. package/chunks/arcade.js +1 -1
  38. package/chunks/bundle.js +1 -1
  39. package/config.js +1 -1
  40. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  41. package/interfaces.d.ts +80 -2
  42. package/kernel.js +1 -1
  43. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  44. package/layers/ParquetLayer.js +1 -1
  45. package/layers/graphics/sources/ParquetSource.js +1 -1
  46. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  47. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  48. package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
  49. package/layers/orientedImagery/transformations/utils.js +1 -1
  50. package/layers/orientedImagery/transformations/worldToImage.js +1 -1
  51. package/layers/support/ParquetEncodingWkb.js +1 -1
  52. package/layers/support/layerUtils.js +1 -1
  53. package/layers/support/parquetUtils.js +1 -1
  54. package/libs/parquet/parquet.js +1 -1
  55. package/package.json +2 -2
  56. package/support/arcadeUtils.js +1 -1
  57. package/support/revision.js +1 -1
  58. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  59. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  60. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  61. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  62. package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
  63. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +5 -0
  64. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +5 -0
  65. package/views/2d/layers/features/sources/strategies/chunks/FeatureSourceEndChunk.js +5 -0
  66. package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +5 -0
  67. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  68. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  69. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  70. package/views/2d/layers/features/support/XZOrder.js +5 -0
  71. package/views/3d/terrain/TerrainRenderer.js +1 -1
  72. package/views/3d/webgl-engine/shaders/{ReadShadowMapConfiguration.js → ReceiveShadowsConfiguration.js} +1 -1
  73. package/views/draw/support/ConnectedReshapeManager.js +5 -0
  74. package/views/draw/support/Reshape.js +1 -1
  75. package/views/draw/support/layerUtils.js +1 -1
  76. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  77. package/widgets/Feature/support/featureUtils.js +1 -1
  78. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  79. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  80. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  81. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  82. package/widgets/OrientedImageryViewer/constants.js +1 -1
  83. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  84. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  85. package/widgets/PanoramicViewer.js +1 -1
  86. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  87. package/assets/esri/core/workers/chunks/16ff0bf4cb74f478ec1e.js +0 -1
  88. package/assets/esri/core/workers/chunks/1aff43dad2302677b4f4.js +0 -1
  89. package/assets/esri/core/workers/chunks/c6be02d2dff6e0734dab.js +0 -1
  90. package/assets/esri/core/workers/chunks/c8719205518e97131375.js +0 -1
  91. package/views/2d/layers/features/sources/strategies/ParquetLoadStrategy.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[847,1088],{26640:(e,t,n)=>{n.d(t,{D:()=>E,m:()=>m,s:()=>y,w:()=>d});var s=n(31635),i=n(55537),a=n(88885),r=n(39117),o=n(83661),_=n(79187),h=n(95213);function m(){return{outPoint:new o.P,index:-1,t:Number.NaN}}function u(e,t,n){return{outPoint:e.clone(),index:t,t:n}}function c(e,t,n,s){e.outPoint.assign(t),e.index=n,e.t=s}function l(e,t){e.outPoint.assign(t.outPoint),e.index=t.index,e.t=t.t}function g(e,t,n,s){e.index=n,e.t=s,t.queryCoord2D(e.t,e.outPoint)}function p(e,t){const n=m();l(n,e),l(e,t),l(t,n)}function d(e,t,n,s,a,o){if(e.getGeometryType()===i.G.enumPolygon){for(;s.nextPath();)if(s.hasNextSegment()){const t=s.nextSegment();if(0!==(0,r.V)(e,t.getEndXY(),0))return c(a,t.getEndXY(),-1,Number.NaN),c(o,t.getEndXY(),-1,Number.NaN),!0}s.resetToFirstPath()}if(t.getGeometryType()===i.G.enumPolygon){for(;n.nextPath();)if(n.hasNextSegment()){const e=n.nextSegment();if(0!==(0,r.V)(t,e.getEndXY(),0))return c(a,e.getEndXY(),-1,Number.NaN),c(o,e.getEndXY(),-1,Number.NaN),!0}n.resetToFirstPath()}return!1}function y(e){const t=e.getPathCount(),n=(0,o.d)(e.getSegmentCount(),0);let s=0;for(let i=0;i<t;++i){const t=s+e.getSegmentCountPath(i);for(let a=s,r=e.getPathStart(i);a<t;++a,++r)n[a]=r;s=t}return(0,a.s)(e.getPointCount(),n),n}function P(e,t){return!!Number.isNaN(t)||e<=t}function f(e){const t=new a.a;return t.addEnvelope(e,!1),t}class E{constructor(e,t){if(this.m_env2DgeometryA=null,this.m_env2DgeometryB=null,this.m_progressCounter=0,this.m_progressTracker=t,this.m_maxSqrDistance=e*e,this.m_maxDistance=e,this.m_bIsNearCalc=!1,Number.isNaN(this.m_maxDistance)?this.m_maxDistance=Number.POSITIVE_INFINITY:this.m_maxDistance=e,this.m_maxSqrDistance=this.m_maxDistance*this.m_maxDistance,Number.isFinite(this.m_maxSqrDistance)){let e=Math.sqrt(this.m_maxSqrDistance);for(;e<this.m_maxDistance;)this.m_maxSqrDistance*=1+Number.EPSILON,e=Math.sqrt(this.m_maxSqrDistance)}}calculate(e,t,n,s){if((e.getGeometryType()!==h.P.type||t.getGeometryType()!==h.P.type)&&(this.m_env2DgeometryA=new _.Envelope2D,this.m_env2DgeometryB=new _.Envelope2D,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!P(this.m_env2DgeometryA.distanceFromEnvelope(this.m_env2DgeometryB),this.m_maxDistance)))return Number.POSITIVE_INFINITY;const i=u(new o.P,(0,o.j)(),Number.NaN),a=u(new o.P,(0,o.j)(),Number.NaN),r=this._ExecuteBruteForce(e,t,i,a);return P(r,this.m_maxDistance)?(null!==n&&l(n,i),null!==s&&l(s,a),r):Number.POSITIVE_INFINITY}isNear(e,t){if(this.m_bIsNearCalc=!0,e.isEmpty()||t.isEmpty())return!1;if(e===t)return!0;let n=!0;if(e.getGeometryType()!==h.P.type&&e.getGeometryType()!==h.E.type||t.getGeometryType()!==h.P.type&&t.getGeometryType()!==h.E.type||(n=!1),n){if(this.m_env2DgeometryA=new _.Envelope2D,this.m_env2DgeometryB=new _.Envelope2D,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!(this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)>this.m_maxSqrDistance))return!0;if(this.m_env2DgeometryA.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>this.m_maxSqrDistance)return!1}const s=u(new o.P,(0,o.j)(),Number.NaN),i=u(new o.P,(0,o.j)(),Number.NaN);return this._ExecuteBruteForce(e,t,s,i)<=this.m_maxDistance}progress_(e=!1){}_ExecuteBruteForce(e,t,n,s){switch(e.getGeometryType()){case i.G.enumPoint:return this.distancePointGeometry(e,t,n,s);case i.G.enumMultiPoint:return this.distanceMultipointGeometry(e,t,n,s);case i.G.enumEnvelope:return this.distanceEnvelopeGeometry(e,t,n,s);case i.G.enumPolyline:case i.G.enumPolygon:return this.distanceMultipathGeometry(e,t,n,s);default:return Number.NaN}}distancePointGeometry(e,t,n,s){switch(t.getGeometryType()){case i.G.enumPoint:return this.distancePointPoint(e,t,n,s);case i.G.enumMultiPoint:return this.distancePointMultipoint(e,t,n,s);case i.G.enumPolyline:case i.G.enumPolygon:return this.distancePointMultipath(e,t,n,s);case i.G.enumEnvelope:return this.distancePointEnvelope(e,t,n,s);default:return Number.NaN}}distancePointPoint(e,t,n,s){const i=e.getXY(),a=t.getXY();return c(n,i,0,0),c(s,a,0,0),Math.sqrt(o.P.sqrDistance(i,a))}distancePointMultipoint(e,t,n,s){const i=e.getXY();let a=this.m_maxSqrDistance,r=a,_=!1;const h=t.getPointCount(),m=new o.P;for(let e=0;e<h;++e)if(t.queryXY(e,m),r=o.P.sqrDistance(i,m),this.m_bIsNearCalc){if(r<=a)return 0}else if(!(r>a)&&(!_&&r===a||r<a)&&(a=r,c(n,i,0,0),c(s,m,e,0),_=!0,0===a))return 0;return _?Math.sqrt(a):Number.POSITIVE_INFINITY}distancePointMultipath(e,t,n,s){const a=!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB),h=e.getXY();if(!a&&t.getGeometryType()===i.G.enumPolygon&&0!==(0,r.V)(t,h,0))return c(n,h,0,0),c(s,h,-1,Number.NaN),0;t.getImpl().getAccelerators();let m=this.m_maxSqrDistance,u=m,l=-1;const g=new _.Envelope2D,p=t.querySegmentIterator();let d=!1;for(;p.nextPath();)for(;p.hasNextSegment();){const e=p.nextSegment();e.queryEnvelope(g);const t=g.sqrDistance(h);if(t>m)continue;if(!this.m_bIsNearCalc&&d&&t===m)continue;l=e.getClosestCoordinate(h,!1);const i=e.getCoord2D(l);if(u=o.P.sqrDistance(h,i),this.m_bIsNearCalc){if(u<=m)return 0}else if(!(u>m)&&(!d||u<m)&&(m=u,c(n,h,0,0),c(s,i,p.getStartPointIndex(),l),d=!0,0===m))return 0}return d?Math.sqrt(m):Number.POSITIVE_INFINITY}distancePointEnvelope(e,t,n,s){const i=e.getXY();c(n,i,0,0),c(s,i,-1,Number.NaN);const a=t.asEnvelope2D();return a.contains(i)?0:Math.sqrt(a.sqrDistance(i,s.outPoint))}distanceMultipointGeometry(e,t,n,s){switch(t.getGeometryType()){case i.G.enumPoint:{this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distancePointMultipoint(t,e,s,n);return this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case i.G.enumMultiPoint:return this.distanceMultipointMultipoint(e,t,n,s,1,1);case i.G.enumPolyline:case i.G.enumPolygon:return this.distanceMultipointMultipath(e,t,n,s);case i.G.enumEnvelope:return this.distanceMultipointMultipath(e,f(t),n,s);default:return Number.NaN}}distanceMultipointMultipoint(e,t,n,i,a,r){const _={stack:[],error:void 0,hasError:!1};try{if(this.m_bIsNearCalc&&1===a&&1===r){const s=Math.trunc((0,o.s)(Math.sqrt(e.getPointCount())+1,1,(0,o.i)())),a=Math.trunc((0,o.s)(Math.sqrt(t.getPointCount())+1,1,(0,o.i)()));if((s>=4||a>=4)&&this.distanceMultipointMultipoint(e,t,n,i,s,a)<=this.m_maxSqrDistance)return 0}let h=this.m_maxSqrDistance;const m=[e],u=[t],l=this.swapGeometriesIfBGtA(m,u);l&&(this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),r=(0,o.c)(a,a=r),p(n,i)),(0,s.mS)(_,(0,o.h)(()=>{p(n,i),this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!l),!1);const g=m[0].getImpl(),d=u[0].getImpl(),y=g.getPointCount(),P=d.getPointCount(),f=P>1;let E=!1;const S=new o.P,x=new o.P;for(let e=0;e<y;e+=a){if(g.queryXY(e,S),f){const e=this.m_env2DgeometryB.sqrDistance(S);if(this.m_bIsNearCalc){if(e>h)continue;if(this.m_env2DgeometryB.sqrMaxMinDistance(S)<=h)return 0}else if(e>=h)continue}for(let t=0;t<P;t+=r){d.queryXY(t,x);const s=o.P.sqrDistance(S,x);if(this.m_bIsNearCalc){if(s<=h)return 0}else if(!(s>h||E&&s===h)&&(!E||s<h)&&(c(n,S,e,0),c(i,x,t,0),E=!0,h=s,0===h))return E?Math.sqrt(h):Number.POSITIVE_INFINITY}}return E?Math.sqrt(h):Number.POSITIVE_INFINITY}catch(e){_.error=e,_.hasError=!0}finally{(0,s.hk)(_)}}distanceMultipointMultipath(e,t,n,s){let a=!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)&&t.getGeometryType()===i.G.enumPolygon;const h=t.querySegmentIterator();h.stripAttributes();const m=new _.Envelope2D,u=new o.P;let l=this.m_maxSqrDistance;const g=e.getImpl(),p=g.getPointCount(),d=p>1;let y=!1;for(;h.nextPath();)for(;h.hasNextSegment();){const e=h.nextSegment();if(e.queryLooseEnvelope(m),d){const e=m.sqrDistanceEnvelope(this.m_env2DgeometryA,null,null);if(this.m_bIsNearCalc){if(e>l)continue}else if(e>l||y&&e===l)continue}for(let i=0;i<p;i++){if(g.queryXY(i,u),a&&0!==(0,r.V)(t,u,0))return c(n,u,-1,Number.NaN),c(s,u,i,0),0;{const e=m.sqrDistance(u);if(this.m_bIsNearCalc){if(e>l)continue}else if(e>l)continue}const o=e.getClosestCoordinate(u,!1),_=e.getCoord2D(o);u.subThis(_);const p=u.sqrLength();if(this.m_bIsNearCalc){if(p<=l)return 0}else if(!(p>l)&&(!y||p<l)&&(l=p,c(n,g.getXY(i),i,0),c(s,_,h.getStartPointIndex(),o),y=!0,0===l))return 0}a=!1}return y?Math.sqrt(l):Number.POSITIVE_INFINITY}distanceEnvelopeGeometry(e,t,n,s){switch(t.getGeometryType()){case i.G.enumPoint:return this.distancePointEnvelope(t,e,s,n);case i.G.enumMultiPoint:{this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distanceMultipointMultipath(t,f(e),s,n);return this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case i.G.enumPolyline:case i.G.enumPolygon:return this.distanceMultipathMultipath(f(e),t,n,s);case i.G.enumEnvelope:return this.distanceEnvelopeEnvelope(e,t,n,s);default:return Number.NaN}}distanceEnvelopeEnvelope(e,t,n,s){n.t=Number.NaN,n.index=-1,s.t=Number.NaN,s.index=-1;const i=e.asEnvelope2D(),a=t.asEnvelope2D();return Math.sqrt(i.sqrDistanceEnvelope(a,n.outPoint,s.outPoint))}distanceMultipathGeometry(e,t,n,s){switch(t.getGeometryType()){case i.G.enumPoint:{this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distancePointMultipath(t,e,s,n);return this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case i.G.enumMultiPoint:{this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distanceMultipointMultipath(t,e,s,n);return this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case i.G.enumPolyline:case i.G.enumPolygon:return this.distanceMultipathMultipath(e,t,n,s);case i.G.enumEnvelope:return this.distanceMultipathMultipath(e,f(t),n,s);default:return Number.NaN}}distanceMultipathMultipath(e,t,n,i){const r={stack:[],error:void 0,hasError:!1};try{const h=[e],u=[t],c=this.swapGeometriesIfAGtB(h,u);c&&(this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),p(n,i)),(0,s.mS)(r,(0,o.h)(()=>{p(n,i),this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!c),!1);const P=h[0],f=u[0],E=P.querySegmentIterator();E.stripAttributes();const S=f.querySegmentIterator();if(S.stripAttributes(),this.m_bIsNearCalc&&this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)<=this.m_maxSqrDistance)return 0;if(this.m_bIsNearCalc){const e=Math.trunc((0,o.s)(Math.sqrt(P.getPointCount())+1,1,(0,o.i)())),t=Math.trunc((0,o.s)(Math.sqrt(P.getPointCount())+1,1,(0,o.i)()));if(this.distanceMultipointMultipoint(P,f,n,i,e,t)<=this.m_maxSqrDistance)return 0}if(this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)){const e=m(),t=m();if(d(P,f,E,S,e,t))return l(n,e),l(i,t),0}const x=y(P),v=[],N=new a.S,D=new _.Envelope2D,A=new _.Envelope2D,M=new _.Envelope2D;let C=this.m_maxSqrDistance,T=!0,q=!1;for(let e=0,t=x.length;e<t;++e){P.querySegment(x[e],N,!0);const t=N.get();if(t.queryEnvelope(D),!(D.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>C)){if(this.m_bIsNearCalc&&D.sqrMaxDistanceEnvelope(this.m_env2DgeometryB)<=C)return 0;for(;S.nextPath();){if(this.progress_(),T)f.queryPathEnvelope(S.getPathIndex(),M),v[S.getPathIndex()]=M.clone();else if(D.sqrDistanceEnvelope(v[S.getPathIndex()],null,null)>C)continue;for(;S.hasNextSegment();){const s=S.nextSegment();if(s.queryEnvelope(A),D.sqrDistanceEnvelope(A,null,null)<=C){const a=!D.isIntersecting(A),r=[0],o=[0];let _=t.distance(s,a,r,o);if(_*=_,this.m_bIsNearCalc&&_<=this.m_maxSqrDistance)return 0;if(_<C||_===C&&x[e]<n.index){if(q=!0,g(n,t,x[e],r[0]),g(i,s,S.getStartPointIndex(),o[0]),0===_)return 0;C=_}}}}S.resetToFirstPath(),T=!1}}return q?Math.sqrt(C):Number.POSITIVE_INFINITY}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}swapGeometriesIfAGtB(e,t){return(0,i.v)(e[0])>(0,i.v)(t[0])&&(t[0]=(0,o.c)(e[0],e[0]=t[0]),!0)}swapGeometriesIfBGtA(e,t){return this.swapGeometriesIfAGtB(t,e)}}},31088:(e,t,n)=>{n.r(t),n.d(t,{OperatorGeodeticDensifyByLength:()=>r,OperatorGeodeticDensifyCursor:()=>o});var s=n(76061),i=n(55537),a=n(39117);class r{getOperatorType(){return 10310}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,s,i){return new o(e,n,s,t,-1,-1,i)}execute(e,t,n,a,r){const o=new s.S([e]),_=this.executeMany(o,t,n,a,r).next();return _||(0,i.d)("null output"),_}}class o extends s.G{constructor(e,t,n,s,a,r,o){super(),this.m_progressTracker=o,r>0&&(0,i.t)(""),4!==n&&a>0&&(0,i.t)(""),t||(0,i.a)(""),0===t.getCoordinateSystemType()&&(0,i.a)(""),s>0||a>0||(0,i.a)(""),this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=t,this.m_curveType=n,this.m_maxLengthMeters=s,this.m_maxDeviationMeters=a,this.m_maxAngle=r}next(){{let e;for(;e=this.m_inputGeoms.next();)return(0,i.c)(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(0,a.ak)(e,this.m_spatialReference,this.m_curveType,this.m_maxLengthMeters,this.m_maxDeviationMeters,this.m_progressTracker)}}},47591:(e,t,n)=>{n.d(t,{O:()=>p});var s=n(55537),i=n(39117),a=n(88885),r=n(83661),o=n(95213),_=n(79187),h=n(5247),m=n(31139);function u(){return{m_pGcs:new r.P,m_xyz:new o.d,m_factor:Number.NaN,m_geoLength:Number.NaN,setValues:c,setLength:l,assign:g}}function c(e,t,n,s){this.m_factor=e,this.m_pGcs.assign(t),this.m_xyz.assign(s),this.m_geoLength=n}function l(e){this.m_geoLength=e}function g(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 p{getOperatorType(){return 10315}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}_ExecuteShapePreservingLength(e,t,n,s,a){if(e.hasNonLinearSegments()&&(e=(new h.O).execute(e,0,t.getTolerance(0),0,a)),t.isPannable()){let s=90,r=-90;if(1===n.getUnit().getUnitToBaseFactor()&&(s*=Math.PI/180,r*=Math.PI/180),2===t.getCoordinateSystemType()){let e=null;const n=[0,0,0,0];e=t.getPECoordSys(),n[0]=0,n[1]=s,n[2]=0,n[3]=r,i.aj.geogToProj(e,2,n),s=n[1],r=n[3]}const o=new _.Envelope2D;e.queryEnvelope(o),o.ymin=r,o.ymax=s,e=(new m.O).execute(e,o,t,a)}else{const n=t.getPCSHorizon();if((e=(new i.U).execute(e,n,t,a))===n){const t=e.clone();e=t}}return e.isEmpty()?0:this._ExecuteIterativeApproach(e,t,n,s,1,a)}_ExecuteIterativeApproach(e,t,n,a,_,h){const m=(0,i.F)();n.querySpheroidData(m);const c=m.majorSemiAxis,l=m.e2,g=n.getUnit().getUnitToBaseFactor(),p=(0,r.n)(u,40),P=(0,r.d)(40,Number.NaN),f=u(),E=u();let S;const x=[0,0,0,0],v=t.getPECoordSys(),N=new r.P,D=new r.P,A=new r.P,M=new r.P,C=new r.P;let T=0;const q=e.querySegmentIterator();for(;q.nextPath();)for(;q.hasNextSegment();){const e=q.nextSegment();N.assign(e.getStartXY()),D.assign(e.getEndXY()),2===t.getCoordinateSystemType()?(x[0]=N.x,x[1]=N.y,x[2]=D.x,x[3]=D.y,i.aj.projToGeog(v,2,x),A.x=x[0]*g,A.y=x[1]*g,M.x=x[2]*g,M.y=x[3]*g):(A.setCoordsPoint2D(N),M.setCoordsPoint2D(D),A.scale(g),M.scale(g));const n=new o.d,a=new o.d;d(c,l,A,n),d(c,l,M,a);let r=y(c,n,a);f.setValues(0,A,Number.NaN,n),E.setValues(1,M,r,a),S=_,p[0].assign(E),P[0]=_;let h=0;for(;;){h>128&&(0,s.d)("iterations exceeded");const n=.5*(f.m_factor+E.m_factor),a=e.getCoord2D(n);2===t.getCoordinateSystemType()?(x[0]=a.x,x[1]=a.y,i.aj.projToGeog(v,1,x),C.x=x[0]*g,C.y=x[1]*g):(C.setCoordsPoint2D(a),C.scale(g)),A.setCoordsPoint2D(f.m_pGcs),M.setCoordsPoint2D(E.m_pGcs);const m=new o.d;d(c,l,C,m);const u=y(c,f.m_xyz,m),N=y(c,E.m_xyz,m);r=E.m_geoLength,Number.isNaN(r)&&(r=y(c,f.m_xyz,E.m_xyz));const D=u+N,q=S===_&&D>=20&&Math.abs(D-r)>1e-8*(r+D);if(h+2<40&&(q||Math.abs(D-r)>0&&S>0))E.setLength(N),p[h].assign(E),E.setValues(n,C,u,m),p[++h].assign(E),q?(S=_,P[h]=_):(S--,P[h-1]=S,P[h]=S);else{if(T+=D,0===h)break;f.assign(E),E.assign(p[--h]),S=P[h]}}}return T}execute(e,t,n){if(t&&0!==t.getCoordinateSystemType()||(0,s.a)(""),e.isEmpty()||e.getDimension()<1)return 0;let r=null;const o=t.getGCS();o!==t&&(r=(0,i.g)(t,o,null));const _=e.getGeometryType();if(_===s.G.enumEnvelope){const s=new a.a;return s.addEnvelope(e,!1),this._ExecuteShapePreservingLength(s,t,o,r,n)}if((0,s.f)(_)){const s=new a.P;return s.addSegment(e,!0),this._ExecuteShapePreservingLength(s,t,o,r,n)}return this._ExecuteShapePreservingLength(e,t,o,r,n)}}function d(e,t,n,s){s.assign((0,i.a8)(e,t,n))}function y(e,t,n){const s=e,i=new o.d;i.setSub(t,n);const a=i.length();return 2*s*Math.asin(a/(2*s))}},76061:(e,t,n)=>{n.d(t,{G:()=>s,S:()=>i});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class i extends s{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},80847:(e,t,n)=>{n.r(t),n.d(t,{OperatorGeodeticArea:()=>q});var s=n(55537),i=n(88885),a=n(5247),r=n(39117),o=n(83661),_=n(79187),h=n(95213),m=n(31139),u=n(47591),c=n(31635),l=n(11878);n(26640),n(76061),n(31088),Symbol.dispose;class g{constructor(e,t,n,s,i=0,a=4){this.m_ptDistFrom=new o.P,this.m_segStartPt=new o.P,this.m_segEndPt=new o.P,this.m_geodeticLength=new r.a7,this.m_az12=new r.a7,this.m_minGeodeticDist=new r.a7,this.m_segStartPt3d=new h.d,this.m_segEndPt3d=new h.d,this.m_sr=s,this.m_distCurveType=i,this.m_segCurveType=a,this.m_inputGCS=this.m_sr.getGCS(),this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_bIsPannablePcs=2===this.m_sr.getCoordinateSystemType()&&this.m_sr.isPannable();const _=(0,r.F)();this.m_inputGCS.querySpheroidData(_),this.m_a=_.majorSemiAxis,this.m_eSquared=_.e2,this.setPointDistFrom(e),this.setSegmentEndPoints(t,n)}setSegmentEndPoints(e,t){this.m_segStartPt.assign(e),this.m_segEndPt.assign(t),this.m_bIsPannablePcs||(this.m_segStartPt.mulThis(this.m_rpu),this.m_segEndPt.mulThis(this.m_rpu)),2===this.m_segCurveType&&(this.m_segStartPt3d.assign((0,r.a8)(this.m_a,this.m_eSquared,this.m_segStartPt)),this.m_segEndPt3d.assign((0,r.a8)(this.m_a,this.m_eSquared,this.m_segEndPt))),this.calculateAndUpdateSegmentLength()}setPointDistFrom(e){this.m_ptDistFrom.assign(e),this.m_ptDistFrom.scale(this.m_rpu)}setSegmentCurveType(e){this.m_segCurveType=e}setDistanceCurveType(e){this.m_distCurveType=e}makeFunctor(){return e=>{let t;switch(this.m_segCurveType){case 0:case 1:case 3:{const n={stack:[],error:void 0,hasError:!1};try{const s=(0,c.mS)(n,new r.a7,!1),i=(0,c.mS)(n,new r.a7,!1);r.ab.geodeticCoordinate(this.m_a,this.m_eSquared,this.m_segStartPt.x,this.m_segStartPt.y,this.m_geodeticLength.val*e,this.m_az12.val,s,i,this.m_segCurveType),t=new o.P(s.val,i.val);break}catch(e){n.error=e,n.hasError=!0}finally{(0,c.hk)(n)}}case 2:{const n=h.d.lerp(this.m_segStartPt3d,this.m_segEndPt3d,e);t=(0,r.aa)(this.m_a,this.m_eSquared,n);break}case 4:t=o.P.lerp(this.m_segStartPt,this.m_segEndPt,e),this.m_bIsPannablePcs&&((0,r.a9)(this.m_sr,0,[t],1),t.mulThis(this.m_rpu));break;default:(0,s.d)("Invalid curve type")}return r.ab.geodeticDistance(this.m_a,this.m_eSquared,this.m_ptDistFrom.x,this.m_ptDistFrom.y,t.x,t.y,this.m_minGeodeticDist,null,null,this.m_distCurveType),this.m_minGeodeticDist.val}}calculateAndUpdateSegmentLength(){switch(this.m_segCurveType){case 0:case 2:case 1:case 3:r.ab.geodeticDistance(this.m_a,this.m_eSquared,this.m_segStartPt.x,this.m_segStartPt.y,this.m_segEndPt.x,this.m_segEndPt.y,this.m_geodeticLength,this.m_az12,null,this.m_segCurveType);break;case 4:this.m_geodeticLength.val=o.P.distance(this.m_segStartPt,this.m_segEndPt);break;default:(0,s.d)("Invalid curve type")}}[Symbol.dispose](){this.m_geodeticLength[Symbol.dispose](),this.m_az12[Symbol.dispose](),this.m_minGeodeticDist[Symbol.dispose]()}}Symbol.dispose;class p{constructor(e,t,n,s,i=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=n.getGCS().getUnit().getUnitToBaseFactor(),this.isPcs=2===n.getCoordinateSystemType(),this.PEProjcs=n.getPECoordSys(),this.m_points=(0,o.d)(2*i,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&&r.aj.projToGeogCenter(this.PEProjcs,1,t,0);const n=Math.sin(t[1]*this.m_cRpu);return 0===this.m_cE2?n:-Math.log((1-this.m_cE*n)/(1+this.m_cE*n))*this.m_c1By2e+n/(1-this.m_cE2*n*n)}}}function d(e,t,n,s,i){const o=(new a.O).execute(e,t,0,0,i);let h;h=s?(new r.O).execute(o,s,i):o;const m=1===n.getUnit().getUnitToBaseFactor()?Math.PI/180:1,u=new _.Envelope2D;h.queryEnvelope(u);const c=new _.Envelope2D,l=new _.Envelope2D,g=new _.Envelope2D;c.setCoords({xmin:u.xmin,ymin:75*m,xmax:u.xmax,ymax:90*m}),l.setCoords({xmin:u.xmin,ymin:-60*m,xmax:u.xmax,ymax:75*m}),g.setCoords({xmin:u.xmin,ymin:-90*m,xmax:u.xmax,ymax:-60*m}),c.inflateCoords(.01*c.width(),0),l.inflateCoords(.01*l.width(),0),g.inflateCoords(.01*g.width(),0);let p=0;return p+=y(h,c,n,i),p+=y(h,l,n,i),p+=y(h,g,n,i),p}function y(e,t,n,i){const a=(new m.O).execute(e,t,n,i);if(null!==a&&!a.isEmpty()){const e=new _.Envelope2D;a.queryEnvelope(e);const{first:t,second:h}=function(e,t){const n=function(e,t){const n=e.getUnit().getUnitToBaseFactor(),i=t.getCenter();i.scale(180*n/Math.PI);const a=new o.P;a.x=0,a.y=0;let _=0;if(0===_){i.y>45?(a.y=o.o,_=0):i.y<-45?(a.y=-o.o,_=1):i.x>=45&&i.x<135?(a.x=o.o,_=2):i.x>=135||i.x<-135?(a.x=o.o,_=3):i.x<-45&&i.x>=-135?(a.x=-o.o,_=4):(a.x=0,_=5);const e=n*Math.sqrt((0,o.a)(t.xmin-t.xmax)+(0,o.a)(t.ymin-t.ymax)),s=a.clone(),r=t.getCenter();if(r.scale(n),_<2&&(s.x=r.x),o.P.distance(s,r)+.5*e>o.o)return null}const h=P[_];if(null!==h&&h.getGCS().equalHorizontal(e))return h;const m=e.getText(),u=a.x,c=a.y;let l=0,g=-1;6!==_?g=r.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:((0,s.g)(false),l=0,g=r.aG.PE_PRJ_CYLINDRICAL_EQAREA);const p=(0,r.v)("EqualAreaPCS");let d;g===r.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?d=`PROJCS["${p}",${m},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${u}],PARAMETER["Latitude_of_Origin",${c}],UNIT["Meter",1.0]]`:g===r.aG.PE_PRJ_CYLINDRICAL_EQAREA?d=`PROJCS["${p}",${m},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${u}],PARAMETER["Standard_Parallel_1",${l}],PARAMETER["Latitude_of_Origin",${c}],UNIT["Meter",1.0]]`:(0,s.d)("getEqualAreaPcsFixed");const y=(0,r.o)(d);return P[_]&&P[_].destroy(),P[_]=y,y}(e,t);if(null!==n)return(0,o.k)(n,!1);const i=e.getText(),a=e.getUnit().getUnitToBaseFactor(),_=(t.xmin+t.width()/2)*a,h=(t.ymin+t.height()/2)*a;let m=0,u=0,c=-1;t.ymin*a>=75*Math.PI/180||t.ymax*a<=-60*Math.PI/180?c=r.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:t.ymin>0||t.ymax<0?(m=(t.ymin+1/3*t.height())*a,u=(t.ymin+2/3*t.height())*a,c=r.aG.PE_PRJ_ALBERS):(m=(t.ymin+2/3*t.height())*a,c=r.aG.PE_PRJ_CYLINDRICAL_EQAREA);const l=(0,r.v)("EqualAreaPCS");let g;return c===r.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?g=`PROJCS["${l}",${i},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${_}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:c===r.aG.PE_PRJ_ALBERS?g=`PROJCS["${l}",${i},PROJECTION["Albers"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${_}],PARAMETER["Standard_Parallel_1",${m}],PARAMETER["Standard_Parallel_2",${u}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:c===r.aG.PE_PRJ_CYLINDRICAL_EQAREA?g=`PROJCS["${l}",${i},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${_}],PARAMETER["Standard_Parallel_1",${m}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:(0,s.d)("getEqualAreaPCSInstance"),(0,o.k)((0,r.o)(g),!0)}(n,e),m=(0,r.g)(n,t,null),u=(new r.O).execute(a,m,i).calculateArea2D();return h&&t.destroy(),u}return 0}const P=[null,null,null,null,null,null,null];class f{getOperatorType(){return 10314}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n){if(0===t.getCoordinateSystemType()&&(0,s.a)(""),e.isEmpty()||e.getDimension()<2)return 0;if((0,s.c)(e),e.getGeometryType()===s.G.enumEnvelope){const s=new i.a;return s.addEnvelope(e,!1),this.execute(s,t,n)}let c=e;e.getDescription().getAttributeCount()>1&&(c=e.clone(),c.dropAllAttributes());const l=(new a.O).execute(c,0,t.getTolerance(0),0,n);let g=null;const y=t.getGCS();y!==t&&(g=(0,r.g)(t,y));let P=(new r.L).execute(l,t,!1,n);return P.isEmpty()?0:(P===e&&(P=e.clone()),t.isPannable()?function(e,t,n){const s=new _.Envelope2D;e.queryEnvelope(s);const a=(0,h.c)(t,s,!0).total(),u=t.getPannableExtent();u.xmin=s.xmin-10*a,u.xmax=s.xmax+10*a;const c=(new m.O).execute(e,u,t,n).getImpl().querySegmentIterator();c.stripAttributes();const l=(0,r.F)();t.querySpheroidData(l);const g=l.e2,d=0===g?2:1,y=new o.P(0,0),P=new o.P(0,0),f=new o.K(0),E=new p(y,P,t,g,100);for(;c.nextPath();)for(;c.hasNextSegment();){const e=c.nextSegment();y.assign(e.getStartXY()),P.assign(e.getEndXY()),E.setSegmentEndPoints(y,P);const t=(0,i.x)(6,0,1,1e-12,1e-15,E.makeFunctor());f.pe((P.x-y.x)*t)}const S=l.majorSemiAxis;return d*S*S*(1-g)*Math.PI*f.getResult()/t.getPannableExtent().width()}(P,t,n):function(e,t,n,s,i){const a=function(e,t,n){const s=e.calculateLength2D(),i=(new u.O).execute(e,t,n)/25e3,a=s/e.getSegmentCount()*2;let r=Math.min(a,s/i);return 0===r&&(r=1),(0,o.k)(r,s/r)}(e,t,i);let r=d(e,a.first,n,s,i),_=1,h=0,m=0;do{if(_++,a.first*=.5,a.first<50*t.getTolerance(0))return r;a.second*=2,m=d(e,a.first,n,s,i),h=Math.abs(m-r),r=m}while(Math.abs(r)>1&&h>1e-8*Math.abs(r)&&(a.second<65e3&&_<8||_<4));return m}(P,t,y,g,n))}}function E(){return{m_p_PCS:new o.P,m_factor:Number.NaN,setValues:S,assign:x}}function S(e,t){this.m_factor=e,this.m_p_PCS.assign(t)}function x(e){this.m_factor=e.m_factor,this.m_p_PCS.assign(e.m_p_PCS)}class v{constructor(e,t,n,s){this.m_ptStart=new h.d,this.m_ptEnd=new h.d,this.m_ptStart.assign(t),this.m_ptEnd.assign(n),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 i=Math.sin(s);let a;a=0===this.m_e2?2*i:i*((0,o.y)(this.m_e*i)+1/(1-this.m_e2*i*i)),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,n=t*this.m_ptStart.x+e*this.m_ptEnd.x,s=t*this.m_ptStart.y+e*this.m_ptEnd.y,i=t*this.m_ptStart.z+e*this.m_ptEnd.z,a=n*n+s*s,r=i/Math.sqrt(i*i+this.m_c1MinusE2*this.m_c1MinusE2*a);let _;return _=0===this.m_e2?2*r:r*((0,o.y)(this.m_e*r)+1/(1-this.m_e2*r*r)),(this.m_deltaY*n-this.m_deltaX*s)/a*(_-this.m_baseA)}}}function N(){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:D,changeSign:A,assign:M,clone:C}}function D(e,t,n,s){const i=.5*e;this.sin_phi=Math.sin(e);const a=t*this.sin_phi,r=.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(i+n),this.sin_half_phi_pz=Math.sin(i+s),this.sin_half_asin_e_sin_phi_pf=Math.sin(r+n),this.sin_half_asin_e_sin_phi_pz=Math.sin(r+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 A(){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 M(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 C(){return{...this}}class T{constructor(e,t,n){this.m_transformPCS2GCS=null,this.m_scaleToRadians=new l.T,this.m_scaleToDegrees=new l.T,this.m_progressTracker=n,(0,s.g)(4!==t),this.m_curveType=t,this.m_inputSR=e,e&&0!==e.getCoordinateSystemType()||(0,s.a)(""),this.m_inputGCS=e.getGCS(),this.m_a=0,this.m_eSquared=0,this.m_b=0,this.m_rpu=0}executePolygonGeodeticArea(e){let t,n=e.clone();if(n.dropAllAttributes(),e.hasNonLinearSegments()&&(n=(new a.O).execute(n,0,this.m_inputSR.getTolerance(0),0,this.m_progressTracker)),this.m_inputSR.isPannable()){const e=new _.Envelope2D;n.queryEnvelope(e);const t=this.m_inputSR.getPannableExtent();if(!t.containsEnvelope(e)){const s=t.getCenterX()-e.getCenterX(),i=new l.T;i.setShiftCoords(s,0),n.applyTransformation(i),e.move(s,0);const a=new o.E;t.queryIntervalX(a);const _=new o.E;e.queryIntervalX(_),n=a.contains(_)?(0,r.ag)(n,this.m_inputSR):(new r.O).foldInto360RangeGeodetic(n,this.m_inputSR,this.m_curveType)}}if(this.m_transformPCS2GCS?(n=(new r.L).execute(n,this.m_inputSR,!1,this.m_progressTracker),t=n.createInstance(),(0,r.am)(this.m_transformPCS2GCS,n,t,this.m_progressTracker)||(t=(new r.O).execute(n,this.m_transformPCS2GCS,this.m_progressTracker))):t=(new r.L).execute(n,this.m_inputGCS,!1,this.m_progressTracker),t.isEmpty())return 0;if(1===this.m_curveType){const e=(0,r.F)();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 i=(0,r.F)();if(this.m_inputGCS.querySpheroidData(i),this.m_a=i.majorSemiAxis,this.m_b=i.minorSemiAxis,this.m_eSquared=i.e2,2===this.m_curveType)return this.executeClippedPolygonGreatEllipticArea(t);{const e={stack:[],error:void 0,hasError:!1};try{const n=r.aY.unit(9101),s=this.m_inputGCS.getPECoordSys(),i=(0,c.mS)(e,s.cloneAlterUnits(n),!1);let a,o,_=this.executeClippedPolygonGeodeticArea(t,i,0),h=0;do{h++,a=this.executeClippedPolygonGeodeticArea(t,i,h),o=Math.abs(a-_),_=a}while(Math.abs(a)>1&&o>1e-8*Math.abs(a)&&h<7);return a}catch(t){e.error=t,e.hasError=!0}finally{(0,c.hk)(e)}}}executeClippedPolygonGeodeticArea(e,t,n){const s={stack:[],error:void 0,hasError:!1};try{const i=new _.Envelope2D;e.queryEnvelope(i);const a=(0,c.mS)(s,this.getEqualAreaPCSInstance(t,i),!1),h=e.clone();(0,r.aZ)(a,h);const m=50,u=h.getImpl().getAttributeStreamRef(0),l=e.getImpl().getAttributeStreamRef(0),g=(0,c.mS)(s,new r.a7,!1),p=(0,c.mS)(s,new r.a7,!1),d=40,y=[0,0],P=(0,o.n)(E,d),f=(0,o.d)(d,-1),S=E(),x=E();let v,N;const D=a;let A=h.calculateArea2D();const M=new o.K(0),C=.5*Math.PI,T=1e-10*Math.abs(A)+1e-6,q=e.getPathCount();let b,w,I,G;const R=new o.P,L=new o.P,B=new o.P,k=new o.P,z=new o.P,F=new o.P;let O,Y;for(w=e.getPathStart(0),b=0;b<q;b++,w=I)for(I=e.getPathEnd(b),u.queryPoint2D(I-1<<1,B),l.queryPoint2D(I-1<<1,R),Math.abs(R.y)>C&&(R.y=(0,o.f)(C,R.y)),G=w;G<I;G++,B.assign(k),R.assign(L)){if(u.queryPoint2D(G<<1,k),l.queryPoint2D(G<<1,L),Math.abs(L.y)>C&&(L.y=(0,o.f)(C,L.y)),O=o.P.distance(B,k),O<m||0===R.y&&0===L.y)continue;r.ab.geodeticDistance(this.m_a,this.m_eSquared,R.x,R.y,L.x,L.y,g,p,null,this.m_curveType);const e=g.val,t=p.val;for(S.setValues(0,B),x.setValues(1,k),N=n,P[0].assign(x),f[0]=n,v=0;v>=0;){Y=.5*(S.m_factor+x.m_factor),r.ab.geodeticCoordinate(this.m_a,this.m_eSquared,R.x,R.y,e*Y,t,g,p,this.m_curveType),z.x=g.val,z.y=p.val,y[0]=z.x,y[1]=z.y,r.aj.geogToProj(D,1,y),F.x=y[0],F.y=y[1];const n=.5*-F.offset(S.m_p_PCS,x.m_p_PCS)*o.P.distance(S.m_p_PCS,x.m_p_PCS);if(M.pe(n),Math.abs(n)>T||Math.abs(n)>0&&N>0)x.setValues(Y,F),v++,P[v].assign(x),Math.abs(n)<=T?(N--,f[v-1]=N,f[v]=N):(N=f[v-1],f[v]=N);else{if(v<=0)break;S.assign(x),v--,x.assign(P[v]),N=f[v]}}}return A+=M.getResult(),Math.abs(A)}catch(e){s.error=e,s.hasError=!0}finally{(0,c.hk)(s)}}executeClippedPolygonGreatEllipticArea(e){const t=[],n=[],s=new o.P,i=new o.P,a=(0,r.a8)(1,this.m_eSquared,new o.P(0,.5*Math.PI)),m=new o.K(0),u=new o.K(0),c=new o.K(0),l=new h.d,g=new h.d,p=new _.Envelope2D;e.queryLooseEnvelope(p);let d=0;p.containsCoords(p.xmin,0)||(d=Math.abs(p.ymin)<Math.abs(p.ymax)?p.ymin:p.ymax);const y=new v(this.m_eSquared,l,g,d),P=this.m_a*this.m_a,f=e.getImpl().querySegmentIterator();for(f.stripAttributes();f.nextPath();)for(;f.hasNextSegment();){const e=f.nextSegment();s.assign(e.getStartXY()),i.assign(e.getEndXY()),i.x-s.x>Math.PI?s.x+=2*Math.PI:i.x-s.x<-Math.PI&&(i.x+=2*Math.PI),this.splitSegmentCrossingItegralThreshold(e,t,n);for(let e of t)l.assign((0,r.a8)(this.m_a,this.m_eSquared,e.getStartXY())),g.assign((0,r.a8)(this.m_a,this.m_eSquared,e.getEndXY())),y.setSegmentEndPoints(l,g),this.adaptiveIntegrationWithRomberg(y,m);for(let e of n){let t=e.getStartXY(),n=e.getEndXY(),s=d;t.y<0&&(n=(0,o.c)(t,t=n),t.y=-t.y,n.y=-n.y,s=-s);const i=(0,r.a8)(1,this.m_eSquared,t),_=(0,r.a8)(1,this.m_eSquared,n),m=Math.min(t.y,n.y),l=(0,r.a_)(this.m_eSquared,t.x,n.x,s,m);u.pe(l);const g=Math.abs((0,r.a_)(this.m_eSquared,t.x,n.x,m,o.o)),p=new h.d;p.setSub(i,a);const y=new h.d;y.setSub(_,a);const f=new h.d;f.setCrossProductVector(p,y);let E=P*(g-.5*f.length());E=(0,o.f)(E,n.x-t.x),c.pe(E)}t.length=0,n.length=0}return c.getResult()+P*(.5*(1-this.m_eSquared)*m.getResult()+u.getResult())}getEqualAreaPCSInstance(e,t){const n=t.getCenterX();let s,i;const a=t.height();let _,h;(_=t.ymin>45*Math.PI/180||t.ymax<45*-Math.PI/180)?s=(0,o.f)(.5*Math.PI,t.getCenterY()):(s=t.getCenterY(),i=t.ymin+a*(2/3));const m=(0,r.v)("EqualAreaPCS"),u=e.toString();return h=_?r.aY.fromString(r.aG.PE_TYPE_PROJCS,`PROJCS["${m}", ${u}, PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing", 0],PARAMETER["Central_Meridian", ${n}], PARAMETER["Latitude_of_Origin", ${s}], UNIT["Meter",1.0]]`):r.aY.fromString(r.aG.PE_TYPE_PROJCS,`PROJCS["${m}", ${u}, PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting", 0],PARAMETER["False_Northing", 0],PARAMETER["Central_Meridian", ${n}],PARAMETER["Standard_Parallel_1", ${i}],PARAMETER["Latitude_of_Origin", ${s}],UNIT["Meter",1.0]]`),h}splitSegmentCrossingItegralThreshold(e,t,n){const s=100,a=400,_=(0,r.a8)(this.m_a,this.m_eSquared,new o.P(0,o.o)),m=(0,r.a8)(this.m_a,this.m_eSquared,new o.P(0,-o.o)),u=this.splitSegmentPassingThroughPole(e);for(let e of u){const u=e.getStartXY(),c=e.getEndXY(),l=(0,r.a8)(this.m_a,this.m_eSquared,u),g=(0,r.a8)(this.m_a,this.m_eSquared,c),p=new o.P,d=new h.d;let y=h.d.sqrDistance(_,l),P=h.d.sqrDistance(l,g);if(y<=s){if(!(P>a)){n.push(new i.L({start:u,end:c}));continue}d.assign(g.sub(l)),d.normalizeThis(),d.assign(l.add(d.mul(20))),p.assign((0,r.aa)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:u,end:p})),u.assign(p)}if(l.assign((0,r.a8)(this.m_a,this.m_eSquared,u)),y=h.d.sqrDistance(_,g),P=h.d.sqrDistance(l,g),y<=s){if(!(P>a)){n.push(new i.L({start:u,end:c}));continue}d.assign(g.sub(l)),d.normalizeThis(),d.assign(g.sub(d.mul(20))),p.assign((0,r.aa)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:p,end:c})),c.assign(p)}if(l.assign((0,r.a8)(this.m_a,this.m_eSquared,u)),g.assign((0,r.a8)(this.m_a,this.m_eSquared,c)),y=h.d.sqrDistance(m,l),P=h.d.sqrDistance(l,g),y<=s){if(!(P>a)){n.push(new i.L({start:u,end:c}));continue}d.assign(g.sub(l)),d.normalizeThis(),d.assign(l.add(d.mul(20))),p.assign((0,r.aa)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:u,end:p})),u.assign(p)}if(l.assign((0,r.a8)(this.m_a,this.m_eSquared,u)),g.assign((0,r.a8)(this.m_a,this.m_eSquared,c)),y=h.d.sqrDistance(m,g),P=h.d.sqrDistance(l,g),y<=s){if(!(P>a)){n.push(new i.L({start:u,end:c}));continue}d.assign(g.sub(l)),d.normalizeThis(),d.assign(g.sub(d.mul(20))),p.assign((0,r.aa)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:p,end:c})),c.assign(p)}t.push(new i.L({start:u,end:c}))}}splitSegmentPassingThroughPole(e){const t={stack:[],error:void 0,hasError:!1};try{const n=[],s=new h.d,a=new h.d,_=new h.d,m=new o.P,u=20,l=3.124139361,p=10,d=e.getStartXY(),y=e.getEndXY(),P=(0,c.mS)(t,new r.a7,!1);if(r.ab.geodeticDistance(this.m_a,this.m_eSquared,d.x,d.y,y.x,y.y,P,null,null,2),Math.abs(y.x-d.x)>l&&P.val>u){const e=new g(new o.P(0,90),d.divide(this.m_rpu),y.divide(this.m_rpu),this.m_inputGCS,2,2);let t=(0,r.ad)(e.makeFunctor(),0,1,1e-10);if(t.second<=p&&t.first>0&&t.first<1)return s.assign((0,r.a8)(this.m_a,this.m_eSquared,d)),a.assign((0,r.a8)(this.m_a,this.m_eSquared,y)),(0,o.x)(s,a,t.first,_),m.assign((0,r.aa)(this.m_a,this.m_eSquared,_)),n.push(new i.L({start:d,end:m})),n.push(new i.L({start:m,end:y})),n;if(e.setPointDistFrom(new o.P(0,-90)),t=(0,r.ad)(e.makeFunctor(),0,1,1e-10),t.second<=p&&t.first>0&&t.first<1)return s.assign((0,r.a8)(this.m_a,this.m_eSquared,d)),a.assign((0,r.a8)(this.m_a,this.m_eSquared,y)),(0,o.x)(s,a,t.first,_),m.assign((0,r.aa)(this.m_a,this.m_eSquared,_)),n.push(new i.L({start:d,end:m})),n.push(new i.L({start:m,end:y})),n}return n.push(new i.L({start:d,end:y})),n}catch(e){t.error=e,t.hasError=!0}finally{(0,c.hk)(t)}}adaptiveIntegrationWithRomberg(e,t){const n=e.makeFunctor();let s=0,a=1,r=n(s),o=n(a);const _=1e-17,h=1e-14;let m=(s+a)/2,u=n(m),c=Math.abs(u-r),l=Math.abs(o-u),g=0;for(;g++<32&&(c/l<.1||l/c<.1);)c<l?(t.pe((0,i.x)(5,s,m,h,_,n)),s=m,r=u):(t.pe((0,i.x)(5,m,a,h,_,n)),a=m,o=u),m=(s+a)/2,u=Math.abs(n(m)),c=Math.abs(u-r),l=Math.abs(o-u);t.pe((0,i.x)(5,s,a,h,_,n))}loxodromeAreaHemi(e,t,n,s,i){const a=n.clone(),r=i.clone();let _,h,m,u,c,l,g,p,d,y,P,f,E,S,x,v;return a.make_negative&&a.changeSign(),r.make_negative&&r.changeSign(),P=s-t,1===Math.abs(a.sin_phi)||1===Math.abs(r.sin_phi)?e.half_qp*P:a.sin_phi===r.sin_phi?(y=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+(0,o.y)(e.e*a.sin_phi))*P,y):(x=Math.log(r.sin_half_phi_pf*a.sin_half_phi_pz/(r.sin_half_phi_pz*a.sin_half_phi_pf)),v=Math.log(r.sin_half_asin_e_sin_phi_pf*a.sin_half_asin_e_sin_phi_pz/(r.sin_half_asin_e_sin_phi_pz*a.sin_half_asin_e_sin_phi_pf)),1===this.m_eSquared?(c=0,_=.5*(x+r.sin_phi/r.one_m_e_2_sin_2_phi-a.sin_phi/a.one_m_e_2_sin_2_phi),h=0):(c=-2*e.atanh_e_over_e*(Math.log(r.one_p_sin_phi/a.one_p_sin_phi)-e.e*v),_=(x-e.e*v)/e.one_m_e_2,h=(Math.log(r.one_m_e_2_sin_2_phi/a.one_m_e_2_sin_2_phi)+c/e.atanh_e_over_e)/e.one_m_e_2),m=-v*(a.atanh_esin_phi+r.atanh_esin_phi),u=1/a.one_m_e_2_sin_2_phi-1/r.one_m_e_2_sin_2_phi,l=(0,o.z)(r.one_m_sin_phi/e.one_p_e,e.e)-(0,o.z)(a.one_m_sin_phi/e.one_p_e,e.e),g=(0,o.z)(r.one_p_sin_phi/e.one_p_e,e.e)-(0,o.z)(a.one_p_sin_phi/e.one_p_e,e.e),p=(0,o.z)(a.one_m_sin_phi/-e.one_m_e,e.e)-(0,o.z)(r.one_m_sin_phi/-e.one_m_e,e.e),d=(0,o.z)(a.one_p_sin_phi/-e.one_m_e,e.e)-(0,o.z)(r.one_p_sin_phi/-e.one_m_e,e.e),y=.25/_*(h+m+u+c+.5*(l+g+p+d)),y+=e.half_qp,f=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+(0,o.y)(e.e*a.sin_phi)),E=.5*e.one_m_e_2*r.sin_phi*(1/r.one_m_e_2_sin_2_phi+(0,o.y)(e.e*r.sin_phi)),E<f&&(S=f,f=E,E=S),y<f&&(y=f),y>E&&(y=E),y*=P,y)}loxodromeArea(e){const t=Math.PI/180;let n=0;const s={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},i=N(),a=N();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=(0,o.y)(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 r=e.getPathCount(),_=new o.P,h=new o.P,m=e.getImpl().getAttributeStreamRef(0);for(let o=0;o<r;o++){const r=e.getPathStart(o),u=e.getPathEnd(o);if(!(u-r<=1)){m.queryPoint2D(2*(u-1),_);for(let e=r;e<u;e++){m.queryPoint2D(2*e,h);const o=_.y*t,u=h.y*t;if(e===r?(i.initialize(o,s.e,s.f,s.z),i.make_negative=!1):i.assign(a),a.initialize(u,s.e,s.f,s.z),a.make_negative=!1,_.y*h.y<0){if(_.y>=90&&h.y<=-90||h.y>=90&&_.y<=-90)return Number.NaN;const e=N();e.initialize(0,s.e,s.f,s.z),e.make_negative=!1;const r=i.atanh_sin_phi-s.e*i.atanh_esin_phi,m=a.atanh_sin_phi-s.e*a.atanh_esin_phi,u=(m*_.x-r*h.x)/(m-r);o<0?(i.make_negative=!0,n-=this.loxodromeAreaHemi(s,_.x*t,i,u*t,e),i.make_negative=!1,n+=this.loxodromeAreaHemi(s,u*t,e,h.x*t,a)):(n+=this.loxodromeAreaHemi(s,_.x*t,i,u*t,e),a.make_negative=!0,n-=this.loxodromeAreaHemi(s,u*t,e,h.x*t,a),a.make_negative=!1)}else _.y>=0?n+=this.loxodromeAreaHemi(s,_.x*t,i,h.x*t,a):(i.make_negative=!0,a.make_negative=!0,n-=this.loxodromeAreaHemi(s,_.x*t,i,h.x*t,a),i.make_negative=!1,a.make_negative=!1);_.assign(h)}}}return this.m_a*n*this.m_a}calculate(e){if(e.isEmpty()||e.getDimension()<2)return 0;if(e.getGeometryType()===s.G.enumEnvelope){const t=new i.a;return t.addEnvelope(e,!1),this.calculate(t)}return this.m_inputSR!==this.m_inputGCS&&null===this.m_transformPCS2GCS&&(this.m_transformPCS2GCS=(0,r.g)(this.m_inputSR,this.m_inputGCS,null)),this.executePolygonGeodeticArea(e)}}class q{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,i){return(0,s.c)(e),4===n?(new f).execute(e,t,i):new T(t,n,i).calculate(e)}}}}]);
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
- */
5
- import{throwIfAborted as e}from"../../../../../../core/promiseUtils.js";import{difference as t,union as i}from"../../../../../../core/SetUtils.js";import s from"../../../../../../layers/support/FieldsIndex.js";import{ParquetFile as a}from"../../../../../../libs/parquet/parquet.js";import{ALoadStrategy as r}from"./ALoadStrategy.js";import{FeatureSnapshotSourceChunk as l}from"./chunks/FeatureSnapshotSourceChunk.js";import{FeatureSetReaderJSON as o}from"../../support/FeatureSetReaderJSON.js";import{FeatureSetReaderParquet as n}from"../../support/FeatureSetReaderParquet.js";class d extends r{constructor(e,t,i,s){super(s),this._service=e,this._metadata=t,this._schema=i,this._chunkId=0,this._files=[],this._availableFields=new Set(i.mutable.availableFields);const{geometryInfo:a}=this._service;if("location"===a.encoding.type)this._availableFields.add(a.encoding.latitudeFieldName),this._availableFields.add(a.encoding.longitudeFieldName);else if(null!=a.encoding.multiscale&&a.encoding.multiscale.levels.length>=1){const e=a.encoding.multiscale.levels[0];this._availableFields.add(e.column)}else this._availableFields.add(a.encoding.primaryFieldName)}destroy(){for(const e of this._files)e.destroy()}get about(){return{supportsDisplayFilter:!1,willQueryAllFeatures:!0,willQueryFullResolutionGeometry:!0}}async updateFields(e){await this._promise;const s=new Set(e),a=t(s,this._availableFields);this._availableFields=i(a,this._availableFields),a.size&&await Promise.all(this._files.map(e=>{const t=Array.from(a).map(t=>e.metadata.getFieldIndex(t));return e.inner.updateChunks(new Uint16Array(t))}))}async load(e){return null==this._promise&&(this._promise=this._download().then(()=>{this._loadHigherResGeometry()})),this._promise}unload(e){}async addParquetFile(e){this._insert(e)}async _loadHigherResGeometry(){const{geometryInfo:e}=this._service;if("wkb"===e.encoding.type){if(!(null!=e.encoding.multiscale&&e.encoding.multiscale.levels.length>=1))return;await this.updateFields([e.encoding.primaryFieldName])}const t=Array.from(this._store.chunks());this._store.clear();for(const i of t)this._store.insert(i);this._store.refresh()}async _insert(t){const i=await a.create(t,{geometryInfo:this._service.geometryInfo,outSpatialReference:this._service.outSpatialReference,getCustomParameters:()=>this._schema.mutable.dataFilter.customParameters}),{geometryInfo:r}=this._service;e(this._options);const{fields:o,timeZoneByFieldName:d}=this._service.metadata.fieldsIndex,m=o.map(e=>({...e,index:i.metadata.getFieldIndex(e.name)})),c=s.fromJSON({fields:m,timeZoneByFieldName:d}),h=new Uint16Array(Array.from(this._availableFields.values()).map(e=>c.get(e)?.index).filter(e=>null!=e));await i.inner.readChunksWithCallback(h,e=>{const t=this._chunkId++,i=new n(this._metadata,c,r,e,t),s=new l(i,null,t,!1);this._store.insert(s)}),this._files.push(i)}async _download(){try{await Promise.all(this._service.source.urls.map(e=>this._insert(e)));const e=new l(o.empty(this._metadata),null,-1,!0);this._store.insert(e)}catch(e){throw console.error(e),e}}}export{d as ParquetLoadStrategy};