@arcgis/core 4.34.0-next.52 → 4.34.0-next.54
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/applications/Components/formatUtils.d.ts +3 -0
- package/applications/Components/formatUtils.js +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{35fc8a64674005b1d1d7.js → 0a4357af5b8c0532b439.js} +1 -1
- package/assets/esri/core/workers/chunks/{e58336aafe8c95bb6831.js → 0eb728cee6e40cb30c01.js} +1 -1
- package/assets/esri/core/workers/chunks/{b87ed14fde381f79bc9f.js → 17776d9d3558d45ea7b5.js} +1 -1
- package/assets/esri/core/workers/chunks/23f54b49742098def8ae.js +1 -0
- package/assets/esri/core/workers/chunks/2efa4d8fe5454f8b2a05.js +1 -0
- package/assets/esri/core/workers/chunks/{a69e885336eb5d2729fd.js → 3505988ce3839cdbbc98.js} +1 -1
- package/assets/esri/core/workers/chunks/{46ab551bd19e52e73649.js → 3800764932a1c32cb29f.js} +1 -1
- package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +1 -0
- package/assets/esri/core/workers/chunks/435169b455fd2846799b.js +1 -0
- package/assets/esri/core/workers/chunks/{77493aa2118d462612a0.js → 43bd338bb0de375b9bb7.js} +1 -1
- package/assets/esri/core/workers/chunks/{5a016dcd3192d42d363e.js → 5fc414fc2cfc68828c5b.js} +1 -1
- package/assets/esri/core/workers/chunks/{ecd673eccf89643df07a.js → 659f7e99b2d524ef53fb.js} +2 -2
- package/assets/esri/core/workers/chunks/69e6000044bfb03776ac.js +1 -0
- package/assets/esri/core/workers/chunks/{037bc400257bc13b3ec8.js → 772e81e9162e2240a7a6.js} +1 -1
- package/assets/esri/core/workers/chunks/813efde41e90e652b7db.js +1 -0
- package/assets/esri/core/workers/chunks/82404ff7c298493ff6f4.js +1 -0
- package/assets/esri/core/workers/chunks/{f1de768b0a6d345f7e39.js → 8f6ff09e7d2f01b79faf.js} +1 -1
- package/assets/esri/core/workers/chunks/9639a6f6fab52a501bf7.js +1 -0
- package/assets/esri/core/workers/chunks/{cfa8b17cf1349f6ed355.js → 9e9be7f6ea32957f1088.js} +1 -1
- package/assets/esri/core/workers/chunks/9fef330b241f958b55df.js +1 -0
- package/assets/esri/core/workers/chunks/aab349d4624b78ef429f.js +1 -0
- package/assets/esri/core/workers/chunks/b9f5672093727c6f92c9.js +1 -0
- package/assets/esri/core/workers/chunks/bcc233a86e01ff1eac16.js +1 -0
- package/assets/esri/core/workers/chunks/cac060a187f3a27a19ba.js +1 -0
- package/assets/esri/core/workers/chunks/cda27c0fafd687dfa72e.js +1 -0
- package/assets/esri/core/workers/chunks/{82a390be9500b629f6bc.js → d0bf1fc6e3c198bc565d.js} +1 -1
- package/assets/esri/core/workers/chunks/dd120d562b63618e71c0.js +1 -0
- package/assets/esri/core/workers/chunks/dd2b5f115d156b5b212e.js +1 -0
- package/assets/esri/core/workers/chunks/e28d3ed65c3a76a044c8.js +1 -0
- package/assets/esri/core/workers/chunks/{fb4950995f6780f6c22a.js → ee0286b5f5475f2d853f.js} +1 -1
- package/assets/esri/core/workers/chunks/{c5b2a261d8c216ca4a10.js → f8505bf69795f5293a79.js} +1 -1
- package/assets/esri/core/workers/chunks/fae6030a81cb91a91b69.js +1 -0
- package/assets/esri/core/workers/chunks/ff7962063d132c1ec814.js +1 -0
- package/assets/esri/themes/base/widgets/_FloorFilter.scss +23 -19
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/config.js +1 -1
- package/geometry/operators/json/graphicBufferOperator.js +5 -0
- package/geometry/support/coordinateSystem.js +1 -1
- package/interfaces.d.ts +93 -185
- package/kernel.js +1 -1
- package/layers/KMLLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/sources/WFSSourceWorker.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/ExportImageParameters.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/typeUtils.js +1 -1
- package/package.json +3 -3
- package/portal/Portal.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/renderers/support/utils.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/networks/support/Circuit.js +5 -0
- package/rest/networks/support/CircuitSection.js +1 -1
- package/rest/networks/support/Subcircuit.js +1 -1
- package/rest/print.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/views/2d/analysisViewModuleImportUtils.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/input/MapViewInputManager.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/ElevationProfile/HoveredPointsVisualization.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/Viewshed/FieldOfViewManipulation.js +1 -1
- package/views/3d/analysisViewModuleImportUtils.js +5 -0
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/Draw.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/LegacyDrawManipulator.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/input/handlers/LatestPointer.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
- package/views/interactive/Tooltip.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/layers/support/popupUtils.js +1 -1
- package/views/support/AnalysisViewManager.js +5 -0
- package/views/support/PromiseQueue.js +5 -0
- package/views/support/Scheduler.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
- package/widgets/FloorFilter/css.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/HistogramRangeSlider.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/ItemList.js +1 -1
- package/assets/esri/core/workers/chunks/0874b88d5ae7c2b78b3b.js +0 -1
- package/assets/esri/core/workers/chunks/0c129b78e5cfe96795e1.js +0 -1
- package/assets/esri/core/workers/chunks/1a3a4c2c642899be37a0.js +0 -1
- package/assets/esri/core/workers/chunks/2b75212c31145cc07d16.js +0 -1
- package/assets/esri/core/workers/chunks/37a97e690786814bf0b3.js +0 -1
- package/assets/esri/core/workers/chunks/48e64f99720907017778.js +0 -1
- package/assets/esri/core/workers/chunks/4c6862ad3af947c704f7.js +0 -1
- package/assets/esri/core/workers/chunks/4d544e3e19ce07c2c195.js +0 -1
- package/assets/esri/core/workers/chunks/781b59ba0cabe78bc122.js +0 -1
- package/assets/esri/core/workers/chunks/8c1bd9bcfc59497de3b5.js +0 -1
- package/assets/esri/core/workers/chunks/8cc700da2ac58849a708.js +0 -1
- package/assets/esri/core/workers/chunks/9b7fee0adffeee8d45ae.js +0 -1
- package/assets/esri/core/workers/chunks/9d30fed26e0d84ef893b.js +0 -1
- package/assets/esri/core/workers/chunks/b29f0b32787edb4e75cf.js +0 -1
- package/assets/esri/core/workers/chunks/b877142a275188a16e17.js +0 -1
- package/assets/esri/core/workers/chunks/c87bb42f825c39f9cce3.js +0 -1
- package/assets/esri/core/workers/chunks/cc0cb4906e4419f7c4a9.js +0 -1
- package/assets/esri/core/workers/chunks/f667096ea325f690c4a6.js +0 -1
- package/assets/esri/core/workers/chunks/f9f94b5efa9a64cdb407.js +0 -1
- package/layers/graphics/data/executeQueryForSnapping.js +0 -5
- package/layers/support/PromiseQueue.js +0 -5
- package/views/3d/analysis/AnalysisViewManager3D.js +0 -5
- /package/assets/esri/core/workers/chunks/{ecd673eccf89643df07a.js.LICENSE.txt → 659f7e99b2d524ef53fb.js.LICENSE.txt} +0 -0
|
@@ -350,4 +350,4 @@ gl_Position = posProjCenter;
|
|
|
350
350
|
gl_PointSize = 1.0;`),o.main.add(s.H`fragColor = vec4(1);
|
|
351
351
|
if(discardByTerrainDepth()) {
|
|
352
352
|
fragColor.g = 0.5;
|
|
353
|
-
}`)}},65215:(e,t,n)=>{n.d(t,{H:()=>r,R:()=>i});class r{constructor(e){this.layerViewUid=e}}class i extends r{constructor(e,t){super(e),this.graphicUid=t}}},65494:(e,t,n)=>{n.d(t,{L:()=>l,r:()=>o});var r=n(67076),i=n(90360),s=n(41214);function o(e,t){return l(e,null,t)}const a=(0,i.C)({types:s.Hg});function l(e,t,n){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(n?.messages&&n.messages.push(new r.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:n})),null):a(e,t,n):null}},66208:(e,t,n)=>{n.d(t,{m:()=>i});var r=n(53655);function i(e,t){const n=(0,r.SH)(e,t),i=n.queryResult.featureResult,s=n.queryResult.queryGeometry,o=n.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=o),i}},69418:(e,t,n)=>{n.d(t,{S:()=>c,z:()=>l});var r=n(83047),i=n(21325),s=n(43334),o=n(58512),a=n(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class c{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,r.G9)(this._options.sourceSpatialReference)/(0,r.G9)(e.spatialReference);if(1!==t)for(const n of e.features){if(!(0,s.N3)(n))continue;const e=n.geometry.coords;for(let n=2;n<e.length;n+=3)e[n]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce((e,t)=>e+t,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.A}}},72385:(e,t,n)=>{function r(){return new Float32Array(3)}function i(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,n){const r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=n,r}function o(){return r()}function a(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function u(){return s(0,0,1)}n.d(t,{fA:()=>s,o8:()=>i,vt:()=>r});const d=o(),h=a(),f=l(),p=c(),m=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:i,create:r,fromValues:s,ones:a,unitX:l,unitY:c,unitZ:u,zeros:o},Symbol.toStringTag,{value:"Module"}))},73681:(e,t,n)=>{n.d(t,{n:()=>l});var r=n(49186),i=n(53966),s=n(46140),o=n(95466),a=n(55674);class l{static async from(e,t,n){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(n))h.delete(e);h.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const f=await(0,a.xR)(e.expression,null,d);if(!f)throw new r.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const p=!o||!o.greaterEqual(4,0);p&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new c(n,p);return new l(p,u,f,m)}constructor(e,t,n,r){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=n,this._reader=r}get itemNames(){return this._itemNames}evaluate(e,t,n,r){try{return this._reader.bind(e,n,r),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class c extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},75503:(e,t,n)=>{n.d(t,{EC:()=>A,wq:()=>a});var r=n(4576),i=n(21818),s=(n(44208),n(15142)),o=n(11006);class a{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),x.prune(),C.prune(),S.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(b(e,n))for(w.clear();n;){for(let i=0,s=n.children.length;i<s;i++){const s=n.children[i],o=n.leaf?r(s):s;b(e,o)&&(n.leaf?t(s):_(e,o)?l(s,t):w.push(s))}n=w.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!b(e,t))return!1;for(w.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],s=t.leaf?n(i):i;if(b(e,s)){if(t.leaf||_(e,s))return!0;w.push(i)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),S.clear();n||C.length>0;){if(n||(n=C.pop(),s=C.data[C.length-1],o=S.pop()??0,a=!0),n.leaf&&(t=(0,r.qh)(n.children,(0,i.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),C.push(n),this._condense(C),this;a||n.leaf||!_(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(C.push(n),S.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){const i=n-t+1;let s=this._maxEntries;if(i<=s){const r=new T(e.slice(t,n+1));return c(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(s)),s=Math.ceil(i/s**(r-1)));const o=new P([]);o.height=r;const a=Math.ceil(i/s),l=a*Math.ceil(Math.sqrt(s));v(e,t,n,l,this._compareMinX);for(let i=t;i<=n;i+=l){const t=Math.min(i+l-1,n);v(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){const i=Math.min(n+a-1,t);o.children.push(this._build(e,n,i,r-1))}}return c(o,this._toBBox),o}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);C.clear();const s=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=p(o),l=g(e,o)-a;l<i?(i=l,r=a<r?a:r,n=o):l===i&&a<r&&(r=a,n=o)}t=n||t.children[0]}return t}(i,this._data,t,C);for(s.children.push(e),d(s,i);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)d(t.data[r],e)}(i,C,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const s=this._chooseSplitIndex(n,i,r);if(!s)return;const o=n.children.splice(s,n.children.length-s),a=n.leaf?new T(o):new P(o);a.height=n.height,c(n,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,s;r=i=1/0;for(let o=t;o<=n-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,n,this._toBBox),l=y(t,a),c=p(t)+p(a);l<r?(r=l,s=o,i=c<i?c:i):l===r&&c<i&&(i=c,s=o)}return s}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,s=u(e,0,t,i),o=u(e,n-t,n,i);let a=m(s)+m(o);for(let r=t;r<n-t;r++){const t=e.children[r];d(s,e.leaf?i(t):t),a+=m(s)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];d(o,e.leaf?i(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],s=i.children;s.splice((0,r.qh)(s,n,s.length,i.indexHint),1)}else this.clear();else c(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(x.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,i.zI)(e));else x.pushArray(n.children);n=x.pop()??null}}function c(e,t){u(e,0,e.children.length,t,e)}function u(e,t,n,r,i){i||(i=new T([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],d(i,e.leaf?r(s):s);return i}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,s-r)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,n,r,i){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const w=new s.A,x=new s.A,C=new s.A,S=new s.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class T extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(31635),i=n(66552),s=n(25482),o=n(10107),a=(n(44208),n(53966),n(87811),n(93223)),l=n(40608);const c=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends s.o{constructor(e){super(e),this.name=null,this.type=null}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,r.Cg)([(0,a.e)(c),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,r.Cg)([(0,l.$)("esri.layers.support.Domain")],u)},77121:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Kn});var r=n(31635),i=n(65529),s=n(74887),o=n(36708),a=n(10107),l=n(44208),c=(n(53966),n(87811),n(40608)),u=n(5443),d=n(98988),h=n(16930),f=n(95422),p=n(61956),m=n(65494);class g{constructor(e,t,n){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=n}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}static create(e,t=[]){return new g(e,e.createRenderCommandBuffer(),t)}}var y=n(68197),_=n(18574),b=n(87403),v=n(28975);function w(){return new _.A({material:new v.N({color:new y.A("red")})})}var x=n(9093),C=n(51850),S=n(91829),A=n(6847),I=n(83047),T=n(58083),P=n(87317),O=n(70328),R=n(19419);n(12359),n(95108),n(27615),n(52106),n(4718),n(34275),n(65864);var M=n(37585),F=n(48163),j=n(34727),D=n(26857);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const k=[];{const e=16;for(let t=0;t<360;t+=360/e)k.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}Object.freeze({left:0,center:.5,right:1});const z=Object.freeze({"bottom-left":(0,F.fA)(0,0),bottom:(0,F.fA)(.5,0),"bottom-right":(0,F.fA)(1,0),left:(0,F.fA)(0,.5),center:(0,F.fA)(.5,.5),right:(0,F.fA)(1,.5),"top-left":(0,F.fA)(0,1),top:(0,F.fA)(.5,1),"top-right":(0,F.fA)(1,1)});var V=n(9762),E=n(27993);function B(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const n=new Uint32Array(t);return e.getObjectIdsArray(n),n}function U(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const n=new Float64Array(3*t);return e.getCoordinatesArray(n),n}function L(e,t){const n=t.viewSpatialReference,r=t.renderSpatialReference,{extent:i}=e,s=(0,R.gX)(i),o=(0,C.vt)();return(0,E.F)([s[0],s[1],0],n,o,r),o}var G=n(97146);function q(e){const t=new Map;for(const[n,r]of e)t.set(n,{...r,indices:(0,G.Dg)(r.indices)});return t}var H=n(40804);n(48833);const N=(0,S.CN)(.25,.25,.75,.75);function $(e){return"cross"===e||"x"===e}function Z(e,t=128,n=.5*t,r=0){switch(e){case"circle":default:return function(e,t){const n=e/2-.5;return Q(e,J(n,n,t/2))}(t,n);case"square":return function(e,t){return Y(e,t,!1)}(t,n);case"cross":return function(e,t,n=0){return W(e,t,!1,n)}(t,n,r);case"x":return function(e,t,n=0){return W(e,t,!0,n)}(t,n,r);case"kite":return function(e,t){return Y(e,t,!0)}(t,n);case"triangle":return function(e,t){return Q(e,X(e/2,t,t/2))}(t,n);case"arrow":return function(e,t){const n=t,r=t/2,i=e/2,s=.8*n,o=J(i,(e-t)/2-s,Math.sqrt(s*s+r*r)),a=X(i,n,r);return Q(e,(e,t)=>Math.max(a(e,t),-o(e,t)))}(t,n)}}function Y(e,t,n){return n&&(t/=Math.SQRT2),Q(e,(r,i)=>{let s=r-.5*e+.25,o=.5*e-i-.75;if(n){const e=(s+o)/Math.SQRT2;o=(o-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(o))-.5*t})}function W(e,t,n,r=0){t-=r,n&&(t*=Math.SQRT2);const i=.5*t;return Q(e,(t,s)=>{let o,a=t-.5*e,l=.5*e-s-1;if(n){const e=(a+l)/Math.SQRT2;l=(l-a)/Math.SQRT2,a=e}return a=Math.abs(a),l=Math.abs(l),o=a>l?a>i?Math.sqrt((a-i)*(a-i)+l*l):l:l>i?Math.sqrt(a*a+(l-i)*(l-i)):a,o-=r/2,o})}function J(e,t,n){return(r,i)=>{const s=r-e,o=i-t;return Math.sqrt(s*s+o*o)-n}}function X(e,t,n){const r=Math.sqrt(t*t+n*n);return(i,s)=>{const o=Math.abs(i-e)-n,a=s-e+t/2+.75,l=(t*o+n*a)/r,c=-a;return Math.max(l,c)}}function Q(e,t){const n=new Uint8Array(4*e*e);for(let r=0;r<e;r++)for(let i=0;i<e;i++){const s=i+e*r;let o=t(i,r);o=o/e+.5,(0,H.Un)(o,n,4*s)}return n}var K=n(46610);class ee{constructor(e,t){this._context=null,this._symbolLayer=null,this._draped=!1,this._loaded=!1,this._loadingPromise=null,this._iconTextureID=null,this._materialId=null,this._context=t,this._symbolLayer=e}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}_destroy(){this._iconTextureID=null}async _load(){const e=this._context.renderCommandContext,t=await e.createTexture(()=>function(e,t=128,n=.5*t,r=0){return{data:Z(e,t,n,r),parameters:{mipmap:!1,wrap:{s:33071,t:33071},width:t,height:t,components:4,noUnpackFlip:!0,reloadable:!0}}}("circle"));this._iconTextureID=t;const n={anchorPosition:z.center,occlusionTest:!0,hasSlicePlane:!1,color:this._getFillColor(),outlineColor:this._getOutlineColor(),outlineSize:1,distanceFieldBoundingBox:N,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:$("circle")};this._materialId=await e.createMaterial({type:"hud",parameters:n}),await e.createDirectRenderer(this._materialId),this._loaded=!0}async createAddCommand(e){const{_materialId:t,_context:n}=this,{renderCommandContext:r}=n;if(null==t)throw new Error("expected material not to be null");const i=await this._createGeometry(e);if(null==i)return n.createPipelineCommand();const s=L(e,n);return n.createPipelineCommand(r.addDirectRendererGeometry(e.id,i,s))}async _createGeometry(e){const{_materialId:t,_context:n}=this,{mainThreadDelegate:r}=n,{featureCount:i}=e;if(0===i||null==t)return null;const s=B(e),o=U(e),a=function(e,t){const n=e.length/3,r=t.viewSpatialReference,i=t.renderSpatialReference,s=new Float64Array(3*n);if(!(0,V.projectBuffer)(e,r,0,s,i,0,n))throw new Error("Failed to project coordinates");return s}(await r.applyElevationAlignmentTo(o),n),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),u=new Float64Array([24,24]),d=new Float64Array([0,0,0,1]),h=new Float64Array([0,0]),f=new Float64Array([0]),p=new Uint32Array(i);for(let e=0;e<i;++e)p[e]=e;const m=new Uint32Array(i);for(let e=0;e<i;++e)m[e]=0;const g=[["position",new K.n(a,p,3,!0)],["normal",new K.n(l,m,3,!0)],["uv0",new K.n(h,m,2,!0)],["color",new K.n(c,m,4,!0)],["rotation",new K.n(f,m,1,!0)],["size",new K.n(u,m,2,!0)],["centerOffsetAndDistance",new K.n(d,m,4,!0)]],y=new Uint8Array(i);return e.getVisibilityArray(y),{attributes:q(g),olidColor:void 0,transformation:(0,x.vt)(),materialId:t,objectIds:s,visibilities:y}}async createRemoveCommand(e){const{_materialId:t,_context:n}=this,r=n.renderCommandContext;return null==t?n.createPipelineCommand():n.createPipelineCommand(r.removeDirectRendererGeometryBuffer(t,e))}async createUpdateVisibilityCommand(e){const{_materialId:t,_context:n}=this,r=n.renderCommandContext;if(null==t)return n.createPipelineCommand();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.createPipelineCommand(r.updateVisibility(t,e.id,i))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_materialId:n}=this,r=t.renderCommandContext;return null==n?t.createPipelineCommand():t.createPipelineCommand(r.updateMaterial({type:"hud",materialId:n,parameters:{color:this._getFillColor(),outlineColor:this._getOutlineColor()}}))}async createUpdateElevationCommand(e){const{_materialId:t,_context:n}=this,{renderCommandContext:r}=n,{featureCount:i,id:s}=e;if(null==t||0===i)return n.createPipelineCommand();const o=await this._createGeometry(e);if(null==o)return n.createPipelineCommand();const a=L(e,n);return n.createPipelineCommand(r.updateDirectRendererGeometry(s,o,a))}async createDestroyCommand(){const{_iconTextureID:e,_context:t}=this,n=t.renderCommandContext;let r;return r=null!=e?await n.releaseTexture(e):g.create(n),r.appendPipelineStateCommand(()=>this._destroy()),r}_getOutlineColor(){const e=this._getLayerOpacity(),t=this._symbolLayer,n=t?.outline?.color;if(null!=n){const t=y.A.toUnitRGB(n),r=n.a*e;return[t[0],t[1],t[2],r]}return[0,0,0,0]}_getFillColor(){if(function(e){return null!=e&&("cross"===e||"x"===e)}(this._getPrimitive()))return ne;const e=null==this._getPrimitive(),t=this._symbolLayer?.material?.color;return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}_getCombinedOpacity(e,t=te){const n=this._draped?1:this._getLayerOpacity();return e?n*e.a:t.hasIntrinsicColor?n:0}_getCombinedOpacityAndColor(e,t=te){const n=this._getCombinedOpacity(e,t);return function(e,t,n=null){const r=(0,S.o8)(S.Un);return null!=e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],e.length>3&&(r[3]=e[3])),null!=t&&(r[3]=t),n&&(0,P.c)(r,r,n),r}(null!=e?y.A.toUnitRGB(e):C.Un,n)}_getPrimitive(){return e=this._symbolLayer,e.resource?.href?null:e.resource?.primitive??A.r;var e}}const te={hasIntrinsicColor:!1},ne=S.uY;class re{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._context=null,this._symbol=null,this._symbolLayerRenderers=[],this._context=t,this._symbol=e}_destroy(){}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_context:e,_symbol:t,_symbolLayerRenderers:n}=this,r=[];for(const i of t.symbolLayers){const t=e.symbolRendererFactory.createSymbolRendererFromSymbolLayer(i);null!=t&&(r.push(t.load()),n.push(t))}await Promise.all(r),this._loaded=!0}async createDestroyCommand(){const{_context:e,_symbolLayerRenderers:t}=this,n=[];for(const e of t)n.push(e.createDestroyCommand());const r=e.joinPipelineCommands(await Promise.all(n));return r.appendPipelineStateCommand(()=>this._destroy()),r}async createAddCommand(e){const{_context:t,_symbolLayerRenderers:n}=this,r=[];for(const t of n)r.push(t.createAddCommand(e));return t.joinPipelineCommands(await Promise.all(r))}async createRemoveCommand(e){const{_context:t,_symbolLayerRenderers:n}=this,r=[];for(const t of n)r.push(t.createRemoveCommand(e));return t.joinPipelineCommands(await Promise.all(r))}async createUpdateVisibilityCommand(e){const{_context:t,_symbolLayerRenderers:n}=this,r=[];for(const t of n)r.push(t.createUpdateVisibilityCommand(e));return t.joinPipelineCommands(await Promise.all(r))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_symbolLayerRenderers:n}=this,r=[];for(const t of n)r.push(t.createUpdateLayerViewOpacityCommand(e));return t.joinPipelineCommands(await Promise.all(r))}async createUpdateElevationCommand(e){const{_context:t,_symbolLayerRenderers:n}=this,r=[];for(const t of n)r.push(t.createUpdateElevationCommand(e));return t.joinPipelineCommands(await Promise.all(r))}}class ie{constructor(e,t){this._symbol=null,this._featureData=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_renderer:e,_context:t}=this;this._symbol=t.symbolRendererFactory.createSymbolRendererFromSymbol(e.symbol),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,n=await this._provisionSymbol(),r=null==n?t.createPipelineCommand():await n.createAddCommand(e);return r.appendPipelineStateCommand(()=>this._featureData.set(e.id,e)),r}async createRemoveCommand(e){const t=this._context,n=await this._provisionSymbol(),r=null==n?t.createPipelineCommand():await n.createRemoveCommand(e);return r.appendPipelineStateCommand(()=>this._featureData.delete(e)),r}async createUpdateVisibilityCommand(e){const t=this._context,n=await this._provisionSymbol();return null==n?t.createPipelineCommand():await n.createUpdateVisibilityCommand(e)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,n=await this._provisionSymbol();return null==n?t.createPipelineCommand():await n.createUpdateLayerViewOpacityCommand(e)}async createUpdateElevationCommand(){const{_featureData:e,_context:t}=this,n=await this._provisionSymbol();if(null==n)return t.createPipelineCommand();const r=[];for(const t of e.values())r.push(n.createUpdateElevationCommand(t));const i=await Promise.all(r);return t.joinPipelineCommands(i)}async createDestroyCommand(){const{_symbol:e,_context:t,_featureData:n}=this;if(!e)return t.createPipelineCommand();const r=[];for(const e of n.keys())r.push(this.createRemoveCommand(e));r.push(e.createDestroyCommand());const i=await Promise.all(r);return t.joinPipelineCommands(i)}async _provisionSymbol(){const e=this._symbol;return e?(e.loaded||await e.load(),e):null}}var se=n(48353),oe=n(30809),ae=n(8887),le=n(38954),ce=n(72385),ue=(n(4197),n(11868)),de=n(27921),he=(n(71351),n(73941));function fe(e,t){const n=e[t],r=e[t+1],i=e[t+2];return Math.sqrt(n*n+r*r+i*i)}function pe(e,t){const n=e[t],r=e[t+1],i=e[t+2],s=1/Math.sqrt(n*n+r*r+i*i);e[t]*=s,e[t+1]*=s,e[t+2]*=s}function me(e,t,n){e[t]*=n,e[t+1]*=n,e[t+2]*=n}n(37539),n(20498),n(87170),(0,F.vt)(),(0,F.vt)();var ge=n(620);const ye=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)ye[6*e+t]=e;const _e=new Array(36);for(let e=0;e<6;e++)_e[6*e]=0,_e[6*e+1]=1,_e[6*e+2]=2,_e[6*e+3]=2,_e[6*e+4]=3,_e[6*e+5]=0;const be=(0,ce.fA)(-.5,0,-.5),ve=(0,ce.fA)(.5,0,-.5),we=(0,ce.fA)(0,0,.5),xe=(0,ce.fA)(0,.5,0),Ce=(0,ce.vt)(),Se=(0,ce.vt)(),Ae=(0,ce.vt)(),Ie=(0,ce.vt)(),Te=(0,ce.vt)();(0,le.d)(Ce,be,xe),(0,le.d)(Se,be,ve),(0,le.h)(Ae,Ce,Se),(0,le.n)(Ae,Ae),(0,le.d)(Ce,ve,xe),(0,le.d)(Se,ve,we),(0,le.h)(Ie,Ce,Se),(0,le.n)(Ie,Ie),(0,le.d)(Ce,we,xe),(0,le.d)(Se,we,be),(0,le.h)(Te,Ce,Se),(0,le.n)(Te,Te),Ae[0],Ae[1],Ae[2],Ie[0],Ie[1],Ie[2],Te[0],Te[1],Te[2],(0,C.vt)();var Pe=n(4576),Oe=n(69397);n(6867),n(87582);var Re=n(57917);function Me(e,t){const n=(e,n,r=!1)=>({levels:e.map(e=>{const i=q(n(e.tesselation));return r&&function(e){const t=e,n=t.get("position").data,r=t.get("normal").data;if(r){const t=Fe(e,"normal").data;for(let e=0;e<r.length;e+=3){const n=r[e+1];t[e+1]=-r[e+2],t[e+2]=n}}if(n){const t=Fe(e,"position").data;for(let e=0;e<n.length;e+=3){const r=n[e+1];t[e+1]=-n[e+2],t[e+2]=r}}}(i),{components:[{attributes:i,olidColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}})});switch(e){case"cone":return n(je,e=>function(e,t,n,r,i=!0,s=!0){let o=0;const a=t,l=e;let c=(0,ce.fA)(0,o,0),u=(0,ce.fA)(0,o+l,0),d=(0,ce.fA)(0,-1,0),h=(0,ce.fA)(0,1,0);r&&(o=l,u=(0,ce.fA)(0,0,0),c=(0,ce.fA)(0,o,0),d=(0,ce.fA)(0,1,0),h=(0,ce.fA)(0,-1,0));const f=[u,c],p=[d,h],m=n+2,g=Math.sqrt(l*l+a*a);if(r)for(let e=n-1;e>=0;e--){const t=e*(2*Math.PI/n),r=(0,ce.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(r);const i=(0,ce.fA)(l*Math.cos(t)/g,-a/g,l*Math.sin(t)/g);p.push(i)}else for(let e=0;e<n;e++){const t=e*(2*Math.PI/n),r=(0,ce.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(r);const i=(0,ce.fA)(l*Math.cos(t)/g,a/g,l*Math.sin(t)/g);p.push(i)}const y=new Array,_=new Array;if(i){for(let e=3;e<f.length;e++)y.push(1),y.push(e-1),y.push(e),_.push(0),_.push(0),_.push(0);y.push(f.length-1),y.push(2),y.push(1),_.push(0),_.push(0),_.push(0)}if(s){for(let e=3;e<f.length;e++)y.push(e),y.push(e-1),y.push(0),_.push(e),_.push(e-1),_.push(1);y.push(0),y.push(2),y.push(f.length-1),_.push(1),_.push(2),_.push(p.length-1)}const b=(0,ue.oe)(3*m);for(let e=0;e<m;e++)b[3*e]=f[e][0],b[3*e+1]=f[e][1],b[3*e+2]=f[e][2];const v=(0,ue.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[["position",new K.n(b,y,3,!0)],["normal",new K.n(v,_,3,!0)]]}(1,.5,e,!1),!0);case"sphere":return n([{tesselation:0,minScreenSpaceRadius:0},{tesselation:1,minScreenSpaceRadius:8},{tesselation:2,minScreenSpaceRadius:16},{tesselation:3,minScreenSpaceRadius:50},{tesselation:4,minScreenSpaceRadius:250}],e=>function(e,t,n){const r=e;let i,s;if(n)i=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],s=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const e=r*(1+Math.sqrt(5))/2;i=[-r,e,0,r,e,0,-r,-e,0,r,-e,0,0,-r,e,0,r,e,0,-r,-e,0,r,-e,e,0,-r,e,0,r,-e,0,-r,-e,0,r],s=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let t=0;t<i.length;t+=3)me(i,t,e/fe(i,t));let o={};function a(t,n){t>n&&([t,n]=[n,t]);const r=t.toString()+"."+n.toString();if(o[r])return o[r];let s=i.length;return i.length+=3,function(e,t,n,r,i,s=t){(i=i||e)[s]=e[t]+n[r],i[s+1]=e[t+1]+n[r+1],i[s+2]=e[t+2]+n[r+2]}(i,3*t,i,3*n,i,s),me(i,s,e/fe(i,s)),s/=3,o[r]=s,s}for(let e=0;e<t;e++){const e=s.length,t=new Array(4*e);for(let n=0;n<e;n+=3){const e=s[n],r=s[n+1],i=s[n+2],o=a(e,r),l=a(r,i),c=a(i,e),u=4*n;t[u]=e,t[u+1]=o,t[u+2]=c,t[u+3]=r,t[u+4]=l,t[u+5]=o,t[u+6]=i,t[u+7]=c,t[u+8]=l,t[u+9]=o,t[u+10]=l,t[u+11]=c}s=t,o={}}const l=(0,ue.Wz)(i);for(let e=0;e<l.length;e+=3)pe(l,e);return[["position",new K.n((0,ue.Wz)(i),s,3,!0)],["normal",new K.n(l,s,3,!0)]]}(.5,e,!0));case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function Fe(e,t){let n=e.get(t);return n&&!n.exclusive&&(n={...n,exclusive:!0,data:(0,Re.S)(n.data)},e.set(t,n)),n}const je=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var De=n(2495),ke=n(74810);class ze{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._primitiveMaterialId=null,this._lodRendererId=null,this._context=null,this._symbolLayer=null,this._primitive=null,this._context=t,this._symbolLayer=e}_destroy(){this._lodRendererId=null,this._primitiveMaterialId=null}get loaded(){return this._loaded}get _isPrimitive(){return null!=this._primitive}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t=this._getLayerOpacity();let n={usePBR:!0,isSchematic:!0,mrrFactors:ke.Bt,ambient:C.Un,diffuse:C.Un,hasSlicePlane:!1,castShadows:!0,layerOpacity:t,offsetTransparentBackfaces:!1,screenSizePerspective:{}};if(n.externalColor=S.Un,n.instanced=!0,this._isPrimitive){const e=new De.fs;e.layerOpacity=t,n={...n,cullFace:Ve((0,De.ty)(e))}}const r=await e.createMaterial({type:"default",parameters:n}),i=this._symbolLayer.resource;this._primitive=i&&function(e){switch(e){case"sphere":case"cube":case"diamond":case"cylinder":case"cone":case"inverted-cone":case"tetrahedron":return!0}return!1}(i?.primitive)?i.primitive:oe.r;const s=Me(this._primitive,r);this._lodRendererId=await e.createLodRenderer(s),this._primitiveMaterialId=r,this._loaded=!0}async createDestroyCommand(){const{_lodRendererId:e,_primitiveMaterialId:t,_context:n}=this,r=n.renderCommandContext,i=[];return null!=e&&i.push(r.destroyLodRenderer(e)),null!=t&&i.push(r.destroyMaterial(t)),new g(r,r.mergeRenderCommandBuffers(i),[()=>this._destroy()])}async createAddCommand(e){const t=this._context,{renderCommandContext:n,mainThreadDelegate:r}=t;if(null==this._lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:i}=e;if(0===i)return t.createPipelineCommand();const s=this._isPrimitive,o=this._primitive||oe.r,a=(0,O.vt)((0,ae.Fq)(o)),l=(0,C.ci)((0,O.Ej)(a)),c=(0,C.ci)((0,ae.Bb)(l,{isPrimitive:s,width:100,depth:null,height:null})),u=new Float64Array(16*i),d=new Float64Array(16*i),h=U(e),f=await r.applyElevationAlignmentTo(h);for(let e=0;e<i;++e){const t=e,n=f[3*e+0],r=f[3*e+1],i=f[3*e+2],s=this._computeGlobalTransform(n,r,i,this._context.viewSpatialReference,Ue),o=this._computeLocalTransform(c,l,Be);this._writeMatrixToTypedBuffer(u,t,o),this._writeMatrixToTypedBuffer(d,t,s)}const p=B(e),m=new Uint8Array(i);e.getVisibilityArray(m);const g={featureIds:new Uint32Array(p),visibility:m,localTransforms:u,globalTransforms:d};return t.createPipelineCommand(n.addLodInstances(this._lodRendererId,e.id,g))}async createRemoveCommand(e){const{_context:t,_lodRendererId:n}=this,r=t.renderCommandContext;return null==n?t.createPipelineCommand():t.createPipelineCommand(r.removeLodInstances(n,e))}async createUpdateVisibilityCommand(e){const{_lodRendererId:t,_context:n}=this,r=n.renderCommandContext;if(null==t)return n.createPipelineCommand();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.createPipelineCommand(r.updateVisibility(t,e.id,i))}async createUpdateLayerViewOpacityCommand(e){const{_context:t}=this,n=t.renderCommandContext,r=this._primitiveMaterialId;if(null==r)return t.createPipelineCommand();const i=this._getLayerOpacity();let s={layerOpacity:i};if(this._isPrimitive){const e=new De.fs;e.layerOpacity=i,s={...s,cullFace:Ve((0,De.ty)(e))}}return t.createPipelineCommand(n.updateMaterial({type:"default",materialId:r,parameters:s}))}async createUpdateElevationCommand(e){const{_context:t,_lodRendererId:n}=this,{renderCommandContext:r,mainThreadDelegate:i}=t,{featureCount:s,id:o}=e;if(null==n||0===s)return t.createPipelineCommand();const a=new Float64Array(16*s),l=U(e),c=await i.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,n=c[3*e+0],r=c[3*e+1],i=c[3*e+2],s=this._computeGlobalTransform(n,r,i,this._context.viewSpatialReference,Ue);this._writeMatrixToTypedBuffer(a,t,s)}return t.createPipelineCommand(r.updateLodInstancesData(n,o,a))}_writeMatrixToTypedBuffer(e,t,n){let r=16*t;for(let t=0;t<16;t++)e[r++]=n[t]}_computeGlobalTransform(e,t,n,r,i){return Ee[0]=e,Ee[1]=t,Ee[2]=n,(0,se.l)(r,Ee,i,this._context.renderSpatialReference),i}_computeLocalTransform(e,t,n){return(0,T.D_)(n),this._applyObjectScale(e,t,n),n}_applyObjectScale(e,t,n){const r=function(e=C.Un,t,n,r=1){const i=new Array(3);if(null==t||null==n)i[0]=1,i[1]=1,i[2]=1;else{let r,s=0;for(let o=2;o>=0;o--){const a=e[o],l=null!=a,c=0===o&&!r&&!l,u=n[o];let d;"symbol-value"===a||c?d=0!==u?t[o]/u:1:l&&"proportional"!==a&&isFinite(a)&&(d=0!==u?a/u:1),null!=d&&(i[o]=d,r=d,s=Math.max(s,Math.abs(d)))}for(let e=2;e>=0;e--)null==i[e]?i[e]=r:0===i[e]&&(i[e]=.001*s)}for(let e=2;e>=0;e--)i[e]/=r;return(0,C.ci)(i)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===r[0]&&1===r[1]&&1===r[2]||(0,T.hs)(n,n,r)}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}}function Ve(e){return e?0:2}const Ee=(0,C.vt)(),Be=(0,x.vt)(),Ue=(0,x.vt)();class Le{constructor(e,t){this._symbols=new Array,this._featureDataPartitioning=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){this._symbols[0]=new ee(w(),this._context),this._symbols[1]=new ze(new b.A,this._context),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,n=this._partition(e),r=await Promise.all(n.map(async({index:e,features:t})=>{const n=await this._provisionSymbol(e);return await(n?.createAddCommand(t))})),i=t.joinPipelineCommands(r);return i.appendPipelineStateCommand(()=>this._featureDataPartitioning.set(e.id,n)),i}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:n}=this,r=n.renderCommandContext,i=t.get(e);if(null==i)return new g(r,r.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map(async({index:e,features:t})=>{const n=this._getLoadedSymbol(e);return await(n?.createRemoveCommand(t.id))})),o=n.joinPipelineCommands(s);return o.appendPipelineStateCommand(()=>t.delete(e)),o}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:n}=this,r=n.renderCommandContext,i=t.get(e.id);if(null==i)return new g(r,r.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map(async({index:e,features:t})=>{const n=this._getLoadedSymbol(e);return await(n?.createUpdateVisibilityCommand(t))}));return n.joinPipelineCommands(s)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,n=[];for(let t=0;t<this._symbols.length;++t){const r=this._symbols[t];null!=r&&r.loaded&&n.push(r.createUpdateLayerViewOpacityCommand(e))}const r=await Promise.all(n);return t.joinPipelineCommands(r)}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,n=[];for(const t of e.values()){const e=t.map(async({index:e,features:t})=>{const n=this._getLoadedSymbol(e);return await(n?.createUpdateElevationCommand(t))});n.push(...e)}const r=await Promise.all(n);return t.joinPipelineCommands(r)}async createDestroyCommand(){const{_featureDataPartitioning:e,_context:t}=this,n=[];for(const t of e.keys())n.push(this.createRemoveCommand(t));for(const e of this._symbols)n.push(e.createDestroyCommand());const r=await Promise.all(n);return t.joinPipelineCommands(r)}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=B(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:n}=e,r=[[],[]];for(let e=0;e<n;++e)r[t[e]%2].push(e);return r.map((t,n)=>new Ge(n,e.subset(new Uint32Array(t)))).filter(e=>e.features.featureCount>0)}}class Ge{constructor(e,t){this.index=e,this.features=t}}class qe{constructor(e,t,n,r,i,s,o){this.viewSpatialReference=e,this.renderSpatialReference=t,this.mainThreadDelegate=n,this.renderCoordsHelper=r,this.renderCommandContext=i,this.layerInfo=s,this.layerViewInfo=o,this.symbolRendererFactory=new He(this)}createPipelineCommand(e=this.renderCommandContext.createRenderCommandBuffer(),t=[]){return new g(this.renderCommandContext,e,t)}joinPipelineCommands(e){return 0===e.length?this.createPipelineCommand():e.filter(e=>null!=e).reduce((e,t)=>(e.append(t),e))}}class He{constructor(e){this.context=e}createSymbolRendererFromJSON(e){const t=(0,m.L)(e??Ne)??void 0;if(!t)throw new Error("Failed to create renderer");const n=t.type;switch(n){case"simple":return new ie(t,this.context);case"unique-value":return new Le(t,this.context);default:return console.warn(`Unable to create symbolrenderer for renderer of ${n}`),this.createSymbolRendererFromJSON(Ne)}}createSymbolRendererFromSymbol(e){const t=e?.type;switch(t){case"point-3d":return new re(e,this.context);case"picture-marker":case"simple-marker":return new ee(w(),this.context);default:return console.warn(`Unable to create symbolrenderer for symbol of ${t}`),null}}createSymbolRendererFromSymbolLayer(e){const t=e.type;return"icon"===t?new ee(e,this.context):(console.warn(`Unable to create symbolrenderer for symbolLayer of ${t}`),null)}}const Ne={type:"simple"};var $e=n(65008),Ze=n(60999),Ye=n(32587),We=n(96211),Je=n(24326);function Xe(e=""){return`${e}${(0,Je.c)()}`}new Float64Array(3);class Qe{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=Xe(`featureDataSubset-${e.id}-`)}get tileId(){return this._parent.tileId}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+Oe.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,n){return this._parent.getCoordinates(this._subsetIndices[e],t,n)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,n){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),n)}getCoordinatesArray(e,t,n){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),n)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,n=new Uint32Array(e.length);for(let r=0;r<n.length;++r)n[r]=t[e[r]];return new Qe(this._parent,n)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,n=new Array;for(let r=0;r<t;++r)this.getEnabled(r)&&e.has(this.getObjectId(r))&&n.push(r);if(0!==n.length)for(const e of n)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const n of e)t.setEnabled(n,!0)}getVisibilityArray(e,t,n){return this._parent.getVisibilityArray(e,this._translatedIndices(t),n)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const n of e)yield t[n];else yield*t}}class Ke{constructor(e){this._tile=e,this.id=Xe(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get tileId(){return this._tile.id}get featureCount(){return this._tile.featureCount}get usedMemory(){return Oe.qK+(0,Oe.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every(e=>e)}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,n){return this._tile.getCoordinates(e,t,n)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,n){return this._tile.getObjectIdsArray(e,t,n)}getCoordinatesArray(e,t,n){return this._tile.getCoordinatesArray(e,t,n)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new Qe(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,n=new Array;for(const r of this._allFeatureIndices())t[r]&&e.has(this.getObjectId(r))&&n.push(r);if(0!==n.length)for(const e of n)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),n=0){const{_enabled:r}=this;for(const i of t)e[n++]=Number(r[i]);return n}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const n of e)t[n]&&(yield this.getObjectId(n))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let et=class extends $e.A{constructor(e){super(e),this.extent=null,this._tileHandles=new Ye.A,this._wanted=new Ye.A,this._updateRequested=!1,this._synchronizationTask=null,this._requestedTiles=new Array}destroy(){this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updateRequested||!(this._synchronizationTask?.finished??1)}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,R.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted,n=this._tileHandles;for(const r of t.values())null==n.get(r.id)?.featureData&&e.push(r);return e}onTileTreeChange({tiles:e}){this._requestedTiles=e,this._scheduleTilesSync()}_scheduleTilesSync(){if(this._updateRequested)return;this._updateRequested=!0;const e=this._synchronizationTask,t=(0,Ze.UT)(async()=>{try{await(0,o.C_)(()=>e?.finished??!0),await(0,We.NO)(),this._updateRequested=!1,await this._synchronizeTiles()}finally{this._synchronizationTask===t&&(this._synchronizationTask=null)}});this._synchronizationTask=t}async _synchronizeTiles(){const e=this._requestedTiles,t=this._tileHandles,n=new Array;for(const r of e)t.has(r.id)||n.push(r);const r=new Array;for(const n of t.values()){const{id:t}=n;e.every(e=>e.id!==t)&&r.push(n.descriptor)}const i=this._tileHandles,{_boundingRect:s}=this,o=null!=s?n.filter(e=>!e.extent||(0,R.HY)(s,e.extent)):n,a=this._wanted,l=new Array;for(const{id:e}of r)a.delete(e);for(const e of o)a.set(e.id,e);const c=this._missingTiles;for(const e of r){const{id:t}=e;if(c.some(t=>tt(t,e)||tt(e,t)))continue;const n=i.get(t);null!=n&&l.push(this._removeTile(n))}for(const e of o)l.push(this._addTile(e));const u=await Promise.allSettled(l);for(const e of u)"rejected"===e.status&&console.error(e.reason)}forEachTile(e){for(const t of this._tileHandles.values()){const n=t.featureData;null!=n&&e(n)}}*loadedTiles(){for(const e of this._tileHandles.values()){const t=e.featureData;null!=t&&(yield t)}}async _removeTile(e){e.loadTask.abort(),this._tileHandles.delete(e.id),this._validate();const{featureData:t}=e;if(null!=t){const e={stack:[],error:void 0,hasError:!1};try{(0,r.mS)(e,await this.tileLocks.lock([t.tileId]),!1);const n=await this.createRemoveCommand(t.id);await(n?.execute())}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}}async _addTile(e){const{_tileHandles:t}=this,n=t.get(e.id);if(null!=n){if(!rt(n)||n.featureData.isFullyEnabled)return;return n.featureData.enableAll(),void await this._onTileLoad(n)}const r=new nt(e,(0,Ze.UT)(async t=>{const n=await this.loadTile(e,t);return(0,s.Te)(t),new Ke(n)}));this._tileHandles.set(r.id,r);try{await r.loadTask.promise}catch(e){return void(0,s.jH)(e)}(function(e){if(!rt(e))throw new Error})(r),await this._onTileLoad(r)}async _onTileLoad(e){const t={stack:[],error:void 0,hasError:!1};try{const{_wanted:n,_tileHandles:i,_missingTiles:s}=this,o=e.descriptor,a=new Array,l=new Array,c=new Array,u=new Set;for(const t of i.values()){if(t===e)continue;const{descriptor:r,id:c}=t;if(!n.has(c)&&!s.some(e=>tt(e,r)||tt(r,e))){i.delete(c),t.loadTask.abort();const{featureData:e}=t;null!=e&&a.push(e);continue}if(rt(t)){if(tt(o,r)){const e=t.featureData;for(const t of e.objectIds())u.add(t)}if(tt(r,o)){const{featureData:e}=t;l.push(e)}}}u.size>0&&(e.featureData.disableObjectIds(u),this._validateRemoval(e.featureData,u)),this._validate(),c.push(e.featureData);const d=[...c,...a,...l].map(e=>e.tileId);if((0,r.mS)(t,await this.tileLocks.lock(d),!1),0!==l.length){const t=e.featureData,n=new Set(t.objectIds());for(const e of l)e.disableObjectIds(n),this._validateRemoval(e,n)}const h=a.map(e=>this.createRemoveCommand(e.id)),f=c.map(e=>this.createAddCommand(e)),p=l.map(e=>this.createUpdateCommand(e)),m=function(e){return 0===e.length?null:e.reduce((e,t)=>(e.append(t),e))}((await Promise.all([...h,...f,...p])).filter(Pe.Ru));await(m?.execute())}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}_validate(){if(!(0,l.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!rt(t))continue;const{featureData:n}=t;e.push({featureData:n,objectIds:new Set(n.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:n,objectIds:r}=e[t];for(let i=t+1;i<e.length;++i){const{featureData:t,objectIds:s}=e[i];for(const e of s)if(r.has(e))throw new Error(`${n.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,l.A)("feature-pipeline-3d-test-validation"))for(const n of e.enabledObjectIds())if(t.has(n))throw new Error(`Failed to remove ${n} from ${e.id}!`)}};function tt({lij:[e,t,n]},{lij:[r,i,s]}){const o=r-e;return o>=0&&t===i>>o&&n===s>>o}(0,r.Cg)([(0,a.MZ)()],et.prototype,"updating",null),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"loadTile",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createAddCommand",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createRemoveCommand",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createUpdateCommand",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"tileLocks",void 0),(0,r.Cg)([(0,a.MZ)()],et.prototype,"extent",void 0),(0,r.Cg)([(0,a.MZ)()],et.prototype,"_boundingRect",null),(0,r.Cg)([(0,a.MZ)()],et.prototype,"_missingTiles",null),(0,r.Cg)([(0,a.MZ)()],et.prototype,"_updateRequested",void 0),(0,r.Cg)([(0,a.MZ)()],et.prototype,"_synchronizationTask",void 0),et=(0,r.Cg)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],et);class nt{constructor(e,t){this.descriptor=e,this.loadTask=t}get id(){return this.descriptor.id}get featureData(){return this.loadTask.value}}function rt(e){return null!=e.featureData}var it=n(36563);class st{constructor(){this._previousActions=new Map}async lock(e){const{_previousActions:t}=this,n=e.map(e=>t.get(e)).filter(Pe.Ru),r=Promise.allSettled(n),i=(0,s.Tw)(),o=(0,it.hA)(()=>i.resolve()),a=i.promise.finally(()=>{for(const n of e)t.get(n)===a&&t.delete(n)});for(const n of e)t.set(n,a);return await r,(0,it.Bf)(o)}}var ot=n(75503),at=n(27647),lt=n(92722);class ct{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return Oe.qK+Oe.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new ut(this._index,this._view,e)}}class ut extends ct{constructor(e,t,n){super(e,t),this._geometryOverride=n}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,at.Q)(new lt.A,this._geometryOverride,e.hasZ,e.hasM)}}class dt{constructor(e,t){this.featureData=e,this.bounds=t}}class ht{constructor(){this._tileBounds=new Map,this.events=new i.bk,this.featureAdapter=ft.shared}get usedMemory(){return Oe.qK+Oe.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const n=new ot.wq(9,t=>e.getBounds(t)),r=new Array;for(let e=0;e<t;++e)r[e]=e;n.load(r),this._tileBounds.set(e.id,new dt(e,n)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:n}of this._tileBounds.values())n.all(n=>{t.getEnabled(n)&&e(new ct(n,t))})}forEachInBounds(e,t){pt.minX=e[0],pt.minY=e[1],pt.maxX=e[2],pt.maxY=e[3];for(const{featureData:e,bounds:n}of this._tileBounds.values())n.search(pt,n=>{e.getEnabled(n)&&t(new ct(n,e))})}forEachBounds(e,t){for(const n of e)t(n.getBoundingBox())}getFullExtent(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:o,maxX:a,maxY:l}=e.toJSON();t=Math.min(t,s),n=Math.min(n,o),r=Math.min(r,a),i=Math.min(i,l)}return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:e}}}class ft{static{this.shared=new ft}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const pt=new ot.EC;var mt=n(80893);class gt{constructor(e,t,n){this.descriptor=e,this._pages=t,this._pageSize=n;const r=Oe.ez+t.reduce((e,{usedMemory:t})=>e+t,0),i=3*Oe.RS;this.usedMemory=Oe.qK+r+i,this.featureCount=t.reduce((e,t)=>e+t.featureCount,0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:n}=this._translateIndex(e);return this._pages[t].getObjectId(n)}getAttribute(e,t){const{pageIndex:n,featurePageIndex:r}=this._translateIndex(e);return this._pages[n].getAttribute(r,t)}getAttributeAsTimestamp(e,t){const{pageIndex:n,featurePageIndex:r}=this._translateIndex(e);return this._pages[n].getAttributeAsTimestamp(r,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:n}=this._translateIndex(e);return this._pages[t].getAttributes(n)}getCoordinates(e,t,n){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);this._pages[r].getCoordinates(i,t,n)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:n}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(n)}getCentroid(e,t){const{pageIndex:n,featurePageIndex:r}=this._translateIndex(e);return this._pages[n].getCentroid(r,t)}getBounds(e){const{pageIndex:t,featurePageIndex:n}=this._translateIndex(e);return this._pages[t].getBounds(n)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:n}=this._translateIndex(e);return this._pages[t].getBoundingBox(n)}getObjectIdsArray(e,t=this._allFeatureIndices(),n=0){let r=n;for(const{page:n,indices:i}of this._batchPageIndices(t))r=n.getObjectIdsArray(e,i,r);return r}getCoordinatesArray(e,t=this._allFeatureIndices(),n=0){let r=n;for(const{page:n,indices:i}of this._batchPageIndices(t))r=n.getCoordinatesArray(e,i,r);return r}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:n}of this._batchPageIndices(e))for(const e of t.objectIds(n))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let n=0,r=new Array;for(const i of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(i);n!==e&&(0!==r.length&&t.push({pageIndex:n,indices:r}),n=e,r=[]),r.push(s)}0!==r.length&&t.push({pageIndex:n,indices:r})}const{_pages:n}=this;for(const{pageIndex:e,indices:r}of t)yield{page:n[e],indices:r}}}var yt=n(49186),_t=n(51624),bt=n(62577),vt=n(95466),wt=n(53655);class xt{constructor(e){this._reader=new _t.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return Ct(e.getMessage());e.skip()}At()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:n,attributeIndices:r}}=this,i=n.get(t)?.index;if(null==i)return;const s=r[e*n.fields.length+i],o=this._reader;return o.move(s),It(o)}getAttributeAsTimestamp(e,t){const n=this.getAttribute(e,t);return"string"==typeof n?new Date(n).getTime():"number"==typeof n||null==n?n:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:n}}=this,r=e*t.fields.length,i=this._reader,s={};for(const e of t.fields){const t=n[r+e.index];i.move(t),s[e.name]=It(i)}return s}getCoordinates(e,t,n=0){const r=this._reader,{transform:i,featureIndices:s}=this._index,{scale:o,translate:a}=i;r.move(s[e]),this._readCoordinates(o,a,t,n)}getOptimizedGeometry(e){const t=(0,C.vt)();return this.getCoordinates(e,t),new lt.A([],t)}getCentroid(e,{hasZ:t,hasM:n}){this.getCoordinates(e,Tt);const[r,i,s]=Tt,o=[r,i];return t&&(o[3]=s),n&&(o[t?4:3]=0),new lt.A([],o)}getBounds(e){this.getCoordinates(e,Tt);const[t,n]=Tt,r=new ot.EC;return r.minX=t,r.minY=n,r.maxX=t,r.maxY=n,r}getBoundingBox(e){this.getCoordinates(e,Tt);const[t,n,r]=Tt;return(0,O.fA)(t,n,r,t,n,r)}getObjectIdsArray(e,t=this._allFeatureIndices(),n=0){const r=this._reader,{objectIdFieldName:i,attributeIndices:s,fieldsIndex:o}=this._index,a=o.get(i).index,l=o.fields.length;for(const i of t){const t=s[i*l+a];r.move(t),e[n++]=It(r)}return n}getCoordinatesArray(e,t=this._allFeatureIndices(),n=0){const r=this._reader,{transform:i,featureIndices:s}=this._index,{scale:o,translate:a}=i;for(const i of t){const t=s[i];r.move(t),n=this._readCoordinates(o,a,e,n)}return n}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:n,attributeIndices:r,fieldsIndex:i}=this._index,s=i.get(n).index,o=i.fields.length;for(const n of e){const e=r[n*o+s];t.move(e),yield It(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,n],[r,i,s],o,a){const l=this._reader,c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)3===l.tag()?(l.getUInt32(),o[a++]=r+e*l.getSInt64(),o[a++]=i+t*l.getSInt64(),o[a++]=s+n*l.getSInt64()):l.skip();break}default:l.skip()}return a}}function Ct(e){for(;e.next();){if(1===e.tag())return St(e.getMessage());e.skip()}At()}function St(e){let t,n,r=!1,i=!1,s=0;const o=new Array,a=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:n=e.getString();break;case 7:0!==e.getEnum()&&At();break;case 9:r=e.getBool()??!1;break;case 12:t=(0,bt.Q1)(e.processMessage(wt.ae));break;case 13:{const t=e.processMessage(wt.cn);t.index=s++,o.push(t);break}case 15:{a.push(e.pos());const t=e.getUInt32(),n=e.pos()+t;for(;e.pos()<n&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:i=e.getBool()??!1;break;default:e.skip()}const c=new vt.A(o);return null!=t&&i&&null!=n&&c.has(n)||At(),{transform:t,exceededTransferLimit:r,fieldsIndex:c,objectIdFieldName:n,featureIndices:a,attributeIndices:l}}function At(){const e=new yt.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function It(e){const t=e.getLength(),n=e.pos()+t;for(;e.pos()<n&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const Tt=(0,C.vt)();class Pt{constructor(e,t,n,r,i){this.spatialReference=e,this.url=n,this.objectIdField=r,this.capabilities=i;const{supportsMaxRecordCountFactor:s,maxRecordCount:o}=this.capabilities.query,a=s?4:1,l=(o??8e3)*a;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=a,c.num=this._pageSize,c.outFields=[r],this._baseQuery=c}async fetch(e,t){const{spatialReference:n,_pageSize:r}=this,i=(0,R.w1)(e.extent,n),o=this._baseQuery.clone();o.geometry=i;const a=new Array;let l=0,c=!1,u=1;for(;!c;){const e=[];for(let n=0;n<u;++n)e.push(this._fetchPage(o,l++,t));const n=await Promise.all(e);(0,s.Te)(t);for(const e of n){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&a.push(e)}u=Math.min(u+1,4)}return new gt(e,a,r)}async _fetchPage(e,t,n){const r=e.clone();r.start=t*this._pageSize;const i=(await(0,mt.kS)(this.url,r,{signal:n})).data;return(0,s.Te)(n),new xt(i)}}var Ot=n(29920),Rt=n(77690),Mt=n(29242);var Ft=n(13030),jt=n(78662),Dt=n(49255),kt=n(40268),zt=n(16943),Vt=n(25634),Et=n(11725),Bt=n(77194);class Ut{constructor(){this.scale=0,this.factor=0,this.minScaleFactor=0}}var Lt=n(59907),Gt=n(43616),qt=n(13259),Ht=n(1843),Nt=n(97220),$t=n(98958),Zt=n(33524),Yt=n(63907),Wt=n(90644);class Jt extends $t.w{constructor(e,t){super(e,t,new Nt.$(qt.H,()=>n.e(8241).then(n.bind(n,48241))),((0,zt.E)()?Kt:Qt).locations),this.primitiveType=t.occlusionPass?Yt.WR.POINTS:Yt.WR.TRIANGLES}initializePipeline(e){const{oitPass:t,hasPolygonOffset:n,draped:r,output:i,depthTestEnabled:s,occlusionPass:o}=e,a=0===t,l=s&&!r&&!(1===t)&&!o&&!(8===i);return(0,Wt.Ey)({blending:(0,Dt.RN)(i)?a?Wt.RC:(0,Zt.ez)(t):null,depthTest:s&&!r?{func:515}:null,depthWrite:l?Wt.Uy:null,drawBuffers:(0,Zt.m6)(t,i),colorWrite:Wt.kn,polygonOffset:n?Xt:null})}}const Xt={factor:0,units:-4},Qt=(0,Ht.BP)().vec3f("position").vec3f("normal").vec2i16("uvi").vec4u8("color").vec2f("size").f32("rotation").vec4f("centerOffsetAndDistance").vec4f("featureAttribute"),Kt=Qt.clone().vec4u8("olidColor");var en=n(51976),tn=n(35256);class nn extends tn.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.olidColorInstanced=!1,this.textureCoordinateType=0,this.emissionSource=0,this.discardInvisibleFragments=!0,this.hasVVInstancing=!1,this.snowCover=!1}}(0,r.Cg)([(0,en.W)()],nn.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"occlusionTestEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"signedDistanceFieldEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasVVSize",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasVVColor",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasVerticalOffset",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasScreenSizePerspective",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasRotation",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"debugDrawLabelBorder",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasPolygonOffset",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"depthTestEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"pixelSnappingEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"draped",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"terrainDepthTest",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"cullAboveTerrain",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"occlusionPass",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"occludedFragmentFade",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"horizonCullingEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"isFocused",void 0);var rn=n(49788);class sn extends Et.i{constructor(e,t){super(e,On),this.produces=new Map([[13,e=>(0,Dt.Mb)(e)&&!this.parameters.drawAsLabel],[14,e=>(0,Dt.Mb)(e)&&this.parameters.drawAsLabel],[12,()=>this.parameters.occlusionTest],[18,e=>this.parameters.draped&&(0,Dt.Mb)(e)]]),this._visible=!0,this._configuration=new nn(t)}getConfiguration(e,t){const n=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=n,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.hasVVSize=!!this.parameters.vvSize,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.occlusionPass=12===t.slot,this._configuration.occludedFragmentFade=!n&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||12===t.slot,(0,Dt.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!D.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,n,r,i,s){const{options:{selectionMode:o,hud:a,excludeLabels:l},point:c,camera:u}=n,{parameters:d}=this;if(!o||!a||l&&d.isLabel||!e.visible||!c||!u)return;const h=e.attributes.get("featureAttribute"),f=null==h?null:(0,S.ci)(h.data,Cn),{scaleX:p,scaleY:m}=Mn(f,d,u.pixelRatio);(0,Rt.z0)(yn,t),e.attributes.has("featureAttribute")&&function(e){const t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],u=1/Math.sqrt(t*t+n*n+r*r),d=1/Math.sqrt(i*i+s*s+o*o),h=1/Math.sqrt(a*a+l*l+c*c);e[0]=t*u,e[1]=n*u,e[2]=r*u,e[3]=i*d,e[4]=s*d,e[5]=o*d,e[6]=a*h,e[7]=l*h,e[8]=c*h}(yn);const g=e.attributes.get("position"),y=e.attributes.get("size"),_=e.attributes.get("normal"),b=e.attributes.get("rotation"),v=e.attributes.get("centerOffsetAndDistance");(0,ge.vA)(g.size>=3);const w=(0,qt.c)(d),x="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<g.data.length/g.size;e++){const r=e*g.size;(0,le.i)(un,g.data[r],g.data[r+1],g.data[r+2]),(0,le.t)(un,un,t),(0,le.t)(un,un,u.viewMatrix);const i=e*v.size;if((0,le.i)(wn,v.data[i],v.data[i+1],v.data[i+2]),!x&&(un[0]+=wn[0],un[1]+=wn[1],0!==wn[2])){const e=wn[2];(0,le.n)(wn,un),(0,le.d)(un,un,(0,le.g)(wn,wn,e))}const o=e*_.size;if((0,le.i)(dn,_.data[o],_.data[o+1],_.data[o+2]),an(dn,yn,u,Sn),Fn(this.parameters,un,Sn,u,cn),u.applyProjection(un,hn),hn[0]>-1){x&&(wn[0]||wn[1])&&(hn[0]+=wn[0]*u.pixelRatio,0!==wn[1]&&(hn[1]+=(0,Bt.m0)(wn[1],cn.factorAlignment)*u.pixelRatio),u.unapplyProjection(hn,un)),hn[0]+=this.parameters.screenOffset[0]*u.pixelRatio,hn[1]+=this.parameters.screenOffset[1]*u.pixelRatio,hn[0]=Math.floor(hn[0]),hn[1]=Math.floor(hn[1]);const t=e*y.size;Tn[0]=y.data[t],Tn[1]=y.data[t+1],(0,Bt.MD)(Tn,cn.factor,Tn);const r=An*u.pixelRatio;let i=0;d.textureIsSignedDistanceField&&(i=Math.min(d.outlineSize,.5*Tn[0])*u.pixelRatio/2),Tn[0]*=p,Tn[1]*=m;const o=e*b.size,a=d.rotation+b.data[o];if(ln(c,hn[0],hn[1],Tn,r,i,a,d,w)){const e=n.ray;if((0,le.t)(pn,un,(0,T.B8)(bn,u.viewMatrix)),hn[0]=c[0],hn[1]=c[1],u.unprojectFromRenderScreen(hn,un)){const t=(0,C.vt)();(0,le.c)(t,e.direction);const n=1/(0,le.l)(t);(0,le.g)(t,t,n),s((0,le.j)(e.origin,un)*n,t,-1,pn)}}}}}intersectDraped(e,t,n,r,i){const s=e.attributes.get("position"),o=e.attributes.get("size"),a=e.attributes.get("rotation"),l=this.parameters,c=(0,qt.c)(l),u=e.attributes.get("featureAttribute"),d=null==u?null:(0,S.ci)(u.data,Cn),{scaleX:h,scaleY:f}=Mn(d,l,e.screenToWorldRatio),p=In*e.screenToWorldRatio;for(let t=0;t<s.data.length/s.size;t++){const u=t*s.size,d=s.data[u],m=s.data[u+1],g=t*o.size;Tn[0]=o.data[g],Tn[1]=o.data[g+1];let y=0;l.textureIsSignedDistanceField&&(y=Math.min(l.outlineSize,.5*Tn[0])*e.screenToWorldRatio/2),Tn[0]*=h,Tn[1]*=f;const _=t*a.size,b=l.rotation+a.data[_];ln(n,d,m,Tn,p,y,b,l,c)&&r(i.distance,i.normal,-1)}}createBufferWriter(){return new Rn}applyShaderOffsetsView(e,t,n,r,i,s,o){const a=an(t,n,i,Sn);return this._applyVerticalGroundOffsetView(e,a,i,o),Fn(this.parameters,o,a,i,s),this._applyPolygonOffsetView(o,a,r[3],i,o),this._applyCenterOffsetView(o,r,o),o}applyShaderOffsetsNDC(e,t,n,r,i){return this._applyCenterOffsetNDC(e,t,n,r),null!=i&&(0,le.c)(i,r),this._applyPolygonOffsetNDC(r,t,n,r),r}_applyPolygonOffsetView(e,t,n,r,i){const s=r.aboveGround?1:-1;let o=Math.sign(n);0===o&&(o=s);const a=s*o;if(this.parameters.shaderPolygonOffset<=0)return(0,le.c)(i,e);const l=(0,j.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/r.viewport[2];return(0,le.g)(i,e,a>0?c:1/c),i}_applyVerticalGroundOffsetView(e,t,n,r){const i=(0,le.l)(e),s=n.aboveGround?1:-1,o=n.computeRenderPixelSizeAtDist(i)*kt.R,a=(0,le.g)(un,t.normal,s*o);return(0,le.f)(r,e,a),r}_applyCenterOffsetView(e,t,n){const r="screen"!==this.parameters.centerOffsetUnits;return n!==e&&(0,le.c)(n,e),r&&(n[0]+=t[0],n[1]+=t[1],t[2]&&((0,le.n)(dn,n),(0,le.a)(n,n,(0,le.g)(dn,dn,t[2])))),n}_applyCenterOffsetNDC(e,t,n,r){const i="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,le.c)(r,e),i||(r[0]+=t[0]/n.fullWidth*2,r[1]+=t[1]/n.fullHeight*2),r}_applyPolygonOffsetNDC(e,t,n,r){const i=this.parameters.shaderPolygonOffset;if(e!==r&&(0,le.c)(r,e),i){const e=n.aboveGround?1:-1,s=e*Math.sign(t[3]);r[2]-=(s||e)*i}return r}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:n}=this.parameters,r=e[3]>=rn.Q||t>=rn.Q&&n[3]>=rn.Q;return this._visible&&r}createGLMaterial(e){return new on(e)}calculateRelativeScreenBounds(e,t,n=(0,R.vt)()){return function(e,t,n,r){r[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*n,r[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*n}(this.parameters,e,t,n),n[2]=n[0]+e[0],n[3]=n[1]+e[1],n}}class on extends Vt.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(Jt,e)}}function an(e,t,n,r){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,Rt.z0)(_n,t)),(0,le.o)(r.normal,e,t),(0,le.t)(r.normal,r.normal,n.viewInverseTransposeMatrix),r.cosAngle=(0,le.e)(fn,Pn),r}function ln(e,t,n,r,i,s,o,a,l){let c=t-i-r[0]*l[0],u=c+r[0]+2*i,d=n-i-r[1]*l[1],h=d+r[1]+2*i;const f=a.distanceFieldBoundingBox;return a.textureIsSignedDistanceField&&null!=f&&(c+=r[0]*f[0],d+=r[1]*f[1],u-=r[0]*(1-f[2]),h-=r[1]*(1-f[3]),c-=s,u+=s,d-=s,h+=s),(0,M.hZ)(gn,t,n),(0,M.e$)(mn,e,gn,(0,j.kU)(o)),mn[0]>c&&mn[0]<u&&mn[1]>d&&mn[1]<h}const cn=new class{constructor(){this.factor=new Ut,this.factorAlignment=new Ut}},un=(0,C.vt)(),dn=(0,C.vt)(),hn=(0,S.vt)(),fn=(0,C.vt)(),pn=(0,C.vt)(),mn=(0,F.vt)(),gn=(0,F.vt)(),yn=(0,Mt.vt)(),_n=(0,Mt.vt)(),bn=(0,x.vt)(),vn=(0,S.vt)(),wn=(0,C.vt)(),xn=(0,C.vt)(),Cn=(0,S.vt)(),Sn={normal:fn,cosAngle:0},An=1,In=2,Tn=(0,F.fA)(0,0),Pn=(0,C.fA)(0,0,1);class On extends Vt.NV{constructor(){super(...arguments),this.renderOccluded=1,this.isDecoration=!1,this.color=(0,S.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,F.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,S.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,S.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusStyle="bright",this.draped=!1,this.isLabel=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class Rn{constructor(){this.layout=(0,zt.E)()?Kt:Qt}elementCount(e){return 6*e.get("position").indices.length}write(e,t,n,r,i,s){const{position:o,normal:a,uvi:l,color:c,size:u,rotation:d,centerOffsetAndDistance:h,featureAttribute:f}=i;(0,Lt.Hk)(n.get("position"),e,o,s,6),(0,Lt.p1)(n.get("normal"),t,a,s,6);const p=n.get("uvi")?.data;let m=0,g=0,y=-1-qt.f,_=-1-qt.f;p&&p.length>=4&&(m=p[0],g=p[1],y=-1-p[2],_=-1-p[3]);let b=n.get("position").indices.length,v=s;for(let e=0;e<b;++e)l.set(v,0,m),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,g),v++;(0,Lt.tb)(n.get("color"),4,c,s,6);const{data:w,indices:x}=n.get("size");b=x.length,v=s;for(let e=0;e<b;++e){const t=w[2*x[e]],n=w[2*x[e]+1];for(let e=0;e<6;++e)u.set(v,0,t),u.set(v,1,n),v++}if((0,Lt.uO)(n.get("rotation"),d,s,6),n.get("centerOffsetAndDistance")?(0,Lt.Ut)(n.get("centerOffsetAndDistance"),h,s,6):(0,Lt.Pq)(h,s,6*b),n.get("featureAttribute")?(0,Lt.Ut)(n.get("featureAttribute"),f,s,6):(0,Lt.Pq)(f,s,6*b),null!=r){const e=n.get("position")?.indices;if(e){const t=e.length,n=i.getField("olidColor",Ft.XP);(0,Lt.vx)(r,n,t,s,6)}}return{numVerticesPerItem:6,numItems:b}}intersect(e,t,n,r,i,s,o){const{options:{selectionMode:a,hud:l,excludeLabels:c},point:u,camera:d}=r;if(!a||!l||c&&t.isLabel||!u)return;const h=this.layout.createView(e),f=h.getField("position",Ft.xs),p=h.getField("normal",Ft.xs),m=h.getField("rotation",Ft.Y$),g=h.getField("size",Ft.gH),y=h.getField("featureAttribute",Ft.Eq),_=h.getField("centerOffsetAndDistance",Ft.Eq),b="screen"===t.centerOffsetUnits,v=(0,qt.c)(t);if(null==f||null==p||null==m||null==g||null==_||null==d)return;const w=null==y?null:y.getVec(0,Cn),{scaleX:x,scaleY:S}=Mn(w,t,d.pixelRatio),A=f.count/6;for(let e=0;e<A;e++){const i=6*e;if(f.getVec(i,un),null!=n&&(0,le.f)(un,un,n),(0,le.t)(un,un,d.viewMatrix),_.getVec(i,vn),(0,le.i)(wn,vn[0],vn[1],vn[2]),!b&&(un[0]+=wn[0],un[1]+=wn[1],0!==wn[2])){const e=wn[2];(0,le.n)(wn,un),(0,le.d)(un,un,(0,le.g)(wn,wn,e))}if(p.getVec(i,dn),an(dn,yn,d,Sn),Fn(t,un,Sn,d,cn),d.applyProjection(un,hn),hn[0]>-1){b&&(wn[0]||wn[1])&&(hn[0]+=wn[0]*d.pixelRatio,0!==wn[1]&&(hn[1]+=(0,Bt.m0)(wn[1],cn.factorAlignment)*d.pixelRatio),d.unapplyProjection(hn,un)),hn[0]+=t.screenOffset[0]*d.pixelRatio,hn[1]+=t.screenOffset[1]*d.pixelRatio,hn[0]=Math.floor(hn[0]),hn[1]=Math.floor(hn[1]),g.getVec(i,Tn),(0,Bt.MD)(Tn,cn.factor,Tn);const n=An*d.pixelRatio;let s=0;t.textureIsSignedDistanceField&&(s=Math.min(t.outlineSize,.5*Tn[0])*d.pixelRatio/2),Tn[0]*=x,Tn[1]*=S;const a=m.get(i),l=t.rotation+a;if(ln(u,hn[0],hn[1],Tn,n,s,l,t,v)){const t=r.ray;if((0,le.t)(pn,un,(0,T.B8)(bn,d.viewMatrix)),hn[0]=u[0],hn[1]=u[1],d.unprojectFromRenderScreen(hn,un)){const n=(0,C.vt)();(0,le.c)(n,t.direction);const r=1/(0,le.l)(n);(0,le.g)(n,n,r),o((0,le.j)(t.origin,un)*r,n,e,pn)}}}}}}function Mn(e,t,n){return null==e||null==t.vvSize?{scaleX:n,scaleY:n}:((0,jt.VC)(xn,t,e),{scaleX:xn[0]*n,scaleY:xn[1]*n})}function Fn(e,t,n,r,i){if(!e.verticalOffset?.screenLength)return e.screenSizePerspective||e.screenSizePerspectiveAlignment?jn(e,i,(0,le.l)(t),n.cosAngle):(i.factor.scale=1,i.factorAlignment.scale=1),t;const s=(0,le.l)(t),o=e.screenSizePerspectiveAlignment??e.screenSizePerspective,a=(0,Gt.kE)(r,s,e.verticalOffset,n.cosAngle,o);return jn(e,i,s,n.cosAngle),(0,le.g)(n.normal,n.normal,a),(0,le.f)(t,t,n.normal)}function jn(e,t,n,r){null!=e.screenSizePerspective?(0,Bt.cJ)(r,n,e.screenSizePerspective,t.factor):(t.factor.scale=1,t.factor.factor=0,t.factor.minScaleFactor=0),null!=e.screenSizePerspectiveAlignment?(0,Bt.cJ)(r,n,e.screenSizePerspectiveAlignment,t.factorAlignment):(t.factorAlignment.factor=t.factor.factor,t.factorAlignment.scale=t.factor.scale,t.factorAlignment.minScaleFactor=t.factor.minScaleFactor)}class Dn{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this.globalViewingMode=1===e}createRenderCommandBuffer(e=[],t=[]){return{commands:e,transferList:t}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const n of e)null!=n&&(t.commands.push(...n.commands),t.transferList.push(...n.transferList));return t}async createTexture(e){const{data:t,parameters:n}=e();return await this._mainThreadDelegate.createTexture(t,n)}async releaseTexture(e){const t=this._destroyTexture(e);return new g(this,t,[])}_destroyTexture(e){return{commands:[{id:"destroy-texture",textureId:e}],transferList:[]}}async createMaterial(e){const{type:t,parameters:n}=e,r=Xe("material");let i,s;switch(t){case"default":i=new De.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,materialId:r,parameters:e.parameters};break;case"hud":i=new sn(n,this.globalViewingMode),s={type:t,materialId:r,parameters:e.parameters}}return this._bufferWriters.set(r,i.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),r}destroyMaterial(e){return{commands:[{id:"destroy-material",materialId:e}],transferList:[]}}updateMaterial(e){return{commands:[{...e,id:"update-material"}],transferList:[]}}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}async destroyDirectRenderer(e){await this._mainThreadDelegate.destroyDirectRenderer(e)}addDirectRendererGeometry(e,t,n){const{materialId:r}=t;if(null==this._bufferWriters.get(r))throw new Error(`no bufferwriter found for material ${r}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,n);return this.addDirectRendererGeometryBuffer(r,e,i,s,n)}updateDirectRendererGeometry(e,t,n){const{materialId:r}=t;if(null==this._bufferWriters.get(r))throw new Error(`no bufferwriter found for material ${r}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,n);return this.updateDirectRendererGeometryBuffer(r,e,i,s,n)}addDirectRendererGeometryBuffer(e,t,n,r,i){const{objectIds:s,visibilities:o}=r;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:n,renderGeometryBufferItems:r,localOrigin:i}],transferList:[n.data,s.buffer,o.buffer]}}updateDirectRendererGeometryBuffer(e,t,n,r,i){const{objectIds:s,visibilities:o}=r;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:n,renderGeometryBufferItems:r,localOrigin:i}],transferList:[n.data,s.buffer,o.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=Xe("lod-renderer"),n=new Set,r={levels:e.levels.map(e=>({components:e.components.map(e=>{const t=e.attributes.get("position");if(!t||0===t.indices.length)throw new Error("positions attribute expected");const r=(0,G.tM)(t.indices.length/3),i=new Ot.j(r,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return n.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:i.bbMax,bbMin:i.bbMin}}}),minScreenSpaceRadius:e.minScreenSpaceRadius}))};return await this._mainThreadDelegate.createLodRenderer(t,r,Array.from(n)),t}destroyLodRenderer(e){return{commands:[{id:"destroy-lod-renderer",rendererId:e}],transferList:[]}}addLodInstances(e,t,n){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:n}],transferList:[n.featureIds.buffer,n.globalTransforms.buffer,n.localTransforms.buffer,n.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,n){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:n}],transferList:[n.buffer]}}updateVisibility(e,t,n){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:n}],transferList:[n.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t){const{materialId:n,visibilities:r,objectIds:i}=e,s=this._bufferWriters.get(n);if(null==s)throw new Error("no registered bufferWriter for material found");let o=null;if(e.transformation&&t)(0,T.C)(kn,e.transformation),kn[12]-=t[0],kn[13]-=t[1],kn[14]-=t[2],o=kn;else{if(t)throw new Error("not implemented");e.transformation&&(o=e.transformation)}let a=null;o&&((0,T.B8)(zn,kn),(0,T.mg)(zn,zn),a=zn);const l=e.attributes,c=s.elementCount(l),u=s.layout.stride/4;c>Math.floor(Vn/u)&&console.warn("geometry with very large number of elements encountered");const d=s.layout.createBuffer(c),h=s.write(o,a,l,e.olidColor,d,0);if(null==h)throw new Error("Bufferwriter.write does not provide item information.");if(r.length!==h.numItems||i.length!==h.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:d.buffer,elementCount:c},renderGeometryBufferItems:{objectIds:i,visibilities:r,ranges:{numVertices:h.numVerticesPerItem,numItems:h.numItems}}}}}const kn=(0,x.vt)(),zn=(0,x.vt)(),Vn=4194304;var En=n(98764),Bn=n(65806);const Un=(0,C.vt)();var Ln=n(17352),Gn=n(97937);function qn(e,t,n=function(e){return{operations:e,value:e.create()}}(e)){return n.operations=e,e.copy(t,n.value),n}const Hn=2**50;function Nn(e,t,n,r){return e.operations.setAltitudeAt(e.value,t,n,r)}function $n(e,t,n){return e.operations.elevate(e.value,t,n.value)}const Zn=(0,C.vt)();(0,C.vt)();var Yn=n(44280),Wn=n(32114);function Jn(e){return"point"===e.type}class Xn{constructor(e,t,n,r){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=n,this._coordinateSystem=r,this._tmpCoordinateSystem=function(e){const{value:t,operations:n}=e;return{operations:n,value:n.create(t)}}(r),this.referenceEllipsoid=(0,he.tO)(t),this.sphericalPCPF=(0,En.lO)(t)}set extent(e){e&&function(e,t,n){e.operations.setExtent(e.value,t,n.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return e=this._coordinateSystem,t=(0,R.vt)(),e.operations.getExtent(e.value,t),t;var e,t}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,n=e){return Nn(this._coordinateSystem,n,t,e)}setAltitudeOfTransformation(e,t){var n,r,i,s;n=this._coordinateSystem,i=e,(r=t)!==(s=t)&&(0,T.C)(s,r),(0,le.i)(Zn,s[12],s[13],s[14]),Nn(n,Zn,i,Zn),s[12]=Zn[0],s[13]=Zn[1],s[14]=Zn[2]}worldUpAtPosition(e,t){return function(e,t,n){return e.operations.axisAt(e.value,t,2,n)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,n){return function(e,t,n,r){return e.operations.axisAt(e.value,t,n,r)}(this._coordinateSystem,e,t,n)}basisMatrixAtPosition(e,t){const n=this.worldBasisAtPosition(e,0,Wn.rq.get()),r=this.worldBasisAtPosition(e,1,Wn.rq.get()),i=this.worldBasisAtPosition(e,2,Wn.rq.get());return(0,T.hZ)(t,n[0],n[1],n[2],0,r[0],r[1],r[2],0,i[0],i[1],i[2],0,0,0,0,1),t}headingAtPosition(e,t){const n=this.worldUpAtPosition(e,Wn.rq.get()),r=this.worldBasisAtPosition(e,1,Wn.rq.get()),i=(0,Yn.EJ)(t,r,n);return(0,j.KJ)(i)}intersectManifoldClosestSilhouette(e,t,n){return $n(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,n){e.operations.intersectRayClosestSilhouette(e.value,t,n)}(this._tmpCoordinateSystem,e,n),n}intersectManifold(e,t,n){$n(this._coordinateSystem,t,this._tmpCoordinateSystem);const r=Wn.rq.get();return function(e,t,n){return e.operations.intersectRay(e.value,t,n)}(this._tmpCoordinateSystem,e,r)?(0,le.c)(n,r):null}intersectInfiniteManifold(e,t,n){if(1===this.viewingMode)return this.intersectManifold(e,t,n);$n(this._coordinateSystem,t,this._tmpCoordinateSystem);const r=this._tmpCoordinateSystem.value,i=Wn.rq.get();return(0,de.Ui)(r.plane,e,i)?(0,le.c)(n,i):null}toRenderCoords(e,t,n){return Jn(e)?(0,Bn.g)(e,t,this.spatialReference):(0,E.F)(e,t,n,this.spatialReference)}fromRenderCoords(e,t,n=null){return Jn(t)?(null!=n&&(t.spatialReference=n),function(e,t,n){return!!(0,E.F)(e,t,Un,n.spatialReference)&&(n.x=Un[0],n.y=Un[1],n.z=Un[2],!0)}(e,this.spatialReference,t)?t:null):(0,E.F)(e,this.spatialReference,t,n)?t:null}static create(e,t){switch(e){case 2:return new Xn(2,t,(0,I.GA)(t),qn(Ln.b,(0,Ln.f)([0,0,0],[Hn,0,0],[0,Hn,0])));case 1:return new Xn(1,t,1,function(e){return qn(Gn.s,(0,Gn.f)(0,0,0,(0,he.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,I.KX)(e)/(0,I.KX)(t)}}let Qn=class extends i.nJ{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new ht,this._tileLocks=new st,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null,this._mainThreadDelegate=null,this._viewSpatialReference=null,this._renderCommandContext=null,this._context=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:n,layerInfo:r,layerViewInfo:i}){const s=h.A.fromJSON(e);this._viewSpatialReference=s;const a=h.A.fromJSON(t);this._fetcher=new Pt(this._viewSpatialReference,p.A.fromJSON(r.baseQuery),r.url,r.objectIdField,r.capabilities),this._queryEngine=new f.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:r.objectIdField},fieldsIndex:r.fieldIndex,availableFields:[r.objectIdField],spatialReference:e,featureStore:this._featureStore,timeInfo:r.timeInfo}),this._mainThreadDelegate={createTexture:async(e,t)=>{const n={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",n,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},destroyMaterial:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},destroyDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyDirectRenderer",t)},createLodRenderer:async(e,t,n)=>{const r={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",r,{transferList:n})},destroyLodRenderer:async e=>{const t={rendererId:e};await this.remoteClient.invoke("destroyLoDRenderer",t)},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})}};const l=Xn.create(n,a),c=new Dn(n,this._mainThreadDelegate);this._renderCommandContext=c;const m=new qe(s,a,this._mainThreadDelegate,l,c,r,i);this._context=m,this._renderer=m.symbolRendererFactory.createSymbolRendererFromJSON(r.renderer),this._defaultQueryJSON=new p.A({outSpatialReference:s}).toJSON();let g=null;if(null!=r.fullExtent){const e=u.A.fromJSON(r.fullExtent);await(0,d.initializeProjection)(e.spatialReference,s),g=(0,d.project)(e,s)}return this._tileManager=new et({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),tileLocks:this._tileLocks,extent:g}),this.addHandles((0,o.wB)(()=>this.updating,e=>{this.emit("notify-updating",{updating:e})}),o.Vh),null!=this._renderer&&await this._renderer.load(),er}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const n=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(n)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}onTileTreeChange(e){return this._tileManager.onTileTreeChange(e),Promise.resolve(er)}async onElevationChange(e){return er}async onLayerViewOpacityChange(e){const{_context:t,_renderer:n}=this;if(t.layerViewInfo.fullOpacity=e,null==n)return er;const r=await n.createUpdateLayerViewOpacityCommand(e);return await r.execute(),er}async onRendererChange(e){const{_context:t}=this,n=t.symbolRendererFactory.createSymbolRendererFromJSON(e);await n.load();const i=this._renderer;this._renderer=n;const s=[...this._tileManager.loadedTiles()],o=s.map(e=>e.tileId);{const e={stack:[],error:void 0,hasError:!1};try{(0,r.mS)(e,await this._tileLocks.lock(o),!1);const a=s.flatMap(e=>[i.createRemoveCommand(e.id),n.createAddCommand(e)]),l=await Promise.all(a),c=t.joinPipelineCommands(l);await c.execute()}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}const a=await i.createDestroyCommand();return await a.execute(),er}async _createAddFeatureDataCommand(e,t){const n=this._featureStore,r=this._renderer;let i;return i=null!=r?await r.createAddCommand(e):g.create(this._renderCommandContext),(0,s.Te)(t),i.appendPipelineStateCommand(()=>{n.addTile(e)}),i}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,n=this._renderer;let r;return r=null!=n?await n.createRemoveCommand(e):g.create(this._renderCommandContext),r.appendPipelineStateCommand(()=>{t.removeTile(e)}),r}async _createUpdateFeatureDataVisibilityCommand(e,t){const n=this._renderer;let r;return r=null!=n?await n.createUpdateVisibilityCommand(e):g.create(this._renderCommandContext),(0,s.Te)(t),r}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,r.Cg)([(0,a.MZ)()],Qn.prototype,"updating",null),Qn=(0,r.Cg)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Qn);const Kn=Qn,er={result:void 0}},77548:(e,t,n)=>{n.d(t,{Gh:()=>m,tk:()=>d,BR:()=>u,wI:()=>c,G$:()=>f,$x:()=>h,Ov:()=>a,W_:()=>l,OP:()=>p,TU:()=>o,XX:()=>s});var r=n(70333),i=n(78888);n(7762),n(84952),n(36563),n(36708),new WeakMap;const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function c(e,t){const n=r.id?.findServerInfo(e);if(null!=n?.currentVersion)return n.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,i.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function u(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function d(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function h(e,t){return null}function f(e){return null}function p(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function m(e,t){if(!t||!p(e))return;const n=(e.url,null);n&&(e.url=n)}},80451:(e,t,n)=>{n.d(t,{rS:()=>p,gK:()=>f}),n(44208);var r,i=n(53177),s=n(76357),o=n(31635),a=(n(53966),n(87811),n(49186),n(93223)),l=n(40608);let c=class extends s.A{static{r=this}constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,o.Cg)([(0,a.e)({inherited:"inherited"})],c.prototype,"type",void 0),c=r=(0,o.Cg)([(0,l.$)("esri.layers.support.InheritedDomain")],c);var u,d=n(10107);let h=class extends s.A{static{u=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new u({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]},isRequired:!0}}})],h.prototype,"maxValue",void 0),(0,o.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]},isRequired:!0}}})],h.prototype,"minValue",void 0),(0,o.Cg)([(0,a.e)({range:"range"})],h.prototype,"type",void 0),h=u=(0,o.Cg)([(0,l.$)("esri.layers.support.RangeDomain")],h);const f={key:"type",base:s.A,typeMap:{range:h,"coded-value":i.A,inherited:c}};function p(e){if(!e?.type)return null;switch(e.type){case"range":return h.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return c.fromJSON(e)}return null}},80893:(e,t,n)=>{n.d(t,{IJ:()=>p,Jf:()=>_,Pk:()=>g,eW:()=>f,gW:()=>y,kS:()=>m});var r=n(78888),i=n(84952),s=n(65864),o=n(17136),a=n(21325),l=n(10536),c=n(66208),u=n(58501);const d="Layer does not support extent calculation.";function h(e,t,n){const r=e.geometry,i=e.toJSON();delete i.compactGeometryEnabled,delete i.defaultSpatialReferenceEnabled;const o=i;let l,c,u;if(r&&(c=r.spatialReference,u=(0,a.YX)(c),o.geometryType=(0,s.$B)(r),o.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const n=e.toJSON();return delete n.spatialReference,JSON.stringify(n)}(r,e.compactGeometryEnabled),o.inSR=u),i.groupByFieldsForStatistics&&(o.groupByFieldsForStatistics=i.groupByFieldsForStatistics.join(",")),i.objectIds)switch(n?.uniqueIdFields?.length){case void 0:o.objectIds=i.objectIds.join(",");break;case 1:o.uniqueIds=JSON.stringify(i.objectIds),delete o.objectIds;break;default:o.uniqueIds=JSON.stringify(i.objectIds.map(e=>JSON.parse(e))),delete o.objectIds}if(i.orderByFields&&(o.orderByFields=i.orderByFields.join(",")),!i.outFields||!i.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete o.outFields:i.outFields.includes("*")?o.outFields="*":o.outFields=i.outFields.join(","),i.outSR?(o.outSR=(0,a.YX)(i.outSR),l=e.outSpatialReference):r&&(i.returnGeometry||i.returnCentroid)&&(o.outSR=o.inSR,l=c),i.returnGeometry&&delete i.returnGeometry,i.outStatistics&&(o.outStatistics=JSON.stringify(i.outStatistics)),i.fullText&&(o.fullText=JSON.stringify(i.fullText)),i.pixelSize&&(o.pixelSize=JSON.stringify(i.pixelSize)),i.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=c&&null!=e.quantizationParameters?.extent&&c.equals(e.quantizationParameters.extent.spatialReference)&&delete i.quantizationParameters.extent.spatialReference,o.quantizationParameters=JSON.stringify(i.quantizationParameters)),i.parameterValues&&(o.parameterValues=JSON.stringify(i.parameterValues)),i.rangeValues&&(o.rangeValues=JSON.stringify(i.rangeValues)),i.dynamicDataSource&&(o.layer=JSON.stringify({source:i.dynamicDataSource}),delete i.dynamicDataSource),i.timeExtent){const e=i.timeExtent,{start:t,end:n}=e;null==t&&null==n||(o.time=t===n?t:`${t??"null"},${n??"null"}`),delete i.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=c&&null!=l&&c.equals(l)&&(o.defaultSR=o.inSR,delete o.inSR,delete o.outSR),o}async function f(e,t,n,r,i){const s=t.timeExtent?.isEmpty?{data:{features:[]}}:await v(e,t,"json",r,void 0,i);return(0,u.q)(t,n,s.data),s}async function p(e,t,n,r,i){if(t.timeExtent?.isEmpty)return{data:n.createFeatureResult()};const s=await m(e,t,r,i),o=s;return o.data=(0,c.m)(s.data,n),o}function m(e,t,n,r){return v(e,t,"pbf",n,void 0,r)}function g(e,t,n,r){return t.timeExtent?.isEmpty?Promise.resolve({data:{objectIds:[]}}):v(e,t,"json",n,{returnIdsOnly:!0},r)}function y(e,t,n,r){return t.timeExtent?.isEmpty?Promise.resolve({data:{count:0}}):v(e,t,"json",n,{returnIdsOnly:!0,returnCountOnly:!0},r)}async function _(e,t,n){if(t.timeExtent?.isEmpty)return{data:{count:0,extent:null}};const r=await v(e,t,"json",n,{returnExtentOnly:!0,returnCountOnly:!0}),i=r.data;if(i.hasOwnProperty("extent"))return r;if(i.features)throw new Error(d);if(i.hasOwnProperty("count"))throw new Error(d);return r}function b(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;const n={...e,returnUniqueIdsOnly:!0};return delete n.returnIdsOnly,n}async function v(e,t,n,s={},a={},c={}){const u="string"==typeof e?(0,i.An)(e):e,d=t.geometry?[t.geometry]:[],f=await(0,o.el)(d,null,{signal:s.signal}),p=f?.[0];null!=p&&((t=t.clone()).geometry=p);const m=(0,l.z)({...u.query,f:n,...b(a,c),...h(t,a,c)});return(0,r.A)((0,i.fj)(u.path,(g=a,null==t.formatOf3DObjects||g.returnCountOnly||g.returnExtentOnly||g.returnIdsOnly?"query":"query3d")),{...s,responseType:"pbf"===n?"array-buffer":"json",query:{...m,...s.query}});var g}},81961:(e,t,n)=>{n.d(t,{V:()=>i});var r=n(74333);class i extends r.n{constructor(e,t,n){super(e,"vec4",2,(r,i,s)=>r.setUniform4fv(e,t(i,s),n))}}},87582:(e,t,n)=>{n(6867),n(65215).R},95696:(e,t,n)=>{n.d(t,{A:()=>u});var r,i=n(31635),s=n(69540),o=n(25482),a=n(10107),l=(n(44208),n(53966),n(87811),n(93223)),c=n(40608);let u=class extends((0,s.O)(o.o)){static{r=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,i.Cg)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,i.Cg)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},96576:(e,t,n)=>{n.d(t,{A:()=>h});var r,i=n(31635),s=n(4718),o=n(10107),a=(n(44208),n(53966),n(93223)),l=n(40608),c=n(92438),u=n(63988),d=n(49849);let h=r=class extends((0,u.h)(c.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(n=>n.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new r({description:this.description,label:this.label,symbol:(0,s.o8)(this.symbol),visualVariables:(0,s.o8)(this.visualVariables),authoringInfo:(0,s.o8)(this.authoringInfo)})}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"label",void 0),(0,i.Cg)([(0,o.MZ)(d.Wp)],h.prototype,"symbol",void 0),(0,i.Cg)([(0,a.e)({simple:"simple"})],h.prototype,"type",void 0),h=r=(0,i.Cg)([(0,l.$)("esri.renderers.SimpleRenderer")],h)},98453:(e,t,n)=>{n.d(t,{m:()=>r});const r=new(n(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},98988:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>Z,getTransformation:()=>U,getTransformations:()=>L,initializeProjection:()=>W,isEqualBaseGCS:()=>Y,isLoaded:()=>M,isLoadedOrLoad:()=>F,isLoadedOrLoadFor:()=>j,load:()=>k,project:()=>z,projectExtent:()=>se,projectMany:()=>V,projectMultipoint:()=>K,projectOrLoad:()=>E,projectOrLoadMany:()=>B,projectPoint:()=>X,projectPolygon:()=>re,projectPolyline:()=>te,projectWithZConversion:()=>$,projectWithoutEngine:()=>J,requiresLoad:()=>D,test:()=>H,tryProjectWithZConversion:()=>N,unload:()=>q});var r=n(49186),i=n(74887),s=n(62788),o=n(95488),a=n(51850),l=n(21276),c=n(73941),u=n(5443),d=n(48526),h=n(83290),f=n(86738),p=n(39829),m=n(82799),g=n(16930),y=n(9762),_=n(37539);function b(e,t,n,r,i,s){return v[0]=e,v[1]=t,v[2]=n,(0,y.projectBuffer)(v,r,0,i,s,0)}const v=(0,a.vt)();let w=0;class x{static fromGE(e){const t=new x;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=w++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=w++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=w++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=w++}getInverse(){const e=new x;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class C{static cacheKey(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}static fromGE(e){const t=new C;let n="";for(const r of e.steps){const e=x.fromGE(r);t.steps.push(e),n+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=n,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const t of e.steps)t instanceof x?this.steps.push(t):this.steps.push(new x({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new C;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,n){this._cachedProjection[C.cacheKey(e,t)]=n}getCachedGeTransformation(e,t){let n="";for(const e of this.steps)n+=e.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const r=this._cachedProjection[C.cacheKey(e,t)];return void 0===r?null:r}}var S=n(21325),A=n(62815);let I=null,T=null,P=null,O={};const R=new o.I;function M(){return!!I&&(0,h.i)()}function F(){return!!M()||((0,s.gc)(R),k(),!1)}function j(e,t){return!e||!t||Z(e,t)||F()}function D(e,t){return!Z(e,t)&&!M()}function k(e){return null==P&&(P=Promise.all([(0,h.l)(),n.e(9930).then(n.bind(n,49930)).then(e=>e.g),n.e(2731).then(n.bind(n,12731))])),P.then(([,t,{hydratedAdapter:n}])=>{(0,i.Te)(e),T=n,I=t.default,I._enableProjection(h.p),R.notify()})}function z(e,t,n=null,r=null){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),V(T,e,e[0].spatialReference,t,n,r)):((0,l.f)(e),V(T,[e],e.spatialReference,t,n,r)[0])}function V(e,t,n,r,i=null,s=null){if(null==n||null==r)return t;if(Z(n,r,i))return t.map(e=>J(e,n,r));if(null==i&&(0,c.jA)(n))return t.map(e=>J(e,n,g.A.WGS84)).map(e=>N(e,r));if(null==i&&(0,c.jA)(r))return t.map(e=>N(e,g.A.WGS84)).map(e=>J(e,g.A.WGS84,r));if(null==i){const e=C.cacheKey(n,r);void 0!==O[e]?i=O[e]:(null==(i=U(n,r,void 0))&&(i=new C),O[e]=i)}if(null==I||null==e)throw new G;return null!=s?I._project(e,t,n,r,i,s):I._project(e,t,n,r,i)}function E(e,t){const n=B([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function B(e,t){if(!M())for(const n of e)if(null!=n&&!(0,S.aI)(n.spatialReference,t)&&(0,S.fn)(n.spatialReference)&&(0,S.fn)(t)&&!Z(n.spatialReference,t))return(0,s.gc)(R),{pending:k(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,S.aI)(e.spatialReference,t)?e:(0,S.fn)(e.spatialReference)&&(0,S.fn)(t)?N(e,t):null)}}function U(e,t,n=null){if(null==e||null==t)return null;if(null==I||null==T)throw new G;const r=I._getTransformation(T,e,t,n,n?.spatialReference);return null!==r?C.fromGE(r):null}function L(e,t,n=null){if(null==I||null==T)throw new G;const r=I._getTransformationBySuitability(T,e,t,n,n?.spatialReference);if(null!==r){const e=[];for(const t of r)e.push(C.fromGE(t));return e}return[]}class G extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function q(){I=null,T=null,P=null,O={}}const H={get loadPromise(){return P}};function N(e,t){try{const n=z(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const r=(0,A.N)(n.type,e.spatialReference,t);return null!=r&&r(n),n}catch(e){if(!(e instanceof G))throw e;return null}}async function $(e,t,n){const r=e.spatialReference;return null!=r&&null!=t&&await W(r,t,null,n),N(e,t)}function Z(e,t,n){return!n&&(!!(0,S.aI)(e,t)||(0,S.fn)(e)&&(0,S.fn)(t)&&!!(0,_.jd)(e,t))}function Y(e,t){if((0,S.aI)(e,t))return!0;if(!(0,S.fn)(e)||!(0,S.fn)(t))return!1;const n=(0,S.oT)(e)||(0,S.K8)(e)||(0,S.x1)(e),r=(0,S.oT)(t)||(0,S.K8)(t)||(0,S.x1)(t);return n&&r}async function W(e,t,n,r){if(M())return(0,i.NO)(r);if(Array.isArray(e)){for(const{source:t,dest:n,geographicTransformation:i}of e)if(t&&n&&!Z(t,n,i))return k(r)}else if(e&&t&&!Z(e,t,n))return k(r);return(0,i.NO)(r)}function J(e,t,n){return e?"x"in e?Q(e,t,new f.A,n,0):"xmin"in e?oe(e,t,new u.A,n,0):"rings"in e?ie(e,t,new p.A,n,0):"paths"in e?ne(e,t,new m.A,n,0):"points"in e?ee(e,t,new d.A,n,0):null:null}function X(e,t,n=t.spatialReference,r=0){return null!=n&&null!=e.spatialReference&&null!=Q(e,e.spatialReference,t,n,r)}function Q(e,t,n,r,i){le[0]=e.x,le[1]=e.y;const s=e.z;return le[2]=void 0!==s?s:i,(0,y.projectBuffer)(le,t,0,le,r,0)?(n.x=le[0],n.y=le[1],n.spatialReference=r,void 0!==s||(0,c.xP)(r)?(n.z=le[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function K(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=ee(e,e.spatialReference,t,n,r)}function ee(e,t,n,r,i){const{points:s,hasZ:o,hasM:a}=e,l=[],u=s.length,d=[];for(const e of s)d.push(e[0],e[1],o?e[2]:i);if(!(0,y.projectBuffer)(d,t,0,d,r,0,u))return null;const h=o||(0,c.xP)(r);for(let e=0;e<u;++e){const t=3*e,n=d[t],r=d[t+1];h&&a?l.push([n,r,d[t+2],s[e][3]]):h?l.push([n,r,d[t+2]]):a?l.push([n,r,s[e][2]]):l.push([n,r])}return n.points=l,n.spatialReference=r,n.hasZ=o,n.hasM=a,n}function te(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=ne(e,e.spatialReference,t,n,r)}function ne(e,t,n,r,i){const{paths:s,hasZ:o,hasM:a}=e,l=[];if(!ae(s,o??!1,a??!1,t,l,r,i))return null;const u=o||(0,c.xP)(r);return n.paths=l,n.spatialReference=r,n.hasZ=u,n.hasM=a,n}function re(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,r)}function ie(e,t,n,r,i){const{rings:s,hasZ:o,hasM:a}=e,l=[];if(!ae(s,o??!1,a??!1,t,l,r,i))return null;const u=o||(0,c.xP)(r);return n.rings=l,n.spatialReference=r,n.hasZ=u,n.hasM=a,n}function se(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=oe(e,e.spatialReference,t,n,r)}function oe(e,t,n,r,i){const{xmin:s,ymin:o,xmax:a,ymax:l,hasZ:u,hasM:d}=e;if(!b(s,o,u?e.zmin:i,t,le,r))return null;const h=u||(0,c.xP)(r);return n.xmin=le[0],n.ymin=le[1],h&&(n.zmin=le[2]),b(a,l,u?e.zmax:i,t,le,r)?(n.xmax=le[0],n.ymax=le[1],h&&(n.zmax=le[2]),d&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,n):null}function ae(e,t,n,r,i,s,o=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:o);if(!(0,y.projectBuffer)(a,r,0,a,s,0))return!1;let l=0;i.length=0;const u=t||(0,c.xP)(s);for(const t of e){const e=new Array;for(const r of t)u&&n?e.push([a[l++],a[l++],a[l++],r[3]]):u?e.push([a[l++],a[l++],a[l++]]):n?(e.push([a[l++],a[l++],r[2]]),l++):(e.push([a[l++],a[l++]]),l++);i.push(e)}return!0}const le=(0,a.vt)()}}]);
|
|
353
|
+
}`)}},65215:(e,t,n)=>{n.d(t,{H:()=>r,R:()=>i});class r{constructor(e){this.layerViewUid=e}}class i extends r{constructor(e,t){super(e),this.graphicUid=t}}},65494:(e,t,n)=>{n.d(t,{L:()=>l,r:()=>o});var r=n(67076),i=n(90360),s=n(41214);function o(e,t){return l(e,null,t)}const a=(0,i.C)({types:s.Hg});function l(e,t,n){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(n?.messages&&n.messages.push(new r.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:n})),null):a(e,t,n):null}},66208:(e,t,n)=>{n.d(t,{m:()=>i});var r=n(53655);function i(e,t){const n=(0,r.SH)(e,t),i=n.queryResult.featureResult,s=n.queryResult.queryGeometry,o=n.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=o),i}},69418:(e,t,n)=>{n.d(t,{S:()=>c,z:()=>l});var r=n(83047),i=n(21325),s=n(43334),o=n(58512),a=n(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class c{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,r.G9)(this._options.sourceSpatialReference)/(0,r.G9)(e.spatialReference);if(1!==t)for(const n of e.features){if(!(0,s.N3)(n))continue;const e=n.geometry.coords;for(let n=2;n<e.length;n+=3)e[n]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce((e,t)=>e+t,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.A}}},72385:(e,t,n)=>{function r(){return new Float32Array(3)}function i(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,n){const r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=n,r}function o(){return r()}function a(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function u(){return s(0,0,1)}n.d(t,{fA:()=>s,o8:()=>i,vt:()=>r});const d=o(),h=a(),f=l(),p=c(),m=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:i,create:r,fromValues:s,ones:a,unitX:l,unitY:c,unitZ:u,zeros:o},Symbol.toStringTag,{value:"Module"}))},73681:(e,t,n)=>{n.d(t,{n:()=>l});var r=n(49186),i=n(53966),s=n(46140),o=n(95466),a=n(55674);class l{static async from(e,t,n){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(n))h.delete(e);h.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const f=await(0,a.xR)(e.expression,null,d);if(!f)throw new r.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const p=!o||!o.greaterEqual(4,0);p&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new c(n,p);return new l(p,u,f,m)}constructor(e,t,n,r){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=n,this._reader=r}get itemNames(){return this._itemNames}evaluate(e,t,n,r){try{return this._reader.bind(e,n,r),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class c extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},75503:(e,t,n)=>{n.d(t,{EC:()=>A,wq:()=>a});var r=n(4576),i=n(21818),s=(n(44208),n(15142)),o=n(11006);class a{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),x.prune(),C.prune(),S.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(b(e,n))for(w.clear();n;){for(let i=0,s=n.children.length;i<s;i++){const s=n.children[i],o=n.leaf?r(s):s;b(e,o)&&(n.leaf?t(s):_(e,o)?l(s,t):w.push(s))}n=w.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!b(e,t))return!1;for(w.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],s=t.leaf?n(i):i;if(b(e,s)){if(t.leaf||_(e,s))return!0;w.push(i)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),S.clear();n||C.length>0;){if(n||(n=C.pop(),s=C.data[C.length-1],o=S.pop()??0,a=!0),n.leaf&&(t=(0,r.qh)(n.children,(0,i.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),C.push(n),this._condense(C),this;a||n.leaf||!_(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(C.push(n),S.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){const i=n-t+1;let s=this._maxEntries;if(i<=s){const r=new T(e.slice(t,n+1));return c(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(s)),s=Math.ceil(i/s**(r-1)));const o=new P([]);o.height=r;const a=Math.ceil(i/s),l=a*Math.ceil(Math.sqrt(s));v(e,t,n,l,this._compareMinX);for(let i=t;i<=n;i+=l){const t=Math.min(i+l-1,n);v(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){const i=Math.min(n+a-1,t);o.children.push(this._build(e,n,i,r-1))}}return c(o,this._toBBox),o}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);C.clear();const s=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=p(o),l=g(e,o)-a;l<i?(i=l,r=a<r?a:r,n=o):l===i&&a<r&&(r=a,n=o)}t=n||t.children[0]}return t}(i,this._data,t,C);for(s.children.push(e),d(s,i);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)d(t.data[r],e)}(i,C,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const s=this._chooseSplitIndex(n,i,r);if(!s)return;const o=n.children.splice(s,n.children.length-s),a=n.leaf?new T(o):new P(o);a.height=n.height,c(n,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,s;r=i=1/0;for(let o=t;o<=n-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,n,this._toBBox),l=y(t,a),c=p(t)+p(a);l<r?(r=l,s=o,i=c<i?c:i):l===r&&c<i&&(i=c,s=o)}return s}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,s=u(e,0,t,i),o=u(e,n-t,n,i);let a=m(s)+m(o);for(let r=t;r<n-t;r++){const t=e.children[r];d(s,e.leaf?i(t):t),a+=m(s)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];d(o,e.leaf?i(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],s=i.children;s.splice((0,r.qh)(s,n,s.length,i.indexHint),1)}else this.clear();else c(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(x.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,i.zI)(e));else x.pushArray(n.children);n=x.pop()??null}}function c(e,t){u(e,0,e.children.length,t,e)}function u(e,t,n,r,i){i||(i=new T([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],d(i,e.leaf?r(s):s);return i}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,s-r)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,n,r,i){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const w=new s.A,x=new s.A,C=new s.A,S=new s.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class T extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(31635),i=n(66552),s=n(25482),o=n(10107),a=(n(44208),n(53966),n(87811),n(93223)),l=n(40608);const c=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends s.o{constructor(e){super(e),this.name=null,this.type=null}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,r.Cg)([(0,a.e)(c),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,r.Cg)([(0,l.$)("esri.layers.support.Domain")],u)},77121:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Kn});var r=n(31635),i=n(65529),s=n(74887),o=n(36708),a=n(10107),l=n(44208),c=(n(53966),n(87811),n(40608)),u=n(5443),d=n(98988),h=n(16930),f=n(56390),p=n(61956),m=n(65494);class g{constructor(e,t,n){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=n}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}static create(e,t=[]){return new g(e,e.createRenderCommandBuffer(),t)}}var y=n(68197),_=n(18574),b=n(87403),v=n(28975);function w(){return new _.A({material:new v.N({color:new y.A("red")})})}var x=n(9093),C=n(51850),S=n(91829),A=n(6847),I=n(83047),T=n(58083),P=n(87317),O=n(70328),R=n(19419);n(12359),n(95108),n(27615),n(52106),n(4718),n(34275),n(65864);var M=n(37585),F=n(48163),j=n(34727),D=n(26857);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const k=[];{const e=16;for(let t=0;t<360;t+=360/e)k.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}Object.freeze({left:0,center:.5,right:1});const z=Object.freeze({"bottom-left":(0,F.fA)(0,0),bottom:(0,F.fA)(.5,0),"bottom-right":(0,F.fA)(1,0),left:(0,F.fA)(0,.5),center:(0,F.fA)(.5,.5),right:(0,F.fA)(1,.5),"top-left":(0,F.fA)(0,1),top:(0,F.fA)(.5,1),"top-right":(0,F.fA)(1,1)});var V=n(9762),E=n(27993);function B(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const n=new Uint32Array(t);return e.getObjectIdsArray(n),n}function U(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const n=new Float64Array(3*t);return e.getCoordinatesArray(n),n}function L(e,t){const n=t.viewSpatialReference,r=t.renderSpatialReference,{extent:i}=e,s=(0,R.gX)(i),o=(0,C.vt)();return(0,E.F)([s[0],s[1],0],n,o,r),o}var G=n(97146);function q(e){const t=new Map;for(const[n,r]of e)t.set(n,{...r,indices:(0,G.Dg)(r.indices)});return t}var H=n(40804);n(48833);const N=(0,S.CN)(.25,.25,.75,.75);function $(e){return"cross"===e||"x"===e}function Z(e,t=128,n=.5*t,r=0){switch(e){case"circle":default:return function(e,t){const n=e/2-.5;return Q(e,J(n,n,t/2))}(t,n);case"square":return function(e,t){return Y(e,t,!1)}(t,n);case"cross":return function(e,t,n=0){return W(e,t,!1,n)}(t,n,r);case"x":return function(e,t,n=0){return W(e,t,!0,n)}(t,n,r);case"kite":return function(e,t){return Y(e,t,!0)}(t,n);case"triangle":return function(e,t){return Q(e,X(e/2,t,t/2))}(t,n);case"arrow":return function(e,t){const n=t,r=t/2,i=e/2,s=.8*n,o=J(i,(e-t)/2-s,Math.sqrt(s*s+r*r)),a=X(i,n,r);return Q(e,(e,t)=>Math.max(a(e,t),-o(e,t)))}(t,n)}}function Y(e,t,n){return n&&(t/=Math.SQRT2),Q(e,(r,i)=>{let s=r-.5*e+.25,o=.5*e-i-.75;if(n){const e=(s+o)/Math.SQRT2;o=(o-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(o))-.5*t})}function W(e,t,n,r=0){t-=r,n&&(t*=Math.SQRT2);const i=.5*t;return Q(e,(t,s)=>{let o,a=t-.5*e,l=.5*e-s-1;if(n){const e=(a+l)/Math.SQRT2;l=(l-a)/Math.SQRT2,a=e}return a=Math.abs(a),l=Math.abs(l),o=a>l?a>i?Math.sqrt((a-i)*(a-i)+l*l):l:l>i?Math.sqrt(a*a+(l-i)*(l-i)):a,o-=r/2,o})}function J(e,t,n){return(r,i)=>{const s=r-e,o=i-t;return Math.sqrt(s*s+o*o)-n}}function X(e,t,n){const r=Math.sqrt(t*t+n*n);return(i,s)=>{const o=Math.abs(i-e)-n,a=s-e+t/2+.75,l=(t*o+n*a)/r,c=-a;return Math.max(l,c)}}function Q(e,t){const n=new Uint8Array(4*e*e);for(let r=0;r<e;r++)for(let i=0;i<e;i++){const s=i+e*r;let o=t(i,r);o=o/e+.5,(0,H.Un)(o,n,4*s)}return n}var K=n(46610);class ee{constructor(e,t){this._context=null,this._symbolLayer=null,this._draped=!1,this._loaded=!1,this._loadingPromise=null,this._iconTextureID=null,this._materialId=null,this._context=t,this._symbolLayer=e}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}_destroy(){this._iconTextureID=null}async _load(){const e=this._context.renderCommandContext,t=await e.createTexture(()=>function(e,t=128,n=.5*t,r=0){return{data:Z(e,t,n,r),parameters:{mipmap:!1,wrap:{s:33071,t:33071},width:t,height:t,components:4,noUnpackFlip:!0,reloadable:!0}}}("circle"));this._iconTextureID=t;const n={anchorPosition:z.center,occlusionTest:!0,hasSlicePlane:!1,color:this._getFillColor(),outlineColor:this._getOutlineColor(),outlineSize:1,distanceFieldBoundingBox:N,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:$("circle")};this._materialId=await e.createMaterial({type:"hud",parameters:n}),await e.createDirectRenderer(this._materialId),this._loaded=!0}async createAddCommand(e){const{_materialId:t,_context:n}=this,{renderCommandContext:r}=n;if(null==t)throw new Error("expected material not to be null");const i=await this._createGeometry(e);if(null==i)return n.createPipelineCommand();const s=L(e,n);return n.createPipelineCommand(r.addDirectRendererGeometry(e.id,i,s))}async _createGeometry(e){const{_materialId:t,_context:n}=this,{mainThreadDelegate:r}=n,{featureCount:i}=e;if(0===i||null==t)return null;const s=B(e),o=U(e),a=function(e,t){const n=e.length/3,r=t.viewSpatialReference,i=t.renderSpatialReference,s=new Float64Array(3*n);if(!(0,V.projectBuffer)(e,r,0,s,i,0,n))throw new Error("Failed to project coordinates");return s}(await r.applyElevationAlignmentTo(o),n),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),u=new Float64Array([24,24]),d=new Float64Array([0,0,0,1]),h=new Float64Array([0,0]),f=new Float64Array([0]),p=new Uint32Array(i);for(let e=0;e<i;++e)p[e]=e;const m=new Uint32Array(i);for(let e=0;e<i;++e)m[e]=0;const g=[["position",new K.n(a,p,3,!0)],["normal",new K.n(l,m,3,!0)],["uv0",new K.n(h,m,2,!0)],["color",new K.n(c,m,4,!0)],["rotation",new K.n(f,m,1,!0)],["size",new K.n(u,m,2,!0)],["centerOffsetAndDistance",new K.n(d,m,4,!0)]],y=new Uint8Array(i);return e.getVisibilityArray(y),{attributes:q(g),olidColor:void 0,transformation:(0,x.vt)(),materialId:t,objectIds:s,visibilities:y}}async createRemoveCommand(e){const{_materialId:t,_context:n}=this,r=n.renderCommandContext;return null==t?n.createPipelineCommand():n.createPipelineCommand(r.removeDirectRendererGeometryBuffer(t,e))}async createUpdateVisibilityCommand(e){const{_materialId:t,_context:n}=this,r=n.renderCommandContext;if(null==t)return n.createPipelineCommand();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.createPipelineCommand(r.updateVisibility(t,e.id,i))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_materialId:n}=this,r=t.renderCommandContext;return null==n?t.createPipelineCommand():t.createPipelineCommand(r.updateMaterial({type:"hud",materialId:n,parameters:{color:this._getFillColor(),outlineColor:this._getOutlineColor()}}))}async createUpdateElevationCommand(e){const{_materialId:t,_context:n}=this,{renderCommandContext:r}=n,{featureCount:i,id:s}=e;if(null==t||0===i)return n.createPipelineCommand();const o=await this._createGeometry(e);if(null==o)return n.createPipelineCommand();const a=L(e,n);return n.createPipelineCommand(r.updateDirectRendererGeometry(s,o,a))}async createDestroyCommand(){const{_iconTextureID:e,_context:t}=this,n=t.renderCommandContext;let r;return r=null!=e?await n.releaseTexture(e):g.create(n),r.appendPipelineStateCommand(()=>this._destroy()),r}_getOutlineColor(){const e=this._getLayerOpacity(),t=this._symbolLayer,n=t?.outline?.color;if(null!=n){const t=y.A.toUnitRGB(n),r=n.a*e;return[t[0],t[1],t[2],r]}return[0,0,0,0]}_getFillColor(){if(function(e){return null!=e&&("cross"===e||"x"===e)}(this._getPrimitive()))return ne;const e=null==this._getPrimitive(),t=this._symbolLayer?.material?.color;return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}_getCombinedOpacity(e,t=te){const n=this._draped?1:this._getLayerOpacity();return e?n*e.a:t.hasIntrinsicColor?n:0}_getCombinedOpacityAndColor(e,t=te){const n=this._getCombinedOpacity(e,t);return function(e,t,n=null){const r=(0,S.o8)(S.Un);return null!=e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],e.length>3&&(r[3]=e[3])),null!=t&&(r[3]=t),n&&(0,P.c)(r,r,n),r}(null!=e?y.A.toUnitRGB(e):C.Un,n)}_getPrimitive(){return e=this._symbolLayer,e.resource?.href?null:e.resource?.primitive??A.r;var e}}const te={hasIntrinsicColor:!1},ne=S.uY;class re{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._context=null,this._symbol=null,this._symbolLayerRenderers=[],this._context=t,this._symbol=e}_destroy(){}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_context:e,_symbol:t,_symbolLayerRenderers:n}=this,r=[];for(const i of t.symbolLayers){const t=e.symbolRendererFactory.createSymbolRendererFromSymbolLayer(i);null!=t&&(r.push(t.load()),n.push(t))}await Promise.all(r),this._loaded=!0}async createDestroyCommand(){const{_context:e,_symbolLayerRenderers:t}=this,n=[];for(const e of t)n.push(e.createDestroyCommand());const r=e.joinPipelineCommands(await Promise.all(n));return r.appendPipelineStateCommand(()=>this._destroy()),r}async createAddCommand(e){const{_context:t,_symbolLayerRenderers:n}=this,r=[];for(const t of n)r.push(t.createAddCommand(e));return t.joinPipelineCommands(await Promise.all(r))}async createRemoveCommand(e){const{_context:t,_symbolLayerRenderers:n}=this,r=[];for(const t of n)r.push(t.createRemoveCommand(e));return t.joinPipelineCommands(await Promise.all(r))}async createUpdateVisibilityCommand(e){const{_context:t,_symbolLayerRenderers:n}=this,r=[];for(const t of n)r.push(t.createUpdateVisibilityCommand(e));return t.joinPipelineCommands(await Promise.all(r))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_symbolLayerRenderers:n}=this,r=[];for(const t of n)r.push(t.createUpdateLayerViewOpacityCommand(e));return t.joinPipelineCommands(await Promise.all(r))}async createUpdateElevationCommand(e){const{_context:t,_symbolLayerRenderers:n}=this,r=[];for(const t of n)r.push(t.createUpdateElevationCommand(e));return t.joinPipelineCommands(await Promise.all(r))}}class ie{constructor(e,t){this._symbol=null,this._featureData=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_renderer:e,_context:t}=this;this._symbol=t.symbolRendererFactory.createSymbolRendererFromSymbol(e.symbol),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,n=await this._provisionSymbol(),r=null==n?t.createPipelineCommand():await n.createAddCommand(e);return r.appendPipelineStateCommand(()=>this._featureData.set(e.id,e)),r}async createRemoveCommand(e){const t=this._context,n=await this._provisionSymbol(),r=null==n?t.createPipelineCommand():await n.createRemoveCommand(e);return r.appendPipelineStateCommand(()=>this._featureData.delete(e)),r}async createUpdateVisibilityCommand(e){const t=this._context,n=await this._provisionSymbol();return null==n?t.createPipelineCommand():await n.createUpdateVisibilityCommand(e)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,n=await this._provisionSymbol();return null==n?t.createPipelineCommand():await n.createUpdateLayerViewOpacityCommand(e)}async createUpdateElevationCommand(){const{_featureData:e,_context:t}=this,n=await this._provisionSymbol();if(null==n)return t.createPipelineCommand();const r=[];for(const t of e.values())r.push(n.createUpdateElevationCommand(t));const i=await Promise.all(r);return t.joinPipelineCommands(i)}async createDestroyCommand(){const{_symbol:e,_context:t,_featureData:n}=this;if(!e)return t.createPipelineCommand();const r=[];for(const e of n.keys())r.push(this.createRemoveCommand(e));r.push(e.createDestroyCommand());const i=await Promise.all(r);return t.joinPipelineCommands(i)}async _provisionSymbol(){const e=this._symbol;return e?(e.loaded||await e.load(),e):null}}var se=n(48353),oe=n(30809),ae=n(8887),le=n(38954),ce=n(72385),ue=(n(4197),n(11868)),de=n(27921),he=(n(71351),n(73941));function fe(e,t){const n=e[t],r=e[t+1],i=e[t+2];return Math.sqrt(n*n+r*r+i*i)}function pe(e,t){const n=e[t],r=e[t+1],i=e[t+2],s=1/Math.sqrt(n*n+r*r+i*i);e[t]*=s,e[t+1]*=s,e[t+2]*=s}function me(e,t,n){e[t]*=n,e[t+1]*=n,e[t+2]*=n}n(37539),n(20498),n(87170),(0,F.vt)(),(0,F.vt)();var ge=n(620);const ye=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)ye[6*e+t]=e;const _e=new Array(36);for(let e=0;e<6;e++)_e[6*e]=0,_e[6*e+1]=1,_e[6*e+2]=2,_e[6*e+3]=2,_e[6*e+4]=3,_e[6*e+5]=0;const be=(0,ce.fA)(-.5,0,-.5),ve=(0,ce.fA)(.5,0,-.5),we=(0,ce.fA)(0,0,.5),xe=(0,ce.fA)(0,.5,0),Ce=(0,ce.vt)(),Se=(0,ce.vt)(),Ae=(0,ce.vt)(),Ie=(0,ce.vt)(),Te=(0,ce.vt)();(0,le.d)(Ce,be,xe),(0,le.d)(Se,be,ve),(0,le.h)(Ae,Ce,Se),(0,le.n)(Ae,Ae),(0,le.d)(Ce,ve,xe),(0,le.d)(Se,ve,we),(0,le.h)(Ie,Ce,Se),(0,le.n)(Ie,Ie),(0,le.d)(Ce,we,xe),(0,le.d)(Se,we,be),(0,le.h)(Te,Ce,Se),(0,le.n)(Te,Te),Ae[0],Ae[1],Ae[2],Ie[0],Ie[1],Ie[2],Te[0],Te[1],Te[2],(0,C.vt)();var Pe=n(4576),Oe=n(69397);n(6867),n(87582);var Re=n(57917);function Me(e,t){const n=(e,n,r=!1)=>({levels:e.map(e=>{const i=q(n(e.tesselation));return r&&function(e){const t=e,n=t.get("position").data,r=t.get("normal").data;if(r){const t=Fe(e,"normal").data;for(let e=0;e<r.length;e+=3){const n=r[e+1];t[e+1]=-r[e+2],t[e+2]=n}}if(n){const t=Fe(e,"position").data;for(let e=0;e<n.length;e+=3){const r=n[e+1];t[e+1]=-n[e+2],t[e+2]=r}}}(i),{components:[{attributes:i,olidColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}})});switch(e){case"cone":return n(je,e=>function(e,t,n,r,i=!0,s=!0){let o=0;const a=t,l=e;let c=(0,ce.fA)(0,o,0),u=(0,ce.fA)(0,o+l,0),d=(0,ce.fA)(0,-1,0),h=(0,ce.fA)(0,1,0);r&&(o=l,u=(0,ce.fA)(0,0,0),c=(0,ce.fA)(0,o,0),d=(0,ce.fA)(0,1,0),h=(0,ce.fA)(0,-1,0));const f=[u,c],p=[d,h],m=n+2,g=Math.sqrt(l*l+a*a);if(r)for(let e=n-1;e>=0;e--){const t=e*(2*Math.PI/n),r=(0,ce.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(r);const i=(0,ce.fA)(l*Math.cos(t)/g,-a/g,l*Math.sin(t)/g);p.push(i)}else for(let e=0;e<n;e++){const t=e*(2*Math.PI/n),r=(0,ce.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(r);const i=(0,ce.fA)(l*Math.cos(t)/g,a/g,l*Math.sin(t)/g);p.push(i)}const y=new Array,_=new Array;if(i){for(let e=3;e<f.length;e++)y.push(1),y.push(e-1),y.push(e),_.push(0),_.push(0),_.push(0);y.push(f.length-1),y.push(2),y.push(1),_.push(0),_.push(0),_.push(0)}if(s){for(let e=3;e<f.length;e++)y.push(e),y.push(e-1),y.push(0),_.push(e),_.push(e-1),_.push(1);y.push(0),y.push(2),y.push(f.length-1),_.push(1),_.push(2),_.push(p.length-1)}const b=(0,ue.oe)(3*m);for(let e=0;e<m;e++)b[3*e]=f[e][0],b[3*e+1]=f[e][1],b[3*e+2]=f[e][2];const v=(0,ue.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[["position",new K.n(b,y,3,!0)],["normal",new K.n(v,_,3,!0)]]}(1,.5,e,!1),!0);case"sphere":return n([{tesselation:0,minScreenSpaceRadius:0},{tesselation:1,minScreenSpaceRadius:8},{tesselation:2,minScreenSpaceRadius:16},{tesselation:3,minScreenSpaceRadius:50},{tesselation:4,minScreenSpaceRadius:250}],e=>function(e,t,n){const r=e;let i,s;if(n)i=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],s=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const e=r*(1+Math.sqrt(5))/2;i=[-r,e,0,r,e,0,-r,-e,0,r,-e,0,0,-r,e,0,r,e,0,-r,-e,0,r,-e,e,0,-r,e,0,r,-e,0,-r,-e,0,r],s=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let t=0;t<i.length;t+=3)me(i,t,e/fe(i,t));let o={};function a(t,n){t>n&&([t,n]=[n,t]);const r=t.toString()+"."+n.toString();if(o[r])return o[r];let s=i.length;return i.length+=3,function(e,t,n,r,i,s=t){(i=i||e)[s]=e[t]+n[r],i[s+1]=e[t+1]+n[r+1],i[s+2]=e[t+2]+n[r+2]}(i,3*t,i,3*n,i,s),me(i,s,e/fe(i,s)),s/=3,o[r]=s,s}for(let e=0;e<t;e++){const e=s.length,t=new Array(4*e);for(let n=0;n<e;n+=3){const e=s[n],r=s[n+1],i=s[n+2],o=a(e,r),l=a(r,i),c=a(i,e),u=4*n;t[u]=e,t[u+1]=o,t[u+2]=c,t[u+3]=r,t[u+4]=l,t[u+5]=o,t[u+6]=i,t[u+7]=c,t[u+8]=l,t[u+9]=o,t[u+10]=l,t[u+11]=c}s=t,o={}}const l=(0,ue.Wz)(i);for(let e=0;e<l.length;e+=3)pe(l,e);return[["position",new K.n((0,ue.Wz)(i),s,3,!0)],["normal",new K.n(l,s,3,!0)]]}(.5,e,!0));case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function Fe(e,t){let n=e.get(t);return n&&!n.exclusive&&(n={...n,exclusive:!0,data:(0,Re.S)(n.data)},e.set(t,n)),n}const je=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var De=n(2495),ke=n(74810);class ze{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._primitiveMaterialId=null,this._lodRendererId=null,this._context=null,this._symbolLayer=null,this._primitive=null,this._context=t,this._symbolLayer=e}_destroy(){this._lodRendererId=null,this._primitiveMaterialId=null}get loaded(){return this._loaded}get _isPrimitive(){return null!=this._primitive}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t=this._getLayerOpacity();let n={usePBR:!0,isSchematic:!0,mrrFactors:ke.Bt,ambient:C.Un,diffuse:C.Un,hasSlicePlane:!1,castShadows:!0,layerOpacity:t,offsetTransparentBackfaces:!1,screenSizePerspective:{}};if(n.externalColor=S.Un,n.instanced=!0,this._isPrimitive){const e=new De.fs;e.layerOpacity=t,n={...n,cullFace:Ve((0,De.ty)(e))}}const r=await e.createMaterial({type:"default",parameters:n}),i=this._symbolLayer.resource;this._primitive=i&&function(e){switch(e){case"sphere":case"cube":case"diamond":case"cylinder":case"cone":case"inverted-cone":case"tetrahedron":return!0}return!1}(i?.primitive)?i.primitive:oe.r;const s=Me(this._primitive,r);this._lodRendererId=await e.createLodRenderer(s),this._primitiveMaterialId=r,this._loaded=!0}async createDestroyCommand(){const{_lodRendererId:e,_primitiveMaterialId:t,_context:n}=this,r=n.renderCommandContext,i=[];return null!=e&&i.push(r.destroyLodRenderer(e)),null!=t&&i.push(r.destroyMaterial(t)),new g(r,r.mergeRenderCommandBuffers(i),[()=>this._destroy()])}async createAddCommand(e){const t=this._context,{renderCommandContext:n,mainThreadDelegate:r}=t;if(null==this._lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:i}=e;if(0===i)return t.createPipelineCommand();const s=this._isPrimitive,o=this._primitive||oe.r,a=(0,O.vt)((0,ae.Fq)(o)),l=(0,C.ci)((0,O.Ej)(a)),c=(0,C.ci)((0,ae.Bb)(l,{isPrimitive:s,width:100,depth:null,height:null})),u=new Float64Array(16*i),d=new Float64Array(16*i),h=U(e),f=await r.applyElevationAlignmentTo(h);for(let e=0;e<i;++e){const t=e,n=f[3*e+0],r=f[3*e+1],i=f[3*e+2],s=this._computeGlobalTransform(n,r,i,this._context.viewSpatialReference,Ue),o=this._computeLocalTransform(c,l,Be);this._writeMatrixToTypedBuffer(u,t,o),this._writeMatrixToTypedBuffer(d,t,s)}const p=B(e),m=new Uint8Array(i);e.getVisibilityArray(m);const g={featureIds:new Uint32Array(p),visibility:m,localTransforms:u,globalTransforms:d};return t.createPipelineCommand(n.addLodInstances(this._lodRendererId,e.id,g))}async createRemoveCommand(e){const{_context:t,_lodRendererId:n}=this,r=t.renderCommandContext;return null==n?t.createPipelineCommand():t.createPipelineCommand(r.removeLodInstances(n,e))}async createUpdateVisibilityCommand(e){const{_lodRendererId:t,_context:n}=this,r=n.renderCommandContext;if(null==t)return n.createPipelineCommand();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.createPipelineCommand(r.updateVisibility(t,e.id,i))}async createUpdateLayerViewOpacityCommand(e){const{_context:t}=this,n=t.renderCommandContext,r=this._primitiveMaterialId;if(null==r)return t.createPipelineCommand();const i=this._getLayerOpacity();let s={layerOpacity:i};if(this._isPrimitive){const e=new De.fs;e.layerOpacity=i,s={...s,cullFace:Ve((0,De.ty)(e))}}return t.createPipelineCommand(n.updateMaterial({type:"default",materialId:r,parameters:s}))}async createUpdateElevationCommand(e){const{_context:t,_lodRendererId:n}=this,{renderCommandContext:r,mainThreadDelegate:i}=t,{featureCount:s,id:o}=e;if(null==n||0===s)return t.createPipelineCommand();const a=new Float64Array(16*s),l=U(e),c=await i.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,n=c[3*e+0],r=c[3*e+1],i=c[3*e+2],s=this._computeGlobalTransform(n,r,i,this._context.viewSpatialReference,Ue);this._writeMatrixToTypedBuffer(a,t,s)}return t.createPipelineCommand(r.updateLodInstancesData(n,o,a))}_writeMatrixToTypedBuffer(e,t,n){let r=16*t;for(let t=0;t<16;t++)e[r++]=n[t]}_computeGlobalTransform(e,t,n,r,i){return Ee[0]=e,Ee[1]=t,Ee[2]=n,(0,se.l)(r,Ee,i,this._context.renderSpatialReference),i}_computeLocalTransform(e,t,n){return(0,T.D_)(n),this._applyObjectScale(e,t,n),n}_applyObjectScale(e,t,n){const r=function(e=C.Un,t,n,r=1){const i=new Array(3);if(null==t||null==n)i[0]=1,i[1]=1,i[2]=1;else{let r,s=0;for(let o=2;o>=0;o--){const a=e[o],l=null!=a,c=0===o&&!r&&!l,u=n[o];let d;"symbol-value"===a||c?d=0!==u?t[o]/u:1:l&&"proportional"!==a&&isFinite(a)&&(d=0!==u?a/u:1),null!=d&&(i[o]=d,r=d,s=Math.max(s,Math.abs(d)))}for(let e=2;e>=0;e--)null==i[e]?i[e]=r:0===i[e]&&(i[e]=.001*s)}for(let e=2;e>=0;e--)i[e]/=r;return(0,C.ci)(i)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===r[0]&&1===r[1]&&1===r[2]||(0,T.hs)(n,n,r)}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}}function Ve(e){return e?0:2}const Ee=(0,C.vt)(),Be=(0,x.vt)(),Ue=(0,x.vt)();class Le{constructor(e,t){this._symbols=new Array,this._featureDataPartitioning=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){this._symbols[0]=new ee(w(),this._context),this._symbols[1]=new ze(new b.A,this._context),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,n=this._partition(e),r=await Promise.all(n.map(async({index:e,features:t})=>{const n=await this._provisionSymbol(e);return await(n?.createAddCommand(t))})),i=t.joinPipelineCommands(r);return i.appendPipelineStateCommand(()=>this._featureDataPartitioning.set(e.id,n)),i}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:n}=this,r=n.renderCommandContext,i=t.get(e);if(null==i)return new g(r,r.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map(async({index:e,features:t})=>{const n=this._getLoadedSymbol(e);return await(n?.createRemoveCommand(t.id))})),o=n.joinPipelineCommands(s);return o.appendPipelineStateCommand(()=>t.delete(e)),o}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:n}=this,r=n.renderCommandContext,i=t.get(e.id);if(null==i)return new g(r,r.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map(async({index:e,features:t})=>{const n=this._getLoadedSymbol(e);return await(n?.createUpdateVisibilityCommand(t))}));return n.joinPipelineCommands(s)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,n=[];for(let t=0;t<this._symbols.length;++t){const r=this._symbols[t];null!=r&&r.loaded&&n.push(r.createUpdateLayerViewOpacityCommand(e))}const r=await Promise.all(n);return t.joinPipelineCommands(r)}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,n=[];for(const t of e.values()){const e=t.map(async({index:e,features:t})=>{const n=this._getLoadedSymbol(e);return await(n?.createUpdateElevationCommand(t))});n.push(...e)}const r=await Promise.all(n);return t.joinPipelineCommands(r)}async createDestroyCommand(){const{_featureDataPartitioning:e,_context:t}=this,n=[];for(const t of e.keys())n.push(this.createRemoveCommand(t));for(const e of this._symbols)n.push(e.createDestroyCommand());const r=await Promise.all(n);return t.joinPipelineCommands(r)}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=B(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:n}=e,r=[[],[]];for(let e=0;e<n;++e)r[t[e]%2].push(e);return r.map((t,n)=>new Ge(n,e.subset(new Uint32Array(t)))).filter(e=>e.features.featureCount>0)}}class Ge{constructor(e,t){this.index=e,this.features=t}}class qe{constructor(e,t,n,r,i,s,o){this.viewSpatialReference=e,this.renderSpatialReference=t,this.mainThreadDelegate=n,this.renderCoordsHelper=r,this.renderCommandContext=i,this.layerInfo=s,this.layerViewInfo=o,this.symbolRendererFactory=new He(this)}createPipelineCommand(e=this.renderCommandContext.createRenderCommandBuffer(),t=[]){return new g(this.renderCommandContext,e,t)}joinPipelineCommands(e){return 0===e.length?this.createPipelineCommand():e.filter(e=>null!=e).reduce((e,t)=>(e.append(t),e))}}class He{constructor(e){this.context=e}createSymbolRendererFromJSON(e){const t=(0,m.L)(e??Ne)??void 0;if(!t)throw new Error("Failed to create renderer");const n=t.type;switch(n){case"simple":return new ie(t,this.context);case"unique-value":return new Le(t,this.context);default:return console.warn(`Unable to create symbolrenderer for renderer of ${n}`),this.createSymbolRendererFromJSON(Ne)}}createSymbolRendererFromSymbol(e){const t=e?.type;switch(t){case"point-3d":return new re(e,this.context);case"picture-marker":case"simple-marker":return new ee(w(),this.context);default:return console.warn(`Unable to create symbolrenderer for symbol of ${t}`),null}}createSymbolRendererFromSymbolLayer(e){const t=e.type;return"icon"===t?new ee(e,this.context):(console.warn(`Unable to create symbolrenderer for symbolLayer of ${t}`),null)}}const Ne={type:"simple"};var $e=n(65008),Ze=n(60999),Ye=n(32587),We=n(96211),Je=n(24326);function Xe(e=""){return`${e}${(0,Je.c)()}`}new Float64Array(3);class Qe{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=Xe(`featureDataSubset-${e.id}-`)}get tileId(){return this._parent.tileId}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+Oe.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,n){return this._parent.getCoordinates(this._subsetIndices[e],t,n)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,n){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),n)}getCoordinatesArray(e,t,n){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),n)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,n=new Uint32Array(e.length);for(let r=0;r<n.length;++r)n[r]=t[e[r]];return new Qe(this._parent,n)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,n=new Array;for(let r=0;r<t;++r)this.getEnabled(r)&&e.has(this.getObjectId(r))&&n.push(r);if(0!==n.length)for(const e of n)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const n of e)t.setEnabled(n,!0)}getVisibilityArray(e,t,n){return this._parent.getVisibilityArray(e,this._translatedIndices(t),n)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const n of e)yield t[n];else yield*t}}class Ke{constructor(e){this._tile=e,this.id=Xe(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get tileId(){return this._tile.id}get featureCount(){return this._tile.featureCount}get usedMemory(){return Oe.qK+(0,Oe.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every(e=>e)}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,n){return this._tile.getCoordinates(e,t,n)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,n){return this._tile.getObjectIdsArray(e,t,n)}getCoordinatesArray(e,t,n){return this._tile.getCoordinatesArray(e,t,n)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new Qe(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,n=new Array;for(const r of this._allFeatureIndices())t[r]&&e.has(this.getObjectId(r))&&n.push(r);if(0!==n.length)for(const e of n)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),n=0){const{_enabled:r}=this;for(const i of t)e[n++]=Number(r[i]);return n}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const n of e)t[n]&&(yield this.getObjectId(n))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let et=class extends $e.A{constructor(e){super(e),this.extent=null,this._tileHandles=new Ye.A,this._wanted=new Ye.A,this._updateRequested=!1,this._synchronizationTask=null,this._requestedTiles=new Array}destroy(){this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updateRequested||!(this._synchronizationTask?.finished??1)}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,R.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted,n=this._tileHandles;for(const r of t.values())null==n.get(r.id)?.featureData&&e.push(r);return e}onTileTreeChange({tiles:e}){this._requestedTiles=e,this._scheduleTilesSync()}_scheduleTilesSync(){if(this._updateRequested)return;this._updateRequested=!0;const e=this._synchronizationTask,t=(0,Ze.UT)(async()=>{try{await(0,o.C_)(()=>e?.finished??!0),await(0,We.NO)(),this._updateRequested=!1,await this._synchronizeTiles()}finally{this._synchronizationTask===t&&(this._synchronizationTask=null)}});this._synchronizationTask=t}async _synchronizeTiles(){const e=this._requestedTiles,t=this._tileHandles,n=new Array;for(const r of e)t.has(r.id)||n.push(r);const r=new Array;for(const n of t.values()){const{id:t}=n;e.every(e=>e.id!==t)&&r.push(n.descriptor)}const i=this._tileHandles,{_boundingRect:s}=this,o=null!=s?n.filter(e=>!e.extent||(0,R.HY)(s,e.extent)):n,a=this._wanted,l=new Array;for(const{id:e}of r)a.delete(e);for(const e of o)a.set(e.id,e);const c=this._missingTiles;for(const e of r){const{id:t}=e;if(c.some(t=>tt(t,e)||tt(e,t)))continue;const n=i.get(t);null!=n&&l.push(this._removeTile(n))}for(const e of o)l.push(this._addTile(e));const u=await Promise.allSettled(l);for(const e of u)"rejected"===e.status&&console.error(e.reason)}forEachTile(e){for(const t of this._tileHandles.values()){const n=t.featureData;null!=n&&e(n)}}*loadedTiles(){for(const e of this._tileHandles.values()){const t=e.featureData;null!=t&&(yield t)}}async _removeTile(e){e.loadTask.abort(),this._tileHandles.delete(e.id),this._validate();const{featureData:t}=e;if(null!=t){const e={stack:[],error:void 0,hasError:!1};try{(0,r.mS)(e,await this.tileLocks.lock([t.tileId]),!1);const n=await this.createRemoveCommand(t.id);await(n?.execute())}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}}async _addTile(e){const{_tileHandles:t}=this,n=t.get(e.id);if(null!=n){if(!rt(n)||n.featureData.isFullyEnabled)return;return n.featureData.enableAll(),void await this._onTileLoad(n)}const r=new nt(e,(0,Ze.UT)(async t=>{const n=await this.loadTile(e,t);return(0,s.Te)(t),new Ke(n)}));this._tileHandles.set(r.id,r);try{await r.loadTask.promise}catch(e){return void(0,s.jH)(e)}(function(e){if(!rt(e))throw new Error})(r),await this._onTileLoad(r)}async _onTileLoad(e){const t={stack:[],error:void 0,hasError:!1};try{const{_wanted:n,_tileHandles:i,_missingTiles:s}=this,o=e.descriptor,a=new Array,l=new Array,c=new Array,u=new Set;for(const t of i.values()){if(t===e)continue;const{descriptor:r,id:c}=t;if(!n.has(c)&&!s.some(e=>tt(e,r)||tt(r,e))){i.delete(c),t.loadTask.abort();const{featureData:e}=t;null!=e&&a.push(e);continue}if(rt(t)){if(tt(o,r)){const e=t.featureData;for(const t of e.objectIds())u.add(t)}if(tt(r,o)){const{featureData:e}=t;l.push(e)}}}u.size>0&&(e.featureData.disableObjectIds(u),this._validateRemoval(e.featureData,u)),this._validate(),c.push(e.featureData);const d=[...c,...a,...l].map(e=>e.tileId);if((0,r.mS)(t,await this.tileLocks.lock(d),!1),0!==l.length){const t=e.featureData,n=new Set(t.objectIds());for(const e of l)e.disableObjectIds(n),this._validateRemoval(e,n)}const h=a.map(e=>this.createRemoveCommand(e.id)),f=c.map(e=>this.createAddCommand(e)),p=l.map(e=>this.createUpdateCommand(e)),m=function(e){return 0===e.length?null:e.reduce((e,t)=>(e.append(t),e))}((await Promise.all([...h,...f,...p])).filter(Pe.Ru));await(m?.execute())}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}_validate(){if(!(0,l.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!rt(t))continue;const{featureData:n}=t;e.push({featureData:n,objectIds:new Set(n.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:n,objectIds:r}=e[t];for(let i=t+1;i<e.length;++i){const{featureData:t,objectIds:s}=e[i];for(const e of s)if(r.has(e))throw new Error(`${n.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,l.A)("feature-pipeline-3d-test-validation"))for(const n of e.enabledObjectIds())if(t.has(n))throw new Error(`Failed to remove ${n} from ${e.id}!`)}};function tt({lij:[e,t,n]},{lij:[r,i,s]}){const o=r-e;return o>=0&&t===i>>o&&n===s>>o}(0,r.Cg)([(0,a.MZ)()],et.prototype,"updating",null),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"loadTile",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createAddCommand",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createRemoveCommand",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createUpdateCommand",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"tileLocks",void 0),(0,r.Cg)([(0,a.MZ)()],et.prototype,"extent",void 0),(0,r.Cg)([(0,a.MZ)()],et.prototype,"_boundingRect",null),(0,r.Cg)([(0,a.MZ)()],et.prototype,"_missingTiles",null),(0,r.Cg)([(0,a.MZ)()],et.prototype,"_updateRequested",void 0),(0,r.Cg)([(0,a.MZ)()],et.prototype,"_synchronizationTask",void 0),et=(0,r.Cg)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],et);class nt{constructor(e,t){this.descriptor=e,this.loadTask=t}get id(){return this.descriptor.id}get featureData(){return this.loadTask.value}}function rt(e){return null!=e.featureData}var it=n(36563);class st{constructor(){this._previousActions=new Map}async lock(e){const{_previousActions:t}=this,n=e.map(e=>t.get(e)).filter(Pe.Ru),r=Promise.allSettled(n),i=(0,s.Tw)(),o=(0,it.hA)(()=>i.resolve()),a=i.promise.finally(()=>{for(const n of e)t.get(n)===a&&t.delete(n)});for(const n of e)t.set(n,a);return await r,(0,it.Bf)(o)}}var ot=n(75503),at=n(27647),lt=n(92722);class ct{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return Oe.qK+Oe.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new ut(this._index,this._view,e)}}class ut extends ct{constructor(e,t,n){super(e,t),this._geometryOverride=n}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,at.Q)(new lt.A,this._geometryOverride,e.hasZ,e.hasM)}}class dt{constructor(e,t){this.featureData=e,this.bounds=t}}class ht{constructor(){this._tileBounds=new Map,this.events=new i.bk,this.featureAdapter=ft.shared}get usedMemory(){return Oe.qK+Oe.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const n=new ot.wq(9,t=>e.getBounds(t)),r=new Array;for(let e=0;e<t;++e)r[e]=e;n.load(r),this._tileBounds.set(e.id,new dt(e,n)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:n}of this._tileBounds.values())n.all(n=>{t.getEnabled(n)&&e(new ct(n,t))})}forEachInBounds(e,t){pt.minX=e[0],pt.minY=e[1],pt.maxX=e[2],pt.maxY=e[3];for(const{featureData:e,bounds:n}of this._tileBounds.values())n.search(pt,n=>{e.getEnabled(n)&&t(new ct(n,e))})}forEachBounds(e,t){for(const n of e)t(n.getBoundingBox())}getFullExtent(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:o,maxX:a,maxY:l}=e.toJSON();t=Math.min(t,s),n=Math.min(n,o),r=Math.min(r,a),i=Math.min(i,l)}return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:e}}}class ft{static{this.shared=new ft}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const pt=new ot.EC;var mt=n(80893);class gt{constructor(e,t,n){this.descriptor=e,this._pages=t,this._pageSize=n;const r=Oe.ez+t.reduce((e,{usedMemory:t})=>e+t,0),i=3*Oe.RS;this.usedMemory=Oe.qK+r+i,this.featureCount=t.reduce((e,t)=>e+t.featureCount,0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:n}=this._translateIndex(e);return this._pages[t].getObjectId(n)}getAttribute(e,t){const{pageIndex:n,featurePageIndex:r}=this._translateIndex(e);return this._pages[n].getAttribute(r,t)}getAttributeAsTimestamp(e,t){const{pageIndex:n,featurePageIndex:r}=this._translateIndex(e);return this._pages[n].getAttributeAsTimestamp(r,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:n}=this._translateIndex(e);return this._pages[t].getAttributes(n)}getCoordinates(e,t,n){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);this._pages[r].getCoordinates(i,t,n)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:n}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(n)}getCentroid(e,t){const{pageIndex:n,featurePageIndex:r}=this._translateIndex(e);return this._pages[n].getCentroid(r,t)}getBounds(e){const{pageIndex:t,featurePageIndex:n}=this._translateIndex(e);return this._pages[t].getBounds(n)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:n}=this._translateIndex(e);return this._pages[t].getBoundingBox(n)}getObjectIdsArray(e,t=this._allFeatureIndices(),n=0){let r=n;for(const{page:n,indices:i}of this._batchPageIndices(t))r=n.getObjectIdsArray(e,i,r);return r}getCoordinatesArray(e,t=this._allFeatureIndices(),n=0){let r=n;for(const{page:n,indices:i}of this._batchPageIndices(t))r=n.getCoordinatesArray(e,i,r);return r}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:n}of this._batchPageIndices(e))for(const e of t.objectIds(n))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let n=0,r=new Array;for(const i of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(i);n!==e&&(0!==r.length&&t.push({pageIndex:n,indices:r}),n=e,r=[]),r.push(s)}0!==r.length&&t.push({pageIndex:n,indices:r})}const{_pages:n}=this;for(const{pageIndex:e,indices:r}of t)yield{page:n[e],indices:r}}}var yt=n(49186),_t=n(51624),bt=n(62577),vt=n(95466),wt=n(53655);class xt{constructor(e){this._reader=new _t.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return Ct(e.getMessage());e.skip()}At()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:n,attributeIndices:r}}=this,i=n.get(t)?.index;if(null==i)return;const s=r[e*n.fields.length+i],o=this._reader;return o.move(s),It(o)}getAttributeAsTimestamp(e,t){const n=this.getAttribute(e,t);return"string"==typeof n?new Date(n).getTime():"number"==typeof n||null==n?n:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:n}}=this,r=e*t.fields.length,i=this._reader,s={};for(const e of t.fields){const t=n[r+e.index];i.move(t),s[e.name]=It(i)}return s}getCoordinates(e,t,n=0){const r=this._reader,{transform:i,featureIndices:s}=this._index,{scale:o,translate:a}=i;r.move(s[e]),this._readCoordinates(o,a,t,n)}getOptimizedGeometry(e){const t=(0,C.vt)();return this.getCoordinates(e,t),new lt.A([],t)}getCentroid(e,{hasZ:t,hasM:n}){this.getCoordinates(e,Tt);const[r,i,s]=Tt,o=[r,i];return t&&(o[3]=s),n&&(o[t?4:3]=0),new lt.A([],o)}getBounds(e){this.getCoordinates(e,Tt);const[t,n]=Tt,r=new ot.EC;return r.minX=t,r.minY=n,r.maxX=t,r.maxY=n,r}getBoundingBox(e){this.getCoordinates(e,Tt);const[t,n,r]=Tt;return(0,O.fA)(t,n,r,t,n,r)}getObjectIdsArray(e,t=this._allFeatureIndices(),n=0){const r=this._reader,{objectIdFieldName:i,attributeIndices:s,fieldsIndex:o}=this._index,a=o.get(i).index,l=o.fields.length;for(const i of t){const t=s[i*l+a];r.move(t),e[n++]=It(r)}return n}getCoordinatesArray(e,t=this._allFeatureIndices(),n=0){const r=this._reader,{transform:i,featureIndices:s}=this._index,{scale:o,translate:a}=i;for(const i of t){const t=s[i];r.move(t),n=this._readCoordinates(o,a,e,n)}return n}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:n,attributeIndices:r,fieldsIndex:i}=this._index,s=i.get(n).index,o=i.fields.length;for(const n of e){const e=r[n*o+s];t.move(e),yield It(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,n],[r,i,s],o,a){const l=this._reader,c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)3===l.tag()?(l.getUInt32(),o[a++]=r+e*l.getSInt64(),o[a++]=i+t*l.getSInt64(),o[a++]=s+n*l.getSInt64()):l.skip();break}default:l.skip()}return a}}function Ct(e){for(;e.next();){if(1===e.tag())return St(e.getMessage());e.skip()}At()}function St(e){let t,n,r=!1,i=!1,s=0;const o=new Array,a=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:n=e.getString();break;case 7:0!==e.getEnum()&&At();break;case 9:r=e.getBool()??!1;break;case 12:t=(0,bt.Q1)(e.processMessage(wt.ae));break;case 13:{const t=e.processMessage(wt.cn);t.index=s++,o.push(t);break}case 15:{a.push(e.pos());const t=e.getUInt32(),n=e.pos()+t;for(;e.pos()<n&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:i=e.getBool()??!1;break;default:e.skip()}const c=new vt.A(o);return null!=t&&i&&null!=n&&c.has(n)||At(),{transform:t,exceededTransferLimit:r,fieldsIndex:c,objectIdFieldName:n,featureIndices:a,attributeIndices:l}}function At(){const e=new yt.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function It(e){const t=e.getLength(),n=e.pos()+t;for(;e.pos()<n&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const Tt=(0,C.vt)();class Pt{constructor(e,t,n,r,i){this.spatialReference=e,this.url=n,this.objectIdField=r,this.capabilities=i;const{supportsMaxRecordCountFactor:s,maxRecordCount:o}=this.capabilities.query,a=s?4:1,l=(o??8e3)*a;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=a,c.num=this._pageSize,c.outFields=[r],this._baseQuery=c}async fetch(e,t){const{spatialReference:n,_pageSize:r}=this,i=(0,R.w1)(e.extent,n),o=this._baseQuery.clone();o.geometry=i;const a=new Array;let l=0,c=!1,u=1;for(;!c;){const e=[];for(let n=0;n<u;++n)e.push(this._fetchPage(o,l++,t));const n=await Promise.all(e);(0,s.Te)(t);for(const e of n){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&a.push(e)}u=Math.min(u+1,4)}return new gt(e,a,r)}async _fetchPage(e,t,n){const r=e.clone();r.start=t*this._pageSize;const i=(await(0,mt.kS)(this.url,r,{signal:n})).data;return(0,s.Te)(n),new xt(i)}}var Ot=n(29920),Rt=n(77690),Mt=n(29242);var Ft=n(13030),jt=n(78662),Dt=n(49255),kt=n(40268),zt=n(16943),Vt=n(25634),Et=n(11725),Bt=n(77194);class Ut{constructor(){this.scale=0,this.factor=0,this.minScaleFactor=0}}var Lt=n(59907),Gt=n(43616),qt=n(13259),Ht=n(1843),Nt=n(97220),$t=n(98958),Zt=n(33524),Yt=n(63907),Wt=n(90644);class Jt extends $t.w{constructor(e,t){super(e,t,new Nt.$(qt.H,()=>n.e(8241).then(n.bind(n,48241))),((0,zt.E)()?Kt:Qt).locations),this.primitiveType=t.occlusionPass?Yt.WR.POINTS:Yt.WR.TRIANGLES}initializePipeline(e){const{oitPass:t,hasPolygonOffset:n,draped:r,output:i,depthTestEnabled:s,occlusionPass:o}=e,a=0===t,l=s&&!r&&!(1===t)&&!o&&!(8===i);return(0,Wt.Ey)({blending:(0,Dt.RN)(i)?a?Wt.RC:(0,Zt.ez)(t):null,depthTest:s&&!r?{func:515}:null,depthWrite:l?Wt.Uy:null,drawBuffers:(0,Zt.m6)(t,i),colorWrite:Wt.kn,polygonOffset:n?Xt:null})}}const Xt={factor:0,units:-4},Qt=(0,Ht.BP)().vec3f("position").vec3f("normal").vec2i16("uvi").vec4u8("color").vec2f("size").f32("rotation").vec4f("centerOffsetAndDistance").vec4f("featureAttribute"),Kt=Qt.clone().vec4u8("olidColor");var en=n(51976),tn=n(35256);class nn extends tn.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.olidColorInstanced=!1,this.textureCoordinateType=0,this.emissionSource=0,this.discardInvisibleFragments=!0,this.hasVVInstancing=!1,this.snowCover=!1}}(0,r.Cg)([(0,en.W)()],nn.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"occlusionTestEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"signedDistanceFieldEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasVVSize",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasVVColor",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasVerticalOffset",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasScreenSizePerspective",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasRotation",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"debugDrawLabelBorder",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"hasPolygonOffset",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"depthTestEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"pixelSnappingEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"draped",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"terrainDepthTest",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"cullAboveTerrain",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"occlusionPass",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"occludedFragmentFade",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"horizonCullingEnabled",void 0),(0,r.Cg)([(0,en.W)()],nn.prototype,"isFocused",void 0);var rn=n(49788);class sn extends Et.i{constructor(e,t){super(e,On),this.produces=new Map([[13,e=>(0,Dt.Mb)(e)&&!this.parameters.drawAsLabel],[14,e=>(0,Dt.Mb)(e)&&this.parameters.drawAsLabel],[12,()=>this.parameters.occlusionTest],[18,e=>this.parameters.draped&&(0,Dt.Mb)(e)]]),this._visible=!0,this._configuration=new nn(t)}getConfiguration(e,t){const n=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=n,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.hasVVSize=!!this.parameters.vvSize,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.occlusionPass=12===t.slot,this._configuration.occludedFragmentFade=!n&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||12===t.slot,(0,Dt.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!D.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,n,r,i,s){const{options:{selectionMode:o,hud:a,excludeLabels:l},point:c,camera:u}=n,{parameters:d}=this;if(!o||!a||l&&d.isLabel||!e.visible||!c||!u)return;const h=e.attributes.get("featureAttribute"),f=null==h?null:(0,S.ci)(h.data,Cn),{scaleX:p,scaleY:m}=Mn(f,d,u.pixelRatio);(0,Rt.z0)(yn,t),e.attributes.has("featureAttribute")&&function(e){const t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],u=1/Math.sqrt(t*t+n*n+r*r),d=1/Math.sqrt(i*i+s*s+o*o),h=1/Math.sqrt(a*a+l*l+c*c);e[0]=t*u,e[1]=n*u,e[2]=r*u,e[3]=i*d,e[4]=s*d,e[5]=o*d,e[6]=a*h,e[7]=l*h,e[8]=c*h}(yn);const g=e.attributes.get("position"),y=e.attributes.get("size"),_=e.attributes.get("normal"),b=e.attributes.get("rotation"),v=e.attributes.get("centerOffsetAndDistance");(0,ge.vA)(g.size>=3);const w=(0,qt.c)(d),x="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<g.data.length/g.size;e++){const r=e*g.size;(0,le.i)(un,g.data[r],g.data[r+1],g.data[r+2]),(0,le.t)(un,un,t),(0,le.t)(un,un,u.viewMatrix);const i=e*v.size;if((0,le.i)(wn,v.data[i],v.data[i+1],v.data[i+2]),!x&&(un[0]+=wn[0],un[1]+=wn[1],0!==wn[2])){const e=wn[2];(0,le.n)(wn,un),(0,le.d)(un,un,(0,le.g)(wn,wn,e))}const o=e*_.size;if((0,le.i)(dn,_.data[o],_.data[o+1],_.data[o+2]),an(dn,yn,u,Sn),Fn(this.parameters,un,Sn,u,cn),u.applyProjection(un,hn),hn[0]>-1){x&&(wn[0]||wn[1])&&(hn[0]+=wn[0]*u.pixelRatio,0!==wn[1]&&(hn[1]+=(0,Bt.m0)(wn[1],cn.factorAlignment)*u.pixelRatio),u.unapplyProjection(hn,un)),hn[0]+=this.parameters.screenOffset[0]*u.pixelRatio,hn[1]+=this.parameters.screenOffset[1]*u.pixelRatio,hn[0]=Math.floor(hn[0]),hn[1]=Math.floor(hn[1]);const t=e*y.size;Tn[0]=y.data[t],Tn[1]=y.data[t+1],(0,Bt.MD)(Tn,cn.factor,Tn);const r=An*u.pixelRatio;let i=0;d.textureIsSignedDistanceField&&(i=Math.min(d.outlineSize,.5*Tn[0])*u.pixelRatio/2),Tn[0]*=p,Tn[1]*=m;const o=e*b.size,a=d.rotation+b.data[o];if(ln(c,hn[0],hn[1],Tn,r,i,a,d,w)){const e=n.ray;if((0,le.t)(pn,un,(0,T.B8)(bn,u.viewMatrix)),hn[0]=c[0],hn[1]=c[1],u.unprojectFromRenderScreen(hn,un)){const t=(0,C.vt)();(0,le.c)(t,e.direction);const n=1/(0,le.l)(t);(0,le.g)(t,t,n),s((0,le.j)(e.origin,un)*n,t,-1,pn)}}}}}intersectDraped(e,t,n,r,i){const s=e.attributes.get("position"),o=e.attributes.get("size"),a=e.attributes.get("rotation"),l=this.parameters,c=(0,qt.c)(l),u=e.attributes.get("featureAttribute"),d=null==u?null:(0,S.ci)(u.data,Cn),{scaleX:h,scaleY:f}=Mn(d,l,e.screenToWorldRatio),p=In*e.screenToWorldRatio;for(let t=0;t<s.data.length/s.size;t++){const u=t*s.size,d=s.data[u],m=s.data[u+1],g=t*o.size;Tn[0]=o.data[g],Tn[1]=o.data[g+1];let y=0;l.textureIsSignedDistanceField&&(y=Math.min(l.outlineSize,.5*Tn[0])*e.screenToWorldRatio/2),Tn[0]*=h,Tn[1]*=f;const _=t*a.size,b=l.rotation+a.data[_];ln(n,d,m,Tn,p,y,b,l,c)&&r(i.distance,i.normal,-1)}}createBufferWriter(){return new Rn}applyShaderOffsetsView(e,t,n,r,i,s,o){const a=an(t,n,i,Sn);return this._applyVerticalGroundOffsetView(e,a,i,o),Fn(this.parameters,o,a,i,s),this._applyPolygonOffsetView(o,a,r[3],i,o),this._applyCenterOffsetView(o,r,o),o}applyShaderOffsetsNDC(e,t,n,r,i){return this._applyCenterOffsetNDC(e,t,n,r),null!=i&&(0,le.c)(i,r),this._applyPolygonOffsetNDC(r,t,n,r),r}_applyPolygonOffsetView(e,t,n,r,i){const s=r.aboveGround?1:-1;let o=Math.sign(n);0===o&&(o=s);const a=s*o;if(this.parameters.shaderPolygonOffset<=0)return(0,le.c)(i,e);const l=(0,j.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/r.viewport[2];return(0,le.g)(i,e,a>0?c:1/c),i}_applyVerticalGroundOffsetView(e,t,n,r){const i=(0,le.l)(e),s=n.aboveGround?1:-1,o=n.computeRenderPixelSizeAtDist(i)*kt.R,a=(0,le.g)(un,t.normal,s*o);return(0,le.f)(r,e,a),r}_applyCenterOffsetView(e,t,n){const r="screen"!==this.parameters.centerOffsetUnits;return n!==e&&(0,le.c)(n,e),r&&(n[0]+=t[0],n[1]+=t[1],t[2]&&((0,le.n)(dn,n),(0,le.a)(n,n,(0,le.g)(dn,dn,t[2])))),n}_applyCenterOffsetNDC(e,t,n,r){const i="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,le.c)(r,e),i||(r[0]+=t[0]/n.fullWidth*2,r[1]+=t[1]/n.fullHeight*2),r}_applyPolygonOffsetNDC(e,t,n,r){const i=this.parameters.shaderPolygonOffset;if(e!==r&&(0,le.c)(r,e),i){const e=n.aboveGround?1:-1,s=e*Math.sign(t[3]);r[2]-=(s||e)*i}return r}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:n}=this.parameters,r=e[3]>=rn.Q||t>=rn.Q&&n[3]>=rn.Q;return this._visible&&r}createGLMaterial(e){return new on(e)}calculateRelativeScreenBounds(e,t,n=(0,R.vt)()){return function(e,t,n,r){r[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*n,r[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*n}(this.parameters,e,t,n),n[2]=n[0]+e[0],n[3]=n[1]+e[1],n}}class on extends Vt.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(Jt,e)}}function an(e,t,n,r){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,Rt.z0)(_n,t)),(0,le.o)(r.normal,e,t),(0,le.t)(r.normal,r.normal,n.viewInverseTransposeMatrix),r.cosAngle=(0,le.e)(fn,Pn),r}function ln(e,t,n,r,i,s,o,a,l){let c=t-i-r[0]*l[0],u=c+r[0]+2*i,d=n-i-r[1]*l[1],h=d+r[1]+2*i;const f=a.distanceFieldBoundingBox;return a.textureIsSignedDistanceField&&null!=f&&(c+=r[0]*f[0],d+=r[1]*f[1],u-=r[0]*(1-f[2]),h-=r[1]*(1-f[3]),c-=s,u+=s,d-=s,h+=s),(0,M.hZ)(gn,t,n),(0,M.e$)(mn,e,gn,(0,j.kU)(o)),mn[0]>c&&mn[0]<u&&mn[1]>d&&mn[1]<h}const cn=new class{constructor(){this.factor=new Ut,this.factorAlignment=new Ut}},un=(0,C.vt)(),dn=(0,C.vt)(),hn=(0,S.vt)(),fn=(0,C.vt)(),pn=(0,C.vt)(),mn=(0,F.vt)(),gn=(0,F.vt)(),yn=(0,Mt.vt)(),_n=(0,Mt.vt)(),bn=(0,x.vt)(),vn=(0,S.vt)(),wn=(0,C.vt)(),xn=(0,C.vt)(),Cn=(0,S.vt)(),Sn={normal:fn,cosAngle:0},An=1,In=2,Tn=(0,F.fA)(0,0),Pn=(0,C.fA)(0,0,1);class On extends Vt.NV{constructor(){super(...arguments),this.renderOccluded=1,this.isDecoration=!1,this.color=(0,S.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,F.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,S.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,S.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusStyle="bright",this.draped=!1,this.isLabel=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class Rn{constructor(){this.layout=(0,zt.E)()?Kt:Qt}elementCount(e){return 6*e.get("position").indices.length}write(e,t,n,r,i,s){const{position:o,normal:a,uvi:l,color:c,size:u,rotation:d,centerOffsetAndDistance:h,featureAttribute:f}=i;(0,Lt.Hk)(n.get("position"),e,o,s,6),(0,Lt.p1)(n.get("normal"),t,a,s,6);const p=n.get("uvi")?.data;let m=0,g=0,y=-1-qt.f,_=-1-qt.f;p&&p.length>=4&&(m=p[0],g=p[1],y=-1-p[2],_=-1-p[3]);let b=n.get("position").indices.length,v=s;for(let e=0;e<b;++e)l.set(v,0,m),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,g),v++;(0,Lt.tb)(n.get("color"),4,c,s,6);const{data:w,indices:x}=n.get("size");b=x.length,v=s;for(let e=0;e<b;++e){const t=w[2*x[e]],n=w[2*x[e]+1];for(let e=0;e<6;++e)u.set(v,0,t),u.set(v,1,n),v++}if((0,Lt.uO)(n.get("rotation"),d,s,6),n.get("centerOffsetAndDistance")?(0,Lt.Ut)(n.get("centerOffsetAndDistance"),h,s,6):(0,Lt.Pq)(h,s,6*b),n.get("featureAttribute")?(0,Lt.Ut)(n.get("featureAttribute"),f,s,6):(0,Lt.Pq)(f,s,6*b),null!=r){const e=n.get("position")?.indices;if(e){const t=e.length,n=i.getField("olidColor",Ft.XP);(0,Lt.vx)(r,n,t,s,6)}}return{numVerticesPerItem:6,numItems:b}}intersect(e,t,n,r,i,s,o){const{options:{selectionMode:a,hud:l,excludeLabels:c},point:u,camera:d}=r;if(!a||!l||c&&t.isLabel||!u)return;const h=this.layout.createView(e),f=h.getField("position",Ft.xs),p=h.getField("normal",Ft.xs),m=h.getField("rotation",Ft.Y$),g=h.getField("size",Ft.gH),y=h.getField("featureAttribute",Ft.Eq),_=h.getField("centerOffsetAndDistance",Ft.Eq),b="screen"===t.centerOffsetUnits,v=(0,qt.c)(t);if(null==f||null==p||null==m||null==g||null==_||null==d)return;const w=null==y?null:y.getVec(0,Cn),{scaleX:x,scaleY:S}=Mn(w,t,d.pixelRatio),A=f.count/6;for(let e=0;e<A;e++){const i=6*e;if(f.getVec(i,un),null!=n&&(0,le.f)(un,un,n),(0,le.t)(un,un,d.viewMatrix),_.getVec(i,vn),(0,le.i)(wn,vn[0],vn[1],vn[2]),!b&&(un[0]+=wn[0],un[1]+=wn[1],0!==wn[2])){const e=wn[2];(0,le.n)(wn,un),(0,le.d)(un,un,(0,le.g)(wn,wn,e))}if(p.getVec(i,dn),an(dn,yn,d,Sn),Fn(t,un,Sn,d,cn),d.applyProjection(un,hn),hn[0]>-1){b&&(wn[0]||wn[1])&&(hn[0]+=wn[0]*d.pixelRatio,0!==wn[1]&&(hn[1]+=(0,Bt.m0)(wn[1],cn.factorAlignment)*d.pixelRatio),d.unapplyProjection(hn,un)),hn[0]+=t.screenOffset[0]*d.pixelRatio,hn[1]+=t.screenOffset[1]*d.pixelRatio,hn[0]=Math.floor(hn[0]),hn[1]=Math.floor(hn[1]),g.getVec(i,Tn),(0,Bt.MD)(Tn,cn.factor,Tn);const n=An*d.pixelRatio;let s=0;t.textureIsSignedDistanceField&&(s=Math.min(t.outlineSize,.5*Tn[0])*d.pixelRatio/2),Tn[0]*=x,Tn[1]*=S;const a=m.get(i),l=t.rotation+a;if(ln(u,hn[0],hn[1],Tn,n,s,l,t,v)){const t=r.ray;if((0,le.t)(pn,un,(0,T.B8)(bn,d.viewMatrix)),hn[0]=u[0],hn[1]=u[1],d.unprojectFromRenderScreen(hn,un)){const n=(0,C.vt)();(0,le.c)(n,t.direction);const r=1/(0,le.l)(n);(0,le.g)(n,n,r),o((0,le.j)(t.origin,un)*r,n,e,pn)}}}}}}function Mn(e,t,n){return null==e||null==t.vvSize?{scaleX:n,scaleY:n}:((0,jt.VC)(xn,t,e),{scaleX:xn[0]*n,scaleY:xn[1]*n})}function Fn(e,t,n,r,i){if(!e.verticalOffset?.screenLength)return e.screenSizePerspective||e.screenSizePerspectiveAlignment?jn(e,i,(0,le.l)(t),n.cosAngle):(i.factor.scale=1,i.factorAlignment.scale=1),t;const s=(0,le.l)(t),o=e.screenSizePerspectiveAlignment??e.screenSizePerspective,a=(0,Gt.kE)(r,s,e.verticalOffset,n.cosAngle,o);return jn(e,i,s,n.cosAngle),(0,le.g)(n.normal,n.normal,a),(0,le.f)(t,t,n.normal)}function jn(e,t,n,r){null!=e.screenSizePerspective?(0,Bt.cJ)(r,n,e.screenSizePerspective,t.factor):(t.factor.scale=1,t.factor.factor=0,t.factor.minScaleFactor=0),null!=e.screenSizePerspectiveAlignment?(0,Bt.cJ)(r,n,e.screenSizePerspectiveAlignment,t.factorAlignment):(t.factorAlignment.factor=t.factor.factor,t.factorAlignment.scale=t.factor.scale,t.factorAlignment.minScaleFactor=t.factor.minScaleFactor)}class Dn{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this.globalViewingMode=1===e}createRenderCommandBuffer(e=[],t=[]){return{commands:e,transferList:t}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const n of e)null!=n&&(t.commands.push(...n.commands),t.transferList.push(...n.transferList));return t}async createTexture(e){const{data:t,parameters:n}=e();return await this._mainThreadDelegate.createTexture(t,n)}async releaseTexture(e){const t=this._destroyTexture(e);return new g(this,t,[])}_destroyTexture(e){return{commands:[{id:"destroy-texture",textureId:e}],transferList:[]}}async createMaterial(e){const{type:t,parameters:n}=e,r=Xe("material");let i,s;switch(t){case"default":i=new De.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,materialId:r,parameters:e.parameters};break;case"hud":i=new sn(n,this.globalViewingMode),s={type:t,materialId:r,parameters:e.parameters}}return this._bufferWriters.set(r,i.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),r}destroyMaterial(e){return{commands:[{id:"destroy-material",materialId:e}],transferList:[]}}updateMaterial(e){return{commands:[{...e,id:"update-material"}],transferList:[]}}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}async destroyDirectRenderer(e){await this._mainThreadDelegate.destroyDirectRenderer(e)}addDirectRendererGeometry(e,t,n){const{materialId:r}=t;if(null==this._bufferWriters.get(r))throw new Error(`no bufferwriter found for material ${r}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,n);return this.addDirectRendererGeometryBuffer(r,e,i,s,n)}updateDirectRendererGeometry(e,t,n){const{materialId:r}=t;if(null==this._bufferWriters.get(r))throw new Error(`no bufferwriter found for material ${r}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,n);return this.updateDirectRendererGeometryBuffer(r,e,i,s,n)}addDirectRendererGeometryBuffer(e,t,n,r,i){const{objectIds:s,visibilities:o}=r;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:n,renderGeometryBufferItems:r,localOrigin:i}],transferList:[n.data,s.buffer,o.buffer]}}updateDirectRendererGeometryBuffer(e,t,n,r,i){const{objectIds:s,visibilities:o}=r;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:n,renderGeometryBufferItems:r,localOrigin:i}],transferList:[n.data,s.buffer,o.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=Xe("lod-renderer"),n=new Set,r={levels:e.levels.map(e=>({components:e.components.map(e=>{const t=e.attributes.get("position");if(!t||0===t.indices.length)throw new Error("positions attribute expected");const r=(0,G.tM)(t.indices.length/3),i=new Ot.j(r,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return n.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:i.bbMax,bbMin:i.bbMin}}}),minScreenSpaceRadius:e.minScreenSpaceRadius}))};return await this._mainThreadDelegate.createLodRenderer(t,r,Array.from(n)),t}destroyLodRenderer(e){return{commands:[{id:"destroy-lod-renderer",rendererId:e}],transferList:[]}}addLodInstances(e,t,n){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:n}],transferList:[n.featureIds.buffer,n.globalTransforms.buffer,n.localTransforms.buffer,n.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,n){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:n}],transferList:[n.buffer]}}updateVisibility(e,t,n){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:n}],transferList:[n.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t){const{materialId:n,visibilities:r,objectIds:i}=e,s=this._bufferWriters.get(n);if(null==s)throw new Error("no registered bufferWriter for material found");let o=null;if(e.transformation&&t)(0,T.C)(kn,e.transformation),kn[12]-=t[0],kn[13]-=t[1],kn[14]-=t[2],o=kn;else{if(t)throw new Error("not implemented");e.transformation&&(o=e.transformation)}let a=null;o&&((0,T.B8)(zn,kn),(0,T.mg)(zn,zn),a=zn);const l=e.attributes,c=s.elementCount(l),u=s.layout.stride/4;c>Math.floor(Vn/u)&&console.warn("geometry with very large number of elements encountered");const d=s.layout.createBuffer(c),h=s.write(o,a,l,e.olidColor,d,0);if(null==h)throw new Error("Bufferwriter.write does not provide item information.");if(r.length!==h.numItems||i.length!==h.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:d.buffer,elementCount:c},renderGeometryBufferItems:{objectIds:i,visibilities:r,ranges:{numVertices:h.numVerticesPerItem,numItems:h.numItems}}}}}const kn=(0,x.vt)(),zn=(0,x.vt)(),Vn=4194304;var En=n(98764),Bn=n(65806);const Un=(0,C.vt)();var Ln=n(17352),Gn=n(97937);function qn(e,t,n=function(e){return{operations:e,value:e.create()}}(e)){return n.operations=e,e.copy(t,n.value),n}const Hn=2**50;function Nn(e,t,n,r){return e.operations.setAltitudeAt(e.value,t,n,r)}function $n(e,t,n){return e.operations.elevate(e.value,t,n.value)}const Zn=(0,C.vt)();(0,C.vt)();var Yn=n(44280),Wn=n(32114);function Jn(e){return"point"===e.type}class Xn{constructor(e,t,n,r){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=n,this._coordinateSystem=r,this._tmpCoordinateSystem=function(e){const{value:t,operations:n}=e;return{operations:n,value:n.create(t)}}(r),this.referenceEllipsoid=(0,he.tO)(t),this.sphericalPCPF=(0,En.lO)(t)}set extent(e){e&&function(e,t,n){e.operations.setExtent(e.value,t,n.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return e=this._coordinateSystem,t=(0,R.vt)(),e.operations.getExtent(e.value,t),t;var e,t}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,n=e){return Nn(this._coordinateSystem,n,t,e)}setAltitudeOfTransformation(e,t){var n,r,i,s;n=this._coordinateSystem,i=e,(r=t)!==(s=t)&&(0,T.C)(s,r),(0,le.i)(Zn,s[12],s[13],s[14]),Nn(n,Zn,i,Zn),s[12]=Zn[0],s[13]=Zn[1],s[14]=Zn[2]}worldUpAtPosition(e,t){return function(e,t,n){return e.operations.axisAt(e.value,t,2,n)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,n){return function(e,t,n,r){return e.operations.axisAt(e.value,t,n,r)}(this._coordinateSystem,e,t,n)}basisMatrixAtPosition(e,t){const n=this.worldBasisAtPosition(e,0,Wn.rq.get()),r=this.worldBasisAtPosition(e,1,Wn.rq.get()),i=this.worldBasisAtPosition(e,2,Wn.rq.get());return(0,T.hZ)(t,n[0],n[1],n[2],0,r[0],r[1],r[2],0,i[0],i[1],i[2],0,0,0,0,1),t}headingAtPosition(e,t){const n=this.worldUpAtPosition(e,Wn.rq.get()),r=this.worldBasisAtPosition(e,1,Wn.rq.get()),i=(0,Yn.EJ)(t,r,n);return(0,j.KJ)(i)}intersectManifoldClosestSilhouette(e,t,n){return $n(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,n){e.operations.intersectRayClosestSilhouette(e.value,t,n)}(this._tmpCoordinateSystem,e,n),n}intersectManifold(e,t,n){$n(this._coordinateSystem,t,this._tmpCoordinateSystem);const r=Wn.rq.get();return function(e,t,n){return e.operations.intersectRay(e.value,t,n)}(this._tmpCoordinateSystem,e,r)?(0,le.c)(n,r):null}intersectInfiniteManifold(e,t,n){if(1===this.viewingMode)return this.intersectManifold(e,t,n);$n(this._coordinateSystem,t,this._tmpCoordinateSystem);const r=this._tmpCoordinateSystem.value,i=Wn.rq.get();return(0,de.Ui)(r.plane,e,i)?(0,le.c)(n,i):null}toRenderCoords(e,t,n){return Jn(e)?(0,Bn.g)(e,t,this.spatialReference):(0,E.F)(e,t,n,this.spatialReference)}fromRenderCoords(e,t,n=null){return Jn(t)?(null!=n&&(t.spatialReference=n),function(e,t,n){return!!(0,E.F)(e,t,Un,n.spatialReference)&&(n.x=Un[0],n.y=Un[1],n.z=Un[2],!0)}(e,this.spatialReference,t)?t:null):(0,E.F)(e,this.spatialReference,t,n)?t:null}static create(e,t){switch(e){case 2:return new Xn(2,t,(0,I.GA)(t),qn(Ln.b,(0,Ln.f)([0,0,0],[Hn,0,0],[0,Hn,0])));case 1:return new Xn(1,t,1,function(e){return qn(Gn.s,(0,Gn.f)(0,0,0,(0,he.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,I.KX)(e)/(0,I.KX)(t)}}let Qn=class extends i.nJ{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new ht,this._tileLocks=new st,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null,this._mainThreadDelegate=null,this._viewSpatialReference=null,this._renderCommandContext=null,this._context=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:n,layerInfo:r,layerViewInfo:i}){const s=h.A.fromJSON(e);this._viewSpatialReference=s;const a=h.A.fromJSON(t);this._fetcher=new Pt(this._viewSpatialReference,p.A.fromJSON(r.baseQuery),r.url,r.objectIdField,r.capabilities),this._queryEngine=new f.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:r.objectIdField},fieldsIndex:r.fieldIndex,availableFields:[r.objectIdField],spatialReference:e,featureStore:this._featureStore,timeInfo:r.timeInfo}),this._mainThreadDelegate={createTexture:async(e,t)=>{const n={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",n,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},destroyMaterial:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},destroyDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyDirectRenderer",t)},createLodRenderer:async(e,t,n)=>{const r={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",r,{transferList:n})},destroyLodRenderer:async e=>{const t={rendererId:e};await this.remoteClient.invoke("destroyLoDRenderer",t)},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})}};const l=Xn.create(n,a),c=new Dn(n,this._mainThreadDelegate);this._renderCommandContext=c;const m=new qe(s,a,this._mainThreadDelegate,l,c,r,i);this._context=m,this._renderer=m.symbolRendererFactory.createSymbolRendererFromJSON(r.renderer),this._defaultQueryJSON=new p.A({outSpatialReference:s}).toJSON();let g=null;if(null!=r.fullExtent){const e=u.A.fromJSON(r.fullExtent);await(0,d.initializeProjection)(e.spatialReference,s),g=(0,d.project)(e,s)}return this._tileManager=new et({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),tileLocks:this._tileLocks,extent:g}),this.addHandles((0,o.wB)(()=>this.updating,e=>{this.emit("notify-updating",{updating:e})}),o.Vh),null!=this._renderer&&await this._renderer.load(),er}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const n=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(n)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}onTileTreeChange(e){return this._tileManager.onTileTreeChange(e),Promise.resolve(er)}async onElevationChange(e){return er}async onLayerViewOpacityChange(e){const{_context:t,_renderer:n}=this;if(t.layerViewInfo.fullOpacity=e,null==n)return er;const r=await n.createUpdateLayerViewOpacityCommand(e);return await r.execute(),er}async onRendererChange(e){const{_context:t}=this,n=t.symbolRendererFactory.createSymbolRendererFromJSON(e);await n.load();const i=this._renderer;this._renderer=n;const s=[...this._tileManager.loadedTiles()],o=s.map(e=>e.tileId);{const e={stack:[],error:void 0,hasError:!1};try{(0,r.mS)(e,await this._tileLocks.lock(o),!1);const a=s.flatMap(e=>[i.createRemoveCommand(e.id),n.createAddCommand(e)]),l=await Promise.all(a),c=t.joinPipelineCommands(l);await c.execute()}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}const a=await i.createDestroyCommand();return await a.execute(),er}async _createAddFeatureDataCommand(e,t){const n=this._featureStore,r=this._renderer;let i;return i=null!=r?await r.createAddCommand(e):g.create(this._renderCommandContext),(0,s.Te)(t),i.appendPipelineStateCommand(()=>{n.addTile(e)}),i}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,n=this._renderer;let r;return r=null!=n?await n.createRemoveCommand(e):g.create(this._renderCommandContext),r.appendPipelineStateCommand(()=>{t.removeTile(e)}),r}async _createUpdateFeatureDataVisibilityCommand(e,t){const n=this._renderer;let r;return r=null!=n?await n.createUpdateVisibilityCommand(e):g.create(this._renderCommandContext),(0,s.Te)(t),r}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,r.Cg)([(0,a.MZ)()],Qn.prototype,"updating",null),Qn=(0,r.Cg)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Qn);const Kn=Qn,er={result:void 0}},77548:(e,t,n)=>{n.d(t,{Gh:()=>m,tk:()=>d,BR:()=>u,wI:()=>c,G$:()=>f,$x:()=>h,Ov:()=>a,W_:()=>l,OP:()=>p,TU:()=>o,XX:()=>s});var r=n(70333),i=n(78888);n(7762),n(84952),n(36563),n(36708),new WeakMap;const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function c(e,t){const n=r.id?.findServerInfo(e);if(null!=n?.currentVersion)return n.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,i.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function u(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function d(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function h(e,t){return null}function f(e){return null}function p(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function m(e,t){if(!t||!p(e))return;const n=(e.url,null);n&&(e.url=n)}},80451:(e,t,n)=>{n.d(t,{rS:()=>p,gK:()=>f}),n(44208);var r,i=n(53177),s=n(76357),o=n(31635),a=(n(53966),n(87811),n(49186),n(93223)),l=n(40608);let c=class extends s.A{static{r=this}constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,o.Cg)([(0,a.e)({inherited:"inherited"})],c.prototype,"type",void 0),c=r=(0,o.Cg)([(0,l.$)("esri.layers.support.InheritedDomain")],c);var u,d=n(10107);let h=class extends s.A{static{u=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new u({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]},isRequired:!0}}})],h.prototype,"maxValue",void 0),(0,o.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]},isRequired:!0}}})],h.prototype,"minValue",void 0),(0,o.Cg)([(0,a.e)({range:"range"})],h.prototype,"type",void 0),h=u=(0,o.Cg)([(0,l.$)("esri.layers.support.RangeDomain")],h);const f={key:"type",base:s.A,typeMap:{range:h,"coded-value":i.A,inherited:c}};function p(e){if(!e?.type)return null;switch(e.type){case"range":return h.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return c.fromJSON(e)}return null}},80893:(e,t,n)=>{n.d(t,{IJ:()=>p,Jf:()=>_,Pk:()=>g,eW:()=>f,gW:()=>y,kS:()=>m});var r=n(78888),i=n(84952),s=n(65864),o=n(17136),a=n(21325),l=n(10536),c=n(66208),u=n(58501);const d="Layer does not support extent calculation.";function h(e,t,n){const r=e.geometry,i=e.toJSON();delete i.compactGeometryEnabled,delete i.defaultSpatialReferenceEnabled;const o=i;let l,c,u;if(r&&(c=r.spatialReference,u=(0,a.YX)(c),o.geometryType=(0,s.$B)(r),o.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const n=e.toJSON();return delete n.spatialReference,JSON.stringify(n)}(r,e.compactGeometryEnabled),o.inSR=u),i.groupByFieldsForStatistics&&(o.groupByFieldsForStatistics=i.groupByFieldsForStatistics.join(",")),i.objectIds)switch(n?.uniqueIdFields?.length){case void 0:o.objectIds=i.objectIds.join(",");break;case 1:o.uniqueIds=JSON.stringify(i.objectIds),delete o.objectIds;break;default:o.uniqueIds=JSON.stringify(i.objectIds.map(e=>JSON.parse(e))),delete o.objectIds}if(i.orderByFields&&(o.orderByFields=i.orderByFields.join(",")),!i.outFields||!i.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete o.outFields:i.outFields.includes("*")?o.outFields="*":o.outFields=i.outFields.join(","),i.outSR?(o.outSR=(0,a.YX)(i.outSR),l=e.outSpatialReference):r&&(i.returnGeometry||i.returnCentroid)&&(o.outSR=o.inSR,l=c),i.returnGeometry&&delete i.returnGeometry,i.outStatistics&&(o.outStatistics=JSON.stringify(i.outStatistics)),i.fullText&&(o.fullText=JSON.stringify(i.fullText)),i.pixelSize&&(o.pixelSize=JSON.stringify(i.pixelSize)),i.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=c&&null!=e.quantizationParameters?.extent&&c.equals(e.quantizationParameters.extent.spatialReference)&&delete i.quantizationParameters.extent.spatialReference,o.quantizationParameters=JSON.stringify(i.quantizationParameters)),i.parameterValues&&(o.parameterValues=JSON.stringify(i.parameterValues)),i.rangeValues&&(o.rangeValues=JSON.stringify(i.rangeValues)),i.dynamicDataSource&&(o.layer=JSON.stringify({source:i.dynamicDataSource}),delete i.dynamicDataSource),i.timeExtent){const e=i.timeExtent,{start:t,end:n}=e;null==t&&null==n||(o.time=t===n?t:`${t??"null"},${n??"null"}`),delete i.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=c&&null!=l&&c.equals(l)&&(o.defaultSR=o.inSR,delete o.inSR,delete o.outSR),o}async function f(e,t,n,r,i){const s=t.timeExtent?.isEmpty?{data:{features:[]}}:await v(e,t,"json",r,void 0,i);return(0,u.q)(t,n,s.data),s}async function p(e,t,n,r,i){if(t.timeExtent?.isEmpty)return{data:n.createFeatureResult()};const s=await m(e,t,r,i),o=s;return o.data=(0,c.m)(s.data,n),o}function m(e,t,n,r){return v(e,t,"pbf",n,void 0,r)}function g(e,t,n,r){return t.timeExtent?.isEmpty?Promise.resolve({data:{objectIds:[]}}):v(e,t,"json",n,{returnIdsOnly:!0},r)}function y(e,t,n,r){return t.timeExtent?.isEmpty?Promise.resolve({data:{count:0}}):v(e,t,"json",n,{returnIdsOnly:!0,returnCountOnly:!0},r)}async function _(e,t,n){if(t.timeExtent?.isEmpty)return{data:{count:0,extent:null}};const r=await v(e,t,"json",n,{returnExtentOnly:!0,returnCountOnly:!0}),i=r.data;if(i.hasOwnProperty("extent"))return r;if(i.features)throw new Error(d);if(i.hasOwnProperty("count"))throw new Error(d);return r}function b(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;const n={...e,returnUniqueIdsOnly:!0};return delete n.returnIdsOnly,n}async function v(e,t,n,s={},a={},c={}){const u="string"==typeof e?(0,i.An)(e):e,d=t.geometry?[t.geometry]:[],f=await(0,o.el)(d,null,{signal:s.signal}),p=f?.[0];null!=p&&((t=t.clone()).geometry=p);const m=(0,l.z)({...u.query,f:n,...b(a,c),...h(t,a,c)});return(0,r.A)((0,i.fj)(u.path,(g=a,null==t.formatOf3DObjects||g.returnCountOnly||g.returnExtentOnly||g.returnIdsOnly?"query":"query3d")),{...s,responseType:"pbf"===n?"array-buffer":"json",query:{...m,...s.query}});var g}},81961:(e,t,n)=>{n.d(t,{V:()=>i});var r=n(74333);class i extends r.n{constructor(e,t,n){super(e,"vec4",2,(r,i,s)=>r.setUniform4fv(e,t(i,s),n))}}},87582:(e,t,n)=>{n(6867),n(65215).R},95696:(e,t,n)=>{n.d(t,{A:()=>u});var r,i=n(31635),s=n(69540),o=n(25482),a=n(10107),l=(n(44208),n(53966),n(87811),n(93223)),c=n(40608);let u=class extends((0,s.O)(o.o)){static{r=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,i.Cg)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,i.Cg)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},96576:(e,t,n)=>{n.d(t,{A:()=>h});var r,i=n(31635),s=n(4718),o=n(10107),a=(n(44208),n(53966),n(93223)),l=n(40608),c=n(92438),u=n(63988),d=n(49849);let h=r=class extends((0,u.h)(c.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(n=>n.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new r({description:this.description,label:this.label,symbol:(0,s.o8)(this.symbol),visualVariables:(0,s.o8)(this.visualVariables),authoringInfo:(0,s.o8)(this.authoringInfo)})}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"label",void 0),(0,i.Cg)([(0,o.MZ)(d.Wp)],h.prototype,"symbol",void 0),(0,i.Cg)([(0,a.e)({simple:"simple"})],h.prototype,"type",void 0),h=r=(0,i.Cg)([(0,l.$)("esri.renderers.SimpleRenderer")],h)},98453:(e,t,n)=>{n.d(t,{m:()=>r});const r=new(n(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},98988:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>Z,getTransformation:()=>U,getTransformations:()=>L,initializeProjection:()=>W,isEqualBaseGCS:()=>Y,isLoaded:()=>M,isLoadedOrLoad:()=>F,isLoadedOrLoadFor:()=>j,load:()=>k,project:()=>z,projectExtent:()=>se,projectMany:()=>V,projectMultipoint:()=>K,projectOrLoad:()=>E,projectOrLoadMany:()=>B,projectPoint:()=>X,projectPolygon:()=>re,projectPolyline:()=>te,projectWithZConversion:()=>$,projectWithoutEngine:()=>J,requiresLoad:()=>D,test:()=>H,tryProjectWithZConversion:()=>N,unload:()=>q});var r=n(49186),i=n(74887),s=n(62788),o=n(95488),a=n(51850),l=n(21276),c=n(73941),u=n(5443),d=n(48526),h=n(83290),f=n(86738),p=n(39829),m=n(82799),g=n(16930),y=n(9762),_=n(37539);function b(e,t,n,r,i,s){return v[0]=e,v[1]=t,v[2]=n,(0,y.projectBuffer)(v,r,0,i,s,0)}const v=(0,a.vt)();let w=0;class x{static fromGE(e){const t=new x;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=w++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=w++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=w++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=w++}getInverse(){const e=new x;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class C{static cacheKey(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}static fromGE(e){const t=new C;let n="";for(const r of e.steps){const e=x.fromGE(r);t.steps.push(e),n+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=n,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const t of e.steps)t instanceof x?this.steps.push(t):this.steps.push(new x({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new C;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,n){this._cachedProjection[C.cacheKey(e,t)]=n}getCachedGeTransformation(e,t){let n="";for(const e of this.steps)n+=e.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const r=this._cachedProjection[C.cacheKey(e,t)];return void 0===r?null:r}}var S=n(21325),A=n(62815);let I=null,T=null,P=null,O={};const R=new o.I;function M(){return!!I&&(0,h.i)()}function F(){return!!M()||((0,s.gc)(R),k(),!1)}function j(e,t){return!e||!t||Z(e,t)||F()}function D(e,t){return!Z(e,t)&&!M()}function k(e){return null==P&&(P=Promise.all([(0,h.l)(),n.e(9930).then(n.bind(n,49930)).then(e=>e.g),n.e(2731).then(n.bind(n,12731))])),P.then(([,t,{hydratedAdapter:n}])=>{(0,i.Te)(e),T=n,I=t.default,I._enableProjection(h.p),R.notify()})}function z(e,t,n=null,r=null){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),V(T,e,e[0].spatialReference,t,n,r)):((0,l.f)(e),V(T,[e],e.spatialReference,t,n,r)[0])}function V(e,t,n,r,i=null,s=null){if(null==n||null==r)return t;if(Z(n,r,i))return t.map(e=>J(e,n,r));if(null==i&&(0,c.jA)(n))return t.map(e=>J(e,n,g.A.WGS84)).map(e=>N(e,r));if(null==i&&(0,c.jA)(r))return t.map(e=>N(e,g.A.WGS84)).map(e=>J(e,g.A.WGS84,r));if(null==i){const e=C.cacheKey(n,r);void 0!==O[e]?i=O[e]:(null==(i=U(n,r,void 0))&&(i=new C),O[e]=i)}if(null==I||null==e)throw new G;return null!=s?I._project(e,t,n,r,i,s):I._project(e,t,n,r,i)}function E(e,t){const n=B([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function B(e,t){if(!M())for(const n of e)if(null!=n&&!(0,S.aI)(n.spatialReference,t)&&(0,S.fn)(n.spatialReference)&&(0,S.fn)(t)&&!Z(n.spatialReference,t))return(0,s.gc)(R),{pending:k(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,S.aI)(e.spatialReference,t)?e:(0,S.fn)(e.spatialReference)&&(0,S.fn)(t)?N(e,t):null)}}function U(e,t,n=null){if(null==e||null==t)return null;if(null==I||null==T)throw new G;const r=I._getTransformation(T,e,t,n,n?.spatialReference);return null!==r?C.fromGE(r):null}function L(e,t,n=null){if(null==I||null==T)throw new G;const r=I._getTransformationBySuitability(T,e,t,n,n?.spatialReference);if(null!==r){const e=[];for(const t of r)e.push(C.fromGE(t));return e}return[]}class G extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function q(){I=null,T=null,P=null,O={}}const H={get loadPromise(){return P}};function N(e,t){try{const n=z(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const r=(0,A.N)(n.type,e.spatialReference,t);return null!=r&&r(n),n}catch(e){if(!(e instanceof G))throw e;return null}}async function $(e,t,n){const r=e.spatialReference;return null!=r&&null!=t&&await W(r,t,null,n),N(e,t)}function Z(e,t,n){return!n&&(!!(0,S.aI)(e,t)||(0,S.fn)(e)&&(0,S.fn)(t)&&!!(0,_.jd)(e,t))}function Y(e,t){if((0,S.aI)(e,t))return!0;if(!(0,S.fn)(e)||!(0,S.fn)(t))return!1;const n=(0,S.oT)(e)||(0,S.K8)(e)||(0,S.x1)(e),r=(0,S.oT)(t)||(0,S.K8)(t)||(0,S.x1)(t);return n&&r}async function W(e,t,n,r){if(M())return(0,i.NO)(r);if(Array.isArray(e)){for(const{source:t,dest:n,geographicTransformation:i}of e)if(t&&n&&!Z(t,n,i))return k(r)}else if(e&&t&&!Z(e,t,n))return k(r);return(0,i.NO)(r)}function J(e,t,n){return e?"x"in e?Q(e,t,new f.A,n,0):"xmin"in e?oe(e,t,new u.A,n,0):"rings"in e?ie(e,t,new p.A,n,0):"paths"in e?ne(e,t,new m.A,n,0):"points"in e?ee(e,t,new d.A,n,0):null:null}function X(e,t,n=t.spatialReference,r=0){return null!=n&&null!=e.spatialReference&&null!=Q(e,e.spatialReference,t,n,r)}function Q(e,t,n,r,i){le[0]=e.x,le[1]=e.y;const s=e.z;return le[2]=void 0!==s?s:i,(0,y.projectBuffer)(le,t,0,le,r,0)?(n.x=le[0],n.y=le[1],n.spatialReference=r,void 0!==s||(0,c.xP)(r)?(n.z=le[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function K(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=ee(e,e.spatialReference,t,n,r)}function ee(e,t,n,r,i){const{points:s,hasZ:o,hasM:a}=e,l=[],u=s.length,d=[];for(const e of s)d.push(e[0],e[1],o?e[2]:i);if(!(0,y.projectBuffer)(d,t,0,d,r,0,u))return null;const h=o||(0,c.xP)(r);for(let e=0;e<u;++e){const t=3*e,n=d[t],r=d[t+1];h&&a?l.push([n,r,d[t+2],s[e][3]]):h?l.push([n,r,d[t+2]]):a?l.push([n,r,s[e][2]]):l.push([n,r])}return n.points=l,n.spatialReference=r,n.hasZ=o,n.hasM=a,n}function te(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=ne(e,e.spatialReference,t,n,r)}function ne(e,t,n,r,i){const{paths:s,hasZ:o,hasM:a}=e,l=[];if(!ae(s,o??!1,a??!1,t,l,r,i))return null;const u=o||(0,c.xP)(r);return n.paths=l,n.spatialReference=r,n.hasZ=u,n.hasM=a,n}function re(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,r)}function ie(e,t,n,r,i){const{rings:s,hasZ:o,hasM:a}=e,l=[];if(!ae(s,o??!1,a??!1,t,l,r,i))return null;const u=o||(0,c.xP)(r);return n.rings=l,n.spatialReference=r,n.hasZ=u,n.hasM=a,n}function se(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=oe(e,e.spatialReference,t,n,r)}function oe(e,t,n,r,i){const{xmin:s,ymin:o,xmax:a,ymax:l,hasZ:u,hasM:d}=e;if(!b(s,o,u?e.zmin:i,t,le,r))return null;const h=u||(0,c.xP)(r);return n.xmin=le[0],n.ymin=le[1],h&&(n.zmin=le[2]),b(a,l,u?e.zmax:i,t,le,r)?(n.xmax=le[0],n.ymax=le[1],h&&(n.zmax=le[2]),d&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,n):null}function ae(e,t,n,r,i,s,o=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:o);if(!(0,y.projectBuffer)(a,r,0,a,s,0))return!1;let l=0;i.length=0;const u=t||(0,c.xP)(s);for(const t of e){const e=new Array;for(const r of t)u&&n?e.push([a[l++],a[l++],a[l++],r[3]]):u?e.push([a[l++],a[l++],a[l++]]):n?(e.push([a[l++],a[l++],r[2]]),l++):(e.push([a[l++],a[l++]]),l++);i.push(e)}return!0}const le=(0,a.vt)()}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6357],{1123:(e,t,n)=>{n.r(t),n.d(t,{invokeGeometryOp:()=>s});var r=n(65864);function i(e,t){let n;return{loaded:!1,load:()=>n??=t().then(t=>{a[e]={loaded:!0,execute:t}})}}function o(e){return null==e?null:e.toJSON()}const a={disjoint:i("disjoint",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(1598)]).then(n.bind(n,7978)).then(e=>e.execute)),intersects:i("intersects",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(7360)]).then(n.bind(n,55284)).then(e=>e.execute)),touches:i("touches",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(2503)]).then(n.bind(n,83547)).then(e=>e.execute)),crosses:i("crosses",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(9700)]).then(n.bind(n,85672)).then(e=>e.execute)),within:i("within",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(9265)]).then(n.bind(n,85445)).then(e=>e.execute)),contains:i("contains",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(1867)]).then(n.bind(n,29127)).then(e=>e.execute)),overlaps:i("overlaps",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(1414)]).then(n.bind(n,46178)).then(e=>e.execute)),equals:i("equals",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5180)]).then(n.bind(n,45328));return(t,n)=>e.execute((0,r.rS)(t),(0,r.rS)(n))}),relate:i("relate",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5552)]).then(n.bind(n,43628));return(t,n,i)=>e.execute((0,r.rS)(t),(0,r.rS)(n),i)}),intersection:i("intersection",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(9263)]).then(n.bind(n,49263)).then(e=>e.execute)),union:i("union",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(6339)]).then(n.bind(n,56339)).then(e=>e.executeMany)),difference:i("difference",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(3054)]).then(n.bind(n,93054));return(t,n)=>o(e.execute((0,r.rS)(t),(0,r.rS)(n)))}),symmetricDifference:i("symmetricDifference",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(9041)]).then(n.bind(n,89041));return(t,n)=>o(e.execute((0,r.rS)(t),(0,r.rS)(n)))}),clip:i("clip",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(4815)]).then(n.bind(n,24815));return(t,n)=>o(e.execute((0,r.rS)(t),(0,r.rS)(n)))}),cut:i("cut",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(7817)]).then(n.bind(n,37817));return(t,n)=>e.execute((0,r.rS)(t),(0,r.rS)(n)).map(e=>o(e))}),area:i("area",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(3236)]).then(n.bind(n,95624)),{convertFromSpatialReferenceUnit:t,toAreaUnit:i}=await n.e(547).then(n.bind(n,40547));return(n,o)=>{const a=e.execute((0,r.rS)(n));return t(n.spatialReference,i(o),a)}}),geodeticArea:i("geodeticArea",async()=>{const e=await n.e(9506).then(n.bind(n,89506)),{convert:t,squareMeters:i,toAreaUnit:o}=await n.e(547).then(n.bind(n,40547));return await e.load(),(n,a,s)=>{const c=e.execute((0,r.rS)(n),{curveType:s});return t(i,o(a),c)}}),length:i("length",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(7074)]).then(n.bind(n,51190)),{convertFromSpatialReferenceUnit:t,toLengthUnit:r}=await n.e(547).then(n.bind(n,40547));return(n,i)=>{const o=e.execute(n);return t(n.spatialReference,r(i),o)}}),geodeticLength:i("geodeticLength",async()=>{const e=await n.e(427).then(n.bind(n,40427)),{convert:t,meters:i,toLengthUnit:o}=await n.e(547).then(n.bind(n,40547));return await e.load(),(n,a,s)=>{const c=e.execute((0,r.rS)(n),{curveType:s});return t(i,o(a),c)}}),distance:i("distance",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(9202)]).then(n.bind(n,77038)),{convertFromSpatialReferenceUnit:t,toLengthUnit:i}=await n.e(547).then(n.bind(n,40547));return(n,o,a)=>{const s=e.execute((0,r.rS)(n),(0,r.rS)(o));return t(n.spatialReference,i(a),s)}}),densify:i("densify",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(8411)]).then(n.bind(n,88411)),{convertToSpatialReferenceUnit:t,toLengthUnit:i}=await n.e(547).then(n.bind(n,40547));return(n,a,s)=>(a=t(i(s),n.spatialReference,a),o(e.execute((0,r.rS)(n),a)))}),geodeticDensify:i("geodeticDensify",async()=>{const e=await n.e(4097).then(n.bind(n,64097)),{convert:t,meters:i,toLengthUnit:a}=await n.e(547).then(n.bind(n,40547));return await e.load(),(n,s,c,l)=>(s=t(a(c),i,s),o(e.execute((0,r.rS)(n),s,{curveType:l})))}),generalize:i("generalize",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(591)]).then(n.bind(n,60591)),{convertToSpatialReferenceUnit:t,toLengthUnit:i}=await n.e(547).then(n.bind(n,40547));return(n,a,s,c)=>(a=t(i(s),n.spatialReference,a),o(e.execute((0,r.rS)(n),a,c)))}),buffer:i("buffer",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(1253),n.e(1412)]).then(n.bind(n,46160)),{convertToSpatialReferenceUnit:t,toLengthUnit:r}=await n.e(547).then(n.bind(n,40547));return(n,i,o)=>(i=t(r(o),n.spatialReference,i),e.execute(n,i))}),geodesicBuffer:i("geodesicBuffer",async()=>{const e=await n.e(9159).then(n.bind(n,49159)),{convert:t,meters:r,toLengthUnit:i}=await n.e(547).then(n.bind(n,40547));return await e.load(),(n,o,a,s)=>(o=t(i(a),r,o),e.execute(n,o,{curveType:s}))}),offset:i("offset",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(7986)]).then(n.bind(n,15605)),{convertToSpatialReferenceUnit:t,toLengthUnit:r}=await n.e(547).then(n.bind(n,40547));return(n,i,o,a)=>(i=t(r(o),n.spatialReference,i),e.execute(n,i,a))}),rotate:i("rotate",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(647)]).then(n.bind(n,50647)),{default:t}=await Promise.all([n.e(3661),n.e(1878),n.e(8812)]).then(n.bind(n,78812));return(n,i,a,s)=>{const c=(new t).rotate(i,a,s);return o(e.execute((0,r.rS)(n),c))}}),centroid:i("centroid",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(2657)]).then(n.bind(n,17077));return t=>o(e.execute((0,r.rS)(t)))}),labelPoint:i("labelPoint",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5913),n.e(1421)]).then(n.bind(n,91421));return t=>o(e.execute((0,r.rS)(t)))}),simplify:i("simplify",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(3637)]).then(n.bind(n,3637)).then(e=>e.execute)),isSelfIntersecting:i("isSelfIntersecting",async()=>{const{NonSimpleResult:e}=await n.e(4383).then(n.bind(n,24383)),t=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5874)]).then(n.bind(n,5874)),i=new Set([5,6,7,10,11,12]);return n=>{const o=new e;return!t.isSimple((0,r.rS)(n),o)&&i.has(o.m_reason)}}),isSimple:i("isSimple",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(3637)]).then(n.bind(n,3637)).then(e=>e.isSimple)),convexHull:i("convexHull",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5666)]).then(n.bind(n,55666)).then(e=>e.execute)),getNearestCoordinate:i("getNearestCoordinate",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(6468)]).then(n.bind(n,48032));return(t,n,i)=>{const a=e.getNearestCoordinate((0,r.rS)(t),(0,r.rS)(n),i);return{...a,coordinate:o(a.coordinate)}}}),getNearestVertex:i("getNearestVertex",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(6468)]).then(n.bind(n,48032));return(t,n)=>{const i=e.getNearestVertex((0,r.rS)(t),(0,r.rS)(n));return{...i,coordinate:o(i.coordinate)}}})};function s(e,t){const n=a[e];return n.loaded?n.execute.apply(void 0,t):n.load().then(()=>s(e,t))}},31635:(e,t,n)=>{function r(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function i(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}n.d(t,{Cg:()=>r,hk:()=>a,mS:()=>i}),Object.create,Object.create;var o="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function a(e){function t(t){e.error=e.hasError?new o(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function i(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(o).then(i,function(e){return t(e),i()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},65864:(e,t,n)=>{n.d(t,{$B:()=>y,Bi:()=>f,Rg:()=>h,U9:()=>u,ZC:()=>l,fT:()=>d,rS:()=>m,xD:()=>b});var r=n(5443),i=n(91075),o=n(48526),a=n(86738),s=n(39829),c=n(82799);function l(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function u(e){return void 0!==e.points}function d(e){return void 0!==e.x&&void 0!==e.y}function h(e){return void 0!==e.paths||void 0!==e.curvePaths}function f(e){return void 0!==e.rings||void 0!==e.curveRings}function m(e){return null==e?null:e instanceof i.A?e:d(e)?a.A.fromJSON(e):h(e)?c.A.fromJSON(e):f(e)?s.A.fromJSON(e):u(e)?o.A.fromJSON(e):l(e)?r.A.fromJSON(e):null}function y(e){return e?d(e)?"esriGeometryPoint":h(e)?"esriGeometryPolyline":f(e)?"esriGeometryPolygon":l(e)?"esriGeometryEnvelope":u(e)?"esriGeometryMultipoint":null:null}const p={esriGeometryPoint:a.A,esriGeometryPolyline:c.A,esriGeometryPolygon:s.A,esriGeometryEnvelope:r.A,esriGeometryMultipoint:o.A,esriGeometryMultiPatch:s.A};function b(e){return e&&p[e]||null}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6357],{1123:(e,t,n)=>{n.r(t),n.d(t,{invokeGeometryOp:()=>s});var r=n(65864);function i(e,t){let n;return{loaded:!1,load:()=>n??=t().then(t=>{a[e]={loaded:!0,execute:t}})}}function o(e){return null==e?null:e.toJSON()}const a={disjoint:i("disjoint",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(1598)]).then(n.bind(n,7978)).then(e=>e.execute)),intersects:i("intersects",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(7360)]).then(n.bind(n,55284)).then(e=>e.execute)),touches:i("touches",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(2503)]).then(n.bind(n,83547)).then(e=>e.execute)),crosses:i("crosses",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(9700)]).then(n.bind(n,85672)).then(e=>e.execute)),within:i("within",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(9265)]).then(n.bind(n,85445)).then(e=>e.execute)),contains:i("contains",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(1867)]).then(n.bind(n,29127)).then(e=>e.execute)),overlaps:i("overlaps",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(1414)]).then(n.bind(n,46178)).then(e=>e.execute)),equals:i("equals",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5180)]).then(n.bind(n,45328));return(t,n)=>e.execute((0,r.rS)(t),(0,r.rS)(n))}),relate:i("relate",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5552)]).then(n.bind(n,43628));return(t,n,i)=>e.execute((0,r.rS)(t),(0,r.rS)(n),i)}),intersection:i("intersection",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(9263)]).then(n.bind(n,49263)).then(e=>e.execute)),union:i("union",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(6339)]).then(n.bind(n,56339)).then(e=>e.executeMany)),difference:i("difference",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(3054)]).then(n.bind(n,93054));return(t,n)=>o(e.execute((0,r.rS)(t),(0,r.rS)(n)))}),symmetricDifference:i("symmetricDifference",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(9041)]).then(n.bind(n,89041));return(t,n)=>o(e.execute((0,r.rS)(t),(0,r.rS)(n)))}),clip:i("clip",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(4815)]).then(n.bind(n,24815));return(t,n)=>o(e.execute((0,r.rS)(t),(0,r.rS)(n)))}),cut:i("cut",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(7817)]).then(n.bind(n,37817));return(t,n)=>e.execute((0,r.rS)(t),(0,r.rS)(n)).map(e=>o(e))}),area:i("area",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(3236)]).then(n.bind(n,95624)),{convertFromSpatialReferenceUnit:t,toAreaUnit:i}=await n.e(547).then(n.bind(n,40547));return(n,o)=>{const a=e.execute((0,r.rS)(n));return t(n.spatialReference,i(o),a)}}),geodeticArea:i("geodeticArea",async()=>{const e=await n.e(9506).then(n.bind(n,89506)),{convert:t,squareMeters:i,toAreaUnit:o}=await n.e(547).then(n.bind(n,40547));return await e.load(),(n,a,s)=>{const c=e.execute((0,r.rS)(n),{curveType:s});return t(i,o(a),c)}}),length:i("length",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(7074)]).then(n.bind(n,51190)),{convertFromSpatialReferenceUnit:t,toLengthUnit:r}=await n.e(547).then(n.bind(n,40547));return(n,i)=>{const o=e.execute(n);return t(n.spatialReference,r(i),o)}}),geodeticLength:i("geodeticLength",async()=>{const e=await n.e(427).then(n.bind(n,40427)),{convert:t,meters:i,toLengthUnit:o}=await n.e(547).then(n.bind(n,40547));return await e.load(),(n,a,s)=>{const c=e.execute((0,r.rS)(n),{curveType:s});return t(i,o(a),c)}}),distance:i("distance",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(9202)]).then(n.bind(n,77038)),{convertFromSpatialReferenceUnit:t,toLengthUnit:i}=await n.e(547).then(n.bind(n,40547));return(n,o,a)=>{const s=e.execute((0,r.rS)(n),(0,r.rS)(o));return t(n.spatialReference,i(a),s)}}),densify:i("densify",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(8411)]).then(n.bind(n,88411)),{convertToSpatialReferenceUnit:t,toLengthUnit:i}=await n.e(547).then(n.bind(n,40547));return(n,a,s)=>(a=t(i(s),n.spatialReference,a),o(e.execute((0,r.rS)(n),a)))}),geodeticDensify:i("geodeticDensify",async()=>{const e=await n.e(4097).then(n.bind(n,64097)),{convert:t,meters:i,toLengthUnit:a}=await n.e(547).then(n.bind(n,40547));return await e.load(),(n,s,c,l)=>(s=t(a(c),i,s),o(e.execute((0,r.rS)(n),s,{curveType:l})))}),generalize:i("generalize",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(591)]).then(n.bind(n,60591)),{convertToSpatialReferenceUnit:t,toLengthUnit:i}=await n.e(547).then(n.bind(n,40547));return(n,a,s,c)=>(a=t(i(s),n.spatialReference,a),o(e.execute((0,r.rS)(n),a,c)))}),buffer:i("buffer",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(1352),n.e(3779)]).then(n.bind(n,46160)),{convertToSpatialReferenceUnit:t,toLengthUnit:r}=await n.e(547).then(n.bind(n,40547));return(n,i,o)=>(i=t(r(o),n.spatialReference,i),e.execute(n,i))}),geodesicBuffer:i("geodesicBuffer",async()=>{const e=await n.e(9159).then(n.bind(n,49159)),{convert:t,meters:r,toLengthUnit:i}=await n.e(547).then(n.bind(n,40547));return await e.load(),(n,o,a,s)=>(o=t(i(a),r,o),e.execute(n,o,{curveType:s}))}),offset:i("offset",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(7986)]).then(n.bind(n,15605)),{convertToSpatialReferenceUnit:t,toLengthUnit:r}=await n.e(547).then(n.bind(n,40547));return(n,i,o,a)=>(i=t(r(o),n.spatialReference,i),e.execute(n,i,a))}),rotate:i("rotate",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(647)]).then(n.bind(n,50647)),{default:t}=await Promise.all([n.e(3661),n.e(1878),n.e(8812)]).then(n.bind(n,78812));return(n,i,a,s)=>{const c=(new t).rotate(i,a,s);return o(e.execute((0,r.rS)(n),c))}}),centroid:i("centroid",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(2657)]).then(n.bind(n,17077));return t=>o(e.execute((0,r.rS)(t)))}),labelPoint:i("labelPoint",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5913),n.e(1421)]).then(n.bind(n,91421));return t=>o(e.execute((0,r.rS)(t)))}),simplify:i("simplify",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(3637)]).then(n.bind(n,3637)).then(e=>e.execute)),isSelfIntersecting:i("isSelfIntersecting",async()=>{const{NonSimpleResult:e}=await n.e(4383).then(n.bind(n,24383)),t=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5874)]).then(n.bind(n,5874)),i=new Set([5,6,7,10,11,12]);return n=>{const o=new e;return!t.isSimple((0,r.rS)(n),o)&&i.has(o.m_reason)}}),isSimple:i("isSimple",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(3637)]).then(n.bind(n,3637)).then(e=>e.isSimple)),convexHull:i("convexHull",()=>Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5666)]).then(n.bind(n,55666)).then(e=>e.execute)),getNearestCoordinate:i("getNearestCoordinate",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(6468)]).then(n.bind(n,48032));return(t,n,i)=>{const a=e.getNearestCoordinate((0,r.rS)(t),(0,r.rS)(n),i);return{...a,coordinate:o(a.coordinate)}}}),getNearestVertex:i("getNearestVertex",async()=>{const e=await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(6468)]).then(n.bind(n,48032));return(t,n)=>{const i=e.getNearestVertex((0,r.rS)(t),(0,r.rS)(n));return{...i,coordinate:o(i.coordinate)}}})};function s(e,t){const n=a[e];return n.loaded?n.execute.apply(void 0,t):n.load().then(()=>s(e,t))}},31635:(e,t,n)=>{function r(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function i(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}n.d(t,{Cg:()=>r,hk:()=>a,mS:()=>i}),Object.create,Object.create;var o="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function a(e){function t(t){e.error=e.hasError?new o(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function i(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(o).then(i,function(e){return t(e),i()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},65864:(e,t,n)=>{n.d(t,{$B:()=>y,Bi:()=>f,Rg:()=>h,U9:()=>u,ZC:()=>l,fT:()=>d,rS:()=>m,xD:()=>b});var r=n(5443),i=n(91075),o=n(48526),a=n(86738),s=n(39829),c=n(82799);function l(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function u(e){return void 0!==e.points}function d(e){return void 0!==e.x&&void 0!==e.y}function h(e){return void 0!==e.paths||void 0!==e.curvePaths}function f(e){return void 0!==e.rings||void 0!==e.curveRings}function m(e){return null==e?null:e instanceof i.A?e:d(e)?a.A.fromJSON(e):h(e)?c.A.fromJSON(e):f(e)?s.A.fromJSON(e):u(e)?o.A.fromJSON(e):l(e)?r.A.fromJSON(e):null}function y(e){return e?d(e)?"esriGeometryPoint":h(e)?"esriGeometryPolyline":f(e)?"esriGeometryPolygon":l(e)?"esriGeometryEnvelope":u(e)?"esriGeometryMultipoint":null:null}const p={esriGeometryPoint:a.A,esriGeometryPolyline:c.A,esriGeometryPolygon:s.A,esriGeometryEnvelope:r.A,esriGeometryMultipoint:o.A,esriGeometryMultiPatch:s.A};function b(e){return e&&p[e]||null}}}]);
|