\r\n","import { Component, Input } from '@angular/core';\r\nimport { MediaTextInfo } from './section-media-text.module';\r\n\r\n@Component({\r\n selector: 'app-section-media-text',\r\n templateUrl: './section-media-text.component.html',\r\n styleUrls: ['./section-media-text.component.css']\r\n})\r\nexport class SectionMediaTextComponent {\r\n\r\n @Input() MediaTextInfo: MediaTextInfo = {\r\n showMaskPC: false,\r\n imageSrc: '',\r\n title: '',\r\n description: '',\r\n showButton: false,\r\n buttonText: '',\r\n buttonLink: '',\r\n openInNewTab: false,\r\n showImageSecondary: false,\r\n showRevert: false,\r\n };\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SectionMediaTextComponent } from './section-media-text.component';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n SectionMediaTextComponent\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [SectionMediaTextComponent]\r\n})\r\nexport class SectionMediaTextModule { }\r\n\r\nexport interface MediaTextInfo {\r\n showMaskPC: boolean;\r\n imageSrc: string;\r\n title: string;\r\n description: string;\r\n showButton: boolean;\r\n buttonText: string;\r\n buttonLink: string;\r\n openInNewTab: boolean;\r\n showImageSecondary: boolean;\r\n showRevert: boolean;\r\n}","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ScrollService {\r\n scrollIntoView(elementId: string) {\r\n const element = document.getElementById(elementId);\r\n if (element) {\r\n element.scrollIntoView({ behavior: 'smooth' });\r\n }\r\n }\r\n}\r\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../chunks/tslib.es6.js\";import t from\"../core/Accessor.js\";import{isSome as r}from\"../core/arrayUtils.js\";import{ClonableMixin as s}from\"../core/Clonable.js\";import{IdentifiableMixin as o}from\"../core/Identifiable.js\";import{JSONSupportMixin as i}from\"../core/JSONSupport.js\";import{property as p}from\"../core/accessorSupport/decorators/property.js\";import\"../core/accessorSupport/ensureType.js\";import\"../core/has.js\";import{subclass as a}from\"../core/accessorSupport/decorators/subclass.js\";let n=0,l=class extends(i(s(o(t)))){constructor(e){super(e),this.id=`${Date.now().toString(16)}-analysis-${n++}`,this.title=null}get parent(){return this._get(\"parent\")}set parent(e){const t=this.parent;if(null!=t)switch(t.type){case\"line-of-sight\":case\"dimension\":t.releaseAnalysis(this);break;case\"2d\":case\"3d\":t.analyses.includes(this)&&t.analyses.remove(this)}this._set(\"parent\",e)}get isEditable(){return this.requiredPropertiesForEditing.every(r)}};e([p({type:String,constructOnly:!0,clonable:!1})],l.prototype,\"id\",void 0),e([p({type:String})],l.prototype,\"title\",void 0),e([p({constructOnly:!0})],l.prototype,\"type\",void 0),e([p({clonable:!1,value:null})],l.prototype,\"parent\",null),e([p({readOnly:!0})],l.prototype,\"isEditable\",null),e([p({readOnly:!0})],l.prototype,\"requiredPropertiesForEditing\",void 0),l=e([a(\"esri.analysis.Analysis\")],l);const c=l;export{c as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{a5 as e,g as s,az as t,aj as i,a3 as a,ak as r}from\"./Theme.js\";class n extends e{_beforeChanged(){super._beforeChanged(),(this.isDirty(\"cornerRadiusTL\")||this.isDirty(\"cornerRadiusTR\")||this.isDirty(\"cornerRadiusBR\")||this.isDirty(\"cornerRadiusBL\"))&&(this._clear=!0)}_draw(){let e=this.width(),a=this.height(),r=e,n=a,o=r/Math.abs(e),h=n/Math.abs(a);if(s(r)&&s(n)){let e=Math.min(r,n)/2,s=t(this.get(\"cornerRadiusTL\",8),e),a=t(this.get(\"cornerRadiusTR\",8),e),c=t(this.get(\"cornerRadiusBR\",8),e),l=t(this.get(\"cornerRadiusBL\",8),e),d=Math.min(Math.abs(r/2),Math.abs(n/2));s=i(s,0,d),a=i(a,0,d),c=i(c,0,d),l=i(l,0,d);const b=this._display;b.moveTo(s*o,0),b.lineTo(r-a*o,0),a>0&&b.arcTo(r,0,r,a*h,a),b.lineTo(r,n-c*h),c>0&&b.arcTo(r,n,r-c*o,n,c),b.lineTo(l*o,n),l>0&&b.arcTo(0,n,0,n-l*h,l),b.lineTo(0,s*h),s>0&&b.arcTo(0,0,s*o,0,s),b.closePath()}}}Object.defineProperty(n,\"className\",{enumerable:!0,configurable:!0,writable:!0,value:\"RoundedRectangle\"}),Object.defineProperty(n,\"classNames\",{enumerable:!0,configurable:!0,writable:!0,value:e.classNames.concat([n.className])});class o extends a{_afterNew(){this._settings.themeTags=r(this._settings.themeTags,[\"button\"]),super._afterNew(),this._settings.background||this.set(\"background\",n.new(this._root,{themeTags:r(this._settings.themeTags,[\"background\"])}))}_prepareChildren(){if(super._prepareChildren(),this.isDirty(\"icon\")){const e=this._prevSettings.icon,s=this.get(\"icon\");s!==e&&(this._disposeProperty(\"icon\"),e&&e.dispose(),s&&this.children.push(s),this._prevSettings.icon=s)}if(this.isDirty(\"label\")){const e=this._prevSettings.label,s=this.get(\"label\");s!==e&&(this._disposeProperty(\"label\"),e&&e.dispose(),s&&this.children.push(s),this._prevSettings.label=s)}}}Object.defineProperty(o,\"className\",{enumerable:!0,configurable:!0,writable:!0,value:\"Button\"}),Object.defineProperty(o,\"classNames\",{enumerable:!0,configurable:!0,writable:!0,value:a.classNames.concat([o.className])});export{o as B,n as R};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{a7 as t,aj as e,a3 as i,ak as s,al as o,z as r,ad as l,M as a,C as n,Q as h}from\"./Theme.js\";class p extends t{_beforeChanged(){super._beforeChanged(),(this.isDirty(\"pointerBaseWidth\")||this.isDirty(\"cornerRadius\")||this.isDirty(\"pointerLength\")||this.isDirty(\"pointerX\")||this.isDirty(\"pointerY\")||this.isDirty(\"width\")||this.isDirty(\"height\"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){this.markDirtyBounds();let t=this.width(),i=this.height();if(t>0&&i>0){let s=this.get(\"cornerRadius\",8);s=e(s,0,Math.min(t/2,i/2));let o=this.get(\"pointerX\",0),r=this.get(\"pointerY\",0),l=this.get(\"pointerBaseWidth\",15)/2,a=0,n=0,h=0,p=(o-a)*(i-n)-(r-n)*(t-a),u=(o-h)*(0-i)-(r-i)*(t-h);const g=this._display;if(g.moveTo(s,0),p>0&&u>0){let i=Math.round(e(o,s+l,t-l-s));r=e(r,-1/0,0),g.lineTo(i-l,0),g.lineTo(o,r),g.lineTo(i+l,0)}if(g.lineTo(t-s,0),g.arcTo(t,0,t,s,s),p>0&&u<0){let a=Math.round(e(r,s+l,i-l-s));o=e(o,t,1/0),g.lineTo(t,s),g.lineTo(t,Math.max(a-l,s)),g.lineTo(o,r),g.lineTo(t,a+l)}if(g.lineTo(t,i-s),g.arcTo(t,i,t-s,i,s),p<0&&u<0){let a=Math.round(e(o,s+l,t-l-s));r=e(r,i,1/0),g.lineTo(t-s,i),g.lineTo(a+l,i),g.lineTo(o,r),g.lineTo(a-l,i)}if(g.lineTo(s,i),g.arcTo(0,i,0,i-s,s),p<0&&u>0){let t=Math.round(e(r,s+l,i-s-l));o=e(o,-1/0,0),g.lineTo(0,i-s),g.lineTo(0,t+l),g.lineTo(o,r),g.lineTo(0,Math.max(t-l,s))}g.lineTo(0,s),g.arcTo(0,0,s,0,s),g.closePath()}}}}Object.defineProperty(p,\"className\",{enumerable:!0,configurable:!0,writable:!0,value:\"PointedRectangle\"}),Object.defineProperty(p,\"classNames\",{enumerable:!0,configurable:!0,writable:!0,value:t.classNames.concat([p.className])});class u extends i{constructor(t,e,i,s=[]){super(t,e,i,s),Object.defineProperty(this,\"_fx\",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,\"_fy\",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,\"_label\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"_fillDp\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"_strokeDp\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"_labelDp\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"_w\",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,\"_h\",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,\"_keepHoverDp\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"_htmlContentHovered\",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_afterNew(){this._settings.themeTags=s(this._settings.themeTags,[\"tooltip\"]),super._afterNew(),this.set(\"background\",p.new(this._root,{themeTags:[\"tooltip\",\"background\"]})),this._label=this.children.push(o.new(this._root,{})),this._disposers.push(this._label.events.on(\"boundschanged\",(()=>{this._updateBackground()}))),this._disposers.push(this.on(\"bounds\",(()=>{this._updateBackground()}))),this._updateTextColor(),this._root.tooltipContainer.children.push(this),this.hide(0),this._disposers.push(this.label.onPrivate(\"htmlElement\",(t=>{t&&(r(t,\"pointerover\",(t=>{this._htmlContentHovered=!0})),r(t,\"pointerout\",(t=>{this._htmlContentHovered=!1})))}))),this._root._tooltips.push(this)}get label(){return this._label}dispose(){super.dispose(),l(this._root._tooltips,this)}_updateChildren(){super._updateChildren(),(this.isDirty(\"pointerOrientation\")||this.isPrivateDirty(\"minWidth\")||this.isPrivateDirty(\"minHeight\"))&&this.get(\"background\")._markDirtyKey(\"width\");null!=this.get(\"labelText\")&&this.label.set(\"text\",this.get(\"labelText\"));null!=this.get(\"labelHTML\")&&this.label.set(\"html\",this.get(\"labelHTML\"))}_changed(){if(super._changed(),(this.isDirty(\"pointTo\")||this.isDirty(\"pointerOrientation\"))&&this._updateBackground(),this.isDirty(\"tooltipTarget\")&&this.updateBackgroundColor(),this.isDirty(\"keepTargetHover\")){if(this.get(\"keepTargetHover\")){const t=this.get(\"background\");this._keepHoverDp=new a([t.events.on(\"pointerover\",(t=>{let e=this.get(\"tooltipTarget\");e&&(e.parent&&e.parent.getPrivate(\"tooltipTarget\")==e&&(e=e.parent),e.hover())})),t.events.on(\"pointerout\",(t=>{let e=this.get(\"tooltipTarget\");e&&(e.parent&&e.parent.getPrivate(\"tooltipTarget\")==e&&(e=e.parent),this._htmlContentHovered||e.unhover())}))]),this.label.onPrivate(\"htmlElement\",(e=>{this._keepHoverDp&&e&&this._keepHoverDp.disposers.push(r(e,\"pointerleave\",(e=>{const i=this.root._renderer.getEvent(e);t.events.dispatch(\"pointerout\",{type:\"pointerout\",originalEvent:i.event,point:i.point,simulated:!1,target:t})})))}))}else this._keepHoverDp&&(this._keepHoverDp.dispose(),this._keepHoverDp=void 0)}}_onShow(){super._onShow(),this.updateBackgroundColor()}updateBackgroundColor(){let t=this.get(\"tooltipTarget\");const e=this.get(\"background\");let i,s;t&&e&&(i=t.get(\"fill\"),s=t.get(\"stroke\"),null==i&&(i=s),this.get(\"getFillFromSprite\")&&(this._fillDp&&this._fillDp.dispose(),null!=i&&e.set(\"fill\",i),this._fillDp=t.on(\"fill\",(t=>{null!=t&&(e.set(\"fill\",t),this._updateTextColor(t))})),this._disposers.push(this._fillDp)),this.get(\"getStrokeFromSprite\")&&(this._strokeDp&&this._strokeDp.dispose(),null!=i&&e.set(\"stroke\",i),this._strokeDp=t.on(\"fill\",(t=>{null!=t&&e.set(\"stroke\",t)})),this._disposers.push(this._strokeDp)),this.get(\"getLabelFillFromSprite\")&&(this._labelDp&&this._labelDp.dispose(),null!=i&&this.label.set(\"fill\",i),this._labelDp=t.on(\"fill\",(t=>{null!=t&&this.label.set(\"fill\",t)})),this._disposers.push(this._labelDp))),this._updateTextColor(i)}_updateTextColor(t){this.get(\"autoTextColor\")&&(null==t&&(t=this.get(\"background\").get(\"fill\")),null==t&&(t=this._root.interfaceColors.get(\"background\")),t instanceof n&&this.label.set(\"fill\",n.alternative(t,this._root.interfaceColors.get(\"alternativeText\"),this._root.interfaceColors.get(\"text\"))))}_setDataItem(t){super._setDataItem(t),this.label._setDataItem(t)}_updateBackground(){super.updateBackground();const t=this._root.container;if(t){let i=.5,s=.5,o=this.get(\"centerX\");o instanceof h&&(i=o.value);let r=this.get(\"centerY\");r instanceof h&&(s=r.value);let l=t.width(),a=t.height(),n=this.parent,u=0,g=0;if(n){u=n.x(),g=n.y();const t=n.get(\"layerMargin\");t&&(u+=t.left||0,g+=t.top||0,l+=(t.left||0)+(t.right||0),a+=(t.top||0)+(t.bottom||0))}const d=this.get(\"bounds\",{left:-u,top:-g,right:l-u,bottom:a-g});this._updateBounds();let c=this.width(),b=this.height();0===c&&(c=this._w),0===b&&(b=this._h);let _=this.get(\"pointTo\",{x:l/2,y:a/2}),f=_.x,m=_.y,v=this.get(\"pointerOrientation\"),T=this.get(\"background\"),y=0,D=0,k=0;T instanceof p&&(y=T.get(\"pointerLength\",0),D=T.get(\"strokeWidth\",0)/2,k=D,T.set(\"width\",c),T.set(\"height\",b));let w=0,x=0,P=d.right-d.left,C=d.bottom-d.top;\"horizontal\"==v||\"left\"==v||\"right\"==v?(D=0,\"horizontal\"==v?f>d.left+P/2?(f-=c*(1-i)+y,k*=-1):f+=c*i+y:\"left\"==v?f+=c*(1-i)+y:(f-=c*i+y,k*=-1)):(k=0,\"vertical\"==v?m>d.top+b/2+y?m-=b*(1-s)+y:(m+=b*s+y,D*=-1):\"down\"==v?m-=b*(1-s)+y:(m+=b*s+y,D*=-1)),f=e(f,d.left+c*i,d.left+P-c*(1-i))+k,m=e(m,d.top+b*s,d.top+C-b*(1-s))-D,w=_.x-f+c*i+k,x=_.y-m+b*s-D,this._fx=f,this._fy=m;const O=this.get(\"animationDuration\",0);if(O>0&&this.get(\"visible\")&&this.get(\"opacity\")>.1){const t=this.get(\"animationEasing\");this.animate({key:\"x\",to:f,duration:O,easing:t}),this.animate({key:\"y\",to:m,duration:O,easing:t})}else this.set(\"x\",f),this.set(\"y\",m);T instanceof p&&(T.set(\"pointerX\",w),T.set(\"pointerY\",x)),c>0&&(this._w=c),b>0&&(this._h=b)}}}Object.defineProperty(u,\"className\",{enumerable:!0,configurable:!0,writable:!0,value:\"Tooltip\"}),Object.defineProperty(u,\"classNames\",{enumerable:!0,configurable:!0,writable:!0,value:i.classNames.concat([u.className])});export{u as T};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{G as e}from\"./geometryEngineBase.js\";import{jsonAdapter as n}from\"../geometry/geometryAdapters/json.js\";function t(n){return e.extendedSpatialReferenceInfo(n)}function r(t,r,i){return e.clip(n,t,r,i)}function i(t,r,i){return e.cut(n,t,r,i)}function a(t,r,i){return e.contains(n,t,r,i)}function o(t,r,i){return e.crosses(n,t,r,i)}function s(t,r,i,a){return e.distance(n,t,r,i,a)}function u(t,r,i){return e.equals(n,t,r,i)}function c(t,r,i){return e.intersects(n,t,r,i)}function f(t,r,i){return e.touches(n,t,r,i)}function l(t,r,i){return e.within(n,t,r,i)}function p(t,r,i){return e.disjoint(n,t,r,i)}function g(t,r,i){return e.overlaps(n,t,r,i)}function d(t,r,i,a){return e.relate(n,t,r,i,a)}function m(t,r){return e.isSimple(n,t,r)}function h(t,r){return e.simplify(n,t,r)}function y(t,r,i=!1){return e.convexHull(n,t,r,i)}function x(t,r,i){return e.difference(n,t,r,i)}function S(t,r,i){return e.symmetricDifference(n,t,r,i)}function w(t,r,i){return e.intersect(n,t,r,i)}function A(t,r,i=null){return e.union(n,t,r,i)}function D(t,r,i,a,o,s,u){return e.offset(n,t,r,i,a,o,s,u)}function R(t,r,i,a,o=!1){return e.buffer(n,t,r,i,a,o)}function j(t,r,i,a,o,s,u){return e.geodesicBuffer(n,t,r,i,a,o,s,u)}function E(t,r,i,a=!0){return e.nearestCoordinate(n,t,r,i,a)}function L(t,r,i){return e.nearestVertex(n,t,r,i)}function T(t,r,i,a,o){return e.nearestVertices(n,t,r,i,a,o)}function b(n,t,r,i){if(null==t||null==i)throw new Error(\"Illegal Argument Exception\");const a=e.rotate(t,r,i);return a.spatialReference=n,a}function v(n,t,r){if(null==t||null==r)throw new Error(\"Illegal Argument Exception\");const i=e.flipHorizontal(t,r);return i.spatialReference=n,i}function z(n,t,r){if(null==t||null==r)throw new Error(\"Illegal Argument Exception\");const i=e.flipVertical(t,r);return i.spatialReference=n,i}function I(t,r,i,a,o){return e.generalize(n,t,r,i,a,o)}function V(t,r,i,a){return e.densify(n,t,r,i,a)}function H(t,r,i,a,o=0){return e.geodesicDensify(n,t,r,i,a,o)}function B(t,r,i){return e.planarArea(n,t,r,i)}function _(t,r,i){return e.planarLength(n,t,r,i)}function q(t,r,i,a){return e.geodesicArea(n,t,r,i,a)}function C(t,r,i,a){return e.geodesicLength(n,t,r,i,a)}function P(t,r,i){return null==r||null==i?[]:e.intersectLinesToPoints(n,t,r,i)}function G(n,t){e.changeDefaultSpatialReferenceTolerance(n,t)}function M(n){e.clearDefaultSpatialReferenceTolerance(n)}const O=Object.freeze(Object.defineProperty({__proto__:null,buffer:R,changeDefaultSpatialReferenceTolerance:G,clearDefaultSpatialReferenceTolerance:M,clip:r,contains:a,convexHull:y,crosses:o,cut:i,densify:V,difference:x,disjoint:p,distance:s,equals:u,extendedSpatialReferenceInfo:t,flipHorizontal:v,flipVertical:z,generalize:I,geodesicArea:q,geodesicBuffer:j,geodesicDensify:H,geodesicLength:C,intersect:w,intersectLinesToPoints:P,intersects:c,isSimple:m,nearestCoordinate:E,nearestVertex:L,nearestVertices:T,offset:D,overlaps:g,planarArea:B,planarLength:_,relate:d,rotate:b,simplify:h,symmetricDifference:S,touches:f,union:A,within:l},Symbol.toStringTag,{value:\"Module\"}));export{T as A,b as B,v as C,z as D,I as E,V as F,H as G,B as H,_ as I,q as J,C as K,P as L,G as M,M as N,i as a,a as b,r as c,o as d,t as e,s as f,O as g,u as h,c as i,p as j,m as k,y as l,x as m,S as n,g as o,w as p,D as q,d as r,h as s,f as t,A as u,R as v,l as w,j as x,E as y,L as z};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport t from\"../../Error.js\";import{createMD5Hash as r}from\"../../MD5.js\";import{isMultiOriginJSONMixin as e}from\"../../multiOriginJSONSupportUtils.js\";import{isAbsolute as o,isBlobProtocol as s,join as n,blobUrlToBlob as i,getPathExtension as p}from\"../../urlUtils.js\";import{generateUUID as c}from\"../../uuid.js\";import{getPropertyMetadata as u}from\"../metadata.js\";import{nameToId as a}from\"../PropertyOrigin.js\";import{propertyJSONMeta as l}from\"./property.js\";import{getResourceContentExtension as m}from\"../../../portal/support/resourceExtension.js\";import{r as d,t as f,M as y,i as g,p as h,a as v}from\"../../../chunks/persistableUrlUtils.js\";function j(t){const r=t?.origins??[void 0];return(e,o)=>{const s=U(t,e,o);for(const t of r){const r=l(e,t,o);for(const t in s)r[t]=s[t]}}}function U(t,r,e){if(\"resource\"===t?.type)return w(t,r,e);switch(t?.type??\"other\"){case\"other\":return{read:!0,write:!0};case\"url\":{const{read:t,write:r}=v;return{read:t,write:r}}}}function w(t,r,n){const i=u(r,n);return{type:String,read:(t,r,e)=>{const o=d(t,r,e);return i.type===String?o:\"function\"==typeof i.type?new i.type({url:o}):void 0},write:{writer(r,p,c,u){if(!u?.resources)return\"string\"==typeof r?void(p[c]=f(r,u)):void(p[c]=r.write({},u));const l=x(r),m=f(l,{...u,verifyItemRelativeUrls:u?.verifyItemRelativeUrls?{writtenUrls:u.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},y.NO),d=i.type!==String&&(!e(this)||u?.origin&&this.originIdOf(n)>a(u.origin)),h={object:this,propertyName:n,value:r,targetUrl:m,dest:p,targetPropertyName:c,context:u,params:t};u?.portalItem&&m&&!o(m)?d&&t?.contentAddressed?I(h):d?N(h):P(h):u?.portalItem&&(null==m||null!=g(m)||s(m)||d)?I(h):p[c]=m}}}}function I(e){const{targetUrl:o,params:p,value:u,context:a,dest:l,targetPropertyName:d}=e;if(!a.portalItem)return;const f=h(o),y=b(u,o,a);if(p?.contentAddressed&&\"json\"!==y.type)return void a.messages?.push(new t(\"persistable:contentAddressingUnsupported\",`Property \"${d}\" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const g=p?.contentAddressed&&\"json\"===y.type?r(y.jsonString):f?.filename??c(),v=n(p?.prefix??f?.prefix,g),j=`${v}.${m(y)}`;if(p?.contentAddressed&&a.resources&&\"json\"===y.type){const t=a.resources.toKeep.find((t=>t.resource.path===j))??a.resources.toAdd.find((t=>t.resource.path===j));if(t)return void(l[d]=t.resource.itemRelativeUrl)}const U=a.portalItem.resourceFromPath(j);s(o)&&a.resources&&a.resources.pendingOperations.push(i(o).then((t=>{U.path=`${v}.${m({type:\"blob\",blob:t})}`,l[d]=U.itemRelativeUrl})).catch((()=>{})));const w=p?.compress??!1;a.resources&&S({...e,resource:U,content:y,compress:w,updates:a.resources.toAdd}),l[d]=U.itemRelativeUrl}function N(t){const{context:r,targetUrl:e,params:o,value:s,dest:n,targetPropertyName:i}=t;if(!r.portalItem)return;const c=r.portalItem.resourceFromPath(e),u=b(s,e,r),a=m(u),l=p(c.path),d=o?.compress??!1;a===l?(r.resources&&S({...t,resource:c,content:u,compress:d,updates:r.resources.toUpdate}),n[i]=e):I(t)}function P({context:t,targetUrl:r,dest:e,targetPropertyName:o}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(r),compress:!1}),e[o]=r)}function S({object:t,propertyName:r,updates:e,resource:o,content:s,compress:n}){e.push({resource:o,content:s,compress:n,finish:e=>{O(t,r,e)}})}function b(t,r,e){return\"string\"==typeof t?{type:\"url\",url:r}:{type:\"json\",jsonString:JSON.stringify(t.toJSON(e))}}function x(t){return null==t?null:\"string\"==typeof t?t:t.url}function O(t,r,e){\"string\"==typeof t[r]?t[r]=e.url:t[r].url=e.url}export{j as persistable};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nfunction c(c){return c=c||globalThis.location.hostname,l.some((a=>null!=c?.match(a)))}function a(c,a){return c&&(a=a||globalThis.location.hostname)?null!=a.match(t)||null!=a.match(s)?c.replace(\"static.arcgis.com\",\"staticdev.arcgis.com\"):null!=a.match(o)||null!=a.match(i)?c.replace(\"static.arcgis.com\",\"staticqa.arcgis.com\"):c:c}const t=/^devext.arcgis.com$/,o=/^qaext.arcgis.com$/,s=/^[\\w-]*\\.mapsdevext.arcgis.com$/,i=/^[\\w-]*\\.mapsqa.arcgis.com$/,l=[/^([\\w-]*\\.)?[\\w-]*\\.zrh-dev-local.esri.com$/,t,o,/^jsapps.esri.com$/,s,i];export{a as adjustStaticAGOUrl,l as devHostnames,c as isDevEnvironment};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{escapeRegExpString as e}from\"./string.js\";import{getLocale as t}from\"../intl/locale.js\";const n={ar:[\".\",\",\"],bg:[\",\",\" \"],bs:[\",\",\".\"],ca:[\",\",\".\"],cs:[\",\",\" \"],da:[\",\",\".\"],de:[\",\",\".\"],\"de-ch\":[\".\",\"’\"],el:[\",\",\".\"],en:[\".\",\",\"],\"en-au\":[\".\",\",\"],es:[\",\",\".\"],\"es-mx\":[\".\",\",\"],et:[\",\",\" \"],fi:[\",\",\" \"],fr:[\",\",\" \"],\"fr-ch\":[\",\",\" \"],he:[\".\",\",\"],hi:[\".\",\",\",\"#,##,##0.###\"],hr:[\",\",\".\"],hu:[\",\",\" \"],id:[\",\",\".\"],it:[\",\",\".\"],\"it-ch\":[\".\",\"’\"],ja:[\".\",\",\"],ko:[\".\",\",\"],lt:[\",\",\" \"],lv:[\",\",\" \"],mk:[\",\",\".\"],nb:[\",\",\" \"],nl:[\",\",\".\"],pl:[\",\",\" \"],pt:[\",\",\".\"],\"pt-pt\":[\",\",\" \"],ro:[\",\",\".\"],ru:[\",\",\" \"],sk:[\",\",\" \"],sl:[\",\",\".\"],sr:[\",\",\".\"],sv:[\",\",\" \"],th:[\".\",\",\"],tr:[\",\",\".\"],uk:[\",\",\" \"],vi:[\",\",\".\"],zh:[\".\",\",\"]};function r(e=t()){let r=(e=e.toLowerCase())in n;if(!r){const t=e.split(\"-\");t.length>1&&t[0]in n&&(e=t[0],r=!0),r||(e=\"en\")}const[s,l,o=\"#,##0.###\"]=n[e];return{decimal:s,group:l,pattern:o}}function s(e,t){const n=r((t={...t}).locale);t.customs=n;const s=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:o(e,s,t)}const l=/[#0,]*[#0](?:\\.0*#*)?/;function o(e,t,n){const r=(n=n||{}).customs.group,s=n.customs.decimal,o=t.split(\";\"),c=o[0];if((t=o[e<0?1:0]||\"-\"+c).includes(\"%\"))e*=100;else if(t.includes(\"‰\"))e*=1e3;else{if(t.includes(\"¤\"))throw new Error(\"currency notation not supported\");if(t.includes(\"E\"))throw new Error(\"exponential notation not supported\")}const a=l,p=c.match(a);if(!p)throw new Error(\"unable to find a number expression in pattern: \"+t);return!1===n.fractional&&(n.places=0),t.replace(a,i(e,p[0],{decimal:s,group:r,places:n.places,round:n.round}))}function i(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const r=t.split(\".\"),s=\"string\"==typeof n.places&&n.places.indexOf(\",\");let l=n.places;s?l=n.places.substring(s+1):+l>=0||(l=(r[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(l))));const o=String(Math.abs(e)).split(\".\"),i=o[1]||\"\";if(r[1]||n.places){s&&(n.places=n.places.substring(0,s));const e=void 0!==n.places?n.places:r[1]&&r[1].lastIndexOf(\"0\")+1;+e>i.length&&(o[1]=i.padEnd(Number(e),\"0\")),+lo[0].length&&(o[0]=o[0].padStart(a,\"0\")),c.includes(\"#\")||(o[0]=o[0].substr(o[0].length-a)));let p,u,d=r[0].lastIndexOf(\",\");if(-1!==d){p=r[0].length-d-1;const e=r[0].substr(0,d);d=e.lastIndexOf(\",\"),-1!==d&&(u=e.length-d-1)}const g=[];for(let f=o[0];f;){const e=f.length-p;g.push(e>0?f.substr(e):f),f=e>0?f.slice(0,e):\"\",u&&(p=u,u=void 0)}return o[0]=g.reverse().join(n.group||\",\"),o.join(n.decimal||\".\")}function c(e){return a(e).regexp}function a(t){const n=r((t=t||{}).locale),s=t.pattern||n.pattern,o=n.group,i=n.decimal;let c=1;if(s.includes(\"%\"))c/=100;else if(s.includes(\"‰\"))c/=1e3;else if(s.includes(\"¤\"))throw new Error(\"currency notation not supported\");const a=s.split(\";\");1===a.length&&a.push(\"-\"+a[0]);const p=g(a,(n=>(n=\"(?:\"+e(n,\".\")+\")\").replace(l,(e=>{const n={signed:!1,separator:t.strict?o:[o,\"\"],fractional:t.fractional,decimal:i,exponent:!1},r=e.split(\".\");let s=t.places;1===r.length&&1!==c&&(r[1]=\"###\"),1===r.length||0===s?n.fractional=!1:(void 0===s&&(s=t.pattern?r[1].lastIndexOf(\"0\")+1:1/0),s&&null==t.fractional&&(n.fractional=!0),!t.places&&+s1&&(n.groupSize=l.pop().length,l.length>1&&(n.groupSize2=l.pop().length)),\"(\"+u(n)+\")\"}))),!0);return{regexp:p.replaceAll(/[\\xa0 ]/g,\"[\\\\s\\\\xa0]\"),group:o,decimal:i,factor:c}}function p(e,t){const n=a(t),r=new RegExp(\"^\"+n.regexp+\"$\").exec(e);if(!r)return NaN;let s=r[1];if(!r[1]){if(!r[2])return NaN;s=r[2],n.factor*=-1}return s=s.replaceAll(new RegExp(\"[\"+n.group+\"\\\\s\\\\xa0]\",\"g\"),\"\").replace(n.decimal,\".\"),Number(s)*n.factor}function u(e){\"places\"in(e=e||{})||(e.places=1/0),\"string\"!=typeof e.decimal&&(e.decimal=\".\"),\"fractional\"in e&&!String(e.places).startsWith(\"0\")||(e.fractional=[!0,!1]),\"exponent\"in e||(e.exponent=[!0,!1]),\"eSigned\"in e||(e.eSigned=[!0,!1]);const t=d(e),n=g(e.fractional,(t=>{let n=\"\";return t&&0!==e.places&&(n=\"\\\\\"+e.decimal,e.places===1/0?n=\"(?:\"+n+\"\\\\d+)?\":n+=\"\\\\d{\"+e.places+\"}\"),n}),!0);let r=t+n;return n&&(r=\"(?:(?:\"+r+\")|(?:\"+n+\"))\"),r+g(e.exponent,(t=>t?\"([eE]\"+d({signed:e.eSigned})+\")\":\"\"))}function d(t){\"signed\"in(t=t||{})||(t.signed=[!0,!1]),\"separator\"in t?\"groupSize\"in t||(t.groupSize=3):t.separator=\"\";return g(t.signed,(e=>e?\"[-+]\":\"\"),!0)+g(t.separator,(n=>{if(!n)return\"(?:\\\\d+)\";\" \"===(n=e(n))?n=\"\\\\s\":\" \"===n&&(n=\"\\\\s\\\\xa0\");const r=t.groupSize,s=t.groupSize2;if(s){const e=\"(?:0|[1-9]\\\\d{0,\"+(s-1)+\"}(?:[\"+n+\"]\\\\d{\"+s+\"})*[\"+n+\"]\\\\d{\"+r+\"})\";return r-s>0?\"(?:\"+e+\"|(?:0|[1-9]\\\\d{0,\"+(r-1)+\"}))\":e}return\"(?:0|[1-9]\\\\d{0,\"+(r-1)+\"}(?:[\"+n+\"]\\\\d{\"+r+\"})*)\"}),!0)}const g=(e,t,n)=>{if(!(e instanceof Array))return t(e);const r=[];for(let s=0;s\"(\"+(t?\"?:\":\"\")+e+\")\";export{a as _parseInfo,s as format,r as getCustoms,p as parse,c as regexp};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{t as s,m as t,a as r,s as n}from\"../chunks/mat3.js\";import{a as o}from\"../chunks/mat3f64.js\";import{s as c}from\"../chunks/vec2.js\";import{s as a,t as m}from\"../chunks/vec3.js\";import{c as u}from\"../chunks/vec3f64.js\";const f=u(),i=o(),e=o(),p=o();function h(t,r,n){return a(f,r[0],r[1],1),m(f,f,s(i,n)),0===f[2]?c(t,f[0],f[1]):c(t,f[0]/f[2],f[1]/f[2])}function j(s,n,o){return k(e,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),k(p,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7]),t(s,r(e,e),p),0!==s[8]&&(s[0]/=s[8],s[1]/=s[8],s[2]/=s[8],s[3]/=s[8],s[4]/=s[8],s[5]/=s[8],s[6]/=s[8],s[7]/=s[8],s[8]/=s[8]),s}function k(o,c,u,e,p,h,j,k,v){n(o,c,e,h,u,p,j,1,1,1),a(f,k,v,1),r(i,o);const[x,b,d]=m(f,f,s(i,i));return n(i,x,0,0,0,b,0,0,0,d),t(o,i,o)}export{j as getProjectiveTransform,h as transformProjective};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nconst t=16,n=8,o=4,e=2,r=1,c=new Float64Array(2),f=new Float64Array(2),l=-90,u=90,h=-180,s=180,i=\"0123456789bcdefghjkmnpqrstuvwxyz\";function a(t){return t<=57?t-48:t<=104?t-88:t<=107?t-89:t<=110?t-90:t-91}function g(t){return i[t]}function A(t){return(t[0]+t[1])/2}function d(t,n,o){return t[0]=n,t[1]=o,t}function M(t,n){const o=A(t),e=n,r=!n;t[0]=r*t[0]+e*o,t[1]=r*o+e*t[1]}function w(t,n){const o=n>A(t);return M(t,o),o}function y(i,g){const w=d(c,l,u),y=d(f,h,s);for(let c=0;c>h,d=(g&t.geohashY)>>s;for(let t=i-1;t>=0;t--){const n=(r+c)/2,o=A&1<=0;t--){const n=(o+e)/2,r=d&1<n?1:0;r|=e<<29-(t+5*s),u=(1-e)*u+e*n,h=(1-e)*n+e*h}for(let t=0;t<5;t++){const o=(f+l)/2,e=n>o?1:0;c|=e<<29-(t+5*s),f=(1-e)*f+e*o,l=(1-e)*o+e*l}}t.geohashX=r,t.geohashY=c}function b(t,n,o,e,r){r%2&&(r+=1);let c=0,f=0,l=-90,u=90,h=-180,s=180;for(let i=0;in?1:0;c|=o<<29-(t+5*i),h=(1-o)*h+o*n,s=(1-o)*n+o*s}for(let t=0;t<5;t++){const n=(l+u)/2,e=o>n?1:0;f|=e<<29-(t+5*i),l=(1-e)*l+e*n,u=(1-e)*n+e*u}}t[2*n]=c,t[2*n+1]=f}function p(t,n,o){let e=\"\";const r=d(c,-90,90),l=d(f,-180,180);for(let c=0;c>1|(t&c)>>2:(e&c)>>1|(n&c)>>2}function j(c,f){return f?(e&c)>>1|(n&c)>>2:r&c|(o&c)>>1|(t&c)>>2}function k(c,f,l){const u=!((c.length-1)%2),h=c.substring(0,c.length-1),s=a(c.charCodeAt(c.length-1));let i=0,A=0,d=0,M=0;u?(i=8,A=4,d=r&s|(o&s)>>1|(t&s)>>2,M=(e&s)>>1|(n&s)>>2):(i=4,A=8,M=r&s|(o&s)>>1|(t&s)>>2,d=(e&s)>>1|(n&s)>>2);const w=d+f,y=M+l,C=Math.floor(w/i),X=Math.floor(y/A),Y=g(x(w-C*i,y-X*A,u));return c.length>1&&(C||X)?k(h,C,X)+Y:h+Y}export{C as convertGeohash32ToXY,a as decodeBase32Char,y as decodeGeohash,X as decodeGeohashXY,g as encodeBase32Char,p as encodeGeohash,k as getRelativeGeohash,b as setGeohashBuf,Y as setGeohashXY,F as unpackXBits,j as unpackYBits};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport e from\"../Extent.js\";import n from\"../Multipoint.js\";import t from\"../Point.js\";import o from\"../Polygon.js\";import i from\"../Polyline.js\";const r={convertToGEGeometry:s,exportPoint:a,exportPolygon:c,exportPolyline:h,exportMultipoint:m,exportExtent:x};function s(e,n){if(null==n)return null;let t=\"cache\"in n?n.cache._geVersion:void 0;return null==t&&(t=e.convertJSONToGeometry(n),\"cache\"in n&&(n.cache._geVersion=t)),t}function a(e,n,o){const i=e.hasZ(n),r=e.hasM(n),s=new t({x:e.getPointX(n),y:e.getPointY(n),spatialReference:o});return i&&(s.z=e.getPointZ(n)),r&&(s.m=e.getPointM(n)),s.cache._geVersion=n,s}function c(e,n,t){const i=new o({rings:e.exportPaths(n),hasZ:e.hasZ(n),hasM:e.hasM(n),spatialReference:t});return i.cache._geVersion=n,i}function h(e,n,t){const o=new i({paths:e.exportPaths(n),hasZ:e.hasZ(n),hasM:e.hasM(n),spatialReference:t});return o.cache._geVersion=n,o}function m(e,t,o){const i=new n({hasZ:e.hasZ(t),hasM:e.hasM(t),points:e.exportPoints(t),spatialReference:o});return i.cache._geVersion=t,i}function x(n,t,o){const i=n.hasZ(t),r=n.hasM(t),s=new e({xmin:n.getXMin(t),ymin:n.getYMin(t),xmax:n.getXMax(t),ymax:n.getYMax(t),spatialReference:o});if(i){const e=n.getZExtent(t);s.zmin=e.vmin,s.zmax=e.vmax}if(r){const e=n.getMExtent(t);s.mmin=e.vmin,s.mmax=e.vmax}return s.cache._geVersion=t,s}export{r as hydratedAdapter};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{nativeArrayMaxSize as r,isArray as n}from\"../../core/typedArrayUtil.js\";function t(n,t=!1){return n<=r?t?new Array(n).fill(0):new Array(n):new Float64Array(n)}function e(t){return(n(t)?t.length:t.byteLength/8)<=r?Array.from(t):new Float64Array(t)}function a(r,n,t){return Array.isArray(r)?r.slice(n,n+t):r.subarray(n,n+t)}function o(r,n){for(let t=0;tt.equals(r)))}isOnService(t){return this.parts.every((r=>r.isOnService(t)))}makeHash(){let t=\"\";for(const r of this.parts)t+=r.partHash;return t}async toBlob(t){const{parts:r}=this;if(1===r.length)return r[0].toBlob(t);const s=await Promise.all(r.map((r=>r.toBlob(t))));return e(t),new Blob(s)}}class o{constructor(t,r){this.partUrl=t,this.partHash=r}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(r){const{data:s}=await t(this.partUrl,{responseType:\"blob\"});return e(r),s}}function u(t){return p(t?.source)}function c(t){if(!Array.isArray(t))return!1;return t.every((t=>t instanceof i))}const f=/^(model\\/gltf\\+json)|(model\\/gltf-binary)$/,l=/\\.(gltf|glb)/i;function p(t){if(!t)return!1;if(Array.isArray(t)){return t.some(m)}return m(t)}function m(t){if(t instanceof File){const{type:r,name:e}=t;return f.test(r)||l.test(e)}return f.test(t.assetMimeType)||l.test(t.assetName)}function h(t,r){if(!t)return!1;const{source:e}=t;return g(e,r)}function y(t,r){if(t===r)return!0;const{source:e}=t,{source:s}=r;if(e===s)return!0;if(c(e)&&c(s)){if(e.length!==s.length)return!1;const t=(t,r)=>t.assetNamer.assetName?1:0,r=[...e].sort(t),n=[...s].sort(t);for(let e=0;e0&&e.every((t=>b(t,r)))}return b(t,r)}function b(t,r){return t instanceof i&&t.isOnService(r)}function N(t,r){return t instanceof File?s(t,r):n(t.assetMimeType,r)??a(t.assetName,r)}function A(t){return Array.isArray(t)?t:[t]}function v(t){return!!t.original}export{i as ServiceAsset,o as ServiceAssetPart,N as assetFormatId,b as assetIsOnService,h as externalIsOnService,A as externalSourceToMultiPart,y as externalSourcesAreEqual,m as isDisplayAsset,u as isDisplayExternal,p as isDisplaySource,v as isOriginalExternal,g as sourceIsOnService};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../chunks/tslib.es6.js\";import{property as e}from\"../core/accessorSupport/decorators/property.js\";import\"../core/accessorSupport/ensureType.js\";import\"../core/arrayUtils.js\";import\"../core/has.js\";import{subclass as o}from\"../core/accessorSupport/decorators/subclass.js\";import{owningCollectionProperty as s}from\"../core/support/OwningCollection.js\";import t from\"./Layer.js\";import{BlendLayer as i}from\"./mixins/BlendLayer.js\";import{ScaleRangeLayer as p}from\"./mixins/ScaleRangeLayer.js\";import{GraphicsCollection as a}from\"../support/GraphicsCollection.js\";import c from\"../symbols/support/ElevationInfo.js\";let n=class extends(i(p(t))){constructor(r){super(r),this.elevationInfo=null,this.graphics=new a,this.screenSizePerspectiveEnabled=!0,this.type=\"graphics\",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(r){return this.graphics.add(r),this}addMany(r){return this.graphics.addMany(r),this}removeAll(){return this.graphics.removeAll(),this}remove(r){this.graphics.remove(r)}removeMany(r){this.graphics.removeMany(r)}on(r,e){return super.on(r,e)}graphicChanged(r){this.emit(\"graphic-update\",r)}};r([e({type:c})],n.prototype,\"elevationInfo\",void 0),r([e(s(a,\"graphics\"))],n.prototype,\"graphics\",void 0),r([e({type:[\"show\",\"hide\"]})],n.prototype,\"listMode\",void 0),r([e()],n.prototype,\"screenSizePerspectiveEnabled\",void 0),r([e({readOnly:!0})],n.prototype,\"type\",void 0),r([e({constructOnly:!0})],n.prototype,\"internal\",void 0),n=r([o(\"esri.layers.GraphicsLayer\")],n);const h=n;export{h as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport e from\"../../Graphic.js\";import t from\"../../core/Collection.js\";import a from\"../../core/Error.js\";import{clone as r}from\"../../core/lang.js\";import s from\"../../core/Logger.js\";import{createResolver as o}from\"../../core/promiseUtils.js\";import{dataComponents as i}from\"../../core/urlUtils.js\";import{generateBracedUUID as n}from\"../../core/uuid.js\";import{normalizeCentralMeridian as d}from\"../../geometry/support/normalizeUtils.js\";import{isEditBusLayer as l,emitApplyEditsEvent as u}from\"../mixins/EditBusLayer.js\";import{isValidFieldValue as p}from\"../support/fieldUtils.js\";import{getMimeTypeFormatId as c,getFilenameFormatId as h}from\"../support/infoFor3D.js\";import{getEffectiveEditingEnabled as m,getEffectiveLayerCapabilities as f}from\"../support/layerUtils.js\";function y(e){return null!=e?.applyEdits}function g(e){return\"object\"==typeof e&&null!=e&&\"objectId\"in e&&!!e.objectId}function b(e){return e.every(g)}function w(e){return\"object\"==typeof e&&null!=e&&\"globalId\"in e&&!!e.globalId}function F(e){return e.every(w)}async function A(e,t,a,s={}){let i;const n=\"gdbVersion\"in e?e.gdbVersion:null,d=s.gdbVersion??n;if(l(e)&&e.url)i=u(e.url,e.layerId,d,\"original-and-current-features\"===s.returnServiceEditsOption);else{i=o(),i.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit(\"edits\",t)}));const t={result:i.promise};e.emit(\"apply-edits\",t)}try{const{results:o,edits:n}=await v(e,t,a,s),d=e=>e.filter((e=>!e.error)).map(r),l={edits:n,addedFeatures:d(o.addFeatureResults),updatedFeatures:d(o.updateFeatureResults),deletedFeatures:d(o.deleteFeatureResults),addedAttachments:d(o.addAttachmentResults),updatedAttachments:d(o.updateAttachmentResults),deletedAttachments:d(o.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:o.editMoment?new Date(o.editMoment):null,globalIdToObjectId:s.globalIdToObjectId};return o.editedFeatureResults?.length&&(l.editedFeatures=o.editedFeatureResults),i.resolve(l),o}catch(p){throw i.reject(p),p}}async function v(e,t,r,s){if(await e.load(),!y(t))throw new a(`${e.type}-layer:no-editing-support`,\"Layer source does not support applyEdits capability\",{layer:e});if(!m(e))throw new a(`${e.type}-layer:editing-disabled`,\"Editing is disabled for layer\",{layer:e});const{edits:o,options:i}=await I(e,r,s);return o.addFeatures?.length||o.updateFeatures?.length||o.deleteFeatures?.length||o.addAttachments?.length||o.updateAttachments?.length||o.deleteAttachments?.length?{edits:o,results:await t.applyEdits(o,i)}:{edits:o,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}async function I(e,t,r){const o=f(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),n=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=null!=e.infoFor3D;if(T(t,o,r,!!i,!!n,`${e.type}-layer`),!o.data.isVersioned&&r?.gdbVersion)throw new a(`${e.type}-layer:invalid-parameter`,\"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'\");if(!o.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new a(`${e.type}-layer:invalid-parameter`,\"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'\");const l={...r};if(null!=l.rollbackOnFailureEnabled||o.editing.supportsRollbackOnFailure||(l.rollbackOnFailureEnabled=!0),l.rollbackOnFailureEnabled||\"original-and-current-features\"!==l.returnServiceEditsOption||(!1===l.rollbackOnFailureEnabled&&s.getLogger(\"esri.layers.graphics.editingSupport\").warn(`${e.type}-layer:invalid-parameter`,\"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true.\"),l.rollbackOnFailureEnabled=!0),!o.editing.supportsReturnServiceEditsInSourceSpatialReference&&l.returnServiceEditsInSourceSR)throw new a(`${e.type}-layer:invalid-parameter`,\"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'\");if(l.returnServiceEditsInSourceSR&&\"original-and-current-features\"!==l.returnServiceEditsOption)throw new a(`${e.type}-layer:invalid-parameter`,\"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'\");const u=B(t,o,`${e.type}-layer`),p=r?.globalIdUsed||d,c=e.fields.filter((e=>\"big-integer\"===e.type||\"oid\"===e.type&&(e.length||0)>=8));if(p){const{globalIdField:t}=e;if(null==t)throw new a(`${e.type}-layer:invalid-parameter`,\"Layer does not specify a global id field.\");u.addFeatures.forEach((e=>U(e,t)))}u.addFeatures.forEach((t=>S(t,e,p,c))),u.updateFeatures.forEach((t=>j(t,e,p,c))),u.deleteFeatures.forEach((t=>R(t,e,p,c))),u.addAttachments.forEach((t=>O(t,e))),u.updateAttachments.forEach((t=>O(t,e))),d&&await G(u,e);return{edits:await L(u),options:l}}function $(e,t,r,s){if(r){if(\"attributes\"in e&&!e.attributes[t.globalIdField])throw new a(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!(\"attributes\"in e)&&!e.globalId)throw new a(`${t.type}-layer:invalid-parameter`,\"`'globalId' of the feature should be passed when 'globalIdUsed' is true\")}if(s.length&&\"attributes\"in e)for(const o of s){const r=e.attributes[o.name];if(void 0!==r&&!p(o,r))throw new a(`${t.type}-layer:invalid-parameter`,`Big-integer field '${o.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if(\"geometry\"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new a(`${t.type}-layer:z-unsupported`,\"Layer does not support z values while feature has z values.\");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new a(`${t.type}-layer:m-unsupported`,\"Layer does not support m values while feature has m values.\")}}function E(e,t){if(\"geometry\"in e&&\"mesh\"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new a(`${t.type}-layer:georeferenced-mesh-unsupported`,\"Uploading georeferenced meshes to a layer is not supported.\")}}function S(e,t,a,r){$(e,t,a,r),E(e,t)}function R(e,t,a,r){$(e,t,a,r)}function j(e,t,r,s){$(e,t,r,s),E(e,t);const o=f(t);if(\"geometry\"in e&&null!=e.geometry&&!o?.editing.supportsGeometryUpdate)throw new a(`${t.type}-layer:unsupported-operation`,\"Layer does not support geometry updates.\")}function O(e,t){const{feature:r,attachment:s}=e;if(!r||\"attributes\"in r&&!r.attributes[t.globalIdField])throw new a(`${t.type}-layer:invalid-parameter`,\"Attachment should have reference to a feature with 'globalId'\");if(!(\"attributes\"in r)&&!r.globalId)throw new a(`${t.type}-layer:invalid-parameter`,\"Attachment should have reference to 'globalId' of the parent feature\");if(!s.globalId)throw new a(`${t.type}-layer:invalid-parameter`,\"Attachment should have 'globalId'\");if(!s.data&&!s.uploadId)throw new a(`${t.type}-layer:invalid-parameter`,\"Attachment should have 'data' or 'uploadId'\");if(!(s.data instanceof File&&!!s.data.name)&&!s.name)throw new a(`${t.type}-layer:invalid-parameter`,\"'name' is required when attachment is specified as Base64 encoded string using 'data'\");if(!t.capabilities?.editing.supportsUploadWithItemId&&s.uploadId)throw new a(`${t.type}-layer:invalid-parameter`,\"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'\");if(\"string\"==typeof s.data){const e=i(s.data);if(e&&!e.isBase64)throw new a(`${t.type}-layer:invalid-parameter`,\"Attachment 'data' should be a Blob, File or Base64 encoded string\")}}function U(e,t){const{attributes:a}=e;null==a[t]&&(a[t]=n())}async function L(e){const t=e.addFeatures??[],a=e.updateFeatures??[],r=t.concat(a).map((e=>e.geometry)),s=await d(r),o=t.length,i=a.length;return s.slice(0,o).forEach(((e,a)=>t[a].geometry=e)),s.slice(o,o+i).forEach(((e,t)=>a[t].geometry=e)),e}function k(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&t.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}function B(e,t,r){const s=k(e);if(s.addFeatures?.length&&!t.operations.supportsAdd)throw new a(`${r}:unsupported-operation`,\"Layer does not support adding features.\");if(s.updateFeatures?.length&&!t.operations.supportsUpdate)throw new a(`${r}:unsupported-operation`,\"Layer does not support updating features.\");if(s.deleteFeatures?.length&&!t.operations.supportsDelete)throw new a(`${r}:unsupported-operation`,\"Layer does not support deleting features.\");return s.addFeatures=s.addFeatures.map(D),s.updateFeatures=s.updateFeatures.map(D),s.addAssetFeatures=[],s}function T(e,t,r,s,o,i){if(!e||!s&&!o)throw new a(`${i}:missing-parameters`,\"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required\");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new a(`${i}:invalid-parameter`,\"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'\");if(!t.editing.supportsGlobalId&&o)throw new a(`${i}:invalid-parameter`,\"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'\");if(!r?.globalIdUsed&&o)throw new a(`${i}:invalid-parameter`,\"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true\")}function D(t){const a=new e;return t.attributes||(t.attributes={}),a.geometry=t.geometry,a.attributes=t.attributes,a}async function G(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,s=c(\"model/gltf-binary\",r.supportedFormats)??h(\"glb\",r.supportedFormats);if(!(!!s&&r.editFormats.includes(s)))throw new a(`${t.type}-layer:binary-gltf-asset-not-supported`,\"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.\");e.addAssetFeatures??=[];const{addAssetFeatures:o}=e;for(const a of e.addFeatures??[])V(a)&&o.push(a);for(const a of e.updateFeatures??[])V(a)&&o.push(a)}function V(e){return\"mesh\"===e?.geometry?.type}function M(e,t,r,s){if(!y(t))throw new a(`${e.type}-layer:no-editing-support`,\"Layer source does not support applyEdits capability\",{layer:e});if(!t.uploadAssets)throw new a(`${e.type}-layer:no-asset-upload-support`,\"Layer source does not support uploadAssets capability\",{layer:e});return t.uploadAssets(r,s)}export{A as applyEdits,T as checkEditingCapabilities,F as isFeatureIdentifierArrayWithGlobalId,b as isFeatureIdentifierArrayWithObjectId,w as isFeatureIdentifierWithGlobalId,g as isFeatureIdentifierWithObjectId,k as normalizeCollections,B as normalizeEdits,L as normalizeGeometries,D as shallowCloneFeature,M as uploadAssets};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nconst t=1;function n(t,n){let o=0;for(const e of n){const n=e.attributes?.[t];\"number\"==typeof n&&isFinite(n)&&(o=Math.max(o,n))}return o}export{n as findLastObjectIdFromFeatures,t as initialObjectId};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../../chunks/tslib.es6.js\";import e from\"../../core/Error.js\";import o from\"../../core/Evented.js\";import{property as s}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/arrayUtils.js\";import\"../../core/has.js\";import{subclass as t}from\"../../core/accessorSupport/decorators/subclass.js\";let c=class extends o.EventedAccessor{destroy(){this.emit(\"destroy\")}get connectionError(){return this.errorString?new e(\"stream-connection\",this.errorString):null}onFeature(r){this.emit(\"data-received\",r)}onMessage(r){this.emit(\"message-received\",r)}};r([s({readOnly:!0})],c.prototype,\"connectionError\",null),c=r([t(\"esri.layers.support.StreamConnection\")],c);const i=c;export{i as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../../../chunks/tslib.es6.js\";import t from\"../../../../core/Error.js\";import o from\"../../../../core/Logger.js\";import{after as s,createResolver as r}from\"../../../../core/promiseUtils.js\";import{addQueryParameters as n}from\"../../../../core/urlUtils.js\";import{property as i}from\"../../../../core/accessorSupport/decorators/property.js\";import\"../../../../core/accessorSupport/ensureType.js\";import\"../../../../core/arrayUtils.js\";import\"../../../../core/has.js\";import{subclass as c}from\"../../../../core/accessorSupport/decorators/subclass.js\";import{getGeometryZScaler as a}from\"../../../../geometry/support/zscale.js\";import l from\"../../../support/StreamConnection.js\";var h;!function(e){e[e.CONNECTING=0]=\"CONNECTING\",e[e.OPEN=1]=\"OPEN\",e[e.CLOSING=2]=\"CLOSING\",e[e.CLOSED=3]=\"CLOSED\"}(h||(h={}));let d=class extends l{constructor(e){super(),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:o,sourceSpatialReference:s}=e;this._config=e,this._featureZScaler=a(t,s,o),this._open()}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return\"disconnected\";switch(this._websocket.readyState){case h.CONNECTING:case h.OPEN:return\"connected\";case h.CLOSING:case h.CLOSED:return\"disconnected\"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,r=1e3,i=0){try{if(this.destroyed)return;const t=n(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange(\"connectionStatus\")}catch(c){const n=r/1e3;return this._config.maxReconnectionAttempts&&i>=this._config.maxReconnectionAttempts?(o.getLogger(this).error(new t(\"websocket-connection\",\"Exceeded maxReconnectionAttempts attempts. No further attempts will be made\")),void this.destroy()):(o.getLogger(this).error(new t(\"websocket-connection\",`Failed to connect. Attempting to reconnect in ${n}s`,c)),await s(r),this._tryCreateWebSocket(e,Math.min(1.5*r,1e3*this._config.maxReconnectionInterval),i+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(s){return void o.getLogger(this).error(new t(\"websocket-connection\",\"Failed to parse message, invalid JSON\",{error:s}))}}}_createWebSocket(e){return new Promise(((t,o)=>{const s=new WebSocket(e);s.onopen=()=>{if(s.onopen=null,this.destroyed)return s.onclose=null,void s.close();s.onclose=e=>this._onClose(e),s.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(s),t(s)},s.onclose=e=>{s.onopen=s.onclose=null,o(e)}}))}async _handshake(e=1e4){const s=this._websocket;if(null==s)return;const n=r(),i=s.onmessage,{filter:c,outFields:a,spatialReference:l}=this._config;return n.timeout(e),s.onmessage=e=>{let r=null;try{r=JSON.parse(e.data)}catch(h){}r&&\"object\"==typeof r||(o.getLogger(this).error(new t(\"websocket-connection\",\"Protocol violation. Handshake failed - malformed message\",e.data)),n.reject(),this.destroy()),r.spatialReference?.wkid!==l?.wkid&&(o.getLogger(this).error(new t(\"websocket-connection\",`Protocol violation. Handshake failed - expected wkid of ${l.wkid}`,e.data)),n.reject(),this.destroy()),\"json\"!==r.format&&(o.getLogger(this).error(new t(\"websocket-connection\",\"Protocol violation. Handshake failed - format is not set\",e.data)),n.reject(),this.destroy()),c&&r.filter!==c&&o.getLogger(this).error(new t(\"websocket-connection\",\"Tried to set filter, but server doesn't support it\")),a&&r.outFields!==a&&o.getLogger(this).error(new t(\"websocket-connection\",\"Tried to set outFields, but server doesn't support it\")),s.onmessage=i;for(const t of this._outstandingMessages)s.send(JSON.stringify(t));this._outstandingMessages=[],n.resolve()},s.send(JSON.stringify({filter:c,outFields:a,format:\"json\",spatialReference:{wkid:l.wkid}})),n.promise}_onMessage(e){if(this.onMessage(e),\"type\"in e)switch(e.type){case\"features\":case\"featureResult\":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t=\"Encountered an error over WebSocket connection\";this._set(\"errorString\",t),o.getLogger(this).error(\"websocket-connection\",t)}_onClose(e){this._websocket=null,this.notifyChange(\"connectionStatus\"),1e3!==e.code&&o.getLogger(this).error(\"websocket-connection\",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};e([i()],d.prototype,\"connectionStatus\",null),e([i()],d.prototype,\"errorString\",void 0),d=e([c(\"esri.layers.graphics.sources.connections.WebSocketConnection\")],d);export{d as WebSocketConnection};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../../../chunks/tslib.es6.js\";import\"../../../../geometry.js\";import t from\"../../../../request.js\";import r from\"../../../../core/Error.js\";import s from\"../../../../core/Logger.js\";import{createResolver as o}from\"../../../../core/promiseUtils.js\";import{addQueryParameters as i}from\"../../../../core/urlUtils.js\";import\"../../../../core/accessorSupport/ensureType.js\";import\"../../../../core/arrayUtils.js\";import\"../../../../core/has.js\";import{subclass as n}from\"../../../../core/accessorSupport/decorators/subclass.js\";import{WebSocketConnection as a}from\"./WebSocketConnection.js\";import{executeQuery as c}from\"../../../../rest/query/operations/query.js\";import u from\"../../../../rest/support/Query.js\";import{fromJSON as l}from\"../../../../geometry/support/jsonUtils.js\";import f from\"../../../../geometry/SpatialReference.js\";const h=1e4,d={maxQueryDepth:5,maxRecordCountFactor:3};let g=class extends a{constructor(e){super({...d,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||s.getLogger(this).warn(\"GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.\");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:o}=this._config;this.destroyed||this._setFilter(r,o)}_onMessage(e){if(\"attributes\"in e){let o;try{o=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(o.geometry)}catch(t){return void s.getLogger(this).error(new r(\"geoevent-connection\",\"Failed to parse message\",t))}this.onFeature(o)}else this.onMessage(e)}async _fetchServiceDefinition(e){const r={f:\"json\",...this._config.customParameters},s=t(e.path,{query:r,responseType:\"json\"}),o=(await s).data;return this._serviceDefinition=o,o}_fetchWebSocketUrl(e,t){const r=e[0],{urls:s,token:o}=r,n=this._inferWebSocketBaseUrl(s);return i(`${n}/subscribe`,{outSR:\"\"+t.wkid,token:o})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes(\"wss\"))return t;return s.getLogger(this).error(new r(\"geoevent-connection\",\"Unable to infer WebSocket url\",e)),null}async _setFilter(e,t){const i=this._websocket;if(null==i||null==e&&null==t)return;const n=JSON.stringify({filter:this._serializeFilter(e,t)});let a=!1;const c=o(),u=()=>{a||(this.destroyed||this._websocket!==i||s.getLogger(this).error(new r(\"geoevent-connection\",\"Server timed out when setting filter\")),c.reject())},l=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(s.getLogger(this).error(new r(\"geoevent-connection\",\"Failed to set service filter\",t.error)),this._set(\"errorString\",`Could not set service filter - ${t.error}`),c.reject(t.error)),this._setWebSocketJSONParseHandler(i),a=!0,c.resolve())};return i.onmessage=l,i.send(n),setTimeout(u,h),c.promise}_serializeFilter(e,t){const o={};if(null==e&&null==t)return o;if(e?.geometry)try{const t=l(e.geometry);if(\"extent\"!==t.type)throw new r(`Expected extent but found type ${t.type}`);o.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(i){s.getLogger(this).error(new r(\"geoevent-connection\",\"Encountered an error when setting connection geometryDefinition\",i))}return e?.where&&\"1 = 1\"!==e.where&&\"1=1\"!==e.where&&(o.where=e.where),null!=t&&(o.outFields=t.join(\",\")),o}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,o=e.attributes[t],i=this._relatedFeatures.get(o);if(!i)return s.getLogger(this).warn(\"geoevent-connection\",\"Feature join failed. Is the join field configured correctly?\",e),e;const{attributes:n,geometry:a}=i;for(const r in n)e.attributes[r]=n[r];return a&&(e.geometry=a),e.geometry||e.centroid||s.getLogger(this).error(new r(\"geoevent-connection\",\"Found malformed feature - no geometry found\",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),s=this._queryArchive(t);await r;const o=await s;if(!o)return;for(const i of o.features)this.onFeature(this._enrich(i))}catch(e){s.getLogger(this).error(new r(\"geoevent-connection\",\"Encountered an error when querying buddy services\",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await import(\"../../../FeatureLayer.js\")).default)({url:e}),{capabilities:r}=await t.load(),s=r.query.supportsMaxRecordCountFactor,o=r.query.supportsPagination,i=r.query.supportsCentroid,n=this._config.maxRecordCountFactor,a=t.capabilities.query.maxRecordCount,l=s?a*n:a,h=new u;if(h.outFields=this._config.outFields??[\"*\"],h.where=this._config.filter?.where??\"1=1\",h.returnGeometry=!0,h.returnExceededLimitFeatures=!0,h.outSpatialReference=f.fromJSON(this._config.spatialReference),i&&(h.returnCentroid=!0),s&&(h.maxRecordCountFactor=n),o)return h.num=l,t.destroy(),this._queryPages(e,h);const d=await c(e,h,this._config.sourceSpatialReference);return t.destroy(),d.data}async _queryPages(e,t,r=[],s=0){t.start=null!=t.num?s*t.num:null;const{data:o}=await c(e,t,this._config.sourceSpatialReference);return o.exceededTransferLimit&&s<(this._config.maxQueryDepth??0)?(o.features.forEach((e=>r.push(e))),this._queryPages(e,t,r,s+1)):(r.forEach((e=>o.features.push(e))),o)}_addRelatedFeatures(e){const t=new Map,r=e.features,s=this._serviceDefinition.relatedFeatures.joinField;for(const o of r){const e=o.attributes[s];t.set(e,o)}this._relatedFeatures=t}};g=e([n(\"esri.layers.graphics.sources.connections.GeoEventConnection\")],g);const y=g;export{y as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../chunks/tslib.es6.js\";import{property as r}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/arrayUtils.js\";import\"../../core/has.js\";import{subclass as t}from\"../../core/accessorSupport/decorators/subclass.js\";import{getGeometryZScaler as o}from\"../../geometry/support/zscale.js\";import s from\"./StreamConnection.js\";let c=class extends s{constructor(e){super(),this.connectionStatus=\"connected\",this.errorString=null;const{geometryType:r,spatialReference:t,sourceSpatialReference:s}=e;this._featureZScaler=o(r,s,t)}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if(\"type\"in e)switch(e.type){case\"features\":case\"featureResult\":for(const r of e.features)null!=this._featureZScaler&&this._featureZScaler(r.geometry),this.onFeature(r)}this.onMessage(e)}};e([r()],c.prototype,\"connectionStatus\",void 0),e([r()],c.prototype,\"errorString\",void 0),c=e([t(\"esri.layers.support.ClientSideConnection\")],c);export{c as ClientSideConnection};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport e from\"./GeoEventConnection.js\";import{WebSocketConnection as t}from\"./WebSocketConnection.js\";import{ClientSideConnection as n}from\"../../../support/ClientSideConnection.js\";function o(o,r,s,i,c,a,m,p){const f={source:o,sourceSpatialReference:r,spatialReference:s,geometryType:i,filter:c,maxReconnectionAttempts:a,maxReconnectionInterval:m,customParameters:p};if(!o)return new n(f);return o.path.startsWith(\"wss://\")||o.path.startsWith(\"ws://\")?new t(f):new e(f)}export{o as createConnection};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{parseDate as t}from\"../../../../core/date.js\";import{isValid as n}from\"../../../../geometry/support/spatialReferenceUtils.js\";import{validateFieldValue as e,validationErrorToString as r,isNumericField as i,isStringField as o,isDateField as s,sanitizeNullFieldValue as l}from\"../../../support/fieldUtils.js\";class u{constructor(){this.code=null,this.description=null}}class c{constructor(t){this.error=new u,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=t}}function f(t){return new c(t)}class a{constructor(t){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=t}}function d(t){return new a(t)}const m=new Set;function p(t,n,i,o=!1){m.clear();for(const s in i){const l=t.get(s);if(!l)continue;const u=h(l,i[s]);if(m.add(l.name),l&&(o||l.editable)){const t=e(l,u);if(t)return f(r(t,l,u));n[l.name]=u}}for(const e of t?.requiredFields??[])if(!m.has(e.name))return f(`missing required field \"${e.name}\"`);return null}function g(n,e){if(n?.length)for(const{name:r}of n)\"string\"==typeof e[r]&&(e[r]=t(e[r]))}function h(n,e){let r=e;return i(n)&&\"string\"==typeof e?r=parseFloat(e):o(n)&&null!=e&&\"string\"!=typeof e?r=String(e):s(n)&&\"string\"==typeof e&&(r=t(e)),l(r)}let y;function w(t,e){if(!t||!n(e))return t;if(\"rings\"in t||\"paths\"in t){if(null==y)throw new TypeError(\"geometry engine not loaded\");return y.simplify(e,t)}return t}async function j(){return null==y&&(y=await import(\"../../../../geometry/geometryEngineJSON.js\")),y}async function I(t,e){!n(t)||\"esriGeometryPolygon\"!==e&&\"esriGeometryPolyline\"!==e||await j()}export{f as createFeatureEditErrorResult,d as createFeatureEditSuccessResult,I as loadGeometryEngineForSimplify,p as mixAttributes,g as parseStringDateFieldValues,w as simplify};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nconst n=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function o(o){return null!=o&&n.some((([n,t])=>o>=n&&o<=t))}export{o as isAxesOrderReversedForWkid};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport e from\"../../core/Error.js\";import{updateOrigins as t}from\"../../core/accessorSupport/originUtils.js\";import r from\"../../portal/Portal.js\";import o from\"../../portal/PortalItem.js\";import{createForItemWrite as a}from\"../../portal/support/jsonContext.js\";import{addTypeKeyword as i,TypeKeyword as n}from\"../../portal/support/portalItemUtils.js\";import{validateSaveAPIKey as s}from\"../../webdoc/saveAPIKeyUtils.js\";function l(t,r,o){const a=o(t);if(!a.isValid)throw new e(`${r}:invalid-parameters`,a.errorMessage,{layer:t})}async function p(e){const{layer:t,errorNamePrefix:r,validateLayer:o}=e;await t.load(),l(t,r,o)}function m(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function c(t){const{item:r,itemType:o,errorNamePrefix:a,layer:i,validateItem:n}=t;if(s(r),r.type!==o)throw new e(`${a}:portal-item-wrong-type`,`Portal item type should be \"${o}\"`,{item:r,layer:i});if(n){const t=n(r);if(!t.isValid)throw new e(`${a}:invalid-parameters`,t.errorMessage,{layer:i})}}function d(t){const{layer:r,errorNamePrefix:o}=t,{portalItem:a}=r;if(!a)throw new e(`${o}:portal-item-not-set`,m(r,\"requires the portalItem property to be set\"));if(!a.loaded)throw new e(`${o}:portal-item-not-loaded`,m(r,\"cannot be saved to a portal item that does not exist or is inaccessible\"));c({...t,item:a})}function u(e){const{newItem:t,itemType:a}=e;let i=o.from(t);return i.id&&(i=i.clone(),i.id=null),i.type??=a,i.portal??=r.getDefault(),c({...e,item:i}),i}function f(t,r){let o=(t.messages??[]).filter((({type:e})=>\"error\"===e)).map((({name:t,message:r,details:o})=>new e(t,r,o)));if(t.blockedRelativeUrls&&(o=o.concat(t.blockedRelativeUrls.map((t=>new e(\"url:unsupported\",`Relative url '${t}' is not supported`))))),r?.ignoreUnsupported&&(o=o.filter((({name:e})=>\"layer:unsupported\"!==e&&\"symbol:unsupported\"!==e&&\"symbol-layer:unsupported\"!==e&&\"property:unsupported\"!==e&&\"url:unsupported\"!==e))),o.length>0)throw new e(\"layer-write:unsupported\",\"Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information\",{errors:o})}async function y(e,t,r){\"beforeSave\"in e&&\"function\"==typeof e.beforeSave&&await e.beforeSave();const o=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),f(t,r),o}function w(e){i(e,n.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function v(e,t,r){const o=e.portal;await o.signIn(),await(o.user?.addItem({item:e,data:t,folder:r?.folder}))}async function I(e,r){const{layer:o,createItemData:i,createJSONContext:n,saveResources:s}=e;await p(e),d(e);const l=o.portalItem,m=n?n(l):a(l),c=await y(o,m,r),u=await i({layer:o,layerJSON:c},l);return w(l),await l.update({data:u}),t(m),await(s?.(l,m)),l}async function b(e,r){const{layer:o,createItemData:i,createJSONContext:n,setItemProperties:s,saveResources:l}=e;await p(e);const m=u(e),c=n?n(m):a(m),d=await y(o,c,r),f=await i({layer:o,layerJSON:d},m);return await s(o,m),w(m),await v(m,f,r),o.portalItem=m,t(c),await(l?.(m,c)),m}export{v as addItem,m as createErrorMessage,d as ensureItemConfig,l as ensureLayerConfig,y as getLayerJSON,u as getPortalItem,I as save,b as saveAs,w as setCommonItemProperties};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../chunks/tslib.es6.js\";import r from\"../../core/Accessor.js\";import{property as s}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/arrayUtils.js\";import\"../../core/has.js\";import{subclass as t}from\"../../core/accessorSupport/decorators/subclass.js\";const a={visible:\"visibleSublayers\"};let o=class extends r{constructor(e){super(e),this.scale=0}set layer(e){this._get(\"layer\")!==e&&(this._set(\"layer\",e),this.removeHandles(\"layer\"),e&&this.addHandles([e.sublayers.on(\"change\",(()=>this.notifyChange(\"visibleSublayers\"))),e.on(\"wms-sublayer-update\",(e=>this.notifyChange(a[e.propertyName])))],\"layer\"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty(\"layers\");const e=this.layer;return e&&e.commitProperty(\"imageTransparency\"),(this._get(\"version\")||0)+1}get visibleSublayers(){const{layer:e,scale:r}=this,s=e?.sublayers,t=[],a=e=>{const{minScale:s,maxScale:o,sublayers:l,visible:i}=e;i&&(0===r||(0===s||r<=s)&&(0===o||r>=o))&&(l?l.forEach(a):t.push(e))};return s?.forEach(a),t}toJSON(){const{layer:e,layers:r}=this,{imageFormat:s,imageTransparency:t,version:a}=e;return{format:s,request:\"GetMap\",service:\"WMS\",styles:\"\",transparent:t?\"TRUE\":\"FALSE\",version:a,layers:r}}};e([s()],o.prototype,\"layer\",null),e([s({readOnly:!0})],o.prototype,\"layers\",null),e([s({type:Number})],o.prototype,\"scale\",void 0),e([s({readOnly:!0})],o.prototype,\"version\",null),e([s({readOnly:!0})],o.prototype,\"visibleSublayers\",null),o=e([t(\"esri.layers.support.ExportWMSImageParameters\")],o);export{o as ExportWMSImageParameters};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{_ as o}from\"../../chunks/tslib.es6.js\";import r from\"../../core/Accessor.js\";import{property as e}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/arrayUtils.js\";import\"../../core/has.js\";import{subclass as t}from\"../../core/accessorSupport/decorators/subclass.js\";import s from\"../../geometry/Polygon.js\";import{projectOrLoad as n}from\"../../geometry/projection.js\";import{fromExtent as p}from\"../../geometry/support/aaBoundingRect.js\";import{normalizeCentralMeridianSync as l}from\"../../geometry/support/normalizeUtilsSync.js\";let i=class extends r{constructor(o){super(o)}get bounds(){const o=this.coords;return null==o?.extent?null:p(o.extent)}get coords(){const o=this.element.georeference?.coords;return n(o,this.spatialReference).geometry}get normalizedCoords(){return s.fromJSON(l(this.coords))}get normalizedBounds(){const o=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=o?p(o):null}};o([e()],i.prototype,\"spatialReference\",void 0),o([e()],i.prototype,\"element\",void 0),o([e()],i.prototype,\"bounds\",null),o([e()],i.prototype,\"coords\",null),o([e()],i.prototype,\"normalizedCoords\",null),o([e()],i.prototype,\"normalizedBounds\",null),i=o([t(\"esri.layers.support.MediaElementView\")],i);export{i as MediaElementView};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{fetchArcGISServiceJSON as e}from\"../../support/requestPresets.js\";async function t(t,r){const a=await e(t,r);y(a),n(a);const s={serviceJSON:a};if((a.currentVersion??0)<10.5)return s;const o=await e(t+\"/layers\",r);return y(o),n(o),s.layersJSON={layers:o.layers,tables:o.tables},s}function r(e){return\"Feature Layer\"===e.type||\"Oriented Imagery Layer\"===e.type}function a(e){return\"Table\"===e.type}function n(e){e.layers=e.layers?.filter(r),e.tables=e.tables?.filter(a)}function s(e){e.type||=\"Feature Layer\"}function o(e){e.type||=\"Table\"}function y(e){e.layers?.forEach(s),e.tables?.forEach(o)}export{t as fetchFeatureService};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport e from\"../../config.js\";import{id as o}from\"../../kernel.js\";import t from\"../../PopupTemplate.js\";import r from\"../../request.js\";import{clone as s}from\"../../core/lang.js\";import{addQueryParameters as n}from\"../../core/urlUtils.js\";import i from\"../../geometry/SpatialReference.js\";import{create as f,negativeInfinity as a,expandWithAABB as l,equals as u}from\"../../geometry/support/aaBoundingBox.js\";import{getBoundsXYZ as m}from\"../../geometry/support/boundsUtils.js\";import{fromJSON as p}from\"../../renderers/support/jsonUtils.js\";import y from\"../../rest/support/FeatureSet.js\";const c={esriGeometryPoint:\"points\",esriGeometryPolyline:\"polylines\",esriGeometryPolygon:\"polygons\"};function d(e){const o=e.folders||[],t=o.slice(),r=new Map,n=new Map,i=new Map,f=new Map,a=new Map,l={esriGeometryPoint:n,esriGeometryPolyline:i,esriGeometryPolygon:f};(e.featureCollection?.layers||[]).forEach((e=>{const o=s(e);o.featureSet.features=[];const t=e.featureSet.geometryType;r.set(t,o);const a=e.layerDefinition.objectIdField;\"esriGeometryPoint\"===t?h(n,a,e.featureSet.features):\"esriGeometryPolyline\"===t?h(i,a,e.featureSet.features):\"esriGeometryPolygon\"===t&&h(f,a,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{a.set(e.id,e)})),o.forEach((o=>{o.networkLinkIds.forEach((r=>{const s=P(r,o.id,e.networkLinks);s&&t.push(s)}))})),t.forEach((e=>{if(e.featureInfos){e.points=s(r.get(\"esriGeometryPoint\")),e.polylines=s(r.get(\"esriGeometryPolyline\")),e.polygons=s(r.get(\"esriGeometryPolygon\")),e.mapImages=[];for(const o of e.featureInfos)switch(o.type){case\"esriGeometryPoint\":case\"esriGeometryPolyline\":case\"esriGeometryPolygon\":{const t=l[o.type].get(o.id);t&&e[c[o.type]]?.featureSet.features.push(t);break}case\"GroundOverlay\":{const t=a.get(o.id);t&&e.mapImages.push(t);break}}e.fullExtent=j([e])}}));const u=j(t);return{folders:o,sublayers:t,extent:u}}function g(t,s,i,f){const a=o?.findCredential(t);t=n(t,{token:a?.token});const l=e.kmlServiceUrl;return r(l,{query:{url:t,model:\"simple\",folders:\"\",refresh:0!==i||void 0,outSR:JSON.stringify(s)},responseType:\"json\",signal:f})}function S(e,o,t=null,r=[]){const s=[],n={},i=o.sublayers,f=new Set(o.folders.map((e=>e.id)));return i.forEach((o=>{const i=new e;if(t?i.read(o,t):i.read(o),r.length&&f.has(i.id)&&(i.visible=r.includes(i.id)),n[o.id]=i,null!=o.parentFolderId&&-1!==o.parentFolderId){const e=n[o.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(i)}else s.unshift(i)})),s}function h(e,o,t){t.forEach((t=>{e.set(t.attributes[o],t)}))}function G(e,o){let t;return o.some((o=>o.id===e&&(t=o,!0))),t}function P(e,o,t){const r=G(e,t);return r&&(r.parentFolderId=o,r.networkLink=r),r}async function b(e){const o=y.fromJSON(e.featureSet).features,r=e.layerDefinition,s=p(r.drawingInfo.renderer),n=t.fromJSON(e.popupInfo),i=[];for(const t of o){const e=await s.getSymbolAsync(t);t.symbol=e,t.popupTemplate=n,t.visible=!0,i.push(t)}return i}function j(e){const o=f(a),t=f(a);for(const r of e){if(r.polygons?.featureSet?.features)for(const e of r.polygons.featureSet.features)m(o,e.geometry),l(t,o);if(r.polylines?.featureSet?.features)for(const e of r.polylines.featureSet.features)m(o,e.geometry),l(t,o);if(r.points?.featureSet?.features)for(const e of r.points.featureSet.features)m(o,e.geometry),l(t,o);if(r.mapImages)for(const e of r.mapImages)m(o,e.extent),l(t,o)}return u(t,a)?void 0:{xmin:t[0],ymin:t[1],zmin:t[2],xmax:t[3],ymax:t[4],zmax:t[5],spatialReference:i.WGS84}}export{j as computeExtent,g as fetchService,b as getGraphics,d as parseKML,S as sublayersFromJSON};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nfunction e(e){return t(e,\"notes\")}function r(e){return t(e,\"markup\")}function n(e){return t(e,\"route\")}function t(e,r){return!(!e.layerType||\"ArcGISFeatureLayer\"!==e.layerType)&&e.featureCollectionType===r}export{e as isMapNotesLayer,r as isMarkupLayer,n as isRouteLayer};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport e from\"../../core/Collection.js\";import\"../../core/has.js\";import{LayerLoadContext as r}from\"./LayerLoadContext.js\";import{layerLookupMap as a}from\"./lazyLayerLoader.js\";import t from\"../../portal/PortalItem.js\";import{isMapNotesLayer as y,isMarkupLayer as i,isRouteLayer as L}from\"../../portal/support/featureCollectionUtils.js\";import{selectLayerClassPath as o}from\"../../portal/support/portalLayers.js\";import{loadStyleRenderer as n}from\"../../renderers/support/styleUtils.js\";async function c(e,r,a){if(!r)return;const t=[];for(const i of r)t.push(g(i,a));const y=await Promise.allSettled(t);for(const i of y)\"rejected\"===i.status||i.value&&e.add(i.value)}const l={ArcGISDimensionLayer:\"DimensionLayer\",ArcGISFeatureLayer:\"FeatureLayer\",ArcGISImageServiceLayer:\"ImageryLayer\",ArcGISMapServiceLayer:\"MapImageLayer\",PointCloudLayer:\"PointCloudLayer\",ArcGISSceneServiceLayer:\"SceneLayer\",IntegratedMeshLayer:\"IntegratedMeshLayer\",OGCFeatureLayer:\"OGCFeatureLayer\",BuildingSceneLayer:\"BuildingSceneLayer\",ArcGISTiledElevationServiceLayer:\"ElevationLayer\",ArcGISTiledImageServiceLayer:\"ImageryTileLayer\",ArcGISTiledMapServiceLayer:\"TileLayer\",GroupLayer:\"GroupLayer\",GeoJSON:\"GeoJSONLayer\",WebTiledLayer:\"WebTileLayer\",CSV:\"CSVLayer\",VectorTileLayer:\"VectorTileLayer\",WFS:\"WFSLayer\",WMS:\"WMSLayer\",DefaultTileLayer:\"TileLayer\",KML:\"KMLLayer\",RasterDataLayer:\"UnsupportedLayer\",Voxel:\"VoxelLayer\",LineOfSightLayer:\"LineOfSightLayer\"},s={ArcGISTiledElevationServiceLayer:\"ElevationLayer\",DefaultTileLayer:\"ElevationLayer\",RasterDataElevationLayer:\"UnsupportedLayer\"},p={ArcGISFeatureLayer:\"FeatureLayer\"},S={ArcGISTiledMapServiceLayer:\"TileLayer\",ArcGISTiledImageServiceLayer:\"ImageryTileLayer\",OpenStreetMap:\"OpenStreetMapLayer\",WebTiledLayer:\"WebTileLayer\",VectorTileLayer:\"VectorTileLayer\",ArcGISImageServiceLayer:\"UnsupportedLayer\",WMS:\"UnsupportedLayer\",ArcGISMapServiceLayer:\"UnsupportedLayer\",ArcGISSceneServiceLayer:\"SceneLayer\",DefaultTileLayer:\"TileLayer\"},u={ArcGISAnnotationLayer:\"UnsupportedLayer\",ArcGISDimensionLayer:\"UnsupportedLayer\",ArcGISFeatureLayer:\"FeatureLayer\",ArcGISImageServiceLayer:\"ImageryLayer\",ArcGISImageServiceVectorLayer:\"ImageryLayer\",ArcGISMapServiceLayer:\"MapImageLayer\",ArcGISStreamLayer:\"StreamLayer\",ArcGISTiledImageServiceLayer:\"ImageryTileLayer\",ArcGISTiledMapServiceLayer:\"TileLayer\",BingMapsAerial:\"BingMapsLayer\",BingMapsRoad:\"BingMapsLayer\",BingMapsHybrid:\"BingMapsLayer\",CSV:\"CSVLayer\",DefaultTileLayer:\"TileLayer\",GeoRSS:\"GeoRSSLayer\",GeoJSON:\"GeoJSONLayer\",GroupLayer:\"GroupLayer\",KML:\"KMLLayer\",MediaLayer:\"MediaLayer\",OGCFeatureLayer:\"OGCFeatureLayer\",OrientedImageryLayer:\"OrientedImageryLayer\",SubtypeGroupLayer:\"SubtypeGroupLayer\",VectorTileLayer:\"VectorTileLayer\",WFS:\"WFSLayer\",WMS:\"WMSLayer\",WebTiledLayer:\"WebTileLayer\"},d={ArcGISFeatureLayer:\"FeatureLayer\"},I={ArcGISImageServiceLayer:\"ImageryLayer\",ArcGISImageServiceVectorLayer:\"ImageryLayer\",ArcGISMapServiceLayer:\"MapImageLayer\",ArcGISTiledImageServiceLayer:\"ImageryTileLayer\",ArcGISTiledMapServiceLayer:\"TileLayer\",OpenStreetMap:\"OpenStreetMapLayer\",VectorTileLayer:\"VectorTileLayer\",WebTiledLayer:\"WebTileLayer\",BingMapsAerial:\"BingMapsLayer\",BingMapsRoad:\"BingMapsLayer\",BingMapsHybrid:\"BingMapsLayer\",WMS:\"WMSLayer\",DefaultTileLayer:\"TileLayer\"},m={...u,LinkChartLayer:\"LinkChartLayer\"},f={...d},T={...I};async function g(e,r){return G(await M(e,r),e,r)}async function G(e,r,a){const t=new e;return t.read(r,a.context),\"group\"===t.type&&(\"GroupLayer\"===r.layerType?await w(t,r,a):v(r)?h(t,r,a.context):A(r)&&await C(t,r,a.context)),await n(t,a.context),t}async function M(e,n){const c=n.context,l=b(c);let s=e.layerType||e.type;!s&&n?.defaultLayerType&&(s=n.defaultLayerType);const p=l[s];let S=p?a[p]:a.UnknownLayer;if(v(e)){const y=c?.portal;if(e.itemId){const i=new t({id:e.itemId,portal:y});await i.load();const L=(await o(i,new r)).className||\"UnknownLayer\";S=a[L]}}else\"ArcGISFeatureLayer\"===s?y(e)||i(e)?S=a.MapNotesLayer:L(e)?S=a.RouteLayer:A(e)&&(S=a.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?S=a.WMTSLayer:\"WFS\"===s&&\"2.0.0\"!==e.wfsInfo?.version&&(S=a.UnsupportedLayer);return S()}function A(e){if(\"ArcGISFeatureLayer\"!==e.layerType||v(e))return!1;return(e.featureCollection?.layers?.length??0)>1}function v(e){return\"Feature Collection\"===e.type}function b(e){let r;switch(e.origin){case\"web-scene\":switch(e.layerContainerType){case\"basemap\":r=S;break;case\"ground\":r=s;break;case\"tables\":r=p;break;default:r=l}break;case\"link-chart\":switch(e.layerContainerType){case\"basemap\":r=T;break;case\"tables\":r=f;break;default:r=m}break;default:switch(e.layerContainerType){case\"basemap\":r=I;break;case\"tables\":r=d;break;default:r=u}}return r}async function w(r,a,t){const y=new e,i=c(y,Array.isArray(a.layers)?a.layers:[],t);try{try{if(await i,\"group\"===r.type)return r.layers.addMany(y),r}catch(L){r.destroy();for(const e of y)e.destroy();throw L}}catch(L){throw L}}function h(e,r,a){r.itemId&&(e.portalItem=new t({id:r.itemId,portal:a?.portal}),e.when((()=>{const t=t=>{const y=t.layerId;F(t,e,r,y,a);const i=r.featureCollection?.layers?.[y];i&&t.read(i,a)};e.layers?.forEach(t),e.tables?.forEach(t)})))}async function C(e,r,t){const y=a.FeatureLayer,i=await y(),L=r.featureCollection,o=L?.showLegend,n=L?.layers?.map(((a,y)=>{const L=new i;L.read(a,t);const n={...t,ignoreDefaults:!0};return F(L,e,r,y,n),null!=o&&L.read({showLegend:o},n),L}));e.layers.addMany(n??[])}function F(e,r,a,t,y){e.read({id:`${r.id}-sublayer-${t}`,visibility:a.visibleLayers?.includes(t)??!0},y)}export{w as populateGroupLayer,c as populateOperationalLayers};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport\"../../../geometry.js\";import e from\"./EphemeralBlockCache.js\";import{projectExtent as t,projectResolution as n,snapPyramid as o}from\"../rasterFunctions/rasterProjectionHelper.js\";import l from\"../../../geometry/Point.js\";const r=new Map,c=new e;function i(e,t){return null==t?e:`${e}?sliceId=${t}`}function u(e,t){const n={extent:null,rasterInfo:t,cache:new Map},o=r.get(e);return o?(o.push(n),o.length-1):(r.set(e,[n]),0)}function a(e,t){const n=r.get(e);n&&(n[t]=null,n.some((e=>null!=e))||r.delete(e))}function f(e){r.delete(e)}function s(e,t,n){const o=r.get(e);if(!o)return null==t?c.decreaseRefCount(e,n):0;if(null==t||null==o[t])return c.decreaseRefCount(e,n);const l=o[t]?.cache,i=l?.get(n);if(l&&i){if(i.refCount--,0===i.refCount){l.delete(n);for(let e=0;eu.isResolved=!0)).catch((()=>u.isRejected=!0)),i[t]?.cache.set(n,u)}function h(e,t,n){const o=r.get(e);o?null!=t&&null!=o[t]?o[t]?.cache.delete(n):c.deleteBlock(e,n):null==t&&c.deleteBlock(e,n)}function d(e,t){const n=r.get(e);return n?n[t]??null:null}function g(e,r,c,i,u,a,f=null){const s=d(e,r);if(!s)return;const m=s.extent,{cache:x,rasterInfo:h}=s;if(m&&m.xmin===c.xmin&&m.xmax===c.xmax&&m.ymin===c.ymin&&m.ymax===c.ymax)return;i=i??0;const g=c.clone().normalize(),{spatialReference:y,transform:p}=h,k=new Set;for(let d=0;d0?M.pyramidBlockWidth:M.blockWidth,b=s>0?M.pyramidBlockHeight:M.blockHeight,w=1,$=Math.max(0,Math.floor(C.x/v)-w),I=Math.max(0,Math.floor(C.y/b)-w),H=Math.floor((C.x+B-1)/v)+w,E=Math.floor((C.y+j-1)/b)+w;for(let t=I;t<=E;t++)for(let e=$;e<=H;e++)k.add(`${s}/${t}/${e}`)}x.forEach(((e,t)=>{if(!k.has(t)){const e=x.get(t);(null==e||e.isResolved||e.isRejected)&&x.delete(t)}})),s.extent={xmin:c.xmin,ymin:c.ymin,xmax:c.xmax,ymax:c.ymax}}export{s as decreaseRefCount,h as deleteBlock,f as deleteRaster,m as getBlock,i as getRasterId,x as putBlock,u as register,a as unregister,g as update};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nclass t{constructor(t=15e3,e=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=t,this._interval=Math.min(t,e)}decreaseRefCount(t,e){const s=t+\"/\"+e,r=this._cachedBlocks;if(r.has(s)){const t=r.get(s);return t.refCount--,t.refCount<=0&&(r.delete(s),t.controller&&t.controller.abort()),t.refCount}return 0}getBlock(t,e){const s=t+\"/\"+e,r=this._cachedBlocks;if(r.has(s)){const t=r.get(s);return t.ts=Date.now(),t.refCount++,r.delete(s),r.set(s,t),t.block}return null}putBlock(t,e,s,r){const i=this._cachedBlocks,c=t+\"/\"+e;if(i.has(c)){const t=i.get(c);t.ts=Date.now(),t.refCount++}else i.set(c,{block:s,ts:Date.now(),refCount:1,controller:r});this._trim(),this._updateTimer()}deleteBlock(t,e){const s=this._cachedBlocks,r=t+\"/\"+e;s.has(r)&&s.delete(r)}updateMaxSize(t){this._size=t,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const t=this._cachedBlocks;this._timer=setInterval((()=>{const e=Array.from(t),s=Date.now();for(let r=0;r=t.size)return;const e=Array.from(t);for(let s=0;s{const e=t.data;if(e.hasOwnProperty(\"extent\"))return t;if(e.features)throw new Error(u);if(e.hasOwnProperty(\"count\"))throw new Error(u);return t}))}function a(t,e,r){return null!=e.timeExtent&&e.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):c(t,e,\"json\",r,{returnIdsOnly:!0,returnCountOnly:!0})}function c(n,i,l,u={},p={}){const m=\"string\"==typeof n?e(n):n,d=i.geometry?[i.geometry]:[];return u.responseType=\"pbf\"===l?\"array-buffer\":\"json\",o(d,null,u).then((e=>{const n=e?.[0];null!=n&&((i=i.clone()).geometry=n);const o=s({...m.query,f:l,...p,...y(i,p)});return t(r(m.path,\"queryTopFeatures\"),{...u,query:{...o,...u.query}})}))}export{a as executeQueryForTopCount,d as executeQueryForTopExtents,m as executeQueryForTopIds,p as executeTopFeaturesQuery,y as queryToQueryStringParameters};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport e from\"../request.js\";async function t(t,r){const{data:a}=await e(t,{responseType:\"image\",...r});return a}export{t as requestImage};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{loadFont as e}from\"../../core/fontUtils.js\";import{getImageData as t}from\"../../core/imageUtils.js\";class i{constructor(){this._resourceMap=new Map,this._inFlightResourceMap=new Map,this.geometryEngine=null,this.geometryEnginePromise=null}destroy(){this._inFlightResourceMap.clear(),this._resourceMap.clear()}getResource(e){return this._resourceMap.get(e)??null}async fetchResource(e,i){const h=this._resourceMap.get(e);if(h)return{width:h.width,height:h.height};let r=this._inFlightResourceMap.get(e);return r?r.then((e=>({width:e.width,height:e.height}))):(r=t(e,i),this._inFlightResourceMap.set(e,r),r.then((t=>(this._inFlightResourceMap.delete(e),this._resourceMap.set(e,t),{width:t.width,height:t.height})),(()=>({width:0,height:0}))))}deleteResource(e){this._inFlightResourceMap.delete(e),this._resourceMap.delete(e)}loadFont(t){return e(t)}}export{i as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{isSymbol3D as t}from\"../../symbols.js\";import{isDevEnvironment as e,adjustStaticAGOUrl as r}from\"../../core/devEnvironmentUtils.js\";import l from\"../../core/Error.js\";import{urlToObject as o,removeFile as n}from\"../../core/urlUtils.js\";import s from\"../../portal/Portal.js\";import{f as m}from\"../../chunks/persistableUrlUtils.js\";import{fromJSON as i}from\"./jsonUtils.js\";import a from\"./StyleOrigin.js\";import{fetchStyle as u,requestJSON as p,makeCIMSymbolRef as f,Style2DUrlTemplate as y,symbolUrlFromStyleItem as c}from\"./styleUtils.js\";import{Thumbnail as b}from\"./Thumbnail.js\";function g(t,e,r,o){const n=t.name;return null==n?Promise.reject(new l(\"symbolstyleutils:style-symbol-reference-name-missing\",\"Missing name in style symbol reference\")):t.styleName&&\"Esri2DPointSymbolsStyle\"===t.styleName?d(n,e,o):u(t,e,o).then((t=>h(t,n,e,r,c,o)))}function j(t,e){return e.items.find((e=>e.name===t))}function h(u,y,c,g,h,d){const U=null!=c?.portal?c.portal:s.getDefault(),N={portal:U,url:o(u.baseUrl),origin:\"portal-item\"},w=j(y,u.data);if(!w){const t=`The symbol name '${y}' could not be found`;return Promise.reject(new l(\"symbolstyleutils:symbol-name-not-found\",t,{symbolName:y}))}let S=m(h(w,g),N),D=w.thumbnail?.href??null;const O=w.thumbnail?.imageData;e()&&(S=r(S)??\"\",D=r(D));const P={portal:U,url:o(n(S)),origin:\"portal-item\"};return p(S,d).then((e=>{const r=\"cimRef\"===g?f(e.data):e.data,l=i(r,P);if(l&&t(l)){if(D){const t=m(D,N);l.thumbnail=new b({url:t})}else O&&(l.thumbnail=new b({url:`data:image/png;base64,${O}`}));u.styleUrl?l.styleOrigin=new a({portal:c.portal,styleUrl:u.styleUrl,name:y}):u.styleName&&(l.styleOrigin=new a({portal:c.portal,styleName:u.styleName,name:y}))}return l}))}function d(t,e,r){const l=y.replaceAll(/\\{SymbolName\\}/gi,t),m=null!=e.portal?e.portal:s.getDefault();return p(l,r).then((t=>{const e=f(t.data);return i(e,{portal:m,url:o(n(l)),origin:\"portal-item\"})}))}export{h as fetchSymbolFromStyle,j as getStyleItemFromStyle,g as resolveWebStyleSymbol};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{brushes as e}from\"./brushes.js\";import{WGLDrawPhase as r}from\"./webgl/enums.js\";import s from\"./webgl/WGLContainer.js\";class a extends s{constructor(){super(...arguments),this._hasCrossfade=!1}get requiresDedicatedFBO(){return super.requiresDedicatedFBO||this._hasCrossfade}beforeRender(e){super.beforeRender(e),this._manageFade()}prepareRenderPasses(s){const a=s.registerRenderPass({name:\"bitmap\",brushes:[e.bitmap],target:()=>this.children,drawPhase:r.MAP});return[...super.prepareRenderPasses(s),a]}_manageFade(){this.children.reduce(((e,r)=>e+(r.inFadeTransition?1:0)),0)>=2?(this.children.forEach((e=>e.blendFunction=\"additive\")),this._hasCrossfade=!0):(this.children.forEach((e=>e.blendFunction=\"standard\")),this._hasCrossfade=!1)}}export{a as BitmapContainer};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../../chunks/tslib.es6.js\";import\"../../../core/Logger.js\";import\"../../../core/accessorSupport/ensureType.js\";import\"../../../core/arrayUtils.js\";import\"../../../core/has.js\";import\"../../../core/Error.js\";import{subclass as i}from\"../../../core/accessorSupport/decorators/subclass.js\";import{BitmapTileContainer as t}from\"../engine/BitmapTileContainer.js\";const r=r=>{let s=class extends r{attach(){this.view.timeline.record(`${this.layer.title} (BitmapTileLayer) Attach`),this._bitmapView=new t(this._tileInfoView),this.container.addChild(this._bitmapView)}detach(){this.container.removeChild(this._bitmapView),this._bitmapView?.removeAllChildren(),this._bitmapView=null}};return s=e([i(\"esri.views.2d.layers.BitmapTileLayerView2D\")],s),s};export{r as BitmapTileLayerView2D};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport t from\"../../../../core/CircularArray.js\";import e from\"../../../../core/Evented.js\";import\"../../../../core/has.js\";import{r as s}from\"../../../../chunks/rbush.js\";import{create as a,fromRectValues as r}from\"../../../../geometry/support/aaBoundingBox.js\";import{Store2D as n}from\"./Store2D.js\";import{FeatureSetReaderIndirect as i}from\"./support/FeatureSetReaderPBFIndirect.js\";const o=a();function d(t,e){return t<<16|e}function h(t){return(4294901760&t)>>>16}function c(t){return 65535&t}const I={getObjectId:t=>t.getObjectId(),getAttributes:t=>t.readAttributes(),getAttribute:(t,e)=>t.readAttribute(e),getAttributeAsTimestamp:(t,e)=>t.readAttributeAsTimestamp(e),cloneWithGeometry:(t,e)=>t,getGeometry:t=>t.readHydratedGeometry(),getCentroid:(t,e)=>t.readCentroid()};class u extends n{constructor(a,r,n){super(a,r),this.featureAdapter=I,this.events=new e,this._featureSetsByInstance=new Map,this._objectIdToDisplayId=new Map,this._spatialIndexInvalid=!0,this._indexSearchCache=new t(50),this._index=s(9,(t=>({minX:this._storage.getXMin(t),minY:this._storage.getYMin(t),maxX:this._storage.getXMax(t),maxY:this._storage.getYMax(t)}))),this.mode=n}get storeStatistics(){let t=0,e=0,s=0;return this.forEach((a=>{const r=a.readGeometry();r&&(e+=r.isPoint?1:r.lengths.reduce(((t,e)=>t+e),0),s+=r.isPoint?1:r.lengths.length,t+=1)})),{featureCount:t,vertexCount:e,ringCount:s}}hasInstance(t){return this._featureSetsByInstance.has(t)}onTileData(t,e,s){if(null==e.addOrUpdate)return e;if(e.addOrUpdate.attachStorage(this._storage),\"snapshot\"===this.mode){const a=e.addOrUpdate.getCursor();for(;a.next();){const e=a.getDisplayId();this.setComputedAttributes(this._storage,a,e,t.scale,s)}return e}this._featureSetsByInstance.set(e.addOrUpdate.instance,e.addOrUpdate);const a=e.addOrUpdate.getCursor();for(;a.next();)this._insertFeature(a,t.scale,s);return this._spatialIndexInvalid=!0,this.events.emit(\"changed\"),e}search(t){this._rebuildIndex();const e=t.id,s=this._indexSearchCache.find((t=>t.tileId===e));if(null!=s)return s.readers;const a=new Map,r=this._searchIndex(t.bounds),n=[];for(const i of r){const t=this._storage.getInstanceId(i),e=h(t),s=c(t);a.has(e)||a.set(e,[]);a.get(e).push(s)}return a.forEach(((t,e)=>{const s=this._featureSetsByInstance.get(e);n.push(i.from(s,t))})),this._indexSearchCache.enqueue({tileId:e,readers:n}),n}insert(t){const e=t.getCursor(),s=this._storage;for(;e.next();){const t=d(e.instance,e.getIndex()),a=e.getObjectId(),r=this._objectIdToDisplayId.get(a)??this._storage.createDisplayId();e.setDisplayId(r),s.setInstanceId(r,t),this._objectIdToDisplayId.set(a,r)}this._featureSetsByInstance.set(t.instance,t),this._spatialIndexInvalid=!0}remove(t){const e=this._objectIdToDisplayId.get(t);if(!e)return;const s=this._storage.getInstanceId(e),a=c(s),r=h(s),n=this._featureSetsByInstance.get(r);this._objectIdToDisplayId.delete(t),this._storage.releaseDisplayId(e),n.removeAtIndex(a),n.isEmpty&&this._featureSetsByInstance.delete(r),this._spatialIndexInvalid=!0}forEach(t){this._objectIdToDisplayId.forEach((e=>{const s=this._storage.getInstanceId(e),a=this._lookupFeature(s);t(a)}))}forEachUnsafe(t){this._objectIdToDisplayId.forEach((e=>{const s=this._storage.getInstanceId(e),a=h(s),r=c(s),n=this._getFeatureSet(a);n.setIndex(r),t(n)}))}forEachInBounds(t,e){const s=this._searchIndex(t);for(const a of s){e(this.lookupFeatureByDisplayId(a,this._storage))}}forEachBounds(t,e){this._rebuildIndex();for(const s of t){if(!s.readGeometry())continue;const t=s.getDisplayId();r(o,this._storage.getXMin(t),this._storage.getYMin(t),this._storage.getXMax(t),this._storage.getYMax(t)),e(o)}}sweepFeatures(t,e,s){this._spatialIndexInvalid=!0,this._objectIdToDisplayId.forEach(((a,r)=>{t.has(a)||(e.releaseDisplayId(a),s&&s.unsetAttributeData(a),this._objectIdToDisplayId.delete(r))})),this.events.emit(\"changed\")}sweepFeatureSets(t){this._spatialIndexInvalid=!0,this._featureSetsByInstance.forEach(((e,s)=>{t.has(s)||this._featureSetsByInstance.delete(s)}))}lookupObjectId(t,e){const s=this.lookupFeatureByDisplayId(t,e);return null==s?null:s.getObjectId()}lookupDisplayId(t){return this._objectIdToDisplayId.get(t)}lookupFeatureByDisplayId(t,e){const s=e.getInstanceId(t);return this._lookupFeature(s)}lookupByDisplayIdUnsafe(t){const e=this._storage.getInstanceId(t),s=h(e),a=c(e),r=this._getFeatureSet(s);return r?(r.setIndex(a),r):null}_insertFeature(t,e,s){const a=this._storage,r=t.getObjectId(),n=d(t.instance,t.getIndex());a.getInstanceId(t.getDisplayId());let i=this._objectIdToDisplayId.get(r);i||(i=a.createDisplayId(),this._objectIdToDisplayId.set(r,i),this._spatialIndexInvalid=!0),t.setDisplayId(i),a.setInstanceId(i,n),this.setComputedAttributes(a,t,i,e,s)}_searchIndex(t){this._rebuildIndex();const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this._index.search(e)}_rebuildIndex(){if(!this._spatialIndexInvalid)return;const t=[];\"snapshot\"===this.mode?this._featureSetsByInstance.forEach((e=>{const s=e.getCursor();for(;s.next();){const e=s.getDisplayId();this._storage.setBounds(e,s)&&t.push(e)}})):this._objectIdToDisplayId.forEach((e=>{const s=this._storage.getInstanceId(e);this._storage.setBounds(e,this._lookupFeature(s))&&t.push(e)})),this._index.clear(),this._index.load(t),this._indexSearchCache.clear(),this._spatialIndexInvalid=!1}_lookupFeature(t){const e=h(t),s=this._getFeatureSet(e);if(!s)return;const a=s.getCursor(),r=c(t);return a.setIndex(r),a}_getFeatureSet(t){return this._featureSetsByInstance.get(t)}}export{u as FeatureStore2D,I as featureAdapter};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport has from\"../../../../core/has.js\";import{diff as e,hasDiff as s}from\"../../../../core/accessorSupport/diffUtils.js\";import{createRendererExpression as t}from\"../../../../support/arcadeOnDemand.js\";import i from\"../../arcade/callExpressionWithCursor.js\";class a{constructor(e,s){this._canCacheExpressionValue=!1,this._sourceInfo=e,this._storage=s,this._bitsets={computed:s.getBitset(s.createBitset())}}get storage(){return this._storage}invalidate(){this._bitsets.computed.clear()}async updateSchema(t,i){const a=e(this._schema,i);if(this._schema=i,!i||null==a||!s(a,\"attributes\"))return;has(\"esri-2d-update-debug\")&&console.debug(\"Applying Update - Store:\",a),this._bitsets.computed.clear(),t.targets[i.name]=!0;const r=i.attributes,o=[],c=[];for(const e in r){const s=r[e];switch(s.type){case\"field\":break;case\"expression\":o.push(this._createArcadeComputedField(s));break;case\"label-expression\":o.push(this._createLabelArcadeComputedField(s));break;case\"statistic\":c.push(s)}}this._computedFields=await Promise.all(o),this._canCacheExpressionValue=!this._computedFields.some((e=>\"expression\"===e.type&&null!=e.expression&&e.expression.referencesScale())),this._statisticFields=c}setComputedAttributes(e,s,t,i,a){const r=this._bitsets.computed;if(!this._canCacheExpressionValue||!r.has(t)){r.set(t);for(const r of this._computedFields){const o=this._evaluateField(s,r,i,a);switch(r.resultType){case\"numeric\":e.setComputedNumericAtIndex(t,r.fieldIndex,o);break;case\"string\":e.setComputedStringAtIndex(t,r.fieldIndex,o)}}}}async _createArcadeComputedField(e){const s=this._sourceInfo.spatialReference,i=this._sourceInfo.fieldsIndex;return{...e,expression:await t(e.valueExpression,s,i)}}async _createLabelArcadeComputedField(e){const s=this._sourceInfo.spatialReference,t=this._sourceInfo.fieldsIndex,{createLabelFunction:i}=await import(\"../../../../layers/support/labelFormatUtils.js\"),a=await i(e.label,t,s);return{...e,builder:a}}_evaluateField(e,s,t,a){switch(s.type){case\"label-expression\":{const t=e.readArcadeFeature();return s.builder.evaluate(t,a)||\"\"}case\"expression\":{const{expression:r}=s;return i(r,e,{$view:{scale:t,timeZone:a}})}}}}export{a as Store2D};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport e from\"../../../core/Logger.js\";function r(r,t,a){if(null==r)return null;const n=t.readArcadeFeature();t.contextTimeZone=a.$view?.timeZone;try{return r.evaluate({...a,$feature:n},r.services)}catch(u){return e.getLogger(\"esri.views.2d.support.arcadeOnDemand\").warn(\"Feature arcade evaluation failed:\",u),null}}export{r as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../../../../chunks/tslib.es6.js\";import r from\"../../../../../core/Accessor.js\";import{property as t}from\"../../../../../core/accessorSupport/decorators/property.js\";import\"../../../../../core/accessorSupport/ensureType.js\";import\"../../../../../core/arrayUtils.js\";import\"../../../../../core/has.js\";import{subclass as o}from\"../../../../../core/accessorSupport/decorators/subclass.js\";let s=class extends r{initialize(){}destroy(){}get supportsTileUpdates(){return!1}get spatialReference(){const e=this.tileStore.tileScheme.spatialReference;return e&&e.toJSON()||null}};e([t({readOnly:!0})],s.prototype,\"supportsTileUpdates\",null),e([t({constructOnly:!0})],s.prototype,\"remoteClient\",void 0),e([t({constructOnly:!0})],s.prototype,\"service\",void 0),e([t()],s.prototype,\"spatialReference\",null),e([t({constructOnly:!0})],s.prototype,\"tileInfo\",void 0),e([t({constructOnly:!0})],s.prototype,\"tileStore\",void 0),s=e([o(\"esri.views.2d.layers.features.processors.BaseProcessor\")],s);const p=s;export{p as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{FeatureSetReader as e}from\"./FeatureSetReader.js\";class r extends e{static from(e,t){return new r(e.copy(),t)}constructor(r,t){super(e.createInstance(),r.fullSchema()),this._currentIndex=-1,this._reader=r,this._indices=t}get fields(){return this._reader.fields}get hasNext(){return this._currentIndex+1{if(o(e),!t.stationary||this.destroyed)return;const i=t.state,s=l(i.spatialReference),a=this.hidpi?t.pixelRatio:1,p=this.imageNormalizationSupported&&i.worldScreenWidth&&i.worldScreenWidthn||Math.floor(x[1]*a)>m,c=s&&(i.extent.xmins.valid[1]),u=!this.imageNormalizationSupported&&c,g=!h&&!u,f=this.imageRotationSupported?i.rotation:0,y=this.container.children.slice();if(g){const t=p?i.paddedViewState.center:i.center;this._imagePromise&&console.error(\"Image promise was not defined!\"),this._imagePromise=this._singleExport(i,x,t,i.resolution,f,a,e)}else{let t=Math.min(n,m);u&&(t=Math.min(i.worldScreenWidth,t)),this._imagePromise=this._tiledExport(i,t,a,e)}try{const t=await this._imagePromise??[];o(e);const i=[];if(this._imagePromise=null,this.destroyed)return;this.bitmaps=t;for(const e of y)t.includes(e)||i.push(e.fadeOut().then((()=>{e.remove(),e.destroy()})));for(const e of t)i.push(e.fadeIn());await Promise.all(i)}catch(S){this._imagePromise=null,r(S)}}),5e3),this.updateExports=i((async t=>{const e=[];for(const i of this.container.children){if(!i.visible||!i.stage)return;e.push(t(i).then((()=>{i.invalidateTexture(),i.requestRender()})))}this._imagePromise=s(e).then((()=>this._imagePromise=null)),await this._imagePromise}))}destroy(){this.bitmaps.forEach((t=>t.destroy())),this.bitmaps=[]}get updating(){return!this.destroyed&&null!==this._imagePromise}async _export(t,e,i,r,s,a){const p=await this.fetchSource(t,Math.floor(e*s),Math.floor(i*s),{rotation:r,pixelRatio:s,signal:a});o(a);const n=new u(null,!0);return n.x=t.xmin,n.y=t.ymax,n.resolution=t.width/e,n.rotation=r,n.pixelRatio=s,n.opacity=0,this.container.addChild(n),await n.setSourceAsync(p,a),o(a),n}async _singleExport(t,e,i,o,r,s,a){c(y,i,o,e);const p=m(y,t.spatialReference);return[await this._export(p,e[0],e[1],r,s,a)]}_tiledExport(t,e,i,o){const r=h.create({size:e,spatialReference:t.spatialReference,scales:[t.scale]}),s=new g(r),a=s.getTileCoverage(t);if(!a)return null;const p=[];return a.forEach(((r,a,n,l)=>{S.set(r,a,n,0),s.getTileBounds(y,S);const h=m(y,t.spatialReference);p.push(this._export(h,e,e,0,i,o).then((t=>(0!==l&&(S.set(r,a,n,l),s.getTileBounds(y,S),t.x=y[0],t.y=y[3]),t))))})),Promise.all(p)}};t([a()],w.prototype,\"_imagePromise\",void 0),t([a()],w.prototype,\"bitmaps\",void 0),t([a()],w.prototype,\"container\",void 0),t([a()],w.prototype,\"fetchSource\",void 0),t([a()],w.prototype,\"hidpi\",void 0),t([a()],w.prototype,\"imageMaxWidth\",void 0),t([a()],w.prototype,\"imageMaxHeight\",void 0),t([a()],w.prototype,\"imageRotationSupported\",void 0),t([a()],w.prototype,\"imageNormalizationSupported\",void 0),t([a()],w.prototype,\"requestUpdate\",void 0),t([a()],w.prototype,\"updating\",null),w=t([p(\"esri.views.2d.layers.support.ExportStrategy\")],w);const v=w;export{v as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nfunction e(e){return e instanceof HTMLImageElement?e.naturalWidth:e.width}function t(e){return e instanceof HTMLImageElement?e.naturalHeight:e.height}function n(n,l,r,u){if(r.level===u.level)return l;const i=n.tileInfo.size,a=n.getTileResolution(r.level),c=n.getTileResolution(u.level);let g=n.getLODInfoAt(u.level);const h=g.getXForColumn(u.col),d=g.getYForRow(u.row);g=n.getLODInfoAt(r.level);const f=g.getXForColumn(r.col),s=g.getYForRow(r.row),m=e(l)/i[0],v=t(l)/i[1],w=Math.round(m*((h-f)/a)),I=Math.round(v*(-(d-s)/a)),M=Math.round(m*i[0]*(c/a)),F=Math.round(v*i[1]*(c/a)),L=o(i);return L.getContext(\"2d\").drawImage(l,w,I,M,F,0,0,i[0],i[1]),L}function o(e){const t=document.createElement(\"canvas\");return[t.width,t.height]=e,t}export{o as createBlankImage,n as resampleImage};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport{Z as e}from\"../../chunks/vec2f64.js\";import{ContextType as t}from\"./contextUtils.js\";import{PixelType as n,SizedPixelFormat as r,PixelFormat as a,TextureSamplingMode as i,TextureWrapMode as o,UniformType as s}from\"./enums.js\";import{Texture as u}from\"./Texture.js\";import{TextureDescriptor as f}from\"./TextureDescriptor.js\";function c(e,s,c=\"nearest\",m=!1){const l=!(m&&\"u8\"===s.pixelType),_=l?n.FLOAT:n.UNSIGNED_BYTE,p=null==s.pixels||0===s.pixels.length?null:l?s.getAsRGBAFloat():s.getAsRGBA(),g=e.capabilities.textureFloat?.textureFloatLinear,A=new f;return A.width=s.width,A.height=s.height,A.internalFormat=e.type===t.WEBGL2&&l?r.RGBA32F:a.RGBA,A.samplingMode=!g||\"bilinear\"!==c&&\"cubic\"!==c?i.NEAREST:i.LINEAR,A.dataType=_,A.wrapMode=o.CLAMP_TO_EDGE,new u(e,A,p)}function m(e,s){const{spacing:c,offsets:m,coefficients:l,size:[_,p]}=s,g=c[0]>1,A=new f;A.width=g?4*_:_,A.height=p,A.internalFormat=e.type===t.WEBGL2?r.RGBA32F:a.RGBA,A.dataType=n.FLOAT,A.samplingMode=i.NEAREST,A.wrapMode=o.CLAMP_TO_EDGE;const T=new Float32Array(g?_*p*16:2*m.length);if(g&&null!=l)for(let t=0,n=0;t{const a=t.get(r)||t.get(r+\"[0]\");a&&x(e,r,n[r],a)}))}function O(e,t,n,r){n.length===r.length&&(r.some((e=>null==e))||n.some((e=>null==e))||n.forEach(((n,a)=>{t.setUniform1i(n,a),e.bindTexture(r[a],a)})))}function x(e,t,n,r){if(null===r||null==n)return!1;const{info:a}=r;switch(a.type){case s.FLOAT:a.size>1?e.setUniform1fv(t,n):e.setUniform1f(t,n);break;case s.FLOAT_VEC2:e.setUniform2fv(t,n);break;case s.FLOAT_VEC3:e.setUniform3fv(t,n);break;case s.FLOAT_VEC4:e.setUniform4fv(t,n);break;case s.FLOAT_MAT3:e.setUniformMatrix3fv(t,n);break;case s.FLOAT_MAT4:e.setUniformMatrix4fv(t,n);break;case s.INT:a.size>1?e.setUniform1iv(t,n):e.setUniform1i(t,n);break;case s.BOOL:e.setUniform1i(t,n?1:0);break;case s.INT_VEC2:case s.BOOL_VEC2:e.setUniform2iv(t,n);break;case s.INT_VEC3:case s.BOOL_VEC3:e.setUniform3iv(t,n);break;case s.INT_VEC4:case s.BOOL_VEC4:e.setUniform4iv(t,n);break;default:return!1}return!0}export{l as createColormapTexture,c as createRasterTexture,m as createTransformTexture,g as getBasicGridUniforms,p as getColormapUniforms,_ as getCommonUniforms,T as getShadedReliefUniforms,A as getStretchUniforms,h as getUniformLocationInfos,O as setTextures,E as setUniforms};\n","/*!\n * All material copyright ESRI, All Rights Reserved, unless otherwise specified.\n * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.\n * v1.10.0\n */\nimport { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client/index.js';\nimport { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';\nimport { c as componentFocusable, a as setUpLoadableComponent, s as setComponentLoaded } from './loadable.js';\nimport { c as connectLocalized, d as disconnectLocalized } from './locale.js';\nimport { u as updateMessages, c as connectMessages, d as disconnectMessages, s as setUpMessages } from './t9n.js';\nimport { S as SLOTS$1, d as defineCustomElement$4 } from './action-menu.js';\nimport { e as slotChangeHasAssignedElement } from './dom.js';\nimport { d as defineCustomElement$5 } from './action.js';\nimport { d as defineCustomElement$3 } from './icon.js';\nimport { d as defineCustomElement$2 } from './loader.js';\nimport { d as defineCustomElement$1 } from './popover.js';\n\nconst SLOTS = {\n menuActions: \"menu-actions\",\n menuTooltip: \"menu-tooltip\",\n};\nconst ICONS = {\n menu: \"ellipsis\",\n};\nconst CSS = {\n container: \"container\",\n};\n\nconst actionGroupCss = \":host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:flex;flex-direction:column;padding:0px;--calcite-action-group-columns:3;--calcite-action-group-gap:1px;--calcite-action-group-padding:1px}.container{display:flex;flex-grow:1;flex-direction:column}:host([columns=\\\"1\\\"]){--calcite-action-group-columns:1}:host([columns=\\\"2\\\"]){--calcite-action-group-columns:2}:host([columns=\\\"3\\\"]){--calcite-action-group-columns:3}:host([columns=\\\"4\\\"]){--calcite-action-group-columns:4}:host([columns=\\\"5\\\"]){--calcite-action-group-columns:5}:host([columns=\\\"6\\\"]){--calcite-action-group-columns:6}:host(:first-child){padding-block-start:0px}:host([layout=horizontal]),:host([layout=horizontal]) .container{flex-direction:row}:host([layout=grid]){display:grid}:host([layout=grid]) .container{display:grid;place-content:stretch;background-color:var(--calcite-ui-background);gap:var(--calcite-action-group-gap);padding:var(--calcite-action-group-gap);grid-template-columns:repeat(var(--calcite-action-group-columns), auto)}:host([hidden]){display:none}[hidden]{display:none}\";\n\nconst ActionGroup = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n // --------------------------------------------------------------------------\n //\n // Private Methods\n //\n // --------------------------------------------------------------------------\n this.setMenuOpen = (event) => {\n this.menuOpen = !!event.target.open;\n };\n this.handleMenuActionsSlotChange = (event) => {\n this.hasMenuActions = slotChangeHasAssignedElement(event);\n };\n this.expanded = false;\n this.label = undefined;\n this.layout = \"vertical\";\n this.columns = undefined;\n this.menuOpen = false;\n this.overlayPositioning = \"absolute\";\n this.scale = undefined;\n this.messages = undefined;\n this.messageOverrides = undefined;\n this.effectiveLocale = \"\";\n this.defaultMessages = undefined;\n this.hasMenuActions = false;\n }\n expandedHandler() {\n this.menuOpen = false;\n }\n onMessagesChange() {\n /* wired up by t9n util */\n }\n effectiveLocaleChange() {\n updateMessages(this, this.effectiveLocale);\n }\n //--------------------------------------------------------------------------\n //\n // Public Methods\n //\n //--------------------------------------------------------------------------\n /** Sets focus on the component's first focusable element. */\n async setFocus() {\n await componentFocusable(this);\n this.el.focus();\n }\n // --------------------------------------------------------------------------\n //\n // Lifecycle\n //\n // --------------------------------------------------------------------------\n connectedCallback() {\n connectLocalized(this);\n connectMessages(this);\n connectConditionalSlotComponent(this);\n }\n disconnectedCallback() {\n disconnectLocalized(this);\n disconnectMessages(this);\n disconnectConditionalSlotComponent(this);\n }\n async componentWillLoad() {\n setUpLoadableComponent(this);\n await setUpMessages(this);\n }\n componentDidLoad() {\n setComponentLoaded(this);\n }\n // --------------------------------------------------------------------------\n //\n // Component Methods\n //\n // --------------------------------------------------------------------------\n renderMenu() {\n const { expanded, menuOpen, scale, layout, messages, overlayPositioning, hasMenuActions } = this;\n return (h(\"calcite-action-menu\", { expanded: expanded, flipPlacements: [\"left\", \"right\"], hidden: !hasMenuActions, label: messages.more, onCalciteActionMenuOpen: this.setMenuOpen, open: menuOpen, overlayPositioning: overlayPositioning, placement: layout === \"horizontal\" ? \"bottom-start\" : \"leading-start\", scale: scale }, h(\"calcite-action\", { icon: ICONS.menu, scale: scale, slot: SLOTS$1.trigger, text: messages.more, textEnabled: expanded }), h(\"slot\", { name: SLOTS.menuActions, onSlotchange: this.handleMenuActionsSlotChange }), h(\"slot\", { name: SLOTS.menuTooltip, slot: SLOTS$1.tooltip })));\n }\n render() {\n return (h(\"div\", { \"aria-label\": this.label, class: CSS.container, role: \"group\" }, h(\"slot\", null), this.renderMenu()));\n }\n static get delegatesFocus() { return true; }\n static get assetsDirs() { return [\"assets\"]; }\n get el() { return this; }\n static get watchers() { return {\n \"expanded\": [\"expandedHandler\"],\n \"messageOverrides\": [\"onMessagesChange\"],\n \"effectiveLocale\": [\"effectiveLocaleChange\"]\n }; }\n static get style() { return actionGroupCss; }\n}, [17, \"calcite-action-group\", {\n \"expanded\": [516],\n \"label\": [1],\n \"layout\": [513],\n \"columns\": [514],\n \"menuOpen\": [1540, \"menu-open\"],\n \"overlayPositioning\": [513, \"overlay-positioning\"],\n \"scale\": [513],\n \"messages\": [1040],\n \"messageOverrides\": [1040],\n \"effectiveLocale\": [32],\n \"defaultMessages\": [32],\n \"hasMenuActions\": [32],\n \"setFocus\": [64]\n }]);\nfunction defineCustomElement() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"calcite-action-group\", \"calcite-action\", \"calcite-action-menu\", \"calcite-icon\", \"calcite-loader\", \"calcite-popover\"];\n components.forEach(tagName => { switch (tagName) {\n case \"calcite-action-group\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, ActionGroup);\n }\n break;\n case \"calcite-action\":\n if (!customElements.get(tagName)) {\n defineCustomElement$5();\n }\n break;\n case \"calcite-action-menu\":\n if (!customElements.get(tagName)) {\n defineCustomElement$4();\n }\n break;\n case \"calcite-icon\":\n if (!customElements.get(tagName)) {\n defineCustomElement$3();\n }\n break;\n case \"calcite-loader\":\n if (!customElements.get(tagName)) {\n defineCustomElement$2();\n }\n break;\n case \"calcite-popover\":\n if (!customElements.get(tagName)) {\n defineCustomElement$1();\n }\n break;\n } });\n}\ndefineCustomElement();\n\nexport { ActionGroup as A, SLOTS as S, defineCustomElement as d };\n","/*!\n * All material copyright ESRI, All Rights Reserved, unless otherwise specified.\n * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.\n * v1.10.0\n */\nimport { forceUpdate } from '@stencil/core/internal/client/index.js';\nimport { c as createObserver } from './observers.js';\n\nconst observed = new Set();\nlet mutationObserver;\nconst observerOptions = { childList: true };\n/**\n * Helper to set up a conditional slot component on connectedCallback.\n *\n * @param component\n * @deprecated Use `onSlotchange` event with `slotChangeHasAssignedElement` DOM utility instead.\n *\n * ```\n * this.mySlotHasElement = slotChangeHasAssignedElement(event)} />}\n * ```\n */\nfunction connectConditionalSlotComponent(component) {\n if (!mutationObserver) {\n mutationObserver = createObserver(\"mutation\", processMutations);\n }\n mutationObserver.observe(component.el, observerOptions);\n}\n/**\n * Helper to tear down a conditional slot component on disconnectedCallback.\n *\n * @param component\n * @deprecated Use `onSlotchange` event with `slotChangeHasAssignedElement` DOM utility instead.\n *\n * ```\n * this.mySlotHasElement = slotChangeHasAssignedElement(event)} />}\n * ```\n */\nfunction disconnectConditionalSlotComponent(component) {\n observed.delete(component.el);\n // we explicitly process queued mutations and disconnect and reconnect\n // the observer until MutationObserver gets an `unobserve` method\n // see https://github.com/whatwg/dom/issues/126\n processMutations(mutationObserver.takeRecords());\n mutationObserver.disconnect();\n for (const [element] of observed.entries()) {\n mutationObserver.observe(element, observerOptions);\n }\n}\nfunction processMutations(mutations) {\n mutations.forEach(({ target }) => {\n forceUpdate(target);\n });\n}\n\nexport { connectConditionalSlotComponent as c, disconnectConditionalSlotComponent as d };\n","/*!\n * All material copyright ESRI, All Rights Reserved, unless otherwise specified.\n * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.\n * v1.10.0\n */\nimport { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client/index.js';\nimport { c as connectLocalized, d as disconnectLocalized } from './locale.js';\nimport { u as updateMessages, c as connectMessages, s as setUpMessages, d as disconnectMessages } from './t9n.js';\nimport { c as createObserver } from './observers.js';\nimport { u as slotChangeHasContent } from './dom.js';\nimport { d as defineCustomElement$1 } from './loader.js';\n\nconst CSS = {\n scrim: \"scrim\",\n content: \"content\",\n};\nconst BREAKPOINTS = {\n s: 72,\n // medium is assumed default.\n l: 480, // Greater than or equal to 480px.\n};\n\nconst scrimCss = \":host{position:absolute;inset:0px;z-index:var(--calcite-app-z-index-overlay);display:flex;block-size:100%;inline-size:100%;flex-direction:column;align-items:stretch}@keyframes calcite-scrim-fade-in{0%{--tw-bg-opacity:0}100%{--tw-text-opacity:1}}.scrim{position:absolute;inset:0px;display:flex;flex-direction:column;align-content:center;align-items:center;justify-content:center;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background, var(--calcite-scrim-background-internal))}.content{padding:1rem}:host([hidden]){display:none}[hidden]{display:none}\";\n\nconst Scrim = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n this.resizeObserver = createObserver(\"resize\", () => this.handleResize());\n // --------------------------------------------------------------------------\n //\n // Private Methods\n //\n // --------------------------------------------------------------------------\n this.handleDefaultSlotChange = (event) => {\n this.hasContent = slotChangeHasContent(event);\n };\n this.storeLoaderEl = (el) => {\n this.loaderEl = el;\n this.handleResize();\n };\n this.loading = false;\n this.messages = undefined;\n this.messageOverrides = undefined;\n this.loaderScale = undefined;\n this.defaultMessages = undefined;\n this.effectiveLocale = \"\";\n this.hasContent = false;\n }\n onMessagesChange() {\n /* wired up by t9n util */\n }\n effectiveLocaleChange() {\n updateMessages(this, this.effectiveLocale);\n }\n //--------------------------------------------------------------------------\n //\n // Lifecycle\n //\n //--------------------------------------------------------------------------\n connectedCallback() {\n connectLocalized(this);\n connectMessages(this);\n this.resizeObserver?.observe(this.el);\n }\n async componentWillLoad() {\n await setUpMessages(this);\n }\n disconnectedCallback() {\n disconnectLocalized(this);\n disconnectMessages(this);\n this.resizeObserver?.disconnect();\n }\n // --------------------------------------------------------------------------\n //\n // Render Method\n //\n // --------------------------------------------------------------------------\n render() {\n const { hasContent, loading, messages } = this;\n return (h(\"div\", { class: CSS.scrim }, loading ? (h(\"calcite-loader\", { label: messages.loading, scale: this.loaderScale,\n // eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)\n ref: this.storeLoaderEl })) : null, h(\"div\", { class: CSS.content, hidden: !hasContent }, h(\"slot\", { onSlotchange: this.handleDefaultSlotChange }))));\n }\n getScale(size) {\n if (size < BREAKPOINTS.s) {\n return \"s\";\n }\n else if (size >= BREAKPOINTS.l) {\n return \"l\";\n }\n else {\n return \"m\";\n }\n }\n handleResize() {\n const { loaderEl, el } = this;\n if (!loaderEl) {\n return;\n }\n this.loaderScale = this.getScale(Math.min(el.clientHeight, el.clientWidth) ?? 0);\n }\n static get assetsDirs() { return [\"assets\"]; }\n get el() { return this; }\n static get watchers() { return {\n \"messageOverrides\": [\"onMessagesChange\"],\n \"effectiveLocale\": [\"effectiveLocaleChange\"]\n }; }\n static get style() { return scrimCss; }\n}, [1, \"calcite-scrim\", {\n \"loading\": [516],\n \"messages\": [1040],\n \"messageOverrides\": [1040],\n \"loaderScale\": [32],\n \"defaultMessages\": [32],\n \"effectiveLocale\": [32],\n \"hasContent\": [32]\n }]);\nfunction defineCustomElement() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"calcite-scrim\", \"calcite-loader\"];\n components.forEach(tagName => { switch (tagName) {\n case \"calcite-scrim\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Scrim);\n }\n break;\n case \"calcite-loader\":\n if (!customElements.get(tagName)) {\n defineCustomElement$1();\n }\n break;\n } });\n}\ndefineCustomElement();\n\nexport { Scrim as S, defineCustomElement as d };\n","/*!\n * All material copyright ESRI, All Rights Reserved, unless otherwise specified.\n * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.\n * v1.10.0\n */\nimport { Build } from '@stencil/core/internal/client/index.js';\n\nconst CSS = {\n container: \"container\",\n containerBorderSelected: \"container--border-selected\",\n containerBorderUnselected: \"container--border-unselected\",\n contentContainer: \"content-container\",\n contentContainerSelectable: \"content-container--selectable\",\n contentContainerHasCenterContent: \"content-container--has-center-content\",\n nestedContainer: \"nested-container\",\n nestedContainerHidden: \"nested-container--hidden\",\n content: \"content\",\n customContent: \"custom-content\",\n actionsStart: \"actions-start\",\n contentStart: \"content-start\",\n label: \"label\",\n description: \"description\",\n contentEnd: \"content-end\",\n actionsEnd: \"actions-end\",\n selectionContainer: \"selection-container\",\n openContainer: \"open-container\",\n dragContainer: \"drag-container\",\n};\nconst SLOTS = {\n actionsStart: \"actions-start\",\n contentStart: \"content-start\",\n content: \"content\",\n contentEnd: \"content-end\",\n actionsEnd: \"actions-end\",\n};\n// Set to zero to extend until the end of the table section.\nconst MAX_COLUMNS = 0;\nconst ICONS = {\n selectedMultiple: \"check-circle-f\",\n selectedSingle: \"circle-f\",\n unselected: \"blank\",\n closedLTR: \"caret-right\",\n closedRTL: \"caret-left\",\n open: \"caret-down\",\n blank: \"blank\",\n close: \"x\",\n};\n\nconst listSelector = \"calcite-list\";\nconst listItemGroupSelector = \"calcite-list-item-group\";\nconst listItemSelector = \"calcite-list-item\";\nfunction getListItemChildren(slotEl) {\n const assignedElements = slotEl.assignedElements({ flatten: true });\n const listItemGroupChildren = assignedElements.filter((el) => el?.matches(listItemGroupSelector))\n .map((group) => Array.from(group.querySelectorAll(listItemSelector)))\n .reduce((previousValue, currentValue) => [...previousValue, ...currentValue], []);\n const listItemChildren = assignedElements.filter((el) => el?.matches(listItemSelector));\n const listItemListChildren = assignedElements.filter((el) => el?.matches(listSelector))\n .map((list) => Array.from(list.querySelectorAll(listItemSelector)))\n .reduce((previousValue, currentValue) => [...previousValue, ...currentValue], []);\n return [...listItemListChildren, ...listItemGroupChildren, ...listItemChildren];\n}\nfunction updateListItemChildren(listItemChildren) {\n listItemChildren.forEach((listItem) => {\n listItem.setPosition = listItemChildren.indexOf(listItem) + 1;\n listItem.setSize = listItemChildren.length;\n });\n}\nfunction getDepth(element, includeGroup = false) {\n if (!Build.isBrowser) {\n return 0;\n }\n const expression = includeGroup\n ? \"ancestor::calcite-list-item | ancestor::calcite-list-item-group\"\n : \"ancestor::calcite-list-item\";\n const result = document.evaluate(expression, element, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);\n return result.snapshotLength;\n}\n\nexport { CSS as C, ICONS as I, MAX_COLUMNS as M, SLOTS as S, getDepth as a, getListItemChildren as g, updateListItemChildren as u };\n"],"x_google_ignoreList":[9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74]}