@arcgis/core 5.2.0-next.79 → 5.2.0-next.80

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 (192) hide show
  1. package/WebScene.js +1 -1
  2. package/arcgisGlobal.d.ts +8 -0
  3. package/assets/components/assets/input-date-picker/t9n/messages.ar.json +1 -1
  4. package/assets/components/assets/input-date-picker/t9n/messages.bg.json +1 -1
  5. package/assets/components/assets/input-date-picker/t9n/messages.bs.json +1 -1
  6. package/assets/components/assets/input-date-picker/t9n/messages.ca.json +1 -1
  7. package/assets/components/assets/input-date-picker/t9n/messages.cs.json +1 -1
  8. package/assets/components/assets/input-date-picker/t9n/messages.da.json +1 -1
  9. package/assets/components/assets/input-date-picker/t9n/messages.de.json +1 -1
  10. package/assets/components/assets/input-date-picker/t9n/messages.el.json +1 -1
  11. package/assets/components/assets/input-date-picker/t9n/messages.es.json +1 -1
  12. package/assets/components/assets/input-date-picker/t9n/messages.et.json +1 -1
  13. package/assets/components/assets/input-date-picker/t9n/messages.fi.json +1 -1
  14. package/assets/components/assets/input-date-picker/t9n/messages.fr.json +1 -1
  15. package/assets/components/assets/input-date-picker/t9n/messages.he.json +1 -1
  16. package/assets/components/assets/input-date-picker/t9n/messages.hr.json +1 -1
  17. package/assets/components/assets/input-date-picker/t9n/messages.hu.json +1 -1
  18. package/assets/components/assets/input-date-picker/t9n/messages.id.json +1 -1
  19. package/assets/components/assets/input-date-picker/t9n/messages.it.json +1 -1
  20. package/assets/components/assets/input-date-picker/t9n/messages.ja.json +1 -1
  21. package/assets/components/assets/input-date-picker/t9n/messages.ko.json +1 -1
  22. package/assets/components/assets/input-date-picker/t9n/messages.lt.json +1 -1
  23. package/assets/components/assets/input-date-picker/t9n/messages.lv.json +1 -1
  24. package/assets/components/assets/input-date-picker/t9n/messages.nl.json +1 -1
  25. package/assets/components/assets/input-date-picker/t9n/messages.no.json +1 -1
  26. package/assets/components/assets/input-date-picker/t9n/messages.pl.json +1 -1
  27. package/assets/components/assets/input-date-picker/t9n/messages.pt-BR.json +1 -1
  28. package/assets/components/assets/input-date-picker/t9n/messages.pt-PT.json +1 -1
  29. package/assets/components/assets/input-date-picker/t9n/messages.ro.json +1 -1
  30. package/assets/components/assets/input-date-picker/t9n/messages.ru.json +1 -1
  31. package/assets/components/assets/input-date-picker/t9n/messages.sk.json +1 -1
  32. package/assets/components/assets/input-date-picker/t9n/messages.sl.json +1 -1
  33. package/assets/components/assets/input-date-picker/t9n/messages.sr.json +1 -1
  34. package/assets/components/assets/input-date-picker/t9n/messages.sv.json +1 -1
  35. package/assets/components/assets/input-date-picker/t9n/messages.th.json +1 -1
  36. package/assets/components/assets/input-date-picker/t9n/messages.tr.json +1 -1
  37. package/assets/components/assets/input-date-picker/t9n/messages.uk.json +1 -1
  38. package/assets/components/assets/input-date-picker/t9n/messages.vi.json +1 -1
  39. package/assets/components/assets/input-date-picker/t9n/messages.zh-CN.json +1 -1
  40. package/assets/components/assets/input-date-picker/t9n/messages.zh-HK.json +1 -1
  41. package/assets/components/assets/input-date-picker/t9n/messages.zh-TW.json +1 -1
  42. package/assets/components/assets/input-time-picker/t9n/messages.ar.json +1 -1
  43. package/assets/components/assets/input-time-picker/t9n/messages.bg.json +1 -1
  44. package/assets/components/assets/input-time-picker/t9n/messages.bs.json +1 -1
  45. package/assets/components/assets/input-time-picker/t9n/messages.ca.json +1 -1
  46. package/assets/components/assets/input-time-picker/t9n/messages.cs.json +1 -1
  47. package/assets/components/assets/input-time-picker/t9n/messages.da.json +1 -1
  48. package/assets/components/assets/input-time-picker/t9n/messages.de.json +1 -1
  49. package/assets/components/assets/input-time-picker/t9n/messages.el.json +1 -1
  50. package/assets/components/assets/input-time-picker/t9n/messages.es.json +1 -1
  51. package/assets/components/assets/input-time-picker/t9n/messages.et.json +1 -1
  52. package/assets/components/assets/input-time-picker/t9n/messages.fi.json +1 -1
  53. package/assets/components/assets/input-time-picker/t9n/messages.fr.json +1 -1
  54. package/assets/components/assets/input-time-picker/t9n/messages.he.json +1 -1
  55. package/assets/components/assets/input-time-picker/t9n/messages.hr.json +1 -1
  56. package/assets/components/assets/input-time-picker/t9n/messages.hu.json +1 -1
  57. package/assets/components/assets/input-time-picker/t9n/messages.id.json +1 -1
  58. package/assets/components/assets/input-time-picker/t9n/messages.it.json +1 -1
  59. package/assets/components/assets/input-time-picker/t9n/messages.ja.json +1 -1
  60. package/assets/components/assets/input-time-picker/t9n/messages.ko.json +1 -1
  61. package/assets/components/assets/input-time-picker/t9n/messages.lt.json +1 -1
  62. package/assets/components/assets/input-time-picker/t9n/messages.lv.json +1 -1
  63. package/assets/components/assets/input-time-picker/t9n/messages.nl.json +1 -1
  64. package/assets/components/assets/input-time-picker/t9n/messages.no.json +1 -1
  65. package/assets/components/assets/input-time-picker/t9n/messages.pl.json +1 -1
  66. package/assets/components/assets/input-time-picker/t9n/messages.pt-BR.json +1 -1
  67. package/assets/components/assets/input-time-picker/t9n/messages.pt-PT.json +1 -1
  68. package/assets/components/assets/input-time-picker/t9n/messages.ro.json +1 -1
  69. package/assets/components/assets/input-time-picker/t9n/messages.ru.json +1 -1
  70. package/assets/components/assets/input-time-picker/t9n/messages.sk.json +1 -1
  71. package/assets/components/assets/input-time-picker/t9n/messages.sl.json +1 -1
  72. package/assets/components/assets/input-time-picker/t9n/messages.sr.json +1 -1
  73. package/assets/components/assets/input-time-picker/t9n/messages.sv.json +1 -1
  74. package/assets/components/assets/input-time-picker/t9n/messages.th.json +1 -1
  75. package/assets/components/assets/input-time-picker/t9n/messages.tr.json +1 -1
  76. package/assets/components/assets/input-time-picker/t9n/messages.uk.json +1 -1
  77. package/assets/components/assets/input-time-picker/t9n/messages.vi.json +1 -1
  78. package/assets/components/assets/input-time-picker/t9n/messages.zh-CN.json +1 -1
  79. package/assets/components/assets/input-time-picker/t9n/messages.zh-HK.json +1 -1
  80. package/assets/components/assets/input-time-picker/t9n/messages.zh-TW.json +1 -1
  81. package/assets/components/assets/input-time-zone/t9n/messages.de.json +1 -1
  82. package/assets/esri/core/workers/RemoteClient.js +1 -1
  83. package/assets/esri/core/workers/chunks/{c69cf08da4e4c2c824ee.js → 0179949495c87466b428.js} +12 -12
  84. package/assets/esri/core/workers/chunks/{ef803fb25741e9f2a0a1.js → 04105d83556409489835.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{040a73b2a23577e1eabd.js → 24729603dcdbd95fd01e.js} +1 -1
  86. package/assets/esri/core/workers/chunks/2b0558c1716425974563.js +2 -0
  87. package/assets/esri/core/workers/chunks/{ac2ba5c3d613d7d5183a.js → 2b3f76e03b7a28fc4453.js} +1 -1
  88. package/assets/esri/core/workers/chunks/345510a95e893fa8040a.js +1 -0
  89. package/assets/esri/core/workers/chunks/{57e26a86d46e02c89c4f.js → 55dda957c79fb285185f.js} +1 -1
  90. package/assets/esri/core/workers/chunks/5d8d2145533a52efb7b9.js +1 -0
  91. package/assets/esri/core/workers/chunks/5f553da48d0ccbbfcd3c.js +2 -0
  92. package/assets/esri/core/workers/chunks/{cd74de12005834244a47.js → 626a715fdec93e188e0c.js} +1 -1
  93. package/assets/esri/core/workers/chunks/6529b5cc3ac6baa29fff.js +2 -0
  94. package/assets/esri/core/workers/chunks/7253a439c98200e3e748.js +1 -0
  95. package/assets/esri/core/workers/chunks/{4115bab15c19b4f5ae08.js → 7529c0fcfb83998e63db.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{b37a20c5c4a4686257d4.js → 8a3289e15e0ce92e3813.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{b82763e9401b16121f8d.js → 995a433936fc90d41634.js} +2 -2
  98. package/assets/esri/core/workers/chunks/9f1211d2267fb7673c4d.js +1 -0
  99. package/assets/esri/core/workers/chunks/{385b23d4bd5275031fb6.js → cada52d719c35d40958a.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{f703bc002c732d1c045d.js → cfdbc48f58433a3d5fc3.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{83556c9f6f85c2a46779.js → d8da31bfe2bc4174e5aa.js} +1 -1
  102. package/assets/esri/core/workers/chunks/{8762da315cf5086167c3.js → e9e4b27ba06a29e6340c.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{05663093b1d2a268b953.js → ebb722118a220c92efc3.js} +1 -1
  104. package/assets/esri/core/workers/chunks/ee63c693f2539f3bfa17.js +2 -0
  105. package/assets/esri/core/workers/chunks/ef9489d1dccb817460bb.js +2 -0
  106. package/assets/esri/core/workers/chunks/f086c6d229fb34a9d7f9.js +1 -0
  107. package/assets/esri/core/workers/chunks/{507b7f4c276b60ffe9d5.js → f4bae61869df1877fd3f.js} +1 -1
  108. package/chunks/Component.glsl.js +4 -4
  109. package/chunks/{FocusAreaColor.glsl.js → FocusArea.glsl.js} +1 -1
  110. package/chunks/HUDMaterial.glsl.js +5 -5
  111. package/chunks/Terrain.glsl.js +4 -4
  112. package/config.js +1 -1
  113. package/kernel.js +1 -1
  114. package/layers/list/BasemapItemCollection.d.ts +81 -0
  115. package/layers/list/BasemapItemCollection.js +2 -0
  116. package/layers/list/CatalogItemCollection.d.ts +76 -0
  117. package/layers/list/CatalogItemCollection.js +2 -0
  118. package/layers/list/Item.d.ts +262 -0
  119. package/layers/list/Item.js +2 -0
  120. package/layers/list/ItemPanel.d.ts +75 -0
  121. package/layers/list/ItemPanel.js +2 -0
  122. package/layers/list/LayerItemCollection.d.ts +106 -0
  123. package/layers/list/LayerItemCollection.js +2 -0
  124. package/layers/list/TableItem.d.ts +136 -0
  125. package/layers/list/TableItem.js +2 -0
  126. package/layers/list/TableItemCollection.d.ts +115 -0
  127. package/layers/list/TableItemCollection.js +2 -0
  128. package/layers/list/TableItemPanel.d.ts +74 -0
  129. package/layers/list/TableItemPanel.js +2 -0
  130. package/layers/list/support/layerListUtils.js +2 -0
  131. package/layers/list/types.d.ts +55 -0
  132. package/package.json +4 -4
  133. package/support/revision.js +1 -1
  134. package/views/3d/FocusAreasView.js +1 -1
  135. package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
  136. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +2 -0
  137. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +2 -0
  138. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +2 -0
  139. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  140. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  141. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +2 -0
  142. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  143. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementVisualization.js +2 -0
  144. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  145. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  146. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  147. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  148. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  149. package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
  150. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
  151. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  152. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  153. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  154. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  155. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +16 -7
  156. package/views/3d/webgl-engine/effects/focusArea/{FocusAreaColor.glsl.js → FocusArea.glsl.js} +1 -1
  157. package/views/3d/webgl-engine/effects/focusArea/FocusArea.js +2 -0
  158. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.js +1 -1
  159. package/views/3d/webgl-engine/effects/focusArea/FocusAreaTechnique.js +2 -0
  160. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  161. package/views/3d/webgl-engine/lib/CutFill.js +2 -0
  162. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  163. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  164. package/views/3d/webgl.js +1 -1
  165. package/webscene/support/schemaValidator.js +1 -1
  166. package/webscene/version.js +2 -0
  167. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  168. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  169. package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
  170. package/assets/esri/core/workers/chunks/06c8547521ce9c97b258.js +0 -2
  171. package/assets/esri/core/workers/chunks/09653bd2a31d293a10d9.js +0 -2
  172. package/assets/esri/core/workers/chunks/17e9324a02b69733307a.js +0 -2
  173. package/assets/esri/core/workers/chunks/20b9bc8d5cbe9a18a644.js +0 -1
  174. package/assets/esri/core/workers/chunks/29a20a37e7837142fa6b.js +0 -2
  175. package/assets/esri/core/workers/chunks/81cd0cb9ae1371765d32.js +0 -1
  176. package/assets/esri/core/workers/chunks/95956d62591d689f1135.js +0 -1
  177. package/assets/esri/core/workers/chunks/b2812279662f1a5f8d06.js +0 -1
  178. package/assets/esri/core/workers/chunks/fdd4f78facec6387cdb0.js +0 -1
  179. package/assets/esri/core/workers/chunks/ffd5285c7b2c83208f87.js +0 -2
  180. package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +0 -2
  181. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +0 -2
  182. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +0 -2
  183. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +0 -2
  184. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +0 -2
  185. package/views/3d/webgl-engine/effects/focusArea/FocusAreaVisualization.js +0 -2
  186. package/views/3d/webgl-engine/lib/CutFillVisualization.js +0 -2
  187. /package/assets/esri/core/workers/chunks/{09653bd2a31d293a10d9.js.LICENSE.txt → 2b0558c1716425974563.js.LICENSE.txt} +0 -0
  188. /package/assets/esri/core/workers/chunks/{17e9324a02b69733307a.js.LICENSE.txt → 5f553da48d0ccbbfcd3c.js.LICENSE.txt} +0 -0
  189. /package/assets/esri/core/workers/chunks/{06c8547521ce9c97b258.js.LICENSE.txt → 6529b5cc3ac6baa29fff.js.LICENSE.txt} +0 -0
  190. /package/assets/esri/core/workers/chunks/{b82763e9401b16121f8d.js.LICENSE.txt → 995a433936fc90d41634.js.LICENSE.txt} +0 -0
  191. /package/assets/esri/core/workers/chunks/{ffd5285c7b2c83208f87.js.LICENSE.txt → ee63c693f2539f3bfa17.js.LICENSE.txt} +0 -0
  192. /package/assets/esri/core/workers/chunks/{29a20a37e7837142fa6b.js.LICENSE.txt → ef9489d1dccb817460bb.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[148],{36708(e,t,r){r.d(t,{C_:()=>u,on:()=>c,wB:()=>l,z7:()=>h});var s=r(37955),i=r(36563),n=r(97768),o=r(17676),a=r(14012);function l(e,t,r={}){return d(e,t,r,p)}function h(e,t,r={}){return d(e,t,r,g)}function d(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let a=null,h=null,d=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function u(e){o.once&&o.once&&(0,n.xt)(d),r(e)}const p=l(e,(e,r)=>{c(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return d=(0,i.hA)(()=>{p.remove(),c()}),d}function u(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,()=>{l(),n((0,o.NK)())}),d(e,e=>{l(),s(e)},{sync:!1,once:!0},t??p)])})}(e,g,t)}function p(e){return!0}function g(e){return!!e}r(80559),r.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},16494(e,t,r){var s=r(17632);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),n=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],o=new s.I({whiteList:i,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(n.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new s.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1);r.d(t,["Nd",0,a,"W5",0,o])},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>i,vD:()=>o,yS:()=>n});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},50148(e,t,r){r.r(t),r.d(t,{default:()=>ht});var s=r(70333),i=r(92602),n=r(11254),o=r(49186),a=r(65529),l=r(37955),h=r(4718),d=r(93637),c=r(17676),u=r(84952),p=r(5482),g=r(91429),f=r(64108);let m=class extends a.nJ{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){return s.id.refreshToken(this)}refreshServerTokens(){return s.id.refreshServerTokens(this)}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=s.id,r=this.server?t.findServerInfo(this.server):null,i=r?.owningSystemUrl,n=i?t.findServerInfo(i):null;!1===e||i&&"portal"!==this.scope&&(!n?.webTierAuth||t.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,h.oy)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,p.Cg)([(0,g.MZ)()],m.prototype,"creationTime",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"expires",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"isAdmin",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"oAuthState",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"resources",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"scope",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"server",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"ssl",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"token",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"tokenRefreshBuffer",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"userId",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"validity",void 0),m=(0,p.Cg)([(0,f.$)("esri.identity.Credential")],m);const v=m;var _=r(79783),y=r(41578);function w(e){return function(){const e=getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\W/g,"").toLowerCase();return"dark"===e||"light"===e?e:void 0}()??(0,y.u)(e??document.body)}function S(e){return function(e){return`calcite-mode-${e}`}(w(e))}r(44208);var I=r(53966),A=r(97768),k=r(61893),U=r(36708),C=r(13069),T=r(62788),b=r(71429),x=r(16494);const P="http://www.w3.org/",R=`${P}2000/svg`,O=`${P}1999/xlink`;let M=[],D=(e,t)=>{let r={};return Object.keys(e).forEach(t=>{r[t]=e[t]}),t&&Object.keys(t).forEach(e=>{r[e]=t[e]}),r},N=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),L=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},E=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(N(e[s],t))return s;return-1},j=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let n=i.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if(N(t,i))throw new Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},q=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},Z=[],$=!1,F=e=>{(e.children||[]).forEach(F),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},V=()=>{$=!1,Z.forEach(F),Z.length=0},B=e=>{Z.push(e),$||($=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(V,{timeout:16}):setTimeout(V,16))},z=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),B(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),B(e))},H=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),n=i.length;for(let o=0;o<n;o++){let n=i[o],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)K(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],n=a[s];n&&(L(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let i=typeof a;"function"===i?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===R?"href"===n?e.setAttributeNS(O,n,a):e.setAttribute(n,a):"string"===i&&"value"!==n?"innerHTML"===n?e[n]=x.W5.sanitize(a):W(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function W(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let J,G=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)Y(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),H(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},Y=(e,t,r,s)=>{let i,n=0,o=e.vnodeSelector,a=t.ownerDocument;if(""===o)i=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(i,r):t.appendChild(i);else{for(let l=0;l<=o.length;++l){let h=o.charAt(l);if(l===o.length||"."===h||"#"===h){let h=o.charAt(n-1),d=o.slice(n,l);"."===h?i.classList.add(d):"#"===h?i.id=d:("svg"===d&&(s=D(s,{namespace:R})),void 0!==s.namespace?i=e.domNode=a.createElementNS(s.namespace,d):(i=e.domNode=e.domNode||a.createElement(d),"input"===d&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(i,r):i.parentNode!==t&&t.appendChild(i)),n=l+1}}G(i,e,s)}},K=(e,t,r)=>{t&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,r)})},X=(e,t,r,s,i)=>{if(r===s)return!1;s=s||M;let n,o=(r=r||M).length,a=s.length,l=0,h=0,d=!1;for(;h<a;){let a=l<o?r[l]:void 0,c=s[h];if(void 0!==a&&N(a,c))d=J(a,c,i)||d,l++;else{let a=E(r,c,l+1);if(a>=0){for(n=l;n<a;n++)z(r[n]),j(r,n,e,"removed");d=J(r[a],c,i)||d,l=a+1}else Y(c,t,l<o?r[l].domNode:void 0,i),q(c),j(s,h,e,"added")}h++}if(o>l)for(n=l;n<o;n++)z(r[n]),j(r,n,e,"removed");return d};J=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=D(r,{namespace:R})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=X(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let i=!1,n=Object.keys(r),o=n.length;for(let a=0;a<o;a++){let o=n[a],l=r[o],h=t[o];if("class"===o)h!==l&&(K(e,h,!1),K(e,l,!0));else if("classes"===o){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(i=!0,n?t.add(s):t.remove(s))}}else if("styles"===o){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],o=l[r];o!==h[r]&&(i=!0,o?(L(o),s.styleApplyer(e,r,o)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"!==o||W(e)){if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===R?"href"===o?e.setAttributeNS(O,o,l):e.setAttribute(o,l):"string"===t?"innerHTML"===o?e[o]=x.W5.sanitize(l):"role"===o&&""===l?e.removeAttribute(o):W(e)&&o in e?e[o]=l:e.setAttribute(o,l):e[o]!==l&&(e[o]=l),i=!0)}}else{let t=e[o];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[o]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}}return i})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let Q=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,J(s,r,t)},domNode:e.domNode});const ee={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let te,re=e=>D(ee,e),se=(e,t,r)=>(r=re(r),Y(t,e,void 0,r),Q(t,r)),ie=(e,t,r)=>(r=re(r),Y(t,e.parentNode,e,r),Q(t,r)),ne=(e,t,r)=>(r=re(r),t.domNode=e,G(e,t,r),Q(t,r)),oe=(e,t,r)=>(r=re(r),Y(t,e.parentNode,e,r),e.parentNode.removeChild(e),Q(t,r));te=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const ae={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},le={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{t.startsWith("-")?e.style.setProperty(t,r):e.style[t]=r}},he=(e,t,r=!1)=>{let s=e;return t.forEach((e,i)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,t=>t.domNode===e):void 0;r&&!n&&i!==t.length-1||(s=n)}),s};var de=r(42105),ce=r(2741);let ue;ue="components/assets";var pe=r(36563);const ge=Symbol("widget"),fe=Symbol("widget-test-data"),me=[],ve={},_e=new Map;function ye(e,t){let r=t.children;if(r?.length)for(let t=0;t<r.length;++t)r[t]=ye(e,r[t]);else r=me;const s=t.vnodeSelector;if(Ae(s)){const i=t.properties||ve,n=i.key||s,o={key:n,afterCreate:we,afterUpdate:Se,afterRemoved:Ie,parentWidget:e,widgetConstructor:s,widgetProperties:{...i,key:n,children:r}};return{vnodeSelector:s.vnodeSelector,properties:o,children:void 0,text:void 0,domNode:null}}return t}function we(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:n}){const o=new i(n);o.container=e,_e.set(e,o),o.afterCreate?.(o,e),s.addHandles((0,pe.hA)(()=>Ie(e))),queueMicrotask(()=>{o[fe].projector?.renderNow()})}function Se(e,t,r,{widgetProperties:s}){const i=_e.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Ie(e){const t=_e.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),_e.delete(e))}function Ae(e){return"function"==typeof e&&e[ge]}const ke=new Set;new Map;const Ue=new Map;function Ce(){Ue.clear()}function Te(e){Ue.delete(e)}var be=r(98291),xe=r(76030);function Pe(e){return e.matches(":focus-within")||document.activeElement===e}(()=>{const e=new Map;new ResizeObserver(t=>{Ce();for(const r of t)e.get(r.target)?.(r)})})();var Re=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Oe=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Oe(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=Re(i)),t.push(i))}};const Me=function(...e){const t=be.A.acquire();for(let r=0;r<e.length;r++){const s=e[r],i=typeof s;if("string"===i)t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if("object"===i)for(const e in s)s[e]&&t.push(e)}const r=t.join(" ");return be.A.release(t),r},De=function(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}};function Ne(e,t,...r){return"function"!=typeof e||Ae(e)?function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var i=[];return Oe(r,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}var Le,Ee;let je=0;function qe(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?qe(e[s],t[s]):e[s]=t[s]);return e}const Ze=(e=>{let t;const r={...ae,...e},s=(n=r,{...le,...n}),i=s.performanceLogger;var n;let o,a=!0,l=!1;const h=[],d=[],c=(e,n,o)=>{let a;s.eventHandlerInterceptor=(e,s,n,o)=>function(e){let s;i("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),o=n.some(e=>customElements.get(e?.tagName?.toLowerCase()));if(e.eventPhase!==Event.CAPTURING_PHASE&&o){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();s=he(a.getLastRender(),r,!0)}else n.reverse(),s=he(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),i("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=o();a=e(n,l,s),s.eventHandlerInterceptor=void 0,h.push(a),d.push(o),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(o=void 0,a){a=!1,i("renderStart",void 0);for(let e=0;e<h.length;e++){const t=d[e]();i("rendered",void 0);try{h[e].update(t)}catch(e){console.error(e)}i("patched",void 0)}i("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,d)),t={renderNow:u,scheduleRender:()=>{o||l||(o=requestAnimationFrame(u))},stop:()=>{o&&(cancelAnimationFrame(o),o=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{c(se,e,t)},insertBefore:(e,t)=>{c(ie,e,t)},merge:(e,t)=>{c(ne,e,t)},replace:(e,t)=>{c(oe,e,t)},detach:e=>{for(let t=0;t<d.length;t++)if(d[t]===e)return d.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,n)=>{const o=t?.(e,s,i,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>o?.call(i,e);i.addEventListener(t,r,a);const s=()=>i.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return o}},handleInterceptedEvent(e,t,r,s){const{eventPhase:i,type:n}=s,o=i===Event.CAPTURING_PHASE;let a=`on${n}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${o?"Capture":""}`,l&&a in l))&&(Ce(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let $e=!1,Fe=class extends((0,k.g)(a.nJ)){static{this[Le]=!0}constructor(e,t){super(e,t),this[Ee]=!0,this._attached=!1,this._projector=Ze,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this.topLayerDisabled=!1,this._loadLocale=(0,c.sg)(async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,_.ud)(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=qe((0,h.o8)(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&I.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles((0,pe.hA)()),de.qu||(0,de.Qu)((0,u.s2)((0,ce.s)("components/assets")));const r="esri-widget-uid-"+(0,C.lk)(),s=this.render.bind(this);this._trackingTarget=new b.r(()=>{this.autoRenderingEnabled&&this.scheduleRender()});const i=()=>({vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),n=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??i(),t=e.properties??={};if(t.key??=r,Ae(e.vnodeSelector)){if(!this.visible)return i()}else this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="";let n=0;return e.children?.forEach(e=>{Ae(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${n++}`)}),ye(this,e)};this.render=()=>{if($e)return n();let e=(t=this,Ue.get(t)??null);var t;if(e)return e;this._trackingTarget.clear(),$e=!0;try{e=(0,T.a)(this._trackingTarget,n)}catch(t){throw I.A.getLogger(this).error(t),t}finally{$e=!1}return e&&function(e,t){Ue.set(e,t)}(this,e),e};const o=this.beforeFirstRender();o?this._resourcesFetch=o.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),function(e){ke.add(e),e.finally(()=>ke.delete(e)).catch(()=>{})}(this._resourcesFetch)}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(c.jH):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||((0,A.pR)(this._trackingTarget),this.viewModel?.destroyed||this.viewModel?.destroying||(0,A.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this.render=()=>null,this._projector=null,Te(this))}get container(){return this._get("container")}set container(e){this._get("container")||this._set("container",function(e){return"string"==typeof e?document.getElementById(e):e??null}(e))}get destroyed(){return super.destroyed}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+je++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(Le=ge,Ee=ge,fe)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw new Error("not implemented")}removeContainer(){this._set("container",null)}scheduleRender(){this.destroyed||(Te(this),this._projector.scheduleRender())}classes(...e){return Me.apply(this,e)}renderNow(){Te(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,U.wB)(()=>this.viewModel,(e,t)=>{t&&this.removeHandles("delegated-events"),e&&(0,l.wb)(e)&&this.addHandles(this._delegatedEventNames.map(t=>(0,l.on)(e,t,e=>{this.emit(t,e)})),"delegated-events")},U.pc)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(c.jH),this.scheduleRender()};this.addHandles([(0,_.oQ)(e),(0,U.wB)(()=>this.uiStrings,e)]),this.addHandles((0,U.z7)(()=>this.container,e=>{this.destroyed||(e.closest("[arcgis-widget-wrapped]")||(this.topLayerDisabled=!0,this.announceDeprecation?.()),this._attach(e))},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"_readyForTrueRender",void 0),(0,p.Cg)([(0,g.MZ)({value:null})],Fe.prototype,"container",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"icon",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"id",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"label",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"renderable",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"uiStrings",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"viewModel",void 0),(0,p.Cg)([(0,g.MZ)({value:!0})],Fe.prototype,"visible",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"key",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"children",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"afterCreate",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"afterUpdate",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"afterRemoved",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"topLayerDisabled",void 0),Fe=(0,p.Cg)([(0,g.$K)("esri.widgets.Widget")],Fe);const Ve=Fe,Be="esri-identity-modal",ze={base:Be,info:`${Be}__info`,notice:`${Be}__notice`};let He=class extends Ve{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return function(e){const t=[];for(const r of Object.keys(e))customElements.get(`calcite-${r}`)||t.push(e[r]?.());return t.length>0?Promise.all(t):null}({button:()=>Promise.all([r.e(7006),r.e(1262),r.e(2368)]).then(r.bind(r,92368)),dialog:()=>Promise.all([r.e(7006),r.e(1262),r.e(5929)]).then(r.bind(r,25929)),input:()=>Promise.all([r.e(7006),r.e(1262),r.e(4591)]).then(r.bind(r,84591)),label:()=>Promise.all([r.e(7006),r.e(6796)]).then(r.bind(r,16796)),notice:()=>Promise.all([r.e(7006),r.e(1262),r.e(9030)]).then(r.bind(r,59030))})}get title(){return this.commonMessages?.auth.signIn}render(){const{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:i,server:n,resource:o,error:a}=this,{info:l,oAuthInfo:h,lblItem:d,invalidUser:c,noAuthService:u,lblUser:p,lblPwd:g,lblCancel:f,lblSigning:m,lblOk:v}=r;return Ne("div",{class:this.classes(ze.base,S(this.container))},Ne("form",{bind:this,onsubmit:this._submit},Ne("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",width:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},Ne("div",{class:ze.info},(0,_.V2)(i?h:l,{server:n&&/\.arcgis\.com/i.test(n)?"ArcGIS Online":n,resource:`(${o||d})`})),a?Ne("calcite-notice",{class:ze.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Ne("div",{slot:"message"},a.details?.httpStatus?c:u)):null,i?null:[Ne("calcite-label",null,p,Ne("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Ne("calcite-label",null,g,Ne("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],Ne("calcite-button",{appearance:"outline",bind:this,slot:"footer-end",type:"button",onclick:this._cancel},f),Ne("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?m:v))))}_focusUsernameInput(){return async function(e,t){const r=(0,c.YL)(t,1e4),s=(0,c.Mq)(r);await(0,xe.$m)(s);const i=e();if(!i)return;const n=async()=>{"setFocus"in i&&"function"==typeof i.setFocus?await i.setFocus():i instanceof HTMLElement&&i.focus()};for(true;!Pe(i)&&!(0,c.G4)(r);)await(0,xe.$m)(s),await n()}(()=>this._usernameInputNode)}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,p.Cg)([(0,g.MZ)({readOnly:!0})],He.prototype,"container",void 0),(0,p.Cg)([(0,g.MZ)(),De("esri/t9n/common")],He.prototype,"commonMessages",void 0),(0,p.Cg)([(0,g.MZ)()],He.prototype,"error",void 0),(0,p.Cg)([(0,g.MZ)(),De("esri/identity/t9n/identity")],He.prototype,"messages",void 0),(0,p.Cg)([(0,g.MZ)()],He.prototype,"oAuthPrompt",void 0),(0,p.Cg)([(0,g.MZ)()],He.prototype,"open",void 0),(0,p.Cg)([(0,g.MZ)()],He.prototype,"signingIn",void 0),(0,p.Cg)([(0,g.MZ)()],He.prototype,"server",void 0),(0,p.Cg)([(0,g.MZ)({readOnly:!0})],He.prototype,"title",null),(0,p.Cg)([(0,g.MZ)()],He.prototype,"resource",void 0),He=(0,p.Cg)([(0,g.$K)("esri.identity.IdentityModal")],He);const We=He,Je="esriJSAPIOAuth";class Ge{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(Je,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken";(0,n.A)(e,{authMode:"anonymous",keepAlive:!0,method:"post",query:{f:"json",auth_token:this.refreshToken||this.token,client_id:t.appId,token_type_hint:this.refreshToken?"refresh_token":"access_token"}}).catch(()=>{})}if(t?.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(Je,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(Je);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}Ge.prototype.declaredClass="esri.identity.OAuthCredential";var Ye,Ke=r(25482);let Xe=class extends Ke.o{static{Ye=this}constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return Ye.fromJSON(this.toJSON())}};(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"appId",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"authNamespace",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"expiration",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"flowType",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"forceLogin",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"forceUserId",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"locale",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"minTimeUntilExpiration",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"popup",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"popupCallbackUrl",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"popupWindowFeatures",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"portalUrl",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"preserveUrlHash",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"userId",void 0),Xe=Ye=(0,p.Cg)([(0,g.$K)("esri.identity.OAuthInfo")],Xe);const Qe=Xe;let et=class extends Ke.o{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"adminTokenServiceUrl",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"currentVersion",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"hasPortal",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"hasServer",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"owningSystemUrl",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"owningTenant",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"server",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"shortLivedTokenValidity",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"tokenServiceUrl",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"webTierAuth",void 0),et=(0,p.Cg)([(0,g.$K)("esri.identity.ServerInfo")],et);const tt=et;var rt=r(39131);const st={},it=e=>{const t=new u.s0(e.owningSystemUrl).host,r=new u.s0(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},nt=(e,t)=>!!(it(e)&&t&&t.some(t=>t.test(e.server)));let ot=null,at=null;try{ot=window.localStorage,at=window.sessionStorage}catch{}class lt extends a.a${constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,u.An)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer|3DTilesServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const t=this.serverInfos;t?(e=e.filter(e=>!this.findServerInfo(e.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)})}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new tt,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new v({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,h.oy)({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new tt(t))}),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach(t=>{t.appId&&e.push(t.declaredClass?t:new Qe(t))}),e.length&&this.registerOAuthInfos(e)}s&&s.forEach(e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new v(e)).emitTokenChange(),this.credentials.push(e))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s=!1,i=!0;t&&(s=!(!t.token&&!t.credential),r=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,a=Promise.withResolvers();if(t.signal&&(0,c.u7)(t.signal,()=>{n.abort()}),(0,c.u7)(n,()=>{a.reject(new o.A("identity-manager:user-aborted","ABORTED"))}),(0,c.G4)(n))return a.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=s?this.findCredential(e):null;let d;if(h&&498===r?.details?.httpStatus)h.destroy();else if(h)return d=new o.A("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:r}),a.reject(d),a.promise;const p=this._findCredential(e,t);if(p)return a.resolve(p),a.promise;let g=this.findServerInfo(e);if(g)!g.hasPortal&&g.server&&g.owningSystemUrl&&this._hasSameServerInstance(g.server,g.owningSystemUrl)&&(g.hasPortal=!0),!g.hasServer&&this._isServerRsrc(e)&&(g._restInfoPms=this._getTokenSvcUrl(e),g.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return d=new o.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(d),a.promise;g=new tt,g.server=this._getServerInstanceRoot(e),"string"==typeof t?(g.tokenServiceUrl=t,g.hasPortal=!0):(g._restInfoPms=t,g.hasServer=!0),this.registerServers([g])}return g.hasPortal&&void 0===g._selfReq&&(i||(0,u.FX)(g.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(e=>e.tokenServiceUrl===g.tokenServiceUrl))&&(g._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(g.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,g,t,a,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),i=new u.s0(this._appOrigin),a=e.shortLivedTokenValidity;let l,h,d,c,p,g,f,m;t&&(m=this.tokenValidity||a||this._defaultTokenValidity,m>a&&a>0&&(m=a)),r&&(l=r.isAdmin,h=r.serverUrl,d=r.token,g=r.signal,f=r.ssl,e.customParameters=r.customParameters),l?c=e.adminTokenServiceUrl:(c=e.tokenServiceUrl,p=new u.s0(c.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!f&&"http"===i.scheme&&((0,u.FX)(i.uri,c,!0)||"https"===p.scheme&&i.host===p.host&&"7080"===i.port&&"7443"===p.port)&&(c=c.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const v={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:d,expiration:m,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:g};return s||(v.withCredentials=!1),(0,n.A)(c,v).then(r=>{const s=r.data;if(!s?.token)return new o.A("identity-manager:authentication-failed","Unable to generate token");const i=e.server;return st[i]||(st[i]={}),t&&(st[i][t.username]=t.password),s.validity=m,s})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then(i=>{let a;const l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r?.force))a=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};a=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};a=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,n.A)(a,{query:l,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new o.A("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}}).catch(e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw i.destroy(),new o.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new o.A("identity-manager:invalid-request","Bad request");return{credential:i}})}).then(e=>({credential:e.credential,viewOnly:s}))}setOAuthResponseHash(e){e&&(e.startsWith("#")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=Promise.withResolvers(),i=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},n=()=>{i(),this._oAuthDfd=null,s.reject(new o.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,c.u7)(r.signal,()=>{n()});const a=new We({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=a,this.emit("dialog-create");let l=a.on("cancel",n),h=a.on("submit",e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then(n=>{i();const o=new v({userId:e.username,server:t.server??void 0,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(o)}).catch(e=>{a.error=e,a.signingIn=!1})});return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=Promise.withResolvers();const i=this._oAuthDfd;let n;s?.signal&&(0,c.u7)(s.signal,()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&d()}),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;const a=r._oAuthCred;if(a.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,u.$1)(e),a.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=(0,u.$1)(e),a.save()||(a.codeVerifier=n=null)}else a.codeVerifier=null;let l,h;this._getCodeChallenge(n).then(i=>{const n=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!n)return void this._doOAuthSignIn(e,t,r,i);const o=new We({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=o,this.emit("dialog-create"),l=o.on("cancel",d),h=o.on("submit",()=>{p(),this._doOAuthSignIn(e,t,r,i)})});const d=()=>{p(),this._oAuthDfd=null,i.reject(new o.A("identity-manager:user-aborted","ABORTED"))},p=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return i.promise}async refreshToken(e){const t=this.findServerInfo(e.server),r=t?.owningSystemUrl,s=!!r&&"server"===e.scope,i=s&&nt(t,this._legacyFed),n=t.webTierAuth,o=n&&this.normalizeWebTierAuth,a=st[e.server],l=a?.[e.userId];let h,d=e.resources&&e.resources[0],c=s?this.findServerInfo(r):null,u={username:e.userId,password:l};if(n&&!o)return;s&&!c&&this.serverInfos.some(e=>(this._isIdProvider(r,e.server)&&(c=e),!!c));const p=c?this.findCredential(c.server,e.userId):null;if(!s||p){if(!i){if(s)h={serverUrl:d,token:p?.token,ssl:p?.ssl};else if(o)u=null,h={ssl:e.ssl};else{if(!l){let r;return d&&(d=this._sanitizeUrl(d),e._enqueued=1,r=this._enqueue(d,t,null,null,e.isAdmin,e),r.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),r}e.isAdmin&&(h={isAdmin:!0})}return this.generateToken(s?c:t,s?null:u,h).then(t=>{e.token=t.token,e.expires=null!=t.expires?Number(t.expires):null,e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}p?.refreshToken()}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{const r=this.findServerInfo(t.server),s=r?.owningSystemUrl;t!==e&&t.userId===e.userId&&s&&"server"===t.scope&&(this._hasSameServerInstance(e.server,s)||this._isIdProvider(s,e.server))&&(nt(r,this._legacyFed)?(t.token=e.token,t.expires=e.expires,t.creationTime=e.creationTime,t.validity=e.validity,t.emitTokenChange()):t.refreshToken())})}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(e=>{e.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,l.on)(window,"message",t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then(e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)}).catch(e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));const t=(0,u.zf)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){t.startsWith("?")&&(t=t.slice(1));const e=(0,u.zf)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});const r=(0,u.x0)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,n.A)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then(e=>e.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return(0,u.$1)(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new o.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t?.token,l=t?.resource,h=this._isServerRsrc(e)?"server":"portal",d=this.credentials.filter(t=>this._hasSameServerInstance(t.server,e)&&t.scope===h);if(e=l||e,d.length)if(1===d.length){if(r=d[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(d.some(a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!(0,u.FX)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,u.FX)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new u.s0(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,rt.$E)(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=(0,rt.qG)(e),t=(0,rt.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){const t=(i.A.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.slice(r+t.length+1)),e=(0,u.S8)(e),(0,u.An)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new u.s0(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some(e=>e.regex.test(t.uri));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||i.A.portalUrl&&(s=(0,u.FX)(t,i.A.portalUrl,!0)),s||(s=this._portals.some(e=>this._hasSameServerInstance(e,t.uri))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)});let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&it(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,n.A)(e=s+"/rest/info",{query:{f:"json"}}).then(e=>e.data),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some(r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t)),t||this._portals.some(r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t)),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.slice(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new u.s0(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then(i=>{const n=new v({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?ot:at,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n})}const i=new v({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?ot:at,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new o.A(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(e=>{t.resolve(e)}).catch(e=>{t.reject(e)})}_setOAuthResponseQueryString(e){e&&(e.startsWith("?")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}async _exchangeToken(e,t,r){return(await(0,n.A)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}})).data.token}async _getPlatformSelf(e,t){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const r=await(0,n.A)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,r.data}catch(e){throw"OAUTH_0066"===e.details?.messageCode&&(this._getPlatformSelfError=[e,Date.now()]),e}}_getPortalSelf(e,t){let r;return this._gwDomains.some(t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r)),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,n.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,u.FX)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,u.zs)(n)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!i)&&r(new o.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),i}_enqueue(e,t,r,s,i,n){return s||(s=Promise.withResolvers()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach(e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),o.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,n,a,h)=>{const d=e.sinfo_,p=!e.options_||!1!==e.options_.prompt,g=d.hasPortal&&this._findOAuthInfo(e.resUrl_);let f,m;if(i)t(new v({userId:i,server:d.server??void 0,token:a??void 0,expires:null!=h?Number(h):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,l.on)(window,"message",e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new v(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(o.A.fromJSON(e.data.error))))});(0,c.u7)(e.options_?.signal,()=>{s.remove()})}else if(g){let i=g._oAuthCred;if(!i){const e=new Ge(g,ot),t=new Ge(g,at);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,g._oAuthCred=i}if(i.isValid()){f=new v({userId:i.userId??void 0,server:d.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});const n=g.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);n||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(d.server,i.refreshToken,i.appId).then(e=>(f.expires=Date.now()+1e3*e.expires_in,f.token=e.access_token,f)):Promise.resolve(f),e._pendingDfd.then(e=>n?this._exchangeToken(e.server,g.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{const t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),s()):r(e)})):t(f)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(g.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,g,d).then(e=>{t(e)}).catch(r)}else{const s=()=>{p?e._pendingDfd=this.oAuthSignIn(e.resUrl_,d,g,e.options_).then(t,r):(m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(d.server,g.appId).then(e=>{(0,u.FX)(e.portalUrl,this._appOrigin,!0)?(f=new v({userId:e.username,server:d.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(f)):s()}).catch(s):s()}}else if(p){if(this._checkProtocol(e.resUrl_,d,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,d,s).then(t,r)}}else m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m)},i=()=>{const s=e.sinfo_,i=s.owningSystemUrl,n=e.options_;let o,a,l;if(n&&(o=n.token,a=n.prompt),l=this._findCredential(i,{resource:e.resUrl_}),!l)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){l=e;break}if(l){const i=this.findCredential(e.resUrl_,l.userId);if(i)t(i);else if(nt(s,this._legacyFed)){const e=l.toJSON();e.server=s.server,e.resources=null,t(new v(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(l.server),null,{serverUrl:e.resUrl_,token:l.token,signal:e.options_.signal,ssl:l.ssl})).then(r=>{t(new v({userId:l?.userId,server:s.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))},r)}else this._busy=null,o&&(e.options_.token=null),(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,prompt:a})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,a=this._isServerRsrc(e.resUrl_),h=e.sinfo_._restInfoPms;h?h.promise.then(t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,d.wc)("authInfo.tokenServicesUrl",t)||(0,d.wc)("authInfo.tokenServiceUrl",t)||(0,d.wc)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,d.wc)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}a&&r.owningSystemUrl?i():s()},()=>{e.sinfo_._restInfoPms=null;const t=new o.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)}):a&&n?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{const r={};let s,i,n,o;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch(()=>null).then(e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r)):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>r):r}).catch(()=>null).then(t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()}):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const i=e.customBaseUrl,o=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=this._appUrlObj.path;const e=r.search(/\/(apps|home)\//);r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,n.A)(r+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new Qe({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})})):t=Promise.resolve(),t.then(()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,n.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:o,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,u.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&i?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+i:t.portalUrl=s,t.popup=window!==window.top||!((0,u.FX)(s,this._appOrigin)||this._gwDomains.some(e=>e.regex.test(s)&&e.regex.test(this._appOrigin))),this.oAuthInfos.push(t)}})})}_doOAuthSignIn(e,t,r,s){const i=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),i.stateUID&&(n.uid=i.stateUID);const a={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(a.force_login=!0),r.forceUserId&&r.userId&&(a.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(a.redirectToUserOrgUrl=!0),i.codeVerifier&&(a.code_challenge=s||i.codeVerifier,a.code_challenge_method=s?"S256":"plain");const h=this._getAuthorizeUrl(r.portalUrl),d=h+"?"+(0,u.x0)(a);if(r.popup){const e=window.open(d,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval(()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new o.A("identity-manager:user-aborted","ABORTED");e.reject(t)}}},500),this._oAuthOnPopupHandle=(0,l.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)});else{const e=new o.A("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:h,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=d}_getAuthorizeUrl(e){let t=e.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize";const r=(0,rt.py)(t);if(r?.portalHostname){const{customBaseUrl:e,portalHostname:t,urlKey:s}=r}return t}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,u.s2)(e.popupCallbackUrl);if(t){const e=(0,u.An)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach(t=>{delete e.query[t]}),(0,u.a6)(e.path,e.query)}return r}}lt.prototype.declaredClass="esri.identity.IdentityManagerBase";const ht=new lt;(0,s.Aq)(ht)},79783(e,t,r){r.d(t,{ud:()=>w,JK:()=>S,oQ:()=>I,V2:()=>k});var s=r(2741),i=r(97770),n=r(73444),o=r(10838),a=r(18047),l=r(53966),h=r(93637),d=r(799);const c=()=>l.A.getLogger("esri.intl.substitute");function u(e,t){switch(t.type){case"date":return(0,i.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return c().warn("missing format descriptor for key {key}"),g(e)}}function p(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return c().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):g(e)}}function g(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.Yq)(e):""}}var f=r(11254),m=r(49186);async function v(e){if(null!=y.fetchBundleAsset)return y.fetchBundleAsset(e);const t=await(0,f.A)(e,{responseType:"text"});return JSON.parse(t.data)}class _{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const i=t.exec(r);if(!i)throw new m.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const n=i[1]?`${i[1]}/`:"",a=i[2],l=(0,o.xO)(s),h=`${n}${a}.json`,d=l?`${n}${a}_${l}.json`:h;let c;try{c=await v(e(d))}catch(t){if(d===h)throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{c=await v(e(h))}catch(e){throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return c}(this.getAssetUrl,this.matcher,e,t)}}const y={},w=o.ud,S=n.JK,I=n.oQ,A=o.ao,k=function(e,t,r={}){const{format:s={}}=r;return(0,d.HC)(e,e=>function(e,t,r){let s,i;const n=e.indexOf(":");if(-1===n?s=e.trim():(s=e.slice(0,n).trim(),i=e.slice(n+1).trim()),!s)return"";const o=(0,h.wc)(s,t);if(null==o)return"";const a=(i?r?.[i]:null)??r?.[s];return a?u(o,a):i?p(o,i):g(o)}(e,t,s))};var U;A((U={pattern:"esri/",location:s.s},new _(U)))},97770(e,t,r){r.d(t,{Ey:()=>O,F8:()=>R,J2:()=>T,Yq:()=>x,_m:()=>b,iS:()=>P,wj:()=>M});var s=r(66552),i=r(73444),n=r(98623),o=r(92647);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},h={timeZone:"UTC"},d={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},p={year:"numeric",month:"long",weekday:"long",day:"numeric"},g={hour:"numeric",minute:"numeric"},f={...g,second:"numeric"},m={hourCycle:"h23"},v={...g,...m},_={...f,...m},y={"short-date":d,"short-date-short-time":{...d,...g},"short-date-short-time-24":{...d,...v},"short-date-long-time":{...d,...f},"short-date-long-time-24":{...d,..._},"short-date-le":d,"short-date-le-short-time":{...d,...g},"short-date-le-short-time-24":{...d,...v},"short-date-le-long-time":{...d,...f},"short-date-le-long-time-24":{...d,..._},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...g},"long-month-day-year-short-time-24":{...c,...v},"long-month-day-year-long-time":{...c,...f},"long-month-day-year-long-time-24":{...c,..._},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...g},"day-short-month-year-short-time-24":{...u,...v},"day-short-month-year-long-time":{...u,...f},"day-short-month-year-long-time-24":{...u,..._},"long-date":p,"long-date-short-time":{...p,...g},"long-date-short-time-24":{...p,...v},"long-date-long-time":{...p,...f},"long-date-long-time-24":{...p,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":g,"long-time":f},w=(0,s.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),S={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"},I=new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)),A=I.find(({type:e})=>"month"===e)?.value.toLowerCase();function k(){const e=(0,i.lR)();return(e&&S[e])??(0,i.QC)()}"mart"!==A&&(S.bs="sr-Latn-CS");let U=new WeakMap;const C=y["short-date-short-time"];function T(e){return y[e]}function b(e){const{dateStyle:t,timeStyle:r,hour12:s,year:i,month:n}=e,o={};return t?o.dateStyle=t:i&&(o.year=i,o.month=n||void 0),r&&!o.year&&(o.timeStyle=r,o.hour12="auto"===s?void 0:"always"===s),o}function x(e,t=C){return function(e){let t=U.get(e);if(!t){const r=k(),s=M(e.timeZone??"system"),i={...e,timeZone:s};t=new Intl.DateTimeFormat(r,i),U.set(e,t)}return t}(t).format(e)}function P(e,t=C){return x(new Date(e),{...t,...h,...l})}function R(e,t=C){return x(new Date(`1970-01-01T${e}Z`),{...t,...h,...a})}function O(e,t=C){const r=o.c9.fromISO(e,{setZone:!0});if(!r.isValid)return e;if(t.timeZone)return x(r.toJSDate(),t);const s=0===r.offset?"UTC":t.timeZone,i={...t,timeZone:s};return r.toLocaleString(i,{locale:k()})}function M(e){switch(e){case"system":return n.N;case n.L:return"UTC";default:return e}}(0,i.Ml)(()=>{U=new WeakMap}),r.d(t,["_v",0,w])},10838(e,t,r){r.d(t,{ao:()=>c,ud:()=>u,xO:()=>p});var s=r(49186),i=r(36563),n=r(73444);const o={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:"no",nl:!0,no:!0,nn:"no",pl:!0,pt:"pt-BR","pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,zh:"zh-CN","zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function a(e){if(function(e){return e in o}(e)){const t=o[e];return!0===t?e:t}return null}const l=[],h=new Map;function d(e){for(const t of h.keys())g(e.pattern,t)&&h.delete(t)}function c(e){return l.includes(e)||(d(e),l.unshift(e)),(0,i.hA)(()=>{const t=l.indexOf(e);t>-1&&(l.splice(t,1),d(e))})}async function u(e){const t=(0,n.JK)();h.has(e)||h.set(e,async function(e,t){const r=[];for(const s of l)if(g(s.pattern,e))try{return await s.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new s.A("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new s.A("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=h.get(e);return r&&await f.add(r),r}function p(e){const t=(0,n.lR)(e);return t?a(e)??a(t):null}function g(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,n.Ml)(()=>{h.clear()});const f=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then(()=>this._decrease(),()=>this._decrease()),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=Promise.withResolvers())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18047(e,t,r){r.d(t,{Up:()=>l,ZV:()=>h,yx:()=>a});var s=r(73444);const i={ar:"ar-u-nu-latn",bs:"sr-Latn-CS",nn:"no-NN"};let n=new WeakMap,o={};function a(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e){const{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:s}=e;return{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:"auto"===s?"auto":"always"===s}}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const r=(0,s.lR)(),o=r&&i[r]||(0,s.QC)();n.set(t,new Intl.NumberFormat(o,e))}return n.get(t)}(t).format(e)}(0,s.Ml)(()=>{n=new WeakMap,o={}}),new Map}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5856],{35856(t,e,n){n.r(e),n.d(e,{SplatSortWorkerInput:()=>s,SplatSortWorkerOutput:()=>r,clear:()=>M,destroy:()=>k,sort:()=>m});class s{constructor(t,e,n,s,r,i,o,l,a=!1){this.addedTiles=t,this.removedTileHandles=e,this.visibleTileHandles=n,this.sortedAtlasIndices=s,this.numGaussians=r,this.directionX=i,this.directionY=o,this.directionZ=l,this.preciseSort=a}}class r{constructor(t){this.sortedAtlasIndices=t}}let i=null,o=0,l=null,a=0,c=null,u=0;const d=new Map;function f(t,e){let n=Math.max(1,t);for(;n<e;)n=Math.ceil(1.5*n);return n}function h(t){t>o&&(o=f(o,t),i=new Uint32Array(o)),i.fill(0,0,t)}function w(t){t<=a||(a=f(a,t),l=new Float64Array(a))}function g(t){return t>u&&(u=f(u,t),c=new Uint32Array(u)),c}function p(t,e,n){const s=t.length,r=Math.max(10,Math.min(20,Math.round(Math.log2(s/.25)))),o=1+(1<<r);h(o);let l=t[0],a=t[0];for(let e=0;e<s;e++)l=Math.min(l,t[e]),a=Math.max(a,t[e]);const c=a-l,u=c>=1e-6,f=u?(1<<r)/c:0;if(u)for(let e=0;e<s;e++){const n=(t[e]-l)*f>>>0;i[n]++}else i[0]=s;for(let t=1;t<o;t++)i[t]+=i[t-1];let w=0;for(let s=0;s<e.length;s++){const r=d.get(e[s]);if(null==r)throw new Error("Gaussian splat sort worker is missing resident tile data");const o=w+r.gaussianCount;for(let e=0;e<r.pageIds.length&&w<o;e++){const s=1024*r.pageIds[e],a=Math.min(o-w,1024);for(let e=0;e<a;e++,w++){const r=u?(t[w]-l)*f>>>0:0;n[--i[r]]=s+e}}}if(w!==s)throw new Error("Gaussian splat sort worker received inconsistent resident tile data")}async function m(t){const{addedTiles:e,removedTileHandles:n,visibleTileHandles:s,sortedAtlasIndices:i,numGaussians:o,directionX:a,directionY:c,directionZ:u,preciseSort:f}=t;for(let t=0;t<n.length;t++)d.delete(n[t]);for(let t=0;t<e.length;t++){const n=e[t];d.set(n.handle,n)}if(0===o)return{result:new r(i),transferList:[i.buffer]};w(o);const h=l.subarray(0,o),m=i.subarray(0,o);let k=0;for(let t=0;t<s.length;t++){const e=d.get(s[t]);if(null==e)throw new Error("Gaussian splat sort worker is missing resident tile data");const{relativePositions:n,gaussianCount:r,originX:i,originY:o,originZ:l}=e,f=k+r,w=a*i+c*o+u*l;for(let t=0;k<f;k++,t+=3)h[k]=n[t]*a+n[t+1]*c+n[t+2]*u+w}if(k!==o)throw new Error("Gaussian splat sort worker received inconsistent resident tile data");if(f){const t=g(o).subarray(0,o);!function(t,e){let n=0;for(let s=0;s<t.length;s++){const r=d.get(t[s]);if(null==r)throw new Error("Gaussian splat sort worker is missing resident tile data");const i=n+r.gaussianCount;for(let t=0;t<r.pageIds.length&&n<i;t++){const s=1024*r.pageIds[t],o=Math.min(i-n,1024);for(let t=0;t<o;t++,n++)e[n]=s+t}}if(n!==e.length)throw new Error("Gaussian splat sort worker received inconsistent resident tile data")}(s,t);const e=new Array(o);for(let t=0;t<o;t++)e[t]=t;e.sort((t,e)=>h[t]-h[e]||t-e);for(let n=0;n<o;n++)m[n]=t[e[n]]}else o>0&&p(h,s,m);return{result:new r(i),transferList:[i.buffer]}}function k(){M()}function M(){d.clear(),l=null,a=0,c=null,u=0,i=null,o=0}}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see ffd5285c7b2c83208f87.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4591],{29255(e,t,i){function n(e){return"Enter"===e||" "===e}i.d(t,{i:()=>n}),i.d(t,["n",0,["0","1","2","3","4","5","6","7","8","9"]])},60850(e,t,i){function n(e){return e.label||e.labelEl?.textContent?.trim()||""}i.d(t,{g:()=>n})},54553(e,t,i){i.d(t,{i:()=>r});const n="calcite-action",a={button:e=>`${n}-${e}-button`,indicator:e=>`${n}-${e}-indicator`};function r(e){return"CALCITE-ACTION"===e?.tagName}i.d(t,["C",0,{button:"button",buttonTextVisible:"button--text-visible",buttonCompact:"button--compact",iconContainer:"icon-container",slotContainer:"slot-container",slotContainerHidden:"slot-container--hidden",textContainer:"text-container",textContainerVisible:"text-container--visible",indicatorWithIcon:"indicator-with-icon",indicatorWithoutIcon:"indicator-without-icon"},"I",0,a])},24185(e,t,i){i.d(t,{a:()=>x});var n=i(57791),a=i(78948);const r=(0,n.aK)((e,t)=>{t.onConnected(()=>{m(e)}),t.onDisconnected(()=>{!function(e){if(!e)return;if(b.delete(e),document.removeEventListener(o,p.get(e)),document.removeEventListener(c,h.get(e)),p.delete(e),h.delete(e),!e.labelEl)return;const t=d.get(e.labelEl);1===t.length&&(e.labelEl.removeEventListener(l,u.get(e.labelEl)),u.delete(e.labelEl)),d.set(e.labelEl,t.filter(t=>t!==e).sort(g)),e.labelEl=void 0}(e)})}),l="calciteInternalLabelClick",o="calciteInternalLabelConnected",c="calciteInternalLabelDisconnected",s="calcite-label",d=new WeakMap,u=new WeakMap,p=new WeakMap,h=new WeakMap,b=new Set;function m(e){if(!e)return;const t=(e=>{const{id:t}=e,i=t&&(0,a.r)(e,{selector:`${s}[for="${t}"]`});if(i)return i;const n=(0,a.c)(e,s);return!n||function(e,t){let i;const n="custom-element-ancestor-check",a=n=>{n.stopImmediatePropagation();const a=n.composedPath();i=a.slice(a.indexOf(t),a.indexOf(e))};return e.addEventListener(n,a,{once:!0}),t.dispatchEvent(new CustomEvent(n,{composed:!0,bubbles:!0})),e.removeEventListener(n,a),i.filter(i=>i!==t&&i!==e).filter(e=>e.tagName?.includes("-")).length>0}(n,e)?null:n})(e.el);if(t&&u.has(t)&&t===e.labelEl||!t&&b.has(e))return;const i=y.bind(e);if(t){e.labelEl=t;const n=d.get(t)||[];n.push(e),d.set(t,n.sort(g)),u.has(e.labelEl)||(u.set(e.labelEl,v),e.labelEl.addEventListener(l,v)),b.delete(e),document.removeEventListener(o,p.get(e)),h.set(e,i),document.addEventListener(c,i)}else b.has(e)||(i(),document.removeEventListener(c,h.get(e)))}function g(e,t){return(0,a.t)(e.el,t.el)?-1:1}function v(e){const t=e.detail.sourceEvent.target,i=d.get(this),n=i.find(e=>e.el===t);if(n&&i.includes(n))return;const a=i[0];a.disabled||a.onLabelClick(e)}function f(){b.has(this)&&m(this)}function y(){b.add(this);const e=p.get(this)||f.bind(this);p.set(this,e),document.addEventListener(o,e)}async function x(e){if(await e.componentOnReady(),d.has(e))return;const t=e.for&&e.ownerDocument?.getElementById(e.for);t&&requestAnimationFrame(()=>{for(const e of b)if(e.el===t){m(e);break}})}i.d(t,["b",0,c,"l",0,o,"u",0,r])},63738(e,t,i){i(31873),i(3366);var n=i(61476),a=i(46913),r=i(1715),l=i(19313),o=i(5576),c=i(80423),s=i(98903),d=i(32339),u=i(25552),p=i(35407),h=i(33755),b=i(58025),m=i(54553);const g=a.AH`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-action-font-size: var(--calcite-font-size--2);--calcite-internal-action-min-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size--1);--calcite-internal-action-min-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-0);--calcite-internal-action-min-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm-plus)}:host{display:flex;cursor:pointer;background-color:transparent;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-action-corner-radius-start-start, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius-xs)))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs)}.button{position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;outline-color:transparent;box-sizing:border-box;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height, var(--calcite-internal-action-min-height));max-block-size:var(--calcite-internal-action-height, none);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}.button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0;transition-property:opacity;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:inline-size}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-3));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-3))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}:host([loading]) calcite-loader[inline]{margin-inline-end:0px;--calcite-loader-progress-color-inline: var(--calcite-action-loader-color)}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([appearance=transparent]) .button{transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);background-color:var(--calcite-action-background-color, var(--calcite-color-transparent))}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-transparent-hover))}:host([appearance=transparent]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([selection-appearance=highlight]):host([active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{margin-inline:.25rem;inline-size:1rem;position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.125rem;inset-inline-end:-.125rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.175rem;inset-inline-end:-.175rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,v=a.AH`.screen-reader-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}`;class f extends o.WF{constructor(){super(...arguments),this.guid=(0,c.g)(),this.buttonRef=(0,l._)(),this.buttonId=m.I.button(this.guid),this.mutationObserver=(0,s.c)("mutation",()=>this.requestUpdate()),this.messages=(0,u.u)({blocking:!0}),this.focusSetter=(0,p.u)()(this),this.indicatorRef=(0,l._)(),this.interactiveContainer=(0,h.u)(this),this.formTrigger=(0,b.u)()(this),this.labelElRef=(0,l._)(),this.active=!1,this.activeDescendant=!1,this.appearance="transparent",this.compact=!1,this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.overflowDisabled=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button"}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],compact:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overflowDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=[g,v]}async setFocus(e){return this.focusSetter(()=>this.buttonRef.value,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}getAccessibleLabel(){const e=this.label||this.text||"";return this.indicator?this.messages.indicatorLabel.replace("{label}",e):e}getLabelledByElements(){const e=[...this.labelElRef.value?[this.labelElRef.value]:[],...this.aria?.labelledByElements??[]];return e.length?e:void 0}renderTextContainer(){const{text:e,textEnabled:t}=this,i={[m.C.textContainer]:!0,[m.C.textContainerVisible]:t};return e?(0,r.D)("text-container",a.qy`<div aria-hidden=true class=${(0,o.CP)(i)}>${e}</div>`):null}renderIndicatorText(){const{indicator:e,messages:t,buttonId:i}=this;return a.qy`<div aria-labelledby=${i??o.s6} aria-live=polite class=${(0,o.CP)(n.C.screenReaderText)} role=region ${(0,l.K)(this.indicatorRef)}>${e?t.indicator:null}</div>`}renderIconContainer(){const{loading:e,icon:t,scale:i,el:n,iconFlipRtl:l,indicator:c}=this,s="l"===i?"l":"m",u=e?a.qy`<calcite-loader inline .label=${this.messages.loading} .scale=${s}></calcite-loader>`:null,p=t?a.qy`<calcite-icon class=${(0,o.CP)({[m.C.indicatorWithIcon]:c})} .flipRtl=${l} .icon=${t} .scale=${(0,d.g)(this.scale)}></calcite-icon>`:null,h=u||p,b=h||n.children?.length,g=a.qy`<div class=${(0,o.CP)({[m.C.slotContainer]:!0,[m.C.slotContainerHidden]:e})}><slot></slot></div>`;return b?(0,r.D)("icon-container",a.qy`<div aria-hidden=true class=${(0,o.CP)(m.C.iconContainer)}>${h}${g}</div>`):null}renderLabel(){const e=this.getAccessibleLabel();return e?a.qy`<span class=${(0,o.CP)(n.C.screenReaderText)} ${(0,l.K)(this.labelElRef)}>${e}</span>`:null}renderButton(){const{compact:e,disabled:t,icon:i,loading:n,textEnabled:c,indicator:s,indicatorRef:d,buttonId:u}=this,p=this.getLabelledByElements(),h={[m.C.button]:!0,[m.C.buttonTextVisible]:c,[m.C.buttonCompact]:e},b=a.qy`${this.renderIconContainer()}${this.renderTextContainer()}${!i&&s&&(0,r.D)("indicator-no-icon",a.qy`<div class=${(0,o.CP)(m.C.indicatorWithoutIcon)}></div>`)||""}${this.renderLabel()}`,g=s&&d.value?[d.value]:[],v=[...this.aria?.controlsElements??[],...g];return this.dragHandle?a.qy`<span .ariaBusy=${n} .ariaControlsElements=${v} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabelledByElements=${p} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${(0,o.CP)(h)} id=${u??o.s6} role=button tabindex=${(this.disabled?void 0:0)??o.s6} ${(0,l.K)(this.buttonRef)}>${b}</span>`:a.qy`<button .ariaBusy=${n} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${v} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabelledByElements=${p} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${(0,o.CP)(h)} .disabled=${t} id=${u??o.s6} .role=${this.aria?.role} type=${this.type??o.s6} ${(0,l.K)(this.buttonRef)}>${b}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:a.qy`${this.renderButton()}${this.renderIndicatorText()}`})}}(0,n.c)("calcite-action",f)},84591(e,t,i){i.r(t),i.d(t,{Input:()=>Ce}),i(63738),i(3366);var n=i(61476),a=i(46913),r=i(5576),l=i(78948);const o={valid:"check-circle",invalid:"exclamation-mark-triangle",idle:"information"},c=a.AH`:host{box-sizing:border-box;display:flex;block-size:auto;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);opacity:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;margin-block-start:var(--calcite-input-message-spacing, var(--calcite-input-message-spacing-value, var(--calcite-spacing-xxs)))}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;margin-inline-end:var(--calcite-spacing-sm)}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-input-message-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-status-danger))))}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-input-message-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-status-success))))}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-input-message-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-brand))))}:host([scale=s]){font-size:var(--calcite-font-size-relative-xs);line-height:var(--calcite-font-line-height-xs)}:host([scale=m]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=l]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([hidden]){display:none}[hidden]{display:none}`;class s extends r.WF{constructor(){super(...arguments),this.iconFlipRtl=!1,this.scale="m",this.status="idle"}static{this.properties={icon:[3,{converter:r.pf},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}]}}static{this.styles=c}connectedCallback(){super.connectedCallback(),this.requestedIcon=(0,l.d)(o,this.icon,this.status)}willUpdate(e){(e.has("status")&&(this.hasUpdated||"idle"!==this.status)||e.has("icon"))&&(this.requestedIcon=(0,l.d)(o,this.icon,this.status))}render(){const e=this.el.hidden;return(0,r.Bq)(this.el,"calcite-hydrated-hidden",e),a.qy`${this.renderIcon(this.requestedIcon)}<slot></slot>`}renderIcon(e){return e?a.qy`<calcite-icon class=${(0,r.CP)("calcite-input-message-icon")} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`:e}}(0,n.c)("calcite-input-message",s);var d=i(57791);const u=a.AH`:host{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:var(--calcite-z-index);inline-size:100%;overflow:hidden;background-color:var(--calcite-progress-background-color, var(--calcite-color-border-3))}.bar{z-index:var(--calcite-z-index);background-color:var(--calcite-progress-fill-color, var(--calcite-color-brand))}@media(forced-colors:active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) / var(--calcite-internal-duration-factor) * 11 / var(--calcite-internal-duration-factor)) linear infinite}.indeterminate.calcite--rtl{animation-name:looping-progress-bar-ani-rtl}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-progress-text-color, var(--calcite-color-text-2))}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%,0,0)}50%{inline-size:40%}to{transform:translate3d(600%,0,0)}}@keyframes looping-progress-bar-ani-rtl{0%{transform:translate3d(100%,0,0)}50%{inline-size:40%}to{transform:translate3d(-600%,0,0)}}:host([hidden]){display:none}[hidden]{display:none}`,p="bar";class h extends r.WF{constructor(){super(...arguments),this.direction=(0,d.jH)(),this.reversed=!1,this.type="determinate",this.value=0}static{this.properties={label:1,reversed:[7,{},{reflect:!0,type:Boolean}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=u}render(){const e="determinate"===this.type,t=e?{width:`${this.value}%`}:{},i=this.direction;return a.qy`<div .ariaLabel=${this.label||this.text} .ariaValueMax=${e?"100":void 0} .ariaValueMin=${e?"0":void 0} .ariaValueNow=${e?this.value:void 0} role=progressbar><div class=${(0,r.CP)("track")}><div class=${(0,r.CP)({[p]:!0,indeterminate:"indeterminate"===this.type,[n.C.rtl]:"rtl"===i,reversed:this.reversed})} style=${(0,r.zl)(t)}></div></div>${this.text?a.qy`<div class=${(0,r.CP)("text")}>${this.text}</div>`:null}</div>`}}(0,n.c)("calcite-progress",h);var b=i(81718),m=i(1715),g=i(19313),v=i(10225),f=i(29255),y=i(60850);const x=new RegExp("\\.(0+)?$"),k=new RegExp("0+$");class ${static{this.DECIMALS=100}static{this.ROUNDED=!0}static{this.SHIFT=BigInt("1"+"0".repeat(this.DECIMALS))}constructor(e){if(e instanceof $)return e;const[t,i]=function(e){const t=e.split(/[eE]/);if(1===t.length)return e;const i=+e;if(Number.isSafeInteger(i))return`${i}`;const n="-"===e.charAt(0),a=+t[1],r=t[0].split("."),l=(n?r[0].substring(1):r[0])||"",o=r[1]||"",c=a>0?`${l}${((e,t)=>{const i=t>e.length?`${e}${"0".repeat(t-e.length)}`:e;return`${i.slice(0,t)}.${i.slice(t)}`})(o,a)}`:`${((e,t)=>{const i=Math.abs(t)-e.length,n=i>0?`${"0".repeat(i)}${e}`:e;return`${n.slice(0,t)}.${n.slice(t)}`})(l,a)}${o}`;return`${n?"-":""}${"."===c.charAt(0)?"0":""}${c.replace(x,"").replace(E,"")}`}(e).split(".").concat("");this.value=BigInt(t+i.padEnd($.DECIMALS,"0").slice(0,$.DECIMALS))+BigInt($.ROUNDED&&i[$.DECIMALS]>="5"),this.isNegative="-"===e.charAt(0)}static{this._divRound=(e,t)=>$.fromBigInt(e/t+($.ROUNDED?e*BigInt(2)/t%BigInt(2):BigInt(0)))}static{this.fromBigInt=e=>Object.assign(Object.create($.prototype),{value:e,isNegative:e<BigInt(0)})}getIntegersAndDecimals(){const e=this.value.toString().replace("-","").padStart($.DECIMALS+1,"0");return{integers:e.slice(0,-$.DECIMALS),decimals:e.slice(-$.DECIMALS).replace(k,"")}}toString(){const{integers:e,decimals:t}=this.getIntegersAndDecimals();return`${this.isNegative?"-":""}${e}${t.length?"."+t:""}`}formatToParts(e){const{integers:t,decimals:i}=this.getIntegersAndDecimals(),n=e.numberFormatter.formatToParts(BigInt(t));return this.isNegative&&n.unshift({type:"minusSign",value:e.minusSign}),i.length&&(n.push({type:"decimal",value:e.decimal}),i.split("").forEach(e=>n.push({type:"fraction",value:e}))),n}format(e){const{integers:t,decimals:i}=this.getIntegersAndDecimals();return`${this.isNegative?e.minusSign:""}${e.numberFormatter.format(BigInt(t))}${i.length?`${e.decimal}${i.split("").map(t=>e.numberFormatter.format(Number(t))).join("")}`:""}`}add(e){return $.fromBigInt(this.value+new $(e).value)}subtract(e){return $.fromBigInt(this.value-new $(e).value)}multiply(e){return $._divRound(this.value*new $(e).value,$.SHIFT)}divide(e){return $._divRound(this.value*$.SHIFT,new $(e).value)}}function w(e){return!(!e||isNaN(Number(e)))}const E=/^([-0])0+(?=\d)/,C=/(?!^\.)\.$/,I=/(?!^-)-/g,z=/^-\b0\b\.?0*$/,V=/0*$/,S=new Set(["e","E","-",",",".",...f.n]);function B(e,t){if(!e)return e;const i=e.toLowerCase().indexOf("e")+1;return i?e.replace(/[eE]*$/g,"").substring(0,i).concat(e.slice(i).replace(/[eE]/g,"")).split(/[eE]/).map((e,i)=>t(1===i?e.replace(/\./g,""):e)).join("e").replace(/^e/,"1e"):t(e)}new Map(Object.entries({bg:{am:"пр.об.",pm:"сл.об."},bs:{am:"prijepodne",pm:"popodne"},ca:{am:"a. m.",pm:"p. m."},cs:{am:"dop.",pm:"odp."},es:{am:"a. m.",pm:"p. m."},"es-mx":{am:"a.m.",pm:"p.m."},"es-MX":{am:"a.m.",pm:"p.m."},fi:{am:"ap.",pm:"ip."},he:{am:"לפנה״צ",pm:"אחה״צ"},hu:{am:"de. ",pm:"du."},lt:{am:"priešpiet",pm:"popiet"},lv:{am:"priekšpusdienā",pm:"pēcpusdienā"},mk:{am:"претпл.",pm:"попл."},no:{am:"a.m.",pm:"p.m."},nl:{am:"a.m.",pm:"p.m."},"pt-pt":{am:"da manhã",pm:"da tarde"},"pt-PT":{am:"da manhã",pm:"da tarde"},ro:{am:"a.m.",pm:"p.m."},sl:{am:"dop.",pm:"pop."},sv:{am:"fm",pm:"em"},th:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง"},tr:{am:"ÖÖ",pm:"ÖS"},uk:{am:"дп",pm:"пп"},vi:{am:"SA",pm:"CH"}}));const N=["arab","arabext","latn"],R=e=>!(!N||!N.includes(e)),O=(new Intl.NumberFormat).resolvedOptions().numberingSystem,L="arab"!==O&&R(O)?O:"latn",F=new class{constructor(){this.delocalize=e=>this._numberFormatOptions?B(e,e=>this.#e(this.#t(e))):e,this.localize=e=>this._numberFormatOptions?B(e,e=>w(e.trim())?new $(e.trim()).format(this).replace(new RegExp(`[${this._actualGroup}]`,"g"),this._group):e):e}get group(){return this._group}get decimal(){return this._decimal}get minusSign(){return this._minusSign}get digits(){return this._digits}get numberFormatter(){return this._numberFormatter}get numberFormatOptions(){return this._numberFormatOptions}set numberFormatOptions(e){var t;if(e.numberingSystem=(t=e?.numberingSystem,R(t)?t:L),e.locale=e?.locale||"en",!this._numberFormatOptions&&"en"===e.locale&&e.numberingSystem===L&&2===Object.keys(e).length||JSON.stringify(this._numberFormatOptions)===JSON.stringify(e))return;this._numberFormatOptions=e,this._numberFormatter=new Intl.NumberFormat(this._numberFormatOptions.locale,this._numberFormatOptions),this._digits=[...new Intl.NumberFormat(this._numberFormatOptions.locale,{useGrouping:!1,numberingSystem:this._numberFormatOptions.numberingSystem}).format(9876543210)].reverse();const i=new Map(this._digits.map((e,t)=>[e,t])),n=new Intl.NumberFormat(this._numberFormatOptions.locale,{numberingSystem:this._numberFormatOptions.numberingSystem}).formatToParts(-12345678.9);this._actualGroup=n.find(e=>"group"===e.type).value,this._group=0===this._actualGroup.trim().length||" "==this._actualGroup?" ":this._actualGroup,this._decimal="bs"===e.locale||"mk"===e.locale?",":n.find(e=>"decimal"===e.type).value,this._minusSign=n.find(e=>"minusSign"===e.type).value,this._getDigitIndex=e=>`${i.get(e)??""}`}#e(e){return e.replace(new RegExp(`[${this._minusSign}]`,"g"),"-").replace(new RegExp(`[${this._digits.join("")}]`,"g"),this._getDigitIndex)}#t(e){if(this._group!==this._decimal)return e.replace(new RegExp(`[${this._group}]`,"g"),"").replace(new RegExp(`[${this._decimal}]`,"g"),".");const t=e.lastIndexOf(this._decimal);return-1===t?e:`${e.slice(0,t).replace(new RegExp(`[${this._group}]`,"g"),"")}.${e.slice(t+1)}`}};var P=i(24185),q=i(32339);const D="internal-label-alignment--center",M="internal-label-alignment--end",A="internal-label--container",_="internal-label-spacing--bottom",T="internal-label-spacing-inline--end",H="internal-label-spacing-inline--start",j=({alignmentCenter:e,bottomSpacingDisabled:t,labelText:i,onClick:n,required:l,spacingInlineEnd:o,spacingInlineStart:c,tooltipText:s})=>a.qy`<div class=${(0,r.CP)({[D]:e,[M]:!e,[A]:!0,[_]:!t,[T]:o,[H]:c})} @click=${n}><div class=${(0,r.CP)("internal-label--text")}>${i}${l&&a.qy`<span aria-hidden=true class=${(0,r.CP)("internal-label-required--indicator")} title=${s??a.s6}>*</span>`||""}</div><slot name=label-content></slot></div>`,K="inline-editable--container",U=({cancelEditingLabel:e,confirmChangesLabel:t,editingEnabled:i,enableEditingLabel:n,enableEditingButtonRef:l,loading:o,onCancelEditing:c,onConfirmChanges:s,onEnableEditing:d,scale:u,showControls:p})=>a.qy`<div class=${(0,r.CP)(K)}>${!i&&a.qy`<calcite-action .ariaLabel=${n} class=${(0,r.CP)("enable-editing")} icon=pencil @click=${d} .scale=${u} .text=${n} title=${n??a.s6} type=button ${(0,g.K)(l)}></calcite-action>`||""}${p&&[a.qy`<calcite-action .ariaLabel=${t} class=${(0,r.CP)("confirm-changes")} icon=check .loading=${o} @click=${s} .scale=${u} .text=${t} title=${t??a.s6} type=button></calcite-action>`,a.qy`<calcite-action .ariaLabel=${e} class=${(0,r.CP)("cancel-editing")} icon=x @click=${c} .scale=${u} .text=${e} title=${e??a.s6} type=button></calcite-action>`]||""}</div>`;class W{constructor(e){this.options=e,this.valuePriorToEditing=""}enable(){this.valuePriorToEditing=this.options.getValue(),this.options.setEditingEnabled(!0),requestAnimationFrame(()=>{this.options.setFocus()}),this.options.emitEnableEditingChange()}disable(){this.options.setEditingEnabled(!1)}cancelEditing(){this.options.setValue(this.valuePriorToEditing),this.disable(),this.options.emitCancel()}async confirm(e,t){this.options.emitConfirm();try{e&&(t?.(!0),await e(),this.disable())}finally{t?.(!1)}}}const G=()=>{},J=({scale:e,status:t,id:i,icon:n,message:l,ref:o})=>a.qy`<div class=${(0,r.CP)("validation-container")} ${(0,g.K)(o||G)}><calcite-input-message aria-live=polite .icon=${n} id=${i??a.s6} .scale=${e} .status=${t}>${l}</calcite-input-message></div>`;var Y=i(25552),X=i(35407),Q=i(33755);const Z=()=>{};var ee=i(35509),te=i(9225);const ie=["date","datetime-local","month","number","range","time","week"],ne=["email","password","search","tel","text","url"],ae=["email","password","search","tel","text","textarea","url"];function re(e,t,i,n){const a=i.toLowerCase(),r=e[i];n&&null!=r?t.setAttribute(a,`${r}`):t.removeAttribute(a)}const le=["text","email","search","hidden","tel","url"],oe=Object.freeze({validity:{},validationMessage:""});function ce(e,t){if("file"===e.type){e.value="";const i=!t||t instanceof FileList&&0===t.length;return!e.required||!i}return e.value=null==t?"":String(t),e.validity.valid}function se(e){const t={};for(const i in e)"valid"!==i&&e[i]&&(t[i]=!0);return t}const de=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"];function ue(e,t){"status"in e&&(e.status="idle"),!("validationIcon"in e)||e.validationIcon&&!0!==e.validationIcon||(e.validationIcon=!1),"validationMessage"in e&&e.validationMessage===t&&(e.validationMessage="")}function pe(e){return"checked"in e}const he=e=>(0,d.aK)((t,i)=>{let n,a="",r=null,o=e.inputType;function c(e){e.defaultPrevented||(e.preventDefault(),function(e){const t=Array.from(e.elements);requestAnimationFrame(()=>{const e=t.filter(e=>e.matches("[status=invalid]")&&function(e){return"form"in e&&"name"in e&&(0,l.q)(e)}(e));for(const t of e)if(t.validationMessage){t.setFocus();break}})}(e.currentTarget))}function s(){const e=a||n?.validationMessage||"";!function(e,{status:t,message:i,icon:n}){"status"in e&&(e.status=t),"validationIcon"in e&&"string"!=typeof e.validationIcon&&(e.validationIcon=n),"validationMessage"in e&&!e.validationMessage&&(e.validationMessage=i)}(t,{message:e,icon:!0,status:"invalid"}),t.el.dispatchEvent(new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0}));const i=(r=t.el.tagName.toLowerCase(),`${(0,te.YF)((0,te.TK)(r))}${de.includes(r)?"Input":"Change"}`);var r;t.listen(i,()=>{if(ue(t,e),"radio"===n?.type){const e=t.elementInternals.form?.elements.namedItem(t.name);if(e){const i=("length"in e?Array.from(e):[e]).filter(e=>e.tagName===t.el.tagName).filter(e=>e!==t.el);i?.length>0&&i.forEach(e=>{ue(e)})}}},{once:!0})}function d(){const{disabled:e,elementInternals:i}=t;let r={},l="";e||(n&&(n.type=o,function(e,t){const{disabled:i,name:n,required:a}=e;t.disabled=i,t.name=n||"",t.required=!!a,pe(e)?t.checked=e.checked:function(e,t){return e&&function(e){const t="textarea"===e?"text":e;return ie.includes(t)||ne.includes(t)||ae.includes(t)}(t.type)}(e,t)&&function(e,t,i){i.type=e;const n=ie.includes(e),a=t;re(a,i,"min",n),re(a,i,"max",n),re(a,i,"step",n);const r=ae.includes(e),l=t;re(l,i,"minLength",r),re(l,i,"maxLength",r),re(l,i,"pattern",ne.includes(e))}(t.type,e,t)}(t,n),({validity:r,validationMessage:l}=function({component:e,input:t,value:i}){if(!Array.isArray(i)){if(e&&"radio"===t.type){const i=e.elementInternals.form?.elements.namedItem(e.name);if(i){const n=("length"in i?Array.from(i):[i]).filter(t=>t.tagName===e.el.tagName),a=n.some(e=>e.required),r=n.some(e=>e.checked),l=n.filter(t=>t!==e.el),o=a&&!r;t.required=!!o;const c=se(t.validity),s=t.validationMessage;l?.length>0&&l.forEach(e=>{o!==e.validity?.valueMissing&&e.setValidity&&e.setValidity(c,s)})}}return ce(t,i)?oe:{validity:se(t.validity),validationMessage:t.validationMessage}}if(le.includes(t.type))return ce(t,i.join(","))?oe:{validity:se(t.validity),validationMessage:t.validationMessage};const n={},a=[];for(const e of i)ce(t,e)||(Object.assign(n,se(t.validity)),t.validationMessage&&a.push(t.validationMessage));return{validity:n,validationMessage:a.join("; ")}}({component:t,input:n,value:u()}))),a&&(r={...r,customError:!0},l=a)),i.setValidity(r,l),"validity"in t&&(0,ee.e)(()=>{t.validity=i.validity})}function u(){return e.getValue?e.getValue():t.value}return o&&(n=document.createElement("input")),t.listen("luminaFormResetCallback",()=>{"status"in t&&(t.status="idle"),"validationIcon"in t&&(t.validationIcon=!1),"validationMessage"in t&&(t.validationMessage=""),pe(t)&&(t.checked=t.defaultChecked),t.value=t.defaultValue}),t.listen("luminaFormAssociatedCallback",({detail:[e]})=>{e?e.addEventListener("invalid",c,{capture:!0}):r?.removeEventListener("invalid",c,{capture:!0}),r=e}),i.onConnected(()=>{t.el.addEventListener("invalid",s)}),i.onDisconnected(()=>{t.el.removeEventListener("invalid",s)}),i.onUpdate(e=>{t.hasUpdated||(t.defaultValue=t.value,pe(t)&&(t.defaultChecked=t.checked)),(e.has("name")||e.has("value")||pe(t)&&e.has("checked"))&&t.elementInternals.setFormValue(function(){const e=u();if(Array.isArray(e)||e instanceof FileList){const i=new FormData;for(const n of e)i.append(t.name,n);return i}return pe(t)?t.checked?e||"on":null:e}()),t.hasUpdated&&d()}),i.onLoaded(()=>d()),{get active(){return!!t.elementInternals.form},overrideDefaultValue:e=>{t.defaultValue=e},overrideInputType:e=>{o=e,d()},requestSubmit:()=>{t.elementInternals.form?.requestSubmit()},setCustomValidity:e=>{a=e,d()}}}),be="editing-enabled",me="inline-child",ge="inline-editable-child",ve="number-button-item--horizontal",fe="wrapper",ye="number-button-item",xe="has-suffix",ke="has-prefix",$e="inputValidationMessage",we={tel:"phone",password:"lock",email:"email-address",date:"calendar",time:"clock",search:"search"},Ee=a.AH`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;--calcite-internal-input-focus-outline-color: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) );--calcite-internal-input-number-button-item-height: auto}:host([scale=s]){--calcite-internal-input-icon-padding-inline: var(--calcite-spacing-fixed-sm)}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s]) input{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .has-prefix input{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=s]) .prefix{padding-inline:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]) .has-suffix input{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .suffix{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=s]) input[type=file]{min-block-size:1.5rem}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper{block-size:1.5rem}:host([scale=s]) .clear-button{block-size:var(--calcite-spacing-xxl)}:host([scale=s]):host([number-button-type=horizontal]){--calcite-internal-input-number-button-item-horizontal-padding: var(--calcite-spacing-xxs)}:host([scale=s]):host([number-button-type=vertical]){--calcite-internal-input-number-button-item-height: 8px;--calcite-internal-input-number-button-item-horizontal-padding: var(--calcite-spacing-xxs);--calcite-internal-input-number-button-item-vertical-padding: 3px}:host([scale=m]){--calcite-internal-input-icon-padding-inline: var(--calcite-spacing-fixed-md)}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) input{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .has-prefix input{padding-inline-start:var(--calcite-spacing-xs)}:host([scale=m]) .prefix{padding-inline:var(--calcite-spacing-md) var(--calcite-spacing-xs)}:host([scale=m]) .has-suffix input{padding-inline-end:var(--calcite-spacing-xs)}:host([scale=m]) .suffix{padding-inline:var(--calcite-spacing-xs) var(--calcite-spacing-md)}:host([scale=m]) input[type=file]{min-block-size:2rem}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper{block-size:2rem}:host([scale=m]):host([number-button-type=horizontal]){--calcite-internal-input-number-button-item-horizontal-padding: var(--calcite-space-sm)}:host([scale=m]):host([number-button-type=vertical]){--calcite-internal-input-number-button-item-height: 11px;--calcite-internal-input-number-button-item-horizontal-padding: var(--calcite-space-sm);--calcite-internal-input-number-button-item-vertical-padding: var(--calcite-space-2xs)}:host([scale=l]){--calcite-internal-input-icon-padding-inline: var(--calcite-spacing-fixed-lg)}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) input{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .has-prefix input{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .prefix{padding-inline:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=l]) .has-suffix input{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=l]) .suffix{padding-inline:var(--calcite-spacing-sm) var(--calcite-spacing-lg)}:host([scale=l]) input[type=file]{min-block-size:2.75rem}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper{block-size:2.75rem}:host([scale=l]):host([number-button-type=horizontal]){--calcite-internal-input-number-button-item-horizontal-padding: var(--calcite-spacing-sm-plus)}:host([scale=l]):host([number-button-type=vertical]){--calcite-internal-input-number-button-item-height: 16px;--calcite-internal-input-number-button-item-horizontal-padding: var(--calcite-spacing-sm-plus);--calcite-internal-input-number-button-item-vertical-padding: 5px}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}input{position:relative;margin:0;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;text-overflow:ellipsis;border-width:1px;border-style:solid;font-family:inherit;font-weight:var(--calcite-font-weight-normal);outline:none;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-text-color, var(--calcite-color-text-1));transition:var(--calcite-animation-timing),block-size 0,outline-offset 0s;-webkit-appearance:none}input:placeholder-shown{text-overflow:ellipsis}.element-wrapper,input{border-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}.has-prefix input,.element-wrapper:has(.icon) input{border-start-start-radius:0;border-end-start-radius:0}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=down]) input,.has-prefix input,.element-wrapper:has(.icon) input{border-inline-start-width:0}.element-wrapper:has(.clear-button) input,.has-suffix input,.element-wrapper:has(.number-button-item--horizontal[data-adjustment=up]) input,.element-wrapper:has(.number-button-item) input{border-inline-end-width:0}.has-suffix input,.element-wrapper:has(.clear-button) input,:host([number-button-type=vertical][type=number]) input,:host([number-button-type=horizontal]) .has-suffix .suffix,:host([number-button-type=vertical][type=number]) .has-suffix .suffix,:host([number-button-type=vertical][type=number]) .clear-button,:host([number-button-type=horizontal][type=number]) .clear-button{border-start-end-radius:0;border-end-end-radius:0}:host([number-button-type=horizontal]) input{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:0;border-end-end-radius:0}.has-prefix :is(.prefix:first-child,.loader+.prefix),:host([number-button-type=horizontal]) .number-button-item[data-adjustment=down],.element-wrapper:has(.icon) :is(.icon:first-child,.loader+.icon){border-start-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}.has-suffix .suffix,:host([number-button-type=vertical][type=number][read-only]) .has-suffix .suffix,:host([clearable]) .clear-button,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=up]{border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}:host([clearable]) .has-suffix .clear-button{border-end-end-radius:0;border-start-end-radius:0}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input:focus{border-color:var(--calcite-color-brand);color:var(--calcite-input-text-color, var(--calcite-color-text-1))}input[readonly]{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-input-background-color, var(--calcite-color-background))}input[readonly]:focus{color:var(--calcite-input-text-color, var(--calcite-color-text-1))}:host([read-only]) .prefix,:host([read-only]) .icon,:host([read-only]) .clear-button,:host([read-only]) .suffix{background-color:var(--calcite-input-background-color, var(--calcite-color-background))}.element-wrapper{position:relative;display:inline-flex;flex:1 1 0%;align-items:center;order:3;isolation:isolate}.element-wrapper:has(input:focus){outline:var(--calcite-border-width-md) solid var(--calcite-internal-input-focus-outline-color);outline-offset:calc(var(--calcite-border-width-sm) * -2)}.element-wrapper:has(input:focus) input{z-index:calc(var(--calcite-z-index) * -1)}:host([status=invalid]) .prefix,:host([status=invalid]) .icon,:host([status=invalid]) input,:host([status=invalid]) .clear-button,:host([status=invalid]) .suffix,:host([status=invalid]) .number-button-item{border-color:var(--calcite-color-status-danger)}:host([status=invalid]){--calcite-internal-input-focus-outline-color: var(--calcite-color-status-danger)}.icon{box-sizing:border-box;display:flex;align-self:stretch;border-width:var(--calcite-border-width-sm);border-style:solid;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));border-inline-end-width:var(--calcite-border-width-none);background-color:var(--calcite-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-icon-color, var(--calcite-color-text-3));align-items:center;padding-inline-start:var(--calcite-internal-input-icon-padding-inline)}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=down]) .icon,.has-prefix .icon{border-inline-start-width:0}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration,input[type=date]::-webkit-clear-button,input[type=time]::-webkit-clear-button{display:none}.clear-button{box-sizing:border-box;display:flex;align-self:stretch;order:4;border-width:var(--calcite-border-width-sm);border-style:solid;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));border-inline-start-width:var(--calcite-border-width-none);background-color:var(--calcite-input-background-color, var(--calcite-color-foreground-1))}.has-suffix .clear-button,.element-wrapper:has(.number-button-item.number-button-item--horizontal[data-adjustment=up]) .clear-button,.element-wrapper:has(.number-button-item) .clear-button{border-inline-end-width:0}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block;--calcite-progress-background-color: var(--calcite-input-loading-background-color);--calcite-progress-fill-color: var(--calcite-input-loading-fill-color)}.inline-editable{order:7}.action-wrapper{order:8;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;line-height:1;font-weight:var(--calcite-font-weight-regular);border-color:var(--calcite-input-border-color, var(--calcite-color-border-input))}.prefix{order:0;border-inline-end-width:0px;inline-size:var(--calcite-input-prefix-size, auto);background-color:var(--calcite-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-prefix-text-color, var(--calcite-color-text-2))}.suffix{order:5;border-inline-start-width:0px;inline-size:var(--calcite-input-suffix-size, auto);background-color:var(--calcite-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-suffix-text-color, var(--calcite-color-text-2))}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=down]) .prefix{border-inline-start-width:var(--calcite-border-width-none)}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=up]) .suffix,.element-wrapper:has(.number-button-item) .suffix{border-inline-end-width:var(--calcite-border-width-none)}:host([alignment=start]) input{text-align:start}:host([alignment=end]) input{text-align:end}input[type=number]{-moz-appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:textfield;margin:0}.number-button-wrapper{pointer-events:none;box-sizing:border-box;display:flex;flex-direction:column;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;order:6}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-action{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-action{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal{border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));max-block-size:100%;min-block-size:100%;align-self:stretch;border-width:1px;border-style:solid}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-action,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-action{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-inline-end-width:0px;order:0;padding-inline-start:var(--calcite-internal-input-number-button-item-horizontal-padding)}.number-button-item.number-button-item--horizontal[data-adjustment=up]{border-inline-start-width:0px;order:5;padding-inline-end:var(--calcite-internal-input-number-button-item-horizontal-padding)}:host([number-button-type=vertical]) .number-button-item{padding-inline-end:var(--calcite-internal-input-number-button-item-horizontal-padding)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]{border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-block-end-width:var(--calcite-border-width-none);padding-block-start:var(--calcite-internal-input-number-button-item-vertical-padding)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px;border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));padding-block-end:var(--calcite-internal-input-number-button-item-vertical-padding)}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:var(--calcite-border-width-sm);border-style:solid;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-background-color, var(--calcite-color-foreground-1));border-inline-start-width:var(--calcite-border-width-none)}.number-button-item:hover calcite-action{--calcite-action-background-color: var( --calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2) );--calcite-action-text-color: var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.number-button-item:active calcite-action{--calcite-action-background-color: var( --calcite-input-actions-background-color-press, var(--calcite-color-foreground-3) );--calcite-action-text-color: var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.number-button-item calcite-action{--calcite-internal-action-height: var(--calcite-internal-input-number-button-item-height);--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-input-actions-background-color);--calcite-action-text-color: var(--calcite-input-actions-icon-color)}.number-button-item calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-input-actions-background-color-hover);--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-hover)}.number-button-item calcite-action:active{--calcite-action-background-color-press: var(--calcite-input-actions-background-color-press);--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-press)}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center;border-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));box-shadow:var(--calcite-input-shadow, var(--calcite-shadow-none))}input[type=date]::-webkit-input-placeholder{visibility:hidden!important}:host([type=color]) input{padding:.25rem}:host([type=file]) input{cursor:pointer;border-width:1px;border-style:dashed;background-color:var(--calcite-color-foreground-1);text-align:center;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));block-size:initial}:host([type=file][scale=s]) input{padding-block:1px;padding-inline:.5rem}:host([type=file][scale=m]) input{padding-block:.25rem;padding-inline:.75rem}:host([type=file][scale=l]) input{padding-block:.5rem;padding-inline:1rem}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-color-border-1)}input.inline-child{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}input.inline-child.inline-editable-child{background-color:transparent}input.inline-child .editing-enabled{background-color:inherit}input.inline-child:not(.editing-enabled){display:flex;cursor:pointer;text-overflow:ellipsis;border-color:transparent;padding-inline-start:0}.element-wrapper:has(input.inline-child:not(.editing-enabled)) .loader,.element-wrapper:has(input.inline-child:not(.editing-enabled)) .number-button-item,.element-wrapper:has(input.inline-child:not(.editing-enabled)) .prefix,.element-wrapper:has(input.inline-child:not(.editing-enabled)) .icon,.element-wrapper:has(input.inline-child:not(.editing-enabled)) .clear-button,.element-wrapper:has(input.inline-child:not(.editing-enabled)) .suffix{display:none}:host([inline-editable]:not([editing-enabled])) .wrapper:hover input,:host([inline-editable]:not([editing-enabled])) .wrapper:hover .inline-editable,:host([inline-editable]:not([editing-enabled])) .wrapper:hover .action-wrapper,:host:has(input.inline-child:not(.inline-editable-child):not(.editing-enabled)) .wrapper:hover input,:host:has(input.inline-child:not(.inline-editable-child):not(.editing-enabled)) .wrapper:hover .inline-editable,:host:has(input.inline-child:not(.inline-editable-child):not(.editing-enabled)) .wrapper:hover .action-wrapper{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;background-color:var(--calcite-input-inline-editable-background-color-hover, var(--calcite-color-foreground-2))}:host([inline-editable]) .inline-editable,:host([inline-editable]) .action-wrapper{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;background-color:var(--calcite-input-background-color, var(--calcite-color-foreground-1))}:host([type=datetime-local]) .element-wrapper{inline-size:100%}:host([type=datetime-local]) .element-wrapper input{display:inline-block;min-inline-size:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-input-actions-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-input-actions-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-input-actions-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-input-actions-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-space-2xs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-space-2xs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-space-sm-plus)}.inline-editable--container{display:flex;cursor:pointer;align-items:center}.inline-editable--container .enable-editing,.inline-editable--container .confirm-changes,.inline-editable--container .cancel-editing{margin-inline-start:var(--calcite-space-2xs)}.inline-editable--container .enable-editing{--calcite-action-text-color: var(--calcite-input-inline-editable-control-text-color, var(--calcite-color-text-1))}.inline-editable--container calcite-action{--calcite-action-background-color: var(--calcite-input-inline-editable-control-background-color);--calcite-action-corner-radius: var(--calcite-input-inline-editable-control-corner-radius);--calcite-action-loader-color: var(--calcite-input-inline-editable-control-loader-color);--calcite-action-text-color: var(--calcite-input-inline-editable-control-text-color)}.inline-editable--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-input-inline-editable-control-background-color-hover, var(--calcite-input-inline-editable-control-background-color));--calcite-action-text-color-press: var(--calcite-input-inline-editable-control-text-color-press, var(--calcite-input-inline-editable-control-text-color))}.inline-editable--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-input-inline-editable-control-background-color-press, var(--calcite-input-inline-editable-control-background-color));--calcite-action-text-color-press: var(--calcite-input-inline-editable-control-text-color-press, var(--calcite-input-inline-editable-control-text-color))}`;class Ce extends r.WF{constructor(){super(),this.actionWrapperRef=(0,g._)(),this.attributeWatch=(0,d.oW)(["autofocus","enterkeyhint","inputmode","spellcheck"],this.handleGlobalAttributesChanged),this.childRef=(0,g._)(),this.childNumberRef=(0,g._)(),this.enableInlineEditingButtonRef=(0,g._)(),this.direction=(0,d.jH)(),this.formSupport=he({inputType:"text",getValue:()=>"file"===this.type?this.childRef.value?.files??null:this.value})(this),this.inputWrapperRef=(0,g._)(),this.labelable=(0,P.u)(this),this.previousValueOrigin="initial",this.userChangedValue=!1,this._value="",this.messages=(0,Y.u)({blocking:!0}),this.focusSetter=(0,X.u)()(this),this.interactiveContainer=(0,Q.u)(this),this.inlineEditableManager=new W({getEditingEnabled:()=>this.editingEnabled,setEditingEnabled:e=>{this.editingEnabled=e},getValue:()=>this.value,setValue:e=>{this.setValue({origin:"direct",value:e})},setFocus:()=>{this.setFocus()},emitCancel:()=>{this.calciteInputInlineEditableCancel.emit()},emitConfirm:()=>{this.calciteInputInlineEditableConfirm.emit()},emitEnableEditingChange:()=>{this.calciteInputInlineEditableChange.emit()}}),this.inlineEditableLoading=!1,this.slottedActionElDisabledInternally=!1,this.alignment="start",this.clearable=!1,this.disabled=!1,this.editingEnabled=!1,this.inlineEditable=!1,this.inlineEditableControls=!1,this.groupSeparator=!1,this.iconFlipRtl=!1,this.loading=!1,this.localeFormat=!1,this.multiple=!1,this.numberButtonType="vertical",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.type="text",this.calciteInputChange=(0,v.c)({cancelable:!1}),this.calciteInputInput=(0,v.c)(),this.calciteInternalInputBlur=(0,v.c)({cancelable:!1}),this.calciteInternalInputFocus=(0,v.c)({cancelable:!1}),this.calciteInputInlineEditableCancel=(0,v.c)({cancelable:!1}),this.calciteInputInlineEditableConfirm=(0,v.c)({cancelable:!1}),this.calciteInputInlineEditableChange=(0,v.c)({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={displayedValue:[16,{},{state:!0}],inlineEditableLoading:[16,{},{state:!0}],slottedActionElDisabledInternally:[16,{},{state:!0}],accept:1,alignment:[3,{},{reflect:!0}],autocomplete:1,clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],editingEnabled:[7,{},{reflect:!0,type:Boolean}],inlineEditable:[7,{},{reflect:!0,type:Boolean}],inlineEditableControls:[7,{},{reflect:!0,type:Boolean}],inlineEditableAfterConfirm:[0,{},{attribute:!1}],files:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:r.pf},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],localeFormat:[5,{},{type:Boolean}],max:[11,{},{reflect:!0,type:Number}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],min:[11,{},{reflect:!0,type:Number}],minLength:[11,{},{reflect:!0,type:Number}],multiple:[5,{},{type:Boolean}],name:[3,{},{reflect:!0}],numberButtonType:[3,{},{reflect:!0}],numberingSystem:[3,{},{reflect:!0}],pattern:1,placeholder:1,prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],step:[3,{},{reflect:!0}],suffixText:1,type:[3,{},{reflect:!0}],validationIcon:[3,{converter:r.pf},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=Ee}get selfManagedInlineEditable(){return this.inlineEditable&&!this.inlineEditableEl}get hasInlineEditableContext(){return this.inlineEditable||!!this.inlineEditableEl}get isClearable(){return(this.clearable||"search"===this.type)&&this.value?.length>0}get value(){return this._value}set value(e){const t=this._value;e!==t&&(this._value=e,this.valueWatcher(e,t),e&&""===this._value&&this.setValue({origin:"reset",value:t}))}async selectText(){const e="number"===this.type?this.childNumberRef:this.childRef;e.value?.select()}async setFocus(e){return this.focusSetter(()=>"number"===this.type?this.childNumberRef.value:this.childRef.value,e)}connectedCallback(){super.connectedCallback(),this.inlineEditableEl=this.el.closest("calcite-inline-editable")??void 0,this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1)}async load(){this.maxString=this.max?.toString(),this.minString=this.min?.toString(),this.requestedIcon=(0,l.d)(we,this.icon,this.type),this.setPreviousEmittedValue(this.value),this.setPreviousValue(this.value),"number"===this.type&&("Infinity"===this.value||"-Infinity"===this.value?(this.displayedValue=this.value,this.previousEmittedValue=this.value):(this.warnAboutInvalidNumberValue(this.value),this.setValue({origin:"connected",value:w(this.value)?this.value:""})))}willUpdate(e){e.has("max")&&(this.maxString=this.max?.toString()??void 0),e.has("min")&&(this.minString=this.min?.toString()??void 0),(e.has("icon")||e.has("type")&&(this.hasUpdated||"text"!==this.type))&&(this.requestedIcon=(0,l.d)(we,this.icon,this.type)),e.has("readOnly")&&this.stopNudging(),e.has("type")&&(this.hasUpdated||"text"!==this.type)&&this.formSupport.overrideInputType(this.type)}disconnectedCallback(){super.disconnectedCallback(),this.stopNudging()}stopNudging(){window.clearInterval(this.nudgeNumberValueIntervalId)}handleGlobalAttributesChanged(){this.requestUpdate()}valueWatcher(e,t){if(!this.userChangedValue){if("number"===this.type&&("Infinity"===e||"-Infinity"===e))return this.displayedValue=e,void(this.previousEmittedValue=e);this.setValue({origin:"direct",previousValue:t,value:null==e||""==e?"":"number"===this.type?w(e)?e:this.previousValue||"":e}),this.warnAboutInvalidNumberValue(e)}this.userChangedValue=!1}keyDownHandler(e){if(!(this.readOnly||this.disabled||e.defaultPrevented)){if(this.selfManagedInlineEditable&&this.editingEnabled&&"Escape"===e.key)return e.preventDefault(),this.clearable&&this.value?.length>0?void this.clearInputValue(e):(this.inlineEditableManager.cancelEditing(),void requestAnimationFrame(()=>{this.enableInlineEditingButtonRef.value?.setFocus()}));!this.isClearable||"Escape"!==e.key||this.hasInlineEditableContext&&!this.editingEnabled||(this.clearInputValue(e),e.preventDefault()),"Enter"===e.key&&this.formSupport.active&&(e.preventDefault(),this.formSupport.requestSubmit())}}onLabelClick(){!this.selfManagedInlineEditable||this.editingEnabled?this.setFocus():this.inlineEditableManager.enable()}incrementOrDecrementNumberValue(e,t,i,n){const{value:a}=this;if("Infinity"===a||"-Infinity"===a)return;const r="up"===e?1:-1,l="any"===this.step?1:Math.abs(this.step||1),o=new $(""!==a?a:"0").add(""+l*r),c="number"==typeof i&&!isNaN(i)&&o.subtract(`${i}`).isNegative?`${i}`:"number"!=typeof t||isNaN(t)||o.subtract(`${t}`).isNegative?o.toString():`${t}`;this.setValue({committing:!0,nativeEvent:n,origin:"user",value:c})}clearInputValue(e){this.setValue({committing:!0,nativeEvent:e,origin:"user",value:""})}clearButtonPointerDownHandler(e){e.preventDefault()}clearButtonClickHandler(e){e.preventDefault(),e.stopPropagation(),this.clearInputValue(e);const t="number"===this.type?this.childNumberRef.value:this.childRef.value;t?.focus()}emitChangeIfUserModified(){"user"===this.previousValueOrigin&&this.value!==this.previousEmittedValue&&(this.calciteInputChange.emit(),this.setPreviousEmittedValue(this.value))}inputBlurHandler(){this.stopNudging(),this.calciteInternalInputBlur.emit(),this.selfManagedInlineEditable&&this.editingEnabled&&!this.inlineEditableControls&&this.inlineEditableManager.disable(),this.emitChangeIfUserModified()}clickHandler(e){if(this.disabled)return;const t=e.composedPath(),i=t.some(e=>e instanceof HTMLElement&&e.classList.contains(K));return!t.includes(this.inputWrapperRef.value)||t.includes(this.actionWrapperRef.value)||i?void 0:this.selfManagedInlineEditable&&!this.editingEnabled?(e.preventDefault(),void this.inlineEditableManager.enable()):void this.setFocus()}inputFocusHandler(){this.calciteInternalInputFocus.emit()}inputInputHandler(e){this.disabled||this.readOnly||("file"===this.type&&(this.files=this.childRef.value.files??void 0),this.setValue({nativeEvent:e,origin:"user",value:e.target.value}))}inputKeyDownHandler(e){this.disabled||this.readOnly||"Enter"===e.key&&this.emitChangeIfUserModified()}inputNumberInputHandler(e){if(this.disabled||this.readOnly)return;if("Infinity"===this.value||"-Infinity"===this.value)return;const t=e.target.value;F.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};const i=F.delocalize(t);var n;"insertFromPaste"===e.inputType?(w(i)||e.preventDefault(),this.setValue({nativeEvent:e,origin:"user",value:(n=i,n&&function(e){return f.n.some(t=>e.includes(t))}(n)?B(n,e=>{let t=!1;const i=e.split("").filter((e,i)=>e.match(/\./g)&&!t?(t=!0,!0):!(!e.match(/-/g)||0!==i)||f.n.includes(e)).join("");return w(i)?new $(i).toString():""}):"")}),this.childNumberRef.value&&(this.childNumberRef.value.value=this.displayedValue)):this.setValue({nativeEvent:e,origin:"user",value:i})}inputNumberKeyDownHandler(e){if("number"!==this.type||this.disabled||this.readOnly)return;if("Infinity"===this.value||"-Infinity"===this.value)return e.preventDefault(),void("Backspace"!==e.key&&"Delete"!==e.key||this.clearInputValue(e));if("ArrowUp"===e.key)return e.preventDefault(),void this.nudgeNumberValue("up",e);if("ArrowDown"===e.key)return void this.nudgeNumberValue("down",e);const t=[...f.n,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&"Tab"===e.key;if(t.includes(e.key)||i)"Enter"===e.key&&this.emitChangeIfUserModified();else{if(F.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},e.key===F.decimal){if(!this.value&&!this.childNumberRef.value?.value)return;if(this.value&&-1===this.childNumberRef.value?.value.indexOf(F.decimal))return}if(/[eE]/.test(e.key)){if(!this.value&&!this.childNumberRef.value?.value)return;if(this.value&&this.childNumberRef.value&&!/[eE]/.test(this.childNumberRef.value.value))return}if("-"===e.key){if(!this.value&&!this.childNumberRef.value?.value)return;if(this.value&&this.childNumberRef.value&&this.childNumberRef.value.value.split("-").length<=2)return}e.preventDefault()}}nudgeNumberValue(e,t){if(t instanceof KeyboardEvent&&t.repeat||"number"!==this.type)return;const i=this.maxString?parseFloat(this.maxString):null,n=this.minString?parseFloat(this.minString):null;this.incrementOrDecrementNumberValue(e,i,n,t),this.nudgeNumberValueIntervalId&&this.stopNudging();let a=!0;this.nudgeNumberValueIntervalId=window.setInterval(()=>{a?a=!1:this.incrementOrDecrementNumberValue(e,i,n,t)},150)}numberButtonPointerUpAndOutHandler(){this.stopNudging()}numberButtonPointerDownHandler(e){if(!(0,l.k)(e))return;e.preventDefault();const t=e.currentTarget.dataset.adjustment;this.disabled||this.nudgeNumberValue(t,e)}setInputValue(e){const t="number"===this.type?this.childNumberRef:this.childRef;t.value&&(t.value.value=e)}setPreviousEmittedValue(e){this.previousEmittedValue=this.normalizeValue(e)}normalizeValue(e){return"number"===this.type?w(e)?e:"":e}setPreviousValue(e){this.previousValue=this.normalizeValue(e)}setValue({committing:e=!1,nativeEvent:t,origin:i,previousValue:n,value:a}){if(this.setPreviousValue(n??this.value),this.previousValueOrigin=i,"number"===this.type){F.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator,signDisplay:"never"};const e=this.previousValue?.length>a.length||this.value?.length>a.length,t="."===a.charAt(a.length-1),n=t&&e?a:(r=a,B(Array.from(r).filter(e=>S.has(e)).join(""),e=>{const t=e.replace(I,"").replace(C,"").replace(E,"$1");return w(t)?z.test(t)?t:function(e){const t=e.split(".")[1],i=new $(e).toString(),[n,a]=i.split(".");return t&&a!==t?`${n}.${t}`:i}(t):e})),l=a&&!n?w(this.previousValue)?this.previousValue:"":n;let o=F.localize(l);"connected"===i||t||(o=function(e,t,i){const n=t.split(".")[1];if(n){const a=n.match(V)?.[0];if(a&&i.delocalize(e).length!==t.length&&-1===n.indexOf("e")){const t=i.decimal;return(e=e.includes(t)?e:`${e}${t}`).padEnd(e.length+a.length,i.localize("0"))}}return e}(o,l,F)),this.displayedValue=t&&e?`${o}${F.decimal}`:o,this.userChangedValue="user"===i&&this.value!==l,this.value=["-","."].includes(l)?"":l}else this.userChangedValue="user"===i&&this.value!==a,this.value=a;var r;"direct"===i&&(this.setInputValue(a),this.previousEmittedValue=a),t&&(this.calciteInputInput.emit().defaultPrevented?(this.value=this.previousValue,this.displayedValue="number"===this.type?F.localize(this.previousValue):this.previousValue):e&&this.emitChangeIfUserModified())}inputKeyUpHandler(){this.stopNudging()}warnAboutInvalidNumberValue(e){"number"===this.type&&e&&!w(e)&&console.warn(`The specified value "${e}" cannot be parsed, or is out of range.`)}render(){const e=this.direction,t=a.qy`<div class=${(0,r.CP)("loader")}><calcite-progress .label=${this.messages.loading} type=indeterminate></calcite-progress></div>`,i=a.qy`<div class=${(0,r.CP)("clear-button")} @click=${this.disabled||this.readOnly?void 0:this.clearButtonClickHandler} @pointerdown=${this.disabled||this.readOnly?void 0:this.clearButtonPointerDownHandler}>${(({ariaLabel:e,ref:t,disabled:i,focusable:n,onClick:l,scale:o,title:c})=>a.qy`<div class=${(0,r.CP)("clear-button--container")} .inert=${i} ${(0,g.K)(t||Z)}><calcite-action .disabled=${i} icon=x .label=${e??""} @click=${l} .scale=${o} tabindex=${(n?void 0:-1)??a.s6} .text=${c} title=${c??a.s6}></calcite-action></div>`)({ariaLabel:this.messages.clear,disabled:this.disabled||this.readOnly,scale:this.scale,title:this.messages.clear})}</div>`,l=a.qy`<div class=${(0,r.CP)("icon")}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${(0,q.g)(this.scale)}></calcite-icon></div>`,o="horizontal"===this.numberButtonType,c=a.qy`<div aria-hidden=true class=${(0,r.CP)({[ye]:!0,[ve]:o})} data-adjustment=${"up"} data-testid=number-button-up @pointerdown=${this.numberButtonPointerDownHandler} @pointerout=${this.numberButtonPointerUpAndOutHandler} @pointerup=${this.numberButtonPointerUpAndOutHandler}><calcite-action .disabled=${this.disabled||this.readOnly} .icon=${"chevron-up"} .scale=${this.scale} tabindex=-1 text></calcite-action></div>`,s=a.qy`<div aria-hidden=true class=${(0,r.CP)({[ye]:!0,[ve]:o})} data-adjustment=${"down"} data-testid=number-button-down @pointerdown=${this.numberButtonPointerDownHandler} @pointerout=${this.numberButtonPointerUpAndOutHandler} @pointerup=${this.numberButtonPointerUpAndOutHandler}><calcite-action .disabled=${this.disabled||this.readOnly} .icon=${"chevron-down"} .scale=${this.scale} tabindex=-1 text></calcite-action></div>`,d=a.qy`<div class=${(0,r.CP)("number-button-wrapper")}>${c}${s}</div>`,u=a.qy`<div class=${(0,r.CP)("prefix")}>${this.prefixText}</div>`,p=a.qy`<div class=${(0,r.CP)("suffix")}>${this.suffixText}</div>`,h=this.el.autofocus,v=this.el.enterKeyHint,f=this.el.inputMode,x="number"===this.type?(0,m.D)("localized-input",a.qy`<input accept=${this.accept??a.s6} aria-errormessage=${$e} .ariaInvalid=${"invalid"===this.status} .ariaLabel=${(0,y.g)(this)} autocomplete=${this.autocomplete??a.s6} .autofocus=${h} class=${(0,r.CP)({[be]:this.editingEnabled,[me]:this.hasInlineEditableContext,[ge]:!!this.inlineEditableEl})} value=${this.defaultValue??a.s6} .disabled=${this.disabled} enterkeyhint=${v??a.s6} inputmode=${f??a.s6} maxlength=${this.maxLength??a.s6} minlength=${this.minLength??a.s6} .multiple=${this.multiple} @blur=${this.inputBlurHandler} @focus=${this.inputFocusHandler} @input=${this.inputNumberInputHandler} @keydown=${this.inputNumberKeyDownHandler} @keyup=${this.inputKeyUpHandler} pattern=${this.pattern??a.s6} placeholder=${(this.placeholder||"")??a.s6} .readOnly=${this.readOnly} .required=${this.required} tabindex=${(this.disabled||this.hasInlineEditableContext&&!this.editingEnabled?-1:void 0)??a.s6} type=text .value=${(0,b.V)(this.displayedValue??"")} ${(0,g.K)(this.childNumberRef)}>`):null,k="number"!==this.type?a.qy`<input accept=${this.accept??a.s6} aria-errormessage=${$e} .ariaInvalid=${"invalid"===this.status} .ariaLabel=${(0,y.g)(this)} autocomplete=${this.autocomplete??a.s6} .autofocus=${h} class=${(0,r.CP)({[be]:this.editingEnabled,[me]:this.hasInlineEditableContext,[ge]:!!this.inlineEditableEl})} value=${this.defaultValue??a.s6} .disabled=${this.disabled} enterkeyhint=${v??a.s6} inputmode=${f??a.s6} max=${this.maxString??a.s6} maxlength=${this.maxLength??a.s6} min=${this.minString??a.s6} minlength=${this.minLength??a.s6} .multiple=${this.multiple} name=${this.name??a.s6} @blur=${this.inputBlurHandler} @focus=${this.inputFocusHandler} @input=${this.inputInputHandler} @keydown=${this.inputKeyDownHandler} @keyup=${this.inputKeyUpHandler} pattern=${this.pattern??a.s6} placeholder=${(this.placeholder||"")??a.s6} .readOnly=${this.readOnly} .required=${this.required} spellcheck=${this.el.spellcheck??a.s6} step=${this.step??a.s6} tabindex=${(this.disabled||this.hasInlineEditableContext&&!this.editingEnabled?-1:void 0)??a.s6} type=${this.type??a.s6} .value=${(0,b.V)(this.value??"")} ${(0,g.K)(this.childRef)}>`:null;return this.interactiveContainer({disabled:this.disabled,children:a.qy`${this.labelText&&j({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${(0,r.CP)({[fe]:!0,[n.C.rtl]:"rtl"===e,[xe]:this.suffixText,[ke]:this.prefixText})} ${(0,g.K)(this.inputWrapperRef)}><div class=${(0,r.CP)("element-wrapper")}>${this.loading?t:null}${"number"!==this.type||"horizontal"!==this.numberButtonType||this.readOnly?null:s}${this.prefixText?u:null}${this.requestedIcon?l:null}${x}${k}${this.isClearable?i:null}${this.suffixText?p:null}${"number"!==this.type||"horizontal"!==this.numberButtonType||this.readOnly?null:c}${"number"!==this.type||"vertical"!==this.numberButtonType||this.readOnly?null:d}</div>${this.selfManagedInlineEditable&&a.qy`<div class=${(0,r.CP)("inline-editable")}>${U({cancelEditingLabel:this.messages.cancelInlineEditing,confirmChangesLabel:this.messages.confirmInlineEditingChanges,editingEnabled:this.editingEnabled,enableEditingButtonRef:this.enableInlineEditingButtonRef,enableEditingLabel:this.messages.enableInlineEditing,loading:this.inlineEditableLoading,onCancelEditing:()=>this.inlineEditableManager.cancelEditing(),onConfirmChanges:()=>this.inlineEditableManager.confirm(this.inlineEditableAfterConfirm,e=>{this.inlineEditableLoading=e}),onEnableEditing:()=>this.inlineEditableManager.enable(),scale:this.scale,showControls:this.editingEnabled&&this.inlineEditableControls})}</div>`||""}<div class=${(0,r.CP)("action-wrapper")} ${(0,g.K)(this.actionWrapperRef)}><slot name=${"action"}></slot></div></div>${this.validationMessage&&"invalid"===this.status?J({icon:this.validationIcon,id:$e,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}}(0,n.c)("calcite-input",Ce)},1715(e,t,i){i.d(t,{D:()=>l});var n=i(60496),a=i(43356),r=i(38632);const l=(0,a.u$)(class extends a.WL{constructor(){super(...arguments),this.key=n.s6}render(e,t){return this.key=e,t}update(e,[t,i]){return t!==this.key&&((0,r.mY)(e),this.key=t),i}})}}]);
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{isSome as e,equals as i}from"../../../../core/arrayUtils.js";import{EventedAccessor as r}from"../../../../core/Evented.js";import{destroyMaybe as s,removeMaybe as a}from"../../../../core/maybe.js";import n from"../../../../core/ReactiveMap.js";import{initial as o}from"../../../../core/reactiveUtils.js";import{schedule as l}from"../../../../core/scheduling.js";import{signal as u}from"../../../../core/signal.js";import{property as p,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as g}from"../../../../core/support/UpdatingHandles.js";import c from"../../../../geometry/Multipoint.js";import{absoluteHeightElevationInfo as d,getConvertedElevation as y}from"../../../../support/elevationInfoUtils.js";import{restoreLineOfSightObserverState as _,restoreLineOfSightTargetState as m,snapshotLineOfSightTargetState as v,snapshotLineOfSightObserverState as f,updateLineOfSightItemFromAuthoredPoint as M}from"./LineOfSightAuthoringUtils.js";import{LineOfSightObserverManipulator as b,LineOfSightTargetManipulator as x,LineOfSightTargetManipulatorState as S,getInteractiveLineOfSightTargetManipulatorState as A}from"./LineOfSightManipulators.js";import{EditGeometryOperations as P}from"../../../interactive/editGeometry/EditGeometryOperations.js";const w=Symbol("line-of-sight-aggregate-operations");let I=class extends r{constructor(){super(...arguments),this._operations=null,this.interacting=!1,this._externalGeometryStagingArea=new D(t=>this._syncOperationsFromAnalysisGeometry(t),()=>null==this._operations),this._observerManipulator=null,this._targetByPart=new Map,this._targetManipulators=new n,this._updatingHandles=new g,this._dragIntersectionContext=null}initialize(){this.addHandles([this._connectAnalysisItemLifecycle(),this._connectTargetPartMap(),this._connectStagedMultipointGeometry(),this._connectTargetManipulatorStates()])}destroy(){this._externalGeometryStagingArea.destroy(),this._updatingHandles.destroy(),this._replaceOperations(null),this._observerManipulator=null,this._targetManipulators.clear()}get operations(){return this._operations}get elevationInfo(){return d}get visible(){return this.analysisViewData.visible&&null!=this.origin}get isDraped(){return!1}get origin(){const t=this.analysis.observer,e=this.analysis.targets.at(0);return G(this.view,t?.position,t?.elevationInfo)??G(this.view,e?.position,e?.elevationInfo)}get _stagedMultipointGeometry(){const t=this.analysis.observer,i=this.analysis.targets.toArray(),r=t?.position?.spatialReference,s=[G(this.view,t?.position,t?.elevationInfo),...i.map(t=>G(this.view,t.position,t.elevationInfo))].filter(e).map(t=>t.toArray());return 0===s.length||null==r?null:new c({hasZ:!0,points:s,spatialReference:r})}get updating(){return this._updatingHandles.updating||this._externalGeometryStagingArea.updating.value}createManipulator(t){return null}_createObserverReshapeManipulator(t){this._clearManipulatorDragTracking(this._observerManipulator);const e=new b(this.view,{deleting:!1,intersection:null,type:"observer"});return e.selected=t.selected,this._observerManipulator=e,this._trackManipulatorDrag(e,this.analysis.observer),e}_createTargetReshapeManipulator(t){const{part:e}=t.vertex,i=this._targetByPart.get(e);if(null==i)return t.defaultCreate();this._clearManipulatorDragTracking(this._targetManipulators.get(i));const r=new x(this.view,{deleting:!1,target:i,type:"target"});return r.selected=t.selected,this._targetManipulators.set(i,r),this._updateTargetManipulatorState(r,this._getTargetComputation(i)),this._trackManipulatorDrag(r,i),r}createReshapeManipulator(t){const{part:e}=t.vertex;return 0===e.index?this._createObserverReshapeManipulator(t):this._createTargetReshapeManipulator(t)}getReshapeMoveConfig(t){return 1===t.numSelected&&null!=this._targetByPart.get(t.vertex.part)?{xyAxisMode:"all"}:null}getTargetManipulator(t){const e=this._targetManipulators.get(t);return e?.view?e:null}get observerManipulator(){return this._observerManipulator}get targetManipulators(){return[...this._targetManipulators.values()]}get lineOfSightManipulators(){return[this._observerManipulator,...this._targetManipulators.values()].filter(t=>null!=t&&!t.metadata.deleting)}toMap(t){return this.intersector.getScreenPointIntersection(t)?.mapPoint}createUndoRecord(){let t=this._snapshotState(),e=null;return{undo:()=>{e=this._snapshotState(),this._restoreSnapshot(t)},redo:()=>{null!=e&&(t=this._snapshotState(),this._restoreSnapshot(e))}}}_restoreSnapshot(t){const{observer:e}=this.analysis;null!=e&&null!=t.observer&&_(t.observer,e),this.analysis.targets.forEach((e,i)=>{const r=t.targets[i];null!=r&&m(r,e)}),this._queueAnalysisGeometryResync(),this.emit("committed")}_snapshotState(){return{observer:f(this.analysis.observer),targets:this.analysis.targets.toArray().map(t=>v(t))}}_replaceOperations(t){this.removeHandles(w),this._operations=s(this._operations),this._operations=t,this._targetByPart=null==t?new Map:H(t.data.parts,this.analysis.targets.toArray(),this._targetByPart),null==t&&(this._observerManipulator=null),null!=t&&this.addHandles(t.data.on("change",()=>this._operationsGeometryChanged()),w)}_connectAnalysisItemLifecycle(){return this._updatingHandles.add(()=>({observer:this.analysis.observer,targets:this.analysis.targets.toArray()}),({observer:t,targets:e})=>{null==t&&(this._clearManipulatorDragTracking(this._observerManipulator),this._observerManipulator=null);const i=new Set(e);for(const[r,s]of this._targetManipulators)i.has(r)&&null!=s.view||(this._clearManipulatorDragTracking(s),this._targetManipulators.delete(r))},o)}_connectTargetPartMap(){return this._updatingHandles.add(()=>({operations:this._operations,targets:this.analysis.targets.toArray()}),({operations:t,targets:e})=>{null!=t&&(this._targetByPart=H(t.data.parts,e,this._targetByPart))},o)}_connectStagedMultipointGeometry(){return this._updatingHandles.add(()=>this._stagedMultipointGeometry,t=>{this._externalGeometryStagingArea.stage(t)},o)}_connectTargetManipulatorStates(){return this._updatingHandles.add(()=>({computations:this.analysisViewData.computations.toArray().map(t=>({isTargetVisible:t.computationResult.isTargetVisible,isValid:t.computationResult.isValid,target:t.target})),interacting:this.interacting,targets:this.analysis.targets.toArray()}),({computations:t,interacting:e,targets:i})=>{for(const r of i){const i=this._targetManipulators.get(r);if(null==i)continue;const s=t.find(t=>t.target===r),a=null!=s&&s.isValid?s.isTargetVisible?S.visible:S.occluded:S.undefined;i.state=e?A(a):a}},o)}_queueAnalysisGeometryResync(){this._externalGeometryStagingArea.stage(this._stagedMultipointGeometry)}_getTargetComputation(t){return this.analysisViewData.computations.find(e=>e.target===t)}_updateTargetManipulatorState(t,e){null!=e&&e.computationResult.isValid?t.state=this._getTargetManipulatorState(e.computationResult.isTargetVisible?S.visible:S.occluded):t.state=this._getTargetManipulatorState(S.undefined)}_getTargetManipulatorState(t){return this.interacting?A(t):t}_syncOperationsFromAnalysisGeometry(t){if(null==t)return void(null!=this._operations&&(this._replaceOperations(null),this.emit("modified-externally")));const e=this._operations;if(null!=e&&e.data.geometry?.equals(t))this._syncTargetPartMapFromOperations(e);else{if(e?.trySetGeometry(t))return this._syncTargetPartMapFromOperations(e),this.emit("committed"),void this.emit("modified-externally");this._replaceOperations(P.fromGeometry(t,this.view.state.viewingMode)),this.emit("committed"),this.emit("modified-externally")}}_syncTargetPartMapFromOperations(t){this._targetByPart=H(t.data.parts,this.analysis.targets.toArray(),this._targetByPart)}_operationsGeometryChanged(){const t=this._operations,e=this.analysis.observer;if(this._externalGeometryStagingArea.inProgress||null==t||null==e)return;const{coordinateHelper:r,parts:s}=t.data,a=O(s,this._targetByPart);i(this.analysis.targets.toArray(),a)||this.analysis.targets.splice(0,this.analysis.targets.length,...a);const n=r.vectorToPoint(s[0]?.getFirstVertex()?.pos);null==n||T(this.view,e,n)||this._updateAnalysisItemFromAbsolutePoint(e,n);for(const i of s){if(0===i.index)continue;const t=this._targetByPart.get(i),e=r.vectorToPoint(i.getFirstVertex()?.pos);null!=t&&null!=e&&this.analysis.targets.includes(t)&&(T(this.view,t,e)||this._updateAnalysisItemFromAbsolutePoint(t,e))}null==this._dragIntersectionContext||this._dragIntersectionContext.dragging||(this._dragIntersectionContext=null),this.emit("committed")}_updateAnalysisItemFromAbsolutePoint(t,e){const i=this._dragIntersectionContext?.item===t?this._dragIntersectionContext.intersection:null;M(this.view,t,this.intersector,e,{sourceElevationInfo:d,preservedIntersection:i})}_trackManipulatorDrag(t,e){null!=e&&(this.removeHandles(t),this.addHandles(t.events.on("drag",t=>this._updateDragIntersectionContext(e,t)),t))}_clearManipulatorDragTracking(t){null!=t&&this.removeHandles(t)}_updateDragIntersectionContext(t,e){"cancel"!==e.action?this._dragIntersectionContext={dragging:"end"!==e.action,intersection:this.intersector.getScreenPointIntersection(e.screenPoint),item:t}:this._dragIntersectionContext=null}};function T(t,e,i){const r=G(t,e.position,e.elevationInfo);return r?.equals(i)??!1}function G(t,e,i){if(null==e)return null;const r=e.clone();return r.z=y(t,e,i??d,d),r}function H(t,e,i){const r=new Map;if(null!=i)for(const o of t){if(0===o.index||null!=o.getFirstVertex())continue;const t=i.get(o);null!=t&&r.set(o,t)}const s=new Set(r.values()),a=e.filter(t=>!s.has(t));let n=0;for(const o of t){if(0===o.index||null==o.getFirstVertex())continue;if(r.has(o))continue;const t=a[n++];if(null==t)break;r.set(o,t)}return r}function O(t,e){const i=[];for(const r of t){if(0===r.index||null==r.getFirstVertex())continue;const t=e.get(r);null!=t&&i.push(t)}return i}t([p({constructOnly:!0})],I.prototype,"analysisViewData",void 0),t([p({constructOnly:!0})],I.prototype,"analysis",void 0),t([p({constructOnly:!0})],I.prototype,"intersector",void 0),t([p({constructOnly:!0})],I.prototype,"view",void 0),t([p()],I.prototype,"_operations",void 0),t([p()],I.prototype,"interacting",void 0),t([p()],I.prototype,"_observerManipulator",void 0),t([p()],I.prototype,"operations",null),t([p()],I.prototype,"elevationInfo",null),t([p()],I.prototype,"visible",null),t([p()],I.prototype,"isDraped",null),t([p()],I.prototype,"origin",null),t([p()],I.prototype,"_stagedMultipointGeometry",null),t([p()],I.prototype,"updating",null),t([p()],I.prototype,"observerManipulator",null),t([p()],I.prototype,"targetManipulators",null),t([p()],I.prototype,"lineOfSightManipulators",null),I=t([h("esri.views.3d.analysis.LineOfSight.LineOfSightAggregateManipulatedObject3D")],I);class D{constructor(t,e){this._geometry=void 0,this._inProgressGeometry=void 0,this._scheduledHandle=null,this.updating=u(!1),this._apply=t,this._shouldApplyImmediately=e}destroy(){this._scheduledHandle=a(this._scheduledHandle),this.updating.value=!1,this._geometry=void 0,this._inProgressGeometry=void 0}get inProgress(){return null!=this._inProgressGeometry}stage(t){if(this._geometry=t,!this.inProgress&&this._shouldApplyImmediately())return this._scheduledHandle=a(this._scheduledHandle),this.updating.value=!1,void this._flush();this.updating.value=!0,this._scheduledHandle??=l(()=>{this._scheduledHandle=null;try{this._flush()}finally{null==this._scheduledHandle&&(this.updating.value=!1)}})}_flush(){const t=this._geometry;if(void 0!==t){this._geometry=void 0,this._inProgressGeometry=t;try{this._apply(t)}finally{this._inProgressGeometry=void 0}}}}export{I as LineOfSightAggregateManipulatedObject3D};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../../core/Evented.js";import{handlesGroup as i}from"../../../../core/handleUtils.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import o from"../../../../core/ReactiveSet.js";import{watch as a,initial as s,when as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{create as h,fromPoints as p}from"../../../../geometry/support/lineSegment.js";import{LineOfSightAggregateManipulatedObject3D as u}from"./LineOfSightAggregateManipulatedObject3D.js";import{LineOfSightInteractionVisuals as d}from"./LineOfSightInteractionVisuals.js";import{ReshapeTool3D as _}from"../../interactive/editingTools/reshape/ReshapeTool3D.js";import v from"../../../interactive/options/InteractiveToolOptions.js";const g=Symbol("line-of-sight-reshape-line-of-sight-manipulators"),b=Symbol("line-of-sight-reshape-tool-operations"),M=h();let m=class extends t{get visible(){return this._get("visible")??!0}set visible(e){this._set("visible",e),null!=this._reshapeTool&&(this._reshapeTool.visible=e)}constructor(e){super(e),this.isParentToolInteracting=!1,this.manipulatorsInteractive=!0,this._selectedManipulators=new o,this._grabbedManipulator=null,this._interactionVisuals=null,this._object=new u({analysis:e.analysis,analysisViewData:e.analysisViewData,intersector:e.intersector,view:e.view}),this._reshapeTool=new _({autoHideManipulators:!1,enableDeleteVertices:!0,enableEdgeOffset:!1,enableMidpoints:!1,enableMoveObject:!1,object:this._object,snapToScene:!0,toolOptions:new v({tooltips:{enabled:!0}}),snappingManager:e.snappingManager,view:e.view})}initialize(){this.view.tools.add(this._reshapeTool),this._interactionVisuals=new d({view:this.view}),this.addHandles([this._connectReshapeEvents(),this._connectActiveState(),this._connectManipulators(),this._connectGrabbedManipulator(),this._connectObjectInteracting(),this._connectOperations()])}destroy(){this.stop(),this.removeHandles(g),this.view.tools.remove(this._reshapeTool),this._reshapeTool.destroy(),this._object.destroy(),this._interactionVisuals=n(this._interactionVisuals),this._selectedManipulators.clear()}get active(){return this._reshapeTool.active}get canRedo(){return this._reshapeTool.canRedo}get canUndo(){return this._reshapeTool.canUndo}get updating(){return this._reshapeTool.updating}get laserLineVisualElement(){return this._interactionVisuals?.laserLineVisualElement??null}activate(){this.view.activeTool!==this._reshapeTool&&(this.view.activeTool=this._reshapeTool),this._reshapeTool.activate()}getTargetManipulator(e){return this._object.getTargetManipulator(e)}getObserverManipulator(){return this._object.observerManipulator}hasManipulatorAt(e,t){for(const i of this._object.lineOfSightManipulators)if(y(i,e,t))return!0;return!1}redo(){this._reshapeTool.redo()}clearSelection(){this._reshapeTool.clearSelection(),this._selectedManipulators.clear(),this._grabbedManipulator=null}get hasSelection(){return this._selectedManipulators.size>0}get _objectInteracting(){return this.analysisViewData.visible&&(this.isParentToolInteracting||this.hasSelection)}applySelection(e){const t="observer"===e.type?this._object.observerManipulator:this._object.getTargetManipulator(e.target);return null!=t&&this._reshapeTool.selectManipulator(t)}setEditableFlag(e,t){this._reshapeTool.setEditableFlag(e,t)}stop(){this.view.activeTool===this._reshapeTool&&(this.view.activeTool=null),this.clearSelection()}undo(){this._reshapeTool.undo()}_connectReshapeEvents(){return i([this._reshapeTool.events.on("reshape",e=>{if(1===this._selectedManipulators.size){if("reshape-start"===e.type){const e=this._selectedManipulators.values().next().value;this._grabbedManipulator??=e}"reshape-stop"===e.type&&(this._grabbedManipulator=null)}}),this._reshapeTool.on("cancel",()=>this.clearSelection()),this._reshapeTool.events.on("before-vertex-remove",e=>{let t=this.analysis.targets.length;for(const i of e.vertices){if(0===i.componentIndex)return void e.preventDefault();if(t-=1,0===t)return void e.preventDefault()}})])}_connectActiveState(){return a(()=>this.active,e=>{e||this.snappingManager.doneSnapping()},s)}_connectManipulators(){return a(()=>({manipulators:this._object.lineOfSightManipulators,interactive:this.manipulatorsInteractive}),({manipulators:e,interactive:t})=>{this.removeHandles(g),this._selectedManipulators.batch(()=>{this._selectedManipulators.clear();for(const i of e)i.interactive=t,i.selected&&this._selectedManipulators.add(i)}),this.addHandles(e.map(e=>this._connectManipulator(e)),g)},s)}_connectManipulator(e){return i([e.events.on("grab-changed",t=>{if("start"===t.action){this._selectedManipulators.add(e),this._grabbedManipulator??=e;const t=this.active,i=this.analysisViewData.visible,n=this._object.observerManipulator,o=this.visible,a=this._grabbedManipulator;if(a!==e)return;if(null==this._interactionVisuals||!t||!o||!i||null==n)return void this._hideLaserLine();this._interactionVisuals.update({target:a.renderLocation,lineVerticalPlaneSegment:a===n?null:p(n.renderLocation,a.renderLocation,M),visible:!0})}"end"===t.action&&(this._grabbedManipulator=null)}),e.events.on("select-changed",({action:t})=>{"select"===t?this._selectedManipulators.add(e):this._selectedManipulators.delete(e)}),e.events.on("location-update",()=>{const t=this.active,i=this.analysisViewData.visible,n=this._object.observerManipulator,o=this.visible,a=this._grabbedManipulator;a===e&&(null!=this._interactionVisuals&&t&&o&&i&&null!=n?this._interactionVisuals.update({target:a.renderLocation,lineVerticalPlaneSegment:a===n?null:p(n.renderLocation,a.renderLocation,M),visible:!0}):this._hideLaserLine())})])}_connectGrabbedManipulator(){return r(()=>null==this._grabbedManipulator,()=>{this._hideLaserLine()})}_connectObjectInteracting(){return a(()=>this._objectInteracting,e=>{this._object.interacting=e},s)}_connectOperations(){return a(()=>this._object.operations,e=>{this.removeHandles(b),null!=e&&this.addHandles([e.on("can-redo-change",()=>this.notifyChange("canRedo")),e.on("can-undo-change",()=>this.notifyChange("canUndo"))],b),this.notifyChange("canUndo"),this.notifyChange("canRedo")},s)}_hideLaserLine(){this._interactionVisuals?.hide()}};function y(e,t,i){return null!=e&&e.consumesClicks&&null!=e.intersectionDistance(t,i)}e([l({constructOnly:!0})],m.prototype,"analysisViewData",void 0),e([l({constructOnly:!0})],m.prototype,"analysis",void 0),e([l({constructOnly:!0})],m.prototype,"intersector",void 0),e([l({constructOnly:!0})],m.prototype,"view",void 0),e([l({constructOnly:!0})],m.prototype,"snappingManager",void 0),e([l()],m.prototype,"visible",null),e([l()],m.prototype,"isParentToolInteracting",void 0),e([l()],m.prototype,"manipulatorsInteractive",void 0),e([l()],m.prototype,"_grabbedManipulator",void 0),e([l()],m.prototype,"active",null),e([l()],m.prototype,"canRedo",null),e([l()],m.prototype,"canUndo",null),e([l()],m.prototype,"updating",null),e([l()],m.prototype,"hasSelection",null),e([l()],m.prototype,"_objectInteracting",null),m=e([c("esri.views.3d.analysis.LineOfSight.LineOfSightReshapeTool3D")],m);export{m as LineOfSightReshapeTool3D};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as i,isPromiseLike as n}from"../../../../core/promiseUtils.js";import{createVolume as s}from"../../../../core/quantity.js";import a from"../../../../core/ReactiveMap.js";import{whenOnce as l}from"../../../../core/reactiveUtils.js";import{property as u,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{runUntracked as m}from"../../../../core/accessorSupport/tracking.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxes as h}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{sqrDist as f}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as y,scale as _,set as v,negate as w}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b,fromValues as j,clone as E}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as x}from"../../../../core/support/UpdatingHandles.js";import R from"../../../../geometry/Multipoint.js";import{projectOrLoad as C}from"../../../../geometry/projectionUtils.js";import{e as L}from"../../../../chunks/containsOperator.js";import{e as O}from"../../../../chunks/convexHullOperator.js";import{e as T}from"../../../../chunks/simplifyOperator.js";import{e as V}from"../../../../chunks/unionOperator.js";import{computeTranslationToOriginAndRotation as G}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as H}from"../../../../geometry/projection/projectBoundingRect.js";import{empty as M,create as D,fromExtent as I,intersects as P}from"../../../../geometry/support/aaBoundingRect.js";import{vectorCoordinates as U}from"../../../../geometry/support/coordinateSystem.js";import{isClockwise as k}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as S}from"../../../../geometry/support/DoubleArray.js";import{t as A}from"../../../../chunks/vec3.js";import B from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as F}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as W}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementInsufficientDataError as z,VolumeMeasurementPerimeterTooLargeError as q,VolumeMeasurementUnsupportedCoordinateSystemError as N,VolumeMeasurementUnsupportedLayerTransparencyError as Z}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as J}from"./VolumeMeasurementRawResult.js";import K from"./VolumeMeasurementResult.js";import{ElevationContext as Q}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as X}from"../../support/ElevationProvider.js";import{Obb as Y}from"../../support/orientedBoundingBox.js";import{polygonToRenderInfoElevationAligned as $}from"../../support/renderInfoUtils/polygon.js";import{IteratorPreorder as ee}from"../../terrain/tileUtils.js";import{CutFillComputation as te,TargetGeometryRenderInfo as re}from"../../webgl-engine/lib/CutFillComputation.js";import{GeometryWorkerHandle as oe}from"../../../support/GeometryWorkerHandle.js";import{isIntegratedMeshLayerView as ie}from"../../../support/layerViewUtils.js";let ne=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new oe,this.depthExtremaPositions=null,this.analysisObb=null,this._updatingHandles=new x,this._rawResult=null,this._sufficientDataCoverage=!0,this._tileIterator=new ee,this._intersectingObbsByLayerView=new a,this._intersectingTiles=[],this._debouncedUpdate=i(async(e,t,r,o)=>{if(!this._computation.done)return;const{renderCoordsHelper:i}=this.view,n=new W({extent:t,localOrigin:r,renderCoordsHelper:i});this._computation.update(n,o),this._determineDataCoverage(n,e);const[s]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),l(()=>this._computation.done).then(()=>{this._updateDepthExtremaPositions(n,this._computation.result)})]);if(this.error)return void(this._rawResult=null);const a=this._computation.result;this._updateResult(n,a,"fulfilled"===s.status?s.value:null)}),this._determineDataCoverage=(e,t)=>{const{frustum:r}=this._computation,{cameraDimensions:o}=e;t.extent&&r&&(this._intersectingObbsByLayerView.clear(),this._imLayerViewsAffectingMeasurement.forEach(e=>{this._findIntersectingObbs(e,r)}),this._intersectingObbsByLayerView.size>0?this._sufficientDataCoverage=this._sufficientIntegratedMeshCoverage(t,o):(this._findIntersectingTerrainTiles(t.extent),this._sufficientDataCoverage=this._sufficientTerrainCoverage(o)))}}initialize(){const e=this.view;this._computation=new te({view:e}),this.addHandles([this._createElevationUpdateHandle(),this._updatingHandles.add(()=>({localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo}),({localOrigin:e,targetGeometryRenderInfo:t})=>{const r=this._projectedGeometry,o=r?.extent;if(!(r&&o&&e&&t))return this._rawResult=null,this.depthExtremaPositions=null,this.analysisObb=null,void(this._sufficientDataCoverage=!0);this._updatingHandles.consumePromise(this._debouncedUpdate(r,o,e,t))})])}destroy(){this._updatingHandles.destroy(),this._computation.destroy(),this._measurementWorkerHandle.destroy()}get _projectedGeometry(){const e=this.analysis.geometry;if(!e||!this.analysis.valid)return null;const t=T(e),r=C(t,this.view.spatialReference);return r.pending?(this._updatingHandles.consumePromise(r.pending),null):(t&&!r.geometry&&F(this.analysis,e.spatialReference,o.getLogger(this)),r.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?j(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;return e?m(()=>{const t=e.clone();return se(this.view.elevationProvider,t),t}):null}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings.forEach(e=>e.forEach(e=>e[2]=r)),o}get _targetGeometryRenderInfo(){const e=this.targetGeometry,t=this._localOrigin;if(!e||!t)return null;const{elevationProvider:r,renderCoordsHelper:o}=this.view,i=$(e,r,o,Q.fromElevationInfo(new B({mode:"absolute-height"})));if(n(i))return this._updatingHandles.consumePromise(i),null;if(null==i)return null;const{positions:s,polygonIndices:a,vertexCount:l}=i,u=S(3*l),p=c(),m=c();return G(e.spatialReference,t,p,o.spatialReference),m[12]=-p[12],m[13]=-p[13],m[14]=-p[14],A(u,s,m),new re(u,a)}get updating(){return this._computation.updating||this._updatingHandles.updating}get result(){const e=this._rawResult,{volume:t,area:r,length:o}=this.analysisViewData.effectiveDisplayUnits;return e&&!this.error?new K({measureType:this.analysis.measureType,rawResult:e,volumeUnit:t,areaUnit:r,lengthUnit:o}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._insufficientDataError}get _imLayerViewsAffectingMeasurement(){return this.view.allLayerViews.filter(e=>ie(e)).filter(e=>e.visible&&!e.suspended)}get _insufficientDataError(){return this._sufficientDataCoverage?null:new z}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeterForError,{maxPerimeterLocalWebMercator:i}=t;return null!=o&&o>i?new q:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeterForError,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new q:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new N:null}get _unsupportedLayerTransparencyError(){const e=this.view.map.ground&&this.view.map.ground.opacity<1,t=this._intersectingObbsByLayerView.size>0;return this._intersectingObbsByLayerView.keys().some(e=>e.fullOpacity<1)||e&&!t?new Z:null}get _perimeterForError(){const e=this._projectedGeometry;if(null==e)return null;let t=null;for(const r of e.rings){if(!k(r))continue;const e=ue(pe(r));t=e?Math.max(t??0,e):t}return null!=t?t*e.spatialReference.metersPerUnit:null}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(H(e.extent,e.spatialReference,ce,this.view.spatialReference),I(t,he),P(ce,he)&&this.notifyChange("elevationAlignedGeometry"))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t,r){if(!t)return;const{unitInMeters:o}=this.view.renderCoordsHelper,{dimensions:{width:i,height:n},cameraNearFar:{near:a,far:l}}=e,u=i/t.width*(n/t.height),p=ae(t.cut.totalDepth,a,l)*u,m=ae(t.fill.totalDepth,a,l)*u,c=o**3;this._rawResult=new J({cutVolume:s(Math.abs(p*c),"cubic-meters"),fillVolume:s(m*c,"cubic-meters"),area:r?.area,perimeter:r?.length})}_updateDepthExtremaPositions(e,t){if(!t)return;const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n},cameraPositionRenderSpace:s,northVector:a,eastVector:l,upVector:u}=e,p=e=>{const{depthExtremum:p,depthExtremumCoords:[m,c],totalDepth:h}=e,d=E(s);return 0!==h&&(y(d,d,l,r*(m/t.width-.5)),y(d,d,a,o*(c/t.height-.5))),y(d,d,u,-ae(p,i,n)),d},m={cut:p(t.cut),fill:p(t.fill)};this.depthExtremaPositions=m,this.analysisObb=le(e,m)}_findIntersectingObbs(e,t){const r=[];"integrated-mesh-3d"===e.type&&e.getVisibleNodes().forEach(o=>{e.isNodeLoaded(o.index)&&o.geometryObbInRenderSR?.intersectsFrustum(t)&&r.push(o.geometryObbInRenderSR)}),"integrated-mesh-3dtiles"===e.type&&e.forEachVisibleComponentObject(({obb:e})=>{e.intersectsFrustum(t)&&r.push(e)}),r.length>0&&this._intersectingObbsByLayerView.set(e,r)}_sufficientIntegratedMeshCoverage(e,t){const{renderCoordsHelper:r,spatialReference:o}=this.view,i=[],n=new R({spatialReference:o});if(this._intersectingObbsByLayerView.forEach(e=>{e.forEach(e=>{if(me(e.radius,t)&&(e.getCorners(be),n.points.length=0,be.forEach(e=>{const t=r.fromRenderCoords(e,je,o);t&&n.addPoint([t[0],t[1]])}),n.points.length)){const e=O(n);"polygon"===e?.type&&i.push(e)}})}),!i.length)return!1;const s=V(i);return!!s&&L(s,e)}_findIntersectingTerrainTiles(e){const{basemapTerrain:t}=this.view;this._intersectingTiles.length=0,I(e,de);const r=this._tileIterator;r.reset(t.rootTiles);for(let o=r.next();o;o=r.next())o.intersectsExtent(de)?o.rendered&&this._intersectingTiles.push(o):r.skipSubtree()}_sufficientTerrainCoverage(e){const{basemapTerrain:{tilingScheme:t}}=this.view;if(!this._intersectingTiles.length)return!1;const r=256/t.pixelSize;return this._intersectingTiles.every(t=>me(t.radius*r,e))}};function se(e,t){t.hasZ=!0,t.rings.forEach(t=>t.forEach(t=>t[2]=X(e,t,"ground")??0))}function ae(e,t,r){return e*(r-t)+t}function le(e,t){const{boundingRect:r,eastVector:o,northVector:i,upVector:n}=e;U(t.cut,o,i,n,fe),U(t.fill,o,i,n,ge);const s=.5*(r[0]+r[2]),a=.5*(r[1]+r[3]),l=Math.min(fe[2],ge[2]),u=Math.max(fe[2],ge[2]),p=.5*(l+u);return _(ye,o,s),y(ye,ye,i,a),y(ye,ye,n,p),v(_e,.5*(r[2]-r[0]),.5*(r[3]-r[1]),.5*(u-l)),w(ve,n),new Y(ye,_e,h(we,ve,o,i))}function ue(e){if(!e)return null;let t=null,r=null,o=0;for(const i of e)t||(t=[i[0],i[1]]),r?o+=f(r,i):r=[0,0],r[0]=i[0],r[1]=i[1];return t&&r&&(o+=f(r,t)),Math.sqrt(o)}function*pe(e){const t=g();for(let r=0;r<e.length;r++)t[0]=e[r][0],t[1]=e[r][1],yield t}e([u()],ne.prototype,"_projectedGeometry",null),e([u()],ne.prototype,"_localOrigin",null),e([u()],ne.prototype,"elevationAlignedGeometry",null),e([u()],ne.prototype,"targetGeometry",null),e([u()],ne.prototype,"_targetGeometryRenderInfo",null),e([u({constructOnly:!0})],ne.prototype,"analysis",void 0),e([u({constructOnly:!0})],ne.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],ne.prototype,"view",void 0),e([u()],ne.prototype,"updating",null),e([u()],ne.prototype,"result",null),e([u()],ne.prototype,"depthExtremaPositions",void 0),e([u()],ne.prototype,"analysisObb",void 0),e([u()],ne.prototype,"error",null),e([u()],ne.prototype,"_imLayerViewsAffectingMeasurement",null),e([u()],ne.prototype,"_insufficientDataError",null),e([u()],ne.prototype,"_perimeterTooLargeError",null),e([u()],ne.prototype,"_perimeterTooLargeLocalError",null),e([u()],ne.prototype,"_perimeterTooLargeGlobalError",null),e([u()],ne.prototype,"_unsupportedCoordinateSystemError",null),e([u()],ne.prototype,"_unsupportedLayerTransparencyError",null),e([u()],ne.prototype,"_perimeterForError",null),e([u()],ne.prototype,"_computation",void 0),e([u({readOnly:!0})],ne.prototype,"_updatingHandles",void 0),e([u()],ne.prototype,"_rawResult",void 0),e([u()],ne.prototype,"_sufficientDataCoverage",void 0),ne=e([p("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],ne);const me=(e,t)=>e<(t.width+t.height)/2,ce=M(),he=M(),de=D(),fe=b(),ge=b(),ye=b(),_e=b(),ve=b(),we=d(),be=new Array(8).fill(0).map(()=>b()),je=b();export{ne as VolumeMeasurementCutFillController};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../../../intl.js";import{volumeMeasurementConfiguration as o}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import n from"../../../../core/Accessor.js";import{equals as l}from"../../../../core/arrayUtils.js";import{cyclicalPI as r}from"../../../../core/Cyclical.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{isPromiseLike as u}from"../../../../core/promiseUtils.js";import{preferredVolumePrecision as c,formatDecimal as d}from"../../../../core/quantityFormatUtils.js";import{initial as m}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as h}from"../../../../core/units.js";import{property as p,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{create as y}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as _,normalize as f,subtract as v,cross as j,dot as V}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b,fromValues as L}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as w}from"../../../../core/support/UpdatingHandles.js";import{computeTranslationToOriginAndRotation as C}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{angleAroundAxis as G}from"../../../../geometry/support/vector.js";import{t as P}from"../../../../chunks/vec3.js";import F from"../../../../symbols/support/ElevationInfo.js";import{LabelVisualElement as x}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as O}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as R}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as D}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as M}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as A}from"../../layers/graphics/extrudeUtils.js";import{polygonToRenderInfoElevationAligned as H}from"../../support/renderInfoUtils/polygon.js";import{CutFillVisualization as U,VolumeGeometry as E}from"../../webgl-engine/lib/CutFillVisualization.js";import{createStipplePatternSimple as S}from"../../webgl-engine/materials/lineStippleUtils.js";let z=class extends n{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get inView(){return this.analysisViewData.analysisObb?.intersectsFrustum(this.view.frustum)??!1}get updating(){return this.loadingMessages||this._updatingHandles.updating}get hasUnsupportedError(){const{error:e}=this.analysisViewData;return!!e&&["unsupported-coordinate-system","unsupported-layer-transparency"].includes(e.name)}get _extrusionHeights(){const{renderCoordsHelper:e}=this.view,{depthExtremaPositions:t,targetGeometry:i}=this.analysisViewData,{targetElevationRange:s}=o;if(!i||!t)return{cut:s,fill:-s};let n=-1/0;for(const o of i.rings)for(const e of o)n=Math.max(n,e[2]);const l=1,r=e.getAltitude(t.fill);return{cut:s,fill:Math.min(r-n,0)-l}}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._updatingHandles=new w,this._elevationContext=M.fromElevationInfo(new F({mode:"absolute-height"})),this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=o,n={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new R({...n,isDraped:!0,color:s.geometryOutlineColor.toUnitRGBA()}),this._targetGeometry=new R(n);const l={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:3},r={...l,stipplePattern:S(s.projectionLineStippleSize)},a=s.cutProjectionLineColor.toUnitRGBA(),u=s.fillProjectionLineColor.toUnitRGBA();this._cutProjectionLines=new O({...l,color:a}),this._occludedCutProjectionLines=new O({...r,color:a}),this._fillProjectionLines=new O({...l,color:u,renderOccluded:8}),this._occludedFillProjectionLines=new O({...r,color:u});const c={...i,attached:!0};this._cutVolumeLabel=new x({...c,distance:s.labelDistance}),this._fillVolumeLabel=new x({...c,distance:-s.labelDistance}),this._cutFillVisualization=new U({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([this._updatingHandles.add(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},m),this._updatingHandles.add(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i,this._cutFillVisualization.measureType=i},m),this._updatingHandles.add(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i),m),this._updatingHandles.add(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor,hasResult:!!this.analysisViewData.result}),({interactive:e,accentColor:t,hasResult:i})=>{this._updateColors(e,t,i)},m),this._updatingHandles.add(()=>[this.analysisViewData.targetGeometry,this.inView,this._extrusionHeights,this._polygonRenderInfo],()=>this._updateCutFillGeometry(),m),this._updatingHandles.add(()=>this.visible&&this.inView&&this.view.state.camera.aboveGround&&!this.hasUnsupportedError,e=>this._updateCutFillVisibility(e),m),this._updatingHandles.add(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{depthExtremaPositions:s.depthExtremaPositions,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i&&!!s.result}},e=>this._updateLabels(e)),this._updatingHandles.add(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e),m),t(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=a(this._elevationAlignedGeometry),this._targetGeometry=a(this._targetGeometry),this._cutProjectionLines=a(this._cutProjectionLines),this._occludedCutProjectionLines=a(this._occludedCutProjectionLines),this._fillProjectionLines=a(this._fillProjectionLines),this._occludedFillProjectionLines=a(this._occludedFillProjectionLines),this._cutVolumeLabel=a(this._cutVolumeLabel),this._fillVolumeLabel=a(this._fillVolumeLabel),this._cutFillVisualization.destroy(),this._updatingHandles.destroy()}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:s}=this.view,o=[],n=[],r=[],a=[],u=[],c=e.spatialReference;for(let d=0;d<e.rings.length;d++){const i=e.rings[d],m=i.length>1&&l(i[0],i[i.length-1]),h=i.length-(m?1:0),p=[];for(let e=0;e<h;++e){const o=i[e],n=_(b(),o[0],o[1],o[2]);s.toRenderCoords(n,c,n);const l=t.rings[d][e],r=_(b(),l[0],l[1],l[2]);s.toRenderCoords(r,c,r);const a=new D(n,r);p.push(a)}const g=this.view.state.camera;for(let e=0;e<p.length;++e){const s=p[e],l=p[0===e?p.length-1:e-1],c=p[e===p.length-1?0:e+1],m=i[e],h=t.rings[d][e],y=m[2]>h[2],_=new I(s,l,c,y);o.push(_),_.updateOccluded(g);const f=_.isOccluded;y?(f?r:n).push(s):(f?u:a).push(s)}}this._projectionLines=o,this._cutProjectionLines.setGeometryFromSegments(n),this._occludedCutProjectionLines.setGeometryFromSegments(r),this._fillProjectionLines.setGeometryFromSegments(a),this._occludedFillProjectionLines.setGeometryFromSegments(u)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let n=!1,l=!1;for(const r of this._projectionLines){r.updateOccluded(e)&&(n||=r.isCut,l||=!r.isCut);const a=r.isOccluded;(r.isCut?a?i:t:a?o:s).push(r.segment)}l&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),n&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,t,i){const{geometryOutlineColor:s,cutColor:n,fillColor:l,cutColorMuted:r,fillColorMuted:a,cutProjectionLineColor:u,fillProjectionLineColor:c}=o;if(this._cutFillVisualization.cutColor=i?n:r,this._cutFillVisualization.fillColor=i?l:a,e){const e=t.toUnitRGBA();this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._cutFillVisualization.borderColor=t}else{this._targetGeometry.color=s.toUnitRGBA();const e=(i?u:r).toUnitRGBA();this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const t=(i?c:a).toUnitRGBA();this._fillProjectionLines.color=t,this._occludedFillProjectionLines.color=t,this._cutFillVisualization.borderColor=s}}_updateLabels(e){const{effectiveDisplayUnits:t,depthExtremaPositions:s,messages:o,unitsMessages:n,result:l,visible:r}=e;if(this._cutVolumeLabel.visible=r,this._fillVolumeLabel.visible=r,this._cutVolumeLabel.geometry=s?{type:"point",point:s.cut}:null,this._fillVolumeLabel.geometry=s?{type:"point",point:s.fill}:null,null==l||null==o||null==n)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=t.volume,u=i(o.labels.cut,{volume:B(n,l.cutVolume,a)}),c=i(o.labels.fill,{volume:B(n,l.fillVolume,a)});this._cutVolumeLabel.text=u,this._fillVolumeLabel.text=c}_updateCutFillVisibility(e){e?this._cutFillVisualization.enable():this._cutFillVisualization.disable()}get _polygonRenderInfo(){const{renderCoordsHelper:e,elevationProvider:t}=this.view,{targetGeometry:i}=this.analysisViewData;if(null==i)return null;const s=H(i,t,e,this._elevationContext,{outlineOutput:"tessellated-indices"});return u(s)?(this._updatingHandles.consumePromise(s),null):s}_updateCutFillGeometry(){const{view:e,analysisViewData:t,inView:i}=this,{renderCoordsHelper:s}=e,{targetGeometry:o}=t,{cut:n,fill:l}=this._extrusionHeights;if(!o?.extent||!i)return;const{center:r}=o.extent,a=L(r.x,r.y,0),u=b();s.toRenderCoords(a,o.spatialReference,u);const c=this._getExtrudedVolume(n,a,u),d=this._getExtrudedVolume(l,a,u);null!=c&&null!=d&&this._cutFillVisualization.updateGeometries(c,d,u)}_getExtrudedVolume(e,t,i){const{renderCoordsHelper:s,spatialReference:o}=this.view,n=b(),l=1===s.viewingMode;s.worldUpAtPosition(i,n);const{_polygonRenderInfo:r}=this;if(null==r)return null;const a=A(r,{height:e,worldUp:n,spherical:l,requireElevation:!1,requireNormals:!0,requireSizes:!1});if(null==a)return null;const u=y(),c=y();if(C(o,t,u,s.spatialReference),c[12]=-u[12],c[13]=-u[13],c[14]=-u[14],P(a.vertices,a.vertices,c),"stockpile"===this.analysis.measureType)for(let d=0;d<a.normals.length;d+=3)a.normals[d]=n[0],a.normals[d+1]=n[1],a.normals[d+2]=n[2];return new E(a.vertices,a.bottomIndices,a.indices,a.normals)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await s("esri/core/t9n/Units"),this.messages=await s("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function B(e,t,i){if(!t||!e)return null;const s=h(t.value,t.unit,i),o=c(s);return d(e,t,s,o)}e([p({constructOnly:!0})],z.prototype,"view",void 0),e([p({constructOnly:!0})],z.prototype,"analysis",void 0),e([p({constructOnly:!0})],z.prototype,"analysisViewData",void 0),e([p()],z.prototype,"unitsMessages",void 0),e([p()],z.prototype,"messages",void 0),e([p()],z.prototype,"loadingMessages",void 0),e([p({readOnly:!0})],z.prototype,"_updatingHandles",void 0),e([p({readOnly:!0})],z.prototype,"visible",null),e([p()],z.prototype,"inView",null),e([p()],z.prototype,"updating",null),e([p()],z.prototype,"hasUnsupportedError",null),e([p()],z.prototype,"_extrusionHeights",null),e([p()],z.prototype,"_polygonRenderInfo",null),z=e([g("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],z);class I{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=b(),this._n2=b();const o=f(T,v(T,e.endRenderSpace,e.startRenderSpace));f(this._n1,j(this._n1,o,f(q,v(q,t.startRenderSpace,e.startRenderSpace)))),f(this._n2,j(this._n2,o,f(q,v(q,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=r.normalize(G(this._n1,this._n2,o))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){v(T,this.segment.startRenderSpace,e.eye);const t=V(this._n1,T)<0,i=V(this._n2,T)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const T=b(),q=b();export{z as VolumeMeasurementCutFillVisualization};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../../chunks/FocusAreaColor.glsl.js";import{makePipelineState as t,premultipliedAlpha as c,defaultColorWrite as a}from"../../../../webgl/renderState.js";let l=class extends s{constructor(){super(...arguments),this.shader=new o(i,()=>import("./FocusAreaColor.glsl.js")),this.ignoreUnused=!0}initializePipeline(){return t({colorWrite:a,blending:c})}};l=e([r("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorTechnique")],l);export{l as FocusAreaColorTechnique};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{watch as s}from"../../../../../core/reactiveUtils.js";import{property as t,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as i}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as o}from"../../../webgl.js";import a from"../../../webgl/RenderNode.js";import{F as n}from"../../../../../chunks/FocusAreaColor.glsl.js";import{FocusAreaColorTechnique as c}from"./FocusAreaColorTechnique.js";import{EmissiveTechniqueConfiguration as h}from"../../shaders/EmissiveTechniqueConfiguration.js";let m=class extends a{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[o.FOCUSAREA_COLOR,o.FOCUSAREA]},this.produces=o.FOCUSAREA_COLOR,this._fadeDirection=0,this._configuration=new h,this._passParameters=new n}fadeOut(e){this.removeAllHandles(),this._startTime=null,this._fadeDirection=1,this.addHandles(s(()=>this._passParameters.fadeFactor.value,s=>{0===s&&(this.removeAllHandles(),e())})),this.requestRender(2)}precompile(){this._configuration.hasEmissive=0!==this.bindParameters.emissions,this.techniques.precompile(c,this._configuration)}render(e){const s=this.bindParameters;this._startTime??=this.view.stage?.renderer.renderContext.time;const t=this.view.qualitySettings.fadeDuration,r=t>0?Math.min(t,this.view.stage?.renderer.renderContext.time-this._startTime)/t:1,a=this.renderingContext,n=this.techniques.get(c,this._configuration),h=this.input,m=e.find(({name:e})=>e===o.FOCUSAREA),f="bright"===this.focusAreasView.style;this._passParameters.color=f?h.getTexture():a.emptyTexture,this._passParameters.focusArea=m.getTexture(),this._passParameters.effect=u[this.focusAreasView.style],this._passParameters.fadeFactor.value=0===this._fadeDirection?r:1-r;const d=s.camera,l=d.fullViewport[2],p=d.fullViewport[3],g=f?this.fboCache.acquire(l,p,this.produces).moveAttachments(h):h;return a.bindFramebuffer(g.fbo),f&&a.clearBuffer(0,i),a.bindTechnique(n,s,this._passParameters),a.screen.draw(),r<1&&this.requestRender(2),g}};e([t()],m.prototype,"consumes",void 0),e([t()],m.prototype,"produces",void 0),e([t({constructOnly:!0})],m.prototype,"focusAreasView",void 0),m=e([r("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaVisualization")],m);const u={bright:0,dark:1};export{m as FocusAreaVisualization,u as styleToEffect};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{InternalRenderCategory as l}from"../../webgl.js";import{glLayout as u}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import h from"../../webgl/RenderNode.js";import{VertexArrayObject as c}from"./VertexArrayObject.js";import{C as m}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as d}from"../shaders/CutFillCompositionTechnique.js";import{DefaultMaterialPassParameters as p,DefaultMaterialDrawParameters as f,DefaultMaterialTechnique as _}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as C}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{EmissiveTechniqueConfiguration as b}from"../shaders/EmissiveTechniqueConfiguration.js";import{O as g}from"../../../../chunks/OccludedGeometryDepth.glsl.js";import{OccludedGeometryDepthTechnique as V}from"../shaders/OccludedGeometryDepthTechnique.js";import{V as v}from"../../../../chunks/VolumeMask.glsl.js";import{VolumeMaskTechnique as T}from"../shaders/VolumeMaskTechnique.js";import{DepthStencilAttachment as w,PrimitiveType as P}from"../../../webgl/enums.js";import{noParameters as q}from"../../../webgl/NoParameters.js";import{VertexBuffer as y}from"../../../webgl/VertexBuffer.js";let D=class extends h{constructor(e){super(e),this.consumes={required:[l.CUTFILL_COLOR,l.GROUND_DEPTH]},this.produces=l.CUTFILL_COLOR,this.measureType="cut-fill",this._vaoCut=null,this._vaoFill=null,this._compositeConfiguration=new b,this._maskParameters=new v,this._occludedGeometryDepthParameters=new g,this._cutVolumeParameters=new p,this._fillVolumeParameters=new p,this._compositeParameters=new m,this._drawParameters=new f;const t=1===e.view.state.viewingMode;this._cutVolumeConfiguration=new C(t),this._cutVolumeConfiguration.customDepthTest=3,this._cutVolumeConfiguration.writeDepth=!1,this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2,this._fillVolumeConfiguration=new C(t),this._fillVolumeConfiguration.customDepthTest=1,this._fillVolumeConfiguration.cullFace=2}initialize(){this.addHandles([i(()=>[this.cutColor,this.fillColor],()=>this._updateColors(),s),i(()=>this.measureType,()=>this.requestRender(1),s)])}destroy(){this._disposeVaos()}precompile(){this._vaoCut&&this._vaoFill&&("cut-fill"===this.measureType?(this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2):(this._cutVolumeConfiguration.cullFace=0,this._cutVolumeConfiguration.doubleSidedMode=0),this._compositeConfiguration.hasEmissive=0!==this.bindParameters.emissions,this.techniques.precompile(T),this.techniques.precompile(V),this.techniques.precompile(_,this._cutVolumeConfiguration),this.techniques.precompile(_,this._fillVolumeConfiguration),this.techniques.precompile(d,this._compositeConfiguration))}render(e){const t=this.input;if(!this._vaoCut||!this._vaoFill)return t;const i=this._vaoCut.vertexCount("geometry"),s=this._vaoFill.vertexCount("geometry"),o=this.bindParameters,r=o.camera,a=r.fullViewport[2],u=r.fullViewport[3],n=this.renderingContext,h=this.fboCache,c=e.find(({name:e})=>e===l.GROUND_DEPTH),m=h.acquire(a,u,"cutfill color mask",2).attachDepth(c.getAttachment(w));n.bindFramebuffer(m.fbo),n.setClearColor(0,0,0,1),n.clear(17408),n.setViewport(0,0,a,u);const p=this.techniques.get(T);n.bindTechnique(p,o,q,this._maskParameters),n.setFaceCullingEnabled(!1),n.setStencilTestEnabled(!0),n.setStencilOpSeparate(1028,7680,34055,7680),n.setStencilOpSeparate(1029,7680,34056,7680),n.setDepthWriteEnabled(!1),n.bindVAO(this._vaoCut),n.setDepthTestEnabled(!0),n.setStencilWriteMask(255),n.setStencilFunction(519,0,255),n.setColorMask(!1,!1,!1,!1),n.drawArrays(P.TRIANGLES,0,i),n.setDepthTestEnabled(!1),n.setStencilWriteMask(0),n.setStencilFunction(517,0,255),n.setColorMask(!0,!1,!1,!1),n.drawArrays(P.TRIANGLES,0,i),n.bindVAO(this._vaoFill),n.setDepthTestEnabled(!0),n.setStencilWriteMask(255),n.setStencilFunction(519,0,255),n.setColorMask(!1,!0,!1,!1),n.drawArrays(P.TRIANGLES,0,s);const f=h.acquire(a,u,"cutfill color cut volume",5).acquireDepth(14);n.bindFramebuffer(f.fbo),n.setClearColor(0,0,0,0),n.setClearDepth(1),n.setColorMask(!0,!0,!0,!0),n.setDepthWriteEnabled(!0),n.clear(16640);const C=this.techniques.get(V);this._occludedGeometryDepthParameters.depthTexture=c.getTexture(w),this._occludedGeometryDepthParameters.cullFace=this._cutVolumeConfiguration.cullFace,n.bindTechnique(C,o,this._occludedGeometryDepthParameters,this._drawParameters),n.bindVAO(this._vaoCut),n.drawArrays(P.TRIANGLES,0,i);const b=this.techniques.get(_,this._cutVolumeConfiguration);n.bindTechnique(b,this.bindParameters,this._cutVolumeParameters,this._drawParameters),n.bindVAO(this._vaoCut),n.drawArrays(P.TRIANGLES,0,i),f.detachDepth();const g=h.acquire(a,u,"cutfill color fill volume",5).acquireDepth(14);n.blitFramebuffer(t.fbo,g.fbo,256),n.bindFramebuffer(g.fbo),n.clear(16384),n.setColorMask(!0,!0,!0,!0);const v=this.techniques.get(_,this._fillVolumeConfiguration);n.bindTechnique(v,this.bindParameters,this._fillVolumeParameters,this._drawParameters),n.bindVAO(this._vaoFill),n.drawArrays(P.TRIANGLES,0,s),g.detachDepth();const y=t.obtainDepthTexture();n.bindFramebuffer(t.fbo),this._compositeParameters.cutVolume=f.getTexture(),this._compositeParameters.fillVolume=g.getTexture(),this._compositeParameters.mask=m.getTexture(),this._compositeParameters.sceneDepth=y?.attachment,this._compositeParameters.groundDepth=c.getTexture(w),this.borderColor.toUnitRGBA(this._compositeParameters.borderColor);const D=this.techniques.get(d,this._compositeConfiguration);return n.bindTechnique(D,o,this._compositeParameters),n.screen.draw(),t.attachDepth(y),y?.release(),m.release(),f.release(),g.release(),t}enable(){this.produces=l.CUTFILL_COLOR,this.requestRender(1)}disable(){this.produces="disabled",this.requestRender(1)}updateGeometries(e,t,i){this._disposeVaos(),this._vaoCut=this._createVao(e),this._vaoFill=this._createVao(t),this._maskParameters.origin=i,a(this._drawParameters.origin,i),this.requestRender(1)}_updateColors(){this._cutVolumeParameters.diffuse=this.cutColor.toUnitRGB(),this._cutVolumeParameters.opacity=this.cutColor.a,this._fillVolumeParameters.diffuse=this.fillColor.toUnitRGB(),this._fillVolumeParameters.opacity=this.fillColor.a,this.requestRender(1)}_createVao(e){const{vertices:t,normals:i,indicesBottom:s,indicesExtruded:o}=e,r=s.length+o.length,a=this.renderingContext,l=F.createBuffer(r),{position:n,normal:h}=l;let m=0;for(let u=0;u<s.length;u++){const e=3*s[u];n.set(m,0,t[e]),n.set(m,1,t[e+1]),n.set(m,2,t[e+2]),h.set(m,0,i[e]),h.set(m,1,i[e+1]),h.set(m,2,i[e+2]),m++}for(let u=0;u<o.length;u++){const e=3*o[u];n.set(m,0,t[e]),n.set(m,1,t[e+1]),n.set(m,2,t[e+2]),h.set(m,0,i[e]),h.set(m,1,i[e+1]),h.set(m,2,i[e+2]),m++}const d=new y(a,u(F),l.buffer);return new c(a,d)}_disposeVaos(){this._vaoCut=t(this._vaoCut),this._vaoFill=t(this._vaoFill)}};e([o()],D.prototype,"consumes",void 0),e([o()],D.prototype,"produces",void 0),e([o()],D.prototype,"cutColor",void 0),e([o()],D.prototype,"fillColor",void 0),e([o()],D.prototype,"borderColor",void 0),e([o()],D.prototype,"measureType",void 0),D=e([r("esri.views.3d.webgl-engine.lib.CutFillVisualization")],D);const F=n().vec3f("position").vec3f("normal").freeze();class j{constructor(e,t,i,s){this.vertices=e,this.indicesBottom=t,this.indicesExtruded=i,this.normals=s}}export{D as CutFillVisualization,j as VolumeGeometry};