@arcgis/core 4.34.0-next.93 → 4.34.0-next.95

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 (850) hide show
  1. package/analysis/ElevationProfile/ElevationProfileDisplayUnits.d.ts +4 -0
  2. package/analysis/ElevationProfile/{ElevationProfileUnits.js → ElevationProfileDisplayUnits.js} +1 -1
  3. package/analysis/ElevationProfile/ElevationProfileViewOptions.js +1 -1
  4. package/analysis/ElevationProfileAnalysis.js +1 -1
  5. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  6. package/analysis/featureReferenceUtils.js +1 -1
  7. package/applications/Components/featureUtils.d.ts +1 -0
  8. package/applications/Components/featureUtils.js +1 -1
  9. package/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
  10. package/assets/esri/core/workers/RemoteClient.js +1 -1
  11. package/assets/esri/core/workers/chunks/{57c08ccb75e3135978d1.js → 0086a09441627842d34a.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{35ca317490540fae437c.js → 04c30eec4387078cd38f.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{155dcbd957f8787a45c3.js → 05eee334d58a0b9f6316.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{0f37204f86d2997a2811.js → 06e60fc7715d08ede59d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{94ddf029698991d853b9.js → 0811ac64d08454460fb1.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{6391ce002fbde9f27a77.js → 081a7082dc281ca7662a.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{3c3b1dc95f03082e4d5b.js → 083f1c2fd0b59a0bf4c3.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{9d9a639f7388a29e7c96.js → 08ee3a97d2b8adb44ea9.js} +1 -1
  19. package/assets/esri/core/workers/chunks/097e5deb51ee7e25e654.js +1 -0
  20. package/assets/esri/core/workers/chunks/{c86ca87959f04075e834.js → 0a7efed82d8e47290147.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{147f6e7b147beaa4ed29.js → 0d94a08769727875bf0e.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{e2fdc4dc1ab9decd731e.js → 135e270b4f03c4270870.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{c6cae8471c5d4ae40c65.js → 145c6a7cdcc9893efb27.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{0cfded1acf92f89a13cb.js → 14ace5dc4b8984212a57.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{39a5863355cccaabd2d6.js → 1762ff76350065750c75.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{d9d86cf0500fa29d1d43.js → 188272af9a6470ccfe31.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{ce8f56cf371812b57a46.js → 19699769deff862e29ce.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{bf9d09493fd849ea69fd.js → 1fd459234917a51b6ae1.js} +1 -1
  29. package/assets/esri/core/workers/chunks/20f4c6d8b310ecab97be.js +1 -0
  30. package/assets/esri/core/workers/chunks/{0aaaf4d1c4a5d284216e.js → 22bb877b85ae250d7819.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{05072093e0209ef5db20.js → 24c14e4a1d2a2267097e.js} +1 -1
  32. package/assets/esri/core/workers/chunks/25639559336109ff3df1.js +1 -0
  33. package/assets/esri/core/workers/chunks/{e5d974593043d5e2b502.js → 2795a2817ebe3298c350.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{71fef0a33b7ed9456e47.js → 28a5f8978817e0471a2a.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{07a7ca89ef2ca4fc090b.js → 2a30afa043e3f88655d9.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{41f275401e1cde7eee20.js → 2a8b75d2445680571759.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{6b208f5d423da64c8559.js → 2a900a632a1231deb713.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{0e5e565df6ec71445f2e.js → 2bbe8277578b033f92d4.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{48133effac2eacc2196e.js → 2bf29faeb23120dc1916.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{77e611724a499d36eacc.js → 2c72e185b780bbbb1c9f.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{38d874d7f815f5329420.js → 2ca8b0c1ca399fd5dc2f.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{c799f1c03cb22ef52f5f.js → 2d51e9c9b73301b6879c.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{cd0c222a36caa7f80860.js → 2e4dccee7ea387263f15.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{0856cd281efd71bfe3c4.js → 3116b35a92cc0afd9fd3.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{c27783ce7ea51a5e49c5.js → 319c3f46f2afb8f3e5a9.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{b8f55ee77ab6ea4c289e.js → 326a76a4e80269d4029d.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{28bb6896c5fd353ca5e9.js → 3367b8565226646decec.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{c38360d912f256519e06.js → 3496e025e48cf580250d.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{4753793daf0b7ff8b5ff.js → 35255e2b980f650490d8.js} +1 -1
  50. package/assets/esri/core/workers/chunks/37d05d9796917c3d4b7a.js +1 -0
  51. package/assets/esri/core/workers/chunks/{7b17f52019762aa21af8.js → 3815ffa13e7b439bca6e.js} +1 -1
  52. package/assets/esri/core/workers/chunks/3a2d4b78a48ebb181105.js +1 -0
  53. package/assets/esri/core/workers/chunks/{de34c21d3e6913befe5a.js → 3b65d6a78fbffca37fbd.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{c473b15d4d52f0a63d20.js → 3c78208a97c4cbd8d6d1.js} +1 -1
  55. package/assets/esri/core/workers/chunks/3ccdce156b906574bd29.js +1 -0
  56. package/assets/esri/core/workers/chunks/{68f5a2d2666636c3f807.js → 40b81d1c2d53cf598b8e.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{f3284d4e0d41efb0b4a0.js → 441ead5bce80f639934e.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{97eb2cfc1f036feea9a9.js → 44c3b5a507814103f4b4.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{6f29951f5a2da068b257.js → 456161a323be7d640c61.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{b18887a6dc86f0c8324a.js → 48646f3d95a3f2b17e78.js} +1 -1
  61. package/assets/esri/core/workers/chunks/49571d6875de1f2e7e25.js +33 -0
  62. package/assets/esri/core/workers/chunks/{1bbc0dfad4cd72a1c42b.js → 4a2bf3c8da24abd8b9e2.js} +6 -6
  63. package/assets/esri/core/workers/chunks/4b13749b74059a7837d2.js +1 -0
  64. package/assets/esri/core/workers/chunks/{c8e4fe0e3b109eb80e8e.js → 4b83b45df0c4005d078d.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{896c7d137bfd7a8fa0bc.js → 4f01be74dd26e639330f.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{b5c829e904bc9cb5347d.js → 50a5caa96c111dda5c60.js} +1 -1
  67. package/assets/esri/core/workers/chunks/50e1c63d0b6196dd365e.js +1 -0
  68. package/assets/esri/core/workers/chunks/{899f493412acd5a5d91f.js → 5132ca68e8c7af111a47.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{d08b80583a23ba253c7e.js → 56916e56c20465428dd4.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{bbdadced49446c907361.js → 578789c040846ea3759b.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{f62717338075df626eda.js → 5a527a47285a5995cff9.js} +1 -1
  72. package/assets/esri/core/workers/chunks/5cb92abb1f0f38bd0eab.js +1 -0
  73. package/assets/esri/core/workers/chunks/{56edb55b53779e7fd31e.js → 5d2e5774768d8f290343.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{6e5175b43220d6692263.js → 5d3661d1fe46dd29aae9.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{0652d7e525d99e39c957.js → 5fb2ce028b371b3a8acb.js} +1 -1
  76. package/assets/esri/core/workers/chunks/63019a7eb5222dc5e420.js +1 -0
  77. package/assets/esri/core/workers/chunks/{71c6c0b26253c4ca1b68.js → 630efe10c871425b6a95.js} +1 -1
  78. package/assets/esri/core/workers/chunks/64629ddcf008349eaf41.js +1 -0
  79. package/assets/esri/core/workers/chunks/{61e8e159f1f336569b27.js → 65111858957f43eacd8c.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{0427f66b56ec6601deb0.js → 6ac90d88e5f931b1a003.js} +1 -1
  81. package/assets/esri/core/workers/chunks/6c842b955fdd40b39914.js +1 -0
  82. package/assets/esri/core/workers/chunks/{08b0fc6bfe9640ee2525.js → 6cd379bb66dc4cf5d2bf.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{1f2d13466c60a6b57717.js → 6e5b3bbee054d072b594.js} +1 -1
  84. package/assets/esri/core/workers/chunks/6ec77a8142fbfa805b5a.js +1 -0
  85. package/assets/esri/core/workers/chunks/{541bffd61006d0e36166.js → 6f4bd0ee85e7e5a74340.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{648c91a9822bc9d6ee47.js → 701a1835684cf815bcb7.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{f71b76c9506178124fa3.js → 70af1b5b3d2f3f395441.js} +1 -1
  88. package/assets/esri/core/workers/chunks/{d7adef4093ce19ad356d.js → 72846fb9c87c6642daf0.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{f88fe2e8fbc763bdc940.js → 73c1d43070b4fe1e5c1e.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{cab2a1382bdd32bb34d8.js → 7421f9575487cdc9e28e.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{a845c68e76382a73da5e.js → 7633537dc0c65d655baf.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{82e0d22619dc26920ca9.js → 7698f4f4471b6e1c12ef.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{9a0b9d931c1a29e81475.js → 76e444bd625cf3d35877.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{b265472ac3f949a7f40c.js → 773d76253588bcf14eaa.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{77705d0c7c17bd46d81a.js → 7810f870d71f80ca4f41.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{56de25a6fe659a5b5c2b.js → 78b35a19332e58c8c279.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{e4833b718a813a8d125b.js → 79012b873d2b7786be77.js} +1 -1
  98. package/assets/esri/core/workers/chunks/7a6a96edc892d7060b7d.js +1 -0
  99. package/assets/esri/core/workers/chunks/7b3ff47cdbb6af38530d.js +1 -0
  100. package/assets/esri/core/workers/chunks/{04dbdaa63c950f32b8f0.js → 7e8f7fa884d6d41ebae2.js} +1 -1
  101. package/assets/esri/core/workers/chunks/81bbe5251ed13c0d91cc.js +1 -0
  102. package/assets/esri/core/workers/chunks/{0037abf0a82d1ed32e91.js → 8215015f11221a354273.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{cb6a9b43406f4fbe10b2.js → 82f1cd3896401c85df35.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{2bb61f80473b495163e3.js → 83ab8c8bc9e6990114a8.js} +1 -1
  105. package/assets/esri/core/workers/chunks/{03b455e9405a8b6fec68.js → 8659abd4b46f153b6902.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{19bd0b56d82446dbb7c5.js → 868ee8f429e7caddc045.js} +1 -1
  107. package/assets/esri/core/workers/chunks/{ad67e5eb4b8c0c14cea6.js → 86b978a48b539e9fc5b8.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{4dfcd03082be83600f3a.js → 88add09190569b04e824.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{65e279516170ddbd4a65.js → 89027f6800e17fab8973.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{3e11a893271caa11a881.js → 8ad8fe758c615fcf2185.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{a6533bab3b2fbc1e2a47.js → 8b16aa50d879b92a5375.js} +1 -1
  112. package/assets/esri/core/workers/chunks/{edaf059c7ea18088c3dd.js → 91df8638b8b904e6d8c5.js} +1 -1
  113. package/assets/esri/core/workers/chunks/92c306d02569e7cd9af3.js +1 -0
  114. package/assets/esri/core/workers/chunks/{fdadf11f31384c09db9f.js → 94486f3fcba48fa93aa8.js} +1 -1
  115. package/assets/esri/core/workers/chunks/{8513c9282c44bb0a736e.js → 9834bc11586a2d8d6f35.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{a0fab8cd791c33d3895d.js → 98dbafa4d45fdf790fff.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{2b867cec6ada339f1c8f.js → 9958a3ed4aa787d19e00.js} +1 -1
  118. package/assets/esri/core/workers/chunks/9a723d739ac44b45432c.js +1 -0
  119. package/assets/esri/core/workers/chunks/{4660798b3b45dcb5cecb.js → 9b0ea5e50aeeea615592.js} +14 -14
  120. package/assets/esri/core/workers/chunks/9c6fc4fe2c46f40d63d9.js +1 -0
  121. package/assets/esri/core/workers/chunks/a1c4509a3865139eb570.js +1 -0
  122. package/assets/esri/core/workers/chunks/{992b1389710d716d3450.js → a410dcf80d17a2383337.js} +1 -1
  123. package/assets/esri/core/workers/chunks/{db5a985ccc6b7d0ad855.js → a7bd294996e6c8b8354a.js} +1 -1
  124. package/assets/esri/core/workers/chunks/{80a155496deef2c02a3e.js → a878061845e594b2d72c.js} +1 -1
  125. package/assets/esri/core/workers/chunks/{8f426cb210a4250517d5.js → ad3e18c4c65aa2cd1ceb.js} +1 -1
  126. package/assets/esri/core/workers/chunks/{0328eaea66c1db98da1c.js → ae807912acc19a166264.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{0a981061df08da19372c.js → ae8c387d59be87457567.js} +1 -1
  128. package/assets/esri/core/workers/chunks/{5caf49e679ed0c27e0bd.js → aea8553a2aa54cfd694b.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{0ceb68ff73e5d39e837a.js → b13ccda702b714fe6161.js} +1 -1
  130. package/assets/esri/core/workers/chunks/b1f667006cba60ef4aa7.js +1 -0
  131. package/assets/esri/core/workers/chunks/{70c8f69eed14d55c5cf6.js → b2add7338258ca7c24dd.js} +1 -1
  132. package/assets/esri/core/workers/chunks/b2d9f4e057af26a538fb.js +1 -0
  133. package/assets/esri/core/workers/chunks/b4ea675831627d9808dd.js +1 -0
  134. package/assets/esri/core/workers/chunks/{8de9e50de0ac66ae1573.js → b8339c1d60847a9eed3e.js} +1 -1
  135. package/assets/esri/core/workers/chunks/bae0dfe9a2f5aabae42c.js +1 -0
  136. package/assets/esri/core/workers/chunks/{95bae3c275f1483eb7ed.js → bcff6178e9d16b1b6191.js} +1 -1
  137. package/assets/esri/core/workers/chunks/{2845a0810e9c00bf30f8.js → bf775fe489213cfc08b1.js} +1 -1
  138. package/assets/esri/core/workers/chunks/{4823e4522bd7379d858e.js → bfc1e8aec7aace3ff30e.js} +1 -1
  139. package/assets/esri/core/workers/chunks/{20003728a679479b14dc.js → c31583229a1100b66a18.js} +1 -1
  140. package/assets/esri/core/workers/chunks/{9346437b152b20bdcf8a.js → c941d15190fc08523d0d.js} +1 -1
  141. package/assets/esri/core/workers/chunks/{5746c4861af83c1d57a8.js → cf11b1dcc2cff30229b6.js} +1 -1
  142. package/assets/esri/core/workers/chunks/{f6806780ca2aa591475a.js → cf13625a033f9903655f.js} +1 -1
  143. package/assets/esri/core/workers/chunks/d28ea91f7458daa67fae.js +1 -0
  144. package/assets/esri/core/workers/chunks/{1990162dcf73601d54f7.js → d3cd9c24edf7520d0824.js} +1 -1
  145. package/assets/esri/core/workers/chunks/{bec9ddd38c9ab9f2561b.js → d4f16c2b9297a479731e.js} +1 -1
  146. package/assets/esri/core/workers/chunks/{73db6c070b049fe05147.js → d57edb77c6deee36cce5.js} +1 -1
  147. package/assets/esri/core/workers/chunks/{6e4ec9fa931c69e4e4ba.js → da573ecc68e6aa8f6da9.js} +1 -1
  148. package/assets/esri/core/workers/chunks/{bdf0ab95401c6d8fbc7d.js → db559437b571462fb3db.js} +1 -1
  149. package/assets/esri/core/workers/chunks/{512dcd6e34e217029391.js → deb2854bb7d082a26f52.js} +1 -1
  150. package/assets/esri/core/workers/chunks/{5993427325d1add18ed9.js → dede989d59c4b416af68.js} +1 -1
  151. package/assets/esri/core/workers/chunks/{18e9cb71fa020e93d139.js → df5ecb3339d9301a6f5b.js} +1 -1
  152. package/assets/esri/core/workers/chunks/{e22b400636094fc7b6c0.js → dfbf2e17058aa876f96a.js} +1 -1
  153. package/assets/esri/core/workers/chunks/dfc37c2ce51e6a34fd87.js +1 -0
  154. package/assets/esri/core/workers/chunks/dff8e15958423e0212e5.js +1 -0
  155. package/assets/esri/core/workers/chunks/{c5c6a32a24005478c976.js → e032f3d2ee19790f8c79.js} +1 -1
  156. package/assets/esri/core/workers/chunks/{3d7923d25734d03a4d27.js → e1dba29f5fd1ee5fc999.js} +1 -1
  157. package/assets/esri/core/workers/chunks/e2c293331515f3bd0355.js +1 -0
  158. package/assets/esri/core/workers/chunks/{352511dbc67166face40.js → e2e32e2f04cce9e932fd.js} +1 -1
  159. package/assets/esri/core/workers/chunks/{bb0a1be03bb9d621432c.js → e7638b9ab6674bc8a18f.js} +1 -1
  160. package/assets/esri/core/workers/chunks/{edef1e2254c992459c63.js → eb1a7bb8b14e651bc241.js} +1 -1
  161. package/assets/esri/core/workers/chunks/ec7b156425f25d231078.js +1 -0
  162. package/assets/esri/core/workers/chunks/{779ee975efebb838b5d6.js → f154336b4af011cd0c56.js} +1 -1
  163. package/assets/esri/core/workers/chunks/{3807d0b9b1894731174d.js → f1be3a177328a169128f.js} +1 -1
  164. package/assets/esri/core/workers/chunks/{0810dbbf348a927392e7.js → f59c782898d931810374.js} +1 -1
  165. package/assets/esri/core/workers/chunks/f5d89b48f62fba78fd10.js +1 -0
  166. package/assets/esri/core/workers/chunks/f7846523adacbfe5047e.js +1 -0
  167. package/assets/esri/core/workers/chunks/{b510c07dfd0d31683b08.js → f7a9d2da07196a0989ae.js} +1 -1
  168. package/assets/esri/core/workers/chunks/{143503f6eb270c4683f8.js → f7c99e9c8d19352af38d.js} +1 -1
  169. package/assets/esri/core/workers/chunks/{79ab06fb4c91ac8da323.js → f839b86bee15deaf84e4.js} +1 -1
  170. package/assets/esri/core/workers/chunks/{9adecee0ed2f1df3b0d2.js → f85e2b6a285fa8ad60aa.js} +1 -1
  171. package/assets/esri/core/workers/chunks/{024063fe2bbb27899094.js → fbbccca5b1bcffb31c4e.js} +1 -1
  172. package/assets/esri/core/workers/chunks/{009556f323e58271bc7a.js → fc4417d1260b717a9385.js} +1 -1
  173. package/assets/esri/core/workers/chunks/{6810ecdeccf4b7eae5e2.js → fdaf8fb5a3cc7abea44b.js} +1 -1
  174. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  175. package/assets/esri/themes/base/widgets/_Editor.scss +4 -0
  176. package/assets/esri/themes/dark/main.css +1 -1
  177. package/assets/esri/themes/light/main.css +1 -1
  178. package/assets/esri/themes/light/view.css +1 -1
  179. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  180. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  181. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  182. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  183. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  184. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  185. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  186. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  187. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  188. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  189. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  190. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  191. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  192. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  193. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  194. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  195. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  196. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  197. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  198. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  199. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  200. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  201. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  202. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  203. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  204. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  205. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  206. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  207. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  208. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  209. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  210. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  211. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  212. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  213. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  214. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  215. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  216. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  217. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  218. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  219. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  220. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  221. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  222. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  223. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  224. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  225. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  226. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  227. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  228. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  229. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  230. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  231. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  232. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  233. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  234. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  235. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  236. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  237. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  238. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  239. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  240. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  241. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  242. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  243. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  244. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  245. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  246. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  247. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  248. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  249. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  250. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  251. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  252. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  253. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  254. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  255. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  256. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  257. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  258. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  259. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  260. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  261. package/assets/esri/widgets/Sketch/t9n/Sketch.json +1 -1
  262. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  263. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  264. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  265. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  266. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  267. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  268. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  269. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  270. package/assets/esri/widgets/Sketch/t9n/Sketch_en.json +1 -1
  271. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  272. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  273. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  274. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  275. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  276. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  277. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  278. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  279. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  280. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  281. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  282. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  283. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  284. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  285. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  286. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  287. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  288. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  289. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  290. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  291. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  292. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  293. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  294. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  295. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  296. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  297. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  298. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  299. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  300. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  301. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  302. package/chunks/Envelope.js +1 -1
  303. package/chunks/Fog.glsl.js +2 -2
  304. package/chunks/Geometry.js +1 -1
  305. package/chunks/GlowBlur.glsl.js +8 -9
  306. package/chunks/GlowComposition.glsl.js +15 -16
  307. package/chunks/Laserlines.glsl.js +12 -12
  308. package/chunks/MultiPathImpl.js +1 -1
  309. package/chunks/Point2D.js +1 -1
  310. package/chunks/PointRenderer.glsl.js +1 -1
  311. package/chunks/Precipitation.glsl.js +2 -2
  312. package/chunks/Terrain.glsl.js +1 -1
  313. package/chunks/WaterSurface.glsl.js +0 -1
  314. package/chunks/boundedPlane.js +1 -1
  315. package/chunks/bundle.js +1 -1
  316. package/chunks/cameraUtilsPlanar.js +1 -1
  317. package/chunks/cameraUtilsSpherical.js +1 -1
  318. package/chunks/sphere.js +1 -1
  319. package/chunks/vec32.js +1 -1
  320. package/colorUtils.js +1 -1
  321. package/config.js +1 -1
  322. package/core/accessorSupport/extensions/serializableProperty/reader.js +1 -1
  323. package/core/accessorSupport/extensions/serializableProperty/utils.js +5 -0
  324. package/core/accessorSupport/extensions/serializableProperty.js +1 -1
  325. package/core/accessorSupport/read.js +1 -1
  326. package/core/accessorSupport/write.js +1 -1
  327. package/core/has.js +1 -1
  328. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  329. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  330. package/core/perspectiveUtils.js +1 -1
  331. package/core/workers/workerFactory.js +1 -1
  332. package/editing/geometry/lineUtils.js +1 -1
  333. package/geometry/Mesh.js +1 -1
  334. package/geometry/operators/support/jsonConverter.js +1 -1
  335. package/geometry/projection/localLinearScaleFactors.js +1 -1
  336. package/geometry/projection/projectDirection.js +1 -1
  337. package/geometry/projection/projectVec3Array.js +1 -1
  338. package/geometry/support/axisAngle.js +1 -1
  339. package/geometry/support/axisAngleDegrees.js +1 -1
  340. package/geometry/support/buffer/internals/Vec3.js +1 -1
  341. package/geometry/support/clipRay.js +1 -1
  342. package/geometry/support/coordinateSystem.js +1 -1
  343. package/geometry/support/frustum.js +1 -1
  344. package/geometry/support/lineSegment.js +1 -1
  345. package/geometry/support/meshUtils/centerAt.js +1 -1
  346. package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
  347. package/geometry/support/meshUtils/loadExternal.js +1 -1
  348. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  349. package/geometry/support/meshUtils/merge.js +1 -1
  350. package/geometry/support/meshUtils/rotate.js +1 -1
  351. package/geometry/support/meshUtils/scale.js +1 -1
  352. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  353. package/geometry/support/plane.js +1 -1
  354. package/geometry/support/polygonUtils.js +1 -1
  355. package/geometry/support/ray.js +1 -1
  356. package/geometry/support/sphereUtils.js +1 -1
  357. package/geometry/support/triangle.js +1 -1
  358. package/geometry/support/vector.js +1 -1
  359. package/interfaces.d.ts +476 -220
  360. package/kernel.js +1 -1
  361. package/layers/FeatureLayer.js +1 -1
  362. package/layers/GaussianSplatLayer.js +1 -1
  363. package/layers/VoxelWasmPerSceneView.js +1 -1
  364. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  365. package/layers/graphics/dehydratedFeatureComparison.js +1 -1
  366. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  367. package/layers/graphics/sources/ParquetSource.js +1 -1
  368. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  369. package/layers/graphics/sources/support/QueryTask.js +1 -1
  370. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  371. package/layers/knowledgeGraph/layerUtils.js +1 -1
  372. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  373. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  374. package/layers/orientedImagery/transformations/utils.js +1 -1
  375. package/layers/orientedImagery/transformations/worldToImage.js +1 -1
  376. package/layers/support/featurePopupQueryUtils.js +1 -1
  377. package/layers/support/layerUtils.js +1 -1
  378. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  379. package/layers/support/rasterDatasets/InMemoryRaster.js +1 -1
  380. package/layers/support/tiles3DUtils.js +1 -1
  381. package/layers/video/VideoCameraSensorModel.js +1 -1
  382. package/layers/voxel/VoxelVolume.js +1 -1
  383. package/layers/voxel/voxelPlaneUtils.js +1 -1
  384. package/networks/UtilityNetwork.js +1 -1
  385. package/networks/support/NetworkSystemLayers.js +1 -1
  386. package/package.json +4 -3
  387. package/popup/content/AttachmentsContent.js +1 -1
  388. package/portal/schemas/definitions.js +1 -1
  389. package/rest/knowledgeGraph/GraphApplyEdits.js +1 -1
  390. package/rest/knowledgeGraphService.js +1 -1
  391. package/rest/query/executePivotQuery.js +5 -0
  392. package/rest/query/operations/query.js +1 -1
  393. package/rest/query/operations/queryPivot.js +5 -0
  394. package/rest/query/operations/queryUtils.js +5 -0
  395. package/rest/support/PivotDefinition.js +5 -0
  396. package/rest/support/PivotQuery.js +5 -0
  397. package/rest/support/UnPivotDefinition.js +5 -0
  398. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  399. package/smartMapping/support/adapters/support/utils.js +1 -1
  400. package/support/revision.js +1 -1
  401. package/views/2d/analysis/ElevationProfile/ElevationProfileInputVisualization2D.js +1 -1
  402. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  403. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  404. package/views/2d/engine/flow/dataUtils.js +1 -1
  405. package/views/2d/engine/flow/utils.js +1 -1
  406. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  407. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  408. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  409. package/views/2d/interactive/editingTools/manipulations/RotateManipulation.js +1 -1
  410. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  411. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  412. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  413. package/views/2d/layers/RouteLayerView2D.js +1 -1
  414. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  415. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  416. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  417. package/views/2d/navigation/actions/Pan.js +1 -1
  418. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  419. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  420. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  421. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  422. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  423. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  424. package/views/3d/analysis/ElevationProfile/ElevationProfileGeometryVisualization3D.js +5 -0
  425. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  426. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  427. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  428. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  429. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  430. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  431. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  432. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  433. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  434. package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
  435. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  436. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  437. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  438. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  439. package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +1 -1
  440. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  441. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  442. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  443. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  444. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  445. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +1 -1
  446. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  447. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  448. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  449. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.js +1 -1
  450. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  451. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  452. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  453. package/views/3d/analysis/support/measurementUtils.js +1 -1
  454. package/views/3d/animation/pointToPoint/Animation.js +1 -1
  455. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  456. package/views/3d/camera/constraintUtils/altitude.js +1 -1
  457. package/views/3d/camera/constraintUtils/common.js +1 -1
  458. package/views/3d/camera/constraintUtils/distance.js +1 -1
  459. package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
  460. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  461. package/views/3d/camera/intersectionUtils.js +1 -1
  462. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  463. package/views/3d/environment/CloudsParameters.js +1 -1
  464. package/views/3d/environment/EnvironmentManager.js +1 -1
  465. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  466. package/views/3d/environment/Fog.js +1 -1
  467. package/views/3d/environment/MarsAtmosphere.js +1 -1
  468. package/views/3d/glTF/loader.js +1 -1
  469. package/views/3d/interactive/Manipulator3D.js +1 -1
  470. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  471. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  472. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  473. package/views/3d/interactive/editingTools/lineObjectVisualElementUtils.js +1 -1
  474. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  475. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  476. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  477. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  478. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  479. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  480. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  481. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  482. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
  483. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  484. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  485. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  486. package/views/3d/interactive/manipulatorUtils.js +1 -1
  487. package/views/3d/interactive/support/viewUtils.js +1 -1
  488. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  489. package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
  490. package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
  491. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  492. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  493. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  494. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  495. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  496. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  497. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  498. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  499. package/views/3d/interactive/visualElements/support/Segment.js +1 -1
  500. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  501. package/views/3d/layers/FlowSubView3D.js +1 -1
  502. package/views/3d/layers/I3SMeshView3D.js +1 -1
  503. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  504. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  505. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  506. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  507. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  508. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  509. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  510. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  511. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  512. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  513. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  514. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  515. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  516. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  517. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  518. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  519. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  520. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  521. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  522. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  523. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  524. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  525. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  526. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  527. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  528. package/views/3d/layers/i3s/LoDUtil.js +1 -1
  529. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  530. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  531. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  532. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  533. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  534. package/views/3d/layers/support/uvUtils.js +1 -1
  535. package/views/3d/state/Frustum.js +1 -1
  536. package/views/3d/state/NearFarHeuristic.js +1 -1
  537. package/views/3d/state/controllers/FovController.js +1 -1
  538. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  539. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  540. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  541. package/views/3d/state/controllers/RotateController.js +1 -1
  542. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  543. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  544. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  545. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  546. package/views/3d/state/controllers/momentum/PanPlanarMomentumController.js +1 -1
  547. package/views/3d/state/controllers/momentum/PanSphericalMomentumController.js +1 -1
  548. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  549. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  550. package/views/3d/state/utils/navigationUtils.js +1 -1
  551. package/views/3d/state/utils/viewUtils.js +1 -1
  552. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  553. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  554. package/views/3d/support/RenderCoordsHelper.js +1 -1
  555. package/views/3d/support/cameraUtils.js +1 -1
  556. package/views/3d/support/cameraUtilsInternal.js +1 -1
  557. package/views/3d/support/dito.js +1 -1
  558. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  559. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  560. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  561. package/views/3d/support/flow/constants.js +1 -1
  562. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  563. package/views/3d/support/geometryUtils/ray.js +1 -1
  564. package/views/3d/support/intersectionUtils.js +1 -1
  565. package/views/3d/support/mathUtils.js +1 -1
  566. package/views/3d/support/orientedBoundingBox.js +1 -1
  567. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  568. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  569. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  570. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  571. package/views/3d/support/sunUtils.js +1 -1
  572. package/views/3d/support/viewpointUtils.js +1 -1
  573. package/views/3d/terrain/OverlayManager.js +1 -1
  574. package/views/3d/terrain/OverlayRenderer.js +1 -1
  575. package/views/3d/terrain/PatchGeometry.js +1 -1
  576. package/views/3d/terrain/PatchRenderData.js +1 -1
  577. package/views/3d/terrain/SphericalPatch.js +1 -1
  578. package/views/3d/terrain/TerrainRenderer.js +1 -1
  579. package/views/3d/terrain/TerrainSurface.js +1 -1
  580. package/views/3d/terrain/Tile.js +1 -1
  581. package/views/3d/webgl/RenderCamera.js +1 -1
  582. package/views/3d/webgl-engine/Stage.js +1 -1
  583. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  584. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  585. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +1 -1
  586. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  587. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  588. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +1 -1
  589. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  590. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +2 -2
  591. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +1 -1
  592. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +1 -1
  593. package/views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js +1 -1
  594. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  595. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  596. package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
  597. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  598. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +7 -7
  599. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  600. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  601. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  602. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  603. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  604. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  605. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  606. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  607. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  608. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  609. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  610. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  611. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  612. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  613. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  614. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  615. package/views/3d/webgl-engine/lib/IntersectorResult.js +1 -1
  616. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  617. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  618. package/views/3d/webgl-engine/lib/Path.js +1 -1
  619. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  620. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  621. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  622. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  623. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  624. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  625. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  626. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  627. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  628. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  629. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  630. package/views/3d/webgl-engine/lib/edgeRendering/edgeBufferWriters.js +1 -1
  631. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  632. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  633. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  634. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  635. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  636. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  637. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  638. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  639. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  640. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  641. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  642. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  643. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  644. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  645. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  646. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  647. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  648. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  649. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  650. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  651. package/views/3d/webgl-engine/shaders/GaussianSplatDepthCompositionTechnique.js +1 -1
  652. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  653. package/views/3d/webgl.js +1 -1
  654. package/views/DOMContainer.js +1 -1
  655. package/views/PopupView.js +1 -1
  656. package/views/SceneView.js +1 -1
  657. package/views/View.js +1 -1
  658. package/views/View2D.js +1 -1
  659. package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
  660. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  661. package/views/analysis/ElevationProfile/ElevationProfileError.d.ts +4 -0
  662. package/views/analysis/ElevationProfile/ElevationProfileError.js +5 -0
  663. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +1 -1
  664. package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
  665. package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +1 -1
  666. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  667. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  668. package/views/analysis/ElevationProfile/elevationProfileErrors.js +5 -0
  669. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  670. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  671. package/views/analysis/ElevationProfile/elevationProfileInputVisualizationUtils.js +1 -1
  672. package/views/analysis/ExclusiveOperationManager.js +1 -1
  673. package/views/draw/support/Reshape.js +1 -1
  674. package/views/draw/support/createUtils.js +1 -1
  675. package/views/draw/support/helpMessageUtils3d.js +1 -1
  676. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  677. package/views/interactive/GraphicManipulator.js +1 -1
  678. package/views/interactive/coordinateHelper.js +1 -1
  679. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  680. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  681. package/views/interactive/sketch/constraintUtils.js +1 -1
  682. package/views/interactive/sketch/constraints.js +1 -1
  683. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  684. package/views/interactive/snapping/LineSnapper.js +1 -1
  685. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  686. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  687. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  688. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  689. package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
  690. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  691. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  692. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  693. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  694. package/views/interactive/snapping/snappingUtils.js +1 -1
  695. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  696. package/views/layers/FeatureLayerView.d.ts +1 -1
  697. package/views/layers/FeatureLayerView.js +1 -1
  698. package/views/layers/SceneLayerView.js +1 -1
  699. package/views/navigation/PanPlanarMomentumEstimator.js +1 -1
  700. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  701. package/views/navigation/gamepadAndKeyboardUtils.js +1 -1
  702. package/views/popupAdapter.js +5 -0
  703. package/views/support/angularMeasurementUtils.js +1 -1
  704. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  705. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  706. package/views/support/geometry3dUtils.js +1 -1
  707. package/views/webgl/ContextState.js +1 -1
  708. package/views/webgl/RenderingContext.js +1 -1
  709. package/views/webgl/enums.js +1 -1
  710. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  711. package/widgets/Attachments.js +1 -1
  712. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  713. package/widgets/Editor/EditorViewModel.js +1 -1
  714. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  715. package/widgets/Editor/SplitFeatureWorkflowData.js +1 -1
  716. package/widgets/Editor/UpdateWorkflow.js +1 -1
  717. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  718. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  719. package/widgets/Editor/components/UploadDetails.js +1 -1
  720. package/widgets/Editor/components/workflowAdapters/pendingFeatureList/CreateFeaturesWorkflowPendingFeatureListAdapter.ts.js +5 -0
  721. package/widgets/Editor/components/workflowAdapters/pendingFeatureList/SplitFeatureWorkflowPendingFeatureListAdapter.js +5 -0
  722. package/widgets/Editor/css.js +1 -1
  723. package/widgets/Editor/modelUploadUtils.js +1 -1
  724. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  725. package/widgets/Editor/workflowUtils.js +1 -1
  726. package/widgets/Editor.js +1 -1
  727. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  728. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  729. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  730. package/widgets/Feature/FeatureMedia/chartCommon.js +1 -1
  731. package/widgets/Feature/FeatureMedia/pieChart.js +1 -1
  732. package/widgets/Feature/FeatureMedia/xyChart.js +1 -1
  733. package/widgets/Feature/FeatureViewModel.js +1 -1
  734. package/widgets/FeatureTable/FieldColumn.js +1 -1
  735. package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
  736. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  737. package/widgets/FeatureTable/support/TableTemplate.js +1 -1
  738. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  739. package/widgets/FeatureTable/support/templateUtils.js +1 -1
  740. package/widgets/Features/FeaturesViewModel.js +1 -1
  741. package/widgets/Legend/LegendViewModel.js +1 -1
  742. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  743. package/widgets/Legend.js +1 -1
  744. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  745. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  746. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  747. package/widgets/OrientedImageryViewer/dataCaptureUtils.js +1 -1
  748. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  749. package/widgets/OrientedImageryViewer.js +1 -1
  750. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  751. package/widgets/PanoramicViewer/PanoramicZoomManager.js +5 -0
  752. package/widgets/PanoramicViewer/PanoramicZoomViewModel.js +1 -1
  753. package/widgets/PanoramicViewer/constants.js +1 -1
  754. package/widgets/PanoramicViewer/support/ClosestMap.js +5 -0
  755. package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
  756. package/widgets/PanoramicViewer/support/PanoramicMeshWorker.js +1 -1
  757. package/widgets/PanoramicViewer/support/PanoramicTileNode.js +5 -0
  758. package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +5 -0
  759. package/widgets/PanoramicViewer/support/importUtils.js +5 -0
  760. package/widgets/PanoramicViewer/utils.js +1 -1
  761. package/widgets/PanoramicViewer.js +1 -1
  762. package/widgets/Search/SearchResultRenderer.js +1 -1
  763. package/widgets/Search/SearchViewModel.js +1 -1
  764. package/widgets/Search.js +1 -1
  765. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  766. package/widgets/support/chartUtilsAm5.js +1 -1
  767. package/widgets/support/forms/formUtils.js +1 -1
  768. package/analysis/ElevationProfile/ElevationProfileUnits.d.ts +0 -4
  769. package/assets/esri/core/workers/chunks/004b13c1db79c9e668b1.js +0 -1
  770. package/assets/esri/core/workers/chunks/06c389283ee5b60573f2.js +0 -1
  771. package/assets/esri/core/workers/chunks/0b24a6c06d1becbb6815.js +0 -1
  772. package/assets/esri/core/workers/chunks/0ca5060c81a1a05b8be3.js +0 -1
  773. package/assets/esri/core/workers/chunks/1214c126af0de25a4b4a.js +0 -1
  774. package/assets/esri/core/workers/chunks/19f1bfe815896d4983af.js +0 -1
  775. package/assets/esri/core/workers/chunks/22c3a21bc9f32c429c48.js +0 -1
  776. package/assets/esri/core/workers/chunks/23e600e368ac829680b5.js +0 -1
  777. package/assets/esri/core/workers/chunks/3b2ef975831eb75b40fb.js +0 -1
  778. package/assets/esri/core/workers/chunks/3d800fbc449bea18b1cd.js +0 -1
  779. package/assets/esri/core/workers/chunks/3dcdbba706a8034b6ba3.js +0 -1
  780. package/assets/esri/core/workers/chunks/503c81dda242e6077317.js +0 -1
  781. package/assets/esri/core/workers/chunks/52121179d4f9833008ec.js +0 -1
  782. package/assets/esri/core/workers/chunks/56b3bb68b61b77138186.js +0 -1
  783. package/assets/esri/core/workers/chunks/5aacd1c6b171c99b41f5.js +0 -1
  784. package/assets/esri/core/workers/chunks/5eb7f6f5121c8830c561.js +0 -1
  785. package/assets/esri/core/workers/chunks/633faa9cec8988ab06af.js +0 -33
  786. package/assets/esri/core/workers/chunks/6c3b585b9cb6bb640fb0.js +0 -1
  787. package/assets/esri/core/workers/chunks/801451fb572bc5f1f270.js +0 -1
  788. package/assets/esri/core/workers/chunks/8b9a50cfaa5a7df02dad.js +0 -1
  789. package/assets/esri/core/workers/chunks/8d63b42aea32ce2e5d09.js +0 -1
  790. package/assets/esri/core/workers/chunks/8ff2daef892881ff2019.js +0 -1
  791. package/assets/esri/core/workers/chunks/a6a2d4602dfeb62e0ecc.js +0 -1
  792. package/assets/esri/core/workers/chunks/bf9031749d10e7d457b6.js +0 -1
  793. package/assets/esri/core/workers/chunks/c547692862df95d22818.js +0 -1
  794. package/assets/esri/core/workers/chunks/c84665db250b05e2829d.js +0 -1
  795. package/assets/esri/core/workers/chunks/c95e6bef8c97cf647869.js +0 -1
  796. package/assets/esri/core/workers/chunks/ce175801937e80e3c487.js +0 -1
  797. package/assets/esri/core/workers/chunks/d71836cf70b9604832f1.js +0 -1
  798. package/assets/esri/core/workers/chunks/ef75cad6570b14a42b62.js +0 -1
  799. package/chunks/Button.js +0 -5
  800. package/chunks/ColorSet.js +0 -5
  801. package/chunks/DefaultTheme.js +0 -5
  802. package/chunks/LineSeries.js +0 -5
  803. package/chunks/ResponsiveTheme.js +0 -5
  804. package/chunks/Theme.js +0 -5
  805. package/chunks/Tick.js +0 -5
  806. package/chunks/Tooltip.js +0 -5
  807. package/chunks/ar.js +0 -5
  808. package/chunks/bg_BG.js +0 -5
  809. package/chunks/bs_BA.js +0 -5
  810. package/chunks/ca_ES.js +0 -5
  811. package/chunks/chartUtilsAm5.js +0 -5
  812. package/chunks/cs_CZ.js +0 -5
  813. package/chunks/da_DK.js +0 -5
  814. package/chunks/de_CH.js +0 -5
  815. package/chunks/de_DE.js +0 -5
  816. package/chunks/el_GR.js +0 -5
  817. package/chunks/en_CA.js +0 -5
  818. package/chunks/en_US.js +0 -5
  819. package/chunks/es_ES.js +0 -5
  820. package/chunks/et_EE.js +0 -5
  821. package/chunks/fi_FI.js +0 -5
  822. package/chunks/fr_FR.js +0 -5
  823. package/chunks/he_IL.js +0 -5
  824. package/chunks/hr_HR.js +0 -5
  825. package/chunks/hu_HU.js +0 -5
  826. package/chunks/id_ID.js +0 -5
  827. package/chunks/it_IT.js +0 -5
  828. package/chunks/ja_JP.js +0 -5
  829. package/chunks/ko_KR.js +0 -5
  830. package/chunks/lt_LT.js +0 -5
  831. package/chunks/lv_LV.js +0 -5
  832. package/chunks/nb_NO.js +0 -5
  833. package/chunks/nl_NL.js +0 -5
  834. package/chunks/pl_PL.js +0 -5
  835. package/chunks/pt_BR.js +0 -5
  836. package/chunks/pt_PT.js +0 -5
  837. package/chunks/ro_RO.js +0 -5
  838. package/chunks/ru_RU.js +0 -5
  839. package/chunks/sk_SK.js +0 -5
  840. package/chunks/sl_SL.js +0 -5
  841. package/chunks/sr_RS.js +0 -5
  842. package/chunks/sv_SE.js +0 -5
  843. package/chunks/th_TH.js +0 -5
  844. package/chunks/tr_TR.js +0 -5
  845. package/chunks/uk_UA.js +0 -5
  846. package/chunks/vi_VN.js +0 -5
  847. package/chunks/zh_Hans.js +0 -5
  848. package/chunks/zh_Hant.js +0 -5
  849. package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization3D.js +0 -5
  850. package/views/analysis/ElevationProfile/ElevationProfileGenerationError.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2561,3548,4342,7548,7694,8350],{159:(e,t,i)=>{i.d(t,{A:()=>u});var r,n=i(31635),s=i(65008),a=i(10107),l=(i(44208),i(53966),i(87811),i(40608)),o=i(99157);let u=r=class extends s.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new r;for(let t=this.steps.length-1;t>=0;t--){const i=this.steps[t];e.steps.push(i.getInverse())}return e}};(0,n.Cg)([(0,a.MZ)({type:[o.A],nonNullable:!0})],u.prototype,"steps",void 0),u=r=(0,n.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformation")],u)},4146:(e,t,i)=>{i.d(t,{A:()=>w});var r=i(31635),n=i(78888),s=i(49186),a=i(65529),l=i(4902),o=i(92474),u=i(53966),c=i(74887),d=i(84952),h=i(10107),p=(i(44208),i(87811),i(40608)),f=i(5443),y=i(16930),g=i(92602),m=i(79677);let _=0,w=class extends((0,a.Zt)((0,l.sA)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await Promise.all([i.e(812),i.e(5613),i.e(5710)]).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",n=i?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,h.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,r.Cg)([(0,h.MZ)({type:f.A})],w.prototype,"fullExtent",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,r.Cg)([(0,h.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,r.Cg)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,r.Cg)([(0,h.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,h.MZ)({type:y.A})],w.prototype,"spatialReference",void 0),(0,r.Cg)([(0,h.MZ)({type:String})],w.prototype,"title",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,r.Cg)([(0,h.MZ)()],w.prototype,"url",void 0),(0,r.Cg)([(0,h.MZ)({type:m.A})],w.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,r.Cg)([(0,p.$)("esri.layers.Layer")],w)},4902:(e,t,i)=>{i.d(t,{PH:()=>l,sA:()=>a});var r=i(31635),n=i(40608);let s=0;const a=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return i=(0,r.Cg)([(0,n.$)("esri.core.Identifiable")],i),i},l=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return i=(0,r.Cg)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],i),i};a(class{})},6797:(e,t,i)=>{i.d(t,{Ui:()=>h});var r=i(65008),n=i(7762),s=i(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.A}function o(e){return e instanceof n.A?Object.keys(e.items):l(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=o(e),n=o(t);if(0===r.length&&0===n.length)return;if(!r.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!r.includes(e)),h=r.filter(e=>!n.includes(e)),p=r.filter(i=>n.includes(i)&&u(e,i)!==u(t,i)).concat(s,h).sort(),f=c(e);if(f&&a.has(f)&&p.length)return{type:"complete",oldValue:e,newValue:t};let y;const g=l(e)&&l(t);for(const r of p){const n=u(e,r),s=u(t,r);let a;if((g||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(i&&i[r]&&"function"==typeof i[r])a=i[r]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;a={type:"complete",oldValue:n,newValue:s}}else a="object"==typeof n&&"object"==typeof s&&c(n)===c(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=a&&(null!=y?y.diff[r]=a:y={type:"partial",diff:{[r]:a}})}}return y}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},9762:(e,t,i)=>{i.r(t),i.d(t,{projectBuffer:()=>n});var r=i(37539);function n(e,t,i,n,s,a,l=Math.floor(e.length/3)){const o=(0,r.jd)(t,s);if(null==o)return!1;if(o===r.pO){if(e===n&&i===a)return!0;const t=i+3*l;for(let r=i,s=a;r<t;r++,s++)n[s]=e[r];return!0}const u=i+3*l;for(let t=i,r=a;t<u;t+=3,r+=3)o(e,t,n,r);return!0}},16215:(e,t,i)=>{i.d(t,{S:()=>n,Y:()=>r});const r=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&r in e}},17311:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(31635),n=i(65008),s=i(4576),a=i(60999),l=i(7762),o=i(10107),u=(i(44208),i(53966),i(40608)),c=i(30524),d=i(43668);let h=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,a.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??i.e(9926).then(i.bind(i,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const i=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(i.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:i,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(i,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const i=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of i){const i=t.split("."),r=this.fieldsIndex.get(i.at(-1)??"");r&&e.add(r.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const i of t){const t=this.fieldsIndex.get(i);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,i){const r=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],i)).get(r)??""}async getTitles(e,t,i){const r=new Map,n=i?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);i?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:a,workingTitle:l}=this,o=l&&a;t.forEach(t=>{const i=t.getObjectId()??t.attributes[e.objectIdField],u=o?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:a,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:l}):"";r.set(i,u)})}catch{}return r}async _checkAndReQueryGraphics(e,t){const i=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s.Ru);if(i.length!==t.length)return t;if(t.some(e=>!(0,c.Kl)(e,this.requiredFields))){const r=e.createQuery();r.where="1=1",r.outFields=[...this.requiredFields],r.objectIds=i;const n=await e.queryFeatures(r);if(n?.features.length===t.length)return n.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const i of e){if(!i.fieldName)continue;const e=this.fieldsIndex.get(i.fieldName),r=e?.name??i.fieldName;i.fieldName=r,t.set(r.toLowerCase(),i)}return t}_createFormattedAttributes(e,t,i="system"){const r=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const i=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:i}})}catch{}}const s={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:r,attributes:s,graphic:t,timeZone:i,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],h.prototype,"_arcadeTask",null),(0,r.Cg)([(0,o.MZ)()],h.prototype,"_featureUtils",void 0),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],h.prototype,"featureUtilsPromise",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],h.prototype,"calculatedExpressions",null),(0,r.Cg)([(0,o.MZ)()],h.prototype,"displayField",void 0),(0,r.Cg)([(0,o.MZ)()],h.prototype,"effectivePopupTemplate",void 0),(0,r.Cg)([(0,o.MZ)()],h.prototype,"expressionsUsedInTitle",null),(0,r.Cg)([(0,o.MZ)()],h.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,o.MZ)()],h.prototype,"fieldInfoMap",null),(0,r.Cg)([(0,o.MZ)()],h.prototype,"fields",void 0),(0,r.Cg)([(0,o.MZ)()],h.prototype,"objectIdField",void 0),(0,r.Cg)([(0,o.MZ)()],h.prototype,"requiredFields",null),h=(0,r.Cg)([(0,u.$)("esri.layers.support.TitleCreator")],h)},22671:(e,t,i)=>{i.d(t,{A:()=>_});var r,n=i(31635),s=i(52106),a=i(66552),l=i(25482),o=i(4718),u=i(10107),c=(i(44208),i(53966),i(36005)),d=i(40608),h=i(43937),p=i(16930),f=i(65864),y=i(50498),g=i(20437);const m=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=r=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,i,r){if(e)return void m.write(e,t,i,r);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void m.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,f.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=p.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,o.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,n]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((n-e)/i));for(let e=0,t=s.length;e<t;e++)a?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,n],scale:[s,a]}=i;let l=null,o=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;o=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,e=>e*s+r,e=>n-e*a,l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){const r=p.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],a=i.fromJSON(s),l=s.geometry?.spatialReference;null==a.geometry||l||(a.geometry.spatialReference=r);const o=s.aggregateGeometries,u=a.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],i=o[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}n.push(a)}return n}_quantizePoints(e,t,i){let r,n;const s=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===n||(s.push([e-r,a-n]),r=e,n=a)}else r=t(l[0]),n=i(l[1]),s.push([r,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&n.push(a)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,n){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let a,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,n=r.length;e<n;e++){const n=r[e];e>0?(a+=n[0],l+=n[1]):(a=n[0],l=n[1]),n[0]=t(a),n[1]=i(l)}}if(r&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=n(i[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=n(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let a,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(a+=r[0],l+=r[1]):(a=r[0],l=r[1]),r[0]=t(a),r[1]=i(l)}if(r&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=n(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n.Cg)([(0,c.w)("features")],_.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[g.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],_.prototype,"geometryType",void 0),(0,n.Cg)([(0,h.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,c.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n.Cg)([(0,h.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=r=(0,n.Cg)([(0,d.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(31635),n=i(69540),s=i(66552),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(40608));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let c=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"description",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"drawingTool",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"prototype",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"thumbnail",void 0),c=(0,r.Cg)([(0,o.$)("esri.layers.support.FeatureTemplate")],c)},30235:(e,t,i)=>{i.d(t,{A:()=>f});var r=i(52106),n=i(87449),s=i(11221),a=i(89169),l=i(33325),o=i(80609),u=i(39516),c=i(91075),d=i(68654),h=i(33143),p=i(20437);class f extends s.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type||this._layer.objectIdField===i.name)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return 0}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new r.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,n){let s="",l=!1;if(null!==r&&(s=r.constructClause(),l=!0),this.isTable()&&t&&null!==e&&""!==e)return new a.A([],[],!0,null);const c=this._createQuery();c.where=(0,u.mA)(c.where,null===i?null===t?"1=1":"":(0,o.YY)(i,0)),c.spatialRelationship=this._makeRelationshipEnum(e),c.outSpatialReference=this.spatialReference,c.orderByFields=""!==s?s.split(","):null,c.geometry=null===t?null:t,c.relationParameter=this._makeRelationshipParam(e);const d=await this._layer.queryFeatures(c);if(null===d)return new a.A([],[],l,null);this._checkCancelled(n);const h=[];return d.features.forEach(e=>{const t=e.attributes[this._layer.objectIdField];h.push(t),this._featureCache[t]=this._changeFeature(e)}),new a.A([],h,l,null)}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _queryAllFeatures(){if(this._wset)return this._wset;if(await this._ensureLoaded(),this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach(t=>{const i=t.attributes[this._layer.objectIdField];e.push(i),this._featureCache[i]=this._changeFeature(t)}),this._wset=new a.A([],e,!1,null),this._wset}const e=this._createQuery();e.where="1=1";const t=await this._layer.queryFeatures(e),i=[];return t.features.forEach(e=>{const t=e.attributes[this._layer.objectIdField];i.push(t),this._featureCache[t]=this._changeFeature(e)}),this._wset=new a.A([],i,!1,null),this._wset}async _getFeatures(e,t,i){const r=[];-1!==t&&void 0===this._featureCache[t]&&r.push(t);for(let n=e._lastFetchedIndex;n<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[n]]&&(e._known[n]!==t&&r.push(e._known[n]),r.length>i)));n++);if(0===r.length)return"success";throw new n.d("MissingFeatures")}async _refineSetBlock(e){return e}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const i in e)t[i]=e[i];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let i=e.layerDefinition.objectIdField;const r=e.layerDefinition.typeIdField??"",n=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)n.push(h.A.fromJSON(t));let s=e.layerDefinition.geometryType;void 0===s&&(s=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!i){let t=!1;for(const r of e.layerDefinition.fields)if("oid"===r.type||"esriFieldTypeOID"===r.type){i=r.name,t=!0;break}if(!1===t){let t="FID",r=!0,n=0;for(;r;){let i=!0;for(const r of e.layerDefinition.fields)if(r.name===t){i=!1;break}!0===i?r=!1:(n++,t="FID"+n.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const s=[];for(let i=0;i<a.length;i++)s.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),s[i].attributes[t]=i;a=s,i=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof p.A?o.push(t):o.push(p.A.fromJSON(t));let u=s;switch(u||(u=""),u){case"esriGeometryPoint":u="point";break;case"esriGeometryPolyline":u="polyline";break;case"esriGeometryPolygon":u="polygon";break;case"esriGeometryEnvelope":u="extent";break;case"esriGeometryMultipoint":u="multipoint";break;case"":case"esriGeometryNull":u="esriGeometryNull"}if("esriGeometryNull"!==u)for(const e of a)e.geometry&&e.geometry instanceof c.A==0&&(e.geometry.type=u,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const y={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:n,typeIdField:r,objectIdField:i,spatialReference:t},g="esriGeometryNull"===u||null===u;g||(y.geometryType=u);const m=new d.default(y);return e?.layerDefinition?.subtypeField&&e?.layerDefinition?.subtypes&&m.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new f({layer:m,spatialReference:t,isTable:g})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const i=await this._layer.queryFeatures(t);return 1===i.features.length?i.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return this._layer?.timeInfo}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return this.fsetInfo??{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},32730:(e,t,i)=>{i.d(t,{BI:()=>g,D3:()=>f,XJ:()=>y,lc:()=>p,mX:()=>_,rU:()=>m,tH:()=>S});var r=i(799);const n="__begin__",s="__end__",a=new RegExp(n,"ig"),l=new RegExp(s,"ig"),o=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),c='"',d=c+" + ",h=" + "+c;function p(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=p(e.labelExpression),t.type="conventional"),t}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function _(e){let t;return e?(t=(0,r.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=o.test(t)?t.replace(o,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(a,d).replaceAll(l,h)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,F=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,I=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=b.exec(e)||F.exec(e);return t?t[1]||t[3]:(t=I.exec(e),t?t[2]:null)}},32756:(e,t,i)=>{i.d(t,{Rr:()=>o,fY:()=>c,ne:()=>u});var r=i(31635),n=i(93637),s=i(10107),a=(i(44208),i(53966),i(87811),i(40608)),l=i(91880);function o(e,t,i){if(!e)return null;const r=e.find(e=>!!e.field);if(!r)return null;const n=new l.A;return n.read(r,i),[n]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:o},write:{writer:function(e,t,i,r){const s=e.find(e=>!!e.field);s&&(0,n.sM)(i,[s.toJSON()],t)}}}},c=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,r.Cg)([(0,s.MZ)(u)],i.prototype,"orderBy",void 0),i=(0,r.Cg)([(0,a.$)("esri.layers.mixins.OrderedLayer")],i),i}},33143:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(31635),n=i(69540),s=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),o=i(40608),u=i(43937),c=i(80451),d=i(29005);let h=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,c.rS)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"id",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"domains",void 0),(0,r.Cg)([(0,l.w)("domains")],h.prototype,"readDomains",null),(0,r.Cg)([(0,u.K)("domains")],h.prototype,"writeDomains",null),(0,r.Cg)([(0,a.MZ)({type:[d.A],json:{write:!0}})],h.prototype,"templates",void 0),h=(0,r.Cg)([(0,o.$)("esri.layers.support.FeatureType")],h)},35704:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(87449),n=i(11221),s=i(89169),a=i(33325),l=i(80609),o=i(74887),u=i(88368),c=i(16930);class d extends n.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof u.A?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new c.A({wkid:4326}),this.geometryType=a.ik.point)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("",null,this._whereclause,null,e);return this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new s.A(t._candidates.slice().concat(t._known.slice()),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new s.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent?._isInFeatureSet(e);return 1===t?t:(t=this._idstates[e],void 0===t?2:t)}_getFeature(e,t,i){return this._parent._getFeature(e,t,i)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction){const t=this._whereClauseFunction(e);return(0,o.$X)(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,i){const r=new s.A([],e,!1,null),n=Math.min(t,e.length);if(await(this._parent?._getFeatures(r,-1,n,i)),this._checkCancelled(i),null==this._whereClauseFunction){for(let t=0;t<n;t++){const i=this._parent?._featureFromCache(e[t]);!0===this.executeWhereClause(i)?this._idstates[e[t]]=0:this._idstates[e[t]]=1}return"success"}const a=[];for(let t=0;t<n;t++){const i=this._parent?._featureFromCache(e[t]);a.push(await this.executeWhereClauseDeferred(i))}for(let i=0;i<t;i++)!0===a[i]?this._idstates[e[i]]=0:this._idstates[e[i]]=1;return"success"}async _getFilteredSet(e,t,i,r,n){null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,l.kg)(this._whereclause,i)):i=this._whereclause),await this._ensureLoaded();const a=await this._parent._getFilteredSet(e,t,i,r,n);let o;return this._checkCancelled(n),o=null!==this._whereClauseFunction?new s.A(a._candidates.slice().concat(a._known.slice()),[],a._ordered,this._clonePageDefinition(a.pagesDefinition)):new s.A(a._candidates.slice(),a._known.slice(),a._ordered,this._clonePageDefinition(a.pagesDefinition)),o}async _stat(e,t,i,r,n,s,a){if(null!==this._whereClauseFunction)return null===n&&""===i&&null===r?this._manualStat(e,t,s,a):{calculated:!1};let o=this._whereclause;null!==n&&null!==this._whereclause&&(o=(0,l.kg)(this._whereclause,n));const u=await this._parent._stat(e,t,i,r,o,s,a);return!1===u.calculated?null===n&&""===i&&null===r?this._manualStat(e,t,s,a):{calculated:!1}:u}async _canDoAggregates(e,t,i,r,n){return null===this._whereClauseFunction&&(null!==n?null!==this._whereclause&&(n=(0,l.kg)(this._whereclause,n)):n=this._whereclause,null!==this._parent&&this._parent._canDoAggregates(e,t,i,r,n))}async _getAggregatePagesDataSourceDefinition(e,t,i,n,s,a,o){if(null===this._parent)throw new r.d("NeverReach");return null!==s?null!==this._whereclause&&(s=(0,l.kg)(this._whereclause,s)):s=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,n,s,a,o)}static registerAction(){n.A._featuresetFunctions.filter=function(e){if("function"==typeof e)return new d({parentfeatureset:this,whereclause:e});let t=null;return e instanceof u.A&&(t=e),new d({parentfeatureset:this,whereclause:t})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},36708:(e,t,i)=>{i.d(t,{C_:()=>h,OH:()=>y,Vh:()=>g,on:()=>d,pc:()=>m,wB:()=>o,z7:()=>u});var r=i(37955),n=i(36563),s=i(97768),a=i(74887),l=i(14012);function o(e,t,i={}){return c(e,t,i,p)}function u(e,t,i={}){return c(e,t,i,f)}function c(e,t,i={},r){let n=null;const a=i.once?(e,i)=>{r(e)&&((0,s.xt)(n),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(n=(0,l.Cn)(e,a,i.sync,i.equals),i.initial){const t=e();a(t,t)}return n}function d(e,t,i,a={}){let l=null,u=null,c=null;function d(){l&&u&&(u.remove(),a.onListenerRemove?.(l),l=null,u=null)}function h(e){a.once&&a.once&&(0,s.xt)(c),i(e)}const p=o(e,(e,i)=>{d(),(0,r.wb)(e)&&(l=e,u=(0,r.on)(e,t,h),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return c=(0,n.hA)(()=>{p.remove(),d()}),c}function h(e,t){return function(e,t,i){if((0,a.G4)(i))return Promise.reject((0,a.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function o(){l=(0,s.xt)(l)}return new Promise((r,s)=>{l=(0,n.vE)([(0,a.u7)(i,()=>{o(),s((0,a.NK)())}),c(e,e=>{o(),r(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(80559);const y={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},37352:(e,t,i)=>{i.d(t,{A:()=>u});var r,n=i(31635),s=i(7762),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(40608));let u=r=class extends a.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=r=(0,n.Cg)([(0,o.$)("esri.layers.support.LayerFloorInfo")],u)},37539:(e,t,i)=>{i.d(t,{pO:()=>y,jd:()=>h,Tp:()=>p,w5:()=>d});var r=i(34727),n=i(83047),s=i(73941),a=i(79258);Math.PI;const l=a.$O.radius,o=a.$O.eccentricitySquared,u={a1:l*o,a2:l*o*l*o,a3:l*o*o/2,a4:l*o*l*o*2.5,a5:l*o+l*o*o/2,a6:1-o};a.$O.radius,a.$O.flattening,a.Sw.radius,a.Sw.flattening,a.sH.radius,a.sH.flattening,a.sH.radius;var c=i(21325);const d={2:{5:y,7:null,9:null,10:y,1:S,6:null,8:null,0:null,3:m,11:_,2:y,4:x},5:{5:y,7:null,9:null,10:y,1:S,6:null,8:null,0:null,3:m,11:_,2:y,4:x},7:{5:null,7:y,9:null,10:y,1:null,6:I,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:y,10:y,1:null,6:null,8:F,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,i,r){const n=e[t]/N,s=L-2*Math.atan(Math.exp(-e[t+1]/N)),a=N+e[t+2],l=Math.cos(s)*a;i[r]=Math.cos(n)*l,i[r+1]=Math.sin(n)*l,i[r+2]=Math.sin(s)*a},6:null,8:null,0:null,3:y,11:function(e,t,i,r){g(e,t,i,r),_(i,r,i,r)},2:g,4:function(e,t,i,r){g(e,t,i,r),x(i,r,i,r)}},4:{5:R,7:null,9:null,10:R,1:function(e,t,i,r){R(e,t,i,r),S(i,r,i,r)},6:null,8:null,0:null,3:function(e,t,i,r){R(e,t,i,r),m(i,r,i,r)},11:function(e,t,i,r){R(e,t,i,r),_(i,r,i,r)},2:R,4:y},1:{5:C,7:null,9:null,10:C,1:y,6:null,8:null,0:null,3:function(e,t,i,r){C(e,t,i,r),m(i,r,i,r)},11:function(e,t,i,r){C(e,t,i,r),_(i,r,i,r)},2:C,4:function(e,t,i,r){C(e,t,i,r),x(i,r,i,r)}},6:{5:null,7:T,9:null,10:T,1:null,6:y,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:y,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:y,3:null,11:null,2:null,4:null},10:{5:y,7:y,9:y,10:y,1:S,6:I,8:F,0:null,3:m,11:_,2:y,4:x},11:{5:w,7:null,9:null,10:w,1:function(e,t,i,r){w(e,t,i,r),S(i,r,i,r)},6:null,8:null,0:null,3:function(e,t,i,r){w(e,t,i,r),m(i,r,i,r)},11:y,2:w,4:function(e,t,i,r){w(e,t,i,r),x(i,r,i,r)}}};function h(e,t){return p(e,t)?.projector}function p(e,t){if(null==e||null==t)return null;if(k.source.spatialReference===e&&k.dest.spatialReference===t)return k;const i=f(e,k.source),r=f(t,k.dest);return 0===i&&0===r?(0,c.aI)(e,t)?k.projector=y:k.projector=null:k.projector=d[i][r],k}function f(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function y(e,t,i,r){e!==i&&(i[r++]=e[t++],i[r++]=e[t++],i[r]=e[t])}function g(e,t,i,r){i[r]=M*(e[t]/N),i[r+1]=M*(L-2*Math.atan(Math.exp(-e[t+1]/N))),i[r+2]=e[t+2]}function m(e,t,i,n){!function(e,t,i,n,s){const a=.4999999*Math.PI,l=(0,r.qE)(D*e[t+1],-a,a),o=Math.sin(l);i[n++]=D*e[t]*s.radius,i[n++]=s.halfSemiMajorAxis*Math.log((1+o)/(1-o)),i[n]=e[t+2]}(e,t,i,n,a.$O)}function _(e,t,i,r){i[r]=e[t]*P,i[r+1]=e[t+1]*P,i[r+2]=e[t+2]}function w(e,t,i,r){i[r]=e[t]*E,i[r+1]=e[t+1]*E,i[r+2]=e[t+2]}function b(e,t,i,r,n){const s=n+e[t+2],a=D*e[t+1],l=D*e[t],o=Math.cos(a)*s;i[r]=Math.cos(l)*o,i[r+1]=Math.sin(l)*o,i[r+2]=Math.sin(a)*s}function F(e,t,i,r){b(e,t,i,r,a.Sw.radius)}function I(e,t,i,r){b(e,t,i,r,a.sH.radius)}function S(e,t,i,r){b(e,t,i,r,a.$O.radius)}function v(e,t,i,n,s){const a=e[t],l=e[t+1],o=e[t+2],u=Math.sqrt(a*a+l*l+o*o),c=(0,r.YN)(o/(0===u?1:u)),d=Math.atan2(l,a);i[n++]=M*d,i[n++]=M*c,i[n]=u-s}function A(e,t,i,r){v(e,t,i,r,a.Sw.radius)}function T(e,t,i,r){v(e,t,i,r,a.sH.radius)}function C(e,t,i,r){v(e,t,i,r,a.$O.radius)}function x(e,t,i,r){!function(e,t,i,r,n){const s=D*e[t],a=D*e[t+1],l=e[t+2],o=Math.sin(a),u=Math.cos(a),c=n.radius/Math.sqrt(1-n.eccentricitySquared*o*o);i[r++]=(c+l)*u*Math.cos(s),i[r++]=(c+l)*u*Math.sin(s),i[r++]=(c*(1-n.eccentricitySquared)+l)*o}(e,t,i,r,a.$O)}function R(e,t,i,r){const n=u,s=e[t],l=e[t+1],o=e[t+2];let c,d,h,p,f,y,g,m,_,w,b,F,I,S,v,A,T,C,x,R,k;c=Math.abs(o),d=s*s+l*l,h=Math.sqrt(d),p=d+o*o,f=Math.sqrt(p),R=Math.atan2(l,s),y=o*o/p,g=d/p,S=n.a2/f,v=n.a3-n.a4/f,g>.3?(m=c/f*(1+g*(n.a1+S+y*v)/f),x=Math.asin(m),w=m*m,_=Math.sqrt(1-w)):(_=h/f*(1-y*(n.a5-S-g*v)/f),x=Math.acos(_),w=1-_*_,m=Math.sqrt(w)),b=1-a.$O.eccentricitySquared*w,F=a.$O.radius/Math.sqrt(b),I=n.a6*F,S=h-F*_,v=c-I*m,T=_*S+m*v,A=_*v-m*S,C=A/(I/b+T),x+=C,k=T+A*C/2,o<0&&(x=-x),i[r++]=M*R,i[r++]=M*x,i[r]=k}const k={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:y},D=(0,r.kU)(1),M=(0,r.KJ)(1),L=.5*Math.PI,N=a.$O.radius,P=N*Math.PI/180,E=180/(N*Math.PI)},40334:(e,t,i)=>{i.r(t),i.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>re,constructFeatureSet:()=>te,constructFeatureSetFromPortalItem:()=>ce,constructFeatureSetFromRelationship:()=>ne,constructFeatureSetFromUrl:()=>ee,convertToFeatureSet:()=>ue,createFeatureSetCollectionFromMap:()=>le,createFeatureSetCollectionFromService:()=>oe,initialiseMetaDataCache:()=>H});var r=i(78888);class n{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,i){this._layerById[t]=i,this._layerByName[e]=i}async featureSetByName(e,t=!0,i=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,i=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}var s=i(78878),a=i(35704),l=i(52106),o=i(59534),u=i(68423),c=i(86691),d=i(87449),h=i(11221),p=i(89169),f=i(87594),y=i(33325),g=i(80609),m=i(1262),_=i(88368);class w{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new w;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i,r){const n=new w;n.field=e;const s=_.A.create(t,{fieldsIndex:i,timeZone:r}),a=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new m.L("MissingStatisticParameters");const t=_.A.create((0,g.Mi)(e.parseTree.args.value[0],0,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(s);if(null===a)throw new m.L("UnsupportedSqlFunction",{function:""});const l=a.name.toUpperCase().trim();if("MIN"===l){if(n.typeofstat="MIN",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"min"})}else if("MAX"===l){if(n.typeofstat="MAX",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"max"})}else if("COUNT"===l)n.typeofstat="COUNT",n.workingexpr=a.expr;else if("STDEV"===l){if(n.typeofstat="STDDEV",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"stdev"})}else if("SUM"===l){if(n.typeofstat="SUM",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"sum"})}else if("MEAN"===l){if(n.typeofstat="AVG",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:l})}else if("AVG"===l){if(n.typeofstat="AVG",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"avg"})}else{if("VAR"!==l)throw new m.L("UnsupportedSqlFunction",{function:l});if(n.typeofstat="VAR",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"var"})}return n}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var b=i(80200),F=i(74639),I=i(44729),S=i(55612),v=i(15032),A=i(16930),T=i(20437),C=i(95466);const x=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class R extends h.A{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return 0}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const r=this._parent?this._parent.getFieldsIndex():new C.A([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const e of this._config.statsfields){const t=new w;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof _.A?e.expression:_.A.create(e.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),t.typeofstat=x.lookup(e.statistic)??"COUNT",this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof _.A?e.expression:_.A.create(e.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField=""}else this.geometryType=y.ik.point,this.typeIdField="",this.types=null,this.subtypes=null,this.subtypeField="",this.spatialReference=new A.A({wkid:4326});this.fields=[];const n=new w;n.field=this._nextUniqueName(e),n.tofieldname=this.objectIdField,n.workingexpr=_.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),n.typeofstat="MIN",this._decodedStatsfield.push(n);for(const t of this._decodedGroupbyfield){const i=new T.A;if(t.name=this._nextUniqueName(e),i.name=t.tofieldname,i.alias=i.name,(0,g.DA)(t.expression)){const e=this._parent.getField((0,g.YY)(t.expression,0));if(!e)throw new d.d("AggregationFieldNotFound");t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),i.type=e.type,t.sqlType=e.type}else{i.type=this._convertToEsriFieldType((0,g.IY)(t.expression,this._parent.fields));const e=new T.A;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new u.Gr(e,t.expression)),this._candosimplegroupby=!1,t.sqlType=i.type}this.fields.push(i)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new u.IO(e));for(let t=0;t<this._decodedStatsfield.length;t++){const i=new T.A;let r=null;const n=this._decodedStatsfield[t];n.field=this._nextUniqueName(e),n.tofieldname===this.objectIdField&&(this._internalObjectIdField=n.field),i.name=n.tofieldname,i.alias=i.name;const s=null!==n.workingexpr&&(0,g.DA)(n.workingexpr)?(0,g.YY)(n.workingexpr,0):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==s){if(r=this._parent.getField(s),!r)throw new d.d("AggregationFieldNotFound");i.type=r.type}else i.type="double";break;case"MIN":case"MAX":if(""!==s){if(r=this._parent.getField(s),!r)throw new d.d("AggregationFieldNotFound");i.type=r.type}else i.type="double";break;case"COUNT":i.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==s&&(r=this._parent.getField(s),!r))throw new d.d("AggregationFieldNotFound");i.type="double"}this.fields.push(i)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,i,r){-1!==t&&this._featureCache[t];const n=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,n)?(await this._expandPagedSet(e,n,0,0,r),this._getFeatures(e,t,i,r)):"success"}async _getFilteredSet(e,t,i,r,n){if(""!==e)return new p.A([],[],!0,null);let s=null;const l={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==i)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,g.Ju)(i,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,i=null;break}if(null!==r){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===r.scanForField(this._decodedStatsfield[e].tofieldname)){r=null,l.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,l.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;r&&(t=this._reformulateOrderClauseWithoutGroupByFields(r));const a=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(n),s=!0===l.nowhereclause?new p.A(a._candidates.slice().concat(a._known.slice()),[],!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)):new p.A(a._candidates.slice(),a._known.slice(),!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)),s}let o=this._parent;if(this._adaptedFields.length>0&&(o=new u.a({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)s=new p.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:o,orderbyclause:new f.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=o;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a.A({parentfeatureset:e,whereclause:t})}s=new p.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:e,orderbyclause:new f.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return s}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,g.bD)(e,t.tofieldname,(0,g.YY)(t.workingexpr,0),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,g.bD)(e,t.tofieldname,(0,g.YY)(t.expression,0),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,i){return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?(await this._expandPagedSet(e,this._maxQuery,0,0,i),this._refineSetBlock(e,t,i)):(this._checkCancelled(i),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,e)}_expandPagedSet(e,t,i,r,n){return this._expandPagedSetFeatureSet(e,t,i,r,n)}async _getPhysicalPage(e,t,i){if(!0===e.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,i,[]);const r=await this._getAgregagtePhysicalPage(e,t,i);for(const e of r){const t={geometry:e.geometry,attributes:{}},i={};for(const t in e.attributes)i[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=i[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=i[e.field.toLowerCase()];this._featureCache[t.attributes[this.objectIdField]]=new l.A(t)}return r.length}_sequentialGetPhysicalItem(e,t,i,r){return new Promise((n,s)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?n(r.length):this._nextAggregateItem(e,t,i,r,s=>{null===s?n(r.length):(t-=1,n(this._sequentialGetPhysicalItem(e,t,i,r)))},s)})}_nextAggregateItem(e,t,i,r,n,a){try{(0,s.a2)(e.pagesDefinition.internal.iterator.next()).then(s=>{if(null===s)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);r.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,n(null)}else e.pagesDefinition.internal.fullyResolved=!0,n(null);else{const l=this._generateAggregateHash(s);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[s],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const i=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return r.push(i),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(i.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[s],id:l},void n(i)}e.pagesDefinition.internal.workingItem.features.push(s)}this._nextAggregateItem(e,t,i,r,n,a)}},a)}catch(e){a(e)}}_calculateFieldStat(e,t,i){const r=[];for(const i of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(i);null!==e&&(e instanceof I.n||e instanceof v.k?r.push(e.toNumber()):e instanceof S.g?r.push(e.toMilliseconds()):r.push(e))}else r.push(null);i.attributes[t.tofieldname]=(0,F.s)(t.typeofstat,[r])}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.features[0].attributes[i.singlefield]:_.A.convertValueToStorageFormat(i.expression.calculateValue(e.features[0]),i.sqlType);t.attributes[i.tofieldname]=r}for(const i of this._decodedStatsfield)this._calculateFieldStat(e,i,t);const i=[];for(let r=0;r<this._decodedStatsfield.length;r++)i.push(this._calculateFieldStat(e,this._decodedStatsfield[r],t));return this._featureCache[t.attributes[this.objectIdField]]=new l.A({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,b.d)(t,b.T.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){h.A._featuresetFunctions.groupby=function(e,t){return new R({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var k=i(54784),D=i(54461),M=i(70333),L=i(61454),N=i(66395),P=i(50145),E=i(4576),O=i(39516),j=i(65864),G=i(21325),Z=i(68654),q=i(54546),U=i(61956),B=i(7562);class W extends h.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,y.JB)(e.toJSON());return(0,b.d)(t,b.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}_isInFeatureSet(){return 0}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new U.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const i="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let r=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);r=this.recentlyUsedQueries.getFromCache(t),null===r&&(r=i(e),this.recentlyUsedQueries.addToCache(t,r),r=r.catch(e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e}))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===r&&(r=i(e)),r}async _getFilteredSet(e,t,i,r,n){const s=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e)return new p.A([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,n);let a="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=this._createQuery();o.where=(0,O.mA)(o.where,null===i?null===t?"1=1":"":(0,g.YY)(i,s)),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e);let u=await this.executeQuery(o,"executeForIds");return null===u&&(u=[]),this._checkCancelled(n),new p.A([],u,l,null)}_expandPagedSet(e,t,i,r,n){return this._expandPagedSetFeatureSet(e,t,i,r,n)}async _getFilteredSetUsingPaging(e,t,i,r,n){let s="",a=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(s=r.constructClause(),a=!0);const l=await this.databaseType(),o=null===i?null===t?"1=1":"":(0,g.YY)(i,l);let u=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<u&&(u=c);let d=null;if(!0===this._pageJustIds)d=new p.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:s,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const r=this._overrideFields??this._fieldsIncludingObjectId(["*"]);d=new p.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:s,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(d,u,0,1,n),d}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,n=r,s=e.pagesDefinition.internal.lastPage,a=this._createQuery();a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields.split(","),a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.geometry=e.pagesDefinition.geometry,a.where=(0,O.mA)(a.where,e.pagesDefinition.where),a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==s)return"done";const o=this._layer.objectIdField;for(let t=0;t<l.features.length;t++)e.pagesDefinition.internal.set[n+t]=l.features[t].attributes[o];if(!1===this._pageJustIds)for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFeatures(e,t,i,r){const n=[];if(-1!==t&&void 0===this._featureCache[t]&&n.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,r),this._getFeatures(e,t,i,r);let s=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if(e._lastFetchedIndex+=1,s++,void 0===this._featureCache[e._known[r]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[r]]){const n=t._featureMap[e._known[r]];null!==n&&(i=!0,this._featureCache[e._known[r]]=n)}}if(!1===i&&(e._known[r]!==t&&n.push(e._known[r]),n.length>=this._maxProcessingRate()-1))break}if(s>=i&&0===n.length)break}if(0===n.length)return"success";const a=this._createQuery();a.objectIds=n,a.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),a.returnGeometry=!0,!0===this._removeGeometry&&(a.returnGeometry=!1),a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(r),void 0!==l.error)throw new d.d("RequestFailed",{reason:l.error});const o=this._layer.objectIdField;for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return"success"}async _getDistinctPages(e,t,i,r,n,s,a,l,o){await this._ensureLoaded();const u=await this.databaseType();let c=i.parseTree.column;const h=this._layer.fields??[];for(let e=0;e<h.length;e++)if(h[e].name.toLowerCase()===c.toLowerCase()){c=h[e].name;break}const p=this._createQuery();p.where=(0,O.mA)(p.where,null===s?null===n?"1=1":"":(0,g.YY)(s,u)),p.spatialRelationship=this._makeRelationshipEnum(r),p.relationParameter=this._makeRelationshipParam(r),p.geometry=null===n?null:n,p.returnDistinctValues=!0,p.returnGeometry=!1,p.outFields=[c];const f=await this.executeQuery(p,"execute");if(this._checkCancelled(o),!f.hasOwnProperty("features"))throw new d.d("InvalidStatResponse");let y=!1;for(let e=0;e<h.length;e++)if(h[e].name===c){"date"===h[e].type&&(y=!0);break}for(let e=0;e<f.features.length;e++){if(y){const t=f.features[e].attributes[c];null!==t?l.push(new Date(t)):l.push(t)}else l.push(f.features[e].attributes[c]);if(l.length>=a)break}return 0===f.features.length?l:f.features.length===this._layer.capabilities?.query.maxRecordCount&&l.length<a?{calculated:!0,result:await this._getDistinctPages(e+f.features.length,t,i,r,n,s,a,l,o)}:l}async _distinctStat(e,t,i,r,n,s,a){return{calculated:!0,result:await this._getDistinctPages(0,e,t,i,r,n,s,[],a)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,i,r){const n=await this.databaseType();if(this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};const s=this._createQuery();return s.where=(0,O.mA)(s.where,null===r?null===i?"1=1":"":(0,g.YY)(r,n)),s.spatialRelationship=this._makeRelationshipEnum(t),s.relationParameter=this._makeRelationshipParam(t),s.geometry=null===i?null:i,s.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(s,"executeForCount")}}async _stats(e,t,i,r,n,s,a){await this._ensureLoaded();const l=this._layer.capabilities?.query,o=!!l?.supportsSqlExpression,u=!!l?.supportsStatistics,c=!!l?.supportsDistinct;if("count"===e)return c?this._countstat(e,i,r,n):{calculated:!1};if(!1===u||!1===(0,g.DA)(t)&&!1===o||!1===t.isStandardized)return""!==i||null!==n?{calculated:!1}:this._manualStat(e,t,s,a);if("distinct"===e)return!1===c?""!==i||null!==n?{calculated:!1}:this._manualStat(e,t,s,a):this._distinctStat(e,t,i,r,n,s,a);const h=await this.databaseType();if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const p=this._createQuery();p.where=(0,O.mA)(p.where,null===n?null===r?"1=1":"":(0,g.YY)(n,h)),p.spatialRelationship=this._makeRelationshipEnum(i),p.relationParameter=this._makeRelationshipParam(i),p.geometry=null===r?null:r;const f=new B.A;f.statisticType=(0,P.Dp)(e),f.onStatisticField=(0,g.YY)(t,h),f.outStatisticFieldName="ARCADE_STAT_RESULT",p.returnGeometry=!1;let y="ARCADE_STAT_RESULT";p.outStatistics=[f];const m=await this.executeQuery(p,"execute");if(!m.hasOwnProperty("features")||0===m.features.length)throw new d.d("InvalidStatResponse");let _=!1;const w=m.fields??[];for(let e=0;e<w.length;e++)if("ARCADE_STAT_RESULT"===w[e].name.toUpperCase()){y=w[e].name,"date"===w[e].type&&(_=!0);break}if(_){let e=m.features[0].attributes[y];return null!==e&&(e=new Date(m.features[0].attributes[y])),{calculated:!0,result:e}}return{calculated:!0,result:m.features[0].attributes[y]}}_stat(e,t,i,r,n,s,a){return this._stats(e,t,i,r,n,s,a)}async _canDoAggregates(e,t){await this._ensureLoaded();let i=!1;const r=this._layer.capabilities?.query,n=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(i=!0),i)for(let e=0;e<t.length-1;e++)(!1===t[e].workingexpr?.isStandardized||!1===(0,g.DA)(t[e].workingexpr)&&!1===n)&&(i=!1);return!1!==i}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,i,r,n,s,a){await this._ensureLoaded();const l=await this.databaseType();let o=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const t=this.getFieldsIndex();o={keyFields:e.map((e,i)=>({name:t.normalizeFieldName(e)??e,asc:null==s||1===s._directions[i]}))}}let u="",c=!1;null!=s&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==o||(0,E.MJ)(e,0,e.length,s._fields,0,Math.min(s._fields.length,e.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(u=s.constructClause(),c=!0),""===u&&(u=e.join(","));const d=[];for(let e=0;e<t.length;e++){const i=new B.A;i.onStatisticField=null!==t[e].workingexpr?(0,g.YY)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),d.push(i)}let h=this._maxQueryRate();const f=this._layer.capabilities?.query.maxRecordCount;null!=f&&f<h&&(h=f);const y=null===n?null===r?"1=1":"":(0,g.YY)(n,l);return new p.A([],["GETPAGES"],c,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:!1,generatedOid:a,resultRecordCount:h,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:d,geometry:null===r?null:r,where:y,orderByFields:u,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1,keysetPagination:o}})}async _getAgregagtePhysicalPage(e,t,i){let r=e.pagesDefinition.where;if(!0===e.pagesDefinition.useOIDpagination&&(r=(0,O.mA)(r,e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString())),null!=e.pagesDefinition.internal.keysetPagination?.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new d.d("NotImplemented");r=(0,O.mA)(r,(0,g.YY)(e.pagesDefinition.internal.keysetPagination.clause,await this.databaseType()))}const n=e.pagesDefinition.internal.lastRetrieved,s=n,a=e.pagesDefinition.internal.lastPage,o=this._createQuery();if(o.where=(0,O.mA)(o.where,r),o.spatialRelationship=e.pagesDefinition.spatialRel,o.relationParameter=e.pagesDefinition.relationParam,o.outFields=e.pagesDefinition.outFields,o.outStatistics=e.pagesDefinition.outStatistics,o.geometry=e.pagesDefinition.geometry,o.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,o.num=e.pagesDefinition.resultRecordCount,o.start=e.pagesDefinition.internal.lastPage,o.returnGeometry=e.pagesDefinition.returnGeometry,o.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(i),!u.hasOwnProperty("features"))throw new d.d("InvalidStatResponse");const c=[];if(e.pagesDefinition.internal.lastPage!==a)return[];u.features.length>0&&void 0===u.features[0].attributes[e.pagesDefinition.generatedOid]&&(e.pagesDefinition.generatedOid=e.pagesDefinition.generatedOid.toLowerCase());for(let t=0;t<u.features.length;t++)e.pagesDefinition.internal.set[s+t]=u.features[t].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<u.features.length;e++)c.push(new l.A({attributes:u.features[e].attributes,geometry:null}));return e.pagesDefinition.internal.keysetPagination?0!==u.features.length&&u.exceededTransferLimit?function(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new d.d("NeverReach");const t=[];for(let i=0;i<e.length;i++){const r=e[i],n=[`"${r.name.replaceAll('"','""')}" ${r.asc?">":"<"} @last_${i}`];for(let t=0;t<i;t++){const i=e[t];n.push(`"${i.name.replaceAll('"','""')}" = @last_${t}`)}t.push(n.join(" AND "))}const i=t.join(" OR ");return _.A.create(i)}(e.keyFields));for(let i=0;i<e.keyFields.length;i++){const r=e.keyFields[i].name;e.clause.parameters[`last_${i}`]=t.attributes[r]}}(e.pagesDefinition.internal.keysetPagination,c.at(-1)):e.pagesDefinition.internal.fullyResolved=!0:!0===e.pagesDefinition.useOIDpagination?0===u.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==e.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=n+u.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,c}static create(e,t,i,r,n){const s=new Z.default({url:e,outFields:null===t?["*"]:t});return new W({layer:s,spatialReference:i,lrucache:r,interceptor:n})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,y.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,i,r,n){const s=this._layer;if(function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(s)){const a={objectIds:[e],returnMetadata:n};(t&&t>0||i&&i>0)&&(a.size=[t&&t>0?t:0,i&&i>0?i:t+1]),r&&r.length>0&&(a.attachmentTypes=r),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:s,query:a,method:"attachments"});const l=await s.queryAttachments(new q.A(a)),o=[];return l&&l[e]&&l[e].forEach(t=>{const i=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let r=null;n&&t.exifInfo&&(r=N.A.convertJsonToArcade(t.exifInfo,"system",!0)),o.push(new L.A(t.id,t.name,t.contentType,t.size,i,r,t.keywords??null))}),o}return[]}async queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields?.join(","),returnGeometry:e.returnGeometry.toString()};void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds&&e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=(0,G.YX)(e.outSpatialReference)),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const i=await(0,r.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(i.data){const e={},t=i.data;if(t?.relatedRecordGroups){const i=t.spatialReference;for(const r of t.relatedRecordGroups){const n=r.objectId,s=[];for(const e of r.relatedRecords){e.geometry&&(e.geometry.spatialReference=i);const t=new l.A({geometry:e.geometry?(0,j.rS)(e.geometry):null,attributes:e.attributes});s.push(t)}e[n]={features:s,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new d.d("InvalidRequest")}async getFeatureByObjectId(e,t){const i=this._createQuery();i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=(0,O.mA)(i.where,this.objectIdField+"="+e.toString()),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const r=await this._layer.queryFeatures(i);return 1===r.features.length?r.features[0]:null}async getIdentityUser(){await this.load();const e=M.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=M.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const i=t.toLowerCase().indexOf("/rest/services");if(t=i>-1?t.slice(0,i):t,t){t+="/rest/info";try{const e=await(0,r.A)(t,{query:{f:"json"}});let i="";return e.data?.owningSystemUrl&&(i=e.data.owningSystemUrl),i}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new W({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this.fsetInfo)return this.fsetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const i=this._layer.parsedUrl?.path??null;if(i){const n=await(0,r.A)(i,{responseType:"json",query:{f:"json"}});e=n?.data?.name??null,t=n?.data?.serviceItemId??null}const n=this._layer.title&&null!==(this._layer.parent??null);return this.featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===i?null:i,webMapLayerId:n?this._layer.id??null:null,webMapLayerTitle:n?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}var V=i(30235),$=i(26591);class Q extends h.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}_isInFeatureSet(){return 0}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new l.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,n){if(await this.databaseType(),this.isTable()&&t&&null!==e&&""!==e)return new p.A([],[],!0,null);const s=this._layer.nativeCapabilities();if(!1===s.canQueryRelated)return new p.A([],[],!0,null);if(s.capabilities?.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,r,n);let a="",l=!1;null!==r&&!0===s.capabilities?.queryRelated.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new $.default;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let c=!0;!0===this._removeGeometry&&(c=!1),o.returnGeometry=c,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null;const d=await s.source.queryRelatedFeatures(o);this._checkCancelled(n);const h=d[this._findObjectId]?d[this._findObjectId].features:[],f=[];for(let e=0;e<h.length;e++)this._featureCache[h[e].attributes[this._relatedLayer.objectIdField]]=h[e],f.push(h[e].attributes[this._relatedLayer.objectIdField]);const y=t&&null!==e&&""!==e,g=null!=i;return new p.A(y||g?f:[],y||g?[]:f,l,null)}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFilteredSetUsingPaging(e,t,i,r,n){let s="",a=!1;const l=this._layer.nativeCapabilities();null!==r&&!0===l.capabilities?.queryRelated.supportsOrderBy&&(s=r.constructClause(),a=!0),await this.databaseType();let o=this._maxQueryRate();const u=l.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const c=t&&null!==e&&""!==e,d=null!=i;let h=null,f=!0;!0===this._removeGeometry&&(f=!1);const y=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]);return h=new p.A(c||d?["GETPAGES"]:[],c||d?[]:["GETPAGES"],a,{outFields:y.join(","),resultRecordCount:o,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:s,returnGeometry:f,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(h,o,0,0,n),h}_expandPagedSet(e,t,i,r,n){return this._expandPagedSetFeatureSet(e,t,i,r,n)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,n=r,s=e.pagesDefinition.internal.lastPage,a=this._layer.nativeCapabilities(),l=new $.default;!0===this._requestStandardised&&(l.sqlFormat="standard"),l.relationshipId=this.relationship.id,l.objectIds=e.pagesDefinition.objectIds,l.resultOffset=e.pagesDefinition.internal.lastPage,l.resultRecordCount=e.pagesDefinition.resultRecordCount,l.outFields=e.pagesDefinition.outFields.split(","),l.where=e.pagesDefinition.where,l.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,l.returnGeometry=e.pagesDefinition.returnGeometry,l.outSpatialReference=this.spatialReference;const o=await a.source.queryRelatedFeatures(l);if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==s)return 0;const u=o[this._findObjectId]?o[this._findObjectId].features:[];for(let t=0;t<u.length;t++)e.pagesDefinition.internal.set[n+t]=u[t].attributes[this._relatedLayer.objectIdField];for(let e=0;e<u.length;e++)this._featureCache[u[e].attributes[this._relatedLayer.objectIdField]]=u[e];const c=!o[this._findObjectId]||!1===o[this._findObjectId].exceededTransferLimit;return u.length!==e.pagesDefinition.resultRecordCount&&c&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+u.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,u.length}async _getFeatures(e,t,i,r){const n=[];-1!==t&&void 0===this._featureCache[t]&&n.push(t);const s=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,s))return await this._expandPagedSet(e,s,0,0,r),this._getFeatures(e,t,i,r);let a=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(a++,a<=i&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[r]&&void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&n.push(e._known[r]),n.length>i)))&&!(a>=i&&0===n.length);r++);if(0===n.length)return"success";throw new d.d("MissingFeatures")}async _refineSetBlock(e,t,i){return e}async _stat(e,t,i,r,n,s,a){return{calculated:!1}}get gdbVersion(){return this._relatedLayer.gdbVersion}async _canDoAggregates(e,t,i,r,n){return!1}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,i,r,n){return this._relatedLayer.queryAttachments(e,t,i,r,n)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}async getFeatureSetInfo(){return this.fsetInfo??this._layer.featureSetInfo}}var z=i(23732),J=i(92474),Y=i(4146),K=i(80812);function H(){null===z.A.applicationCache&&(z.A.applicationCache=new z.A)}async function X(e,t,i){if(z.A.applicationCache){const i=z.A.applicationCache.getLayerInfo(e);if(i){const r=await i;return new Z.default({url:e,outFields:t,sourceJSON:r})}const r=new Z.default({url:e,outFields:t}),n=(async()=>(await r.load(),r.sourceJSON))();if(z.A.applicationCache){z.A.applicationCache.setLayerInfo(e,n);try{return await n,r}catch(t){throw z.A.applicationCache.clearLayerInfo(e),t}}return await n,r}if(null!=i){const r=i.getCachedLayerMetadata(e);if(r){const i=await r;return new Z.default({url:e,outFields:t,sourceJSON:i})}const n=new Z.default({url:e,outFields:t}),s=(async()=>(await n.load(),n.sourceJSON))();i.setCachedLayerMetadata(e,s);try{return await s,n}catch(t){throw i.removeCachedLayerMetadata(e,s),t}}return new Z.default({url:e,outFields:t})}async function ee(e,t,i,r,n,s=null){return te(await X(e,["*"],n),t,i,r,n,s)}function te(e,t=null,i=null,r=!0,n=null,s=null){switch(e.type){case"catalog-footprint":return te(e.parent,t,i,r,n,s);case"subtype-sublayer":{const a=te(e.parent,t,i,r,n,s);return a.filter(_.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:a.dateFieldsTimeZoneDefaultUTC}))}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new V.A({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:n,interceptor:s});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const a={layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:n,interceptor:s};return!e.url&&e.source?new V.A(a):new W(a)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function ie(e,t){if(null!==z.A.applicationCache){const t=z.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const i=t.getCachedServiceMetadata(e);if(null!=i)return i}const i=(async()=>{const t=await(0,r.A)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==z.A.applicationCache){z.A.applicationCache.setLayerInfo(e,i);try{return await i}catch(t){throw z.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,i);try{return await i}catch(r){throw t.removeCachedServiceMetadata(e,i),r}}return i}async function re(e,t,i){const n={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},s=await ie(e,null);if(n.metadata=s,void 0!==s.controllerDatasetLayers?.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)n.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)n.layerNameLkp[e.id]=e.name;const a=s.controllerDatasetLayers.utilityNetworkLayerId;n.networkId=a;const l=await async function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==z.A.applicationCache){const e=z.A.applicationCache.getLayerInfo(i);if(null!==e)return e}const n=(async()=>{const i=await(0,r.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(i.data){const e=i.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new d.d("DataElementsNotFound")})();if(null!==z.A.applicationCache){z.A.applicationCache.setLayerInfo(i,n);try{return await n}catch(e){throw z.A.applicationCache.clearLayerInfo(i),e}}return n}(e,a);if(l){n.queryelem=l,n.queryelem?.dataElement&&void 0!==n.queryelem.dataElement.schemaGeneration&&(n.unVersion=n.queryelem.dataElement.schemaGeneration),n.lkp={},n.queryelem.dataElement.domainNetworks||(n.queryelem.dataElement.domainNetworks=[]);for(const e of n.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}}if(n.queryelem.dataElement.terminalConfigurations)for(const e of n.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)n.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==z.A.applicationCache){const t=z.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,r.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==z.A.applicationCache){z.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw z.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+a);if(void 0!==s.systemLayers?.associationsTableId&&null!==s.systemLayers.associationsTableId){let r=null;if(i&&n.unVersion<8){const i=[];n.unVersion>=4&&(i.push("STATUS"),i.push("PERCENTALONG")),r=await ee(e+"/"+s.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...i],!1,null,null),await r.load(),n.unVersion>=4&&(r=r.filter(_.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC})),await r.load())}return{lkp:n.lkp,associations:r,unVersion:n.unVersion,terminals:n.terminals,layerIdLookup:n.layerIdLookup,sourceIdLookup:n.sourceIdLookup}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function ne(e,t,i,r=null,n=null,s=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o=o.endsWith("/")?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await ee(o,r,n,s,a,l);return new Q({layer:e,relatedLayer:u,relationship:t,objectId:i,spatialReference:r,outFields:n,includeGeometry:s,lrucache:a,interceptor:l})}a.A.registerAction(),R.registerAction(),c.A.registerAction(),k.A.registerAction(),D.A.registerAction();class se extends n{constructor(e,t=null,i=null,r=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=i,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const r=te(e,this._overrideSpatialReference,null===i?["*"]:i,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async featureSetByName(e,t=!0,i=null){if((0,J.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,i);null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const n=this._instantLayers[i];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===r)return this._instantLayers[i].featureset}const n=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=n)return this._makeAndAddFeatureSet(n,t,i);if(this._map.allTables){const r=this._map.allTables.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){if((0,J.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,i);null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const n=this._instantLayers[i];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===r)return this._instantLayers[i].featureset}const n=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.id===e);if(n)return this._makeAndAddFeatureSet(n,t,i);if(this._map.allTables){const r=this._map.allTables.find(t=>(0,y.eB)(t)&&t.id===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,i)}return null}}class ae extends n{constructor(e,t=null,i=null,r=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=i,this._interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,i=null){const r=te(e,this._overrideSpatialReference,null===i?["*"]:i,t,this._lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async _loadMetaData(){const e=await ie(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new ae(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,i=null){null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const n=this._instantLayers[i];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===r)return this._instantLayers[i].featureset}const n=await this._loadMetaData();let s=null;for(const t of n.layers??[])t.name===e&&(s=t);if(!s)for(const t of n.tables??[])t.name===e&&(s=t);if(s){const e=await X(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);e=null!=e?e.toString():"";for(let i=0;i<this._instantLayers.length;i++){const n=this._instantLayers[i];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===r)return this._instantLayers[i].featureset}const n=await this._loadMetaData();let s=null;for(const t of n.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of n.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(s){const e=await X(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,i)}return null}}function le(e,t,i=null,r=null){return new se(e,t,i,r)}function oe(e,t,i=null,r=null){return new ae(e,t,i,r)}function ue(e,t,i,r,n){if(null===e)return null;if((0,s.m)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof Y.A&&(0,y.NI)(e)){const s=e;switch(t){case"datasource":return te(s,n,"outFields"in s?s.outFields:null,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return te(s,n,"outFields"in s?s.outFields:null,!0,i,r)}return null}if((0,s.a1)(e)){switch(t){case"datasource":return te(e.parent,n,e.parent.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return te(e,n,e.parent.outFields,!0,i,r)}return null}return null}async function ce(e,t,i,r,n,s,a,l=null){if(z.A.applicationCache){const o=z.A.applicationCache.getLayerInfo(e+":"+s.url);if(o)return de(await o,t,i,r,n,a,l)}if(null!=a){const o=a.getCachedPortalItem(s.url,e);if(null!=o)return await de(await o,t,i,r,n,a,l)}const o=new K.default({id:e,portal:s}).load();z.A.applicationCache?z.A.applicationCache.setLayerInfo(e+":"+s.url,o):null!=a&&a.setCachedPortalItem(s.url,e,o);try{return await de(await o,t,i,r,n,a,l)}catch(t){throw z.A.applicationCache&&z.A.applicationCache.clearLayerInfo(e+":"+s.url),null!=a&&a.removeCachedPortalItem(s.url,e,o),t}}async function de(e,t,i,r,n,s,a){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await X((0,y.Qi)(e.url??"")+"/"+t,["*"],s);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=s){const t=s.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=Y.A.fromPortalItem(e);s.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(i){throw s.removeCachedPortalItemLayer(e.portal.url,e.id,t),i}}}else l=await Y.A.fromPortalItem(e)}return te(l,i,r,n,s,a)}},41366:(e,t,i)=>{i.d(t,{K:()=>h,Q:()=>u});var r=i(31635),n=i(66552),s=i(53966),a=i(10107),l=(i(44208),i(87811),i(93223)),o=i(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&d||i&&c||null,t&&i&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,l.e)(u,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,r.Cg)([(0,o.$)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},41560:(e,t,i)=>{i.d(t,{Ch:()=>a,mW:()=>s});var r=i(34727),n=i(39516);function s(e,t){return{...t,filterMode:e.mode}}function a(e,t,i){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:i,maxScale:r}of e.filters)t[0]=Math.max(t[0],c(i)),t[1]=Math.min(t[1],d(r));return t}(e);if(s&&((0,r.gg)(t,s[0])||(0,r.ZH)(i,s[1])))return"";const a=Array.from(l(e,t,i)),o=function(e,t,i){if(0===e.length)return!0;const n=c(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,r.ZH)(n,t)||(0,r.gg)(s,i))return!0;for(let t=0;t<e.length-1;t++){const i=e[t],n=e[t+1];if((0,r.ZH)(c(n.minScale),d(i.maxScale)))return!0}return!1}(a,t,i)?"1=1":a.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,i){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const r of e.filters)o(r.minScale,r.maxScale,t,i)&&(yield r)}}function o(e,t,i,n){return e=c(e),i=c(i),t=d(t),!(!(0,r.Sp)(i,e)&&(n??i)>e||(0,r.Hx)(t,i)||void 0!==n&&(0,r.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45067:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(31635),n=i(69540),s=i(66552),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(40608));const u=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),c=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,r.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"cardinality",void 0),(0,r.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:c.read,write:c.write}})],d.prototype,"role",void 0),d=(0,r.Cg)([(0,o.$)("esri.layers.support.Relationship")],d)},46140:(e,t,i)=>{i.d(t,{R:()=>n});var r=i(49186);let n=class e{constructor(e,t,i=""){this.major=e,this.minor=t,this._context=i}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",i=this._context&&this._context+" ";throw new r.A(t+"unsupported-version",`Required major ${i}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,i=""){const[n,s]=t.split("."),a=/^\s*\d+\s*$/;if(!n?.match||!a.test(n))throw new r.A((i&&i+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!a.test(s))throw new r.A((i&&i+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(n,10),o=parseInt(s,10);return new e(l,o,i)}}},50498:(e,t,i)=>{i.d(t,{Ye:()=>d,gy:()=>c,yR:()=>h});var r=i(66552),n=i(5443),s=i(91075),a=i(48526),l=i(86738),o=i(39829),u=i(82799);const c=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),d=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),h={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:a.A,point:l.A,polyline:u.A,polygon:o.A}}},52106:(e,t,i)=>{i.d(t,{A:()=>I});var r,n=i(31635),s=i(37838),a=i(69540),l=i(51447),o=i(25482),u=i(53966),c=i(36708),d=i(24326),h=i(10107),p=(i(44208),i(87811),i(40608)),f=i(12195),y=i(65864),g=i(50498),m=i(55156),_=i(60950),w=i(54339),b=i(33910);function F(e){if(null==e)return null;const t={};for(const i in e){const r=e[i];r&&(t[i]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let I=class extends((0,a.OU)(o.o)){static{r=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,_.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const i=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[i,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,m.I)(this.origin);if(e)return(0,w.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,w.r)(this,t):null}getGlobalId(){const e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:F(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(n.action=r),"attributes"===e&&(n.attributeName=r),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const r=(0,y.rS)(e[i]);r&&(t[i]=r)}return 0!==Object.keys(t).length?t:null}}})],I.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,h.MZ)({value:null})],I.prototype,"attributes",null),(0,n.Cg)([(0,h.MZ)({value:null,types:g.yR,json:{read:y.rS}})],I.prototype,"geometry",null),(0,n.Cg)([(0,h.MZ)({type:Boolean})],I.prototype,"isAggregate",void 0),(0,n.Cg)([(0,h.MZ)({clonable:!1})],I.prototype,"layer",void 0),(0,n.Cg)([(0,h.MZ)({clonable:"reference"})],I.prototype,"origin",void 0),(0,n.Cg)([(0,h.MZ)({type:s.A,value:null})],I.prototype,"popupTemplate",null),(0,n.Cg)([(0,h.MZ)({clonable:"reference"})],I.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,h.MZ)({value:null,types:b.Es})],I.prototype,"symbol",null),(0,n.Cg)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],I.prototype,"_version",void 0),(0,n.Cg)([(0,h.MZ)({type:Boolean,value:!0})],I.prototype,"visible",null),I=r=(0,n.Cg)([(0,p.$)("esri.Graphic")],I)},52136:(e,t,i)=>{i.d(t,{p:()=>a});var r=i(31635),n=i(10107),s=(i(44208),i(53966),i(87811),i(40608));const a=e=>{const t=e;let i=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],i),i}},54461:(e,t,i)=>{i.d(t,{A:()=>a});var r=i(87449),n=i(11221),s=i(89169);class a extends n.A{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getSet(e);return this._wset=new s.A(t._candidates.slice(),t._known.slice(),!1,this._clonePageDefinition(t.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset}return this._wset}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(1===t)return t;const i=this._idstates[e];return 0===i||1===i?i:0===t&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=0,this._countedin++,0):(this._idstates[e]=1,1):2}async _expandPagedSet(e,t,i,n,s){if(null===this._parent)throw new r.d("NotImplemented");if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),"success"}const a=await this._parent._expandPagedSet(e,t,i,n,s);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),a}async _getFeatures(e,t,i,r){const n=[],a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return await this._expandPagedSet(e,a,0,0,r),this._getFeatures(e,t,i,r);-1!==t&&void 0===this._featureCache[t]&&n.push(t);let l=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(l++,l<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&n.push(e._known[r]),n.length>a)));r++);if(0===n.length)return"success";const o=new s.A([],n,!1,null),u=Math.min(n.length,i);await this._parent._getFeatures(o,-1,u,r);for(let e=0;e<u;e++){const t=this._parent._featureFromCache(n[e]);void 0!==t&&(this._featureCache[n[e]]=t)}return"success"}async _getFilteredSet(e,t,i,r,n){await this._ensureLoaded();const a=await this._getSet(n);return new s.A(a._candidates.slice().concat(a._known.slice()),[],!1,this._clonePageDefinition(a.pagesDefinition))}_refineKnowns(e,t){let i=0,r=null;const n=[];for(let s=0;s<e._candidates.length;s++){const a=this._isInFeatureSet(e._candidates[s]);if(0===a){if(e._known.push(e._candidates[s]),i+=1,null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(n.push(r),r={start:s,end:s}),e._known.length>=this._topnum)break}else if(1===a)null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(n.push(r),r={start:s,end:s}),i+=1;else if(2===a)break;if(i>=t)break}null!==r&&n.push(r);for(let t=n.length-1;t>=0;t--)e._candidates.splice(n[t].start,n[t].end-n[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}static registerAction(){n.A._featuresetFunctions.top=function(e){return new a({parentfeatureset:this,topnum:e})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},55156:(e,t,i)=>{i.d(t,{I:()=>n,e:()=>r});const r=Symbol("idFieldsProviderSymbol");function n(e){return(t=e)&&r in t?e[r]:void 0;var t}},55674:(e,t,i)=>{i.d(t,{Ad:()=>p,Gj:()=>g,QY:()=>h,lL:()=>m,xR:()=>f});var r=i(66131),n=i(49186),s=(i(44208),i(44729)),a=i(15032),l=i(65864),o=i(95466),u=i(43668),c=i(98623);const d=["geometry","scale","timeProperties"];function h(e,t){if(null!=t)for(const i of d)t.hasArcadeDependency(i)&&e.add(i);return e}function p(e,t){return y.create(e,t,null,["$feature","$view"])}function f(e,t,i){return y.create(e,t,i,["$feature","$view","$config"])}class y{static async create(e,t,i,r){const{arcade:s,Dictionary:a}=await(0,u.l)();let l;try{l=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const o=s.scriptUsesGeometryEngine(l);o&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,l,null,!1,o);const c={vars:r.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(l,c);let h=null;null!=i&&(h=new a(i),h.immutable=!0);const p=new a;return p.immutable=!1,p.setField("scale",0),new y(e,s,l,d,t,p,h,a)}constructor(e,t,i,r,n,s,a,l){this.script=e,this._arcade=t,this._syntaxTree=i,this._compiled=r,this._spatialReference=n,this._viewDict=s,this._configDict=a,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new g,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const i=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=i?r.lY.epochToArcadeDate(n,i):r.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=i?r.lY.epochToArcadeDate(s,i):r.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:i})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class g{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,i){const r=t??new o.A(m(e.attributes));this._boundTarget=e,this._boundSchema.fields=r.fields,this._boundSchema.fieldsIndex=r,this._boundSchema.spatialReference=i}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const i=this._getField(e);if(i){const t=this._boundTarget.attributes[i.name];if(null==t)return null;switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return r.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?r.lY.unknownEpochToArcadeDate(t):r.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function m(e){const t=[];for(const i in e)t.push({name:i,alias:i,type:"string"==typeof e[i]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,i)=>{i.d(t,{q:()=>n});var r=i(62815);function n(e,t,i){if(!i?.features||!i.hasZ)return;const n=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of i.features)n(e.geometry)}},62815:(e,t,i)=>{i.d(t,{N:()=>a});var r=i(83047),n=i(73941),s=i(21325);function a(e,t,i){if(null==t||null==i||i.vcsWkid||(0,s.aI)(t,i)||(0,n.xP)(t)||(0,n.xP)(i))return null;const a=(0,r.G9)(t)/(0,r.G9)(i);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,a);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},68423:(e,t,i)=>{i.d(t,{Gr:()=>_,IO:()=>y,a:()=>w,bV:()=>m,p8:()=>g});var r=i(52106),n=i(78502),s=i(87449),a=i(11221),l=i(89169),o=i(33325),u=i(80609),c=i(97768),d=i(1262),h=i(88368),p=i(16930);class f{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class y extends f{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class g extends f{constructor(e,t,i){super((0,o.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=i}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,u.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class m extends f{constructor(e,t,i){super(e),this.codefield=t,this.lkp=i,this.reverseLkp={};for(const e in i)this.reverseLkp[i[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const i=this.evaluateNodeToWhereClause(e.parseTree,0,this.field.name,this.codefield instanceof h.A?(0,u.YY)(this.codefield,0):this.codefield,e.parameters);return i.includes(m.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:h.A.create(i,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,i=null,r=null,n){let s,a,l,c;switch(e.type){case"interval":return(0,u.oj)(this.evaluateNodeToWhereClause(e.value,t,i,r,n),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,i,m.BADNESS,n));for(let s=0;s<e.clauses.length;s++)r+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[s].operand,t,i,m.BADNESS,n)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[s].value,t,i,m.BADNESS,n);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,i,m.BADNESS,n)),r+=" END ",r}case"parameter":{const i=n[e.value.toLowerCase()];if("string"==typeof i)return"'"+i.toString().replaceAll("'","''")+"'";if((0,o.$P)(i))return(0,u.bm)(i,t);if((0,o.Lk)(i))return(0,u.bm)(i,t);if((0,o.eg)(i))return(0,u.F1)(i,t);if((0,o.rX)(i))return(0,u.R8)(i,t);if((0,o.f0)(i))return(0,u.Nf)(i,t);if(Array.isArray(i)){const e=[];for(let r=0;r<i.length;r++)"string"==typeof i[r]?e.push("'"+i[r].toString().replaceAll("'","''")+"'"):(0,o.$P)(i[r])||(0,o.Lk)(i[r])?e.push((0,u.bm)(i[r],t)):(0,o.eg)(i[r])?e.push((0,u.F1)(i[r],t)):(0,o.rX)(i[r])?e.push((0,u.R8)(i[r],t)):(0,o.f0)(i[r])?e.push((0,u.Nf)(i[r],t)):e.push(i[r].toString());return e}return i.toString()}case"expression-list":a=[];for(const s of e.value)a.push(this.evaluateNodeToWhereClause(s,t,i,r,n));return a;case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,i,m.BADNESS,n)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" AND "+this.evaluateNodeToWhereClause(e.right,t,i,r,n)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" OR "+this.evaluateNodeToWhereClause(e.right,t,i,r,n)+") ";case"IS":if("null"!==e.right.type)throw new d.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new d.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IS NOT NULL )";case"IN":if(s=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const s=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}s.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+s.join(",")+")) "}return s=this.evaluateNodeToWhereClause(e.right,t,i,r,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+s.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,n),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+c+")) ";case"NOT IN":if(s=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const s=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}s.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+s.join(",")+")) "}return s=this.evaluateNodeToWhereClause(e.right,t,i,r,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+s.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,n),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+c+")) ";case"BETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return(0,u.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+r+")":(0,u.Kb)(e.column);case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,i,m.BADNESS,n);return(0,u.F6)(e.name,r,t)}}throw new d.L("UnsupportedSyntax",{node:e.type})}extractValue(e){if(this.codefield instanceof h.A){const t=this.codefield.calculateValueCompiled(e);return this.reverseLkp[h.A.convertValueToStorageFormat(t)]}return this.reverseLkp[e.attributes[this.codefield]]}}class _ extends f{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,u.bD)(e,this.field.name,(0,u.YY)(this._sql,0),t.getFieldsIndex())}}extractValue(e){return h.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class w extends a.A{static findField(e,t){for(const i of e)if(i.name.toLowerCase()===t.toString().toLowerCase())return i;return null}constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=[],this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}_initialiseFeatureSet(){null!==this._parent?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new p.A({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=o.ik.point,this.typeIdField="",this.types=null,this.subtypeField=null,this.subtypes=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();let t=null;return t=this._extraFilter?await this._getFilteredSet("",null,null,null,e):await(this._parent?._getSet(e)),this._checkCancelled(e),(0,c.Lw)(t),this._wset=new l.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}async _getFeatures(e,t,i,s){const a=[];-1!==t&&void 0===this._featureCache[t]&&a.push(t);const o=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,o))return await this._expandPagedSet(e,o,0,0,s),this._getFeatures(e,t,i,s);let u=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(u++,u<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&a.push(e._known[r]),a.length>=o)));r++);if(0===a.length)return"success";e=new l.A([],a,e._ordered,null);const c=Math.min(a.length,i);await(this._parent?._getFeatures(e,-1,c,s)),this._checkCancelled(s);const d=[];for(let e=0;e<c;e++){const t=this._parent?._featureFromCache(a[e]);void 0!==t&&d.push({geometry:t.geometry,attributes:t.attributes,id:a[e]})}for(const e of d){const t=[];for(const i of this.adaptedFields)t[i.field.name]=i.extractValue(e);this._featureCache[e.id]=new r.A({attributes:t,geometry:(0,n.Yq)(e.geometry)})}return"success"}async _fetchAndRefineFeatures(){throw new s.d("NeverReach")}async _getFilteredSet(e,t,i,r,n){let s=!1;const a=this._reformulateWithoutAdaptions(i);s=a.cannot,i=a.where;let o=!1;if(null!==r){o=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof y)&&!0===r.scanForField(t.field.name)){if(!(t instanceof g)){r=null,o=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}r&&e.length>0&&(r=r.replaceFields(e))}null!==i?null!==this._extraFilter&&(i=(0,u.kg)(this._extraFilter,i)):i=this._extraFilter,await this._ensureLoaded();const c=await this._parent._getFilteredSet(e,t,i,r,n);let d;return this._checkCancelled(n),d=!0===s?new l.A(c._candidates.slice().concat(c._known.slice()),[],!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)):new l.A(c._candidates.slice(),c._known.slice(),!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)),d}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const i of this.adaptedFields)if(!0===(0,u.Ju)(e,i.field.name)){const r=i.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}async _stat(e,t,i,r,n,s,a){let l=!1,o=this._reformulateWithoutAdaptions(t);if(l=o.cannot,t=o.where,o=this._reformulateWithoutAdaptions(n),l=l||o.cannot,null!==(n=o.where)?null!==this._extraFilter&&(n=(0,u.kg)(this._extraFilter,n)):n=this._extraFilter,!0===l)return null===n&&""===i&&null===r?this._manualStat(e,t,s,a):{calculated:!1};const c=await this._parent._stat(e,t,i,r,n,s,a);return!1===c.calculated?null===n&&""===i&&null===r?this._manualStat(e,t,s,a):{calculated:!1}:c}async _canDoAggregates(e,t,i,r,n){if(null===this._parent)return!1;for(let t=0;t<e.length;t++)for(const i of this.adaptedFields)if(e[t].toLowerCase()===i.field.name.toLowerCase()&&!(i instanceof y))return!1;const s=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return!1;const t=i.clone();t.workingexpr=e.where,s.push(t)}else s.push(i)}const a=this._reformulateWithoutAdaptions(n);return!a.cannot&&(null!==(n=a.where)?null!==this._extraFilter&&(n=(0,u.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent._canDoAggregates(e,s,i,r,n))}async _getAggregatePagesDataSourceDefinition(e,t,i,r,n,a,l){if(null===this._parent)throw new s.d("NeverReach");const o=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)throw new s.d("NeverReach");const t=i.clone();t.workingexpr=e.where,o.push(t)}else o.push(i)}const c=this._reformulateWithoutAdaptions(n);if(c.cannot)throw new s.d("NeverReach");return null!==(n=c.where)?null!==this._extraFilter&&(n=(0,u.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,o,i,r,n,a,l)}}},73681:(e,t,i)=>{i.d(t,{n:()=>o});var r=i(49186),n=i(53966),s=i(46140),a=i(95466),l=i(55674);class o{static async from(e,t,i){const a=e.dictionary_version?s.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(i))h.delete(e);h.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const p=await(0,l.xR)(e.expression,null,d);if(!p)throw new r.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!a||!a.greaterEqual(4,0);f&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});const y=new u(i,f);return new o(f,c,p,y)}constructor(e,t,i,r){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=i,this._reader=r}get itemNames(){return this._itemNames}evaluate(e,t,i,r){try{return this._reader.bind(e,i,r),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,i)=>{i.d(t,{Gh:()=>y,tk:()=>d,BR:()=>c,wI:()=>u,G$:()=>p,$x:()=>h,Ov:()=>l,W_:()=>o,OP:()=>f,TU:()=>a,XX:()=>s});var r=i(70333),n=i(78888);i(7762),i(84952),i(36563),i(36708),i(4146),new WeakMap,i(16215);const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const i=r.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const a=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,n.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function d(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function h(e,t){return null}function p(e){return null}function f(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function y(e,t){if(!t||!f(e))return;const i=(e.url,null);i&&(e.url=i)}},79677:(e,t,i)=>{i.d(t,{A:()=>h});var r,n=i(31635),s=i(25482),a=i(88930),l=i(10107),o=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),c=i(43937),d=i(98623);let h=class extends s.o{static{r=this}static get allTime(){return p}static get empty(){return f}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===r&&i===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,a.lL)(i,e,t));let n=this.end;if(n){const i=(0,a.lL)(n,e,t);n=n.getTime()===i.getTime()?i:(0,a.S1)(i,1,e,t)}return new r({start:i,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,l;return n>=t&&n<=i?a=n:t>=n&&t<=s&&(a=t),i>=n&&i<=s?l=i:s>=t&&s<=i&&(l=s),null==a||null==l||isNaN(a)||isNaN(l)?r.empty:new r({start:a===-1/0?null:new Date(a),end:l===1/0?null:new Date(l)})}offset(e,t,i=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new r,{start:s,end:l}=this;return null!=s&&(n.start=(0,a.S1)(s,e,t,i)),null!=l&&(n.end=(0,a.S1)(l,e,t,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n.Cg)([(0,o.w)("end")],h.prototype,"readEnd",null),(0,n.Cg)([(0,c.K)("end")],h.prototype,"writeEnd",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n.Cg)([(0,o.w)("start")],h.prototype,"readStart",null),(0,n.Cg)([(0,c.K)("start")],h.prototype,"writeStart",null),h=r=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],h);const p=new h,f=new h({start:void 0,end:void 0})},86691:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(78878),n=i(87449),s=i(11221),a=i(89169),l=i(87594);class o extends s.A{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,this._orderbyclause,e);return this._checkCancelled(e),this._wset=t,this._wset}return this._wset}async manualOrderSet(e,t){const i=await this.getIdColumnDictionary(e,[],-1,t);this._orderbyclause?.order(i);const r=new a.A([],[],!0,null);for(let e=0;e<i.length;e++)r._known.push(i[e].id);return r}async getIdColumnDictionary(e,t,i,n){if(i<e._known.length-1){const s=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return await(0,r.a2)(this._parent._expandPagedSet(e,s,0,0,n)),this.getIdColumnDictionary(e,t,i,n);let a=i+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;i+=l.length;const o=await(0,r.a2)(this._parent._getFeatureBatch(l,n));this._checkCancelled(n);for(const e of o)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,i,n)}return e._candidates.length>0?(await(0,r.a2)(this._refineSetBlock(e,this._maxProcessingRate(),n)),this._checkCancelled(n),this.getIdColumnDictionary(e,t,i,n)):t}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}async _fetchAndRefineFeatures(){throw new n.d("NeverReach")}async _getFilteredSet(e,t,i,r,n){await this._ensureLoaded();const s=await this._parent._getFilteredSet(e,t,i,null===r?this._orderbyclause:r,n);this._checkCancelled(n);const l=new a.A(s._candidates.slice(),s._known.slice(),s._ordered,this._clonePageDefinition(s.pagesDefinition));let o=!0;if(s._candidates.length>0&&(o=!1),!1===l._ordered){let e=await this.manualOrderSet(l,n);return!1===o&&(null===t&&null===i||(e=new a.A(e._candidates.slice().concat(e._known.slice()),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e}return l}static registerAction(){s.A._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new l.A(e)})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},87594:(e,t,i)=>{function r(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}i.d(t,{A:()=>n});class n{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const i=t[e].match(/\S+/g);this._fields.push(i[0]),2===i.length?"asc"===i[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort((e,t)=>{for(let i=0;i<this._fields.length;i++){const n=this.featureValue(e.feature,this._fields[i],i),s=this.featureValue(t.feature,this._fields[i],i);let a=0;if(a=1===this._directions[i]?r(n,s):-1*r(n,s),0!==a)return a}return 0})}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let i=0;i<this._fields.length;i++){0!==i&&(t+=",");let r=this._fields[i];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[i]?t+=" ASC":t+=" DESC"}return new n(t)}featureValue(e,t,i){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[i]=r,e.attributes[r];return null}}},91218:(e,t,i)=>{i.r(t),i.d(t,{canProjectWithoutEngine:()=>W,initializeProjection:()=>$,isEqualBaseGCS:()=>V,isLoaded:()=>k,isLoadedOrLoad:()=>D,isLoadedOrLoadFor:()=>M,load:()=>N,project:()=>P,projectExtent:()=>ie,projectMany:()=>E,projectMultipoint:()=>Y,projectOrLoad:()=>O,projectOrLoadMany:()=>j,projectPoint:()=>z,projectPolygon:()=>ee,projectPolyline:()=>H,projectWithZConversion:()=>B,projectWithoutEngine:()=>Q,requiresLoad:()=>L,test:()=>q,tryProjectWithZConversion:()=>U,unload:()=>Z});var r=i(49186),n=i(74887),s=i(62788),a=i(95488),l=i(51850),o=i(21276),u=i(73941),c=i(5443),d=i(91075),h=i(48526),p=i(86738),f=i(39829),y=i(82799),g=i(16930),m=i(159),_=i(9762),w=i(37539);function b(e,t,i,r,n,s){return F[0]=e,F[1]=t,F[2]=i,(0,_.projectBuffer)(F,r,0,n,s,0)}const F=(0,l.vt)();var I=i(21325),S=i(62815);let v=null,A=null,T=null,C=null,x={};const R=new a.I;function k(){return!!(A?.isLoaded()&&T?.isLoaded()&&C?.isLoaded())}function D(){return!!k()||((0,s.gc)(R),N(),!1)}function M(e,t){return!e||!t||W(e,t)||D()}function L(e,t){return!W(e,t)&&!k()}async function N(e){null==v&&(v=Promise.all([i.e(3276).then(i.bind(i,83276)).then(e=>(A=e,A.load())),i.e(8377).then(i.bind(i,8377)).then(e=>(T=e,T.load())),i.e(2158).then(i.bind(i,12158)).then(e=>(C=e,C.load()))])),await v,(0,n.Te)(e),R.notify()}function P(e,t,i){return Array.isArray(e)?0===e.length?[]:((0,o.H)(e),E(e,e[0].spatialReference,t,i)):((0,o.f)(e),E([e],e.spatialReference,t,i)[0])}function E(e,t,i,r){if(null==t||null==i)return e;if(W(t,i,r))return e.map(e=>Q(e,t,i));if(null==r?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>Q(e,t,g.A.WGS84)).map(e=>U(e,i));if(null==r?.geographicTransformation&&(0,u.jA)(i))return e.map(e=>U(e,g.A.WGS84)).map(e=>Q(e,g.A.WGS84,i));if(!k())throw new G;if(!r?.geographicTransformation)if(r?.extendedParams)r={...r,geographicTransformation:C.getTransformation(t,i,r.areaOfInterestExtent)||new m.A};else if(!r?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,i);let n=x[e];n||(n=C.getTransformation(t,i)||new m.A,x[e]=n),r={geographicTransformation:n}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof d.A?A.executeMany(e,i,r):T.executeMany(e,i,r)}function O(e,t){const i=j([e],t);return null!=i.pending?{pending:i.pending,geometry:null}:null!=i.geometries?{pending:null,geometry:i.geometries[0]}:{pending:null,geometry:null}}function j(e,t){if(!k())for(const i of e)if(null!=i&&!(0,I.aI)(i.spatialReference,t)&&(0,I.fn)(i.spatialReference)&&(0,I.fn)(t)&&!W(i.spatialReference,t))return(0,s.gc)(R),{pending:N(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,I.aI)(e.spatialReference,t)?e:(0,I.fn)(e.spatialReference)&&(0,I.fn)(t)?U(e,t):null)}}class G extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function Z(){v=null,A=null,T=null,C=null,x={}}const q={get loadPromise(){return v}};function U(e,t){try{const i=P(e,t);if(null==i)return null;"xmin"in e&&"xmin"in i&&(i.zmin=e.zmin,i.zmax=e.zmax);const r=(0,S.N)(i.type,e.spatialReference,t);return null!=r&&r(i),i}catch(e){if(!(e instanceof G))throw e;return null}}async function B(e,t,i){const r=e.spatialReference;return null!=r&&null!=t&&await $(r,t,null,i),U(e,t)}function W(e,t,i){return!(i?.areaOfInterestExtent||i?.extendedParams||i?.geographicTransformation)&&(!!(0,I.aI)(e,t)||(0,I.fn)(e)&&(0,I.fn)(t)&&!!(0,w.jd)(e,t))}function V(e,t){if((0,I.aI)(e,t))return!0;if(!(0,I.fn)(e)||!(0,I.fn)(t))return!1;const i=(0,I.oT)(e)||(0,I.K8)(e)||(0,I.x1)(e),r=(0,I.oT)(t)||(0,I.K8)(t)||(0,I.x1)(t);return i&&r}async function $(e,t,i,r){if(k())return(0,n.NO)(r);if(Array.isArray(e)){for(const{source:t,dest:i,options:n}of e)if(t&&i&&!W(t,i,n))return N(r)}else if(e&&t&&!W(e,t,i))return N(r);return(0,n.NO)(r)}function Q(e,t,i){return e?"x"in e?J(e,t,new p.A,i,0):"xmin"in e?re(e,t,new c.A,i,0):"rings"in e?te(e,t,new f.A,i,0):"paths"in e?X(e,t,new y.A,i,0):"points"in e?K(e,t,new h.A,i,0):null:null}function z(e,t,i=t.spatialReference,r=0){return null!=i&&null!=e.spatialReference&&null!=J(e,e.spatialReference,t,i,r)}function J(e,t,i,r,n){se[0]=e.x,se[1]=e.y;const s=e.z;return se[2]=void 0!==s?s:n,(0,_.projectBuffer)(se,t,0,se,r,0)?(i.x=se[0],i.y=se[1],i.spatialReference=r,void 0!==s||(0,u.xP)(r)?(i.z=se[2],i.hasZ=!0):(i.z=void 0,i.hasZ=!1),void 0===e.m?(i.m=void 0,i.hasM=!1):(i.m=e.m,i.hasM=!0),i):null}function Y(e,t,i=t.spatialReference,r=0){return null!=e.spatialReference&&null!=i&&null!=K(e,e.spatialReference,t,i,r)}function K(e,t,i,r,n){const{points:s,hasZ:a,hasM:l}=e,o=[],c=s.length,d=[];for(const e of s)d.push(e[0],e[1],a?e[2]:n);if(!(0,_.projectBuffer)(d,t,0,d,r,0,c))return null;const h=a||(0,u.xP)(r);for(let e=0;e<c;++e){const t=3*e,i=d[t],r=d[t+1];h&&l?o.push([i,r,d[t+2],s[e][3]]):h?o.push([i,r,d[t+2]]):l?o.push([i,r,s[e][2]]):o.push([i,r])}return i.points=o,i.spatialReference=r,i.hasZ=a,i.hasM=l,i}function H(e,t,i=t.spatialReference,r=0){return null!=e.spatialReference&&null!=i&&null!=X(e,e.spatialReference,t,i,r)}function X(e,t,i,r,n){const{paths:s,hasZ:a,hasM:l}=e,o=[];if(!ne(s,a??!1,l??!1,t,o,r,n))return null;const c=a||(0,u.xP)(r);return i.paths=o,i.spatialReference=r,i.hasZ=c,i.hasM=l,i}function ee(e,t,i=t.spatialReference,r=0){return null!=e.spatialReference&&null!=i&&null!=te(e,e.spatialReference,t,i,r)}function te(e,t,i,r,n){const{rings:s,hasZ:a,hasM:l}=e,o=[];if(!ne(s,a??!1,l??!1,t,o,r,n))return null;const c=a||(0,u.xP)(r);return i.rings=o,i.spatialReference=r,i.hasZ=c,i.hasM=l,i}function ie(e,t,i=t.spatialReference,r=0){return null!=e.spatialReference&&null!=i&&null!=re(e,e.spatialReference,t,i,r)}function re(e,t,i,r,n){const{xmin:s,ymin:a,xmax:l,ymax:o,hasZ:c,hasM:d}=e;if(!b(s,a,c?e.zmin:n,t,se,r))return null;const h=c||(0,u.xP)(r);return i.xmin=se[0],i.ymin=se[1],h&&(i.zmin=se[2]),b(l,o,c?e.zmax:n,t,se,r)?(i.xmax=se[0],i.ymax=se[1],h&&(i.zmax=se[2]),d&&(i.mmin=e.mmin,i.mmax=e.mmax),i.spatialReference=r,i):null}function ne(e,t,i,r,n,s,a=0){const l=new Array;for(const i of e)for(const e of i)l.push(e[0],e[1],t?e[2]:a);if(!(0,_.projectBuffer)(l,r,0,l,s,0))return!1;let o=0;n.length=0;const c=t||(0,u.xP)(s);for(const t of e){const e=new Array;for(const r of t)c&&i?e.push([l[o++],l[o++],l[o++],r[3]]):c?e.push([l[o++],l[o++],l[o++]]):i?(e.push([l[o++],l[o++],r[2]]),o++):(e.push([l[o++],l[o++]]),o++);n.push(e)}return!0}const se=(0,l.vt)()},91880:(e,t,i)=>{i.d(t,{A:()=>c});var r,n=i(31635),s=i(66552),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(40608));const u=new s.J({asc:"ascending",desc:"descending"});let c=class extends a.o{static{r=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=r=(0,n.Cg)([(0,o.$)("esri.layers.support.OrderByInfo")],c)},99157:(e,t,i)=>{i.d(t,{A:()=>o});var r,n=i(31635),s=i(65008),a=i(10107),l=(i(44208),i(53966),i(87811),i(40608));let o=r=class extends s.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new r({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,a.MZ)()],o.prototype,"isInverse",void 0),(0,n.Cg)([(0,a.MZ)()],o.prototype,"wkt",void 0),(0,n.Cg)([(0,a.MZ)()],o.prototype,"wkid",void 0),o=r=(0,n.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformationStep")],o)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2561,3548,4342,7548,7694,8350],{159:(e,t,i)=>{i.d(t,{A:()=>u});var r,n=i(31635),s=i(65008),a=i(10107),l=(i(44208),i(53966),i(87811),i(64108)),o=i(99157);let u=r=class extends s.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new r;for(let t=this.steps.length-1;t>=0;t--){const i=this.steps[t];e.steps.push(i.getInverse())}return e}};(0,n.Cg)([(0,a.MZ)({type:[o.A],nonNullable:!0})],u.prototype,"steps",void 0),u=r=(0,n.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformation")],u)},4146:(e,t,i)=>{i.d(t,{A:()=>w});var r=i(31635),n=i(78888),s=i(49186),a=i(65529),l=i(4902),o=i(92474),u=i(53966),c=i(74887),d=i(84952),h=i(10107),p=(i(44208),i(87811),i(64108)),f=i(5443),y=i(16930),g=i(92602),m=i(79677);let _=0,w=class extends((0,a.Zt)((0,l.sA)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await Promise.all([i.e(812),i.e(5613),i.e(5710)]).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",n=i?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,h.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,r.Cg)([(0,h.MZ)({type:f.A})],w.prototype,"fullExtent",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,r.Cg)([(0,h.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,r.Cg)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,r.Cg)([(0,h.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,h.MZ)({type:y.A})],w.prototype,"spatialReference",void 0),(0,r.Cg)([(0,h.MZ)({type:String})],w.prototype,"title",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,r.Cg)([(0,h.MZ)()],w.prototype,"url",void 0),(0,r.Cg)([(0,h.MZ)({type:m.A})],w.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,r.Cg)([(0,p.$)("esri.layers.Layer")],w)},4902:(e,t,i)=>{i.d(t,{PH:()=>l,sA:()=>a});var r=i(31635),n=i(64108);let s=0;const a=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return i=(0,r.Cg)([(0,n.$)("esri.core.Identifiable")],i),i},l=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return i=(0,r.Cg)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],i),i};a(class{})},6797:(e,t,i)=>{i.d(t,{Ui:()=>h});var r=i(65008),n=i(7762),s=i(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.A}function o(e){return e instanceof n.A?Object.keys(e.items):l(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=o(e),n=o(t);if(0===r.length&&0===n.length)return;if(!r.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!r.includes(e)),h=r.filter(e=>!n.includes(e)),p=r.filter(i=>n.includes(i)&&u(e,i)!==u(t,i)).concat(s,h).sort(),f=c(e);if(f&&a.has(f)&&p.length)return{type:"complete",oldValue:e,newValue:t};let y;const g=l(e)&&l(t);for(const r of p){const n=u(e,r),s=u(t,r);let a;if((g||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(i&&i[r]&&"function"==typeof i[r])a=i[r]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;a={type:"complete",oldValue:n,newValue:s}}else a="object"==typeof n&&"object"==typeof s&&c(n)===c(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=a&&(null!=y?y.diff[r]=a:y={type:"partial",diff:{[r]:a}})}}return y}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},9762:(e,t,i)=>{i.r(t),i.d(t,{projectBuffer:()=>n});var r=i(37539);function n(e,t,i,n,s,a,l=Math.floor(e.length/3)){const o=(0,r.jd)(t,s);if(null==o)return!1;if(o===r.pO){if(e===n&&i===a)return!0;const t=i+3*l;for(let r=i,s=a;r<t;r++,s++)n[s]=e[r];return!0}const u=i+3*l;for(let t=i,r=a;t<u;t+=3,r+=3)o(e,t,n,r);return!0}},16215:(e,t,i)=>{i.d(t,{S:()=>n,Y:()=>r});const r=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&r in e}},17311:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(31635),n=i(65008),s=i(4576),a=i(60999),l=i(7762),o=i(10107),u=(i(44208),i(53966),i(64108)),c=i(30524),d=i(43668);let h=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,a.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??i.e(9926).then(i.bind(i,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const i=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(i.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:i,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(i,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const i=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of i){const i=t.split("."),r=this.fieldsIndex.get(i.at(-1)??"");r&&e.add(r.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const i of t){const t=this.fieldsIndex.get(i);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,i){const r=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],i)).get(r)??""}async getTitles(e,t,i){const r=new Map,n=i?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);i?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:a,workingTitle:l}=this,o=l&&a;t.forEach(t=>{const i=t.getObjectId()??t.attributes[e.objectIdField],u=o?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:a,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:l}):"";r.set(i,u)})}catch{}return r}async _checkAndReQueryGraphics(e,t){const i=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s.Ru);if(i.length!==t.length)return t;if(t.some(e=>!(0,c.Kl)(e,this.requiredFields))){const r=e.createQuery();r.where="1=1",r.outFields=[...this.requiredFields],r.objectIds=i;const n=await e.queryFeatures(r);if(n?.features.length===t.length)return n.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const i of e){if(!i.fieldName)continue;const e=this.fieldsIndex.get(i.fieldName),r=e?.name??i.fieldName;i.fieldName=r,t.set(r.toLowerCase(),i)}return t}_createFormattedAttributes(e,t,i="system"){const r=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const i=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:i}})}catch{}}const s={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:r,attributes:s,graphic:t,timeZone:i,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],h.prototype,"_arcadeTask",null),(0,r.Cg)([(0,o.MZ)()],h.prototype,"_featureUtils",void 0),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],h.prototype,"featureUtilsPromise",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],h.prototype,"calculatedExpressions",null),(0,r.Cg)([(0,o.MZ)()],h.prototype,"displayField",void 0),(0,r.Cg)([(0,o.MZ)()],h.prototype,"effectivePopupTemplate",void 0),(0,r.Cg)([(0,o.MZ)()],h.prototype,"expressionsUsedInTitle",null),(0,r.Cg)([(0,o.MZ)()],h.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,o.MZ)()],h.prototype,"fieldInfoMap",null),(0,r.Cg)([(0,o.MZ)()],h.prototype,"fields",void 0),(0,r.Cg)([(0,o.MZ)()],h.prototype,"objectIdField",void 0),(0,r.Cg)([(0,o.MZ)()],h.prototype,"requiredFields",null),h=(0,r.Cg)([(0,u.$)("esri.layers.support.TitleCreator")],h)},22671:(e,t,i)=>{i.d(t,{A:()=>_});var r,n=i(31635),s=i(52106),a=i(66552),l=i(25482),o=i(4718),u=i(10107),c=(i(44208),i(53966),i(36005)),d=i(64108),h=i(43937),p=i(16930),f=i(65864),y=i(50498),g=i(20437);const m=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=r=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,i,r){if(e)return void m.write(e,t,i,r);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void m.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,f.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=p.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,o.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,n]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((n-e)/i));for(let e=0,t=s.length;e<t;e++)a?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,n],scale:[s,a]}=i;let l=null,o=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;o=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,e=>e*s+r,e=>n-e*a,l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){const r=p.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],a=i.fromJSON(s),l=s.geometry?.spatialReference;null==a.geometry||l||(a.geometry.spatialReference=r);const o=s.aggregateGeometries,u=a.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],i=o[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}n.push(a)}return n}_quantizePoints(e,t,i){let r,n;const s=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===n||(s.push([e-r,a-n]),r=e,n=a)}else r=t(l[0]),n=i(l[1]),s.push([r,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&n.push(a)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,n){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let a,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,n=r.length;e<n;e++){const n=r[e];e>0?(a+=n[0],l+=n[1]):(a=n[0],l=n[1]),n[0]=t(a),n[1]=i(l)}}if(r&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=n(i[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=n(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let a,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(a+=r[0],l+=r[1]):(a=r[0],l=r[1]),r[0]=t(a),r[1]=i(l)}if(r&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=n(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n.Cg)([(0,c.w)("features")],_.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[g.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],_.prototype,"geometryType",void 0),(0,n.Cg)([(0,h.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,c.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n.Cg)([(0,h.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=r=(0,n.Cg)([(0,d.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(31635),n=i(69540),s=i(66552),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(64108));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let c=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"description",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"drawingTool",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"prototype",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"thumbnail",void 0),c=(0,r.Cg)([(0,o.$)("esri.layers.support.FeatureTemplate")],c)},30235:(e,t,i)=>{i.d(t,{A:()=>f});var r=i(52106),n=i(87449),s=i(11221),a=i(89169),l=i(33325),o=i(80609),u=i(39516),c=i(91075),d=i(68654),h=i(33143),p=i(20437);class f extends s.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type||this._layer.objectIdField===i.name)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return 0}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new r.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,n){let s="",l=!1;if(null!==r&&(s=r.constructClause(),l=!0),this.isTable()&&t&&null!==e&&""!==e)return new a.A([],[],!0,null);const c=this._createQuery();c.where=(0,u.mA)(c.where,null===i?null===t?"1=1":"":(0,o.YY)(i,0)),c.spatialRelationship=this._makeRelationshipEnum(e),c.outSpatialReference=this.spatialReference,c.orderByFields=""!==s?s.split(","):null,c.geometry=null===t?null:t,c.relationParameter=this._makeRelationshipParam(e);const d=await this._layer.queryFeatures(c);if(null===d)return new a.A([],[],l,null);this._checkCancelled(n);const h=[];return d.features.forEach(e=>{const t=e.attributes[this._layer.objectIdField];h.push(t),this._featureCache[t]=this._changeFeature(e)}),new a.A([],h,l,null)}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _queryAllFeatures(){if(this._wset)return this._wset;if(await this._ensureLoaded(),this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach(t=>{const i=t.attributes[this._layer.objectIdField];e.push(i),this._featureCache[i]=this._changeFeature(t)}),this._wset=new a.A([],e,!1,null),this._wset}const e=this._createQuery();e.where="1=1";const t=await this._layer.queryFeatures(e),i=[];return t.features.forEach(e=>{const t=e.attributes[this._layer.objectIdField];i.push(t),this._featureCache[t]=this._changeFeature(e)}),this._wset=new a.A([],i,!1,null),this._wset}async _getFeatures(e,t,i){const r=[];-1!==t&&void 0===this._featureCache[t]&&r.push(t);for(let n=e._lastFetchedIndex;n<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[n]]&&(e._known[n]!==t&&r.push(e._known[n]),r.length>i)));n++);if(0===r.length)return"success";throw new n.d("MissingFeatures")}async _refineSetBlock(e){return e}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const i in e)t[i]=e[i];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let i=e.layerDefinition.objectIdField;const r=e.layerDefinition.typeIdField??"",n=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)n.push(h.A.fromJSON(t));let s=e.layerDefinition.geometryType;void 0===s&&(s=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!i){let t=!1;for(const r of e.layerDefinition.fields)if("oid"===r.type||"esriFieldTypeOID"===r.type){i=r.name,t=!0;break}if(!1===t){let t="FID",r=!0,n=0;for(;r;){let i=!0;for(const r of e.layerDefinition.fields)if(r.name===t){i=!1;break}!0===i?r=!1:(n++,t="FID"+n.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const s=[];for(let i=0;i<a.length;i++)s.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),s[i].attributes[t]=i;a=s,i=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof p.A?o.push(t):o.push(p.A.fromJSON(t));let u=s;switch(u||(u=""),u){case"esriGeometryPoint":u="point";break;case"esriGeometryPolyline":u="polyline";break;case"esriGeometryPolygon":u="polygon";break;case"esriGeometryEnvelope":u="extent";break;case"esriGeometryMultipoint":u="multipoint";break;case"":case"esriGeometryNull":u="esriGeometryNull"}if("esriGeometryNull"!==u)for(const e of a)e.geometry&&e.geometry instanceof c.A==0&&(e.geometry.type=u,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const y={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:n,typeIdField:r,objectIdField:i,spatialReference:t},g="esriGeometryNull"===u||null===u;g||(y.geometryType=u);const m=new d.default(y);return e?.layerDefinition?.subtypeField&&e?.layerDefinition?.subtypes&&m.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new f({layer:m,spatialReference:t,isTable:g})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const i=await this._layer.queryFeatures(t);return 1===i.features.length?i.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return this._layer?.timeInfo}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return this.fsetInfo??{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},32730:(e,t,i)=>{i.d(t,{BI:()=>g,D3:()=>f,XJ:()=>y,lc:()=>p,mX:()=>_,rU:()=>m,tH:()=>S});var r=i(799);const n="__begin__",s="__end__",a=new RegExp(n,"ig"),l=new RegExp(s,"ig"),o=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),c='"',d=c+" + ",h=" + "+c;function p(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=p(e.labelExpression),t.type="conventional"),t}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function _(e){let t;return e?(t=(0,r.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=o.test(t)?t.replace(o,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(a,d).replaceAll(l,h)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,F=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,I=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=b.exec(e)||F.exec(e);return t?t[1]||t[3]:(t=I.exec(e),t?t[2]:null)}},32756:(e,t,i)=>{i.d(t,{Rr:()=>o,fY:()=>c,ne:()=>u});var r=i(31635),n=i(93637),s=i(10107),a=(i(44208),i(53966),i(87811),i(64108)),l=i(91880);function o(e,t,i){if(!e)return null;const r=e.find(e=>!!e.field);if(!r)return null;const n=new l.A;return n.read(r,i),[n]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:o},write:{writer:function(e,t,i,r){const s=e.find(e=>!!e.field);s&&(0,n.sM)(i,[s.toJSON()],t)}}}},c=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,r.Cg)([(0,s.MZ)(u)],i.prototype,"orderBy",void 0),i=(0,r.Cg)([(0,a.$)("esri.layers.mixins.OrderedLayer")],i),i}},33143:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(31635),n=i(69540),s=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),o=i(64108),u=i(43937),c=i(80451),d=i(29005);let h=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,c.rS)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"id",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"domains",void 0),(0,r.Cg)([(0,l.w)("domains")],h.prototype,"readDomains",null),(0,r.Cg)([(0,u.K)("domains")],h.prototype,"writeDomains",null),(0,r.Cg)([(0,a.MZ)({type:[d.A],json:{write:!0}})],h.prototype,"templates",void 0),h=(0,r.Cg)([(0,o.$)("esri.layers.support.FeatureType")],h)},35704:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(87449),n=i(11221),s=i(89169),a=i(33325),l=i(80609),o=i(74887),u=i(88368),c=i(16930);class d extends n.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof u.A?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new c.A({wkid:4326}),this.geometryType=a.ik.point)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("",null,this._whereclause,null,e);return this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new s.A(t._candidates.slice().concat(t._known.slice()),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new s.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent?._isInFeatureSet(e);return 1===t?t:(t=this._idstates[e],void 0===t?2:t)}_getFeature(e,t,i){return this._parent._getFeature(e,t,i)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction){const t=this._whereClauseFunction(e);return(0,o.$X)(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,i){const r=new s.A([],e,!1,null),n=Math.min(t,e.length);if(await(this._parent?._getFeatures(r,-1,n,i)),this._checkCancelled(i),null==this._whereClauseFunction){for(let t=0;t<n;t++){const i=this._parent?._featureFromCache(e[t]);!0===this.executeWhereClause(i)?this._idstates[e[t]]=0:this._idstates[e[t]]=1}return"success"}const a=[];for(let t=0;t<n;t++){const i=this._parent?._featureFromCache(e[t]);a.push(await this.executeWhereClauseDeferred(i))}for(let i=0;i<t;i++)!0===a[i]?this._idstates[e[i]]=0:this._idstates[e[i]]=1;return"success"}async _getFilteredSet(e,t,i,r,n){null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,l.kg)(this._whereclause,i)):i=this._whereclause),await this._ensureLoaded();const a=await this._parent._getFilteredSet(e,t,i,r,n);let o;return this._checkCancelled(n),o=null!==this._whereClauseFunction?new s.A(a._candidates.slice().concat(a._known.slice()),[],a._ordered,this._clonePageDefinition(a.pagesDefinition)):new s.A(a._candidates.slice(),a._known.slice(),a._ordered,this._clonePageDefinition(a.pagesDefinition)),o}async _stat(e,t,i,r,n,s,a){if(null!==this._whereClauseFunction)return null===n&&""===i&&null===r?this._manualStat(e,t,s,a):{calculated:!1};let o=this._whereclause;null!==n&&null!==this._whereclause&&(o=(0,l.kg)(this._whereclause,n));const u=await this._parent._stat(e,t,i,r,o,s,a);return!1===u.calculated?null===n&&""===i&&null===r?this._manualStat(e,t,s,a):{calculated:!1}:u}async _canDoAggregates(e,t,i,r,n){return null===this._whereClauseFunction&&(null!==n?null!==this._whereclause&&(n=(0,l.kg)(this._whereclause,n)):n=this._whereclause,null!==this._parent&&this._parent._canDoAggregates(e,t,i,r,n))}async _getAggregatePagesDataSourceDefinition(e,t,i,n,s,a,o){if(null===this._parent)throw new r.d("NeverReach");return null!==s?null!==this._whereclause&&(s=(0,l.kg)(this._whereclause,s)):s=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,n,s,a,o)}static registerAction(){n.A._featuresetFunctions.filter=function(e){if("function"==typeof e)return new d({parentfeatureset:this,whereclause:e});let t=null;return e instanceof u.A&&(t=e),new d({parentfeatureset:this,whereclause:t})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},36708:(e,t,i)=>{i.d(t,{C_:()=>h,OH:()=>y,Vh:()=>g,on:()=>d,pc:()=>m,wB:()=>o,z7:()=>u});var r=i(37955),n=i(36563),s=i(97768),a=i(74887),l=i(14012);function o(e,t,i={}){return c(e,t,i,p)}function u(e,t,i={}){return c(e,t,i,f)}function c(e,t,i={},r){let n=null;const a=i.once?(e,i)=>{r(e)&&((0,s.xt)(n),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(n=(0,l.Cn)(e,a,i.sync,i.equals),i.initial){const t=e();a(t,t)}return n}function d(e,t,i,a={}){let l=null,u=null,c=null;function d(){l&&u&&(u.remove(),a.onListenerRemove?.(l),l=null,u=null)}function h(e){a.once&&a.once&&(0,s.xt)(c),i(e)}const p=o(e,(e,i)=>{d(),(0,r.wb)(e)&&(l=e,u=(0,r.on)(e,t,h),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return c=(0,n.hA)(()=>{p.remove(),d()}),c}function h(e,t){return function(e,t,i){if((0,a.G4)(i))return Promise.reject((0,a.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function o(){l=(0,s.xt)(l)}return new Promise((r,s)=>{l=(0,n.vE)([(0,a.u7)(i,()=>{o(),s((0,a.NK)())}),c(e,e=>{o(),r(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(80559);const y={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},37352:(e,t,i)=>{i.d(t,{A:()=>u});var r,n=i(31635),s=i(7762),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(64108));let u=r=class extends a.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=r=(0,n.Cg)([(0,o.$)("esri.layers.support.LayerFloorInfo")],u)},37539:(e,t,i)=>{i.d(t,{pO:()=>y,jd:()=>h,Tp:()=>p,w5:()=>d});var r=i(34727),n=i(83047),s=i(73941),a=i(79258);Math.PI;const l=a.$O.radius,o=a.$O.eccentricitySquared,u={a1:l*o,a2:l*o*l*o,a3:l*o*o/2,a4:l*o*l*o*2.5,a5:l*o+l*o*o/2,a6:1-o};a.$O.radius,a.$O.flattening,a.Sw.radius,a.Sw.flattening,a.sH.radius,a.sH.flattening,a.sH.radius;var c=i(21325);const d={2:{5:y,7:null,9:null,10:y,1:S,6:null,8:null,0:null,3:m,11:_,2:y,4:x},5:{5:y,7:null,9:null,10:y,1:S,6:null,8:null,0:null,3:m,11:_,2:y,4:x},7:{5:null,7:y,9:null,10:y,1:null,6:I,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:y,10:y,1:null,6:null,8:F,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,i,r){const n=e[t]/N,s=L-2*Math.atan(Math.exp(-e[t+1]/N)),a=N+e[t+2],l=Math.cos(s)*a;i[r]=Math.cos(n)*l,i[r+1]=Math.sin(n)*l,i[r+2]=Math.sin(s)*a},6:null,8:null,0:null,3:y,11:function(e,t,i,r){g(e,t,i,r),_(i,r,i,r)},2:g,4:function(e,t,i,r){g(e,t,i,r),x(i,r,i,r)}},4:{5:R,7:null,9:null,10:R,1:function(e,t,i,r){R(e,t,i,r),S(i,r,i,r)},6:null,8:null,0:null,3:function(e,t,i,r){R(e,t,i,r),m(i,r,i,r)},11:function(e,t,i,r){R(e,t,i,r),_(i,r,i,r)},2:R,4:y},1:{5:C,7:null,9:null,10:C,1:y,6:null,8:null,0:null,3:function(e,t,i,r){C(e,t,i,r),m(i,r,i,r)},11:function(e,t,i,r){C(e,t,i,r),_(i,r,i,r)},2:C,4:function(e,t,i,r){C(e,t,i,r),x(i,r,i,r)}},6:{5:null,7:T,9:null,10:T,1:null,6:y,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:y,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:y,3:null,11:null,2:null,4:null},10:{5:y,7:y,9:y,10:y,1:S,6:I,8:F,0:null,3:m,11:_,2:y,4:x},11:{5:w,7:null,9:null,10:w,1:function(e,t,i,r){w(e,t,i,r),S(i,r,i,r)},6:null,8:null,0:null,3:function(e,t,i,r){w(e,t,i,r),m(i,r,i,r)},11:y,2:w,4:function(e,t,i,r){w(e,t,i,r),x(i,r,i,r)}}};function h(e,t){return p(e,t)?.projector}function p(e,t){if(null==e||null==t)return null;if(k.source.spatialReference===e&&k.dest.spatialReference===t)return k;const i=f(e,k.source),r=f(t,k.dest);return 0===i&&0===r?(0,c.aI)(e,t)?k.projector=y:k.projector=null:k.projector=d[i][r],k}function f(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function y(e,t,i,r){e!==i&&(i[r++]=e[t++],i[r++]=e[t++],i[r]=e[t])}function g(e,t,i,r){i[r]=M*(e[t]/N),i[r+1]=M*(L-2*Math.atan(Math.exp(-e[t+1]/N))),i[r+2]=e[t+2]}function m(e,t,i,n){!function(e,t,i,n,s){const a=.4999999*Math.PI,l=(0,r.qE)(D*e[t+1],-a,a),o=Math.sin(l);i[n++]=D*e[t]*s.radius,i[n++]=s.halfSemiMajorAxis*Math.log((1+o)/(1-o)),i[n]=e[t+2]}(e,t,i,n,a.$O)}function _(e,t,i,r){i[r]=e[t]*P,i[r+1]=e[t+1]*P,i[r+2]=e[t+2]}function w(e,t,i,r){i[r]=e[t]*E,i[r+1]=e[t+1]*E,i[r+2]=e[t+2]}function b(e,t,i,r,n){const s=n+e[t+2],a=D*e[t+1],l=D*e[t],o=Math.cos(a)*s;i[r]=Math.cos(l)*o,i[r+1]=Math.sin(l)*o,i[r+2]=Math.sin(a)*s}function F(e,t,i,r){b(e,t,i,r,a.Sw.radius)}function I(e,t,i,r){b(e,t,i,r,a.sH.radius)}function S(e,t,i,r){b(e,t,i,r,a.$O.radius)}function v(e,t,i,n,s){const a=e[t],l=e[t+1],o=e[t+2],u=Math.sqrt(a*a+l*l+o*o),c=(0,r.YN)(o/(0===u?1:u)),d=Math.atan2(l,a);i[n++]=M*d,i[n++]=M*c,i[n]=u-s}function A(e,t,i,r){v(e,t,i,r,a.Sw.radius)}function T(e,t,i,r){v(e,t,i,r,a.sH.radius)}function C(e,t,i,r){v(e,t,i,r,a.$O.radius)}function x(e,t,i,r){!function(e,t,i,r,n){const s=D*e[t],a=D*e[t+1],l=e[t+2],o=Math.sin(a),u=Math.cos(a),c=n.radius/Math.sqrt(1-n.eccentricitySquared*o*o);i[r++]=(c+l)*u*Math.cos(s),i[r++]=(c+l)*u*Math.sin(s),i[r++]=(c*(1-n.eccentricitySquared)+l)*o}(e,t,i,r,a.$O)}function R(e,t,i,r){const n=u,s=e[t],l=e[t+1],o=e[t+2];let c,d,h,p,f,y,g,m,_,w,b,F,I,S,v,A,T,C,x,R,k;c=Math.abs(o),d=s*s+l*l,h=Math.sqrt(d),p=d+o*o,f=Math.sqrt(p),R=Math.atan2(l,s),y=o*o/p,g=d/p,S=n.a2/f,v=n.a3-n.a4/f,g>.3?(m=c/f*(1+g*(n.a1+S+y*v)/f),x=Math.asin(m),w=m*m,_=Math.sqrt(1-w)):(_=h/f*(1-y*(n.a5-S-g*v)/f),x=Math.acos(_),w=1-_*_,m=Math.sqrt(w)),b=1-a.$O.eccentricitySquared*w,F=a.$O.radius/Math.sqrt(b),I=n.a6*F,S=h-F*_,v=c-I*m,T=_*S+m*v,A=_*v-m*S,C=A/(I/b+T),x+=C,k=T+A*C/2,o<0&&(x=-x),i[r++]=M*R,i[r++]=M*x,i[r]=k}const k={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:y},D=(0,r.kU)(1),M=(0,r.KJ)(1),L=.5*Math.PI,N=a.$O.radius,P=N*Math.PI/180,E=180/(N*Math.PI)},40334:(e,t,i)=>{i.r(t),i.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>re,constructFeatureSet:()=>te,constructFeatureSetFromPortalItem:()=>ce,constructFeatureSetFromRelationship:()=>ne,constructFeatureSetFromUrl:()=>ee,convertToFeatureSet:()=>ue,createFeatureSetCollectionFromMap:()=>le,createFeatureSetCollectionFromService:()=>oe,initialiseMetaDataCache:()=>H});var r=i(78888);class n{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,i){this._layerById[t]=i,this._layerByName[e]=i}async featureSetByName(e,t=!0,i=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,i=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}var s=i(78878),a=i(35704),l=i(52106),o=i(59534),u=i(68423),c=i(86691),d=i(87449),h=i(11221),p=i(89169),f=i(87594),y=i(33325),g=i(80609),m=i(1262),_=i(88368);class w{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new w;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i,r){const n=new w;n.field=e;const s=_.A.create(t,{fieldsIndex:i,timeZone:r}),a=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new m.L("MissingStatisticParameters");const t=_.A.create((0,g.Mi)(e.parseTree.args.value[0],0,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(s);if(null===a)throw new m.L("UnsupportedSqlFunction",{function:""});const l=a.name.toUpperCase().trim();if("MIN"===l){if(n.typeofstat="MIN",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"min"})}else if("MAX"===l){if(n.typeofstat="MAX",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"max"})}else if("COUNT"===l)n.typeofstat="COUNT",n.workingexpr=a.expr;else if("STDEV"===l){if(n.typeofstat="STDDEV",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"stdev"})}else if("SUM"===l){if(n.typeofstat="SUM",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"sum"})}else if("MEAN"===l){if(n.typeofstat="AVG",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:l})}else if("AVG"===l){if(n.typeofstat="AVG",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"avg"})}else{if("VAR"!==l)throw new m.L("UnsupportedSqlFunction",{function:l});if(n.typeofstat="VAR",n.workingexpr=a.expr,null===s)throw new m.L("InvalidFunctionParameters",{function:"var"})}return n}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var b=i(80200),F=i(74639),I=i(44729),S=i(55612),v=i(15032),A=i(16930),T=i(20437),C=i(95466);const x=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class R extends h.A{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return 0}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const r=this._parent?this._parent.getFieldsIndex():new C.A([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const e of this._config.statsfields){const t=new w;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof _.A?e.expression:_.A.create(e.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),t.typeofstat=x.lookup(e.statistic)??"COUNT",this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof _.A?e.expression:_.A.create(e.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField=""}else this.geometryType=y.ik.point,this.typeIdField="",this.types=null,this.subtypes=null,this.subtypeField="",this.spatialReference=new A.A({wkid:4326});this.fields=[];const n=new w;n.field=this._nextUniqueName(e),n.tofieldname=this.objectIdField,n.workingexpr=_.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),n.typeofstat="MIN",this._decodedStatsfield.push(n);for(const t of this._decodedGroupbyfield){const i=new T.A;if(t.name=this._nextUniqueName(e),i.name=t.tofieldname,i.alias=i.name,(0,g.DA)(t.expression)){const e=this._parent.getField((0,g.YY)(t.expression,0));if(!e)throw new d.d("AggregationFieldNotFound");t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),i.type=e.type,t.sqlType=e.type}else{i.type=this._convertToEsriFieldType((0,g.IY)(t.expression,this._parent.fields));const e=new T.A;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new u.Gr(e,t.expression)),this._candosimplegroupby=!1,t.sqlType=i.type}this.fields.push(i)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new u.IO(e));for(let t=0;t<this._decodedStatsfield.length;t++){const i=new T.A;let r=null;const n=this._decodedStatsfield[t];n.field=this._nextUniqueName(e),n.tofieldname===this.objectIdField&&(this._internalObjectIdField=n.field),i.name=n.tofieldname,i.alias=i.name;const s=null!==n.workingexpr&&(0,g.DA)(n.workingexpr)?(0,g.YY)(n.workingexpr,0):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==s){if(r=this._parent.getField(s),!r)throw new d.d("AggregationFieldNotFound");i.type=r.type}else i.type="double";break;case"MIN":case"MAX":if(""!==s){if(r=this._parent.getField(s),!r)throw new d.d("AggregationFieldNotFound");i.type=r.type}else i.type="double";break;case"COUNT":i.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==s&&(r=this._parent.getField(s),!r))throw new d.d("AggregationFieldNotFound");i.type="double"}this.fields.push(i)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,i,r){-1!==t&&this._featureCache[t];const n=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,n)?(await this._expandPagedSet(e,n,0,0,r),this._getFeatures(e,t,i,r)):"success"}async _getFilteredSet(e,t,i,r,n){if(""!==e)return new p.A([],[],!0,null);let s=null;const l={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==i)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,g.Ju)(i,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,i=null;break}if(null!==r){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===r.scanForField(this._decodedStatsfield[e].tofieldname)){r=null,l.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,l.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;r&&(t=this._reformulateOrderClauseWithoutGroupByFields(r));const a=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(n),s=!0===l.nowhereclause?new p.A(a._candidates.slice().concat(a._known.slice()),[],!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)):new p.A(a._candidates.slice(),a._known.slice(),!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)),s}let o=this._parent;if(this._adaptedFields.length>0&&(o=new u.a({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)s=new p.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:o,orderbyclause:new f.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=o;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a.A({parentfeatureset:e,whereclause:t})}s=new p.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:e,orderbyclause:new f.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return s}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,g.bD)(e,t.tofieldname,(0,g.YY)(t.workingexpr,0),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,g.bD)(e,t.tofieldname,(0,g.YY)(t.expression,0),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,i){return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?(await this._expandPagedSet(e,this._maxQuery,0,0,i),this._refineSetBlock(e,t,i)):(this._checkCancelled(i),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,e)}_expandPagedSet(e,t,i,r,n){return this._expandPagedSetFeatureSet(e,t,i,r,n)}async _getPhysicalPage(e,t,i){if(!0===e.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,i,[]);const r=await this._getAgregagtePhysicalPage(e,t,i);for(const e of r){const t={geometry:e.geometry,attributes:{}},i={};for(const t in e.attributes)i[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=i[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=i[e.field.toLowerCase()];this._featureCache[t.attributes[this.objectIdField]]=new l.A(t)}return r.length}_sequentialGetPhysicalItem(e,t,i,r){return new Promise((n,s)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?n(r.length):this._nextAggregateItem(e,t,i,r,s=>{null===s?n(r.length):(t-=1,n(this._sequentialGetPhysicalItem(e,t,i,r)))},s)})}_nextAggregateItem(e,t,i,r,n,a){try{(0,s.a2)(e.pagesDefinition.internal.iterator.next()).then(s=>{if(null===s)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);r.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,n(null)}else e.pagesDefinition.internal.fullyResolved=!0,n(null);else{const l=this._generateAggregateHash(s);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[s],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const i=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return r.push(i),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(i.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[s],id:l},void n(i)}e.pagesDefinition.internal.workingItem.features.push(s)}this._nextAggregateItem(e,t,i,r,n,a)}},a)}catch(e){a(e)}}_calculateFieldStat(e,t,i){const r=[];for(const i of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(i);null!==e&&(e instanceof I.n||e instanceof v.k?r.push(e.toNumber()):e instanceof S.g?r.push(e.toMilliseconds()):r.push(e))}else r.push(null);i.attributes[t.tofieldname]=(0,F.s)(t.typeofstat,[r])}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.features[0].attributes[i.singlefield]:_.A.convertValueToStorageFormat(i.expression.calculateValue(e.features[0]),i.sqlType);t.attributes[i.tofieldname]=r}for(const i of this._decodedStatsfield)this._calculateFieldStat(e,i,t);const i=[];for(let r=0;r<this._decodedStatsfield.length;r++)i.push(this._calculateFieldStat(e,this._decodedStatsfield[r],t));return this._featureCache[t.attributes[this.objectIdField]]=new l.A({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,b.d)(t,b.T.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){h.A._featuresetFunctions.groupby=function(e,t){return new R({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var k=i(54784),D=i(54461),M=i(70333),L=i(61454),N=i(66395),P=i(50145),E=i(4576),O=i(39516),j=i(65864),G=i(21325),Z=i(68654),q=i(54546),U=i(61956),B=i(7562);class W extends h.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,y.JB)(e.toJSON());return(0,b.d)(t,b.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}_isInFeatureSet(){return 0}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new U.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const i="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let r=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);r=this.recentlyUsedQueries.getFromCache(t),null===r&&(r=i(e),this.recentlyUsedQueries.addToCache(t,r),r=r.catch(e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e}))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===r&&(r=i(e)),r}async _getFilteredSet(e,t,i,r,n){const s=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e)return new p.A([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,n);let a="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=this._createQuery();o.where=(0,O.mA)(o.where,null===i?null===t?"1=1":"":(0,g.YY)(i,s)),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e);let u=await this.executeQuery(o,"executeForIds");return null===u&&(u=[]),this._checkCancelled(n),new p.A([],u,l,null)}_expandPagedSet(e,t,i,r,n){return this._expandPagedSetFeatureSet(e,t,i,r,n)}async _getFilteredSetUsingPaging(e,t,i,r,n){let s="",a=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(s=r.constructClause(),a=!0);const l=await this.databaseType(),o=null===i?null===t?"1=1":"":(0,g.YY)(i,l);let u=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<u&&(u=c);let d=null;if(!0===this._pageJustIds)d=new p.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:s,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const r=this._overrideFields??this._fieldsIncludingObjectId(["*"]);d=new p.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:s,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(d,u,0,1,n),d}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,n=r,s=e.pagesDefinition.internal.lastPage,a=this._createQuery();a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields.split(","),a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.geometry=e.pagesDefinition.geometry,a.where=(0,O.mA)(a.where,e.pagesDefinition.where),a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==s)return"done";const o=this._layer.objectIdField;for(let t=0;t<l.features.length;t++)e.pagesDefinition.internal.set[n+t]=l.features[t].attributes[o];if(!1===this._pageJustIds)for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFeatures(e,t,i,r){const n=[];if(-1!==t&&void 0===this._featureCache[t]&&n.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,r),this._getFeatures(e,t,i,r);let s=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if(e._lastFetchedIndex+=1,s++,void 0===this._featureCache[e._known[r]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[r]]){const n=t._featureMap[e._known[r]];null!==n&&(i=!0,this._featureCache[e._known[r]]=n)}}if(!1===i&&(e._known[r]!==t&&n.push(e._known[r]),n.length>=this._maxProcessingRate()-1))break}if(s>=i&&0===n.length)break}if(0===n.length)return"success";const a=this._createQuery();a.objectIds=n,a.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),a.returnGeometry=!0,!0===this._removeGeometry&&(a.returnGeometry=!1),a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(r),void 0!==l.error)throw new d.d("RequestFailed",{reason:l.error});const o=this._layer.objectIdField;for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return"success"}async _getDistinctPages(e,t,i,r,n,s,a,l,o){await this._ensureLoaded();const u=await this.databaseType();let c=i.parseTree.column;const h=this._layer.fields??[];for(let e=0;e<h.length;e++)if(h[e].name.toLowerCase()===c.toLowerCase()){c=h[e].name;break}const p=this._createQuery();p.where=(0,O.mA)(p.where,null===s?null===n?"1=1":"":(0,g.YY)(s,u)),p.spatialRelationship=this._makeRelationshipEnum(r),p.relationParameter=this._makeRelationshipParam(r),p.geometry=null===n?null:n,p.returnDistinctValues=!0,p.returnGeometry=!1,p.outFields=[c];const f=await this.executeQuery(p,"execute");if(this._checkCancelled(o),!f.hasOwnProperty("features"))throw new d.d("InvalidStatResponse");let y=!1;for(let e=0;e<h.length;e++)if(h[e].name===c){"date"===h[e].type&&(y=!0);break}for(let e=0;e<f.features.length;e++){if(y){const t=f.features[e].attributes[c];null!==t?l.push(new Date(t)):l.push(t)}else l.push(f.features[e].attributes[c]);if(l.length>=a)break}return 0===f.features.length?l:f.features.length===this._layer.capabilities?.query.maxRecordCount&&l.length<a?{calculated:!0,result:await this._getDistinctPages(e+f.features.length,t,i,r,n,s,a,l,o)}:l}async _distinctStat(e,t,i,r,n,s,a){return{calculated:!0,result:await this._getDistinctPages(0,e,t,i,r,n,s,[],a)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,i,r){const n=await this.databaseType();if(this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};const s=this._createQuery();return s.where=(0,O.mA)(s.where,null===r?null===i?"1=1":"":(0,g.YY)(r,n)),s.spatialRelationship=this._makeRelationshipEnum(t),s.relationParameter=this._makeRelationshipParam(t),s.geometry=null===i?null:i,s.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(s,"executeForCount")}}async _stats(e,t,i,r,n,s,a){await this._ensureLoaded();const l=this._layer.capabilities?.query,o=!!l?.supportsSqlExpression,u=!!l?.supportsStatistics,c=!!l?.supportsDistinct;if("count"===e)return c?this._countstat(e,i,r,n):{calculated:!1};if(!1===u||!1===(0,g.DA)(t)&&!1===o||!1===t.isStandardized)return""!==i||null!==n?{calculated:!1}:this._manualStat(e,t,s,a);if("distinct"===e)return!1===c?""!==i||null!==n?{calculated:!1}:this._manualStat(e,t,s,a):this._distinctStat(e,t,i,r,n,s,a);const h=await this.databaseType();if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const p=this._createQuery();p.where=(0,O.mA)(p.where,null===n?null===r?"1=1":"":(0,g.YY)(n,h)),p.spatialRelationship=this._makeRelationshipEnum(i),p.relationParameter=this._makeRelationshipParam(i),p.geometry=null===r?null:r;const f=new B.A;f.statisticType=(0,P.Dp)(e),f.onStatisticField=(0,g.YY)(t,h),f.outStatisticFieldName="ARCADE_STAT_RESULT",p.returnGeometry=!1;let y="ARCADE_STAT_RESULT";p.outStatistics=[f];const m=await this.executeQuery(p,"execute");if(!m.hasOwnProperty("features")||0===m.features.length)throw new d.d("InvalidStatResponse");let _=!1;const w=m.fields??[];for(let e=0;e<w.length;e++)if("ARCADE_STAT_RESULT"===w[e].name.toUpperCase()){y=w[e].name,"date"===w[e].type&&(_=!0);break}if(_){let e=m.features[0].attributes[y];return null!==e&&(e=new Date(m.features[0].attributes[y])),{calculated:!0,result:e}}return{calculated:!0,result:m.features[0].attributes[y]}}_stat(e,t,i,r,n,s,a){return this._stats(e,t,i,r,n,s,a)}async _canDoAggregates(e,t){await this._ensureLoaded();let i=!1;const r=this._layer.capabilities?.query,n=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(i=!0),i)for(let e=0;e<t.length-1;e++)(!1===t[e].workingexpr?.isStandardized||!1===(0,g.DA)(t[e].workingexpr)&&!1===n)&&(i=!1);return!1!==i}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,i,r,n,s,a){await this._ensureLoaded();const l=await this.databaseType();let o=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const t=this.getFieldsIndex();o={keyFields:e.map((e,i)=>({name:t.normalizeFieldName(e)??e,asc:null==s||1===s._directions[i]}))}}let u="",c=!1;null!=s&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==o||(0,E.MJ)(e,0,e.length,s._fields,0,Math.min(s._fields.length,e.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(u=s.constructClause(),c=!0),""===u&&(u=e.join(","));const d=[];for(let e=0;e<t.length;e++){const i=new B.A;i.onStatisticField=null!==t[e].workingexpr?(0,g.YY)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),d.push(i)}let h=this._maxQueryRate();const f=this._layer.capabilities?.query.maxRecordCount;null!=f&&f<h&&(h=f);const y=null===n?null===r?"1=1":"":(0,g.YY)(n,l);return new p.A([],["GETPAGES"],c,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:!1,generatedOid:a,resultRecordCount:h,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:d,geometry:null===r?null:r,where:y,orderByFields:u,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1,keysetPagination:o}})}async _getAgregagtePhysicalPage(e,t,i){let r=e.pagesDefinition.where;if(!0===e.pagesDefinition.useOIDpagination&&(r=(0,O.mA)(r,e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString())),null!=e.pagesDefinition.internal.keysetPagination?.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new d.d("NotImplemented");r=(0,O.mA)(r,(0,g.YY)(e.pagesDefinition.internal.keysetPagination.clause,await this.databaseType()))}const n=e.pagesDefinition.internal.lastRetrieved,s=n,a=e.pagesDefinition.internal.lastPage,o=this._createQuery();if(o.where=(0,O.mA)(o.where,r),o.spatialRelationship=e.pagesDefinition.spatialRel,o.relationParameter=e.pagesDefinition.relationParam,o.outFields=e.pagesDefinition.outFields,o.outStatistics=e.pagesDefinition.outStatistics,o.geometry=e.pagesDefinition.geometry,o.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,o.num=e.pagesDefinition.resultRecordCount,o.start=e.pagesDefinition.internal.lastPage,o.returnGeometry=e.pagesDefinition.returnGeometry,o.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(i),!u.hasOwnProperty("features"))throw new d.d("InvalidStatResponse");const c=[];if(e.pagesDefinition.internal.lastPage!==a)return[];u.features.length>0&&void 0===u.features[0].attributes[e.pagesDefinition.generatedOid]&&(e.pagesDefinition.generatedOid=e.pagesDefinition.generatedOid.toLowerCase());for(let t=0;t<u.features.length;t++)e.pagesDefinition.internal.set[s+t]=u.features[t].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<u.features.length;e++)c.push(new l.A({attributes:u.features[e].attributes,geometry:null}));return e.pagesDefinition.internal.keysetPagination?0!==u.features.length&&u.exceededTransferLimit?function(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new d.d("NeverReach");const t=[];for(let i=0;i<e.length;i++){const r=e[i],n=[`"${r.name.replaceAll('"','""')}" ${r.asc?">":"<"} @last_${i}`];for(let t=0;t<i;t++){const i=e[t];n.push(`"${i.name.replaceAll('"','""')}" = @last_${t}`)}t.push(n.join(" AND "))}const i=t.join(" OR ");return _.A.create(i)}(e.keyFields));for(let i=0;i<e.keyFields.length;i++){const r=e.keyFields[i].name;e.clause.parameters[`last_${i}`]=t.attributes[r]}}(e.pagesDefinition.internal.keysetPagination,c.at(-1)):e.pagesDefinition.internal.fullyResolved=!0:!0===e.pagesDefinition.useOIDpagination?0===u.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==e.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=n+u.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,c}static create(e,t,i,r,n){const s=new Z.default({url:e,outFields:null===t?["*"]:t});return new W({layer:s,spatialReference:i,lrucache:r,interceptor:n})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,y.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,i,r,n){const s=this._layer;if(function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(s)){const a={objectIds:[e],returnMetadata:n};(t&&t>0||i&&i>0)&&(a.size=[t&&t>0?t:0,i&&i>0?i:t+1]),r&&r.length>0&&(a.attachmentTypes=r),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:s,query:a,method:"attachments"});const l=await s.queryAttachments(new q.A(a)),o=[];return l&&l[e]&&l[e].forEach(t=>{const i=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let r=null;n&&t.exifInfo&&(r=N.A.convertJsonToArcade(t.exifInfo,"system",!0)),o.push(new L.A(t.id,t.name,t.contentType,t.size,i,r,t.keywords??null))}),o}return[]}async queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields?.join(","),returnGeometry:e.returnGeometry.toString()};void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds&&e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=(0,G.YX)(e.outSpatialReference)),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const i=await(0,r.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(i.data){const e={},t=i.data;if(t?.relatedRecordGroups){const i=t.spatialReference;for(const r of t.relatedRecordGroups){const n=r.objectId,s=[];for(const e of r.relatedRecords){e.geometry&&(e.geometry.spatialReference=i);const t=new l.A({geometry:e.geometry?(0,j.rS)(e.geometry):null,attributes:e.attributes});s.push(t)}e[n]={features:s,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new d.d("InvalidRequest")}async getFeatureByObjectId(e,t){const i=this._createQuery();i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=(0,O.mA)(i.where,this.objectIdField+"="+e.toString()),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const r=await this._layer.queryFeatures(i);return 1===r.features.length?r.features[0]:null}async getIdentityUser(){await this.load();const e=M.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=M.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const i=t.toLowerCase().indexOf("/rest/services");if(t=i>-1?t.slice(0,i):t,t){t+="/rest/info";try{const e=await(0,r.A)(t,{query:{f:"json"}});let i="";return e.data?.owningSystemUrl&&(i=e.data.owningSystemUrl),i}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new W({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this.fsetInfo)return this.fsetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const i=this._layer.parsedUrl?.path??null;if(i){const n=await(0,r.A)(i,{responseType:"json",query:{f:"json"}});e=n?.data?.name??null,t=n?.data?.serviceItemId??null}const n=this._layer.title&&null!==(this._layer.parent??null);return this.featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===i?null:i,webMapLayerId:n?this._layer.id??null:null,webMapLayerTitle:n?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}var V=i(30235),$=i(26591);class Q extends h.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}_isInFeatureSet(){return 0}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new l.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,n){if(await this.databaseType(),this.isTable()&&t&&null!==e&&""!==e)return new p.A([],[],!0,null);const s=this._layer.nativeCapabilities();if(!1===s.canQueryRelated)return new p.A([],[],!0,null);if(s.capabilities?.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,r,n);let a="",l=!1;null!==r&&!0===s.capabilities?.queryRelated.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new $.default;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let c=!0;!0===this._removeGeometry&&(c=!1),o.returnGeometry=c,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null;const d=await s.source.queryRelatedFeatures(o);this._checkCancelled(n);const h=d[this._findObjectId]?d[this._findObjectId].features:[],f=[];for(let e=0;e<h.length;e++)this._featureCache[h[e].attributes[this._relatedLayer.objectIdField]]=h[e],f.push(h[e].attributes[this._relatedLayer.objectIdField]);const y=t&&null!==e&&""!==e,g=null!=i;return new p.A(y||g?f:[],y||g?[]:f,l,null)}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFilteredSetUsingPaging(e,t,i,r,n){let s="",a=!1;const l=this._layer.nativeCapabilities();null!==r&&!0===l.capabilities?.queryRelated.supportsOrderBy&&(s=r.constructClause(),a=!0),await this.databaseType();let o=this._maxQueryRate();const u=l.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const c=t&&null!==e&&""!==e,d=null!=i;let h=null,f=!0;!0===this._removeGeometry&&(f=!1);const y=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]);return h=new p.A(c||d?["GETPAGES"]:[],c||d?[]:["GETPAGES"],a,{outFields:y.join(","),resultRecordCount:o,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:s,returnGeometry:f,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(h,o,0,0,n),h}_expandPagedSet(e,t,i,r,n){return this._expandPagedSetFeatureSet(e,t,i,r,n)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,n=r,s=e.pagesDefinition.internal.lastPage,a=this._layer.nativeCapabilities(),l=new $.default;!0===this._requestStandardised&&(l.sqlFormat="standard"),l.relationshipId=this.relationship.id,l.objectIds=e.pagesDefinition.objectIds,l.resultOffset=e.pagesDefinition.internal.lastPage,l.resultRecordCount=e.pagesDefinition.resultRecordCount,l.outFields=e.pagesDefinition.outFields.split(","),l.where=e.pagesDefinition.where,l.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,l.returnGeometry=e.pagesDefinition.returnGeometry,l.outSpatialReference=this.spatialReference;const o=await a.source.queryRelatedFeatures(l);if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==s)return 0;const u=o[this._findObjectId]?o[this._findObjectId].features:[];for(let t=0;t<u.length;t++)e.pagesDefinition.internal.set[n+t]=u[t].attributes[this._relatedLayer.objectIdField];for(let e=0;e<u.length;e++)this._featureCache[u[e].attributes[this._relatedLayer.objectIdField]]=u[e];const c=!o[this._findObjectId]||!1===o[this._findObjectId].exceededTransferLimit;return u.length!==e.pagesDefinition.resultRecordCount&&c&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+u.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,u.length}async _getFeatures(e,t,i,r){const n=[];-1!==t&&void 0===this._featureCache[t]&&n.push(t);const s=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,s))return await this._expandPagedSet(e,s,0,0,r),this._getFeatures(e,t,i,r);let a=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(a++,a<=i&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[r]&&void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&n.push(e._known[r]),n.length>i)))&&!(a>=i&&0===n.length);r++);if(0===n.length)return"success";throw new d.d("MissingFeatures")}async _refineSetBlock(e,t,i){return e}async _stat(e,t,i,r,n,s,a){return{calculated:!1}}get gdbVersion(){return this._relatedLayer.gdbVersion}async _canDoAggregates(e,t,i,r,n){return!1}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,i,r,n){return this._relatedLayer.queryAttachments(e,t,i,r,n)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}async getFeatureSetInfo(){return this.fsetInfo??this._layer.featureSetInfo}}var z=i(23732),J=i(92474),Y=i(4146),K=i(80812);function H(){null===z.A.applicationCache&&(z.A.applicationCache=new z.A)}async function X(e,t,i){if(z.A.applicationCache){const i=z.A.applicationCache.getLayerInfo(e);if(i){const r=await i;return new Z.default({url:e,outFields:t,sourceJSON:r})}const r=new Z.default({url:e,outFields:t}),n=(async()=>(await r.load(),r.sourceJSON))();if(z.A.applicationCache){z.A.applicationCache.setLayerInfo(e,n);try{return await n,r}catch(t){throw z.A.applicationCache.clearLayerInfo(e),t}}return await n,r}if(null!=i){const r=i.getCachedLayerMetadata(e);if(r){const i=await r;return new Z.default({url:e,outFields:t,sourceJSON:i})}const n=new Z.default({url:e,outFields:t}),s=(async()=>(await n.load(),n.sourceJSON))();i.setCachedLayerMetadata(e,s);try{return await s,n}catch(t){throw i.removeCachedLayerMetadata(e,s),t}}return new Z.default({url:e,outFields:t})}async function ee(e,t,i,r,n,s=null){return te(await X(e,["*"],n),t,i,r,n,s)}function te(e,t=null,i=null,r=!0,n=null,s=null){switch(e.type){case"catalog-footprint":return te(e.parent,t,i,r,n,s);case"subtype-sublayer":{const a=te(e.parent,t,i,r,n,s);return a.filter(_.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:a.dateFieldsTimeZoneDefaultUTC}))}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new V.A({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:n,interceptor:s});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const a={layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:n,interceptor:s};return!e.url&&e.source?new V.A(a):new W(a)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function ie(e,t){if(null!==z.A.applicationCache){const t=z.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const i=t.getCachedServiceMetadata(e);if(null!=i)return i}const i=(async()=>{const t=await(0,r.A)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==z.A.applicationCache){z.A.applicationCache.setLayerInfo(e,i);try{return await i}catch(t){throw z.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,i);try{return await i}catch(r){throw t.removeCachedServiceMetadata(e,i),r}}return i}async function re(e,t,i){const n={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},s=await ie(e,null);if(n.metadata=s,void 0!==s.controllerDatasetLayers?.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)n.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)n.layerNameLkp[e.id]=e.name;const a=s.controllerDatasetLayers.utilityNetworkLayerId;n.networkId=a;const l=await async function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==z.A.applicationCache){const e=z.A.applicationCache.getLayerInfo(i);if(null!==e)return e}const n=(async()=>{const i=await(0,r.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(i.data){const e=i.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new d.d("DataElementsNotFound")})();if(null!==z.A.applicationCache){z.A.applicationCache.setLayerInfo(i,n);try{return await n}catch(e){throw z.A.applicationCache.clearLayerInfo(i),e}}return n}(e,a);if(l){n.queryelem=l,n.queryelem?.dataElement&&void 0!==n.queryelem.dataElement.schemaGeneration&&(n.unVersion=n.queryelem.dataElement.schemaGeneration),n.lkp={},n.queryelem.dataElement.domainNetworks||(n.queryelem.dataElement.domainNetworks=[]);for(const e of n.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}}if(n.queryelem.dataElement.terminalConfigurations)for(const e of n.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)n.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==z.A.applicationCache){const t=z.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,r.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==z.A.applicationCache){z.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw z.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+a);if(void 0!==s.systemLayers?.associationsTableId&&null!==s.systemLayers.associationsTableId){let r=null;if(i&&n.unVersion<8){const i=[];n.unVersion>=4&&(i.push("STATUS"),i.push("PERCENTALONG")),r=await ee(e+"/"+s.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...i],!1,null,null),await r.load(),n.unVersion>=4&&(r=r.filter(_.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC})),await r.load())}return{lkp:n.lkp,associations:r,unVersion:n.unVersion,terminals:n.terminals,layerIdLookup:n.layerIdLookup,sourceIdLookup:n.sourceIdLookup}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function ne(e,t,i,r=null,n=null,s=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o=o.endsWith("/")?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await ee(o,r,n,s,a,l);return new Q({layer:e,relatedLayer:u,relationship:t,objectId:i,spatialReference:r,outFields:n,includeGeometry:s,lrucache:a,interceptor:l})}a.A.registerAction(),R.registerAction(),c.A.registerAction(),k.A.registerAction(),D.A.registerAction();class se extends n{constructor(e,t=null,i=null,r=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=i,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const r=te(e,this._overrideSpatialReference,null===i?["*"]:i,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async featureSetByName(e,t=!0,i=null){if((0,J.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,i);null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const n=this._instantLayers[i];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===r)return this._instantLayers[i].featureset}const n=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=n)return this._makeAndAddFeatureSet(n,t,i);if(this._map.allTables){const r=this._map.allTables.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){if((0,J.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,i);null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const n=this._instantLayers[i];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===r)return this._instantLayers[i].featureset}const n=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.id===e);if(n)return this._makeAndAddFeatureSet(n,t,i);if(this._map.allTables){const r=this._map.allTables.find(t=>(0,y.eB)(t)&&t.id===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,i)}return null}}class ae extends n{constructor(e,t=null,i=null,r=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=i,this._interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,i=null){const r=te(e,this._overrideSpatialReference,null===i?["*"]:i,t,this._lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async _loadMetaData(){const e=await ie(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new ae(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,i=null){null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const n=this._instantLayers[i];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===r)return this._instantLayers[i].featureset}const n=await this._loadMetaData();let s=null;for(const t of n.layers??[])t.name===e&&(s=t);if(!s)for(const t of n.tables??[])t.name===e&&(s=t);if(s){const e=await X(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);e=null!=e?e.toString():"";for(let i=0;i<this._instantLayers.length;i++){const n=this._instantLayers[i];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===r)return this._instantLayers[i].featureset}const n=await this._loadMetaData();let s=null;for(const t of n.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of n.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(s){const e=await X(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,i)}return null}}function le(e,t,i=null,r=null){return new se(e,t,i,r)}function oe(e,t,i=null,r=null){return new ae(e,t,i,r)}function ue(e,t,i,r,n){if(null===e)return null;if((0,s.m)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof Y.A&&(0,y.NI)(e)){const s=e;switch(t){case"datasource":return te(s,n,"outFields"in s?s.outFields:null,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return te(s,n,"outFields"in s?s.outFields:null,!0,i,r)}return null}if((0,s.a1)(e)){switch(t){case"datasource":return te(e.parent,n,e.parent.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return te(e,n,e.parent.outFields,!0,i,r)}return null}return null}async function ce(e,t,i,r,n,s,a,l=null){if(z.A.applicationCache){const o=z.A.applicationCache.getLayerInfo(e+":"+s.url);if(o)return de(await o,t,i,r,n,a,l)}if(null!=a){const o=a.getCachedPortalItem(s.url,e);if(null!=o)return await de(await o,t,i,r,n,a,l)}const o=new K.default({id:e,portal:s}).load();z.A.applicationCache?z.A.applicationCache.setLayerInfo(e+":"+s.url,o):null!=a&&a.setCachedPortalItem(s.url,e,o);try{return await de(await o,t,i,r,n,a,l)}catch(t){throw z.A.applicationCache&&z.A.applicationCache.clearLayerInfo(e+":"+s.url),null!=a&&a.removeCachedPortalItem(s.url,e,o),t}}async function de(e,t,i,r,n,s,a){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await X((0,y.Qi)(e.url??"")+"/"+t,["*"],s);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=s){const t=s.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=Y.A.fromPortalItem(e);s.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(i){throw s.removeCachedPortalItemLayer(e.portal.url,e.id,t),i}}}else l=await Y.A.fromPortalItem(e)}return te(l,i,r,n,s,a)}},41366:(e,t,i)=>{i.d(t,{K:()=>h,Q:()=>u});var r=i(31635),n=i(66552),s=i(53966),a=i(10107),l=(i(44208),i(87811),i(93223)),o=i(64108);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&d||i&&c||null,t&&i&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,l.e)(u,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,r.Cg)([(0,o.$)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},41560:(e,t,i)=>{i.d(t,{Ch:()=>a,mW:()=>s});var r=i(34727),n=i(39516);function s(e,t){return{...t,filterMode:e.mode}}function a(e,t,i){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:i,maxScale:r}of e.filters)t[0]=Math.max(t[0],c(i)),t[1]=Math.min(t[1],d(r));return t}(e);if(s&&((0,r.gg)(t,s[0])||(0,r.ZH)(i,s[1])))return"";const a=Array.from(l(e,t,i)),o=function(e,t,i){if(0===e.length)return!0;const n=c(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,r.ZH)(n,t)||(0,r.gg)(s,i))return!0;for(let t=0;t<e.length-1;t++){const i=e[t],n=e[t+1];if((0,r.ZH)(c(n.minScale),d(i.maxScale)))return!0}return!1}(a,t,i)?"1=1":a.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,i){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const r of e.filters)o(r.minScale,r.maxScale,t,i)&&(yield r)}}function o(e,t,i,n){return e=c(e),i=c(i),t=d(t),!(!(0,r.Sp)(i,e)&&(n??i)>e||(0,r.Hx)(t,i)||void 0!==n&&(0,r.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45067:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(31635),n=i(69540),s=i(66552),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(64108));const u=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),c=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,r.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"cardinality",void 0),(0,r.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:c.read,write:c.write}})],d.prototype,"role",void 0),d=(0,r.Cg)([(0,o.$)("esri.layers.support.Relationship")],d)},46140:(e,t,i)=>{i.d(t,{R:()=>n});var r=i(49186);let n=class e{constructor(e,t,i=""){this.major=e,this.minor=t,this._context=i}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",i=this._context&&this._context+" ";throw new r.A(t+"unsupported-version",`Required major ${i}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,i=""){const[n,s]=t.split("."),a=/^\s*\d+\s*$/;if(!n?.match||!a.test(n))throw new r.A((i&&i+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!a.test(s))throw new r.A((i&&i+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(n,10),o=parseInt(s,10);return new e(l,o,i)}}},50498:(e,t,i)=>{i.d(t,{Ye:()=>d,gy:()=>c,yR:()=>h});var r=i(66552),n=i(5443),s=i(91075),a=i(48526),l=i(86738),o=i(39829),u=i(82799);const c=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),d=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),h={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:a.A,point:l.A,polyline:u.A,polygon:o.A}}},52106:(e,t,i)=>{i.d(t,{A:()=>I});var r,n=i(31635),s=i(37838),a=i(69540),l=i(51447),o=i(25482),u=i(53966),c=i(36708),d=i(24326),h=i(10107),p=(i(44208),i(87811),i(64108)),f=i(12195),y=i(65864),g=i(50498),m=i(55156),_=i(60950),w=i(54339),b=i(33910);function F(e){if(null==e)return null;const t={};for(const i in e){const r=e[i];r&&(t[i]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let I=class extends((0,a.OU)(o.o)){static{r=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,_.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const i=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[i,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,m.I)(this.origin);if(e)return(0,w.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,w.r)(this,t):null}getGlobalId(){const e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:F(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(n.action=r),"attributes"===e&&(n.attributeName=r),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const r=(0,y.rS)(e[i]);r&&(t[i]=r)}return 0!==Object.keys(t).length?t:null}}})],I.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,h.MZ)({value:null})],I.prototype,"attributes",null),(0,n.Cg)([(0,h.MZ)({value:null,types:g.yR,json:{read:y.rS}})],I.prototype,"geometry",null),(0,n.Cg)([(0,h.MZ)({type:Boolean})],I.prototype,"isAggregate",void 0),(0,n.Cg)([(0,h.MZ)({clonable:!1})],I.prototype,"layer",void 0),(0,n.Cg)([(0,h.MZ)({clonable:"reference"})],I.prototype,"origin",void 0),(0,n.Cg)([(0,h.MZ)({type:s.A,value:null})],I.prototype,"popupTemplate",null),(0,n.Cg)([(0,h.MZ)({clonable:"reference"})],I.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,h.MZ)({value:null,types:b.Es})],I.prototype,"symbol",null),(0,n.Cg)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],I.prototype,"_version",void 0),(0,n.Cg)([(0,h.MZ)({type:Boolean,value:!0})],I.prototype,"visible",null),I=r=(0,n.Cg)([(0,p.$)("esri.Graphic")],I)},52136:(e,t,i)=>{i.d(t,{p:()=>a});var r=i(31635),n=i(10107),s=(i(44208),i(53966),i(87811),i(64108));const a=e=>{const t=e;let i=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],i),i}},54461:(e,t,i)=>{i.d(t,{A:()=>a});var r=i(87449),n=i(11221),s=i(89169);class a extends n.A{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getSet(e);return this._wset=new s.A(t._candidates.slice(),t._known.slice(),!1,this._clonePageDefinition(t.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset}return this._wset}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(1===t)return t;const i=this._idstates[e];return 0===i||1===i?i:0===t&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=0,this._countedin++,0):(this._idstates[e]=1,1):2}async _expandPagedSet(e,t,i,n,s){if(null===this._parent)throw new r.d("NotImplemented");if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),"success"}const a=await this._parent._expandPagedSet(e,t,i,n,s);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),a}async _getFeatures(e,t,i,r){const n=[],a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return await this._expandPagedSet(e,a,0,0,r),this._getFeatures(e,t,i,r);-1!==t&&void 0===this._featureCache[t]&&n.push(t);let l=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(l++,l<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&n.push(e._known[r]),n.length>a)));r++);if(0===n.length)return"success";const o=new s.A([],n,!1,null),u=Math.min(n.length,i);await this._parent._getFeatures(o,-1,u,r);for(let e=0;e<u;e++){const t=this._parent._featureFromCache(n[e]);void 0!==t&&(this._featureCache[n[e]]=t)}return"success"}async _getFilteredSet(e,t,i,r,n){await this._ensureLoaded();const a=await this._getSet(n);return new s.A(a._candidates.slice().concat(a._known.slice()),[],!1,this._clonePageDefinition(a.pagesDefinition))}_refineKnowns(e,t){let i=0,r=null;const n=[];for(let s=0;s<e._candidates.length;s++){const a=this._isInFeatureSet(e._candidates[s]);if(0===a){if(e._known.push(e._candidates[s]),i+=1,null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(n.push(r),r={start:s,end:s}),e._known.length>=this._topnum)break}else if(1===a)null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(n.push(r),r={start:s,end:s}),i+=1;else if(2===a)break;if(i>=t)break}null!==r&&n.push(r);for(let t=n.length-1;t>=0;t--)e._candidates.splice(n[t].start,n[t].end-n[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}static registerAction(){n.A._featuresetFunctions.top=function(e){return new a({parentfeatureset:this,topnum:e})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},55156:(e,t,i)=>{i.d(t,{I:()=>n,e:()=>r});const r=Symbol("idFieldsProviderSymbol");function n(e){return(t=e)&&r in t?e[r]:void 0;var t}},55674:(e,t,i)=>{i.d(t,{Ad:()=>p,Gj:()=>g,QY:()=>h,lL:()=>m,xR:()=>f});var r=i(66131),n=i(49186),s=(i(44208),i(44729)),a=i(15032),l=i(65864),o=i(95466),u=i(43668),c=i(98623);const d=["geometry","scale","timeProperties"];function h(e,t){if(null!=t)for(const i of d)t.hasArcadeDependency(i)&&e.add(i);return e}function p(e,t){return y.create(e,t,null,["$feature","$view"])}function f(e,t,i){return y.create(e,t,i,["$feature","$view","$config"])}class y{static async create(e,t,i,r){const{arcade:s,Dictionary:a}=await(0,u.l)();let l;try{l=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const o=s.scriptUsesGeometryEngine(l);o&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,l,null,!1,o);const c={vars:r.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(l,c);let h=null;null!=i&&(h=new a(i),h.immutable=!0);const p=new a;return p.immutable=!1,p.setField("scale",0),new y(e,s,l,d,t,p,h,a)}constructor(e,t,i,r,n,s,a,l){this.script=e,this._arcade=t,this._syntaxTree=i,this._compiled=r,this._spatialReference=n,this._viewDict=s,this._configDict=a,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new g,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const i=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=i?r.lY.epochToArcadeDate(n,i):r.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=i?r.lY.epochToArcadeDate(s,i):r.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:i})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class g{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,i){const r=t??new o.A(m(e.attributes));this._boundTarget=e,this._boundSchema.fields=r.fields,this._boundSchema.fieldsIndex=r,this._boundSchema.spatialReference=i}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const i=this._getField(e);if(i){const t=this._boundTarget.attributes[i.name];if(null==t)return null;switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return r.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?r.lY.unknownEpochToArcadeDate(t):r.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function m(e){const t=[];for(const i in e)t.push({name:i,alias:i,type:"string"==typeof e[i]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,i)=>{i.d(t,{q:()=>n});var r=i(62815);function n(e,t,i){if(!i?.features||!i.hasZ)return;const n=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of i.features)n(e.geometry)}},62815:(e,t,i)=>{i.d(t,{N:()=>a});var r=i(83047),n=i(73941),s=i(21325);function a(e,t,i){if(null==t||null==i||i.vcsWkid||(0,s.aI)(t,i)||(0,n.xP)(t)||(0,n.xP)(i))return null;const a=(0,r.G9)(t)/(0,r.G9)(i);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,a);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},68423:(e,t,i)=>{i.d(t,{Gr:()=>_,IO:()=>y,a:()=>w,bV:()=>m,p8:()=>g});var r=i(52106),n=i(78502),s=i(87449),a=i(11221),l=i(89169),o=i(33325),u=i(80609),c=i(97768),d=i(1262),h=i(88368),p=i(16930);class f{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class y extends f{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class g extends f{constructor(e,t,i){super((0,o.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=i}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,u.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class m extends f{constructor(e,t,i){super(e),this.codefield=t,this.lkp=i,this.reverseLkp={};for(const e in i)this.reverseLkp[i[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const i=this.evaluateNodeToWhereClause(e.parseTree,0,this.field.name,this.codefield instanceof h.A?(0,u.YY)(this.codefield,0):this.codefield,e.parameters);return i.includes(m.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:h.A.create(i,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,i=null,r=null,n){let s,a,l,c;switch(e.type){case"interval":return(0,u.oj)(this.evaluateNodeToWhereClause(e.value,t,i,r,n),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,i,m.BADNESS,n));for(let s=0;s<e.clauses.length;s++)r+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[s].operand,t,i,m.BADNESS,n)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[s].value,t,i,m.BADNESS,n);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,i,m.BADNESS,n)),r+=" END ",r}case"parameter":{const i=n[e.value.toLowerCase()];if("string"==typeof i)return"'"+i.toString().replaceAll("'","''")+"'";if((0,o.$P)(i))return(0,u.bm)(i,t);if((0,o.Lk)(i))return(0,u.bm)(i,t);if((0,o.eg)(i))return(0,u.F1)(i,t);if((0,o.rX)(i))return(0,u.R8)(i,t);if((0,o.f0)(i))return(0,u.Nf)(i,t);if(Array.isArray(i)){const e=[];for(let r=0;r<i.length;r++)"string"==typeof i[r]?e.push("'"+i[r].toString().replaceAll("'","''")+"'"):(0,o.$P)(i[r])||(0,o.Lk)(i[r])?e.push((0,u.bm)(i[r],t)):(0,o.eg)(i[r])?e.push((0,u.F1)(i[r],t)):(0,o.rX)(i[r])?e.push((0,u.R8)(i[r],t)):(0,o.f0)(i[r])?e.push((0,u.Nf)(i[r],t)):e.push(i[r].toString());return e}return i.toString()}case"expression-list":a=[];for(const s of e.value)a.push(this.evaluateNodeToWhereClause(s,t,i,r,n));return a;case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,i,m.BADNESS,n)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" AND "+this.evaluateNodeToWhereClause(e.right,t,i,r,n)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" OR "+this.evaluateNodeToWhereClause(e.right,t,i,r,n)+") ";case"IS":if("null"!==e.right.type)throw new d.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new d.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IS NOT NULL )";case"IN":if(s=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const s=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}s.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+s.join(",")+")) "}return s=this.evaluateNodeToWhereClause(e.right,t,i,r,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+s.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,n),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+c+")) ";case"NOT IN":if(s=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const s=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}s.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+s.join(",")+")) "}return s=this.evaluateNodeToWhereClause(e.right,t,i,r,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+s.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,n),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+c+")) ";case"BETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,m.BADNESS,n)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,m.BADNESS,n)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return(0,u.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+r+")":(0,u.Kb)(e.column);case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,i,m.BADNESS,n);return(0,u.F6)(e.name,r,t)}}throw new d.L("UnsupportedSyntax",{node:e.type})}extractValue(e){if(this.codefield instanceof h.A){const t=this.codefield.calculateValueCompiled(e);return this.reverseLkp[h.A.convertValueToStorageFormat(t)]}return this.reverseLkp[e.attributes[this.codefield]]}}class _ extends f{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,u.bD)(e,this.field.name,(0,u.YY)(this._sql,0),t.getFieldsIndex())}}extractValue(e){return h.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class w extends a.A{static findField(e,t){for(const i of e)if(i.name.toLowerCase()===t.toString().toLowerCase())return i;return null}constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=[],this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}_initialiseFeatureSet(){null!==this._parent?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new p.A({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=o.ik.point,this.typeIdField="",this.types=null,this.subtypeField=null,this.subtypes=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();let t=null;return t=this._extraFilter?await this._getFilteredSet("",null,null,null,e):await(this._parent?._getSet(e)),this._checkCancelled(e),(0,c.Lw)(t),this._wset=new l.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}async _getFeatures(e,t,i,s){const a=[];-1!==t&&void 0===this._featureCache[t]&&a.push(t);const o=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,o))return await this._expandPagedSet(e,o,0,0,s),this._getFeatures(e,t,i,s);let u=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(u++,u<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&a.push(e._known[r]),a.length>=o)));r++);if(0===a.length)return"success";e=new l.A([],a,e._ordered,null);const c=Math.min(a.length,i);await(this._parent?._getFeatures(e,-1,c,s)),this._checkCancelled(s);const d=[];for(let e=0;e<c;e++){const t=this._parent?._featureFromCache(a[e]);void 0!==t&&d.push({geometry:t.geometry,attributes:t.attributes,id:a[e]})}for(const e of d){const t=[];for(const i of this.adaptedFields)t[i.field.name]=i.extractValue(e);this._featureCache[e.id]=new r.A({attributes:t,geometry:(0,n.Yq)(e.geometry)})}return"success"}async _fetchAndRefineFeatures(){throw new s.d("NeverReach")}async _getFilteredSet(e,t,i,r,n){let s=!1;const a=this._reformulateWithoutAdaptions(i);s=a.cannot,i=a.where;let o=!1;if(null!==r){o=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof y)&&!0===r.scanForField(t.field.name)){if(!(t instanceof g)){r=null,o=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}r&&e.length>0&&(r=r.replaceFields(e))}null!==i?null!==this._extraFilter&&(i=(0,u.kg)(this._extraFilter,i)):i=this._extraFilter,await this._ensureLoaded();const c=await this._parent._getFilteredSet(e,t,i,r,n);let d;return this._checkCancelled(n),d=!0===s?new l.A(c._candidates.slice().concat(c._known.slice()),[],!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)):new l.A(c._candidates.slice(),c._known.slice(),!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)),d}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const i of this.adaptedFields)if(!0===(0,u.Ju)(e,i.field.name)){const r=i.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}async _stat(e,t,i,r,n,s,a){let l=!1,o=this._reformulateWithoutAdaptions(t);if(l=o.cannot,t=o.where,o=this._reformulateWithoutAdaptions(n),l=l||o.cannot,null!==(n=o.where)?null!==this._extraFilter&&(n=(0,u.kg)(this._extraFilter,n)):n=this._extraFilter,!0===l)return null===n&&""===i&&null===r?this._manualStat(e,t,s,a):{calculated:!1};const c=await this._parent._stat(e,t,i,r,n,s,a);return!1===c.calculated?null===n&&""===i&&null===r?this._manualStat(e,t,s,a):{calculated:!1}:c}async _canDoAggregates(e,t,i,r,n){if(null===this._parent)return!1;for(let t=0;t<e.length;t++)for(const i of this.adaptedFields)if(e[t].toLowerCase()===i.field.name.toLowerCase()&&!(i instanceof y))return!1;const s=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return!1;const t=i.clone();t.workingexpr=e.where,s.push(t)}else s.push(i)}const a=this._reformulateWithoutAdaptions(n);return!a.cannot&&(null!==(n=a.where)?null!==this._extraFilter&&(n=(0,u.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent._canDoAggregates(e,s,i,r,n))}async _getAggregatePagesDataSourceDefinition(e,t,i,r,n,a,l){if(null===this._parent)throw new s.d("NeverReach");const o=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)throw new s.d("NeverReach");const t=i.clone();t.workingexpr=e.where,o.push(t)}else o.push(i)}const c=this._reformulateWithoutAdaptions(n);if(c.cannot)throw new s.d("NeverReach");return null!==(n=c.where)?null!==this._extraFilter&&(n=(0,u.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,o,i,r,n,a,l)}}},73681:(e,t,i)=>{i.d(t,{n:()=>o});var r=i(49186),n=i(53966),s=i(46140),a=i(95466),l=i(55674);class o{static async from(e,t,i){const a=e.dictionary_version?s.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(i))h.delete(e);h.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const p=await(0,l.xR)(e.expression,null,d);if(!p)throw new r.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!a||!a.greaterEqual(4,0);f&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});const y=new u(i,f);return new o(f,c,p,y)}constructor(e,t,i,r){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=i,this._reader=r}get itemNames(){return this._itemNames}evaluate(e,t,i,r){try{return this._reader.bind(e,i,r),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,i)=>{i.d(t,{Gh:()=>y,tk:()=>d,BR:()=>c,wI:()=>u,G$:()=>p,$x:()=>h,Ov:()=>l,W_:()=>o,OP:()=>f,TU:()=>a,XX:()=>s});var r=i(70333),n=i(78888);i(7762),i(84952),i(36563),i(36708),i(4146),new WeakMap,i(16215);const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const i=r.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const a=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,n.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function d(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function h(e,t){return null}function p(e){return null}function f(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function y(e,t){if(!t||!f(e))return;const i=(e.url,null);i&&(e.url=i)}},79677:(e,t,i)=>{i.d(t,{A:()=>h});var r,n=i(31635),s=i(25482),a=i(88930),l=i(10107),o=(i(44208),i(53966),i(87811),i(36005)),u=i(64108),c=i(43937),d=i(98623);let h=class extends s.o{static{r=this}static get allTime(){return p}static get empty(){return f}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===r&&i===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,a.lL)(i,e,t));let n=this.end;if(n){const i=(0,a.lL)(n,e,t);n=n.getTime()===i.getTime()?i:(0,a.S1)(i,1,e,t)}return new r({start:i,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,l;return n>=t&&n<=i?a=n:t>=n&&t<=s&&(a=t),i>=n&&i<=s?l=i:s>=t&&s<=i&&(l=s),null==a||null==l||isNaN(a)||isNaN(l)?r.empty:new r({start:a===-1/0?null:new Date(a),end:l===1/0?null:new Date(l)})}offset(e,t,i=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new r,{start:s,end:l}=this;return null!=s&&(n.start=(0,a.S1)(s,e,t,i)),null!=l&&(n.end=(0,a.S1)(l,e,t,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n.Cg)([(0,o.w)("end")],h.prototype,"readEnd",null),(0,n.Cg)([(0,c.K)("end")],h.prototype,"writeEnd",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n.Cg)([(0,o.w)("start")],h.prototype,"readStart",null),(0,n.Cg)([(0,c.K)("start")],h.prototype,"writeStart",null),h=r=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],h);const p=new h,f=new h({start:void 0,end:void 0})},86691:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(78878),n=i(87449),s=i(11221),a=i(89169),l=i(87594);class o extends s.A{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,this._orderbyclause,e);return this._checkCancelled(e),this._wset=t,this._wset}return this._wset}async manualOrderSet(e,t){const i=await this.getIdColumnDictionary(e,[],-1,t);this._orderbyclause?.order(i);const r=new a.A([],[],!0,null);for(let e=0;e<i.length;e++)r._known.push(i[e].id);return r}async getIdColumnDictionary(e,t,i,n){if(i<e._known.length-1){const s=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return await(0,r.a2)(this._parent._expandPagedSet(e,s,0,0,n)),this.getIdColumnDictionary(e,t,i,n);let a=i+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;i+=l.length;const o=await(0,r.a2)(this._parent._getFeatureBatch(l,n));this._checkCancelled(n);for(const e of o)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,i,n)}return e._candidates.length>0?(await(0,r.a2)(this._refineSetBlock(e,this._maxProcessingRate(),n)),this._checkCancelled(n),this.getIdColumnDictionary(e,t,i,n)):t}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}async _fetchAndRefineFeatures(){throw new n.d("NeverReach")}async _getFilteredSet(e,t,i,r,n){await this._ensureLoaded();const s=await this._parent._getFilteredSet(e,t,i,null===r?this._orderbyclause:r,n);this._checkCancelled(n);const l=new a.A(s._candidates.slice(),s._known.slice(),s._ordered,this._clonePageDefinition(s.pagesDefinition));let o=!0;if(s._candidates.length>0&&(o=!1),!1===l._ordered){let e=await this.manualOrderSet(l,n);return!1===o&&(null===t&&null===i||(e=new a.A(e._candidates.slice().concat(e._known.slice()),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e}return l}static registerAction(){s.A._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new l.A(e)})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},87594:(e,t,i)=>{function r(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}i.d(t,{A:()=>n});class n{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const i=t[e].match(/\S+/g);this._fields.push(i[0]),2===i.length?"asc"===i[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort((e,t)=>{for(let i=0;i<this._fields.length;i++){const n=this.featureValue(e.feature,this._fields[i],i),s=this.featureValue(t.feature,this._fields[i],i);let a=0;if(a=1===this._directions[i]?r(n,s):-1*r(n,s),0!==a)return a}return 0})}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let i=0;i<this._fields.length;i++){0!==i&&(t+=",");let r=this._fields[i];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[i]?t+=" ASC":t+=" DESC"}return new n(t)}featureValue(e,t,i){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[i]=r,e.attributes[r];return null}}},91218:(e,t,i)=>{i.r(t),i.d(t,{canProjectWithoutEngine:()=>W,initializeProjection:()=>$,isEqualBaseGCS:()=>V,isLoaded:()=>k,isLoadedOrLoad:()=>D,isLoadedOrLoadFor:()=>M,load:()=>N,project:()=>P,projectExtent:()=>ie,projectMany:()=>E,projectMultipoint:()=>Y,projectOrLoad:()=>O,projectOrLoadMany:()=>j,projectPoint:()=>z,projectPolygon:()=>ee,projectPolyline:()=>H,projectWithZConversion:()=>B,projectWithoutEngine:()=>Q,requiresLoad:()=>L,test:()=>q,tryProjectWithZConversion:()=>U,unload:()=>Z});var r=i(49186),n=i(74887),s=i(62788),a=i(95488),l=i(51850),o=i(21276),u=i(73941),c=i(5443),d=i(91075),h=i(48526),p=i(86738),f=i(39829),y=i(82799),g=i(16930),m=i(159),_=i(9762),w=i(37539);function b(e,t,i,r,n,s){return F[0]=e,F[1]=t,F[2]=i,(0,_.projectBuffer)(F,r,0,n,s,0)}const F=(0,l.vt)();var I=i(21325),S=i(62815);let v=null,A=null,T=null,C=null,x={};const R=new a.I;function k(){return!!(A?.isLoaded()&&T?.isLoaded()&&C?.isLoaded())}function D(){return!!k()||((0,s.gc)(R),N(),!1)}function M(e,t){return!e||!t||W(e,t)||D()}function L(e,t){return!W(e,t)&&!k()}async function N(e){null==v&&(v=Promise.all([i.e(3276).then(i.bind(i,83276)).then(e=>(A=e,A.load())),i.e(8377).then(i.bind(i,8377)).then(e=>(T=e,T.load())),i.e(2158).then(i.bind(i,12158)).then(e=>(C=e,C.load()))])),await v,(0,n.Te)(e),R.notify()}function P(e,t,i){return Array.isArray(e)?0===e.length?[]:((0,o.H)(e),E(e,e[0].spatialReference,t,i)):((0,o.f)(e),E([e],e.spatialReference,t,i)[0])}function E(e,t,i,r){if(null==t||null==i)return e;if(W(t,i,r))return e.map(e=>Q(e,t,i));if(null==r?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>Q(e,t,g.A.WGS84)).map(e=>U(e,i));if(null==r?.geographicTransformation&&(0,u.jA)(i))return e.map(e=>U(e,g.A.WGS84)).map(e=>Q(e,g.A.WGS84,i));if(!k())throw new G;if(!r?.geographicTransformation)if(r?.extendedParams)r={...r,geographicTransformation:C.getTransformation(t,i,r.areaOfInterestExtent)||new m.A};else if(!r?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,i);let n=x[e];n||(n=C.getTransformation(t,i)||new m.A,x[e]=n),r={geographicTransformation:n}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof d.A?A.executeMany(e,i,r):T.executeMany(e,i,r)}function O(e,t){const i=j([e],t);return null!=i.pending?{pending:i.pending,geometry:null}:null!=i.geometries?{pending:null,geometry:i.geometries[0]}:{pending:null,geometry:null}}function j(e,t){if(!k())for(const i of e)if(null!=i&&!(0,I.aI)(i.spatialReference,t)&&(0,I.fn)(i.spatialReference)&&(0,I.fn)(t)&&!W(i.spatialReference,t))return(0,s.gc)(R),{pending:N(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,I.aI)(e.spatialReference,t)?e:(0,I.fn)(e.spatialReference)&&(0,I.fn)(t)?U(e,t):null)}}class G extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function Z(){v=null,A=null,T=null,C=null,x={}}const q={get loadPromise(){return v}};function U(e,t){try{const i=P(e,t);if(null==i)return null;"xmin"in e&&"xmin"in i&&(i.zmin=e.zmin,i.zmax=e.zmax);const r=(0,S.N)(i.type,e.spatialReference,t);return null!=r&&r(i),i}catch(e){if(!(e instanceof G))throw e;return null}}async function B(e,t,i){const r=e.spatialReference;return null!=r&&null!=t&&await $(r,t,null,i),U(e,t)}function W(e,t,i){return!(i?.areaOfInterestExtent||i?.extendedParams||i?.geographicTransformation)&&(!!(0,I.aI)(e,t)||(0,I.fn)(e)&&(0,I.fn)(t)&&!!(0,w.jd)(e,t))}function V(e,t){if((0,I.aI)(e,t))return!0;if(!(0,I.fn)(e)||!(0,I.fn)(t))return!1;const i=(0,I.oT)(e)||(0,I.K8)(e)||(0,I.x1)(e),r=(0,I.oT)(t)||(0,I.K8)(t)||(0,I.x1)(t);return i&&r}async function $(e,t,i,r){if(k())return(0,n.NO)(r);if(Array.isArray(e)){for(const{source:t,dest:i,options:n}of e)if(t&&i&&!W(t,i,n))return N(r)}else if(e&&t&&!W(e,t,i))return N(r);return(0,n.NO)(r)}function Q(e,t,i){return e?"x"in e?J(e,t,new p.A,i,0):"xmin"in e?re(e,t,new c.A,i,0):"rings"in e?te(e,t,new f.A,i,0):"paths"in e?X(e,t,new y.A,i,0):"points"in e?K(e,t,new h.A,i,0):null:null}function z(e,t,i=t.spatialReference,r=0){return null!=i&&null!=e.spatialReference&&null!=J(e,e.spatialReference,t,i,r)}function J(e,t,i,r,n){se[0]=e.x,se[1]=e.y;const s=e.z;return se[2]=void 0!==s?s:n,(0,_.projectBuffer)(se,t,0,se,r,0)?(i.x=se[0],i.y=se[1],i.spatialReference=r,void 0!==s||(0,u.xP)(r)?(i.z=se[2],i.hasZ=!0):(i.z=void 0,i.hasZ=!1),void 0===e.m?(i.m=void 0,i.hasM=!1):(i.m=e.m,i.hasM=!0),i):null}function Y(e,t,i=t.spatialReference,r=0){return null!=e.spatialReference&&null!=i&&null!=K(e,e.spatialReference,t,i,r)}function K(e,t,i,r,n){const{points:s,hasZ:a,hasM:l}=e,o=[],c=s.length,d=[];for(const e of s)d.push(e[0],e[1],a?e[2]:n);if(!(0,_.projectBuffer)(d,t,0,d,r,0,c))return null;const h=a||(0,u.xP)(r);for(let e=0;e<c;++e){const t=3*e,i=d[t],r=d[t+1];h&&l?o.push([i,r,d[t+2],s[e][3]]):h?o.push([i,r,d[t+2]]):l?o.push([i,r,s[e][2]]):o.push([i,r])}return i.points=o,i.spatialReference=r,i.hasZ=a,i.hasM=l,i}function H(e,t,i=t.spatialReference,r=0){return null!=e.spatialReference&&null!=i&&null!=X(e,e.spatialReference,t,i,r)}function X(e,t,i,r,n){const{paths:s,hasZ:a,hasM:l}=e,o=[];if(!ne(s,a??!1,l??!1,t,o,r,n))return null;const c=a||(0,u.xP)(r);return i.paths=o,i.spatialReference=r,i.hasZ=c,i.hasM=l,i}function ee(e,t,i=t.spatialReference,r=0){return null!=e.spatialReference&&null!=i&&null!=te(e,e.spatialReference,t,i,r)}function te(e,t,i,r,n){const{rings:s,hasZ:a,hasM:l}=e,o=[];if(!ne(s,a??!1,l??!1,t,o,r,n))return null;const c=a||(0,u.xP)(r);return i.rings=o,i.spatialReference=r,i.hasZ=c,i.hasM=l,i}function ie(e,t,i=t.spatialReference,r=0){return null!=e.spatialReference&&null!=i&&null!=re(e,e.spatialReference,t,i,r)}function re(e,t,i,r,n){const{xmin:s,ymin:a,xmax:l,ymax:o,hasZ:c,hasM:d}=e;if(!b(s,a,c?e.zmin:n,t,se,r))return null;const h=c||(0,u.xP)(r);return i.xmin=se[0],i.ymin=se[1],h&&(i.zmin=se[2]),b(l,o,c?e.zmax:n,t,se,r)?(i.xmax=se[0],i.ymax=se[1],h&&(i.zmax=se[2]),d&&(i.mmin=e.mmin,i.mmax=e.mmax),i.spatialReference=r,i):null}function ne(e,t,i,r,n,s,a=0){const l=new Array;for(const i of e)for(const e of i)l.push(e[0],e[1],t?e[2]:a);if(!(0,_.projectBuffer)(l,r,0,l,s,0))return!1;let o=0;n.length=0;const c=t||(0,u.xP)(s);for(const t of e){const e=new Array;for(const r of t)c&&i?e.push([l[o++],l[o++],l[o++],r[3]]):c?e.push([l[o++],l[o++],l[o++]]):i?(e.push([l[o++],l[o++],r[2]]),o++):(e.push([l[o++],l[o++]]),o++);n.push(e)}return!0}const se=(0,l.vt)()},91880:(e,t,i)=>{i.d(t,{A:()=>c});var r,n=i(31635),s=i(66552),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(64108));const u=new s.J({asc:"ascending",desc:"descending"});let c=class extends a.o{static{r=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=r=(0,n.Cg)([(0,o.$)("esri.layers.support.OrderByInfo")],c)},99157:(e,t,i)=>{i.d(t,{A:()=>o});var r,n=i(31635),s=i(65008),a=i(10107),l=(i(44208),i(53966),i(87811),i(64108));let o=r=class extends s.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new r({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,a.MZ)()],o.prototype,"isInverse",void 0),(0,n.Cg)([(0,a.MZ)()],o.prototype,"wkt",void 0),(0,n.Cg)([(0,a.MZ)()],o.prototype,"wkid",void 0),o=r=(0,n.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformationStep")],o)}}]);