@arcgis/core 5.0.0-next.8 → 5.0.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02e7359162cf974b41b6.js +1 -0
- package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
- package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{b708792c84620b73c847.js → 21293b0c6405a10ec7b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{a876d6159ca120c1567e.js → 28d1f2cf6aae547615c3.js} +1 -1
- package/assets/esri/core/workers/chunks/292daac70bb828e4923f.js +1 -0
- package/assets/esri/core/workers/chunks/31b6406960261da21dd4.js +1 -0
- package/assets/esri/core/workers/chunks/31dbe07047dc61303d7d.js +1 -0
- package/assets/esri/core/workers/chunks/{59d3cac32ad6dad941dc.js → 35c9b24e4430bd6c2b6b.js} +1 -1
- package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/4fb5f1c671892001a4fd.js +1 -0
- package/assets/esri/core/workers/chunks/{d88f2fe680b8d5603ef8.js → 5350d50b47b6a4e0e169.js} +1 -1
- package/assets/esri/core/workers/chunks/58e59ead33368ce38c8f.js +1 -0
- package/assets/esri/core/workers/chunks/{aff8e40a641c6822af1d.js → 5db37547963857295273.js} +1 -1
- package/assets/esri/core/workers/chunks/{3afb83f5de033dda89ec.js → 604777417722d4effe06.js} +1 -1
- package/assets/esri/core/workers/chunks/67f03d042455cd0f7009.js +1 -0
- package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
- package/assets/esri/core/workers/chunks/{b96eb0ea506379182d62.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/7d641f2f5edd95b9bc18.js +1 -0
- package/assets/esri/core/workers/chunks/812f2ccc01f44e3cfd41.js +1 -0
- package/assets/esri/core/workers/chunks/826fa0dfb63df77bfd95.js +1 -0
- package/assets/esri/core/workers/chunks/87921f3fa9001f5801ed.js +1 -0
- package/assets/esri/core/workers/chunks/{2a8dff8521e1e6a10cf6.js → 89b748e064ca90b4f76a.js} +1 -1
- package/assets/esri/core/workers/chunks/{fef45bc59c71f88c60b5.js → 8d9d3797c6d62fdfff9d.js} +1 -1
- package/assets/esri/core/workers/chunks/{e5a06ce0ef6a9a90e100.js → 9f21436016ff7a899e79.js} +1 -1
- package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
- package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/b05208d56a724a8f1661.js +1 -0
- package/assets/esri/core/workers/chunks/{b0365cbc3d2a41969e3b.js → b7eb486354994dc70855.js} +1 -1
- package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +1 -0
- package/assets/esri/core/workers/chunks/c715fd32f814a0f14f40.js +1 -0
- package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/cf971e7b1b98d9c502d3.js +1 -0
- package/assets/esri/core/workers/chunks/{20975513be0a3a1da286.js → d1ca7c3a32ce00ed8b81.js} +1 -1
- package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js → d391bfbaf0e790cd10d6.js} +2 -2
- package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/db678a6e352275e507a9.js +1 -0
- package/assets/esri/core/workers/chunks/de2ebd9cc3d9e68d435b.js +1 -0
- package/assets/esri/core/workers/chunks/e599125e746c27de106e.js +1 -0
- package/assets/esri/core/workers/chunks/{05429f9d292a7a714309.js → ebcc94234d9d4be1941f.js} +1 -1
- package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
- package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/f80f5dbf96c343ac4df6.js +1 -0
- package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
- package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
- package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/config.js +1 -1
- package/form/FormTemplate.js +1 -1
- package/form/elements/Element.js +1 -1
- package/form/elements/FieldElement.js +1 -1
- package/form/elements/GroupElement.js +1 -1
- package/interfaces.d.ts +25 -23
- package/kernel.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/rasterDatasets/pixelReader.js +1 -1
- package/layers/support/rasterFunctions/pixelTransformUtils.js +5 -0
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/package.json +2 -2
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/support/errors.js +5 -0
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/assets/esri/core/workers/chunks/06ba43843e9c4988049b.js +0 -1
- package/assets/esri/core/workers/chunks/1d15d1b20dc10fde6def.js +0 -1
- package/assets/esri/core/workers/chunks/28020063048e644f17a5.js +0 -1
- package/assets/esri/core/workers/chunks/36d067c8d03d7a894f5f.js +0 -1
- package/assets/esri/core/workers/chunks/38cc18fd93c18815ded0.js +0 -1
- package/assets/esri/core/workers/chunks/4eebd74ebc20579dade8.js +0 -1
- package/assets/esri/core/workers/chunks/5f402b3c00bc4afc77b2.js +0 -1
- package/assets/esri/core/workers/chunks/63a6f3e70d2b6ea57e40.js +0 -1
- package/assets/esri/core/workers/chunks/695cdef5057e5461078a.js +0 -1
- package/assets/esri/core/workers/chunks/6bb7dbc46787b8e34bd9.js +0 -1
- package/assets/esri/core/workers/chunks/6ee2f0f708494102a493.js +0 -1
- package/assets/esri/core/workers/chunks/78694ad8229347903f41.js +0 -1
- package/assets/esri/core/workers/chunks/90cbd627d4113db3b686.js +0 -1
- package/assets/esri/core/workers/chunks/a31635a6366347dcef0f.js +0 -1
- package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
- package/assets/esri/core/workers/chunks/afc13d5b842275db7dbc.js +0 -1
- package/assets/esri/core/workers/chunks/b548910e820d731ffe8a.js +0 -1
- package/assets/esri/core/workers/chunks/b96eb0ea506379182d62.js +0 -2
- package/assets/esri/core/workers/chunks/c476643002387f60ea42.js +0 -1
- package/assets/esri/core/workers/chunks/ce98416437cc1a89d8ea.js +0 -1
- package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
- package/assets/esri/core/workers/chunks/ebf23b46db56aaa88841.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2561,3099,3548,4342,7548,7694],{159:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(31635),s=r(69622),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108)),o=r(99157);let u=i=class extends s.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,n.Cg)([(0,a.MZ)({type:[o.A],nonNullable:!0})],u.prototype,"steps",void 0),u=i=(0,n.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformation")],u)},4146:(e,t,r)=>{r.d(t,{A:()=>w});var i=r(31635),n=r(43773),s=r(49186),a=r(65529),l=r(4902),o=r(92474),u=r(53966),c=r(74887),d=r(84952),p=r(10107),h=(r(44208),r(87811),r(64108)),y=r(5443),f=r(16930),m=r(92602),g=r(79677);let _=0,w=class extends((0,a.Zt)((0,l.s)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,p.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,i.Cg)([(0,p.MZ)({type:y.A})],w.prototype,"fullExtent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i.Cg)([(0,p.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:f.A})],w.prototype,"spatialReference",void 0),(0,i.Cg)([(0,p.MZ)({type:String})],w.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)()],w.prototype,"url",void 0),(0,i.Cg)([(0,p.MZ)({type:g.A})],w.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i.Cg)([(0,h.$)("esri.layers.Layer")],w)},4902:(e,t,r)=>{r.d(t,{s:()=>a});var i=r(31635),n=r(64108);let s=0;const a=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return r=(0,i.Cg)([(0,n.$)("esri.core.Identifiable")],r),r};a(class{})},6797:(e,t,r)=>{r.d(t,{Ui:()=>p});var i=r(69622),n=r(7762),s=r(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function o(e){return e instanceof n.A?Object.keys(e.items):l(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=o(e),n=o(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),p=i.filter(e=>!n.includes(e)),h=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(s,p).sort(),y=c(e);if(y&&a.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const i of h){const n=u(e,i),s=u(t,i);let a;if((m||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])a=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;a={type:"complete",oldValue:n,newValue:s}}else a="object"==typeof n&&"object"==typeof s&&c(n)===c(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=a&&(null!=f?f.diff[i]=a:f={type:"partial",diff:{[i]:a}})}}return f}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},9762:(e,t,r)=>{r.r(t),r.d(t,{projectBuffer:()=>n});var i=r(37539);function n(e,t,r,n,s,a,l=Math.floor(e.length/3)){const o=(0,i.jd)(t,s);if(null==o)return!1;if(o===i.pO){if(e===n&&r===a)return!0;const t=r+3*l;for(let i=r,s=a;i<t;i++,s++)n[s]=e[i];return!0}const u=r+3*l;for(let t=r,i=a;t<u;t+=3,i+=3)o(e,t,n,i);return!0}},10536:(e,t,r)=>{function i(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=i(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>i})},16215:(e,t,r)=>{r.d(t,{S:()=>n,Y:()=>i});const i=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&i in e}},16494:(e,t,r)=>{r.d(t,{Nd:()=>l,W5:()=>a});var i=r(37330);const n=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),s=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],a=new i.I({whiteList:n,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(s.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},17126:(e,t,r)=>{r.d(t,{dw:()=>a,qD:()=>l,qW:()=>o});var i=r(43773),n=r(21325),s=r(10536);function a(e,t){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!t?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSR&&(r.outSR=(0,n.YX)(r.outSR)),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function l(e,t,r){const i=await u(e,t,r),n=i.data,s=n.geometryType,a=n.spatialReference,l={};for(const e of n.relatedRecordGroups){const t={fields:void 0,geometryType:s,spatialReference:a,hasZ:!!n.hasZ,hasM:!!n.hasM,features:e.relatedRecords};if(null!=e.objectId)l[e.objectId]=t;else for(const r of Object.keys(e))"relatedRecords"!==r&&(l[e[r]]=t)}return{...i,data:l}}async function o(e,t,r){const i=await u(e,t,r,{returnCountOnly:!0}),n=i.data,s={};for(const e of n.relatedRecordGroups)null!=e.objectId&&(s[e.objectId]=e.count);return{...i,data:s}}async function u(e,t,r={},n){const l=(0,s.z)({...e.query,f:"json",...n,...a(t,n)});return(0,i.A)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...l}})}},17311:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(31635),n=r(69622),s=r(4576),a=r(60999),l=r(7762),o=r(16494),u=r(10107),c=(r(44208),r(53966),r(64108)),d=r(30524),p=r(43668);const h=/<br\s*\/*>/gi;let y=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,a.UT)(()=>(0,p.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,n=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:a,workingTitle:l}=this,u=l&&a;t.forEach(t=>{const c=t.getObjectId()??t.attributes[e.objectIdField];let d=u?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:a,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:l}):"";r?.removeHTML&&(d=o.Nd.sanitize(d).replaceAll(h," ")),i.set(c,d)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,d.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const n=await e.queryFeatures(i);if(n?.features.length===t.length)return n.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,d.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,u.MZ)({readOnly:!0})],y.prototype,"_arcadeTask",null),(0,i.Cg)([(0,u.MZ)()],y.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],y.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],y.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,u.MZ)()],y.prototype,"displayField",void 0),(0,i.Cg)([(0,u.MZ)()],y.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,u.MZ)()],y.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,u.MZ)()],y.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],y.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,u.MZ)()],y.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)()],y.prototype,"objectIdField",void 0),(0,i.Cg)([(0,u.MZ)()],y.prototype,"requiredFields",null),y=(0,i.Cg)([(0,c.$)("esri.layers.support.TitleCreator")],y)},22671:(e,t,r)=>{r.d(t,{A:()=>_});var i,n=r(31635),s=r(52106),a=r(66552),l=r(25482),o=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),d=r(64108),p=r(43937),h=r(16930),y=r(65864),f=r(50498),m=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,o.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=s.length;e<t;e++)a?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,a]}=r;let l=null,o=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;o=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+i,e=>n-e*a,l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=h.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],a=r.fromJSON(s),l=s.geometry?.spatialReference;null==a.geometry||l||(a.geometry.spatialReference=i);const o=s.aggregateGeometries,u=a.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],r=o[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(a)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=r(l[1]);e===i&&a===n||(s.push([e-i,a-n]),i=e,n=a)}else i=t(l[0]),n=r(l[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,y.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],a=this._quantizePoints(s,t,r);a&&n.push(a)}return n.length>0?((0,y.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,y.Bi)(e)?e.rings:e.paths;let a,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(a+=n[0],l+=n[1]):(a=n[0],l=n[1]),n[0]=t(a),n[1]=r(l)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let a,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(a+=i[0],l+=i[1]):(a=i[0],l=i[1]),i[0]=t(a),i[1]=r(l)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n.Cg)([(0,c.w)("features")],_.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,n.Cg)([(0,p.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,c.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:h.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n.Cg)([(0,p.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n.Cg)([(0,d.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),n=r(69540),s=r(66552),a=r(25482),l=r(10107),o=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let c=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"thumbnail",void 0),c=(0,i.Cg)([(0,o.$)("esri.layers.support.FeatureTemplate")],c)},30235:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(52106),n=r(48938),s=r(87449),a=r(11221),l=r(33325),o=r(80609),u=r(4576),c=r(39516),d=r(91075),p=r(68654),h=r(33143),y=r(20437);class f extends a.t{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._maxProcessing=1e3,this._layer=e.layer,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.gO}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type||this._layer.objectIdField===r.name)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}async _queryAll(){return(await this.query({abortSignal:n._})).features}async query(e){await this._ensureLoaded();let t="",r=!1;if(null!=e.orderBy&&(t=e.orderBy.constructClause(),r=!0),this.isTable()&&null!=e.spatialFilter)return a.A;const i=this._createQuery();return i.where=(0,c.mA)(i.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,o.YY)(e.where,0)),null!=e.spatialFilter&&(i.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),i.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),i.geometry=e.spatialFilter.geometry),i.outSpatialReference=this.spatialReference,i.orderByFields=""!==t?t.split(","):null,{filterApplied:!0,spatialFilterApplied:!0,ordered:r,features:async function*(){const t=await this._layer.queryFeatures(i);(0,s.dZ)(e.abortSignal);for(const e of(0,u.Ho)(t.features,this._maxQueryRate()))yield e.map(e=>this._changeFeature(e))}.apply(this)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new s.dr("NeverReach")}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new i.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const r in e)t[r]=e[r];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const i=e.layerDefinition.typeIdField??"",n=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)n.push(h.A.fromJSON(t));let s=e.layerDefinition.geometryType;void 0===s&&(s=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!r){let t=!1;for(const i of e.layerDefinition.fields)if("oid"===i.type||"esriFieldTypeOID"===i.type){r=i.name,t=!0;break}if(!1===t){let t="FID",i=!0,n=0;for(;i;){let r=!0;for(const i of e.layerDefinition.fields)if(i.name===t){r=!1;break}!0===r?i=!1:(n++,t="FID"+n.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const s=[];for(let r=0;r<a.length;r++)s.push({geometry:e.featureSet.features[r].geometry,attributes:e.featureSet.features[r].attributes?this._cloneAttr(e.featureSet.features[r].attributes):{}}),s[r].attributes[t]=r;a=s,r=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof y.A?o.push(t):o.push(y.A.fromJSON(t));let u=s;switch(u||(u=""),u){case"esriGeometryPoint":u="point";break;case"esriGeometryPolyline":u="polyline";break;case"esriGeometryPolygon":u="polygon";break;case"esriGeometryEnvelope":u="extent";break;case"esriGeometryMultipoint":u="multipoint";break;case"":case"esriGeometryNull":u="esriGeometryNull"}if("esriGeometryNull"!==u)for(const e of a)e.geometry&&e.geometry instanceof d.A==0&&(e.geometry.type=u,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const c={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:n,typeIdField:i,objectIdField:r,spatialReference:t},m="esriGeometryNull"===u||null===u;m||(c.geometryType=u);const g=new p.default(c);return e?.layerDefinition?.subtypeField&&e?.layerDefinition?.subtypes&&g.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new f({layer:g,spatialReference:t,isTable:m})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const r=await this._layer.queryFeatures(t);return 1===r.features.length?r.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return this._layer?.timeInfo}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return this.fsetInfo??{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>y,XJ:()=>f,lc:()=>h,mX:()=>_,rU:()=>g,tH:()=>I});var i=r(799);const n="__begin__",s="__end__",a=new RegExp(n,"ig"),l=new RegExp(s,"ig"),o=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),c='"',d=c+" + ",p=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function _(e){let t;return e?(t=(0,i.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=o.test(t)?t.replace(o,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(a,d).replaceAll(l,p)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,F=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=b.exec(e)||v.exec(e);return t?t[1]||t[3]:(t=F.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>o,fY:()=>c,ne:()=>u});var i=r(31635),n=r(93637),s=r(10107),a=(r(44208),r(53966),r(87811),r(64108)),l=r(91880);function o(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new l.A;return n.read(i,r),[n]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:o},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,a.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),n=r(69540),s=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),o=r(64108),u=r(43937),c=r(80451),d=r(29005);let p=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"domains",void 0),(0,i.Cg)([(0,l.w)("domains")],p.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],p.prototype,"writeDomains",null),(0,i.Cg)([(0,a.MZ)({type:[d.A],json:{write:!0}})],p.prototype,"templates",void 0),p=(0,i.Cg)([(0,o.$)("esri.layers.support.FeatureType")],p)},35704:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(48938),n=r(87449),s=r(11221),a=r(33325),l=r(80609),o=r(88368),u=r(16930);class c extends s.t{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof o.A?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new u.A({wkid:4326}),this.geometryType=a.ik.point)}async _queryAll(){return(await this.query({abortSignal:i._})).features}async query(e){let t=e.where;null!==this._whereClauseFunction||(null!=t?null!==this._whereclause&&(t=(0,l.kg)(this._whereclause,t)):t=this._whereclause),await this._ensureLoaded();const r=await this._parent.query({...e,where:t});return(0,n.dZ)(e.abortSignal),r.filterApplied&&null==this._whereClauseFunction?r:{...r,features:this._applyFilter(r.features,e.abortSignal)}}async*_applyFilter(e,t){for await(const r of e)if((0,n.dZ)(t),null==this._whereClauseFunction){const e=r.filter(e=>this.executeWhereClause(e));e.length>0&&(yield e)}else{const e=[];for(const t of r)await this.executeWhereClauseDeferred(t)&&e.push(t);e.length>0&&(yield e)}}async queryStat(e){if(null!==this._whereClauseFunction)return null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal):{calculated:!1};let t=this._whereclause;null!=e.where&&null!==this._whereclause&&(t=(0,l.kg)(this._whereclause,e.where));const r=await this._parent.queryStat({...e,where:t});return!1===r.calculated?null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal):{calculated:!1}:r}async canQueryAggregate(e){if(null!==this._whereClauseFunction)return!1;let t=e.where;return null!=t?null!==this._whereclause&&(t=(0,l.kg)(this._whereclause,t)):t=this._whereclause,null!==this._parent&&this._parent.canQueryAggregate({...e,where:t})}async queryAggregate(e){if(null===this._parent)throw new n.dr("NeverReach");let t=e.where;return null!=t?null!==this._whereclause&&(t=(0,l.kg)(this._whereclause,t)):t=this._whereclause,this._parent.queryAggregate({...e,where:t})}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){return null!==this._whereClauseFunction?this._whereClauseFunction(e):this.executeWhereClause(e)}getFieldsIndex(){return this._parent.getFieldsIndex()}}},36708:(e,t,r)=>{r.d(t,{C_:()=>p,OH:()=>f,Vh:()=>m,on:()=>d,pc:()=>g,wB:()=>o,z7:()=>u});var i=r(37955),n=r(36563),s=r(97768),a=r(74887),l=r(14012);function o(e,t,r={}){return c(e,t,r,h)}function u(e,t,r={}){return c(e,t,r,y)}function c(e,t,r={},i){let n=null;const a=r.once?(e,r)=>{i(e)&&((0,s.xt)(n),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(n=(0,l.Cn)(e,a,r.sync,r.equals),r.initial){const t=e();a(t,t)}return n}function d(e,t,r,a={}){let l=null,u=null,c=null;function d(){l&&u&&(u.remove(),a.onListenerRemove?.(l),l=null,u=null)}function p(e){a.once&&a.once&&(0,s.xt)(c),r(e)}const h=o(e,(e,r)=>{d(),(0,i.wb)(e)&&(l=e,u=(0,i.on)(e,t,p),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return c=(0,n.hA)(()=>{h.remove(),d()}),c}function p(e,t){return function(e,t,r){if((0,a.G4)(r))return Promise.reject((0,a.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let l=null;function o(){l=(0,s.xt)(l)}return new Promise((i,s)=>{l=(0,n.vE)([(0,a.u7)(r,()=>{o(),s((0,a.NK)())}),c(e,e=>{o(),i(e)},{sync:!1,once:!0},t??h)])})}(e,y,t)}function h(e){return!0}function y(e){return!!e}r(80559);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},37352:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(31635),s=r(7762),a=r(25482),l=r(10107),o=(r(44208),r(53966),r(87811),r(64108));let u=i=class extends a.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,n.Cg)([(0,o.$)("esri.layers.support.LayerFloorInfo")],u)},37539:(e,t,r)=>{r.d(t,{pO:()=>f,jd:()=>p,Tp:()=>h,w5:()=>d});var i=r(34727),n=r(83047),s=r(73941),a=r(79258);Math.PI;const l=a.$O.radius,o=a.$O.eccentricitySquared,u={a1:l*o,a2:l*o*l*o,a3:l*o*o/2,a4:l*o*l*o*2.5,a5:l*o+l*o*o/2,a6:1-o};a.$O.radius,a.$O.flattening,a.Sw.radius,a.Sw.flattening,a.sH.radius,a.sH.flattening,a.sH.radius;var c=r(21325);const d={2:{5:f,7:null,9:null,10:f,1:I,6:null,8:null,0:null,3:g,11:_,2:f,4:R},5:{5:f,7:null,9:null,10:f,1:I,6:null,8:null,0:null,3:g,11:_,2:f,4:R},7:{5:null,7:f,9:null,10:f,1:null,6:F,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:f,10:f,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,t,r,i){const n=e[t]/k,s=O-2*Math.atan(Math.exp(-e[t+1]/k)),a=k+e[t+2],l=Math.cos(s)*a;r[i]=Math.cos(n)*l,r[i+1]=Math.sin(n)*l,r[i+2]=Math.sin(s)*a},6:null,8:null,0:null,3:f,11:function(e,t,r,i){m(e,t,r,i),_(r,i,r,i)},2:m,4:function(e,t,r,i){m(e,t,r,i),R(r,i,r,i)}},4:{5:C,7:null,9:null,10:C,1:function(e,t,r,i){C(e,t,r,i),I(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){C(e,t,r,i),g(r,i,r,i)},11:function(e,t,r,i){C(e,t,r,i),_(r,i,r,i)},2:C,4:f},1:{5:x,7:null,9:null,10:x,1:f,6:null,8:null,0:null,3:function(e,t,r,i){x(e,t,r,i),g(r,i,r,i)},11:function(e,t,r,i){x(e,t,r,i),_(r,i,r,i)},2:x,4:function(e,t,r,i){x(e,t,r,i),R(r,i,r,i)}},6:{5:null,7:A,9:null,10:A,1:null,6:f,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:S,10:S,1:null,6:null,8:f,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:f,3:null,11:null,2:null,4:null},10:{5:f,7:f,9:f,10:f,1:I,6:F,8:v,0:null,3:g,11:_,2:f,4:R},11:{5:w,7:null,9:null,10:w,1:function(e,t,r,i){w(e,t,r,i),I(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){w(e,t,r,i),g(r,i,r,i)},11:f,2:w,4:function(e,t,r,i){w(e,t,r,i),R(r,i,r,i)}}};function p(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(M.source.spatialReference===e&&M.dest.spatialReference===t)return M;const r=y(e,M.source),i=y(t,M.dest);return 0===r&&0===i?(0,c.aI)(e,t)?M.projector=f:M.projector=null:M.projector=d[r][i],M}function y(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function f(e,t,r,i){e!==r&&(r[i++]=e[t++],r[i++]=e[t++],r[i]=e[t])}function m(e,t,r,i){r[i]=j*(e[t]/k),r[i+1]=j*(O-2*Math.atan(Math.exp(-e[t+1]/k))),r[i+2]=e[t+2]}function g(e,t,r,n){!function(e,t,r,n,s){const a=.4999999*Math.PI,l=(0,i.qE)(L*e[t+1],-a,a),o=Math.sin(l);r[n++]=L*e[t]*s.radius,r[n++]=s.halfSemiMajorAxis*Math.log((1+o)/(1-o)),r[n]=e[t+2]}(e,t,r,n,a.$O)}function _(e,t,r,i){r[i]=e[t]*Z,r[i+1]=e[t+1]*Z,r[i+2]=e[t+2]}function w(e,t,r,i){r[i]=e[t]*E,r[i+1]=e[t+1]*E,r[i+2]=e[t+2]}function b(e,t,r,i,n){const s=n+e[t+2],a=L*e[t+1],l=L*e[t],o=Math.cos(a)*s;r[i]=Math.cos(l)*o,r[i+1]=Math.sin(l)*o,r[i+2]=Math.sin(a)*s}function v(e,t,r,i){b(e,t,r,i,a.Sw.radius)}function F(e,t,r,i){b(e,t,r,i,a.sH.radius)}function I(e,t,r,i){b(e,t,r,i,a.$O.radius)}function T(e,t,r,n,s){const a=e[t],l=e[t+1],o=e[t+2],u=Math.sqrt(a*a+l*l+o*o),c=(0,i.YN)(o/(0===u?1:u)),d=Math.atan2(l,a);r[n++]=j*d,r[n++]=j*c,r[n]=u-s}function S(e,t,r,i){T(e,t,r,i,a.Sw.radius)}function A(e,t,r,i){T(e,t,r,i,a.sH.radius)}function x(e,t,r,i){T(e,t,r,i,a.$O.radius)}function R(e,t,r,i){!function(e,t,r,i,n){const s=L*e[t],a=L*e[t+1],l=e[t+2],o=Math.sin(a),u=Math.cos(a),c=n.radius/Math.sqrt(1-n.eccentricitySquared*o*o);r[i++]=(c+l)*u*Math.cos(s),r[i++]=(c+l)*u*Math.sin(s),r[i++]=(c*(1-n.eccentricitySquared)+l)*o}(e,t,r,i,a.$O)}function C(e,t,r,i){const n=u,s=e[t],l=e[t+1],o=e[t+2];let c,d,p,h,y,f,m,g,_,w,b,v,F,I,T,S,A,x,R,C,M;c=Math.abs(o),d=s*s+l*l,p=Math.sqrt(d),h=d+o*o,y=Math.sqrt(h),C=Math.atan2(l,s),f=o*o/h,m=d/h,I=n.a2/y,T=n.a3-n.a4/y,m>.3?(g=c/y*(1+m*(n.a1+I+f*T)/y),R=Math.asin(g),w=g*g,_=Math.sqrt(1-w)):(_=p/y*(1-f*(n.a5-I-m*T)/y),R=Math.acos(_),w=1-_*_,g=Math.sqrt(w)),b=1-a.$O.eccentricitySquared*w,v=a.$O.radius/Math.sqrt(b),F=n.a6*v,I=p-v*_,T=c-F*g,A=_*I+g*T,S=_*T-g*I,x=S/(F/b+A),R+=x,M=A+S*x/2,o<0&&(R=-R),r[i++]=j*C,r[i++]=j*R,r[i]=M}const M={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:f},L=(0,i.kU)(1),j=(0,i.KJ)(1),O=.5*Math.PI,k=a.$O.radius,Z=k*Math.PI/180,E=180/(k*Math.PI)},41366:(e,t,r)=>{r.d(t,{K:()=>p,Q:()=>u});var i=r(31635),n=r(66552),s=r(53966),a=r(10107),l=(r(44208),r(87811),r(93223)),o=r(64108);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&c||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,o.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},41560:(e,t,r)=>{r.d(t,{Ch:()=>a,mW:()=>s});var i=r(34727),n=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function a(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const a=Array.from(l(e,t,r)),o=function(e,t,r){if(0===e.length)return!0;const n=c(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(c(n.minScale),d(r.maxScale)))return!0}return!1}(a,t,r)?"1=1":a.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)o(i.minScale,i.maxScale,t,r)&&(yield i)}}function o(e,t,r,n){return e=c(e),r=c(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45067:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),n=r(69540),s=r(66552),a=r(25482),l=r(10107),o=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),c=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:c.read,write:c.write}})],d.prototype,"role",void 0),d=(0,i.Cg)([(0,o.$)("esri.layers.support.Relationship")],d)},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,s]=t.split("."),a=/^\s*\d+\s*$/;if(!n?.match||!a.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!a.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(n,10),o=parseInt(s,10);return new e(l,o,r)}}},47423:(e,t,r)=>{r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>G,constructFeatureSet:()=>P,constructFeatureSetFromPortalItem:()=>V,constructFeatureSetFromRelationship:()=>U,constructFeatureSetFromUrl:()=>N,convertToFeatureSet:()=>J,createFeatureSetCollectionFromMap:()=>z,createFeatureSetCollectionFromService:()=>Q,initialiseMetaDataCache:()=>E});var i=r(43773);class n{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,r){this._layerById[t]=r,this._layerByName[e]=r}async featureSetByName(e,t=!0,r=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,r=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}var s=r(78878),a=r(35704),l=r(52106),o=r(70333),u=r(48938),c=r(61454),d=r(66395),p=r(87449),h=r(11221),y=r(33325),f=r(80609),m=r(50145),g=r(4576),_=r(80200),w=r(39516),b=r(88368),v=r(65864),F=r(68654),I=r(17126),T=r(54546),S=r(61956),A=r(7562);function x(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new p.dr("NeverReach");const t=[];for(let r=0;r<e.length;r++){const i=e[r],n=[`"${i.name.replaceAll('"','""')}" ${i.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){const r=e[t];n.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(n.join(" AND "))}const r=t.join(" OR ");return b.A.create(r)}(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const i=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[i]}}class R extends h.t{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._maxProcessing=1e3,this._layer=e.layer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,y.JB)(e.toJSON());return(0,_.d)(t,_.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new S.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?h.A:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){let t="",r=!1;null!=e.orderBy&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(t=e.orderBy.constructClause(),r=!0);const i=await this.databaseType(),n=null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,i);let s=this._maxQueryRate();const a=this._layer.capabilities?.query.maxRecordCount;null!=a&&a<s&&(s=a);const l=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),u=this._createQuery();return u.where=(0,w.mA)(u.where,n),null!=e.spatialFilter&&(u.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),u.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),u.geometry=e.spatialFilter.geometry),u.orderByFields=""!==t?t.split(","):null,u.outFields=o,u.returnGeometry=l,u.outSpatialReference=this.spatialReference,{ordered:r,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(u,s,e.abortSignal)}}async*_queryPaginated(e,t,r){let i;e.num=t,e.start=0;do{(0,p.dZ)(r),i=await this.executeQuery(e,"execute"),yield i.features,e.start+=t}while(void 0===i.exceededTransferLimit&&i.features.length===t||!1!==i.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t="",r=!1;null!=e.orderBy&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(t=e.orderBy.constructClause(),r=!0);const i=await this.databaseType(),n=null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,i),s=this._createQuery();s.where=(0,w.mA)(s.where,n),null!=e.spatialFilter&&(s.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),s.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),s.geometry=e.spatialFilter.geometry),s.orderByFields=""!==t?t.split(","):null,s.outSpatialReference=this.spatialReference;const a=await this.executeQuery(s,"executeForIds");if((0,p.dZ)(e.abortSignal),null==a||a.length<=0)return h.A;let l=this._maxQueryRate();const o=this._layer.capabilities?.query.maxRecordCount;null!=o&&o<l&&(l=o);const u=this._createQuery();return s.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),s.returnGeometry=!0!==this._removeGeometry,s.outSpatialReference=this.spatialReference,{ordered:r,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(u,a,l,e.abortSignal)}}async*_traverseIdSet(e,t,r,i){for(let n=0;n<t.length;n+=r){e.objectIds=t.slice(n,n+r),(0,p.dZ)(i);const s=await this.executeQuery(e,"execute");yield s.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,i=!!t?.supportsStatistics,n=!!t?.supportsDistinct,s=e.stat;if("count"===s)return n?this._queryCount(e):{calculated:!1};const a=e.field;if(null==a)return{calculated:!1};if(!1===i||!1===(0,f.DA)(a)&&!1===r||!1===a.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,a,e.limit??y.gO,e.abortSignal);if("distinct"===s)return!1===n?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,a,e.limit??y.gO,e.abortSignal):{calculated:!1};const l=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const o=this._createQuery();o.where=(0,w.mA)(o.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,l)),null!=e.spatialFilter&&(o.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),o.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),o.geometry=e.spatialFilter.geometry);const u=new A.A;u.statisticType=(0,m.Dp)(s),u.onStatisticField=(0,f.YY)(a,l),u.outStatisticFieldName="ARCADE_STAT_RESULT",o.returnGeometry=!1;let c="ARCADE_STAT_RESULT";o.outStatistics=[u];const d=await this.executeQuery(o,"execute");if(!d.hasOwnProperty("features")||0===d.features.length)throw new p.dr("InvalidStatResponse");let h=!1;const g=d.fields??[];for(let e=0;e<g.length;e++)if("ARCADE_STAT_RESULT"===g[e].name.toUpperCase()){c=g[e].name,"date"===g[e].type&&(h=!0);break}if(h){let e=d.features[0].attributes[c];return null!==e&&(e=new Date(d.features[0].attributes[c])),{calculated:!0,result:e}}return{calculated:!0,result:d.features[0].attributes[c]}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();return r.where=(0,w.mA)(r.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,t)),null!=e.spatialFilter&&(r.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),r.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),r.geometry=e.spatialFilter.geometry),r.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,i=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(let r=0;r<e.statistics.length-1;r++)(!1===e.statistics[r].workingexpr?.isStandardized||!1===(0,f.DA)(e.statistics[r].workingexpr)&&!1===i)&&(t=!1);return!1!==t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return h.A;const t=await this.databaseType(),r=e.groupBy,i=e.orderBy,n=e.statistics;let s=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();s={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==i||1===i._directions[r]}))}}let a="",l=!1;null!=i&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==s||(0,g.MJ)(r,0,r.length,i._fields,0,Math.min(i._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(a=i.constructClause(),l=!0),""===a&&(a=r.join(","));const o=[];for(let e=0;e<n.length;e++){const r=new A.A;r.onStatisticField=null!==n[e].workingexpr?(0,f.YY)(n[e].workingexpr,t):"",r.outStatisticFieldName=n[e].field,r.statisticType=n[e].toStatisticsName(),o.push(r)}let u=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<u&&(u=c);const d=null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,t),p=this._createQuery();return p.where=(0,w.mA)(p.where,d),null!=e.spatialFilter&&(p.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),p.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),p.geometry=e.spatialFilter.geometry),p.orderByFields=""!==a?a.split(","):null,p.outFields=["*"],p.outStatistics=o,p.groupByFieldsForStatistics=r,p.returnGeometry=!1,null==s?{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryPaginated(p,u,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryKeysetPaginated(p,s,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const i=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new p.dr("NotImplemented");e.where=(0,w.mA)(i,(0,f.YY)(t.clause,await this.databaseType()))}const n=await this.executeQuery(e,"execute");if((0,p.dZ)(r),!n.hasOwnProperty("features"))throw new p.dr("InvalidStatResponse");if(yield n.features,0===n.features.length||!n.exceededTransferLimit)break;x(t,n.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let i=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);i=this.recentlyUsedQueries.getFromCache(t),null===i&&(i=r(e),this.recentlyUsedQueries.addToCache(t,i),i=i.catch(e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e}))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===i&&(i=r(e)),i}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}static create(e,t,r,i,n){const s=new F.default({url:e,outFields:null===t?["*"]:t});return new R({layer:s,spatialReference:r,lrucache:i,interceptor:n})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,y.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,i,n){const s=this._layer;if(function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(s)){const a={objectIds:[e],returnMetadata:n};(t&&t>0||r&&r>0)&&(a.size=[t&&t>0?t:0,r&&r>0?r:t+1]),i&&i.length>0&&(a.attachmentTypes=i),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:s,query:a,method:"attachments"});const l=await s.queryAttachments(new T.A(a)),o=[];return l&&l[e]&&l[e].forEach(t=>{const r=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let i=null;n&&t.exifInfo&&(i=d.A.convertJsonToArcade(t.exifInfo,"system",!0)),o.push(new c.A(t.id,t.name,t.contentType,t.size,r,i,t.keywords??null))}),o}return[]}async queryRelatedFeatures(e){const t=(0,I.dw)(e);t.f="json",this._requestStandardised&&(t.sqlFormat="standard"),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const r=await(0,i.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){const e={},t=r.data;if(t?.relatedRecordGroups){const r=t.spatialReference;for(const i of t.relatedRecordGroups){const n=i.objectId,s=[];for(const e of i.relatedRecords){e.geometry&&(e.geometry.spatialReference=r);const t=new l.A({geometry:e.geometry?(0,v.rS)(e.geometry):null,attributes:e.attributes});s.push(t)}e[n]={features:s,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new p.dr("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,w.mA)(r.where,this.objectIdField+"="+e.toString()),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const i=await this._layer.queryFeatures(r);return 1===i.features.length?i.features[0]:null}async getIdentityUser(){await this.load();const e=o.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=o.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{const e=await(0,i.A)(t,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new R({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this.fsetInfo)return this.fsetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const r=this._layer.parsedUrl?.path??null;if(r){const n=await(0,i.A)(r,{responseType:"json",query:{f:"json"}});e=n?.data?.name??null,t=n?.data?.serviceItemId??null}const n=this._layer.title&&null!==(this._layer.parent??null);return this.featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:n?this._layer.id??null:null,webMapLayerTitle:n?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}var C=r(30235),M=r(26591);class L extends h.t{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._maxProcessing=1e3,this._layer=e.layer,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){if(await this._ensureLoaded(),await this.databaseType(),this.isTable()&&null!=e.spatialFilter)return h.A;const t=this._layer.nativeCapabilities();if(!1===t.canQueryRelated)return h.A;if(t.capabilities?.queryRelated.supportsPagination)return this._queryUsingPaging(t.source,e);let r="",i=!1;null!=e.orderBy&&!0===t.capabilities?.queryRelated.supportsOrderBy&&(r=e.orderBy.constructClause(),i=!0);const n=new M.default;n.objectIds=[this._findObjectId];const s=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]);n.outFields=s,n.relationshipId=this.relationship.id,n.where="1=1",n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,n.orderByFields=""!==r?r.split(","):null;const a=null!=e.spatialFilter;return{filterApplied:!(null!=e.where),spatialFilterApplied:!a,ordered:i,features:async function*(){const r=await t.source.queryRelatedFeatures(n);(0,p.dZ)(e.abortSignal),yield r[this._findObjectId]?r[this._findObjectId].features:[]}.apply(this)}}async _queryUsingPaging(e,t){let r="",i=!1;const n=this._layer.nativeCapabilities();null!=t.orderBy&&!0===n.capabilities?.queryRelated.supportsOrderBy&&(r=t.orderBy.constructClause(),i=!0),await this.databaseType();let s=this._maxQueryRate();const a=n.capabilities?.query.maxRecordCount;null!=a&&a<s&&(s=a);const l=null!=t.spatialFilter,o=null!=t.where,u=!0!==this._removeGeometry,c=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),d=new M.default;return d.relationshipId=this.relationship.id,d.objectIds=[this._findObjectId],d.outFields=c,d.where="1=1",d.orderByFields=""!==r?r.split(","):null,d.returnGeometry=u,d.outSpatialReference=this.spatialReference,{filterApplied:!o,spatialFilterApplied:!l,ordered:i,features:this._queryPaginated(e,d,s,t.abortSignal)}}async*_queryPaginated(e,t,r,i){let n;t.num=r,t.start=0;do{(0,p.dZ)(i),n=(await e.queryRelatedFeatures(t))[this._findObjectId]??{exceededTransferLimit:!1,features:[]},yield n.features,t.start+=r}while(void 0===n.exceededTransferLimit&&n.features.length===r||!1!==n.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new p.dr("NeverReach")}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}get gdbVersion(){return this._relatedLayer.gdbVersion}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,i,n){return this._relatedLayer.queryAttachments(e,t,r,i,n)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}async getFeatureSetInfo(){return this.fsetInfo??this._layer.featureSetInfo}}var j=r(23732),O=r(92474),k=r(4146),Z=r(80812);function E(){null===j.A.applicationCache&&(j.A.applicationCache=new j.A)}async function q(e,t,r){if(j.A.applicationCache){const r=j.A.applicationCache.getLayerInfo(e);if(r){const i=await r;return new F.default({url:e,outFields:t,sourceJSON:i})}const i=new F.default({url:e,outFields:t}),n=(async()=>(await i.load(),i.sourceJSON))();if(j.A.applicationCache){j.A.applicationCache.setLayerInfo(e,n);try{return await n,i}catch(t){throw j.A.applicationCache.clearLayerInfo(e),t}}return await n,i}if(null!=r){const i=r.getCachedLayerMetadata(e);if(i){const r=await i;return new F.default({url:e,outFields:t,sourceJSON:r})}const n=new F.default({url:e,outFields:t}),s=(async()=>(await n.load(),n.sourceJSON))();r.setCachedLayerMetadata(e,s);try{return await s,n}catch(t){throw r.removeCachedLayerMetadata(e,s),t}}return new F.default({url:e,outFields:t})}async function N(e,t,r,i,n,s=null){return P(await q(e,["*"],n),t,r,i,n,s)}function P(e,t=null,r=null,i=!0,n=null,s=null){switch(e.type){case"catalog-footprint":return P(e.parent,t,r,i,n,s);case"subtype-sublayer":{const l=P(e.parent,t,r,i,n,s);return new a.A({parentfeatureset:l,whereclause:b.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new C.A({layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:n,interceptor:s});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const a={layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:n,interceptor:s};return!e.url&&e.source?new C.A(a):new R(a)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function D(e,t){if(null!==j.A.applicationCache){const t=j.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const r=t.getCachedServiceMetadata(e);if(null!=r)return r}const r=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==j.A.applicationCache){j.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw j.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(i){throw t.removeCachedServiceMetadata(e,r),i}}return r}async function G(e,t,r){const n={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},s=await D(e,null);if(n.metadata=s,void 0!==s.controllerDatasetLayers?.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)n.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)n.layerNameLkp[e.id]=e.name;const l=s.controllerDatasetLayers.utilityNetworkLayerId;n.networkId=l;const o=await async function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==j.A.applicationCache){const e=j.A.applicationCache.getLayerInfo(r);if(null!==e)return e}const n=(async()=>{const r=await(0,i.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new p.dr("DataElementsNotFound")})();if(null!==j.A.applicationCache){j.A.applicationCache.setLayerInfo(r,n);try{return await n}catch(e){throw j.A.applicationCache.clearLayerInfo(r),e}}return n}(e,l);if(o){n.queryelem=o,n.queryelem?.dataElement&&void 0!==n.queryelem.dataElement.schemaGeneration&&(n.unVersion=n.queryelem.dataElement.schemaGeneration),n.lkp={},n.queryelem.dataElement.domainNetworks||(n.queryelem.dataElement.domainNetworks=[]);for(const e of n.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}}if(n.queryelem.dataElement.terminalConfigurations)for(const e of n.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)n.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==j.A.applicationCache){const t=j.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==j.A.applicationCache){j.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw j.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+l);if(void 0!==s.systemLayers?.associationsTableId&&null!==s.systemLayers.associationsTableId){let i=null;if(r&&n.unVersion<8){const r=[];n.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),i=await N(e+"/"+s.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await i.load(),n.unVersion>=4&&(i=new a.A({parentfeatureset:i,whereclause:b.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC})}),await i.load())}return{lkp:n.lkp,associations:i,unVersion:n.unVersion,terminals:n.terminals,layerIdLookup:n.layerIdLookup,sourceIdLookup:n.sourceIdLookup}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function U(e,t,r,i=null,n=null,s=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o=o.endsWith("/")?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await N(o,i,n,s,a,l);return new L({layer:e,relatedLayer:u,relationship:t,objectId:r,spatialReference:i,outFields:n,includeGeometry:s,lrucache:a,interceptor:l})}class B extends n{constructor(e,t=null,r=null,i=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){const i=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async featureSetByName(e,t=!0,r=null){if((0,O.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=n)return this._makeAndAddFeatureSet(n,t,r);if(this._map.allTables){const i=this._map.allTables.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if((0,O.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.id===e);if(n)return this._makeAndAddFeatureSet(n,t,r);if(this._map.allTables){const i=this._map.allTables.find(t=>(0,y.eB)(t)&&t.id===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}}class $ extends n{constructor(e,t=null,r=null,i=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){const i=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async _loadMetaData(){const e=await D(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new $(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=await this._loadMetaData();let s=null;for(const t of n.layers??[])t.name===e&&(s=t);if(!s)for(const t of n.tables??[])t.name===e&&(s=t);if(s){const e=await q(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=await this._loadMetaData();let s=null;for(const t of n.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of n.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(s){const e=await q(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function z(e,t,r=null,i=null){return new B(e,t,r,i)}function Q(e,t,r=null,i=null){return new $(e,t,r,i)}function J(e,t,r,i,n){if(null===e)return null;if((0,s.m)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof k.A&&(0,y.NI)(e)){const s=e;switch(t){case"datasource":return P(s,n,"outFields"in s?s.outFields:null,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return P(s,n,"outFields"in s?s.outFields:null,!0,r,i)}return null}if((0,s.a1)(e)){switch(t){case"datasource":return P(e.parent,n,e.parent.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return P(e,n,e.parent.outFields,!0,r,i)}return null}return null}async function V(e,t,r,i,n,s,a,l=null){if(j.A.applicationCache){const o=j.A.applicationCache.getLayerInfo(e+":"+s.url);if(o)return Y(await o,t,r,i,n,a,l)}if(null!=a){const o=a.getCachedPortalItem(s.url,e);if(null!=o)return await Y(await o,t,r,i,n,a,l)}const o=new Z.default({id:e,portal:s}).load();j.A.applicationCache?j.A.applicationCache.setLayerInfo(e+":"+s.url,o):null!=a&&a.setCachedPortalItem(s.url,e,o);try{return await Y(await o,t,r,i,n,a,l)}catch(t){throw j.A.applicationCache&&j.A.applicationCache.clearLayerInfo(e+":"+s.url),null!=a&&a.removeCachedPortalItem(s.url,e,o),t}}async function Y(e,t,r,i,n,s,a){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await q((0,y.Qi)(e.url??"")+"/"+t,["*"],s);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=s){const t=s.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=k.A.fromPortalItem(e);s.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(r){throw s.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else l=await k.A.fromPortalItem(e)}return P(l,r,i,n,s,a)}},50498:(e,t,r)=>{r.d(t,{Ye:()=>d,gy:()=>c,yR:()=>p});var i=r(66552),n=r(5443),s=r(91075),a=r(48526),l=r(86738),o=r(39829),u=r(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),d=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),p={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:a.A,point:l.A,polyline:u.A,polygon:o.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>F});var i,n=r(31635),s=r(37838),a=r(69540),l=r(51447),o=r(25482),u=r(53966),c=r(36708),d=r(24326),p=r(10107),h=(r(44208),r(87811),r(64108)),y=r(12195),f=r(65864),m=r(50498),g=r(55156),_=r(60950),w=r(54339),b=r(33910);function v(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let F=class extends((0,a.OU)(o.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,_.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,g.I)(this.origin);if(e)return(0,w.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,w.r)(this,t):null}getGlobalId(){const e=(0,g.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:v(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],F.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,p.MZ)({value:null})],F.prototype,"attributes",null),(0,n.Cg)([(0,p.MZ)({value:null,types:m.yR,json:{read:f.rS}})],F.prototype,"geometry",null),(0,n.Cg)([(0,p.MZ)({type:Boolean})],F.prototype,"isAggregate",void 0),(0,n.Cg)([(0,p.MZ)({clonable:!1})],F.prototype,"layer",void 0),(0,n.Cg)([(0,p.MZ)({clonable:"reference"})],F.prototype,"origin",void 0),(0,n.Cg)([(0,p.MZ)({type:s.A,value:null})],F.prototype,"popupTemplate",null),(0,n.Cg)([(0,p.MZ)({clonable:"reference"})],F.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,p.MZ)({value:null,types:b.Es})],F.prototype,"symbol",null),(0,n.Cg)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],F.prototype,"_version",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,value:!0})],F.prototype,"visible",null),F=i=(0,n.Cg)([(0,h.$)("esri.Graphic")],F)},52136:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const a=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},55156:(e,t,r)=>{r.d(t,{I:()=>n,e:()=>i});const i=Symbol("idFieldsProviderSymbol");function n(e){return(t=e)&&i in t?e[i]:void 0;var t}},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>y});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),a=r(15032),l=r(65864),o=r(95466),u=r(43668),c=r(98623);const d=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function h(e,t){return f.create(e,t,null,["$feature","$view"])}function y(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:s,Dictionary:a}=await(0,u.l)();let l;try{l=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const o=s.scriptUsesGeometryEngine(l);o&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,l,null,!1,o);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(l,c);let p=null;null!=r&&(p=new a(r),p.immutable=!0);const h=new a;return h.immutable=!1,h.setField("scale",0),new f(e,s,l,d,t,h,p,a)}constructor(e,t,r,i,n,s,a,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=a,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new o.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(n)for(const e of r.features)n(e.geometry)}},62815:(e,t,r)=>{r.d(t,{N:()=>a});var i=r(83047),n=r(73941),s=r(21325);function a(e,t,r){if(null==t||null==r||r.vcsWkid||(0,s.aI)(t,r)||(0,n.xP)(t)||(0,n.xP)(r))return null;const a=(0,i.G9)(t)/(0,i.G9)(r);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,a);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},73681:(e,t,r)=>{r.d(t,{n:()=>o});var i=r(49186),n=r(53966),s=r(46140),a=r(95466),l=r(55674);class o{static async from(e,t,r){const a=e.dictionary_version?s.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const h=await(0,l.xR)(e.expression,null,d);if(!h)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!a||!a.greaterEqual(4,0);y&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});const f=new u(r,y);return new o(y,c,h,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,r)=>{r.d(t,{Gh:()=>m,tk:()=>p,BR:()=>d,wI:()=>c,G$:()=>y,$x:()=>h,Ov:()=>l,W_:()=>o,OP:()=>f,TU:()=>a,XX:()=>s,jy:()=>u});var i=r(70333),n=r(43773);r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function u(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function c(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const a=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,n.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function h(e,t){return null}function y(e){return null}function f(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function m(e,t){if(!t||!f(e))return;const r=(e.url,null);r&&(e.url=r)}},79677:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(31635),s=r(25482),a=r(88930),l=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),u=r(64108),c=r(43937),d=r(98623);let p=class extends s.o{static{i=this}static get allTime(){return h}static get empty(){return y}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let n=this.end;if(n){const r=(0,a.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,l;return n>=t&&n<=r?a=n:t>=n&&t<=s&&(a=t),r>=n&&r<=s?l=r:s>=t&&s<=r&&(l=s),null==a||null==l||isNaN(a)||isNaN(l)?i.empty:new i({start:a===-1/0?null:new Date(a),end:l===1/0?null:new Date(l)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:l}=this;return null!=s&&(n.start=(0,a.S1)(s,e,t,r)),null!=l&&(n.end=(0,a.S1)(l,e,t,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,n.Cg)([(0,o.w)("end")],p.prototype,"readEnd",null),(0,n.Cg)([(0,c.K)("end")],p.prototype,"writeEnd",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,n.Cg)([(0,o.w)("start")],p.prototype,"readStart",null),(0,n.Cg)([(0,c.K)("start")],p.prototype,"writeStart",null),p=i=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],p);const h=new p,y=new p({start:void 0,end:void 0})},91218:(e,t,r)=>{r.r(t),r.d(t,{canProjectWithoutEngine:()=>$,initializeProjection:()=>Q,isEqualBaseGCS:()=>z,isLoaded:()=>M,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>j,load:()=>k,project:()=>Z,projectExtent:()=>re,projectMany:()=>E,projectMultipoint:()=>K,projectOrLoad:()=>q,projectOrLoadMany:()=>N,projectPoint:()=>V,projectPolygon:()=>ee,projectPolyline:()=>H,projectWithZConversion:()=>B,projectWithoutEngine:()=>J,requiresLoad:()=>O,test:()=>G,tryProjectWithZConversion:()=>U,unload:()=>D});var i=r(49186),n=r(74887),s=r(62788),a=r(95488),l=r(51850),o=r(21276),u=r(73941),c=r(5443),d=r(91075),p=r(48526),h=r(86738),y=r(39829),f=r(82799),m=r(16930),g=r(159),_=r(9762),w=r(37539);function b(e,t,r,i,n,s){return v[0]=e,v[1]=t,v[2]=r,(0,_.projectBuffer)(v,i,0,n,s,0)}const v=(0,l.vt)();var F=r(21325),I=r(62815);let T=null,S=null,A=null,x=null,R={};const C=new a.I;function M(){return!!(S?.isLoaded()&&A?.isLoaded()&&x?.isLoaded())}function L(){return!!M()||((0,s.gc)(C),k(),!1)}function j(e,t){return!e||!t||$(e,t)||L()}function O(e,t){return!$(e,t)&&!M()}async function k(e){null==T&&(T=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(S=e,S.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(A=e,A.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(x=e,x.load()))])),await T,(0,n.Te)(e),C.notify()}function Z(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,o.H)(e),E(e,e[0].spatialReference,t,r)):((0,o.f)(e),E([e],e.spatialReference,t,r)[0])}function E(e,t,r,i){if(null==t||null==r)return e;if($(t,r,i))return e.map(e=>J(e,t,r));if(null==i?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>J(e,t,m.A.WGS84)).map(e=>U(e,r));if(null==i?.geographicTransformation&&(0,u.jA)(r))return e.map(e=>U(e,m.A.WGS84)).map(e=>J(e,m.A.WGS84,r));if(!M())throw new P;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:x.getTransformation(t,r,i.areaOfInterestExtent)||new g.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let n=R[e];n||(n=x.getTransformation(t,r)||new g.A,R[e]=n),i={geographicTransformation:n}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof d.A?S.executeMany(e,r,i):A.executeMany(e,r,i)}function q(e,t){const r=N([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function N(e,t){if(!M())for(const r of e)if(null!=r&&!(0,F.aI)(r.spatialReference,t)&&(0,F.fn)(r.spatialReference)&&(0,F.fn)(t)&&!$(r.spatialReference,t))return(0,s.gc)(C),{pending:k(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,F.aI)(e.spatialReference,t)?e:(0,F.fn)(e.spatialReference)&&(0,F.fn)(t)?U(e,t):null)}}class P extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function D(){T=null,S=null,A=null,x=null,R={}}const G={get loadPromise(){return T}};function U(e,t){try{const r=Z(e,t);if(null==r)return null;"xmin"in e&&"xmin"in r&&(r.zmin=e.zmin,r.zmax=e.zmax);const i=(0,I.N)(r.type,e.spatialReference,t);return null!=i&&i(r),r}catch(e){if(!(e instanceof P))throw e;return null}}async function B(e,t,r){const i=e.spatialReference;return null!=i&&null!=t&&await Q(i,t,null,r),U(e,t)}function $(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,F.aI)(e,t)||(0,F.fn)(e)&&(0,F.fn)(t)&&!!(0,w.jd)(e,t))}function z(e,t){if((0,F.aI)(e,t))return!0;if(!(0,F.fn)(e)||!(0,F.fn)(t))return!1;const r=(0,F.oT)(e)||(0,F.K8)(e)||(0,F.x1)(e),i=(0,F.oT)(t)||(0,F.K8)(t)||(0,F.x1)(t);return r&&i}async function Q(e,t,r,i){if(M())return(0,n.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:r,options:n}of e)if(t&&r&&!$(t,r,n))return k(i)}else if(e&&t&&!$(e,t,r))return k(i);return(0,n.NO)(i)}function J(e,t,r){return e?"x"in e?Y(e,t,new h.A,r,0):"xmin"in e?ie(e,t,new c.A,r,0):"rings"in e?te(e,t,new y.A,r,0):"paths"in e?X(e,t,new f.A,r,0):"points"in e?W(e,t,new p.A,r,0):null:null}function V(e,t,r=t.spatialReference,i=0){return null!=r&&null!=e.spatialReference&&null!=Y(e,e.spatialReference,t,r,i)}function Y(e,t,r,i,n){se[0]=e.x,se[1]=e.y;const s=e.z;return se[2]=void 0!==s?s:n,(0,_.projectBuffer)(se,t,0,se,i,0)?(r.x=se[0],r.y=se[1],r.spatialReference=i,void 0!==s||(0,u.xP)(i)?(r.z=se[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function K(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=W(e,e.spatialReference,t,r,i)}function W(e,t,r,i,n){const{points:s,hasZ:a,hasM:l}=e,o=[],c=s.length,d=[];for(const e of s)d.push(e[0],e[1],a?e[2]:n);if(!(0,_.projectBuffer)(d,t,0,d,i,0,c))return null;const p=a||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,r=d[t],i=d[t+1];p&&l?o.push([r,i,d[t+2],s[e][3]]):p?o.push([r,i,d[t+2]]):l?o.push([r,i,s[e][2]]):o.push([r,i])}return r.points=o,r.spatialReference=i,r.hasZ=a,r.hasM=l,r}function H(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,i)}function X(e,t,r,i,n){const{paths:s,hasZ:a,hasM:l}=e,o=[];if(!ne(s,a??!1,l??!1,t,o,i,n))return null;const c=a||(0,u.xP)(i);return r.paths=o,r.spatialReference=i,r.hasZ=c,r.hasM=l,r}function ee(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,i)}function te(e,t,r,i,n){const{rings:s,hasZ:a,hasM:l}=e,o=[];if(!ne(s,a??!1,l??!1,t,o,i,n))return null;const c=a||(0,u.xP)(i);return r.rings=o,r.spatialReference=i,r.hasZ=c,r.hasM=l,r}function re(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=ie(e,e.spatialReference,t,r,i)}function ie(e,t,r,i,n){const{xmin:s,ymin:a,xmax:l,ymax:o,hasZ:c,hasM:d}=e;if(!b(s,a,c?e.zmin:n,t,se,i))return null;const p=c||(0,u.xP)(i);return r.xmin=se[0],r.ymin=se[1],p&&(r.zmin=se[2]),b(l,o,c?e.zmax:n,t,se,i)?(r.xmax=se[0],r.ymax=se[1],p&&(r.zmax=se[2]),d&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=i,r):null}function ne(e,t,r,i,n,s,a=0){const l=new Array;for(const r of e)for(const e of r)l.push(e[0],e[1],t?e[2]:a);if(!(0,_.projectBuffer)(l,i,0,l,s,0))return!1;let o=0;n.length=0;const c=t||(0,u.xP)(s);for(const t of e){const e=new Array;for(const i of t)c&&r?e.push([l[o++],l[o++],l[o++],i[3]]):c?e.push([l[o++],l[o++],l[o++]]):r?(e.push([l[o++],l[o++],i[2]]),o++):(e.push([l[o++],l[o++]]),o++);n.push(e)}return!0}const se=(0,l.vt)()},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(31635),s=r(66552),a=r(25482),l=r(10107),o=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({asc:"ascending",desc:"descending"});let c=class extends a.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,n.Cg)([(0,o.$)("esri.layers.support.OrderByInfo")],c)},99157:(e,t,r)=>{r.d(t,{A:()=>o});var i,n=r(31635),s=r(69622),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108));let o=i=class extends s.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,a.MZ)()],o.prototype,"isInverse",void 0),(0,n.Cg)([(0,a.MZ)()],o.prototype,"wkt",void 0),(0,n.Cg)([(0,a.MZ)()],o.prototype,"wkid",void 0),o=i=(0,n.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformationStep")],o)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2561,3099,3548,4342,7548,7694],{159:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(31635),s=r(69622),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108)),o=r(99157);let u=i=class extends s.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,n.Cg)([(0,a.MZ)({type:[o.A],nonNullable:!0})],u.prototype,"steps",void 0),u=i=(0,n.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformation")],u)},4146:(e,t,r)=>{r.d(t,{A:()=>w});var i=r(31635),n=r(43773),s=r(49186),a=r(65529),l=r(4902),o=r(92474),u=r(53966),c=r(74887),d=r(84952),p=r(10107),h=(r(44208),r(87811),r(64108)),y=r(5443),f=r(16930),m=r(92602),g=r(79677);let _=0,w=class extends((0,a.Zt)((0,l.s)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,p.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,i.Cg)([(0,p.MZ)({type:y.A})],w.prototype,"fullExtent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i.Cg)([(0,p.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:f.A})],w.prototype,"spatialReference",void 0),(0,i.Cg)([(0,p.MZ)({type:String})],w.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)()],w.prototype,"url",void 0),(0,i.Cg)([(0,p.MZ)({type:g.A})],w.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i.Cg)([(0,h.$)("esri.layers.Layer")],w)},4902:(e,t,r)=>{r.d(t,{s:()=>a});var i=r(31635),n=r(64108);let s=0;const a=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return r=(0,i.Cg)([(0,n.$)("esri.core.Identifiable")],r),r};a(class{})},6797:(e,t,r)=>{r.d(t,{Ui:()=>p});var i=r(69622),n=r(7762),s=r(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function o(e){return e instanceof n.A?Object.keys(e.items):l(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=o(e),n=o(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),p=i.filter(e=>!n.includes(e)),h=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(s,p).sort(),y=c(e);if(y&&a.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const i of h){const n=u(e,i),s=u(t,i);let a;if((m||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])a=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;a={type:"complete",oldValue:n,newValue:s}}else a="object"==typeof n&&"object"==typeof s&&c(n)===c(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=a&&(null!=f?f.diff[i]=a:f={type:"partial",diff:{[i]:a}})}}return f}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},9762:(e,t,r)=>{r.r(t),r.d(t,{projectBuffer:()=>n});var i=r(37539);function n(e,t,r,n,s,a,l=Math.floor(e.length/3)){const o=(0,i.jd)(t,s);if(null==o)return!1;if(o===i.pO){if(e===n&&r===a)return!0;const t=r+3*l;for(let i=r,s=a;i<t;i++,s++)n[s]=e[i];return!0}const u=r+3*l;for(let t=r,i=a;t<u;t+=3,i+=3)o(e,t,n,i);return!0}},10536:(e,t,r)=>{function i(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=i(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>i})},16215:(e,t,r)=>{r.d(t,{S:()=>n,Y:()=>i});const i=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&i in e}},16494:(e,t,r)=>{r.d(t,{Nd:()=>l,W5:()=>a});var i=r(37330);const n=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),s=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],a=new i.I({whiteList:n,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(s.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},17126:(e,t,r)=>{r.d(t,{dw:()=>a,qD:()=>l,qW:()=>o});var i=r(43773),n=r(21325),s=r(10536);function a(e,t){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!t?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSR&&(r.outSR=(0,n.YX)(r.outSR)),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function l(e,t,r){const i=await u(e,t,r),n=i.data,s=n.geometryType,a=n.spatialReference,l={};for(const e of n.relatedRecordGroups){const t={fields:void 0,geometryType:s,spatialReference:a,hasZ:!!n.hasZ,hasM:!!n.hasM,features:e.relatedRecords};if(null!=e.objectId)l[e.objectId]=t;else for(const r of Object.keys(e))"relatedRecords"!==r&&(l[e[r]]=t)}return{...i,data:l}}async function o(e,t,r){const i=await u(e,t,r,{returnCountOnly:!0}),n=i.data,s={};for(const e of n.relatedRecordGroups)null!=e.objectId&&(s[e.objectId]=e.count);return{...i,data:s}}async function u(e,t,r={},n){const l=(0,s.z)({...e.query,f:"json",...n,...a(t,n)});return(0,i.A)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...l}})}},17311:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(31635),n=r(69622),s=r(4576),a=r(60999),l=r(7762),o=r(16494),u=r(10107),c=(r(44208),r(53966),r(64108)),d=r(30524),p=r(43668);const h=/<br\s*\/*>/gi;let y=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,a.UT)(()=>(0,p.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,n=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:a,workingTitle:l}=this,u=l&&a;t.forEach(t=>{const c=t.getObjectId()??t.attributes[e.objectIdField];let d=u?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:a,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:l}):"";r?.removeHTML&&(d=o.Nd.sanitize(d).replaceAll(h," ")),i.set(c,d)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,d.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const n=await e.queryFeatures(i);if(n?.features.length===t.length)return n.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,d.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,u.MZ)({readOnly:!0})],y.prototype,"_arcadeTask",null),(0,i.Cg)([(0,u.MZ)()],y.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],y.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],y.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,u.MZ)()],y.prototype,"displayField",void 0),(0,i.Cg)([(0,u.MZ)()],y.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,u.MZ)()],y.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,u.MZ)()],y.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],y.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,u.MZ)()],y.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)()],y.prototype,"objectIdField",void 0),(0,i.Cg)([(0,u.MZ)()],y.prototype,"requiredFields",null),y=(0,i.Cg)([(0,c.$)("esri.layers.support.TitleCreator")],y)},22671:(e,t,r)=>{r.d(t,{A:()=>_});var i,n=r(31635),s=r(52106),a=r(66552),l=r(25482),o=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),d=r(64108),p=r(43937),h=r(16930),y=r(65864),f=r(50498),m=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,o.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=s.length;e<t;e++)a?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,a]}=r;let l=null,o=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;o=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+i,e=>n-e*a,l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=h.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],a=r.fromJSON(s),l=s.geometry?.spatialReference;null==a.geometry||l||(a.geometry.spatialReference=i);const o=s.aggregateGeometries,u=a.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],r=o[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(a)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=r(l[1]);e===i&&a===n||(s.push([e-i,a-n]),i=e,n=a)}else i=t(l[0]),n=r(l[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,y.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],a=this._quantizePoints(s,t,r);a&&n.push(a)}return n.length>0?((0,y.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,y.Bi)(e)?e.rings:e.paths;let a,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(a+=n[0],l+=n[1]):(a=n[0],l=n[1]),n[0]=t(a),n[1]=r(l)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let a,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(a+=i[0],l+=i[1]):(a=i[0],l=i[1]),i[0]=t(a),i[1]=r(l)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n.Cg)([(0,c.w)("features")],_.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,n.Cg)([(0,p.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,c.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:h.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n.Cg)([(0,p.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n.Cg)([(0,d.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),n=r(69540),s=r(66552),a=r(25482),l=r(10107),o=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let c=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"thumbnail",void 0),c=(0,i.Cg)([(0,o.$)("esri.layers.support.FeatureTemplate")],c)},30235:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(52106),n=r(48938),s=r(87449),a=r(11221),l=r(33325),o=r(80609),u=r(4576),c=r(39516),d=r(91075),p=r(68654),h=r(33143),y=r(20437);class f extends a.t{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._maxProcessing=1e3,this._layer=e.layer,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.gO}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type||this._layer.objectIdField===r.name)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}async _queryAll(){return(await this.query({abortSignal:n._})).features}async query(e){await this._ensureLoaded();let t="",r=!1;if(null!=e.orderBy&&(t=e.orderBy.constructClause(),r=!0),this.isTable()&&null!=e.spatialFilter)return a.A;const i=this._createQuery();return i.where=(0,c.mA)(i.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,o.YY)(e.where,0)),null!=e.spatialFilter&&(i.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),i.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),i.geometry=e.spatialFilter.geometry),i.outSpatialReference=this.spatialReference,i.orderByFields=""!==t?t.split(","):null,{filterApplied:!0,spatialFilterApplied:!0,ordered:r,features:async function*(){const t=await this._layer.queryFeatures(i);(0,s.dZ)(e.abortSignal);for(const e of(0,u.Ho)(t.features,this._maxQueryRate()))yield e.map(e=>this._changeFeature(e))}.apply(this)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new s.dr("NeverReach")}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new i.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const r in e)t[r]=e[r];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const i=e.layerDefinition.typeIdField??"",n=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)n.push(h.A.fromJSON(t));let s=e.layerDefinition.geometryType;void 0===s&&(s=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!r){let t=!1;for(const i of e.layerDefinition.fields)if("oid"===i.type||"esriFieldTypeOID"===i.type){r=i.name,t=!0;break}if(!1===t){let t="FID",i=!0,n=0;for(;i;){let r=!0;for(const i of e.layerDefinition.fields)if(i.name===t){r=!1;break}!0===r?i=!1:(n++,t="FID"+n.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const s=[];for(let r=0;r<a.length;r++)s.push({geometry:e.featureSet.features[r].geometry,attributes:e.featureSet.features[r].attributes?this._cloneAttr(e.featureSet.features[r].attributes):{}}),s[r].attributes[t]=r;a=s,r=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof y.A?o.push(t):o.push(y.A.fromJSON(t));let u=s;switch(u||(u=""),u){case"esriGeometryPoint":u="point";break;case"esriGeometryPolyline":u="polyline";break;case"esriGeometryPolygon":u="polygon";break;case"esriGeometryEnvelope":u="extent";break;case"esriGeometryMultipoint":u="multipoint";break;case"":case"esriGeometryNull":u="esriGeometryNull"}if("esriGeometryNull"!==u)for(const e of a)e.geometry&&e.geometry instanceof d.A==0&&(e.geometry.type=u,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const c={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:n,typeIdField:i,objectIdField:r,spatialReference:t},m="esriGeometryNull"===u||null===u;m||(c.geometryType=u);const g=new p.default(c);return e?.layerDefinition?.subtypeField&&e?.layerDefinition?.subtypes&&g.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new f({layer:g,spatialReference:t,isTable:m})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const r=await this._layer.queryFeatures(t);return 1===r.features.length?r.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return this._layer?.timeInfo}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return this.fsetInfo??{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>y,XJ:()=>f,lc:()=>h,mX:()=>_,rU:()=>g,tH:()=>I});var i=r(799);const n="__begin__",s="__end__",a=new RegExp(n,"ig"),l=new RegExp(s,"ig"),o=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),c='"',d=c+" + ",p=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function _(e){let t;return e?(t=(0,i.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=o.test(t)?t.replace(o,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(a,d).replaceAll(l,p)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,F=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=b.exec(e)||v.exec(e);return t?t[1]||t[3]:(t=F.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>o,fY:()=>c,ne:()=>u});var i=r(31635),n=r(93637),s=r(10107),a=(r(44208),r(53966),r(87811),r(64108)),l=r(91880);function o(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new l.A;return n.read(i,r),[n]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:o},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,a.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),n=r(69540),s=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),o=r(64108),u=r(43937),c=r(80451),d=r(29005);let p=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"domains",void 0),(0,i.Cg)([(0,l.w)("domains")],p.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],p.prototype,"writeDomains",null),(0,i.Cg)([(0,a.MZ)({type:[d.A],json:{write:!0}})],p.prototype,"templates",void 0),p=(0,i.Cg)([(0,o.$)("esri.layers.support.FeatureType")],p)},35704:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(48938),n=r(87449),s=r(11221),a=r(33325),l=r(80609),o=r(88368),u=r(16930);class c extends s.t{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof o.A?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new u.A({wkid:4326}),this.geometryType=a.ik.point)}async _queryAll(){return(await this.query({abortSignal:i._})).features}async query(e){let t=e.where;null!==this._whereClauseFunction||(null!=t?null!==this._whereclause&&(t=(0,l.kg)(this._whereclause,t)):t=this._whereclause),await this._ensureLoaded();const r=await this._parent.query({...e,where:t});return(0,n.dZ)(e.abortSignal),r.filterApplied&&null==this._whereClauseFunction?r:{...r,features:this._applyFilter(r.features,e.abortSignal)}}async*_applyFilter(e,t){for await(const r of e)if((0,n.dZ)(t),null==this._whereClauseFunction){const e=r.filter(e=>this.executeWhereClause(e));e.length>0&&(yield e)}else{const e=[];for(const t of r)await this.executeWhereClauseDeferred(t)&&e.push(t);e.length>0&&(yield e)}}async queryStat(e){if(null!==this._whereClauseFunction)return null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal):{calculated:!1};let t=this._whereclause;null!=e.where&&null!==this._whereclause&&(t=(0,l.kg)(this._whereclause,e.where));const r=await this._parent.queryStat({...e,where:t});return!1===r.calculated?null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal):{calculated:!1}:r}async canQueryAggregate(e){if(null!==this._whereClauseFunction)return!1;let t=e.where;return null!=t?null!==this._whereclause&&(t=(0,l.kg)(this._whereclause,t)):t=this._whereclause,null!==this._parent&&this._parent.canQueryAggregate({...e,where:t})}async queryAggregate(e){if(null===this._parent)throw new n.dr("NeverReach");let t=e.where;return null!=t?null!==this._whereclause&&(t=(0,l.kg)(this._whereclause,t)):t=this._whereclause,this._parent.queryAggregate({...e,where:t})}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){return null!==this._whereClauseFunction?this._whereClauseFunction(e):this.executeWhereClause(e)}getFieldsIndex(){return this._parent.getFieldsIndex()}}},36708:(e,t,r)=>{r.d(t,{C_:()=>p,OH:()=>f,Vh:()=>m,on:()=>d,pc:()=>g,wB:()=>o,z7:()=>u});var i=r(37955),n=r(36563),s=r(97768),a=r(74887),l=r(14012);function o(e,t,r={}){return c(e,t,r,h)}function u(e,t,r={}){return c(e,t,r,y)}function c(e,t,r={},i){let n=null;const a=r.once?(e,r)=>{i(e)&&((0,s.xt)(n),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(n=(0,l.Cn)(e,a,r.sync,r.equals),r.initial){const t=e();a(t,t)}return n}function d(e,t,r,a={}){let l=null,u=null,c=null;function d(){l&&u&&(u.remove(),a.onListenerRemove?.(l),l=null,u=null)}function p(e){a.once&&a.once&&(0,s.xt)(c),r(e)}const h=o(e,(e,r)=>{d(),(0,i.wb)(e)&&(l=e,u=(0,i.on)(e,t,p),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return c=(0,n.hA)(()=>{h.remove(),d()}),c}function p(e,t){return function(e,t,r){if((0,a.G4)(r))return Promise.reject((0,a.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let l=null;function o(){l=(0,s.xt)(l)}return new Promise((i,s)=>{l=(0,n.vE)([(0,a.u7)(r,()=>{o(),s((0,a.NK)())}),c(e,e=>{o(),i(e)},{sync:!1,once:!0},t??h)])})}(e,y,t)}function h(e){return!0}function y(e){return!!e}r(80559);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},37352:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(31635),s=r(7762),a=r(25482),l=r(10107),o=(r(44208),r(53966),r(87811),r(64108));let u=i=class extends a.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,n.Cg)([(0,o.$)("esri.layers.support.LayerFloorInfo")],u)},37539:(e,t,r)=>{r.d(t,{pO:()=>f,jd:()=>p,Tp:()=>h,w5:()=>d});var i=r(34727),n=r(83047),s=r(73941),a=r(79258);Math.PI;const l=a.$O.radius,o=a.$O.eccentricitySquared,u={a1:l*o,a2:l*o*l*o,a3:l*o*o/2,a4:l*o*l*o*2.5,a5:l*o+l*o*o/2,a6:1-o};a.$O.radius,a.$O.flattening,a.Sw.radius,a.Sw.flattening,a.sH.radius,a.sH.flattening,a.sH.radius;var c=r(21325);const d={2:{5:f,7:null,9:null,10:f,1:I,6:null,8:null,0:null,3:g,11:_,2:f,4:R},5:{5:f,7:null,9:null,10:f,1:I,6:null,8:null,0:null,3:g,11:_,2:f,4:R},7:{5:null,7:f,9:null,10:f,1:null,6:F,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:f,10:f,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,t,r,i){const n=e[t]/k,s=O-2*Math.atan(Math.exp(-e[t+1]/k)),a=k+e[t+2],l=Math.cos(s)*a;r[i]=Math.cos(n)*l,r[i+1]=Math.sin(n)*l,r[i+2]=Math.sin(s)*a},6:null,8:null,0:null,3:f,11:function(e,t,r,i){m(e,t,r,i),_(r,i,r,i)},2:m,4:function(e,t,r,i){m(e,t,r,i),R(r,i,r,i)}},4:{5:C,7:null,9:null,10:C,1:function(e,t,r,i){C(e,t,r,i),I(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){C(e,t,r,i),g(r,i,r,i)},11:function(e,t,r,i){C(e,t,r,i),_(r,i,r,i)},2:C,4:f},1:{5:x,7:null,9:null,10:x,1:f,6:null,8:null,0:null,3:function(e,t,r,i){x(e,t,r,i),g(r,i,r,i)},11:function(e,t,r,i){x(e,t,r,i),_(r,i,r,i)},2:x,4:function(e,t,r,i){x(e,t,r,i),R(r,i,r,i)}},6:{5:null,7:A,9:null,10:A,1:null,6:f,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:S,10:S,1:null,6:null,8:f,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:f,3:null,11:null,2:null,4:null},10:{5:f,7:f,9:f,10:f,1:I,6:F,8:v,0:null,3:g,11:_,2:f,4:R},11:{5:w,7:null,9:null,10:w,1:function(e,t,r,i){w(e,t,r,i),I(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){w(e,t,r,i),g(r,i,r,i)},11:f,2:w,4:function(e,t,r,i){w(e,t,r,i),R(r,i,r,i)}}};function p(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(M.source.spatialReference===e&&M.dest.spatialReference===t)return M;const r=y(e,M.source),i=y(t,M.dest);return 0===r&&0===i?(0,c.aI)(e,t)?M.projector=f:M.projector=null:M.projector=d[r][i],M}function y(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function f(e,t,r,i){e!==r&&(r[i++]=e[t++],r[i++]=e[t++],r[i]=e[t])}function m(e,t,r,i){r[i]=j*(e[t]/k),r[i+1]=j*(O-2*Math.atan(Math.exp(-e[t+1]/k))),r[i+2]=e[t+2]}function g(e,t,r,n){!function(e,t,r,n,s){const a=.4999999*Math.PI,l=(0,i.qE)(L*e[t+1],-a,a),o=Math.sin(l);r[n++]=L*e[t]*s.radius,r[n++]=s.halfSemiMajorAxis*Math.log((1+o)/(1-o)),r[n]=e[t+2]}(e,t,r,n,a.$O)}function _(e,t,r,i){r[i]=e[t]*Z,r[i+1]=e[t+1]*Z,r[i+2]=e[t+2]}function w(e,t,r,i){r[i]=e[t]*E,r[i+1]=e[t+1]*E,r[i+2]=e[t+2]}function b(e,t,r,i,n){const s=n+e[t+2],a=L*e[t+1],l=L*e[t],o=Math.cos(a)*s;r[i]=Math.cos(l)*o,r[i+1]=Math.sin(l)*o,r[i+2]=Math.sin(a)*s}function v(e,t,r,i){b(e,t,r,i,a.Sw.radius)}function F(e,t,r,i){b(e,t,r,i,a.sH.radius)}function I(e,t,r,i){b(e,t,r,i,a.$O.radius)}function T(e,t,r,n,s){const a=e[t],l=e[t+1],o=e[t+2],u=Math.sqrt(a*a+l*l+o*o),c=(0,i.YN)(o/(0===u?1:u)),d=Math.atan2(l,a);r[n++]=j*d,r[n++]=j*c,r[n]=u-s}function S(e,t,r,i){T(e,t,r,i,a.Sw.radius)}function A(e,t,r,i){T(e,t,r,i,a.sH.radius)}function x(e,t,r,i){T(e,t,r,i,a.$O.radius)}function R(e,t,r,i){!function(e,t,r,i,n){const s=L*e[t],a=L*e[t+1],l=e[t+2],o=Math.sin(a),u=Math.cos(a),c=n.radius/Math.sqrt(1-n.eccentricitySquared*o*o);r[i++]=(c+l)*u*Math.cos(s),r[i++]=(c+l)*u*Math.sin(s),r[i++]=(c*(1-n.eccentricitySquared)+l)*o}(e,t,r,i,a.$O)}function C(e,t,r,i){const n=u,s=e[t],l=e[t+1],o=e[t+2];let c,d,p,h,y,f,m,g,_,w,b,v,F,I,T,S,A,x,R,C,M;c=Math.abs(o),d=s*s+l*l,p=Math.sqrt(d),h=d+o*o,y=Math.sqrt(h),C=Math.atan2(l,s),f=o*o/h,m=d/h,I=n.a2/y,T=n.a3-n.a4/y,m>.3?(g=c/y*(1+m*(n.a1+I+f*T)/y),R=Math.asin(g),w=g*g,_=Math.sqrt(1-w)):(_=p/y*(1-f*(n.a5-I-m*T)/y),R=Math.acos(_),w=1-_*_,g=Math.sqrt(w)),b=1-a.$O.eccentricitySquared*w,v=a.$O.radius/Math.sqrt(b),F=n.a6*v,I=p-v*_,T=c-F*g,A=_*I+g*T,S=_*T-g*I,x=S/(F/b+A),R+=x,M=A+S*x/2,o<0&&(R=-R),r[i++]=j*C,r[i++]=j*R,r[i]=M}const M={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:f},L=(0,i.kU)(1),j=(0,i.KJ)(1),O=.5*Math.PI,k=a.$O.radius,Z=k*Math.PI/180,E=180/(k*Math.PI)},41366:(e,t,r)=>{r.d(t,{K:()=>p,Q:()=>u});var i=r(31635),n=r(66552),s=r(53966),a=r(10107),l=(r(44208),r(87811),r(93223)),o=r(64108);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&c||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,o.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},41560:(e,t,r)=>{r.d(t,{Ch:()=>a,mW:()=>s});var i=r(34727),n=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function a(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const a=Array.from(l(e,t,r)),o=function(e,t,r){if(0===e.length)return!0;const n=c(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(c(n.minScale),d(r.maxScale)))return!0}return!1}(a,t,r)?"1=1":a.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)o(i.minScale,i.maxScale,t,r)&&(yield i)}}function o(e,t,r,n){return e=c(e),r=c(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45067:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),n=r(69540),s=r(66552),a=r(25482),l=r(10107),o=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),c=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:c.read,write:c.write}})],d.prototype,"role",void 0),d=(0,i.Cg)([(0,o.$)("esri.layers.support.Relationship")],d)},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,s]=t.split("."),a=/^\s*\d+\s*$/;if(!n?.match||!a.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!a.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(n,10),o=parseInt(s,10);return new e(l,o,r)}}},47423:(e,t,r)=>{r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>G,constructFeatureSet:()=>P,constructFeatureSetFromPortalItem:()=>V,constructFeatureSetFromRelationship:()=>U,constructFeatureSetFromUrl:()=>N,convertToFeatureSet:()=>J,createFeatureSetCollectionFromMap:()=>z,createFeatureSetCollectionFromService:()=>Q,initialiseMetaDataCache:()=>E});var i=r(43773);class n{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,r){this._layerById[t]=r,this._layerByName[e]=r}async featureSetByName(e,t=!0,r=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,r=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}var s=r(78878),a=r(35704),l=r(52106),o=r(70333),u=r(48938),c=r(61454),d=r(66395),p=r(87449),h=r(11221),y=r(33325),f=r(80609),m=r(50145),g=r(4576),_=r(80200),w=r(39516),b=r(88368),v=r(65864),F=r(68654),I=r(17126),T=r(54546),S=r(61956),A=r(7562);function x(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new p.dr("NeverReach");const t=[];for(let r=0;r<e.length;r++){const i=e[r],n=[`"${i.name.replaceAll('"','""')}" ${i.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){const r=e[t];n.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(n.join(" AND "))}const r=t.join(" OR ");return b.A.create(r)}(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const i=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[i]}}class R extends h.t{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._maxProcessing=1e3,this._layer=e.layer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,y.JB)(e.toJSON());return(0,_.d)(t,_.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new S.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?h.A:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){let t="",r=!1;null!=e.orderBy&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(t=e.orderBy.constructClause(),r=!0);const i=await this.databaseType(),n=null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,i);let s=this._maxQueryRate();const a=this._layer.capabilities?.query.maxRecordCount;null!=a&&a<s&&(s=a);const l=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),u=this._createQuery();return u.where=(0,w.mA)(u.where,n),null!=e.spatialFilter&&(u.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),u.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),u.geometry=e.spatialFilter.geometry),u.orderByFields=""!==t?t.split(","):null,u.outFields=o,u.returnGeometry=l,u.outSpatialReference=this.spatialReference,{ordered:r,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(u,s,e.abortSignal)}}async*_queryPaginated(e,t,r){let i;e.num=t,e.start=0;do{(0,p.dZ)(r),i=await this.executeQuery(e,"execute"),yield i.features,e.start+=t}while(void 0===i.exceededTransferLimit&&i.features.length===t||!1!==i.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t="",r=!1;null!=e.orderBy&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(t=e.orderBy.constructClause(),r=!0);const i=await this.databaseType(),n=null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,i),s=this._createQuery();s.where=(0,w.mA)(s.where,n),null!=e.spatialFilter&&(s.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),s.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),s.geometry=e.spatialFilter.geometry),s.orderByFields=""!==t?t.split(","):null,s.outSpatialReference=this.spatialReference;const a=await this.executeQuery(s,"executeForIds");if((0,p.dZ)(e.abortSignal),null==a||a.length<=0)return h.A;let l=this._maxQueryRate();const o=this._layer.capabilities?.query.maxRecordCount;null!=o&&o<l&&(l=o);const u=this._createQuery();return s.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),s.returnGeometry=!0!==this._removeGeometry,s.outSpatialReference=this.spatialReference,{ordered:r,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(u,a,l,e.abortSignal)}}async*_traverseIdSet(e,t,r,i){for(let n=0;n<t.length;n+=r){e.objectIds=t.slice(n,n+r),(0,p.dZ)(i);const s=await this.executeQuery(e,"execute");yield s.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,i=!!t?.supportsStatistics,n=!!t?.supportsDistinct,s=e.stat;if("count"===s)return n?this._queryCount(e):{calculated:!1};const a=e.field;if(null==a)return{calculated:!1};if(!1===i||!1===(0,f.DA)(a)&&!1===r||!1===a.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,a,e.limit??y.gO,e.abortSignal);if("distinct"===s)return!1===n?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,a,e.limit??y.gO,e.abortSignal):{calculated:!1};const l=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const o=this._createQuery();o.where=(0,w.mA)(o.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,l)),null!=e.spatialFilter&&(o.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),o.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),o.geometry=e.spatialFilter.geometry);const u=new A.A;u.statisticType=(0,m.Dp)(s),u.onStatisticField=(0,f.YY)(a,l),u.outStatisticFieldName="ARCADE_STAT_RESULT",o.returnGeometry=!1;let c="ARCADE_STAT_RESULT";o.outStatistics=[u];const d=await this.executeQuery(o,"execute");if(!d.hasOwnProperty("features")||0===d.features.length)throw new p.dr("InvalidStatResponse");let h=!1;const g=d.fields??[];for(let e=0;e<g.length;e++)if("ARCADE_STAT_RESULT"===g[e].name.toUpperCase()){c=g[e].name,"date"===g[e].type&&(h=!0);break}if(h){let e=d.features[0].attributes[c];return null!==e&&(e=new Date(d.features[0].attributes[c])),{calculated:!0,result:e}}return{calculated:!0,result:d.features[0].attributes[c]}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();return r.where=(0,w.mA)(r.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,t)),null!=e.spatialFilter&&(r.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),r.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),r.geometry=e.spatialFilter.geometry),r.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,i=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(let r=0;r<e.statistics.length-1;r++)(!1===e.statistics[r].workingexpr?.isStandardized||!1===(0,f.DA)(e.statistics[r].workingexpr)&&!1===i)&&(t=!1);return!1!==t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return h.A;const t=await this.databaseType(),r=e.groupBy,i=e.orderBy,n=e.statistics;let s=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();s={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==i||1===i._directions[r]}))}}let a="",l=!1;null!=i&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==s||(0,g.MJ)(r,0,r.length,i._fields,0,Math.min(i._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(a=i.constructClause(),l=!0),""===a&&(a=r.join(","));const o=[];for(let e=0;e<n.length;e++){const r=new A.A;r.onStatisticField=null!==n[e].workingexpr?(0,f.YY)(n[e].workingexpr,t):"",r.outStatisticFieldName=n[e].field,r.statisticType=n[e].toStatisticsName(),o.push(r)}let u=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<u&&(u=c);const d=null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,t),p=this._createQuery();return p.where=(0,w.mA)(p.where,d),null!=e.spatialFilter&&(p.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),p.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),p.geometry=e.spatialFilter.geometry),p.orderByFields=""!==a?a.split(","):null,p.outFields=["*"],p.outStatistics=o,p.groupByFieldsForStatistics=r,p.returnGeometry=!1,null==s?{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryPaginated(p,u,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryKeysetPaginated(p,s,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const i=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new p.dr("NotImplemented");e.where=(0,w.mA)(i,(0,f.YY)(t.clause,await this.databaseType()))}const n=await this.executeQuery(e,"execute");if((0,p.dZ)(r),!n.hasOwnProperty("features"))throw new p.dr("InvalidStatResponse");if(yield n.features,0===n.features.length||!n.exceededTransferLimit)break;x(t,n.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let i=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);i=this.recentlyUsedQueries.getFromCache(t),null===i&&(i=r(e),this.recentlyUsedQueries.addToCache(t,i),i=i.catch(e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e}))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===i&&(i=r(e)),i}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}static create(e,t,r,i,n){const s=new F.default({url:e,outFields:null===t?["*"]:t});return new R({layer:s,spatialReference:r,lrucache:i,interceptor:n})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,y.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,i,n){const s=this._layer;if(function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(s)){const a={objectIds:[e],returnMetadata:n};(t&&t>0||r&&r>0)&&(a.size=[t&&t>0?t:0,r&&r>0?r:t+1]),i&&i.length>0&&(a.attachmentTypes=i),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:s,query:a,method:"attachments"});const l=await s.queryAttachments(new T.A(a)),o=[];return l&&l[e]&&l[e].forEach(t=>{const r=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let i=null;n&&t.exifInfo&&(i=d.A.convertJsonToArcade(t.exifInfo,"system",!0)),o.push(new c.A(t.id,t.name,t.contentType,t.size,r,i,t.keywords??null))}),o}return[]}async queryRelatedFeatures(e){const t=(0,I.dw)(e);t.f="json",this._requestStandardised&&(t.sqlFormat="standard"),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const r=await(0,i.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){const e={},t=r.data;if(t?.relatedRecordGroups){const r=t.spatialReference;for(const i of t.relatedRecordGroups){const n=i.objectId,s=[];for(const e of i.relatedRecords){e.geometry&&(e.geometry.spatialReference=r);const t=new l.A({geometry:e.geometry?(0,v.rS)(e.geometry):null,attributes:e.attributes});s.push(t)}e[n]={features:s,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new p.dr("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,w.mA)(r.where,this.objectIdField+"="+e.toString()),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const i=await this._layer.queryFeatures(r);return 1===i.features.length?i.features[0]:null}async getIdentityUser(){await this.load();const e=o.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=o.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{const e=await(0,i.A)(t,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new R({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this.fsetInfo)return this.fsetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const r=this._layer.parsedUrl?.path??null;if(r){const n=await(0,i.A)(r,{responseType:"json",query:{f:"json"}});e=n?.data?.name??null,t=n?.data?.serviceItemId??null}const n=this._layer.title&&null!==(this._layer.parent??null);return this.featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:n?this._layer.id??null:null,webMapLayerTitle:n?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}var C=r(30235),M=r(26591);class L extends h.t{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._maxProcessing=1e3,this._layer=e.layer,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){if(await this._ensureLoaded(),await this.databaseType(),this.isTable()&&null!=e.spatialFilter)return h.A;const t=this._layer.nativeCapabilities();if(!1===t.canQueryRelated)return h.A;if(t.capabilities?.queryRelated.supportsPagination)return this._queryUsingPaging(t.source,e);let r="",i=!1;null!=e.orderBy&&!0===t.capabilities?.queryRelated.supportsOrderBy&&(r=e.orderBy.constructClause(),i=!0);const n=new M.default;n.objectIds=[this._findObjectId];const s=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]);n.outFields=s,n.relationshipId=this.relationship.id,n.where="1=1",n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,n.orderByFields=""!==r?r.split(","):null;const a=null!=e.spatialFilter;return{filterApplied:!(null!=e.where),spatialFilterApplied:!a,ordered:i,features:async function*(){const r=await t.source.queryRelatedFeatures(n);(0,p.dZ)(e.abortSignal),yield r[this._findObjectId]?r[this._findObjectId].features:[]}.apply(this)}}async _queryUsingPaging(e,t){let r="",i=!1;const n=this._layer.nativeCapabilities();null!=t.orderBy&&!0===n.capabilities?.queryRelated.supportsOrderBy&&(r=t.orderBy.constructClause(),i=!0),await this.databaseType();let s=this._maxQueryRate();const a=n.capabilities?.query.maxRecordCount;null!=a&&a<s&&(s=a);const l=null!=t.spatialFilter,o=null!=t.where,u=!0!==this._removeGeometry,c=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),d=new M.default;return d.relationshipId=this.relationship.id,d.objectIds=[this._findObjectId],d.outFields=c,d.where="1=1",d.orderByFields=""!==r?r.split(","):null,d.returnGeometry=u,d.outSpatialReference=this.spatialReference,{filterApplied:!o,spatialFilterApplied:!l,ordered:i,features:this._queryPaginated(e,d,s,t.abortSignal)}}async*_queryPaginated(e,t,r,i){let n;t.num=r,t.start=0;do{(0,p.dZ)(i),n=(await e.queryRelatedFeatures(t))[this._findObjectId]??{exceededTransferLimit:!1,features:[]},yield n.features,t.start+=r}while(void 0===n.exceededTransferLimit&&n.features.length===r||!1!==n.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new p.dr("NeverReach")}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}get gdbVersion(){return this._relatedLayer.gdbVersion}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,i,n){return this._relatedLayer.queryAttachments(e,t,r,i,n)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}async getFeatureSetInfo(){return this.fsetInfo??this._layer.featureSetInfo}}var j=r(23732),O=r(92474),k=r(4146),Z=r(80812);function E(){null===j.A.applicationCache&&(j.A.applicationCache=new j.A)}async function q(e,t,r){if(j.A.applicationCache){const r=j.A.applicationCache.getLayerInfo(e);if(r){const i=await r;return new F.default({url:e,outFields:t,sourceJSON:i})}const i=new F.default({url:e,outFields:t}),n=(async()=>(await i.load(),i.sourceJSON))();if(j.A.applicationCache){j.A.applicationCache.setLayerInfo(e,n);try{return await n,i}catch(t){throw j.A.applicationCache.clearLayerInfo(e),t}}return await n,i}if(null!=r){const i=r.getCachedLayerMetadata(e);if(i){const r=await i;return new F.default({url:e,outFields:t,sourceJSON:r})}const n=new F.default({url:e,outFields:t}),s=(async()=>(await n.load(),n.sourceJSON))();r.setCachedLayerMetadata(e,s);try{return await s,n}catch(t){throw r.removeCachedLayerMetadata(e,s),t}}return new F.default({url:e,outFields:t})}async function N(e,t,r,i,n,s=null){return P(await q(e,["*"],n),t,r,i,n,s)}function P(e,t=null,r=null,i=!0,n=null,s=null){switch(e.type){case"catalog-footprint":return P(e.parent,t,r,i,n,s);case"subtype-sublayer":{const l=P(e.parent,t,r,i,n,s);return new a.A({parentfeatureset:l,whereclause:b.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new C.A({layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:n,interceptor:s});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const a={layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:n,interceptor:s};return!e.url&&e.source?new C.A(a):new R(a)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function D(e,t){if(null!==j.A.applicationCache){const t=j.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const r=t.getCachedServiceMetadata(e);if(null!=r)return r}const r=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==j.A.applicationCache){j.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw j.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(i){throw t.removeCachedServiceMetadata(e,r),i}}return r}async function G(e,t,r){const n={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},s=await D(e,null);if(n.metadata=s,void 0!==s.controllerDatasetLayers?.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)n.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)n.layerNameLkp[e.id]=e.name;const l=s.controllerDatasetLayers.utilityNetworkLayerId;n.networkId=l;const o=await async function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==j.A.applicationCache){const e=j.A.applicationCache.getLayerInfo(r);if(null!==e)return e}const n=(async()=>{const r=await(0,i.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new p.dr("DataElementsNotFound")})();if(null!==j.A.applicationCache){j.A.applicationCache.setLayerInfo(r,n);try{return await n}catch(e){throw j.A.applicationCache.clearLayerInfo(r),e}}return n}(e,l);if(o){n.queryelem=o,n.queryelem?.dataElement&&void 0!==n.queryelem.dataElement.schemaGeneration&&(n.unVersion=n.queryelem.dataElement.schemaGeneration),n.lkp={},n.queryelem.dataElement.domainNetworks||(n.queryelem.dataElement.domainNetworks=[]);for(const e of n.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}}if(n.queryelem.dataElement.terminalConfigurations)for(const e of n.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)n.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==j.A.applicationCache){const t=j.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==j.A.applicationCache){j.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw j.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+l);if(void 0!==s.systemLayers?.associationsTableId&&null!==s.systemLayers.associationsTableId){let i=null;if(r&&n.unVersion<8){const r=[];n.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),i=await N(e+"/"+s.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await i.load(),n.unVersion>=4&&(i=new a.A({parentfeatureset:i,whereclause:b.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC})}),await i.load())}return{lkp:n.lkp,associations:i,unVersion:n.unVersion,terminals:n.terminals,layerIdLookup:n.layerIdLookup,sourceIdLookup:n.sourceIdLookup}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function U(e,t,r,i=null,n=null,s=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o=o.endsWith("/")?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await N(o,i,n,s,a,l);return new L({layer:e,relatedLayer:u,relationship:t,objectId:r,spatialReference:i,outFields:n,includeGeometry:s,lrucache:a,interceptor:l})}class B extends n{constructor(e,t=null,r=null,i=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){const i=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async featureSetByName(e,t=!0,r=null){if((0,O.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=n)return this._makeAndAddFeatureSet(n,t,r);if(this._map.allTables){const i=this._map.allTables.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if((0,O.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.id===e);if(n)return this._makeAndAddFeatureSet(n,t,r);if(this._map.allTables){const i=this._map.allTables.find(t=>(0,y.eB)(t)&&t.id===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}}class $ extends n{constructor(e,t=null,r=null,i=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){const i=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async _loadMetaData(){const e=await D(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new $(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=await this._loadMetaData();let s=null;for(const t of n.layers??[])t.name===e&&(s=t);if(!s)for(const t of n.tables??[])t.name===e&&(s=t);if(s){const e=await q(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=await this._loadMetaData();let s=null;for(const t of n.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of n.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(s){const e=await q(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function z(e,t,r=null,i=null){return new B(e,t,r,i)}function Q(e,t,r=null,i=null){return new $(e,t,r,i)}function J(e,t,r,i,n){if(null===e)return null;if((0,s.m)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof k.A&&(0,y.NI)(e)){const s=e;switch(t){case"datasource":return P(s,n,"outFields"in s?s.outFields:null,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return P(s,n,"outFields"in s?s.outFields:null,!0,r,i)}return null}if((0,s.a1)(e)){switch(t){case"datasource":return P(e.parent,n,e.parent.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return P(e,n,e.parent.outFields,!0,r,i)}return null}return null}async function V(e,t,r,i,n,s,a,l=null){if(j.A.applicationCache){const o=j.A.applicationCache.getLayerInfo(e+":"+s.url);if(o)return Y(await o,t,r,i,n,a,l)}if(null!=a){const o=a.getCachedPortalItem(s.url,e);if(null!=o)return await Y(await o,t,r,i,n,a,l)}const o=new Z.default({id:e,portal:s}).load();j.A.applicationCache?j.A.applicationCache.setLayerInfo(e+":"+s.url,o):null!=a&&a.setCachedPortalItem(s.url,e,o);try{return await Y(await o,t,r,i,n,a,l)}catch(t){throw j.A.applicationCache&&j.A.applicationCache.clearLayerInfo(e+":"+s.url),null!=a&&a.removeCachedPortalItem(s.url,e,o),t}}async function Y(e,t,r,i,n,s,a){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await q((0,y.Qi)(e.url??"")+"/"+t,["*"],s);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=s){const t=s.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=k.A.fromPortalItem(e);s.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(r){throw s.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else l=await k.A.fromPortalItem(e)}return P(l,r,i,n,s,a)}},50498:(e,t,r)=>{r.d(t,{Ye:()=>d,gy:()=>c,yR:()=>p});var i=r(66552),n=r(5443),s=r(91075),a=r(48526),l=r(86738),o=r(39829),u=r(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),d=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),p={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:a.A,point:l.A,polyline:u.A,polygon:o.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>F});var i,n=r(31635),s=r(37838),a=r(69540),l=r(51447),o=r(25482),u=r(53966),c=r(36708),d=r(24326),p=r(10107),h=(r(44208),r(87811),r(64108)),y=r(12195),f=r(65864),m=r(50498),g=r(55156),_=r(60950),w=r(54339),b=r(33910);function v(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let F=class extends((0,a.OU)(o.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,_.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,g.I)(this.origin);if(e)return(0,w.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,w.r)(this,t):null}getGlobalId(){const e=(0,g.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:v(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],F.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,p.MZ)({value:null})],F.prototype,"attributes",null),(0,n.Cg)([(0,p.MZ)({value:null,types:m.yR,json:{read:f.rS}})],F.prototype,"geometry",null),(0,n.Cg)([(0,p.MZ)({type:Boolean})],F.prototype,"isAggregate",void 0),(0,n.Cg)([(0,p.MZ)({clonable:!1})],F.prototype,"layer",void 0),(0,n.Cg)([(0,p.MZ)({clonable:"reference"})],F.prototype,"origin",void 0),(0,n.Cg)([(0,p.MZ)({type:s.A,value:null})],F.prototype,"popupTemplate",null),(0,n.Cg)([(0,p.MZ)({clonable:"reference"})],F.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,p.MZ)({value:null,types:b.Es})],F.prototype,"symbol",null),(0,n.Cg)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],F.prototype,"_version",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,value:!0})],F.prototype,"visible",null),F=i=(0,n.Cg)([(0,h.$)("esri.Graphic")],F)},52136:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const a=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},55156:(e,t,r)=>{r.d(t,{I:()=>n,e:()=>i});const i=Symbol("idFieldsProviderSymbol");function n(e){return(t=e)&&i in t?e[i]:void 0;var t}},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>y});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),a=r(15032),l=r(65864),o=r(95466),u=r(43668),c=r(98623);const d=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function h(e,t){return f.create(e,t,null,["$feature","$view"])}function y(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:s,Dictionary:a}=await(0,u.l)();let l;try{l=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const o=s.scriptUsesGeometryEngine(l);o&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,l,null,!1,o);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(l,c);let p=null;null!=r&&(p=new a(r),p.immutable=!0);const h=new a;return h.immutable=!1,h.setField("scale",0),new f(e,s,l,d,t,h,p,a)}constructor(e,t,r,i,n,s,a,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=a,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new o.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(n)for(const e of r.features)n(e.geometry)}},62815:(e,t,r)=>{r.d(t,{N:()=>a});var i=r(83047),n=r(73941),s=r(21325);function a(e,t,r){if(null==t||null==r||r.vcsWkid||(0,s.aI)(t,r)||(0,n.xP)(t)||(0,n.xP)(r))return null;const a=(0,i.G9)(t)/(0,i.G9)(r);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,a);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},73681:(e,t,r)=>{r.d(t,{n:()=>o});var i=r(49186),n=r(53966),s=r(46140),a=r(95466),l=r(55674);class o{static async from(e,t,r){const a=e.dictionary_version?s.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const h=await(0,l.xR)(e.expression,null,d);if(!h)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!a||!a.greaterEqual(4,0);y&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});const f=new u(r,y);return new o(y,c,h,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,r)=>{r.d(t,{Gh:()=>g,tk:()=>h,BR:()=>p,wI:()=>d,G$:()=>f,$x:()=>y,Ov:()=>o,UC:()=>s,W_:()=>u,OP:()=>m,TU:()=>l,XX:()=>a,jy:()=>c});var i=r(70333),n=r(43773);function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const a={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function l(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function o(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function u(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function c(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function d(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const a=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,n.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function p(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function h(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function y(e,t){return null}function f(e){return null}function m(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function g(e,t){if(!t||!m(e))return;const r=(e.url,null);r&&(e.url=r)}},79677:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(31635),s=r(25482),a=r(88930),l=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),u=r(64108),c=r(43937),d=r(98623);let p=class extends s.o{static{i=this}static get allTime(){return h}static get empty(){return y}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let n=this.end;if(n){const r=(0,a.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,l;return n>=t&&n<=r?a=n:t>=n&&t<=s&&(a=t),r>=n&&r<=s?l=r:s>=t&&s<=r&&(l=s),null==a||null==l||isNaN(a)||isNaN(l)?i.empty:new i({start:a===-1/0?null:new Date(a),end:l===1/0?null:new Date(l)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:l}=this;return null!=s&&(n.start=(0,a.S1)(s,e,t,r)),null!=l&&(n.end=(0,a.S1)(l,e,t,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,n.Cg)([(0,o.w)("end")],p.prototype,"readEnd",null),(0,n.Cg)([(0,c.K)("end")],p.prototype,"writeEnd",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,n.Cg)([(0,o.w)("start")],p.prototype,"readStart",null),(0,n.Cg)([(0,c.K)("start")],p.prototype,"writeStart",null),p=i=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],p);const h=new p,y=new p({start:void 0,end:void 0})},91218:(e,t,r)=>{r.r(t),r.d(t,{canProjectWithoutEngine:()=>$,initializeProjection:()=>Q,isEqualBaseGCS:()=>z,isLoaded:()=>M,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>j,load:()=>k,project:()=>Z,projectExtent:()=>re,projectMany:()=>E,projectMultipoint:()=>K,projectOrLoad:()=>q,projectOrLoadMany:()=>N,projectPoint:()=>V,projectPolygon:()=>ee,projectPolyline:()=>H,projectWithZConversion:()=>B,projectWithoutEngine:()=>J,requiresLoad:()=>O,test:()=>G,tryProjectWithZConversion:()=>U,unload:()=>D});var i=r(49186),n=r(74887),s=r(62788),a=r(95488),l=r(51850),o=r(21276),u=r(73941),c=r(5443),d=r(91075),p=r(48526),h=r(86738),y=r(39829),f=r(82799),m=r(16930),g=r(159),_=r(9762),w=r(37539);function b(e,t,r,i,n,s){return v[0]=e,v[1]=t,v[2]=r,(0,_.projectBuffer)(v,i,0,n,s,0)}const v=(0,l.vt)();var F=r(21325),I=r(62815);let T=null,S=null,A=null,x=null,R={};const C=new a.I;function M(){return!!(S?.isLoaded()&&A?.isLoaded()&&x?.isLoaded())}function L(){return!!M()||((0,s.gc)(C),k(),!1)}function j(e,t){return!e||!t||$(e,t)||L()}function O(e,t){return!$(e,t)&&!M()}async function k(e){null==T&&(T=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(S=e,S.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(A=e,A.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(x=e,x.load()))])),await T,(0,n.Te)(e),C.notify()}function Z(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,o.H)(e),E(e,e[0].spatialReference,t,r)):((0,o.f)(e),E([e],e.spatialReference,t,r)[0])}function E(e,t,r,i){if(null==t||null==r)return e;if($(t,r,i))return e.map(e=>J(e,t,r));if(null==i?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>J(e,t,m.A.WGS84)).map(e=>U(e,r));if(null==i?.geographicTransformation&&(0,u.jA)(r))return e.map(e=>U(e,m.A.WGS84)).map(e=>J(e,m.A.WGS84,r));if(!M())throw new P;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:x.getTransformation(t,r,i.areaOfInterestExtent)||new g.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let n=R[e];n||(n=x.getTransformation(t,r)||new g.A,R[e]=n),i={geographicTransformation:n}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof d.A?S.executeMany(e,r,i):A.executeMany(e,r,i)}function q(e,t){const r=N([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function N(e,t){if(!M())for(const r of e)if(null!=r&&!(0,F.aI)(r.spatialReference,t)&&(0,F.fn)(r.spatialReference)&&(0,F.fn)(t)&&!$(r.spatialReference,t))return(0,s.gc)(C),{pending:k(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,F.aI)(e.spatialReference,t)?e:(0,F.fn)(e.spatialReference)&&(0,F.fn)(t)?U(e,t):null)}}class P extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function D(){T=null,S=null,A=null,x=null,R={}}const G={get loadPromise(){return T}};function U(e,t){try{const r=Z(e,t);if(null==r)return null;"xmin"in e&&"xmin"in r&&(r.zmin=e.zmin,r.zmax=e.zmax);const i=(0,I.N)(r.type,e.spatialReference,t);return null!=i&&i(r),r}catch(e){if(!(e instanceof P))throw e;return null}}async function B(e,t,r){const i=e.spatialReference;return null!=i&&null!=t&&await Q(i,t,null,r),U(e,t)}function $(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,F.aI)(e,t)||(0,F.fn)(e)&&(0,F.fn)(t)&&!!(0,w.jd)(e,t))}function z(e,t){if((0,F.aI)(e,t))return!0;if(!(0,F.fn)(e)||!(0,F.fn)(t))return!1;const r=(0,F.oT)(e)||(0,F.K8)(e)||(0,F.x1)(e),i=(0,F.oT)(t)||(0,F.K8)(t)||(0,F.x1)(t);return r&&i}async function Q(e,t,r,i){if(M())return(0,n.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:r,options:n}of e)if(t&&r&&!$(t,r,n))return k(i)}else if(e&&t&&!$(e,t,r))return k(i);return(0,n.NO)(i)}function J(e,t,r){return e?"x"in e?Y(e,t,new h.A,r,0):"xmin"in e?ie(e,t,new c.A,r,0):"rings"in e?te(e,t,new y.A,r,0):"paths"in e?X(e,t,new f.A,r,0):"points"in e?W(e,t,new p.A,r,0):null:null}function V(e,t,r=t.spatialReference,i=0){return null!=r&&null!=e.spatialReference&&null!=Y(e,e.spatialReference,t,r,i)}function Y(e,t,r,i,n){se[0]=e.x,se[1]=e.y;const s=e.z;return se[2]=void 0!==s?s:n,(0,_.projectBuffer)(se,t,0,se,i,0)?(r.x=se[0],r.y=se[1],r.spatialReference=i,void 0!==s||(0,u.xP)(i)?(r.z=se[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function K(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=W(e,e.spatialReference,t,r,i)}function W(e,t,r,i,n){const{points:s,hasZ:a,hasM:l}=e,o=[],c=s.length,d=[];for(const e of s)d.push(e[0],e[1],a?e[2]:n);if(!(0,_.projectBuffer)(d,t,0,d,i,0,c))return null;const p=a||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,r=d[t],i=d[t+1];p&&l?o.push([r,i,d[t+2],s[e][3]]):p?o.push([r,i,d[t+2]]):l?o.push([r,i,s[e][2]]):o.push([r,i])}return r.points=o,r.spatialReference=i,r.hasZ=a,r.hasM=l,r}function H(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,i)}function X(e,t,r,i,n){const{paths:s,hasZ:a,hasM:l}=e,o=[];if(!ne(s,a??!1,l??!1,t,o,i,n))return null;const c=a||(0,u.xP)(i);return r.paths=o,r.spatialReference=i,r.hasZ=c,r.hasM=l,r}function ee(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,i)}function te(e,t,r,i,n){const{rings:s,hasZ:a,hasM:l}=e,o=[];if(!ne(s,a??!1,l??!1,t,o,i,n))return null;const c=a||(0,u.xP)(i);return r.rings=o,r.spatialReference=i,r.hasZ=c,r.hasM=l,r}function re(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=ie(e,e.spatialReference,t,r,i)}function ie(e,t,r,i,n){const{xmin:s,ymin:a,xmax:l,ymax:o,hasZ:c,hasM:d}=e;if(!b(s,a,c?e.zmin:n,t,se,i))return null;const p=c||(0,u.xP)(i);return r.xmin=se[0],r.ymin=se[1],p&&(r.zmin=se[2]),b(l,o,c?e.zmax:n,t,se,i)?(r.xmax=se[0],r.ymax=se[1],p&&(r.zmax=se[2]),d&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=i,r):null}function ne(e,t,r,i,n,s,a=0){const l=new Array;for(const r of e)for(const e of r)l.push(e[0],e[1],t?e[2]:a);if(!(0,_.projectBuffer)(l,i,0,l,s,0))return!1;let o=0;n.length=0;const c=t||(0,u.xP)(s);for(const t of e){const e=new Array;for(const i of t)c&&r?e.push([l[o++],l[o++],l[o++],i[3]]):c?e.push([l[o++],l[o++],l[o++]]):r?(e.push([l[o++],l[o++],i[2]]),o++):(e.push([l[o++],l[o++]]),o++);n.push(e)}return!0}const se=(0,l.vt)()},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(31635),s=r(66552),a=r(25482),l=r(10107),o=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({asc:"ascending",desc:"descending"});let c=class extends a.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,n.Cg)([(0,o.$)("esri.layers.support.OrderByInfo")],c)},99157:(e,t,r)=>{r.d(t,{A:()=>o});var i,n=r(31635),s=r(69622),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108));let o=i=class extends s.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,a.MZ)()],o.prototype,"isInverse",void 0),(0,n.Cg)([(0,a.MZ)()],o.prototype,"wkt",void 0),(0,n.Cg)([(0,a.MZ)()],o.prototype,"wkid",void 0),o=i=(0,n.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformationStep")],o)}}]);
|