@arcgis/core 4.33.0-next.20250513 → 4.33.0-next.20250514

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 (185) hide show
  1. package/arcade/functions/centroid.js +1 -1
  2. package/arcade/functions/geomasync.js +1 -1
  3. package/arcade/functions/geometry.js +1 -1
  4. package/arcade/functions/geomsync.js +1 -1
  5. package/arcade/geometry/operators.js +1 -1
  6. package/arcade/geometry/operatorsWorker.js +1 -1
  7. package/arcade/treeAnalysis.js +1 -1
  8. package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
  9. package/assets/components/assets/combobox/t9n/messages.json +1 -1
  10. package/assets/components/assets/icon/calendarHeatChart16.json +1 -0
  11. package/assets/components/assets/icon/calendarHeatChart24.json +1 -0
  12. package/assets/components/assets/icon/calendarHeatChart32.json +1 -0
  13. package/assets/components/assets/icon/matrixHeatChart16.json +1 -0
  14. package/assets/components/assets/icon/matrixHeatChart24.json +1 -0
  15. package/assets/components/assets/icon/matrixHeatChart32.json +1 -0
  16. package/assets/components/assets/icon/progressBarChart16.json +1 -0
  17. package/assets/components/assets/icon/progressBarChart24.json +1 -0
  18. package/assets/components/assets/icon/progressBarChart32.json +1 -0
  19. package/assets/components/assets/icon/spikeDataVisualization16.json +1 -0
  20. package/assets/components/assets/icon/spikeDataVisualization24.json +1 -0
  21. package/assets/components/assets/icon/spikeDataVisualization32.json +1 -0
  22. package/assets/components/assets/icon/spikeDataVisualizationOpen16.json +1 -0
  23. package/assets/components/assets/icon/spikeDataVisualizationOpen24.json +1 -0
  24. package/assets/components/assets/icon/spikeDataVisualizationOpen32.json +1 -0
  25. package/assets/components/assets/icon/spikeDataVisualizationOutlined16F.json +1 -0
  26. package/assets/components/assets/icon/spikeDataVisualizationOutlined24F.json +1 -0
  27. package/assets/components/assets/icon/spikeDataVisualizationOutlined32F.json +1 -0
  28. package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked16.json +1 -0
  29. package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked24.json +1 -0
  30. package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked32.json +1 -0
  31. package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen16.json +1 -0
  32. package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen24.json +1 -0
  33. package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen32.json +1 -0
  34. package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked16.json +1 -0
  35. package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked24.json +1 -0
  36. package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked32.json +1 -0
  37. package/assets/esri/core/workers/RemoteClient.js +1 -1
  38. package/assets/esri/core/workers/chunks/0766ecb677d667e5fb83.js.LICENSE.txt +1 -1
  39. package/assets/esri/core/workers/chunks/{4deeeceb784e4390441d.js → 0a4cece5e96fb7e8a57b.js} +1 -1
  40. package/assets/esri/core/workers/chunks/12e99071f6582f6caeaf.js +1 -0
  41. package/assets/esri/core/workers/chunks/191a45a594ecaf7f1abb.js +1 -0
  42. package/assets/esri/core/workers/chunks/1991f0d0f0a12175f849.js +1 -0
  43. package/assets/esri/core/workers/chunks/218a66d53f7cf4f285aa.js.LICENSE.txt +1 -1
  44. package/assets/esri/core/workers/chunks/{07695960aa0344dbfbf3.js → 28d9e2ffc3059a55311e.js} +1 -1
  45. package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js.LICENSE.txt +1 -1
  46. package/assets/esri/core/workers/chunks/4899cdc8bb5085c356f9.js +1 -0
  47. package/assets/esri/core/workers/chunks/498886c321a2501658bc.js +1 -0
  48. package/assets/esri/core/workers/chunks/56569d0c2cf5c5167651.js +1 -0
  49. package/assets/esri/core/workers/chunks/{ba3193ea145960a50e87.js → 5c8d52b72a3bea4202ac.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{aa82925ffb00babb0543.js → 6394ab6f629aa90292e6.js} +2 -2
  51. package/assets/esri/core/workers/chunks/{aa82925ffb00babb0543.js.LICENSE.txt → 6394ab6f629aa90292e6.js.LICENSE.txt} +1 -1
  52. package/assets/esri/core/workers/chunks/{8b74b609de4f70e1a75c.js → 64af433e88d4dd21a2ff.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{2b01e3bce78541620a86.js → 6cbe8205a4e0f62da519.js} +1 -1
  54. package/assets/esri/core/workers/chunks/6e64ce0958c3432004b6.js +346 -0
  55. package/assets/esri/core/workers/chunks/6e8c6c9112ecb867b7be.js +1 -0
  56. package/assets/esri/core/workers/chunks/{a8430e1e2142f1ce9b92.js → 82c395d8649096609a8a.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{a73c6b4bc5baf440f85a.js → 88b7265270feede80e1d.js} +1 -1
  58. package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
  59. package/assets/esri/core/workers/chunks/8c21cc9af4ce9652cc5c.js +1 -0
  60. package/assets/esri/core/workers/chunks/{243dc74ec62891ba1ef7.js → 8e82acd1f730571680f4.js} +1 -1
  61. package/assets/esri/core/workers/chunks/90ae15ce22a49bd84876.js.LICENSE.txt +1 -1
  62. package/assets/esri/core/workers/chunks/a09b5700c92bb76c3234.js +1 -0
  63. package/assets/esri/core/workers/chunks/b06cb23048c32940f5de.js +1 -0
  64. package/assets/esri/core/workers/chunks/{079434fe765c53d304f2.js → b1e275607d9754079f60.js} +1 -1
  65. package/assets/esri/core/workers/chunks/b4f38fe9cc948a39ad87.js.LICENSE.txt +1 -1
  66. package/assets/esri/core/workers/chunks/{3c45603af279ad7fed8c.js → b8b5dfd2d73a8410fba2.js} +1 -1
  67. package/assets/esri/core/workers/chunks/c604fefedccfd4db9953.js +1 -0
  68. package/assets/esri/core/workers/chunks/{b816b608f31954128246.js → d21d9e8b8c8a2e0485d5.js} +1 -1
  69. package/assets/esri/core/workers/chunks/da3c62a851a4332f6dda.js +1 -0
  70. package/assets/esri/core/workers/chunks/{fef1a5f8a6fd3502b33b.js → e0247252c6a0f3340e33.js} +28 -28
  71. package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js.LICENSE.txt +1 -1
  72. package/assets/esri/core/workers/chunks/e5608e5232e983531f72.js +1 -0
  73. package/assets/esri/core/workers/chunks/f8fb0c7eaf73709bd855.js +1 -0
  74. package/assets/esri/core/workers/chunks/fd24dd602a3fed88d90e.js +1 -0
  75. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  76. package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +17 -10
  77. package/assets/esri/themes/base/widgets/_SelectionList.scss +7 -3
  78. package/assets/esri/themes/dark/main.css +1 -1
  79. package/assets/esri/themes/light/main.css +1 -1
  80. package/assets/esri/themes/light/view.css +1 -1
  81. package/chunks/OperatorCut.js +1 -1
  82. package/chunks/OperatorDefinitions.js +5 -0
  83. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  84. package/chunks/OperatorSimplifyOGC.js +1 -1
  85. package/chunks/ProjectionTransformation.js +1 -1
  86. package/chunks/arcade.js +1 -1
  87. package/chunks/lyr3DMain.js +1 -1
  88. package/core/Accessor.js +1 -1
  89. package/core/accessorSupport/Lifecycle.js +5 -0
  90. package/core/accessorSupport/Properties.js +1 -1
  91. package/core/accessorSupport/decorators/subclass.js +1 -1
  92. package/core/accessorSupport/tracking/Flags.js +1 -1
  93. package/core/accessorSupport/watch.js +1 -1
  94. package/core/mapCollectionUtils.js +1 -1
  95. package/core/urlUtils.js +1 -1
  96. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  97. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  98. package/geometry/operators/gx/operatorSimplifyOGC.js +1 -1
  99. package/geometry/operators/simplifyOGCOperator.js +1 -1
  100. package/interfaces.d.ts +263 -2448
  101. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  102. package/layers/KnowledgeGraphLayer.js +1 -1
  103. package/layers/LinkChartLayer.js +1 -1
  104. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  105. package/layers/VideoLayer.js +1 -1
  106. package/layers/graphics/data/QueryEngineResult.js +1 -1
  107. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  108. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  109. package/package.json +1 -1
  110. package/smartMapping/statistics/uniqueValues.js +1 -1
  111. package/smartMapping/support/adapters/support/layerUtils.js +1 -1
  112. package/statistics/utils.js +1 -1
  113. package/support/revision.js +1 -1
  114. package/symbols/cim/effects/EffectRadial.js +1 -1
  115. package/versionManagement/versionAdapters/FeatureLayerVersionAdapter.js +1 -1
  116. package/versionManagement/versionAdapters/NetworkVersionAdapter.js +1 -1
  117. package/versionManagement/versionAdapters/SubTypeGroupLayerVersionAdapter.js +1 -1
  118. package/views/2d/layers/MediaLayerView2D.js +1 -1
  119. package/views/2d/layers/TileLayerView2D.js +1 -1
  120. package/views/2d/layers/VideoLayerView2D.js +1 -1
  121. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  122. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  123. package/views/3d/FocusAreasView.js +5 -0
  124. package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
  125. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  126. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  127. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  128. package/views/3d/layers/GraphicsView3D.js +1 -1
  129. package/views/3d/layers/I3SMeshView3D.js +1 -1
  130. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  131. package/views/3d/layers/Lyr3DWasm.js +1 -1
  132. package/views/3d/layers/RouteLayerView3D.js +1 -1
  133. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  134. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  135. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  136. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  137. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  138. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  139. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
  140. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  141. package/views/3d/layers/i3s/I3SQueryResultGeometry.js +1 -1
  142. package/views/3d/layers/i3s/meshUtils.js +5 -0
  143. package/views/3d/support/hitTest.js +1 -1
  144. package/views/3d/terrain/TileTexture.js +1 -1
  145. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  146. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  147. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  148. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  149. package/views/SceneView.js +1 -1
  150. package/views/VideoView.js +1 -1
  151. package/views/layers/BuildingComponentSublayerView.js +1 -1
  152. package/views/layers/BuildingSceneLayerView.js +1 -1
  153. package/views/support/TextureCompressionWorker.js +1 -1
  154. package/views/support/TextureCompressionWorkerHandle.js +1 -1
  155. package/views/webgl/Texture.js +1 -1
  156. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  157. package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
  158. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  159. package/widgets/FeatureTable/Grid/Column.js +1 -1
  160. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  161. package/widgets/FeatureTable.js +1 -1
  162. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  163. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  164. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  165. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  166. package/widgets/OrientedImageryViewer.js +1 -1
  167. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  168. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  169. package/widgets/support/SelectionList.js +1 -1
  170. package/assets/esri/core/workers/chunks/009dbddfc6499e2cee4f.js +0 -1
  171. package/assets/esri/core/workers/chunks/0f57b6a3a85a47ebd9d0.js +0 -346
  172. package/assets/esri/core/workers/chunks/1b8cc83aa1179245b2dc.js +0 -1
  173. package/assets/esri/core/workers/chunks/26ebb7816dd8c8cd4f3b.js +0 -1
  174. package/assets/esri/core/workers/chunks/2abce00d812c7f6b542d.js +0 -1
  175. package/assets/esri/core/workers/chunks/47cd99ab3ed11a931084.js +0 -1
  176. package/assets/esri/core/workers/chunks/51d9eaeeb781fd1d1162.js +0 -1
  177. package/assets/esri/core/workers/chunks/5228fc7fcdf57f44781e.js +0 -1
  178. package/assets/esri/core/workers/chunks/83e13baab4b90a88d967.js +0 -1
  179. package/assets/esri/core/workers/chunks/93cc26e5636040fdc0b8.js +0 -1
  180. package/assets/esri/core/workers/chunks/c17c269cc30e7e1d0bfb.js +0 -1
  181. package/assets/esri/core/workers/chunks/c3f144ca69995dca34a9.js +0 -1
  182. package/assets/esri/core/workers/chunks/d551f70560a2b1ef5696.js +0 -1
  183. package/assets/esri/core/workers/chunks/e9b1349a2b3a3f300808.js +0 -1
  184. package/core/accessorSupport/interfaces.js +0 -5
  185. package/views/FocusAreasView.js +0 -5
package/chunks/arcade.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{compileScript as e,extend as r,enableAsyncSupport as t}from"../arcade/arcadeCompiler.js";import{ArcadeModuleResolver as n}from"../arcade/ArcadeModuleResolver.js";import{executeScript as s,extend as a}from"../arcade/arcadeRuntime.js";import{ArcadeExecutionError as u,ExecutionErrorCodes as o}from"../arcade/executionError.js";import{parseScript as i}from"../arcade/parser.js";import{referencesMember as c,referencesFunction as l,findLiteralMemberAccesses as f,findExpectedFieldLiterals as p,findScriptDependencies as d,findModuleImports as m,findFunctionCalls as y}from"../arcade/treeAnalysis.js";import{loadOperators as S}from"../arcade/functions/geomsync.js";import has from"../core/has.js";import{assertIsSome as b}from"../core/maybe.js";const w=new Set(["feature","angle","bearing","centroid","envelopeintersects","extent","geometry","isselfintersecting","ringisclockwise"]);let h=!1,A=!1,g=null,j=[];function x(r,t){if(!0===t.useAsync||!0===r.isAsync)return M(r,t);if(has("esri-csp-restrictions"))return function(e){return s(r,e)};try{return e(r,t)}catch(n){if("esri.arcade.arcadeuncompilableerror"===n.declaredRootClass)return function(e){return s(r,e)};throw n}}function M(r,t){if(null===g)throw new u(null,o.AsyncNotEnabled,null);if(has("esri-csp-restrictions"))return function(e){return g.executeScript(r,e)};try{return e(r,t,!0)}catch(n){if("esri.arcade.arcadeuncompilableerror"===n.declaredRootClass)return function(e){return g.executeScript(r,e)};throw n}}function v(e){a(e),r(e,"sync"),null===g?j.push(e):(r(e,"async"),g.extend(e))}function F(e,r=[]){return i(e,r)}function E(e,r,t=[]){return G(i(e,t),r)}function G(e,r){if(!0===r.useAsync||!0===e.isAsync){if(null===g)throw new u(null,o.AsyncNotEnabled,null);return g.executeScript(e,r)}return s(e,r)}function I(e,r){return c(e,r)}function U(e,r){return l(e,r)}function _(e,r=!1){return void 0===r&&(r=!1),f(e).map((({varId:e,memberId:r})=>`${e}.${r}`))}function C(e){return p(e)}function R(e,r=[]){return void 0===e.usesGeometry&&d(e,r),!0===e.usesGeometry}let k=null;function D(){return k||(k=P(),k)}async function P(){return await S(),A=!0,!0}let z=null;function L(){return null!==z||(z=$()),z}async function $(){await t(),g=await import("../arcade/arcadeAsyncRuntime.js");for(const e of j)g.extend(e),r(e,"async");return j=null,!0}function N(){return h}function O(){return!!g}function T(){return A}let q=null;function B(){return q||(q=V(),q)}async function V(){await L();const[e,t,n,s,a,u]=await Promise.all([import("../arcade/featureSetUtils.js"),import("../arcade/functions/featuresetbase.js"),import("../arcade/functions/featuresetgeom.js"),import("../arcade/functions/featuresetstats.js"),import("../arcade/functions/featuresetstring.js"),import("../arcade/functions/knowledgegraph.js")]);return re=e,g.extend([t,n,s,a,u]),r([t,n,s,a,u],"async"),h=!0,!0}function H(e,r=[]){return void 0===e.usesFeatureSet&&d(e,r),!0===e.usesFeatureSet}function J(e,r=[]){return void 0===e.isAsync&&d(e,r),!0===e.isAsync}function K(e,r){if(r){for(const t of r)if(I(e,t))return!0;return!1}return!1}async function Q(e,r,t=[],n=!1,s=null){return W(new Set,e,r,t,n,s)}async function W(e,r,t,n=[],s=!1,a=null){const u="string"==typeof r?F(r):r,o=[];return u&&(!1===T()&&(R(u)||s)&&o.push(D()),!1===O()&&(!0===u.isAsync||t)&&o.push(L()),!1===N()&&(H(u)||K(u,n))&&o.push(B())),o.length&&await Promise.all(o),await Y(e,u,a,t,s),!0}function X(e,r=[]){return void 0===e.usesModules&&d(e,r),!0===e.usesModules}async function Y(e,r,t=null,s=!1,a=!1){const i=m(r);null===t&&i.length>0&&(t=n.getDefault()),r.loadedModules={};for(const n of i){b(t);const i=t.normalizeModuleUri(n.source);if(e.has(i.uri))throw new u(null,o.CircularModules,null);e.add(i.uri);const c=await t.fetchModule(i);await W(e,c,s,[],a,t),e.delete(i.uri),c.isAsync&&(r.isAsync=!0),c.usesFeatureSet&&(r.usesFeatureSet=!0),c.usesGeometry&&(r.usesGeometry=!0),r.loadedModules[n.libname]={uri:i.uri,script:c}}}function Z(e){if(R(e))return!0;const r=y(e);let t=!1;for(let n=0;n<r.length;n++)if(w.has(r[n])){t=!0;break}return t}function ee(e,r){const t=null==r?null:new Set(r.map((e=>e.toLowerCase())));return f(e).some((({varId:e,memberId:r})=>"$view"===e&&(null==t||t.has(r))))}let re=null;function te(){return re}const ne=Object.freeze(Object.defineProperty({__proto__:null,_loadScriptDependenciesImpl:W,compileScript:x,enableAsyncSupport:L,enableAsyncSupportImpl:$,enableFeatureSetSupport:B,enableFeatureSetSupportImpl:V,enableGeometrySupport:D,enableGeometrySupportImpl:P,executeScript:G,extend:v,extractExpectedFieldLiterals:C,extractFieldLiterals:_,featureSetUtils:te,isAsyncEnabled:O,isFeatureSetSupportEnabled:N,isGeometryEnabled:T,loadDependentModules:Y,loadScriptDependencies:Q,parseAndExecuteScript:E,parseScript:F,referencesFunction:U,referencesMember:I,scriptIsAsync:J,scriptTouchesGeometry:Z,scriptUsesFeatureSet:H,scriptUsesGeometryEngine:R,scriptUsesModules:X,scriptUsesViewProperties:ee},Symbol.toStringTag,{value:"Module"}));export{Y as A,ee as B,W as _,C as a,D as b,x as c,B as d,G as e,te as f,R as g,ne as h,v as i,E as j,U as k,Q as l,_ as m,P as n,L as o,F as p,$ as q,I as r,Z as s,N as t,O as u,T as v,V as w,H as x,J as y,X as z};
5
+ import{compileScript as e,extend as r,enableAsyncSupport as t}from"../arcade/arcadeCompiler.js";import{ArcadeModuleResolver as n}from"../arcade/ArcadeModuleResolver.js";import{executeScript as s,extend as a}from"../arcade/arcadeRuntime.js";import{ArcadeExecutionError as u,ExecutionErrorCodes as o}from"../arcade/executionError.js";import{parseScript as c}from"../arcade/parser.js";import{referencesMember as i,referencesFunction as l,findLiteralMemberAccesses as f,findExpectedFieldLiterals as p,findScriptDependencies as d,findModuleImports as m,findFunctionCalls as y}from"../arcade/treeAnalysis.js";import{loadOperators as S}from"../arcade/functions/geomsync.js";import has from"../core/has.js";import{assertIsSome as b}from"../core/maybe.js";const w=new Set(["feature","angle","bearing","centroid","envelopeintersects","extent","geometry","ringisclockwise"]);let h=!1,A=!1,j=null,x=[];function g(r,t){if(!0===t.useAsync||!0===r.isAsync)return M(r,t);if(has("esri-csp-restrictions"))return function(e){return s(r,e)};try{return e(r,t)}catch(n){if("esri.arcade.arcadeuncompilableerror"===n.declaredRootClass)return function(e){return s(r,e)};throw n}}function M(r,t){if(null===j)throw new u(null,o.AsyncNotEnabled,null);if(has("esri-csp-restrictions"))return function(e){return j.executeScript(r,e)};try{return e(r,t,!0)}catch(n){if("esri.arcade.arcadeuncompilableerror"===n.declaredRootClass)return function(e){return j.executeScript(r,e)};throw n}}function v(e){a(e),r(e,"sync"),null===j?x.push(e):(r(e,"async"),j.extend(e))}function F(e,r=[]){return c(e,r)}function E(e,r,t=[]){return G(c(e,t),r)}function G(e,r){if(!0===r.useAsync||!0===e.isAsync){if(null===j)throw new u(null,o.AsyncNotEnabled,null);return j.executeScript(e,r)}return s(e,r)}function I(e,r){return i(e,r)}function U(e,r){return l(e,r)}function _(e,r=!1){return void 0===r&&(r=!1),f(e).map((({varId:e,memberId:r})=>`${e}.${r}`))}function C(e){return p(e)}function R(e,r=[]){return void 0===e.usesGeometry&&d(e,r),!0===e.usesGeometry}let k=null;function D(){return k||(k=P(),k)}async function P(){return await S(),A=!0,!0}let z=null;function L(){return null!==z||(z=$()),z}async function $(){await t(),j=await import("../arcade/arcadeAsyncRuntime.js");for(const e of x)j.extend(e),r(e,"async");return x=null,!0}function N(){return h}function O(){return!!j}function T(){return A}let q=null;function B(){return q||(q=V(),q)}async function V(){await L();const[e,t,n,s,a,u]=await Promise.all([import("../arcade/featureSetUtils.js"),import("../arcade/functions/featuresetbase.js"),import("../arcade/functions/featuresetgeom.js"),import("../arcade/functions/featuresetstats.js"),import("../arcade/functions/featuresetstring.js"),import("../arcade/functions/knowledgegraph.js")]);return re=e,j.extend([t,n,s,a,u]),r([t,n,s,a,u],"async"),h=!0,!0}function H(e,r=[]){return void 0===e.usesFeatureSet&&d(e,r),!0===e.usesFeatureSet}function J(e,r=[]){return void 0===e.isAsync&&d(e,r),!0===e.isAsync}function K(e,r){if(r){for(const t of r)if(I(e,t))return!0;return!1}return!1}async function Q(e,r,t=[],n=!1,s=null){return W(new Set,e,r,t,n,s)}async function W(e,r,t,n=[],s=!1,a=null){const u="string"==typeof r?F(r):r,o=[];return u&&(!1===T()&&(R(u)||s)&&o.push(D()),!1===O()&&(!0===u.isAsync||t)&&o.push(L()),!1===N()&&(H(u)||K(u,n))&&o.push(B())),o.length&&await Promise.all(o),await Y(e,u,a,t,s),!0}function X(e,r=[]){return void 0===e.usesModules&&d(e,r),!0===e.usesModules}async function Y(e,r,t=null,s=!1,a=!1){const c=m(r);null===t&&c.length>0&&(t=n.getDefault()),r.loadedModules={};for(const n of c){b(t);const c=t.normalizeModuleUri(n.source);if(e.has(c.uri))throw new u(null,o.CircularModules,null);e.add(c.uri);const i=await t.fetchModule(c);await W(e,i,s,[],a,t),e.delete(c.uri),i.isAsync&&(r.isAsync=!0),i.usesFeatureSet&&(r.usesFeatureSet=!0),i.usesGeometry&&(r.usesGeometry=!0),r.loadedModules[n.libname]={uri:c.uri,script:i}}}function Z(e){if(R(e))return!0;const r=y(e);let t=!1;for(let n=0;n<r.length;n++)if(w.has(r[n])){t=!0;break}return t}function ee(e,r){const t=null==r?null:new Set(r.map((e=>e.toLowerCase())));return f(e).some((({varId:e,memberId:r})=>"$view"===e&&(null==t||t.has(r))))}let re=null;function te(){return re}const ne=Object.freeze(Object.defineProperty({__proto__:null,_loadScriptDependenciesImpl:W,compileScript:g,enableAsyncSupport:L,enableAsyncSupportImpl:$,enableFeatureSetSupport:B,enableFeatureSetSupportImpl:V,enableGeometrySupport:D,enableGeometrySupportImpl:P,executeScript:G,extend:v,extractExpectedFieldLiterals:C,extractFieldLiterals:_,featureSetUtils:te,isAsyncEnabled:O,isFeatureSetSupportEnabled:N,isGeometryEnabled:T,loadDependentModules:Y,loadScriptDependencies:Q,parseAndExecuteScript:E,parseScript:F,referencesFunction:U,referencesMember:I,scriptIsAsync:J,scriptTouchesGeometry:Z,scriptUsesFeatureSet:H,scriptUsesGeometryEngine:R,scriptUsesModules:X,scriptUsesViewProperties:ee},Symbol.toStringTag,{value:"Module"}));export{Y as A,ee as B,W as _,C as a,D as b,g as c,B as d,G as e,te as f,R as g,ne as h,v as i,E as j,U as k,Q as l,_ as m,P as n,L as o,F as p,$ as q,I as r,Z as s,N as t,O as u,T as v,V as w,H as x,J as y,X as z};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{g as r}from"./_commonjsHelpers.js";var e,t={exports:{}};function n(){return e||(e=1,r=t,n="undefined"!=typeof document?document.currentScript?.src:void 0,a=async function(r={}){var e,t,a,o=r,i=new Promise(((r,n)=>{e=r,t=n})),u="./this.program",s="";function f(r){return o.locateFile?o.locateFile(r,s):s+r}"undefined"!=typeof document&&document.currentScript&&(s=document.currentScript.src),n&&(s=n),s=s.startsWith("blob:")?"":s.slice(0,s.replace(/[?#].*/,"").lastIndexOf("/")+1),a=async r=>{var e=await fetch(r,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)},console.log.bind(console);var c,l,p,v,d,h,g,m,y,w,T,b,A=console.error.bind(console),C=!1;function W(){var r=l.buffer;p=new Int8Array(r),d=new Int16Array(r),o.HEAPU8=v=new Uint8Array(r),h=new Uint16Array(r),g=new Int32Array(r),o.HEAPU32=m=new Uint32Array(r),y=new Float32Array(r),o.HEAPF64=b=new Float64Array(r),w=new BigInt64Array(r),T=new BigUint64Array(r)}function P(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)z(o.preRun.shift());j(L)}function E(){Le.E()}function F(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)N(o.postRun.shift());j(H)}var _,x=0,R=null;function S(r){x++,o.monitorRunDependencies?.(x)}function $(r){if(x--,o.monitorRunDependencies?.(x),0==x&&R){var e=R;R=null,e()}}function k(r){o.onAbort?.(r),A(r="Aborted("+r+")"),C=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw t(e),e}function I(){return f("lyr3DMain.wasm")}function O(r){if(r==_&&c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}async function U(r){if(!c)try{var e=await a(r);return new Uint8Array(e)}catch{}return O(r)}async function D(r,e){try{var t=await U(r);return await WebAssembly.instantiate(t,e)}catch(n){A(`failed to asynchronously prepare wasm: ${n}`),k(n)}}async function V(r,e,t){if(!r&&"function"==typeof WebAssembly.instantiateStreaming)try{var n=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(a){A(`wasm streaming compile failed: ${a}`),A("falling back to ArrayBuffer instantiation")}return D(e,t)}function B(){return{a:Ne}}async function M(){function r(r,e){return Le=r.exports,l=Le.D,W(),$r=Le.G,$(),Le}function e(e){return r(e.instance)}S();var n=B();if(o.instantiateWasm)return new Promise(((e,t)=>{o.instantiateWasm(n,((t,n)=>{e(r(t))}))}));_??=I();try{return e(await V(c,_,n))}catch(a){return t(a),Promise.reject(a)}}var j=r=>{for(;r.length>0;)r.shift()(o)},H=[],N=r=>H.push(r),L=[],z=r=>L.push(r);class G{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){m[this.ptr+4>>2]=r}get_type(){return m[this.ptr+4>>2]}set_destructor(r){m[this.ptr+8>>2]=r}get_destructor(){return m[this.ptr+8>>2]}set_caught(r){r=r?1:0,p[this.ptr+12]=r}get_caught(){return 0!=p[this.ptr+12]}set_rethrown(r){r=r?1:0,p[this.ptr+13]=r}get_rethrown(){return 0!=p[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){m[this.ptr+16>>2]=r}get_adjusted_ptr(){return m[this.ptr+16>>2]}}var Y=(r,e,t)=>{throw new G(r).init(e,t),r},q=()=>k(""),J={},K=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function Q(r){return this.fromWireType(m[r>>2])}var X,Z={},rr={},er={},tr=o.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},nr=r=>{throw new tr(r)},ar=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&nr("Mismatched type converter count");for(var a=0;a<r.length;++a)dr(r[a],n[a])}r.forEach((r=>er[r]=e));var a=new Array(e.length),o=[],i=0;e.forEach(((r,e)=>{rr.hasOwnProperty(r)?a[e]=rr[r]:(o.push(r),Z.hasOwnProperty(r)||(Z[r]=[]),Z[r].push((()=>{a[e]=rr[r],++i===o.length&&n(a)})))})),0===o.length&&n(a)},or=r=>{var e=J[r];delete J[r];var t=e.elements,n=t.length,a=t.map((r=>r.getterReturnType)).concat(t.map((r=>r.setterArgumentType))),o=e.rawConstructor,i=e.rawDestructor;ar([r],a,(r=>(t.forEach(((e,t)=>{var a=r[t],o=e.getter,i=e.getterContext,u=r[t+n],s=e.setter,f=e.setterContext;e.read=r=>a.fromWireType(o(i,r)),e.write=(r,e)=>{var t=[];s(f,r,u.toWireType(t,e)),K(t)}})),[{name:e.name,fromWireType:r=>{for(var e=new Array(n),a=0;a<n;++a)e[a]=t[a].read(r);return i(r),e},toWireType:(r,a)=>{if(n!==a.length)throw new TypeError(`Incorrect number of tuple elements for ${e.name}: expected=${n}, actual=${a.length}`);for(var u=o(),s=0;s<n;++s)t[s].write(u,a[s]);return null!==r&&r.push(i,u),u},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:i}])))},ir={},ur=r=>{var e=ir[r];delete ir[r];var t=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map((r=>r.getterReturnType)).concat(a.map((r=>r.setterArgumentType)));ar([r],o,(r=>{var o={};return a.forEach(((e,t)=>{var n=e.fieldName,i=r[t],u=r[t].optional,s=e.getter,f=e.getterContext,c=r[t+a.length],l=e.setter,p=e.setterContext;o[n]={read:r=>i.fromWireType(s(f,r)),write:(r,e)=>{var t=[];l(p,r,c.toWireType(t,e)),K(t)},optional:u}})),[{name:e.name,fromWireType:r=>{var e={};for(var t in o)e[t]=o[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var a in o)if(!(a in e)&&!o[a].optional)throw new TypeError(`Missing field: "${a}"`);var i=t();for(a in o)o[a].write(i,e[a]);return null!==r&&r.push(n,i),i},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:n}]}))},sr=r=>{if(null===r)return"null";var e=typeof r;return"object"===e||"array"===e||"function"===e?r.toString():""+r},fr=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);X=r},cr=r=>{for(var e="",t=r;v[t];)e+=X[v[t++]];return e},lr=o.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},pr=r=>{throw new lr(r)};function vr(r,e,t={}){var n=e.name;if(r||pr(`type "${n}" must have a positive integer typeid pointer`),rr.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;pr(`Cannot register type '${n}' twice`)}if(rr[r]=e,delete er[r],Z.hasOwnProperty(r)){var a=Z[r];delete Z[r],a.forEach((r=>r()))}}function dr(r,e,t={}){return vr(r,e,t)}var hr=(r,e,t)=>{switch(e){case 1:return t?r=>p[r]:r=>v[r];case 2:return t?r=>d[r>>1]:r=>h[r>>1];case 4:return t?r=>g[r>>2]:r=>m[r>>2];case 8:return t?r=>w[r>>3]:r=>T[r>>3];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},gr=(r,e,t,n,a)=>{var o=-1!=(e=cr(e)).indexOf("u");dr(r,{name:e,fromWireType:r=>r,toWireType:function(r,e){if("bigint"!=typeof e&&"number"!=typeof e)throw new TypeError(`Cannot convert "${sr(e)}" to ${this.name}`);return"number"==typeof e&&(e=BigInt(e)),e},argPackAdvance:mr,readValueFromPointer:hr(e,t,!o),destructorFunction:null})},mr=8,yr=(r,e,t,n)=>{dr(r,{name:e=cr(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},argPackAdvance:mr,readValueFromPointer:function(r){return this.fromWireType(v[r])},destructorFunction:null})},wr=[],Tr=[],br=r=>{r>9&&0==--Tr[r+1]&&(Tr[r]=void 0,wr.push(r))},Ar=()=>Tr.length/2-5-wr.length,Cr=()=>{Tr.push(0,1,void 0,1,null,1,!0,1,!1,1),o.count_emval_handles=Ar},Wr={toValue:r=>(r||pr(`Cannot use deleted val. handle = ${r}`),Tr[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=wr.pop()||Tr.length;return Tr[e]=r,Tr[e+1]=1,e}}}},Pr={name:"emscripten::val",fromWireType:r=>{var e=Wr.toValue(r);return br(r),e},toWireType:(r,e)=>Wr.toHandle(e),argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:null},Er=r=>dr(r,Pr),Fr=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(y[r>>2])};case 8:return function(r){return this.fromWireType(b[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},_r=(r,e,t)=>{dr(r,{name:e=cr(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:mr,readValueFromPointer:Fr(e,t),destructorFunction:null})},xr=(r,e)=>Object.defineProperty(e,"name",{value:r});function Rr(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function Sr(r,e,t,n,a,o){var i=e.length;i<2&&pr("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];var u=Rr(e),s="void"!==e[0].name,f=i-2,c=new Array(f),l=[],p=[];return xr(r,(function(...r){var t;p.length=0,l.length=1,l[0]=a;for(var o=0;o<f;++o)c[o]=e[o+2].toWireType(p,r[o]),l.push(c[o]);function i(r){if(u)K(p);else for(var n=2;n<e.length;n++){var a=1===n?t:c[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(a)}if(s)return e[0].fromWireType(r)}return i(n(...l))}))}var $r,kr=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||pr(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Ir=(r,e,t)=>{o.hasOwnProperty(r)?((void 0===t||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[t])&&pr(`Cannot register public name '${r}' twice`),kr(o,r,r),o[r].overloadTable.hasOwnProperty(t)&&pr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[r].overloadTable[t]=e):(o[r]=e,o[r].argCount=t)},Or=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(m[e+4*n>>2]);return t},Ur=(r,e,t)=>{o.hasOwnProperty(r)||nr("Replacing nonexistent public symbol"),void 0!==o[r].overloadTable&&void 0!==t?o[r].overloadTable[t]=e:(o[r]=e,o[r].argCount=t)},Dr=[],Vr=r=>{var e=Dr[r];return e||(Dr[r]=e=$r.get(r)),e},Br=(r,e,t=!1)=>{function n(){return Vr(e)}r=cr(r);var a=n();return"function"!=typeof a&&pr(`unknown function pointer with signature ${r}: ${e}`),a};class Mr extends Error{}var jr,Hr=r=>{var e=ze(r),t=cr(e);return Ge(e),t},Nr=(r,e)=>{var t=[],n={};function a(r){n[r]||rr[r]||(er[r]?er[r].forEach(a):(t.push(r),n[r]=!0))}throw e.forEach(a),new Mr(`${r}: `+t.map(Hr).join([", "]))},Lr=r=>{const e=(r=r.trim()).indexOf("(");return-1===e?r:r.slice(0,e)},zr=(r,e,t,n,a,o,i,u)=>{var s=Or(e,t);r=cr(r),r=Lr(r),a=Br(n,a,i),Ir(r,(function(){Nr(`Cannot call ${r} due to unbound types`,s)}),e-1),ar([],s,(t=>{var n=[t[0],null].concat(t.slice(1));return Ur(r,Sr(r,n,null,a,o),e-1),[]}))},Gr=(r,e,t,n,a)=>{e=cr(e);var o=r=>r;if(0===n){var i=32-8*t;o=r=>r<<i>>>i}var u=e.includes("unsigned"),s=(r,e)=>{};dr(r,{name:e,fromWireType:o,toWireType:u?function(r,e){return s(e,this.name),e>>>0}:function(r,e){return s(e,this.name),e},argPackAdvance:mr,readValueFromPointer:hr(e,t,0!==n),destructorFunction:null})},Yr=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][e];function a(r){var e=m[r>>2],t=m[r+4>>2];return new n(p.buffer,t,e)}dr(r,{name:t=cr(t),fromWireType:a,argPackAdvance:mr,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},qr=(r,e,t,n)=>{if(!(n>0))return 0;for(var a=t,o=t+n-1,i=0;i<r.length;++i){var u=r.charCodeAt(i);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&r.charCodeAt(++i)),u<=127){if(t>=o)break;e[t++]=u}else if(u<=2047){if(t+1>=o)break;e[t++]=192|u>>6,e[t++]=128|63&u}else if(u<=65535){if(t+2>=o)break;e[t++]=224|u>>12,e[t++]=128|u>>6&63,e[t++]=128|63&u}else{if(t+3>=o)break;e[t++]=240|u>>18,e[t++]=128|u>>12&63,e[t++]=128|u>>6&63,e[t++]=128|63&u}}return e[t]=0,t-a},Jr=(r,e,t)=>qr(r,v,e,t),Kr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},Qr="undefined"!=typeof TextDecoder?new TextDecoder:void 0,Xr=(r,e=0,t=NaN)=>{for(var n=e+t,a=e;r[a]&&!(a>=n);)++a;if(a-e>16&&r.buffer&&Qr)return Qr.decode(r.subarray(e,a));for(var o="";e<a;){var i=r[e++];if(128&i){var u=63&r[e++];if(192!=(224&i)){var s=63&r[e++];if((i=224==(240&i)?(15&i)<<12|u<<6|s:(7&i)<<18|u<<12|s<<6|63&r[e++])<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|1023&f)}}else o+=String.fromCharCode((31&i)<<6|u)}else o+=String.fromCharCode(i)}return o},Zr=(r,e)=>r?Xr(v,r,e):"",re=(r,e)=>{dr(r,{name:e=cr(e),fromWireType(r){for(var e,t=m[r>>2],n=r+4,a=n,o=0;o<=t;++o){var i=n+o;if(o==t||0==v[i]){var u=Zr(a,i-a);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),a=i+1}}return Ge(r),e},toWireType(r,e){var t;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"==typeof e;n||ArrayBuffer.isView(e)&&1==e.BYTES_PER_ELEMENT||pr("Cannot pass non-string to std::string"),t=n?Kr(e):e.length;var a=Ye(4+t+1),o=a+4;return m[a>>2]=t,n?Jr(e,o,t+1):v.set(e,o),null!==r&&r.push(Ge,a),a},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction(r){Ge(r)}})},ee="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,te=(r,e)=>{for(var t=r,n=t>>1,a=n+e/2;!(n>=a)&&h[n];)++n;if((t=n<<1)-r>32&&ee)return ee.decode(v.subarray(r,t));for(var o="",i=0;!(i>=e/2);++i){var u=d[r+2*i>>1];if(0==u)break;o+=String.fromCharCode(u)}return o},ne=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,o=0;o<a;++o){var i=r.charCodeAt(o);d[e>>1]=i,e+=2}return d[e>>1]=0,e-n},ae=r=>2*r.length,oe=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var a=g[r+4*t>>2];if(0==a)break;if(++t,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(a)}return n},ie=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,a=n+t-4,o=0;o<r.length;++o){var i=r.charCodeAt(o);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++o)),g[e>>2]=i,(e+=4)+4>a)break}return g[e>>2]=0,e-n},ue=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},se=(r,e,t)=>{var n,a,o,i;t=cr(t),2===e?(n=te,a=ne,i=ae,o=r=>h[r>>1]):4===e&&(n=oe,a=ie,i=ue,o=r=>m[r>>2]),dr(r,{name:t,fromWireType:r=>{for(var t,a=m[r>>2],i=r+4,u=0;u<=a;++u){var s=r+4+u*e;if(u==a||0==o(s)){var f=n(i,s-i);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),i=s+e}}return Ge(r),t},toWireType:(r,n)=>{"string"!=typeof n&&pr(`Cannot pass non-string to C++ string type ${t}`);var o=i(n),u=Ye(4+o+e);return m[u>>2]=o/e,a(n,u+4,o+e),null!==r&&r.push(Ge,u),u},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction(r){Ge(r)}})},fe=(r,e,t,n,a,o)=>{J[r]={name:cr(e),rawConstructor:Br(t,n),rawDestructor:Br(a,o),elements:[]}},ce=(r,e,t,n,a,o,i,u,s)=>{J[r].elements.push({getterReturnType:e,getter:Br(t,n),getterContext:a,setterArgumentType:o,setter:Br(i,u),setterContext:s})},le=(r,e,t,n,a,o)=>{ir[r]={name:cr(e),rawConstructor:Br(t,n),rawDestructor:Br(a,o),fields:[]}},pe=(r,e,t,n,a,o,i,u,s,f)=>{ir[r].fields.push({fieldName:cr(e),getterReturnType:t,getter:Br(n,a),getterContext:o,setterArgumentType:i,setter:Br(u,s),setterContext:f})},ve=(r,e)=>{dr(r,{isVoid:!0,name:e=cr(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},de=r=>{r>9&&(Tr[r+1]+=1)},he=()=>Wr.toHandle([]),ge={},me=r=>{var e=ge[r];return void 0===e?cr(r):e},ye=r=>Wr.toHandle(me(r)),we=()=>Wr.toHandle({}),Te=(r,e,t)=>{r=Wr.toValue(r),e=Wr.toValue(e),t=Wr.toValue(t),r[e]=t},be=(r,e)=>{var t=rr[r];return void 0===t&&pr(`${e} has unknown type ${Hr(r)}`),t},Ae=(r,e)=>{var t=(r=be(r,"_emval_take_value")).readValueFromPointer(e);return Wr.toHandle(t)},Ce=(r,e,t,n)=>{var a=(new Date).getFullYear(),o=new Date(a,0,1),i=new Date(a,6,1),u=o.getTimezoneOffset(),s=i.getTimezoneOffset(),f=Math.max(u,s);m[r>>2]=60*f,g[e>>2]=Number(u!=s);var c=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},l=c(u),p=c(s);s<u?(Jr(l,t,17),Jr(p,n,17)):(Jr(l,n,17),Jr(p,t,17))},We=()=>2147483648,Pe=(r,e)=>Math.ceil(r/e)*e,Ee=r=>{var e=(r-l.buffer.byteLength+65535)/65536|0;try{return l.grow(e),W(),1}catch(t){}},Fe=r=>{var e=v.length;r>>>=0;var t=We();if(r>t)return!1;for(var n=1;n<=4;n*=2){var a=e*(1+.2/n);a=Math.min(a,r+100663296);var o=Math.min(t,Pe(Math.max(r,a),65536));if(Ee(o))return!0}return!1},_e={},xe=()=>u||"./this.program",Re=()=>{if(!Re.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:xe()};for(var e in _e)void 0===_e[e]?delete r[e]:r[e]=_e[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Re.strings=t}return Re.strings},Se=(r,e)=>{var t=0,n=0;for(var a of Re()){var o=e+t;m[r+n>>2]=o,t+=Jr(a,o,1/0)+1,n+=4}return 0},$e=(r,e)=>{var t=Re();m[r>>2]=t.length;var n=0;for(var a of t)n+=Kr(a)+1;return m[e>>2]=n,0},ke=(r,e)=>{r<128?e.push(r):e.push(r%128|128,r>>7)},Ie=r=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==r[0]?[]:[e[r[0]]]},n=1;n<r.length;++n)t.parameters.push(e[r[n]]);return t},Oe=(r,e)=>{var t=r.slice(0,1),n=r.slice(1),a={i:127,p:127,j:126,f:125,d:124,e:111};for(var o of(e.push(96),ke(n.length,e),n))e.push(a[o]);"v"==t?e.push(0):e.push(1,a[t])},Ue=(r,e)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function(Ie(e),r);var t=[1];Oe(e,t);var n=[0,97,115,109,1,0,0,0,1];ke(t.length,n),n.push(...t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var a=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(a,{e:{f:r}}).exports.f},De=(r,e)=>{if(jr)for(var t=r;t<r+e;t++){var n=Vr(t);n&&jr.set(n,t)}},Ve=r=>(jr||(jr=new WeakMap,De(0,$r.length)),jr.get(r)||0),Be=[],Me=()=>{if(Be.length)return Be.pop();try{$r.grow(1)}catch(A){if(!(A instanceof RangeError))throw A;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return $r.length-1},je=(r,e)=>{$r.set(r,e),Dr[r]=$r.get(r)},He=(r,e)=>{var t=Ve(r);if(t)return t;var n=Me();try{je(n,r)}catch(A){if(!(A instanceof TypeError))throw A;var a=Ue(r,e);je(n,a)}return jr.set(r,n),n};fr(),Cr(),o.noExitRuntime&&o.noExitRuntime,o.print&&o.print,o.printErr&&(A=o.printErr),o.wasmBinary&&(c=o.wasmBinary),o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.addFunction=He,o.UTF8ToString=Zr;var Ne={k:Y,y:q,l:or,t:ur,q:gr,r:yr,B:Er,p:_r,c:zr,h:Gr,b:Yr,C:re,n:se,m:fe,d:ce,u:le,i:pe,s:ve,a:br,o:de,A:he,g:ye,j:we,e:Te,f:Ae,v:Ce,z:Fe,w:Se,x:$e},Le=await M();Le.E;var ze=Le.F,Ge=o._free=Le.H,Ye=o._malloc=Le.I;function qe(){function r(){o.calledRun=!0,C||(E(),e(o),o.onRuntimeInitialized?.(),F())}x>0?R=qe:(P(),x>0?R=qe:o.setStatus?(o.setStatus("Running..."),setTimeout((()=>{setTimeout((()=>o.setStatus("")),1),r()}),1)):r())}function Je(){if(o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.shift()()}return Je(),qe(),i},r.exports=a,r.exports.default=a),t.exports;var r,n,a}const a=r(n()),o=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));export{o as l};
5
+ import{g as r}from"./_commonjsHelpers.js";var e,t={exports:{}};function n(){return e||(e=1,r=t,n="undefined"!=typeof document?document.currentScript?.src:void 0,a=async function(r={}){var e,t,a,o=r,i=new Promise(((r,n)=>{e=r,t=n})),u="./this.program",s="";function f(r){return o.locateFile?o.locateFile(r,s):s+r}"undefined"!=typeof document&&document.currentScript&&(s=document.currentScript.src),n&&(s=n),s=s.startsWith("blob:")?"":s.slice(0,s.replace(/[?#].*/,"").lastIndexOf("/")+1),a=async r=>{var e=await fetch(r,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)},console.log.bind(console);var c,l,p,v,d,h,g,m,y,w,T,b,A=console.error.bind(console),C=!1;function W(){var r=l.buffer;p=new Int8Array(r),d=new Int16Array(r),o.HEAPU8=v=new Uint8Array(r),h=new Uint16Array(r),g=new Int32Array(r),o.HEAPU32=m=new Uint32Array(r),y=new Float32Array(r),o.HEAPF64=b=new Float64Array(r),w=new BigInt64Array(r),T=new BigUint64Array(r)}function P(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)z(o.preRun.shift());j(L)}function E(){Le.E()}function F(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)N(o.postRun.shift());j(H)}var _,x=0,R=null;function S(r){x++,o.monitorRunDependencies?.(x)}function $(r){if(x--,o.monitorRunDependencies?.(x),0==x&&R){var e=R;R=null,e()}}function k(r){o.onAbort?.(r),A(r="Aborted("+r+")"),C=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw t(e),e}function I(){return f("lyr3DMain.wasm")}function O(r){if(r==_&&c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}async function U(r){if(!c)try{var e=await a(r);return new Uint8Array(e)}catch{}return O(r)}async function D(r,e){try{var t=await U(r);return await WebAssembly.instantiate(t,e)}catch(n){A(`failed to asynchronously prepare wasm: ${n}`),k(n)}}async function V(r,e,t){if(!r&&"function"==typeof WebAssembly.instantiateStreaming)try{var n=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(a){A(`wasm streaming compile failed: ${a}`),A("falling back to ArrayBuffer instantiation")}return D(e,t)}function B(){return{a:Ne}}async function M(){function r(r,e){return Le=r.exports,l=Le.D,W(),$r=Le.G,$(),Le}function e(e){return r(e.instance)}S();var n=B();if(o.instantiateWasm)return new Promise(((e,t)=>{o.instantiateWasm(n,((t,n)=>{e(r(t))}))}));_??=I();try{return e(await V(c,_,n))}catch(a){return t(a),Promise.reject(a)}}var j=r=>{for(;r.length>0;)r.shift()(o)},H=[],N=r=>H.push(r),L=[],z=r=>L.push(r);class G{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){m[this.ptr+4>>2]=r}get_type(){return m[this.ptr+4>>2]}set_destructor(r){m[this.ptr+8>>2]=r}get_destructor(){return m[this.ptr+8>>2]}set_caught(r){r=r?1:0,p[this.ptr+12]=r}get_caught(){return 0!=p[this.ptr+12]}set_rethrown(r){r=r?1:0,p[this.ptr+13]=r}get_rethrown(){return 0!=p[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){m[this.ptr+16>>2]=r}get_adjusted_ptr(){return m[this.ptr+16>>2]}}var Y=(r,e,t)=>{throw new G(r).init(e,t),r},q=()=>k(""),J={},K=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function Q(r){return this.fromWireType(m[r>>2])}var X,Z={},rr={},er={},tr=o.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},nr=r=>{throw new tr(r)},ar=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&nr("Mismatched type converter count");for(var a=0;a<r.length;++a)dr(r[a],n[a])}r.forEach((r=>er[r]=e));var a=new Array(e.length),o=[],i=0;e.forEach(((r,e)=>{rr.hasOwnProperty(r)?a[e]=rr[r]:(o.push(r),Z.hasOwnProperty(r)||(Z[r]=[]),Z[r].push((()=>{a[e]=rr[r],++i===o.length&&n(a)})))})),0===o.length&&n(a)},or=r=>{var e=J[r];delete J[r];var t=e.elements,n=t.length,a=t.map((r=>r.getterReturnType)).concat(t.map((r=>r.setterArgumentType))),o=e.rawConstructor,i=e.rawDestructor;ar([r],a,(r=>(t.forEach(((e,t)=>{var a=r[t],o=e.getter,i=e.getterContext,u=r[t+n],s=e.setter,f=e.setterContext;e.read=r=>a.fromWireType(o(i,r)),e.write=(r,e)=>{var t=[];s(f,r,u.toWireType(t,e)),K(t)}})),[{name:e.name,fromWireType:r=>{for(var e=new Array(n),a=0;a<n;++a)e[a]=t[a].read(r);return i(r),e},toWireType:(r,a)=>{if(n!==a.length)throw new TypeError(`Incorrect number of tuple elements for ${e.name}: expected=${n}, actual=${a.length}`);for(var u=o(),s=0;s<n;++s)t[s].write(u,a[s]);return null!==r&&r.push(i,u),u},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:i}])))},ir={},ur=r=>{var e=ir[r];delete ir[r];var t=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map((r=>r.getterReturnType)).concat(a.map((r=>r.setterArgumentType)));ar([r],o,(r=>{var o={};return a.forEach(((e,t)=>{var n=e.fieldName,i=r[t],u=r[t].optional,s=e.getter,f=e.getterContext,c=r[t+a.length],l=e.setter,p=e.setterContext;o[n]={read:r=>i.fromWireType(s(f,r)),write:(r,e)=>{var t=[];l(p,r,c.toWireType(t,e)),K(t)},optional:u}})),[{name:e.name,fromWireType:r=>{var e={};for(var t in o)e[t]=o[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var a in o)if(!(a in e)&&!o[a].optional)throw new TypeError(`Missing field: "${a}"`);var i=t();for(a in o)o[a].write(i,e[a]);return null!==r&&r.push(n,i),i},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:n}]}))},sr=r=>{if(null===r)return"null";var e=typeof r;return"object"===e||"array"===e||"function"===e?r.toString():""+r},fr=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);X=r},cr=r=>{for(var e="",t=r;v[t];)e+=X[v[t++]];return e},lr=o.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},pr=r=>{throw new lr(r)};function vr(r,e,t={}){var n=e.name;if(r||pr(`type "${n}" must have a positive integer typeid pointer`),rr.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;pr(`Cannot register type '${n}' twice`)}if(rr[r]=e,delete er[r],Z.hasOwnProperty(r)){var a=Z[r];delete Z[r],a.forEach((r=>r()))}}function dr(r,e,t={}){return vr(r,e,t)}var hr=(r,e,t)=>{switch(e){case 1:return t?r=>p[r]:r=>v[r];case 2:return t?r=>d[r>>1]:r=>h[r>>1];case 4:return t?r=>g[r>>2]:r=>m[r>>2];case 8:return t?r=>w[r>>3]:r=>T[r>>3];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},gr=(r,e,t,n,a)=>{var o=-1!=(e=cr(e)).indexOf("u");dr(r,{name:e,fromWireType:r=>r,toWireType:function(r,e){if("bigint"!=typeof e&&"number"!=typeof e)throw new TypeError(`Cannot convert "${sr(e)}" to ${this.name}`);return"number"==typeof e&&(e=BigInt(e)),e},argPackAdvance:mr,readValueFromPointer:hr(e,t,!o),destructorFunction:null})},mr=8,yr=(r,e,t,n)=>{dr(r,{name:e=cr(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},argPackAdvance:mr,readValueFromPointer:function(r){return this.fromWireType(v[r])},destructorFunction:null})},wr=[],Tr=[],br=r=>{r>9&&0==--Tr[r+1]&&(Tr[r]=void 0,wr.push(r))},Ar=()=>Tr.length/2-5-wr.length,Cr=()=>{Tr.push(0,1,void 0,1,null,1,!0,1,!1,1),o.count_emval_handles=Ar},Wr={toValue:r=>(r||pr(`Cannot use deleted val. handle = ${r}`),Tr[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=wr.pop()||Tr.length;return Tr[e]=r,Tr[e+1]=1,e}}}},Pr={name:"emscripten::val",fromWireType:r=>{var e=Wr.toValue(r);return br(r),e},toWireType:(r,e)=>Wr.toHandle(e),argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:null},Er=r=>dr(r,Pr),Fr=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(y[r>>2])};case 8:return function(r){return this.fromWireType(b[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},_r=(r,e,t)=>{dr(r,{name:e=cr(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:mr,readValueFromPointer:Fr(e,t),destructorFunction:null})},xr=(r,e)=>Object.defineProperty(e,"name",{value:r});function Rr(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function Sr(r,e,t,n,a,o){var i=e.length;i<2&&pr("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];var u=Rr(e),s="void"!==e[0].name,f=i-2,c=new Array(f),l=[],p=[];return xr(r,(function(...r){var t;p.length=0,l.length=1,l[0]=a;for(var o=0;o<f;++o)c[o]=e[o+2].toWireType(p,r[o]),l.push(c[o]);function i(r){if(u)K(p);else for(var n=2;n<e.length;n++){var a=1===n?t:c[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(a)}if(s)return e[0].fromWireType(r)}return i(n(...l))}))}var $r,kr=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||pr(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Ir=(r,e,t)=>{o.hasOwnProperty(r)?((void 0===t||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[t])&&pr(`Cannot register public name '${r}' twice`),kr(o,r,r),o[r].overloadTable.hasOwnProperty(t)&&pr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[r].overloadTable[t]=e):(o[r]=e,o[r].argCount=t)},Or=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(m[e+4*n>>2]);return t},Ur=(r,e,t)=>{o.hasOwnProperty(r)||nr("Replacing nonexistent public symbol"),void 0!==o[r].overloadTable&&void 0!==t?o[r].overloadTable[t]=e:(o[r]=e,o[r].argCount=t)},Dr=[],Vr=r=>{var e=Dr[r];return e||(Dr[r]=e=$r.get(r)),e},Br=(r,e,t=!1)=>{function n(){return Vr(e)}r=cr(r);var a=n();return"function"!=typeof a&&pr(`unknown function pointer with signature ${r}: ${e}`),a};class Mr extends Error{}var jr,Hr=r=>{var e=ze(r),t=cr(e);return Ye(e),t},Nr=(r,e)=>{var t=[],n={};function a(r){n[r]||rr[r]||(er[r]?er[r].forEach(a):(t.push(r),n[r]=!0))}throw e.forEach(a),new Mr(`${r}: `+t.map(Hr).join([", "]))},Lr=r=>{const e=(r=r.trim()).indexOf("(");return-1===e?r:r.slice(0,e)},zr=(r,e,t,n,a,o,i,u)=>{var s=Or(e,t);r=cr(r),r=Lr(r),a=Br(n,a,i),Ir(r,(function(){Nr(`Cannot call ${r} due to unbound types`,s)}),e-1),ar([],s,(t=>{var n=[t[0],null].concat(t.slice(1));return Ur(r,Sr(r,n,null,a,o),e-1),[]}))},Gr=(r,e,t,n,a)=>{e=cr(e);var o=r=>r;if(0===n){var i=32-8*t;o=r=>r<<i>>>i}var u=e.includes("unsigned"),s=(r,e)=>{};dr(r,{name:e,fromWireType:o,toWireType:u?function(r,e){return s(e,this.name),e>>>0}:function(r,e){return s(e,this.name),e},argPackAdvance:mr,readValueFromPointer:hr(e,t,0!==n),destructorFunction:null})},Yr=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][e];function a(r){var e=m[r>>2],t=m[r+4>>2];return new n(p.buffer,t,e)}dr(r,{name:t=cr(t),fromWireType:a,argPackAdvance:mr,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},qr=(r,e,t,n)=>{if(!(n>0))return 0;for(var a=t,o=t+n-1,i=0;i<r.length;++i){var u=r.charCodeAt(i);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&r.charCodeAt(++i)),u<=127){if(t>=o)break;e[t++]=u}else if(u<=2047){if(t+1>=o)break;e[t++]=192|u>>6,e[t++]=128|63&u}else if(u<=65535){if(t+2>=o)break;e[t++]=224|u>>12,e[t++]=128|u>>6&63,e[t++]=128|63&u}else{if(t+3>=o)break;e[t++]=240|u>>18,e[t++]=128|u>>12&63,e[t++]=128|u>>6&63,e[t++]=128|63&u}}return e[t]=0,t-a},Jr=(r,e,t)=>qr(r,v,e,t),Kr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},Qr="undefined"!=typeof TextDecoder?new TextDecoder:void 0,Xr=(r,e=0,t=NaN)=>{for(var n=e+t,a=e;r[a]&&!(a>=n);)++a;if(a-e>16&&r.buffer&&Qr)return Qr.decode(r.subarray(e,a));for(var o="";e<a;){var i=r[e++];if(128&i){var u=63&r[e++];if(192!=(224&i)){var s=63&r[e++];if((i=224==(240&i)?(15&i)<<12|u<<6|s:(7&i)<<18|u<<12|s<<6|63&r[e++])<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|1023&f)}}else o+=String.fromCharCode((31&i)<<6|u)}else o+=String.fromCharCode(i)}return o},Zr=(r,e)=>r?Xr(v,r,e):"",re=(r,e)=>{dr(r,{name:e=cr(e),fromWireType(r){for(var e,t=m[r>>2],n=r+4,a=n,o=0;o<=t;++o){var i=n+o;if(o==t||0==v[i]){var u=Zr(a,i-a);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),a=i+1}}return Ye(r),e},toWireType(r,e){var t;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"==typeof e;n||ArrayBuffer.isView(e)&&1==e.BYTES_PER_ELEMENT||pr("Cannot pass non-string to std::string"),t=n?Kr(e):e.length;var a=Ge(4+t+1),o=a+4;return m[a>>2]=t,n?Jr(e,o,t+1):v.set(e,o),null!==r&&r.push(Ye,a),a},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction(r){Ye(r)}})},ee="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,te=(r,e)=>{for(var t=r,n=t>>1,a=n+e/2;!(n>=a)&&h[n];)++n;if((t=n<<1)-r>32&&ee)return ee.decode(v.subarray(r,t));for(var o="",i=0;!(i>=e/2);++i){var u=d[r+2*i>>1];if(0==u)break;o+=String.fromCharCode(u)}return o},ne=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,o=0;o<a;++o){var i=r.charCodeAt(o);d[e>>1]=i,e+=2}return d[e>>1]=0,e-n},ae=r=>2*r.length,oe=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var a=g[r+4*t>>2];if(0==a)break;if(++t,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(a)}return n},ie=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,a=n+t-4,o=0;o<r.length;++o){var i=r.charCodeAt(o);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++o)),g[e>>2]=i,(e+=4)+4>a)break}return g[e>>2]=0,e-n},ue=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},se=(r,e,t)=>{var n,a,o,i;t=cr(t),2===e?(n=te,a=ne,i=ae,o=r=>h[r>>1]):4===e&&(n=oe,a=ie,i=ue,o=r=>m[r>>2]),dr(r,{name:t,fromWireType:r=>{for(var t,a=m[r>>2],i=r+4,u=0;u<=a;++u){var s=r+4+u*e;if(u==a||0==o(s)){var f=n(i,s-i);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),i=s+e}}return Ye(r),t},toWireType:(r,n)=>{"string"!=typeof n&&pr(`Cannot pass non-string to C++ string type ${t}`);var o=i(n),u=Ge(4+o+e);return m[u>>2]=o/e,a(n,u+4,o+e),null!==r&&r.push(Ye,u),u},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction(r){Ye(r)}})},fe=(r,e,t,n,a,o)=>{J[r]={name:cr(e),rawConstructor:Br(t,n),rawDestructor:Br(a,o),elements:[]}},ce=(r,e,t,n,a,o,i,u,s)=>{J[r].elements.push({getterReturnType:e,getter:Br(t,n),getterContext:a,setterArgumentType:o,setter:Br(i,u),setterContext:s})},le=(r,e,t,n,a,o)=>{ir[r]={name:cr(e),rawConstructor:Br(t,n),rawDestructor:Br(a,o),fields:[]}},pe=(r,e,t,n,a,o,i,u,s,f)=>{ir[r].fields.push({fieldName:cr(e),getterReturnType:t,getter:Br(n,a),getterContext:o,setterArgumentType:i,setter:Br(u,s),setterContext:f})},ve=(r,e)=>{dr(r,{isVoid:!0,name:e=cr(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},de=r=>{r>9&&(Tr[r+1]+=1)},he=()=>Wr.toHandle([]),ge={},me=r=>{var e=ge[r];return void 0===e?cr(r):e},ye=r=>Wr.toHandle(me(r)),we=()=>Wr.toHandle({}),Te=(r,e,t)=>{r=Wr.toValue(r),e=Wr.toValue(e),t=Wr.toValue(t),r[e]=t},be=(r,e)=>{var t=rr[r];return void 0===t&&pr(`${e} has unknown type ${Hr(r)}`),t},Ae=(r,e)=>{var t=(r=be(r,"_emval_take_value")).readValueFromPointer(e);return Wr.toHandle(t)},Ce=(r,e,t,n)=>{var a=(new Date).getFullYear(),o=new Date(a,0,1),i=new Date(a,6,1),u=o.getTimezoneOffset(),s=i.getTimezoneOffset(),f=Math.max(u,s);m[r>>2]=60*f,g[e>>2]=Number(u!=s);var c=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},l=c(u),p=c(s);s<u?(Jr(l,t,17),Jr(p,n,17)):(Jr(l,n,17),Jr(p,t,17))},We=()=>2147483648,Pe=(r,e)=>Math.ceil(r/e)*e,Ee=r=>{var e=(r-l.buffer.byteLength+65535)/65536|0;try{return l.grow(e),W(),1}catch(t){}},Fe=r=>{var e=v.length;r>>>=0;var t=We();if(r>t)return!1;for(var n=1;n<=4;n*=2){var a=e*(1+.2/n);a=Math.min(a,r+100663296);var o=Math.min(t,Pe(Math.max(r,a),65536));if(Ee(o))return!0}return!1},_e={},xe=()=>u||"./this.program",Re=()=>{if(!Re.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:xe()};for(var e in _e)void 0===_e[e]?delete r[e]:r[e]=_e[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Re.strings=t}return Re.strings},Se=(r,e)=>{var t=0,n=0;for(var a of Re()){var o=e+t;m[r+n>>2]=o,t+=Jr(a,o,1/0)+1,n+=4}return 0},$e=(r,e)=>{var t=Re();m[r>>2]=t.length;var n=0;for(var a of t)n+=Kr(a)+1;return m[e>>2]=n,0},ke=(r,e)=>{r<128?e.push(r):e.push(r%128|128,r>>7)},Ie=r=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==r[0]?[]:[e[r[0]]]},n=1;n<r.length;++n)t.parameters.push(e[r[n]]);return t},Oe=(r,e)=>{var t=r.slice(0,1),n=r.slice(1),a={i:127,p:127,j:126,f:125,d:124,e:111};for(var o of(e.push(96),ke(n.length,e),n))e.push(a[o]);"v"==t?e.push(0):e.push(1,a[t])},Ue=(r,e)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function(Ie(e),r);var t=[1];Oe(e,t);var n=[0,97,115,109,1,0,0,0,1];ke(t.length,n),n.push(...t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var a=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(a,{e:{f:r}}).exports.f},De=(r,e)=>{if(jr)for(var t=r;t<r+e;t++){var n=Vr(t);n&&jr.set(n,t)}},Ve=r=>(jr||(jr=new WeakMap,De(0,$r.length)),jr.get(r)||0),Be=[],Me=()=>{if(Be.length)return Be.pop();try{$r.grow(1)}catch(A){if(!(A instanceof RangeError))throw A;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return $r.length-1},je=(r,e)=>{$r.set(r,e),Dr[r]=$r.get(r)},He=(r,e)=>{var t=Ve(r);if(t)return t;var n=Me();try{je(n,r)}catch(A){if(!(A instanceof TypeError))throw A;var a=Ue(r,e);je(n,a)}return jr.set(r,n),n};fr(),Cr(),o.noExitRuntime&&o.noExitRuntime,o.print&&o.print,o.printErr&&(A=o.printErr),o.wasmBinary&&(c=o.wasmBinary),o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.addFunction=He,o.UTF8ToString=Zr;var Ne={k:Y,y:q,l:or,t:ur,q:gr,r:yr,B:Er,p:_r,c:zr,h:Gr,b:Yr,C:re,n:se,m:fe,d:ce,u:le,i:pe,s:ve,a:br,o:de,A:he,g:ye,j:we,e:Te,f:Ae,v:Ce,z:Fe,w:Se,x:$e},Le=await M();Le.E;var ze=Le.F,Ge=o._malloc=Le.H,Ye=o._free=Le.I;function qe(){function r(){o.calledRun=!0,C||(E(),e(o),o.onRuntimeInitialized?.(),F())}x>0?R=qe:(P(),x>0?R=qe:o.setStatus?(o.setStatus("Running..."),setTimeout((()=>{setTimeout((()=>o.setStatus("")),1),r()}),1)):r())}function Je(){if(o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.shift()()}return Je(),qe(),i},r.exports=a,r.exports.default=a),t.exports;var r,n,a}const a=r(n()),o=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));export{o as l};
package/core/Accessor.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{deprecatedFunction as e}from"./deprecate.js";import t from"./Handles.js";import r from"./Logger.js";import{destroyMaybe as s}from"./maybe.js";import{beforeDestroySymbol as o}from"./accessorSupport/beforeDestroy.js";import{get as i}from"./accessorSupport/get.js";import{Lifecycle as c}from"./accessorSupport/interfaces.js";import{getPropertiesMetadata as a}from"./accessorSupport/metadata.js";import n from"./accessorSupport/Properties.js";import{set as _}from"./accessorSupport/set.js";import{getAccessorInterceptor as h}from"./accessorSupport/testSupport.js";import{removeTarget as p,watch as l}from"./accessorSupport/watch.js";import{property as u}from"./accessorSupport/decorators/property.js";import{subclass as d}from"./accessorSupport/decorators/subclass.js";var f,m;function y(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor?.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const v=Symbol("Accessor-Handles"),g=Symbol("Accessor-Initialized");class b{static{f=v,m=g}static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:s}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const o=this;class i extends o{constructor(...e){super(...e),this.inherited=null,s&&s.apply(this,e)}}a(i.prototype);for(const c in e){const t=e[c];i.prototype[c]="function"==typeof t?function(...e){const r=this.inherited;let s;this.inherited=function(...e){if(o.prototype[c])return o.prototype[c].apply(this,e)};try{s=t.apply(this,e)}catch(i){throw this.inherited=r,i}return this.inherited=r,s}:e[c]}for(const c in t){const e=y(t[c]);u(e)(i.prototype,c)}return d(r)(i)}static freeze(e){return e instanceof b?e.__accessor__.mutable=!1:Object.freeze(e),e}static isFrozen(e){return e instanceof b?!e.__accessor__.mutable:Object.isFrozen(e)}constructor(...e){if(this[f]=null,this[m]=!1,this.constructor===b)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new n(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&(t.ctorArgs=this.normalizeCtorArgs?.apply(this,e)??e[0]),h()?.onInstanceConstruct(this)}postscript(){const e=this.__accessor__,t=e.ctorArgs;e.initialize(),t&&(this.set(t),e.ctorArgs=null),e.constructed(),this.initialize(),this[g]=!0}initialize(){}[o](){this[v]=s(this[v])}destroy(){this.destroyed||(p(this),this.__accessor__.destroy(),h()?.onInstanceDestroy(this))}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[g]}get destroyed(){return this.__accessor__?.lifecycle===c.DESTROYED||!1}get destroying(){return this.__accessor__?.lifecycle===c.DESTROYING||!1}commitProperty(e){i(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return _(this,e,t),this}watch(t,s,o){return e(r.getLogger(this),"`watch` is deprecated in favor of reactiveUtils.watch",{replacement:"reactiveUtils.watch",version:"4.32",see:"https://arcg.is/1vaqf42#watch",warnOnce:!0}),l(this,t,s,o)}addHandles(e,r){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}(this[v]??=new t).add(e,r)}removeHandles(e){this[v]?.remove(e)}removeAllHandles(){this[v]?.removeAll()}removeHandlesReference(e){this[v]?.removeReference(e)}hasHandles(e){return!0===this[v]?.has(e)}_override(e,t){void 0===t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,t){null==t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}export{b as default};
5
+ import{deprecatedFunction as e}from"./deprecate.js";import t from"./Handles.js";import r from"./Logger.js";import{destroyMaybe as s}from"./maybe.js";import{beforeDestroySymbol as o}from"./accessorSupport/beforeDestroy.js";import{get as c}from"./accessorSupport/get.js";import{Lifecycle as i}from"./accessorSupport/Lifecycle.js";import{getPropertiesMetadata as a}from"./accessorSupport/metadata.js";import n from"./accessorSupport/Properties.js";import{set as _}from"./accessorSupport/set.js";import{getAccessorInterceptor as h}from"./accessorSupport/testSupport.js";import{removeTarget as p,watch as l}from"./accessorSupport/watch.js";import{property as u}from"./accessorSupport/decorators/property.js";import{subclass as d}from"./accessorSupport/decorators/subclass.js";var f,y;function m(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor?.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const v=Symbol("Accessor-Handles"),g=Symbol("Accessor-Initialized");class b{static{f=v,y=g}static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:s}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const o=this;class c extends o{constructor(...e){super(...e),this.inherited=null,s&&s.apply(this,e)}}a(c.prototype);for(const i in e){const t=e[i];c.prototype[i]="function"==typeof t?function(...e){const r=this.inherited;let s;this.inherited=function(...e){if(o.prototype[i])return o.prototype[i].apply(this,e)};try{s=t.apply(this,e)}catch(c){throw this.inherited=r,c}return this.inherited=r,s}:e[i]}for(const i in t){const e=m(t[i]);u(e)(c.prototype,i)}return d(r)(c)}static freeze(e){return e instanceof b?e.__accessor__.mutable=!1:Object.freeze(e),e}static isFrozen(e){return e instanceof b?!e.__accessor__.mutable:Object.isFrozen(e)}constructor(...e){if(this[f]=null,this[y]=!1,this.constructor===b)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new n(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&(t.ctorArgs=this.normalizeCtorArgs?.apply(this,e)??e[0]),h()?.onInstanceConstruct(this)}postscript(){const e=this.__accessor__,t=e.ctorArgs;e.initialize(),t&&(this.set(t),e.ctorArgs=null),e.constructed(),this.initialize(),this[g]=!0}initialize(){}[o](){this[v]=s(this[v])}destroy(){this.destroyed||(p(this),this.__accessor__.destroy(),h()?.onInstanceDestroy(this))}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[g]}get destroyed(){return this.__accessor__?.lifecycle===i.DESTROYED||!1}get destroying(){return this.__accessor__?.lifecycle===i.DESTROYING||!1}commitProperty(e){c(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return _(this,e,t),this}watch(t,s,o){return e(r.getLogger(this),"`watch` is deprecated in favor of reactiveUtils.watch",{replacement:"reactiveUtils.watch",version:"4.32",see:"https://arcg.is/1vaqf42#watch",warnOnce:!0}),l(this,t,s,o)}addHandles(e,r){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}(this[v]??=new t).add(e,r)}removeHandles(e){this[v]?.remove(e)}removeAllHandles(){this[v]?.removeAll()}removeHandlesReference(e){this[v]?.removeReference(e)}hasHandles(e){return!0===this[v]?.has(e)}_override(e,t){void 0===t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,t){null==t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}export{b as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ const I={INITIALIZING:0,CONSTRUCTING:1,CONSTRUCTED:2,DESTROYING:3,DESTROYED:4};export{I as Lifecycle};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import"../has.js";import{equals as t}from"../lang.js";import"../Logger.js";import e from"../ObjectPool.js";import{Lifecycle as i}from"./interfaces.js";import{Property as s}from"./Property.js";import{OriginId as r,idToName as n,nameToId as o}from"./PropertyOrigin.js";import{Store as a}from"./Store.js";import{trackAccess as c,runTracked as l,initializeDependencyTracking as h}from"./tracking.js";import{Flags as g}from"./tracking/Flags.js";import{TrackingTarget as f}from"./tracking/TrackingTarget.js";function p(t,e,i){return void 0!==t}function m(t,e,s,r){return void 0!==t&&(!(null==s&&t.flags&g.NonNullable)||(r.lifecycle,i.INITIALIZING,!1))}class u{constructor(t){this.host=t,this.propertiesByName=new Map,this.ctorArgs=null,this.lifecycle=i.INITIALIZING,this.store=new a,this.mutable=!0,this._origin=r.USER;const e=this.host.constructor.__accessorMetadata__;for(const i in e){const t=new s(i,e[i]);this.propertiesByName.set(i,t)}this.metadata=e}initialize(){this.lifecycle=i.CONSTRUCTING}constructed(){this.lifecycle=i.CONSTRUCTED}destroy(){this.lifecycle=i.DESTROYED,this.propertiesByName.forEach((t=>t.destroy()))}get initialized(){return this.lifecycle!==i.INITIALIZING}get(t){const e=this.propertiesByName.get(t);if(!p(e))return;if(e.metadata.get)return e.getComputed(this);this.mutable&&c(e);const i=this.store;return i.has(t)?i.get(t):e.metadata.value}originOf(t){const e=this.store.originOf(t);if(void 0===e){const e=this.propertiesByName.get(t);if(void 0!==e&&e.flags&g.HasDefaultValue)return"defaults"}return n(e)}has(t){return this.propertiesByName.has(t)&&this.store.has(t)}keys(){return[...this.propertiesByName.keys()]}internalGet(t){const e=this.propertiesByName.get(t);if(p(e))return this.store.has(t)?this.store.get(t):e.metadata.value}internalSet(t,e){const i=this.propertiesByName.get(t);p(i)&&this._internalSet(i,e)}getDependsInfo(t,e,i){const r=this.propertiesByName.get(e);if(!p(r))return"";const n=new f,o=l(n,(()=>r.metadata.get?.call(t)));let a=`${i}${t.declaredClass.split(".").pop()}.${e}: ${o}\n`;const c=n.accessed??new Set;if(0===c.size)return a;i+=" ";for(const l of c){if(!(l instanceof s))continue;a+=`${i}${l.propertyName}: undefined\n`}return a}setAtOrigin(t,e,i){const s=this.propertiesByName.get(t);if(p(s))return this._setAtOrigin(s,e,i)}isOverridden(t){const e=this.propertiesByName.get(t);return void 0!==e&&!!(e.flags&g.Overridden)}clearOrigin(t,e){const i=this.store,s=this.propertiesByName.get(t);if(!p(s))return;const r=i.isAtOrigin(t,e)&&!(s.flags&g.Overridden);i.delete(t,e),r&&s.notifyChange()}clearOverride(t){const e=this.propertiesByName.get(t);e&&e.flags&g.Overridden&&(e.flags&=~g.Overridden,e.notifyChange())}override(t,e){const i=this.propertiesByName.get(t);if(!m(i,t,e,this))return;const s=i.metadata.cast;if(s){const t=this._cast(s,e),{valid:i,value:r}=t;if(y.release(t),!i)return;e=r}i.flags|=g.Overridden,this._internalSet(i,e)}set(t,e){const i=this.propertiesByName.get(t);if(!m(i,t,e,this))return;const s=i.metadata.cast;if(s){const t=this._cast(s,e),{valid:i,value:r}=t;if(y.release(t),!i)return;e=r}const r=i.metadata.set;r?r.call(this.host,e):this._internalSet(i,e)}setDefaultOrigin(t){this._origin=o(t)}getDefaultOrigin(){return n(this._origin)}notifyChange(t){const e=this.propertiesByName.get(t);void 0!==e&&e.notifyChange()}invalidate(t){const e=this.propertiesByName.get(t);void 0!==e&&e.invalidate()}commit(t){const e=this.propertiesByName.get(t);void 0!==e&&e.commit()}_internalSet(t,e){const s=this.lifecycle!==i.INITIALIZING?this._origin:r.DEFAULTS;this._setAtOrigin(t,e,s)}_setAtOrigin(e,i,s){const r=this.store,n=e.propertyName;if(r.isAtOrigin(n,s)&&t(i,r.get(n))&&~e.flags&g.Overridden)return;const o=r.isBelowOrigin(n,s)||r.isAtOrigin(n,s);o&&e.invalidate(),r.set(n,i,s),o&&e.commit(),h(this.host,e)}_cast(t,e){const i=y.acquire();return i.valid=!0,i.value=e,t&&(i.value=t.call(this.host,e,i)),i}}class d{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}}const y=new e(d);export{u as default};
5
+ import"../has.js";import{equals as t}from"../lang.js";import"../Logger.js";import e from"../ObjectPool.js";import{Lifecycle as i}from"./Lifecycle.js";import{Property as s}from"./Property.js";import{OriginId as r,idToName as n,nameToId as o}from"./PropertyOrigin.js";import{Store as a}from"./Store.js";import{trackAccess as c,runTracked as l,initializeDependencyTracking as h}from"./tracking.js";import{Flags as g}from"./tracking/Flags.js";import{TrackingTarget as f}from"./tracking/TrackingTarget.js";function p(t,e,i){return void 0!==t}function m(t,e,s,r){return void 0!==t&&(!(null==s&&t.flags&g.NonNullable)||(r.lifecycle,i.INITIALIZING,!1))}class u{constructor(t){this.host=t,this.propertiesByName=new Map,this.ctorArgs=null,this.lifecycle=i.INITIALIZING,this.store=new a,this.mutable=!0,this._origin=r.USER;const e=this.host.constructor.__accessorMetadata__;for(const i in e){const t=new s(i,e[i]);this.propertiesByName.set(i,t)}this.metadata=e}initialize(){this.lifecycle=i.CONSTRUCTING}constructed(){this.lifecycle=i.CONSTRUCTED}destroy(){this.lifecycle=i.DESTROYED,this.propertiesByName.forEach((t=>t.destroy()))}get initialized(){return this.lifecycle!==i.INITIALIZING}get(t){const e=this.propertiesByName.get(t);if(!p(e))return;if(e.metadata.get)return e.getComputed(this);this.mutable&&c(e);const i=this.store;return i.has(t)?i.get(t):e.metadata.value}originOf(t){const e=this.store.originOf(t);if(void 0===e){const e=this.propertiesByName.get(t);if(void 0!==e&&e.flags&g.HasDefaultValue)return"defaults"}return n(e)}has(t){return this.propertiesByName.has(t)&&this.store.has(t)}keys(){return[...this.propertiesByName.keys()]}internalGet(t){const e=this.propertiesByName.get(t);if(p(e))return this.store.has(t)?this.store.get(t):e.metadata.value}internalSet(t,e){const i=this.propertiesByName.get(t);p(i)&&this._internalSet(i,e)}getDependsInfo(t,e,i){const r=this.propertiesByName.get(e);if(!p(r))return"";const n=new f,o=l(n,(()=>r.metadata.get?.call(t)));let a=`${i}${t.declaredClass.split(".").pop()}.${e}: ${o}\n`;const c=n.accessed??new Set;if(0===c.size)return a;i+=" ";for(const l of c){if(!(l instanceof s))continue;a+=`${i}${l.propertyName}: undefined\n`}return a}setAtOrigin(t,e,i){const s=this.propertiesByName.get(t);if(p(s))return this._setAtOrigin(s,e,i)}isOverridden(t){const e=this.propertiesByName.get(t);return void 0!==e&&!!(e.flags&g.Overridden)}clearOrigin(t,e){const i=this.store,s=this.propertiesByName.get(t);if(!p(s))return;const r=i.isAtOrigin(t,e)&&!(s.flags&g.Overridden);i.delete(t,e),r&&s.notifyChange()}clearOverride(t){const e=this.propertiesByName.get(t);e&&e.flags&g.Overridden&&(e.flags&=~g.Overridden,e.notifyChange())}override(t,e){const i=this.propertiesByName.get(t);if(!m(i,t,e,this))return;const s=i.metadata.cast;if(s){const t=this._cast(s,e),{valid:i,value:r}=t;if(y.release(t),!i)return;e=r}i.flags|=g.Overridden,this._internalSet(i,e)}set(t,e){const i=this.propertiesByName.get(t);if(!m(i,t,e,this))return;const s=i.metadata.cast;if(s){const t=this._cast(s,e),{valid:i,value:r}=t;if(y.release(t),!i)return;e=r}const r=i.metadata.set;r?r.call(this.host,e):this._internalSet(i,e)}setDefaultOrigin(t){this._origin=o(t)}getDefaultOrigin(){return n(this._origin)}notifyChange(t){const e=this.propertiesByName.get(t);void 0!==e&&e.notifyChange()}invalidate(t){const e=this.propertiesByName.get(t);void 0!==e&&e.invalidate()}commit(t){const e=this.propertiesByName.get(t);void 0!==e&&e.commit()}_internalSet(t,e){const s=this.lifecycle!==i.INITIALIZING?this._origin:r.DEFAULTS;this._setAtOrigin(t,e,s)}_setAtOrigin(e,i,s){const r=this.store,n=e.propertyName;if(r.isAtOrigin(n,s)&&t(i,r.get(n))&&~e.flags&g.Overridden)return;const o=r.isBelowOrigin(n,s)||r.isAtOrigin(n,s);o&&e.invalidate(),r.set(n,i,s),o&&e.commit(),h(this.host,e)}_cast(t,e){const i=y.acquire();return i.valid=!0,i.value=e,t&&(i.value=t.call(this.host,e,i)),i}}class d{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}}const y=new e(d);export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import"../../has.js";import e from"../../Logger.js";import{beforeDestroySymbol as t}from"../beforeDestroy.js";import{Lifecycle as r}from"../interfaces.js";import{getPropertiesMetadata as o}from"../metadata.js";import{trackAccess as s}from"../tracking.js";import{processPrototypePropertyMetadata as i}from"../extensions/serializableProperty.js";const n=new Set,c=new Set;function a(e){return s=>{e??="esri.core.Accessor",s.prototype.declaredClass=e,p(s);const i=[],a=[];let l=s.prototype;for(;l;)l.hasOwnProperty("initialize")&&!n.has(l.initialize)&&(n.add(l.initialize),i.push(l.initialize)),l.hasOwnProperty("destroy")&&!c.has(l.destroy)&&(c.add(l.destroy),a.push(l.destroy)),l=Object.getPrototypeOf(l);n.clear(),c.clear();const f=class extends s{constructor(...e){if(super(...e),this.constructor===f&&"function"==typeof this.postscript){if(i.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let e=i.length-1;e>=0;e--)i[e].call(this)}}),a.length){let e=!1;const o=this[t];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!e){this.__accessor__.lifecycle=r.DESTROYING,e=!0,o.call(this);for(let e=0;e<a.length;e++)a[e].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};f.__accessorMetadata__=o(s.prototype),f.prototype.declaredClass=e;const u=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(f,"name",{value:u,configurable:!0}),f}}function l(e,t){return null==t.get?function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0===r)return;t.mutable&&s(r);const o=t.store;return o.has(e)?o.get(e):r.metadata.value}:function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0!==r)return r.getComputed(t)}}function p(e){const t=e.prototype,s=o(t),n={};for(const o of Object.getOwnPropertyNames(s)){const e=s[o];i(e),n[o]={enumerable:!0,configurable:!0,get:l(o,e),set(t){const s=this.__accessor__;if(void 0!==s){if(s.mutable)return s.initialized&&e.readOnly?f("read-only",o):s.lifecycle===r.CONSTRUCTED&&e.constructOnly?f("construct-only",o):void s.set(o,t)}else Object.defineProperty(this,o,{enumerable:!0,configurable:!0,writable:!0,value:t})}}}Object.defineProperties(e.prototype,n)}const f=(t,r)=>{e.getLogger("esri.core.Accessor").error(`cannot assign to ${t} property '${r}'`)};export{p as finalizeClass,a as subclass};
5
+ import"../../has.js";import e from"../../Logger.js";import{beforeDestroySymbol as t}from"../beforeDestroy.js";import{Lifecycle as r}from"../Lifecycle.js";import{getPropertiesMetadata as o}from"../metadata.js";import{trackAccess as s}from"../tracking.js";import{processPrototypePropertyMetadata as i}from"../extensions/serializableProperty.js";const n=new Set,c=new Set;function a(e){return s=>{e??="esri.core.Accessor",s.prototype.declaredClass=e,p(s);const i=[],a=[];let l=s.prototype;for(;l;)l.hasOwnProperty("initialize")&&!n.has(l.initialize)&&(n.add(l.initialize),i.push(l.initialize)),l.hasOwnProperty("destroy")&&!c.has(l.destroy)&&(c.add(l.destroy),a.push(l.destroy)),l=Object.getPrototypeOf(l);n.clear(),c.clear();const f=class extends s{constructor(...e){if(super(...e),this.constructor===f&&"function"==typeof this.postscript){if(i.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let e=i.length-1;e>=0;e--)i[e].call(this)}}),a.length){let e=!1;const o=this[t];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!e){this.__accessor__.lifecycle=r.DESTROYING,e=!0,o.call(this);for(let e=0;e<a.length;e++)a[e].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};f.__accessorMetadata__=o(s.prototype),f.prototype.declaredClass=e;const u=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(f,"name",{value:u,configurable:!0}),f}}function l(e,t){return null==t.get?function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0===r)return;t.mutable&&s(r);const o=t.store;return o.has(e)?o.get(e):r.metadata.value}:function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0!==r)return r.getComputed(t)}}function p(e){const t=e.prototype,s=o(t),n={};for(const o of Object.getOwnPropertyNames(s)){const e=s[o];i(e),n[o]={enumerable:!0,configurable:!0,get:l(o,e),set(t){const s=this.__accessor__;if(void 0!==s){if(s.mutable)return s.initialized&&e.readOnly?f("read-only",o):s.lifecycle===r.CONSTRUCTED&&e.constructOnly?f("construct-only",o):void s.set(o,t)}else Object.defineProperty(this,o,{enumerable:!0,configurable:!0,writable:!0,value:t})}}}Object.defineProperties(e.prototype,n)}const f=(t,r)=>{e.getLogger("esri.core.Accessor").error(`cannot assign to ${t} property '${r}'`)};export{p as finalizeClass,a as subclass};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- var i;!function(i){i[i.Dirty=1]="Dirty",i[i.Overridden=2]="Overridden",i[i.Computing=4]="Computing",i[i.NonNullable=8]="NonNullable",i[i.HasDefaultValue=16]="HasDefaultValue",i[i.DepTrackingInitialized=32]="DepTrackingInitialized",i[i.AutoTracked=64]="AutoTracked",i[i.ExplicitlyTracking=128]="ExplicitlyTracking"}(i||(i={}));export{i as Flags};
5
+ const i={Dirty:1,Overridden:2,Computing:4,NonNullable:8,HasDefaultValue:16,DepTrackingInitialized:32,AutoTracked:64,ExplicitlyTracking:128};export{i as Flags};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../ArrayPool.js";import{makeHandle as t}from"../handleUtils.js";import{equals as r,equalsShallow as l}from"../lang.js";import{ReentrantObjectPool as o}from"../ReentrantObjectPool.js";import{schedule as i}from"../scheduling.js";import{someSet as n}from"../SetUtils.js";import{generateUID as s}from"../uid.js";import{valueOf as c}from"./get.js";import{Lifecycle as u}from"./interfaces.js";import{reaction as a,reactionDeferred as d}from"./trackingUtils.js";import{parse as f}from"./utils.js";var h;!function(e){e[e.Untracked=0]="Untracked",e[e.Tracked=1]="Tracked"}(h||(h={}));class m{constructor(){this.uid=s(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static{this.pool=new o(m)}static acquireUntracked(e,t,l,o,i){return this.pool.acquire(h.Untracked,e,t,l,o,i,r)}static acquireTracked(e,t,r,l){return this.pool.acquire(h.Tracked,e,t,r,null,null,l)}notify(e,t){this.type===h.Untracked?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t,void 0,void 0)}acquire(e,t,r,l,o,i,n){this.uid=s(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=l,this.target=o,this.path=i,this.equals=n}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=s(),this.removed=!0}}const p=new e,v=new Set;let k;function _(e){v.delete(e),v.add(e),k||(k=i(q))}function g(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function j(e){for(const t of v.values())t.target===e&&(t.removed=!0)}function q(){let e=10;for(;k&&e--;){k=null;const e=V(),t=p.acquire();for(const r of e){const e=r.uid;g(r),e===r.uid&&r.removed&&t.push(r)}for(const r of v)r.removed&&(t.push(r),v.delete(r));for(const r of t)m.pool.release(r);p.release(t),p.release(e),y.forEach((e=>e()))}}function V(){const e=p.acquire();e.length=v.size;let t=0;for(const r of v)e[t]=r,++t;return v.clear(),e}const y=new Set;function U(e){return y.add(e),t((()=>y.delete(e)))}function T(e,r,l){let o=f(e,r,l,((e,r,l)=>{let i,n,s=d((()=>c(e,r)),((t,s)=>{e.__accessor__?.lifecycle===u.DESTROYED||i&&i.uid!==n?o.remove():(i||(i=m.acquireUntracked(t,l,s,e,r),n=i.uid),_(i))}));return t((()=>{s.remove(),i&&(i.uid!==n||i.removed||(i.removed=!0,_(i)),i=null),o=s=null}))}));return o}function E(e,t,l){const o=f(e,t,l,((e,t,l)=>{let i=!1;return a((()=>c(e,t)),((n,s)=>{e.__accessor__.lifecycle!==u.DESTROYED?i||(i=!0,r(s,n)||l.call(e,n,s,t,e),i=!1):o.remove()}))}));return o}function b(e,r,l,o=!1){return e.__accessor__&&e.__accessor__.lifecycle!==u.DESTROYED?o?E(e,r,l):T(e,r,l):t()}function D(e,r,l){let o,i,n=d(e,((e,t)=>{o&&o.uid!==i?n.remove():(o||(o=m.acquireTracked(e,r,t,l),i=o.uid),_(o))}));return t((()=>{n.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,_(o)),o=null),n=null}))}function S(e,t,r){let l=!1;return a(e,((e,o)=>{l||(l=!0,r(o,e)||t(e,o),l=!1)}))}function w(e,t,r=!1,o=l){return r?S(e,t,o):D(e,t,o)}function O(e){return n(v,(t=>t.oldValue===e))}export{U as afterDispatch,q as dispatch,O as isValueInUse,j as removeTarget,b as watch,w as watchTracked};
5
+ import e from"../ArrayPool.js";import{makeHandle as t}from"../handleUtils.js";import{equals as r,equalsShallow as l}from"../lang.js";import{ReentrantObjectPool as o}from"../ReentrantObjectPool.js";import{schedule as i}from"../scheduling.js";import{someSet as n}from"../SetUtils.js";import{generateUID as s}from"../uid.js";import{valueOf as c}from"./get.js";import{Lifecycle as u}from"./Lifecycle.js";import{reaction as a,reactionDeferred as d}from"./trackingUtils.js";import{parse as f}from"./utils.js";var h;!function(e){e[e.Untracked=0]="Untracked",e[e.Tracked=1]="Tracked"}(h||(h={}));class m{constructor(){this.uid=s(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static{this.pool=new o(m)}static acquireUntracked(e,t,l,o,i){return this.pool.acquire(h.Untracked,e,t,l,o,i,r)}static acquireTracked(e,t,r,l){return this.pool.acquire(h.Tracked,e,t,r,null,null,l)}notify(e,t){this.type===h.Untracked?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t,void 0,void 0)}acquire(e,t,r,l,o,i,n){this.uid=s(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=l,this.target=o,this.path=i,this.equals=n}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=s(),this.removed=!0}}const p=new e,v=new Set;let k;function _(e){v.delete(e),v.add(e),k||(k=i(q))}function g(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function j(e){for(const t of v.values())t.target===e&&(t.removed=!0)}function q(){let e=10;for(;k&&e--;){k=null;const e=y(),t=p.acquire();for(const r of e){const e=r.uid;g(r),e===r.uid&&r.removed&&t.push(r)}for(const r of v)r.removed&&(t.push(r),v.delete(r));for(const r of t)m.pool.release(r);p.release(t),p.release(e),V.forEach((e=>e()))}}function y(){const e=p.acquire();e.length=v.size;let t=0;for(const r of v)e[t]=r,++t;return v.clear(),e}const V=new Set;function U(e){return V.add(e),t((()=>V.delete(e)))}function T(e,r,l){let o=f(e,r,l,((e,r,l)=>{let i,n,s=d((()=>c(e,r)),((t,s)=>{e.__accessor__?.lifecycle===u.DESTROYED||i&&i.uid!==n?o.remove():(i||(i=m.acquireUntracked(t,l,s,e,r),n=i.uid),_(i))}));return t((()=>{s.remove(),i&&(i.uid!==n||i.removed||(i.removed=!0,_(i)),i=null),o=s=null}))}));return o}function E(e,t,l){const o=f(e,t,l,((e,t,l)=>{let i=!1;return a((()=>c(e,t)),((n,s)=>{e.__accessor__.lifecycle!==u.DESTROYED?i||(i=!0,r(s,n)||l.call(e,n,s,t,e),i=!1):o.remove()}))}));return o}function b(e,r,l,o=!1){return e.__accessor__&&e.__accessor__.lifecycle!==u.DESTROYED?o?E(e,r,l):T(e,r,l):t()}function D(e,r,l){let o,i,n=d(e,((e,t)=>{o&&o.uid!==i?n.remove():(o||(o=m.acquireTracked(e,r,t,l),i=o.uid),_(o))}));return t((()=>{n.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,_(o)),o=null),n=null}))}function S(e,t,r){let l=!1;return a(e,((e,o)=>{l||(l=!0,r(o,e)||t(e,o),l=!1)}))}function w(e,t,r=!1,o=l){return r?S(e,t,o):D(e,t,o)}function O(e){return n(v,(t=>t.oldValue===e))}export{U as afterDispatch,q as dispatch,O as isValueInUse,j as removeTarget,b as watch,w as watchTracked};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{createTask as e}from"./asyncUtils.js";import t from"./Collection.js";import{removeIfHandle as o,destroyHandle as s}from"./handleUtils.js";import{isAborted as r,createAbortError as n,ignoreAbortErrors as i}from"./promiseUtils.js";import{on as a}from"./reactiveUtils.js";function c(e,o,s){const r=s?.createCollection?.()??new t,n=!!s?.recycleItems?new d:null,i=(e,t=0)=>{if(!e?.length)return;const o=r.splice(t,e.length);n?n.processRemoved(e):o.forEach(m)},c=(e,t=0)=>{if(!e?.length)return;const s=[];for(const r of e){const e=n?.use(r);if(e)s.push(e);else{const e=o(r);n?.register(r,e),s.push(e)}}r.addMany(s,t)},l=a(e,"after-splice",(({added:e,start:t,removed:o})=>{i(o,t),c(e,t)}),{sync:!0,onListenerRemove:e=>i(e.items),onListenerAdd:e=>c(e.items)});return r.addHandles(l),r}class d{constructor(){this._originalToMapped=new Map,this._removedItemCandidates=new Set,this._garbageCollectionQueued=!1}processRemoved(e){if(!e?.length)return;const{_removedItemCandidates:t}=this;for(const o of e)this._getItem(o)?.markRemoved()&&(t.add(o),this._queueGarbageCollection())}use(e){const t=this._getItem(e);return t&&(t.removed=!1),t?.item}register(e,t){this._originalToMapped.set(e,new l(t))}_getItem(e){return this._originalToMapped.get(e)}_queueGarbageCollection(){this._garbageCollectionQueued||(this._garbageCollectionQueued=!0,queueMicrotask((()=>this._garbageCollectCandidates())))}_garbageCollectCandidates(){this._garbageCollectionQueued=!1;const{_removedItemCandidates:e}=this,t=Array.from(e);e.clear(),t.forEach((e=>this._garbageCollectIfRemoved(e)))}_garbageCollectIfRemoved(e){const{_originalToMapped:t}=this,o=this._getItem(e);o?.removed&&(m(o.item),t.delete(e))}}class l{constructor(e){this.item=e,this.removed=!1}markRemoved(){return this.removed=!0,!0}}function m(e){"object"==typeof e&&e&&("destroy"in e&&"function"==typeof e.destroy?e.destroy():o(e))}function u(o,a,d){const l=new t,u=c(o,(t=>e((async e=>{const o=await a(t,e);if(r(e))throw m(o),n();return o}))),d),f=()=>null,g=async e=>{const t=await e.promise,o=u.indexOf(e);o<0||l.splice(o,1,t)};l.addMany(u.items.map(f));for(const e of u)i(g(e));const h=u.on("after-splice",(({added:e,start:t,deleteCount:o})=>{const s=l.splice(t,o);for(const r of s)m(r);if(e?.length){l.addMany(e.map(f),t);for(const t of e)i(g(t))}}));return l.addHandles([s(u),h]),l}export{c as mapCollection,u as mapCollectionAsync};
5
+ import{createTask as e}from"./asyncUtils.js";import t from"./Collection.js";import{destroyHandle as o,removeIfHandle as s}from"./handleUtils.js";import{ignoreAbortErrors as r,isAborted as n,createAbortError as i}from"./promiseUtils.js";import{on as a}from"./reactiveUtils.js";function c(e,o,s){const r=s?.createCollection?.()??new t,n=!!s?.recycleItems?new d:null,i=(e,t=0)=>{if(!e?.length)return;const o=r.splice(t,e.length);n?n.processRemoved(e):o.forEach(m)},c=(e,t=0)=>{if(!e?.length)return;const s=[];for(const r of e){const e=n?.use(r);if(e)s.push(e);else{const e=o(r);n?.register(r,e),s.push(e)}}r.addMany(s,t)},l=a(e,"after-splice",(({added:e,start:t,removed:o})=>{i(o,t),c(e,t)}),{sync:!0,onListenerRemove:e=>i(e.items),onListenerAdd:e=>c(e.items)});return r.addHandles(l),r}class d{constructor(){this._originalToMapped=new Map,this._removedItemCandidates=new Set,this._garbageCollectionQueued=!1}processRemoved(e){if(!e?.length)return;const{_removedItemCandidates:t}=this;for(const o of e)this._getItem(o)?.markRemoved()&&(t.add(o),this._queueGarbageCollection())}use(e){const t=this._getItem(e);return t&&(t.removed=!1),t?.item}register(e,t){this._originalToMapped.set(e,new l(t))}_getItem(e){return this._originalToMapped.get(e)}_queueGarbageCollection(){this._garbageCollectionQueued||(this._garbageCollectionQueued=!0,queueMicrotask((()=>this._garbageCollectCandidates())))}_garbageCollectCandidates(){this._garbageCollectionQueued=!1;const{_removedItemCandidates:e}=this,t=Array.from(e);e.clear(),t.forEach((e=>this._garbageCollectIfRemoved(e)))}_garbageCollectIfRemoved(e){const{_originalToMapped:t}=this,o=this._getItem(e);o?.removed&&(m(o.item),t.delete(e))}}class l{constructor(e){this.item=e,this.removed=!1}markRemoved(){return this.removed=!0,!0}}function m(e){"object"==typeof e&&e&&("destroy"in e&&"function"==typeof e.destroy?e.destroy():s(e))}function u(s,a,d){const l=new t,u=c(s,(t=>e((async e=>{const o=await a(t,e);if(n(e))throw m(o),i();return o}))),d),f=()=>null,g=async e=>{const t=await e.promise,o=u.indexOf(e);o<0||l.splice(o,1,t)};l.addMany(u.items.map(f));for(const e of u)r(g(e));const h=u.on("after-splice",(({added:e,start:t,deleteCount:o})=>{const s=l.splice(t,o);for(const r of s)m(r);if(e?.length){l.addMany(e.map(f),t);for(const t of e)r(g(t))}}));return l.addHandles([o(u),h]),l}export{c as mapCollection,u as mapCollectionAsync};
package/core/urlUtils.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../config.js";import{isSome as n}from"./arrayUtils.js";import e from"./Error.js";import r from"./Logger.js";import{isSerializable as o}from"./support/jsonUtils.js";import{parseKnownArcGISOnlineDomain as i}from"../portal/support/urlUtils.js";import{base64ToArrayBuffer as s,arrayBufferToBase64 as u}from"../support/base64Utils.js";const l=()=>r.getLogger("esri.core.urlUtils"),c=t.request,f="esri/config: esriConfig.request.proxyUrl is not set.",a=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,h=/^\s*https:/i,d=/^\s*file:/i,m=/:\d+$/,y=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),$=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");class x{constructor(t=""){this.uri=t,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let n=this.uri.match(g);this.scheme=n[2]||(n[1]?"":null),this.authority=n[4]||(n[3]?"":null),this.path=n[5],this.query=n[7]||(n[6]?"":null),this.fragment=n[9]||(n[8]?"":null),null!=this.authority&&(n=this.authority.match($),this.user=n[3]||null,this.password=n[4]||null,this.host=n[6]||n[7],this.port=n[9]||null)}toString(){return this.uri}}const w={},U=new x(t.applicationUrl);let O=U;const R=b();let q=R;const C=()=>O,j=()=>q;function b(){const t=O.path,n=t.slice(0,t.lastIndexOf("/")+1);return`${`${O.scheme}://${O.host}${null!=O.port?`:${O.port}`:""}`}${n}`}const L={setAppUrl:t=>O=t,setAppBaseUrl:t=>q=t,restoreUrls:()=>{O=U,q=R}};function I(t){if(!t)return null;const n={path:null,query:null},e=new x(t),r=t.indexOf("?");return null===e.query?n.path=t:(n.path=t.slice(0,r),n.query=A(e.query)),e.fragment&&(n.hash=e.fragment,null===e.query&&(n.path=n.path.slice(0,n.path.length-(e.fragment.length+1)))),n}function A(t){const n=t.split("&"),e={};for(const r of n){if(!r)continue;const t=r.indexOf("=");let n,o;t<0?(n=decodeURIComponent(r),o=""):(n=decodeURIComponent(r.slice(0,t)),o=decodeURIComponent(r.slice(t+1)));let i=e[n];"string"==typeof i&&(i=e[n]=[i]),Array.isArray(i)?i.push(o):e[n]=o}return e}function v(t,n){return t?n&&"function"==typeof n?Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(n(e,t[e])))).join("&"):Object.keys(t).map((e=>{const r=t[e];if(null==r)return"";const i=encodeURIComponent(e)+"=",s=n?.[e];return s?i+encodeURIComponent(s(r)):Array.isArray(r)?r.map((t=>o(t)?i+encodeURIComponent(JSON.stringify(t)):i+encodeURIComponent(t))).join("&"):o(r)?i+encodeURIComponent(JSON.stringify(r)):i+encodeURIComponent(r)})).filter((t=>t)).join("&"):""}function P(t=!1){let n,r=c.proxyUrl;if("string"==typeof t){n=dt(t);const e=T(t);e&&(r=e.proxyUrl)}else n=!!t;if(!r)throw l().warn(f),new e("urlUtils:proxy-not-set",f);n&&wt()&&(r=$t(r));return I(r)}function k(t,n=!1){const e=T(t);let r,o;if(e){const t=B(e.proxyUrl);r=t.path,o=t.query?A(t.query):null}else if(n){const n=P(t);r=n.path,o=n.query}if(r){const n=I(t);t=r+"?"+n.path;const e=v({...o,...n.query});e&&(t=`${t}?${e}`)}return t}const E={path:"",query:""};function B(t){const n=t.indexOf("?");return-1!==n?(E.path=t.slice(0,n),E.query=t.slice(n+1)):(E.path=t,E.query=null),E}function S(t){return t=(t=Ut(t=Ct(t=B(t).path),!0)).toLowerCase()}function H(t){const n={proxyUrl:t.proxyUrl,urlPrefix:S(t.urlPrefix)},e=c.proxyRules,r=n.urlPrefix;let o=e.length;for(let i=0;i<e.length;i++){const t=e[i].urlPrefix;if(0===r.indexOf(t)){if(r.length===t.length)return-1;o=i;break}0===t.indexOf(r)&&(o=i+1)}return e.splice(o,0,n),o}function T(t){const n=c.proxyRules,e=S(t);for(let r=0;r<n.length;r++)if(0===e.indexOf(n[r].urlPrefix))return n[r]}function W(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=i(t),r=i(n);return null!=e&&null!=r?e.portalHostname===r.portalHostname:null==e&&null==r&&F(t,n,!0)}function z(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=i(t),r=i(n);return null!=e&&null!=r&&e.portalHostname===r.portalHostname}function D(t,n){return t=J(t),n=J(n),Ut(t)===Ut(n)}function J(t){const n=(t=K(t)).indexOf("/sharing");return n>0?t.slice(0,n):t.replace(/\/+$/,"")}function N(t,n=c.interceptors){const e=n=>null==n||n instanceof RegExp&&n.test(t)||"string"==typeof n&&t.startsWith(n);if(n)for(const r of n)if(Array.isArray(r.urls)){if(r.urls.some(e))return r}else if(e(r.urls))return r;return null}function F(t,n,e=!1){if(!t||!n)return!1;const r=vt(t),o=vt(n);return!(!e&&r.scheme!==o.scheme)&&(null!=r.host&&null!=o.host&&(r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port))}function M(t){if("string"==typeof t){if(!Y(t))return!0;t=vt(t)}if(F(t,O))return!0;const n=c.trustedServers||[];for(let e=0;e<n.length;e++){const r=Q(n[e]);for(let n=0;n<r.length;n++)if(F(t,r[n]))return!0}return!1}function Q(t){return w[t]||(ht(t)||pt(t)?w[t]=[new x(_(t))]:w[t]=[new x(`http://${t}`),new x(`https://${t}`)]),w[t]}function _(t,n=q,e){return pt(t)?e?.preserveProtocolRelative?t:"http"===O.scheme&&O.authority===X(t).slice(2)?`http:${t}`:`https:${t}`:ht(t)?t:V("/"===t[0]?Ot(n):n,t)}function G(t,n=q,e){if(null==t||!Y(t))return t;const r=K(t),o=r.toLowerCase(),i=K(n).toLowerCase().replace(/\/+$/,""),s=e?K(e).toLowerCase().replace(/\/+$/,""):null;if(s&&0!==i.indexOf(s))return t;const u=(t,n,e)=>-1===(e=t.indexOf(n,e))?t.length:e;let l=u(o,"/",o.indexOf("//")+2),c=-1;for(;o.slice(0,l+1)===i.slice(0,l)+"/"&&(c=l+1,l!==o.length);)l=u(o,"/",l+1);if(-1===c)return t;if(s&&c<s.length)return t;t=r.slice(c);const f=i.slice(c-1).replaceAll(/[^/]+/g,"").length;if(f>0)for(let a=0;a<f;a++)t=`../${t}`;else t=`./${t}`;return t}function K(t){return t=It(t=Lt(t=bt(t=_(t=t.trim()))))}function V(...t){const e=t.filter(n);if(!e?.length)return;const r=[];if(Y(e[0])){const t=e[0],n=t.indexOf("//");-1!==n&&(r.push(t.slice(0,n+1)),yt(e[0])&&(r[0]+="/"),e[0]=t.slice(n+2))}else"/"===e[0][0]&&r.push("");const o=e.reduce(((t,n)=>n?t.concat(n.split("/")):t),[]);for(let n=0;n<o.length;n++){const t=o[n];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&n===o.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function X(t,n=!1){if(null==t||Z(t)||tt(t))return null;let e=t.indexOf("://");if(-1===e&&pt(t))e=2;else{if(-1===e)return null;e+=3}const r=t.indexOf("/",e);return-1!==r&&(t=t.slice(0,r)),n&&(t=Ut(t,!0)),t}function Y(t){return pt(t)||ht(t)}function Z(t){return null!=t&&"blob:"===t.slice(0,5)}function tt(t){return null!=t&&"data:"===t.slice(0,5)}function nt(t){const n=ot(t);return n?.isBase64?s(n.data):null}function et(t){return u(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const rt=/^data:(.*?)(;base64)?,(.*)$/;function ot(t){const n=t.match(rt);if(!n)return null;const[,e,r,o]=n;return{mediaType:e,isBase64:!!r,data:o}}function it(t){return t.isBase64?`data:${t.mediaType};base64,${t.data}`:`data:${t.mediaType},${t.data}`}async function st(t){return(await fetch(t)).blob()}function ut(t){const n=nt(t);if(!n)return null;const e=ot(t);return new Blob([n],{type:e.mediaType})}function lt(t,n){ft(t,n)}function ct(t,n){at(t,n)}function ft(t,n){const e=ut(t);return!!e&&at(e,n)}function at(t,n){if(!t)return!1;const e=document.createElement("a");if(!("download"in e))return!1;const r=URL.createObjectURL(t);return e.download=n,e.href=r,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e),URL.revokeObjectURL(r),!0}function pt(t){return null!=t&&"/"===t[0]&&"/"===t[1]}function ht(t){return null!=t&&a.test(t)}function dt(t){return null!=t&&h.test(t)||"https"===O.scheme&&pt(t)}function mt(t){return null!=t&&p.test(t)||"http"===O.scheme&&pt(t)}function yt(t){return null!=t&&d.test(t)}function gt(t){return pt(t)?`http:${t}`:t.replace(h,"http:")}function $t(t){return pt(t)?`https:${t}`:t.replace(p,"https:")}function xt(){return"http"===O.scheme}function wt(){return"https"===O.scheme}function Ut(t,n=!1){return pt(t)?t.slice(2):(t=t.replace(a,""),n&&t.length>1&&"/"===t[0]&&"/"===t[1]&&(t=t.slice(2)),t)}function Ot(t){const n=t.indexOf("//"),e=t.indexOf("/",n+2);return-1===e?t:t.slice(0,e)}function Rt(t){let n=0;if(Y(t)){const e=t.indexOf("//");-1!==e&&(n=e+2)}const e=t.lastIndexOf("/");return e<n?t:t.slice(0,e+1)}function qt(t,n){if(!t)return"";const e=I(t).path.replace(/\/+$/,""),r=e.slice(e.lastIndexOf("/")+1);if(!n?.length)return r;const o=new RegExp(`\\.(${n.join("|")})$`,"i");return r.replace(o,"")}function Ct(t){return t.endsWith("/")?t:`${t}/`}function jt(t){return t.replace(/\/+$/,"")}function bt(t){if(/^https?:\/\//i.test(t)){const n=B(t);t=(t=n.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),n.query&&(t+=`?${n.query}`)}return t}function Lt(t){return t.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function It(t){const n=c.httpsDomains;if(!mt(t))return t;const e=t.indexOf("/",7);let r;if(r=-1===e?t:t.slice(0,e),r=r.toLowerCase().slice(7),m.test(r)){if(!r.endsWith(":80"))return t;r=r.slice(0,-3),t=t.replace(":80","")}return xt()&&r===O.authority&&!y.test(t)||(wt()&&r===O.authority||n&&n.some((t=>r===t||r.endsWith(`.${t}`)))||wt()&&!T(t))&&(t=$t(t)),t}function At(t,n,e){if(!(n&&e&&t&&Y(t)))return t;const r=t.indexOf("//"),o=t.indexOf("/",r+2),i=t.indexOf(":",r+2),s=Math.min(o<0?t.length:o,i<0?t.length:i);if(t.slice(r+2,s).toLowerCase()!==n.toLowerCase())return t;return`${t.slice(0,r+2)}${e}${t.slice(s)}`}function vt(t){return"string"==typeof t?new x(_(t)):(t.scheme||(t.scheme=O.scheme),t)}function Pt(t){return Dt.test(t)}function kt(t,n){const e=I(t),r=Object.keys(e.query||{});return r.length>0&&n&&n.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${r.join(", ")}.`),e.path}function Et(t,n,e){const r=I(t),o=r.query||{};return o[n]=String(e),`${r.path}?${v(o)}`}function Bt(t,n){if(!n)return t;const e=I(t),r=e.query||{};for(const[i,s]of Object.entries(n))null!=s&&(r[i]=s);const o=v(r);return o?`${e.path}?${o}`:e.path}function St(t,n){const{path:e,query:r}=I(t);if(!r)return t;delete r[n];const o=v(r);return o?`${e}?${o}`:e}function Ht(t){if(null==t)return null;const n=t.match(zt);return n?n[2]:null}function Tt(t){if(null==t)return null;const n=t.match(zt);return n?{path:n[1],extension:n[2]}:{path:t,extension:null}}async function Wt(t){if("string"==typeof t){return ot(t)??{data:t}}return new Promise(((n,e)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>n(ot(r.result)),r.onerror=t=>e(t)}))}const zt=/([^.]*)\.([^/]*)$/,Dt=/(^data:image\/svg|\.svg$)/i;export{x as Url,k as addProxy,H as addProxyRule,Et as addQueryParameter,Bt as addQueryParameters,et as base64UrlEncode,st as blobUrlToBlob,At as changeDomain,ot as dataComponents,nt as dataToArrayBuffer,ut as dataToBlob,ct as downloadBlobAsFile,lt as downloadDataAsFile,Ct as ensureTrailingSlash,j as getAppBaseUrl,C as getAppUrl,qt as getFilename,N as getInterceptor,X as getOrigin,Ht as getPathExtension,T as getProxyRule,P as getProxyUrl,ht as hasProtocol,z as hasSameCanonicalArcGISOnlinePortal,W as hasSameCanonicalPortal,F as hasSameOrigin,D as hasSamePortal,Y as isAbsolute,wt as isAppHTTPS,Z as isBlobProtocol,tt as isDataProtocol,dt as isHTTPSProtocol,pt as isProtocolRelative,Pt as isSVG,M as isTrustedServer,V as join,_ as makeAbsolute,it as makeData,G as makeRelative,K as normalize,v as objectToQuery,Wt as parseData,A as queryToObject,Rt as removeFile,St as removeQueryParameter,kt as removeQueryParameters,jt as removeTrailingSlash,Tt as splitPathExtension,L as test,gt as toHTTP,$t as toHTTPS,w as trustedServersUrlCache,I as urlToObject};
5
+ import t from"../config.js";import{isSome as n}from"./arrayUtils.js";import e from"./Error.js";import r from"./Logger.js";import{isSerializable as o}from"./support/jsonUtils.js";import{parseKnownArcGISOnlineDomain as i}from"../portal/support/urlUtils.js";import{base64ToArrayBuffer as s,arrayBufferToBase64 as u}from"../support/base64Utils.js";const l=()=>r.getLogger("esri.core.urlUtils"),c=t.request,f="esri/config: esriConfig.request.proxyUrl is not set.",a=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,h=/^\s*https:/i,d=/^\s*file:/i,m=/:\d+$/,y=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),$=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");class x{constructor(t=""){this.uri=t,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let n=this.uri.match(g);this.scheme=n[2]||(n[1]?"":null),this.authority=n[4]||(n[3]?"":null),this.path=n[5],this.query=n[7]||(n[6]?"":null),this.fragment=n[9]||(n[8]?"":null),null!=this.authority&&(n=this.authority.match($),this.user=n[3]||null,this.password=n[4]||null,this.host=n[6]||n[7],this.port=n[9]||null)}toString(){return this.uri}}const w={},U=new x(t.applicationUrl);let O=U;const R=b();let q=R;const C=()=>O,j=()=>q;function b(){const t=O.path,n=t.slice(0,t.lastIndexOf("/")+1);return`${`${O.scheme}://${O.host}${null!=O.port?`:${O.port}`:""}`}${n}`}const L={setAppUrl:t=>O=t,setAppBaseUrl:t=>q=t,restoreUrls:()=>{O=U,q=R}};function I(t){if(!t)return null;const n={path:null,query:null},e=new x(t),r=t.indexOf("?");return null===e.query?n.path=t:(n.path=t.slice(0,r),n.query=A(e.query)),e.fragment&&(n.hash=e.fragment,null===e.query&&(n.path=n.path.slice(0,n.path.length-(e.fragment.length+1)))),n}function A(t){const n=t.split("&"),e={};for(const r of n){if(!r)continue;const t=r.indexOf("=");let n,o;t<0?(n=decodeURIComponent(r),o=""):(n=decodeURIComponent(r.slice(0,t)),o=decodeURIComponent(r.slice(t+1)));let i=e[n];"string"==typeof i&&(i=e[n]=[i]),Array.isArray(i)?i.push(o):e[n]=o}return e}function v(t,n){return t?n&&"function"==typeof n?Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(n(e,t[e])))).join("&"):Object.keys(t).map((e=>{const r=t[e];if(null==r)return"";const i=encodeURIComponent(e)+"=",s=n?.[e];return s?i+encodeURIComponent(s(r)):Array.isArray(r)?r.map((t=>o(t)?i+encodeURIComponent(JSON.stringify(t)):i+encodeURIComponent(t))).join("&"):o(r)?i+encodeURIComponent(JSON.stringify(r)):i+encodeURIComponent(r)})).filter((t=>t)).join("&"):""}function P(t=!1){let n,r=c.proxyUrl;if("string"==typeof t){n=dt(t);const e=T(t);e&&(r=e.proxyUrl)}else n=!!t;if(!r)throw l().warn(f),new e("urlUtils:proxy-not-set",f);n&&wt()&&(r=$t(r));return I(r)}function k(t,n=!1){const e=T(t);let r,o;if(e){const t=B(e.proxyUrl);r=t.path,o=t.query?A(t.query):null}else if(n){const n=P(t);r=n.path,o=n.query}if(r){const n=I(t);t=r+"?"+n.path;const e=v({...o,...n.query});e&&(t=`${t}?${e}`)}return t}const E={path:"",query:""};function B(t){const n=t.indexOf("?");return-1!==n?(E.path=t.slice(0,n),E.query=t.slice(n+1)):(E.path=t,E.query=null),E}function S(t){return t=(t=Ut(t=Ct(t=B(t).path),!0)).toLowerCase()}function H(t){const n={proxyUrl:t.proxyUrl,urlPrefix:S(t.urlPrefix)},e=c.proxyRules,r=n.urlPrefix;let o=e.length;for(let i=0;i<e.length;i++){const t=e[i].urlPrefix;if(0===r.indexOf(t)){if(r.length===t.length)return-1;o=i;break}0===t.indexOf(r)&&(o=i+1)}return e.splice(o,0,n),o}function T(t){const n=c.proxyRules,e=S(t);for(let r=0;r<n.length;r++)if(0===e.indexOf(n[r].urlPrefix))return n[r]}function W(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=i(t),r=i(n);return null!=e&&null!=r?e.portalHostname===r.portalHostname:null==e&&null==r&&F(t,n,!0)}function z(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=i(t),r=i(n);return null!=e&&null!=r&&e.portalHostname===r.portalHostname}function D(t,n){return t=J(t),n=J(n),Ut(t)===Ut(n)}function J(t){const n=(t=K(t)).indexOf("/sharing");return n>0?t.slice(0,n):t.replace(/\/+$/,"")}function N(t,n=c.interceptors){const e=n=>n instanceof RegExp?n.test(t):"string"==typeof n?t.startsWith(n):null==n;if(n)for(const r of n)if(Array.isArray(r.urls)){if(r.urls.some(e))return r}else if(e(r.urls))return r;return null}function F(t,n,e=!1){if(!t||!n)return!1;const r=vt(t),o=vt(n);return!(!e&&r.scheme!==o.scheme)&&(null!=r.host&&null!=o.host&&(r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port))}function M(t){if("string"==typeof t){if(!Y(t))return!0;t=vt(t)}if(F(t,O))return!0;const n=c.trustedServers||[];for(let e=0;e<n.length;e++){const r=Q(n[e]);for(let n=0;n<r.length;n++)if(F(t,r[n]))return!0}return!1}function Q(t){return w[t]||(ht(t)||pt(t)?w[t]=[new x(_(t))]:w[t]=[new x(`http://${t}`),new x(`https://${t}`)]),w[t]}function _(t,n=q,e){return pt(t)?e?.preserveProtocolRelative?t:"http"===O.scheme&&O.authority===X(t).slice(2)?`http:${t}`:`https:${t}`:ht(t)?t:V("/"===t[0]?Ot(n):n,t)}function G(t,n=q,e){if(null==t||!Y(t))return t;const r=K(t),o=r.toLowerCase(),i=K(n).toLowerCase().replace(/\/+$/,""),s=e?K(e).toLowerCase().replace(/\/+$/,""):null;if(s&&0!==i.indexOf(s))return t;const u=(t,n,e)=>-1===(e=t.indexOf(n,e))?t.length:e;let l=u(o,"/",o.indexOf("//")+2),c=-1;for(;o.slice(0,l+1)===i.slice(0,l)+"/"&&(c=l+1,l!==o.length);)l=u(o,"/",l+1);if(-1===c)return t;if(s&&c<s.length)return t;t=r.slice(c);const f=i.slice(c-1).replaceAll(/[^/]+/g,"").length;if(f>0)for(let a=0;a<f;a++)t=`../${t}`;else t=`./${t}`;return t}function K(t){return t=It(t=Lt(t=bt(t=_(t=t.trim()))))}function V(...t){const e=t.filter(n);if(!e?.length)return;const r=[];if(Y(e[0])){const t=e[0],n=t.indexOf("//");-1!==n&&(r.push(t.slice(0,n+1)),yt(e[0])&&(r[0]+="/"),e[0]=t.slice(n+2))}else"/"===e[0][0]&&r.push("");const o=e.reduce(((t,n)=>n?t.concat(n.split("/")):t),[]);for(let n=0;n<o.length;n++){const t=o[n];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&n===o.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function X(t,n=!1){if(null==t||Z(t)||tt(t))return null;let e=t.indexOf("://");if(-1===e&&pt(t))e=2;else{if(-1===e)return null;e+=3}const r=t.indexOf("/",e);return-1!==r&&(t=t.slice(0,r)),n&&(t=Ut(t,!0)),t}function Y(t){return pt(t)||ht(t)}function Z(t){return null!=t&&"blob:"===t.slice(0,5)}function tt(t){return null!=t&&"data:"===t.slice(0,5)}function nt(t){const n=ot(t);return n?.isBase64?s(n.data):null}function et(t){return u(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const rt=/^data:(.*?)(;base64)?,(.*)$/;function ot(t){const n=t.match(rt);if(!n)return null;const[,e,r,o]=n;return{mediaType:e,isBase64:!!r,data:o}}function it(t){return t.isBase64?`data:${t.mediaType};base64,${t.data}`:`data:${t.mediaType},${t.data}`}async function st(t){return(await fetch(t)).blob()}function ut(t){const n=nt(t);if(!n)return null;const e=ot(t);return new Blob([n],{type:e.mediaType})}function lt(t,n){ft(t,n)}function ct(t,n){at(t,n)}function ft(t,n){const e=ut(t);return!!e&&at(e,n)}function at(t,n){if(!t)return!1;const e=document.createElement("a");if(!("download"in e))return!1;const r=URL.createObjectURL(t);return e.download=n,e.href=r,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e),URL.revokeObjectURL(r),!0}function pt(t){return null!=t&&"/"===t[0]&&"/"===t[1]}function ht(t){return null!=t&&a.test(t)}function dt(t){return null!=t&&h.test(t)||"https"===O.scheme&&pt(t)}function mt(t){return null!=t&&p.test(t)||"http"===O.scheme&&pt(t)}function yt(t){return null!=t&&d.test(t)}function gt(t){return pt(t)?`http:${t}`:t.replace(h,"http:")}function $t(t){return pt(t)?`https:${t}`:t.replace(p,"https:")}function xt(){return"http"===O.scheme}function wt(){return"https"===O.scheme}function Ut(t,n=!1){return pt(t)?t.slice(2):(t=t.replace(a,""),n&&t.length>1&&"/"===t[0]&&"/"===t[1]&&(t=t.slice(2)),t)}function Ot(t){const n=t.indexOf("//"),e=t.indexOf("/",n+2);return-1===e?t:t.slice(0,e)}function Rt(t){let n=0;if(Y(t)){const e=t.indexOf("//");-1!==e&&(n=e+2)}const e=t.lastIndexOf("/");return e<n?t:t.slice(0,e+1)}function qt(t,n){if(!t)return"";const e=I(t).path.replace(/\/+$/,""),r=e.slice(e.lastIndexOf("/")+1);if(!n?.length)return r;const o=new RegExp(`\\.(${n.join("|")})$`,"i");return r.replace(o,"")}function Ct(t){return t.endsWith("/")?t:`${t}/`}function jt(t){return t.replace(/\/+$/,"")}function bt(t){if(/^https?:\/\//i.test(t)){const n=B(t);t=(t=n.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),n.query&&(t+=`?${n.query}`)}return t}function Lt(t){return t.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function It(t){const n=c.httpsDomains;if(!mt(t))return t;const e=t.indexOf("/",7);let r;if(r=-1===e?t:t.slice(0,e),r=r.toLowerCase().slice(7),m.test(r)){if(!r.endsWith(":80"))return t;r=r.slice(0,-3),t=t.replace(":80","")}return xt()&&r===O.authority&&!y.test(t)||(wt()&&r===O.authority||n&&n.some((t=>r===t||r.endsWith(`.${t}`)))||wt()&&!T(t))&&(t=$t(t)),t}function At(t,n,e){if(!(n&&e&&t&&Y(t)))return t;const r=t.indexOf("//"),o=t.indexOf("/",r+2),i=t.indexOf(":",r+2),s=Math.min(o<0?t.length:o,i<0?t.length:i);if(t.slice(r+2,s).toLowerCase()!==n.toLowerCase())return t;return`${t.slice(0,r+2)}${e}${t.slice(s)}`}function vt(t){return"string"==typeof t?new x(_(t)):(t.scheme||(t.scheme=O.scheme),t)}function Pt(t){return Dt.test(t)}function kt(t,n){const e=I(t),r=Object.keys(e.query||{});return r.length>0&&n&&n.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${r.join(", ")}.`),e.path}function Et(t,n,e){const r=I(t),o=r.query||{};return o[n]=String(e),`${r.path}?${v(o)}`}function Bt(t,n){if(!n)return t;const e=I(t),r=e.query||{};for(const[i,s]of Object.entries(n))null!=s&&(r[i]=s);const o=v(r);return o?`${e.path}?${o}`:e.path}function St(t,n){const{path:e,query:r}=I(t);if(!r)return t;delete r[n];const o=v(r);return o?`${e}?${o}`:e}function Ht(t){if(null==t)return null;const n=t.match(zt);return n?n[2]:null}function Tt(t){if(null==t)return null;const n=t.match(zt);return n?{path:n[1],extension:n[2]}:{path:t,extension:null}}async function Wt(t){if("string"==typeof t){return ot(t)??{data:t}}return new Promise(((n,e)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>n(ot(r.result)),r.onerror=t=>e(t)}))}const zt=/([^.]*)\.([^/]*)$/,Dt=/(^data:image\/svg|\.svg$)/i;export{x as Url,k as addProxy,H as addProxyRule,Et as addQueryParameter,Bt as addQueryParameters,et as base64UrlEncode,st as blobUrlToBlob,At as changeDomain,ot as dataComponents,nt as dataToArrayBuffer,ut as dataToBlob,ct as downloadBlobAsFile,lt as downloadDataAsFile,Ct as ensureTrailingSlash,j as getAppBaseUrl,C as getAppUrl,qt as getFilename,N as getInterceptor,X as getOrigin,Ht as getPathExtension,T as getProxyRule,P as getProxyUrl,ht as hasProtocol,z as hasSameCanonicalArcGISOnlinePortal,W as hasSameCanonicalPortal,F as hasSameOrigin,D as hasSamePortal,Y as isAbsolute,wt as isAppHTTPS,Z as isBlobProtocol,tt as isDataProtocol,dt as isHTTPSProtocol,pt as isProtocolRelative,Pt as isSVG,M as isTrustedServer,V as join,_ as makeAbsolute,it as makeData,G as makeRelative,K as normalize,v as objectToQuery,Wt as parseData,A as queryToObject,Rt as removeFile,St as removeQueryParameter,kt as removeQueryParameters,jt as removeTrailingSlash,Tt as splitPathExtension,L as test,gt as toHTTP,$t as toHTTPS,w as trustedServersUrlCache,I as urlToObject};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{r as s,G as r,c as i}from"../../../chunks/Geometry.js";import{E as m,n as o}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{c as h,P as a}from"../../../chunks/Envelope.js";import{am as _,an as p,ao as u,k as l,s as c,l as y,ap as G,aq as g,C as d,ar as f}from"../../../chunks/ProjectionTransformation.js";class x{getOperatorType(){return 10009}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,r=0){return new T(e,t,s,r)}}class T extends e{constructor(e,t,r,i){super(),this.m_shape=new m,this.m_currentGeom=o,this.m_progressCounter=0,this.m_geomIndex=-1,this.m_geomTypeIndex=-1,this.m_index=-1,this.m_bBuilt=!1,this.m_bOutputOnlyModified=!1,this.m_bSimplifyPolygons=!1,this.m_bSnapToSr=!1,this.m_progressTracker=r,this.m_inputGeometries=e,this.m_sr=t,this.m_options=i,1===i||2===i?(this.m_bOutputOnlyModified=!0,this.m_options=0,this.m_bSimplifyPolygons=!0,this.m_bSnapToSr=null!=t&&2===i,this.m_bSnapToSr&&!_()&&s("PE is required for snapping to spatial reference operation")):0===i&&(this.m_bSimplifyPolygons=!0)}progress_(e=!1){}tock(){return!0}getRank(){return 1}moveToNextGeom(){for(;;){if(this.m_bBuilt?this.m_currentGeom=this.m_shape.getNextGeometry(this.m_currentGeom):(this.m_currentGeom=this.m_shape.getFirstGeometry(),this.m_bBuilt=!0),this.m_currentGeom!==o){let e=!1;if(this.m_bSimplifyPolygons&&this.m_shape.getGeometryType(this.m_currentGeom)===r.enumPolygon&&(e=p(this.m_shape,this.m_currentGeom,-1,!1,o,this.m_progressTracker)),this.m_bOutputOnlyModified&&!e&&!this.m_shape.getGeometryModified(this.m_currentGeom))continue}break}}next(){if(this.m_bBuilt)this.moveToNextGeom();else{this.m_geomIndex=this.m_shape.createGeometryUserIndex();const e=new n;for(let o=this.m_inputGeometries.next();null!=o;o=this.m_inputGeometries.next()){this.progress_(),i(o);let t=!1;this.m_bSnapToSr&&(o=o.clone(),t=u(this.m_sr,o));const s=this.m_shape.addGeometry(o);this.m_shape.setGeometryUserIndex(s,this.m_geomIndex,this.m_inputGeometries.getGeometryID());const m=o.getGeometryType();m===r.enumPoint&&(-1===this.m_geomTypeIndex&&(this.m_geomTypeIndex=this.m_shape.createGeometryUserIndex()),this.m_shape.setGeometryUserIndex(s,this.m_geomTypeIndex,m));const h=new n;o.queryLooseEnvelope(h),e.mergeEnvelope2D(h),t&&this.m_shape.setGeometryModified(s,!0)}const t=h(this.m_sr,e,!0),s=h(this.m_sr,e,!1);e.inflate(10*t.total()),this.m_shape.forceSetEnvelope2D(e);let m=null,a=0,_=0;if(this.m_shape.hasCurves()){m=new d;const s=l(t.total(),e);a=c(t.total()),_=f(s,a),y(this.m_shape,s,t.total(),12e3,m,null,this.m_progressTracker)}if(G(this.m_shape,s,this.m_progressTracker)){if(g(this.m_shape,t.add(_),this.m_progressTracker,0===this.m_options,this.m_bOutputOnlyModified),null!==m){if(this.m_bSimplifyPolygons){for(let e=this.m_shape.getFirstGeometry();e!==o;e=this.m_shape.getNextGeometry(e))if(this.m_shape.getGeometryType(e)===r.enumPolygon){p(this.m_shape,e,-1,!1,o,this.m_progressTracker)&&this.m_shape.setGeometryModified(e,!0)}this.m_bSimplifyPolygons=!1}m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape)}}else this.m_bSimplifyPolygons=!1,null!==m&&(m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape));this.moveToNextGeom()}if(this.m_currentGeom!==o){if(this.m_index=this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomIndex),-1!==this.m_geomTypeIndex&&this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomTypeIndex)===r.enumPoint){const e=new a({vd:this.m_shape.getVertexDescription()});return this.m_shape.queryPointGeometryOnly(this.m_currentGeom,e),this.m_bSnapToSr&&u(this.m_sr,e),e}{const e=this.m_shape.getGeometry(this.m_currentGeom);return this.m_bSnapToSr&&u(this.m_sr,e),e}}return null}getGeometryID(){return this.m_index}}const S=new x;function b(e,s,r){const i=S.executeMany(new t(e),s,null,r);return Array.from(i)}function I(){return S.supportsCurves()}export{b as executeMany,I as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{r as s,G as r,c as i}from"../../../chunks/Geometry.js";import{E as m,n as o}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{c as h,P as a}from"../../../chunks/Envelope.js";import{am as _,an as p,ao as u,m as l,l as c,n as y,ap as G,aq as g,C as d,ar as f}from"../../../chunks/ProjectionTransformation.js";class x{getOperatorType(){return 10009}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,r=0){return new T(e,t,s,r)}}class T extends e{constructor(e,t,r,i){super(),this.m_shape=new m,this.m_currentGeom=o,this.m_progressCounter=0,this.m_geomIndex=-1,this.m_geomTypeIndex=-1,this.m_index=-1,this.m_bBuilt=!1,this.m_bOutputOnlyModified=!1,this.m_bSimplifyPolygons=!1,this.m_bSnapToSr=!1,this.m_progressTracker=r,this.m_inputGeometries=e,this.m_sr=t,this.m_options=i,1===i||2===i?(this.m_bOutputOnlyModified=!0,this.m_options=0,this.m_bSimplifyPolygons=!0,this.m_bSnapToSr=null!=t&&2===i,this.m_bSnapToSr&&!_()&&s("PE is required for snapping to spatial reference operation")):0===i&&(this.m_bSimplifyPolygons=!0)}progress_(e=!1){}tock(){return!0}getRank(){return 1}moveToNextGeom(){for(;;){if(this.m_bBuilt?this.m_currentGeom=this.m_shape.getNextGeometry(this.m_currentGeom):(this.m_currentGeom=this.m_shape.getFirstGeometry(),this.m_bBuilt=!0),this.m_currentGeom!==o){let e=!1;if(this.m_bSimplifyPolygons&&this.m_shape.getGeometryType(this.m_currentGeom)===r.enumPolygon&&(e=p(this.m_shape,this.m_currentGeom,-1,!1,o,this.m_progressTracker)),this.m_bOutputOnlyModified&&!e&&!this.m_shape.getGeometryModified(this.m_currentGeom))continue}break}}next(){if(this.m_bBuilt)this.moveToNextGeom();else{this.m_geomIndex=this.m_shape.createGeometryUserIndex();const e=new n;for(let o=this.m_inputGeometries.next();null!=o;o=this.m_inputGeometries.next()){this.progress_(),i(o);let t=!1;this.m_bSnapToSr&&(o=o.clone(),t=u(this.m_sr,o));const s=this.m_shape.addGeometry(o);this.m_shape.setGeometryUserIndex(s,this.m_geomIndex,this.m_inputGeometries.getGeometryID());const m=o.getGeometryType();m===r.enumPoint&&(-1===this.m_geomTypeIndex&&(this.m_geomTypeIndex=this.m_shape.createGeometryUserIndex()),this.m_shape.setGeometryUserIndex(s,this.m_geomTypeIndex,m));const h=new n;o.queryLooseEnvelope(h),e.mergeEnvelope2D(h),t&&this.m_shape.setGeometryModified(s,!0)}const t=h(this.m_sr,e,!0),s=h(this.m_sr,e,!1);e.inflate(10*t.total()),this.m_shape.forceSetEnvelope2D(e);let m=null,a=0,_=0;if(this.m_shape.hasCurves()){m=new d;const s=l(t.total(),e);a=c(t.total()),_=f(s,a),y(this.m_shape,s,t.total(),12e3,m,null,this.m_progressTracker)}if(G(this.m_shape,s,this.m_progressTracker)){if(g(this.m_shape,t.add(_),this.m_progressTracker,0===this.m_options,this.m_bOutputOnlyModified),null!==m){if(this.m_bSimplifyPolygons){for(let e=this.m_shape.getFirstGeometry();e!==o;e=this.m_shape.getNextGeometry(e))if(this.m_shape.getGeometryType(e)===r.enumPolygon){p(this.m_shape,e,-1,!1,o,this.m_progressTracker)&&this.m_shape.setGeometryModified(e,!0)}this.m_bSimplifyPolygons=!1}m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape)}}else this.m_bSimplifyPolygons=!1,null!==m&&(m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape));this.moveToNextGeom()}if(this.m_currentGeom!==o){if(this.m_index=this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomIndex),-1!==this.m_geomTypeIndex&&this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomTypeIndex)===r.enumPoint){const e=new a({vd:this.m_shape.getVertexDescription()});return this.m_shape.queryPointGeometryOnly(this.m_currentGeom,e),this.m_bSnapToSr&&u(this.m_sr,e),e}{const e=this.m_shape.getGeometry(this.m_currentGeom);return this.m_bSnapToSr&&u(this.m_sr,e),e}}return null}getGeometryID(){return this.m_index}}const S=new x;function b(e,s,r){const i=S.executeMany(new t(e),s,null,r);return Array.from(i)}function I(){return S.supportsCurves()}export{b as executeMany,I as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{O as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{a as s,c as i,G as r,g as h}from"../../../chunks/Geometry.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{c as o}from"../../../chunks/Envelope.js";import{E as a,k as m,n as p}from"../../../chunks/QuadraticBezier.js";import{C as _,k as c,s as u,ar as l,l as g,ap as d,aq as G,an as C,at as y,au as I,av as x}from"../../../chunks/ProjectionTransformation.js";import{v as f}from"../../../chunks/Point2D.js";function k(t){t&&t.checkProgress()}class v{getOperatorType(){return 10012}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,s,i){return new S(t,e,s,i)}}class S extends t{constructor(t,e,i,r){super(),this.m_shape=null,this.m_topoGraph=null,this.m_curveStitcher=null,this.m_stitchMaxDeviation=0,this.m_chainStack=[],this.m_bitsetToChains=null,this.m_chainsLists=null,this.m_visitedChainsIndex=-1,this.m_index=-1,this.m_geometryIndex=-1,this.m_progressCounter=0,this.m_currentIds=[],this.m_currentEdgeIds=[],t||s(""),this.m_progressTracker=r,this.m_options=0!==i?i:3,(this.m_options<=0||this.m_options>63)&&s("options"),this.m_inputGeometryCursor=t,this.m_sr=e}tock(){return!0}getRank(){return 1}next(){if(-1===this.m_index){this.m_shape=new a;const t=new n;t.setEmpty(),this.m_geometryIndex=this.m_shape.createGeometryUserIndex();for(let o=this.m_inputGeometryCursor.next();null!==o;o=this.m_inputGeometryCursor.next()){i(o);const e=this.m_shape.addGeometry(o);o.getGeometryType()!==r.enumPolygon&&s("Polygon Overlay only supports Polygons"),this.m_shape.setGeometryUserIndex(e,this.m_geometryIndex,this.m_inputGeometryCursor.getGeometryID());const h=this.m_inputGeometryCursor.getRank();h>m&&this.m_shape.assignRankToGeometryVertices(e,h);const a=new n;o.queryLooseEnvelope(a),t.mergeEnvelope2D(a),k(this.m_progressTracker)}this.m_inputGeometryCursor=null;const e=o(this.m_sr,t,!0),h=o(this.m_sr,t,!1);t.inflate(10*e.total()),this.m_shape.forceSetEnvelope2D(t),this.m_stitchMaxDeviation=0;let x=0;if(this.m_shape.hasCurves()){this.m_curveStitcher=new _;const s=c(e.total(),t);this.m_stitchMaxDeviation=u(e.total()),x=l(s,this.m_stitchMaxDeviation),g(this.m_shape,s,e.total(),12e3,this.m_curveStitcher,null,this.m_progressTracker)}if(d(this.m_shape,h,this.m_progressTracker)){G(this.m_shape,e.add(x),this.m_progressTracker,!0,!1);for(let t=this.m_shape.getFirstGeometry();t!==p;t=this.m_shape.getNextGeometry(t))this.m_shape.getGeometryType(t)===r.enumPolygon&&C(this.m_shape,t,-1,!1,p,this.m_progressTracker)}this.m_topoGraph=new y,this.m_topoGraph.buildGeometryParentageSets(),this.m_topoGraph.setEditShape(this.m_shape,this.m_progressTracker);const f=this.m_topoGraph.getFirstChain();for(let s=this.m_topoGraph.getChainFirstIsland(f);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let t=this.m_topoGraph.getChainFirstIsland(s);t!==p;t=this.m_topoGraph.getChainNextInParent(t))this.m_chainStack.push(t);if(16&this.m_options){this.m_visitedChainsIndex=this.m_topoGraph.createUserIndexForChains(),this.m_bitsetToChains=new Map,this.m_chainsLists=new I;const t=[],e=this.m_topoGraph.getFirstChain();for(t.push(e);t.length>0;){const e=t.at(-1);t.pop();for(let s=this.m_topoGraph.getChainFirstIsland(e);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let e=this.m_topoGraph.getChainFirstIsland(s);e!==p;e=this.m_topoGraph.getChainNextInParent(e)){const s=this.m_topoGraph.getChainBitSet(e);if(null!==s&&!s.isZero()){let t;this.m_bitsetToChains.has(s)?t=this.m_bitsetToChains.get(s):(t=this.m_chainsLists.createList(),this.m_bitsetToChains.set(s,t)),this.m_chainsLists.addElement(t,e)}t.push(e)}}}}return this.makeNextGeometry()}getGeometryID(){return this.m_index}getGeometryIDs(){return this.m_currentIds.slice()}getBoundaryIDs(){return this.m_currentEdgeIds.slice()}buildIdsFromBitset(t,e){if(!t)return;const s=this.m_topoGraph.getGeometriesFromBits(t);if(s.length>0){for(let t=0,i=s.length;t<i;t++)e.push(this.m_shape.getGeometryUserIndex(s[t],this.m_geometryIndex));f(e)}}makeGeometryFromChainSinglePart(t){this.m_index++;const e=new a;null!==this.m_curveStitcher&&e.setCurveStitcherPointer(this.m_curveStitcher);const s=this.m_topoGraph.extractPolygonFromChainAndIslands(e,p,t,p);return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(e,s,this.m_stitchMaxDeviation,!1),e.getGeometry(s)}makeGeometryFromChainMultiPart(t,e){this.m_index++;const s=new a;null!==this.m_curveStitcher&&s.setCurveStitcherPointer(this.m_curveStitcher);const i=this.m_bitsetToChains.has(e);h(i);const r=this.m_bitsetToChains.get(e);let n=p;for(let h=this.m_chainsLists.getFirst(r);h!==I.st_nullNode();h=this.m_chainsLists.getNext(h)){const t=this.m_chainsLists.getElement(h);n=this.m_topoGraph.extractPolygonFromChainAndIslands(s,n,t,p),this.m_topoGraph.setChainUserIndex(t,this.m_visitedChainsIndex,1)}return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(s,n,this.m_stitchMaxDeviation,!1),s.getGeometry(n)}makeNextGeometry(){for(k(this.m_progressTracker);this.m_chainStack.length>0;){this.m_currentIds.length=0,this.m_currentEdgeIds.length=0;const t=this.m_chainStack.at(-1);this.m_chainStack.pop();const e=this.m_topoGraph.getChainArea(t);if(0!==e)if(e<0)for(let s=this.m_topoGraph.getChainFirstIsland(t);s!==p;s=this.m_topoGraph.getChainNextInParent(s))this.m_topoGraph.getChainArea(s)>0&&this.m_chainStack.push(s);else{for(let i=this.m_topoGraph.getChainFirstIsland(t);i!==p;i=this.m_topoGraph.getChainNextInParent(i))this.m_topoGraph.getChainArea(i)<0&&this.m_chainStack.push(i);if(-1!==this.m_visitedChainsIndex&&1===this.m_topoGraph.getChainUserIndex(t,this.m_visitedChainsIndex))continue;const e=t=>{const e=t.getUnorderedBitIterator();let s=0;for(;e.next()!==x.npos();)if(s++,s>1)return s;return s},s=e(this.m_topoGraph.getChainBitSet(t));if(s>0){if(1===s&&2&this.m_options||s>1&&1&this.m_options){const e=this.m_topoGraph.getChainBitSet(t);return this.buildIdsFromBitset(e,this.m_currentIds),16&this.m_options?this.makeGeometryFromChainMultiPart(t,e):this.makeGeometryFromChainSinglePart(t)}}else{if(!(12&~this.m_options)){if(32&this.m_options){const e=this.m_topoGraph.getChainBoundaryBitSet(t);this.buildIdsFromBitset(e,this.m_currentEdgeIds)}return this.makeGeometryFromChainSinglePart(t)}if(4&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(e(s)>1)return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}if(8&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(1===e(s))return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}}}}return null}}const F=new v;function P(t,s,i){return F.executeMany(new e(t),s,i,null)}function T(){return F.supportsCurves()}export{P as executeMany,T as supportsCurves};
5
+ import{O as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{a as s,c as i,G as r,g as h}from"../../../chunks/Geometry.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{c as o}from"../../../chunks/Envelope.js";import{E as a,k as m,n as p}from"../../../chunks/QuadraticBezier.js";import{C as _,m as c,l as u,ar as l,n as g,ap as d,aq as G,an as C,at as y,au as I,av as x}from"../../../chunks/ProjectionTransformation.js";import{v as f}from"../../../chunks/Point2D.js";function k(t){t&&t.checkProgress()}class v{getOperatorType(){return 10012}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,s,i){return new S(t,e,s,i)}}class S extends t{constructor(t,e,i,r){super(),this.m_shape=null,this.m_topoGraph=null,this.m_curveStitcher=null,this.m_stitchMaxDeviation=0,this.m_chainStack=[],this.m_bitsetToChains=null,this.m_chainsLists=null,this.m_visitedChainsIndex=-1,this.m_index=-1,this.m_geometryIndex=-1,this.m_progressCounter=0,this.m_currentIds=[],this.m_currentEdgeIds=[],t||s(""),this.m_progressTracker=r,this.m_options=0!==i?i:3,(this.m_options<=0||this.m_options>63)&&s("options"),this.m_inputGeometryCursor=t,this.m_sr=e}tock(){return!0}getRank(){return 1}next(){if(-1===this.m_index){this.m_shape=new a;const t=new n;t.setEmpty(),this.m_geometryIndex=this.m_shape.createGeometryUserIndex();for(let o=this.m_inputGeometryCursor.next();null!==o;o=this.m_inputGeometryCursor.next()){i(o);const e=this.m_shape.addGeometry(o);o.getGeometryType()!==r.enumPolygon&&s("Polygon Overlay only supports Polygons"),this.m_shape.setGeometryUserIndex(e,this.m_geometryIndex,this.m_inputGeometryCursor.getGeometryID());const h=this.m_inputGeometryCursor.getRank();h>m&&this.m_shape.assignRankToGeometryVertices(e,h);const a=new n;o.queryLooseEnvelope(a),t.mergeEnvelope2D(a),k(this.m_progressTracker)}this.m_inputGeometryCursor=null;const e=o(this.m_sr,t,!0),h=o(this.m_sr,t,!1);t.inflate(10*e.total()),this.m_shape.forceSetEnvelope2D(t),this.m_stitchMaxDeviation=0;let x=0;if(this.m_shape.hasCurves()){this.m_curveStitcher=new _;const s=c(e.total(),t);this.m_stitchMaxDeviation=u(e.total()),x=l(s,this.m_stitchMaxDeviation),g(this.m_shape,s,e.total(),12e3,this.m_curveStitcher,null,this.m_progressTracker)}if(d(this.m_shape,h,this.m_progressTracker)){G(this.m_shape,e.add(x),this.m_progressTracker,!0,!1);for(let t=this.m_shape.getFirstGeometry();t!==p;t=this.m_shape.getNextGeometry(t))this.m_shape.getGeometryType(t)===r.enumPolygon&&C(this.m_shape,t,-1,!1,p,this.m_progressTracker)}this.m_topoGraph=new y,this.m_topoGraph.buildGeometryParentageSets(),this.m_topoGraph.setEditShape(this.m_shape,this.m_progressTracker);const f=this.m_topoGraph.getFirstChain();for(let s=this.m_topoGraph.getChainFirstIsland(f);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let t=this.m_topoGraph.getChainFirstIsland(s);t!==p;t=this.m_topoGraph.getChainNextInParent(t))this.m_chainStack.push(t);if(16&this.m_options){this.m_visitedChainsIndex=this.m_topoGraph.createUserIndexForChains(),this.m_bitsetToChains=new Map,this.m_chainsLists=new I;const t=[],e=this.m_topoGraph.getFirstChain();for(t.push(e);t.length>0;){const e=t.at(-1);t.pop();for(let s=this.m_topoGraph.getChainFirstIsland(e);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let e=this.m_topoGraph.getChainFirstIsland(s);e!==p;e=this.m_topoGraph.getChainNextInParent(e)){const s=this.m_topoGraph.getChainBitSet(e);if(null!==s&&!s.isZero()){let t;this.m_bitsetToChains.has(s)?t=this.m_bitsetToChains.get(s):(t=this.m_chainsLists.createList(),this.m_bitsetToChains.set(s,t)),this.m_chainsLists.addElement(t,e)}t.push(e)}}}}return this.makeNextGeometry()}getGeometryID(){return this.m_index}getGeometryIDs(){return this.m_currentIds.slice()}getBoundaryIDs(){return this.m_currentEdgeIds.slice()}buildIdsFromBitset(t,e){if(!t)return;const s=this.m_topoGraph.getGeometriesFromBits(t);if(s.length>0){for(let t=0,i=s.length;t<i;t++)e.push(this.m_shape.getGeometryUserIndex(s[t],this.m_geometryIndex));f(e)}}makeGeometryFromChainSinglePart(t){this.m_index++;const e=new a;null!==this.m_curveStitcher&&e.setCurveStitcherPointer(this.m_curveStitcher);const s=this.m_topoGraph.extractPolygonFromChainAndIslands(e,p,t,p);return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(e,s,this.m_stitchMaxDeviation,!1),e.getGeometry(s)}makeGeometryFromChainMultiPart(t,e){this.m_index++;const s=new a;null!==this.m_curveStitcher&&s.setCurveStitcherPointer(this.m_curveStitcher);const i=this.m_bitsetToChains.has(e);h(i);const r=this.m_bitsetToChains.get(e);let n=p;for(let h=this.m_chainsLists.getFirst(r);h!==I.st_nullNode();h=this.m_chainsLists.getNext(h)){const t=this.m_chainsLists.getElement(h);n=this.m_topoGraph.extractPolygonFromChainAndIslands(s,n,t,p),this.m_topoGraph.setChainUserIndex(t,this.m_visitedChainsIndex,1)}return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(s,n,this.m_stitchMaxDeviation,!1),s.getGeometry(n)}makeNextGeometry(){for(k(this.m_progressTracker);this.m_chainStack.length>0;){this.m_currentIds.length=0,this.m_currentEdgeIds.length=0;const t=this.m_chainStack.at(-1);this.m_chainStack.pop();const e=this.m_topoGraph.getChainArea(t);if(0!==e)if(e<0)for(let s=this.m_topoGraph.getChainFirstIsland(t);s!==p;s=this.m_topoGraph.getChainNextInParent(s))this.m_topoGraph.getChainArea(s)>0&&this.m_chainStack.push(s);else{for(let i=this.m_topoGraph.getChainFirstIsland(t);i!==p;i=this.m_topoGraph.getChainNextInParent(i))this.m_topoGraph.getChainArea(i)<0&&this.m_chainStack.push(i);if(-1!==this.m_visitedChainsIndex&&1===this.m_topoGraph.getChainUserIndex(t,this.m_visitedChainsIndex))continue;const e=t=>{const e=t.getUnorderedBitIterator();let s=0;for(;e.next()!==x.npos();)if(s++,s>1)return s;return s},s=e(this.m_topoGraph.getChainBitSet(t));if(s>0){if(1===s&&2&this.m_options||s>1&&1&this.m_options){const e=this.m_topoGraph.getChainBitSet(t);return this.buildIdsFromBitset(e,this.m_currentIds),16&this.m_options?this.makeGeometryFromChainMultiPart(t,e):this.makeGeometryFromChainSinglePart(t)}}else{if(!(12&~this.m_options)){if(32&this.m_options){const e=this.m_topoGraph.getChainBoundaryBitSet(t);this.buildIdsFromBitset(e,this.m_currentEdgeIds)}return this.makeGeometryFromChainSinglePart(t)}if(4&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(e(s)>1)return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}if(8&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(1===e(s))return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}}}}return null}}const F=new v;function P(t,s,i){return F.executeMany(new e(t),s,i,null)}function T(){return F.supportsCurves()}export{P as executeMany,T as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{S as n}from"../../../chunks/SimpleGeometryCursor.js";import{O as r}from"../../../chunks/OperatorSimplifyOGC.js";const e=new r;function u(n,r,u){return e.execute(n,r,u,null)}function t(r,u,t){const o=e.executeMany(new n(r),u,t,null);return Array.from(o)}function o(n,r,u){return e.isSimple(n,r,u,null,null)}function s(){return e.supportsCurves()}export{u as execute,t as executeMany,o as isSimple,s as supportsCurves};
5
+ import{S as r}from"../../../chunks/SimpleGeometryCursor.js";import{O as n}from"../../../chunks/OperatorSimplifyOGC.js";const e=new n;function t(r,n,t){return e.execute(r,n,t,null)}function u(n,t,u){const o=e.executeMany(new r(n),t,u,null);return Array.from(o)}function o(r,n,t,u){return e.isSimple(r,n,t,u,null)}function s(){return e.supportsCurves()}export{t as execute,u as executeMany,o as isSimple,s as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{supportsCurves as r,execute as t,executeMany as o,isSimple as e}from"./gx/operatorSimplifyOGC.js";import{getSpatialReference as n,toGeometry as s,fromSpatialReference as p,fromGeometry as u}from"./support/apiConverter.js";function i(r){const o=n(r);return s(t(u(r),p(o),!1),o)}function a(r){const t=r.map(u),e=n(r);return o(t,p(e),!1).map((r=>s(r,e)))}function c(r){return e(u(r),p(n(r)),!1)}const m=r();export{i as execute,a as executeMany,c as isSimple,m as supportsCurves};
5
+ import{isSimple as r,supportsCurves as t,execute as n,executeMany as o}from"./gx/operatorSimplifyOGC.js";import{fromSpatialReference as e,getSpatialReference as s,fromGeometry as p,toGeometry as u}from"./support/apiConverter.js";function i(r){const t=s(r);return u(n(p(r),e(t),!1),t)}function a(r){const t=r.map(p),n=s(r);return o(t,e(n),!1).map((r=>u(r,n)))}function c(t,n){return r(p(t),e(s(t)),null!=n,n??null)}const m=t();export{i as execute,a as executeMany,c as isSimple,m as supportsCurves};