@arcgis/core 4.32.0-next.20241219 → 4.32.0-next.20241221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{0da2aaca3f0b4fe910e3.js → 015285436ca965f94e17.js} +1 -1
  4. package/assets/esri/core/workers/chunks/127c82cdb229434883b6.js +1 -0
  5. package/assets/esri/core/workers/chunks/16530347bd78dc6c2fcd.js +1 -0
  6. package/assets/esri/core/workers/chunks/{5119811063bfc97fb725.js → 1a713cc601c6fcd97d2f.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{48f6eb3b63fec1d3312d.js → 2d908c115ea18e813b95.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{11052103efe3d53a784e.js → 31d9f0a37a5d0a1c450b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{e7c3199813070ff30a3d.js → 3bb94da29dac3367ecc6.js} +1 -1
  10. package/assets/esri/core/workers/chunks/3ed7c8138231de3a3b96.js +1 -0
  11. package/assets/esri/core/workers/chunks/{9cc9bac6e02ab241e852.js → 4746b7afa90ea3641e60.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{ce33d2b5f22a5c566661.js → 4b5dbdcad438cb2dd4bf.js} +1 -1
  13. package/assets/esri/core/workers/chunks/5a0eb9dfe668cf290462.js +1 -0
  14. package/assets/esri/core/workers/chunks/{ee1ddf56549bb169509c.js → 6332da54159d72a6ce66.js} +1 -1
  15. package/assets/esri/core/workers/chunks/648d7d8fa19a2e772c89.js +1 -0
  16. package/assets/esri/core/workers/chunks/66b411119b8ffb99b9dc.js +1 -0
  17. package/assets/esri/core/workers/chunks/69efc716991a407c3d23.js +1 -0
  18. package/assets/esri/core/workers/chunks/88c68881cbdf4e911832.js +1 -0
  19. package/assets/esri/core/workers/chunks/8e60de347b209a753c73.js +1 -0
  20. package/assets/esri/core/workers/chunks/{fb43c44a7d6b61f31e75.js → 94432e04de01ee7adc0e.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{80ac74da0b0e45e74beb.js → 9a498f2c007f4d78d4dd.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{770d233254419b741616.js → 9ad7d095e614e7e8d7f5.js} +1 -1
  23. package/assets/esri/core/workers/chunks/9dd167db3f2e68b71cea.js +1 -0
  24. package/assets/esri/core/workers/chunks/{b15894bff153e0793ef4.js → 9f495ad57cdbfa90c5b8.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{d7b76bc7bff34abc2253.js → a0b3d70a1b0360084593.js} +1 -1
  26. package/assets/esri/core/workers/chunks/a90611cdc86190799560.js +1 -0
  27. package/assets/esri/core/workers/chunks/{e213f4a1c95a33f80cdc.js → aedff36d3fec86abb9fb.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{194013d377e7dd00845f.js → b611f46835edcd6eefcc.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{eddab4dc706e75c6637f.js → bff74200a0df0950cf08.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{8f2ffb6944c9028d3bea.js → c08cb75c3eef6c45f604.js} +1 -1
  31. package/assets/esri/core/workers/chunks/c1c216b0aebe86311fae.js +1 -0
  32. package/assets/esri/core/workers/chunks/{f2b195d04414417682d4.js → cbf57abb537e86c1dd7f.js} +1 -1
  33. package/assets/esri/core/workers/chunks/dce55e7f76adecc055c3.js +1 -0
  34. package/assets/esri/core/workers/chunks/f2cdb7be3fd65f65c30b.js +1 -0
  35. package/assets/esri/core/workers/chunks/f9af0473878d960a02f2.js +1 -0
  36. package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +1 -0
  37. package/assets/esri/core/workers/chunks/{0f1a7aeec18db5323365.js → fdd8a5eb07466541f1f9.js} +1 -1
  38. package/assets/esri/themes/base/widgets/_FeatureTable.scss +3 -3
  39. package/assets/esri/themes/dark/main.css +1 -1
  40. package/assets/esri/themes/light/main.css +1 -1
  41. package/assets/esri/themes/light/view.css +1 -1
  42. package/chunks/OperatorProject.js +1 -1
  43. package/chunks/QuadraticBezier.js +1 -1
  44. package/form/elements/GroupElement.js +1 -1
  45. package/form/elements/UtilityNetworkAssociationsElement.d.ts +4 -0
  46. package/form/elements/{UtilityNetworkAssociationElement.js → UtilityNetworkAssociationsElement.js} +1 -1
  47. package/form/elements.js +1 -1
  48. package/form/support/formUtils.js +1 -1
  49. package/geometry/operators/affineTransformOperator.js +1 -1
  50. package/geometry/operators/alphaShapeOperator.js +1 -1
  51. package/geometry/operators/areaOperator.js +1 -1
  52. package/geometry/operators/autoCompleteOperator.js +1 -1
  53. package/geometry/operators/boundaryOperator.js +1 -1
  54. package/geometry/operators/bufferOperator.js +1 -1
  55. package/geometry/operators/centroidOperator.js +1 -1
  56. package/geometry/operators/clipOperator.js +1 -1
  57. package/geometry/operators/containsOperator.js +1 -1
  58. package/geometry/operators/convexHullOperator.js +1 -1
  59. package/geometry/operators/crossesOperator.js +1 -1
  60. package/geometry/operators/cutOperator.js +1 -1
  61. package/geometry/operators/densifyOperator.js +1 -1
  62. package/geometry/operators/differenceOperator.js +1 -1
  63. package/geometry/operators/disjointOperator.js +1 -1
  64. package/geometry/operators/distanceOperator.js +1 -1
  65. package/geometry/operators/equalsOperator.js +1 -1
  66. package/geometry/operators/extendOperator.js +1 -1
  67. package/geometry/operators/generalizeOperator.js +1 -1
  68. package/geometry/operators/geodesicBufferOperator.js +1 -1
  69. package/geometry/operators/geodesicProximityOperator.js +1 -1
  70. package/geometry/operators/geodeticAreaOperator.js +1 -1
  71. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  72. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  73. package/geometry/operators/geodeticLengthOperator.js +1 -1
  74. package/geometry/operators/graphicBufferOperator.js +1 -1
  75. package/geometry/operators/integrateOperator.js +1 -1
  76. package/geometry/operators/intersectionOperator.js +1 -1
  77. package/geometry/operators/intersectsOperator.js +1 -1
  78. package/geometry/operators/isNearOperator.js +1 -1
  79. package/geometry/operators/labelPointOperator.js +1 -1
  80. package/geometry/operators/lengthOperator.js +1 -1
  81. package/geometry/operators/linesToPolygonsOperator.js +1 -1
  82. package/geometry/operators/locateBetweenOperator.js +1 -1
  83. package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
  84. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  85. package/geometry/operators/offsetOperator.js +1 -1
  86. package/geometry/operators/overlapsOperator.js +1 -1
  87. package/geometry/operators/polygonOverlayOperator.js +1 -1
  88. package/geometry/operators/polygonSlicerOperator.js +1 -1
  89. package/geometry/operators/projectOperator.js +1 -1
  90. package/geometry/operators/proximityOperator.js +1 -1
  91. package/geometry/operators/relateOperator.js +1 -1
  92. package/geometry/operators/reshapeOperator.js +1 -1
  93. package/geometry/operators/simplifyOperator.js +1 -1
  94. package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
  95. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  96. package/geometry/operators/touchesOperator.js +1 -1
  97. package/geometry/operators/unionOperator.js +1 -1
  98. package/geometry/operators/withinOperator.js +1 -1
  99. package/interfaces.d.ts +231 -71
  100. package/layers/LinkChartLayer.js +1 -1
  101. package/layers/graphics/OptimizedFeature.js +1 -1
  102. package/layers/graphics/sources/geojson/geojson.js +1 -1
  103. package/layers/knowledgeGraph/supportUtils.js +1 -1
  104. package/layers/support/Sublayer.js +1 -1
  105. package/layers/support/VideoElement.js +1 -1
  106. package/layers/support/domainUtils.js +1 -1
  107. package/layers/support/fieldUtils.js +1 -1
  108. package/linkChart/OrganicLayoutSettings.js +1 -1
  109. package/package.json +1 -1
  110. package/portal/schemas/definitions.js +1 -1
  111. package/rest/knowledgeGraphService.js +1 -1
  112. package/rest/query/operations/pbfOptimizedFeatureSet.js +1 -1
  113. package/rest/support/fileFormat.js +1 -1
  114. package/support/revision.js +1 -1
  115. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  116. package/views/2d/input/MapViewInputManager.js +1 -1
  117. package/views/2d/input/handlers/KeyRotate.js +1 -1
  118. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  119. package/views/2d/layers/features/FeatureContainer.js +1 -1
  120. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  121. package/views/2d/layers/features/Processor.js +1 -1
  122. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  123. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  124. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  125. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  126. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  127. package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
  128. package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
  129. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +5 -0
  130. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  131. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  132. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  133. package/views/2d/layers/support/DebouncedFeatureOverride.js +5 -0
  134. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  135. package/views/3d/input/SceneInputManager.js +1 -1
  136. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  137. package/views/3d/terrain/TileTexture.js +1 -1
  138. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  139. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  140. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  141. package/views/3d/webgl-engine/lib/TextureCompressionWorker.js +1 -1
  142. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  143. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  144. package/views/layers/FeatureLayerView.js +1 -1
  145. package/views/support/TextureCompressionHelper.js +1 -1
  146. package/views/webgl/Texture.js +1 -1
  147. package/webscene/Slide.js +1 -1
  148. package/webscene/SlideLegend.d.ts +4 -0
  149. package/webscene/SlideLegend.js +5 -0
  150. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  151. package/widgets/FeatureForm.js +1 -1
  152. package/widgets/FeatureTable/FieldColumn.js +1 -1
  153. package/widgets/Features/FeaturesViewModel.js +1 -1
  154. package/widgets/Features.js +1 -1
  155. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  156. package/widgets/OrientedImageryViewer/adapters/sketch/DigitizationAdapter.js +1 -1
  157. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  158. package/widgets/OrientedImageryViewer/digitizationUtils.js +1 -1
  159. package/widgets/OrientedImageryViewer.js +1 -1
  160. package/widgets/Popup.js +1 -1
  161. package/widgets/Print/PrintViewModel.js +1 -1
  162. package/widgets/Print/TemplateOptions.js +1 -1
  163. package/widgets/Print.js +1 -1
  164. package/widgets/ShadowCast.js +1 -1
  165. package/widgets/support/forms/formUtils.js +1 -1
  166. package/assets/esri/core/workers/chunks/0e9bd990a8d0691fb9c8.js +0 -1
  167. package/assets/esri/core/workers/chunks/27933d6ffeebb5c13ab7.js +0 -1
  168. package/assets/esri/core/workers/chunks/3ef5002b21b1a5b97e11.js +0 -1
  169. package/assets/esri/core/workers/chunks/48266c87363e7dcaefb3.js +0 -1
  170. package/assets/esri/core/workers/chunks/5786b190ad3e2d933245.js +0 -1
  171. package/assets/esri/core/workers/chunks/668679baf519ada9ae28.js +0 -1
  172. package/assets/esri/core/workers/chunks/737f381f2cfeddb96d15.js +0 -1
  173. package/assets/esri/core/workers/chunks/84d26c6c805f5855ffd3.js +0 -1
  174. package/assets/esri/core/workers/chunks/8f2f2d497b875e2b4139.js +0 -1
  175. package/assets/esri/core/workers/chunks/a4c8b773283ea8f0e256.js +0 -1
  176. package/assets/esri/core/workers/chunks/a68068b3151a14c4a0ad.js +0 -1
  177. package/assets/esri/core/workers/chunks/ad99308fb9678cdce917.js +0 -1
  178. package/assets/esri/core/workers/chunks/cc427e8f1b17744b6ea4.js +0 -1
  179. package/assets/esri/core/workers/chunks/dd4bd96dfb7f9921b774.js +0 -1
  180. package/assets/esri/core/workers/chunks/e1a03231e24293e66418.js +0 -1
  181. package/assets/esri/core/workers/chunks/fce1158755f959730602.js +0 -1
  182. package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +0 -5
  183. package/views/3d/input/handlers/SingleKey.js +0 -5
  184. package/views/3d/input/handlers/SingleKeyResetHeading.js +0 -5
  185. package/views/3d/input/handlers/SingleKeyResetTilt.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import"../core/has.js";import{destroyMaybe as i}from"../core/maybe.js";import{watch as t,syncAndInitial as o}from"../core/reactiveUtils.js";import{convertTime as s}from"../core/timeUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import{substitute as l}from"../intl/substitute.js";import n from"./Slider.js";import d from"./Widget.js";import{css as c}from"./ShadowCast/css.js";import{ShadowCastState as m}from"./ShadowCast/ShadowCastState.js";import p from"./ShadowCast/ShadowCastViewModel.js";import h from"./ShadowCast/ShadowCastVisibleElements.js";import{ShadowVisualizationType as u}from"./ShadowCast/ShadowVisualizationType.js";import{DiscreteConfigurator as v}from"./ShadowCast/components/DiscreteConfigurator.js";import{DurationConfigurator as f}from"./ShadowCast/components/DurationConfigurator.js";import{ShadowTooltip as w}from"./ShadowCast/components/ShadowTooltip.js";import{ThresholdConfigurator as g}from"./ShadowCast/components/ThresholdConfigurator.js";import{loadCalciteComponents as b}from"./support/componentsUtils.js";import{globalCss as C}from"./support/globalCss.js";import{Heading as S}from"./support/Heading.js";import{timeStringFormattingOptions as y,formatSliderLabel as _,onPrimaryTickCreated as k,onSecondaryTickCreated as M}from"./support/timeWidgetUtils.js";import{TimezonePicker as j}from"./support/TimezonePicker.js";import"./support/widgetUtils.js";import{messageBundle as T}from"./support/decorators/messageBundle.js";import{tsx as D}from"./support/jsxFactory.js";import{formatDate as z}from"../intl/date.js";import{getLocale as V}from"../intl/locale.js";var O;!function(e){e.Slider="slider"}(O||(O={}));const P={labelFormatFunction:_,min:0,max:1439,steps:15,rangeLabelInputsEnabled:!1,visibleElements:{labels:!1,rangeLabels:!1},tickConfigs:[{mode:"position",values:[0,360,720,1080,1439],labelsVisible:!0,tickCreatedFunction:(e,i,t)=>k({tickElement:i,labelElement:t})},{mode:"position",values:[120,240,480,600,840,960,1200,1320],tickCreatedFunction:(e,i)=>M({tickElement:i})}]};let E=class extends d{constructor(e,i){super(e,i),this.viewModel=null,this.headingLevel=4,this.visibleElements=new h,this._defaultViewModel=null,this._timeSlider=new n({...P,container:document.createElement("div")}),this._tooltip=null,this._onTimezoneChange=e=>{this.viewModel.utcOffset=e},this._onDateChange=e=>{const i=e.currentTarget.valueAsDate;this.viewModel.date=Array.isArray(i)?i[0]:i},e?.viewModel||(this._defaultViewModel=new p({view:e?.view}),this.viewModel=this._defaultViewModel)}initialize(){this.addHandles([t((()=>({viewModel:this.viewModel,slider:this._timeSlider})),(e=>this._connectTimeSlider(e)),o),t((()=>({container:this.view?.surface,viewModel:this.viewModel,tooltipVisible:this.visibleElements.tooltip})),(({container:e,viewModel:t,tooltipVisible:o})=>{this._tooltip=i(this._tooltip),null!=e&&o&&(this._tooltip=new w({viewModel:t,container:e}))}),o),t((()=>({viewModel:this.viewModel,visible:this.visible})),(({viewModel:e,visible:i})=>e.setRunning(i)),o)])}destroy(){this._timeSlider=i(this._timeSlider),null!=this._defaultViewModel&&this.viewModel!==this._defaultViewModel&&this._defaultViewModel.destroy()}loadDependencies(){return b({"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select")})}render(){const{visibleElements:e,viewModel:i}=this,t=i.state===m.Disabled;return D("div",{class:this.classes(c.base,C.widget,C.panel,{[C.widgetDisabled]:t}),key:this},this._renderTimeRangeSection(),e.visualizationOptions?this._renderVisualizationOptionsSection():null)}get view(){return this.viewModel?.view}set view(e){this.viewModel&&(this.viewModel.view=e)}get icon(){return"measure-building-height-shadow"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get testData(){}_connectTimeSlider({viewModel:e,slider:i}){if(this.removeHandles(O.Slider),null==i)return;const r=e=>s(e,"milliseconds","minutes"),a=e=>s(e,"minutes","milliseconds"),l=({index:i,value:t})=>{0===i?e.startTimeOfDay=a(t):e.endTimeOfDay=a(t)};this.addHandles([t((()=>[e.startTimeOfDay,e.endTimeOfDay]),(e=>{i.values=e.map(r)}),o),i.on("thumb-change",l),i.on("thumb-drag",l),i.on("segment-drag",(()=>{[e.startTimeOfDay,e.endTimeOfDay]=i.values.map(a)}))],O.Slider)}_renderTimeRangeSection(){const{visibleElements:e}=this;return e.timeRangeSlider||e.datePicker?D("section",{class:c.timeRange,key:"time-range"},D(S,{level:this.headingLevel},this.messages.timeLabel),e.timeRangeSlider?this._renderTimeRange():null,e.datePicker?this._renderDatePicker():null):null}_renderTimeRange(){const{messages:e,viewModel:i,visibleElements:t}=this,{startTimeOfDay:o,endTimeOfDay:s}=i,[r,a]=[o,s].map((e=>z(new Date(e),y)));return[D("div",{class:c.timeRangeIndicator,key:"time-range-indicator"},l(e.timeRange,{start:r,end:a}),t.timezone?D(j,{value:i.utcOffset,onChange:this._onTimezoneChange}):null),D("div",{afterCreate:this._timeSliderContainerAfterCreate,afterRemoved:this._timeSliderContainerAfterRemoved,bind:this,key:"time-slider-container"})]}_timeSliderContainerAfterCreate(e){const i=this._timeSlider?.container;i&&e.appendChild(i)}_timeSliderContainerAfterRemoved(e){const i=this._timeSlider?.container;i&&e.removeChild(i)}_renderDatePicker(){return D("div",{class:c.datePickerContainer,key:c.datePickerContainer},D("calcite-input-date-picker",{afterCreate:this._datePickerAfterCreate,class:c.datePicker,"data-testid":"date-picker",key:c.datePicker,overlayPositioning:"fixed",placement:"bottom",valueAsDate:this.viewModel.date,onCalciteInputDatePickerChange:this._onDateChange}))}_datePickerAfterCreate(e){e.effectiveLocale=V(),e.handleDateTimeFormatChange()}_renderVisualizationOptionsSection(){const{headingLevel:e,messages:i,viewModel:t,visibleElements:o}=this,s=o.colorPicker,r=e=>this.classes(t.visualizationType===e?null:c.visualizationConfigHidden);return D("section",{class:c.visualization,key:"visualization"},D(S,{level:e},i.visualizationLabel),this._renderVisualizationSelect(),D("div",{class:r(u.Threshold),key:"threshold-configurator"},D(g,{colorPickerVisible:s,options:t.thresholdOptions})),D("div",{class:r(u.Duration),key:"duration-configurator"},D(f,{colorPickerVisible:s,options:t.durationOptions})),D("div",{class:r(u.Discrete),key:"discrete-configurator"},D(v,{colorPickerVisible:s,options:t.discreteOptions})))}_renderVisualizationSelect(){const e=this.messages,i=this.viewModel.visualizationType;return D("calcite-select",{bind:this,class:c.visualizationSelect,key:"visualization-select",label:e.visualizationLabel,onCalciteSelectChange:this._onVisualizationTypeChange},[{type:u.Threshold,label:e.threshold.label},{type:u.Duration,label:e.duration.label},{type:u.Discrete,label:e.discrete.label}].map((({type:e,label:t})=>D("calcite-option",{selected:e===i,value:e},t))))}_onVisualizationTypeChange(e){const i=e.currentTarget.selectedOption?.value;this.viewModel.visualizationType=i??u.Threshold}};e([r()],E.prototype,"viewModel",void 0),e([r()],E.prototype,"view",null),e([r()],E.prototype,"headingLevel",void 0),e([r()],E.prototype,"icon",null),e([r()],E.prototype,"label",null),e([r({type:h,nonNullable:!0})],E.prototype,"visibleElements",void 0),e([r(),T("esri/widgets/ShadowCast/t9n/ShadowCast")],E.prototype,"messages",void 0),e([r()],E.prototype,"_defaultViewModel",void 0),e([r()],E.prototype,"_timeSlider",void 0),e([r()],E.prototype,"_tooltip",void 0),E=e([a("esri.widgets.ShadowCast")],E);const R=E;export{R as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import"../core/has.js";import{destroyMaybe as i}from"../core/maybe.js";import{watch as t,syncAndInitial as o}from"../core/reactiveUtils.js";import{convertTime as s}from"../core/timeUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{substitute as a}from"../intl/substitute.js";import n from"./Slider.js";import d from"./Widget.js";import{css as c}from"./ShadowCast/css.js";import{ShadowCastState as m}from"./ShadowCast/ShadowCastState.js";import p from"./ShadowCast/ShadowCastViewModel.js";import h from"./ShadowCast/ShadowCastVisibleElements.js";import{ShadowVisualizationType as u}from"./ShadowCast/ShadowVisualizationType.js";import{DiscreteConfigurator as v}from"./ShadowCast/components/DiscreteConfigurator.js";import{DurationConfigurator as w}from"./ShadowCast/components/DurationConfigurator.js";import{ShadowTooltip as g}from"./ShadowCast/components/ShadowTooltip.js";import{ThresholdConfigurator as f}from"./ShadowCast/components/ThresholdConfigurator.js";import{loadCalciteComponents as b}from"./support/componentsUtils.js";import{globalCss as S}from"./support/globalCss.js";import{Heading as y}from"./support/Heading.js";import{timeStringFormattingOptions as C,formatSliderLabel as _,onPrimaryTickCreated as k,onSecondaryTickCreated as M}from"./support/timeWidgetUtils.js";import{TimezonePicker as j}from"./support/TimezonePicker.js";import"./support/widgetUtils.js";import{messageBundle as T}from"./support/decorators/messageBundle.js";import{tsx as D}from"./support/jsxFactory.js";import{formatDate as z}from"../intl/date.js";var V;!function(e){e.Slider="slider"}(V||(V={}));const O={labelFormatFunction:_,min:0,max:1439,steps:15,rangeLabelInputsEnabled:!1,visibleElements:{labels:!1,rangeLabels:!1},tickConfigs:[{mode:"position",values:[0,360,720,1080,1439],labelsVisible:!0,tickCreatedFunction:(e,i,t)=>k({tickElement:i,labelElement:t})},{mode:"position",values:[120,240,480,600,840,960,1200,1320],tickCreatedFunction:(e,i)=>M({tickElement:i})}]};let P=class extends d{constructor(e,i){super(e,i),this.viewModel=null,this.headingLevel=4,this.visibleElements=new h,this._defaultViewModel=null,this._timeSlider=new n({...O,container:document.createElement("div")}),this._tooltip=null,this._onTimezoneChange=e=>{this.viewModel.utcOffset=e},this._onDateChange=e=>{const i=e.currentTarget.valueAsDate;this.viewModel.date=Array.isArray(i)?i[0]:i},e?.viewModel||(this._defaultViewModel=new p({view:e?.view}),this.viewModel=this._defaultViewModel)}initialize(){this.addHandles([t((()=>({viewModel:this.viewModel,slider:this._timeSlider})),(e=>this._connectTimeSlider(e)),o),t((()=>({container:this.view?.surface,viewModel:this.viewModel,tooltipVisible:this.visibleElements.tooltip})),(({container:e,viewModel:t,tooltipVisible:o})=>{this._tooltip=i(this._tooltip),null!=e&&o&&(this._tooltip=new g({viewModel:t,container:e}))}),o),t((()=>({viewModel:this.viewModel,visible:this.visible})),(({viewModel:e,visible:i})=>e.setRunning(i)),o)])}destroy(){this._timeSlider=i(this._timeSlider),null!=this._defaultViewModel&&this.viewModel!==this._defaultViewModel&&this._defaultViewModel.destroy()}loadDependencies(){return b({"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select")})}render(){const{visibleElements:e,viewModel:i}=this,t=i.state===m.Disabled;return D("div",{class:this.classes(c.base,S.widget,S.panel,{[S.widgetDisabled]:t}),key:this},this._renderTimeRangeSection(),e.visualizationOptions?this._renderVisualizationOptionsSection():null)}get view(){return this.viewModel?.view}set view(e){this.viewModel&&(this.viewModel.view=e)}get icon(){return"measure-building-height-shadow"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get testData(){}_connectTimeSlider({viewModel:e,slider:i}){if(this.removeHandles(V.Slider),null==i)return;const r=e=>s(e,"milliseconds","minutes"),l=e=>s(e,"minutes","milliseconds"),a=({index:i,value:t})=>{0===i?e.startTimeOfDay=l(t):e.endTimeOfDay=l(t)};this.addHandles([t((()=>[e.startTimeOfDay,e.endTimeOfDay]),(e=>{i.values=e.map(r)}),o),i.on("thumb-change",a),i.on("thumb-drag",a),i.on("segment-drag",(()=>{[e.startTimeOfDay,e.endTimeOfDay]=i.values.map(l)}))],V.Slider)}_renderTimeRangeSection(){const{visibleElements:e}=this;return e.timeRangeSlider||e.datePicker?D("section",{class:c.timeRange,key:"time-range"},D(y,{level:this.headingLevel},this.messages.timeLabel),e.timeRangeSlider?this._renderTimeRange():null,e.datePicker?this._renderDatePicker():null):null}_renderTimeRange(){const{messages:e,viewModel:i,visibleElements:t}=this,{startTimeOfDay:o,endTimeOfDay:s}=i,[r,l]=[o,s].map((e=>z(new Date(e),C)));return[D("div",{class:c.timeRangeIndicator,key:"time-range-indicator"},a(e.timeRange,{start:r,end:l}),t.timezone?D(j,{value:i.utcOffset,onChange:this._onTimezoneChange}):null),D("div",{afterCreate:this._timeSliderContainerAfterCreate,afterRemoved:this._timeSliderContainerAfterRemoved,bind:this,key:"time-slider-container"})]}_timeSliderContainerAfterCreate(e){const i=this._timeSlider?.container;i&&e.appendChild(i)}_timeSliderContainerAfterRemoved(e){const i=this._timeSlider?.container;i&&e.removeChild(i)}_renderDatePicker(){return D("div",{class:c.datePickerContainer,key:c.datePickerContainer},D("calcite-input-date-picker",{class:c.datePicker,"data-testid":"date-picker",key:c.datePicker,overlayPositioning:"fixed",placement:"bottom",valueAsDate:this.viewModel.date,onCalciteInputDatePickerChange:this._onDateChange}))}_renderVisualizationOptionsSection(){const{headingLevel:e,messages:i,viewModel:t,visibleElements:o}=this,s=o.colorPicker,r=e=>this.classes(t.visualizationType===e?null:c.visualizationConfigHidden);return D("section",{class:c.visualization,key:"visualization"},D(y,{level:e},i.visualizationLabel),this._renderVisualizationSelect(),D("div",{class:r(u.Threshold),key:"threshold-configurator"},D(f,{colorPickerVisible:s,options:t.thresholdOptions})),D("div",{class:r(u.Duration),key:"duration-configurator"},D(w,{colorPickerVisible:s,options:t.durationOptions})),D("div",{class:r(u.Discrete),key:"discrete-configurator"},D(v,{colorPickerVisible:s,options:t.discreteOptions})))}_renderVisualizationSelect(){const e=this.messages,i=this.viewModel.visualizationType;return D("calcite-select",{bind:this,class:c.visualizationSelect,key:"visualization-select",label:e.visualizationLabel,onCalciteSelectChange:this._onVisualizationTypeChange},[{type:u.Threshold,label:e.threshold.label},{type:u.Duration,label:e.duration.label},{type:u.Discrete,label:e.discrete.label}].map((({type:e,label:t})=>D("calcite-option",{selected:e===i,value:e},t))))}_onVisualizationTypeChange(e){const i=e.currentTarget.selectedOption?.value;this.viewModel.visualizationType=i??u.Threshold}};e([r()],P.prototype,"viewModel",void 0),e([r()],P.prototype,"view",null),e([r()],P.prototype,"headingLevel",void 0),e([r()],P.prototype,"icon",null),e([r()],P.prototype,"label",null),e([r({type:h,nonNullable:!0})],P.prototype,"visibleElements",void 0),e([r(),T("esri/widgets/ShadowCast/t9n/ShadowCast")],P.prototype,"messages",void 0),e([r()],P.prototype,"_defaultViewModel",void 0),e([r()],P.prototype,"_timeSlider",void 0),e([r()],P.prototype,"_tooltip",void 0),P=e([l("esri.widgets.ShadowCast")],P);const E=P;export{E as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{isTextInput as t}from"../../../form/support/formUtils.js";import{validateDomainValue as n}from"../../../layers/support/domainUtils.js";import{NumericRangeValidationError as e,validateFieldValue as r}from"../../../layers/support/fieldUtils.js";import{dateTimeIsInRange as o}from"../dateUtils.js";var i,u;!function(t){t.Text="text",t.Number="number",t.Date="date",t.Unsupported="unsupported"}(i||(i={})),function(t){t.CANNOT_BE_EMPTY="input-validation-error::cannot-be-empty",t.TOO_SHORT="length-validation-error::too-short",t.TOO_LONG="length-validation-error::too-long"}(u||(u={}));const a=(t,n)=>{if(!t)return!0;const{operations:e}=t;switch(n){case"INSERT":return e.supportsAdd;case"UPDATE":case"DELETE":return e.supportsUpdate;default:return!0}};function s(t,i){const{dataType:a,domain:s,field:l,maxLength:p,minLength:f,range:c,required:m}=i;if(null==t)return m?u.CANNOT_BE_EMPTY:null;if("text"===a&&"string"==typeof t){if(f>-1&&t.length<f)return u.TOO_SHORT;if(p>-1&&t.length>p)return u.TOO_LONG}return"date"!==a||o({type:l.type,range:c,value:t})?s?n(l,t,s):r(l,t):e.OUT_OF_RANGE}function l(t,n){return!(!p(t)||!p(n))||t===n}function p(t){return null==t||""===t}function f({dataType:n,field:e,input:r}){const o=-1;if(n===i.Date)return o;const u=m(e.length);if(!r||!t(r))return u;const a=m(r.maxLength);return a===o?u:u===o?a:Math.min(u,a)}function c({dataType:n,field:e,input:r}){const o=-1;if(n===i.Date)return o;if(!r||!t(r))return o;const u=m(r.minLength);if(u<0)return o;const a=m(e.length);return a>o&&a<u?o:u}function m(t){return"number"==typeof t&&t>-1?t:-1}const d={type:"number"},T={type:"number",intlOptions:{notation:"scientific"}};function g(t){return t>=1e7||t<=-1e7}function O(t,n){return null!=t.max&&null!=t.min?n.outsideRange:null!=t.max?n.outsideRangeMax:n.outsideRangeMin}export{i as FieldInputDataTypes,u as InputValidationError,a as capabilitiesAllowEditType,m as ensureMinOrMaxLength,f as getMaxLength,c as getMinLength,O as getRangeErrorMessage,p as isEmptyValue,d as numberFormatOptions,T as scientificNumberFormatOptions,g as shouldUseScientificNotation,s as validateFormValue,l as valuesAreEquivalent};
5
+ import{isTextInput as t}from"../../../form/support/formUtils.js";import{validateDomainValue as n}from"../../../layers/support/domainUtils.js";import{NumericRangeValidationError as e,validateFieldValue as r}from"../../../layers/support/fieldUtils.js";import{dateTimeIsInRange as o}from"../dateUtils.js";var i,u;!function(t){t.Text="text",t.Number="number",t.Date="date",t.Unsupported="unsupported"}(i||(i={})),function(t){t.CANNOT_BE_EMPTY="input-validation-error::cannot-be-empty",t.TOO_SHORT="length-validation-error::too-short",t.TOO_LONG="length-validation-error::too-long"}(u||(u={}));const a=(t,n)=>{if(!t)return!0;const{operations:e}=t;switch(n){case"INSERT":return e.supportsAdd;case"UPDATE":case"DELETE":return e.supportsUpdate;default:return!0}};function s(t,i){const{dataType:a,domain:s,field:l,maxLength:p,minLength:f,range:c,required:m}=i;if(null==t)return m?u.CANNOT_BE_EMPTY:null;if("text"===a&&"string"==typeof t){if(f>-1&&t.length<f)return u.TOO_SHORT;if(p>-1&&t.length>p)return u.TOO_LONG}return"date"!==a||o({type:l.type,range:c,value:t})?s?n(l,t,s):r(l,t)??n(l,t):e.OUT_OF_RANGE}function l(t,n){return!(!p(t)||!p(n))||t===n}function p(t){return null==t||""===t}function f({dataType:n,field:e,input:r}){const o=-1;if(n===i.Date)return o;const u=m(e.length);if(!r||!t(r))return u;const a=m(r.maxLength);return a===o?u:u===o?a:Math.min(u,a)}function c({dataType:n,field:e,input:r}){const o=-1;if(n===i.Date)return o;if(!r||!t(r))return o;const u=m(r.minLength);if(u<0)return o;const a=m(e.length);return a>o&&a<u?o:u}function m(t){return"number"==typeof t&&t>-1?t:-1}const d={type:"number"},T={type:"number",intlOptions:{notation:"scientific"}};function g(t){return t>=1e7||t<=-1e7}function O(t,n){return null!=t.max&&null!=t.min?n.outsideRange:null!=t.max?n.outsideRangeMax:n.outsideRangeMin}export{i as FieldInputDataTypes,u as InputValidationError,a as capabilitiesAllowEditType,m as ensureMinOrMaxLength,f as getMaxLength,c as getMinLength,O as getRangeErrorMessage,p as isEmptyValue,d as numberFormatOptions,T as scientificNumberFormatOptions,g as shouldUseScientificNotation,s as validateFormValue,l as valuesAreEquivalent};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[777],{24070:(e,t,i)=>{i.d(t,{A:()=>it});var n,o=i(90237),r=i(25482),s=i(4718),l=i(3483),p=i(10107),a=i(79901),d=i(36005),u=i(40608),y=i(43937);i(44208),i(53966),i(87811);let c=n=class extends r.A{constructor(e){super(e),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new n({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],c.prototype,"expression",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,p.MZ)({type:["boolean","date","number","string"],json:{write:!0}})],c.prototype,"returnType",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=n=(0,o._)([(0,u.$)("esri.form.ExpressionInfo")],c);const h=c;let m=class extends r.A{constructor(e){super(e),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],m.prototype,"description",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],m.prototype,"label",void 0),(0,o._)([(0,p.MZ)()],m.prototype,"type",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],m.prototype,"visibilityExpression",void 0),m=(0,o._)([(0,u.$)("esri.form.elements.Element")],m);const f=m;var v=i(69540);let w=class extends(v.A.ClonableMixin(r.A)){constructor(e){super(e),this.type=null}};(0,o._)([(0,p.MZ)()],w.prototype,"type",void 0),w=(0,o._)([(0,u.$)("esri.form.elements.inputs.attachments.Input")],w);const M=w;var g=i(56507);const _=["any","capture","upload"];let x=class extends M{constructor(e){super(e),this.type="audio",this.inputMethod="any",this.maxDuration=null}};(0,o._)([(0,p.MZ)({type:["audio"],readOnly:!0,json:{write:!0}})],x.prototype,"type",void 0),(0,o._)([(0,p.MZ)({type:_,json:{write:!0}})],x.prototype,"inputMethod",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],x.prototype,"maxDuration",void 0),x=(0,o._)([(0,u.$)("esri.form.elements.inputs.attachments.AudioInput")],x);const b=x;let Z=class extends M{constructor(e){super(e),this.type="document",this.maxFileSize=null}};(0,o._)([(0,p.MZ)({type:["document"],readOnly:!0,json:{write:!0}})],Z.prototype,"type",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],Z.prototype,"maxFileSize",void 0),Z=(0,o._)([(0,u.$)("esri.form.elements.inputs.attachments.DocumentInput")],Z);const j=Z;let I=class extends M{constructor(e){super(e),this.type="image",this.inputMethod="any",this.maxImageSize=null}};(0,o._)([(0,p.MZ)({type:["image"],readOnly:!0,json:{write:!0}})],I.prototype,"type",void 0),(0,o._)([(0,p.MZ)({type:_,json:{write:!0}})],I.prototype,"inputMethod",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],I.prototype,"maxImageSize",void 0),I=(0,o._)([(0,u.$)("esri.form.elements.inputs.attachments.ImageInput")],I);const S=I;let F=class extends M{constructor(e){super(e),this.type="signature",this.inputMethod="any"}};(0,o._)([(0,p.MZ)({type:["signature"],readOnly:!0,json:{write:!0}})],F.prototype,"type",void 0),(0,o._)([(0,p.MZ)({type:_,json:{write:!0}})],F.prototype,"inputMethod",void 0),F=(0,o._)([(0,u.$)("esri.form.elements.inputs.attachments.SignatureInput")],F);const E=F;let T=class extends M{constructor(e){super(e),this.type="video",this.inputMethod="any",this.maxDuration=null}};(0,o._)([(0,p.MZ)({type:["video"],readOnly:!0,json:{write:!0}})],T.prototype,"type",void 0),(0,o._)([(0,p.MZ)({type:_,json:{write:!0}})],T.prototype,"inputMethod",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],T.prototype,"maxDuration",void 0),T=(0,o._)([(0,u.$)("esri.form.elements.inputs.attachments.VideoInput")],T);const A=T;function O(e){return{nestableTypes:{base:M,key:"type",typeMap:{audio:b,document:j,image:S,signature:E,video:A}},allTypes:{base:M,key:"type",typeMap:{attachment:e,audio:b,document:j,image:S,signature:E,video:A}}}}let R=class extends M{constructor(e){super(e),this.type="attachment",this.attachmentAssociationType="exact",this.inputTypes=null}castInputs(e){return function(e,t){return e?e.map((e=>(0,g.aq)(t.nestableTypes,e))):null}(e,U)}readInputs(e,t){return function(e,t){if(!e)return null;const i=t.nestableTypes.typeMap;return e.filter((e=>i[e.type])).map((e=>i[e.type].fromJSON(e)))}(t.inputTypes,U)}writeInputs(e,t){t.inputTypes=function(e,t){if(!e)return null;const i=t.nestableTypes.typeMap;return e.filter((e=>i[e.type])).map((e=>e.toJSON()))}(e,U)}};(0,o._)([(0,p.MZ)({type:["attachment"],readOnly:!0,json:{write:!0}})],R.prototype,"type",void 0),(0,o._)([(0,p.MZ)({type:["any","exact","exactOrNone"],json:{write:!0}})],R.prototype,"attachmentAssociationType",void 0),(0,o._)([(0,p.MZ)({json:{write:{isRequired:!0}}})],R.prototype,"inputTypes",void 0),(0,o._)([(0,a.w)("inputTypes")],R.prototype,"castInputs",null),(0,o._)([(0,d.w)("inputTypes")],R.prototype,"readInputs",null),(0,o._)([(0,y.K)("inputTypes")],R.prototype,"writeInputs",null),R=(0,o._)([(0,u.$)("esri.form.elements.inputs.attachments.AttachmentInput")],R);const U=O(R);var k;const V=O(R);let D=k=class extends f{constructor(e){super(e),this.allowUserRename=!0,this.attachmentKeyword=null,this.displayFilename=!1,this.editableExpression=null,this.filenameExpression="{attachmentKeyword}_{now}",this.input=null,this.maxAttachmentCount=null,this.minAttachmentCount=null,this.type="attachment",this.useOriginalFilename=!0}clone(){return new k({allowUserRename:this.allowUserRename,attachmentKeyword:this.attachmentKeyword,description:this.description,displayFilename:this.displayFilename,editableExpression:this.editableExpression,filenameExpression:this.filenameExpression,input:this.input?.clone(),label:this.label,maxAttachmentCount:this.maxAttachmentCount,minAttachmentCount:this.minAttachmentCount,useOriginalFilename:this.useOriginalFilename,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],D.prototype,"allowUserRename",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:{isRequired:!0}}})],D.prototype,"attachmentKeyword",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],D.prototype,"displayFilename",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],D.prototype,"editableExpression",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],D.prototype,"filenameExpression",void 0),(0,o._)([(0,p.MZ)({types:V.allTypes,json:{read:{source:"inputType"},write:{target:"inputType",isRequired:!0}}})],D.prototype,"input",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],D.prototype,"maxAttachmentCount",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],D.prototype,"minAttachmentCount",void 0),(0,o._)([(0,p.MZ)({type:["attachment"],readOnly:!0,json:{read:!1,write:!0}})],D.prototype,"type",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],D.prototype,"useOriginalFilename",void 0),D=k=(0,o._)([(0,u.$)("esri.form.elements.AttachmentElement")],D);const N=D;let C=class extends r.A{constructor(e){super(e),this.type=null}};(0,o._)([(0,p.MZ)()],C.prototype,"type",void 0),C=(0,o._)([(0,u.$)("esri.form.elements.inputs.Input")],C);const $=C;let B=class extends ${constructor(e){super(e),this.maxLength=null,this.minLength=0}};(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],B.prototype,"maxLength",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],B.prototype,"minLength",void 0),B=(0,o._)([(0,u.$)("esri.form.elements.inputs.TextInput")],B);const L=B;var H;let K=H=class extends L{constructor(e){super(e),this.type="barcode-scanner"}clone(){return new H({maxLength:this.maxLength,minLength:this.minLength})}};(0,o._)([(0,p.MZ)({type:["barcode-scanner"],json:{read:!1,write:!0}})],K.prototype,"type",void 0),K=H=(0,o._)([(0,u.$)("esri.form.elements.inputs.BarcodeScannerInput")],K);const G=K;var P;let W=P=class extends ${constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="combo-box"}clone(){return new P({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],W.prototype,"noValueOptionLabel",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"showNoValueOption",void 0),(0,o._)([(0,p.MZ)({type:["combo-box"],json:{read:!1,write:!0}})],W.prototype,"type",void 0),W=P=(0,o._)([(0,u.$)("esri.form.elements.inputs.ComboBoxInput")],W);const q=W;var Q;function J(e){return null!=e?e:null}function z(e){return null!=e?e:null}let X=Q=class extends ${constructor(e){super(e),this.max=null,this.min=null,this.type="date-picker"}readMax(e,t){return J(t.max)}writeMax(e,t){t.max=z(e)}readMin(e,t){return J(t.min)}writeMin(e,t){t.min=z(e)}clone(){return new Q({max:this.max,min:this.min})}};(0,o._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],X.prototype,"max",void 0),(0,o._)([(0,d.w)("max")],X.prototype,"readMax",null),(0,o._)([(0,y.K)("max")],X.prototype,"writeMax",null),(0,o._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],X.prototype,"min",void 0),(0,o._)([(0,d.w)("min")],X.prototype,"readMin",null),(0,o._)([(0,y.K)("min")],X.prototype,"writeMin",null),(0,o._)([(0,p.MZ)({type:["date-picker"],json:{read:!1,write:!0}})],X.prototype,"type",void 0),X=Q=(0,o._)([(0,u.$)("esri.form.elements.inputs.DatePickerInput")],X);const Y=X;var ee;function te(e){return null!=e?e:null}function ie(e){return null!=e?e:null}let ne=ee=class extends ${constructor(e){super(e),this.includeTimeOffset=!0,this.max=null,this.min=null,this.timeResolution="minutes",this.type="datetimeoffset-picker"}readMax(e,t){return te(t.max)}writeMax(e,t){t.max=ie(e)}readMin(e,t){return te(t.min)}writeMin(e,t){t.min=ie(e)}readTimeResolution(e,t){return te(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=ie(e)}clone(){return new ee({includeTimeOffset:this.includeTimeOffset,max:this.max,min:this.min,timeResolution:this.timeResolution})}};(0,o._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"includeTimeOffset",void 0),(0,o._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],ne.prototype,"max",void 0),(0,o._)([(0,d.w)("max")],ne.prototype,"readMax",null),(0,o._)([(0,y.K)("max")],ne.prototype,"writeMax",null),(0,o._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],ne.prototype,"min",void 0),(0,o._)([(0,d.w)("min")],ne.prototype,"readMin",null),(0,o._)([(0,y.K)("min")],ne.prototype,"writeMin",null),(0,o._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],ne.prototype,"timeResolution",void 0),(0,o._)([(0,d.w)("timeResolution")],ne.prototype,"readTimeResolution",null),(0,o._)([(0,y.K)("timeResolution")],ne.prototype,"writeTimeResolution",null),(0,o._)([(0,p.MZ)({type:["datetimeoffset-picker"],json:{read:!1,write:!0}})],ne.prototype,"type",void 0),ne=ee=(0,o._)([(0,u.$)("esri.form.elements.inputs.DateTimeOffsetPickerInput")],ne);const oe=ne;var re;function se(e){return null!=e?new Date(e):null}function le(e){return e?e.getTime():null}let pe=re=class extends ${constructor(e){super(e),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(e,t){return se(t.max)}writeMax(e,t){t.max=le(e)}readMin(e,t){return se(t.min)}writeMin(e,t){t.min=le(e)}clone(){return new re({includeTime:this.includeTime,max:this.max,min:this.min})}};(0,o._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pe.prototype,"includeTime",void 0),(0,o._)([(0,p.MZ)({type:Date,json:{type:Number,write:!0}})],pe.prototype,"max",void 0),(0,o._)([(0,d.w)("max")],pe.prototype,"readMax",null),(0,o._)([(0,y.K)("max")],pe.prototype,"writeMax",null),(0,o._)([(0,p.MZ)({type:Date,json:{type:Number,write:!0}})],pe.prototype,"min",void 0),(0,o._)([(0,d.w)("min")],pe.prototype,"readMin",null),(0,o._)([(0,y.K)("min")],pe.prototype,"writeMin",null),(0,o._)([(0,p.MZ)({type:["datetime-picker"],json:{read:!1,write:!0}})],pe.prototype,"type",void 0),pe=re=(0,o._)([(0,u.$)("esri.form.elements.inputs.DateTimePickerInput")],pe);const ae=pe;var de;let ue=de=class extends ${constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="radio-buttons"}clone(){return new de({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],ue.prototype,"noValueOptionLabel",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],ue.prototype,"showNoValueOption",void 0),(0,o._)([(0,p.MZ)({type:["radio-buttons"],json:{read:!1,write:!0}})],ue.prototype,"type",void 0),ue=de=(0,o._)([(0,u.$)("esri.form.elements.inputs.RadioButtonsInput")],ue);const ye=ue;var ce;let he=ce=class extends ${constructor(e){super(e),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new ce({offValue:this.offValue,onValue:this.onValue})}};(0,o._)([(0,p.MZ)({type:[String,Number],json:{write:!0}})],he.prototype,"offValue",void 0),(0,o._)([(0,p.MZ)({type:[String,Number],json:{write:!0}})],he.prototype,"onValue",void 0),(0,o._)([(0,p.MZ)({type:["switch"],json:{read:!1,write:!0}})],he.prototype,"type",void 0),he=ce=(0,o._)([(0,u.$)("esri.form.elements.inputs.SwitchInput")],he);const me=he;var fe;let ve=fe=class extends L{constructor(e){super(e),this.type="text-area"}clone(){return new fe({maxLength:this.maxLength,minLength:this.minLength})}};(0,o._)([(0,p.MZ)({type:["text-area"],json:{read:!1,write:!0}})],ve.prototype,"type",void 0),ve=fe=(0,o._)([(0,u.$)("esri.form.elements.inputs.TextAreaInput")],ve);const we=ve;var Me;let ge=Me=class extends L{constructor(e){super(e),this.type="text-box"}clone(){return new Me({maxLength:this.maxLength,minLength:this.minLength})}};(0,o._)([(0,p.MZ)({type:["text-box"],json:{read:!1,write:!0}})],ge.prototype,"type",void 0),ge=Me=(0,o._)([(0,u.$)("esri.form.elements.inputs.TextBoxInput")],ge);const _e=ge;var xe;function be(e){return null!=e?e:null}function Ze(e){return null!=e?e:null}let je=xe=class extends ${constructor(e){super(e),this.max=null,this.min=null,this.timeResolution="minutes",this.type="time-picker"}readMax(e,t){return be(t.max)}writeMax(e,t){t.max=Ze(e)}readMin(e,t){return be(t.min)}writeMin(e,t){t.min=Ze(e)}readTimeResolution(e,t){return be(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=Ze(e)}clone(){return new xe({max:this.max,min:this.min,timeResolution:this.timeResolution})}};(0,o._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],je.prototype,"max",void 0),(0,o._)([(0,d.w)("max")],je.prototype,"readMax",null),(0,o._)([(0,y.K)("max")],je.prototype,"writeMax",null),(0,o._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],je.prototype,"min",void 0),(0,o._)([(0,d.w)("min")],je.prototype,"readMin",null),(0,o._)([(0,y.K)("min")],je.prototype,"writeMin",null),(0,o._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],je.prototype,"timeResolution",void 0),(0,o._)([(0,d.w)("timeResolution")],je.prototype,"readTimeResolution",null),(0,o._)([(0,y.K)("timeResolution")],je.prototype,"writeTimeResolution",null),(0,o._)([(0,p.MZ)({type:["time-picker"],json:{read:!1,write:!0}})],je.prototype,"type",void 0),je=xe=(0,o._)([(0,u.$)("esri.form.elements.inputs.TimePickerInput")],je);const Ie={base:$,key:"type",typeMap:{"barcode-scanner":G,"combo-box":q,"date-picker":Y,"datetime-picker":ae,"datetimeoffset-picker":oe,"radio-buttons":ye,switch:me,"text-area":we,"text-box":_e,"time-picker":je}};var Se,Fe=i(80451);let Ee=Se=class extends f{constructor(e){super(e),this.domain=null,this.editable=null,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}clone(){return new Se({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,p.MZ)({types:Fe.gK,json:{read:{reader:Fe.rS},write:!0}})],Ee.prototype,"domain",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],Ee.prototype,"editable",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],Ee.prototype,"editableExpression",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],Ee.prototype,"fieldName",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],Ee.prototype,"hint",void 0),(0,o._)([(0,p.MZ)({types:Ie,json:{read:{source:"inputType"},write:{target:"inputType"}}})],Ee.prototype,"input",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],Ee.prototype,"requiredExpression",void 0),(0,o._)([(0,p.MZ)({type:String,json:{read:!1,write:!0}})],Ee.prototype,"type",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],Ee.prototype,"valueExpression",void 0),Ee=Se=(0,o._)([(0,u.$)("esri.form.elements.FieldElement")],Ee);const Te=Ee;var Ae,Oe=i(49852);let Re=Ae=class extends f{constructor(e){super(e),this.displayCount=null,this.displayType="list",this.editableExpression=null,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new Ae({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editableExpression:this.editableExpression,label:this.label,orderByFields:(0,s.o8)(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],Re.prototype,"displayCount",void 0),(0,o._)([(0,p.MZ)({type:["list"],json:{write:!0}})],Re.prototype,"displayType",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],Re.prototype,"editableExpression",void 0),(0,o._)([(0,p.MZ)({type:[Oe.A],json:{write:!0}})],Re.prototype,"orderByFields",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],Re.prototype,"relationshipId",void 0),(0,o._)([(0,p.MZ)({type:["relationship"],json:{read:!1,write:!0}})],Re.prototype,"type",void 0),Re=Ae=(0,o._)([(0,u.$)("esri.form.elements.RelationshipElement")],Re);const Ue=Re;var ke;let Ve=ke=class extends f{constructor(e){super(e),this.text=null,this.textFormat="plain-text",this.type="text"}clone(){return new ke({text:this.text,textFormat:this.textFormat,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],Ve.prototype,"text",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],Ve.prototype,"textFormat",void 0),(0,o._)([(0,p.MZ)({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],Ve.prototype,"type",void 0),Ve=ke=(0,o._)([(0,u.$)("esri.form.elements.TextElement")],Ve);const De=Ve,Ne=e=>"field"===e.type,Ce=e=>"group"===e.type,$e=e=>"text"===e.type;function Be(e){return{typesWithGroup:{base:f,key:"type",typeMap:{attachment:N,field:Te,group:e,relationship:Ue,text:De}},typesWithoutGroup:{base:f,key:"type",typeMap:{attachment:N,field:Te,relationship:Ue,text:De}}}}function Le(e,t,i=!0){if(!e)return null;const n=i?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>n[e.type])).map((e=>n[e.type].fromJSON(e)))}function He(e,t,i=!0){if(!e)return null;const n=i?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>n[e.type])).map((e=>e.toJSON()))}function Ke(e,t,i=!0){return e?e.map((e=>(0,g.aq)(i?t.typesWithGroup:t.typesWithoutGroup,e))):null}var Ge;let Pe=Ge=class extends f{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return Ke(e,We,!1)}readElements(e,t){return Le(t.formElements,We,!1)}writeElements(e,t){t.formElements=He(e,We,!1)}clone(){return new Ge({description:this.description,elements:(0,s.o8)(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,p.MZ)({json:{write:!0}})],Pe.prototype,"elements",void 0),(0,o._)([(0,a.w)("elements")],Pe.prototype,"castElements",null),(0,o._)([(0,d.w)("elements",["formElements"])],Pe.prototype,"readElements",null),(0,o._)([(0,y.K)("elements")],Pe.prototype,"writeElements",null),(0,o._)([(0,p.MZ)({type:["collapsed","expanded"],json:{write:!0}})],Pe.prototype,"initialState",void 0),(0,o._)([(0,p.MZ)({type:String,json:{read:!1,write:!0}})],Pe.prototype,"type",void 0),Pe=Ge=(0,o._)([(0,u.$)("esri.form.elements.GroupElement")],Pe);const We=Be(Pe),qe=Pe;var Qe,Je=i(30524);const ze=Be(qe);let Xe=Qe=class extends r.A{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.preserveFieldValuesWhenHidden=!1,this.title=null}castElements(e){return Ke(e,ze)}readElements(e,t){return Le(t.formElements,ze)}writeElements(e,t){t.formElements=He(e,ze)}clone(){return new Qe({description:this.description,expressionInfos:(0,s.o8)(this.expressionInfos),elements:(0,s.o8)(this.elements),title:this.title,preserveFieldValuesWhenHidden:this.preserveFieldValuesWhenHidden})}async getFieldsUsed(e,t){const i=new Set,{description:n,elements:o,expressionInfos:r,title:s}=this;if(tt(i,e,n),tt(i,e,s),!o)return[];const l=function(e,t){if(!t||0===t.length)return[];const i=et(e),n=[];for(const e of t)i.has(e.name)&&n.push(e.expression);return n}(o,r).map((t=>(0,Je.Dx)(i,e,t)));await Promise.all(l);for(const n of o)Ye(i,{fieldsIndex:e,relationships:t},n);return Array.from(i).sort()}};function Ye(e,t,i){const{fieldsIndex:n}=t;if(!n||n.fields.length!==e.size)switch(tt(e,n,i.label),tt(e,n,i.description),i.type){case"field":(0,Je.rq)(e,n,i.fieldName);break;case"group":i.elements.forEach((i=>Ye(e,t,i)));break;case"relationship":if(t.relationships){const o=t.relationships.find((e=>e.id===i.relationshipId));o&&(0,Je.rq)(e,n,o.keyField)}(0,Je._w)(e,n,i.orderByFields?.map((e=>e.field)));break;case"text":tt(e,n,i.text)}}function et(e){const t=new Set;for(const i of e)if((0,l.kb)(t,i.visibilityExpression),!$e(i))if(Ce(i))(0,l.FB)(t,et(i.elements));else if((0,l.kb)(t,i.editableExpression),Ne(i)){const{requiredExpression:e,valueExpression:n}=i;(0,l.FB)(t,[e,n])}return t}function tt(e,t,i){(0,Je._w)(e,t,(0,Je.nw)(i))}(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],Xe.prototype,"description",void 0),(0,o._)([(0,p.MZ)({json:{write:!0}})],Xe.prototype,"elements",void 0),(0,o._)([(0,a.w)("elements")],Xe.prototype,"castElements",null),(0,o._)([(0,d.w)("elements",["formElements"])],Xe.prototype,"readElements",null),(0,o._)([(0,y.K)("elements")],Xe.prototype,"writeElements",null),(0,o._)([(0,p.MZ)({type:[h],json:{write:!0}})],Xe.prototype,"expressionInfos",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{default:!1,write:!0}})],Xe.prototype,"preserveFieldValuesWhenHidden",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],Xe.prototype,"title",void 0),Xe=Qe=(0,o._)([(0,u.$)("esri.form.FormTemplate")],Xe);const it=Xe},54239:(e,t,i)=>{i.d(t,{A:()=>M});var n,o=i(90237),r=i(4576),s=i(66552),l=i(25482),p=i(83047),a=i(67076),d=i(10107),u=(i(44208),i(53966),i(36005)),y=i(40608),c=i(43937);const h=(0,s.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=h.jsonValues.slice();(0,r.Xy)(m,"orthometric");const f=(0,s.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let v=n=class extends l.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return h.write(e,t,i)}readHeightModel(e,t,i){return h.read(e)||(i?.messages&&i.messages.push(function(e,t){return new a.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(w(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,p.LA)(e)||f.read(e)||(i?.messages&&i.messages.push(w(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new n({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,p.k1)(t);return new n({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new n;return t.read(e,{origin:"web-scene"}),t}};function w(e,t){return new a.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,d.MZ)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal",write:{isRequired:!0}}}}})],v.prototype,"heightModel",void 0),(0,o._)([(0,c.K)("web-scene","heightModel")],v.prototype,"writeHeightModel",null),(0,o._)([(0,u.w)(["web-scene","service"],"heightModel")],v.prototype,"readHeightModel",null),(0,o._)([(0,d.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:{writer:f.write,isRequired:!0}}}}})],v.prototype,"heightUnit",void 0),(0,o._)([(0,u.w)("web-scene","heightUnit")],v.prototype,"readHeightUnit",null),(0,o._)([(0,u.w)("service","heightUnit")],v.prototype,"readHeightUnitService",null),(0,o._)([(0,d.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],v.prototype,"vertCRS",void 0),(0,o._)([(0,u.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],v.prototype,"readVertCRS",null),v=n=(0,o._)([(0,y.$)("esri.geometry.HeightModelInfo")],v);const M=v},47685:(e,t,i)=>{i.d(t,{Mk:()=>c,Zk:()=>u,w6:()=>f});var n=i(90237),o=i(65529),r=i(4718),s=i(74887),l=i(10107),p=(i(44208),i(53966),i(40608)),a=i(20816);const d=new o.A.EventEmitter;function u(e,t,i=null,n=!1){const o=(0,s.Tw)();return n=null==t||n,d.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:i,mayReceiveServiceEdits:n,result:o.promise}),o}const y=Symbol();function c(e){return null!=e&&"object"==typeof e&&y in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,i){const n=new URL(e).host,o=a.Z3.get(n),r=e=>!e||e===o;return r(t)&&r(i)||t===i}const f=e=>{var t;let i=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:i,gdbVersion:n,mayReceiveServiceEdits:o,result:s}=e,l=t===this.url,p=null!=i&&null!=this.layerId&&i===this.layerId,a=h(this),d=h(this)&&m(t,n,this.gdbVersion);if(!l||a&&!d||!p&&!o)return;const u=s.then((e=>{if(this.lastEditsEventDate=new Date,p&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,r.o8)(e)),e;const i=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(i){const{adds:t,updates:n,deletes:o}=i.editedFeatures,s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:o?o.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:n?n.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,r.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,r.o8)(e.historicMoment)};return this.emit("edits",s),s}const o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,r.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,r.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,n,o.historicMoment)&&this.emit("edits",o),o})).then((e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,n,e.historicMoment)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:u})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:i,moment:n}=e,o=t===this.url,r=h(this),s=h(this)&&m(t,i,this.gdbVersion),l=h(this)&&!m(t,this.gdbVersion,null);o&&r&&s&&l&&"historicMoment"in this&&this.historicMoment!==n&&(this.historicMoment=n)},this.when().then((()=>{this.addHandles(function(e){return d.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return d.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}_shouldUpdateHistoricMoment(e,t,i){return"historicMoment"in this&&this.historicMoment!==i&&(0,a.w5)(e,t)}};return t=y,(0,n._)([(0,l.MZ)()],i.prototype,"lastEditsEventDate",void 0),i=(0,n._)([(0,p.$)("esri.layers.mixins.EditBusLayer")],i),i}},87796:(e,t,i)=>{i.d(t,{j:()=>R});var n=i(90237),o=i(5503),r=i(4718),s=i(53966),l=i(10107),p=(i(44208),i(36005)),a=i(40608),d=i(43937),u=i(89317),y=i(5443),c=i(54239),h=i(16930),m=i(60694),f=i(10873),v=i(69540),w=i(25482),M=(i(87811),i(56400));let g=class extends(v.A.ClonableMixin(w.A)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,n._)([(0,l.MZ)()],g.prototype,"creatorField",void 0),(0,n._)([(0,l.MZ)()],g.prototype,"creationDateField",void 0),(0,n._)([(0,l.MZ)()],g.prototype,"editorField",void 0),(0,n._)([(0,l.MZ)()],g.prototype,"editDateField",void 0),(0,n._)([(0,l.MZ)()],g.prototype,"realm",void 0),(0,n._)([(0,l.MZ)((0,M.P6)("dateFieldsTimeReference",!0))],g.prototype,"timeZone",void 0),g=(0,n._)([(0,a.$)("esri.layers.support.EditFieldsInfo")],g);const _=g;let x=class extends(v.A.ClonableMixin(w.A)){constructor(e){super(e)}};(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"name",void 0),(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"fields",void 0),(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"isAscending",void 0),(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"indexType",void 0),(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"isUnique",void 0),(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"description",void 0),x=(0,n._)([(0,a.$)("esri.layers.support.FeatureIndex")],x);var b=i(15426),Z=i(83047);let j=class extends(v.A.ClonableMixin(w.A)){constructor(e){super(e),this.shapeAreaField=null,this.shapeLengthField=null,this.units=null}};(0,n._)([(0,l.MZ)({type:String,json:{read:{source:"shapeAreaFieldName"}}})],j.prototype,"shapeAreaField",void 0),(0,n._)([(0,l.MZ)({type:String,json:{read:{source:"shapeLengthFieldName"}}})],j.prototype,"shapeLengthField",void 0),(0,n._)([(0,l.MZ)({type:String,json:{read:e=>Z.dk.read(e)||Z.Sk.read(e)}})],j.prototype,"units",void 0),j=(0,n._)([(0,a.$)("esri.layers.support.GeometryFieldsInfo")],j);const I=j;var S=i(37352),F=i(45067),E=i(22453),T=i(80451);let A=class extends(v.A.ClonableMixin(w.A)){constructor(e){super(e),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(e){if(!e)return null;const t={};for(const i of Object.keys(e))t[i]=(0,T.rS)(e[i]);return t}writeDomains(e,t){if(!e)return;const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],A.prototype,"code",void 0),(0,n._)([(0,l.MZ)({type:Object,json:{write:!0}})],A.prototype,"defaultValues",void 0),(0,n._)([(0,l.MZ)({json:{write:!0}})],A.prototype,"domains",void 0),(0,n._)([(0,p.w)("domains")],A.prototype,"readDomains",null),(0,n._)([(0,d.K)("domains")],A.prototype,"writeDomains",null),(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],A.prototype,"name",void 0),A=(0,n._)([(0,a.$)("esri.layers.support.Subtype")],A);const O=A,R=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(o.A.ofType(x)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=h.A.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.version=void 0}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:i,editing:n}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(i.supportsEditing&&!(n.supportsUpdateByOthers&&n.supportsUpdateByAnonymous&&n.supportsDeleteByOthers&&n.supportsDeleteByAnonymous))return"load"}if((0,b.rQ)(this.serviceDefinitionExpression)||(0,b.rQ)(this.definitionExpression))return"load";if(this.userHasUpdateItemPrivileges){if((0,b.tG)(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return(0,E.S)(t,this.url)}readEditingInfo(e,t){const{editingInfo:i}=t;return i?{lastEditDate:null!=i.lastEditDate?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=(0,r.o8)(e),{operations:i,editing:n}=t;return(0,b.Pt)(this)?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=n.supportsDeleteByOthers=n.supportsGeometryUpdate=n.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=n.supportsGeometryUpdate=!0),t)}get effectiveEditingEnabled(){return!1}readGlobalIdFieldFromService(e,t){return(0,b.jD)(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||(0,b.Pt)(this))return!1;const{operations:t,editing:i}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:i}=e;return(0,b.Pt)(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return(0,b.Zm)(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}set url(e){if(null==e)return void this._set("url",e);const t=(0,m.HZ)({layer:this,url:e,nonStandardUrlAllowed:!0,logger:s.A.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,i,n){(0,m.LS)(this,e,null,t,n)}readVersion(e,t){return(0,b.$4)(t)}};return(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"authenticationTriggerEvent",null),(0,n._)([(0,l.MZ)({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,n._)([(0,l.MZ)({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","isDataBranchVersioned","isDataVersioned","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],t.prototype,"capabilities",void 0),(0,n._)([(0,p.w)("service","capabilities")],t.prototype,"readCapabilitiesFromService",null),(0,n._)([(0,l.MZ)((0,M.P6)("dateFieldsTimeReference"))],t.prototype,"dateFieldsTimeZone",void 0),(0,n._)([(0,l.MZ)({type:Boolean})],t.prototype,"datesInUnknownTimezone",void 0),(0,n._)([(0,l.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,n._)([(0,l.MZ)({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],t.prototype,"displayField",void 0),(0,n._)([(0,l.MZ)({readOnly:!0,type:_})],t.prototype,"editFieldsInfo",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"editingInfo",void 0),(0,n._)([(0,p.w)("editingInfo")],t.prototype,"readEditingInfo",null),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"effectiveCapabilities",null),(0,n._)([(0,l.MZ)()],t.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,l.MZ)((()=>{const e=(0,r.o8)(f.Yj),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],t.prototype,"elevationInfo",void 0),(0,n._)([(0,l.MZ)()],t.prototype,"fieldsIndex",void 0),(0,n._)([(0,l.MZ)({type:S.A,json:{name:"layerDefinition.floorInfo",write:!0,origins:{"web-scene":{name:"layerDefinition.floorInfo",write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"floorInfo",void 0),(0,n._)([(0,l.MZ)({type:y.A,json:{origins:{service:{read:{source:"extent"}}}}})],t.prototype,"fullExtent",void 0),(0,n._)([(0,l.MZ)()],t.prototype,"gdbVersion",void 0),(0,n._)([(0,l.MZ)({readOnly:!0,type:I,json:{read:{source:"geometryProperties"}}})],t.prototype,"geometryFieldsInfo",void 0),(0,n._)([(0,l.MZ)({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:b.iX.read}}}})],t.prototype,"geometryType",void 0),(0,n._)([(0,l.MZ)({type:String})],t.prototype,"globalIdField",void 0),(0,n._)([(0,p.w)("service","globalIdField",["globalIdField","fields"])],t.prototype,"readGlobalIdFieldFromService",null),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"hasFullEditingRestrictions",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasM",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"hasUpdateItemRestrictions",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasZ",void 0),(0,n._)([(0,l.MZ)({readOnly:!0,type:c.A})],t.prototype,"heightModelInfo",void 0),(0,n._)([(0,l.MZ)({type:Date})],t.prototype,"historicMoment",void 0),(0,n._)([(0,l.MZ)({type:o.A.ofType(x),readOnly:!0})],t.prototype,"indexes",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"isTable",void 0),(0,n._)([(0,p.w)("service","isTable",["type"])],t.prototype,"readIsTableFromService",null),(0,n._)([(0,l.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],t.prototype,"layerId",void 0),(0,n._)([(0,l.MZ)(f.hG)],t.prototype,"maxScale",void 0),(0,n._)([(0,p.w)("service","maxScale",["maxScale","effectiveMaxScale"])],t.prototype,"readMaxScale",null),(0,n._)([(0,l.MZ)(f.hn)],t.prototype,"minScale",void 0),(0,n._)([(0,p.w)("service","minScale",["minScale","effectiveMinScale"])],t.prototype,"readMinScale",null),(0,n._)([(0,l.MZ)({type:String})],t.prototype,"objectIdField",void 0),(0,n._)([(0,p.w)("service","objectIdField",["objectIdField","fields"])],t.prototype,"readObjectIdFieldFromService",null),(0,n._)([(0,l.MZ)((0,M.P6)("preferredTimeReference"))],t.prototype,"preferredTimeZone",void 0),(0,n._)([(0,l.MZ)({type:[F.A],readOnly:!0})],t.prototype,"relationships",void 0),(0,n._)([(0,l.MZ)({type:Boolean})],t.prototype,"returnM",void 0),(0,n._)([(0,l.MZ)({type:Boolean})],t.prototype,"returnZ",void 0),(0,n._)([(0,l.MZ)({readOnly:!0,json:{write:!1}})],t.prototype,"serverGens",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"serviceDefinitionExpression",void 0),(0,n._)([(0,p.w)("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],t.prototype,"readServiceDefinitionExpression",null),(0,n._)([(0,l.MZ)({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],t.prototype,"serviceItemId",void 0),(0,n._)([(0,l.MZ)()],t.prototype,"sourceJSON",void 0),(0,n._)([(0,l.MZ)({type:h.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],t.prototype,"spatialReference",void 0),(0,n._)([(0,l.MZ)({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],t.prototype,"subtypeField",void 0),(0,n._)([(0,l.MZ)({type:[O],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],t.prototype,"subtypes",void 0),(0,n._)([(0,l.MZ)({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],t.prototype,"trackIdField",void 0),(0,n._)([(0,l.MZ)(f.OZ)],t.prototype,"url",null),(0,n._)([(0,d.K)("url")],t.prototype,"writeUrl",null),(0,n._)([(0,l.MZ)({json:{origins:{service:{read:!0}},read:!1}})],t.prototype,"version",void 0),(0,n._)([(0,p.w)("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],t.prototype,"readVersion",null),t=(0,n._)([(0,a.$)("esri.layers.mixins.FeatureLayerBase")],t),t}},82935:(e,t,i)=>{i.d(t,{B:()=>c,e:()=>h});var n=i(90237),o=i(10107),r=(i(44208),i(53966),i(87811),i(36005)),s=i(40608),l=i(89317),p=i(30524),a=i(96184),d=i(73133),u=i(79677),y=i(10184);const c={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},h=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const n=i.timeOffset,o=d.j.fromJSON(i.timeOffsetUnits);return n&&o?new y.A({value:n,unit:o}):null}set timeInfo(e){(0,p.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,o.MZ)({type:u.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,o.MZ)({type:y.A})],t.prototype,"timeOffset",void 0),(0,n._)([(0,r.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,o.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,o.MZ)(c)],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,s.$)("esri.layers.mixins.TemporalLayer")],t),t}},96184:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(90237),o=i(69540),r=i(25482),s=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),p=i(40608),a=i(43937),d=i(79677),u=i(10184),y=i(56400);function c(e,t){return u.A.fromJSON({value:e,unit:t})}let h=class extends(o.A.ClonableMixin(r.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?d.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?c(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?c(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,n._)([(0,s.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,n._)([(0,s.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,n._)([(0,l.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,n._)([(0,a.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,n._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,n._)([(0,s.MZ)({type:u.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,n._)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,n._)([(0,a.K)("interval")],h.prototype,"writeInterval",null),(0,n._)([(0,s.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,n._)([(0,s.MZ)((0,y.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,n._)([(0,s.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,n._)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,n._)([(0,s.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,n._)([(0,p.$)("esri.layers.support.TimeInfo")],h);const m=h},17036:(e,t,i)=>{i.d(t,{p:()=>p});var n=i(44208),o=i(53966),r=i(20437),s=i(95466),l=i(30524);function p(){return{fields:{type:[r.A],value:null,set:function(e){if(e&&(0,n.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");o.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const i=this.fieldsIndex?.has(t);i||o.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},91908:(e,t,i)=>{i.d(t,{D:()=>r});var n=i(60694);const o=[];function r(e,t){if((0,n.Wo)(e.url??""))return!0;const{wkid:i}=t;for(const t of o){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}o.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),o.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),o.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),o.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),o.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},73133:(e,t,i)=>{i.d(t,{j:()=>n});const n=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},10184:(e,t,i)=>{i.d(t,{A:()=>y});var n=i(90237),o=i(69540),r=i(25482),s=i(88930),l=i(10107),p=(i(44208),i(53966),i(87811),i(93223)),a=i(40608),d=i(73133);let u=class extends(o.A.ClonableMixin(r.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,p.e)(d.j,{nonNullable:!0})],u.prototype,"unit",void 0),(0,n._)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,n._)([(0,a.$)("esri.time.TimeInterval")],u);const y=u},20816:(e,t,i)=>{i.d(t,{TA:()=>o,We:()=>l,Z3:()=>r,ZJ:()=>p,w5:()=>a});var n=i(78888);const o=(0,i(13069).vD)(),r=new Map,s=new Map;async function l(e,t,i){if(!e||!i)return!1;if(!t)return!0;const o=new URL(e).host;let s=r.get(o);if(!s){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");s=(await(0,n.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return s===t}async function p(e,t,n=!1){if(!e||!t)return!0;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),l=s.get(r)?.entries();if(l)for(const[e,s]of l)if(s.name===t){const t=!s.stack?.hasForwardEdits();if(!t&&n){const[{deleteForwardEdits:t},{default:n}]=await Promise.all([i.e(2186).then(i.bind(i,32186)),i.e(2558).then(i.bind(i,32558))]),l=await t(r,e,new n({sessionId:o,moment:s.moment}));return l.success&&s.stack?.clearForwardEdits(),l.success}return t}return!0}function a(e,t){if(!e)return!1;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),n=s.get(i)?.entries();if(n)for(const[e,i]of n)if(i.name===t)return"edit"===i.lockType;return!1}new Map}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2935,7899],{11006:(e,t,n)=>{function i(e,t,n,i,o){r(e,t,n||0,i||e.length-1,o||s)}function r(e,t,n,i,s){for(;i>n;){if(i-n>600){var a=i-n+1,l=t-n+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);r(e,t,Math.max(n,Math.floor(t-l*u/a+h)),Math.min(i,Math.floor(t+(a-l)*u/a+h)),s)}var d=e[t],p=n,m=i;for(o(e,n,t),s(e[i],d)>0&&o(e,n,i);p<m;){for(o(e,p,m),p++,m--;s(e[p],d)<0;)p++;for(;s(e[m],d)>0;)m--}0===s(e[n],d)?o(e,n,m):o(e,++m,i),m<=t&&(n=m+1),t<=m&&(i=m-1)}}function o(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function s(e,t){return e<t?-1:e>t?1:0}n.d(t,{q:()=>i})},62885:(e,t,n)=>{n.d(t,{H:()=>o,V:()=>r});var i=n(5503);function r(e,t,n=i.A){return t||(t=new n),t===e||(t.removeAll(),(r=e)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?t.addMany(e):e&&t.add(e)),t;var r}function o(e){return e}},43668:(e,t,n)=>{n.d(t,{M5:()=>h,eV:()=>u});var i=n(78888),r=n(49186),o=n(74887),s=n(84952),a=n(26306);let l=null,c=!0;function u(e,t,n,i){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const r=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,i);return r.data.set(e,0),r}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const r=await(0,i.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:r.data,mediaType:r.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:i}=await n.e(820).then(n.bind(n,10820));if(e(l))return i(l,t)}if(u){const{isAnimatedPNG:e,parseApng:i}=await n.e(2390).then(n.bind(n,22390));if(e(l))return i(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,i.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.zf)(e))throw new r.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},48163:(e,t,n)=>{function i(){return[0,0]}function r(e,t){return[e,t]}function o(){return r(1,1)}function s(){return r(1,0)}function a(){return r(0,1)}n.d(t,{Un:()=>l,fA:()=>r,vt:()=>i});const l=o(),c=s(),u=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:c,UNIT_Y:u,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:i,createView:function(e,t){return new Float64Array(e,t,2)},fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let i=0;i<n;++i)t[i]=e[i];return t},fromValues:r,ones:o,unitX:s,unitY:a,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},37585:(e,t,n)=>{n.d(t,{C:()=>r,Cc:()=>y,Io:()=>h,S8:()=>f,WQ:()=>s,e$:()=>_,hZ:()=>o,hs:()=>u,jb:()=>w,l0:()=>g,t2:()=>x});var i=n(34304);function r(e,t){return e[0]=t[0],e[1]=t[1],e}function o(e,t,n){return e[0]=t,e[1]=n,e}function s(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function a(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function l(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function c(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function u(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function h(e,t){const n=t[0]-e[0],i=t[1]-e[1];return Math.sqrt(n*n+i*i)}function d(e,t){const n=t[0]-e[0],i=t[1]-e[1];return n*n+i*i}function p(e){const t=e[0],n=e[1];return Math.sqrt(t*t+n*n)}function m(e){const t=e[0],n=e[1];return t*t+n*n}function f(e,t){const n=t[0],i=t[1];let r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),e[0]=t[0]*r,e[1]=t[1]*r),e}function y(e,t,n,i){const r=t[0],o=t[1];return e[0]=r+i*(n[0]-r),e[1]=o+i*(n[1]-o),e}function g(e,t,n){const i=t[0],r=t[1];return e[0]=n[0]*i+n[2]*r+n[4],e[1]=n[1]*i+n[3]*r+n[5],e}function _(e,t,n,i){const r=t[0]-n[0],o=t[1]-n[1],s=Math.sin(i),a=Math.cos(i);return e[0]=r*a-o*s+n[0],e[1]=r*s+o*a+n[1],e}function x(e,t){return e[0]===t[0]&&e[1]===t[1]}const v=p,w=a,M=l,P=c,I=h,A=d,b=m;Object.freeze(Object.defineProperty({__proto__:null,add:s,angle:function(e,t){const n=e[0],i=e[1],r=t[0],o=t[1];let s=n*n+i*i;s>0&&(s=1/Math.sqrt(s));let a=r*r+o*o;a>0&&(a=1/Math.sqrt(a));const l=(n*r+i*o)*s*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e},copy:r,cross:function(e,t,n){const i=t[0]*n[1]-t[1]*n[0];return e[0]=e[1]=0,e[2]=i,e},dist:I,distance:h,div:P,divide:c,dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},equals:function(e,t){const n=e[0],r=e[1],o=t[0],s=t[1],a=(0,i.FD)();return Math.abs(n-o)<=a*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=a*Math.max(1,Math.abs(r),Math.abs(s))},exactEquals:x,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e},len:v,length:p,lerp:y,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},mul:M,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},normalize:f,projectAndScale:function(e,t,n,i,r){let o=t[0]-n[0],s=t[1]-n[1];const a=(i[0]*o+i[1]*s)*(r-1);return o=i[0]*a,s=i[1]*a,e[0]=t[0]+o,e[1]=t[1]+s,e},random:function(e,t=1){const n=2*(0,i.Ov)()*Math.PI;return e[0]=Math.cos(n)*t,e[1]=Math.sin(n)*t,e},rotate:_,round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e},scale:u,scaleAndAdd:function(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e},set:o,sqrDist:A,sqrLen:b,squaredDistance:d,squaredLength:m,str:function(e){return"vec2("+e[0]+", "+e[1]+")"},sub:w,subtract:a,transformMat2:function(e,t,n){const i=t[0],r=t[1];return e[0]=n[0]*i+n[2]*r,e[1]=n[1]*i+n[3]*r,e},transformMat2d:g,transformMat3:function(e,t,n){const i=t[0],r=t[1];return e[0]=n[0]*i+n[3]*r+n[6],e[1]=n[1]*i+n[4]*r+n[7],e},transformMat4:function(e,t,n){const i=t[0],r=t[1];return e[0]=n[0]*i+n[4]*r+n[12],e[1]=n[1]*i+n[5]*r+n[13],e}},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,n)=>{n.d(t,{E:()=>A,w:()=>a});var i=n(4576),r=(n(44208),n(4718)),o=n(3694),s=n(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),M.prune(),P.prune(),I.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(x(e,n))for(w.clear();n;){for(let r=0,o=n.children.length;r<o;r++){const o=n.children[r],s=n.leaf?i(o):o;x(e,s)&&(n.leaf?t(o):_(e,s)?l(o,t):w.push(o))}n=w.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!x(e,t))return!1;for(w.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],o=t.leaf?n(r):r;if(x(e,o)){if(t.leaf||_(e,o))return!0;w.push(r)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(e){if(!e)return this;let t,n=this._data,r=null,o=0,s=!1;const a=this._toBBox(e);for(P.clear(),I.clear();n||P.length>0;){if(n||(n=P.pop(),r=P.data[P.length-1],o=I.pop()??0,s=!0),n.leaf&&(t=(0,i.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),P.push(n),this._condense(P),this;s||n.leaf||!_(n,a)?r?(o++,n=r.children[o],s=!1):n=null:(P.push(n),I.push(o),o=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let o=this._maxEntries;if(r<=o){const i=new R(e.slice(t,n+1));return c(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/o**(i-1)));const s=new S([]);s.height=i;const a=Math.ceil(r/o),l=a*Math.ceil(Math.sqrt(o));v(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);v(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);s.children.push(this._build(e,n,r,i-1))}}return c(s,this._toBBox),s}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);P.clear();const o=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=m(s),l=y(e,s)-a;l<r?(r=l,i=a<i?a:i,n=s):l===r&&a<i&&(i=a,n=s)}t=n||t.children[0]}return t}(r,this._data,t,P);for(o.children.push(e),h(o,r);t>=0&&P.data[t].children.length>this._maxEntries;)this._split(P,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)h(t.data[i],e)}(r,P,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const o=this._chooseSplitIndex(n,r,i);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new R(s):new S(s);a.height=n.height,c(n,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,o;i=r=1/0;for(let s=t;s<=n-t;s++){const t=u(e,0,s,this._toBBox),a=u(e,s,n,this._toBBox),l=g(t,a),c=m(t)+m(a);l<i?(i=l,o=s,r=c<r?c:r):l===i&&c<r&&(r=c,o=s)}return o}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,o=u(e,0,t,r),s=u(e,n-t,n,r);let a=f(o)+f(s);for(let i=t;i<n-t;i++){const t=e.children[i];h(o,e.leaf?r(t):t),a+=f(o)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];h(s,e.leaf?r(t):t),a+=f(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],o=r.children;o.splice((0,i.qh)(o,n,o.length,r.indexHint),1)}else this.clear();else c(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(M.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.zI)(e));else M.pushArray(n.children);n=M.pop()??null}}function c(e,t){u(e,0,e.children.length,t,e)}function u(e,t,n,i,r){r||(r=new R([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],h(r,e.leaf?i(o):o);return r}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function x(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,n,i,r){const o=[t,n];for(;o.length;){const t=o.pop(),n=o.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,s.q)(e,a,n,t,r),o.push(n,a,a,t)}}const w=new o.A,M=new o.A,P=new o.A,I=new o.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class b extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class R extends b{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends b{constructor(e){super(),this.children=e,this.leaf=!1}}},13069:(e,t,n)=>{n.d(t,{AG:()=>a,lk:()=>r,vD:()=>s,yS:()=>o});const i="randomUUID"in crypto;function r(){if(i)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 o(){return`{${r().toUpperCase()}}`}function s(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},80754:(e,t,n)=>{n.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>c});var i=n(82799),r=n(16930),o=n(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=c(e);for(const e of n)for(const n of e)n[0]+=t;return e}function c(e){return(0,o.Bi)(e)?e.rings:e.paths}},87899:(e,t,n)=>{n.r(t),n.d(t,{default:()=>yt});var i=n(90237),r=n(5503),o=n(49186),s=n(53966),a=n(92071),l=n(74887),c=n(10107),u=n(79901),h=(n(87811),n(44208),n(36005)),d=n(40608),p=n(43937),m=n(35666),f=n(4146),y=n(63074),g=n(16131),_=n(8303),x=n(25036),v=n(69540),w=n(25482),M=n(77690),P=n(29242),I=n(37585),A=n(38954);const b=(0,n(51850).vt)(),R=(0,P.vt)(),S=(0,P.vt)(),O=(0,P.vt)();function B(e,t,n){return(0,A.i)(b,t[0],t[1],1),(0,A.q)(b,b,(0,M.mg)(R,n)),0===b[2]?(0,I.hZ)(e,b[0],b[1]):(0,I.hZ)(e,b[0]/b[2],b[1]/b[2])}function E(e,t,n){return L(S,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),L(O,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,M.lw)(e,(0,M.KC)(S,S),O),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function L(e,t,n,i,r,o,s,a,l){(0,M.hZ)(e,t,i,o,n,r,s,1,1,1),(0,A.i)(b,a,l,1),(0,M.KC)(R,e);const[c,u,h]=(0,A.q)(b,b,(0,M.mg)(R,R));return(0,M.hZ)(R,c,0,0,0,u,0,0,0,h),(0,M.lw)(e,R,e)}var T=n(90629),Z=n(48163),C=n(86738),j=n(39829),X=n(57251),U=n(16930);let Y=class extends v.A{projectOrWarn(e,t){if(null==e)return e;const{geometry:n,pending:i}=(0,X.projectOrLoad)(e,t);return i?null:i||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}};Y=(0,i._)([(0,d.$)("esri.layers.support.GeoreferenceBase")],Y);const H=Y,$=(0,P.vt)(),N=(0,Z.vt)();let V=class extends w.A{};(0,i._)([(0,c.MZ)({type:Number,json:{write:{isRequired:!0}}})],V.prototype,"x",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:{isRequired:!0}}})],V.prototype,"y",void 0),V=(0,i._)([(0,d.$)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],V);let z=class extends v.A{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,i._)([(0,c.MZ)()],z.prototype,"sourcePoint",void 0),(0,i._)([(0,c.MZ)({type:C.A})],z.prototype,"mapPoint",void 0),z=(0,i._)([(0,d.$)("esri.layers.support.ControlPointsGeoreference.ControlPoint")],z);let q=class extends(w.A.JSONSupportMixin(H)){constructor(e){super(e),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(e,t){const n=U.A.fromJSON(t.spatialReference),i=(0,P.fA)(...t.coefficients,1);return e.map((e=>((0,I.hZ)(N,e.x,e.y),B(N,N,i),{sourcePoint:e,mapPoint:new C.A({x:N[0],y:N[1],spatialReference:n})})))}writeControlPoints(e,t,n,i){if(null!=this.transform)null!=e&&k(e[0])&&(t.controlPoints=e.map((e=>{const t=e.sourcePoint;return{x:t.x,y:t.y}})),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8));else{const e=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration. Make sure the parent media element is loaded i.e. the ImageElement or VideoElement set as 'MediaLayer.source'.",{layer:i?.layer,georeference:this});i?.messages?i.messages.push(e):s.A.getLogger(this).error(e.name,e.message)}}get coords(){if(null==this.controlPoints)return null;const e=this._updateTransform($);if(null==e||!k(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,i){const r=(0,Z.fA)(0,n),o=(0,Z.fA)(0,0),s=(0,Z.fA)(t,0),a=(0,Z.fA)(t,n);return B(r,r,e),B(o,o,e),B(s,s,e),B(a,a,e),new j.A({rings:[[r,o,s,a,r]],spatialReference:i})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!k(this.controlPoints[0]))return;const t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;const{width:n,height:i}=this,{rings:[[r,o,s,a]]}=e,l={sourcePoint:(0,T.tc)(0,i),mapPoint:new C.A({x:r[0],y:r[1],spatialReference:t})},c={sourcePoint:(0,T.tc)(0,0),mapPoint:new C.A({x:o[0],y:o[1],spatialReference:t})},u={sourcePoint:(0,T.tc)(n,0),mapPoint:new C.A({x:s[0],y:s[1],spatialReference:t})},h={sourcePoint:(0,T.tc)(n,i),mapPoint:new C.A({x:a[0],y:a[1],spatialReference:t})};k(l)&&k(c)&&k(u)&&k(h)&&(ie($,l,c,u,h),this.controlPoints=this.controlPoints.map((({sourcePoint:e})=>((0,I.hZ)(N,e.x,e.y),B(N,N,$),{sourcePoint:e,mapPoint:new C.A({x:N[0],y:N[1],spatialReference:t})}))))}get inverseTransform(){return null==this.transform?null:(0,M.B8)((0,P.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!k(this.controlPoints[0]))return null;(0,I.hZ)(N,e.x,e.y);const t=this.controlPoints[0].mapPoint.spatialReference;return B(N,N,this.transform),new C.A({x:N[0],y:N[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!k(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,X.projectOrLoad)(e,t).geometry)?null:((0,I.hZ)(N,e.x,e.y),B(N,N,this.inverseTransform),(0,T.tc)(N[0],N[1]))}toSourceNormalized(e){const t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){const{controlPoints:t,width:n,height:i}=this;if(!(null!=t&&n>0&&i>0))return null;const[r,o,s,a]=t;if(!k(r))return null;const l=r.mapPoint.spatialReference,c=this._projectControlPoint(o,l),u=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!k(c.controlPoint))return null;null==e&&(e=(0,P.vt)());let d=null;return d=k(u.controlPoint)&&k(h.controlPoint)?ie(e,r,c.controlPoint,u.controlPoint,h.controlPoint):k(u.controlPoint)?function(e,t,n,i){return ne(G,K,t),ne(W,J,n),ne(F,Q,i),(0,I.Cc)(D,G,W,.5),(0,I.e$)(D,F,D,Math.PI),(0,I.Cc)(ee,K,J,.5),(0,I.e$)(ee,Q,ee,Math.PI),ae(e,G,W,F,D,K,J,Q,ee)}(e,r,c.controlPoint,u.controlPoint):function(e,t,n){return ne(G,K,t),ne(W,J,n),(0,I.e$)(F,W,G,te),(0,I.e$)(D,G,W,te),(0,I.e$)(Q,J,K,-te),(0,I.e$)(ee,K,J,-te),ae(e,G,W,F,D,K,J,Q,ee)}(e,r,c.controlPoint),d.every((e=>0===e))?null:d}_projectControlPoint(e,t){if(!k(e))return{valid:!0,controlPoint:e};const{sourcePoint:n,mapPoint:i}=e,{geometry:r,pending:o}=(0,X.projectOrLoad)(i,t);return o?{valid:!1,controlPoint:null}:o||r?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:r}}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:i.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function k(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,i._)([(0,c.MZ)({type:[z],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[V],isRequired:!0},coefficients:{type:[Number],isRequired:!0},spatialReference:{type:U.A,isRequired:!0}}}}})],q.prototype,"controlPoints",void 0),(0,i._)([(0,h.w)("controlPoints")],q.prototype,"readControlPoints",null),(0,i._)([(0,p.K)("controlPoints")],q.prototype,"writeControlPoints",null),(0,i._)([(0,c.MZ)({clonable:!1})],q.prototype,"coords",null),(0,i._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],q.prototype,"height",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],q.prototype,"inverseTransform",null),(0,i._)([(0,c.MZ)({readOnly:!0})],q.prototype,"transform",null),(0,i._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],q.prototype,"width",void 0),q=(0,i._)([(0,d.$)("esri.layers.support.ControlPointsGeoreference")],q);const G=(0,Z.vt)(),W=(0,Z.vt)(),F=(0,Z.vt)(),D=(0,Z.vt)(),K=(0,Z.vt)(),J=(0,Z.vt)(),Q=(0,Z.vt)(),ee=(0,Z.vt)(),te=Math.PI/2;function ne(e,t,n){(0,I.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,I.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function ie(e,t,n,i,r){return ne(G,K,t),ne(W,J,n),ne(F,Q,i),ne(D,ee,r),ae(e,G,W,F,D,K,J,Q,ee)}const re=new Array(8).fill(0),oe=new Array(8).fill(0);function se(e,t,n,i,r){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=i[0],e[5]=i[1],e[6]=r[0],e[7]=r[1],e}function ae(e,t,n,i,r,o,s,a,l){return E(e,se(re,t,n,i,r),se(oe,o,s,a,l))}const le=q;var ce=n(78888),ue=n(43668),he=n(84952),de=n(13069),pe=n(4902),me=n(92474),fe=(n(59456),n(21325));const ye=(0,Z.vt)();let ge=class extends H{constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:i}=this;if(null==e||null==t||null==n||null==i)return null;const r=e.spatialReference;return t=this.projectOrWarn(t,r),n=this.projectOrWarn(n,r),i=this.projectOrWarn(i,r),null==t||null==n||null==i?null:new j.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[i.x,i.y],[n.x,n.y]]],spatialReference:r})}set coords(e){const{topLeft:t}=this;if(null==t)return;const n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;const{rings:[[i,r,o,s]]}=e;this.bottomLeft=new C.A({x:i[0],y:i[1],spatialReference:n}),this.topLeft=new C.A({x:r[0],y:r[1],spatialReference:n}),this.topRight=new C.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new C.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(e){const{topLeft:t,topRight:n,bottomRight:i,bottomLeft:r}=this;if(null==e||null==t||null==n||null==i||null==r)return null;const o=t.spatialReference;e=e.normalize();const s=(0,X.projectOrLoad)(e,o).geometry;if(null==s)return null;(0,I.hZ)(ye,s.x,s.y);const a=E((0,P.vt)(),[t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y],[0,0,0,1,1,0,1,1]);return B(ye,ye,a),(0,T.tc)(ye[0],ye[1])}};(0,i._)([(0,c.MZ)({clonable:!1})],ge.prototype,"coords",null),(0,i._)([(0,c.MZ)({type:C.A})],ge.prototype,"bottomLeft",void 0),(0,i._)([(0,c.MZ)({type:C.A})],ge.prototype,"bottomRight",void 0),(0,i._)([(0,c.MZ)({type:C.A})],ge.prototype,"topLeft",void 0),(0,i._)([(0,c.MZ)({type:C.A})],ge.prototype,"topRight",void 0),ge=(0,i._)([(0,d.$)("esri.layers.support.CornersGeoreference")],ge);const _e=ge;var xe=n(34727),ve=n(34304),we=n(5443);let Me=class extends H{constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:e,ymin:t,xmax:n,ymax:i,spatialReference:r}=this.extent;let o;if(this.rotation){const{x:r,y:s}=this.extent.center,a=Pe(r,s,this.rotation);o=[a(e,t),a(e,i),a(n,i),a(n,t)],o.push(o[0])}else o=[[e,t],[e,i],[n,i],[n,t],[e,t]];return new j.A({rings:[o],spatialReference:r})}set coords(e){if(null==e||null==this.extent)return;const t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;const{rings:[[n,i,r]],extent:{center:{x:o,y:s}}}=e,a=(0,xe.KJ)(Math.PI/2-Math.atan2(i[1]-n[1],i[0]-n[0])),l=Pe(o,s,-a),[c,u]=l(n[0],n[1]),[h,d]=l(r[0],r[1]);this.extent=new we.A({xmin:c,ymin:u,xmax:h,ymax:d,spatialReference:t}),this.rotation=a}toSourceNormalized(e){const{extent:t,rotation:n}=this;if(null==e||null==t)return null;const{xmin:i,ymin:r,xmax:o,ymax:s,center:a,spatialReference:l}=t;e=e.normalize();const c=(0,X.projectOrLoad)(e,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=Pe(a.x,a.y,-n)(u,h)),(0,T.tc)((0,xe.hs)(u,i,o,0,1),(0,xe.hs)(h,s,r,0,1))}};function Pe(e,t,n){const i=(0,ve.DF)(n),r=Math.cos(i),o=Math.sin(i);return(n,i)=>[r*(n-e)+o*(i-t)+e,r*(i-t)-o*(n-e)+t]}function Ie(e,t){const n=(0,m.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>m.Gr.PORTAL_ITEM}function Ae(e,t,n){return{enabled:!Ie(n?.layer,n?.origin),ignoreOrigin:!0}}(0,i._)([(0,c.MZ)({clonable:!1})],Me.prototype,"coords",null),(0,i._)([(0,c.MZ)({type:we.A})],Me.prototype,"extent",void 0),(0,i._)([(0,c.MZ)({type:Number})],Me.prototype,"rotation",void 0),Me=(0,i._)([(0,d.$)("esri.layers.support.ExtentAndRotationGeoreference")],Me);const be={json:{name:"url",type:String,write:{overridePolicy:Ae}}},Re={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:Ae}}},Se={types:{key:"type",base:H,typeMap:{"control-points":le,corners:_e,"extent-and-rotation":Me}},json:{types:{key:"type",base:H,typeMap:{"control-points":le}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};let Oe=class extends(pe.A.NumericIdentifiableMixin((0,a.P)(me.A))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return le.fromJSON(e)}writeGeoreference(e,t,n,i){const r=i?.resources?.pendingOperations,a=()=>{const r=function(e,t,n){if(!e||"control-points"===e.type)return e;const{coords:i}=e;if(5!==i?.rings[0]?.length)return null;const[r,o,s,a]=i.rings[0],{spatialReference:l}=i;return new le({controlPoints:[{mapPoint:new C.A({x:r[0],y:r[1],spatialReference:l}),sourcePoint:(0,T.tc)(0,n)},{mapPoint:new C.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,T.tc)(0,0)},{mapPoint:new C.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,T.tc)(t,0)},{mapPoint:new C.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,T.tc)(t,n)}],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(r){if("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==r.controlPoints?.length&&i?.messages)return void i.messages.push(new o.A("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));t[n]=r.write({},i)}};if("control-points"!==e.type&&!this.loaded&&r)return t[n]={},void r.push(this.load().then(a));a()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:i}=this;if(null==e||null==t||0===n||0===i)return null;const r=t.toSourceNormalized(e);return null==r?null:(r.x*=n,r.y*=i,r)}};(0,i._)([(0,c.MZ)(Se)],Oe.prototype,"georeference",void 0),(0,i._)([(0,h.w)("georeference")],Oe.prototype,"readGeoreference",null),(0,i._)([(0,p.K)("georeference")],Oe.prototype,"writeGeoreference",null),(0,i._)([(0,c.MZ)({json:{read:!1,write:!1}})],Oe.prototype,"opacity",void 0),Oe=(0,i._)([(0,d.$)("esri.layers.support.MediaElementBase")],Oe);const Be=Oe;var Ee=n(85648),Le=n(97159);let Te=class extends Be{constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const e=this.image;if("string"==typeof e){const t=(0,ue.M5)(e).then((e=>{this._set("content",e)}));this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){const t=e.decode().then((()=>{this._set("content",e)}));this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Le.f)(t.url,n)}writeImage(e,t,n,i){if(null==e)return;const r=i?.portalItem,o=i?.resources;if(!r||!o)return void("string"==typeof e&&(t[n]=(0,Le.t)(e,i)));const s=function(e){return"string"==typeof e&&!(0,he.DB)(e)&&!(0,he.w8)(e)}(e)?e:null;if(s){if(null==(0,Le.i)(s))return void(t[n]=s);const e=(0,Le.t)(s,{...i,verifyItemRelativeUrls:i?.verifyItemRelativeUrls?{writtenUrls:i.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Le.M.NO);if(r&&e&&!(0,he.oP)(e))return o.toKeep.push({resource:r.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",o.pendingOperations.push(async function(e){return"string"==typeof e?(0,he.DB)(e)?(0,he.N9)(e):(await(0,ce.A)(e,{responseType:"blob"})).data:new Promise((t=>function(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,i=document.createElement("canvas"),r=i.getContext("2d");return i.width=t,i.height=n,e instanceof HTMLImageElement?r.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&r.putImageData(e,0,0),i}(e).toBlob(t)))}(e).then((e=>{const i=function(e,t){const n=(0,de.lk)(),i=`${(0,he.fj)("media",n)}.${(0,Ee.n)({type:"blob",blob:e})}`;return t.resourceFromPath(i)}(e,r);t[n]=i.itemRelativeUrl,o.toAdd.push({resource:i,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})})))}};(0,i._)([(0,c.MZ)()],Te.prototype,"animationOptions",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],Te.prototype,"content",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],Te.prototype,"contentWidth",null),(0,i._)([(0,c.MZ)({readOnly:!0})],Te.prototype,"contentHeight",null),(0,i._)([(0,c.MZ)(be)],Te.prototype,"image",void 0),(0,i._)([(0,h.w)("image",["url"])],Te.prototype,"readImage",null),(0,i._)([(0,p.K)("image")],Te.prototype,"writeImage",null),(0,i._)([(0,c.MZ)(Re)],Te.prototype,"type",void 0),Te=(0,i._)([(0,d.$)("esri.layers.support.ImageElement")],Te);const Ze=Te;var Ce=n(62885),je=n(65529),Xe=n(61893),Ue=n(36708),Ye=n(19419),He=n(12176),$e=n(6518),Ne=n(69622),Ve=n(537),ze=n(95108),qe=n(65864),ke=n(80754);function Ge(e,t,n){if(Array.isArray(e)){const i=e[0];if(i>t){const n=(0,ke.kd)(i,t);e[0]=i+n*(-2*t)}else if(i<n){const t=(0,ke.kd)(i,n);e[0]=i+t*(-2*n)}}else{const i=e.x;if(i>t){const n=(0,ke.kd)(i,t);e.x+=n*(-2*t)}else if(i<n){const t=(0,ke.kd)(i,n);e.x+=t*(-2*n)}}return e}function We(e,t){const n=[],{ymin:i,ymax:r,xmin:o,xmax:s}=e,a=e.xmax-e.xmin,[l,c]=t.valid,{x:u,frameId:h}=Fe(e.xmin,t),{x:d,frameId:p}=Fe(e.xmax,t),m=u===d&&a>0;if(a>2*c){const e={xmin:o<s?u:d,ymin:i,xmax:c,ymax:r},t={xmin:l,ymin:i,xmax:o<s?d:u,ymax:r},a={xmin:0,ymin:i,xmax:c,ymax:r},m={xmin:l,ymin:i,xmax:0,ymax:r},f=[],y=[];De(e,a)&&f.push(h),De(e,m)&&y.push(h),De(t,a)&&f.push(p),De(t,m)&&y.push(p);for(let e=h+1;e<p;e++)f.push(e),y.push(e);n.push(new Qe(e,[h]),new Qe(t,[p]),new Qe(a,f),new Qe(m,y))}else u>d||m?n.push(new Qe({xmin:u,ymin:i,xmax:c,ymax:r},[h]),new Qe({xmin:l,ymin:i,xmax:d,ymax:r},[p])):n.push(new Qe({xmin:u,ymin:i,xmax:d,ymax:r},[h]));return n}function Fe(e,t){const[n,i]=t.valid,r=2*i;let o,s=0;return e>i?(o=Math.ceil(Math.abs(e-i)/r),e-=o*r,s=o):e<n&&(o=Math.ceil(Math.abs(e-n)/r),e+=o*r,s=-o),{x:e,frameId:s}}function De(e,t){const{xmin:n,ymin:i,xmax:r,ymax:o}=t;return Ke(e,n,i)&&Ke(e,n,o)&&Ke(e,r,o)&&Ke(e,r,i)}function Ke(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function Je(e,t,n=!0){const i=!(0,qe.Rg)(e);if(i&&(0,ze.m3)(e),n)return(new tt).cut(e,t);const r=i?e.rings:e.paths,o=i?4:2,s=r.length,a=-2*t;for(let e=0;e<s;e++){const t=r[e];if(t&&t.length>=o){const e=[];for(const n of t)e.push([n[0]+a,n[1]]);r.push(e)}}return i?e.rings=r:e.paths=r,e}class Qe{constructor(e,t){this.extent=e,this.frameIds=t}}const et=(0,Ye.vt)();class tt{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(const e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(const n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);const i=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=i;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e[0],e[1],this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){const t=this._side(e[0]);if(t*this._prevSide==-1){const n=this._intersect(this._prevPt,e);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(e[0],e[1],t)}else this._lineTo(e[0],e[1],t);this._prevSide=t,this._prevPt=e}close(){const e=this._firstPt,t=this._prevPt;e[0]===t[0]&&e[1]===t[1]||this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t,n){this._closed?(this._lineIn.push([n<=0?e:this._xCut,t]),this._lineOut.push([n>=0?e:this._xCut,t])):(n<=0&&this._lineIn.push([e,t]),n>=0&&this._lineOut.push([e,t]))}_lineTo(e,t,n){this._closed?(nt(this._lineIn,n<=0?e:this._xCut,t),nt(this._lineOut,n>=0?e:this._xCut,t)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([e,t])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([e,t])):this._prevSide<0?(this._lineIn.push([e,t]),this._lineOut.push([e,t])):this._prevSide>0&&(this._lineOut.push([e,t]),this._lineIn.push([e,t]))}_checkClosingPt(e){const t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0][1]=e[t-2][1],e.pop())}_side(e){return e<this._xCut?-1:e>this._xCut?1:0}_intersect(e,t){const n=(this._xCut-e[0])/(t[0]-e[0]);return e[1]+n*(t[1]-e[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function nt(e,t,n){const i=e.length;i>1&&e[i-1][0]===t&&e[i-2][0]===t?e[i-1][1]=n:e.push([t,n])}let it=class extends Ne.A{constructor(e){super(e)}get bounds(){const e=this.coords;return null==e?.extent?null:(0,Ye.VY)(e.extent)}get coords(){const e=this.element.georeference?.coords;return(0,X.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return j.A.fromJSON(function(e,t){if(null==e)return null;const n=e.spatialReference,i=(0,fe.Vp)(n),r=w.A.isSerializable(e)?e.toJSON():e;if(!i)return r;const o=(0,fe.K8)(n)?102100:4326,s=ke.j7[o].maxX,a=ke.j7[o].minX;if((0,qe.fT)(r))return Ge(r,s,a);if((0,qe.U9)(r))return r.points=r.points.map((e=>Ge(e,s,a))),r;if((0,qe.ZC)(r))return function(e,t){if(!t)return e;const n=We(e,t).map((e=>e.extent));return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}}(r,i);if((0,qe.Bi)(r)||(0,qe.Rg)(r)){const e=(0,Ve.Rg)(et,r),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},i=(0,ke.kd)(n.xmin,a)*(2*s),o=0===i?r:(0,ke.kS)(r,i);return n.xmin+=i,n.xmax+=i,n.xmax>s?Je(o,s,t):n.xmin<a?Je(o,a,t):o}return r}(this.coords,!0))}get normalizedBounds(){const e=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=e?(0,Ye.VY)(e):null}};(0,i._)([(0,c.MZ)()],it.prototype,"spatialReference",void 0),(0,i._)([(0,c.MZ)()],it.prototype,"element",void 0),(0,i._)([(0,c.MZ)()],it.prototype,"bounds",null),(0,i._)([(0,c.MZ)()],it.prototype,"coords",null),(0,i._)([(0,c.MZ)()],it.prototype,"normalizedCoords",null),(0,i._)([(0,c.MZ)()],it.prototype,"normalizedBounds",null),it=(0,i._)([(0,d.$)("esri.layers.support.MediaElementView")],it);var rt=n(37955),ot=n(3930);let st=class extends Be{constructor(e){super(e),this.autoplay=!0,this.content=null,this.controller=new ot.A,this.type="video"}load(){const e=this.video;return"string"==typeof e?this.addResolvingPromise(this._preProcessVideoUrl(e).then((async e=>{this.controller.playerUrl=e,await(0,Ue.C_)((()=>this.controller.element)),this.controller.loop=!0,this.controller.muted=!0,this.controller.playsInline=!0,this.controller.crossOrigin="anonymous",await(0,Ue.C_)((()=>"can-play"===this.controller.state)),await this.controller.play(),this.autoplay||this.controller.pause(),this._set("content",this.controller.element)}))):e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)}))):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:e}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.controller.currentTime}set currentTime(e){const t=(0,xe.qE)(e,0,this.duration);this.controller.setCurrentTime(t)}get duration(){return this.controller.duration}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(e,t,n,i){if(!e)return void(i?.messages&&i.messages.push(new o.A("video-element:unsupported-video","video source is missing")));const r=function(e){return"string"==typeof e&&!(0,he.DB)(e)&&!(0,he.w8)(e)}(e)?e:null;if(!r)return void(i?.messages&&i.messages.push(new o.A("video-element:unsupported-video","video source must be an absolute url")));!(0,he.oP)(r)&&i?.blockedRelativeUrls&&i.blockedRelativeUrls.push(r);const s=(0,he.s2)(r);(0,Le.i)(s)?i?.messages&&i.messages.push(new o.A("video-element:unsupported-video","video source cannot be an item resource")):t[n]=s}async _preProcessVideoUrl(e){if((0,he.zs)(e))return(0,he.yM)(e);try{return await(0,ce.A)(e,{method:"head"}),e}catch{return(0,he.yM)(e,!0)}}_loadVideo(e){return new Promise(((t,n)=>{const i=(0,rt.Oo)(e,"canplay",(()=>{this.removeHandles("canplay"),this.autoplay?e.play().then(t,n):t()}));this.addHandles(i,"canplay"),"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",(0,he.w8)(e.src)||(e.src=e.src))}))}};(0,i._)([(0,c.MZ)()],st.prototype,"autoplay",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],st.prototype,"content",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],st.prototype,"contentWidth",null),(0,i._)([(0,c.MZ)({readOnly:!0})],st.prototype,"contentHeight",null),(0,i._)([(0,c.MZ)()],st.prototype,"controller",void 0),(0,i._)([(0,c.MZ)({type:Number})],st.prototype,"currentTime",null),(0,i._)([(0,c.MZ)({type:Number})],st.prototype,"duration",null),(0,i._)([(0,c.MZ)(be)],st.prototype,"video",null),(0,i._)([(0,p.K)("video")],st.prototype,"writeVideo",null),(0,i._)([(0,c.MZ)(Re)],st.prototype,"type",void 0),st=(0,i._)([(0,d.$)("esri.layers.support.VideoElement")],st);const at=st,lt={key:"type",defaultKeyValue:"image",base:Be,typeMap:{image:Ze,video:at}},ct=r.A.ofType(lt);let ut=class extends(me.A.LoadableMixin(Xe.A.EsriPromiseMixin(je.A.EventedAccessor))){constructor(e){super(e),this._index=new $e.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(const t of e.removed){const e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}const{spatialReference:t}=this;for(const n of e.added){if(this._elementViewsMap.get(n))continue;const e=new it({spatialReference:t,element:n});this._elementViewsMap.set(n,e);const i=(0,Ue.wB)((()=>e.coords),(()=>this._updateIndexForElement(e,!1)));this._updateIndexForElement(e,!0),this.addHandles(i,e)}this._elementsIndexes.clear(),this.elements.forEach(((e,t)=>this._elementsIndexes.set(e,t))),this.emit("refresh")},this.elements=new ct}async load(e){if((0,l.Te)(e),!this.spatialReference){const e=this.elements.find((e=>null!=e.georeference?.coords));this._set("spatialReference",e?e.georeference.coords.spatialReference:U.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(e){this._set("elements",(0,Ce.V)(e,this._get("elements"),ct))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const e=this._index.fullBounds;return null==e?null:new we.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,X.initializeProjection)(e.spatialReference,this.spatialReference,null,t);const n=(0,fe.aI)(e.spatialReference,this.spatialReference)?e:(0,X.project)(e,this.spatialReference);if(!n)return[];const i=n.normalize(),r=[];for(const e of i)this._index.forEachInBounds((0,Ye.VY)(e),(({normalizedCoords:t,element:n})=>{null!=t&&(0,He.fA)(e,t)&&r.push(n)}));return r.sort(((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t))),r}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,i=this._index.has(e),r=null!=n;this._index.delete(e),r&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(i!==r?this.emit("refresh"):this.emit("change",{element:e.element}))}};(0,i._)([(0,c.MZ)()],ut.prototype,"elements",null),(0,i._)([(0,c.MZ)({readOnly:!0})],ut.prototype,"fullExtent",null),(0,i._)([(0,c.MZ)()],ut.prototype,"spatialReference",null),ut=(0,i._)([(0,d.$)("esri.layers.support.LocalMediaElementSource")],ut);const ht=ut;var dt=n(92935);function pt(e){return"object"==typeof e&&null!=e&&"type"in e}function mt(e){return pt(e)&&("image"===e.type||"video"===e.type)}let ft=class extends((0,y.dM)((0,x.j)((0,g.q)((0,_.A)((0,a.P)(f.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)((async(e,t,i)=>{const{save:r,saveAs:o}=await n.e(3561).then(n.bind(n,63561));switch(e){case dt.X.SAVE:return r(this,t);case dt.X.SAVE_AS:return o(this,i,t)}})),this.source=new ht}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const i=pt(t)?new ht({elements:new r.A([t])}):t;this._set("effectiveSource",i),this.spatialReference&&(i.spatialReference=this.spatialReference),await i.load(e),this.spatialReference=i.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}get source(){return this._get("source")}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new ht({elements:new r.A(e)}):e instanceof r.A?new ht({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const i=this._createSource(t);return i?.read(t,n),i}writeSource(e,t,n,i){if(e&&e instanceof ht){const t=e.elements.length;if(1!==t)return void(i?.messages&&i.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}mt(e)?e.write(t,i):i?.messages&&(e?i.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):i.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(dt.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(dt.X.SAVE_AS,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new Ze;case"video":return new at}return null}_getSourceOverride(e,t){if(pt(e)&&this.originIdOf("source")===m.Gr.PORTAL_ITEM&&t&&(this.originIdOf("georeference")===m.Gr.WEB_MAP||this.originIdOf("georeference")===m.Gr.WEB_SCENE)){const n=e.toJSON(),i=this._createSource(n);return i.read({...n},{origin:"portal-item"}),i.read({georeference:t},{origin:"web-map"}),i.read({georeference:t},{origin:"web-scene"}),i}return null}};(0,i._)([(0,c.MZ)({readOnly:!0})],ft.prototype,"effectiveSource",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],ft.prototype,"georeference",void 0),(0,i._)([(0,h.w)("web-document","georeference")],ft.prototype,"readGeoreference",null),(0,i._)([(0,c.MZ)({type:String})],ft.prototype,"copyright",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],ft.prototype,"fullExtent",null),(0,i._)([(0,c.MZ)({type:["MediaLayer"]})],ft.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.MZ)({type:["show","hide"]})],ft.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:le}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Ie(this,n?.origin)&&mt(e)&&!!e.georeference&&e.originIdOf("georeference")>m.Gr.PORTAL_ITEM}}}}})],ft.prototype,"source",null),(0,i._)([(0,u.w)("source")],ft.prototype,"castSource",null),(0,i._)([(0,h.w)("source",["url"])],ft.prototype,"readSource",null),(0,i._)([(0,p.K)("source")],ft.prototype,"writeSource",null),(0,i._)([(0,c.MZ)()],ft.prototype,"spatialReference",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],ft.prototype,"type",void 0),ft=(0,i._)([(0,d.$)("esri.layers.MediaLayer")],ft);const yt=ft},6518:(e,t,n)=>{n.d(t,{F:()=>a});var i=n(44208),r=n(75503),o=n(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((n,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8303:(e,t,n)=>{n.d(t,{A:()=>M});var i=n(90237),r=n(92602),o=n(70333),s=n(78888),a=n(60999),l=n(49186),c=n(53966),u=n(97768),h=n(74887),d=n(84952),p=n(10107),m=(n(44208),n(87811),n(36005)),f=n(40608),y=n(43937),g=n(83531),_=n(20655),x=n(80812),v=n(41318),w=n(10407);const M=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new x.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await n.e(1204).then(n.bind(n,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.QP)(e),!0))))}async setUserPrivileges(e,t){if(!r.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:i},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!o.id?.findCredential(this.url),r=e===n.id;if(r&&n.portal.user)return this._getUserPrivileges(n,i);let s,a;if(r)s=n.portal.url;else try{s=await(0,g.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!s||!(0,d.b8)(s,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const l=!0,c=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:c},content:{updateItem:u}};try{if(r?await n.reload():(n=new x.default({id:e,portal:{url:s}}),await n.load(t)),n.portal.user)return this._getUserPrivileges(n,i)}catch(e){(0,h.QP)(e)}return{features:{edit:l,fullEdit:c},content:{updateItem:u}}}_getUserPrivileges(e,t){const n=(0,w.It)(e);return t&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const n=P.credential===t?P.user:await this._fetchEditingUser(e);return P.credential=t,P.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const i=`${n.owningSystemUrl}/sharing/rest`,r=_.A.getDefault();if(r&&r.loaded&&(0,d.S8)(r.restUrl)===(0,d.S8)(i))return r.user;const l=`${i}/community/self`,c=null!=e?e.signal:null,u=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?v.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return n&&i&&!(0,d.ut)(i.restUrl,n.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,p.MZ)({type:x.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,p.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},P={credential:null,user:null}},85648:(e,t,n)=>{n.d(t,{n:()=>r});var i=n(84952);function r(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||s}(e.url)}(e)]||a}const o={},s="text/plain",a=o[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)o[l[e]]=e},92935:(e,t,n)=>{var i;n.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))}}]);