@arcgis/core 4.34.0-next.17 → 4.34.0-next.18
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/{400a4c9fa62964f8fa1d.js → 1f48d6c76f0014064eca.js} +1 -1
- package/assets/esri/core/workers/chunks/3cf31e51266f40072f71.js +1 -0
- package/assets/esri/core/workers/chunks/4325fdd96d9ea344132e.js +1 -0
- package/assets/esri/core/workers/chunks/68374cf42a069436830d.js +1 -0
- package/assets/esri/core/workers/chunks/6f8de923519bb16af8ba.js +1 -0
- package/assets/esri/core/workers/chunks/85753105268aeff84e69.js +1 -0
- package/assets/esri/core/workers/chunks/8637b9cb30170ac4eae2.js +1 -0
- package/assets/esri/core/workers/chunks/872f151a3a2bc9052be0.js +1 -0
- package/assets/esri/core/workers/chunks/8b4a35e3ed39d8be3394.js +1 -0
- package/assets/esri/core/workers/chunks/{d33a5d79f2163ad62b1d.js → 9965961bad09910f577b.js} +1 -1
- package/assets/esri/core/workers/chunks/9d499a37b960273c3f84.js +1 -0
- package/assets/esri/core/workers/chunks/a507192771e5f4f82973.js +1 -0
- package/assets/esri/core/workers/chunks/a9e1caf05c81055ae194.js +1 -0
- package/assets/esri/core/workers/chunks/{1415d4e2f5f3193be004.js → aa4ae0e54a0507e8dd0f.js} +1 -1
- package/assets/esri/core/workers/chunks/d3bfd0c382c2f39a787b.js +1 -0
- package/assets/esri/core/workers/chunks/d6df12bed626d56cd6b2.js +1 -0
- package/assets/esri/core/workers/chunks/e0146db608959ead9c97.js +1 -0
- package/assets/esri/core/workers/chunks/f4442a2b40e44f90b461.js +1 -0
- package/assets/esri/core/workers/chunks/{fa5715ca3ce95d005b0a.js → faa892ad4cc8a90b6c79.js} +1 -1
- package/assets/esri/themes/base/widgets/_Legend.scss +2 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/chunks/sphere.js +1 -1
- package/config.js +1 -1
- package/core/accessorSupport/trackingUtils.js +1 -1
- package/core/sql.js +1 -1
- package/geometry/spatialReferenceEllipsoidUtils.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +38 -33
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/orientedImagery/transformations/updateElevation.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/smartMapping/renderers/support/spikeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/support/drapedUtils.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Legend/styles/support/sizeRampUtils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/assets/esri/core/workers/chunks/254c4f7e277ae9915dce.js +0 -1
- package/assets/esri/core/workers/chunks/273beed633cc37416ad7.js +0 -1
- package/assets/esri/core/workers/chunks/49a57dc1e6d1048fa949.js +0 -1
- package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +0 -1
- package/assets/esri/core/workers/chunks/52239e958a82ebcd2e7a.js +0 -1
- package/assets/esri/core/workers/chunks/78a57f5aeb277b84b3da.js +0 -1
- package/assets/esri/core/workers/chunks/802c6b1a6cb9264b8e4f.js +0 -1
- package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +0 -1
- package/assets/esri/core/workers/chunks/932808e485f305b6a26a.js +0 -1
- package/assets/esri/core/workers/chunks/beb01d400f1aa089d2dc.js +0 -1
- package/assets/esri/core/workers/chunks/cfc5e0ec9b0290407383.js +0 -1
- package/assets/esri/core/workers/chunks/d2139307f62ea8bf999a.js +0 -1
- package/assets/esri/core/workers/chunks/ddb66fe6fcd0764daa7a.js +0 -1
- package/assets/esri/core/workers/chunks/eac7af86166c09c6a9be.js +0 -1
- package/assets/esri/core/workers/chunks/ec49e2849766402ad5c7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2765,3186,5011,9141],{4197:(e,t,r)=>{r.d(t,{jh:()=>i,l5:()=>s,xm:()=>o});var n=r(34275);function i(e,t=!1){return e<=n.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function o(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function s(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},6797:(e,t,r)=>{r.d(t,{Mj:()=>d,Ui:()=>y,w2:()=>h});var n=r(69622),i=r(5503),o=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.A}function l(e){return e instanceof i.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=l(e),i=l(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.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 o=i.filter((e=>!n.includes(e))),d=n.filter((e=>!i.includes(e))),h=n.filter((r=>i.includes(r)&&u(e,r)!==u(t,r))).concat(o,d).sort(),y=c(e);if(y&&s.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=a(e)&&a(t);for(const n of h){const i=u(e,n),o=u(t,n);let s;if((m||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&c(i)===c(o)?p(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=f?f.diff[n]=s:f={type:"partial",diff:{[n]:s}})}}return f}function d(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let n=e;for(const e of r){if("complete"===n.type)return!0;if("partial"!==n.type)return!1;{const t=n.diff[e];if(!t)return!1;n=t}}return!0}(e,t)}function h(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function y(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}:p(e,t)}},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const n="randomUUID"in crypto;function i(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},17311:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),i=r(69622),o=r(4576),s=r(60999),a=r(5503),l=r(10107),u=(r(44208),r(53966),r(40608)),c=r(30524),p=r(43668);let d=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)((()=>(0,p.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new a.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("."),n=this.fieldsIndex.get(r.at(-1)??"");n&&e.add(n.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 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){return(await this.getTitles(e,[t],r)).get(t)??""}async getTitles(e,t,r){const n=new Map,i=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:s,workingTitle:a}=this,l=a&&s;t.forEach((t=>{const r=l?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:s,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:a}):"";n.set(t,r)}))}catch{}return n}async _checkAndReQueryGraphics(e,t){const r=t.map((t=>t.getObjectId()??t.attributes[e.objectIdField])).filter(o.Ru);if(r.length!==t.length)return t;if(t.some((e=>!(0,c.Kl)(e,this.requiredFields)))){const n=e.createQuery();n.where="1=1",n.outFields=[...this.requiredFields],n.objectIds=r;const i=await e.queryFeatures(n);if(i?.features.length===t.length)return i.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),n=e?.name??r.fieldName;r.fieldName=n,t.set(n.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],i={};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{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,n._)([(0,l.MZ)({readOnly:!0})],d.prototype,"_arcadeTask",null),(0,n._)([(0,l.MZ)()],d.prototype,"_featureUtils",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],d.prototype,"featureUtilsPromise",null),(0,n._)([(0,l.MZ)({readOnly:!0})],d.prototype,"calculatedExpressions",null),(0,n._)([(0,l.MZ)()],d.prototype,"displayField",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"effectivePopupTemplate",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"expressionsUsedInTitle",null),(0,n._)([(0,l.MZ)()],d.prototype,"fieldsIndex",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"fieldInfoMap",null),(0,n._)([(0,l.MZ)()],d.prototype,"fields",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"objectIdField",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"requiredFields",null),d=(0,n._)([(0,u.$)("esri.layers.support.TitleCreator")],d)},27865:(e,t,r)=>{r.d(t,{O9:()=>o,dw:()=>s,mj:()=>i});var n=r(59247);function i(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===r[t].type))}function o(e,t){const r=e.length>t.length?e:t,i=e.length>t.length?t:e;for(let e=i.length;e<r.length;e++)i.push((0,n.sK)(r[e]))}function s(e){const t=e[0];return!!t&&"type"in t}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>y,XJ:()=>f,lc:()=>h,mX:()=>b,rU:()=>g,tH:()=>F});var n=r(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i"),c='"',p=c+" + ",d=" + "+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 b(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 F(t.expression)}return null}function b(e){let t;return e?(t=(0,n.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(s,p).replaceAll(a,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,M=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=M.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},37531:(e,t,r)=>{r.d(t,{dt:()=>d,GG:()=>g,UQ:()=>m,Sx:()=>c});var n=r(68197),i=r(60999),o=(r(44208),r(51850)),s=(r(76369),r(62046)),a=(r(2741),r(78888),r(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new n.A([128,128,128]);var l=r(28975),u=r(33910);function c(e,t){if(!e)return null;let r=null;return(0,u.wk)(e)?r=function(e){const t=e.symbolLayers;if(!t)return null;let r=null;return t.forEach((e=>{"object"===e.type&&e.resource?.href||(r="water"===e.type?e.color:e.material?e.material.color:null)})),r?new n.A(r):null}(e):(0,u.$y)(e)&&(r="cim"===e.type?(0,s.Nk)(e):e.color?new n.A(e.color):null),r?p(r,t):null}function p(e,t){if(null==t||null==e)return e;const r=e.toRgba();return r[3]=r[3]*t,new n.A(r)}function d(e,t,r){e&&(t||null!=r)&&(t&&(t=new n.A(t)),(0,u.wk)(e)?function(e,t,r){const i=e.symbolLayers;if(!i)return;const o=(e,i=!1)=>{let o=t??e??null;return null!=r?.override&&(!o&&i&&(o=new n.A([255,255,255])),o&&(o.a=r.override)),p(o,r?.add)};i.forEach((e=>{if("water"===e.type)return void(e.color=p(e.color,r?.add));const t=null!=e.material?e.material.color:null,n=o(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:n}):e.material.color=n,"outline"in e&&e.outline?.color&&null!=r?.add&&(e.outline.color=p(e.outline.color,r.add)),"marker"in e&&null!=e.marker&&(e.marker.color=o(e.marker.color))}))}(e,t,r):(0,u.$y)(e)&&function(e,t,r){t=t??e.color,null!=r?.override&&t&&(t.a=r.override),t&&(e.color=p(t,r?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=p(e.outline.color,r?.add))}(e,t,r))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,r){for(let n=0;n<3;n++){const i=e[n];switch(i){case"symbol-value":{const e=r[n];return null!=e?e/t[n]:1}case"proportional":break;default:if(i&&t[n])return i/t[n]}}return null}function f(e,t,r,n){switch(e){case"proportional":return r*n;case"symbol-value":return null!=t?t:r;default:return e}}async function m(e,t){if(e&&t)return(0,u.wk)(e)?async function(e,t){const n=e.symbolLayers;n&&await(0,i.jJ)(n,(async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const r=t[2];"number"==typeof r&&(e.size=r)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const r=h(t);null!=r&&(e.size=r)}(e,t);break;case"path":!function(e,t){const r=y(t,o.Un,[e.width,void 0,e.height]);null!=r&&(e.width=f(t[0],e.width,1,r),e.height=f(t[2],e.height,1,r))}(e,t);break;case"object":await async function(e,t){const{resourceSize:n,symbolSize:i}=await async function(e){const{computeObjectLayerResourceSize:t}=await r.e(5404).then(r.bind(r,95404)),n=await t(e,10),{width:i,height:o,depth:s}=e,a=[i,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/n[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=n[e]*l);return{resourceSize:n,symbolSize:a}}(e),o=y(t,n,i);null!=o&&(e.width=f(t[0],i[0],n[0],o),e.depth=f(t[1],i[1],n[1],o),e.height=f(t[2],i[2],n[2],o))}(e,t)}}(e,t)))}(e,t):void((0,u.$y)(e)&&function(e,t){const r=h(t);if(null!=r)switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r}}(e,t))}function g(e,t,r){if(e&&null!=t)if((0,u.wk)(e)){const n=e.symbolLayers;n&&n.forEach((e=>{if("object"===e.type)switch(r){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)}))}else(0,u.$y)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle+=t))}},39516:(e,t,r)=>{let n;async function i(){return null==n&&(n=Promise.all([r.e(8368),r.e(4123)]).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),n}async function o(e,t){const r=await i(),n=r.get(e,t);if(null==n)throw r.getError(e,t);return n}function s(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>o,IW:()=>a,mA:()=>s})},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>u});var n=r(90237),i=r(66552),o=r(53966),s=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",p="field",d=e=>{let t=class extends e{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&&p||r&&c||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n._)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,n._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,n._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,r)=>{r.d(t,{Ch:()=>s,mW:()=>o});var n=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:n}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],p(n));return t}(e);if(o&&((0,n.gg)(t,o[0])||(0,n.ZH)(r,o[1])))return"";const s=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=c(e.at(0)?.minScale),o=p(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(c(i.minScale),p(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(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 n of e.filters)l(n.minScale,n.maxScale,t,r)&&(yield n)}}function l(e,t,r,i){return e=c(e),r=c(r),t=p(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function p(e){return e||0}},50498:(e,t,r)=>{r.d(t,{Ye:()=>p,gy:()=>c,yR:()=>d});var n=r(66552),i=r(5443),o=r(91075),s=r(48526),a=r(86738),l=r(39829),u=r(82799);const c=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),p=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:o.A,key:"type",typeMap:{extent:i.A,multipoint:s.A,point:a.A,polyline:u.A,polygon:l.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>M});var n,i=r(90237),o=r(13874),s=r(69540),a=r(51447),l=r(25482),u=r(53966),c=r(36708),p=r(24326),d=r(10107),h=(r(44208),r(87811),r(40608)),y=r(12195),f=r(65864),m=r(50498),g=r(54339),b=r(33910);function w(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends(s.A.ClonableMixin(l.A)){static{n=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,p.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.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 n({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=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.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=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:w(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,n){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}_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,i._)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,f.rS)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,i._)([(0,d.MZ)({value:null})],M.prototype,"attributes",null),(0,i._)([(0,d.MZ)({value:null,types:m.yR,json:{read:f.rS}})],M.prototype,"geometry",null),(0,i._)([(0,d.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,i._)([(0,d.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,i._)([(0,d.MZ)({type:o.A,value:null})],M.prototype,"popupTemplate",null),(0,i._)([(0,d.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,i._)([(0,d.MZ)({value:null,types:b.Es})],M.prototype,"symbol",null),(0,i._)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,i._)([(0,d.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=n=(0,i._)([(0,h.$)("esri.Graphic")],M)},54339:(e,t,r)=>{function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const n of t.fieldNames)r.push(e.attributes[n]??null);return JSON.stringify(r)}}}function i(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>n,r:()=>i})},59247:(e,t,r)=>{r.d(t,{bv:()=>l,Fk:()=>u,yG:()=>c,$b:()=>p,Nd:()=>d,jm:()=>h,sK:()=>m});var n=r(40876),i=r(90629);function o(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const s=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:o,fromValues:function(e,t,r,n,i,o,s,a,l,u,c,p,d,h,y,f){const m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=r,m[3]=n,m[4]=i,m[5]=o,m[6]=s,m[7]=a,m[8]=l,m[9]=u,m[10]=c,m[11]=p,m[12]=d,m[13]=h,m[14]=y,m[15]=f,m}},Symbol.toStringTag,{value:"Module"}));var a=r(58083);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=y(e.strength,t.strength,r),this.radius=y(e.radius,t.radius,r),this.threshold=y(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:f(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(y(e.radius,t.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:f(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=y(e.amount,t.amount,r),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,n=(0,a.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,a.mg)(n,n)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e)}}}class p{constructor(e,t,r,n){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=n,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=y(e.offsetX,t.offsetX,r),this.offsetY=y(e.offsetY,t.offsetY,r),this.blurRadius=y(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(y(e.color[0],t.color[0],r)),this.color[1]=Math.round(y(e.color[1],t.color[1],r)),this.color[2]=Math.round(y(e.color[2],t.color[2],r)),this.color[3]=y(e.color[3],t.color[3],r)}clone(){return new p(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:f(this.offsetX),yoffset:f(this.offsetY),blurRadius:f(this.blurRadius),color:e}}}class d{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=y(e.angle,t.angle,r),this._updateMatrix()}clone(){return new d(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||o();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),n=Math.cos(t*Math.PI/180),i=(0,a.hZ)(e,.213+.787*n-.213*r,.715-.715*n-.715*r,.072-.072*n+.928*r,0,.213-.213*n+.143*r,.715+.285*n+.14*r,.072-.072*n-.283*r,0,.213-.213*n-.787*r,.715-.715*n+.715*r,.072+.928*n+.072*r,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.angle)}}class h{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=y(e.amount,t.amount,r)}clone(){return new h(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function y(e,t,r){return e+(t-e)*r}function f(e){return Math.round(1e3*(0,i.PN)(e))/1e3}function m(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new h(1);case"hue-rotate":return new d(0);case"blur":return new u(0);case"drop-shadow":return new p(0,0,0,[...(0,n.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},59929:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Oe});var n=r(90237),i=r(69540),o=r(5503),s=r(49186),a=r(81583),l=r(91869),u=r(92071),c=r(74887),p=r(36708),d=r(39516),h=r(84952),y=r(10107),f=(r(44208),r(53966)),m=(r(87811),r(36005)),g=r(40608),b=r(4146),w=r(52136),M=r(18768),_=r(63074),v=r(69208),F=r(6455),I=r(47685),T=r(87796),x=r(16131),A=r(8303),S=r(54310),C=r(25036),Z=r(82935),O=r(60694),k=r(10873),E=r(15426),j=r(17036),L=r(30524),N=r(85334),P=r(90360),R=r(86162),q=r(92438),G=r(96576),$=r(93618),z=r(62046),V=r(37531);const D={key:"type",base:q.A,errorContext:"renderer",typeMap:{simple:G.A,"unique-value":$.A,"class-breaks":R.A}},U=(0,P.C)({types:D}),J=["#ed5151","#149ece","#a7c636","#9e559c","#fc921f","#ffde3e","#f789d8","#b7814a","#3caf99","#6b6bd6","#b54779","#7f7f7f"];var B=r(13874),H=r(4902),Y=r(4718),X=r(92474),Q=r(97768),W=r(93637),K=r(43937),ee=r(89317),te=r(38141),re=r(16930),ne=r(29005),ie=r(46499),oe=r(39383),se=r(17311),ae=r(61956),le=r(30291),ue=r(59868),ce=r(43440);const pe=(0,j.p)();let de=0;function he(e,t){let r=e.json.write;return"object"!=typeof r&&(r=e.json.write={}),r.ignoreOrigin=!0,t?.spatialOnly&&(r.layerContainerTypes=ee.K),e}function ye(e){const t={write:{ignoreOrigin:!0}};return e?.name&&(t.name=e.name),"object"==typeof t.write&&(e?.spatialOnly&&(t.write.layerContainerTypes=ee.K),e?.target&&(t.write.target=e.target)),t}function fe(e){switch(e){case"point":case"multipoint":return ue.UK.clone();case"polyline":return ue.A7.clone();case"polygon":case"multipatch":return ue.Cx.clone();default:return null}}function me(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function ge(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const n={},i=me(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)n[t]=e[t]}return n[t.subtypeField]=e,new ne.A({name:"New Feature",drawingTool:r,prototype:{attributes:n}})}let be=class extends((0,u.P)(i.A.ClonableMixin(H.A.IdentifiableMixin(X.A)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${de++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return(0,L.yp)(this.renderer,this.fieldsIndex),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return(0,Q.pR)(e),new se.A({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,displayField:this.parent?.displayField??"",fields:this.fields,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}get featureTitleFields(){return[...this._titleCreator.requiredFields]}writeFieldOverrides(e,t,r){const{fields:n,parent:i}=this;let o;if(n){o=[];let e=0;n.forEach((({name:t,alias:r,editable:n,visible:s})=>{if(!s)return;const a=i?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let u=!1;r!==a.alias&&(l.alias=r,u=!0),n!==a.editable&&(l.editable=n,u=!0),o.push(l),u&&e++})),0===e&&o.length===n.length&&(o=null)}else o=(0,Y.o8)(e);o?.length&&(0,W.sM)(r,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,n=e?.fields;if(!e||!n?.length)return null;const{subtypes:i,subtypeField:o}=e,s=i?.find((e=>e.code===r)),a=s?.defaultValues,l=s?.domains,u=[];for(const e of n){const n=e.clone(),{name:i}=n,s=t?.find((e=>e.name===i));if(n.visible=!t?.length||!!s,s){const{alias:e,editable:t}=s;e&&(n.alias=e),!1===t&&(n.editable=!1)}const c=a?.[i]??null;n.defaultValue=i===o?r:c;const p=l?.[i]??null;n.domain=i===o?null:p?"inherited"===p.type?n.domain:p.clone():null,u.push(n)}return u}get floorInfo(){return this.parent?.floorInfo}get isTable(){return!!this.parent?.isTable}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?this.parent.globalIdField:(f.A.getLogger(this).error(_e("globalIdField")),null)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||f.A.getLogger(this).error(_e("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){(0,L.yp)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new G.A({symbol:fe(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const n=t.drawingInfo?.renderer,i=U(n,t,r);let o;const{subtypeCode:s}=this;if(null!=s&&function(e,t){return!(!t||"unique-value"!==e?.type||null==e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(s)));e&&(o=new G.A({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,r){const n=t?.layerDefinition?.drawingInfo?.renderer;if(!n)return;const i=n.visualVariables?.some((e=>"rotationInfo"!==e.type));return i?void 0:U(n,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??re.A.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[ge(this.subtypeCode,t)]}readTitleFromService(e,t){const r=me(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw _e("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:n}=this;if(!n)throw _e("updateAttachment");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return n.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw _e("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw _e("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:n,title:i}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:s}=r;t={displayField:e,editFieldsInfo:o,fields:n,objectIdField:s,title:i}}return(0,le.tn)(t,e)}createQuery(){if(!this.parent)throw _e("createQuery");const e=(0,E.VZ)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d.mA)(t,this.parent.definitionExpression),e}getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=(0,E.pc)(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw _e("queryAttachments");const n=e.clone();return n.where=Me(n.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatureCount(e,t){const r=await this.load();if(!r.parent)throw _e("queryFeatureCount");return r.parent.queryFeatureCount(we(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw _e("queryFeatures");return r.parent.queryFeatures(we(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw _e("queryObjectIds");return r.parent.queryObjectIds(we(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw _e("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw _e("queryRelatedFeaturesCount");return r.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,n._)([(0,y.MZ)({clonable:!1,readOnly:!0})],be.prototype,"_titleCreator",null),(0,n._)([(0,y.MZ)({type:ce.A,json:ye({name:"attributeTableInfo"})})],be.prototype,"attributeTableTemplate",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"capabilities",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"effectiveCapabilities",null),(0,n._)([(0,y.MZ)({json:ye()})],be.prototype,"charts",void 0),(0,n._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:ye({name:"enableEditing"})})],be.prototype,"editingEnabled",void 0),(0,n._)([(0,y.MZ)({type:Boolean,readOnly:!0})],be.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"elevationInfo",null),(0,n._)([(0,y.MZ)({clonable:!1,readOnly:!0})],be.prototype,"featureTitleFields",null),(0,n._)([(0,y.MZ)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],be.prototype,"fieldOverrides",void 0),(0,n._)([(0,K.K)("fieldOverrides")],be.prototype,"writeFieldOverrides",null),(0,n._)([(0,y.MZ)({...pe.fields,readOnly:!0,json:{read:!1}})],be.prototype,"fields",null),(0,n._)([(0,y.MZ)(pe.fieldsIndex)],be.prototype,"fieldsIndex",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"floorInfo",null),(0,n._)([(0,y.MZ)({type:te.A,json:ye({name:"formInfo"})})],be.prototype,"formTemplate",void 0),(0,n._)([(0,y.MZ)({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],be.prototype,"id",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"isTable",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"geometryType",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"globalIdField",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"type",void 0),(0,n._)([(0,y.MZ)(he((0,Y.o8)(k.kF)))],be.prototype,"labelsVisible",void 0),(0,n._)([(0,y.MZ)({type:[ie.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:oe.w},write:{ignoreOrigin:!0,layerContainerTypes:ee.K}}})],be.prototype,"labelingInfo",void 0),(0,n._)([(0,y.MZ)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,layerContainerTypes:ee.K}}})],be.prototype,"layerType",void 0),(0,n._)([(0,y.MZ)(he((0,Y.o8)(k.fV)))],be.prototype,"legendEnabled",void 0),(0,n._)([(0,y.MZ)({type:["show","hide"]})],be.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)((()=>{const e=(0,Y.o8)(k.hn);return e.json.origins.service.read=!1,he(e,{spatialOnly:!0})})())],be.prototype,"minScale",void 0),(0,n._)([(0,y.MZ)((()=>{const e=(0,Y.o8)(k.hG);return e.json.origins.service.read=!1,he(e,{spatialOnly:!0})})())],be.prototype,"maxScale",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],be.prototype,"effectiveScaleRange",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"objectIdField",null),(0,n._)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:ye({spatialOnly:!0})})],be.prototype,"opacity",void 0),(0,n._)([(0,y.MZ)({clonable:!1})],be.prototype,"parent",void 0),(0,n._)([(0,y.MZ)(he((0,Y.o8)(k.M6)))],be.prototype,"popupEnabled",void 0),(0,n._)([(0,y.MZ)({type:B.A,json:ye({name:"popupInfo"})})],be.prototype,"popupTemplate",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],be.prototype,"defaultPopupTemplate",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"relationships",null),(0,n._)([(0,y.MZ)({types:D,json:ye({target:"layerDefinition.drawingInfo.renderer",spatialOnly:!0})})],be.prototype,"renderer",null),(0,n._)([(0,m.w)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],be.prototype,"readRendererFromService",null),(0,n._)([(0,m.w)("renderer",["layerDefinition.drawingInfo.renderer"])],be.prototype,"readRenderer",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"spatialReference",null),(0,n._)([(0,y.MZ)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],be.prototype,"subtypeCode",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"subtypeField",null),(0,n._)([(0,y.MZ)({type:[ne.A],json:ye({name:"layerDefinition.templates"})})],be.prototype,"templates",void 0),(0,n._)([(0,m.w)("service","templates",["geometryType","subtypeField","subtypes","type"])],be.prototype,"readTemplatesFromService",null),(0,n._)([(0,y.MZ)({type:String,json:ye()})],be.prototype,"title",void 0),(0,n._)([(0,m.w)("service","title",["subtypes"])],be.prototype,"readTitleFromService",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"url",null),(0,n._)([(0,y.MZ)({readOnly:!0})],be.prototype,"userHasUpdateItemPrivileges",null),(0,n._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:ye({name:"visibility",spatialOnly:!0})})],be.prototype,"visible",void 0),be=(0,n._)([(0,g.$)("esri.layers.support.SubtypeSublayer")],be);const we=(e,t,r)=>{if(!r)return t.createQuery();const n=ae.A.from(r);return n.where=Me(n.where,e.subtypeField,t.subtypeCode),n},Me=(e,t,r)=>{const n=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${r}`,o=e??"";return n.test(o)?o.replace(n,i):(0,d.mA)(i,o)},_e=e=>new s.A("subtype-sublayer:parent-missing",`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`);var ve=r(96184),Fe=r(91908),Ie=r(54218),Te=r(92935);const xe="SubtypeGroupLayer";function Ae(e,t){return new s.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Se(e,t){const r=[];for(const n of e){const e=new be;e.read(n,t),r.push(e)}return r}const Ce=(0,j.p)();let Ze=class extends((0,T.j)((0,F.FJ)((0,I.w6)((0,_.dM)((0,Z.e)((0,C.j)((0,S.J)((0,M.b)((0,x.q)((0,A.A)((0,u.P)((0,v.d)((0,w.p)(i.A.ClonableMixin(b.A))))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.A.ofType(be)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer","Table"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,c.sg)((async(e,t,n)=>{const{save:i,saveAs:o}=await r.e(5740).then(r.bind(r,33359));switch(e){case Te.X.SAVE:return i(this,t);case Te.X.SAVE_AS:return o(this,n,t)}})),this.addHandles((0,p.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),p.OH))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(c.QP).then((async()=>{if(!this.url)throw new s.A("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s.A("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,E.VA)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,E.C$)(this)}get operationalLayerType(){return this.isTable?"SubtypeGroupTable":"SubtypeGroupLayer"}get parsedUrl(){const e=(0,h.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,h.fj)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,O.yG)(this.url,t):t}async addAttachment(e,t){const r=await(0,E.Xl)(this,e,t,xe);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const n=await(0,E.bt)(this,e,t,r,xe);return this.lastEditsEventDate=new Date,n}async applyEdits(e,t){return(0,E.ct)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,c.qr)(Promise.all([r.e(708),r.e(364),r.e(8628),r.e(2593),r.e(9062)]).then(r.bind(r,72593)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,E.VZ)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,d.mA)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){const r=await(0,E.mm)(this,e,t,xe);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return(0,E.WP)(this,e,xe)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains){const t=(0,E.pc)(this,e);if(t)return t}const r=(0,E.Nv)(this,t?.feature);if(r){const t=r.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}loadAll(){return(0,a.g)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,E.lV)(this,e,t,xe)}async queryFeatures(e,t){const r=await this.load(),n=ae.A.from(e)??r.createQuery(),i=n.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),n.outFields=i);const o=await r.source.queryFeatures(n,t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return o}async queryObjectIds(e,t){return(await(0,E.sg)(this,e,t,xe)).filter(Ie.Et)}async queryFeatureCount(e,t){return(0,E.Ye)(this,e,t,xe)}async queryExtent(e,t){return(0,E.B5)(this,e,t,xe)}async queryRelatedFeatures(e,t){return(0,E.hM)(this,e,t,xe)}async queryRelatedFeaturesCount(e,t){return(0,E.S2)(this,e,t,xe)}async save(e){return this._debouncedSaveOperations(Te.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Te.X.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:n,messages:i}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==n)return i?.push(Ae(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===n)return i?.push(Ae(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(i?.push(new s.A("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,Fe.D)(this,e)}async getFeatureTitle(e,t){const r=this.findSublayerForFeature(e);return r?await r.getFeatureTitle(e,t):this._getFeatureTitleForUnknownSublayer(e)}async getFeatureTitles(e,t){const r=new Map,n=new Map,i=[n];e.forEach((e=>{const t=this.findSublayerForFeature(e);t?(0,l.tE)(r,t,(()=>[])).push(e):n.set(e,this._getFeatureTitleForUnknownSublayer(e))}));const o=await Promise.all(Array.from(r).map((([e,r])=>e.getFeatureTitles(r,t))));return o.forEach((e=>i.push(e))),new Map(i.flatMap((e=>[...e])))}get featureTitleFields(){const e=new Set;for(const t of this.sublayers){const r=t.featureTitleFields;for(const t of r)e.add(t)}return[...e]}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s.A("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,L.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,E.jp)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)}))],"sublayers-owner"))}_getFeatureTitleForUnknownSublayer(e){const{displayField:t,fieldsIndex:r,objectIdField:n}=this;if(t&&r.has(t))return e.attributes[r.get(t).name]??"";const i=e.getObjectId();return null!=i?i.toString():n&&r.has(n)?e.attributes[r.get(n).name]??"":""}};(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"createQueryVersion",null),(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"editingEnabled",null),(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,y.MZ)({...Ce.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ze.prototype,"fields",void 0),(0,n._)([(0,y.MZ)(Ce.fieldsIndex)],Ze.prototype,"fieldsIndex",void 0),(0,n._)([(0,y.MZ)(k.id)],Ze.prototype,"id",void 0),(0,n._)([(0,y.MZ)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Ze.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)({type:["SubtypeGroupLayer","SubtypeGroupTable"],json:{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{"web-document":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}},"portal-item":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}}})],Ze.prototype,"operationalLayerType",null),(0,n._)([(0,y.MZ)(Ce.outFields)],Ze.prototype,"outFields",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"parsedUrl",null),(0,n._)([(0,y.MZ)({clonable:!1})],Ze.prototype,"source",null),(0,n._)([(0,y.MZ)({type:o.A.ofType(be),json:{origins:{service:{read:{source:"subtypes",reader(e,t,r){let n=null;if(this.useUniqueColorsForSublayers){const i=function(e,t){const r=e.drawingInfo?.renderer,n=r?U(r,e,t):null;if("simple"===n?.type)return(0,V.Sx)(n.symbol,null)?n.symbol.clone():null}(t,r);n=i?function(e,t){return(0,N.Iy)(J,e,{offset:!0,shuffle:!0}).reverse().map((e=>{const r=t.clone();return"cim"===r.type?(0,z.Fe)(r,e):(0,V.dt)(r,e),new G.A({symbol:r})}))}(e.length,i):null}const i=e.map((({code:e},i)=>{const o=new be({subtypeCode:e});o.read(t,r);const s=n?.[i];return s&&o.read({drawingInfo:{renderer:s.toJSON()}},r),o}));return new(o.A.ofType(be))(i)}}}},read:{source:["layers","tables"],reader(e,t,r){let n;return"SubtypeGroupLayer"===t.layerType&&t.layers?.length?n=Se(t.layers,r):"SubtypeGroupTable"===t.layerType&&t.tables?.length&&(n=Se(t.tables,r)),new(o.A.ofType(be))(n)}},write:{ignoreOrigin:!0,writer(e,t,r,n){const i=[];for(const t of e){const e=t.write({},n);i.push(e)}this.isTable?t.tables=i:t.layers=i}}}})],Ze.prototype,"sublayers",void 0),(0,n._)([(0,y.MZ)()],Ze.prototype,"useUniqueColorsForSublayers",void 0),(0,n._)([(0,y.MZ)({type:ve.A})],Ze.prototype,"timeInfo",void 0),(0,n._)([(0,y.MZ)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Ze.prototype,"title",void 0),(0,n._)([(0,m.w)("service","title",["name"])],Ze.prototype,"readTitleFromService",null),(0,n._)([(0,y.MZ)({json:{read:!1}})],Ze.prototype,"type",void 0),(0,n._)([(0,y.MZ)({clonable:!1,readOnly:!0})],Ze.prototype,"featureTitleFields",null),Ze=(0,n._)([(0,g.$)("esri.layers.SubtypeGroupLayer")],Ze);const Oe=Ze},62046:(e,t,r)=>{r.d(t,{Fe:()=>c,Nk:()=>o});var n=r(68197),i=r(93397);function o(e){const t=[];return s((0,i.lW)(e),t),t.length?new n.A((0,i.e6)(t[0])):null}function s(e,t){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;const n="CIMPolygonSymbol"===e.type;if(r?.symbolLayers)for(const e of r.symbolLayers)if(!(e.colorLocked||n&&((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{s(e.symbol,t)}));break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function a(e,t){for(const r of e)if(r.join(".")===t.join("."))return;e.push(t)}function l(e,t){const r=t.colorRamp?.type;switch(r){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach((t=>{"CIMLinearContinuousColorRamp"===t.type&&u(e,t)}));break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":u(e,t.colorRamp)}}function u(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function c(e,t,r){t instanceof n.A||(t=new n.A(t));const o=(0,i.lW)(e);o&&p(o,t,r)}function p(e,t,r){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===n?.type;if(n?.symbolLayers)for(const e of n.symbolLayers){if(e.colorLocked)continue;if(o)if(r){const{layersToColor:t}=r;if(((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))&&"fill"===t||(0,i.jn)(e)&&"outline"===t)continue}else if((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))continue;const n=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=n;break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{p(e.symbol,t,r)}));break;case"CIMSolidStroke":case"CIMSolidFill":e.color=n;break;case"CIMGradientFill":d(e,t);break;case"CIMHatchFill":p(e.lineSymbol,t,r)}}}function d(e,t){const r=e.colorRamp?.type;switch(r){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach((e=>{"CIMLinearContinuousColorRamp"===e.type&&h(e,t)}));break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e.colorRamp,t)}}function h(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const r=t.clone();r.a=0,e.toColor=r.toArray()}}},70328:(e,t,r)=>{r.d(t,{BI:()=>b,Ej:()=>d,Ie:()=>m,Jt:()=>g,Ne:()=>h,RF:()=>c,aI:()=>M,fA:()=>s,gE:()=>l,hZ:()=>f,iT:()=>p,is:()=>w,qv:()=>_,vI:()=>y,vY:()=>a,v_:()=>v,vt:()=>o,w1:()=>u});var n=r(5443),i=(r(19419),r(4197));function o(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,n,i,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=s,a}function a(e,t=o()){return function(e,t,r,n=o()){return f(n,_),function(e,t,r=0,n=t.length/3){let i=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function l(e,t=(0,i.jh)(24)){const[r,n,o,s,a,l]=e;return t[0]=r,t[1]=n,t[2]=o,t[3]=r,t[4]=n,t[5]=l,t[6]=r,t[7]=a,t[8]=o,t[9]=r,t[10]=a,t[11]=l,t[12]=s,t[13]=n,t[14]=o,t[15]=s,t[16]=n,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?f(e,_):o(_)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function M(e,t,r){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];o()},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>s});var n=r(60999),i=r(5503),o=r(92474);async function s(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],s=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?s(...t):i.A.isCollection(t)?t.forEach((e=>s(e))):o.A.isLoadable(t)&&r.push(t))};t(s);let a=null;if(await(0,n.Tj)(r,(async e=>{const t=await(0,n.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},85334:(e,t,r)=>{r.d(t,{$:()=>g,IB:()=>s,Iy:()=>F,N2:()=>b,RH:()=>M,ZD:()=>w});var n=r(68197),i=r(4576),o=r(4718);function s(e){return"r"in e&&"g"in e&&"b"in e}function a(e){return"h"in e&&"s"in e&&"v"in e}function l(e){return"l"in e&&"a"in e&&"b"in e}function u(e){return"l"in e&&"c"in e&&"h"in e}r(34727),r(87317),r(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],p=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function d(e,t){const r=[];let n,i;if(e[0].length!==t.length)throw new Error("dimensions do not match");const o=e.length,s=e[0].length;let a=0;for(n=0;n<o;n++){for(a=0,i=0;i<s;i++)a+=e[n][i]*t[i];r.push(a)}return r}function h(e){const t=[e.r/255,e.g/255,e.b/255].map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),r=d(c,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function y(e){const t=d(p,[e.x/100,e.y/100,e.z/100]).map((e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))}));return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function f(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map((e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function m(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map((e=>e>6/29?e**3:3*(6/29)**2*(e-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function g(e){return s(e)?e:u(e)?function(e){return y(m(function(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):l(e)?function(e){return y(m(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?y(e):a(e)?function(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,i=n*r,o=i*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:i,g:o,b:0};break;case 1:s={r:o,g:i,b:0};break;case 2:s={r:0,g:i,b:o};break;case 3:s={r:0,g:o,b:i};break;case 4:s={r:o,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:o};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-i),s.g=Math.round(s.g+n-i),s.b=Math.round(s.b+n-i),s}(e):e}function b(e){return a(e)?e:function(e){const t=e.r,r=e.g,n=e.b,i=Math.max(t,r,n),o=i-Math.min(t,r,n);let s=i,a=0===o?0:i===t?(r-n)/o%6:i===r?(n-t)/o+2:(t-r)/o+4,l=0===o?0:o/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(g(e))}function w(e){return l(e)?e:function(e){return f(h(e))}(g(e))}function M(e){return u(e)?e:function(e){return function(e){const t=e.l,r=e.a,n=e.b,i=Math.sqrt(r*r+n*n);let o=Math.atan2(n,r);return o=o>0?o:o+2*Math.PI,{l:t,c:i,h:o}}(f(h(e)))}(g(e))}var _,v;function F(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map((e=>"string"==typeof e?new n.A(e):e))).length||1===t){const r=[],n=e[0];for(let e=0;e<t;e++)r.push(n.clone());return r}if(r.shuffle&&(e=(0,i.k4)((0,o.o8)(e),r.seed)),e.length>=t){const r=[],n=(e.length-1)/(t-1);for(let i=0;i<t;i++){const t=Math.round(i*n);r.push(e[t].clone())}return r}return function(e,t,r={}){const n=[],o=e.length-1,s=Math.ceil((t-e.length)/o);e:for(let i=0;i<o;i++){const o=e[i],a=e[i+1];for(let i=1;i<=s;i++){const l=i/(s+1);if(n.push(T(o,a,l,r)),n.length+e.length===t)break e}}return[...e.map((e=>e.clone())),...(0,i.k4)(n,r.seed??1)]}(e,t,r)}(v=_||(_={}))[v.Low=160]="Low",v[v.High=225]="High";const I=(e,t)=>{const r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function T(e,t,r,o={}){const s=e.r,a=e.g,l=e.b,u=t.r,c=t.g,p=t.b,d=Math.round(s+(u-s)*r),h=Math.round(a+(c-a)*r),y=Math.round(l+(p-l)*r);if(!o.offset)return new n.A([d,h,y]);const f=(0,i.Mo)(o.seed);return new n.A([I(d,f),I(h,f),I(y,f)])}},92935:(e,t,r)=>{var n;r.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))},95466:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(49186),i=r(53966),o=r(91869),s=r(3330),a=r(12195),l=r(30524),u=r(98623),c=r(56400),p=r(96285);const d=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],g(e))}static fromLayerJSON(e){return new h(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,n=f(t);if(t&&n){const i=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(n,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(i.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?s.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,a.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function f(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:i}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",s=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,c.ZS)(i.dateFieldsTimeReference):a??u.n$:null,p=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,c.ZS)(n.timeReference):a:null,d=new Map([[y(i?.creationDateField??""),l],[y(i?.editDateField??""),l],[y(o),p],[y(s),p]]);for(const{name:n,type:i}of e.fields)if(m.has(i))t.set(n,u.L5);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(n,null);else if(r)t.set(n,u.L5);else{const e=d.get(y(n??""))??a;t.set(n,e)}return t}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9468],{240:(t,e,n)=>{n.d(e,{C:()=>u,vt:()=>a,lU:()=>d,fA:()=>h,mR:()=>A,Qj:()=>l,T7:()=>g,gv:()=>p,Ui:()=>I,Tj:()=>S,_I:()=>R,mP:()=>N,LV:()=>c});var o=n(34727),r=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function a(t=P){return[t[0],t[1],t[2],t[3]]}function c(t=P[0],e=P[1],n=P[2],o=P[3]){return h(t,e,n,o,s.Km.get())}function u(t,e){return h(e[0],e[1],e[2],e[3],t)}function l(t){return t}function h(t,e,n,o,r=a()){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r}function d(t,e,n,o=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(T,o);let c=i,u=!1;for(;c<n-1&&!u;)e(_,c),c++,u=!(0,r.q)(T,_);if(!u)return!1;for(c=Math.max(c,s),u=!1;c<n&&!u;)e(O,c),c++,(0,r.d)(E,T,_),(0,r.n)(E,E),(0,r.d)(m,_,O),(0,r.n)(m,m),u=!(0,r.q)(T,O)&&!(0,r.q)(_,O)&&Math.abs((0,r.e)(E,m))<f;return u?(function(t,e,n,o=a()){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],l=t[2]-e[2],h=i*l-s*u,d=s*c-r*l,f=r*u-i*c,T=h*h+d*d+f*f,_=Math.abs(T-1)>1e-5&&T>1e-12?1/Math.sqrt(T):1;o[0]=h*_,o[1]=d*_,o[2]=f*_,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2])}(T,_,O,t),!0):(0!==o||1!==i||2!==s)&&d(t,e,n,0,1,2)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const f=.99619469809,T=(0,i.vt)(),_=(0,i.vt)(),O=(0,i.vt)(),E=(0,i.vt)(),m=(0,i.vt)();function N(t,e,n){return e!==t&&u(t,e),t[3]=-(0,r.e)(t,n),t}function A(t,e,n,o){return(0,r.h)(O,e,t),function(t,e,n){const o=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}(n,O,o)}function I(t,e,n){return null!=e&&F(L(t,e.origin,e.direction,D,n))}function g(t,e,n){return F(L(t,e.origin,e.vector,C.NONE,n))}function p(t,e,n){return F(L(t,e.origin,e.vector,C.CLAMP,n))}function S(t,e){return b(t,e)>=0}function R(t,e,n){const o=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,e,n){const o=(0,r.g)(s.rq.get(),t,(0,r.e)(t,e));return(0,r.d)(n,e,o),n}(t,(0,r.d)(s.rq.get(),e,o),s.rq.get());return(0,r.f)(n,i,o),n}function b(t,e){return(0,r.e)(t,e)+t[3]}var M,v;function F(t){return t===M.INTERSECTS_INSIDE_OUT||t===M.INTERSECTS_OUTSIDE_IN}function L(t,e,n,i,s){const a=(0,r.e)(t,n),c=b(t,e);if(0===a)return c>=0?M.INSIDE:M.OUTSIDE;let u=-c/a;return i&C.CLAMP&&(u=(0,o.qE)(u,0,1)),!(i&C.INFINITE_MIN)&&u<0||!(i&C.INFINITE_MAX)&&u>1?c>=0?M.INSIDE:M.OUTSIDE:((0,r.f)(s,e,(0,r.g)(s,n,u)),c>=0?M.INTERSECTS_INSIDE_OUT:M.INTERSECTS_OUTSIDE_IN)}(v=M||(M={}))[v.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",v[v.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",v[v.INSIDE=2]="INSIDE",v[v.OUTSIDE=3]="OUTSIDE";const P=[0,0,1,0];var C;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(C||(C={})),C.INFINITE_MIN,C.INFINITE_MAX;const D=C.INFINITE_MAX},431:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>B,hx:()=>F,Jb:()=>D});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*o),l=r[n],h=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*l+2*o]=t,u[2*l+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];h(n,o,e),h(o,r,e),h(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(l+i[t],l+i[t+1]);const f=new Int32Array(3*o),T=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,_=(t,e)=>{const n=T(t,e);f[3*e+n]=-1},O=(t,e,n,o)=>{const r=T(t,e);f[3*e+r]=o;const i=T(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*l+2*o];n===r?(O(t,u[2*e+1],r,u[2*l+2*o+1]),e++,o++):n<r?(_(t,u[2*e+1]),e++):(_(r,u[2*l+2*o+1]),o++)}for(;e<n;)_(t,u[2*e+1]),e++;for(;o<s;)_(u[2*l+2*o],u[2*l+2*o+1]),o++}return f}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),l=n(51850),h=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),a=n*s,c=o*s,u=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,h=e*i;t[h]=T(u),t[h+1]=T(l)}function T(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class _{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:N}write(t,e,n){b.seed=this._edgeHashFunction(n);const o=b.getIntRange(0,255),r=b.getIntRange(0,this.settings.variants-1),i=b.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const O=new Float32Array(6),E=new Uint32Array(O.buffer),m=new Uint32Array(1);function N(t){return O[0]=t.position0[0],O[1]=t.position0[1],O[2]=t.position0[2],O[3]=t.position1[0],O[4]=t.position1[1],O[5]=t.position1[2],m[0]=31*(31*(31*(31*(31*(166811+E[0])+E[1])+E[2])+E[3])+E[4])+E[5],m[0]}function A(t){const e=O;e[0]=g(t.position0[0]),e[1]=g(t.position0[1]),e[2]=g(t.position0[2]),e[3]=g(t.position1[0]),e[4]=g(t.position1[1]),e[5]=g(t.position1[2]),m[0]=5381;for(let t=0;t<E.length;t++)m[0]=31*m[0]+E[t];return m[0]}const I=1e4;function g(t){return Math.round(t*I)/I}class p{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.f)(R,n.faceNormal0,n.faceNormal1),(0,u.n)(R,R);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,R[0],R[1],R[2],r)}static{this.Layout=a.gr}static{this.glLayout=(0,h.U)(a.gr,1)}}class S{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}static{this.Layout=a.In}static{this.glLayout=(0,h.U)(a.In,1)}}const R=(0,l.vt)(),b=new c.A;var M=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return P.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,M.K)(e,P,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new L(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n}),c=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class L{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const P=new p,C=new S,D=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),B=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,o.U)(a),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((o=>{const i=t.fields.get(o),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new r._(o,a,c,u,n,l,e)}))}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f16:o.pe.HALF_FLOAT,f32:o.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,l*e),d=n?.minReduction??0,f=n?.originalIndices||null,T=f?f.length:0,_=n?.componentOffsets||null;let O=0;if(_)for(let t=0;t<_.length-1;t++){const e=_[t+1]-_[t];e>O&&(O=e)}else O=l;const E=Math.floor(1.1*O)+1;(null==u||u.length<2*E)&&(u=new Uint32Array((0,o.cU)(2*E)));for(let t=0;t<2*E;t++)u[t]=0;let m=0;const N=!!_&&!!f,A=N?T:l;let I=(0,r.my)(l);const g=new Uint32Array(T),p=1.96;let S=0!==d?Math.ceil(4*p*p/(d*d)*d*(1-d)):A,R=1,b=_?_[1]:A;for(let t=0;t<A;t++){if(t===S){const e=1-m/t;if(e+p*Math.sqrt(e*(1-e)/t)<d)return null;S*=2}if(t===b){for(let t=0;t<2*E;t++)u[t]=0;if(f)for(let t=_[R-1];t<_[R];t++)g[t]=I[f[t]];b=_[++R]}const n=N?f[t]:t,o=n*e,r=c(h,o,e);let i=r%E,a=m;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(h,o,t*e,e)){a=I[t];break}}i++,i>=E&&(i-=E)}a===m&&(u[2*i]=r,u[2*i+1]=n+1,m++),I[n]=a}if(0!==d&&1-m/l<d)return null;if(N){for(let t=_[R-1];t<g.length;t++)g[t]=I[f[t]];I=(0,r.uW)(g)}const M=i?new Array(m):new Uint32Array(m*e);m=0;for(let t=0;t<A;t++)I[t]===m&&(a(h,(N?f[t]:t)*e,M,m*e,e),m++);if(f&&!N){const t=new Uint32Array(T);for(let e=0;e<t.length;e++)t[e]=I[f[e]];I=(0,r.uW)(t)}return{buffer:Array.isArray(M)?M:M.buffer,indices:I,uniqueCount:m}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function a(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function c(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>d,_I:()=>h,kb:()=>l,vt:()=>c});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),a=n(32114);function c(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e,n=c()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function l(t,e){const n=(0,i.d)(a.rq.get(),e,t.origin),r=(0,i.e)(t.vector,n),s=(0,i.e)(t.vector,t.vector),c=(0,o.qE)(r/s,0,1),u=(0,i.d)(a.rq.get(),(0,i.g)(a.rq.get(),t.vector,c),n);return(0,i.e)(u,u)}function h(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,r,s){const{vector:c,origin:u}=t,l=(0,i.d)(a.rq.get(),e,u),h=(0,i.e)(c,l)/(0,i.k)(c);return(0,i.g)(s,c,(0,o.qE)(h,n,r)),(0,i.f)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)(),new r.I((()=>c()))},24587:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ot});var o,r,i,s=n(90237),a=n(74887),c=(n(53966),n(44208),n(87811),n(49186),n(40608)),u=n(38954),l=n(51850),h=n(11964),d=n(97937),f=n(93687),T=n(3694),_=n(4341),O=(n(58083),n(87317),n(91829)),E=n(71351);function m(t){return t?{ray:(0,E.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,E.vt)(),c0:0,c1:Number.MAX_VALUE}}function N(t,e){for(let n=0;n<A;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}new _.I((()=>m())),n(240),n(32114),(i=o||(o={}))[i.LEFT=0]="LEFT",i[i.RIGHT=1]="RIGHT",i[i.BOTTOM=2]="BOTTOM",i[i.TOP=3]="TOP",i[i.NEAR=4]="NEAR",i[i.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(r||(r={})),r.FAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_LEFT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_BOTTOM_RIGHT,r.NEAR_TOP_RIGHT,r.NEAR_TOP_LEFT,r.FAR_BOTTOM_RIGHT,r.FAR_BOTTOM_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_RIGHT,r.NEAR_BOTTOM_RIGHT,r.FAR_BOTTOM_RIGHT,r.FAR_TOP_RIGHT,r.NEAR_TOP_RIGHT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_TOP_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_LEFT,r.NEAR_TOP_LEFT,r.NEAR_TOP_RIGHT,r.FAR_TOP_RIGHT;const A=6;(0,O.fA)(-1,-1,-1,1),(0,O.fA)(1,-1,-1,1),(0,O.fA)(1,1,-1,1),(0,O.fA)(-1,1,-1,1),(0,O.fA)(-1,-1,1,1),(0,O.fA)(1,-1,1,1),(0,O.fA)(1,1,1,1),(0,O.fA)(-1,1,1,1),new _.I(m),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)();var I,g,p=n(620);class S{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new R,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),R.clearPool(),V[0]=null,X.prune(),$.prune()}add(t){const e=Array.from(t);this._grow(e);const n=R.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));R.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=R.acquire();for(const o of t){const t=e??(0,d.e)(this.objectToBoundingSphere(o),K);y(t[3])?(n.init(this._root),v(o,t,n)):this._degenerateObjects.delete(o)}R.release(n),this._shrink()}update(t,e){if(!y(e[3])&&this._isDegenerate(t))return;const n=function(t){return V[0]=t,V}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),(0,p.O_)(t.origin,t.direction,q,k)}(o,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e,n){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),n.applyToMinMax(q,k),(0,p.O_)(t.origin,t.direction,q,k)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),!0}))}forEach(t){b(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,a=null;const c=x(t,e),l=c=>{if(--r,!o(c))return;const u=this.objectToBoundingSphere(c);if(!N(n,u))return;const l=w(t,e,(0,d.a)(u)),h=l-u[3],f=l+u[3];h<i&&(i=h,s=f,a=c)};return M(this._root,(o=>{if(r<=0||!N(n,o.bounds))return!1;if((0,u.g)(G,c,o.halfSize),(0,u.f)(G,G,(0,d.a)(o.bounds)),w(t,e,G)>s)return!1;const i=o.node;return i.terminals.forAll((t=>l(t))),null!==i.residents&&i.residents.forAll((t=>l(t))),!0}),t,e),a}forEachInDepthRange(t,e,n,o,r,i,s){let a=-1/0,c=1/0;const l={setRange:t=>{n===S.DepthOrder.FRONT_TO_BACK?(a=Math.max(a,t.near),c=Math.min(c,t.far)):(a=Math.max(a,-t.far),c=Math.min(c,-t.near))}};l.setRange(o);const h=w(e,n,t),f=x(e,n),T=x(e,-n),_=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),u=(0,d.a)(o),f=w(e,n,u)-h,T=f-o[3],_=f+o[3];T>c||_<a||!N(i,o)||r(t,l)};M(this._root,(t=>{if(!N(i,t.bounds))return!1;if((0,u.g)(G,f,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h>c)return!1;if((0,u.g)(G,T,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h<a)return!1;const o=t.node;return o.terminals.forAll((t=>_(t))),null!==o.residents&&o.residents.forAll((t=>_(t))),!0}),e,n)}forEachNode(t){b(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,d.g)(e),o=(0,d.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,d.g)(r),s=n+i;return!((0,u.s)((0,d.a)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};b(this._root,(t=>{const e=(0,d.g)(t.bounds),r=n+e;if((0,u.s)((0,d.a)(t.bounds),o)-r*r>0)return!1;const a=t.node;return a.terminals.forAll(s),i&&null!==a.residents&&a.residents.forAll(s),i})),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,d.k)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,d.k)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=R.acquire().init(t);this._add(e.at(n),o),R.release(o)}}_grow(t){if(B(t,(t=>this.objectToBoundingSphere(t)),W),y(W[3])&&!this._fitsInsideTree(W))if(L(this._root.node))(0,d.e)(W,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(W);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(W,t):this._growRootAsSubNode(t),R.release(t)}}_rebuildTree(t,e){(0,u.c)((0,d.a)(Y),(0,d.a)(e.bounds)),Y[3]=e.halfSize,B([t,Y],(t=>t),J);const n=R.acquire().init(this._root);this._root.initFrom(null,J,J[3]),this._root.increaseHalfSize(1.25),b(n,(t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0))),R.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return b(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),a=n[t]+e-(r[t]+i),c=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,l=2**Math.ceil(Math.log(c+u)*Math.LOG2E);o=Math.max(o,l),Z[t].min=c,Z[t].max=u}for(let t=0;t<3;t++){let e=Z[t].min,n=Z[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const a=r[t]-i-e*i*2;H[t]=a+(n+e)*i}const s=o*i;return H[3]=s*z,R.acquire().initFrom(null,H,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,u.c)((0,d.a)(W),(0,d.a)(this._root.bounds)),W[3]=this._root.halfSize,this._root.init(t),t.advanceTo(W,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!y(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),o=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new S((t=>t),{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class R{constructor(){this.bounds=(0,d.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:R.createEmptyNode(),e&&(0,d.e)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*z}advance(t){let e=this.node.children[t];e||(e=R.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=U[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new T.A({shrink:!0}),residents:new T.A({shrink:!0})}}static{this._pool=new f.A(R)}static acquire(){return R._pool.acquire()}static release(t){R._pool.release(t)}static clearPool(){R._pool.prune()}}function b(t,e){let n=R.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(R.acquire().init(n).advance(t));R.release(n)}}function M(t,e,n,o=S.DepthOrder.FRONT_TO_BACK){let r=R.acquire().init(t);const i=[r];for(function(t,e,n){if(!$.length)for(let t=0;t<8;++t)$.push({index:0,distance:0});for(let n=0;n<8;++n){const o=U[n];$.data[n].index=n,$.data[n].distance=w(t,e,o)}$.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=$.data[t].index}(n,o,Q);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=Q[t];r.node.children[e]&&i.push(R.acquire().init(r).advance(e))}R.release(r)}}function v(t,e,n){X.clear();const o=n.advanceTo(e,((t,e)=>{X.push(t.node),X.push(e)}))?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=X.length-2;t>=0&&F(X.data[t],X.data[t+1]);t-=2);}function F(t,e){return e>=0&&(t.children[e]=null),!!L(t)&&(null===t.residents&&(t.residents=new T.A({shrink:!0})),!0)}function L(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function P(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function C(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function D(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function B(t,e,n){q[0]=1/0,q[1]=1/0,q[2]=1/0,k[0]=-1/0,k[1]=-1/0,k[2]=-1/0;for(const n of t){const t=e(n);y(t[3])&&(P(q,t),C(k,t))}(0,u.m)((0,d.a)(n),q,k,.5),n[3]=Math.max(k[0]-q[0],k[1]-q[1],k[2]-q[2])/2}function x(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=w(t,e,j[r]);i<o&&(o=i,n=j[r])}return n}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function y(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}I=S||(S={}),(g=I.DepthOrder||(I.DepthOrder={}))[g.FRONT_TO_BACK=1]="FRONT_TO_BACK",g[g.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const U=[(0,l.fA)(-1,-1,-1),(0,l.fA)(1,-1,-1),(0,l.fA)(-1,1,-1),(0,l.fA)(1,1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(1,-1,1),(0,l.fA)(-1,1,1),(0,l.fA)(1,1,1)],j=[(0,l.fA)(-1,-1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(-1,1,-1),(0,l.fA)(-1,1,1),(0,l.fA)(1,-1,-1),(0,l.fA)(1,-1,1),(0,l.fA)(1,1,-1),(0,l.fA)(1,1,1)],z=Math.sqrt(3),V=[null],H=(0,d.c)(),G=(0,l.vt)(),q=(0,l.vt)(),k=(0,l.vt)(),X=new T.A,K=(0,d.c)(),W=(0,d.c)(),Y=(0,d.c)(),J=(0,d.c)(),Z=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],$=new T.A,Q=[0,0,0,0,0,0,0,0];var tt=n(431);function et(t,e,n){const o=(0,d.c)(),r=(0,d.a)(o);return(0,u.b)(r,r,t,.5),(0,u.b)(r,r,e,.5),o[3]=(0,u.j)(r,t),(0,u.f)(r,r,n),o}let nt=class{constructor(){this._idToComponent=new Map,this._components=new S((t=>t.bounds)),this._edges=new S((t=>t.bounds)),this._tmpLineSegment=(0,h.vt)(),this._tmpP1=(0,l.vt)(),this._tmpP2=(0,l.vt)(),this._tmpP3=(0,l.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,a.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>(this._addCandidates(t,e,n),n.length<1e3)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0}),t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new it(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>(n.component===e&&t.push(n),!0)),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=tt.HY.createView(t.locations),o=new Array(n.count),r=(0,l.vt)(),i=(0,l.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const a=et(r,i,t.origin),c=new st(e,s,a);o[s]=c}this._edges.add(o);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,s=o.locations,a=s.position0.getVec(e.index,this._tmpP1),c=s.position1.getVec(e.index,this._tmpP2);(0,u.f)(a,a,r),(0,u.f)(c,c,r);const l=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,l,a,c,n),rt(t,l,a,n),rt(t,l,c,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,d.a)(t.bounds),s=(0,h.Cr)(n,o,this._tmpLineSegment),a=(0,h._I)(s,i,this._tmpP3);(0,d.o)(t.bounds,a)&&r.push({type:"edge",objectId:e,target:(0,l.o8)(a),distance:(0,u.j)(i,a),start:(0,l.o8)(n),end:(0,l.o8)(o)})}};nt=(0,s._)([(0,c.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],nt);const ot=nt;function rt(t,e,n,o){if(!t.returnVertex||!(0,d.o)(t.bounds,n))return;const r=(0,d.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,l.o8)(n),distance:(0,u.j)(r,n)})}class it{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++it.uid}static{this.uid=0}}class st{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},34727:(t,e,n)=>{n.d(e,{$8:()=>g,Cc:()=>s,Hx:()=>_,Io:()=>I,KJ:()=>u,Sp:()=>d,XM:()=>l,YN:()=>h,ZH:()=>T,cU:()=>r,gg:()=>f,hs:()=>a,kU:()=>c,or:()=>S,pF:()=>b,pq:()=>R,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function f(t,e,n=1e-6){return!d(t,e,n)&&t>e}function T(t,e,n=1e-6){return!d(t,e,n)&&t<e}function _(t,e,n=1e-6){return d(t,e,n)||t>e}const O=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function E(t){return O.setFloat64(0,t),O.getBigInt64(0)}const m=BigInt("1000000"),N=A(1);function A(t){const e=E(t=Math.abs(t)),n=function(t){return O.setBigInt64(0,t),O.getFloat64(0)}(e<=m?m:e-m);return Math.abs(t-n)}function I(t,e,n=N){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&A(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=E(t),r=E(e);return o<0==r<0&&!((o<r?r-o:o-r)>m)}function g(t){return p(Math.max(-R,Math.min(t,R)))}function p(t){return o[0]=t,o[0]}function S(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const R=p(34028234663852886e22);function b(t,e,n){if(void 0===n||0===+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let o=e.toString().split("e");return o=(e=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))}},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})},93406:(t,e,n)=>{n.d(e,{K:()=>c});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=_.position0,c=_.position1,h=_.faceNormal0,f=_.faceNormal1,{edges:T,normals:O}=l(t),E=T.length/4,m=e.allocate(E);let N=0;const A=E,p=n?.allocate(A);let R=0,b=0,M=0;d.length=0;for(let t=0;t<E;++t){const e=4*t;o.getVec(T.data[e],s),o.getVec(T.data[e+1],c);const n=d.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}d.sort(((t,e)=>e.length-t.length));const v=new Array,F=new Array;d.forAll((({length:t,index:l})=>{const d=T.data[l],E=T.data[l+1],A=T.data[l+2],L=T.data[l+3],P=L===a;if(o.getVec(d,s),o.getVec(E,c),P){const t=3*A;(0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),(0,i.c)(f,h),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f)}else{let t=3*A;if((0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),t=3*L,(0,i.i)(f,O.data[t],O.data[t+1],O.data[t+2]),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f),function(t,e){return t.cosAngle>e}(_,g))return;_.cosAngle<-.9999&&(0,i.c)(f,h)}b+=t,M++,P||function(t,e){return t.cosAngle<e}(_,S)?(e.write(m,N++,_),v.push(t)):u(_,I)&&(p&&n&&n.write(p,R++,_),F.push(t))}));const L=new Float32Array(v.reverse()),P=new Float32Array(F.reverse()),C=p&&n?{instancesData:p.slice(0,R),lodInfo:{lengths:P}}:void 0;return{regular:{instancesData:m.slice(0,N),lodInfo:{lengths:L}},silhouette:C,averageEdgeLength:b/M}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.E)(E,t.position1,t.position0),n*((0,i.e)((0,i.h)(O,t.faceNormal0,t.faceNormal1),E)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=T.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],c=o[e+1],u=o[e+2],l=n[e],h=n[e+1],d=n[e+2];r.getVec(l,m),r.getVec(h,N),r.getVec(d,A),(0,i.d)(N,N,m),(0,i.d)(A,A,m),(0,i.h)(m,N,A),(0,i.n)(m,m),T.pushArray(m),(s===a||l<h)&&(f.push(l),f.push(h),f.push(t),f.push(s)),(c===a||h<d)&&(f.push(h),f.push(d),f.push(t),f.push(c)),(u===a||d<l)&&(f.push(d),f.push(l),f.push(t),f.push(u))}return{edges:f,normals:T}}class h{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new h,deallocator:null}),f=new r.A({deallocator:null}),T=new r.A({deallocator:null}),_=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},O=(0,s.vt)(),E=(0,s.vt)(),m=(0,s.vt)(),N=(0,s.vt)(),A=(0,s.vt)(),I=(0,o.kU)(4),g=Math.cos(I),p=(0,o.kU)(35),S=Math.cos(p)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9468],{240:(t,e,n)=>{n.d(e,{C:()=>u,vt:()=>a,lU:()=>d,fA:()=>h,mR:()=>A,Qj:()=>l,T7:()=>g,gv:()=>p,Ui:()=>I,Tj:()=>S,_I:()=>R,mP:()=>N,LV:()=>c});var o=n(34727),r=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function a(t=P){return[t[0],t[1],t[2],t[3]]}function c(t=P[0],e=P[1],n=P[2],o=P[3]){return h(t,e,n,o,s.Km.get())}function u(t,e){return h(e[0],e[1],e[2],e[3],t)}function l(t){return t}function h(t,e,n,o,r=a()){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r}function d(t,e,n,o=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(T,o);let c=i,u=!1;for(;c<n-1&&!u;)e(_,c),c++,u=!(0,r.q)(T,_);if(!u)return!1;for(c=Math.max(c,s),u=!1;c<n&&!u;)e(O,c),c++,(0,r.d)(E,T,_),(0,r.n)(E,E),(0,r.d)(m,_,O),(0,r.n)(m,m),u=!(0,r.q)(T,O)&&!(0,r.q)(_,O)&&Math.abs((0,r.e)(E,m))<f;return u?(function(t,e,n,o=a()){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],l=t[2]-e[2],h=i*l-s*u,d=s*c-r*l,f=r*u-i*c,T=h*h+d*d+f*f,_=Math.abs(T-1)>1e-5&&T>1e-12?1/Math.sqrt(T):1;o[0]=h*_,o[1]=d*_,o[2]=f*_,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2])}(T,_,O,t),!0):(0!==o||1!==i||2!==s)&&d(t,e,n,0,1,2)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const f=.99619469809,T=(0,i.vt)(),_=(0,i.vt)(),O=(0,i.vt)(),E=(0,i.vt)(),m=(0,i.vt)();function N(t,e,n){return e!==t&&u(t,e),t[3]=-(0,r.e)(t,n),t}function A(t,e,n,o){return(0,r.h)(O,e,t),function(t,e,n){const o=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}(n,O,o)}function I(t,e,n){return null!=e&&F(L(t,e.origin,e.direction,D,n))}function g(t,e,n){return F(L(t,e.origin,e.vector,C.NONE,n))}function p(t,e,n){return F(L(t,e.origin,e.vector,C.CLAMP,n))}function S(t,e){return b(t,e)>=0}function R(t,e,n){const o=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,e,n){const o=(0,r.g)(s.rq.get(),t,(0,r.e)(t,e));return(0,r.d)(n,e,o),n}(t,(0,r.d)(s.rq.get(),e,o),s.rq.get());return(0,r.f)(n,i,o),n}function b(t,e){return(0,r.e)(t,e)+t[3]}var M,v;function F(t){return t===M.INTERSECTS_INSIDE_OUT||t===M.INTERSECTS_OUTSIDE_IN}function L(t,e,n,i,s){const a=(0,r.e)(t,n),c=b(t,e);if(0===a)return c>=0?M.INSIDE:M.OUTSIDE;let u=-c/a;return i&C.CLAMP&&(u=(0,o.qE)(u,0,1)),!(i&C.INFINITE_MIN)&&u<0||!(i&C.INFINITE_MAX)&&u>1?c>=0?M.INSIDE:M.OUTSIDE:((0,r.f)(s,e,(0,r.g)(s,n,u)),c>=0?M.INTERSECTS_INSIDE_OUT:M.INTERSECTS_OUTSIDE_IN)}(v=M||(M={}))[v.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",v[v.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",v[v.INSIDE=2]="INSIDE",v[v.OUTSIDE=3]="OUTSIDE";const P=[0,0,1,0];var C;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(C||(C={})),C.INFINITE_MIN,C.INFINITE_MAX;const D=C.INFINITE_MAX},431:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>B,hx:()=>F,Jb:()=>D});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*o),l=r[n],h=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*l+2*o]=t,u[2*l+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];h(n,o,e),h(o,r,e),h(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(l+i[t],l+i[t+1]);const f=new Int32Array(3*o),T=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,_=(t,e)=>{const n=T(t,e);f[3*e+n]=-1},O=(t,e,n,o)=>{const r=T(t,e);f[3*e+r]=o;const i=T(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*l+2*o];n===r?(O(t,u[2*e+1],r,u[2*l+2*o+1]),e++,o++):n<r?(_(t,u[2*e+1]),e++):(_(r,u[2*l+2*o+1]),o++)}for(;e<n;)_(t,u[2*e+1]),e++;for(;o<s;)_(u[2*l+2*o],u[2*l+2*o+1]),o++}return f}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),l=n(51850),h=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),a=n*s,c=o*s,u=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,h=e*i;t[h]=T(u),t[h+1]=T(l)}function T(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class _{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:N}write(t,e,n){b.seed=this._edgeHashFunction(n);const o=b.getIntRange(0,255),r=b.getIntRange(0,this.settings.variants-1),i=b.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const O=new Float32Array(6),E=new Uint32Array(O.buffer),m=new Uint32Array(1);function N(t){return O[0]=t.position0[0],O[1]=t.position0[1],O[2]=t.position0[2],O[3]=t.position1[0],O[4]=t.position1[1],O[5]=t.position1[2],m[0]=31*(31*(31*(31*(31*(166811+E[0])+E[1])+E[2])+E[3])+E[4])+E[5],m[0]}function A(t){const e=O;e[0]=g(t.position0[0]),e[1]=g(t.position0[1]),e[2]=g(t.position0[2]),e[3]=g(t.position1[0]),e[4]=g(t.position1[1]),e[5]=g(t.position1[2]),m[0]=5381;for(let t=0;t<E.length;t++)m[0]=31*m[0]+E[t];return m[0]}const I=1e4;function g(t){return Math.round(t*I)/I}class p{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.f)(R,n.faceNormal0,n.faceNormal1),(0,u.n)(R,R);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,R[0],R[1],R[2],r)}static{this.Layout=a.gr}static{this.glLayout=(0,h.U)(a.gr,1)}}class S{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}static{this.Layout=a.In}static{this.glLayout=(0,h.U)(a.In,1)}}const R=(0,l.vt)(),b=new c.A;var M=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return P.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,M.K)(e,P,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new L(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n}),c=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class L{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const P=new p,C=new S,D=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),B=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,o.U)(a),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((o=>{const i=t.fields.get(o),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new r._(o,a,c,u,n,l,e)}))}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f16:o.pe.HALF_FLOAT,f32:o.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,l*e),d=n?.minReduction??0,f=n?.originalIndices||null,T=f?f.length:0,_=n?.componentOffsets||null;let O=0;if(_)for(let t=0;t<_.length-1;t++){const e=_[t+1]-_[t];e>O&&(O=e)}else O=l;const E=Math.floor(1.1*O)+1;(null==u||u.length<2*E)&&(u=new Uint32Array((0,o.cU)(2*E)));for(let t=0;t<2*E;t++)u[t]=0;let m=0;const N=!!_&&!!f,A=N?T:l;let I=(0,r.my)(l);const g=new Uint32Array(T),p=1.96;let S=0!==d?Math.ceil(4*p*p/(d*d)*d*(1-d)):A,R=1,b=_?_[1]:A;for(let t=0;t<A;t++){if(t===S){const e=1-m/t;if(e+p*Math.sqrt(e*(1-e)/t)<d)return null;S*=2}if(t===b){for(let t=0;t<2*E;t++)u[t]=0;if(f)for(let t=_[R-1];t<_[R];t++)g[t]=I[f[t]];b=_[++R]}const n=N?f[t]:t,o=n*e,r=c(h,o,e);let i=r%E,a=m;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(h,o,t*e,e)){a=I[t];break}}i++,i>=E&&(i-=E)}a===m&&(u[2*i]=r,u[2*i+1]=n+1,m++),I[n]=a}if(0!==d&&1-m/l<d)return null;if(N){for(let t=_[R-1];t<g.length;t++)g[t]=I[f[t]];I=(0,r.uW)(g)}const M=i?new Array(m):new Uint32Array(m*e);m=0;for(let t=0;t<A;t++)I[t]===m&&(a(h,(N?f[t]:t)*e,M,m*e,e),m++);if(f&&!N){const t=new Uint32Array(T);for(let e=0;e<t.length;e++)t[e]=I[f[e]];I=(0,r.uW)(t)}return{buffer:Array.isArray(M)?M:M.buffer,indices:I,uniqueCount:m}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function a(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function c(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>d,_I:()=>h,kb:()=>l,vt:()=>c});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),a=n(32114);function c(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e,n=c()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function l(t,e){const n=(0,i.d)(a.rq.get(),e,t.origin),r=(0,i.e)(t.vector,n),s=(0,i.e)(t.vector,t.vector),c=(0,o.qE)(r/s,0,1),u=(0,i.d)(a.rq.get(),(0,i.g)(a.rq.get(),t.vector,c),n);return(0,i.e)(u,u)}function h(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,r,s){const{vector:c,origin:u}=t,l=(0,i.d)(a.rq.get(),e,u),h=(0,i.e)(c,l)/(0,i.k)(c);return(0,i.g)(s,c,(0,o.qE)(h,n,r)),(0,i.f)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)(),new r.I((()=>c()))},24587:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ot});var o,r,i,s=n(90237),a=n(74887),c=(n(53966),n(44208),n(87811),n(49186),n(40608)),u=n(38954),l=n(51850),h=n(11964),d=n(97937),f=n(93687),T=n(3694),_=n(4341),O=(n(58083),n(87317),n(91829)),E=n(71351);function m(t){return t?{ray:(0,E.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,E.vt)(),c0:0,c1:Number.MAX_VALUE}}function N(t,e){for(let n=0;n<A;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}new _.I((()=>m())),n(240),n(32114),(i=o||(o={}))[i.LEFT=0]="LEFT",i[i.RIGHT=1]="RIGHT",i[i.BOTTOM=2]="BOTTOM",i[i.TOP=3]="TOP",i[i.NEAR=4]="NEAR",i[i.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(r||(r={})),r.FAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_LEFT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_BOTTOM_RIGHT,r.NEAR_TOP_RIGHT,r.NEAR_TOP_LEFT,r.FAR_BOTTOM_RIGHT,r.FAR_BOTTOM_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_RIGHT,r.NEAR_BOTTOM_RIGHT,r.FAR_BOTTOM_RIGHT,r.FAR_TOP_RIGHT,r.NEAR_TOP_RIGHT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_TOP_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_LEFT,r.NEAR_TOP_LEFT,r.NEAR_TOP_RIGHT,r.FAR_TOP_RIGHT;const A=6;(0,O.fA)(-1,-1,-1,1),(0,O.fA)(1,-1,-1,1),(0,O.fA)(1,1,-1,1),(0,O.fA)(-1,1,-1,1),(0,O.fA)(-1,-1,1,1),(0,O.fA)(1,-1,1,1),(0,O.fA)(1,1,1,1),(0,O.fA)(-1,1,1,1),new _.I(m),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)();var I,g,p=n(620);class S{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new R,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),R.clearPool(),V[0]=null,X.prune(),$.prune()}add(t){const e=Array.from(t);this._grow(e);const n=R.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));R.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=R.acquire();for(const o of t){const t=e??(0,d.h)(this.objectToBoundingSphere(o),K);y(t[3])?(n.init(this._root),v(o,t,n)):this._degenerateObjects.delete(o)}R.release(n),this._shrink()}update(t,e){if(!y(e[3])&&this._isDegenerate(t))return;const n=function(t){return V[0]=t,V}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),(0,p.O_)(t.origin,t.direction,q,k)}(o,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e,n){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),n.applyToMinMax(q,k),(0,p.O_)(t.origin,t.direction,q,k)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),!0}))}forEach(t){b(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,a=null;const c=x(t,e),l=c=>{if(--r,!o(c))return;const u=this.objectToBoundingSphere(c);if(!N(n,u))return;const l=w(t,e,(0,d.a)(u)),h=l-u[3],f=l+u[3];h<i&&(i=h,s=f,a=c)};return M(this._root,(o=>{if(r<=0||!N(n,o.bounds))return!1;if((0,u.g)(G,c,o.halfSize),(0,u.f)(G,G,(0,d.a)(o.bounds)),w(t,e,G)>s)return!1;const i=o.node;return i.terminals.forAll((t=>l(t))),null!==i.residents&&i.residents.forAll((t=>l(t))),!0}),t,e),a}forEachInDepthRange(t,e,n,o,r,i,s){let a=-1/0,c=1/0;const l={setRange:t=>{n===S.DepthOrder.FRONT_TO_BACK?(a=Math.max(a,t.near),c=Math.min(c,t.far)):(a=Math.max(a,-t.far),c=Math.min(c,-t.near))}};l.setRange(o);const h=w(e,n,t),f=x(e,n),T=x(e,-n),_=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),u=(0,d.a)(o),f=w(e,n,u)-h,T=f-o[3],_=f+o[3];T>c||_<a||!N(i,o)||r(t,l)};M(this._root,(t=>{if(!N(i,t.bounds))return!1;if((0,u.g)(G,f,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h>c)return!1;if((0,u.g)(G,T,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h<a)return!1;const o=t.node;return o.terminals.forAll((t=>_(t))),null!==o.residents&&o.residents.forAll((t=>_(t))),!0}),e,n)}forEachNode(t){b(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,d.g)(e),o=(0,d.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,d.g)(r),s=n+i;return!((0,u.s)((0,d.a)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};b(this._root,(t=>{const e=(0,d.g)(t.bounds),r=n+e;if((0,u.s)((0,d.a)(t.bounds),o)-r*r>0)return!1;const a=t.node;return a.terminals.forAll(s),i&&null!==a.residents&&a.residents.forAll(s),i})),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,d.k)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,d.k)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=R.acquire().init(t);this._add(e.at(n),o),R.release(o)}}_grow(t){if(B(t,(t=>this.objectToBoundingSphere(t)),W),y(W[3])&&!this._fitsInsideTree(W))if(L(this._root.node))(0,d.h)(W,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(W);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(W,t):this._growRootAsSubNode(t),R.release(t)}}_rebuildTree(t,e){(0,u.c)((0,d.a)(Y),(0,d.a)(e.bounds)),Y[3]=e.halfSize,B([t,Y],(t=>t),J);const n=R.acquire().init(this._root);this._root.initFrom(null,J,J[3]),this._root.increaseHalfSize(1.25),b(n,(t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0))),R.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return b(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),a=n[t]+e-(r[t]+i),c=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,l=2**Math.ceil(Math.log(c+u)*Math.LOG2E);o=Math.max(o,l),Z[t].min=c,Z[t].max=u}for(let t=0;t<3;t++){let e=Z[t].min,n=Z[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const a=r[t]-i-e*i*2;H[t]=a+(n+e)*i}const s=o*i;return H[3]=s*z,R.acquire().initFrom(null,H,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,u.c)((0,d.a)(W),(0,d.a)(this._root.bounds)),W[3]=this._root.halfSize,this._root.init(t),t.advanceTo(W,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!y(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),o=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new S((t=>t),{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class R{constructor(){this.bounds=(0,d.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:R.createEmptyNode(),e&&(0,d.h)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*z}advance(t){let e=this.node.children[t];e||(e=R.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=U[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new T.A({shrink:!0}),residents:new T.A({shrink:!0})}}static{this._pool=new f.A(R)}static acquire(){return R._pool.acquire()}static release(t){R._pool.release(t)}static clearPool(){R._pool.prune()}}function b(t,e){let n=R.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(R.acquire().init(n).advance(t));R.release(n)}}function M(t,e,n,o=S.DepthOrder.FRONT_TO_BACK){let r=R.acquire().init(t);const i=[r];for(function(t,e,n){if(!$.length)for(let t=0;t<8;++t)$.push({index:0,distance:0});for(let n=0;n<8;++n){const o=U[n];$.data[n].index=n,$.data[n].distance=w(t,e,o)}$.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=$.data[t].index}(n,o,Q);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=Q[t];r.node.children[e]&&i.push(R.acquire().init(r).advance(e))}R.release(r)}}function v(t,e,n){X.clear();const o=n.advanceTo(e,((t,e)=>{X.push(t.node),X.push(e)}))?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=X.length-2;t>=0&&F(X.data[t],X.data[t+1]);t-=2);}function F(t,e){return e>=0&&(t.children[e]=null),!!L(t)&&(null===t.residents&&(t.residents=new T.A({shrink:!0})),!0)}function L(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function P(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function C(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function D(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function B(t,e,n){q[0]=1/0,q[1]=1/0,q[2]=1/0,k[0]=-1/0,k[1]=-1/0,k[2]=-1/0;for(const n of t){const t=e(n);y(t[3])&&(P(q,t),C(k,t))}(0,u.m)((0,d.a)(n),q,k,.5),n[3]=Math.max(k[0]-q[0],k[1]-q[1],k[2]-q[2])/2}function x(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=w(t,e,j[r]);i<o&&(o=i,n=j[r])}return n}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function y(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}I=S||(S={}),(g=I.DepthOrder||(I.DepthOrder={}))[g.FRONT_TO_BACK=1]="FRONT_TO_BACK",g[g.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const U=[(0,l.fA)(-1,-1,-1),(0,l.fA)(1,-1,-1),(0,l.fA)(-1,1,-1),(0,l.fA)(1,1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(1,-1,1),(0,l.fA)(-1,1,1),(0,l.fA)(1,1,1)],j=[(0,l.fA)(-1,-1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(-1,1,-1),(0,l.fA)(-1,1,1),(0,l.fA)(1,-1,-1),(0,l.fA)(1,-1,1),(0,l.fA)(1,1,-1),(0,l.fA)(1,1,1)],z=Math.sqrt(3),V=[null],H=(0,d.c)(),G=(0,l.vt)(),q=(0,l.vt)(),k=(0,l.vt)(),X=new T.A,K=(0,d.c)(),W=(0,d.c)(),Y=(0,d.c)(),J=(0,d.c)(),Z=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],$=new T.A,Q=[0,0,0,0,0,0,0,0];var tt=n(431);function et(t,e,n){const o=(0,d.c)(),r=(0,d.a)(o);return(0,u.b)(r,r,t,.5),(0,u.b)(r,r,e,.5),o[3]=(0,u.j)(r,t),(0,u.f)(r,r,n),o}let nt=class{constructor(){this._idToComponent=new Map,this._components=new S((t=>t.bounds)),this._edges=new S((t=>t.bounds)),this._tmpLineSegment=(0,h.vt)(),this._tmpP1=(0,l.vt)(),this._tmpP2=(0,l.vt)(),this._tmpP3=(0,l.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,a.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>(this._addCandidates(t,e,n),n.length<1e3)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0}),t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new it(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>(n.component===e&&t.push(n),!0)),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=tt.HY.createView(t.locations),o=new Array(n.count),r=(0,l.vt)(),i=(0,l.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const a=et(r,i,t.origin),c=new st(e,s,a);o[s]=c}this._edges.add(o);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,s=o.locations,a=s.position0.getVec(e.index,this._tmpP1),c=s.position1.getVec(e.index,this._tmpP2);(0,u.f)(a,a,r),(0,u.f)(c,c,r);const l=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,l,a,c,n),rt(t,l,a,n),rt(t,l,c,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,d.a)(t.bounds),s=(0,h.Cr)(n,o,this._tmpLineSegment),a=(0,h._I)(s,i,this._tmpP3);(0,d.o)(t.bounds,a)&&r.push({type:"edge",objectId:e,target:(0,l.o8)(a),distance:(0,u.j)(i,a),start:(0,l.o8)(n),end:(0,l.o8)(o)})}};nt=(0,s._)([(0,c.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],nt);const ot=nt;function rt(t,e,n,o){if(!t.returnVertex||!(0,d.o)(t.bounds,n))return;const r=(0,d.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,l.o8)(n),distance:(0,u.j)(r,n)})}class it{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++it.uid}static{this.uid=0}}class st{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},34727:(t,e,n)=>{n.d(e,{$8:()=>g,Cc:()=>s,Hx:()=>_,Io:()=>I,KJ:()=>u,Sp:()=>d,XM:()=>l,YN:()=>h,ZH:()=>T,cU:()=>r,gg:()=>f,hs:()=>a,kU:()=>c,or:()=>S,pF:()=>b,pq:()=>R,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function f(t,e,n=1e-6){return!d(t,e,n)&&t>e}function T(t,e,n=1e-6){return!d(t,e,n)&&t<e}function _(t,e,n=1e-6){return d(t,e,n)||t>e}const O=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function E(t){return O.setFloat64(0,t),O.getBigInt64(0)}const m=BigInt("1000000"),N=A(1);function A(t){const e=E(t=Math.abs(t)),n=function(t){return O.setBigInt64(0,t),O.getFloat64(0)}(e<=m?m:e-m);return Math.abs(t-n)}function I(t,e,n=N){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&A(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=E(t),r=E(e);return o<0==r<0&&!((o<r?r-o:o-r)>m)}function g(t){return p(Math.max(-R,Math.min(t,R)))}function p(t){return o[0]=t,o[0]}function S(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const R=p(34028234663852886e22);function b(t,e,n){if(void 0===n||0===+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let o=e.toString().split("e");return o=(e=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))}},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})},93406:(t,e,n)=>{n.d(e,{K:()=>c});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=_.position0,c=_.position1,h=_.faceNormal0,f=_.faceNormal1,{edges:T,normals:O}=l(t),E=T.length/4,m=e.allocate(E);let N=0;const A=E,p=n?.allocate(A);let R=0,b=0,M=0;d.length=0;for(let t=0;t<E;++t){const e=4*t;o.getVec(T.data[e],s),o.getVec(T.data[e+1],c);const n=d.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}d.sort(((t,e)=>e.length-t.length));const v=new Array,F=new Array;d.forAll((({length:t,index:l})=>{const d=T.data[l],E=T.data[l+1],A=T.data[l+2],L=T.data[l+3],P=L===a;if(o.getVec(d,s),o.getVec(E,c),P){const t=3*A;(0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),(0,i.c)(f,h),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f)}else{let t=3*A;if((0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),t=3*L,(0,i.i)(f,O.data[t],O.data[t+1],O.data[t+2]),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f),function(t,e){return t.cosAngle>e}(_,g))return;_.cosAngle<-.9999&&(0,i.c)(f,h)}b+=t,M++,P||function(t,e){return t.cosAngle<e}(_,S)?(e.write(m,N++,_),v.push(t)):u(_,I)&&(p&&n&&n.write(p,R++,_),F.push(t))}));const L=new Float32Array(v.reverse()),P=new Float32Array(F.reverse()),C=p&&n?{instancesData:p.slice(0,R),lodInfo:{lengths:P}}:void 0;return{regular:{instancesData:m.slice(0,N),lodInfo:{lengths:L}},silhouette:C,averageEdgeLength:b/M}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.E)(E,t.position1,t.position0),n*((0,i.e)((0,i.h)(O,t.faceNormal0,t.faceNormal1),E)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=T.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],c=o[e+1],u=o[e+2],l=n[e],h=n[e+1],d=n[e+2];r.getVec(l,m),r.getVec(h,N),r.getVec(d,A),(0,i.d)(N,N,m),(0,i.d)(A,A,m),(0,i.h)(m,N,A),(0,i.n)(m,m),T.pushArray(m),(s===a||l<h)&&(f.push(l),f.push(h),f.push(t),f.push(s)),(c===a||h<d)&&(f.push(h),f.push(d),f.push(t),f.push(c)),(u===a||d<l)&&(f.push(d),f.push(l),f.push(t),f.push(u))}return{edges:f,normals:T}}class h{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new h,deallocator:null}),f=new r.A({deallocator:null}),T=new r.A({deallocator:null}),_=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},O=(0,s.vt)(),E=(0,s.vt)(),m=(0,s.vt)(),N=(0,s.vt)(),A=(0,s.vt)(),I=(0,o.kU)(4),g=Math.cos(I),p=(0,o.kU)(35),S=Math.cos(p)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3186,5011,9141],{4197:(e,t,i)=>{i.d(t,{jh:()=>r,l5:()=>o,xm:()=>s});var n=i(34275);function r(e,t=!1){return e<=n.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function o(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}},6797:(e,t,i)=>{i.d(t,{Mj:()=>p,Ui:()=>d,w2:()=>f});var n=i(69622),r=i(5503),s=i(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.A}function l(e){return e instanceof r.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof r.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function h(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const n=l(e),r=l(t);if(0===n.length&&0===r.length)return;if(!n.length||!r.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=r.filter((e=>!n.includes(e))),p=n.filter((e=>!r.includes(e))),f=n.filter((i=>r.includes(i)&&u(e,i)!==u(t,i))).concat(s,p).sort(),d=c(e);if(d&&o.has(d)&&f.length)return{type:"complete",oldValue:e,newValue:t};let m;const y=a(e)&&a(t);for(const n of f){const r=u(e,n),s=u(t,n);let o;if((y||"function"!=typeof r&&"function"!=typeof s)&&r!==s&&(null!=r||null!=s)){if(i&&i[n]&&"function"==typeof i[n])o=i[n]?.(r,s);else if(r instanceof Date&&s instanceof Date){if(r.getTime()===s.getTime())continue;o={type:"complete",oldValue:r,newValue:s}}else o="object"==typeof r&&"object"==typeof s&&c(r)===c(s)?h(r,s):{type:"complete",oldValue:r,newValue:s};null!=o&&(null!=m?m.diff[n]=o:m={type:"partial",diff:{[n]:o}})}}return m}function p(e,t){return function(e,t){if(null==e)return!1;const i=t.split(".");let n=e;for(const e of i){if("complete"===n.type)return!0;if("partial"!==n.type)return!1;{const t=n.diff[e];if(!t)return!1;n=t}}return!0}(e,t)}function f(e,t){if(!e)return!1;if("partial"===e.type){const i=Object.keys(e.diff);return 1===i.length&&i[0]===t}return!1}function d(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}:h(e,t)}},13069:(e,t,i)=>{i.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>s});const n="randomUUID"in crypto;function r(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${r().toUpperCase()}}`}function o(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},17311:(e,t,i)=>{i.d(t,{A:()=>p});var n=i(90237),r=i(69622),s=i(4576),o=i(60999),a=i(5503),l=i(10107),u=(i(44208),i(53966),i(40608)),c=i(30524),h=i(43668);let p=class extends r.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,o.UT)((()=>(0,h.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([i.e(4560),i.e(9926)]).then(i.bind(i,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new a.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 i=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(i.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:i,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(i,{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 i=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of i){const i=t.split("."),n=this.fieldsIndex.get(i.at(-1)??"");n&&e.add(n.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const i of t){const t=this.fieldsIndex.get(i);t&&e.add(t.name)}return 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,i){return(await this.getTitles(e,[t],i)).get(t)??""}async getTitles(e,t,i){const n=new Map,r=i?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);i?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:o,workingTitle:a}=this,l=a&&o;t.forEach((t=>{const i=l?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:o,globalAttributes:this._createFormattedAttributes(e,t,r).global,layer:e,text:a}):"";n.set(t,i)}))}catch{}return n}async _checkAndReQueryGraphics(e,t){const i=t.map((t=>t.getObjectId()??t.attributes[e.objectIdField])).filter(s.Ru);if(i.length!==t.length)return t;if(t.some((e=>!(0,c.Kl)(e,this.requiredFields)))){const n=e.createQuery();n.where="1=1",n.outFields=[...this.requiredFields],n.objectIds=i;const r=await e.queryFeatures(n);if(r?.features.length===t.length)return r.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const i of e){if(!i.fieldName)continue;const e=this.fieldsIndex.get(i.fieldName),n=e?.name??i.fieldName;i.fieldName=n,t.set(n.toLowerCase(),i)}return t}_createFormattedAttributes(e,t,i="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],r={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const i=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{r[`expression/${e.name}`]=e.func({vars:{$feature:i}})}catch{}}const s={...t.attributes,...r};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:s,graphic:t,timeZone:i,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,n._)([(0,l.MZ)({readOnly:!0})],p.prototype,"_arcadeTask",null),(0,n._)([(0,l.MZ)()],p.prototype,"_featureUtils",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],p.prototype,"featureUtilsPromise",null),(0,n._)([(0,l.MZ)({readOnly:!0})],p.prototype,"calculatedExpressions",null),(0,n._)([(0,l.MZ)()],p.prototype,"displayField",void 0),(0,n._)([(0,l.MZ)()],p.prototype,"effectivePopupTemplate",void 0),(0,n._)([(0,l.MZ)()],p.prototype,"expressionsUsedInTitle",null),(0,n._)([(0,l.MZ)()],p.prototype,"fieldsIndex",void 0),(0,n._)([(0,l.MZ)()],p.prototype,"fieldInfoMap",null),(0,n._)([(0,l.MZ)()],p.prototype,"fields",void 0),(0,n._)([(0,l.MZ)()],p.prototype,"objectIdField",void 0),(0,n._)([(0,l.MZ)()],p.prototype,"requiredFields",null),p=(0,n._)([(0,u.$)("esri.layers.support.TitleCreator")],p)},27865:(e,t,i)=>{i.d(t,{O9:()=>s,dw:()=>o,mj:()=>r});var n=i(59247);function r(e,t){const i=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===i[t].type))}function s(e,t){const i=e.length>t.length?e:t,r=e.length>t.length?t:e;for(let e=r.length;e<i.length;e++)r.push((0,n.sK)(i[e]))}function o(e){const t=e[0];return!!t&&"type"in t}},32730:(e,t,i)=>{i.d(t,{BI:()=>y,D3:()=>d,XJ:()=>m,lc:()=>f,mX:()=>_,rU:()=>g,tH:()=>F});var n=i(799);const r="__begin__",s="__end__",o=new RegExp(r,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+r,"i"),u=new RegExp(s+"$","i"),c='"',h=c+" + ",p=" + "+c;function f(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function d(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(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=f(e.labelExpression),t.type="conventional"),t}function y(e){const t=m(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=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(b);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function _(e){let t;return e?(t=(0,n.HC)(e,(e=>r+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,h).replaceAll(a,p)):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,M=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,T=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=M.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=T.exec(e),t?t[2]:null)}},39516:(e,t,i)=>{let n;async function r(){return null==n&&(n=Promise.all([i.e(8368),i.e(4123)]).then(i.bind(i,44123)).then((e=>new e.WhereClauseCache(500,500)))),n}async function s(e,t){const i=await r(),n=i.get(e,t);if(null==n)throw i.getError(e,t);return n}function o(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}i.d(t,{GP:()=>s,IW:()=>a,mA:()=>o})},41366:(e,t,i)=>{i.d(t,{K:()=>p,Q:()=>u});var n=i(90237),r=i(66552),s=i(53966),o=i(10107),a=(i(44208),i(87811),i(93223)),l=i(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",p=e=>{let t=class extends e{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,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n._)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,n._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,n._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,i)=>{i.d(t,{Ch:()=>o,mW:()=>s});var n=i(34727),r=i(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,i){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:i,maxScale:n}of e.filters)t[0]=Math.max(t[0],c(i)),t[1]=Math.min(t[1],h(n));return t}(e);if(s&&((0,n.gg)(t,s[0])||(0,n.ZH)(i,s[1])))return"";const o=Array.from(a(e,t,i)),l=function(e,t,i){if(0===e.length)return!0;const r=c(e.at(0)?.minScale),s=h(e.at(-1)?.maxScale);if((0,n.ZH)(r,t)||(0,n.gg)(s,i))return!0;for(let t=0;t<e.length-1;t++){const i=e[t],r=e[t+1];if((0,n.ZH)(c(r.minScale),h(i.maxScale)))return!0}return!1}(o,t,i)?"1=1":o.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,r.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(e,t,i){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 n of e.filters)l(n.minScale,n.maxScale,t,i)&&(yield n)}}function l(e,t,i,r){return e=c(e),i=c(i),t=h(t),!(!(0,n.Sp)(i,e)&&(r??i)>e||(0,n.Hx)(t,i)||void 0!==r&&(0,n.Sp)(r,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function h(e){return e||0}},50498:(e,t,i)=>{i.d(t,{Ye:()=>h,gy:()=>c,yR:()=>p});var n=i(66552),r=i(5443),s=i(91075),o=i(48526),a=i(86738),l=i(39829),u=i(82799);const c=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),h=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),p={base:s.A,key:"type",typeMap:{extent:r.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}}},52106:(e,t,i)=>{i.d(t,{A:()=>M});var n,r=i(90237),s=i(13874),o=i(69540),a=i(51447),l=i(25482),u=i(53966),c=i(36708),h=i(24326),p=i(10107),f=(i(44208),i(87811),i(40608)),d=i(12195),m=i(65864),y=i(50498),g=i(54339),_=i(33910);function b(e){if(null==e)return null;const t={};for(const i in e){const n=e[i];n&&(t[i]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends(o.A.ClonableMixin(l.A)){static{n=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,h.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.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 n({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=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const i of[t,this.sourceLayer,this.layer])if(i){if("popupTemplate"in i&&i.popupTemplate)return i.popupTemplate;if(e&&"defaultPopupTemplate"in i&&null!=i.defaultPopupTemplate)return i.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:b(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,d.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,n){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const r={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(r.action=n),"attributes"===e&&(r.attributeName=n),this.layer.graphicChanged(r)}_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,r._)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const n=(0,m.rS)(e[i]);n&&(t[i]=n)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,r._)([(0,p.MZ)({value:null})],M.prototype,"attributes",null),(0,r._)([(0,p.MZ)({value:null,types:y.yR,json:{read:m.rS}})],M.prototype,"geometry",null),(0,r._)([(0,p.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,r._)([(0,p.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,r._)([(0,p.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,r._)([(0,p.MZ)({type:s.A,value:null})],M.prototype,"popupTemplate",null),(0,r._)([(0,p.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,r._)([(0,p.MZ)({value:null,types:_.Es})],M.prototype,"symbol",null),(0,r._)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,r._)([(0,p.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=n=(0,r._)([(0,f.$)("esri.Graphic")],M)},54339:(e,t,i)=>{function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const n of t.fieldNames)i.push(e.attributes[n]??null);return JSON.stringify(i)}}}function r(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>n,r:()=>r})},59247:(e,t,i)=>{i.d(t,{bv:()=>l,Fk:()=>u,yG:()=>c,$b:()=>h,Nd:()=>p,jm:()=>f,sK:()=>y});var n=i(40876),r=i(90629);function s(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const o=s();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:s,fromValues:function(e,t,i,n,r,s,o,a,l,u,c,h,p,f,d,m){const y=new Float32Array(16);return y[0]=e,y[1]=t,y[2]=i,y[3]=n,y[4]=r,y[5]=s,y[6]=o,y[7]=a,y[8]=l,y[9]=u,y[10]=c,y[11]=h,y[12]=p,y[13]=f,y[14]=d,y[15]=m,y}},Symbol.toStringTag,{value:"Module"}));var a=i(58083);class l{constructor(e,t,i){this.strength=e,this.radius=t,this.threshold=i,this.type="bloom"}interpolate(e,t,i){this.strength=d(e.strength,t.strength,i),this.radius=d(e.radius,t.radius,i),this.threshold=d(e.threshold,t.threshold,i)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:m(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,i){this.radius=Math.round(d(e.radius,t.radius,i))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:m(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,i){this.amount=d(e.amount,t.amount,i),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||s();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const i=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const i=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(i,i)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,i=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(i,i)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const i=1-2*t,n=(0,a.hZ)(e,i,0,0,t,0,i,0,t,0,0,i,t,0,0,0,1);return(0,a.mg)(n,n)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const i=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,i=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(i,i)})(e)}}}class h{constructor(e,t,i,n){this.offsetX=e,this.offsetY=t,this.blurRadius=i,this.color=n,this.type="drop-shadow"}interpolate(e,t,i){this.offsetX=d(e.offsetX,t.offsetX,i),this.offsetY=d(e.offsetY,t.offsetY,i),this.blurRadius=d(e.blurRadius,t.blurRadius,i),this.color[0]=Math.round(d(e.color[0],t.color[0],i)),this.color[1]=Math.round(d(e.color[1],t.color[1],i)),this.color[2]=Math.round(d(e.color[2],t.color[2],i)),this.color[3]=d(e.color[3],t.color[3],i)}clone(){return new h(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:m(this.offsetX),yoffset:m(this.offsetY),blurRadius:m(this.blurRadius),color:e}}}class p{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,i){this.angle=d(e.angle,t.angle,i),this._updateMatrix()}clone(){return new p(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||s();this._colorMatrix=((e,t)=>{const i=Math.sin(t*Math.PI/180),n=Math.cos(t*Math.PI/180),r=(0,a.hZ)(e,.213+.787*n-.213*i,.715-.715*n-.715*i,.072-.072*n+.928*i,0,.213-.213*n+.143*i,.715+.285*n+.14*i,.072-.072*n-.283*i,0,.213-.213*n-.787*i,.715-.715*n+.715*i,.072+.928*n+.072*i,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.angle)}}class f{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,i){this.amount=d(e.amount,t.amount,i)}clone(){return new f(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function d(e,t,i){return e+(t-e)*i}function m(e){return Math.round(1e3*(0,r.PN)(e))/1e3}function y(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new f(1);case"hue-rotate":return new p(0);case"blur":return new u(0);case"drop-shadow":return new h(0,0,0,[...(0,n.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},70328:(e,t,i)=>{i.d(t,{BI:()=>_,Ej:()=>p,Ie:()=>y,Jt:()=>g,Ne:()=>f,RF:()=>c,aI:()=>M,fA:()=>o,gE:()=>l,hZ:()=>m,iT:()=>h,is:()=>b,qv:()=>x,vI:()=>d,vY:()=>a,v_:()=>T,vt:()=>s,w1:()=>u});var n=i(5443),r=(i(19419),i(4197));function s(e=T){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,i,n,r,o,a=s()){return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=r,a[5]=o,a}function a(e,t=s()){return function(e,t,i,n=s()){return m(n,x),function(e,t,i=0,n=t.length/3){let r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)r=Math.min(r,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),o=Math.min(o,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=r,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(n,e,t,i),n}(e,0,e.length/3,t)}function l(e,t=(0,r.jh)(24)){const[i,n,s,o,a,l]=e;return t[0]=i,t[1]=n,t[2]=s,t[3]=i,t[4]=n,t[5]=l,t[6]=i,t[7]=a,t[8]=s,t[9]=i,t[10]=a,t[11]=l,t[12]=o,t[13]=n,t[14]=s,t[15]=o,t[16]=n,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new n.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function f(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function d(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?m(e,x):s(x)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function _(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function M(e,t,i){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const x=[1/0,1/0,1/0,-1/0,-1/0,-1/0],T=[0,0,0,0,0,0];s()},92935:(e,t,i)=>{var n;i.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))},95466:(e,t,i)=>{i.d(t,{A:()=>f});var n=i(49186),r=i(53966),s=i(91869),o=i(3330),a=i(12195),l=i(30524),u=i(98623),c=i(56400),h=i(96285);const p=new Map;class f{static fromJSON(e){return new f(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new f(e.fields??[],g(e))}static fromLayerJSON(e){return new f(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,n=m(t);if(t&&n){const r=d(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(n,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(d(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(r.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?h.mQ.utcInstance:(0,s.tE)(p,t,(()=>h.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,a.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function d(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:r}=e,s=(n?"startField"in n?n.startField:n.startTimeField:"")??"",o=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.dateFieldsTimeReference?(0,c.ZS)(r.dateFieldsTimeReference):a??u.n$:null,h=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,c.ZS)(n.timeReference):a:null,p=new Map([[d(r?.creationDateField??""),l],[d(r?.editDateField??""),l],[d(s),h],[d(o),h]]);for(const{name:n,type:r}of e.fields)if(y.has(r))t.set(n,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(n,null);else if(i)t.set(n,u.L5);else{const e=p.get(d(n??""))??a;t.set(n,e)}return t}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7136,9945],{4197:(e,t,r)=>{r.d(t,{jh:()=>n,l5:()=>s,xm:()=>o});var i=r(34275);function n(e,t=!1){return e<=i.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function o(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function s(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},17136:(e,t,r)=>{r.d(t,{O7:()=>S,el:()=>w});var i=r(92602),n=r(49186),o=r(53966),s=r(39829),a=r(82799),l=r(80754),u=r(21325),p=r(28735),c=r(78888),y=r(65864),h=r(2272),f=r(84952),d=r(92300);const m=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function _(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(e),new n.A("internal:geometry",e)}const r=(0,l.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],o=e[i][1],s=e[i+1][0],a=e[i+1][1],l=Math.sqrt((s-n)*(s-n)+(a-o)*(a-o)),u=(a-o)/l,p=(s-n)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,s=p*i+n,a=u*i+o;r.push([s,a])}const e=(l+Math.floor(c-1)*t)/2,i=p*e+n,s=u*e+o;r.push([i,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function M(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,l.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,l.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,l.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,l.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function x(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],o=t.geometries[i],s=(0,l.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(i,0))}return!0}}))}if(n===r){if(g(e))for(const t of(0,l.r8)(o))e[n]=e[n].addRing(t);else if(b(e))for(const t of(0,l.r8)(o))e[n]=e[n].addPath(t)}else r=n,e[n]=o}return e}async function w(e,t,r){if(!Array.isArray(e))return w([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let o,g,b,S,v,T,F,N,A=0;const O=[],I=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,g=(0,u.Vp)(o),b=o.isWebMercator,T=b?102100:4326,S=l.j7[T].maxX,v=l.j7[T].minX,F=l.j7[T].plus180Line,N=l.j7[T].minus180Line),g)if("mesh"===t.type)I.push(t);else if("point"===t.type)I.push(M(t.clone(),S,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>M(e,S,v))),I.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);I.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,v)*(2*S);let i=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:o}=e;n=Number(n.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(F)&&o!==S?(A=o>A?o:A,i=_(i,b),O.push(i),I.push("cut")):e.intersects(N)&&n!==v?(A=o*(2*S)>A?o*(2*S):A,i=_(i,b,360),O.push(i),I.push("cut")):I.push(i)}else I.push(t.clone());else I.push(t);else I.push(t);let Z=(0,l.kd)(A,S),L=-90;const R=Z,j=new a.A;for(;Z>0;){const e=360*Z-180;j.addPath([[e,L],[e,-1*L]]),L*=-1,Z--}if(O.length>0&&R>0){const t=x(O,await async function(e,t,r,i){const n=(0,h.Dl)(e),o=t[0].spatialReference,s={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(o),target:JSON.stringify({geometryType:(0,y.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,c.A)(n.path+"/cut",s),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,y.rS)(e);return t.spatialReference=o,t}))}}(n,O,j,r)),i=[],o=[];for(let r=0;r<I.length;r++){const n=I[r];if("cut"!==n)o.push(n);else{const n=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&n.rings.length>=s.rings.length?(i.push(n),o.push("simplify")):o.push(b?(0,p.Gh)(n):n)}}if(!i.length)return o;const s=await async function(e,t,r){const i="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,o=(0,y.$B)(t[0]),s={...r,query:{...i.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,d.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",s);return(0,d.V)(a.geometries,o,n)}(n,i,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(b?(0,p.Gh)(s.shift()):s.shift())}return a}const J=[];for(let e=0;e<I.length;e++){const t=I[e];if("cut"!==t)J.push(t);else{const e=O.shift();J.push(!0===b?(0,p.Gh)(e):e)}}return J}function S(e,t,r){const i=(0,u.Vp)(r);if(null==i)return e;const[n,o]=i.valid,s=2*o;let a=0,l=0;t>o?a=Math.ceil(Math.abs(t-o)/s):t<n&&(a=-Math.ceil(Math.abs(t-n)/s)),e>o?l=Math.ceil(Math.abs(e-o)/s):e<n&&(l=-Math.ceil(Math.abs(e-n)/s));let p=e+(a-l)*s;const c=p-t;return c>o?p-=s:c<n&&(p+=s),p}},17311:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69622),o=r(4576),s=r(60999),a=r(5503),l=r(10107),u=(r(44208),r(53966),r(40608)),p=r(30524),c=r(43668);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,s.UT)((()=>(0,c.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new a.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 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){return(await this.getTitles(e,[t],r)).get(t)??""}async getTitles(e,t,r){const i=new Map,n=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:s,workingTitle:a}=this,l=a&&s;t.forEach((t=>{const r=l?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:s,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:a}):"";i.set(t,r)}))}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map((t=>t.getObjectId()??t.attributes[e.objectIdField])).filter(o.Ru);if(r.length!==t.length)return t;if(t.some((e=>!(0,p.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 o={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,p.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,i._)([(0,l.MZ)({readOnly:!0})],y.prototype,"_arcadeTask",null),(0,i._)([(0,l.MZ)()],y.prototype,"_featureUtils",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],y.prototype,"featureUtilsPromise",null),(0,i._)([(0,l.MZ)({readOnly:!0})],y.prototype,"calculatedExpressions",null),(0,i._)([(0,l.MZ)()],y.prototype,"displayField",void 0),(0,i._)([(0,l.MZ)()],y.prototype,"effectivePopupTemplate",void 0),(0,i._)([(0,l.MZ)()],y.prototype,"expressionsUsedInTitle",null),(0,i._)([(0,l.MZ)()],y.prototype,"fieldsIndex",void 0),(0,i._)([(0,l.MZ)()],y.prototype,"fieldInfoMap",null),(0,i._)([(0,l.MZ)()],y.prototype,"fields",void 0),(0,i._)([(0,l.MZ)()],y.prototype,"objectIdField",void 0),(0,i._)([(0,l.MZ)()],y.prototype,"requiredFields",null),y=(0,i._)([(0,u.$)("esri.layers.support.TitleCreator")],y)},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,n=r(90237),o=r(52106),s=r(66552),a=r(25482),l=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),y=r(43937),h=r(16930),f=r(65864),d=r(50498),m=r(20437);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends a.A{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,o.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,f.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,l.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,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.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:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),a,l);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 o=e[t],s=r.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=i);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(s)}return n}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(a[0]),n=r(a[1]),o.push([i,n])}return o.length>0?o: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,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,f.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 o=(0,f.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[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=o.length;e<t;e++){const t=o[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=o.length;e<t;e++){const t=o[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 o=e.points;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,u.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],b.prototype,"features",void 0),(0,n._)([(0,p.w)("features")],b.prototype,"readFeatures",null),(0,n._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,n._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,n._)([(0,y.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,n._)([(0,u.MZ)({types:d.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,n._)([(0,p.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,n._)([(0,u.MZ)({type:h.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,n._)([(0,y.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,n._)([(0,u.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,n._)([(0,c.$)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},27865:(e,t,r)=>{r.d(t,{O9:()=>o,dw:()=>s,mj:()=>n});var i=r(59247);function n(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===r[t].type))}function o(e,t){const r=e.length>t.length?e:t,n=e.length>t.length?t:e;for(let e=n.length;e<r.length;e++)n.push((0,i.sK)(r[e]))}function s(e){const t=e[0];return!!t&&"type"in t}},33032:(e,t,r)=>{r.d(t,{H:()=>n,L:()=>i});const i=1;function n(e,t){let r=0;for(const i of t){const t=i.attributes?.[e];"number"==typeof t&&isFinite(t)&&(r=Math.max(r,t))}return r}},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(80451),c=r(29005);let y=class extends(n.A.ClonableMixin(o.A)){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,p.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._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,s.MZ)({type:[c.A],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],y)},41366:(e,t,r)=>{r.d(t,{K:()=>y,Q:()=>u});var i=r(90237),n=r(66552),o=r(53966),s=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",c="field",y=e=>{let t=class extends e{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&&c||r&&p||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==p||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},50498:(e,t,r)=>{r.d(t,{Ye:()=>c,gy:()=>p,yR:()=>y});var i=r(66552),n=r(5443),o=r(91075),s=r(48526),a=r(86738),l=r(39829),u=r(82799);const p=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),y={base:o.A,key:"type",typeMap:{extent:n.A,multipoint:s.A,point:a.A,polyline:u.A,polygon:l.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>M});var i,n=r(90237),o=r(13874),s=r(69540),a=r(51447),l=r(25482),u=r(53966),p=r(36708),c=r(24326),y=r(10107),h=(r(44208),r(87811),r(40608)),f=r(12195),d=r(65864),m=r(50498),g=r(54339),b=r(33910);function _(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 M=class extends(s.A.ClonableMixin(l.A)){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,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.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=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.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=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:_(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,f.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,p.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,p.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._)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,d.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,n._)([(0,y.MZ)({value:null})],M.prototype,"attributes",null),(0,n._)([(0,y.MZ)({value:null,types:m.yR,json:{read:d.rS}})],M.prototype,"geometry",null),(0,n._)([(0,y.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,n._)([(0,y.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,n._)([(0,y.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,n._)([(0,y.MZ)({type:o.A,value:null})],M.prototype,"popupTemplate",null),(0,n._)([(0,y.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,n._)([(0,y.MZ)({value:null,types:b.Es})],M.prototype,"symbol",null),(0,n._)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,n._)([(0,y.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=i=(0,n._)([(0,h.$)("esri.Graphic")],M)},54339:(e,t,r)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>n})},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(null!=n)for(const e of r.features)n(e.geometry)}},59247:(e,t,r)=>{r.d(t,{bv:()=>l,Fk:()=>u,yG:()=>p,$b:()=>c,Nd:()=>y,jm:()=>h,sK:()=>m});var i=r(40876),n=r(90629);function o(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const s=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:o,fromValues:function(e,t,r,i,n,o,s,a,l,u,p,c,y,h,f,d){const m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=r,m[3]=i,m[4]=n,m[5]=o,m[6]=s,m[7]=a,m[8]=l,m[9]=u,m[10]=p,m[11]=c,m[12]=y,m[13]=h,m[14]=f,m[15]=d,m}},Symbol.toStringTag,{value:"Module"}));var a=r(58083);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=f(e.strength,t.strength,r),this.radius=f(e.radius,t.radius,r),this.threshold=f(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:d(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(f(e.radius,t.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:d(this.radius)}}}class p{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=f(e.amount,t.amount,r),this._updateMatrix()}clone(){return new p(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,i=(0,a.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,a.mg)(i,i)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e)}}}class c{constructor(e,t,r,i){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=i,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=f(e.offsetX,t.offsetX,r),this.offsetY=f(e.offsetY,t.offsetY,r),this.blurRadius=f(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(f(e.color[0],t.color[0],r)),this.color[1]=Math.round(f(e.color[1],t.color[1],r)),this.color[2]=Math.round(f(e.color[2],t.color[2],r)),this.color[3]=f(e.color[3],t.color[3],r)}clone(){return new c(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:d(this.offsetX),yoffset:d(this.offsetY),blurRadius:d(this.blurRadius),color:e}}}class y{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=f(e.angle,t.angle,r),this._updateMatrix()}clone(){return new y(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||o();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),i=Math.cos(t*Math.PI/180),n=(0,a.hZ)(e,.213+.787*i-.213*r,.715-.715*i-.715*r,.072-.072*i+.928*r,0,.213-.213*i+.143*r,.715+.285*i+.14*r,.072-.072*i-.283*r,0,.213-.213*i-.787*r,.715-.715*i+.715*r,.072+.928*i+.072*r,0,0,0,0,1);return(0,a.mg)(n,n)})(e,this.angle)}}class h{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=f(e.amount,t.amount,r)}clone(){return new h(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function f(e,t,r){return e+(t-e)*r}function d(e){return Math.round(1e3*(0,n.PN)(e))/1e3}function m(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new p(e.type,0);case"saturate":case"brightness":case"contrast":return new p(e.type,1);case"opacity":return new h(1);case"hue-rotate":return new y(0);case"blur":return new u(0);case"drop-shadow":return new c(0,0,0,[...(0,i.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},61760:(e,t,r)=>{r.d(t,{PU:()=>s,YW:()=>l,ex:()=>n,hv:()=>a,zp:()=>o}),r(34727);var i=r(90629);r(87317),r(91829);const n=2.4;function o(e){return(0,i.PN)(e*n)}function s(e){return(0,i.Lz)(e)/n}function a(e,t,r){const i=Math.sqrt(e**2+t**2)/r;return i>1?0:3/(Math.PI*r**2)*(1-i**2)**2}function l(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},70328:(e,t,r)=>{r.d(t,{BI:()=>b,Ej:()=>y,Ie:()=>m,Jt:()=>g,Ne:()=>h,RF:()=>p,aI:()=>M,fA:()=>s,gE:()=>l,hZ:()=>d,iT:()=>c,is:()=>_,qv:()=>x,vI:()=>f,vY:()=>a,v_:()=>w,vt:()=>o,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function o(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,n,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=s,a}function a(e,t=o()){return function(e,t,r,i=o()){return d(i,x),function(e,t,r=0,i=t.length/3){let n=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[r,i,o,s,a,l]=e;return t[0]=r,t[1]=i,t[2]=o,t[3]=r,t[4]=i,t[5]=l,t[6]=r,t[7]=a,t[8]=o,t[9]=r,t[10]=a,t[11]=l,t[12]=s,t[13]=i,t[14]=o,t[15]=s,t[16]=i,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function y(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function f(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?d(e,x):o(x)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function M(e,t,r){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const x=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];o()},80754:(e,t,r)=>{r.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>u});var i=r(82799),n=r(16930),o=r(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}},92300:(e,t,r)=>{r.d(t,{V:()=>o,X:()=>n});var i=r(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function o(e,t,r){const n=(0,i.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))},95466:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(49186),n=r(53966),o=r(91869),s=r(3330),a=r(12195),l=r(30524),u=r(98623),p=r(56400),c=r(96285);const y=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],g(e))}static fromLayerJSON(e){return new h(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=d(t);if(t&&i){const n=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(f(e))??this._normalizedFieldsMap.get(d(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?s.GB.instance:t===u.n$?c.mQ.utcInstance:(0,o.tE)(y,t,(()=>c.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,a.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function d(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,p.ZS)(n.dateFieldsTimeReference):a??u.n$:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,p.ZS)(i.timeReference):a:null,y=new Map([[f(n?.creationDateField??""),l],[f(n?.editDateField??""),l],[f(o),c],[f(s),c]]);for(const{name:i,type:n}of e.fields)if(m.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=y.get(f(i??""))??a;t.set(i,e)}return t}},96953:(e,t,r)=>{r.r(t),r.d(t,{default:()=>q});var i=r(90237),n=r(52106),o=r(5503),s=r(49186),a=r(4718),l=r(92071),u=r(93637),p=r(67076),c=r(10107),y=(r(44208),r(53966),r(36005)),h=r(40608),f=r(43937),d=r(5443),m=r(98988),g=r(16930),b=r(19419),_=r(17136),M=r(21325),x=r(13600),w=r(94194),S=r(4146),v=r(33032),T=r(63074),F=r(16131),N=r(8303),A=r(25036),O=r(20437),I=r(94985),Z=r(31593),L=r(53930),R=r(68249);function j(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!J(e)))}function J({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return C.find((t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function P(){return new d.A({xmin:-180,ymin:-90,xmax:180,ymax:90})}const z=new O.A({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),G=new O.A({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let k=class extends w.A{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?(0,m.projectOrLoad)(P(),e).geometry:(0,b.w1)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,b.Ie)();return this.graphics.forEach((r=>{const i=null!=r.geometry?(0,m.projectOrLoad)(r.geometry,e).geometry:null;null!=i&&(0,b.fT)(t,"point"===i.type?i:i.extent,t)})),(0,b.aI)(t,b.qv)?null:t}get sublayers(){return this.graphics}};(0,i._)([(0,c.MZ)({readOnly:!0})],k.prototype,"fullExtent",null),(0,i._)([(0,c.MZ)({readOnly:!0})],k.prototype,"fullBounds",null),(0,i._)([(0,c.MZ)({readOnly:!0})],k.prototype,"sublayers",null),(0,i._)([(0,c.MZ)()],k.prototype,"layer",void 0),(0,i._)([(0,c.MZ)()],k.prototype,"layerId",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],k.prototype,"visibilityMode",void 0),k=(0,i._)([(0,h.$)("esri.layers.MapNotesLayer.MapNotesSublayer")],k);const C=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new I.A).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new Z.A).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new L.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new L.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new R.A).toJSON()}];let E=class extends((0,T.dM)((0,A.j)((0,F.q)((0,N.A)((0,l.P)(S.A)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=g.A.WGS84,this.sublayers=new o.A(C.map((e=>new k({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,r){return{operations:{supportsMapNotesEditing:!j(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,r){if(!j(t))return null;const i=t.layers.map((e=>{const t=new x.default;return t.read(e,r),t}));return new o.A({items:i})}readLegacyfeatureCollectionJSON(e,t){return j(t)?(0,a.o8)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,b.Ie)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,b.fT)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((r=>{const i=(0,m.projectOrLoad)(r.layerDefinition.extent,e).geometry;null!=i&&(0,b.fT)(t,i,t)})),(0,b.aI)(t,b.qv)?(0,m.projectOrLoad)(P(),e).geometry:(0,b.w1)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?g.A.fromJSON(t.layers[0].layerDefinition.spatialReference):g.A.WGS84}readSublayers(e,t,r){if(j(t))return null;const i=[];let s=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:r}=e,o=t.id??s++,a=J(e);if(null!=a){const e=new k({id:a.id,title:t.name,layerId:o,layer:this,graphics:r.features.map((({geometry:e,symbol:t,attributes:r,popupInfo:i})=>n.A.fromJSON({attributes:r,geometry:e,symbol:t,popupTemplate:i})))});i.push(e)}}return new o.A(i)}writeSublayers(e,t,r,i){const{minScale:n,maxScale:o}=this;if(null==e)return;const a=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(a&&i?.messages?.push(new s.A("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const l=[];let p=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if(null!=e.geometry){p=e.geometry.spatialReference.toJSON();break e}for(const t of C){const r=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(l,r,t,n,o,p,i)}(0,u.sM)("featureCollection.layers",l,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,a.o8)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const r of this.sublayers)for(const i of r.graphics)if(null!=i.geometry){const r=i.geometry;e?(0,M.aI)(r.spatialReference,e)||((0,m.canProjectWithoutEngine)(r.spatialReference,e)||(0,m.isLoaded)()||await(0,m.load)(),i.geometry=(0,m.project)(r,e)):e=r.spatialReference,t.push(i)}const r=await(0,_.el)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=r[t]))}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,r,i,n,o,s){const l=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(l,e,r.geometryType,s);this._normalizeObjectIds(l,z),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,a.o8)(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:i,maxScale:n,objectIdField:"OBJECTID",fields:[z.toJSON(),G.toJSON()],spatialReference:o},featureSet:{features:l,geometryType:r.geometryTypeJSON}})}}_writeMapNote(e,t,r,i){if(null==t)return;const{geometry:n,symbol:o,popupTemplate:s}=t;if(null==n)return;if(n.type!==r)return void i?.messages?.push(new p.A("map-notes-layer:invalid-geometry-type",`Geometry "${n.type}" cannot be saved in "${r}" layer`,{graphic:t}));if(null==o)return void i?.messages?.push(new p.A("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const a={attributes:{...t.attributes},geometry:n.toJSON(),symbol:o.toJSON()};null!=s&&(a.popupInfo=s.toJSON()),e.push(a)}_normalizeObjectIds(e,t){const r=t.name;let i=(0,v.H)(r,e)+1;const n=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[r]||n.has(e[r]))&&(e[r]=i++),n.add(e[r])}}};(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"capabilities",void 0),(0,i._)([(0,y.w)(["portal-item","web-map"],"capabilities",["layers"])],E.prototype,"readCapabilities",null),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"featureCollections",void 0),(0,i._)([(0,y.w)(["web-map","portal-item"],"featureCollections",["layers"])],E.prototype,"readFeatureCollections",null),(0,i._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],E.prototype,"featureCollectionJSON",void 0),(0,i._)([(0,y.w)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],E.prototype,"readLegacyfeatureCollectionJSON",null),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],E.prototype,"featureCollectionType",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"fullExtent",null),(0,i._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],E.prototype,"legendEnabled",void 0),(0,i._)([(0,c.MZ)({type:["show","hide","hide-children"]})],E.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],E.prototype,"minScale",void 0),(0,i._)([(0,y.w)(["web-map","portal-item"],"minScale",["layers"])],E.prototype,"readMinScale",null),(0,i._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],E.prototype,"maxScale",void 0),(0,i._)([(0,y.w)(["web-map","portal-item"],"maxScale",["layers"])],E.prototype,"readMaxScale",null),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"multipointLayer",null),(0,i._)([(0,c.MZ)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],E.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"pointLayer",null),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"polygonLayer",null),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"polylineLayer",null),(0,i._)([(0,c.MZ)({type:g.A})],E.prototype,"spatialReference",void 0),(0,i._)([(0,y.w)(["web-map","portal-item"],"spatialReference",["layers"])],E.prototype,"readSpatialReference",null),(0,i._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],E.prototype,"sublayers",void 0),(0,i._)([(0,y.w)("web-map","sublayers",["layers"])],E.prototype,"readSublayers",null),(0,i._)([(0,f.K)("web-map","sublayers")],E.prototype,"writeSublayers",null),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"textLayer",null),(0,i._)([(0,c.MZ)()],E.prototype,"title",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],E.prototype,"type",void 0),E=(0,i._)([(0,h.$)("esri.layers.MapNotesLayer")],E);const q=E}}]);
|