@arcgis/core 4.28.0-rc.3 → 4.28.0

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 (62) hide show
  1. package/arcade/ArcadeDate.js +1 -1
  2. package/arcade/functions/featuresetbase.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/1da721608993783dc9cf.js +1 -0
  5. package/assets/esri/core/workers/chunks/{78e2fa121760383b08ec.js → 3dcb2a82e1e4b520c9c9.js} +2 -2
  6. package/assets/esri/core/workers/chunks/{969a82b674eda9f8720f.js → 6bc1f6f8a2408fa4bb6a.js} +1 -1
  7. package/assets/esri/core/workers/chunks/78e49a70193e5adea17c.js +1 -0
  8. package/assets/esri/core/workers/chunks/830d99e6c58a52a58973.js +1 -0
  9. package/assets/esri/core/workers/chunks/8f7997e8e6ee9e56239f.js +1 -0
  10. package/assets/esri/core/workers/chunks/{a4341ec0fe89b865d849.js → a160576f21ada91995ac.js} +1 -1
  11. package/assets/esri/core/workers/chunks/b6bd31674076e543d8b2.js +1 -0
  12. package/assets/esri/core/workers/chunks/{562eafa5090827ebb7ec.js → c87e9280681c20d042b5.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{2c560a075d9ef2069ed1.js → ed97761ac077a96aeb29.js} +1 -1
  14. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +6 -4
  15. package/assets/esri/themes/base/widgets/_Features.scss +5 -0
  16. package/assets/esri/themes/base/widgets/_Popup.scss +0 -1
  17. package/assets/esri/themes/dark/main.css +1 -1
  18. package/assets/esri/themes/light/main.css +1 -1
  19. package/assets/esri/themes/light/view.css +1 -1
  20. package/interfaces.d.ts +252 -52
  21. package/intl/date.js +1 -1
  22. package/kernel.js +1 -1
  23. package/layers/FeatureLayer.js +1 -1
  24. package/layers/OrientedImageryLayer.js +1 -1
  25. package/layers/graphics/data/QueryEngineResult.js +1 -1
  26. package/layers/support/LayerContingentValuesCache.js +1 -1
  27. package/package.json +1 -1
  28. package/smartMapping/support/utils.js +1 -1
  29. package/statistics/utils.js +1 -1
  30. package/support/basemapUtils.js +1 -1
  31. package/support/revision.js +1 -1
  32. package/views/2d/engine/Container.js +1 -1
  33. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  34. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  35. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  36. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  37. package/views/3d/webgl-engine/core/FBOPool.js +1 -1
  38. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -2
  39. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  40. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  41. package/views/draw/DrawOperation.js +1 -1
  42. package/views/interactive/sketch/constraints.js +1 -1
  43. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  44. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  45. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  46. package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
  47. package/webdoc/support/writeUtils.js +1 -1
  48. package/widgets/Editor/EditorViewModel.js +1 -1
  49. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  50. package/widgets/Editor/VisibleElements.js +1 -1
  51. package/widgets/Editor/workflowUtils.js +1 -1
  52. package/widgets/Editor.js +1 -1
  53. package/widgets/FeatureForm/FieldInput.js +1 -1
  54. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  55. package/widgets/FeatureForm.js +1 -1
  56. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +4 -0
  57. package/widgets/support/dateUtils.js +1 -1
  58. package/assets/esri/core/workers/chunks/7648f3341b7dff2825c3.js +0 -1
  59. package/assets/esri/core/workers/chunks/9c77d69a13ec22cdd760.js +0 -1
  60. package/assets/esri/core/workers/chunks/a821fa1870b83fed5d31.js +0 -1
  61. package/assets/esri/core/workers/chunks/c416df0668f6c596095f.js +0 -1
  62. package/assets/esri/core/workers/chunks/f0d342303fc20e266d27.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/arrayUtils.js";import{deprecatedProperty as i}from"../core/deprecate.js";import o from"../core/Logger.js";import{watch as n,whenOnce as a}from"../core/reactiveUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/has.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{isIntegerField as l}from"../layers/support/fieldUtils.js";import d from"./Widget.js";import{css as p}from"./FeatureForm/css.js";import{isGroupInput as c,isFieldInput as u,isRelationshipInput as m,isInputInGroupInput as h,isFieldElementWithInputType as v,getErrorMessageForFieldInput as _,getIconForFeature as g,isNumberFieldInput as b}from"./FeatureForm/featureFormUtils.js";import f from"./FeatureForm/FeatureFormViewModel.js";import{loadCalciteComponents as C}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as y,numberingSystem as F,prepareISOFieldValueForDateComponents as R,prepareUnixFieldValueForDateComponents as w,getISOFieldValueFromDateComponents as O,getUnixFieldValueFromDateComponents as k}from"./support/dateUtils.js";import{globalCss as I}from"./support/globalCss.js";import{Heading as M,incrementHeadingLevel as D}from"./support/Heading.js";import"./support/widgetUtils.js";import{messageBundle as x}from"./support/decorators/messageBundle.js";import{vmEvent as V}from"./support/decorators/vmEvent.js";import{tsx as N}from"./support/jsxFactory.js";import{substitute as L}from"../intl/substitute.js";const T="data-field-name",j="esri.widgets.FeatureForm",S=o.getLogger(j);let E=class extends d{constructor(e,t){super(e,t),this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._inputsWithChanges=new Set,this._focusedFieldName=null,this._listObserverNode=null,this._listObserver=new IntersectionObserver((e=>{e.length&&e[0].isIntersecting&&this._incrementRelatedRecordPage()}),{root:window.document}),this.groupDisplay="all",this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.messagesFeature=null,this.messagesTemplates=null,this.viewModel=new f,this._onShowAllRelatedRecordsClick=e=>{const{feature:t,relatedRecordCallbacks:i}=this;t&&i?.showAllRelatedRecords&&i.showAllRelatedRecords({parentFeature:t,relationshipId:e})},this._onAddRelatedRecordsClick=(e,t)=>{const{feature:i,relatedRecordCallbacks:o}=this;i&&o?.addRelatedRecord&&o.addRelatedRecord({parentFeature:i,relatedLayer:t,relationshipId:e})},this._onFormKeyDown=this._onFormKeyDown.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onGroupToggle=this._onGroupToggle.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentKeyDown=this._onComponentKeyDown.bind(this),this._afterComponentCreate=this._afterComponentCreate.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterDateComponentCreateOrUpdate=this._afterDateComponentCreateOrUpdate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this)}initialize(){this.addHandles([n((()=>this.feature),(()=>{a((()=>!this.viewModel.updating)).then((()=>{const e=this._getFocusableInput("forward");this._inputsWithChanges.clear(),this._dateComponentMap.clear(),this._syncGroupInputStates(),this._focusedFieldName=e?.name||null,this._attemptFocusOnNextRender=!0}))})),n((()=>this.groupDisplay),(()=>this._syncGroupInputStates())),this.on("submit",(e=>{if(e.invalid.length>0){const[t]=e.invalid;e.invalid.forEach((e=>this._inputsWithChanges.add(e))),this._focusedFieldName=t,this._attemptFocusOnNextRender=!0,this.scheduleRender()}})),n((()=>[this.viewModel.activeRelationshipInput,this._listObserverNode]),(()=>this._onObserverChange()))])}loadDependencies(){return C({block:()=>import("@esri/calcite-components/dist/components/calcite-block.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox.js"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item.js"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),input:()=>import("@esri/calcite-components/dist/components/calcite-input.js"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker.js"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message.js"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number.js"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker.js"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone.js"),label:()=>import("@esri/calcite-components/dist/components/calcite-label.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress.js"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button.js"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group.js"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch.js")})}destroy(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode)}get _relatedRecordsEnabled(){const e=this.relatedRecordCallbacks;return!(!e||!(e.addRelatedRecord||e.editRelatedRecord||e.showAllRelatedRecords))}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get feature(){return this.viewModel.feature}set feature(e){this.viewModel.feature=e}get formTemplate(){return this.viewModel.formTemplate}set formTemplate(e){this.viewModel.formTemplate=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get relatedRecordCallbacks(){return this.viewModel.relatedRecordCallbacks}set relatedRecordCallbacks(e){this.viewModel.relatedRecordCallbacks=e}get relationshipId(){return this.viewModel.relationshipId}set relationshipId(e){this.viewModel.relationshipId=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get strict(){return this.viewModel.strict}set strict(e){this.viewModel.strict=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return i(S,"view",{replacement:"Use FeatureForm.map instead.",version:"4.27"}),this.viewModel.view}set view(e){i(S,"view",{replacement:"Use FeatureForm.map instead.",version:"4.27"}),this.viewModel.view=e}getValues(){return this.viewModel.getValues()}submit(){return this.viewModel.submit()}render(){const{state:e}=this.viewModel;return N("div",{class:this.classes(p.base,I.widget,I.panel)},"ready"===e?this._renderForm():null)}_renderForm(){return N("form",{class:p.form,novalidate:!0,onkeydown:this._onFormKeyDown,onsubmit:this._onFormSubmit},this._renderHeader(),this._renderContent())}_renderHeader(){const e=this.viewModel;if(!e.formHeaderVisible)return;const t=null!=e.formTitle&&N(M,{key:"title",level:this.headingLevel},e.formTitle),i=null!=e.formDescription&&N("p",{class:p.description,key:"description"},e.formDescription);return N("div",{class:p.formHeader},t,i)}_renderContent(){const{viewModel:e}=this;return e.activeRelationshipInput?this._renderActiveRelationshipInput(e.activeRelationshipInput):e.inputs.filter(t).filter((e=>e.visible)).map(((e,t)=>c(e)?this._renderGroup(e,t):u(e)?this._renderLabeledField(e):m(e)?this._renderRelationshipInput(e):void 0))}_renderActiveRelationshipInput(e){return this._renderRelationshipInput(e)}_renderDescriptionOrEmpty(e,t){return null==e?null:N("div",{class:this.classes(p.description),id:t},e)}_renderGroup(e,t){const{disabled:i,formTemplate:o,headingLevel:n}=this,{description:a,inputs:s,label:r,open:l}=e,d=s.filter((e=>e.visible)),c=this.viewModel.findField(this._focusedFieldName),h=c?.group===e,v=`${this.id}_group_${t}`,_="sequential"===this.groupDisplay;return N("calcite-block",{class:this.classes(p.group,_?p.groupSequential:null,h?p.groupActive:null,i?p.inputDisabled:null),collapsible:!0,"data-group":e,description:a||void 0,disabled:i,heading:`${r}`,headingLevel:o?.title?D(n):n,id:v,key:v,open:l,onCalciteBlockToggle:({target:t})=>this._onGroupToggle(t,e)},d.map((e=>u(e)?this._renderLabeledField(e):m(e)?this._renderRelationshipInput(e):void 0)))}_getFocusableInput(e,t){const i=this.viewModel.allFieldInputs,o="forward"===e?i:i.slice().reverse();let n;if(!t||m(t))n=0;else if(c(t)){const e=t.inputs.find(u);n=e?o.indexOf(e):0}else{let i;if(h(t)&&!t.group.open){const o=t.group.inputs.filter(u);i="forward"===e?o[o.length-1]:o[0]}else i=t;n=o.indexOf(i)+1}for(let a=n;a<o.length;a++){const e=o[a];if(e.visible&&u(e))return e}return null}_renderLabeledField(e){const{dataType:t,feature:i,label:o,layer:n,required:a}=e,s={"aria-label":a?L(this.messages.requiredFieldLabel,{name:o}):o,class:p.label,key:`${n.id}-${i.uid}-${e.name}`},r=[N("div",{class:p.labelTextContent,key:"labelTextContainer"},o,a?N("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==t?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e)];return"date"===t&&"coded-value"!==e.domain?.type?N("label",{...s},r):N("calcite-label",{...s},r)}_renderFieldInput(e){const{dataType:t,domain:i,inputType:o,name:n,updating:a}=e,s=this.getCommonInputProps(e);if("coded-value"===i?.type){const t=this.viewModel.getFieldValueOptionsForField(n,this.messages.empty);return"switch"!==o||e.hasInvalidSwitchValue?"radio-buttons"===o?this._renderRadioButtonComponents(e,t.flat(),s):this._renderComboBoxComponent(e,t,s):this._renderSwitchComponent(e,s)}if("datetime-picker"===o||"date"===t)return this._renderDateComponents(e,s);const r="number"===t?this._renderNumberComponent(e,s):this._renderStringComponent(e,s);return a?N("div",{class:p.fieldInputWrapper,key:`${s.key}-input-updating-wrapper`},r,N("div",{class:p.fieldInputLoader},N("calcite-progress",{type:"indeterminate"}))):r}_renderStringComponent(e,t){return N("calcite-input",{...t,type:"text-area"===e.inputType?"textarea":"text",onCalciteInputInput:e=>this._saveValueFromComponent(e.target)})}_renderNumberComponent(e,t){return N("calcite-input-number",{...t,integer:l(e.field),type:"number",onCalciteInputNumberInput:e=>this._saveValueFromComponent(e.target)})}_renderDateComponents(e,t){const{field:i}=e;switch(i.type){case"date":return this._renderDateFieldCompnents(e,t);case"date-only":return this._renderDateOnlyFieldComponent(e,t);case"time-only":return this._renderTimeOnlyFieldComponent(e,t);case"timestamp-offset":return this._renderTimestampOffsetFieldComponents(e,t);default:return this._renderReadOnlyComponent(e,y(e.field,t.value,{timeZone:this.timeZone}))}}_renderDateOnlyFieldComponent(e,t){const{valid:i,value:o}=e,{class:n,max:a,min:s,key:r,readOnly:l}=t;return N("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!i,class:n,"data-date-part":"date","data-field-name":t[T],key:`${r}-date-input`,max:null!=a?`${a}`:void 0,min:null!=s?`${s}`:void 0,numberingSystem:F,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:l,value:null!=o?`${o}`:void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)})}_renderTimeOnlyFieldComponent(e,t){const{valid:i,value:o}=e,{class:n,key:a,readOnly:s}=t;return N("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!i,class:n,"data-date-part":"time","data-field-name":t[T],key:`${a}-time-input`,numberingSystem:F,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:s,step:e.timeStep,value:null!=o?`${o}`:void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)})}_renderTimestampOffsetFieldComponents(e,t){const{name:i,valid:o,value:n}=e,{class:a,key:s,readOnly:r}=t,l=null!=n?`${n}`:void 0,{dateAsString:d,time:c,timeZoneOffset:u}=R(l),m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!o,numberingSystem:F,overlayPositioning:"fixed",readOnly:r,[T]:i,onfocus:this._onComponentFocus};return N("div",{class:p.dateInputContainer,key:`${s}-date-time-container`},N("calcite-input-date-picker",{...m,class:a,"data-date-part":"date",key:`${s}-date-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:d??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)}),N("calcite-input-time-picker",{...m,class:a,"data-date-part":"time",key:`${s}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:e.timeStep,value:c??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)}),e.includeTimeOffset?N("calcite-input-time-zone",{...m,class:a,"data-date-part":"timeZone",key:`${s}-timezone-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:u??"0",onCalciteInputTimeZoneChange:e=>this._saveValueFromDateComponent(e.target)}):null)}_renderDateFieldCompnents(e,t){const{includeTime:i,name:o,valid:n,value:a}=e,{class:s,max:r,min:l,key:d,readOnly:c}=t,{timeZone:u}=this,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!n,numberingSystem:F,overlayPositioning:"fixed",readOnly:c,[T]:o,onfocus:this._onComponentFocus},{dateAsString:h,time:v}=w(a,u),_=null!=r?w(r,u):void 0,g=null!=l?w(l,u):void 0;return N("div",{class:p.dateInputContainer,key:`${d}-date-time-container`},N("calcite-input-date-picker",{...m,class:s,"data-date-part":"date",key:`${d}-date-input`,max:_?.dateAsString??void 0,min:g?.dateAsString??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:h??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)}),i?N("calcite-input-time-picker",{...m,class:s,"data-date-part":"time",key:`${d}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:1,value:v??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)}):null)}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return N("calcite-input",{...i,class:this.classes(p.fieldInput,p.inputDisabled),readOnly:!0,type:"text",value:null!=t?`${t}`:i.value})}_renderComboBoxComponent(e,t,i){const{value:o,name:n}=e,{messages:a,messagesTemplates:s,viewModel:r,_inputsWithChanges:l}=this,d=t.map((e=>e.map((({name:e,value:t})=>N("calcite-combobox-item",{key:`#${t}`,selected:o===t,textLabel:e,value:`${t}`}))))),[p,c]=d;this.viewModel.fieldsWithInvalidCodedValue.has(e)&&c.unshift(N("calcite-combobox-item",{key:"incompatible-option",readOnly:!0,textLabel:`${e.value}`,value:`${e.value}`}));const u=c.length>0?[N("calcite-combobox-item-group",{key:"recommended",label:a.recommended},p),N("calcite-combobox-item-group",{key:"other",label:s.other},c)]:p,m="INSERT"===r.arcadeEditType,h=l.has(n),v=null==o&&(!m||h);if(e.showNoValueOptionEnabled){const t="",i=e.showNoValueLabel||a.empty;u.unshift(N("calcite-combobox-item",{key:"empty-option",selected:v,textLabel:a.empty,value:t},i))}const _=m&&e.showNoValueOptionEnabled&&!h?()=>{}:i.onblur;return N("calcite-combobox",{...i,allowCustomValues:!1,clearDisabled:!0,disabled:i.readOnly,onblur:_,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({target:e})=>{v&&0===e.selectedItems.length?this._ignoreDeselectionOfNoValueOption(e):this._saveValueFromComponent(e)}},u)}_renderRadioButtonComponents(e,t,i){const{name:o,value:n}=e,a=t.map((({name:e,value:t})=>this._renderRadioButtonComponent({key:e,label:e,name:o,value:t,selected:t===n,props:i})));if(e.showNoValueOptionEnabled){const t="",s=e.showNoValueLabel||this.messages.empty,r=n===t||null===n;a.unshift(this._renderRadioButtonComponent({key:"empty-option",label:s,name:o,value:t,selected:r,props:i}))}return N("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:p.inputRadioGroup,"data-field-name":i[T],key:`${i.key}-radio-group`,layout:"vertical",name:i.key,required:i.required},a)}_renderSwitchComponent(e,t){const{value:i}=e,o=!!v(e.element,"switch")&&i===e.element.input.onValue;return N("calcite-switch",{...t,checked:o,class:p.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldName=null},onCalciteSwitchChange:e=>this._saveValueFromComponent(e.target)})}_renderRadioButtonComponent({key:e,name:t,value:i,selected:o,label:n,props:a}){return N("calcite-label",{class:p.inputRadioLabel,key:e,layout:"inline"},N("calcite-radio-button",{...a,afterCreate:void 0,afterUpdate:void 0,checked:o,class:p.inputRadio,disabled:a.readOnly,name:t,onblur:()=>{this._focusedFieldName=null},value:i,onCalciteRadioButtonChange:({target:e})=>{e.checked&&this._saveValueFromComponent(e)}}),n)}_renderAuxiliaryText(e){const t=e.name,i=this._inputsWithChanges.has(t)&&!e.valid?_(e,this.messages,this.timeZone):null!=this.viewModel.contingencyConstraintViolations.get(t)?this.messages.validationErrors.valuesIncompatible:null!=e.valueExpressionExecutor&&e.valueExpressionExecutor.stale?this.messages.valueExpressionError:null;return null!=i?N("calcite-input-message",{icon:!0,status:"invalid"},i):this._renderDescriptionOrEmpty(e.description)}_renderShowAllRelatedRecordsListItem(e){const{featureCount:t,relationshipId:i,showAllActionVisible:o}=e,{relatedRecordCallbacks:n}=this;if(!o||!n?.showAllRelatedRecords)return;const a=this.messages;return N("calcite-list-item",{description:L(a.totalCount,{count:t}),label:a.showAll,value:!0,onCalciteListItemSelect:()=>this._onShowAllRelatedRecordsClick(i)},N("calcite-icon",{icon:"list",scale:"s",slot:"content-end"}))}_renderAddRelatedRecordButton(e){const{canAddRelatedFeature:t,relationshipId:i,relatedLayer:o}=e,{messages:n,relatedRecordCallbacks:a}=this;if(t&&a?.addRelatedRecord&&o)return N("calcite-button",{alignment:"center",appearance:"outline-fill",class:p.centeredButton,disabled:e.updating||!e.originHasValidKey,iconStart:"plus",key:`${i}-add-button`,onclick:()=>this._onAddRelatedRecordsClick(i,o),round:!0,scale:"s",width:"half"},e.relatedLayerIsTable?n.addRecord:n.addFeature)}_renderRelatedRecordListItem(e,t){const{feature:i,description:o,title:n}=e,{feature:a,relatedRecordCallbacks:s}=this,{highlightHelper:r}=this.viewModel,l=()=>{r?.removeAll(),s?.editRelatedRecord&&a&&s.editRelatedRecord({parentFeature:a,relationshipId:t,relatedFeature:i})},d=r?()=>r.add(i):void 0,p=r?()=>r.remove(i):void 0;return N("calcite-list-item",{bind:this,description:o,key:`${t}-${i.uid}`,label:n,onclick:l,onmouseenter:d,onmouseleave:p,value:n},N("calcite-icon",{icon:g(i),scale:"m",slot:"content-start"}),N("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderRelationshipInput(e){if(!this._relatedRecordsEnabled||!e.editable)return;const{featureCount:t,relationshipId:i,showAllEnabled:o}=e,n=o?null:this._renderDescriptionOrEmpty(e.description),a=t>0?this._renderRelatedRecordsList(e):e.loaded?e.originHasValidKey?this._renderNoRelatedRecordsNotice():this._renderNoValidOriginKeyNotice(e):void 0;return N("calcite-label",{class:this.classes(p.label,p.relatedRecordsLabel),key:`relationship-${i}-container`},N("div",null,this._renderRelatedRecordsHeaderContainer(e),n,a),this._renderAddRelatedRecordButton(e))}_renderRelatedRecordsHeaderContainer(e){const t=e.updating||!e.loaded;return N("div",{class:p.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},N("span",null,e.label),t?N("calcite-loader",{inline:!0,key:"loader",label:this.messagesCommon?.loading,scale:"s",type:"indeterminate"}):void 0)}_renderRelatedRecordsList(e){const{relationshipId:t}=e;return N("calcite-list",{class:p.relatedRecordsList},e.relatedFeatureInfos.map((e=>this._renderRelatedRecordListItem(e,t))),this._renderShowAllRelatedRecordsListItem(e),this._renderObserverNode())}_renderNoValidOriginKeyNotice(e){const{messages:t}=this,i=e.relatedLayerIsTable?t.noOriginKeyRecord:t.noOriginKeyFeature,o=e.relationship?.keyField,n=this.viewModel.findField(o),a=e.layer?.fieldsIndex.get(o),s=n?.label||a?.alias||o,r=L(i,{relatedLayerName:e.relatedLayer?.title,originKeyField:s});return N("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},N("div",{slot:"message"},r))}_renderNoRelatedRecordsNotice(){return N("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},N("div",{slot:"message"},this.messagesFeature.noRelatedFeatures))}_renderObserverNode(){if(this.viewModel.activeRelationshipInput?.showAllEnabled)return N("div",{afterCreate:this._afterListObserverCreated,afterRemoved:this._afterListObserverRemoved,bind:this,class:p.listObserver,key:"feature-observer"})}getCommonInputProps(e){const{disabled:t}=this,{editable:i,hint:o,label:n,maxLength:a,minLength:s,name:r,range:{max:l,min:d},required:c,valid:u,value:m}=e,h=this._inputsWithChanges.has(r),v=!i||t;return{afterCreate:this._afterComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":u?"false":"true",class:this.classes(p.fieldInput,v?p.inputDisabled:null,h&&!u?p.inputInvalid:null),key:r,label:n,max:null!=l?l:void 0,min:null!=d?d:void 0,maxLength:a>-1?a:void 0,minLength:s>-1?s:void 0,placeholder:o??void 0,readOnly:v,required:c,value:null==m?"":`${m}`,onblur:this._onComponentBlur,onfocus:this._onComponentFocus,onkeydown:this._onComponentKeyDown,[T]:r}}_getFieldInputFromHTMLElement(e){return this.viewModel.findField(e.getAttribute(T))}_afterDateComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e),i=e.dataset.datePart,o=this._dateComponentMap.get(t.name);if("valueAsDate"in e&&null!=e.value){const t=e.value,i=new ResizeObserver((()=>{e.value=void 0,e.value=t,i.unobserve(e)}));i.observe(e)}if(null!=o)switch(i){case"date":o.date=e;break;case"time":o.time=e;break;case"timeZone":o.timeZone=e}else this._dateComponentMap.set(t.name,{[i]:e});this._afterDateComponentCreateOrUpdate(e)}_afterDateComponentCreateOrUpdate(e){this._afterComponentCreateOrUpdate(e)}_afterComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e);b(t)&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"}),this._afterComponentCreateOrUpdate(e)}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),o=t||i;o&&this._afterComponentCreateOrUpdate(o)}_afterComponentCreateOrUpdate(e){const{viewModel:t}=this,i=this._getFieldInputFromHTMLElement(e),o=t.findField(this._focusedFieldName);this._attemptFocusOnNextRender&&o===i&&(this._attemptFocusOnNextRender=!1,h(i)&&(i.group.open=!0),e.setFocus())}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._focusedFieldName=i.name}_onComponentBlur(e){const t=e.target;this._focusedFieldName=null,this._saveValueFromComponent(t)}_saveValueFromDateComponent(e){const t=this._getFieldInputFromHTMLElement(e),i=t.field.type,{name:o}=t,n=this._dateComponentMap.get(o);if(!n)return;const a=this.viewModel.getValue(o);let s=null;s="date-only"===i||"time-only"===i?e.value:"timestamp-offset"===i?null!=e.value?O({dateComponent:n.date,timeComponent:n.time,timeZoneComponent:n.timeZone,oldValue:a}):null:null!=e.value?k({oldValue:a,dateComponent:n.date,timeComponent:n.time,timeZone:this.timeZone,max:t.range?.max,min:t.range?.min}):null,null!==s&&e.value?a!==s&&this._updateFieldValue(o,s):this._updateFieldValue(o,null)}_saveValueFromComponent(e){const t=this._getFieldInputFromHTMLElement(e);this._updateFieldValue(t.name,this._parseValue(e))}_onComponentKeyDown({key:e,target:t}){const i=this._getFieldInputFromHTMLElement(t);"Enter"===e&&h(i)&&!i.group.open&&(i.group.open=!0)}_updateFieldValue(e,t){if(this.viewModel.setValue(e,t),this._inputsWithChanges.add(e),this.viewModel.fieldsWithContingentValues.has(e)){const e=Object.fromEntries(Object.entries(this.getValues()).filter((([e,t])=>null!=t)));this.viewModel.validateContingencyConstraints(e)}}_parseValue(e){const t=this._getFieldInputFromHTMLElement(e),i=e.value;return v(t.element,"switch")?e.checked?t.element.input.onValue:t.element.input.offValue:null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_ignoreDeselectionOfNoValueOption(e){const{firstChild:t,selectedItems:i}=e;0===i.length&&t&&"selected"in t?t.selected=!0:S.warnOnce("Failed to override user attempt to deselect 'No value' option.")}_onGroupToggle(e,t){e.open?(t.open=!0,this._focusedFieldName=this._getFocusableInput("forward",t)?.name||null,this._attemptFocusOnNextRender=!0,"sequential"===this.groupDisplay&&this.viewModel.allGroupInputs.forEach((e=>{e!==t&&(e.open=!1)}))):t.open=!1,this.scheduleRender()}_onFormSubmit(e){e.preventDefault()}_onFormKeyDown(e){"Enter"===e.key&&this.viewModel.submit()}_afterListObserverCreated(e){this.viewModel.activeRelationshipInput&&(this._listObserverNode=e)}_afterListObserverRemoved(){this._listObserverNode=null}_onObserverChange(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode);const e=this.viewModel.activeRelationshipInput;e&&this._listObserverNode&&e.showAllEnabled&&this._listObserver.observe(this._listObserverNode)}_incrementRelatedRecordPage(){const e=this.viewModel.activeRelationshipInput;e?.incrementPage()}_syncGroupInputStates(){if("sequential"!==this.groupDisplay)return;const e=this.viewModel.allGroupInputs;if(!e.length)return;const t=e.filter((e=>e.open));0===t.length?e[0].open=!0:t.length>1&&t.slice(1).forEach((e=>e.open=!1))}};e([s()],E.prototype,"_listObserverNode",void 0),e([s()],E.prototype,"_relatedRecordsEnabled",null),e([s()],E.prototype,"disabled",null),e([s()],E.prototype,"feature",null),e([s()],E.prototype,"formTemplate",null),e([s()],E.prototype,"groupDisplay",void 0),e([s()],E.prototype,"headingLevel",void 0),e([s()],E.prototype,"label",null),e([s()],E.prototype,"layer",null),e([s()],E.prototype,"map",null),e([s(),x("esri/widgets/FeatureForm/t9n/FeatureForm")],E.prototype,"messages",void 0),e([s(),x("esri/t9n/common")],E.prototype,"messagesCommon",void 0),e([s(),x("esri/widgets/Feature/t9n/Feature")],E.prototype,"messagesFeature",void 0),e([s(),x("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],E.prototype,"messagesTemplates",void 0),e([s()],E.prototype,"relatedRecordCallbacks",null),e([s()],E.prototype,"relationshipId",null),e([s()],E.prototype,"spatialReference",null),e([s()],E.prototype,"strict",null),e([s()],E.prototype,"timeZone",null),e([s()],E.prototype,"view",null),e([s(),V(["value-change","submit"])],E.prototype,"viewModel",void 0),E=e([r(j)],E);const U=E;export{U as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/arrayUtils.js";import{deprecatedProperty as i}from"../core/deprecate.js";import o from"../core/Logger.js";import{watch as n,whenOnce as a}from"../core/reactiveUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/has.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{isIntegerField as l}from"../layers/support/fieldUtils.js";import d from"./Widget.js";import{css as p}from"./FeatureForm/css.js";import{isGroupInput as c,isFieldInput as u,isRelationshipInput as m,isInputInGroupInput as h,isFieldElementWithInputType as v,getErrorMessageForFieldInput as _,getIconForFeature as g,isNumberFieldInput as b}from"./FeatureForm/featureFormUtils.js";import f from"./FeatureForm/FeatureFormViewModel.js";import{loadCalciteComponents as C}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as y,numberingSystem as F,prepareISOFieldValueForDateComponents as R,prepareUnixFieldValueForDateComponents as w,normalizeTimeOnlyString as O,getISOFieldValueFromDateComponents as k,getUnixFieldValueFromDateComponents as I}from"./support/dateUtils.js";import{globalCss as M}from"./support/globalCss.js";import{Heading as D,incrementHeadingLevel as x}from"./support/Heading.js";import"./support/widgetUtils.js";import{messageBundle as V}from"./support/decorators/messageBundle.js";import{vmEvent as N}from"./support/decorators/vmEvent.js";import{tsx as L}from"./support/jsxFactory.js";import{substitute as T}from"../intl/substitute.js";const j="data-field-name",S="esri.widgets.FeatureForm",E=o.getLogger(S);let U=class extends d{constructor(e,t){super(e,t),this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._inputsWithChanges=new Set,this._focusedFieldName=null,this._listObserverNode=null,this._listObserver=new IntersectionObserver((e=>{e.length&&e[0].isIntersecting&&this._incrementRelatedRecordPage()}),{root:window.document}),this.groupDisplay="all",this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.messagesFeature=null,this.messagesTemplates=null,this.viewModel=new f,this._onShowAllRelatedRecordsClick=e=>{const{feature:t,relatedRecordCallbacks:i}=this;t&&i?.showAllRelatedRecords&&i.showAllRelatedRecords({parentFeature:t,relationshipId:e})},this._onAddRelatedRecordsClick=(e,t)=>{const{feature:i,relatedRecordCallbacks:o}=this;i&&o?.addRelatedRecord&&o.addRelatedRecord({parentFeature:i,relatedLayer:t,relationshipId:e})},this._onFormKeyDown=this._onFormKeyDown.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onGroupToggle=this._onGroupToggle.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentKeyDown=this._onComponentKeyDown.bind(this),this._afterComponentCreate=this._afterComponentCreate.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterDateComponentCreateOrUpdate=this._afterDateComponentCreateOrUpdate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this)}initialize(){this.addHandles([n((()=>this.feature),(()=>{a((()=>!this.viewModel.updating)).then((()=>{const e=this._getFocusableInput("forward");this._inputsWithChanges.clear(),this._dateComponentMap.clear(),this._syncGroupInputStates(),this._focusedFieldName=e?.name||null,this._attemptFocusOnNextRender=!0}))})),n((()=>this.groupDisplay),(()=>this._syncGroupInputStates())),this.on("submit",(e=>{if(e.invalid.length>0){const[t]=e.invalid;e.invalid.forEach((e=>this._inputsWithChanges.add(e))),this._focusedFieldName=t,this._attemptFocusOnNextRender=!0,this.scheduleRender()}})),n((()=>[this.viewModel.activeRelationshipInput,this._listObserverNode]),(()=>this._onObserverChange()))])}loadDependencies(){return C({block:()=>import("@esri/calcite-components/dist/components/calcite-block.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox.js"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item.js"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),input:()=>import("@esri/calcite-components/dist/components/calcite-input.js"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker.js"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message.js"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number.js"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker.js"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone.js"),label:()=>import("@esri/calcite-components/dist/components/calcite-label.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress.js"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button.js"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group.js"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch.js")})}destroy(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode)}get _relatedRecordsEnabled(){const e=this.relatedRecordCallbacks;return!(!e||!(e.addRelatedRecord||e.editRelatedRecord||e.showAllRelatedRecords))}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get feature(){return this.viewModel.feature}set feature(e){this.viewModel.feature=e}get formTemplate(){return this.viewModel.formTemplate}set formTemplate(e){this.viewModel.formTemplate=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get relatedRecordCallbacks(){return this.viewModel.relatedRecordCallbacks}set relatedRecordCallbacks(e){this.viewModel.relatedRecordCallbacks=e}get relationshipId(){return this.viewModel.relationshipId}set relationshipId(e){this.viewModel.relationshipId=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get strict(){return this.viewModel.strict}set strict(e){this.viewModel.strict=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return i(E,"view",{replacement:"Use FeatureForm.map instead.",version:"4.27"}),this.viewModel.view}set view(e){i(E,"view",{replacement:"Use FeatureForm.map instead.",version:"4.27"}),this.viewModel.view=e}getValues(){return this.viewModel.getValues()}submit(){return this.viewModel.submit()}render(){const{state:e}=this.viewModel;return L("div",{class:this.classes(p.base,M.widget,M.panel)},"ready"===e?this._renderForm():null)}_renderForm(){return L("form",{class:p.form,novalidate:!0,onkeydown:this._onFormKeyDown,onsubmit:this._onFormSubmit},this._renderHeader(),this._renderContent())}_renderHeader(){const e=this.viewModel;if(!e.formHeaderVisible)return;const t=null!=e.formTitle&&L(D,{key:"title",level:this.headingLevel},e.formTitle),i=null!=e.formDescription&&L("p",{class:p.description,key:"description"},e.formDescription);return L("div",{class:p.formHeader},t,i)}_renderContent(){const{viewModel:e}=this;return e.activeRelationshipInput?this._renderActiveRelationshipInput(e.activeRelationshipInput):e.inputs.filter(t).filter((e=>e.visible)).map(((e,t)=>c(e)?this._renderGroup(e,t):u(e)?this._renderLabeledField(e):m(e)?this._renderRelationshipInput(e):void 0))}_renderActiveRelationshipInput(e){return this._renderRelationshipInput(e)}_renderDescriptionOrEmpty(e,t){return null==e?null:L("div",{class:this.classes(p.description),id:t},e)}_renderGroup(e,t){const{disabled:i,formTemplate:o,headingLevel:n}=this,{description:a,inputs:s,label:r,open:l}=e,d=s.filter((e=>e.visible)),c=this.viewModel.findField(this._focusedFieldName),h=c?.group===e,v=`${this.id}_group_${t}`,_="sequential"===this.groupDisplay;return L("calcite-block",{class:this.classes(p.group,_?p.groupSequential:null,h?p.groupActive:null,i?p.inputDisabled:null),collapsible:!0,"data-group":e,description:a||void 0,disabled:i,heading:`${r}`,headingLevel:o?.title?x(n):n,id:v,key:v,open:l,onCalciteBlockToggle:({target:t})=>this._onGroupToggle(t,e)},d.map((e=>u(e)?this._renderLabeledField(e):m(e)?this._renderRelationshipInput(e):void 0)))}_getFocusableInput(e,t){const i=this.viewModel.allFieldInputs,o="forward"===e?i:i.slice().reverse();let n;if(!t||m(t))n=0;else if(c(t)){const e=t.inputs.find(u);n=e?o.indexOf(e):0}else{let i;if(h(t)&&!t.group.open){const o=t.group.inputs.filter(u);i="forward"===e?o[o.length-1]:o[0]}else i=t;n=o.indexOf(i)+1}for(let a=n;a<o.length;a++){const e=o[a];if(e.visible&&u(e))return e}return null}_renderLabeledField(e){const{dataType:t,feature:i,label:o,layer:n,required:a}=e,s={"aria-label":a?T(this.messages.requiredFieldLabel,{name:o}):o,class:p.label,key:`${n.id}-${i.uid}-${e.name}`},r=[L("div",{class:p.labelTextContent,key:"labelTextContainer"},o,a?L("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==t?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e)];return"date"===t&&"coded-value"!==e.domain?.type?L("label",{...s},r):L("calcite-label",{...s},r)}_renderFieldInput(e){const{dataType:t,domain:i,inputType:o,name:n,updating:a}=e,s=this.getCommonInputProps(e);if("coded-value"===i?.type){const t=this.viewModel.getFieldValueOptionsForField(n,this.messages.empty);return"switch"!==o||e.hasInvalidSwitchValue?"radio-buttons"===o?this._renderRadioButtonComponents(e,t.flat(),s):this._renderComboBoxComponent(e,t,s):this._renderSwitchComponent(e,s)}if("datetime-picker"===o||"date"===t)return this._renderDateComponents(e,s);const r="number"===t?this._renderNumberComponent(e,s):this._renderStringComponent(e,s);return a?L("div",{class:p.fieldInputWrapper,key:`${s.key}-input-updating-wrapper`},r,L("div",{class:p.fieldInputLoader},L("calcite-progress",{type:"indeterminate"}))):r}_renderStringComponent(e,t){return L("calcite-input",{...t,type:"text-area"===e.inputType?"textarea":"text",onCalciteInputInput:e=>this._saveValueFromComponent(e.target)})}_renderNumberComponent(e,t){return L("calcite-input-number",{...t,integer:l(e.field),type:"number",onCalciteInputNumberInput:e=>this._saveValueFromComponent(e.target)})}_renderDateComponents(e,t){const{field:i}=e;switch(i.type){case"date":return this._renderDateFieldCompnents(e,t);case"date-only":return this._renderDateOnlyFieldComponent(e,t);case"time-only":return this._renderTimeOnlyFieldComponent(e,t);case"timestamp-offset":return this._renderTimestampOffsetFieldComponents(e,t);default:return this._renderReadOnlyComponent(e,y(e.field,t.value,{timeZone:this.timeZone}))}}_renderDateOnlyFieldComponent(e,t){const{valid:i,value:o}=e,{class:n,max:a,min:s,key:r,readOnly:l}=t;return L("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!i,class:n,"data-date-part":"date","data-field-name":t[j],key:`${r}-date-input`,max:null!=a?`${a}`:void 0,min:null!=s?`${s}`:void 0,numberingSystem:F,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:l,value:null!=o?`${o}`:void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)})}_renderTimeOnlyFieldComponent(e,t){const{valid:i,value:o}=e,{class:n,key:a,readOnly:s}=t;return L("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!i,class:n,"data-date-part":"time","data-field-name":t[j],key:`${a}-time-input`,numberingSystem:F,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:s,step:e.timeStep,value:null!=o?`${o}`:void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)})}_renderTimestampOffsetFieldComponents(e,t){const{name:i,valid:o,value:n}=e,{class:a,key:s,readOnly:r}=t,l=null!=n?`${n}`:void 0,{dateAsString:d,time:c,timeZoneOffset:u}=R(l),m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!o,numberingSystem:F,overlayPositioning:"fixed",readOnly:r,[j]:i,onfocus:this._onComponentFocus};return L("div",{class:p.dateInputContainer,key:`${s}-date-time-container`},L("calcite-input-date-picker",{...m,class:a,"data-date-part":"date",key:`${s}-date-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:d??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)}),L("calcite-input-time-picker",{...m,class:a,"data-date-part":"time",key:`${s}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:e.timeStep,value:c??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)}),e.includeTimeOffset?L("calcite-input-time-zone",{...m,class:a,"data-date-part":"timeZone",key:`${s}-timezone-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:u??"0",onCalciteInputTimeZoneChange:e=>this._saveValueFromDateComponent(e.target)}):null)}_renderDateFieldCompnents(e,t){const{includeTime:i,name:o,valid:n,value:a}=e,{class:s,max:r,min:l,key:d,readOnly:c}=t,{timeZone:u}=this,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!n,numberingSystem:F,overlayPositioning:"fixed",readOnly:c,[j]:o,onfocus:this._onComponentFocus},{dateAsString:h,time:v}=w(a,u),_=null!=r?w(r,u):void 0,g=null!=l?w(l,u):void 0;return L("div",{class:p.dateInputContainer,key:`${d}-date-time-container`},L("calcite-input-date-picker",{...m,class:s,"data-date-part":"date",key:`${d}-date-input`,max:_?.dateAsString??void 0,min:g?.dateAsString??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:h??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)}),i?L("calcite-input-time-picker",{...m,class:s,"data-date-part":"time",key:`${d}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:1,value:v??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)}):null)}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return L("calcite-input",{...i,class:this.classes(p.fieldInput,p.inputDisabled),readOnly:!0,type:"text",value:null!=t?`${t}`:i.value})}_renderComboBoxComponent(e,t,i){const{value:o,name:n}=e,{messages:a,messagesTemplates:s,viewModel:r,_inputsWithChanges:l}=this,d=t.map((e=>e.map((({name:e,value:t})=>L("calcite-combobox-item",{key:`#${t}`,selected:o===t,textLabel:e,value:`${t}`}))))),[p,c]=d;this.viewModel.fieldsWithInvalidCodedValue.has(e)&&c.unshift(L("calcite-combobox-item",{key:"incompatible-option",readOnly:!0,textLabel:`${e.value}`,value:`${e.value}`}));const u=c.length>0?[L("calcite-combobox-item-group",{key:"recommended",label:a.recommended},p),L("calcite-combobox-item-group",{key:"other",label:s.other},c)]:p,m="INSERT"===r.arcadeEditType,h=l.has(n),v=null==o&&(!m||h);if(e.showNoValueOptionEnabled){const t="",i=e.showNoValueLabel||a.empty;u.unshift(L("calcite-combobox-item",{key:"empty-option",selected:v,textLabel:a.empty,value:t},i))}const _=m&&e.showNoValueOptionEnabled&&!h?()=>{}:i.onblur;return L("calcite-combobox",{...i,allowCustomValues:!1,clearDisabled:!0,disabled:i.readOnly,onblur:_,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({target:e})=>{v&&0===e.selectedItems.length?this._ignoreDeselectionOfNoValueOption(e):this._saveValueFromComponent(e)}},u)}_renderRadioButtonComponents(e,t,i){const{name:o,value:n}=e,a=t.map((({name:e,value:t})=>this._renderRadioButtonComponent({key:e,label:e,name:o,value:t,selected:t===n,props:i})));if(e.showNoValueOptionEnabled){const t="",s=e.showNoValueLabel||this.messages.empty,r=n===t||null===n;a.unshift(this._renderRadioButtonComponent({key:"empty-option",label:s,name:o,value:t,selected:r,props:i}))}return L("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:p.inputRadioGroup,"data-field-name":i[j],key:`${i.key}-radio-group`,layout:"vertical",name:i.key,required:i.required},a)}_renderSwitchComponent(e,t){const{value:i}=e,o=!!v(e.element,"switch")&&i===e.element.input.onValue;return L("calcite-switch",{...t,checked:o,class:p.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldName=null},onCalciteSwitchChange:e=>this._saveValueFromComponent(e.target)})}_renderRadioButtonComponent({key:e,name:t,value:i,selected:o,label:n,props:a}){return L("calcite-label",{class:p.inputRadioLabel,key:e,layout:"inline"},L("calcite-radio-button",{...a,afterCreate:void 0,afterUpdate:void 0,checked:o,class:p.inputRadio,disabled:a.readOnly,name:t,onblur:()=>{this._focusedFieldName=null},value:i,onCalciteRadioButtonChange:({target:e})=>{e.checked&&this._saveValueFromComponent(e)}}),n)}_renderAuxiliaryText(e){const t=e.name,i=this._inputsWithChanges.has(t)&&!e.valid?_(e,this.messages,this.timeZone):null!=this.viewModel.contingencyConstraintViolations.get(t)?this.messages.validationErrors.valuesIncompatible:null!=e.valueExpressionExecutor&&e.valueExpressionExecutor.stale?this.messages.valueExpressionError:null;return null!=i?L("calcite-input-message",{icon:!0,status:"invalid"},i):this._renderDescriptionOrEmpty(e.description)}_renderShowAllRelatedRecordsListItem(e){const{featureCount:t,relationshipId:i,showAllActionVisible:o}=e,{relatedRecordCallbacks:n}=this;if(!o||!n?.showAllRelatedRecords)return;const a=this.messages;return L("calcite-list-item",{description:T(a.totalCount,{count:t}),label:a.showAll,value:!0,onCalciteListItemSelect:()=>this._onShowAllRelatedRecordsClick(i)},L("calcite-icon",{icon:"list",scale:"s",slot:"content-end"}))}_renderAddRelatedRecordButton(e){const{canAddRelatedFeature:t,relationshipId:i,relatedLayer:o}=e,{messages:n,relatedRecordCallbacks:a}=this;if(t&&a?.addRelatedRecord&&o)return L("calcite-button",{alignment:"center",appearance:"outline-fill",class:p.centeredButton,disabled:e.updating||!e.originHasValidKey,iconStart:"plus",key:`${i}-add-button`,onclick:()=>this._onAddRelatedRecordsClick(i,o),round:!0,scale:"s",width:"half"},e.relatedLayerIsTable?n.addRecord:n.addFeature)}_renderRelatedRecordListItem(e,t){const{feature:i,description:o,title:n}=e,{feature:a,relatedRecordCallbacks:s}=this,{highlightHelper:r}=this.viewModel,l=()=>{r?.removeAll(),s?.editRelatedRecord&&a&&s.editRelatedRecord({parentFeature:a,relationshipId:t,relatedFeature:i})},d=r?()=>r.add(i):void 0,p=r?()=>r.remove(i):void 0;return L("calcite-list-item",{bind:this,description:o,key:`${t}-${i.uid}`,label:n,onclick:l,onmouseenter:d,onmouseleave:p,value:n},L("calcite-icon",{icon:g(i),scale:"m",slot:"content-start"}),L("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderRelationshipInput(e){if(!this._relatedRecordsEnabled||!e.editable)return;const{featureCount:t,relationshipId:i,showAllEnabled:o}=e,n=o?null:this._renderDescriptionOrEmpty(e.description),a=t>0?this._renderRelatedRecordsList(e):e.loaded?e.originHasValidKey?this._renderNoRelatedRecordsNotice():this._renderNoValidOriginKeyNotice(e):void 0;return L("calcite-label",{class:this.classes(p.label,p.relatedRecordsLabel),key:`relationship-${i}-container`},L("div",null,this._renderRelatedRecordsHeaderContainer(e),n,a),this._renderAddRelatedRecordButton(e))}_renderRelatedRecordsHeaderContainer(e){const t=e.updating||!e.loaded;return L("div",{class:p.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},L("span",null,e.label),t?L("calcite-loader",{inline:!0,key:"loader",label:this.messagesCommon?.loading,scale:"s",type:"indeterminate"}):void 0)}_renderRelatedRecordsList(e){const{relationshipId:t}=e;return L("calcite-list",{class:p.relatedRecordsList},e.relatedFeatureInfos.map((e=>this._renderRelatedRecordListItem(e,t))),this._renderShowAllRelatedRecordsListItem(e),this._renderObserverNode())}_renderNoValidOriginKeyNotice(e){const{messages:t}=this,i=e.relatedLayerIsTable?t.noOriginKeyRecord:t.noOriginKeyFeature,o=e.relationship?.keyField,n=this.viewModel.findField(o),a=e.layer?.fieldsIndex.get(o),s=n?.label||a?.alias||o,r=T(i,{relatedLayerName:e.relatedLayer?.title,originKeyField:s});return L("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},L("div",{slot:"message"},r))}_renderNoRelatedRecordsNotice(){return L("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},L("div",{slot:"message"},this.messagesFeature.noRelatedFeatures))}_renderObserverNode(){if(this.viewModel.activeRelationshipInput?.showAllEnabled)return L("div",{afterCreate:this._afterListObserverCreated,afterRemoved:this._afterListObserverRemoved,bind:this,class:p.listObserver,key:"feature-observer"})}getCommonInputProps(e){const{disabled:t}=this,{editable:i,hint:o,label:n,maxLength:a,minLength:s,name:r,range:{max:l,min:d},required:c,valid:u,value:m}=e,h=this._inputsWithChanges.has(r),v=!i||t;return{afterCreate:this._afterComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":u?"false":"true",class:this.classes(p.fieldInput,v?p.inputDisabled:null,h&&!u?p.inputInvalid:null),key:r,label:n,max:null!=l?l:void 0,min:null!=d?d:void 0,maxLength:a>-1?a:void 0,minLength:s>-1?s:void 0,placeholder:o??void 0,readOnly:v,required:c,value:null==m?"":`${m}`,onblur:this._onComponentBlur,onfocus:this._onComponentFocus,onkeydown:this._onComponentKeyDown,[j]:r}}_getFieldInputFromHTMLElement(e){return this.viewModel.findField(e.getAttribute(j))}_afterDateComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e),i=e.dataset.datePart,o=this._dateComponentMap.get(t.name);if("valueAsDate"in e&&null!=e.value){const t=e.value,i=new ResizeObserver((()=>{e.value=void 0,e.value=t,i.unobserve(e)}));i.observe(e)}if(null!=o)switch(i){case"date":o.date=e;break;case"time":o.time=e;break;case"timeZone":o.timeZone=e}else this._dateComponentMap.set(t.name,{[i]:e});this._afterDateComponentCreateOrUpdate(e)}_afterDateComponentCreateOrUpdate(e){this._afterComponentCreateOrUpdate(e)}_afterComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e);b(t)&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"}),this._afterComponentCreateOrUpdate(e)}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),o=t||i;o&&this._afterComponentCreateOrUpdate(o)}_afterComponentCreateOrUpdate(e){const{viewModel:t}=this,i=this._getFieldInputFromHTMLElement(e),o=t.findField(this._focusedFieldName);this._attemptFocusOnNextRender&&o===i&&(this._attemptFocusOnNextRender=!1,h(i)&&(i.group.open=!0),e.setFocus())}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._focusedFieldName=i.name}_onComponentBlur(e){const t=e.target;this._focusedFieldName=null,this._saveValueFromComponent(t)}_saveValueFromDateComponent(e){const t=this._getFieldInputFromHTMLElement(e),i=t.field.type,{name:o}=t,n=this._dateComponentMap.get(o);if(!n)return;let a=this.viewModel.getValue(o),s=null;"date-only"===i?s=e.value:"time-only"===i?(a=O(a),s=O(e.value)):s="timestamp-offset"===i?null!=e.value?k({dateComponent:n.date,timeComponent:n.time,timeZoneComponent:n.timeZone,oldValue:a}):null:null!=e.value?I({oldValue:a,dateComponent:n.date,timeComponent:n.time,timeZone:this.timeZone,max:t.range?.max,min:t.range?.min}):null,null!==s&&e.value?a!==s&&this._updateFieldValue(o,s):this._updateFieldValue(o,null)}_saveValueFromComponent(e){const t=this._getFieldInputFromHTMLElement(e);this._updateFieldValue(t.name,this._parseValue(e))}_onComponentKeyDown({key:e,target:t}){const i=this._getFieldInputFromHTMLElement(t);"Enter"===e&&h(i)&&!i.group.open&&(i.group.open=!0)}_updateFieldValue(e,t){if(this.viewModel.setValue(e,t),this._inputsWithChanges.add(e),this.viewModel.fieldsWithContingentValues.has(e)){const e=Object.fromEntries(Object.entries(this.getValues()).filter((([e,t])=>null!=t)));this.viewModel.validateContingencyConstraints(e)}}_parseValue(e){const t=this._getFieldInputFromHTMLElement(e),i=e.value;return v(t.element,"switch")?e.checked?t.element.input.onValue:t.element.input.offValue:null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_ignoreDeselectionOfNoValueOption(e){const{firstChild:t,selectedItems:i}=e;0===i.length&&t&&"selected"in t?t.selected=!0:E.warnOnce("Failed to override user attempt to deselect 'No value' option.")}_onGroupToggle(e,t){e.open?(t.open=!0,this._focusedFieldName=this._getFocusableInput("forward",t)?.name||null,this._attemptFocusOnNextRender=!0,"sequential"===this.groupDisplay&&this.viewModel.allGroupInputs.forEach((e=>{e!==t&&(e.open=!1)}))):t.open=!1,this.scheduleRender()}_onFormSubmit(e){e.preventDefault()}_onFormKeyDown(e){"Enter"===e.key&&this.viewModel.submit()}_afterListObserverCreated(e){this.viewModel.activeRelationshipInput&&(this._listObserverNode=e)}_afterListObserverRemoved(){this._listObserverNode=null}_onObserverChange(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode);const e=this.viewModel.activeRelationshipInput;e&&this._listObserverNode&&e.showAllEnabled&&this._listObserver.observe(this._listObserverNode)}_incrementRelatedRecordPage(){const e=this.viewModel.activeRelationshipInput;e?.incrementPage()}_syncGroupInputStates(){if("sequential"!==this.groupDisplay)return;const e=this.viewModel.allGroupInputs;if(!e.length)return;const t=e.filter((e=>e.open));0===t.length?e[0].open=!0:t.length>1&&t.slice(1).forEach((e=>e.open=!1))}};e([s()],U.prototype,"_listObserverNode",void 0),e([s()],U.prototype,"_relatedRecordsEnabled",null),e([s()],U.prototype,"disabled",null),e([s()],U.prototype,"feature",null),e([s()],U.prototype,"formTemplate",null),e([s()],U.prototype,"groupDisplay",void 0),e([s()],U.prototype,"headingLevel",void 0),e([s()],U.prototype,"label",null),e([s()],U.prototype,"layer",null),e([s()],U.prototype,"map",null),e([s(),V("esri/widgets/FeatureForm/t9n/FeatureForm")],U.prototype,"messages",void 0),e([s(),V("esri/t9n/common")],U.prototype,"messagesCommon",void 0),e([s(),V("esri/widgets/Feature/t9n/Feature")],U.prototype,"messagesFeature",void 0),e([s(),V("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],U.prototype,"messagesTemplates",void 0),e([s()],U.prototype,"relatedRecordCallbacks",null),e([s()],U.prototype,"relationshipId",null),e([s()],U.prototype,"spatialReference",null),e([s()],U.prototype,"strict",null),e([s()],U.prototype,"timeZone",null),e([s()],U.prototype,"view",null),e([s(),N(["value-change","submit"])],U.prototype,"viewModel",void 0),U=e([r(S)],U);const $=U;export{$ as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import OrientedImageryViewerViewModel = __esri.OrientedImageryViewerViewModel;
4
+ export default OrientedImageryViewerViewModel;
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import"../../intl.js";import{clamp as n}from"../../core/mathUtils.js";import{formatTimestamp as e,formatTimeOnly as t,formatDateOnly as l,formatDate as o}from"../../intl/date.js";import{utc as i}from"../../time/timeZoneUtils.js";import{DateTime as u,FixedOffsetZone as r}from"luxon";import{getLocale as m}from"../../intl/locale.js";const s=i,a={date:null,dateAsString:null,time:null,timeZoneOffset:null},f=new Map([["hours",3600],["minutes",60],["seconds",1],["deciseconds",.1],["centiseconds",.01],["milliseconds",.001]]),c="yyyy-MM-dd",d="TT";var y;!function(n){n.HM="HH:mm",n.HMS="HH:mm:ss",n.HMS_MS="HH:mm:ss.SSS"}(y||(y={}));const S=[y.HMS_MS,y.HMS,y.HM,d],p="latn",M=new Set(["date-only","time-only","timestamp-offset"]),h=n=>"valueAsDate"in n;function v(n){return{locale:m(),numberingSystem:p,zone:n??s}}function H(n){return n?.isValid?n.toMillis():null}function O(n,e){return null===n?null:u.fromMillis(n,v(e))}function Z(n){if(null==n)return a;const e=u.fromISO(n,{setZone:!0});return{date:e.toJSDate(),dateAsString:e.toFormat(c,v()),time:e.toFormat(y.HMS_MS,v()),timeZoneOffset:e.offset.toString()}}function g(n,e){if(null==n||isNaN(n))return a;const t=O(n,e);return t?{date:t.toJSDate(),dateAsString:t.toFormat(c,v(e)),time:t.toFormat(d,v(e))}:a}function w(n,i,u){if(!n||null==i)return null;switch(n.type){case"date":return o(i,u);case"date-only":return l(i,u);case"time-only":return t(i,u);case"timestamp-offset":return e(i,u);default:return null}}function x(n){const{dateComponent:e,timeComponent:t,timeZoneComponent:l,oldValue:o}=n;if(!e?.value||!t?.value)return null;const{year:m,month:s,day:a}=u.fromFormat(e.value,c),{hour:f,minute:d,second:y,millisecond:S}=V(t,i)??u.now(),p=Z(o),M=null!=l?.value?parseInt(l.value,10):null!=p.timeZoneOffset?parseInt(p.timeZoneOffset,10):(new Date).getTimezoneOffset(),h=r.instance(M),v=u.fromObject({year:m,month:s,day:a,hour:f,minute:d,second:y,millisecond:S},{zone:h});return v.isValid?v.toISO({includeOffset:!0}):null}function F(n){const{dateComponent:e,timeComponent:t,timeZone:l,max:o,min:i,oldValue:r}=n,m=V(e,l);let s=!!n.applyRange;if(!m)return null;let a=null;if(null!=t?.value){const n=V(t,l),e=Date.now(),i=null!=o&&o<e?o:e,r=u.fromMillis(i,v(l)),s=m||r,{year:f,month:c,day:d}=s,{hour:y,minute:S,second:p,millisecond:M}=n||r;a=s.set({year:f,month:c,day:d,hour:y,minute:S,second:p,millisecond:M})}else{const n=O(A({value:r??Date.now(),max:o,min:i}),l),{year:e,month:t,day:u}=m,{hour:f,minute:c,second:d,millisecond:y}=n;s=!0,a=m.set({year:e,month:t,day:u,hour:f,minute:c,second:d,millisecond:y})}if(!a.isValid)return null;const f=a.toMillis();return s?A({value:f,max:o,min:i}):f}function V(n,e){if(!n)return null;let t=null;if(h(n)){const l=n.value;if(!l||Array.isArray(l))return null;t=u.fromFormat(l,c,v(e))}else{if(!n.value)return null;S.find((l=>(t=u.fromFormat(n.value,l,v(e)),t.isValid)))}return t?.isValid?t:null}function j(n){const{max:e,min:t,value:l}=n;return!isNaN(l)&&(!(null!=e&&l>e)&&!(null!=t&&l<t))}function A(e){const{max:t,min:l,value:o}=e;return null!=t&&null!=l?n(o,l,t):null!=t&&o>t?t:null!=l&&o<l?l:o}export{y as TimeStampOffsetPattern,A as clampValueToRange,O as createDateTimeFromFieldValue,M as dateFieldsWithStringFieldValue,H as dateTimeToFieldValue,c as defaultDatePattern,d as defaultTimePattern,v as getDefaultLocaleOptions,x as getISOFieldValueFromDateComponents,w as getLabelForDateFieldValue,V as getLocalDateTimeFromComponent,F as getUnixFieldValueFromDateComponents,h as isCalciteDateComponent,p as numberingSystem,Z as prepareISOFieldValueForDateComponents,g as prepareUnixFieldValueForDateComponents,S as supportedTimeFormats,f as timeResolutionToStepMap,j as valueIsInRange};
5
+ import"../../intl.js";import n from"../../core/Error.js";import{clamp as t}from"../../core/mathUtils.js";import{formatTimestamp as e,formatTimeOnly as o,formatDateOnly as l,formatDate as i}from"../../intl/date.js";import{utc as r}from"../../time/timeZoneUtils.js";import{DateTime as u,FixedOffsetZone as a}from"luxon";import{getLocale as m}from"../../intl/locale.js";const s=r,f={date:null,dateAsString:null,time:null,timeZoneOffset:null},c=new Map([["hours",3600],["minutes",60],["seconds",1],["deciseconds",.1],["centiseconds",.01],["milliseconds",.001]]),d="yyyy-MM-dd",y="TT";var S;!function(n){n.HM="HH:mm",n.HMS="HH:mm:ss",n.HMS_MS="HH:mm:ss.SSS"}(S||(S={}));const p=[S.HMS_MS,S.HMS,S.HM,y],h="latn",v=new Set(["date-only","time-only","timestamp-offset"]),M=n=>"valueAsDate"in n;function H(n){return{locale:m(),numberingSystem:h,zone:n??s}}function O(n){return n?.isValid?n.toMillis():null}function g(n,t){return null===n?null:u.fromMillis(n,H(t))}function w(n){if(null==n)return f;const t=u.fromISO(n,{setZone:!0});return{date:t.toJSDate(),dateAsString:t.toFormat(d,H()),time:t.toFormat(S.HMS_MS,H()),timeZoneOffset:t.offset.toString()}}function j(n,t){if(null==n||isNaN(n))return f;const e=g(n,t);return e?{date:e.toJSDate(),dateAsString:e.toFormat(d,H(t)),time:e.toFormat(y,H(t))}:f}function Z(n,t,r){if(!n||null==t)return null;switch(n.type){case"date":return i(t,r);case"date-only":return l(t,r);case"time-only":return o(t,r);case"timestamp-offset":return e(t,r);default:return null}}function I(n){const{dateComponent:t,timeComponent:e,timeZoneComponent:o,oldValue:l}=n;if(!t?.value||!e?.value)return null;const{year:i,month:m,day:s}=u.fromFormat(t.value,d),{hour:f,minute:c,second:y,millisecond:S}=A(e,r)??u.now(),p=w(l),h=null!=o?.value?parseInt(o.value,10):null!=p.timeZoneOffset?parseInt(p.timeZoneOffset,10):(new Date).getTimezoneOffset(),v=a.instance(h),M=u.fromObject({year:i,month:m,day:s,hour:f,minute:c,second:y,millisecond:S},{zone:v});return M.isValid?M.toISO({includeOffset:!0}):null}function x(n){const{dateComponent:t,timeComponent:e,timeZone:o,max:l,min:i,oldValue:r}=n,a=A(t,o);let m=!!n.applyRange;if(!a)return null;let s=null;if(null!=e?.value){const n=A(e,o),t=Date.now(),i=null!=l&&l<t?l:t,r=u.fromMillis(i,H(o)),m=a||r,{year:f,month:c,day:d}=m,{hour:y,minute:S,second:p,millisecond:h}=n||r;s=m.set({year:f,month:c,day:d,hour:y,minute:S,second:p,millisecond:h})}else{const n=g(F({value:r??Date.now(),max:l,min:i}),o),{year:t,month:e,day:u}=a,{hour:f,minute:c,second:d,millisecond:y}=n;m=!0,s=a.set({year:t,month:e,day:u,hour:f,minute:c,second:d,millisecond:y})}if(!s.isValid)return null;const f=s.toMillis();return m?F({value:f,max:l,min:i}):f}function A(n,t){if(!n)return null;let e=null;if(M(n)){const o=n.value;if(!o||Array.isArray(o))return null;e=u.fromFormat(o,d,H(t))}else{if(!n.value)return null;p.find((o=>(e=u.fromFormat(n.value,o,H(t)),e.isValid)))}return e?.isValid?e:null}function D(n){const{max:t,min:e,value:o}=n;return!isNaN(o)&&(!(null!=t&&o>t)&&!(null!=e&&o<e))}function F(n){const{max:e,min:o,value:l}=n;return null!=e&&null!=o?t(l,o,e):null!=e&&l>e?e:null!=o&&l<o?o:l}function V(t){if(!t)return"";const e=t.split(".").at(0);if(!e||e.length<1)throw new n("invalid time-only field",`Cannot parse valid time-only field value from ${t}`);const o=e.split(":"),l=new Array(3);for(let n=0;n<3;n++){const t=o.at(n)??"";l[n]=t.padStart(2,"0")}return l.join(":")}function C(n,t){switch(t){case"date":return n.getTime();case"date-only":return n.toISODate();case"time-only":return V(n.toISOTime(!0,!1));case"timestamp-offset":return n.toISOString(!1);default:return null}}function T(n){return!!n&&"object"==typeof n&&"getTime"in n&&"toISOString"in n&&"timeZone"in n}export{S as TimeStampOffsetPattern,C as arcadeDateToFieldValue,F as clampValueToRange,g as createDateTimeFromFieldValue,v as dateFieldsWithStringFieldValue,O as dateTimeToFieldValue,d as defaultDatePattern,y as defaultTimePattern,H as getDefaultLocaleOptions,I as getISOFieldValueFromDateComponents,Z as getLabelForDateFieldValue,A as getLocalDateTimeFromComponent,x as getUnixFieldValueFromDateComponents,T as isArcadeDate,M as isCalciteDateComponent,V as normalizeTimeOnlyString,h as numberingSystem,w as prepareISOFieldValueForDateComponents,j as prepareUnixFieldValueForDateComponents,p as supportedTimeFormats,c as timeResolutionToStepMap,D as valueIsInRange};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9238],{19238:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Pe});var i=r(43697),s=r(51773),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423)),n=r(32400),a=r(3172),l=r(9790),u=r(2368),d=r(46791),p=r(20102),c=r(22974),y=r(92604),h=r(16453),f=r(78286),b=r(95330),m=r(42033),g=r(17452),w=r(5600),_=r(90578),v=r(71715),S=r(52011),C=r(30556),F=r(82960),I=r(90100),T=r(82971),E=r(87085),j=(r(66577),r(38171)),R=r(80442),x=r(83379),O=r(609),D=r(56569),M=r(75215),q=(r(67676),r(52421)),Z=r(59431),P=r(28694),L=r(74889),N=r(6570),G=r(38913),A=r(86973);let k=0,B=class extends(x.Z.LoadableMixin((0,O.v)(d.Z))){constructor(e){super(e),this._idToClientGraphic=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,P.p)(e,this.layer.spatialReference,r);const i=L.Z.fromJSON(r);if(!this._requiresClientGraphicMapping())return i;const s=this.layer.objectIdField;for(const e of i.features){const t=e.attributes[s],r=this._idToClientGraphic.get(t);r&&(e.geometry=r.geometry)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new p.Z("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,P.p)(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:N.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async _applyEdits(e){if(!this._connection)throw new p.Z("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let r=null;const i=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const o=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(r=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=o(t);null!=e&&i.push(e)}const n=e.updateFeatures&&this._idToClientGraphic?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(s.push(this._serializeFeature(t)),n){const e=o(t);null!=e&&n.set(e,t)}(0,Z.P)(r?r.features:null,s,this.layer.spatialReference);const{fullExtent:a,featureEditResults:l}=await this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:s,deletes:i});return this.fullExtent=a,r&&r.finish(l.uidToObjectId),this._updateClientGraphicIds(n,l),this._createEditsResult(l)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const r=[];for(const{geometry:i}of e)null==i||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateClientGraphicIds(e,t){if(this._idToClientGraphic){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGraphic(t)}for(const e of t.deleteResults)e.success&&this._idToClientGraphic.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new p.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);i||null==o.geometry||(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const s=this;return{features:r,inferredGeometryType:i,finish(e){const r=s.sourceJSON.objectIdField;for(const i in e){const o=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===o?delete n.attributes[r]:n.attributes[r]=o,s._addIdToClientGraphic(n))}}}}_addIdToClientGraphic(e){if(!this._idToClientGraphic)return;const t=this.sourceJSON.objectIdField,r=e.attributes?.[t];null!=r&&this._idToClientGraphic.set(r,e)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(k++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?G.Z.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,D.bA)("MemorySourceWorker",{strategy:(0,R.Z)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,objectIdField:i,hasM:s,hasZ:o,timeInfo:n,dateFieldsTimeZone:a}=this.layer,l="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const u=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",(e=>{y.Z.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()})));const d={features:u.features,fields:t?.map((e=>e.toJSON())),geometryType:A.P.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||o,objectIdField:i,spatialReference:l?null:r&&r.toJSON(),timeInfo:n?.toJSON()??null,dateFieldsTimeZone:a},p=await this._connection.invoke("load",d,{signal:e});for(const e of p.warnings)y.Z.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});p.featureErrors.length&&y.Z.getLogger(this.layer).warn("#load()",`Encountered ${p.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:p.featureErrors});const c=p.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(u.inferredGeometryType)&&(c.geometryType=A.P.toJSON(u.inferredGeometryType)),this.sourceJSON=c,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),u.finish(p.assignedObjectIds)}};(0,i._)([(0,q.c)({Type:j.Z,ensureType:(0,M.se)(j.Z)})],B.prototype,"itemType",void 0),(0,i._)([(0,w.Cb)()],B.prototype,"type",void 0),(0,i._)([(0,w.Cb)({constructOnly:!0})],B.prototype,"layer",void 0),(0,i._)([(0,w.Cb)({readOnly:!0})],B.prototype,"_workerGeometryType",null),(0,i._)([(0,w.Cb)()],B.prototype,"sourceJSON",void 0),B=(0,i._)([(0,S.j)("esri.layers.graphics.sources.MemorySource")],B);var J=r(54295),V=r(17287),U=r(71612),$=r(17017),Q=r(66361),W=r(69637),z=r(25113),H=r(6404),X=r(38009),Y=r(68825),K=r(16859),ee=r(92036);let te=class extends ee.Z{constructor(){super(...arguments),this.updating=!1,this.status="unknown"}};(0,i._)([(0,w.Cb)()],te.prototype,"updating",void 0),(0,i._)([(0,w.Cb)()],te.prototype,"status",void 0),te=(0,i._)([(0,S.j)("esri.layers.support.PublishingInfo")],te);const re=te,ie="esri.layers.mixins.PublishableLayer",se=Symbol(ie),oe=e=>{var t;let r=class extends e{constructor(){super(...arguments),this[t]=!0}get publishingInfo(){if(this.destroyed)return null;const e=this._get("publishingInfo");if(e)return e;const t=new re;return this._checkPublishingStatus(t),t}_checkPublishingStatus(e){let t=0;const r=async s=>{let o;e.updating=!0;try{o=await this.fetchPublishingStatus()}catch(e){o="unavailable"}"published"!==o&&"unavailable"!==o||("publishing"===e.status&&this.refresh(),i.remove()),e.status=o,e.updating=!1,i.removed||(t=setTimeout(r,s,s+125))},i={removed:!1,remove(){this.removed=!0,clearTimeout(t)}};this.when().catch((()=>i.remove())),r(250),this.addHandles(i)}};return t=se,(0,i._)([(0,w.Cb)({readOnly:!0,clonable:!1})],r.prototype,"publishingInfo",null),r=(0,i._)([(0,S.j)(ie)],r),r};var ne=r(34760),ae=r(72965),le=r(28294),ue=r(66677),de=r(21506),pe=r(45574),ce=r(70082),ye=r(16451),he=r(53518),fe=r(35671),be=r(54306),me=r(30707),ge=r(54275),we=r(76259),_e=r(60199),ve=r(10158),Se=r(40555),Ce=r(14165),Fe=r(28141),Ie=r(32163),Te=r(12259),Ee=r(65242);const je="FeatureLayer",Re="esri.layers.FeatureLayer",xe=y.Z.getLogger(Re);function Oe(e,t){return new p.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function De(e){return e&&e instanceof d.Z}const Me=(0,he.v)();function qe(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let Ze=class extends((0,z.B)((0,H.M)((0,W.b)(oe((0,Q.o1)((0,U.h)((0,Y.c)((0,le.n)((0,ae.M)((0,ne.Q)((0,V.Y)((0,X.q)((0,K.I)((0,h.R)((0,$.N)((0,J.V)((0,u.J)(E.Z)))))))))))))))))){constructor(...e){super(...e),this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=T.Z.WGS84,this.subtypeCode=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=(0,b.Ds)((async(e,t,i)=>{const{save:s,saveAs:o}=await r.e(2664).then(r.bind(r,32664));switch(e){case Te.x.SAVE:return s(this,t);case Te.x.SAVE_AS:return o(this,i,t)}}))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(b.r9).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new p.Z("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,pe.nU)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,(0,ge.h)(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return(0,pe.sX)(this)}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&(0,f.RB)(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return(0,pe.rk)(t.layerDefinition||t)}readObjectIdField(e,t){return(0,pe.kZ)(t.layerDefinition||t)}get parsedUrl(){const e=(0,g.mN)(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=(0,g.v_)(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=(0,g.v_)(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,fe.YN)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=(0,o.a)(i,t,r)??void 0;return e||xe.error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return(0,pe.Ob)(t,r)}set source(e){const t=this._get("source");t!==e&&(De(t)&&this._resetMemorySource(t),De(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof d.Z?new B({layer:this,items:e}):e:null}readSource(e,t){const r=L.Z.fromJSON(t.featureSet);return new B({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r?.creatorField,s=r?.editorField;return e=e?.map((e=>ce.Z.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,s),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition?.title;if(r){const e=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,ue.a7)(this.url,r):r;let t=r;if(!t&&this.url){const e=(0,ue.Qc)(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),(0,ue.ld)(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r?.creatorField,s=r?.editorField;return e?.map((e=>(e=ye.Z.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,s),e)))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){return(0,pe.JD)(this,e,t,je)}async updateAttachment(e,t,r){return(0,pe.Y5)(this,e,t,r,je)}async applyEdits(e,t){return(0,pe.Jj)(this,e,t)}async uploadAssets(e,t){return(0,pe.uj)(this,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,Ie.eZ)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,b.Hl)(Promise.all([r.e(4599),r.e(9735),r.e(9379)]).then(r.bind(r,49379)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,pe.rP)(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=(0,m._)(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){return(0,pe.FV)(this,e,t,je)}async fetchRecomputedExtents(e){return(0,pe.Ci)(this,e,je)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,t){return(0,pe.SU)(this,e,t,je)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Ce.Z.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r;return i}async queryObjectIds(e,t){return(0,pe.tD)(this,e,t,je)}async queryFeatureCount(e,t){return(0,pe.VG)(this,e,t,je)}async queryExtent(e,t){return(0,pe.KE)(this,e,t,je)}async queryRelatedFeatures(e,t){return(0,pe.kp)(this,e,t,je)}async queryRelatedFeaturesCount(e,t){return(0,pe.C9)(this,e,t,je)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(je,"Layer source does not support queryTopFeatures capability");const s=await r.queryTopFeatures(Fe.Z.from(e),t);if(s?.features)for(const e of s.features)e.layer=e.sourceLayer=this;return s}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new p.Z(je,"Layer source does not support queryTopObjectIds capability");return r.queryTopObjectIds(Fe.Z.from(e),t)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(je,"Layer source does not support queryTopExtents capability");return r.queryTopExtents(Fe.Z.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(je,"Layer source does not support queryFeatureCount capability");return r.queryTopCount(Fe.Z.from(e),t)}read(e,t){const r=e.featureCollection;if(r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:s}=t;if(this.dynamicDataSource)return s?.push(Oe(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if(("web-map"===r||"web-scene"===r)&&"tables"!==i)return s?.push(Oe(this,`a table source can only be written to tables, not ${i}`)),null;if(this._hasMemorySource())return s?.push(Oe(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&("web-map"===r||"web-scene"===r)&&"tables"===i)return s?.push(Oe(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new p.Z(je,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,_e.D)(this,e))}async save(e){return this._debouncedSaveOperations(Te.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Te.x.SAVE_AS,t,e)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,f.RB)("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstLayerId(e){return(0,a.Z)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,fe.YN)(this.renderer,this.fieldsIndex),(0,fe.UF)(this.timeInfo,this.fieldsIndex),(0,Se.y)(this,{origin:"service"})}async hasDataChanged(){return(0,pe.gG)(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const r=e.prototype?.attributes;r&&t&&delete r[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new p.Z("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new p.Z("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this.addHandles([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}};(0,i._)([(0,v.r)("service","capabilities")],Ze.prototype,"readCapabilities",null),(0,i._)([(0,w.Cb)({json:{origins:{"web-scene":{write:!1}},write:!0}})],Ze.prototype,"charts",void 0),(0,i._)([(0,w.Cb)({readOnly:!0})],Ze.prototype,"createQueryVersion",null),(0,i._)([(0,w.Cb)({json:{read:{source:"layerDefinition.copyrightText"}}})],Ze.prototype,"copyright",void 0),(0,i._)([(0,w.Cb)({json:{read:{source:"layerDefinition.displayField"}}})],Ze.prototype,"displayField",void 0),(0,i._)([(0,w.Cb)({types:l.LB,readOnly:!0})],Ze.prototype,"defaultSymbol",void 0),(0,i._)([(0,w.Cb)({type:ve.n})],Ze.prototype,"dynamicDataSource",void 0),(0,i._)([(0,w.Cb)({type:Boolean})],Ze.prototype,"editingEnabled",null),(0,i._)([(0,v.r)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Ze.prototype,"readEditingEnabled",null),(0,i._)([(0,v.r)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Ze.prototype,"readEditingEnabledFromWebMap",null),(0,i._)([(0,C.c)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Ze.prototype,"writeEditingEnabled",null),(0,i._)([(0,C.c)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Ze.prototype,"writeEditingEnabledToWebMap",null),(0,i._)([(0,w.Cb)({readOnly:!0})],Ze.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,w.Cb)({...Me.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:qe}}}}})],Ze.prototype,"fields",void 0),(0,i._)([(0,w.Cb)(Me.fieldsIndex)],Ze.prototype,"fieldsIndex",void 0),(0,i._)([(0,w.Cb)({type:I.Z,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Ze.prototype,"formTemplate",void 0),(0,i._)([(0,w.Cb)({json:{read:{source:"layerDefinition.extent"}}})],Ze.prototype,"fullExtent",void 0),(0,i._)([(0,w.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:qe,writer(e,t,r){const i=e?pe.Fr.toJSON(e):null;i&&(0,f.RB)(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:pe.Fr.read}}})],Ze.prototype,"geometryType",void 0),(0,i._)([(0,w.Cb)({json:{read:{source:"layerDefinition.hasM"}}})],Ze.prototype,"hasM",void 0),(0,i._)([(0,w.Cb)({json:{read:{source:"layerDefinition.hasZ"}}})],Ze.prototype,"hasZ",void 0),(0,i._)([(0,w.Cb)(de.id)],Ze.prototype,"id",void 0),(0,i._)([(0,w.Cb)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ze.prototype,"infoFor3D",void 0),(0,i._)([(0,w.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Ze.prototype,"isTable",void 0),(0,i._)([(0,v.r)("service","isTable",["type","geometryType"]),(0,v.r)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Ze.prototype,"readIsTable",null),(0,i._)([(0,C.c)("web-map","isTable")],Ze.prototype,"writeIsTable",null),(0,i._)([(0,w.Cb)(de.iR)],Ze.prototype,"labelsVisible",void 0),(0,i._)([(0,w.Cb)({type:[be.Z],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:me.r,write:!1},"web-scene":{name:"layerDefinition.drawingInfo.labelingInfo",read:me.r,write:{enabled:!0,layerContainerTypes:F.C}}},name:"layerDefinition.drawingInfo.labelingInfo",read:me.r,write:!0}})],Ze.prototype,"labelingInfo",void 0),(0,i._)([(0,w.Cb)((()=>{const e=(0,c.d9)(de.bT);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){(0,f.RB)(r,(0,Ee.a)(e),t)}}},e})())],Ze.prototype,"opacity",void 0),(0,i._)([(0,w.Cb)(de.rn)],Ze.prototype,"legendEnabled",void 0),(0,i._)([(0,w.Cb)({type:["show","hide"],json:(()=>{const e=(0,c.d9)(de.rT.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Ze.prototype,"listMode",void 0),(0,i._)([(0,v.r)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Ze.prototype,"readGlobalIdField",null),(0,i._)([(0,w.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:qe}}}}})],Ze.prototype,"objectIdField",void 0),(0,i._)([(0,v.r)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Ze.prototype,"readObjectIdField",null),(0,i._)([(0,w.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Ze.prototype,"operationalLayerType",void 0),(0,i._)([(0,w.Cb)(Me.outFields)],Ze.prototype,"outFields",void 0),(0,i._)([(0,w.Cb)({readOnly:!0})],Ze.prototype,"parsedUrl",null),(0,i._)([(0,w.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ze.prototype,"path",void 0),(0,i._)([(0,w.Cb)(de.C_)],Ze.prototype,"popupEnabled",void 0),(0,i._)([(0,w.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],Ze.prototype,"popupTemplate",void 0),(0,i._)([(0,w.Cb)({readOnly:!0})],Ze.prototype,"defaultPopupTemplate",null),(0,i._)([(0,w.Cb)({types:n.A,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:F.C,overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}})],Ze.prototype,"renderer",null),(0,i._)([(0,v.r)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,v.r)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Ze.prototype,"readRenderer",null),(0,i._)([(0,w.Cb)((()=>{const e=(0,c.d9)(de.YI);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Ze.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,w.Cb)({clonable:!1})],Ze.prototype,"source",null),(0,i._)([(0,_.p)("source")],Ze.prototype,"castSource",null),(0,i._)([(0,v.r)("portal-item","source",["featureSet"]),(0,v.r)("web-map","source",["featureSet"])],Ze.prototype,"readSource",null),(0,i._)([(0,w.Cb)({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Ze.prototype,"spatialReference",void 0),(0,i._)([(0,w.Cb)({type:Number})],Ze.prototype,"subtypeCode",void 0),(0,i._)([(0,w.Cb)({type:[ce.Z]})],Ze.prototype,"templates",void 0),(0,i._)([(0,v.r)("templates",["editFieldsInfo","creatorField","editorField","templates"])],Ze.prototype,"readTemplates",null),(0,i._)([(0,w.Cb)({type:we.Z})],Ze.prototype,"timeInfo",void 0),(0,i._)([(0,w.Cb)()],Ze.prototype,"title",void 0),(0,i._)([(0,v.r)("service","title",["name"]),(0,v.r)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Ze.prototype,"readTitle",null),(0,i._)([(0,v.r)("web-map","title",["layerDefinition.name","title"])],Ze.prototype,"readTitleFromWebMap",null),(0,i._)([(0,w.Cb)({type:String})],Ze.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,w.Cb)({json:{read:!1}})],Ze.prototype,"type",void 0),(0,i._)([(0,w.Cb)({type:String})],Ze.prototype,"typeIdField",void 0),(0,i._)([(0,v.r)("service","typeIdField"),(0,v.r)("typeIdField",["layerDefinition.typeIdField"])],Ze.prototype,"readTypeIdField",null),(0,i._)([(0,w.Cb)({type:[ye.Z]})],Ze.prototype,"types",void 0),(0,i._)([(0,v.r)("service","types",["types"]),(0,v.r)("types",["layerDefinition.types"])],Ze.prototype,"readTypes",null),(0,i._)([(0,w.Cb)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Ze.prototype,"visible",void 0),(0,i._)([(0,v.r)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Ze.prototype,"readVisible",null),Ze=(0,i._)([(0,S.j)(Re)],Ze);const Pe=Ze},69637:(e,t,r)=>{r.d(t,{b:()=>E});var i,s=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(20102),l=r(96674),u=r(78286),d=r(72746),p=r(66577),c=r(92835),y=r(35454),h=r(22974),f=r(14165);const b=new y.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),m=new y.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let g=i=class extends l.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:s,objectIds:o,units:n,distance:a}=this;return new f.Z({geometry:(0,h.d9)(r),objectIds:(0,h.d9)(o),spatialRelationship:i,timeExtent:(0,h.d9)(s),where:t,units:n,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:s,objectIds:o,units:n,distance:a}=this;return new i({geometry:(0,h.d9)(t),objectIds:(0,h.d9)(o),spatialRelationship:r,timeExtent:(0,h.d9)(s),where:e,units:n,distance:a})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],g.prototype,"where",void 0),(0,s._)([(0,o.Cb)({types:p.qM,json:{write:!0}})],g.prototype,"geometry",void 0),(0,s._)([(0,o.Cb)({type:b.apiValues,json:{name:"spatialRel",read:{reader:b.read},write:{allowNull:!1,writer:b.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],g.prototype,"spatialRelationship",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"distance",void 0),(0,s._)([(0,o.Cb)({type:[Number],json:{write:!0}})],g.prototype,"objectIds",void 0),(0,s._)([(0,o.Cb)({type:m.apiValues,json:{read:m.read,write:{writer:m.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"units",void 0),(0,s._)([(0,o.Cb)({type:c.Z,json:{write:!0}})],g.prototype,"timeExtent",void 0),g=i=(0,s._)([(0,n.j)("esri.layers.support.FeatureFilter")],g);const w=g;var _;const v={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},C={name:"showExcludedLabels",default:!0};let F=_=class extends l.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new _({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,s._)([(0,o.Cb)({type:w,json:{write:{allowNull:!0,writer(e,t,r,i){const s=e?.write({},i);s&&0!==Object.keys(s).length?(0,u.RB)(r,s,t):(0,u.RB)(r,null,t)}}}})],F.prototype,"filter",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":v,"portal-item":v}}})],F.prototype,"includedEffect",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],F.prototype,"excludedEffect",void 0),(0,s._)([(0,o.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":C,"portal-item":C}}})],F.prototype,"excludedLabelsVisible",void 0),F=_=(0,s._)([(0,n.j)("esri.layers.support.FeatureEffect")],F);const I=F,T={write:{allowNull:!0}},E=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,s._)([(0,o.Cb)({type:I,json:{origins:{"web-map":T,"portal-item":T}}})],t.prototype,"featureEffect",void 0),t=(0,s._)([(0,n.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>f});var i,s=r(43697),o=r(78286),n=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(35454),u=r(96674);const d=new l.X({asc:"ascending",desc:"descending"});let p=i=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"valueExpression",void 0),(0,s._)([(0,n.Cb)({type:d.apiValues,json:{read:d.read,write:d.write}})],p.prototype,"order",void 0),p=i=(0,s._)([(0,a.j)("esri.layers.support.OrderByInfo")],p);const c=p;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new c;return s.read(i,r),[s]}function h(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,o.RB)(r,[s.toJSON()],t)}const f=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:h}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},40555:(e,t,r)=>{r.d(t,{y:()=>n});var i=r(66643),s=r(95330),o=r(20941);async function n(e,t,r){const n=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(n&&"unique-value"===n.type&&n.styleOrigin){const a=await(0,i.q6)(n.populateFromStyle());if((0,s.k_)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new o.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},59431:(e,t,r)=>{r.d(t,{P:()=>n});var i=r(67900),s=r(8744);function o(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function n(e,t,r){if(!e&&!t||!r)return;const s=(0,i._R)(r);a(e,r,s),a(t,r,s)}function a(e,t,r){if(e)for(const i of e)l(i.geometry,t,r)}function l(e,t,r){if(!e?.spatialReference||(0,s.fS)(e.spatialReference,t))return;const n=(0,i._R)(e.spatialReference)/r;if(1!==n)if("x"in e)null!=e.z&&(e.z*=n);else if("rings"in e)o(e,e.rings,n);else if("paths"in e)o(e,e.paths,n);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=n)}},28141:(e,t,r)=>{r.d(t,{Z:()=>S});var i,s=r(43697),o=r(66577),n=r(92835),a=r(35454),l=r(96674),u=r(22974),d=r(5600),p=r(75215),c=r(52011),y=r(30556),h=r(33955);r(67676),r(80442);let f=i=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],f.prototype,"groupByFields",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],f.prototype,"topCount",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),f=i=(0,s._)([(0,c.j)("esri.rest.support.TopFilter")],f);const b=f;var m,g=r(82971);const w=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),_=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let v=m=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new m((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],v.prototype,"cacheHint",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],v.prototype,"distance",void 0),(0,s._)([(0,d.Cb)({types:o.qM,json:{read:h.im,write:!0}})],v.prototype,"geometry",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],v.prototype,"geometryPrecision",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],v.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],v.prototype,"num",void 0),(0,s._)([(0,d.Cb)({json:{write:!0}})],v.prototype,"objectIds",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],v.prototype,"orderByFields",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],v.prototype,"outFields",void 0),(0,s._)([(0,d.Cb)({type:g.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],v.prototype,"outSpatialReference",void 0),(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],v.prototype,"resultType",void 0),(0,s._)([(0,d.Cb)({json:{write:!0}})],v.prototype,"returnGeometry",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"returnM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"returnZ",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],v.prototype,"start",void 0),(0,s._)([(0,y.c)("start"),(0,y.c)("num")],v.prototype,"writeStart",null),(0,s._)([(0,d.Cb)({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],v.prototype,"spatialRelationship",void 0),(0,s._)([(0,d.Cb)({type:n.Z,json:{write:!0}})],v.prototype,"timeExtent",void 0),(0,s._)([(0,d.Cb)({type:b,json:{write:!0}})],v.prototype,"topFilter",void 0),(0,s._)([(0,d.Cb)({type:String,json:{read:_.read,write:{writer:_.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],v.prototype,"units",void 0),(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],v.prototype,"where",void 0),v=m=(0,s._)([(0,c.j)("esri.rest.support.TopFeaturesQuery")],v),v.from=(0,p.se)(v);const S=v}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8758],{48758:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>v});var a=n(48853),i=n(28228),r=n(33586),s=n(27535),l=n(15274),o=n(28924),u=n(67651),f=n(12384),c=n(61363),d=n(26520),m=n(70409),y=n(84328),h=n(85065),p=n(63991),w=n(75148),g=n(17805),F=n(3823),I=n(90658),D=n(36515),E=n(24240),T=n(95330),C=n(8968),b=n(19238),N=n(1231),x=n(48522);async function S(e,t,n){const a=e.getVariables();if(a.length>0){const i=[];for(let e=0;e<a.length;e++){const r={name:a[e]};i.push(await t.evaluateIdentifier(n,r))}const r={};for(let e=0;e<a.length;e++)r[a[e]]=i[e];return e.parameters=r,e}return e}function A(e,t,n=null){for(const n in e)if(n.toLowerCase()===t.toLowerCase())return e[n];return n}function H(e){if(null===e)return null;const t={type:A(e,"type",""),name:A(e,"name","")};if("range"===t.type)t.range=A(e,"range",[]);else{t.codedValues=[];for(const n of A(e,"codedValues",[]))t.codedValues.push({name:A(n,"name",""),code:A(n,"code",null)})}return t}function L(e){if(null===e)return null;const t={},n=A(e,"wkt",null);null!==n&&(t.wkt=n);const a=A(e,"wkid",null);return null!==a&&(t.wkid=a),t}function Z(e){if(null===e)return null;const t={hasZ:A(e,"hasz",!1),hasM:A(e,"hasm",!1)},n=A(e,"spatialreference",null);n&&(t.spatialReference=L(n));const a=A(e,"x",null);if(null!==a)return t.x=a,t.y=A(e,"y",null),t;const i=A(e,"rings",null);if(null!==i)return t.rings=i,t;const r=A(e,"paths",null);if(null!==r)return t.paths=r,t;const s=A(e,"points",null);if(null!==s)return t.points=s,t;for(const n of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const a=A(e,n,null);null!==a&&(t[n]=a)}return t}function $(e){return"utc"===e?.toLowerCase()?"UTC":"unknown"===e?.toLowerCase()?"Unknown":e}function v(e){"async"===e.mode&&(e.functions.timezone=function(t,n){return e.standardFunctionAsync(t,n,(async(e,i,l)=>{if((0,c.E)(l,1,2,t,n),(0,c.n)(l[0]))return"Unknown";if((0,c.m)(l[0]))return"Unknown";if((0,c.u)(l[0])){if(await l[0].load(),1===l.length||null===l[1])return l[0].datesInUnknownTimezone?$("unknown"):$(l[0].dateFieldsTimeZone);if(!(l[1]instanceof r.Z)||!1===l[1].hasField("type"))throw new s.aV(t,s.rH.InvalidParameter,n);const e=l[1].field("type");if(!1===(0,c.c)(e))throw new s.aV(t,s.rH.InvalidParameter,n);switch((0,c.j)(e).toLowerCase()){case"preferredtimezone":return $(l[0].preferredTimeZone);case"editfieldsinfo":return $(l[0].editFieldsInfo?.timeZone??null);case"timeinfo":return $(l[0].timeInfo?.timeZone??null);case"field":if(l[1].hasField("fieldname")&&(0,c.c)(l[1].field("fieldname")))return $(l[0].fieldTimeZone((0,c.j)(l[1].field("fieldname"))))}throw new s.aV(t,s.rH.InvalidParameter,n)}const o=(0,c.l)(l[0],(0,c.L)(t));if(null===o)return null;const u=o.timeZone;return"system"===u?a.iG.systemTimeZoneCanonicalName:"utc"===u.toLowerCase()?"UTC":"unknown"===u.toLowerCase()?"Unknown":u}))},e.functions.sqltimestamp=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{(0,c.E)(i,1,3,t,n);const r=i[0];if((0,c.k)(r)){if(1===i.length)return r.toSQLWithKeyword();if(2===i.length)return r.changeTimeZone((0,c.j)(i[1])).toSQLWithKeyword();throw new s.aV(t,s.rH.InvalidParameter,n)}if((0,c.m)(r))return r.toSQLWithKeyword();if((0,c.u)(r)){if(3!==i.length)throw new s.aV(t,s.rH.InvalidParameter,n);await r.load();const e=(0,c.j)(i[1]);if((0,c.m)(i[2]))return i[2].toSQLWithKeyword();if(!1===(0,c.k)(i[2]))throw new s.aV(t,s.rH.InvalidParameter,n);const a=r.fieldTimeZone(e);return null===a?i[2].toSQLWithKeyword():i[2].changeTimeZone(a).toSQLWithKeyword()}throw new s.aV(t,s.rH.InvalidParameter,n)}))},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(t,n){return e.standardFunctionAsync(t,n,((e,a,i)=>{if((0,c.E)(i,2,4,t,n),i[0]instanceof o.Z){const e=(0,c.j)(i[1]);let a=(0,c.H)(i[2],null);const r=(0,c.h)((0,c.H)(i[3],!0));if(null===a&&(a=["*"]),!1===(0,c.o)(a))throw new s.aV(t,s.rH.InvalidParameter,n);return i[0].featureSetById(e,r,a)}throw new s.aV(t,s.rH.InvalidParameter,n)}))},e.signatures.push({name:"featuresetbyid",min:2,max:4}),e.functions.getfeatureset=function(t,n){return e.standardFunctionAsync(t,n,((e,a,i)=>{if((0,c.E)(i,1,2,t,n),(0,c.r)(i[0])){let e=(0,c.H)(i[1],"datasource");return null===e&&(e="datasource"),e=(0,c.j)(e).toLowerCase(),(0,u.convertToFeatureSet)(i[0].fullSchema(),e,t.lrucache,t.interceptor,t.spatialReference)}throw new s.aV(t,s.rH.InvalidParameter,n)}))},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(t,n){return e.standardFunctionAsync(t,n,((e,a,r)=>{if((0,c.E)(r,2,5,t,n),null===r[0])throw new s.aV(t,s.rH.PortalRequired,n);if(r[0]instanceof i.Z){const e=(0,c.j)(r[1]),a=(0,c.j)(r[2]);let i=(0,c.H)(r[3],null);const l=(0,c.h)((0,c.H)(r[4],!0));if(null===i&&(i=["*"]),!1===(0,c.o)(i))throw new s.aV(t,s.rH.InvalidParameter,n);let o=null;return o=t.services?.portal?t.services.portal:x.Z.getDefault(),o=(0,d._)(r[0],o),(0,u.constructFeatureSetFromPortalItem)(e,a,t.spatialReference,i,l,o,t.lrucache,t.interceptor)}if(!1===(0,c.c)(r[0]))throw new s.aV(t,s.rH.PortalRequired,n);const l=(0,c.j)(r[0]),o=(0,c.j)(r[1]);let f=(0,c.H)(r[2],null);const m=(0,c.h)((0,c.H)(r[3],!0));if(null===f&&(f=["*"]),!1===(0,c.o)(f))throw new s.aV(t,s.rH.InvalidParameter,n);return(0,u.constructFeatureSetFromPortalItem)(l,o,t.spatialReference,f,m,t.services?.portal??x.Z.getDefault(),t.lrucache,t.interceptor)}))},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(t,n){return e.standardFunctionAsync(t,n,((e,a,i)=>{if((0,c.E)(i,2,4,t,n),i[0]instanceof o.Z){const e=(0,c.j)(i[1]);let a=(0,c.H)(i[2],null);const r=(0,c.h)((0,c.H)(i[3],!0));if(null===a&&(a=["*"]),!1===(0,c.o)(a))throw new s.aV(t,s.rH.InvalidParameter,n);return i[0].featureSetByName(e,r,a)}throw new s.aV(t,s.rH.InvalidParameter,n)}))},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(t,n){return e.standardFunction(t,n,((e,a,i)=>{(0,c.E)(i,1,1,t,n);let l=i[0];const o={layerDefinition:{geometryType:"",objectIdField:"",hasM:!1,hasZ:!1,globalIdField:"",typeIdField:"",fields:[]},featureSet:{geometryType:"",features:[]}};if((0,c.c)(l))l=JSON.parse(l),void 0!==l.layerDefinition?(o.layerDefinition=l.layerDefinition,o.featureSet=l.featureSet,l.layerDefinition.spatialReference&&(o.layerDefinition.spatialReference=l.layerDefinition.spatialReference)):(o.featureSet.features=l.features,o.featureSet.geometryType=l.geometryType,o.layerDefinition.geometryType=o.featureSet.geometryType,o.layerDefinition.objectIdField=l.objectIdFieldName??"",o.layerDefinition.typeIdField=l.typeIdFieldName,o.layerDefinition.globalIdField=l.globalIdFieldName,o.layerDefinition.fields=l.fields,l.spatialReference&&(o.layerDefinition.spatialReference=l.spatialReference));else{if(!(i[0]instanceof r.Z))throw new s.aV(t,s.rH.InvalidParameter,n);{l=JSON.parse(i[0].castToText(!0));const e=A(l,"layerdefinition");if(null!==e){o.layerDefinition.geometryType=A(e,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.globalIdField=A(e,"globalidfield",""),o.layerDefinition.objectIdField=A(e,"objectidfield",""),o.layerDefinition.typeIdField=A(e,"typeidfield",""),o.layerDefinition.hasZ=!0===A(e,"hasz",!1),o.layerDefinition.hasM=!0===A(e,"hasm",!1);const t=A(e,"spatialreference",null);t&&(o.layerDefinition.spatialReference=L(t));for(const t of A(e,"fields",[])){const e={name:A(t,"name",""),alias:A(t,"alias",""),type:A(t,"type",""),nullable:A(t,"nullable",!0),editable:A(t,"editable",!0),length:A(t,"length",null),domain:H(A(t,"domain"))};o.layerDefinition.fields.push(e)}const n=A(l,"featureset",null);if(n){const e={};for(const t of o.layerDefinition.fields)e[t.name.toLowerCase()]=t.name;for(const t of A(n,"features",[])){const n={},a=A(t,"attributes",{});for(const t in a)n[e[t.toLowerCase()]]=a[t];o.featureSet.features.push({attributes:n,geometry:Z(A(t,"geometry",null))})}}}else{o.layerDefinition.hasZ=!0===A(l,"hasz",!1),o.layerDefinition.hasM=!0===A(l,"hasm",!1),o.layerDefinition.geometryType=A(l,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.objectIdField=A(l,"objectidfieldname",""),o.layerDefinition.typeIdField=A(l,"typeidfieldname","");const e=A(l,"spatialreference",null);e&&(o.layerDefinition.spatialReference=L(e));let t=A(l,"fields",null);if((0,c.o)(t))for(const e of t){const t={name:A(e,"name",""),alias:A(e,"alias",""),type:A(e,"type",""),nullable:A(e,"nullable",!0),editable:A(e,"editable",!0),length:A(e,"length",null),domain:H(A(e,"domain"))};o.layerDefinition.fields.push(t)}else t=null,o.layerDefinition.fields=t;const n={};for(const e of o.layerDefinition.fields)n[e.name.toLowerCase()]=e.name;let a=A(l,"features",null);if((0,c.o)(a))for(const e of a){const t={},a=A(e,"attributes",{});for(const e in a)t[n[e.toLowerCase()]]=a[e];o.featureSet.features.push({attributes:t,geometry:Z(A(e,"geometry",null))})}else a=null,o.featureSet.features=a}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e,t){for(const t of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(t===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,c.o)(e.layerDefinition.fields)&&!1!==(0,c.o)(e.featureSet.features)}(o))throw new s.aV(t,s.rH.InvalidParameter,n);return""===(o?.layerDefinition?.geometryType||"")&&(o.layerDefinition.geometryType="esriGeometryNull"),g.Z.create(o,t.spatialReference)}))},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(t,n){return e.standardFunctionAsync(t,n,(async(a,i,r)=>{if((0,c.E)(r,2,2,t,n),(0,c.o)(r[0])||(0,c.q)(r[0])){const e=[];let a=r[0];a instanceof f.Z&&(a=a.toArray());let i=null;if(!(0,c.i)(r[1]))throw new s.aV(t,s.rH.InvalidParameter,n);i=r[1].createFunction(t);for(const t of a){const n=i(t);(0,T.y8)(n)?!0===await n&&e.push(t):!0===n&&e.push(t)}return e}if((0,c.u)(r[0])){const n=await r[0].load(),a=C.WhereClause.create(r[1],n.getFieldsIndex(),n.dateFieldsTimeZoneDefaultUTC),i=a.getVariables();if(i.length>0){const n=[];for(let a=0;a<i.length;a++){const r={name:i[a]};n.push(await e.evaluateIdentifier(t,r))}const s={};for(let e=0;e<i.length;e++)s[i[e]]=n[e];return a.parameters=s,new y.Z({parentfeatureset:r[0],whereclause:a})}return new y.Z({parentfeatureset:r[0],whereclause:a})}throw new s.aV(t,s.rH.InvalidParameter,n)}))},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{if((0,c.E)(i,2,2,t,n),(0,c.u)(i[0])){const e=new F.Z(i[1]);return new h.Z({parentfeatureset:i[0],orderbyclause:e})}throw new s.aV(t,s.rH.InvalidParameter,n)}))},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{if((0,c.E)(i,2,2,t,n),(0,c.u)(i[0]))return new p.Z({parentfeatureset:i[0],topnum:i[1]});if((0,c.o)(i[0]))return(0,c.g)(i[1])>=i[0].length?i[0].slice(0):i[0].slice(0,(0,c.g)(i[1]));if((0,c.q)(i[0]))return(0,c.g)(i[1])>=i[0].length()?i[0].slice(0):i[0].slice(0,(0,c.g)(i[1]));throw new s.aV(t,s.rH.InvalidParameter,n)}))},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{if((0,c.E)(i,1,1,t,n),(0,c.u)(i[0])){const n=await i[0].first(e.abortSignal);if(null!==n){const e=l.Z.createFromGraphicLikeObject(n.geometry,n.attributes,i[0],t.timeZone);return e._underlyingGraphic=n,e}return n}return(0,c.o)(i[0])?0===i[0].length?null:i[0][0]:(0,c.q)(i[0])?0===i[0].length()?null:i[0].get(0):null}))},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{(0,c.E)(i,1,2,t,n);const l={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(i.length>1)if(i[1]instanceof r.Z){if(i[1].hasField("minsize")&&(l.minsize=(0,c.g)(i[1].field("minsize"))),i[1].hasField("metadata")&&(l.returnMetadata=(0,c.h)(i[1].field("metadata"))),i[1].hasField("maxsize")&&(l.maxsize=(0,c.g)(i[1].field("maxsize"))),i[1].hasField("types")){const e=(0,c.a2)(i[1].field("types"),!1);e.length>0&&(l.types=e)}}else if(null!==i[1])throw new s.aV(t,s.rH.InvalidParameter,n);if((0,c.r)(i[0])){let e=i[0]._layer;return e instanceof b.default&&(e=(0,u.constructFeatureSet)(e,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===e||!1===(0,c.u)(e)?[]:(await e.load(),e.queryAttachments(i[0].field(e.objectIdField),l.minsize,l.maxsize,l.types,l.returnMetadata))}if(null===i[0])return[];throw new s.aV(t,s.rH.InvalidParameter,n)}))},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{(0,c.E)(i,2,4,t,n);const r=i[0],l=(0,c.j)(i[1]);let o=(0,c.H)(i[2],null);const f=(0,c.h)((0,c.H)(i[3],!0));if(null===o&&(o=["*"]),!1===(0,c.o)(o))throw new s.aV(t,s.rH.InvalidParameter,n);if(null===i[0])return null;if(!(0,c.r)(i[0]))throw new s.aV(t,s.rH.InvalidParameter,n);let d=r._layer;if(d instanceof b.default&&(d=(0,u.constructFeatureSet)(d,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===d)return null;if(!1===(0,c.u)(d))return null;d=await d.load();const m=d.relationshipMetaData().filter((e=>e.name===l));if(0===m.length)return null;if(void 0!==m[0].relationshipTableId&&null!==m[0].relationshipTableId&&m[0].relationshipTableId>-1)return(0,u.constructFeatureSetFromRelationship)(d,m[0],r.field(d.objectIdField),d.spatialReference,o,f,t.lrucache,t.interceptor);let y=d.serviceUrl();if(!y)return null;y="/"===y.charAt(y.length-1)?y+m[0].relatedTableId.toString():y+"/"+m[0].relatedTableId.toString();const h=await(0,u.constructFeatureSetFromUrl)(y,d.spatialReference,o,f,t.lrucache,t.interceptor);await h.load();let p=h.relationshipMetaData();if(p=p.filter((e=>e.id===m[0].id)),!1===r.hasField(m[0].keyField)||null===r.field(m[0].keyField)){const e=await d.getFeatureByObjectId(r.field(d.objectIdField),[m[0].keyField]);if(e){const t=C.WhereClause.create(p[0].keyField+"= @id",h.getFieldsIndex(),h.dateFieldsTimeZoneDefaultUTC);return t.parameters={id:e.attributes[m[0].keyField]},h.filter(t)}return new w.Z({parentfeatureset:h})}const g=C.WhereClause.create(p[0].keyField+"= @id",h.getFieldsIndex(),h.dateFieldsTimeZoneDefaultUTC);return g.parameters={id:r.field(m[0].keyField)},h.filter(g)}))},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{(0,c.E)(i,2,3,t,n);const r=i[0],l=(0,c.j)((0,c.H)(i[1],"")).toLowerCase(),o=(0,c.c)(i[2])?(0,c.j)(i[2]):null;if(null===i[0])return null;if(!(0,c.r)(i[0]))throw new s.aV(t,s.rH.InvalidParameter,n);let f=r._layer;if(f instanceof b.default&&(f=(0,u.constructFeatureSet)(f,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===f)return null;if(!1===(0,c.u)(f))return null;await f.load();const d=f.serviceUrl(),y=await(0,u.constructAssociationMetaDataFeatureSetFromUrl)(d,t.spatialReference);let h=null,p=null,w=!1;if(null!==o&&""!==o&&void 0!==o){for(const e of y.terminals)e.terminalName===o&&(p=e.terminalId);null===p&&(w=!0)}const g=y.associations.getFieldsIndex(),F=g.get("TOGLOBALID").name,D=g.get("FROMGLOBALID").name,E=g.get("TOTERMINALID").name,T=g.get("FROMTERMINALID").name,x=g.get("FROMNETWORKSOURCEID").name,S=g.get("TONETWORKSOURCEID").name,A=g.get("ASSOCIATIONTYPE").name,H=g.get("ISCONTENTVISIBLE").name,L=g.get("OBJECTID").name;for(const e of f.fields)if("global-id"===e.type){h=r.field(e.name);break}let Z=null,$=new m.yN(new N.Z({name:"percentalong",alias:"percentalong",type:"double"}),C.WhereClause.create("0",y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC)),v=new m.yN(new N.Z({name:"side",alias:"side",type:"string"}),C.WhereClause.create("''",y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC));const P="globalid",V="globalId",R={};for(const e in y.lkp)R[e]=y.lkp[e].sourceId;const W=new m.TO(new N.Z({name:"classname",alias:"classname",type:"string"}),null,R);let k="";switch(l){case"midspan":{k=`((${F}='${h}') OR ( ${D}='${h}')) AND (${A} IN (5))`,W.codefield=C.WhereClause.create(`CASE WHEN (${F}='${h}') THEN ${x} ELSE ${S} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC);const e=(0,I.JW)(m.Xx.findField(y.associations.fields,D));e.name=P,e.alias=P,Z=new m.yN(e,C.WhereClause.create(`CASE WHEN (${D}='${h}') THEN ${F} ELSE ${D} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC)),$=y.unVersion>=4?new m.$X(m.Xx.findField(y.associations.fields,g.get("PERCENTALONG").name)):new m.yN(new N.Z({name:"percentalong",alias:"percentalong",type:"double"}),C.WhereClause.create("0",y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC));break}case"junctionedge":{k=`((${F}='${h}') OR ( ${D}='${h}')) AND (${A} IN (4,6))`,W.codefield=C.WhereClause.create(`CASE WHEN (${F}='${h}') THEN ${x} ELSE ${S} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC);const e=(0,I.JW)(m.Xx.findField(y.associations.fields,D));e.name=P,e.alias=P,Z=new m.yN(e,C.WhereClause.create(`CASE WHEN (${D}='${h}') THEN ${F} ELSE ${D} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC)),v=new m.yN(new N.Z({name:"side",alias:"side",type:"string"}),C.WhereClause.create(`CASE WHEN (${A}=4) THEN 'from' ELSE 'to' END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC));break}case"connected":{let e=`${F}='@T'`,t=`${D}='@T'`;null!==p&&(e+=` AND ${E}=@A`,t+=` AND ${T}=@A`),k="(("+e+") OR ("+t+"))",k=(0,c.S)(k,"@T",h??""),e=(0,c.S)(e,"@T",h??""),null!==p&&(e=(0,c.S)(e,"@A",p.toString()),k=(0,c.S)(k,"@A",p.toString())),W.codefield=C.WhereClause.create("CASE WHEN "+e+` THEN ${x} ELSE ${S} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC);const n=(0,I.JW)(m.Xx.findField(y.associations.fields,D));n.name=P,n.alias=P,Z=new m.yN(n,C.WhereClause.create("CASE WHEN "+e+` THEN ${D} ELSE ${F} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC));break}case"container":k=`${F}='${h}' AND ${A} = 2`,null!==p&&(k+=` AND ${E} = `+p.toString()),W.codefield=x,k="( "+k+" )",Z=new m.QP(m.Xx.findField(y.associations.fields,D),P,P);break;case"content":k=`(${D}='${h}' AND ${A} = 2)`,null!==p&&(k+=` AND ${T} = `+p.toString()),W.codefield=S,k="( "+k+" )",Z=new m.QP(m.Xx.findField(y.associations.fields,F),P,P);break;case"structure":k=`(${F}='${h}' AND ${A} = 3)`,null!==p&&(k+=` AND ${E} = `+p.toString()),W.codefield=x,k="( "+k+" )",Z=new m.QP(m.Xx.findField(y.associations.fields,D),P,V);break;case"attached":k=`(${D}='${h}' AND ${A} = 3)`,null!==p&&(k+=` AND ${T} = `+p.toString()),W.codefield=S,k="( "+k+" )",Z=new m.QP(m.Xx.findField(y.associations.fields,F),P,V);break;default:throw new s.aV(t,s.rH.InvalidParameter,n)}return w&&(k="1 <> 1"),new m.Xx({parentfeatureset:y.associations,adaptedFields:[new m.$X(m.Xx.findField(y.associations.fields,L)),new m.$X(m.Xx.findField(y.associations.fields,H)),Z,v,W,$],extraFilter:k?C.WhereClause.create(k,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC):null})}))},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(t,n){return e.standardFunctionAsync(t,n,(async(a,i,l)=>{if((0,c.E)(l,3,3,t,n),!(0,c.u)(l[0]))throw new s.aV(t,s.rH.InvalidParameter,n);const o=await l[0].load(),u=[],f=[];let d=!1,m=[];if((0,c.c)(l[1]))m.push(l[1]);else if(l[1]instanceof r.Z)m.push(l[1]);else if((0,c.o)(l[1]))m=l[1];else{if(!(0,c.q)(l[1]))throw new s.aV(t,s.rH.InvalidParameter,n);m=l[1].toArray()}for(const e of m)if((0,c.c)(e)){const t=C.WhereClause.create((0,c.j)(e),o.getFieldsIndex(),o.dateFieldsTimeZoneDefaultUTC),n=!0===(0,D.y5)(t)?(0,c.j)(e):"%%%%FIELDNAME";u.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(d=!0)}else{if(!(e instanceof r.Z))throw new s.aV(t,s.rH.InvalidParameter,n);{const a=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",i=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===a&&(d=!0),!a)throw new s.aV(t,s.rH.InvalidParameter,n);u.push({name:a,expression:C.WhereClause.create(i||a,o.getFieldsIndex(),o.dateFieldsTimeZoneDefaultUTC)})}}if(m=[],(0,c.c)(l[2]))m.push(l[2]);else if((0,c.o)(l[2]))m=l[2];else if((0,c.q)(l[2]))m=l[2].toArray();else{if(!(l[2]instanceof r.Z))throw new s.aV(t,s.rH.InvalidParameter,n);m.push(l[2])}for(const e of m){if(!(e instanceof r.Z))throw new s.aV(t,s.rH.InvalidParameter,n);{const a=e.hasField("name")?e.field("name"):"",i=e.hasField("statistic")?e.field("statistic"):"",r=e.hasField("expression")?e.field("expression"):"";if(!a||!i||!r)throw new s.aV(t,s.rH.InvalidParameter,n);f.push({name:a,statistic:i.toLowerCase(),expression:C.WhereClause.create(r,o.getFieldsIndex(),o.dateFieldsTimeZoneDefaultUTC)})}}if(d){const e={};for(const t of o.fields)e[t.name.toLowerCase()]=1;for(const t of u)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);for(const t of f)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of u)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of u)await S(n.expression,e,t);for(const n of f)await S(n.expression,e,t);return l[0].groupby(u,f)}))},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(t,n){return e.standardFunctionAsync(t,n,(async(a,i,l)=>{if((0,c.u)(l[0])){(0,c.E)(l,2,2,t,n);const a=await l[0].load(),i=[];let o=[];if((0,c.c)(l[1]))o.push(l[1]);else if(l[1]instanceof r.Z)o.push(l[1]);else if((0,c.o)(l[1]))o=l[1];else{if(!(0,c.q)(l[1]))throw new s.aV(t,s.rH.InvalidParameter,n);o=l[1].toArray()}let u=!1;for(const e of o)if((0,c.c)(e)){const t=C.WhereClause.create((0,c.j)(e),a.getFieldsIndex(),a.dateFieldsTimeZoneDefaultUTC),n=!0===(0,D.y5)(t)?(0,c.j)(e):"%%%%FIELDNAME";i.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(u=!0)}else{if(!(e instanceof r.Z))throw new s.aV(t,s.rH.InvalidParameter,n);{const r=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",l=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===r&&(u=!0),!r)throw new s.aV(t,s.rH.InvalidParameter,n);i.push({name:r,expression:C.WhereClause.create(l||r,a.getFieldsIndex(),a.dateFieldsTimeZoneDefaultUTC)})}}if(u){const e={};for(const t of a.fields)e[t.name.toLowerCase()]=1;for(const t of i)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of i)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of i)await S(n.expression,e,t);return l[0].groupby(i,[])}return function(e,t,n,a){if(1===a.length){if((0,c.o)(a[0]))return(0,E.t)(e,a[0],-1);if((0,c.q)(a[0]))return(0,E.t)(e,a[0].toArray(),-1)}return(0,E.t)(e,a,-1)}("distinct",0,0,l)}))}),e.functions.getfeaturesetinfo=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{if((0,c.E)(i,1,1,t,n),!(0,c.u)(i[0]))return null;const s=await i[0].getFeatureSetInfo();return s?r.Z.convertObjectToArcadeDictionary({layerId:s.layerId,layerName:s.layerName,itemId:s.itemId,serviceLayerUrl:s.serviceLayerUrl,webMapLayerId:s.webMapLayerId??null,webMapLayerTitle:s.webMapLayerTitle??null,className:null,objectClassId:null},(0,c.L)(t),!1,!1):null}))},e.signatures.push({name:"getfeaturesetinfo",min:1,max:1})}},26520:(e,t,n)=>{n.d(t,{_:()=>i});var a=n(48522);function i(e,t){return null===e?t:new a.Z({url:e.field("url")})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[178,5732,447,7701],{5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>o});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},22862:(e,t,r)=>{r.d(t,{Hg:()=>f,V7:()=>y,uD:()=>c});var i=r(92036),o=r(46791),n=r(1153);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.Z}function l(e){return e instanceof o.Z?Object.keys(e.items):a(e)?(0,n.vw)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof o.Z?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),o=l(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=o.filter((e=>!i.includes(e))),c=i.filter((e=>!o.includes(e))),y=i.filter((r=>o.includes(r)&&p(e,r)!==p(t,r))).concat(n,c).sort(),f=u(e);if(f&&s.has(f)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h;const m=a(e)&&a(t);for(const i of y){const o=p(e,i),n=p(t,i);let s;if((m||"function"!=typeof o&&"function"!=typeof n)&&o!==n&&(null!=o||null!=n)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(o,n);else if(o instanceof Date&&n instanceof Date){if(o.getTime()===n.getTime())continue;s={type:"complete",oldValue:o,newValue:n}}else s="object"==typeof o&&"object"==typeof n&&u(o)===u(n)?d(o,n):{type:"complete",oldValue:o,newValue:n};null!=s&&(null!=h?h.diff[i]=s:h={type:"partial",diff:{[i]:s}})}}return h}function c(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}function y(e,t){for(const r of t)if(c(e,r))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},60437:(e,t,r)=>{r.d(t,{G_:()=>v,HH:()=>s,JR:()=>f,TC:()=>a,Tn:()=>d,Ue:()=>o,al:()=>n,bZ:()=>h,cS:()=>y,dp:()=>p,fS:()=>g,is:()=>m,op:()=>u,pp:()=>l,t8:()=>c});var i=r(6570);function o(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,i,n,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=s,a}function s(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?c(e,v):o(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,r,i,o){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];o()},44958:(e,t,r)=>{r.r(t),r.d(t,{default:()=>z});var i=r(43697),o=r(20102),n=r(35454),s=r(5600),a=r(90578),l=r(52011),p=r(19238),u=r(2368),d=r(96674),c=(r(75215),r(67676),r(80442),r(92036));const y=[2155,2194,2204,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2314,2867,2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2964,2965,2966,2967,2968,2992,2994,3080,3089,3091,3102,3359,3359,3361,3363,3365,3366,3404,3407,3417,3418,3419,3420,3421,3422,3423,3424,3425,3426,3427,3428,3429,3430,3431,3432,3433,3434,3435,3436,3437,3438,3441,3442,3443,3444,3445,3446,3451,3452,3453,3454,3455,3456,3457,3458,3459,3479,3481,3483,3485,3487,3490,3492,3494,3496,3498,3500,3502,3504,3506,3508,3510,3512,3515,3517,3519,3521,3523,3525,3527,3529,3531,3533,3535,3537,3539,3541,3543,3545,3547,3549,3551,3553,3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3582,3584,3586,3588,3590,3593,3598,3600,3605,3608,3610,3612,3614,3616,3618,3620,3622,3624,3626,3628,3630,3632,3634,3636,3640,3642,3644,3646,3648,3650,3652,3654,3656,3658,3660,3662,3664,3668,3670,3672,3674,3676,3677,3679,3680,3682,3683,3686,3688,3690,3692,3696,3698,3700,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,3739,3753,3754,3755,3756,3757,3758,3759,3760,3991,3992,4217,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4438,4439,4455,4456,4457,5466,5588,5589,5623,5624,5625,5646,5654,5655,6128,6129,6141,6200,6201,6202,6391,6405,6407,6409,6411,6413,6416,6418,6420,6422,6424,6426,6428,6430,6432,6434,6436,6438,6441,6443,6445,6447,6449,6451,6453,6455,6457,6459,6461,6463,6465,6467,6469,6471,6473,6475,6477,6479,6484,6486,6488,6490,6492,6494,6496,6499,6501,6503,6505,6507,6510,6515,6517,6519,6521,6523,6525,6527,6529,6531,6533,6535,6537,6539,6541,6543,6545,6547,6549,6551,6553,6555,6557,6559,6561,6563,6565,6568,6570,6572,6574,6576,6578,6582,6584,6586,6588,6590,6593,6595,6597,6599,6601,6603,6605,6607,6609,6612,6614,6616,6618,6625,6626,6627,6633,6785,6787,6789,6791,6793,6795,6797,6799,6801,6803,6805,6807,6809,6811,6813,6815,6817,6819,6821,6823,6825,6827,6829,6831,6833,6835,6837,6839,6841,6843,6845,6847,6849,6851,6853,6855,6857,6859,6861,6863,6868,6880,6885,6887,6923,6925,6966,6997,7057,7058,7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7119,7120,7121,7122,7123,7124,7125,7126,7127,7128,7132,7258,7260,7262,7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,7300,7302,7304,7306,7308,7310,7312,7314,7316,7318,7320,7322,7324,7326,7328,7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,7368,7370,7558,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,24100,26729,26730,26731,26732,26733,26734,26735,26736,26737,26738,26739,26740,26741,26742,26743,26744,26745,26746,26747,26748,26749,26750,26751,26752,26753,26754,26755,26756,26757,26758,26759,26760,26766,26767,26768,26769,26770,26771,26772,26773,26774,26775,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26786,26787,26791,26792,26793,26794,26795,26796,26797,26798,26799,26801,26802,26803,26811,26812,26813,26814,26815,26819,26820,26821,26822,26825,26826,26830,26831,26832,26833,26836,26837,26841,26842,26843,26844,26847,26848,26849,26850,26851,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26862,26863,26864,26865,26866,26867,26868,26869,26870,32001,32002,32003,32005,32006,32007,32008,32009,32010,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32033,32034,32035,32036,32037,32038,32039,32040,32041,32042,32043,32044,32045,32046,32047,32048,32049,32050,32051,32052,32053,32054,32055,32056,32057,32058,32064,32065,32066,32067,32074,32075,32076,32077,32099,32164,32165,32166,32167,32664,32665,32666,32667,65061,102120,102121,102629,102630,102631,102632,102633,102634,102635,102636,102637,102638,102639,102640,102641,102642,102643,102644,102645,102646,102648,102649,102650,102651,102652,102653,102654,102655,102656,102657,102658,102659,102660,102661,102662,102663,102664,102665,102666,102667,102668,102669,102670,102671,102672,102673,102674,102675,102676,102677,102678,102679,102680,102681,102682,102683,102684,102685,102686,102687,102688,102689,102690,102691,102692,102693,102694,102695,102696,102697,102698,102700,102704,102707,102708,102709,102710,102711,102712,102713,102714,102715,102716,102717,102718,102719,102720,102721,102722,102723,102724,102725,102726,102727,102728,102729,102730,102733,102734,102735,102736,102737,102738,102739,102740,102741,102742,102743,102744,102745,102746,102747,102748,102749,102750,102751,102752,102753,102754,102755,102756,102757,102758,102761,102766],f=[5614,5702,6130,6131,6132,6358,6359,6360],h=[115700,4326];function m(e){return y.includes(e)?"feet":"meters"}function g(e,t){return"number"==typeof e?f.includes(e)?"feet":"meters":m(t)}function v(e,t){return h.includes(e)||4326===t?"ellipsoidal":"gravity-related-height"}let b=class extends c.Z{get isAdvanced(){return!1}getInfo(){const{horizontalWKID:e,verticalWKID:t}=this;let r=e,i=t;const o=this;if(4===o.type){const{properties:e}=o;r=4326,i=e.verticalWKID}return{heightModel:v(r,i),heightUnit:g(i,r),horizontalUnit:m(r)}}};(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"x",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"y",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"z",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"type",void 0),b=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientation")],b);const w=b;let C=class extends((0,u.J)((0,d.eC)(w))){constructor(){super(...arguments),this.type=1}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,heading:s,pitch:a,roll:l,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,f=[e,t,r,i,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>f.push(e))),f.push(u),d?.forEach((e=>f.push(e))),c?.forEach((e=>f.push(e))),y?.forEach((e=>f.push(e)))),f.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,i._)([(0,s.Cb)({json:{write:!0}})],C.prototype,"type",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"heading",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"pitch",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"roll",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"x",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"y",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"z",void 0),C=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientationHPR")],C);const _=C;let S=class extends((0,u.J)((0,d.eC)(w))){constructor(){super(...arguments),this.type=2}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,omega:s,phi:a,kappa:l,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,f=[e,t,r,i,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>f.push(e))),f.push(u),d?.forEach((e=>f.push(e))),c?.forEach((e=>f.push(e))),y?.forEach((e=>f.push(e)))),f.map((e=>isNaN(e)?"":e)).join("|")}};(0,i._)([(0,s.Cb)({json:{write:!0}})],S.prototype,"type",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"omega",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"phi",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"kappa",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"x",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"y",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"z",void 0),S=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientationOPK")],S);const j=S;let T=class extends((0,u.J)((0,d.eC)(w))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,yaw:s,pitch:a,roll:l,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,f=[e,t,r,i,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>f.push(e))),f.push(u),d?.forEach((e=>f.push(e))),d?.forEach((e=>f.push(e))),c?.forEach((e=>f.push(e))),y?.forEach((e=>f.push(e)))),f.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,i._)([(0,s.Cb)({json:{write:!0}})],T.prototype,"type",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"yaw",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"pitch",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"roll",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"x",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"y",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"z",void 0),T=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientationYPR")],T);const F=T;r(96187);let x=class extends d.wq{constructor(){super(...arguments),this.url=null}};(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],x.prototype,"lod",void 0),(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],x.prototype,"rasterFunction",void 0),(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],x.prototype,"url",void 0),x=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],x);let N=class extends d.wq{};var P;(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],N.prototype,"constantElevation",void 0),N=(0,i._)([(0,l.j)("esri.layers.orientedImagery.cor.ElevationSourceDefinitions.ConstantElevation")],N),function(e){e[e.HPR=1]="HPR",e[e.OPK=2]="OPK",e[e.YPR=3]="YPR",e[e.LTP=4]="LTP"}(P||(P={}));const D=new n.X({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),I=new n.X({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique","":null}),O=new Map;O.set(`${P.OPK}`,{desc:"Using Omega Phi Kappa",constructor:j}),O.set(`${P.HPR}`,{desc:"Using Heading, Pitch and Roll",constructor:_}),O.set(`${P.YPR}`,{desc:"Using Yaw, Pitch and Roll",constructor:F});const R=new Map;function A(e,t,r){return{name:`orientedImageryProperties.${e}`,write:!t||{target:`orientedImageryProperties.${e}`,writer:t},origins:{service:{name:`orientedImageryInfo.orientedImageryProperties.${e}`,write:t,read:r}}}}R.set(`${P.HPR}`,(function(e){const[t,r,i,o,n,s,a,l,p,u,d,c,y,f,h,m,g,v,b,w,C,_,S]=e;return{type:t,horizontalWKID:r,verticalWKID:i,x:o,y:n,z:s,heading:a,pitch:l,roll:p,affineTransformations:[u,d,c,y,f,h],focalLength:m,principalOffsetPoint:[g,v],radialDistortionCoefficients:[b,w,C],tangentialDistortionCoefficients:[_,S]}})),R.set(`${P.YPR}`,(function(e){const[t,r,i,o,n,s,a,l,p,u,d,c,y,f,h,m,g,v,b,w,C,_,S]=e;return{type:t,horizontalWKID:r,verticalWKID:i,x:o,y:n,z:s,yaw:a,pitch:l,roll:p,affineTransformations:[u,d,c,y,f,h],focalLength:m,principalOffsetPoint:[g,v],radialDistortionCoefficients:[b,w,C],tangentialDistortionCoefficients:[_,S]}})),R.set(`${P.OPK}`,(function(e){const[t,r,i,o,n,s,a,l,p,u,d,c,y,f,h,m,g,v,b,w,C,_,S]=e;return{type:t,horizontalWKID:r,verticalWKID:i,x:o,y:n,z:s,omega:a,phi:l,kappa:p,affineTransformations:[u,d,c,y,f,h],focalLength:m,principalOffsetPoint:[g,v],radialDistortionCoefficients:[b,w,C],tangentialDistortionCoefficients:[_,S]}})),R.set(`${P.LTP}`,(function(e){const[t,r,i,o,n,s,...a]=e,l=R.get(s);return l?{type:t,latitude:r,longitude:i,ellipsoidRadius:o,squaredEccentricity:n,properties:l([s,"",...a])}:null}));let M=class extends p.default{constructor(){super(...arguments),this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.type="oriented-imagery",this.timeIntervalUnit=null,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.videoPathPrefix=null,this.videoPathSuffix=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:r}=this;return function(e,t,r){return e?"constantElevation"in e?new N(e):function(e,t,r){let{url:i}=e;return i?(i=function(e,t,r){return t&&(e=`${t}${e}`),r&&(e+=`${r}`),e}(i,t,r),new x({...e,url:i})):null}(e,t,r):e}(e,t,r)}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new o.Z("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};(0,i._)([(0,s.Cb)({type:Number,json:A("cameraHeading")})],M.prototype,"cameraHeading",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("cameraHeight")})],M.prototype,"cameraHeight",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("cameraPitch")})],M.prototype,"cameraPitch",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("cameraRoll")})],M.prototype,"cameraRoll",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("coveragePercent")})],M.prototype,"coveragePercent",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("demPathPrefix")})],M.prototype,"demPathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("demPathSuffix")})],M.prototype,"demPathSuffix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("depthImagePathPrefix")})],M.prototype,"depthImagePathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("depthImagePathSuffix")})],M.prototype,"depthImagePathSuffix",void 0),(0,i._)([(0,s.Cb)({type:Object,json:A("elevationSource")})],M.prototype,"elevationSource",void 0),(0,i._)([(0,s.Cb)()],M.prototype,"effectiveElevationSource",null),(0,i._)([(0,s.Cb)({type:Number,json:A("farDistance")})],M.prototype,"farDistance",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],M.prototype,"geometryType",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("horizontalFieldOfView")})],M.prototype,"horizontalFieldOfView",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("horizontalMeasurementUnit")})],M.prototype,"horizontalMeasurementUnit",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("imagePathPrefix")})],M.prototype,"imagePathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("imagePathSuffix")})],M.prototype,"imagePathSuffix",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("imageRotation")})],M.prototype,"imageRotation",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("maximumDistance")})],M.prototype,"maximumDistance",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("nearDistance")})],M.prototype,"nearDistance",void 0),(0,i._)([(0,s.Cb)({type:["OrientedImageryLayer"]})],M.prototype,"operationalLayerType",void 0),(0,i._)([(0,s.Cb)({json:A("orientationAccuracy",((e,t)=>{e&&(t.orientationAccuracy=e.join(","))}))}),(0,a.p)((e=>e?e.trim().split(",").map(Number):null))],M.prototype,"orientationAccuracy",void 0),(0,i._)([(0,s.Cb)({json:{...A("orientedImageryType",I.write,I.read),type:I.apiValues}})],M.prototype,"orientedImageryType",void 0),(0,i._)([(0,s.Cb)({json:{read:!1},value:"oriented-imagery",readOnly:!0})],M.prototype,"type",void 0),(0,i._)([(0,s.Cb)({json:{...A("timeIntervalUnit",D.write,D.read),type:D.apiValues}})],M.prototype,"timeIntervalUnit",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("verticalFieldOfView")})],M.prototype,"verticalFieldOfView",void 0),(0,i._)([(0,s.Cb)({json:{...A("verticalMeasurementUnit"),type:new n.X({Feet:"feet",Meter:"meter"}).apiValues}})],M.prototype,"verticalMeasurementUnit",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("videoPathPrefix")})],M.prototype,"videoPathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("videoPathSuffix")})],M.prototype,"videoPathSuffix",void 0),M=(0,i._)([(0,l.j)("esri.layers.OrientedImageryLayer")],M);const z=M},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,o.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),o=r(92604),n=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,o.Z.getLogger(this)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,s.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,o.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,n.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>b});var i=r(43697),o=r(92604),n=r(95330),s=r(5600),a=r(90578),l=(r(67676),r(80442),r(52011)),p=r(82960),u=r(46791),d=(r(66643),r(20102),r(26258),r(87538));const c=new u.Z,y=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let m=0,g=0;function v(){const e=Date.now();let t=!1;for(const r of c){const i=r.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const r of c){const i=r.deref();i&&(t=h(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(v,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{o.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,i._)([(0,s.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),o=r(2368),n=r(35454),s=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const p=new n.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.J)(s.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,a.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const d=u},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),o=r(2368),n=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),p=r(30556),u=r(72729),d=r(70082);let c=class extends((0,o.J)(n.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,a.r)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,p.c)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,s.Cb)({type:[d.Z],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,l.j)("esri.layers.support.FeatureType")],c);const y=c},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var i,o=r(43697),n=r(35454),s=r(96674),a=r(5600),l=r(75215),p=(r(67676),r(80442),r(36030)),u=r(71715),d=r(52011),c=r(72729),y=r(86719);const f=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=i=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,o._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,u.r)("description")],h.prototype,"readDescription",null),(0,o._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],h.prototype,"domain",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,o._)([(0,a.Cb)({type:l.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,o._)([(0,p.J)(y.v)],h.prototype,"type",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"valueType",void 0),(0,o._)([(0,u.r)("valueType",["description"])],h.prototype,"readValueType",null),(0,o._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=i=(0,o._)([(0,d.j)("esri.layers.support.Field")],h);const m=h},99514:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(20102),o=r(96674),n=r(92604),s=r(35671),a=r(25031);class l{static fromJSON(e){return new l(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new l(e.fields??[],c(e))}static fromLayerJSON(e){return new l(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=u(t);if(t&&i){const o=p(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(i,e),r.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,s.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,s.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,s.Dl)(e)||(0,s.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,s.Dl)(e)||(0,s.Se)(e)||e.nullable||void 0!==(0,s.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(p(e))??this._normalizedFieldsMap.get(u(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.Z.getLogger("esri.layers.support.FieldsIndex").error(new i.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),a.pt):d.has(t.type)?a._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,s.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function p(e){return e.trim().toLowerCase()}function u(e){return(0,s.q6)(e)?.toLowerCase()??""}const d=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:o}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,a.Jv)(e.dateFieldsTimeReference):null,u=o?function(e){return"timeZone"in e}(o)?o.timeZone??l:o.dateFieldsTimeReference?(0,a.Jv)(o.dateFieldsTimeReference):l??a.pt:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,a.Jv)(i.timeReference):l:null,y=new Map([[p(o?.creationDateField??""),u],[p(o?.editDateField??""),u],[p(n),c],[p(s),c]]);for(const{name:i,type:o}of e.fields)if(d.has(o))t.set(i,a._4);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(i,null);else if(r)t.set(i,a._4);else{const e=y.get(p(i??""))??l;t.set(i,e)}return t}},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var i,o=r(43697),n=r(46791),s=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));let p=i=class extends s.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=i=(0,o._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},72729:(e,t,r)=>{r.d(t,{im:()=>j,V5:()=>S}),r(80442);var i,o=r(43697),n=r(22974),s=r(5600),a=(r(75215),r(36030)),l=r(52011),p=r(96674);r(67676);let u=i=class extends p.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,o._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=i=(0,o._)([(0,l.j)("esri.layers.support.CodedValue")],u);const d=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends p.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.J)(d)],c.prototype,"type",void 0),c=(0,o._)([(0,l.j)("esri.layers.support.Domain")],c);const y=c;var f;let h=f=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,s.Cb)({type:[u],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,o._)([(0,a.J)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=f=(0,o._)([(0,l.j)("esri.layers.support.CodedValueDomain")],h);const m=h;var g;r(92604),r(20102);let v=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,o._)([(0,a.J)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,o._)([(0,l.j)("esri.layers.support.InheritedDomain")],v);const b=v;var w;let C=w=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,s.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],C.prototype,"maxValue",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],C.prototype,"minValue",void 0),(0,o._)([(0,a.J)({range:"range"})],C.prototype,"type",void 0),C=w=(0,o._)([(0,l.j)("esri.layers.support.RangeDomain")],C);const _=C,S={key:"type",base:y,typeMap:{range:C,"coded-value":m,inherited:b}};function j(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>i});const i=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},54275:(e,t,r)=>{r.d(t,{h:()=>d});var i=r(80442),o=r(66677);function n(e,t,r){return!!a(e,t,r)}function s(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:c(e),attachment:y(e),data:f(e),metadata:h(e),operations:m(e.capabilities,e,t),query:g(e,t),queryRelated:v(e),queryTopFeatures:b(e),editing:w(e)}}function c(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:n(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function f(e){return{isVersioned:n(e,"isDataVersioned",!1),supportsAttachment:n(e,"hasAttachments",!1),supportsM:n(e,"hasM",!1),supportsZ:n(e,"hasZ",!1)}}function h(e){return{supportsAdvancedFieldProperties:n(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const i=e?e.toLowerCase().split(",").map((e=>e.trim())):[],s=r?(0,o.Qc)(r):null,a=i.includes(null!=s&&"MapServer"===s.serverType?"data":"query"),l=i.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&i.includes("create"),u=l&&i.includes("delete"),d=l&&i.includes("update");const c=i.includes("changetracking"),y=t.advancedQueryCapabilities;return l&&!(p||u||d)&&(p=u=d=!0),{supportsCalculate:n(t,"supportsCalculate",!1),supportsTruncate:n(t,"supportsTruncate",!1),supportsValidateSql:n(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:c,supportsQuery:a,supportsQueryAnalytics:n(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:n(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:n(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:n(t,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:n(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:n(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,c=t?.includes("MapServer"),y=!c||d>=(0,i.Z)("mapserver-pbf-version-support"),f=(0,o.M8)(t),h=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:n(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:n(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:n(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:n(r,"supportsReturningGeometryCentroid",!1),supportsDistance:n(r,"supportsQueryWithDistance",!1),supportsDistinct:n(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:n(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:n(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:n(r,"supportsHavingClause",!1),supportsOrderBy:n(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:n(r,"supportsPagination",!1),supportsQuantization:n(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:n(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:n(e,"supportsReturningQueryGeometry",!1),supportsResultType:n(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:n(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:n(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:n(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:n(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:n(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:n(a,"allowOthersToQuery",!0),supportsHistoricMoment:n(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&h.has("pbf"),supportsDisjointSpatialRelationship:n(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:n(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:n(r,"supportsDefaultSR",!1),supportsCompactGeometry:f,supportsFullTextSearch:n(r,"supportsFullTextSearch",!1),maxRecordCountFactor:s(e,"maxRecordCountFactor",void 0),maxRecordCount:s(e,"maxRecordCount",void 0),standardMaxRecordCount:s(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:s(e,"tileMaxRecordCount",void 0)}}function v(e){const t=e.advancedQueryCapabilities,r=n(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:n(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function b(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:n(e,"allowGeometryUpdates",!0),supportsGlobalId:n(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:n(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:n(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:n(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:n(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:n(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:n(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:n(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:n(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:n(r,"supportsAsyncApplyEdits",!1),zDefault:s(e,"zDefault",void 0)}}},28694:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(69285);function o(e,t,r){if(!r?.features||!r.hasZ)return;const o=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var i,o=r(43697),n=r(66577),s=r(38171),a=r(35454),l=r(96674),p=r(22974),u=r(5600),d=(r(75215),r(71715)),c=r(52011),y=r(30556),f=r(82971),h=r(33955),m=r(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],n=s.Z.fromJSON(o),a=o.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=r);const l=o.aggregateGeometries,p=n.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],i=l[e],o=i?.spatialReference;null==t||o||(t.spatialReference=r)}i.push(n)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=f.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,o]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,o],scale:[n,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*n+i),(e=>o-e*s),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,o;const n=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===o||(n.push([e-i,s-o]),i=e,o=s)}else i=t(a[0]),o=r(a[1]),n.push([i,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],s=this._quantizePoints(n,t,r);s&&o.push(s)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,h.oU)(e)?e.rings:e.paths;let s,a;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(s+=o[0],a+=o[1]):(s=o[0],a=o[1]),o[0]=t(s),o[1]=r(a)}}if(i&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let s,a;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,u.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.Cb)({type:[s.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,u.Cb)({type:[m.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,u.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,u.Cb)({types:n.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,u.Cb)({type:f.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,u.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const b=v},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>o,eG:()=>l,lF:()=>s,lj:()=>u,qP:()=>a,wW:()=>p});const i=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);