@arcgis/core 4.33.0-next.20250501 → 4.33.0-next.20250502
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{de16b771d2c8d816c738.js → 05c80002c37002ac99e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d40c4783f58af1ae0dc.js → 0e8181e7fc1386d08ffc.js} +1 -1
- package/assets/esri/core/workers/chunks/{96e5d192c8d23c1e324f.js → 13e68c43acc8916520db.js} +1 -1
- package/assets/esri/core/workers/chunks/{e6a5911ea21bef32834b.js → 1bc22af4cc4effcbcf2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{9b2ab27159500315fbc1.js → 26850ec0917ee355ddb7.js} +1 -1
- package/assets/esri/core/workers/chunks/{1bd4fe77ba6fb25322e7.js → 29e2b105f55adafc3a6d.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d63dfa5a60c88e03b28.js → 2c77a543a174e5bc736a.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0ddf4f1c6a351b447c7.js → 30d7d2c7d6e9e5e2ecb9.js} +1 -1
- package/assets/esri/core/workers/chunks/{febae745a29a17ca130a.js → 4480e4b61affb3b2e9d6.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d4a271351fd288277d2.js → 49085a0b3a74e158f32f.js} +1 -1
- package/assets/esri/core/workers/chunks/{392e64a573f67817db02.js → 4cb199b547e5b97e65fb.js} +1 -1
- package/assets/esri/core/workers/chunks/4df36ee2406861c7afa8.js +1 -0
- package/assets/esri/core/workers/chunks/{ba917175ca2a6681501e.js → 563594357f3648652a5c.js} +1 -1
- package/assets/esri/core/workers/chunks/{abfc5f9ac16c3e885c5f.js → 56db71ea7eb8a5652d98.js} +1 -1
- package/assets/esri/core/workers/chunks/{e56647e61296643c5f84.js → 5719471414810b6a9aec.js} +1 -1
- package/assets/esri/core/workers/chunks/{235efd948ae470a6f238.js → 60b1365d25581ccf0485.js} +1 -1
- package/assets/esri/core/workers/chunks/{3795793643f4db64af0e.js → 63c25455b9cf1b3df76a.js} +1 -1
- package/assets/esri/core/workers/chunks/{909be86782af3deb448e.js → 654fe135d41af81daa13.js} +1 -1
- package/assets/esri/core/workers/chunks/{cd9343c78a7c3acdbbcd.js → 681b2662f6ce936afd7e.js} +1 -1
- package/assets/esri/core/workers/chunks/{65f2b22d8fc12e6d4a87.js → 7000d9158da929a16071.js} +1 -1
- package/assets/esri/core/workers/chunks/{7551011117c3d36ff3db.js → 743cdbff5c4616ddc2b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{968956284f44187f0622.js → 8540fb31bd0b29ff1906.js} +1 -1
- package/assets/esri/core/workers/chunks/8c5cea49e48f8858f115.js +1 -0
- package/assets/esri/core/workers/chunks/{237a965bd41ba8903e03.js → 921c040d0497031fd8ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{96d2a0777f5c418055fb.js → 92b48e3365d1cc933113.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d485c07848164099859.js → 95a4da3150ad8e8e36d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{46fb6ba8900286d18b6f.js → 9d564f79b82d427fc1da.js} +1 -1
- package/assets/esri/core/workers/chunks/{00612d6e05b1c8647668.js → 9fff43ffcd5602ccc50f.js} +1 -1
- package/assets/esri/core/workers/chunks/{1cc5c566e68f2255d035.js → a6ca68ef6311ffc365b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{5a51c75a2932d9da001a.js → a8d043b73e087bee7c40.js} +1 -1
- package/assets/esri/core/workers/chunks/{ebfa4a0334401f5e004a.js → c12765e0c8b44e349c2a.js} +1 -1
- package/assets/esri/core/workers/chunks/{afddb94ff4e1a70022c7.js → c3b2b05996e2008adbe3.js} +1 -1
- package/assets/esri/core/workers/chunks/{4fb4884d2de42792abe3.js → d1a9e8db5ba403abe721.js} +1 -1
- package/assets/esri/core/workers/chunks/d35cd309ba7bb8968a22.js +1 -0
- package/assets/esri/core/workers/chunks/{6e6422eda398774acbc7.js → d60da671aba70485050e.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a8df1225abd54ff68ed.js → db298b292a4e43cba72d.js} +1 -1
- package/assets/esri/core/workers/chunks/{2bda2cfc6e81818d7d33.js → dcaeb57c69d432118604.js} +1 -1
- package/assets/esri/core/workers/chunks/{fb455fd89b74b70a6a2b.js → e613df03ceb39e29befa.js} +1 -1
- package/assets/esri/core/workers/chunks/{05d7d8ff3e4cbad32580.js → e8dcaa7837b6fe7bff20.js} +1 -1
- package/assets/esri/core/workers/chunks/ec1a4b82cbc44ba45f83.js +1 -0
- package/assets/esri/core/workers/chunks/ec778cc7a55068f51937.js +1 -0
- package/assets/esri/core/workers/chunks/{51339193abddfe37745d.js → f2b63597ae956db74eb3.js} +1 -1
- package/chunks/Bufferer-CicaNej1.js +1 -1
- package/chunks/Distance2DCalculator-C1KHhZwD.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/Envelope2D.js +1 -1
- package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/GeometryCleaner-BEJM7I4l.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCrosses.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorIntersects.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorOverlaps.js +1 -1
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/OperatorTouches.js +1 -1
- package/chunks/OperatorWithin.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/QuadraticBezier.js +1 -1
- package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
- package/chunks/Transformation2D.js +1 -1
- package/chunks/containsOperator.js +1 -1
- package/chunks/disjointOperator.js +1 -1
- package/chunks/equalsOperator.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorDifference.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/initNoPeFactory.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/interfaces.d.ts +31 -0
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/utils.js +1 -1
- package/widgets/Directions/css.js +5 -0
- package/widgets/Directions.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/assets/esri/core/workers/chunks/11b55e7e76e50fe11bbe.js +0 -1
- package/assets/esri/core/workers/chunks/7bfa18dd8771d4932533.js +0 -1
- package/assets/esri/core/workers/chunks/84d7ed2cf5fe23a0888f.js +0 -1
- package/assets/esri/core/workers/chunks/86931186095c23e47c0c.js +0 -1
- package/assets/esri/core/workers/chunks/a79511b926a2830bb160.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1598,6061],{7978:(e,t,s)=>{s.r(t),s.d(t,{execute:()=>n});var o=s(12189),r=s(83299);const m=new o.
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1598,6061],{7978:(e,t,s)=>{s.r(t),s.d(t,{execute:()=>n});var o=s(12189),r=s(83299);const m=new o.d;function n(e,t){const s=(0,r.fromGeometry)(e);return m.execute(s.getGeometry(),(0,r.fromGeometryToGXGeometry)(t),s.getSpatialReference())}},76061:(e,t,s)=>{s.d(t,{G:()=>o,S:()=>r});class o{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class r extends o{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}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3299],{83299:(e,t,n)=>{n.r(t),n.d(t,{fromGeometries:()=>ue,fromGeometry:()=>me,fromGeometryToGXGeometry:()=>le,getSpatialReference:()=>ae,toGeometry:()=>ce});var r=n(55537),i=n(83661),s=n(12189),a=n(95213),o=n(35368);function u(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){const e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function m(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){const e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=Number.NaN),e}return{value:{m_token:4,m_value:null},done:!0}}n(90293);class l{createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter((t=>void 0!==e[t])),m_i:-1,m_bReturnKey:!0,next:u}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:m}}constructor(e,t){this.m_currentToken=0,this.m_options=t?{...t}:{strict:!0};const n=e;this.m_iteratorStack=[n instanceof Array?this.createJSONArrayIterator(n):this.createJSONObjectIterator(n)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,i.ao)()&&this.m_currentValue<=(0,i.i)()?this.m_currentToken=8:this.m_currentToken=7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,r.c)("unrecognized json element type")}return(0,r.c)("unrecognized json element type"),0}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,r.t)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,r.t)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,r.t)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,r.t)("invalid token"),this.m_currentValue}isError(){return 0}}class c{constructor(e){return this.m_buffer=null,this.m_view=null,this.m_sz=0,this.m_offset=0,this.m_bOwnsBuffer=!0,this.m_bLittleEndian=!0,this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&(0,r.q)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0!==e.offset?e.offset:0,this.m_view=void 0!==e.offset?new DataView(e.buffer,e.offset,e.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&(0,r.q)("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void(0,r.c)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===c.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===c.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||(0,r.p)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,r.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function d(e){let t=!1;for(;3!==e.nextToken();){const n=e.currentString();e.nextToken(),"uwkid"===n?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function h(e){let t=!1,n=!1,r=!1,i=!1,a=!1,o=!1,u=!1,m=!1,l=!1,c=!1,h=!1,_=!1,f=!1,p=!1,k=!1,b=!1,y=!1,g=-1,N=-1,T=-1,v=-1,x=0,A=0,S=0,w=0,C=0,D=0,F=0,j=0,I=0,O=0,z="",E="",P=null;for(;3!==e.nextToken();){const s=e.currentString();e.nextToken(),"wkid"===s?t||(t=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestWkid"===s?n||(n=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"wkt"===s?a||(a=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===s?a||6===e.currentToken()&&(E=e.currentString()):"vcsWkid"===s?r||(r=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"latestVcsWkid"===s?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===s?u||(u=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===s?m||(m=!0,o=!0,A=e.currentDoubleValue()):"mTolerance"===s?l||(l=!0,o=!0,S=e.currentDoubleValue()):"falseX"===s?c||(c=!0,o=!0,F=e.currentDoubleValue()):"falseY"===s?h||(h=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===s?_||(_=!0,o=!0,I=e.currentDoubleValue()):"falseM"===s?f||(f=!0,o=!0,O=e.currentDoubleValue()):"xyUnits"===s?p||(p=!0,o=!0,w=e.currentDoubleValue()):"zUnits"===s?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===s?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===s?y||(y=!0,P=d(e)):e.skipChildren()}v<=0&&T>0&&(v=T),T<=0&&v>0&&(T=v);let G=null,B=!0;if(0!==z.length&&(B=!1,(0,s.aA)(z)&&(G=(0,s.b)(z))),G||0===E.length||(B=!1,(0,s.aA)(E)&&(G=(0,s.b)(E))),!G&&N>0&&(B=!1,(0,s.aB)(N)&&(v<=0||(0,s.aC)())&&(G=(0,s.c)(N,v))),!G&&g>0&&(B=!1,(0,s.aB)(g)&&(T<=0||(0,s.aC)())&&(G=(0,s.c)(g,T))),B&&(G=(0,s.B)(P)),o&&G){const e=new s.aE;G.queryPrecisionDescriptorWithoutFalseXY(e),u&&e.setTolerance(0,x),m&&e.setTolerance(1,A),l&&e.setTolerance(2,S),p&&c&&h&&e.setGridParams(F,j,w),k&&_&&e.setZParams(I,C),b&&f&&e.setMParams(O,D),G=(0,s.aD)(G,e)}return G}function _(e,t,n,s){2!==s.currentToken()&&(0,r.t)("failed to parse multipath: array of array of vertices is expected");const u=e?new o.a:new o.P,m=u,l=(0,a.z)(0),c=(0,a.F)(2,0),d=(0,a.D)(0);let h=null,_=null,f=null,p=null,b=null,T=0,v=0,x=0;const A=new o.S,S=i.P.getNAN();let w=0,C=0;const D=e?1:0;for(;4!==s.nextToken();){2!==s.currentToken()&&(0,r.t)("failed to parse multipath: ring/path array is expected");let n=2,u=0,F=!0;const j=4;let I=0,O=0;const z=i.P.getNAN(),E=(0,i.d)(j,Number.NaN),P=(0,i.d)(j,Number.NaN);let G=!1;for(s.nextToken();4!==s.currentToken();){if(t&&1===s.currentToken())F&&(0,r.t)("failed to parse multipath: starting vertex array is expected"),f||(f=(0,a.D)(w-1,1),p=(0,a.z)(w-1,-1),b=(0,a.F)(0)),G=!0,n=1,({segFlag:x,toPointSz:I}=N(A,E,S,s));else{for(G=!1,2!==s.currentToken()&&(0,r.t)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),I=0;4!==s.nextToken();)I===j&&(0,r.t)("failed to parse multipath: each vertex array has to have at most 4 elements"),E[I++]=k(s);I<2&&(0,r.t)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,a.J)(E[0],E[1])||(0,r.t)("failed to parse multipath: x and y must be finite")}s.nextToken();do{if(c.size()===2*w&&c.resize(y(w)),c.writePoint2D(2*w,z.setCoords(E[0],E[1])),h&&h.size()===w&&h.resize(g(w)),I>2?(h||(h=(0,a.F)(w+1,Number.NaN)),h.write(w,E[2])):h&&h.write(w,Number.NaN),_&&_.size()===w&&_.resize(g(w)),I>3?(_||(_=(0,a.F)(w+1,Number.NaN)),_.write(w,E[3])):_&&_.write(w,Number.NaN),F)C++,l.add(w),d.add(D),F=!1,O=I,(0,i.a)(P,E,0,0,O);else if(null!==f)if(G){const e=(0,o.A)(x),t=b.size();b.resize(t+e),f.add(x),p.add(T),A.get().writeInBufferStream(b,T),T+=e,m.incCurveType(x,1),v++}else f.add(1),p.add(-1);w++,u++,S.setCoords(E[0],E[1])}while(u<n&&4===s.currentToken())}0!==u&&(e&&u>n&&I===O&&0===(0,i.ap)(E,P,I)?(w--,u--):null!==f&&(f.add(1),p.add(-1)))}return w&&(l.resize(C),d.resize(C),w>0&&(l.add(w),d.add(0)),m.setAttributeStreamRef(0,c),m.setPathFlagsStreamRef(d),m.setPathStreamRef(l),null!==f&&(m.updateCurveCounter(v),m.setSegmentData(p,b,f,T)),m.notifyModifiedFlags(65535)),{geometry:u,as:h,bs:_}}function f(e,t){2!==t.currentToken()&&(0,r.t)("failed to parse multipoint: array of vertices is expected");let n=0;const s=new o.M,u=(0,a.F)(2,0);let m=0;const l=(0,i.d)(4,Number.NaN),c=new i.P;let d=null,h=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,r.t)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),m=0;4!==t.nextToken();)4===m&&(0,r.t)("failed to parse multipoint: each vertex array has to have at most 4 elements"),l[m++]=k(t);m<2&&(0,r.t)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,a.J)(l[0],l[1])||(0,r.t)("failed to parse multipoint: x and y must be finite"),u.size()===2*n&&u.resize(y(n)),u.writePoint2D(2*n,c.setCoords(l[0],l[1])),d&&d.size()===n&&d.resize(g(n)),m>2?(d||(d=(0,a.F)(n+1,Number.NaN)),d.write(n,l[2])):d&&d.write(n,Number.NaN),h&&h.size()===n&&h.resize(g(n)),m>3?(h||(h=(0,a.F)(n+1,Number.NaN)),h.write(n,l[3])):h&&h.write(n,Number.NaN),n++}if(n){const e=s.getImpl();e.setAttributeStreamRef(0,u),e.resizeNoInit(n),e.notifyModifiedFlags(65535)}return{geometry:s,as:d,bs:h}}function p(e,t){2!==t.currentToken()&&(0,r.t)("failed to parse array of IDs: array of array of integers is expected");const n=(0,a.K)(2,0);let i=0,s=-1;for(;4!==t.nextToken();){const e=i;n.size()===i&&n.resize(g(i)),i++;let a=0;for(-1===s?s=2===t.currentToken()?1:0:1===s&&2!==t.currentToken()&&(0,r.t)("failed to parse array of IDs: array of array of integers is expected"),0===s&&(n.size()===i&&n.resize(g(i)),n.write(i,b(t)),a++,i++);4!==t.nextToken();)n.size()===i&&n.resize(g(i)),n.write(i,b(t)),a++,i++;if(n.write(e,a),0===s)break}return n.resize(i),n}function k(e){const t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return Number.NaN;{const t=e.currentDoubleValue();return Number.isNaN(t)?Number.NaN:t}}function b(e){return e.currentInt32Value()}function y(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function g(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function N(e,t,n,s,a){const u={segFlag:0,toPointSz:0};let m=s.currentToken();m=s.nextToken();const l=s.currentString(),d=l[0];for((1!==l.length||"a"!==d&&"b"!==d&&"c"!==d&&"n"!==d&&"q"!==d)&&(0,r.t)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=s.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for curve parameters"),m=s.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for to point"),u.toPointSz=0;4!==s.nextToken();)4===u.toPointSz&&(0,r.t)("failed to parse curve: vertex array cannot have more than 4 elements"),t[u.toPointSz++]=k(s);u.toPointSz<2&&(0,r.t)("failed to parse curve: vertex array must have at least 2 elements");const h=i.P.construct(t[0],t[1]),_=i.P.getNAN();let f=-1,p=-1,b=!1,y=Number.NaN,g=Number.NaN,N=Number.NaN;const v=[i.P.getNAN(),i.P.getNAN(),i.P.getNAN()],x=i.P.getNAN();if("a"===d){m=s.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for center point"),m=s.nextToken();const e=k(s);m=s.nextToken();const t=k(s);m=s.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for center point"),_.setCoords(e,t),m=s.nextToken(),f=s.currentInt32Value(),m=s.nextToken(),p=s.currentInt32Value(),m=s.nextToken(),4!==m?(b=!1,y=k(s),m=s.nextToken(),g=k(s),m=s.nextToken(),N=k(s),m=s.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for curve parameters")):b=!0,u.segFlag=4}else if("b"===d){for(let e=0;e<2;e++){m=s.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for control point"),m=s.nextToken();const t=k(s);m=s.nextToken();const n=k(s);m=s.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for control point"),v[e].setCoords(t,n)}m=s.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=2}else if("n"===d){{m=s.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for control point"),m=s.nextToken();const e=k(s);m=s.nextToken();const t=k(s);m=s.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for control point"),v[0].setCoords(e,t)}m=s.nextToken();const e=k(s);m=s.nextToken();const t=k(s);m=s.nextToken();const n=k(s);v[1].setCoords(e,t),v[2].setCoords(n,n),m=s.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=8}else if("q"===d){for(let e=0;e<1;e++){m=s.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for control point"),m=s.nextToken();const t=k(s);m=s.nextToken();const n=k(s);m=s.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for control point"),v[e].setCoords(t,n)}m=s.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=16}else{m=s.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for interior point"),m=s.nextToken();const e=k(s);m=s.nextToken();const t=k(s);m=s.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for interior point"),x.setCoords(e,t),m=s.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=4}if(m=s.nextToken(),3!==m&&(0,r.t)("failed to parse curve: end object is expected for curve"),"a"===d)if(e.createEllipticArc(),b){const t=!0;T(e.get(),n,h,_,t,f,p)}else!function(e,t,n,r,i,s,a,u,m){e.dropAllAttributes();const l=new ArrayBuffer(44),d=new c({sz:44,buffer:l});let h=0;d.writeDouble(h,r.x),h+=8,d.writeDouble(h,r.y),h+=8,d.writeDouble(h,a),h+=8,d.writeDouble(h,u),h+=8,d.writeDouble(h,m),h+=8;let _=0;s||(_|=2048),i&&(_|=4096),d.writeInt32(h,_),h+=4,function(e,t,n,r){e.m_bits=0,e.m_center.x=r.readDouble(0),e.m_center.y=r.readDouble(8),e.m_rotation=r.readDouble(16),e.m_semiMajorAxis=r.readDouble(24),e.m_minorMajorRatio=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y;const i=r.readInt32(40);if(1&i)return!1;let s=!!(64&i),a=!!(128&i);const u=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||a||(s=!0),a&&!t.equals(n)?(a=!1,s=!0):s&&t.equals(n)&&(a=!0,s=!1),a?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,o.z)(e,Number.NaN,u,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):s?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.x)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,n,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,u,e.m_center),e.setProjectionBehavior(1),(0,o.x)(e)}(e,t,n,d)}(e.get(),n,h,_,f,p,y,g,N);else if("b"===d)e.createCubicBezier(),function(e,t,n,s){e.dropAllAttributes();const a=new ArrayBuffer(32),o=new c({sz:32,buffer:a});let u=0;o.writeDouble(u,s[0].x),u+=8,o.writeDouble(u,s[0].y),u+=8,o.writeDouble(u,s[1].x),u+=8,o.writeDouble(u,s[1].y),u+=8,function(e,t,n,s){(0,r.g)(32<=s.size()),e.m_cp=(0,i.m)(i.P,2),e.m_cp[0].x=s.readDouble(0),e.m_cp[0].y=s.readDouble(8),e.m_cp[1].x=s.readDouble(16),e.m_cp[1].y=s.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,o)}(e.get(),n,h,v);else if("n"===d)e.createQuadraticRationalBezier(),function(e,t,n,r,i,s,a){e.dropAllAttributes();const o=new ArrayBuffer(40),u=new c({sz:40,buffer:o});let m=0;u.writeDouble(m,r.x),m+=8,u.writeDouble(m,r.y),m+=8,u.writeDouble(m,i),m+=8,u.writeDouble(m,s),m+=8,u.writeDouble(m,a),m+=8,function(e,t,n,r){e.m_cp.x=r.readDouble(0),e.m_cp.y=r.readDouble(8),e.m_weights[0]=r.readDouble(16),e.m_weights[1]=r.readDouble(24),e.m_weights[2]=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,u)}(e.get(),n,h,v[0],v[1].x,v[1].y,v[2].x);else if("q"===d)e.createQuadraticBezier(),e.get().construct(n,v[0],h);else{e.createEllipticArc();const t=!1;T(e.get(),n,h,x,t,-1,-1)}return u}function T(e,t,n,s,a,u,m){e.dropAllAttributes();const l=new ArrayBuffer(20),d=new c({sz:20,buffer:l});let h=0;d.writeDouble(h,s.x),h+=8,d.writeDouble(h,s.y),h+=8;let _=0;a?(m||(_|=8),u&&(_|=16)):_|=128,d.writeInt32(h,_),h+=4,function(e,t,n,s){0>=s.size()&&(0,r.q)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const a=i.P.getNAN();a.x=s.readDouble(0),a.y=s.readDouble(8);const u=s.readInt32(16);if(1&u)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(a),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.x)(e),!1;let m=!!(64&u);const l=!!(128&u);let c=!!(32&u);const d=!!(8&u),h=!!(16&u),_=t.equals(n);m&&!_&&(m=!1,c=!0),c&&_&&(m=!0,c=!1,a.setCoords(0,0)),m||(l?c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(a),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,a),_&&d===e.isClockwise()&&e.reverse()):c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.x)(e),e.queryCoord2D(.5,e.m_interior)):(0,o.y)(e,t,n,a,d,h)),m&&(e.m_center.assign(t),e.m_startAngle=a.x,e.m_sweepAngle=a.y,(0,o.z)(e,Number.NaN,d,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,o.x)(e)}(e,t,n,d)}function v(e,t,n,i,s){const a=e.getGeometryType();if(a===r.G.enumEllipticArc)return function(e,t,n,i,s){(0,r.g)(!(0,o.w)(e));const a=e.getEndXY(),u=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!n;let l=Number.NaN,c=Number.NaN;if(u&&(l=e.getEndAttributeAsDbl(1,0)),m&&(c=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return A(u,m,a.x,a.y,l,c,i,s),!0;const d=0===e.projectionBehavior(),h=!!d&&e.isClosed();if(d&&!h)s.startObject(),s.addFieldName("c"),s.startArray(),A(u,m,a.x,a.y,l,c,i,s),S(e.m_interior.x,e.m_interior.y,17,s),s.endArray(),s.endObject();else if(d){s.startObject(),s.addFieldName("a"),s.startArray(),A(u,m,a.x,a.y,l,c,i,s);const t=0,n=0;S(e.m_center.x+t,e.m_center.y+n,17,s);const r=!e.isMajor();s.addInt32(r?1:0);const o=e.isClockwise();s.addInt32(o?1:0),s.endArray(),s.endObject()}else{s.startObject(),s.addFieldName("a"),s.startArray(),A(u,m,a.x,a.y,l,c,i,s);const t=e;S(t.m_center.x,t.m_center.y,17,s);const n=!t.isMajor();s.addInt32(n?1:0);const r=t.isClockwise();s.addInt32(r?1:0),s.addDouble(t.m_rotation,17),s.addDouble(t.m_semiMajorAxis,17),s.addDouble(t.m_minorMajorRatio,17),s.endArray(),s.endObject()}return!1}(e,t,n,i,s);if(a===r.G.enumBezier)return x(e,t,n,i,s);if(a===r.G.enumRationalBezier2)return function(e,t,n,r,i){const s=e.getEndXY(),a=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;a&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),A(a,o,s.x,s.y,u,m,r,i),S(e.m_cp.x,e.m_cp.y,r,i);const l=r;return i.addDouble(e.m_weights[0],l),i.addDouble(e.m_weights[1],l),i.addDouble(e.m_weights[2],l),i.endArray(),i.endObject(),!1}(e,t,n,i,s);if(a===r.G.enumBezier2){const r=new o.C;return r.constructFromQuadraticSegment(e),x(r,t,n,i,s)}(0,r.b)("")}function x(e,t,n,r,i){const s=e.getEndXY(),a=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;return a&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),A(a,o,s.x,s.y,u,m,r,i),S(e.m_cp[0].x,e.m_cp[0].y,r,i),S(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function A(e,t,n,r,i,s,a,o){o.startArray(),o.addDouble(n,a),o.addDouble(r,a),e&&o.addDouble(i,a),t&&o.addDouble(s,a),o.endArray()}function S(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}function w(e,t,n,i){const s=n.getImpl(),u=!!(2&t),m=!!(4&t),l=!!(8&t),c=s.hasAttribute(1)&&!u,d=s.hasAttribute(2)&&!m,h=s.hasAttribute(3)&&!l,_=s.hasNonLinearSegments();c&&(i.addFieldName("hasZ"),i.addBool(!0)),d&&(i.addFieldName("hasM"),i.addBool(!0)),e?_?i.addFieldName("curveRings"):i.addFieldName("rings"):_?i.addFieldName("curvePaths"):i.addFieldName("paths");let f=null;const p=[];if(n.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const l=n.getPathCount();let k=0;const b=s.getAttributeStreamRef(0);let y=null,g=null,N=null;const T=new o.S;let x=null,A=null,S=null;_&&(x=s.getSegmentFlagsStreamRef(),A=s.getSegmentIndexStreamRef(),S=s.getSegmentDataStreamRef()),c&&(y=s.getAttributeStreamRef(1)),d&&(g=s.getAttributeStreamRef(2)),h&&(N=s.getAttributeStreamRef(3),f=(0,a.t)(3,0));for(let t=0;t<l;t++){i.startArray(),h&&p.push(0);const s=n.getPathEnd(t);if(k===s){i.endArray();continue}const a=n.isClosedPath(t);let o=b.read(2*k),l=b.read(2*k+1),_=c?y.read(k):Number.NaN,w=d?g.read(k):Number.NaN,D=h?N.read(k):0;C(c,d,o,l,_,w,e,i);let F=1;h&&(f.add(D),p[p.length-1]++);const j=o,I=l,O=_,z=w,E=D;let P=!1,G=0,B=Number.NaN,V=Number.NaN,M=0;for(let t=k+1,n=k,R=a?s+1:s;t<R;t++,n++){const a=null!==x?31&x.read(n):1;let k,R;if(t<s?(k=b.read(2*t),R=b.read(2*t+1),c&&(B=y.read(t)),d&&(V=g.read(t)),h&&(M=N.read(t))):(k=j,R=I,B=O,V=z,M=E),1!==a){P=!0,4===a?T.createEllipticArc():2===a?T.createCubicBezier():16===a?T.createQuadraticBezier():8===a?T.createQuadraticRationalBezier():(0,r.b)("JSON export.unsupported curve");const t=T.get(),s=A.read(n);t.setStartXYCoords(o,l),t.setEndXYCoords(k,R),c&&(t.setStartAttribute(1,0,_),t.setEndAttribute(1,0,B)),d&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,V)),t.readFromBufferStream(S,s),v(T.get(),u,m,e,i)&&G++}else C(c,d,k,R,B,V,e,i);h&&(f.add(M),p[p.length-1]++),F++,o=k,l=R,_=B,w=V,D=M}P&&0===G||(F<2&&G<1&&(C(c,d,o,l,_,w,e,i),F++,h&&(f.add(D),p[p.length-1]++)),a&&F<3&&G<2&&(C(c,d,j,I,O,z,e,i),F++,o=j,l=I,_=O,w=z,D=E,h&&(f.add(E),p[p.length-1]++))),i.endArray(),k=s}i.endArray()}if(h){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,n=p.length;t<n;++t){const n=p[t];(0,r.g)(0===n||null!==f&&e+n<=f.size()),i.startArray();for(let t=0;t<n;++t)i.addInt32(f.read(e)),e++;i.endArray()}i.endArray()}}function C(e,t,n,r,i,s,a,o){o.startArray(),o.addDouble(n,a),o.addDouble(r,a),e&&o.addDouble(i,a),t&&o.addDouble(s,a),o.endArray()}const D="a".charCodeAt(0),F="A".charCodeAt(0),j="*".charCodeAt(0),I="b".charCodeAt(0),O=("\b".charCodeAt(0),"\\".charCodeAt(0)),z="[".charCodeAt(0),E="{".charCodeAt(0),P=":".charCodeAt(0),G=".".charCodeAt(0),B=",".charCodeAt(0),V='"'.charCodeAt(0),M="]".charCodeAt(0),R="}".charCodeAt(0),U="e".charCodeAt(0),W="E".charCodeAt(0),X="f".charCodeAt(0),L=("\f".charCodeAt(0),"F".charCodeAt(0)),Y="/".charCodeAt(0),K=("<".charCodeAt(0),"-".charCodeAt(0)),q="+".charCodeAt(0),J="n".charCodeAt(0),Z="N".charCodeAt(0),H=("\n".charCodeAt(0),"r".charCodeAt(0)),Q=("\r".charCodeAt(0),"t".charCodeAt(0)),$=("\t".charCodeAt(0),"u".charCodeAt(0)),ee="0".charCodeAt(0),te="9".charCodeAt(0);class ne{constructor(e){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),void 0===e?(this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push((()=>this.accept_())),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,r.b)("streaming json parsing not yet impl"):(0,r.c)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){const t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,r.b)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push((()=>this.start_())),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,r.b)("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push((()=>this.accept_())),!1):(this.m_functionStack.push((()=>this.start_())),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,r.g)(0),""}childrenAsString(){return(0,r.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1!==this.m_currentTokenType)if(2!==this.m_currentTokenType);else{let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e)}else{let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e)}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,r.t)("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===O&&t.charCodeAt(r+1)===$;)n++,r+=6;r=e;const i=new Uint8Array(n);let s=0;for(;t.charCodeAt(r)===O&&t.charCodeAt(r+1)===$;)i[s++]=Number.parseInt(t.slice(r+2,r+6),16),r+=6;return{u8s:this.m_utf8Decoder.decode(i),end:r}}unquoteCurrentString_(){let e="",t=1;const n=this.m_endToken-this.m_startToken-1;let r=0;const i=this.m_getCurrentSubstr();for(let s=t;s<n;s++)if(i.charCodeAt(s)!==O)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++s)){case V:e+='"';break;case $:{const{u8s:t,end:n}=this.toUTF8_(s-1,i);s=n-1,e+=t;break}case O:e+="\\";break;case Y:e+="/";break;case I:e+="\b";break;case X:e+="\f";break;case J:e+="\n";break;case H:e+="\r";break;case Q:e+="\t"}t=s+1,r=0}return r>0&&(e+=i.slice(t,t+r)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,r.t)("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),t-=2,0===t&&(0,r.t)("invalid token")}const n=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(n)&&(0,r.t)("invalid token");else if(Number.isNaN(n))return Number.NaN;return n}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,r.t)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,r.t)("invalid token"));const n=parseInt(e);return Number.isNaN(n)&&(0,r.t)("invalid token"),n}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return(0,r.g)(0),!1}isError(){return 0}JSONString(){return(0,r.g)(0),""}pushPosition(){return(0,r.g)(0),!1}popPosition(){return(0,r.g)(0),!1}skipCStyleComments_(){(0,r.g)(0)}skipCppStyleComments_(){(0,r.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar(),e===j?this.skipCStyleComments_():e===Y?this.skipCppStyleComments_():(0,r.t)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,r.t)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,r.t)("invalid token"),t=this.m_peekChar();t===Y?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===M&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===R&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token");let e=this.m_peekChar();for(;e!==V;){const t=e===O;if(this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===V||e===O||e===Y||e===I||e===X||e===J||e===H||e===Q)this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar();else if(e===$)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar(),e>=ee&&e<=te||e>=D&&e<=X||e>=F&&e<=L||(0,r.t)("invalid token");else(0,r.t)("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===B&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===P&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,r.t)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,this.m_peekChar()!==V&&(0,r.t)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push((()=>this.fieldNameEnd_()))}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,r.t)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push((()=>this.elementEnd_())),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,r.t)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push((()=>this.pairEnd_())),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push((()=>this.objectStart_()))}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push((()=>this.arrayStart_()))}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==ee?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar()}while(e>=ee&&e<=te)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar(),e>=ee&&e<=te||(0,r.t)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar(),e!==q&&e!==K||(this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar()),e>=ee&&e<=te||(0,r.t)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===K?(this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),t=this.m_peekChar(),e=!0,t>=ee&&t<=te||(0,r.t)("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===G)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==U&&t!==W||this.exp_();else if(t===U||t===W)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;const n=this.m_endToken-this.m_startToken-t;if(n<10)this.m_currentTokenType=8;else if(10===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="2147483648"?this.m_currentTokenType=8:this.m_currentTokenType=9:n.slice(t)<="2147483647"?this.m_currentTokenType=8:this.m_currentTokenType=9}else if(n<19)this.m_currentTokenType=9;else if(19===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="9223372036854775808"?this.m_currentTokenType=9:this.m_currentTokenType=7:n.slice(t)<="9223372036854775807"?this.m_currentTokenType=9:this.m_currentTokenType=7}else this.m_currentTokenType=7}}valueNull_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.t)("invalid token"),"null"!==e&&(0,r.t)("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.t)("invalid token"),"true"!==e&&(0,r.t)("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&(0,r.t)("invalid token"),"false"!==e&&(0,r.t)("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&(0,r.t)("invalid token"),"NaN"!==e&&(0,r.t)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===E?this.valueStartObject_():e===z?this.valueStartArray_():e===V?this.valueString_():e===K||e>=ee&&e<=ee+9?this.valueNumber_():e===J?this.valueNull_():e===Q?this.valueTrue_():e===X?this.valueFalse_():e===Z?this.valueNan_():(0,r.t)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push((()=>this.accept_()));const e=this.m_peekChar();e!==E&&e!==z&&(0,r.t)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const re=new class{constructor(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject=[]}reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){const e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){const e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,r.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},ie=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,a,o){!function(e,t,n,i){if(t||n){if(i.startObject(),null!==t)switch(t.getGeometryType()){case r.G.enumPolygon:w(!0,e,t,i);break;case r.G.enumPolyline:w(!1,e,t,i);break;case r.G.enumMultiPoint:!function(e,t,n){const i=t.getImpl(),s=i.hasAttribute(1)&&!(2&e),a=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);s&&(n.addFieldName("hasZ"),n.addBool(!0)),a&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const r=i.getAttributeStreamRef(0);let o=null,m=null;s&&(o=i.getAttributeStreamRef(1)),a&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=r.read(2*e),u=r.read(2*e+1);let l=Number.NaN,c=Number.NaN;s&&(l=o.read(e)),a&&(c=m.read(e)),C(s,a,i,u,l,c,t,n)}n.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),(0,r.g)(0===u||null!==e&&e.size()>=u),n.addFieldName("ids"),n.startArray();for(let t=0;t<u;t++)n.addInt32(e.read(t));n.endArray()}}(e,t,i);break;case r.G.enumPoint:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),s=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("x"),n.addNull(),n.addFieldName("y"),n.addNull(),r&&(n.addFieldName("z"),n.addNull()),i&&(n.addFieldName("m"),n.addNull()),void(s&&(n.addFieldName("id"),n.addInt32(0)));const a=17-(31&e>>13);n.addFieldName("x"),n.addDouble(t.getX(),a),n.addFieldName("y"),n.addDouble(t.getY(),a),r&&(n.addFieldName("z"),n.addDouble(t.getZ(),a)),i&&(n.addFieldName("m"),n.addDouble(t.getM(),a)),s&&(n.addFieldName("id"),n.addInt32(t.getID()))}(e,t,i);break;case r.G.enumEnvelope:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),s=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("xmin"),n.addNull(),n.addFieldName("ymin"),n.addNull(),n.addFieldName("xmax"),n.addNull(),n.addFieldName("ymax"),n.addNull(),r&&(n.addFieldName("zmin"),n.addNull(),n.addFieldName("zmax"),n.addNull()),i&&(n.addFieldName("mmin"),n.addNull(),n.addFieldName("mmax"),n.addNull()),void(s&&(n.addFieldName("idmin"),n.addInt32(0),n.addFieldName("idmax"),n.addInt32(0)));const a=17-(31&e>>13);if(n.addFieldName("xmin"),n.addDouble(t.getXMin(),a),n.addFieldName("ymin"),n.addDouble(t.getYMin(),a),n.addFieldName("xmax"),n.addDouble(t.getXMax(),a),n.addFieldName("ymax"),n.addDouble(t.getYMax(),a),r){const e=t.queryInterval(1,0);n.addFieldName("zmin"),n.addDouble(e.vmin,a),n.addFieldName("zmax"),n.addDouble(e.vmax,a)}if(i){const e=t.queryInterval(2,0);n.addFieldName("mmin"),n.addDouble(e.vmin,a),n.addFieldName("mmax"),n.addDouble(e.vmax,a)}if(s){const e=t.queryInterval(3,0);n.addFieldName("idmin"),n.addInt32(e.vmin),n.addFieldName("idmax"),n.addInt32(e.vmax)}}(e,t,i);break;case r.G.enumMultipatch:(0,r.g)(0);break;default:(0,r.c)("exportToJSON")}null!==n&&(i.addFieldName("spatialReference"),function(e,t,n){n.startObject();let i=0;t.isCustomWkid()||(i=t.getOldID());let a=0;const o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(a=o.getOldID()),a<=0&&(i=0)),i>0){n.addFieldName("wkid"),n.addInt32(i);const e=t.getLatestID();if(e>0&&e!==i&&(n.addFieldName("latestWkid"),n.addInt32(e)),a>0){n.addFieldName("vcsWkid"),n.addInt32(a);const e=t.getLatestVerticalID();e!==a&&(n.addFieldName("latestVcsWkid"),n.addInt32(e))}}if(0===t.getCoordinateSystemType())n.addFieldName("wkid"),n.addNull(),null!==t.getUnit()&&(n.addFieldName("unit"),function(e,t,n){n.startObject();const i=t.getID();i<=0&&(0,r.t)("cannot export unit that has no valid WKID"),n.addFieldName("uwkid"),n.addInt32(i),n.endObject()}(0,t.getUnit(),n));else if(i<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new s.aE;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}(e,n,i)),i.endObject()}}(e,t,n,i)}exportSpatialReference(e,t,n,i){(0,r.g)(0)}exportProjectionTransformation(e,t,n,i){(0,r.g)(0)}exportDatumTransformation(e,t,n,i){(0,r.g)(0)}static geometryTypeToString(e){return(0,r.g)(0),""}},se=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,u,m,l){let c;"string"==typeof n?(c=new ne({jsonString:n}),c.nextToken()):c=n,1!==c.currentToken()&&(0,r.t)("failed to import map geometry: start of object is expected");const d=function(e,t,n,i,s){let u=!1,m=!1,l=!1,c=!1,d=!1,y=!1,g=!1,N=!1,T=!1,v=!1,x=!1,A=!1,S=!1,w=!1,C=!1,D=!1,F=!1,j=!1,I=!1,O=!1,z=!1,E=!1,P=!1,G=!1,B=Number.NaN,V=Number.NaN,M=Number.NaN,R=Number.NaN,U=0,W=Number.NaN,X=Number.NaN,L=Number.NaN,Y=Number.NaN,K=Number.NaN,q=Number.NaN,J=Number.NaN,Z=Number.NaN,H=0,Q=0,$=!1,ee=!1,te=null,ne=null,re=null,ie=null,se=null;for(;3!==n.nextToken();){const t=n.currentString();if(n.nextToken(),"spatialReference"===t){if(s&&!u){u=!0,1===n.currentToken()?ie=h(n):10!==n.currentToken()&&(0,r.t)("failed to parse spatial reference: object or null is expected");continue}}else if(i)if("hasZ"===t){if(!m){m=!0,$=11===n.currentToken();continue}}else if("hasM"===t){if(!l){l=!0,ee=11===n.currentToken();continue}}else if("rings"===t){if(!(d||y||e!==r.G.enumUnknown&&e!==r.G.enumPolygon)){d=!0,({geometry:se,as:te,bs:ne}=_(!0,!1,0,n));continue}}else if("curveRings"===t){if(!y&&(e===r.G.enumUnknown||e===r.G.enumPolygon)){y=!0,({geometry:se,as:te,bs:ne}=_(!0,!0,0,n));continue}}else if("paths"===t){if(!(g||N||e!==r.G.enumUnknown&&e!==r.G.enumPolyline)){g=!0,({geometry:se,as:te,bs:ne}=_(!1,!1,0,n));continue}}else if("curvePaths"===t){if(!N&&(e===r.G.enumUnknown||e===r.G.enumPolyline)){N=!0,({geometry:se,as:te,bs:ne}=_(!1,!0,0,n));continue}}else if("points"===t){if(!T&&(e===r.G.enumUnknown||e===r.G.enumMultiPoint)){T=!0,({geometry:se,as:te,bs:ne}=f(0,n));continue}}else if("ids"===t){if(!c){c=!0,re=p(0,n);continue}}else if("x"===t){if(!v&&(e===r.G.enumUnknown||e===r.G.enumPoint)){v=!0,B=k(n);continue}}else if("y"===t){if(!x&&(e===r.G.enumUnknown||e===r.G.enumPoint)){x=!0,V=k(n);continue}}else if("z"===t){if(!A&&(e===r.G.enumUnknown||e===r.G.enumPoint)){A=!0,M=k(n);continue}}else if("m"===t){if(!S&&(e===r.G.enumUnknown||e===r.G.enumPoint)){S=!0,R=k(n);continue}}else if("id"===t){if(!w&&(e===r.G.enumUnknown||e===r.G.enumPoint)){w=!0,U=b(n);continue}}else if("xmin"===t){if(!C&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){C=!0,W=k(n);continue}}else if("ymin"===t){if(!D&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){D=!0,X=k(n);continue}}else if("mmin"===t){if(!z&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){z=!0,J=k(n);continue}}else if("zmin"===t){if(!I&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){I=!0,K=k(n);continue}}else if("idmin"===t){if(!P&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){P=!0,H=b(n);continue}}else if("xmax"===t){if(!F&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){F=!0,L=k(n);continue}}else if("ymax"===t){if(!j&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){j=!0,Y=k(n);continue}}else if("mmax"===t){if(!E&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){E=!0,Z=k(n);continue}}else if("zmax"===t){if(!O&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){O=!0,q=k(n);continue}}else if("idmax"===t){if(!G&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){G=!0,Q=b(n);continue}}else"materials"===t&&(0,r.g)(0);n.skipChildren()}if(d||y||g||N||T){let e=null,t=null;const n=se;$&&(se.addAttribute(1),e=te,e||(e=(0,a.F)(n.getPointCount(),Number.NaN))),ee&&(se.addAttribute(2),t=$?ne:te),null!=re&&se.addAttribute(3),$&&null!=e&&n.setAttributeStreamRef(1,e),ee&&null!=t&&n.setAttributeStreamRef(2,t),null!=re&&function(e,t){if(e.isEmpty())return;const n=(0,a.K)(2,0),i=e.getGeometryType();let s=0;i===o.M.type?s=1:i===o.P.type||i===o.a.type?s=e.getPathCount():(0,r.c)("not implemented"),n.resize(e.getPointCount(),0);let u=0;for(let a=0;a<s;++a){const s=t.read(u);u++;const m=u+s;let l=0,c=0;i===o.M.type?l=e.getPointCount():i===o.P.type||i===o.a.type?(l=e.getPathSize(a),c=e.getPathStart(a)):(0,r.c)("not implemented");for(let e=0,r=Math.min(s,l);e<r;++e)n.write(c,t.read(u)),u++,c++;u=m}e.getImpl().setAttributeStreamRef(3,n)}(n,re)}else if(v||x||S||A||w){(0,a.I)(B,V)||(0,r.t)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(V)||Number.isNaN(B))&&(B=Number.NaN,V=Number.NaN);const e=new a.P({x:B,y:V});A&&e.setZ(M),S&&e.setM(R),w&&e.setID(U),se=e}else if(C||D||F||j||I||O||z||E||P||G){(Number.isNaN(X)||Number.isNaN(L)||Number.isNaN(Y))&&(W=Number.NaN);const e=new a.E({xmin:W,ymin:X,xmax:L,ymax:Y});I&&O&&e.setInterval(1,0,K,q),z&&E&&e.setInterval(2,0,J,Z),P&&G&&e.setInterval(3,0,H,Q),se=e}return{...se?{geom:se}:{},...ie?{sr:ie}:{}}}(t,0,c,i,u);return new s.aF(d)}importProjectionTransformation(e,t){return(0,r.g)(0),{}}importDatumTransformation(e,t){return(0,r.g)(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||(0,r.t)("string_to_geometry_type"),e.endsWith("point")?r.G.enumPoint:e.endsWith("envelope")?r.G.enumEnvelope:e.endsWith("multipoint")?r.G.enumMultiPoint:e.endsWith("polyline")?r.G.enumPolyline:e.endsWith("polygon")?r.G.enumPolygon:void(0,r.t)("string_to_geometry_type")}};function ae(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function oe(e,t){const n=new l(e,{strict:!1});return n.nextToken(),se.execute(0,r.G.enumUnknown,n,!0,t)}function ue(e){let t=null;return[e.map((e=>{if(null==t){const n=me(e);return t=n.getSpatialReference(),n.getGeometry()}return le(e)})),t]}function me(e){return oe(e,!0)}function le(e){return oe(e,!1).getGeometry()}function ce(e,t){return e instanceof s.aF&&(t=e.getSpatialReference(),e=e.getGeometry()),e?.isEmpty()?null:(re.reset(),ie.execute(0,e,t,re),re.getObject())}},90293:(e,t,n)=>{n(79187),n(55537),n(35368),n(95213),n(83661);var r=n(12189),i=n(83047),s=n(21325);(0,r.j)((e=>{let t,n;"number"==typeof e?t=e:n=e;const r={wkid:t,wkt:n};let a,o;if(n){a=(0,i.x1)(n);const e=(0,s.EA)(r);if(!a&&!e)throw new Error(`Unsupported WKT type: ${n}`)}else a=!(0,s.EA)(r);return o=t&&i.yD.has(t)?Math.PI/200:a?(0,i.Ao)(r):Math.PI/180,{isPCS:a,metersOrRadiansPerUnit:o,semiMajor:0,wkidOrWkt:e}}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3299],{83299:(e,t,n)=>{n.r(t),n.d(t,{fromGeometries:()=>ue,fromGeometry:()=>me,fromGeometryToGXGeometry:()=>le,getSpatialReference:()=>se,toGeometry:()=>ce});var r=n(55537),i=n(83661),a=n(12189),s=n(95213),o=n(35368);function u(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){const e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function m(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){const e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=Number.NaN),e}return{value:{m_token:4,m_value:null},done:!0}}n(90293);class l{createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter((t=>void 0!==e[t])),m_i:-1,m_bReturnKey:!0,next:u}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:m}}constructor(e,t){this.m_currentToken=0,this.m_options=t?{...t}:{strict:!0};const n=e;this.m_iteratorStack=[n instanceof Array?this.createJSONArrayIterator(n):this.createJSONObjectIterator(n)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,i.ao)()&&this.m_currentValue<=(0,i.i)()?this.m_currentToken=8:this.m_currentToken=7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,r.c)("unrecognized json element type")}return(0,r.c)("unrecognized json element type"),0}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}isError(){return 0}}class c{constructor(e){return this.m_buffer=null,this.m_view=null,this.m_sz=0,this.m_offset=0,this.m_bOwnsBuffer=!0,this.m_bLittleEndian=!0,this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&(0,r.q)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0!==e.offset?e.offset:0,this.m_view=void 0!==e.offset?new DataView(e.buffer,e.offset,e.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&(0,r.q)("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void(0,r.c)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===c.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===c.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||(0,r.p)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,r.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function d(e){let t=!1;for(;3!==e.nextToken();){const n=e.currentString();e.nextToken(),"uwkid"===n?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function h(e){let t=!1,n=!1,r=!1,i=!1,s=!1,o=!1,u=!1,m=!1,l=!1,c=!1,h=!1,_=!1,f=!1,p=!1,k=!1,b=!1,y=!1,g=-1,N=-1,T=-1,v=-1,x=0,A=0,S=0,w=0,C=0,D=0,F=0,j=0,I=0,O=0,z="",E="",P=null;for(;3!==e.nextToken();){const a=e.currentString();e.nextToken(),"wkid"===a?t||(t=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestWkid"===a?n||(n=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"wkt"===a?s||(s=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===a?s||6===e.currentToken()&&(E=e.currentString()):"vcsWkid"===a?r||(r=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"latestVcsWkid"===a?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===a?u||(u=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===a?m||(m=!0,o=!0,A=e.currentDoubleValue()):"mTolerance"===a?l||(l=!0,o=!0,S=e.currentDoubleValue()):"falseX"===a?c||(c=!0,o=!0,F=e.currentDoubleValue()):"falseY"===a?h||(h=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===a?_||(_=!0,o=!0,I=e.currentDoubleValue()):"falseM"===a?f||(f=!0,o=!0,O=e.currentDoubleValue()):"xyUnits"===a?p||(p=!0,o=!0,w=e.currentDoubleValue()):"zUnits"===a?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===a?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===a?y||(y=!0,P=d(e)):e.skipChildren()}v<=0&&T>0&&(v=T),T<=0&&v>0&&(T=v);let G=null,B=!0;if(0!==z.length&&(B=!1,(0,a.aA)(z)&&(G=(0,a.a)(z))),G||0===E.length||(B=!1,(0,a.aA)(E)&&(G=(0,a.a)(E))),!G&&N>0&&(B=!1,(0,a.aB)(N)&&(v<=0||(0,a.aC)())&&(G=(0,a.c)(N,v))),!G&&g>0&&(B=!1,(0,a.aB)(g)&&(T<=0||(0,a.aC)())&&(G=(0,a.c)(g,T))),B&&(G=(0,a.R)(P)),o&&G){const e=new a.aE;G.queryPrecisionDescriptorWithoutFalseXY(e),u&&e.setTolerance(0,x),m&&e.setTolerance(1,A),l&&e.setTolerance(2,S),p&&c&&h&&e.setGridParams(F,j,w),k&&_&&e.setZParams(I,C),b&&f&&e.setMParams(O,D),G=(0,a.aD)(G,e)}return G}function _(e,t,n,a){2!==a.currentToken()&&(0,r.a)("failed to parse multipath: array of array of vertices is expected");const u=e?new o.a:new o.P,m=u,l=(0,s.z)(0),c=(0,s.F)(2,0),d=(0,s.D)(0);let h=null,_=null,f=null,p=null,b=null,T=0,v=0,x=0;const A=new o.S,S=i.P.getNAN();let w=0,C=0;const D=e?1:0;for(;4!==a.nextToken();){2!==a.currentToken()&&(0,r.a)("failed to parse multipath: ring/path array is expected");let n=2,u=0,F=!0;const j=4;let I=0,O=0;const z=i.P.getNAN(),E=(0,i.d)(j,Number.NaN),P=(0,i.d)(j,Number.NaN);let G=!1;for(a.nextToken();4!==a.currentToken();){if(t&&1===a.currentToken())F&&(0,r.a)("failed to parse multipath: starting vertex array is expected"),f||(f=(0,s.D)(w-1,1),p=(0,s.z)(w-1,-1),b=(0,s.F)(0)),G=!0,n=1,({segFlag:x,toPointSz:I}=N(A,E,S,a));else{for(G=!1,2!==a.currentToken()&&(0,r.a)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),I=0;4!==a.nextToken();)I===j&&(0,r.a)("failed to parse multipath: each vertex array has to have at most 4 elements"),E[I++]=k(a);I<2&&(0,r.a)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,s.J)(E[0],E[1])||(0,r.a)("failed to parse multipath: x and y must be finite")}a.nextToken();do{if(c.size()===2*w&&c.resize(y(w)),c.writePoint2D(2*w,z.setCoords(E[0],E[1])),h&&h.size()===w&&h.resize(g(w)),I>2?(h||(h=(0,s.F)(w+1,Number.NaN)),h.write(w,E[2])):h&&h.write(w,Number.NaN),_&&_.size()===w&&_.resize(g(w)),I>3?(_||(_=(0,s.F)(w+1,Number.NaN)),_.write(w,E[3])):_&&_.write(w,Number.NaN),F)C++,l.add(w),d.add(D),F=!1,O=I,(0,i.b)(P,E,0,0,O);else if(null!==f)if(G){const e=(0,o.A)(x),t=b.size();b.resize(t+e),f.add(x),p.add(T),A.get().writeInBufferStream(b,T),T+=e,m.incCurveType(x,1),v++}else f.add(1),p.add(-1);w++,u++,S.setCoords(E[0],E[1])}while(u<n&&4===a.currentToken())}0!==u&&(e&&u>n&&I===O&&0===(0,i.ap)(E,P,I)?(w--,u--):null!==f&&(f.add(1),p.add(-1)))}return w&&(l.resize(C),d.resize(C),w>0&&(l.add(w),d.add(0)),m.setAttributeStreamRef(0,c),m.setPathFlagsStreamRef(d),m.setPathStreamRef(l),null!==f&&(m.updateCurveCounter(v),m.setSegmentData(p,b,f,T)),m.notifyModifiedFlags(65535)),{geometry:u,as:h,bs:_}}function f(e,t){2!==t.currentToken()&&(0,r.a)("failed to parse multipoint: array of vertices is expected");let n=0;const a=new o.M,u=(0,s.F)(2,0);let m=0;const l=(0,i.d)(4,Number.NaN),c=new i.P;let d=null,h=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,r.a)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),m=0;4!==t.nextToken();)4===m&&(0,r.a)("failed to parse multipoint: each vertex array has to have at most 4 elements"),l[m++]=k(t);m<2&&(0,r.a)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,s.J)(l[0],l[1])||(0,r.a)("failed to parse multipoint: x and y must be finite"),u.size()===2*n&&u.resize(y(n)),u.writePoint2D(2*n,c.setCoords(l[0],l[1])),d&&d.size()===n&&d.resize(g(n)),m>2?(d||(d=(0,s.F)(n+1,Number.NaN)),d.write(n,l[2])):d&&d.write(n,Number.NaN),h&&h.size()===n&&h.resize(g(n)),m>3?(h||(h=(0,s.F)(n+1,Number.NaN)),h.write(n,l[3])):h&&h.write(n,Number.NaN),n++}if(n){const e=a.getImpl();e.setAttributeStreamRef(0,u),e.resizeNoInit(n),e.notifyModifiedFlags(65535)}return{geometry:a,as:d,bs:h}}function p(e,t){2!==t.currentToken()&&(0,r.a)("failed to parse array of IDs: array of array of integers is expected");const n=(0,s.K)(2,0);let i=0,a=-1;for(;4!==t.nextToken();){const e=i;n.size()===i&&n.resize(g(i)),i++;let s=0;for(-1===a?a=2===t.currentToken()?1:0:1===a&&2!==t.currentToken()&&(0,r.a)("failed to parse array of IDs: array of array of integers is expected"),0===a&&(n.size()===i&&n.resize(g(i)),n.write(i,b(t)),s++,i++);4!==t.nextToken();)n.size()===i&&n.resize(g(i)),n.write(i,b(t)),s++,i++;if(n.write(e,s),0===a)break}return n.resize(i),n}function k(e){const t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return Number.NaN;{const t=e.currentDoubleValue();return Number.isNaN(t)?Number.NaN:t}}function b(e){return e.currentInt32Value()}function y(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function g(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function N(e,t,n,a,s){const u={segFlag:0,toPointSz:0};let m=a.currentToken();m=a.nextToken();const l=a.currentString(),d=l[0];for((1!==l.length||"a"!==d&&"b"!==d&&"c"!==d&&"n"!==d&&"q"!==d)&&(0,r.a)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for curve parameters"),m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for to point"),u.toPointSz=0;4!==a.nextToken();)4===u.toPointSz&&(0,r.a)("failed to parse curve: vertex array cannot have more than 4 elements"),t[u.toPointSz++]=k(a);u.toPointSz<2&&(0,r.a)("failed to parse curve: vertex array must have at least 2 elements");const h=i.P.construct(t[0],t[1]),_=i.P.getNAN();let f=-1,p=-1,b=!1,y=Number.NaN,g=Number.NaN,N=Number.NaN;const v=[i.P.getNAN(),i.P.getNAN(),i.P.getNAN()],x=i.P.getNAN();if("a"===d){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for center point"),m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for center point"),_.setCoords(e,t),m=a.nextToken(),f=a.currentInt32Value(),m=a.nextToken(),p=a.currentInt32Value(),m=a.nextToken(),4!==m?(b=!1,y=k(a),m=a.nextToken(),g=k(a),m=a.nextToken(),N=k(a),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters")):b=!0,u.segFlag=4}else if("b"===d){for(let e=0;e<2;e++){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=k(a);m=a.nextToken();const n=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),v[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=2}else if("n"===d){{m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),v[0].setCoords(e,t)}m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken();const n=k(a);v[1].setCoords(e,t),v[2].setCoords(n,n),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=8}else if("q"===d){for(let e=0;e<1;e++){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=k(a);m=a.nextToken();const n=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),v[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=16}else{m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for interior point"),m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for interior point"),x.setCoords(e,t),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=4}if(m=a.nextToken(),3!==m&&(0,r.a)("failed to parse curve: end object is expected for curve"),"a"===d)if(e.createEllipticArc(),b){const t=!0;T(e.get(),n,h,_,t,f,p)}else!function(e,t,n,r,i,a,s,u,m){e.dropAllAttributes();const l=new ArrayBuffer(44),d=new c({sz:44,buffer:l});let h=0;d.writeDouble(h,r.x),h+=8,d.writeDouble(h,r.y),h+=8,d.writeDouble(h,s),h+=8,d.writeDouble(h,u),h+=8,d.writeDouble(h,m),h+=8;let _=0;a||(_|=2048),i&&(_|=4096),d.writeInt32(h,_),h+=4,function(e,t,n,r){e.m_bits=0,e.m_center.x=r.readDouble(0),e.m_center.y=r.readDouble(8),e.m_rotation=r.readDouble(16),e.m_semiMajorAxis=r.readDouble(24),e.m_minorMajorRatio=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y;const i=r.readInt32(40);if(1&i)return!1;let a=!!(64&i),s=!!(128&i);const u=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||s||(a=!0),s&&!t.equals(n)?(s=!1,a=!0):a&&t.equals(n)&&(s=!0,a=!1),s?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,o.z)(e,Number.NaN,u,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.x)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,n,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,u,e.m_center),e.setProjectionBehavior(1),(0,o.x)(e)}(e,t,n,d)}(e.get(),n,h,_,f,p,y,g,N);else if("b"===d)e.createCubicBezier(),function(e,t,n,a){e.dropAllAttributes();const s=new ArrayBuffer(32),o=new c({sz:32,buffer:s});let u=0;o.writeDouble(u,a[0].x),u+=8,o.writeDouble(u,a[0].y),u+=8,o.writeDouble(u,a[1].x),u+=8,o.writeDouble(u,a[1].y),u+=8,function(e,t,n,a){(0,r.g)(32<=a.size()),e.m_cp=(0,i.m)(i.P,2),e.m_cp[0].x=a.readDouble(0),e.m_cp[0].y=a.readDouble(8),e.m_cp[1].x=a.readDouble(16),e.m_cp[1].y=a.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,o)}(e.get(),n,h,v);else if("n"===d)e.createQuadraticRationalBezier(),function(e,t,n,r,i,a,s){e.dropAllAttributes();const o=new ArrayBuffer(40),u=new c({sz:40,buffer:o});let m=0;u.writeDouble(m,r.x),m+=8,u.writeDouble(m,r.y),m+=8,u.writeDouble(m,i),m+=8,u.writeDouble(m,a),m+=8,u.writeDouble(m,s),m+=8,function(e,t,n,r){e.m_cp.x=r.readDouble(0),e.m_cp.y=r.readDouble(8),e.m_weights[0]=r.readDouble(16),e.m_weights[1]=r.readDouble(24),e.m_weights[2]=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,u)}(e.get(),n,h,v[0],v[1].x,v[1].y,v[2].x);else if("q"===d)e.createQuadraticBezier(),e.get().construct(n,v[0],h);else{e.createEllipticArc();const t=!1;T(e.get(),n,h,x,t,-1,-1)}return u}function T(e,t,n,a,s,u,m){e.dropAllAttributes();const l=new ArrayBuffer(20),d=new c({sz:20,buffer:l});let h=0;d.writeDouble(h,a.x),h+=8,d.writeDouble(h,a.y),h+=8;let _=0;s?(m||(_|=8),u&&(_|=16)):_|=128,d.writeInt32(h,_),h+=4,function(e,t,n,a){0>=a.size()&&(0,r.q)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const s=i.P.getNAN();s.x=a.readDouble(0),s.y=a.readDouble(8);const u=a.readInt32(16);if(1&u)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.x)(e),!1;let m=!!(64&u);const l=!!(128&u);let c=!!(32&u);const d=!!(8&u),h=!!(16&u),_=t.equals(n);m&&!_&&(m=!1,c=!0),c&&_&&(m=!0,c=!1,s.setCoords(0,0)),m||(l?c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,s),_&&d===e.isClockwise()&&e.reverse()):c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.x)(e),e.queryCoord2D(.5,e.m_interior)):(0,o.y)(e,t,n,s,d,h)),m&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,(0,o.z)(e,Number.NaN,d,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,o.x)(e)}(e,t,n,d)}function v(e,t,n,i,a){const s=e.getGeometryType();if(s===r.G.enumEllipticArc)return function(e,t,n,i,a){(0,r.g)(!(0,o.w)(e));const s=e.getEndXY(),u=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!n;let l=Number.NaN,c=Number.NaN;if(u&&(l=e.getEndAttributeAsDbl(1,0)),m&&(c=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return A(u,m,s.x,s.y,l,c,i,a),!0;const d=0===e.projectionBehavior(),h=!!d&&e.isClosed();if(d&&!h)a.startObject(),a.addFieldName("c"),a.startArray(),A(u,m,s.x,s.y,l,c,i,a),S(e.m_interior.x,e.m_interior.y,17,a),a.endArray(),a.endObject();else if(d){a.startObject(),a.addFieldName("a"),a.startArray(),A(u,m,s.x,s.y,l,c,i,a);const t=0,n=0;S(e.m_center.x+t,e.m_center.y+n,17,a);const r=!e.isMajor();a.addInt32(r?1:0);const o=e.isClockwise();a.addInt32(o?1:0),a.endArray(),a.endObject()}else{a.startObject(),a.addFieldName("a"),a.startArray(),A(u,m,s.x,s.y,l,c,i,a);const t=e;S(t.m_center.x,t.m_center.y,17,a);const n=!t.isMajor();a.addInt32(n?1:0);const r=t.isClockwise();a.addInt32(r?1:0),a.addDouble(t.m_rotation,17),a.addDouble(t.m_semiMajorAxis,17),a.addDouble(t.m_minorMajorRatio,17),a.endArray(),a.endObject()}return!1}(e,t,n,i,a);if(s===r.G.enumBezier)return x(e,t,n,i,a);if(s===r.G.enumRationalBezier2)return function(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),A(s,o,a.x,a.y,u,m,r,i),S(e.m_cp.x,e.m_cp.y,r,i);const l=r;return i.addDouble(e.m_weights[0],l),i.addDouble(e.m_weights[1],l),i.addDouble(e.m_weights[2],l),i.endArray(),i.endObject(),!1}(e,t,n,i,a);if(s===r.G.enumBezier2){const r=new o.C;return r.constructFromQuadraticSegment(e),x(r,t,n,i,a)}(0,r.t)("")}function x(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;return s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),A(s,o,a.x,a.y,u,m,r,i),S(e.m_cp[0].x,e.m_cp[0].y,r,i),S(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function A(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}function S(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}function w(e,t,n,i){const a=n.getImpl(),u=!!(2&t),m=!!(4&t),l=!!(8&t),c=a.hasAttribute(1)&&!u,d=a.hasAttribute(2)&&!m,h=a.hasAttribute(3)&&!l,_=a.hasNonLinearSegments();c&&(i.addFieldName("hasZ"),i.addBool(!0)),d&&(i.addFieldName("hasM"),i.addBool(!0)),e?_?i.addFieldName("curveRings"):i.addFieldName("rings"):_?i.addFieldName("curvePaths"):i.addFieldName("paths");let f=null;const p=[];if(n.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const l=n.getPathCount();let k=0;const b=a.getAttributeStreamRef(0);let y=null,g=null,N=null;const T=new o.S;let x=null,A=null,S=null;_&&(x=a.getSegmentFlagsStreamRef(),A=a.getSegmentIndexStreamRef(),S=a.getSegmentDataStreamRef()),c&&(y=a.getAttributeStreamRef(1)),d&&(g=a.getAttributeStreamRef(2)),h&&(N=a.getAttributeStreamRef(3),f=(0,s.t)(3,0));for(let t=0;t<l;t++){i.startArray(),h&&p.push(0);const a=n.getPathEnd(t);if(k===a){i.endArray();continue}const s=n.isClosedPath(t);let o=b.read(2*k),l=b.read(2*k+1),_=c?y.read(k):Number.NaN,w=d?g.read(k):Number.NaN,D=h?N.read(k):0;C(c,d,o,l,_,w,e,i);let F=1;h&&(f.add(D),p[p.length-1]++);const j=o,I=l,O=_,z=w,E=D;let P=!1,G=0,B=Number.NaN,V=Number.NaN,M=0;for(let t=k+1,n=k,R=s?a+1:a;t<R;t++,n++){const s=null!==x?31&x.read(n):1;let k,R;if(t<a?(k=b.read(2*t),R=b.read(2*t+1),c&&(B=y.read(t)),d&&(V=g.read(t)),h&&(M=N.read(t))):(k=j,R=I,B=O,V=z,M=E),1!==s){P=!0,4===s?T.createEllipticArc():2===s?T.createCubicBezier():16===s?T.createQuadraticBezier():8===s?T.createQuadraticRationalBezier():(0,r.t)("JSON export.unsupported curve");const t=T.get(),a=A.read(n);t.setStartXYCoords(o,l),t.setEndXYCoords(k,R),c&&(t.setStartAttribute(1,0,_),t.setEndAttribute(1,0,B)),d&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,V)),t.readFromBufferStream(S,a),v(T.get(),u,m,e,i)&&G++}else C(c,d,k,R,B,V,e,i);h&&(f.add(M),p[p.length-1]++),F++,o=k,l=R,_=B,w=V,D=M}P&&0===G||(F<2&&G<1&&(C(c,d,o,l,_,w,e,i),F++,h&&(f.add(D),p[p.length-1]++)),s&&F<3&&G<2&&(C(c,d,j,I,O,z,e,i),F++,o=j,l=I,_=O,w=z,D=E,h&&(f.add(E),p[p.length-1]++))),i.endArray(),k=a}i.endArray()}if(h){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,n=p.length;t<n;++t){const n=p[t];(0,r.g)(0===n||null!==f&&e+n<=f.size()),i.startArray();for(let t=0;t<n;++t)i.addInt32(f.read(e)),e++;i.endArray()}i.endArray()}}function C(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}const D="a".charCodeAt(0),F="A".charCodeAt(0),j="*".charCodeAt(0),I="b".charCodeAt(0),O=("\b".charCodeAt(0),"\\".charCodeAt(0)),z="[".charCodeAt(0),E="{".charCodeAt(0),P=":".charCodeAt(0),G=".".charCodeAt(0),B=",".charCodeAt(0),V='"'.charCodeAt(0),M="]".charCodeAt(0),R="}".charCodeAt(0),U="e".charCodeAt(0),W="E".charCodeAt(0),X="f".charCodeAt(0),L=("\f".charCodeAt(0),"F".charCodeAt(0)),Y="/".charCodeAt(0),K=("<".charCodeAt(0),"-".charCodeAt(0)),q="+".charCodeAt(0),J="n".charCodeAt(0),Z="N".charCodeAt(0),H=("\n".charCodeAt(0),"r".charCodeAt(0)),Q=("\r".charCodeAt(0),"t".charCodeAt(0)),$=("\t".charCodeAt(0),"u".charCodeAt(0)),ee="0".charCodeAt(0),te="9".charCodeAt(0);class ne{constructor(e){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),void 0===e?(this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push((()=>this.accept_())),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,r.t)("streaming json parsing not yet impl"):(0,r.c)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){const t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,r.t)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push((()=>this.start_())),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,r.t)("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push((()=>this.accept_())),!1):(this.m_functionStack.push((()=>this.start_())),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,r.g)(0),""}childrenAsString(){return(0,r.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1!==this.m_currentTokenType)if(2!==this.m_currentTokenType);else{let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e)}else{let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e)}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,r.a)("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===O&&t.charCodeAt(r+1)===$;)n++,r+=6;r=e;const i=new Uint8Array(n);let a=0;for(;t.charCodeAt(r)===O&&t.charCodeAt(r+1)===$;)i[a++]=Number.parseInt(t.slice(r+2,r+6),16),r+=6;return{u8s:this.m_utf8Decoder.decode(i),end:r}}unquoteCurrentString_(){let e="",t=1;const n=this.m_endToken-this.m_startToken-1;let r=0;const i=this.m_getCurrentSubstr();for(let a=t;a<n;a++)if(i.charCodeAt(a)!==O)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++a)){case V:e+='"';break;case $:{const{u8s:t,end:n}=this.toUTF8_(a-1,i);a=n-1,e+=t;break}case O:e+="\\";break;case Y:e+="/";break;case I:e+="\b";break;case X:e+="\f";break;case J:e+="\n";break;case H:e+="\r";break;case Q:e+="\t"}t=a+1,r=0}return r>0&&(e+=i.slice(t,t+r)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,r.a)("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),t-=2,0===t&&(0,r.a)("invalid token")}const n=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(n)&&(0,r.a)("invalid token");else if(Number.isNaN(n))return Number.NaN;return n}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,r.a)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,r.a)("invalid token"));const n=parseInt(e);return Number.isNaN(n)&&(0,r.a)("invalid token"),n}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return(0,r.g)(0),!1}isError(){return 0}JSONString(){return(0,r.g)(0),""}pushPosition(){return(0,r.g)(0),!1}popPosition(){return(0,r.g)(0),!1}skipCStyleComments_(){(0,r.g)(0)}skipCppStyleComments_(){(0,r.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e===j?this.skipCStyleComments_():e===Y?this.skipCppStyleComments_():(0,r.a)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,r.a)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,r.a)("invalid token"),t=this.m_peekChar();t===Y?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===M&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===R&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token");let e=this.m_peekChar();for(;e!==V;){const t=e===O;if(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===V||e===O||e===Y||e===I||e===X||e===J||e===H||e===Q)this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar();else if(e===$)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e>=ee&&e<=te||e>=D&&e<=X||e>=F&&e<=L||(0,r.a)("invalid token");else(0,r.a)("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===B&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===P&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,r.a)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,this.m_peekChar()!==V&&(0,r.a)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push((()=>this.fieldNameEnd_()))}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,r.a)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push((()=>this.elementEnd_())),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,r.a)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push((()=>this.pairEnd_())),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push((()=>this.objectStart_()))}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push((()=>this.arrayStart_()))}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==ee?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar()}while(e>=ee&&e<=te)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e>=ee&&e<=te||(0,r.a)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e!==q&&e!==K||(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar()),e>=ee&&e<=te||(0,r.a)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===K?(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),t=this.m_peekChar(),e=!0,t>=ee&&t<=te||(0,r.a)("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===G)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==U&&t!==W||this.exp_();else if(t===U||t===W)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;const n=this.m_endToken-this.m_startToken-t;if(n<10)this.m_currentTokenType=8;else if(10===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="2147483648"?this.m_currentTokenType=8:this.m_currentTokenType=9:n.slice(t)<="2147483647"?this.m_currentTokenType=8:this.m_currentTokenType=9}else if(n<19)this.m_currentTokenType=9;else if(19===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="9223372036854775808"?this.m_currentTokenType=9:this.m_currentTokenType=7:n.slice(t)<="9223372036854775807"?this.m_currentTokenType=9:this.m_currentTokenType=7}else this.m_currentTokenType=7}}valueNull_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.a)("invalid token"),"null"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.a)("invalid token"),"true"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&(0,r.a)("invalid token"),"false"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&(0,r.a)("invalid token"),"NaN"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===E?this.valueStartObject_():e===z?this.valueStartArray_():e===V?this.valueString_():e===K||e>=ee&&e<=ee+9?this.valueNumber_():e===J?this.valueNull_():e===Q?this.valueTrue_():e===X?this.valueFalse_():e===Z?this.valueNan_():(0,r.a)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push((()=>this.accept_()));const e=this.m_peekChar();e!==E&&e!==z&&(0,r.a)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const re=new class{constructor(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject=[]}reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){const e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){const e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,r.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},ie=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,s,o){!function(e,t,n,i){if(t||n){if(i.startObject(),null!==t)switch(t.getGeometryType()){case r.G.enumPolygon:w(!0,e,t,i);break;case r.G.enumPolyline:w(!1,e,t,i);break;case r.G.enumMultiPoint:!function(e,t,n){const i=t.getImpl(),a=i.hasAttribute(1)&&!(2&e),s=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);a&&(n.addFieldName("hasZ"),n.addBool(!0)),s&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const r=i.getAttributeStreamRef(0);let o=null,m=null;a&&(o=i.getAttributeStreamRef(1)),s&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=r.read(2*e),u=r.read(2*e+1);let l=Number.NaN,c=Number.NaN;a&&(l=o.read(e)),s&&(c=m.read(e)),C(a,s,i,u,l,c,t,n)}n.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),(0,r.g)(0===u||null!==e&&e.size()>=u),n.addFieldName("ids"),n.startArray();for(let t=0;t<u;t++)n.addInt32(e.read(t));n.endArray()}}(e,t,i);break;case r.G.enumPoint:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("x"),n.addNull(),n.addFieldName("y"),n.addNull(),r&&(n.addFieldName("z"),n.addNull()),i&&(n.addFieldName("m"),n.addNull()),void(a&&(n.addFieldName("id"),n.addInt32(0)));const s=17-(31&e>>13);n.addFieldName("x"),n.addDouble(t.getX(),s),n.addFieldName("y"),n.addDouble(t.getY(),s),r&&(n.addFieldName("z"),n.addDouble(t.getZ(),s)),i&&(n.addFieldName("m"),n.addDouble(t.getM(),s)),a&&(n.addFieldName("id"),n.addInt32(t.getID()))}(e,t,i);break;case r.G.enumEnvelope:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("xmin"),n.addNull(),n.addFieldName("ymin"),n.addNull(),n.addFieldName("xmax"),n.addNull(),n.addFieldName("ymax"),n.addNull(),r&&(n.addFieldName("zmin"),n.addNull(),n.addFieldName("zmax"),n.addNull()),i&&(n.addFieldName("mmin"),n.addNull(),n.addFieldName("mmax"),n.addNull()),void(a&&(n.addFieldName("idmin"),n.addInt32(0),n.addFieldName("idmax"),n.addInt32(0)));const s=17-(31&e>>13);if(n.addFieldName("xmin"),n.addDouble(t.getXMin(),s),n.addFieldName("ymin"),n.addDouble(t.getYMin(),s),n.addFieldName("xmax"),n.addDouble(t.getXMax(),s),n.addFieldName("ymax"),n.addDouble(t.getYMax(),s),r){const e=t.queryInterval(1,0);n.addFieldName("zmin"),n.addDouble(e.vmin,s),n.addFieldName("zmax"),n.addDouble(e.vmax,s)}if(i){const e=t.queryInterval(2,0);n.addFieldName("mmin"),n.addDouble(e.vmin,s),n.addFieldName("mmax"),n.addDouble(e.vmax,s)}if(a){const e=t.queryInterval(3,0);n.addFieldName("idmin"),n.addInt32(e.vmin),n.addFieldName("idmax"),n.addInt32(e.vmax)}}(e,t,i);break;case r.G.enumMultipatch:(0,r.g)(0);break;default:(0,r.c)("exportToJSON")}null!==n&&(i.addFieldName("spatialReference"),function(e,t,n){n.startObject();let i=0;t.isCustomWkid()||(i=t.getOldID());let s=0;const o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(s=o.getOldID()),s<=0&&(i=0)),i>0){n.addFieldName("wkid"),n.addInt32(i);const e=t.getLatestID();if(e>0&&e!==i&&(n.addFieldName("latestWkid"),n.addInt32(e)),s>0){n.addFieldName("vcsWkid"),n.addInt32(s);const e=t.getLatestVerticalID();e!==s&&(n.addFieldName("latestVcsWkid"),n.addInt32(e))}}if(0===t.getCoordinateSystemType())n.addFieldName("wkid"),n.addNull(),null!==t.getUnit()&&(n.addFieldName("unit"),function(e,t,n){n.startObject();const i=t.getID();i<=0&&(0,r.a)("cannot export unit that has no valid WKID"),n.addFieldName("uwkid"),n.addInt32(i),n.endObject()}(0,t.getUnit(),n));else if(i<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new a.aE;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}(e,n,i)),i.endObject()}}(e,t,n,i)}exportSpatialReference(e,t,n,i){(0,r.g)(0)}exportProjectionTransformation(e,t,n,i){(0,r.g)(0)}exportDatumTransformation(e,t,n,i){(0,r.g)(0)}static geometryTypeToString(e){return(0,r.g)(0),""}},ae=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,u,m,l){let c;"string"==typeof n?(c=new ne({jsonString:n}),c.nextToken()):c=n,1!==c.currentToken()&&(0,r.a)("failed to import map geometry: start of object is expected");const d=function(e,t,n,i,a){let u=!1,m=!1,l=!1,c=!1,d=!1,y=!1,g=!1,N=!1,T=!1,v=!1,x=!1,A=!1,S=!1,w=!1,C=!1,D=!1,F=!1,j=!1,I=!1,O=!1,z=!1,E=!1,P=!1,G=!1,B=Number.NaN,V=Number.NaN,M=Number.NaN,R=Number.NaN,U=0,W=Number.NaN,X=Number.NaN,L=Number.NaN,Y=Number.NaN,K=Number.NaN,q=Number.NaN,J=Number.NaN,Z=Number.NaN,H=0,Q=0,$=!1,ee=!1,te=null,ne=null,re=null,ie=null,ae=null;for(;3!==n.nextToken();){const t=n.currentString();if(n.nextToken(),"spatialReference"===t){if(a&&!u){u=!0,1===n.currentToken()?ie=h(n):10!==n.currentToken()&&(0,r.a)("failed to parse spatial reference: object or null is expected");continue}}else if(i)if("hasZ"===t){if(!m){m=!0,$=11===n.currentToken();continue}}else if("hasM"===t){if(!l){l=!0,ee=11===n.currentToken();continue}}else if("rings"===t){if(!(d||y||e!==r.G.enumUnknown&&e!==r.G.enumPolygon)){d=!0,({geometry:ae,as:te,bs:ne}=_(!0,!1,0,n));continue}}else if("curveRings"===t){if(!y&&(e===r.G.enumUnknown||e===r.G.enumPolygon)){y=!0,({geometry:ae,as:te,bs:ne}=_(!0,!0,0,n));continue}}else if("paths"===t){if(!(g||N||e!==r.G.enumUnknown&&e!==r.G.enumPolyline)){g=!0,({geometry:ae,as:te,bs:ne}=_(!1,!1,0,n));continue}}else if("curvePaths"===t){if(!N&&(e===r.G.enumUnknown||e===r.G.enumPolyline)){N=!0,({geometry:ae,as:te,bs:ne}=_(!1,!0,0,n));continue}}else if("points"===t){if(!T&&(e===r.G.enumUnknown||e===r.G.enumMultiPoint)){T=!0,({geometry:ae,as:te,bs:ne}=f(0,n));continue}}else if("ids"===t){if(!c){c=!0,re=p(0,n);continue}}else if("x"===t){if(!v&&(e===r.G.enumUnknown||e===r.G.enumPoint)){v=!0,B=k(n);continue}}else if("y"===t){if(!x&&(e===r.G.enumUnknown||e===r.G.enumPoint)){x=!0,V=k(n);continue}}else if("z"===t){if(!A&&(e===r.G.enumUnknown||e===r.G.enumPoint)){A=!0,M=k(n);continue}}else if("m"===t){if(!S&&(e===r.G.enumUnknown||e===r.G.enumPoint)){S=!0,R=k(n);continue}}else if("id"===t){if(!w&&(e===r.G.enumUnknown||e===r.G.enumPoint)){w=!0,U=b(n);continue}}else if("xmin"===t){if(!C&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){C=!0,W=k(n);continue}}else if("ymin"===t){if(!D&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){D=!0,X=k(n);continue}}else if("mmin"===t){if(!z&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){z=!0,J=k(n);continue}}else if("zmin"===t){if(!I&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){I=!0,K=k(n);continue}}else if("idmin"===t){if(!P&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){P=!0,H=b(n);continue}}else if("xmax"===t){if(!F&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){F=!0,L=k(n);continue}}else if("ymax"===t){if(!j&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){j=!0,Y=k(n);continue}}else if("mmax"===t){if(!E&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){E=!0,Z=k(n);continue}}else if("zmax"===t){if(!O&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){O=!0,q=k(n);continue}}else if("idmax"===t){if(!G&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){G=!0,Q=b(n);continue}}else"materials"===t&&(0,r.g)(0);n.skipChildren()}if(d||y||g||N||T){let e=null,t=null;const n=ae;$&&(ae.addAttribute(1),e=te,e||(e=(0,s.F)(n.getPointCount(),Number.NaN))),ee&&(ae.addAttribute(2),t=$?ne:te),null!=re&&ae.addAttribute(3),$&&null!=e&&n.setAttributeStreamRef(1,e),ee&&null!=t&&n.setAttributeStreamRef(2,t),null!=re&&function(e,t){if(e.isEmpty())return;const n=(0,s.K)(2,0),i=e.getGeometryType();let a=0;i===o.M.type?a=1:i===o.P.type||i===o.a.type?a=e.getPathCount():(0,r.c)("not implemented"),n.resize(e.getPointCount(),0);let u=0;for(let s=0;s<a;++s){const a=t.read(u);u++;const m=u+a;let l=0,c=0;i===o.M.type?l=e.getPointCount():i===o.P.type||i===o.a.type?(l=e.getPathSize(s),c=e.getPathStart(s)):(0,r.c)("not implemented");for(let e=0,r=Math.min(a,l);e<r;++e)n.write(c,t.read(u)),u++,c++;u=m}e.getImpl().setAttributeStreamRef(3,n)}(n,re)}else if(v||x||S||A||w){(0,s.I)(B,V)||(0,r.a)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(V)||Number.isNaN(B))&&(B=Number.NaN,V=Number.NaN);const e=new s.P({x:B,y:V});A&&e.setZ(M),S&&e.setM(R),w&&e.setID(U),ae=e}else if(C||D||F||j||I||O||z||E||P||G){(Number.isNaN(X)||Number.isNaN(L)||Number.isNaN(Y))&&(W=Number.NaN);const e=new s.E({xmin:W,ymin:X,xmax:L,ymax:Y});I&&O&&e.setInterval(1,0,K,q),z&&E&&e.setInterval(2,0,J,Z),P&&G&&e.setInterval(3,0,H,Q),ae=e}return{...ae?{geom:ae}:{},...ie?{sr:ie}:{}}}(t,0,c,i,u);return new a.aF(d)}importProjectionTransformation(e,t){return(0,r.g)(0),{}}importDatumTransformation(e,t){return(0,r.g)(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||(0,r.a)("string_to_geometry_type"),e.endsWith("point")?r.G.enumPoint:e.endsWith("envelope")?r.G.enumEnvelope:e.endsWith("multipoint")?r.G.enumMultiPoint:e.endsWith("polyline")?r.G.enumPolyline:e.endsWith("polygon")?r.G.enumPolygon:void(0,r.a)("string_to_geometry_type")}};function se(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function oe(e,t){const n=new l(e,{strict:!1});return n.nextToken(),ae.execute(0,r.G.enumUnknown,n,!0,t)}function ue(e){let t=null;return[e.map((e=>{if(null==t){const n=me(e);return t=n.getSpatialReference(),n.getGeometry()}return le(e)})),t]}function me(e){return oe(e,!0)}function le(e){return oe(e,!1).getGeometry()}function ce(e,t){return e instanceof a.aF&&(t=e.getSpatialReference(),e=e.getGeometry()),e?.isEmpty()?null:(re.reset(),ie.execute(0,e,t,re),re.getObject())}},90293:(e,t,n)=>{n(79187),n(55537),n(35368),n(95213),n(83661);var r=n(12189),i=n(83047),a=n(21325);(0,r.i)((e=>{let t,n;"number"==typeof e?t=e:n=e;const r={wkid:t,wkt:n};let s,o;if(n){s=(0,i.x1)(n);const e=(0,a.EA)(r);if(!s&&!e)throw new Error(`Unsupported WKT type: ${n}`)}else s=!(0,a.EA)(r);return o=t&&i.yD.has(t)?Math.PI/200:s?(0,i.Ao)(r):Math.PI/180,{isPCS:s,metersOrRadiansPerUnit:o,semiMajor:0,wkidOrWkt:e}}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1867,6061],{29127:(e,t,s)=>{s.r(t),s.d(t,{execute:()=>n});var o=s(12189),r=s(83299);const m=new o.
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1867,6061],{29127:(e,t,s)=>{s.r(t),s.d(t,{execute:()=>n});var o=s(12189),r=s(83299);const m=new o.b;function n(e,t){const s=(0,r.fromGeometry)(e);return m.execute(s.getGeometry(),(0,r.fromGeometryToGXGeometry)(t),s.getSpatialReference(),null)}},76061:(e,t,s)=>{s.d(t,{G:()=>o,S:()=>r});class o{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class r extends o{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}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,5180,6061,8125],{45328:(e,t,n)=>{n.r(t),n.d(t,{accelerateGeometry:()=>r.a,execute:()=>r.b,supportsCurves:()=>r.s});var r=n(90836);n(78125)},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,5180,6061,8125],{45328:(e,t,n)=>{n.r(t),n.d(t,{accelerateGeometry:()=>r.a,execute:()=>r.b,supportsCurves:()=>r.s});var r=n(90836);n(78125)},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>a});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class a extends r{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}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>C,fromGeometry:()=>G,fromMultipoint:()=>M,fromPoint:()=>V,fromPolygon:()=>v,fromPolyline:()=>w,fromSpatialReference:()=>P,getSpatialReference:()=>x,toExtent:()=>d,toGeometry:()=>R,toMultipoint:()=>Z,toPoint:()=>_,toPolygon:()=>S,toPolyline:()=>k});var r=n(83661),a=(n(79187),n(55537)),s=n(95213),o=n(35368),u=n(12189),i=n(5443),c=n(48526),l=n(86738),m=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",y=2,g=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function G(e){switch(e.type){case"point":return V(e);case"multipoint":return M(e);case"polyline":return w(e);case"polygon":return v(e);case"extent":return C(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function C(e){if(!e.getCacheValue(p)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const t=new o.M,n=new s.P,r=e.points,a=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),u&&n.setZ(s[2]??0),a&&n.setM(s[i]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,s=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,s=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function P(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.a)(t):null}function R(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return _(e,t);case a.G.enumEnvelope:return d(e,t);case a.G.enumMultiPoint:return Z(e,t);case a.G.enumPolyline:return k(e,t);case a.G.enumPolygon:return S(e,t)}return null}function d(e,t){if(e.isEmpty())return null;const n=new i.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(g,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function Z(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],u=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];a&&n.push(u.getZ()),r&&n.push(u.getM()),o.push(n)}const i=new c.A({hasM:r,hasZ:a,points:o,spatialReference:t});return i.setCacheValue(p,e),i}function _(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),a=e.getDescription();return a.hasM()&&(n.m=e.getM()),a.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function S(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function k(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}},90836:(e,t,n)=>{n.d(t,{a:()=>u,b:()=>i,e:()=>l,s:()=>c});var r=n(12189),a=n(78125);class s extends r.e{getOperatorType(){return 2}execute(e,t,n,a){return(0,r.r)(e,t,n,3,a)}}const o=new s;function u(e){const t=(0,a.getSpatialReference)(e);return o.accelerateGeometry((0,a.fromGeometry)(e),(0,a.fromSpatialReference)(t),1)}function i(e,t){return o.execute((0,a.fromGeometry)(e),(0,a.fromGeometry)(t),(0,a.fromSpatialReference)(e.spatialReference),null)}const c=o.supportsCurves(),l=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:u,execute:i,supportsCurves:c},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2503,6061],{46810:(e,t,r)=>{r.d(t,{O:()=>n});var s=r(12189);class n extends s.
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2503,6061],{46810:(e,t,r)=>{r.d(t,{O:()=>n});var s=r(12189);class n extends s.e{getOperatorType(){return 5}execute(e,t,r,n){return(0,s.r)(e,t,r,8,n)}}},76061:(e,t,r)=>{r.d(t,{G:()=>s,S:()=>n});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class n 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}}},83547:(e,t,r)=>{r.r(t),r.d(t,{execute:()=>m});var s=r(46810),n=r(83299);const o=new s.O;function m(e,t){const r=(0,n.fromGeometry)(e);return o.execute(r.getGeometry(),(0,n.fromGeometryToGXGeometry)(t),r.getSpatialReference(),null)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[807,3169,6061,8125],{10767:(e,t,n)=>{n.d(t,{a:()=>o,e:()=>u,i:()=>c,s:()=>i});var r=n(70031),a=n(78125);const s=new r.O;function o(e){const t=(0,a.getSpatialReference)(e);return s.accelerateGeometry((0,a.fromGeometry)(e),(0,a.fromSpatialReference)(t),1)}function u(e,t){return s.execute((0,a.fromGeometry)(e),(0,a.fromGeometry)(t),(0,a.fromSpatialReference)(e.spatialReference),null)}const i=s.supportsCurves(),c=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:o,execute:u,supportsCurves:i},Symbol.toStringTag,{value:"Module"}))},25275:(e,t,n)=>{n.r(t),n.d(t,{accelerateGeometry:()=>r.a,execute:()=>r.e,supportsCurves:()=>r.s}),n(70031),n(78125);var r=n(10767)},70031:(e,t,n)=>{n.d(t,{O:()=>a});var r=n(12189);class a extends r.
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[807,3169,6061,8125],{10767:(e,t,n)=>{n.d(t,{a:()=>o,e:()=>u,i:()=>c,s:()=>i});var r=n(70031),a=n(78125);const s=new r.O;function o(e){const t=(0,a.getSpatialReference)(e);return s.accelerateGeometry((0,a.fromGeometry)(e),(0,a.fromSpatialReference)(t),1)}function u(e,t){return s.execute((0,a.fromGeometry)(e),(0,a.fromGeometry)(t),(0,a.fromSpatialReference)(e.spatialReference),null)}const i=s.supportsCurves(),c=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:o,execute:u,supportsCurves:i},Symbol.toStringTag,{value:"Module"}))},25275:(e,t,n)=>{n.r(t),n.d(t,{accelerateGeometry:()=>r.a,execute:()=>r.e,supportsCurves:()=>r.s}),n(70031),n(78125);var r=n(10767)},70031:(e,t,n)=>{n.d(t,{O:()=>a});var r=n(12189);class a extends r.e{getOperatorType(){return 4}execute(e,t,n,a){return!(0,r.r)(e,t,n,4,a)}}},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>a});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class a extends r{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}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>C,fromGeometry:()=>G,fromMultipoint:()=>M,fromPoint:()=>V,fromPolygon:()=>v,fromPolyline:()=>w,fromSpatialReference:()=>d,getSpatialReference:()=>x,toExtent:()=>R,toGeometry:()=>P,toMultipoint:()=>Z,toPoint:()=>_,toPolygon:()=>S,toPolyline:()=>k});var r=n(83661),a=(n(79187),n(55537)),s=n(95213),o=n(35368),u=n(12189),i=n(5443),c=n(48526),l=n(86738),m=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",y=2,g=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function G(e){switch(e.type){case"point":return V(e);case"multipoint":return M(e);case"polyline":return w(e);case"polygon":return v(e);case"extent":return C(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function C(e){if(!e.getCacheValue(p)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const t=new o.M,n=new s.P,r=e.points,a=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),u&&n.setZ(s[2]??0),a&&n.setM(s[i]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,s=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,s=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function d(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.a)(t):null}function P(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return _(e,t);case a.G.enumEnvelope:return R(e,t);case a.G.enumMultiPoint:return Z(e,t);case a.G.enumPolyline:return k(e,t);case a.G.enumPolygon:return S(e,t)}return null}function R(e,t){if(e.isEmpty())return null;const n=new i.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(g,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function Z(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],u=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];a&&n.push(u.getZ()),r&&n.push(u.getM()),o.push(n)}const i=new c.A({hasM:r,hasZ:a,points:o,spatialReference:t});return i.setCacheValue(p,e),i}function _(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),a=e.getDescription();return a.hasM()&&(n.m=e.getM()),a.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function S(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function k(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7444],{1364:(e,t,s)=>{s.d(t,{c:()=>i});var n=s(55537);function i(e,t){const s=e.getGeometryType();return s===n.G.enumPoint?e:(0,n.h)(s)?function(e){if(function(e){for(let t=0,s=e.getPathCount();t<s;t++){const s=e.getPathSize(t);if(0===s)return!1;if(1===s){if(0===e.getSegmentCountPath(t))return!1;if(e.getSegmentType(e.getPathStart(t))===n.G.enumLine)return!1;if(!e.isClosedPath(t))return!1}}return!0}(e))return e;const t=e.createInstance();for(let s=0,i=e.getPathCount();s<i;s++){const i=e.getPathSize(s);if(0!==i){if(1===i){if(0===e.getSegmentCountPath(s))continue;if(e.getSegmentType(e.getPathStart(s))===n.G.enumLine)continue;if(!e.isClosedPath(s))continue}t.addPath(e,s,!0)}}return t}(e):s===n.G.enumMultiPoint||s===n.G.enumEnvelope?e:s===n.G.enumMultipatch?((0,n.t)("not implemented for multipatch"),e):e}},37444:(e,t,s)=>{s.r(t),s.d(t,{OperatorGeodesicBuffer:()=>T});var n=s(76061),i=s(55537),r=s(79187),o=s(12189),m=s(90237),a=s(35368),h=s(95213),c=s(11878),u=s(83661),l=s(31139),_=s(1364),f=s(5247);class d{constructor(e){this.m_sr=null,this.m_gcs=null,this.m_transform=null,this.m_a=0,this.m_eSquared=0,this.m_rpu=0,this.m_radTolerance=0,this.m_q90=0,this.m_gcs90=0,this.m_gcs180=0,this.m_gcs360=0,this.m_gcs60=0,this.m_ellipticToGeodesicMaxRatio=0,this.m_curveType=0,this.m_bShapePreserving=!1,this.m_distance=0,this.m_absDistance=0,this.m_convergenceOffset=0,this.m_cornerStep=0,this.m_segmentStep=0,this.m_progressTracker=e}bufferPolygon(e){const t=new a.a,s=new I(this,e,t);return this.processGnomonicBufferPiecesCursor(!0,s)}bufferPolyline(e){const t=new I(this,e,null);return this.processGnomonicBufferPiecesCursor(!0,t)}bufferMultiPoint(e){const t=new G(this,e);return this.processGnomonicBufferPiecesCursor(!1,t)}bufferPoint(e){const t=e.getXY();t.scale(this.m_rpu);let s=new a.a;if(this.bufferPoint2D(t,!1,s)){const e=(0,h.b)(null,s,!0);s=(0,o.p)(s,e,!0,!0,-1,this.m_progressTracker,0,!1)}return s=(new o.v).foldInto360RangeGeodetic(s,this.m_gcs,2),s}processGnomonicBufferPiecesCursor(e,t){const s=t;let n=s.getGnomonic();const i=(0,o.R)((0,o.S)());let m=new o.U,a=(new o.j).executeMany(m,i,this.m_progressTracker,2);const l=(0,u.d)(6,!1),_=(0,u.m)(r.Envelope2D,6);this.initializeGrid(l,_);const f=[null,null,null,null,null,null],d=[null,null,null,null,null,null],g=[null,null,null,null,null,null];let P,p,x;for(;null!==(P=s.next());){if(p=s.getGnomonic(),p!==n){if(null!==n){let t=a.next();if(m=null,a=null,null!=t){const s=(0,h.b)(i,t,!0),r=(0,h.e)(s);t=n.unproject(t,r,this.m_progressTracker),this.putInGridCursors(e,t,i,!0,l,_,f,d,g)}}null!==p&&(m=new o.U,a=(new o.j).executeMany(m,i,this.m_progressTracker,2)),n=p}if(s.isRunningInGnomonic()){if(p.project(P),s.needsSimplify()){const e=(0,h.b)(null,P,!0);P=(0,o.p)(P,e,!0,!0,-1,this.m_progressTracker,0,!1)}m.tick(S(P)),a.tock()}else this.putInGridCursors(e,P,i,!0,l,_,f,d,g)}let b=!1;for(let e=0;e<6;e++)if(null!=g[e]){b=!0;break}if(b){let t=!1;const r=[null,null,null,null,null,null];if(e){const n=s.m_densified;if(s.m_densified=null,null!==n){const s=new c.T;s.scale(1/this.m_rpu,1/this.m_rpu),n.applyTransformation(s),this.m_distance>0?this.putInGridCursors(e,n,i,!1,l,_,f,d,g):(this.processInGrid(e,n,!1,l,_,f,r),t=!0)}}const u=new o.U,P=(new o.j).executeMany(u,this.m_gcs,this.m_progressTracker,2);if(null!==a){let t=a.next();m=null,a=null;const s=(0,h.b)(i,t,!0),r=(0,h.e)(s);t=n.unproject(t,r,this.m_progressTracker),this.putInGridCursors(e,t,i,!0,l,_,f,d,g)}for(let e=0;e<6;e++)if(null!=g[e]){let s=g[e].next();g[e]=null,d[e]=null,t&&null!==r[e]&&(s=(new o.f).execute(r[e],s,i,this.m_progressTracker));const n=(0,h.b)(i,s,!0),m=(0,h.e)(n);s=f[e].unproject(s,m,this.m_progressTracker),s=(new o.O).execute(s,this.m_gcs,!0,this.m_progressTracker),u.tick(S(s)),P.tock()}x=P.next()}else{let t,r=!1;if(e){let e=s.m_densified;if(s.m_densified=null,null!==e){const s=new c.T;s.scale(1/this.m_rpu,1/this.m_rpu),e.applyTransformation(s),p.project(e);const n=(0,h.b)(null,e,!0);e=(0,o.p)(e,n,!1,!0,-1,this.m_progressTracker,0,!1),this.m_distance>0?(m.tick(S(e)),a.tock()):(t=e,r=!0)}}let u=a.next();m=null,a=null,r&&(u=(new o.f).execute(t,u,i,this.m_progressTracker));const l=(0,h.b)(i,u,!0),_=(0,h.e)(l);x=n.unproject(u,_,this.m_progressTracker),x=(new o.O).execute(x,this.m_gcs,!0,this.m_progressTracker)}return x=(new o.v).foldInto360RangeGeodetic(x,this.m_gcs,2),x}putInGridCursors(e,t,s,n,i,r,m,a,h){const c=[null,null,null,null,null,null];this.processInGrid(e,t,n,i,r,m,c);for(let e=0;e<6;e++)null!==c[e]&&(null===a[e]&&(a[e]=new o.U,h[e]=(new o.j).executeMany(a[e],s,this.m_progressTracker,2)),a[e].tick(S(c[e])),h[e].tock())}processInGrid(e,t,s,n,i,r,m){const a=.01,c=this.insertGeodeticPointsAlongGrid(t,i,a);for(let e=0;e<6;e++){if(n[e])continue;const _=i[e].clone();_.inflateCoords(a,a);const f=(0,h.f)(t,_),d=(0,h.c)(null,f,!1).total();let g=(0,l.c)(c,_,d,Number.NaN,this.m_progressTracker);if(null!==g&&!g.isEmpty()){if(g===c&&(g=g.clone()),null===r[e]){const t=new u.P;e<3?t.setCoords(0,1):t.setCoords(0,-1);const s=new u.P;s.setAdd(i[e].getCenter(),t),r[e]=v(this.m_gcs,s)}r[e].project(g);const t=(0,h.b)(null,g,!0);g=(0,o.p)(g,t,s,!0,-1,this.m_progressTracker,0,!1),m[e]=g}}}insertGeodeticPointsAlongGrid(e,t,s){const n=r.Envelope2D.construct(t[3].xmin,t[3].ymin,t[2].xmax,t[2].ymax),i=(0,o.V)(this.m_gcs,n,e,!0,this.m_progressTracker),m=new a.E,h=m.addGeometry(i);return(0,o.W)(m,h,this.m_gcs,0,2,!0,t[0].xmax+s),(0,o.W)(m,h,this.m_gcs,0,2,!0,t[1].xmax+s),(0,o.W)(m,h,this.m_gcs,0,2,!1,t[1].ymin+s),0!==s&&((0,o.W)(m,h,this.m_gcs,0,2,!0,t[0].xmax-s),(0,o.W)(m,h,this.m_gcs,0,2,!0,t[1].xmax-s),(0,o.W)(m,h,this.m_gcs,0,2,!1,t[1].ymin-s)),m.getGeometry(h)}initializeGrid(e,t){for(let t=0;t<6;t++)e[t]=!1;t[0].setCoords({xmin:-this.m_gcs180,ymin:0,xmax:-this.m_gcs60,ymax:this.m_gcs90}),t[1].setCoords({xmin:-this.m_gcs60,ymin:0,xmax:this.m_gcs60,ymax:this.m_gcs90}),t[2].setCoords({xmin:this.m_gcs60,ymin:0,xmax:this.m_gcs180,ymax:this.m_gcs90}),t[3].setCoords({xmin:-this.m_gcs180,ymin:-this.m_gcs90,xmax:-this.m_gcs60,ymax:0}),t[4].setCoords({xmin:-this.m_gcs60,ymin:-this.m_gcs90,xmax:this.m_gcs60,ymax:0}),t[5].setCoords({xmin:this.m_gcs60,ymin:-this.m_gcs90,xmax:this.m_gcs180,ymax:0})}checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(e,t,s,n,i,r){const m=e[0],a=e.at(-1),h=m.y<a.y?m.y:a.y,c=m.y>a.y?m.y:a.y,l=o.H.q(this.m_a,this.m_eSquared,h),_=o.H.q(this.m_a,this.m_eSquared,c);if(this.m_q90-(l+t+this.m_absDistance)>.001&&this.m_q90+(_-t-this.m_absDistance)>.001)return!1;const f=s-u.p,d=n+u.p,g=f-Math.PI,b=f+Math.PI,y=d+Math.PI,w=[Number.NaN],C=[Number.NaN],v=[Number.NaN],S=[Number.NaN];let D=!1;if(x(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,m,f,g,a,d,w,C),x(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,a,y,d,m,g,v,S),(d<w[0]&&w[0]<y||d<C[0]&&C[0]<y)&&(D=!0),D||(g<v[0]&&v[0]<f||g<S[0]&&S[0]<f)&&(D=!0),!D&&i)return!1;const I=[];for(let t=e.length-1;t>=0;t--)I.push(e[t]);r.setEmpty(),r.addPathPoint2D(null,0,!0);let G=0;G=P(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,this.m_curveType,e,f,d,i,G,r),G=p(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,a,d,y,this.m_cornerStep,i,G,r,w[0],C[0]),G=P(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,this.m_curveType,I,y,b,i,G,r),G=p(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,m,g,f,this.m_cornerStep,i,G,r,v[0],S[0]);let T=!1;return i||(T=this.checkAndPrepForPole(r)),D||T}bufferPoint2D(e,t,s){s.setEmpty(),s.addPathPoint2D(null,0,!0),p(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,e,-this.m_cornerStep,2*Math.PI,this.m_cornerStep,t,0,s);let n=!1;return t||(n=this.checkAndPrepForPole(s)),n}checkAndPrepForPole(e){const t=this.checkAndPrepForPoleTouch(e),s=this.checkAndPrepForPoleWrap(e);return t||s}checkAndPrepForPoleTouch(e){const t=new r.Envelope2D;return e.queryEnvelope(t),!(!(0,o.X)(t.ymax,this.m_gcs90)&&!(0,o.X)(t.ymin,-this.m_gcs90)||(this.prepPoleTouch(e),0))}checkAndPrepForPoleWrap(e){const t=e.getXY(0),s=e.getXY(e.getPointCount()-1);return Math.abs(t.x-s.x)>this.m_gcs180?(this.prepSinglePoleWrap(e),!0):this.checkAndPrepForDoublePoleWrap(e)}checkAndPrepForDoublePoleWrap(e){return e.calculateArea2D()<0&&(this.prepDoublePoleWrap(e),!0)}prepPoleTouch(e){const t=new a.a;t.insertPath2D(-1,null,0,0,!0);const s=e.getPathStart(0),n=e.getPathEnd(0),i=n-s;let r=-1;for(r=s;r<n;r++){const t=e.getXY(r),s=(0,o.X)(t.y,this.m_gcs90),n=(0,o.X)(t.y,-this.m_gcs90);if(!s&&!n)break}let m=r,h=!1,c=Number.NaN;do{const n=e.getXY(m),r=(0,o.X)(n.y,this.m_gcs90),a=(0,o.X)(n.y,-this.m_gcs90),l=s+(m+1-s)%i;if(r||a){let s=u.P.construct(c,n.y);t.insertPoint2D(0,-1,s);const i=e.getXY(l),r=(0,o.X)(i.y,this.m_gcs90),m=(0,o.X)(i.y,-this.m_gcs90);r||m||(s=u.P.construct(i.x,n.y),h?t.setXY(t.getPointCount()-1,s):t.insertPoint2D(0,-1,s)),h=!0}else t.insertPoint2D(0,-1,n),c=n.x,h=!1;m=l}while(m!==r);e.setEmpty(),e.add(t,!1)}prepSinglePoleWrap(e){const t=new a.a,s=new a.a,n=new c.T,i=e.getXY(e.getPathStart(0)),m=e.getXY(e.getPathEnd(0)-1),_=this.m_gcs360,f=this.m_gcs180,d=new r.Envelope2D;d.setCoords({xmin:-this.m_gcs180,ymin:-this.m_gcs90,xmax:this.m_gcs180,ymax:this.m_gcs90});const g=new r.Envelope2D;e.queryEnvelope(g);const P=Math.ceil(g.width()/_);let p,x;i.x>m.x?(p=-_,x=this.m_gcs90):(p=_,x=-this.m_gcs90),n.setShiftCoords(p,0),t.addPath(e,0,!0),s.add(t,!1);const b=new h.P;for(let e=0;e<P;e++)s.applyTransformation(n),s.getPointByVal(0,b),t.lineToPoint(b),t.addSegmentsFromPath(s,0,0,s.getSegmentCount()-1,!1);const y=t.getXY(0),w=t.getXY(t.getPointCount()-1);y.y=x,w.y=x,t.lineTo(w);const C=new u.P;for(C.setCoordsPoint2D(w),C.x-=.5*p;Math.abs(C.x-y.x)>f;)t.lineTo(C),C.x-=.5*p;t.lineTo(y);const v=d.getCenterX(),S=new r.Envelope2D;t.queryEnvelope(S);let D=0;const I=S.getCenter().x;I-v>f?D=-Math.ceil((I-v-f)/_):v-I>f&&(D=Math.ceil((v-I-f)/_)),0!==D&&(n.setShiftCoords(D*_,0),t.applyTransformation(n));const G=new a.E,T=G.addGeometry(t);(0,o.W)(G,T,this.m_gcs,0,2,!0,d.xmin),(0,o.W)(G,T,this.m_gcs,0,2,!0,d.xmax);const M=G.getGeometry(T),E=(0,h.f)(M,d);E.inflateCoords(0,1);const N=(0,h.c)(null,E,!0).total(),k=(0,l.c)(M,d,N,Number.NaN,this.m_progressTracker);e.setEmpty(),e.add(k,!1)}prepDoublePoleWrap(e){const t=this.m_gcs360,s=this.m_gcs180,n=new r.Envelope2D;n.setCoords({xmin:-this.m_gcs180,ymin:-this.m_gcs90,xmax:this.m_gcs180,ymax:this.m_gcs90});const i=n.getCenter().x,m=new r.Envelope2D;e.queryPathEnvelope(0,m);let _,f=0,d=m.getCenter().x;if(d-i>s?f=-Math.ceil((d-i-s)/t):i-d>s&&(f=Math.ceil((i-d-s)/t)),0!==f){const s=new c.T;s.setShiftCoords(f*t,0),e.getImpl().applyTransformationToPath(s,0),e.queryPathEnvelope(0,m),d=m.getCenter().x}const g=new r.Envelope2D;n.containsExclusiveEnvelope(m)?(_=!1,g.setCoords({env2D:n})):(_=!0,g.setCoords({env2D:n}),g.xmin-=t,g.xmax+=t);let P=e.createInstance();P.addPathPoint2D(null,0,!0);const p=new u.P;if(p.setCoords(g.xmin,g.ymin),P.insertPoint2D(0,-1,p),p.setCoords(g.xmin,g.ymax),P.insertPoint2D(0,-1,p),p.setCoords(.5*(g.xmin+g.xmax),g.ymax),P.insertPoint2D(0,-1,p),p.setCoords(g.xmax,g.ymax),P.insertPoint2D(0,-1,p),p.setCoords(g.xmax,g.ymin),P.insertPoint2D(0,-1,p),p.setCoords(.5*(g.xmin+g.xmax),g.ymin),P.insertPoint2D(0,-1,p),_){P.addPath(e,0,!0);const s=new c.T;d<i?s.setShiftCoords(t,0):s.setShiftCoords(-t,0),e.getImpl().applyTransformationToPath(s,0),P.addPath(e,0,!0);const r=new a.E,m=r.addGeometry(P);(0,o.W)(r,m,this.m_gcs,0,2,!0,n.xmin),(0,o.W)(r,m,this.m_gcs,0,2,!0,n.xmax),P=r.getGeometry(m);const u=(0,h.f)(P,n);u.inflateCoords(0,1);const _=(0,h.c)(null,u,!0).total();P=(0,l.c)(P,n,_,Number.NaN,this.m_progressTracker)}else P.addPath(e,0,!0);e.setEmpty(),e.add(P,!1)}setMinCornerStep(){const e={stack:[],error:void 0,hasError:!1};try{let t=Math.min(Math.PI*this.m_a-this.m_absDistance,this.m_absDistance);t=Math.min(t,.125*this.m_a*Math.PI);const s=new u.P;s.setCoords(0,10*this.m_rpu);const n=0;let i=45*this.m_rpu;const r=(0,m.b)(e,new u.S(new o.P,new o.P),!1),a=(0,m.b)(e,new u.S(new o.P,new o.P),!1),h=(0,m.b)(e,new u.S(new o.P,new o.P),!1),c=(0,m.b)(e,new u.S(new o.P,new o.P),!1),l=new u.P,_=new u.P,f=new u.P,d=new u.P;for(o.x.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,n,r.at(0),r.at(1)),l.setCoords(r.at(0).val,r.at(1).val),o.x.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,i,a.at(0),a.at(1)),_.setCoords(a.at(0).val,a.at(1).val);;){const e={stack:[],error:void 0,hasError:!1};try{const r=.5*(n+i);o.x.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,r,h.at(0),h.at(1)),f.setCoords(h.at(0).val,h.at(1).val);const u=(0,m.b)(e,new o.P,!1),g=(0,m.b)(e,new o.P,!1);o.x.geodeticDistance(this.m_a,this.m_eSquared,l.x,l.y,_.x,_.y,u,g,null,2),o.x.geodeticCoordinate(this.m_a,this.m_eSquared,l.x,l.y,.5*u.val,g.val,c.at(0),c.at(1),2),d.setCoords(c.at(0).val,c.at(1).val);const P=(0,m.b)(e,new o.P,!1);if(o.x.geodeticDistance(this.m_a,this.m_eSquared,f.x,f.y,d.x,d.y,P,null,null,2),P.val<=this.m_convergenceOffset)break;i*=.9,o.x.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,i,a.at(0),a.at(1)),_.setCoords(a.at(0).val,a.at(1).val)}catch(t){e.error=t,e.hasError=!0}finally{(0,m.c)(e)}}const g=i-n,P=2*Math.PI/Math.ceil(2*Math.PI/g);this.m_cornerStep=P}catch(t){e.error=t,e.hasError=!0}finally{(0,m.c)(e)}}setMinSegmentStep(){const e={stack:[],error:void 0,hasError:!1};try{let t=Math.min(Math.PI*this.m_a-this.m_absDistance,this.m_absDistance);t=Math.min(t,.125*this.m_a*Math.PI);const s=new u.P,n=new u.P;s.setCoords(0,10*this.m_rpu),n.setCoords(10*this.m_rpu,10*this.m_rpu);const i=(0,m.b)(e,new o.P,!1),r=(0,m.b)(e,new o.P,!1),a=(0,m.b)(e,new o.P,!1);o.x.geodeticDistance(this.m_a,this.m_eSquared,s.x,s.y,n.x,n.y,a,i,r,this.m_curveType);const h=(0,m.b)(e,new u.S(new o.P,new o.P),!1),c=(0,m.b)(e,new u.S(new o.P,new o.P),!1),l=new u.P,_=(0,m.b)(e,new o.P,!1),f=(0,m.b)(e,new u.S(new o.P,new o.P),!1),d=(0,m.b)(e,new u.S(new o.P,new o.P),!1),g=(0,m.b)(e,new u.S(new o.P,new o.P),!1),P=(0,m.b)(e,new u.S(new o.P,new o.P),!1),p=new u.P,x=new u.P,b=new u.P,y=new u.P,w=0;let C=1;const v=i.val,S=r.val,D=v-.5*Math.PI,I=S+.5*Math.PI,G=a.val;for(o.x.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,D,f.at(0),f.at(1)),p.setCoords(f.at(0).val,f.at(1).val),o.x.geodesicCoordinate(this.m_a,this.m_eSquared,n.x,n.y,t,I,d.at(0),d.at(1)),x.setCoords(d.at(0).val,d.at(1).val);;){const e={stack:[],error:void 0,hasError:!1};try{const i=.5*(w+C);o.x.geodeticCoordinate(this.m_a,this.m_eSquared,s.x,s.y,i*G,v,h.at(0),h.at(1),this.m_curveType),l.setCoords(h.at(0).val,h.at(1).val),o.x.geodeticDistance(this.m_a,this.m_eSquared,s.x,s.y,l.x,l.y,null,null,_,this.m_curveType);const r=_.val+.5*Math.PI;o.x.geodesicCoordinate(this.m_a,this.m_eSquared,l.x,l.y,t,r,g.at(0),g.at(1)),b.setCoords(g.at(0).val,g.at(1).val);const a=(0,m.b)(e,new o.P,!1),u=(0,m.b)(e,new o.P,!1);o.x.geodeticDistance(this.m_a,this.m_eSquared,p.x,p.y,x.x,x.y,a,u,null,2),o.x.geodeticCoordinate(this.m_a,this.m_eSquared,p.x,p.y,.5*a.val,u.val,P.at(0),P.at(1),2),y.setCoords(P.at(0).val,P.at(1).val);const f=(0,m.b)(e,new o.P,!1);if(o.x.geodeticDistance(this.m_a,this.m_eSquared,b.x,b.y,y.x,y.y,f,null,null,2),f.val<=this.m_convergenceOffset)break;{const e={stack:[],error:void 0,hasError:!1};try{C*=.9,o.x.geodeticCoordinate(this.m_a,this.m_eSquared,s.x,s.y,C*G,v,c.at(0),c.at(1),this.m_curveType),n.setCoords(c.at(0).val,c.at(1).val);const i=(0,m.b)(e,new o.P,!1);o.x.geodeticDistance(this.m_a,this.m_eSquared,s.x,s.y,n.x,n.y,null,null,i,this.m_curveType);const r=i.val+.5*Math.PI;o.x.geodesicCoordinate(this.m_a,this.m_eSquared,n.x,n.y,t,r,d.at(0),d.at(1)),x.setCoords(d.at(0).val,d.at(1).val)}catch(t){e.error=t,e.hasError=!0}finally{(0,m.c)(e)}}}catch(t){e.error=t,e.hasError=!0}finally{(0,m.c)(e)}}let T=C*G;T>1e5&&(T=1e5),this.m_segmentStep=T}catch(t){e.error=t,e.hasError=!0}finally{(0,m.c)(e)}}setConvergenceOffset(){let e;e=this.m_absDistance>5e4?100:this.m_absDistance>1e4?10:1,this.m_absDistance/e<500&&(e=this.m_absDistance/500),e<.01&&(e=.01),this.m_convergenceOffset=e}}function g(e,t,s,n,m,c,l){if(e.isEmpty())return new a.a({vd:e.getDescription()});let _=e;if((0,i.m)(_)){const e=10*t.getTolerance(0);_=(new f.O).execute(_,0,e,0,l,12e3)}const g=new d(l);g.m_sr=t,g.m_gcs=t.getGCS(),g.m_transform=(0,o.w)(t,g.m_gcs,null);const P=(0,o.J)();g.m_gcs.querySpheroidData(P);const p=new r.Envelope2D;_.queryEnvelope(p),g.m_a=P.majorSemiAxis,g.m_eSquared=P.e2,g.m_rpu=g.m_gcs.getUnit().getUnitToBaseFactor(),g.m_gcs90=.5*Math.PI/g.m_rpu,g.m_gcs180=Math.PI/g.m_rpu,g.m_gcs360=2*Math.PI/g.m_rpu,g.m_gcs60=g.m_gcs360/6,g.m_q90=o.H.q90(g.m_a,g.m_eSquared),g.m_ellipticToGeodesicMaxRatio=.5*g.m_a*Math.PI/g.m_q90;const x=g.m_gcs.getTolerance(0);g.m_radTolerance=x*g.m_rpu,4===s?(g.m_curveType=2,g.m_bShapePreserving=!0):(g.m_curveType=s,g.m_bShapePreserving=!1),g.m_distance=n,g.m_absDistance=Math.abs(n),Number.isNaN(m)||m<=0?g.setConvergenceOffset():g.m_convergenceOffset=Math.max(m,.001),g.m_convergenceOffset/=c;let b,y=_.getGeometryType();if((0,i.f)(y)){const e=new a.P({vd:_.getDescription()});e.addSegment(_,!0),b=e,y=i.G.enumPolyline}else if(y===i.G.enumEnvelope){const e=_,t=new r.Envelope2D;e.queryEnvelope(t);const s=(0,h.e)((0,h.c)(g.m_sr,p,!0));if(t.minDimension()<=s)if(0===t.maxDimension()){const t=new h.P({vd:_.getDescription()});e.getCenter(t),b=t,y=i.G.enumPoint}else{const t=new a.P({vd:_.getDescription()});t.addEnvelope(e,!1),b=t,y=i.G.enumPolyline}else{const t=new a.a({vd:_.getDescription()});t.addEnvelope(e,!1),b=t,y=i.G.enumPolygon}}else b=_;if(g.setMinCornerStep(),(0,i.e)(y)||g.setMinSegmentStep(),g.m_absDistance<=.5*g.m_convergenceOffset)return y!==i.G.enumPolygon?new a.a({vd:b.getDescription()}):g.m_bShapePreserving?b:(0,o.L)(b,g.m_sr,g.m_curveType,g.m_segmentStep,-1,l);if(g.m_distance<0&&y!==i.G.enumPolygon)return new a.a({vd:b.getDescription()});if(g.m_bShapePreserving&&(0,i.h)(y)){const e=(0,o.L)(b,t,4,Number.NaN,g.m_convergenceOffset,l);b=(new o.v).execute(e,g.m_transform,l)}else b=(new o.v).execute(b,g.m_transform,l);if(b=(0,o.F)(b,g.m_gcs),b.isEmpty())return new a.a({vd:b.getDescription()});!g.m_bShapePreserving&&(0,i.h)(y)&&(b=(0,o.Q)(g.m_rpu,b)),b=function(e,t){const s=e.getGeometryType();let n;if(n=(0,i.h)(s)?e.getPathCount():s===i.G.enumMultiPoint?e.getPointCount():1,1===n)return e;const o=[],m=[];for(let a=0;a<n;a++){o.push(a);const n=new u.P;if((0,i.h)(s)){const t=new r.Envelope2D;e.queryPathEnvelope(a,t),n.assign(t.getCenter())}else n.assign(e.getXY(a));const h=t.toGeohash(n);m.push(h)}o.sort(((e,t)=>m[e]<m[t]?-1:m[e]>m[t]?1:0));const a=e.createInstance();for(let t=0;t<n;t++){const n=o[t];(0,i.h)(s)?a.addPath(e,n,!0):a.addPoints(e,n,n+1)}return a}(b,g.m_gcs);let w=new a.a;switch(y){case i.G.enumPolygon:w=g.bufferPolygon(b);break;case i.G.enumPolyline:w=g.bufferPolyline(b);break;case i.G.enumMultiPoint:w=g.bufferMultiPoint(b);break;case i.G.enumPoint:w=g.bufferPoint(b);break;default:(0,i.n)("")}const C=(new o.v).execute(w,g.m_transform.getInverse(),l);return C.mergeVertexDescription(b.getDescription()),C}function P(e,t,s,n,i,r,a,h,c,l,_){const f={stack:[],error:void 0,hasError:!1};try{const d=new u.P;d.setNAN(),c||_.getPointCount()>0&&(d.setCoordsPoint2D(_.getXY(_.getPointCount()-1)),d.scale(s));const g=(0,m.b)(f,new o.P,!1),P=(0,m.b)(f,new u.S(new o.P,new o.P),!1),p=new u.P,x=new u.P,y=r.at(-1),w=1/s;for(let s=0;s<r.length;s++){const m=r[s];let u;0===s?u=a:s===r.length-1?u=h:(o.x.geodeticDistance(e,t,y.x,y.y,m.x,m.y,null,null,g,i),u=g.val-.5*Math.PI),o.x.geodesicCoordinate(e,t,m.x,m.y,n,u,P.at(0),P.at(1)),c?x.setCoords(P.at(0).val,P.at(1).val):(p.setCoords(P.at(0).val,P.at(1).val),l=b(m.x,p.x,d.x,l),x.setCoords(l+p.x,p.y),d.setCoordsPoint2D(x)),x.scale(w),_.insertPoint2D(0,-1,x)}return l}catch(e){f.error=e,f.hasError=!0}finally{(0,m.c)(f)}}function p(e,t,s,n,i,r,a,h,c,l,_,f=Number.NaN,d=Number.NaN){const g={stack:[],error:void 0,hasError:!1};try{if(a-r<h)return l;const P=(0,m.b)(g,new u.S(new o.P,new o.P),!1),p=new u.P,x=new u.P,y=new u.P;x.setNAN(),c||_.getPointCount()>0&&(x.setCoordsPoint2D(_.getXY(_.getPointCount()-1)),x.scale(s));let w=Math.ceil(r/h),C=w++*h;C===r&&(C=w++*h);let v=r;const S=1/s;for(;C<a+h&&(v<f&&f<C?(C=f,w--):v<d&&d<C&&(C=d,w--),!(C>=a));)o.x.geodesicCoordinate(e,t,i.x,i.y,n,C,P.at(0),P.at(1)),c?y.setCoords(P.at(0).val,P.at(1).val):(p.setCoords(P.at(0).val,P.at(1).val),l=b(i.x,p.x,x.x,l),y.setCoords(l+p.x,p.y),x.setCoordsPoint2D(y)),y.scale(S),_.insertPoint2D(0,-1,y),v=C,C=w++*h;return l}catch(e){g.error=e,g.hasError=!0}finally{(0,m.c)(g)}}function x(e,t,s,n,i,r,a,h,c,l,_){const f={stack:[],error:void 0,hasError:!1};try{const s=new u.P,d=new u.P,g=(0,m.b)(f,new u.S(new o.P,new o.P),!1);o.x.geodesicCoordinate(e,t,i.x,i.y,n,r,g.at(0),g.at(1)),s.setCoords(g.at(0).val,g.at(1).val),o.x.geodesicCoordinate(e,t,i.x,i.y,n,a,g.at(0),g.at(1)),d.setCoords(g.at(0).val,g.at(1).val);const P=(0,m.b)(f,new o.P,!1);for(o.x.geodeticDistance(e,t,h.x,h.y,s.x,s.y,null,P,null,0),l[0]=P.val,o.x.geodeticDistance(e,t,h.x,h.y,d.x,d.y,null,P,null,0),_[0]=P.val;l[0]<=_[0];)l[0]+=u.o;for(;l[0]>_[0];)l[0]-=u.o;for(;l[0]>=c;)l[0]-=u.o,_[0]-=u.o;for(;l[0]<c;)l[0]+=u.o,_[0]+=u.o}catch(e){f.error=e,f.hasError=!0}finally{(0,m.c)(f)}}function b(e,t,s,n){if(Number.isNaN(s)){for(;n+t-e>Math.PI;)n-=u.o;for(;e-(n+t)>Math.PI;)n+=u.o;return n}return n+t-s>Math.PI?n-=u.o:s-(n+t)>Math.PI&&(n+=u.o),n}function y(e,t,s,n,i,r){const a={stack:[],error:void 0,hasError:!1};try{if(n>=r)return!1;const h=s[0],c=s.at(-1),u=(0,m.b)(a,new o.P,!1),l=(0,m.b)(a,new o.P,!1),_=(0,m.b)(a,new o.P,!1);o.x.greatEllipticDistance(e,t,i.x,i.y,h.x,h.y,u,null,null),o.x.greatEllipticDistance(e,t,i.x,i.y,c.x,c.y,l,null,null),o.x.greatEllipticDistance(e,t,h.x,h.y,c.x,c.y,_,null,null);let f=Math.min(u.val,l.val)+_.val,d=f+n;if(d<r)return!0;const g=(0,m.b)(a,new o.P,!1);f=Math.max(u.val,l.val);for(let n=1;n<s.length-1;n++){const r=s[n];o.x.greatEllipticDistance(e,t,i.x,i.y,r.x,r.y,g,null,null),g.val>f&&(f=g.val)}return d=f+n,d<r}catch(e){a.error=e,a.hasError=!0}finally{(0,m.c)(a)}}function w(e,t,s,n,i,r,m,a){let h;if(n.length%2==0){const e=n.length>>1,t=n[e],s=n[e-1];h=u.P.lerp(t,s,.5)}else h=n[n.length-1>>1].clone();const c=h.clone(),l=(0,o.Z)(e,t,c,75/180*Math.PI);return!!y(e,t,n,i,c,l)&&(null!==r&&(r.setCoordsPoint2D(h),r.scale(1/s)),null!==m&&m.setCoordsPoint2D(c),null!==a&&(a[0]=l),!0)}function C(e,t,s,n,i,r){const a={stack:[],error:void 0,hasError:!1};try{if(n>=r)return!1;const h=(0,m.b)(a,new o.P,!1);return o.x.greatEllipticDistance(e,t,i.x,i.y,s.x,s.y,h,null,null),h.val+n<r}catch(e){a.error=e,a.hasError=!0}finally{(0,m.c)(a)}}function v(e,t){return new o.Y(e,t)}function S(e){return(0,h.h)(e,0)||(0,h.s)(e,0),e}class D{constructor(e){this.m_bRunningInGnomonic=!1,this.m_bNeedsSimplify=!1,this.m_gnomonic=null,this.m_gnomonicCenterRad=new u.P,this.m_minGnomonicRadius=Number.NaN,this.m_progressTracker=e}isRunningInGnomonic(){return this.m_bRunningInGnomonic}needsSimplify(){return this.m_bNeedsSimplify}getGnomonic(){return this.m_gnomonic}}class I extends D{constructor(e,t,s){super(e.m_progressTracker),this.m_segIter=null,this.m_bNextSegmentCannotJoin=!1,this.m_currentDensifiedDelta=[0],this.m_currentBufferedDelta=0,this.m_lastAzimuth=0,this.m_startAzimuth=[0],this.m_endAzimuth=[0],this.m_numWinds=0,this.m_debugCounter=0,this.m_bufferHelper=new a.a,this.m_densifiedPoints=[],this.m_bufferer=e,this.m_multiPath=t,this.m_densified=s,this.m_bNeedsSimplify=!0;const n=new r.Envelope2D;this.m_multiPath.queryEnvelope(n);const i=n.getCenter(),m=i.clone();m.scale(this.m_bufferer.m_rpu),this.m_gnomonic=v(this.m_bufferer.m_gcs,i),this.m_gnomonicCenterRad=m.clone(),this.m_minGnomonicRadius=(0,o.Z)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,m,75/180*Math.PI)}next(){let e;if(this.m_bNextSegmentCannotJoin)return this.m_bNextSegmentCannotJoin=!1,this.m_segIter.nextSegment(),e=this.m_bufferHelper.clone(),e;if(null===this.m_segIter){if(this.m_segIter=this.m_multiPath.getImpl().querySegmentIterator(),!this.m_segIter.nextPath())return null;null!==this.m_densified&&this.m_densified.addPathPoint2D(null,0,!0)}if(!this.m_segIter.hasNextSegment()){if(!this.m_segIter.nextPath())return null;null!=this.m_densified&&this.m_densified.addPathPoint2D(null,0,!0)}let t=null;this.m_currentBufferedDelta=0,this.m_currentDensifiedDelta=[0],this.m_numWinds=0,this.m_lastAzimuth=Number.NaN,this.m_bNextSegmentCannotJoin=!1,this.m_densifiedPoints.length=0;let s=0;const n=new u.P,i=new u.P;for(;this.m_segIter.hasNextSegment()&&this.m_numWinds<16;){const e=this.m_segIter.nextSegment();if(n.setCoordsPoint2D(e.getStartXY()),i.setCoordsPoint2D(e.getEndXY()),n.scale(this.m_bufferer.m_rpu),i.scale(this.m_bufferer.m_rpu),(0,o._)(n,i))n.x=i.x;else if((0,o.$)(n,i))i.x=n.x;else{let e=-1,t=-1;const s=this.m_segIter.getPathIndex(),r=this.m_multiPath.getPathStart(s),m=this.m_multiPath.getPathEnd(s);if(e=this.m_segIter.getStartPointIndex()-1,t=this.m_segIter.getEndPointIndex()+1,e<r&&(e=this.m_multiPath.isClosedPath(s)?m-1:-1),t>m-1&&(t=this.m_multiPath.isClosedPath(s)?r:-1),-1!==e){const t=this.m_multiPath.getXY(e);t.scale(this.m_bufferer.m_rpu),(0,o.$)(t,n)&&(n.x=t.x)}if(-1!==t){const e=this.m_multiPath.getXY(t);e.scale(this.m_bufferer.m_rpu),(0,o._)(i,e)&&(i.x=e.x)}}this.m_densifiedPoints.length=0;const r=(0,o.a0)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_curveType,n,i,this.m_bufferer.m_segmentStep,Number.NaN,this.m_bufferer.m_radTolerance,this.m_startAzimuth,this.m_endAzimuth,this.m_densifiedPoints,this.m_currentDensifiedDelta);if(0===s)this.m_bRunningInGnomonic=this.isSegmentBufferInCurrentGnomonic(this.m_densifiedPoints),this.m_bRunningInGnomonic||(this.m_bRunningInGnomonic=this.tryUpdateGnomonic(this.m_densifiedPoints));else if(this.m_bRunningInGnomonic){if(!this.isSegmentBufferInCurrentGnomonic(this.m_densifiedPoints)){this.m_segIter.previousSegment(),this.m_segIter.previousSegment(),this.m_segIter.nextSegment();break}}else if(w(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_densifiedPoints,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,null,null,null)){this.m_segIter.previousSegment(),this.m_segIter.previousSegment(),this.m_segIter.nextSegment();break}if(0===r||(0,o.a1)(n,i)?(this.m_bufferHelper.setEmpty(),this.m_bufferer.bufferPoint2D(n,this.m_bRunningInGnomonic,this.m_bufferHelper),this.m_bNextSegmentCannotJoin=!0):(this.m_bufferHelper.setEmpty(),this.m_bNextSegmentCannotJoin=this.checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(r,this.m_bufferHelper)),this.m_bNextSegmentCannotJoin){this.m_segIter.previousSegment(),this.m_segIter.hasPreviousSegment()?(this.m_segIter.previousSegment(),this.m_segIter.nextSegment()):this.m_segIter.resetToFirstSegment(),null!=this.m_densified&&this.m_densified.insertPointsFromPoints(this.m_densified.getPathCount()-1,-1,this.m_densifiedPoints,0,this.m_densifiedPoints.length-1,!0);break}null!=this.m_densified&&this.m_densified.insertPointsFromPoints(this.m_densified.getPathCount()-1,-1,this.m_densifiedPoints,0,this.m_densifiedPoints.length-1,!0),null===t&&(t=new a.a,t.addPathPoint2D(null,0,!0)),this.addJoinAndBufferLeftSide(t),s++}if(this.m_currentDensifiedDelta=[0],s>0){const e=this.m_segIter.getStartPointIndex(),r=this.m_segIter.getPathIndex();for(;s>0;){if(this.m_segIter.previousSegment(),n.setCoordsPoint2D(this.m_multiPath.getXY(this.m_segIter.getStartPointIndex())),i.setCoordsPoint2D(this.m_multiPath.getXY(this.m_segIter.getEndPointIndex())),n.scale(this.m_bufferer.m_rpu),i.scale(this.m_bufferer.m_rpu),this.m_bRunningInGnomonic)if((0,o._)(n,i))n.x=i.x;else if((0,o.$)(n,i))i.x=n.x;else{let e=-1,t=-1;const s=this.m_segIter.getPathIndex(),r=this.m_multiPath.getPathStart(s),m=this.m_multiPath.getPathEnd(s);if(e=this.m_segIter.getStartPointIndex()-1,t=this.m_segIter.getEndPointIndex()+1,e<r&&(e=this.m_multiPath.isClosedPath(s)?m-1:-1),t>m-1&&(t=this.m_multiPath.isClosedPath(s)?r:-1),-1!==e){const t=this.m_multiPath.getXY(e);t.scale(this.m_bufferer.m_rpu),(0,o.$)(t,n)&&(n.x=t.x)}if(-1!==t){const e=this.m_multiPath.getXY(t);e.scale(this.m_bufferer.m_rpu),(0,o._)(i,e)&&(i.x=e.x)}}this.m_densifiedPoints.length=0,(0,o.a0)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_curveType,i,n,this.m_bufferer.m_segmentStep,Number.NaN,this.m_bufferer.m_radTolerance,this.m_startAzimuth,this.m_endAzimuth,this.m_densifiedPoints,this.m_currentDensifiedDelta),this.addJoinAndBufferLeftSide(t),s--}return n.setCoordsPoint2D(this.m_multiPath.getXY(this.m_segIter.getStartPointIndex())),n.scale(this.m_bufferer.m_rpu),this.m_currentBufferedDelta=p(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_bufferer.m_absDistance,n,this.m_lastAzimuth+.5*Math.PI,this.m_lastAzimuth+1.5*Math.PI,this.m_bufferer.m_cornerStep,this.m_bRunningInGnomonic,this.m_currentBufferedDelta,t),this.m_segIter.resetToVertex(e,r),this.m_segIter.nextSegment(),t}return this.m_bNextSegmentCannotJoin=!1,this.m_segIter.nextSegment(),e=this.m_bufferHelper.clone(),e}isSegmentBufferInCurrentGnomonic(e){return null!==this.m_gnomonic&&y(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,this.m_gnomonicCenterRad,this.m_minGnomonicRadius)}tryUpdateGnomonic(e){const t=new u.P,s=new u.P,n=[0];return w(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,t,s,n)?(this.m_gnomonicCenterRad.setCoordsPoint2D(s),this.m_minGnomonicRadius=n[0],this.m_gnomonic=v(this.m_bufferer.m_gcs,t),!0):(this.m_gnomonic=null,!1)}checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(e,t){return this.m_bufferer.checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(this.m_densifiedPoints,e,this.m_startAzimuth[0],this.m_endAzimuth[0],this.m_bRunningInGnomonic,t)}addJoinAndBufferLeftSide(e){const t=this.m_densifiedPoints[0];let s=Number.NaN,n=this.m_startAzimuth[0]-u.p;const i=this.m_endAzimuth[0]+u.p;let r=!1;if(!Number.isNaN(this.m_lastAzimuth)){this.m_lastAzimuth>=this.m_startAzimuth[0]?(s=this.m_lastAzimuth+u.p,n=s+Math.PI-(this.m_lastAzimuth-this.m_startAzimuth[0])):(s=this.m_lastAzimuth+u.p,n=s+Math.PI-(u.o-(this.m_startAzimuth[0]-this.m_lastAzimuth))),r=!(this.m_lastAzimuth>=this.m_startAzimuth[0]&&this.m_lastAzimuth-this.m_startAzimuth[0]<=Math.PI||this.m_lastAzimuth<this.m_startAzimuth[0]&&this.m_startAzimuth[0]-this.m_lastAzimuth>=Math.PI);let i=!1;if(Math.abs(n-s)<=.5*this.m_bufferer.m_cornerStep&&(r||(i=!0)),i){if(e.removePointFromPath(0,e.getPointCount()-1),!this.m_bRunningInGnomonic){const t=new u.P;t.setCoordsPoint2D(e.getXY(e.getPointCount()-1)),t.scale(this.m_bufferer.m_rpu),t.x-this.m_currentBufferedDelta<-Math.PI?this.m_currentBufferedDelta-=u.o:t.x-this.m_currentBufferedDelta>Math.PI&&(this.m_currentBufferedDelta+=u.o)}n=.5*(n+s)}else if(r){const s=new u.P;s.setCoordsPoint2D(t),s.scale(1/this.m_bufferer.m_rpu),e.insertPoint2D(0,-1,s)}else p(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_bufferer.m_absDistance,this.m_densifiedPoints[0],s,n,this.m_bufferer.m_cornerStep,this.m_bRunningInGnomonic,this.m_currentBufferedDelta,e)}this.m_startAzimuth[0]!==this.m_lastAzimuth&&this.m_numWinds++,P(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_bufferer.m_absDistance,this.m_bufferer.m_curveType,this.m_densifiedPoints,n,i,this.m_bRunningInGnomonic,this.m_currentBufferedDelta,e),this.m_lastAzimuth=this.m_endAzimuth[0]}}class G extends D{constructor(e,t){super(e.m_progressTracker),this.m_pointIndex=-1,this.m_bufferer=e,this.m_multiPoint=t,this.m_bNeedsSimplify=!1;const s=new r.Envelope2D;this.m_multiPoint.queryEnvelope(s);const n=s.getCenter(),i=n.clone();i.scale(this.m_bufferer.m_rpu),this.m_gnomonic=v(this.m_bufferer.m_gcs,n),this.m_gnomonicCenterRad=i.clone(),this.m_minGnomonicRadius=(0,o.Z)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,i,75/180*Math.PI)}next(){if(this.m_bNeedsSimplify=!1,++this.m_pointIndex===this.m_multiPoint.getPointCount())return null;const e=this.m_multiPoint.getXY(this.m_pointIndex);e.scale(this.m_bufferer.m_rpu),this.m_bRunningInGnomonic=this.isPointBufferInCurrentGnomonic(e),this.m_bRunningInGnomonic||(this.m_bRunningInGnomonic=this.tryUpdateGnomonic(e));const t=new a.a,s=this.m_bufferer.bufferPoint2D(e,this.m_bRunningInGnomonic,t);return this.m_bNeedsSimplify=s,t}isPointBufferInCurrentGnomonic(e){return null!==this.m_gnomonic&&C(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,this.m_gnomonicCenterRad,this.m_minGnomonicRadius)}tryUpdateGnomonic(e){const t=new u.P,s=new u.P,n=[0];return function(e,t,s,n,i,r,m,a){const h=(0,o.Z)(e,t,n,75/180*Math.PI);return!!C(e,t,n,i,n,h)&&(null!==r&&(r.setCoordsPoint2D(n),r.scale(1/s)),null!==m&&m.setCoordsPoint2D(n),null!==a&&(a[0]=h),!0)}(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,t,s,n)?(this.m_gnomonicCenterRad.setCoordsPoint2D(s),this.m_minGnomonicRadius=n[0],this.m_gnomonic=v(this.m_bufferer.m_gcs,t),!0):(this.m_gnomonic=null,!1)}}class T{getOperatorType(){return 10110}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,n,i,r,m,a){if(m){const m=new M(e,t,s,n,i,!1,r,a);return(new o.j).executeMany(m,t,a)}return new M(e,t,s,n,i,!1,r,a)}execute(e,t,s,r,o,m,a){const h=new n.S([e]),c=[r],u=this.executeMany(h,t,s,c,o,!1,m,a).next();return u||(0,i.c)("geodesic buffer null output"),u}}class M extends n.G{constructor(e,t,s,n,o,m,a,h){super(),this.m_currentUnionEnvelope2D=new r.Envelope2D,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=h,m&&(0,i.t)(""),t||(0,i.a)(""),0===t.getCoordinateSystemType()&&(0,i.a)(""),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_curveType=s,this.m_distances=n,this.m_convergenceOffset=o,this.m_bOutlineOnly=m,this.m_bUnion=a}next(){let e;for(;e=this.m_inputGeoms.next();)return(0,i.d)(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.geodesicBuffer(e,this.m_distances[this.m_dindex]);return null}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}geodesicBuffer(e,t){return function(e,t,s,n,r,o){n<Number.MAX_VALUE&&n>-Number.MAX_VALUE||(0,i.a)("Geodesic_bufferer.buffer - bad distance"),(0,i.d)(e);const m=(0,_.c)(e),a=m.getGeometryType();if((0,i.i)(a)){const e=m.getPointCount(),h=8e6;if(Math.abs(n)>h&&(e>50||a!==i.G.enumMultiPoint&&4===s&&e>2)){let e=m;const i=n>0?1:-1,a=7e6;let c=n,u=1;do{u++,c=(Math.abs(c)-a)*i}while(Math.abs(c)>h);c=n;for(let n=0;n<u-1;n++)e=g(e,t,s,a*i,r,u,o),c=(Math.abs(c)-a)*i;return e=g(e,t,s,c,r,u,o),e}}return g(m,t,s,n,r,1,o)}(e,this.m_spatialReference,this.m_curveType,t,this.m_convergenceOffset,this.m_progressTracker)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,4815,6061,8125],{24815:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>r.e,executeMany:()=>r.a,supportsCurves:()=>r.s}),n(96027),n(78125);var r=n(83587)},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>o});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class o extends r{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}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>G,fromGeometry:()=>C,fromMultipoint:()=>M,fromPoint:()=>v,fromPolygon:()=>V,fromPolyline:()=>w,fromSpatialReference:()=>P,getSpatialReference:()=>x,toExtent:()=>d,toGeometry:()=>R,toMultipoint:()=>Z,toPoint:()=>E,toPolygon:()=>_,toPolyline:()=>S});var r=n(83661),o=(n(79187),n(55537)),a=n(95213),s=n(35368),u=n(12189),i=n(5443),c=n(48526),l=n(86738),m=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",y=2,g=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function C(e){switch(e.type){case"point":return v(e);case"multipoint":return M(e);case"polyline":return w(e);case"polygon":return V(e);case"extent":return G(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function G(e){if(!e.getCacheValue(p)){const t=new a.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const t=new s.M,n=new a.P,r=e.points,o=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,a=r.length;e<a;e++){const a=r[e];n.setXYCoords(a[0],a[1]),u&&n.setZ(a[2]??0),o&&n.setM(a[i]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const t=new a.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:o}=e,a=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:o});e.setCacheValue(p,a)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:o}=e,a=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:o});e.setCacheValue(p,a)}return e.getCacheValue(p)}function P(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,4815,6061,8125],{24815:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>r.e,executeMany:()=>r.a,supportsCurves:()=>r.s}),n(96027),n(78125);var r=n(83587)},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>o});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class o extends r{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}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>G,fromGeometry:()=>C,fromMultipoint:()=>M,fromPoint:()=>v,fromPolygon:()=>V,fromPolyline:()=>w,fromSpatialReference:()=>P,getSpatialReference:()=>x,toExtent:()=>d,toGeometry:()=>R,toMultipoint:()=>Z,toPoint:()=>E,toPolygon:()=>_,toPolyline:()=>S});var r=n(83661),o=(n(79187),n(55537)),a=n(95213),s=n(35368),u=n(12189),i=n(5443),c=n(48526),l=n(86738),m=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",y=2,g=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function C(e){switch(e.type){case"point":return v(e);case"multipoint":return M(e);case"polyline":return w(e);case"polygon":return V(e);case"extent":return G(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function G(e){if(!e.getCacheValue(p)){const t=new a.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const t=new s.M,n=new a.P,r=e.points,o=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,a=r.length;e<a;e++){const a=r[e];n.setXYCoords(a[0],a[1]),u&&n.setZ(a[2]??0),o&&n.setM(a[i]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const t=new a.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:o}=e,a=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:o});e.setCacheValue(p,a)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:o}=e,a=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:o});e.setCacheValue(p,a)}return e.getCacheValue(p)}function P(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.a)(t):null}function R(e,t){if(e)switch(e.getGeometryType()){case o.G.enumPoint:return E(e,t);case o.G.enumEnvelope:return d(e,t);case o.G.enumMultiPoint:return Z(e,t);case o.G.enumPolyline:return S(e,t);case o.G.enumPolygon:return _(e,t)}return null}function d(e,t){if(e.isEmpty())return null;const n=new i.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(g,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function Z(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),o=n.hasZ(),s=[],u=new a.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];o&&n.push(u.getZ()),r&&n.push(u.getM()),s.push(n)}const i=new c.A({hasM:r,hasZ:o,points:s,spatialReference:t});return i.setCacheValue(p,e),i}function E(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),o=e.getDescription();return o.hasM()&&(n.m=e.getM()),o.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function _(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function S(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}},83587:(e,t,n)=>{n.d(t,{a:()=>s,c:()=>i,e:()=>a,s:()=>u});var r=n(96027),o=n(78125);function a(e,t){const n=(0,o.getSpatialReference)(e),a=(0,o.fromExtent)(t).asEnvelope2D();return(0,o.toGeometry)((0,r.g7)((0,o.fromGeometry)(e),a,(0,o.fromSpatialReference)(n)),n)}function s(e,t){const n=e.map(o.fromGeometry),a=(0,o.getSpatialReference)(e),s=(0,o.fromExtent)(t).asEnvelope2D();return(0,r.zo)(n,s,(0,o.fromSpatialReference)(a)).map((e=>(0,o.toGeometry)(e,a)))}const u=(0,r.fz)(),i=Object.freeze(Object.defineProperty({__proto__:null,execute:a,executeMany:s,supportsCurves:u},Symbol.toStringTag,{value:"Module"}))},96027:(e,t,n)=>{n.d(t,{fz:()=>u,g7:()=>a,zo:()=>s});var r=n(76061);const o=new(n(31139).O);function a(e,t,n){return o.execute(e,t,n,null)}function s(e,t,n){const a=o.executeMany(new r.S(e),t,n,null);return Array.from(a)}function u(){return o.supportsCurves()}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,3236,6061,8125],{65708:(e,t,n)=>{n.d(t,{a:()=>i,e:()=>s,s:()=>o});var r=n(83047),a=n(78125);function s(e,t={}){const{unit:n}=t;let s=(0,a.fromGeometry)(e).calculateArea2D();if(s&&n){const t=(0,a.getSpatialReference)(e);if(t.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const o=(0,r.B5)(t);o!==n&&(o?s=(0,r.oU)(s,o,n):(s=Math.sqrt(s),s*=(0,r.GA)(t),s**=2,s=(0,r.oU)(s,"square-meters",n)))}return s}const o=!0,i=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>a});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class a extends r{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}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>G,fromGeometry:()=>C,fromMultipoint:()=>M,fromPoint:()=>V,fromPolygon:()=>w,fromPolyline:()=>v,fromSpatialReference:()=>P,getSpatialReference:()=>x,toExtent:()=>R,toGeometry:()=>d,toMultipoint:()=>Z,toPoint:()=>_,toPolygon:()=>E,toPolyline:()=>k});var r=n(83661),a=(n(79187),n(55537)),s=n(95213),o=n(35368),i=n(12189),u=n(5443),c=n(48526),l=n(86738),m=n(39829),h=n(82799),f=(n(90293),n(83299));const p="_gxVersion",g=2,y=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function C(e){switch(e.type){case"point":return V(e);case"multipoint":return M(e);case"polyline":return v(e);case"polygon":return w(e);case"extent":return G(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function G(e){if(!e.getCacheValue(p)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(g,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const t=new o.M,n=new s.P,r=e.points,a=e.hasM,i=e.hasZ,u=i?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),i&&n.setZ(s[2]??0),a&&n.setM(s[u]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,s=(0,f.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,s=(0,f.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function P(e){if(e.wkid)return(0,i.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,i.
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,3236,6061,8125],{65708:(e,t,n)=>{n.d(t,{a:()=>i,e:()=>s,s:()=>o});var r=n(83047),a=n(78125);function s(e,t={}){const{unit:n}=t;let s=(0,a.fromGeometry)(e).calculateArea2D();if(s&&n){const t=(0,a.getSpatialReference)(e);if(t.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const o=(0,r.B5)(t);o!==n&&(o?s=(0,r.oU)(s,o,n):(s=Math.sqrt(s),s*=(0,r.GA)(t),s**=2,s=(0,r.oU)(s,"square-meters",n)))}return s}const o=!0,i=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>a});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class a extends r{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}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>G,fromGeometry:()=>C,fromMultipoint:()=>M,fromPoint:()=>V,fromPolygon:()=>w,fromPolyline:()=>v,fromSpatialReference:()=>P,getSpatialReference:()=>x,toExtent:()=>R,toGeometry:()=>d,toMultipoint:()=>Z,toPoint:()=>_,toPolygon:()=>E,toPolyline:()=>k});var r=n(83661),a=(n(79187),n(55537)),s=n(95213),o=n(35368),i=n(12189),u=n(5443),c=n(48526),l=n(86738),m=n(39829),h=n(82799),f=(n(90293),n(83299));const p="_gxVersion",g=2,y=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function C(e){switch(e.type){case"point":return V(e);case"multipoint":return M(e);case"polyline":return v(e);case"polygon":return w(e);case"extent":return G(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function G(e){if(!e.getCacheValue(p)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(g,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const t=new o.M,n=new s.P,r=e.points,a=e.hasM,i=e.hasZ,u=i?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),i&&n.setZ(s[2]??0),a&&n.setM(s[u]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,s=(0,f.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,s=(0,f.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function P(e){if(e.wkid)return(0,i.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,i.a)(t):null}function d(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return _(e,t);case a.G.enumEnvelope:return R(e,t);case a.G.enumMultiPoint:return Z(e,t);case a.G.enumPolyline:return k(e,t);case a.G.enumPolygon:return E(e,t)}return null}function R(e,t){if(e.isEmpty())return null;const n=new u.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(g,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(y,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function Z(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],i=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,i);const n=[i.getX(),i.getY()];a&&n.push(i.getZ()),r&&n.push(i.getM()),o.push(n)}const u=new c.A({hasM:r,hasZ:a,points:o,spatialReference:t});return u.setCacheValue(p,e),u}function _(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),a=e.getDescription();return a.hasM()&&(n.m=e.getM()),a.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function E(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,f.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function k(e,t){if(e.isEmpty())return null;const n=h.A.fromJSON({spatialReference:t,...(0,f.toGeometry)(e,null)});return n.setCacheValue(p,e),n}},95624:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>r.e,supportsCurves:()=>r.s}),n(83047),n(78125);var r=n(65708)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,6061,8125],{76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>s});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class s extends r{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}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>G,fromGeometry:()=>C,fromMultipoint:()=>M,fromPoint:()=>V,fromPolygon:()=>w,fromPolyline:()=>P,fromSpatialReference:()=>R,getSpatialReference:()=>x,toExtent:()=>v,toGeometry:()=>Z,toMultipoint:()=>d,toPoint:()=>k,toPolygon:()=>E,toPolyline:()=>_});var r=n(83661),s=(n(79187),n(55537)),a=n(95213),o=n(35368),i=n(12189),u=n(5443),c=n(48526),l=n(86738),m=n(39829),h=n(82799),f=(n(90293),n(83299));const g="_gxVersion",y=2,p=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function C(e){switch(e.type){case"point":return V(e);case"multipoint":return M(e);case"polyline":return P(e);case"polygon":return w(e);case"extent":return G(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function G(e){if(!e.getCacheValue(g)){const t=new a.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(p,0,e.zmin,e.zmax),e.setCacheValue(g,t)}return e.getCacheValue(g)}function M(e){if(!e.getCacheValue(g)){const t=new o.M,n=new a.P,r=e.points,s=e.hasM,i=e.hasZ,u=i?3:2;for(let e=0,a=r.length;e<a;e++){const a=r[e];n.setXYCoords(a[0],a[1]),i&&n.setZ(a[2]??0),s&&n.setM(a[u]??NaN),t.add(n)}e.setCacheValue(g,t)}return e.getCacheValue(g)}function V(e){if(!e.getCacheValue(g)){const t=new a.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(g,t)}return e.getCacheValue(g)}function w(e){if(!e.getCacheValue(g)){const{curveRings:t,hasM:n,hasZ:r,rings:s}=e,a=(0,f.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(g,a)}return e.getCacheValue(g)}function P(e){if(!e.getCacheValue(g)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,a=(0,f.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(g,a)}return e.getCacheValue(g)}function R(e){if(e.wkid)return(0,i.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,i.
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,6061,8125],{76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>s});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class s extends r{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}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>G,fromGeometry:()=>C,fromMultipoint:()=>M,fromPoint:()=>V,fromPolygon:()=>w,fromPolyline:()=>P,fromSpatialReference:()=>R,getSpatialReference:()=>x,toExtent:()=>v,toGeometry:()=>Z,toMultipoint:()=>d,toPoint:()=>k,toPolygon:()=>E,toPolyline:()=>_});var r=n(83661),s=(n(79187),n(55537)),a=n(95213),o=n(35368),i=n(12189),u=n(5443),c=n(48526),l=n(86738),m=n(39829),h=n(82799),f=(n(90293),n(83299));const g="_gxVersion",y=2,p=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function C(e){switch(e.type){case"point":return V(e);case"multipoint":return M(e);case"polyline":return P(e);case"polygon":return w(e);case"extent":return G(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function G(e){if(!e.getCacheValue(g)){const t=new a.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(p,0,e.zmin,e.zmax),e.setCacheValue(g,t)}return e.getCacheValue(g)}function M(e){if(!e.getCacheValue(g)){const t=new o.M,n=new a.P,r=e.points,s=e.hasM,i=e.hasZ,u=i?3:2;for(let e=0,a=r.length;e<a;e++){const a=r[e];n.setXYCoords(a[0],a[1]),i&&n.setZ(a[2]??0),s&&n.setM(a[u]??NaN),t.add(n)}e.setCacheValue(g,t)}return e.getCacheValue(g)}function V(e){if(!e.getCacheValue(g)){const t=new a.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(g,t)}return e.getCacheValue(g)}function w(e){if(!e.getCacheValue(g)){const{curveRings:t,hasM:n,hasZ:r,rings:s}=e,a=(0,f.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(g,a)}return e.getCacheValue(g)}function P(e){if(!e.getCacheValue(g)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,a=(0,f.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(g,a)}return e.getCacheValue(g)}function R(e){if(e.wkid)return(0,i.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,i.a)(t):null}function Z(e,t){if(e)switch(e.getGeometryType()){case s.G.enumPoint:return k(e,t);case s.G.enumEnvelope:return v(e,t);case s.G.enumMultiPoint:return d(e,t);case s.G.enumPolyline:return _(e,t);case s.G.enumPolygon:return E(e,t)}return null}function v(e,t){if(e.isEmpty())return null;const n=new u.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(p,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(g,e),n}function d(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),s=n.hasZ(),o=[],i=new a.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,i);const n=[i.getX(),i.getY()];s&&n.push(i.getZ()),r&&n.push(i.getM()),o.push(n)}const u=new c.A({hasM:r,hasZ:s,points:o,spatialReference:t});return u.setCacheValue(g,e),u}function k(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(n.m=e.getM()),s.hasZ()&&(n.z=e.getZ()),n.setCacheValue(g,e),n}function E(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,f.toGeometry)(e,null)});return n.setCacheValue(g,e),n}function _(e,t){if(e.isEmpty())return null;const n=h.A.fromJSON({spatialReference:t,...(0,f.toGeometry)(e,null)});return n.setCacheValue(g,e),n}}}]);
|