@arcgis/core 4.33.0-next.20250303 → 4.33.0-next.20250305

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{b49af2e3a1a38a063ab9.js → 1bd4fe77ba6fb25322e7.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{2f818b9a6b1f2b61410d.js → 1e7a70a1871fea29169e.js} +27 -27
  4. package/assets/esri/core/workers/chunks/{3ebdd0701e77bb28c75d.js → 2079f9d28e4199714f22.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{0fd6a78b38b0e2dae8a5.js → 237a965bd41ba8903e03.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{618016fc1165bcfc2b0d.js → 42b862550c96cc1be956.js} +7 -9
  7. package/assets/esri/core/workers/chunks/4403b3f08907e88d0d91.js +1 -0
  8. package/assets/esri/core/workers/chunks/{4dbd4523281691401272.js → 4539a802cba77a7a7cc7.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{0e2d9cd4e8ee5a62b05c.js → 45eee326f7a649c5a15b.js} +7 -9
  10. package/assets/esri/core/workers/chunks/{99f90d085aa9eb13e4fb.js → 46fb6ba8900286d18b6f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{2a44a6e75b2799246257.js → 4fb4884d2de42792abe3.js} +1 -1
  12. package/assets/esri/core/workers/chunks/5295e685ae839087c568.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d60da671aba70485050e.js → 6e6422eda398774acbc7.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{c9cb8a6ff01275bec713.js → 77845cd5d824c1004bfa.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{a73a262ddc959a59819f.js → 7d3b2bdc75525d47389c.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{cc1aedb2b3aa3854b0de.js → 901c957c049f53318e87.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{654fe135d41af81daa13.js → 909be86782af3deb448e.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{7d93ff4f18fd21c7b9f2.js → 94f41ef15f6c61562e5e.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{8540fb31bd0b29ff1906.js → 968956284f44187f0622.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{92b48e3365d1cc933113.js → 96d2a0777f5c418055fb.js} +1 -1
  21. package/assets/esri/core/workers/chunks/988efc508c33ca341e49.js +1 -0
  22. package/assets/esri/core/workers/chunks/{56db71ea7eb8a5652d98.js → abfc5f9ac16c3e885c5f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{856b03020b2dd047291d.js → ad9b3b83aa96db7b79ea.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{c3b2b05996e2008adbe3.js → afddb94ff4e1a70022c7.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{c409bb2acd846d3b1395.js → b2f9f0767dadf185120c.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{563594357f3648652a5c.js → ba917175ca2a6681501e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/c03e6e35082beaec02a6.js +1 -0
  28. package/assets/esri/core/workers/chunks/{759781cad91d31ab7bc4.js → db4c110ab4c26c4b768c.js} +1 -1
  29. package/assets/esri/core/workers/chunks/dcb043986fb065de0366.js +1 -0
  30. package/assets/esri/core/workers/chunks/{05c80002c37002ac99e8.js → de16b771d2c8d816c738.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{3010a22d00f45fce5939.js → e0ac90b4ad8c36fb7d70.js} +1 -1
  32. package/assets/esri/core/workers/chunks/e3e049311bced533c853.js +1 -0
  33. package/assets/esri/core/workers/chunks/{5719471414810b6a9aec.js → e56647e61296643c5f84.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{1bc22af4cc4effcbcf2b.js → e6a5911ea21bef32834b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/f4111bb5e5a4910b684a.js +1 -0
  36. package/assets/esri/core/workers/chunks/{12d798775a96a45aada2.js → f46c4a69ef2f763e905b.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{5e80e10b7c7e66dd861e.js → febae745a29a17ca130a.js} +1 -1
  38. package/chunks/Bufferer-CicaNej1.js +1 -1
  39. package/chunks/Clouds.glsl.js +19 -23
  40. package/chunks/DefaultMaterial.glsl.js +22 -22
  41. package/chunks/Distance2DCalculator-C1KHhZwD.js +1 -1
  42. package/chunks/Envelope.js +1 -1
  43. package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +1 -1
  44. package/chunks/ImageMaterial.glsl.js +1 -1
  45. package/chunks/OperatorClip.js +1 -1
  46. package/chunks/OperatorCut.js +1 -1
  47. package/chunks/OperatorGeodesicBuffer.js +1 -1
  48. package/chunks/OperatorGeodeticArea.js +1 -1
  49. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  50. package/chunks/OperatorProximity.js +1 -1
  51. package/chunks/OperatorShapePreservingProject.js +1 -1
  52. package/chunks/ProjectionTransformation.js +1 -1
  53. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  54. package/chunks/disjointOperator.js +1 -1
  55. package/core/Accessor.js +1 -1
  56. package/core/accessorSupport/decorators/subclass.js +1 -1
  57. package/core/accessorSupport/interfaces.js +1 -1
  58. package/core/arrayUtils.js +1 -1
  59. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  60. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  61. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +5 -0
  62. package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +5 -0
  63. package/geometry/operators/extendOperator.js +1 -1
  64. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  65. package/geometry/operators/gx/operatorBuffer.js +1 -1
  66. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  67. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  68. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  69. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  70. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  71. package/geometry/operators/gx/operatorSimplify.js +1 -1
  72. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  73. package/geometry/operators/gx/operatorUnion.js +1 -1
  74. package/geometry/operators/json/disjointOperator.js +1 -1
  75. package/geometry/operators/reshapeOperator.js +1 -1
  76. package/geometry/operators/support/apiConverter.js +1 -1
  77. package/geometry/operators/support/initNoPeFactory.js +1 -1
  78. package/geometry/operators/support/jsonConverter.js +1 -1
  79. package/interfaces.d.ts +20 -18
  80. package/layers/WMTSLayer.js +1 -1
  81. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  82. package/layers/graphics/dehydratedFeatures.js +1 -1
  83. package/layers/mixins/ArcGISImageService.js +1 -1
  84. package/layers/support/SubtypeSublayer.js +1 -1
  85. package/layers/support/featureLayerUtils.js +1 -1
  86. package/layers/support/wmtsUtils.js +1 -1
  87. package/package.json +1 -1
  88. package/request.js +1 -1
  89. package/rest/support/IdentifyParameters.js +1 -1
  90. package/support/revision.js +1 -1
  91. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  92. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  93. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  94. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  95. package/views/3d/environment/Clouds.glsl.js +1 -1
  96. package/views/3d/environment/CloudsParameters.js +1 -1
  97. package/views/3d/environment/CloudsRenderer.js +1 -1
  98. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  99. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  100. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  101. package/views/3d/layers/I3SMeshView3D.js +1 -1
  102. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  103. package/views/3d/layers/MediaLayerView3D.js +1 -1
  104. package/views/3d/layers/SceneLayerView3D.js +1 -1
  105. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  106. package/views/3d/layers/support/FeatureTile.js +1 -1
  107. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  108. package/views/3d/layers/support/FeatureTileFetcher3DDebugger.js +1 -1
  109. package/views/3d/layers/support/projectExtentUtils.js +1 -1
  110. package/views/3d/support/StreamTextureCollection.js +1 -1
  111. package/views/3d/support/TextureCollection.js +1 -1
  112. package/views/3d/terrain/TerrainRenderer.js +1 -1
  113. package/views/3d/terrain/TerrainSurface.js +1 -1
  114. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +7 -7
  115. package/views/3d/webgl-engine/core/shaderLibrary/util/DoublePrecision.glsl.js +5 -7
  116. package/views/3d/webgl-engine/core/shaderLibrary/util/LookupCloudsFromTextureArray.glsl.js +51 -0
  117. package/views/3d/webgl-engine/lib/GLMaterialParameters.js +5 -0
  118. package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
  119. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  120. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  121. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  122. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  123. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  124. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  125. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  126. package/views/View.js +1 -1
  127. package/views/animation/pointToPoint/apex/planning.js +1 -1
  128. package/views/support/LayerLayerViewInfo.js +5 -0
  129. package/views/support/LayerViewManager.js +5 -0
  130. package/views/webgl/FramebufferObject.js +1 -1
  131. package/views/webgl/TextureDescriptor.js +1 -1
  132. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  133. package/widgets/Editor/Edits.js +1 -1
  134. package/widgets/Editor/workflowUtils.js +1 -1
  135. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  136. package/widgets/Feature/FeatureRelationship.js +1 -1
  137. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  138. package/widgets/Feature/support/featureUtils.js +1 -1
  139. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  140. package/widgets/FeatureForm/FieldInput.js +1 -1
  141. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  142. package/widgets/Features/FeaturesDrillIn.js +1 -1
  143. package/widgets/Features/FeaturesViewModel.js +1 -1
  144. package/widgets/Features.js +1 -1
  145. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  146. package/widgets/UtilityNetworkTraceAnalysis/UtilityNetworkTraceAnalysisViewModel.js +1 -1
  147. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  148. package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +1 -1
  149. package/assets/esri/core/workers/chunks/0e6d338b0937724763c7.js +0 -1
  150. package/assets/esri/core/workers/chunks/10118666a5a5b141ece6.js +0 -1
  151. package/assets/esri/core/workers/chunks/64d3e683872791eb6ae9.js +0 -1
  152. package/assets/esri/core/workers/chunks/7d120f8b01fe719eb257.js +0 -1
  153. package/assets/esri/core/workers/chunks/95047f145ebda65c3d8e.js +0 -1
  154. package/assets/esri/core/workers/chunks/960b12a6fd5b6933212f.js +0 -1
  155. package/assets/esri/core/workers/chunks/af005704f23088db3ded.js +0 -1
  156. package/editing/sharedTemplates/executor/support/createServiceEdit.js +0 -5
  157. package/views/3d/webgl-engine/core/shaderLibrary/util/LookupCubemapFromTextureArray.glsl.js +0 -39
  158. package/views/LayerViewManager.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2741],{926:(e,r,t)=>{t.d(r,{Jn:()=>i});var s=t(92602),n=t(84952);const o=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]);function a(e){const r=(0,n.$z)(e,!0);return!!r&&r.endsWith(".arcgis.com")&&!o.has(r)&&!e.endsWith("/sharing/rest/generateToken")}function i(e,r){return!(!r&&!s.A.apiKey||!a(e))}},2741:(e,r,t)=>{t.d(r,{s:()=>i});var s=t(92602),n=(t(78888),t(49186)),o=t(53966),a=t(84952);function i(e){if(!s.A.assetsPath)throw o.A.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.A("assets:path-not-set","config.assetsPath is not set");return(0,a.fj)(s.A.assetsPath,e)}},56058:(e,r,t)=>{t.d(r,{Sx:()=>i,c8:()=>d,m3:()=>f,ql:()=>u,tz:()=>p,xW:()=>h});var s=t(92602),n=t(44208),o=t(74887),a=t(84952);function i(e,r,t=!1,s){return new Promise(((a,i)=>{if((0,o.G4)(s))return void i(l());let c=()=>{p(),i(new Error(`Unable to load ${r}`))},u=()=>{const r=e;p(),a(r)},d=()=>{if(!e)return;const r=e;p(),r.src="",i(l())};const p=()=>{(0,n.A)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",u)),c=null,u=null,e=null,null!=s&&s.removeEventListener("abort",d),d=null,t&&URL.revokeObjectURL(r)};null!=s&&s.addEventListener("abort",d),(0,n.A)("esri-image-decode")?e.decode().then(u,c):(e.addEventListener("error",c),e.addEventListener("load",u))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const c="Timeout exceeded";function u(){return new Error(c)}function d(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===c}function p(e){s.A.request.crossOriginNoCorsDomains||(s.A.request.crossOriginNoCorsDomains={});const r=s.A.request.crossOriginNoCorsDomains;for(let t of e)t=t.toLowerCase(),/^https?:\/\//.test(t)?r[(0,a.$z)(t)??""]=0:(r[(0,a.$z)("http://"+t)??""]=0,r[(0,a.$z)("https://"+t)??""]=0)}function h(e){const r=s.A.request.crossOriginNoCorsDomains;if(r){let t=(0,a.$z)(e);if(t)return t=t.toLowerCase(),!(0,a.FX)(t,(0,a.Xq)())&&r[t]<Date.now()-36e5}return!1}async function f(e){const r=(0,a.An)(e);e=r.path,"json"===r.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}const t=s.A.request.crossOriginNoCorsDomains,n=(0,a.$z)(e);t&&n&&(t[n.toLowerCase()]=Date.now())}},60694:(e,r,t)=>{t.d(r,{Fi:()=>u,HZ:()=>w,Jf:()=>g,LS:()=>y,Wo:()=>m,bd:()=>v,cr:()=>h,iz:()=>p,qg:()=>d,yG:()=>f});var s=t(84952),n=t(97159);const o={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},a=Object.values(o),i=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function u(e){return i.test(e)}function d(e){if(null==e)return null;const r=(0,s.An)(e),t=r?.path.match(i)||r?.path.match(l);if(!t)return null;const[,n,a,c,u]=t,d=a.indexOf("/");return{title:h(-1!==d?a.slice(d+1):a),serverType:o[c.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:n}}}function p(e){const r=(0,s.An)(e).path.match(c);return r?{serviceUrl:r[1],sublayerId:Number(r[2])}:null}function h(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,r){const t=[];if(e){const r=d(e);null!=r&&r.title&&t.push(r.title)}if(r){const e=h(r);t.push(e)}if(2===t.length){if(t[0].toLowerCase().includes(t[1].toLowerCase()))return t[0];if(t[1].toLowerCase().includes(t[0].toLowerCase()))return t[1]}return t.join(" - ")}function m(e){let r=(0,s.$z)(e,!0);return!!r&&(r=r.toLowerCase(),r.endsWith(".arcgis.com")&&(r.startsWith("services")||r.startsWith("tiles")||r.startsWith("features")))}function g(e,r){return e?(0,s.UC)((0,s.zi)(e,r)):e}function w(e){let{url:r}=e;if(!r)return{url:r};r=(0,s.zi)(r,e.logger);const t=(0,s.An)(r),n=d(t.path);let o;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(o=n.sublayer),r=n.url.path;else if(e.nonStandardUrlAllowed){const e=p(t.path);null!=e&&(r=e.serviceUrl,o=e.sublayerId)}return{url:(0,s.UC)(r),layerId:o}}function y(e,r,t,o,a){(0,n.w)(r,o,"url",a),o.url&&null!=e.layerId&&(o.url=(0,s.fj)(o.url,t,e.layerId.toString()))}function v(e){if(!e)return!1;const r=e.toLowerCase(),t=r.includes("/services/"),s=r.includes("/mapserver/wmsserver"),n=r.includes("/imageserver/wmsserver"),o=r.includes("/wmsserver");return t&&(s||n||o)}},78888:(e,r,t)=>{t.d(r,{A:()=>m});var s=t(92602),n=t(70333),o=t(49186),a=t(44208),i=t(4718),l=t(91869),c=t(74887),u=t(84952),d=t(60694),p=t(39131),h=t(926),f=t(56058);async function m(e,r){e instanceof URL&&(e=e.toString()),r?.query instanceof URLSearchParams&&(r.query=(0,u.zf)(r.query.toString().replaceAll("+"," ")));const s=(0,u.DB)(e),n=(0,u.w8)(e);n||s||(e=(0,u.S8)(e));const o={url:e,requestOptions:{...r}},i=e=>({data:e,getAllHeaders:S,getHeader:S,httpStatus:200,requestOptions:o.requestOptions,url:o.url}),p=(0,u.sC)(e,w.internalInterceptors);if(p){const e=await L(p,o);if(null!=e)return i(e)}let h=(0,u.sC)(e);if(h){const e=await L(h,o);if(null!=e)return i(e);h.after||h.error||(h=null)}if(e=o.url,"image"===(r=o.requestOptions).responseType&&((0,a.A)("host-webworker")||(0,a.A)("host-node")))throw x("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),o);if("head"===r.method){if(r.body)throw x("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),o);if(s||n)throw x("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),o)}if(await async function(){(0,a.A)("host-webworker")&&!g&&(g=await t.e(369).then(t.bind(t,40369)))}(),g)return g.execute(e,r);const f=new AbortController,m=(0,c.u7)(r,(()=>f.abort())),y={controller:f,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:h,params:o,redoRequest:!1,useIdentity:w.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},v=r.useRequestQueue?async function(e){const r=function(e){let r,t;return"string"==typeof e?(r=(0,u.$z)(e,!0),t=(0,d.Wo)(e)):(r=e.origin,t=(0,d.Wo)(e.toString())),null==r?null:{origin:r,isHosted:t}}(e.params.url);if(!r)return P(e);const{QueueProcessor:s}=await t.e(563).then(t.bind(t,563)),n=(0,l.tE)(U,r.origin,(()=>{const e=r.isHosted?(0,a.A)("request-queue-concurrency-hosted"):(0,a.A)("request-queue-concurrency-non-hosted");return new s({concurrency:e,process:e=>{if((0,c.G4)(e.params.requestOptions))throw x("",(0,c.NK)("Request canceled"),e.params);return P(e)}})}));return n.push(e)}(y):P(y),b=await v.finally((()=>m?.remove()));return h?.after?.(b),b}let g;const w=s.A.request,y="FormData"in globalThis,v=new Set([499,498,403,401]),b=new Set(["COM_0056","COM_0057","SB_0008"]),q=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],S=()=>null,C=Symbol();function O(e){const r=(0,u.$z)(e);return!r||r.endsWith(".arcgis.com")||m._corsServers.includes(r)||(0,u.FL)(r)}function x(e,r,t,s){let n;const a={url:t.url,requestOptions:t.requestOptions,getAllHeaders:S,getHeader:S,ssl:!1};if(r instanceof o.A)return r.details?(r.details=(0,i.o8)(r.details),r.details.url=t.url,r.details.requestOptions=t.requestOptions):r.details=a,r;if(r){const e=s&&(()=>Array.from(s.headers)),t=s&&(e=>s.headers.get(e)),o=s?.status,i=r.message;i&&(n=i),e&&t&&(a.getAllHeaders=e,a.getHeader=t),a.httpStatus=(null!=r.httpCode?r.httpCode:r.code)||o||0,a.subCode=r.subcode,a.messageCode=r.messageCode,"string"==typeof r.details?(a.messages=[r.details],n??=r.details):(a.messages=r.details,n??=a.messages?.[0]),a.raw=C in r?r[C]:r}return n??="Error",(0,c.zf)(r)?(0,c.NK)():new o.A(e,n,a)}async function A(){n.id||await Promise.all([t.e(6285),t.e(7292),t.e(7112)]).then(t.bind(t,67112))}function T(e){return q.some((r=>r.test(e)))}async function k(e){let r=e.params.url;const t=e.params.requestOptions,s=e.fetchOptions??{},o=(0,u.w8)(r)||(0,u.DB)(r),i=t.responseType||"json",l=o?0:null!=t.timeout?t.timeout:w.timeout;let d=!1;if(!o){e.useSSL&&(r=(0,u.lM)(r));let o={...t.query};e.credentialToken&&(o.token=e.credentialToken);let i=(0,u.x0)(o);(0,a.A)("esri-url-encodes-apostrophe")&&(i=i.replaceAll("'","%27"));const l=r.length+1+i.length;let c;d="delete"===t.method||"post"===t.method||"put"===t.method||!!t.body||l>w.maxUrlLength;const h=t.useProxy||!!(0,u.zs)(r);if(h){const e=(0,u.s_)(r);c=e.path,!d&&c.length+1+l>w.maxUrlLength&&(d=!0),e.query&&(o={...e.query,...o})}if("HEAD"===s.method&&(d||h)){if(d){if(l>w.maxUrlLength)throw x("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw x("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(h)throw x("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(d?(s.method="delete"===t.method?"DELETE":"put"===t.method?"PUT":"POST",t.body?r=(0,u.a6)(r,o):(s.body=(0,u.x0)(o),s.headers||(s.headers={}),s.headers["Content-Type"]="application/x-www-form-urlencoded")):r=(0,u.a6)(r,o),h&&(e.useProxy=!0,r=`${c}?${r}`),o.token&&y&&s.body instanceof FormData&&!(0,p.$E)(r)&&s.body.set("token",o.token),t.hasOwnProperty("withCredentials"))e.withCredentials=t.withCredentials;else if(!(0,u.FX)(r,(0,u.Xq)()))if((0,u.FL)(r))e.withCredentials=!0;else if(n.id){const t=n.id.findServerInfo(r);t?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(s.credentials="include",(0,f.xW)(r)&&await(0,f.m3)(d?(0,u.a6)(r,o):r))}let h,g,v=0,b=!1;l>0&&(v=setTimeout((()=>{b=!0,e.controller.abort()}),l));try{if("native-request-init"===t.responseType)g=s,g.url=r,t.signal?g.signal=t.signal:delete g.signal;else if("image"!==t.responseType||"default"!==s.cache||"GET"!==s.method||d||function(e){if(e)for(const r of Object.getOwnPropertyNames(e))if(e[r])return!0;return!1}(t.headers)||!o&&!e.useProxy&&w.proxyUrl&&!O(r)){if(m._beforeFetch&&await m._beforeFetch(r,s),h=await fetch(r,s),m._afterFetch&&await m._afterFetch(h),e.useProxy||function(e){const r=(0,u.$z)(e);r&&!m._corsServers.includes(r)&&m._corsServers.push(r)}(r),"native"===t.responseType)g=h;else if("HEAD"!==s.method)if(h.ok){switch(i){case"array-buffer":g=await h.arrayBuffer();break;case"blob":case"image":g=await h.blob();break;default:g=await h.text()}if(v&&(clearTimeout(v),v=0),"json"===i||"xml"===i||"document"===i)if(g)switch(i){case"json":g=JSON.parse(g);break;case"xml":g=E(g,"application/xml");break;case"document":g=E(g,"text/html")}else g=null;if(g){if("array-buffer"===i||"blob"===i){const e=h.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&g["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(g).json();e.error&&(g=e)}catch{}}"image"===i&&g instanceof Blob&&(g=await R(URL.createObjectURL(g),e,!0))}}else{g=await h.text();try{g=JSON.parse(g)}catch{}}}else g=await R(r,e)}catch(s){if("AbortError"===s.name){if(b)throw(0,f.ql)();throw(0,c.NK)("Request canceled")}if(!(!h&&s instanceof TypeError&&w.proxyUrl)||t.body||"delete"===t.method||"head"===t.method||"post"===t.method||"put"===t.method||e.useProxy||O(r))throw s;e.redoRequest=!0,(0,u.oy)({proxyUrl:w.proxyUrl,urlPrefix:(0,u.$z)(r)??""})}finally{v&&clearTimeout(v)}return[h,g]}async function L(e,r){if(null!=e.responseData)return e.responseData;if(e.headers&&(r.requestOptions.headers={...r.requestOptions.headers,...e.headers}),e.query&&(r.requestOptions.query={...r.requestOptions.query,...e.query}),e.before){let t,s;try{s=await e.before(r)}catch(e){t=x("request:interceptor",e,r)}if((s instanceof Error||s instanceof o.A)&&(t=x("request:interceptor",s,r)),t)throw e.error&&e.error(t),t;return s}}function E(e,r){let t;try{t=(new DOMParser).parseFromString(e,r)}catch{}if(!t||t.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return t}m._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"],m._beforeFetch=void 0,m._afterFetch=void 0;const U=new Map;async function P(e){let r,t;await async function(e){const r=e.params.url,t=e.params.requestOptions,o=e.controller.signal,a=t.body;let i=null,l=null;if(y&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(i=new FormData(a))),"string"==typeof a&&(l=a),e.fetchOptions={cache:t.cacheBust?"no-cache":"default",credentials:"same-origin",headers:t.headers||{},method:"head"===t.method?"HEAD":"GET",mode:"cors",priority:w.priority,redirect:"follow",signal:o},(i||l)&&(e.fetchOptions.body=i||l),"anonymous"===t.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(r)||t.query?.token||i?.get("token")),!e.hasToken&&(0,h.Jn)(r)&&(t.query||(t.query={}),t.query.token=s.A.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!T(r)&&!(0,c.G4)(o)){let s;"immediate"===t.authMode?(await A(),s=await n.id.getCredential(r,{signal:o}),e.credential=s):"no-prompt"===t.authMode?(await A(),s=await n.id.getCredential(r,{prompt:!1,signal:o}).catch((()=>{})),e.credential=s):n.id&&(s=n.id.findCredential(r)),s&&(e.credentialToken=s.token,e.useSSL=!!s.ssl)}}(e);try{do{[r,t]=await k(e)}while(!await I(e,r,t))}catch(t){const s=x("request:server",t,e.params,r);throw s.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(s),s}const o=e.params.url;if(t&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)){if(!e.hasToken&&!e.credentialToken&&t.user?.username&&!(0,u.FL)(o)){const e=(0,u.$z)(o,!0);e&&w.trustedServers.push(e)}Array.isArray(t.authorizedCrossOriginNoCorsDomains)&&(0,f.tz)(t.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&n.id){const e=n.id.findServerInfo(a.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=n.id.findCredential(r,a.userId);e&&-1===n.id._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:t,getAllHeaders:r?()=>Array.from(r.headers):S,getHeader:r?e=>r.headers.get(e):S,httpStatus:r?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function I(e,r,t){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!r||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let o,a;if(t&&(t.error&&"object"==typeof t.error?o=t.error:"error"===t.status&&Array.isArray(t.messages)&&(o={...t},o[C]=t,o.details=t.messages)),!o&&!r.ok)throw o=new Error(`Unable to load ${r.url} status: ${r.status}`),o[C]=t,o;let i,l=null;o&&(a=Number(o.code),l=o.hasOwnProperty("subcode")?Number(o.subcode):null,i=o.messageCode,i=i?.toUpperCase());const c=s.authMode;if(403===a&&(4===l||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&v.has(a)&&!T(e.params.url)&&(403!==a||(!i||!b.has(i))&&(null==l||2===l&&e.credentialToken))){await A();try{const r=await n.id.getCredential(e.params.url,{error:x("request:server",o,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(r){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;o=r}}if(o)throw o;return!0}function R(e,r,t=!1){const s=r.controller.signal,n=new Image;return r.withCredentials?n.crossOrigin="use-credentials":n.crossOrigin="anonymous",n.alt="",n.fetchPriority=w.priority,n.src=e,(0,f.Sx)(n,e,t,s)}},97159:(e,r,t)=>{t.d(r,{M:()=>y,a:()=>g,b:()=>b,e:()=>f,f:()=>a,i:()=>p,p:()=>h,r:()=>l,t:()=>i,w:()=>c});var s=t(70333),n=t(84952),o=t(39131);function a(e,r){const t=r?.url?.path;if(e&&t&&(e=(0,n.s2)(e,t,{preserveProtocolRelative:!0}),r.portalItem&&r.readResourcePaths)){const t=(0,n.V1)(e,r.portalItem.itemUrl);null!=t&&d.test(t)&&r.readResourcePaths.push(r.portalItem.resourceFromPath(t).path)}return(e=m(e,r?.portal))&&u.test(e)?g(e):e}function i(e,r,t=y.YES){if(null==(e=e&&u.test(e)?w(e):e))return e;!(0,n.oP)(e)&&r?.blockedRelativeUrls&&r.blockedRelativeUrls.push(e);let s=(0,n.s2)(e);if(r){const t=r.verifyItemRelativeUrls?.rootPath||r.url?.path;if(t){const o=m(t,r.portal),a=m(s,r.portal);s=(0,n.V1)(a,o,o),null!=s&&s!==a&&s!==e&&r.verifyItemRelativeUrls&&r.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=f(s,r?.portal),(0,n.oP)(s)&&(s=(0,n.S8)(s)),r?.resources&&r?.portalItem&&!(0,n.oP)(s)&&!(0,n.DB)(s)&&t===y.YES&&r.resources.toKeep.push({resource:r.portalItem.resourceFromPath(s),compress:!1}),s}function l(e,r,t){return a(e,t)}function c(e,r,t,s){const n=i(e,s);void 0!==n&&(r[t]=n)}const u=/\/items\/([^/]+)\/resources\/(.*)/,d=/^\.\/resources\//;function p(e){const r=e?.match(u)??null;return r?.[1]??null}function h(e){const r=e?.match(u)??null;if(null==r)return null;const t=r[2],s=t.lastIndexOf("/");if(-1===s){const{path:e,extension:r}=(0,n.xw)(t);return{prefix:null,filename:e,extension:r}}const{path:o,extension:a}=(0,n.xw)(t.slice(s+1));return{prefix:t.slice(0,s),filename:o,extension:a}}function f(e,r){return r&&!r.isPortal&&r.urlKey&&r.customBaseUrl?(0,n.T1)(e,`${r.urlKey}.${r.customBaseUrl}`,r.portalHostname):e}function m(e,r){if(!r||r.isPortal||!r.urlKey||!r.customBaseUrl)return e;const t=`${r.urlKey}.${r.customBaseUrl}`,s=(0,n.Xq)();return(0,n.FX)(s,`${s.scheme}://${t}`)?(0,n.T1)(e,r.portalHostname,t):(0,n.T1)(e,t,r.portalHostname)}function g(e){if(!e)return e||null;let r=e;return r&&s.id&&!s.id.findCredential(r)&&(r=(0,o.qG)(r),r=r.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),r=r.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),r=r.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),r}function w(e){if(!e)return e||null;let r=e;return r=r.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),r=r.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),r=r.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),r&&s.id&&!s.id.findCredential(r)&&(r=(0,o.qG)(r)),r}var y,v;(v=y||(y={}))[v.YES=0]="YES",v[v.NO=1]="NO";const b=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return y},ensureMainOnlineDomain:f,fromCDNUrl:w,fromJSON:a,itemIdFromResourceUrl:p,prefixAndFilenameFromResourceUrl:h,read:l,toCDNUrl:g,toJSON:i,write:c},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -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.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}}}]);
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.b)(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}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2657,3169,6061,8125],{15546:(e,t,n)=>{n.d(t,{a:()=>s,c:()=>o});var r=n(55537),a=n(83661);function o(e,t){if(!e.isEmpty())switch(e.getGeometryType()){case r.G.enumPolygon:return u(e);case r.G.enumPolyline:return m(e.getImpl());case r.G.enumLine:case r.G.enumBezier:case r.G.enumEllipticArc:return function(e){const t=e.calculateLength2D();return 0===t?e.getStartXY():e.calculateWeightedCentroid2D().mul(1/t)}(e);case r.G.enumMultiPoint:return function(e){const t=new a.K(0),n=new a.K(0),r=e.getImpl(),o=r.getAttributeStreamRef(0),s=r.getPointCount(),u=new a.P;for(let e=0;e<s;e++)o.queryPoint2D(2*e,u),t.add(u.x),n.add(u.y);const c=new a.P;return c.setCoords(t.getResult(),n.getResult()),c.divThis(s)}(e);case r.G.enumEnvelope:return e.getCenterXY();case r.G.enumPoint:return e.getXY();default:return a.P.construct(Number.NaN,Number.NaN)}return a.P.construct(Number.NaN,Number.NaN)}function s(e,t){return u(e,t)}function u(e,t=-1){const n=new a.K(0),r=new a.K(0),o=e.getImpl();let s;const u=o.hasNonLinearSegments();let m;const g=o.getXY(0);if(-1===t){if(m=o.calculateArea2D(),0===m)return l(e);u&&(s=o.querySegmentIterator());for(let e=0,t=o.getPathCount();e<t;e++)c(g,o,e,n,r),u&&i(g,s,n,r)}else{if(m=o.calculateRingArea2D(t),0===m)return l(e,t);u&&(s=o.querySegmentIterator(),s.resetToPath(t)),c(g,o,t,n,r),u&&i(g,s,n,r)}const h=new a.P,f=new a.P;return h.setCoords(n.getResult(),r.getResult()),f.assign(h.mul(1/m).add(g)),f}function c(e,t,n,r,o){const s=t.getPathStart(n),u=t.getPathEnd(n);if(u-s<3)return;const c=t.getAttributeStreamRef(0),i=c.readPoint2D(2*s),l=c.readPoint2D(2*(s+1));l.subThis(i);const m=new a.K(0),g=t.hasNonLinearSegments(),h=1/3,f=new a.P;for(let e=s+2;e<u;e++){c.queryPoint2D(2*e,f),f.subThis(i);const t=.5*f.crossProduct(l);g&&m.add(t);const n=h*t;r.add((l.x+f.x)*n),o.add((l.y+f.y)*n),l.setCoordsPoint2D(f)}const d=g?m.getResult():t.calculateRingArea2D(n),y=i.sub(e).mul(d);r.add(y.x),o.add(y.y)}function i(e,t,n,a){let o;for(t.nextPath()||(0,r.c)("centroid");null!==(o=t.nextCurve());){const t=o.calculateWeightedAreaCentroid2D(e);n.add(t.x),a.add(t.y)}}function l(e,t=-1){return m(e.getImpl(),t)}function m(e,t=-1){const n=-1===t?e.calculateLength2D():e.calculatePathLength2D(t);if(0===n)return function(e,t=-1){if(-1!==t)return e.getXY(e.getPathStart(t));const n=new a.K(0),r=new a.K(0);for(let t=0;t<e.getPathCount();++t){const a=e.getXY(e.getPathStart(t));n.add(a.x),r.add(a.y)}return a.P.construct(n.getResult(),r.getResult()).mul(1/e.getPathCount())}(e,t);const r=new a.K(0),o=new a.K(0),s=e.querySegmentIterator();for(-1!==t&&s.resetToPath(t);s.nextPath();){const n=s.getPathIndex(),a=e.getXY(e.getPathStart(n));for(;s.hasNextSegment();){const e=s.nextSegment(),t=e.calculateLength2D();if(0===t)continue;const n=e.calculateWeightedCentroid2D().sub(a.mul(t));r.add(n.x),o.add(n.y)}const u=a.mul(e.calculatePathLength2D(n));if(r.add(u.x),o.add(u.y),-1!==t)break}const u=new a.P;return u.setCoords(r.getResult(),o.getResult()),u.mul(1/n)}},17077:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>r.e,supportsCurves:()=>r.s});var r=n(48265);n(78125)},48265:(e,t,n)=>{n.d(t,{c:()=>c,e:()=>s,s:()=>u});var r=n(15546),a=n(78125);const o=new class{getOperatorType(){return 10205}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t){return(0,r.c)(e)}};function s(e){const t=o.execute((0,a.fromGeometry)(e),null);return(0,a.toPoint)(t,(0,a.getSpatialReference)(e))}const u=o.supportsCurves(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:u},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:()=>x,fromGeometry:()=>P,fromMultipoint:()=>C,fromPoint:()=>G,fromPolygon:()=>w,fromPolyline:()=>R,fromSpatialReference:()=>v,getSpatialReference:()=>p,toExtent:()=>S,toGeometry:()=>M,toMultipoint:()=>V,toPoint:()=>D,toPolygon:()=>N,toPolyline:()=>b});var r=n(83661),a=(n(79187),n(55537)),o=n(95213),s=n(35368),u=n(12189),c=n(5443),i=n(48526),l=n(86738),m=n(39829),g=n(82799),h=(n(90293),n(83299));const f="_gxVersion",d=2,y=1;function p(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function P(e){switch(e.type){case"point":return G(e);case"multipoint":return C(e);case"polyline":return R(e);case"polygon":return w(e);case"extent":return x(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(f)){const t=new o.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(d,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function C(e){if(!e.getCacheValue(f)){const t=new s.M,n=new o.P,r=e.points,a=e.hasM,u=e.hasZ,c=u?3:2;for(let e=0,o=r.length;e<o;e++){const o=r[e];n.setXYCoords(o[0],o[1]),u&&n.setZ(o[2]??0),a&&n.setM(o[c]??NaN),t.add(n)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function G(e){if(!e.getCacheValue(f)){const t=new o.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function w(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,o=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(f,o)}return e.getCacheValue(f)}function R(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,o=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(f,o)}return e.getCacheValue(f)}function v(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.a)(t):null}function M(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return D(e,t);case a.G.enumEnvelope:return S(e,t);case a.G.enumMultiPoint:return V(e,t);case a.G.enumPolyline:return b(e,t);case a.G.enumPolygon:return N(e,t)}return null}function S(e,t){if(e.isEmpty())return null;const n=new c.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(d,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(f,e),n}function V(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),s=[],u=new o.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()),s.push(n)}const c=new i.A({hasM:r,hasZ:a,points:s,spatialReference:t});return c.setCacheValue(f,e),c}function D(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(f,e),n}function N(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(f,e),n}function b(e,t){if(e.isEmpty())return null;const n=g.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(f,e),n}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2657,3169,6061,8125],{15546:(e,t,n)=>{n.d(t,{a:()=>s,c:()=>o});var r=n(55537),a=n(83661);function o(e,t){if(!e.isEmpty())switch(e.getGeometryType()){case r.G.enumPolygon:return u(e);case r.G.enumPolyline:return m(e.getImpl());case r.G.enumLine:case r.G.enumBezier:case r.G.enumEllipticArc:return function(e){const t=e.calculateLength2D();return 0===t?e.getStartXY():e.calculateWeightedCentroid2D().mul(1/t)}(e);case r.G.enumMultiPoint:return function(e){const t=new a.K(0),n=new a.K(0),r=e.getImpl(),o=r.getAttributeStreamRef(0),s=r.getPointCount(),u=new a.P;for(let e=0;e<s;e++)o.queryPoint2D(2*e,u),t.add(u.x),n.add(u.y);const c=new a.P;return c.setCoords(t.getResult(),n.getResult()),c.divThis(s)}(e);case r.G.enumEnvelope:return e.getCenterXY();case r.G.enumPoint:return e.getXY();default:return a.P.construct(Number.NaN,Number.NaN)}return a.P.construct(Number.NaN,Number.NaN)}function s(e,t){return u(e,t)}function u(e,t=-1){const n=new a.K(0),r=new a.K(0),o=e.getImpl();let s;const u=o.hasNonLinearSegments();let m;const g=o.getXY(0);if(-1===t){if(m=o.calculateArea2D(),0===m)return l(e);u&&(s=o.querySegmentIterator());for(let e=0,t=o.getPathCount();e<t;e++)c(g,o,e,n,r),u&&i(g,s,n,r)}else{if(m=o.calculateRingArea2D(t),0===m)return l(e,t);u&&(s=o.querySegmentIterator(),s.resetToPath(t)),c(g,o,t,n,r),u&&i(g,s,n,r)}const h=new a.P,f=new a.P;return h.setCoords(n.getResult(),r.getResult()),f.assign(h.mul(1/m).add(g)),f}function c(e,t,n,r,o){const s=t.getPathStart(n),u=t.getPathEnd(n);if(u-s<3)return;const c=t.getAttributeStreamRef(0),i=c.readPoint2D(2*s),l=c.readPoint2D(2*(s+1));l.subThis(i);const m=new a.K(0),g=t.hasNonLinearSegments(),h=1/3,f=new a.P;for(let e=s+2;e<u;e++){c.queryPoint2D(2*e,f),f.subThis(i);const t=.5*f.crossProduct(l);g&&m.add(t);const n=h*t;r.add((l.x+f.x)*n),o.add((l.y+f.y)*n),l.setCoordsPoint2D(f)}const d=g?m.getResult():t.calculateRingArea2D(n),y=i.sub(e).mul(d);r.add(y.x),o.add(y.y)}function i(e,t,n,a){let o;for(t.nextPath()||(0,r.c)("centroid");null!==(o=t.nextCurve());){const t=o.calculateWeightedAreaCentroid2D(e);n.add(t.x),a.add(t.y)}}function l(e,t=-1){return m(e.getImpl(),t)}function m(e,t=-1){const n=-1===t?e.calculateLength2D():e.calculatePathLength2D(t);if(0===n)return function(e,t=-1){if(-1!==t)return e.getXY(e.getPathStart(t));const n=new a.K(0),r=new a.K(0);for(let t=0;t<e.getPathCount();++t){const a=e.getXY(e.getPathStart(t));n.add(a.x),r.add(a.y)}return a.P.construct(n.getResult(),r.getResult()).mul(1/e.getPathCount())}(e,t);const r=new a.K(0),o=new a.K(0),s=e.querySegmentIterator();for(-1!==t&&s.resetToPath(t);s.nextPath();){const n=s.getPathIndex(),a=e.getXY(e.getPathStart(n));for(;s.hasNextSegment();){const e=s.nextSegment(),t=e.calculateLength2D();if(0===t)continue;const n=e.calculateWeightedCentroid2D().sub(a.mul(t));r.add(n.x),o.add(n.y)}const u=a.mul(e.calculatePathLength2D(n));if(r.add(u.x),o.add(u.y),-1!==t)break}const u=new a.P;return u.setCoords(r.getResult(),o.getResult()),u.mul(1/n)}},17077:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>r.e,supportsCurves:()=>r.s});var r=n(48265);n(78125)},48265:(e,t,n)=>{n.d(t,{c:()=>c,e:()=>s,s:()=>u});var r=n(15546),a=n(78125);const o=new class{getOperatorType(){return 10205}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t){return(0,r.c)(e)}};function s(e){const t=o.execute((0,a.fromGeometry)(e),null);return(0,a.toPoint)(t,(0,a.getSpatialReference)(e))}const u=o.supportsCurves(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:u},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:()=>x,fromGeometry:()=>P,fromMultipoint:()=>C,fromPoint:()=>G,fromPolygon:()=>w,fromPolyline:()=>R,fromSpatialReference:()=>v,getSpatialReference:()=>p,toExtent:()=>S,toGeometry:()=>M,toMultipoint:()=>V,toPoint:()=>D,toPolygon:()=>N,toPolyline:()=>b});var r=n(83661),a=(n(79187),n(55537)),o=n(95213),s=n(35368),u=n(12189),c=n(5443),i=n(48526),l=n(86738),m=n(39829),g=n(82799),h=(n(90293),n(83299));const f="_gxVersion",d=2,y=1;function p(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function P(e){switch(e.type){case"point":return G(e);case"multipoint":return C(e);case"polyline":return R(e);case"polygon":return w(e);case"extent":return x(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(f)){const t=new o.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(d,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function C(e){if(!e.getCacheValue(f)){const t=new s.M,n=new o.P,r=e.points,a=e.hasM,u=e.hasZ,c=u?3:2;for(let e=0,o=r.length;e<o;e++){const o=r[e];n.setXYCoords(o[0],o[1]),u&&n.setZ(o[2]??0),a&&n.setM(o[c]??NaN),t.add(n)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function G(e){if(!e.getCacheValue(f)){const t=new o.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function w(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,o=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(f,o)}return e.getCacheValue(f)}function R(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,o=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(f,o)}return e.getCacheValue(f)}function v(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.b)(t):null}function M(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return D(e,t);case a.G.enumEnvelope:return S(e,t);case a.G.enumMultiPoint:return V(e,t);case a.G.enumPolyline:return b(e,t);case a.G.enumPolygon:return N(e,t)}return null}function S(e,t){if(e.isEmpty())return null;const n=new c.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(d,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(f,e),n}function V(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),s=[],u=new o.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()),s.push(n)}const c=new i.A({hasM:r,hasZ:a,points:s,spatialReference:t});return c.setCacheValue(f,e),c}function D(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(f,e),n}function N(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(f,e),n}function b(e,t){if(e.isEmpty())return null;const n=g.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(f,e),n}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4796],{15426:(e,t,r)=>{r.d(t,{Xl:()=>P,ct:()=>L,pc:()=>z,C$:()=>Q,PD:()=>U,VZ:()=>N,mm:()=>F,VA:()=>J,WP:()=>_,iX:()=>x,Nv:()=>k,xd:()=>ee,Vq:()=>G,GA:()=>Y,rQ:()=>K,jp:()=>D,tG:()=>X,lV:()=>E,B5:()=>O,Ye:()=>C,sg:()=>Z,hM:()=>B,S2:()=>R,jD:()=>q,Zm:()=>T,$4:()=>V,Pt:()=>te,bt:()=>M,rn:()=>j,ZJ:()=>re});var n=r(70333),i=r(60999),o=r(49186),s=r(66552),a=r(39516),l=r(13069),u=r(90360),c=r(39357),p=r(53177),d=r(61956);async function y(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=h(e));const n=function(e){return h(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),i=e.capabilities.query.supportsPagination;t.start=0,t.num=n;let o=null;for(;;){const s=await e.source.queryFeaturesJSON(t,r);if(null==o?o=s:o.features=o.features.concat(s.features),o.exceededTransferLimit=s.exceededTransferLimit,!i||!s.exceededTransferLimit)break;t.start+=n}return o}function h(e){return e.capabilities.query.supportsMaxRecordCountFactor?d.A.MAX_MAX_RECORD_COUNT_FACTOR:1}var m=r(30524),f=r(83531),b=r(96576),w=r(93618),g=r(54546),v=r(41366),A=r(26591),S=r(33910);const x=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function P(e,t,r,n){const i=await $(e);if(await I(e,t,n),!i.addAttachment)throw new o.A(n,"Layer source does not support addAttachment capability");return i.addAttachment(t,r)}function I(e,t,r){const{attributes:n}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?n?i&&n[i]?Promise.resolve():Promise.reject(new o.A(r,`feature is missing the identifying attribute ${i}`)):Promise.reject(new o.A(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.A(r,"A feature is required to add/delete/update attachments")):Promise.reject(new o.A(r,"this layer doesn't support attachments"))}async function M(e,t,r,n,i){const s=await $(e);if(await I(e,t,i),!s.updateAttachment)throw new o.A(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,r,n)}async function L(e,t,n){const{applyEdits:i}=await Promise.all([r.e(8628),r.e(3513)]).then(r.bind(r,78628)),o=await e.load();let s=n;return"feature"===o.type&&o.infoFor3D&&null!=t.deleteFeatures&&null!=o.globalIdField&&(s={...s,globalIdToObjectId:await Y(o,t.deleteFeatures,o.globalIdField)}),i(o,o.source,t,n)}async function j(e,t,n){const{uploadAssets:i}=await Promise.all([r.e(8628),r.e(3513)]).then(r.bind(r,78628)),o=await e.load();return i(o,o.source,t,n)}async function F(e,t,r,n){const i=await $(e);if(await I(e,t,n),!i.deleteAttachments)throw new o.A(n,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,r)}async function _(e,t,r){const n=(await e.load({signal:t?.signal})).source;if(!n.fetchRecomputedExtents)throw new o.A(r,"Layer source does not support fetchUpdates capability");return n.fetchRecomputedExtents(t)}async function E(e,t,r,n){t=g.A.from(t),await e.load();const i=e.source,s=e.capabilities;if(!s?.data?.supportsAttachment)throw new o.A(n,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:u,num:c,size:p,start:d,where:y}=t;if(!s?.operations?.supportsQueryAttachments&&(a?.length>0||u?.length>0||p?.length>0||c||d||y))throw new o.A(n,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||u?.length||y))throw new o.A(n,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!i.queryAttachments)throw new o.A(n,"Layer source does not support queryAttachments capability",t);return!s?.attachment?.supportsOrderByFields&&t.orderByFields?.length&&((t=t.clone()).orderByFields=null),i.queryAttachments(t)}async function Z(e,t,r,n){const i=await $(e);if(!i.queryObjectIds)throw new o.A(n,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(d.A.from(t)??e.createQuery(),r)}async function C(e,t,r,n){const i=await $(e);if(!i.queryFeatureCount)throw new o.A(n,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(d.A.from(t)??e.createQuery(),r)}async function O(e,t,r,n){const i=await $(e);if(!i.queryExtent)throw new o.A(n,"Layer source does not support queryExtent capability");return i.queryExtent(d.A.from(t)??e.createQuery(),r)}async function B(e,t,r,n){const i=await $(e);if(!i.queryRelatedFeatures)throw new o.A(n,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(A.default.from(t),r)}async function R(e,t,r,n){const i=await $(e);if(!i.queryRelatedFeaturesCount)throw new o.A(n,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(A.default.from(t),r)}async function D(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,a.GP)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function N(e){const t=new d.A;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:i,timeExtent:o}=e;return t.timeExtent=null!=i&&null!=o?o.offset(-i.value,i.unit):o||null,t}function q(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function T(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function V(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function G(e,t,r,n){const i=r?.feature,o=!!e.subtypes?.length;if(o&&!r?.excludeImpliedDomains){const r=z(e,t);if(r)return r}const s=o&&k(e,i);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=ee(e.types,e.typeIdField,i);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=function(e,t){const{fieldsIndex:r}=e,{name:n,type:i}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length){const t=e.types.map((e=>new c.H({code:H(e.id,i),name:e.name})));return new p.A({codedValues:t})}return null}(e,t);if(r)return r}return null}function k(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const i=t.attributes[n];return null==i?null:r.find((e=>e.code===i))}function z(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:i,type:o}=r.get(t)??{};if(!i)return null;if((n&&r.get(n)?.name)===i&&e.subtypes?.length){const t=e.subtypes.map((e=>new c.H({code:H(e.code,o),name:e.name})));if(t?.length)return new p.A({codedValues:t})}return null}function H(e,t){return t?(0,m.yM)({type:t})&&"number"==typeof e?`${e}`:(0,m.R3)({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function $(e){return(await e.load()).source}async function J(e,t,r){const i=e.parsedUrl?.path;i&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!n.id)return;if(n.id.findCredential(e))return;let r;try{const i=await(0,f.wI)(e,t);i&&(r=await n.id.checkSignInStatus(`${i}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await n.id.getCredential(e,{signal:r})}catch(e){}}(i,r)}function K(e){return!!e?.toLowerCase().includes("current_user")}function Q(e){return!te(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const W=(0,u.C)({types:S.xK});function U(e,t){if(e.defaultSymbol)return e.types?.length?new w.A({defaultSymbol:W(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:W(e.symbol,e,t)})))}):new b.A({symbol:W(e.defaultSymbol,e,t)})}function X(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function Y(e,t,r){if(null==t)return null;const n=[],{objectIdField:o}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:n}=e;t={globalId:n[r],objectId:null!=n[o]&&-1!==n[o]?n[o]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||n.push(t.globalId))})),0===n.length)return null;const s=e.createQuery();s.where=n.map((e=>`${r}='${e}'`)).join(" OR "),s.returnGeometry=!1,s.outFields=[o,r],s.cacheHint=!1;const a=await(0,i.DZ)(y(e,s));if(!a.ok)return null;const u=new Map,c=a.value.features;for(const e of c){const t=e.attributes[r],n=e.attributes[o];null!=t&&null!=n&&-1!==n&&u.set((0,l.AG)(t),n)}return u}function ee(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);return null==n?null:e.find((e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()}))??null}function te(e){return e.sourceJSON?.isMultiServicesView||function(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map((e=>e.trim())).includes("map")}(e)}function re(e,t,r){const n=t?.queryAttributeBins;if(!n)throw new o.A(r,"Layer source does not support binning");switch(e.binParameters.type){case"auto-interval":if(!n.supportsAutoInterval)throw new o.A(r,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!n.supportsNormalization||!ne(e.binParameters.normalizationType,n.supportedNormalizationTypes)))throw new o.A(r,"Layer source does not support normalization binning");break;case"date":if(!n.supportsDate)throw new o.A(r,"Layer source does not support date binning");if(e.binParameters.snapToData&&!n.supportsSnapToData)throw new o.A(r,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!n.supportsReturnFullIntervalBin)throw new o.A(r,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!n.supportsFixedBoundaries)throw new o.A(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!n.supportsFixedInterval)throw new o.A(r,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!n.supportsNormalization||!ne(e.binParameters.normalizationType,n.supportedNormalizationTypes)))throw new o.A(r,"Layer source does not support normalization binning")}if(e.binParameters.stackBy&&!n.supportsStackBy)throw new o.A(r,"Layer source does not support stackBy binning");if(e.binParameters.splitBy&&!n.supportsSplitBy)throw new o.A(r,"Layer source does not support splitBy binning");if(e.binParameters.firstDayOfWeek&&!n.supportsFirstDayOfWeek)throw new o.A(r,"Layer source does not support firstDayOfWeek binning");const i=n?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:n}of e.outStatistics){const e=t.get(n);if(e&&!i[e])throw new o.A(r,`Layer source does not support ${n} statistic type`)}}}function ne(e,t){return null!=e&&!!t?.[v.Q.toJSON(e)]}},26591:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n,i=r(90237),o=r(25482),s=r(4718),a=r(10107),l=r(56507),u=r(40608),c=r(43937),p=r(16930),d=r(27733);let y=class extends o.A{static{n=this}constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new n((0,s.o8)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,i._)([(0,a.MZ)({type:d.L,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,i._)([(0,a.MZ)({type:Date})],y.prototype,"historicMoment",void 0),(0,i._)([(0,c.K)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"objectIds",void 0),(0,i._)([(0,a.MZ)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,i._)([(0,a.MZ)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,i._)([(0,a.MZ)({type:p.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,i._)([(0,c.K)("start"),(0,c.K)("num")],y.prototype,"writeStart",null),(0,i._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,i._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=n=(0,i._)([(0,u.$)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.dp)(y);const h=y},30291:(e,t,r)=>{r.d(t,{tn:()=>u});var n=r(13874),i=r(30524),o=r(89893),s=(r(84424),r(80737),r(96808),r(66159)),a=(r(67336),r(92094),r(23721),r(47582),r(41227)),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},y){if(!r)return null;const m=function(e,t){const r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){const n=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===n&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||h,sortDisabled:t?.sortDisabled}).map((t=>new a.A({fieldName:t.name,isEditable:(0,i.R$)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},y);if(!m.length)return null;const f=function(e){const t=(0,i.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),b=[new s.A,new o.A];return new n.A({title:f,content:b,fieldInfos:m})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,i.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:y(e)?-1:y(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,i.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function y(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const h=["geometry","blob","raster","guid","xml"]},39383:(e,t,r)=>{r.d(t,{w:()=>l,z:()=>c});var n=r(49186),i=r(53966),o=r(46499);const s=()=>i.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function l(e,t,r){return e?e.map((e=>{const n=new o.A;if(n.read(e,r),n.labelExpression){const e=t.fields||t.layerDefinition?.fields||this.fields;n.labelExpression=n.labelExpression.replaceAll(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const n=t[e].name;if(n.toLowerCase()===r)return n}return e}(r,e)}]`))}return n})):null}const u={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:null,esriGeometryEnvelope:null};function c(e,t){const r=[];for(const i of e){const e=i.labelPlacement,o=u[t];if(!i.symbol)return s().warn("No ILabelClass symbol specified."),[];if(!o)return s().error(new n.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(o.includes(e))r.push(i);else{const n=o[0];e&&s().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${n}`);const a=i.clone();a.labelPlacement=n,r.push(a)}}return r}},46499:(e,t,r)=>{r.d(t,{A:()=>P});var n,i=r(90237),o=(r(44208),r(66552)),s=r(25482),a=r(4718),l=r(90629),u=r(10107),c=(r(53966),r(36005)),p=r(40608),d=r(43937),y=r(73913),h=r(32730),m=r(83531),f=r(59868),b=r(73838),w=r(33910);const g=new o.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function v(e,t,r){return{enabled:!(0,m.TU)(r?.layer)}}function A(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function S(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let x=class extends s.A{static{n=this}static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),i=n[3],o=r(t[n[4]],n[5],n[6]);switch(i){case"AND":return e&&o;case"OR":return e||o}}return!1}catch(e){}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=f.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,h.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,h.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&A(n))e=new y.A({expression:this.getLabelExpressionArcade()});else if(!e)return;const i=e.toJSON(n);i.expression&&(t[r]=i)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,h.XJ)(this)}getLabelExpressionArcade(){return(0,h.BI)(this)}getLabelExpressionSingleField(){return(0,h.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new n({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],x.prototype,"name",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:v}}}}})],x.prototype,"allowOverrun",void 0),(0,i._)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:v}}}}})],x.prototype,"deconflictionStrategy",void 0),(0,i._)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&S(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],x.prototype,"labelExpression",void 0),(0,i._)([(0,c.w)("labelExpression")],x.prototype,"readLabelExpression",null),(0,i._)([(0,d.K)("labelExpression")],x.prototype,"writeLabelExpression",null),(0,i._)([(0,u.MZ)({type:y.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return A(e)||S(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],x.prototype,"labelExpressionInfo",void 0),(0,i._)([(0,d.K)("labelExpressionInfo")],x.prototype,"writeLabelExpressionInfo",null),(0,i._)([(0,u.MZ)({type:g.apiValues,json:{type:g.jsonValues,read:g.read,write:g.write}})],x.prototype,"labelPlacement",void 0),(0,i._)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],x.prototype,"labelPosition",void 0),(0,i._)([(0,u.MZ)({type:Number})],x.prototype,"maxScale",void 0),(0,i._)([(0,d.K)("maxScale")],x.prototype,"writeMaxScale",null),(0,i._)([(0,u.MZ)({type:Number})],x.prototype,"minScale",void 0),(0,i._)([(0,d.K)("minScale")],x.prototype,"writeMinScale",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:v}}}}})],x.prototype,"repeatLabel",void 0),(0,i._)([(0,u.MZ)({type:Number,cast:l.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:v}}}}})],x.prototype,"repeatLabelDistance",void 0),(0,i._)([(0,u.MZ)({types:w.em,json:{origins:{"web-scene":{types:w.Rv,write:b.oO,default:null}},write:b.oO,default:null}})],x.prototype,"symbol",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],x.prototype,"useCodedValues",void 0),(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],x.prototype,"where",void 0),x=n=(0,i._)([(0,p.$)("esri.layers.support.LabelClass")],x);const P=x},54546:(e,t,r)=>{r.d(t,{A:()=>d});var n,i=r(90237),o=r(25482),s=r(4718),a=r(10107),l=r(56507),u=r(40608),c=r(43937);let p=class extends o.A{static{n=this}constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.orderByFields=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new n((0,s.o8)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,i._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"attachmentTypes",void 0),(0,i._)([(0,a.MZ)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],p.prototype,"attachmentsWhere",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"cacheHint",void 0),(0,i._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"keywords",void 0),(0,i._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"globalIds",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],p.prototype,"num",void 0),(0,i._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"objectIds",void 0),(0,i._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"orderByFields",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{default:!1,write:!0}})],p.prototype,"returnMetadata",void 0),(0,i._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"size",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],p.prototype,"start",void 0),(0,i._)([(0,c.K)("start"),(0,c.K)("num")],p.prototype,"writeStart",null),(0,i._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],p.prototype,"where",void 0),p=n=(0,i._)([(0,u.$)("esri.rest.support.AttachmentQuery")],p),p.from=(0,l.dp)(p);const d=p},73913:(e,t,r)=>{r.d(t,{A:()=>d});var n,i=r(90237),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(32730);let p=class extends o.A{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}static{n=this}readExpression(e,t){return t.value?(0,c.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,c.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new n({expression:this.expression,title:this.title,value:this.value})}};(0,i._)([(0,s.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],p.prototype,"expression",void 0),(0,i._)([(0,a.w)("expression",["expression","value"])],p.prototype,"readExpression",null),(0,i._)([(0,u.K)("expression")],p.prototype,"writeExpression",null),(0,i._)([(0,s.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],p.prototype,"title",void 0),(0,i._)([(0,s.MZ)({json:{read:!1,write:!1}})],p.prototype,"value",void 0),p=n=(0,i._)([(0,l.$)("esri.layers.support.LabelExpressionInfo")],p);const d=p},96576:(e,t,r)=>{r.d(t,{A:()=>y});var n,i=r(90237),o=r(4718),s=r(10107),a=(r(44208),r(53966),r(93223)),l=r(40608),u=r(92438),c=r(63988),p=r(49849);let d=n=class extends((0,c.h)(u.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map((r=>r.collectRequiredFields(e,t))))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce(((e,t)=>e+t.getAttributeHash()),"")??""}getMeshHash(){return this.symbols.reduce(((e,t)=>e+JSON.stringify(t)),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new n({description:this.description,label:this.label,symbol:(0,o.o8)(this.symbol),visualVariables:(0,o.o8)(this.visualVariables),authoringInfo:(0,o.o8)(this.authoringInfo)})}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,i._)([(0,s.MZ)(p.Wp)],d.prototype,"symbol",void 0),(0,i._)([(0,a.e)({simple:"simple"})],d.prototype,"type",void 0),d=n=(0,i._)([(0,l.$)("esri.renderers.SimpleRenderer")],d);const y=d}}]);
@@ -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.n)("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.n)("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.m)("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,z=0,I=0,O="",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()&&(O=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,z=e.currentDoubleValue()):"falseM"===s?f||(f=!0,o=!0,I=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!==O.length&&(B=!1,(0,s.aA)(O)&&(G=(0,s.a)(O))),G||0===E.length||(B=!1,(0,s.aA)(E)&&(G=(0,s.a)(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.z)(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(z,C),b&&f&&e.setMParams(I,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 z=0,I=0;const O=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:z}=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"),z=0;4!==s.nextToken();)z===j&&(0,r.t)("failed to parse multipath: each vertex array has to have at most 4 elements"),E[z++]=k(s);z<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,O.setCoords(E[0],E[1])),h&&h.size()===w&&h.resize(g(w)),z>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)),z>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,I=z,(0,i.a)(P,E,0,0,I);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&&z===I&&0===(0,i.ap)(E,P,z)?(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.n)("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,z=l,I=_,O=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=z,B=I,V=O,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,z,I,O,e,i),F++,o=j,l=z,_=I,w=O,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),z="b".charCodeAt(0),I=("\b".charCodeAt(0),"\\".charCodeAt(0)),O="[".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)===I&&t.charCodeAt(r+1)===$;)n++,r+=6;r=e;const i=new Uint8Array(n);let s=0;for(;t.charCodeAt(r)===I&&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)!==I)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 I:e+="\\";break;case Y:e+="/";break;case z: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===I;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===I||e===Y||e===z||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===O?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!==O&&(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,z=!1,I=!1,O=!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(!O&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){O=!0,J=k(n);continue}}else if("zmin"===t){if(!z&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){z=!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(!I&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){I=!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||z||I||O||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});z&&I&&e.setInterval(1,0,K,q),O&&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.i)((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:()=>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.n)("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.n)("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.m)("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,z=0,I=0,O="",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()&&(O=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,z=e.currentDoubleValue()):"falseM"===s?f||(f=!0,o=!0,I=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!==O.length&&(B=!1,(0,s.aA)(O)&&(G=(0,s.b)(O))),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.z)(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(z,C),b&&f&&e.setMParams(I,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 z=0,I=0;const O=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:z}=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"),z=0;4!==s.nextToken();)z===j&&(0,r.t)("failed to parse multipath: each vertex array has to have at most 4 elements"),E[z++]=k(s);z<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,O.setCoords(E[0],E[1])),h&&h.size()===w&&h.resize(g(w)),z>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)),z>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,I=z,(0,i.a)(P,E,0,0,I);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&&z===I&&0===(0,i.ap)(E,P,z)?(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.n)("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,z=l,I=_,O=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=z,B=I,V=O,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,z,I,O,e,i),F++,o=j,l=z,_=I,w=O,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),z="b".charCodeAt(0),I=("\b".charCodeAt(0),"\\".charCodeAt(0)),O="[".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)===I&&t.charCodeAt(r+1)===$;)n++,r+=6;r=e;const i=new Uint8Array(n);let s=0;for(;t.charCodeAt(r)===I&&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)!==I)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 I:e+="\\";break;case Y:e+="/";break;case z: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===I;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===I||e===Y||e===z||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===O?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!==O&&(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,z=!1,I=!1,O=!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(!O&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){O=!0,J=k(n);continue}}else if("zmin"===t){if(!z&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){z=!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(!I&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){I=!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||z||I||O||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});z&&I&&e.setInterval(1,0,K,q),O&&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 +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:()=>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}},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.d{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
+ "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:()=>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:()=>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),s=(n(79187),n(55537)),a=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 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 o.M,n=new a.P,r=e.points,s=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),s&&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:s}=e,a=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(p,a)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,a=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(p,a)}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.b)(t):null}function P(e,t){if(e)switch(e.getGeometryType()){case s.G.enumPoint:return _(e,t);case s.G.enumEnvelope:return R(e,t);case s.G.enumMultiPoint:return Z(e,t);case s.G.enumPolyline:return k(e,t);case s.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(),s=n.hasZ(),o=[],u=new a.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];s&&n.push(u.getZ()),r&&n.push(u.getM()),o.push(n)}const i=new c.A({hasM:r,hasZ:s,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}),s=e.getDescription();return s.hasM()&&(n.m=e.getM()),s.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),s=n(78125);class a extends r.d{getOperatorType(){return 2}execute(e,t,n,s){return(0,r.r)(e,t,n,3,s)}}const o=new a;function u(e){const t=(0,s.getSpatialReference)(e);return o.accelerateGeometry((0,s.fromGeometry)(e),(0,s.fromSpatialReference)(t),1)}function i(e,t){return o.execute((0,s.fromGeometry)(e),(0,s.fromGeometry)(t),(0,s.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"}))}}]);