@arcgis/core 5.2.0-next.70 → 5.2.0-next.71
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/arcgisGlobal.d.ts +0 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/43de723f765ec8f268ac.js +1 -0
- package/assets/esri/core/workers/chunks/{7ca9c908432b1afa0367.js → 5f31b375971ab067121e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5cf338cecfc81f23128.js → da484787bd9fd3b13d15.js} +1 -1
- package/assets/esri/core/workers/chunks/{de3d0973cff1e0858c52.js → fc2cae359d571690d754.js} +4 -4
- package/chunks/GaussianSplatDepth.glsl.js +4 -4
- package/chunks/GlobalIllumination.glsl.js +7 -7
- package/chunks/Viewshed.glsl.js +9 -5
- package/config.js +1 -1
- package/interfaces.d.ts +0 -14
- package/kernel.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/TextRasterizer.js +1 -1
- package/symbols/cim/richTextUtils.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/assets/esri/core/workers/chunks/7f4a592bcf4ecb55949a.js +0 -1
- package/popup/Feature.d.ts +0 -311
- package/popup/Feature.js +0 -2
- package/popup/Features.d.ts +0 -569
- package/popup/Features.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8520],{32488(t,e,r){r.d(e,{A:()=>k});const i=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],s=["آ","أ","إ","ا"],n=["ﻵ","ﻷ","ﻹ","ﻻ"],o=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],l=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],h=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],c=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],f=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],d=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],m=["ء","ف"],g=["غ","ي"],p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],y=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],S=10,_=11,x=12,M=18,b=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],w=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107],C=[[M,M,M,M,M,M,M,M,M,6,5,6,8,5,M,M,M,M,M,M,M,M,M,M,M,M,M,M,5,5,5,6,8,4,4,_,_,_,4,4,4,4,4,S,9,S,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,M,M,M,M,M,M,5,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,9,4,_,_,_,_,4,4,4,4,0,4,4,M,4,4,_,_,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,1,x,1,x,x,1,x,x,1,x,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,_,_,7,9,7,4,4,x,x,x,x,x,x,x,x,x,x,x,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,3,3,3,3,3,3,3,3,3,3,_,3,3,7,7,7,x,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,x,x,x,x,x,x,x,3,4,x,x,x,x,x,x,7,7,x,x,4,x,x,x,x,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,x,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,x,x,x,x,x,x,x,x,x,x,x,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,x,x,x,x,x,x,x,x,x,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,M,M,M,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,_,_,_,_,_,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,M,M,M,M,M,4,4,4,4,4,M,M,M,M,M,M,2,0,4,4,2,2,2,2,2,2,S,S,4,4,4,0,2,2,2,2,2,2,2,2,2,2,S,S,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,x,1,1,1,1,1,1,1,1,1,1,S,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,x,x,x,x,x,x,x,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,4,9,4,4,4,4,4,4,4,4,4,_,4,4,S,S,4,4,4,4,4,_,_,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,M],[4,4,4,_,_,_,4,4,4,4,4,S,9,S,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,_,_,4,4,4,_,_,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];class k{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,r){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,r){Y=[],Z=[];for(let i=0;i<r;i++)t[i]=i,e[i]=i,Y[i]=i}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,r))return t;e=this.inputFormat,r=this.outputFormat;let i=t;const a=J,c=W(e.charAt(1)),f=W(r.charAt(1)),m=(e.startsWith("I")?"L":e.charAt(0))+c,g=(r.startsWith("I")?"L":r.charAt(0))+f,p=e.charAt(2)+r.charAt(2);a.defInFormat=m,a.defOutFormat=g,a.defSwap=p;const y=P(t,m,g,p,a);let S=!1;return"R"===r.charAt(1)?S=!0:"C"!==r.charAt(1)&&"D"!==r.charAt(1)||(S="rtl"===this.checkContextual(y)),this.sourceToTarget=Y,this.targetToSource=function(t){const e=new Array(t.length);for(let r=0;r<t.length;r++)e[t[r]]=r;return e}(this.sourceToTarget),q=this.targetToSource,i=e.charAt(3)===r.charAt(3)?y:"S"===r.charAt(3)?function(t,e){if(0===e.length)return"";void 0===t&&(t=!0);const r=(e=String(e)).split("");let i=0,s=1,a=r.length;t||(i=r.length-1,s=-1,a=1);const c=function(t,e,r,i){let s=0;const a=[];let c=0;for(let f=e;f*r<i;f+=r)if(A(t[f])||$(t[f])){if("ل"===t[f]&&E(t,f+r,r,i)){t[f]=V(t[f+r],0===s?n:o),f+=r,G(t,f,r,i),a[c]=f,c++,s=0;continue}const e=t[f];1===s?t[f]=F(t,f+r,r,i)?N(t[f]):O(t[f],h):!0===F(t,f+r,r,i)?t[f]=O(t[f],u):t[f]=O(t[f],l),$(e)||(s=1),!0===H(e)&&(s=0)}else s=0;return a}(r,i,s,a);let f="";for(let e=0;e<r.length;e++)v(c,c.length,e)>-1?(X(q,e,!t,-1),Y.splice(e,1)):f+=r[e];return f}(S,y):function(t,e){if(0===t.length)return"";void 0===e&&(e=!0);let r="";const i=(t=String(t)).split("");for(let n=0;n<t.length;n++){let o=!1;if(i[n]>="ﹰ"&&i[n]<"\ufeff"){const a=t.charCodeAt(n);i[n]>="ﻵ"&&i[n]<="ﻼ"?(e?(n>0&&" "===i[n-1]?r=r.slice(0,-1)+"ل":(r+="ل",o=!0),r+=s[(a-65269)/2]):(r+=s[(a-65269)/2],r+="ل",n+1<t.length&&" "===i[n+1]?n++:o=!0),o&&(X(q,n,!0,1),Y.splice(n,0,Y[n]))):r+=d[a-65136]}else r+=i[n]}return r}(y,S),this.sourceToTarget=Y,this.targetToSource=q,this.levels=Z,i}_inputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=T(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return rt.test(t)}}function P(t,e,r,i,s){const n=function(t,e,r){if(void 0===e.inFormat&&(e.inFormat=r.defInFormat),void 0===e.outFormat&&(e.outFormat=r.defOutFormat),void 0===e.swap&&(e.swap=r.defSwap),e.inFormat===e.outFormat)return e;const i=e.inFormat.slice(0,1),s=e.outFormat.slice(0,1);let n,o=e.inFormat.slice(1,4),a=e.outFormat.slice(1,4);return o.startsWith("C")&&(n=T(t),o="ltr"===n||"rtl"===n?n.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=i+o),a.startsWith("C")&&(n=T(t),"rtl"===n?a="RTL":"ltr"===n?(n=function(t){const e=t.split("");return e.reverse(),T(e.join(""))}(t),a=n.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=s+a),e}(t,{inFormat:e,outFormat:r,swap:i},s);if(n.inFormat===n.outFormat)return t;e=n.inFormat,r=n.outFormat,i=n.swap;const o=e.slice(0,1),a=e.slice(1,4),l=r.slice(0,1),h=r.slice(1,4);if(s.inFormat=e,s.outFormat=r,s.swap=i,"L"===o&&"VLTR"===r){if("LTR"===a)return s.dir=Q,L(t,s);if("RTL"===a)return s.dir=tt,L(t,s)}if("V"===o&&"V"===l)return s.dir="RTL"===a?tt:Q,z(t,s);if("L"===o&&"VRTL"===r)return"LTR"===a?(s.dir=Q,t=L(t,s)):(s.dir=tt,t=L(t,s)),z(t);if("VLTR"===e&&"LLTR"===r)return s.dir=Q,L(t,s);if("V"===o&&"L"===l&&a!==h)return t=z(t),"RTL"===a?P(t,"LLTR","VLTR",i,s):P(t,"LRTL","VRTL",i,s);if("VRTL"===e&&"LRTL"===r)return P(t,"LRTL","VRTL",i,s);if("L"===o&&"L"===l){const e=s.swap;return s.swap=e.slice(0,1)+"N","RTL"===a?(s.dir=tt,t=L(t,s),s.swap="N"+e.slice(1,3),s.dir=Q,t=L(t,s)):(s.dir=Q,t=L(t,s),s.swap="N"+e.slice(1,3),t=P(t,"VLTR","LRTL",s.swap,s)),t}return t}function T(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function L(t,e){const r=t.split(""),i=[];return R(r,i,e),function(t,e,r){if(0!==r.hiLevel&&r.swap[0]!==r.swap[1])for(let r=0;r<t.length;r++)1===e[r]&&(t[r]=B(t[r]))}(r,i,e),D(2,r,i,e),D(1,r,i,e),Z=i,r.join("")}function R(t,e,r){const i=t.length,s=r.dir?y:p;let n=0,o=-1;const a=[],l=[];r.hiLevel=r.dir,r.lastArabic=!1,r.hasUbatAl=!1,r.hasUbatB=!1,r.hasUbatS=!1;for(let e=0;e<i;e++)a[e]=I(t[e]);for(let h=0;h<i;h++){const i=n,c=U(t,a,l,h,r);l[h]=c,n=s[i][c];const u=240&n;n&=15;const f=s[n][j];if(e[h]=f,u>0)if(16===u){for(let t=o;t<h;t++)e[t]=1;o=-1}else o=-1;if(s[n][K])-1===o&&(o=h);else if(o>-1){for(let t=o;t<h;t++)e[t]=f;o=-1}5===a[h]&&(e[h]=0),r.hiLevel|=f}r.hasUbatS&&function(t,e,r,i){for(let s=0;s<r;s++)if(6===t[s]){e[s]=i.dir;for(let r=s-1;r>=0&&8===t[r];r--)e[r]=i.dir}}(a,e,i,r)}function I(t){const e=t.charCodeAt(0),r=w[e>>8];return r<100?r:C[r-100][255&e]}function z(t,e){const r=t.split("");if(e){const t=[];R(r,t,e),Z=t}return r.reverse(),Y.reverse(),r.join("")}function v(t,e,r){for(let i=0;i<e;i++)if(t[i]===r)return i;return-1}function A(t){for(let e=0;e<m.length;e++)if(t>=m[e]&&t<=g[e])return!0;return!1}function F(t,e,r,i){for(;e*r<i&&$(t[e]);)e+=r;return!!(e*r<i&&A(t[e]))}function E(t,e,r,i){for(;e*r<i&&$(t[e]);)e+=r;let n=" ";if(!(e*r<i))return!1;n=t[e];for(let t=0;t<s.length;t++)if(s[t]===n)return!0;return!1}function D(t,e,r,i){if(i.hiLevel<t)return;if(1===t&&i.dir===tt&&!i.hasUbatB)return e.reverse(),void Y.reverse();const s=e.length;let n,o,a,l,h,c=0;for(;c<s;){if(r[c]>=t){for(n=c+1;n<s&&r[n]>=t;)n++;for(o=c,a=n-1;o<a;o++,a--)l=e[o],e[o]=e[a],e[a]=l,h=Y[o],Y[o]=Y[a],Y[a]=h;c=n}c++}}function U(t,e,r,i,s){const n=e[i];return{UBAT_L:()=>(s.lastArabic=!1,0),UBAT_R:()=>(s.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>s.lastArabic?3:2,UBAT_AL:()=>(s.lastArabic=!0,s.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,n;return i<1||i+1>=e.length||2!==(t=r[i-1])&&3!==t||2!==(n=e[i+1])&&3!==n?4:(s.lastArabic&&(n=3),n===t?n:4)},UBAT_ES:()=>2===(i>0?r[i-1]:5)&&i+1<e.length&&2===e[i+1]?2:4,UBAT_ET:()=>{if(i>0&&2===r[i-1])return 2;if(s.lastArabic)return 4;let t=i+1;const n=e.length;for(;t<n&&11===e[t];)t++;return t<n&&2===e[t]?2:4},UBAT_NSM:()=>{if("VLTR"===s.inFormat){const r=e.length;let s=i+1;for(;s<r&&12===e[s];)s++;if(s<r){const r=t[i].charCodeAt(0),n=r>=1425&&r<=2303||64286===r,o=e[s];if(n&&(1===o||7===o))return 1}}return i<1||5===e[i-1]?4:r[i-1]},UBAT_B:()=>(s.lastArabic=!0,s.hasUbatB=!0,s.dir),UBAT_S:()=>(s.hasUbatS=!0,4),UBAT_LRE:()=>(s.lastArabic=!1,4),UBAT_RLE:()=>(s.lastArabic=!1,4),UBAT_LRO:()=>(s.lastArabic=!1,4),UBAT_RLO:()=>(s.lastArabic=!1,4),UBAT_PDF:()=>(s.lastArabic=!1,4),UBAT_BN:()=>4}[b[n]]()}function B(t){let e,r=0,s=i.length-1;for(;r<=s;)if(e=Math.floor((r+s)/2),t<i[e][0])s=e-1;else{if(!(t>i[e][0]))return i[e][1];r=e+1}return t}function H(t){for(let e=0;e<f.length;e++)if(f[e]===t)return!0;return!1}function N(t){for(let e=0;e<a.length;e++)if(t===a[e])return c[e];return t}function O(t,e){for(let r=0;r<a.length;r++)if(t===a[r])return e[r];return t}function $(t){return t>="ً"&&t<="ٕ"}function W(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function G(t,e,r,i){for(;e*r<i&&$(t[e]);)e+=r;return e*r<i&&(t[e]=" ",!0)}function V(t,e){for(let r=0;r<s.length;r++)if(t===s[r])return e[r];return t}function X(t,e,r,i){for(let s=0;s<t.length;s++)(t[s]>e||!r&&t[s]===e)&&(t[s]+=i)}let Y=[],q=[],Z=[];const J={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},j=5,K=6,Q=0,tt=1,et=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,rt=/[\u0591-\u06ff\ufb1d-\ufefc]/},6371(t,e,r){r.d(e,{y:()=>s});const i=new(r(32488).A);function s(t,e=!0){if(!i.hasBidiChar(t))return[t,!1,{...i}];let r;r="rtl"===i.checkContextual(t)?"IDNNN":"ICNNN";const s=e?"VLYSN":"VLYNN";return[i.bidiTransform(t,r,s),!0,{...i}]}},40804(t,e,r){function i(t,e=0){let r=0;for(let i=0;i<4;i++)r+=t[e+i]*s[i];return r}r(34727);const s=[1/256,1/65536,1/16777216,1/4294967296];i(new Uint8ClampedArray([255,255,255,255])),i(new Uint8ClampedArray([255,255,255,0]))},56512(t,e,r){function i(t){let e,r,i=[],s=!1;return function(...n){return s&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}(n,i)||(r=t.apply(this,n),e=this,i=n,s=!0),r}}r.d(e,{B:()=>i})},69397(t,e,r){r.d(e,{Qf:()=>a,Qh:()=>n,lM:()=>s});var i=r(34275);function s(t){if(!t)return 0;let e=h;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r],!1));return e}function n(t){if(!t)return 0;if("number"==typeof t[0])return a(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return l(t,8);let r=c;for(let i=0;i<e;i++)r+=o(t[i]);return r}(t);let e=h;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?n(t):h;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...t){return t.reduce((t,e)=>t+(e?(0,i.iu)(e)?e.byteLength+u:Array.isArray(e)?l(e,16):0:0),0)}function l(t,e){return c+t.length*e}const h=32,c=16,u=145},31411(t,e,r){r.d(e,{GS:()=>C,gh:()=>P});var i=r(49186),s=r(56512),n=r(65864),o=r(4305),a=r(50954),l=r(52006),h=r(49663),c=r(46068),u=r(15507);const f=1e-6,d=[0,0];function m(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class g{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:r,maxSegmentsPerCurve:i,minSegmentsPerCurve:s}){const n=r*r,o=e*e,a=1/i,l=this.interpolate(0),h=this.interpolate(1);(0,u.kb)(this.curveStart,l)>f&&t.push(l),this.initialize(l,h);const c=1/s;for(let t=s-1;t>0;t--){const e=t*c;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<a||(0===n||!isFinite(n)||(0,u.kb)(this.arcStart,this.arcEnd)<n)&&(0===o||!isFinite(o)||this.getDeviation2()<o)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,u.kb)(this.curveEnd,h)>f&&t.push([...this.curveEnd]),t}}class p extends g{constructor(t,e){const[r,i,s]=e.b;super(t,r),this._controlPointsStack=[],this._curveControlPoints=[i,s],this._arcControlPoints=[i,s],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:r,tStart:i,tEnd:s}=this,[n,o]=this._arcControlPoints,a=(t-i)/(s-i),l=(0,u.RS)([],e,n,a),h=(0,u.RS)(d,n,o,a),c=(0,u.RS)([],o,r,a),f=(0,u.RS)([],l,h,a),m=(0,u.RS)([],h,c,a),g=(0,u.RS)([],f,m,a);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([m,c]),this.tEndStack.push(t),this.arcEndStack.push(g),this._arcControlPoints[0]=l,this._arcControlPoints[1]=f,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:r}=this,[i,s]=this._curveControlPoints;return(0,o.B4)(e,i,s,r,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[r,i]=this._arcControlPoints;return Math.max((0,u.yE)(r,t,e),(0,u.yE)(i,t,e))}}class y extends g{constructor(t,e){const[r]=e.a;super(t,r),this._derivedEllipse=(0,c.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,c.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,u.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function S(t,e,r,{cx:i,cy:s,radius:n,thetaStart:o,thetaEnd:a,isInvalid:l},{maxDeviation:h,maxSegmentLength:c,maxSegmentsPerCurve:d,minSegmentsPerCurve:m}){if(l)return t.push([...r]),t;const g=2*n,p=[i+n*Math.cos(o),s+n*Math.sin(o)],y=[i+n*Math.cos(a),s+n*Math.sin(a)];(0,u.kb)(e,p)>f&&t.push(p);const S=Math.abs(a-o),_=c>0&&c<g?2*Math.asin(c/g):S,x=h>0&&h<=n?2*Math.acos(1-h/n):S,M=Math.min(_,x),b=Math.min(d,Math.max(m,Math.ceil(Math.abs(S/M)))),w=1/b;for(let e=1;e<b;e++){const r=e*w,l=o*(1-r)+a*r;t.push([i+n*Math.cos(l),s+n*Math.sin(l)])}return t.push(y),(0,u.kb)(r,y)>f&&t.push([...r]),t}function _(t,e,r,i){return new p(e,r).densify(t,i)}function x(t,e,r,i){const s=(0,a.pM)(e,r),[n]=r.c;return S(t,e,n,s,i)}function M(t,e,r,i){const s=(0,h.io)(e,r),[n]=r.a;return S(t,e,n,s,i)}function b(t,e,r,i){const[s,n,o,a,l,h,c]=r.a;return 0===h||0===c?(t.push([...s]),t):new y(e,r).densify(t,i)}function w(t,e,r,i){return(0,l.Xq)(r)?(t.push([...r]),t):(0,l.n1)(r)?_(t,e,r,i):(0,l.aO)(r)?x(t,e,r,i):(0,l.DA)(r)?M(t,e,r,i):b(t,e,r,i)}function C(t,e={}){if(!(0,l.Ed)(t))return t;const r=m(e),i=(0,l.FD)(t),s=[];for(const t of i){const e=[];for(let i=0;i<t.length-1;i++){const s=i+1,n=[...(0,l.yP)(t[i])];0===i&&e.push(n),w(e,n,t[s],r)}s.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:s,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:s,spatialReference:t.spatialReference}}const k=(0,s.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function P(t,e,s){const o=new Set(e);return await async function(t,e,s){let n=null;for(const o of t)if(o&&(0,l.Ed)(o)&&null==o.spatialReference.xyTolerance&&(0,l.V8)(o,e)){const t=o.spatialReference;if(!t)throw new i.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=T(t);if(s.has(e))o.spatialReference=s.get(e);else{n||(n=await Promise.all([r.e(9187),r.e(8885),r.e(5756),r.e(3299),r.e(1550)]).then(r.bind(r,78125)));const a=n.fromSpatialReference(t),l=a?.getTolerance();if(null==l)throw new i.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const h=o.spatialReference.clone();h.read({xyTolerance:l}),o.spatialReference=h,s.set(e,h)}}}(t,o,s),t.map(t=>{if(!t||!(0,l.Ed)(t))return t;const r=t.spatialReference.xyTolerance;if(null==r)return t;const i=k(r);return(0,n.rS)(function(t,e,r){if(!(0,l.Ed)(t))return t;const i=new Set(e),s=m(r),n=(0,l.FD)(t),o=[];let a=!1;for(const t of n){const e=[];for(let r=0;r<t.length-1;r++){const n=r+1,o=[...(0,l.yP)(t[r])];0===r&&e.push(o);const h=t[n];(0,l.Xq)(h)?e.push([...h]):(0,l.n1)(h)&&!i.has("cubic-bezier")?_(e,o,h,s):(0,l.aO)(h)&&!i.has("circular-arc")?x(e,o,h,s):(0,l.DA)(h)&&!i.has("elliptic-arc")?M(e,o,h,s):(0,l.wY)(h)&&!i.has("elliptic-arc")?b(e,o,h,s):(e.push((0,l.tk)(h)),a=!0)}o.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...a?{curvePaths:o}:{paths:o}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...a?{curveRings:o}:{rings:o}}}(t,e,i))})}function T(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},92722(t,e,r){r.d(e,{A:()=>s});var i=r(69397);class s{constructor(t=[],e=[],r=!1,i=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=r,this.hasM=i}static fromJSON({lengths:t,coords:e,hasZ:r,hasM:i}){return new s(t,e,r||!1,i||!1)}static fromRect([t,e,r,i]){const n=r-t,o=i-e;return new s([5],[t,e,n,0,0,o,-n,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,i.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const r of this.lengths){if(r<3)continue;const{stride:i}=this;let s=this.coords[i*e],n=this.coords[i*e+1];for(let o=1;o<r;o+=1){const r=i*(e+o),a=this.coords[r],l=this.coords[r+1];t+=-.5*(a-s)*(l+n),s=a,n=l}e+=r}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:r}=this;for(const i of this.lengths){for(let s=0;s<i;s++){const i=r*(e+s);t(this.coords[i],this.coords[i+1])}e+=i}}deltaDecode(){const t=this.clone(),{coords:e,lengths:r}=t;let i=0;const{stride:s}=this;for(const t of r){for(let r=1;r<t;r++){const t=s*(i+r);e[t]+=e[t-s],e[t+1]+=e[t+1-s]}i+=t}return t}clone(t){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:r,size:i}=this,n=this.coords.slice(0,i*r);return t?(t.set(n),new s(e,t,this.hasZ,this.hasM)):new s(e,Array.from(n),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const r=new Array(e*t);for(let e=0,i=0;e<r.length;e+=t)r[i++]=this.coords[e],r[i++]=this.coords[e+1];return new s(this.lengths,r,!1,!1)}}},5427(t,e,r){r.r(e),r.d(e,{CIMSymbolHelper:()=>nt,CIMSymbolInflatedSizeHelper:()=>st,capTypeToEnum:()=>at,forEachSymbolLayer:()=>ot,slsDashToTemplateArray:()=>gt,symbolToCIM:()=>et});var i=r(6371),s=r(4718),n=r(53966),o=r(87811),a=r(90629),l=r(19419),h=r(537),c=r(52006),u=r(31411),f=r(11831),d=r(35833),m=r(98939),g=r(57582),p=(r(44208),r(34727)),y=r(93687),S=r(36745),_=r(12359),x=(r(12176),r(60408));class M{applyColorSubstitution(t,e){if(!e)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:r,height:i}=t,s=this._rasterizationCanvas,n=s.getContext("2d",{willReadFrequently:!0});t!==s&&(s.width=r,s.height=i,n.drawImage(t,0,0,r,i));const o=n.getImageData(0,0,r,i).data;if(e)for(const t of e)if(t&&t.oldColor&&4===t.oldColor.length&&t.newColor&&4===t.newColor.length){const[e,r,i,s]=t.oldColor,[n,a,l,h]=t.newColor;if(e===n&&r===a&&i===l&&s===h)continue;for(let t=0;t<o.length;t+=4)e===o[t]&&r===o[t+1]&&i===o[t+2]&&s===o[t+3]&&(o[t]=n,o[t+1]=a,o[t+2]=l,o[t+3]=h)}const a=new ImageData(o,r,i);return n.putImageData(a,0,0),s}tintImageData(t,e){if(!e||e.length<4)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:r,height:i}=t,s=this._rasterizationCanvas,n=s.getContext("2d",{willReadFrequently:!0});t!==s&&(s.width=r,s.height=i,n.drawImage(t,0,0,r,i));const o=n.getImageData(0,0,r,i),a=new Uint8Array(o.data),l=[e[0]/255,e[1]/255,e[2]/255,e[3]/255];for(let t=0;t<a.length;t+=4)a[t]*=l[0],a[t+1]*=l[1],a[t+2]*=l[2],a[t+3]*=l[3];const h=new ImageData(new Uint8ClampedArray(a.buffer),r,i);return n.putImageData(h,0,0),s}}var b=r(26937),w=r(28076);function C(t){const e=t.getFrame(0);if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement)return e;const r=document.createElement("canvas");r.width=t.width,r.height=t.height;const i=r.getContext("2d");return e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0),r}function k(t,e=0){if(0===e)return t;const r=Math.cos(e),i=Math.sin(e),[s,n]=t;return[s*r+n*-i,s*i+n*r]}var P=r(44589);class T{constructor(t=0,e=0,r=0,i=0){this.x=t,this.y=e,this.width=r,this.height=i}static fromExtent(t){return new T(t.xmin,-t.ymax,t.xmax-t.xmin,t.ymax-t.ymin)}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}var L=r(69754);function R(t){return`rgb(${t.slice(0,3).toString()})`}function I(t){return`rgba(${t.slice(0,3).toString()},${t[3]})`}r(5760);class z{constructor(t){t&&(this._textRasterizationCanvas=t)}rasterizeRichText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas,i=r.getContext("2d",{willReadFrequently:!0}),s=this._layoutRichTextRuns(i,t,e);this._parameters=e,this._lineHeight=Math.max(...s.map(t=>t.height),this._measureLineHeight(e));const{decoration:n,weight:o}=e.font;this._lineThroughWidthOffset=n&&"line-through"===n?.1*this._lineHeight:0;const a=null!=e.backgroundColor||null!=e.borderLine,l=a?8:0,h=Math.max(...s.map(t=>t.width),0)+2*l,c=s.reduce((t,e)=>t+e.height,0)+2*l;if(r.width=h+2*this._lineThroughWidthOffset,r.height=c,0===r.width||0===r.height)return r.width=r.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:r};this._renderedWidth=h,this._renderedHeight=c,this._renderedOutlineSize=(e.outline.size||0)*e.pixelRatio,this._renderedHaloSize=(e.halo.size||0)*e.pixelRatio,this._lineThroughWidthOffset*=e.pixelRatio;const u=(e.outline&&e.outline.color)??[0,0,0,0],f=e.color??[0,0,0,0],d=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=I(f),this._outlineStyle=I(u),this._haloStyle=R(d);const m=this._renderedOutlineSize,g=this._renderedHaloSize;i.save(),i.clearRect(0,0,r.width,r.height);const p=l*e.pixelRatio,y=F("left",this._renderedWidth-2*p,g+m)+p,S=g+m+p;let _=this._lineThroughWidthOffset,x=0;if(a){i.save();const t=e.backgroundColor??[0,0,0,0],s=e.borderLine?.color??[0,0,0,0],n=2*(e.borderLine?.size??0);i.fillStyle=I(t),i.strokeStyle=I(s),i.lineWidth=n,i.fillRect(0,0,r.width,r.height),i.strokeRect(0,0,r.width,r.height),i.restore()}x+=S,_+=y,g>0&&this._renderRichTextOutline(i,s,_,x,e,this._renderedHaloSize+this._renderedOutlineSize),m>0&&this._renderRichTextOutline(i,s,_,x,e,this._renderedOutlineSize);for(const t of s){let r=_;"center"===e.horizontalAlignment?r+=(this._renderedWidth-2*p-t.width)/2:"right"===e.horizontalAlignment&&(r+=this._renderedWidth-2*p-t.width-g-m);let s=r;for(const e of t.segments)v(i,e.parameters,"left"),g>0&&(i.globalCompositeOperation="destination-out",i.fillStyle="rgb(0, 0, 0)",i.fillText(e.text,s,x),i.globalCompositeOperation="source-over"),i.fillStyle=I(e.parameters.color??f),i.fillText(e.text,s,x),s+=e.width;if(n&&"none"!==n){const e=this._renderedWidth;this._renderedWidth=t.width,i.textAlign="left",this._renderDecoration(i,r,x,n,o),this._renderedWidth=e}x+=t.height}i.restore();const M=this._renderedWidth+2*this._lineThroughWidthOffset,b=this._renderedHeight,w=i.getImageData(0,0,M,b),C=new Uint8Array(w.data);if(e.premultiplyColors){let t;for(let e=0;e<C.length;e+=4)t=C[e+3]/255,C[e]=C[e]*t,C[e+1]=C[e+1]*t,C[e+2]=C[e+2]*t}let k,P;switch(e.horizontalAlignment){case"left":k=-.5;break;case"right":k=.5;break;default:k=0}switch(e.verticalAlignment){case"bottom":P=-.5;break;case"top":P=.5;break;case"baseline":P=-1/6;break;default:P=0}return{size:[M,b],image:new Uint32Array(C.buffer),sdf:!1,simplePattern:!1,anchorX:k,anchorY:P,canvas:r}}rasterizeText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas,i=r.getContext("2d",{willReadFrequently:!0});v(i,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const{decoration:s,weight:n}=e.font;this._lineThroughWidthOffset=s&&"line-through"===s?.1*this._lineHeight:0;const o=null!=e.backgroundColor||null!=e.borderLine,a=o?8:0,l=this._computeTextWidth(i,e)+2*a,h=this._lineHeight*this._textLines.length+2*a;if(r.width=l+2*this._lineThroughWidthOffset,r.height=h,0===r.width||0===r.height)return r.width=r.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:r};this._renderedLineHeight=Math.round(this._lineHeight),this._renderedOutlineSize=(e.outline.size||0)*e.pixelRatio,this._renderedHaloSize=(e.halo.size||0)*e.pixelRatio,this._renderedWidth=l,this._renderedHeight=h,this._lineThroughWidthOffset*=e.pixelRatio;const c=(e.outline&&e.outline.color)??[0,0,0,0],u=e.color??[0,0,0,0],f=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=I(u),this._outlineStyle=I(c),this._haloStyle=R(f);const d=this._renderedLineHeight,m=this._renderedOutlineSize,g=this._renderedHaloSize;i.save(),i.clearRect(0,0,r.width,r.height),v(i,e);const p=a*e.pixelRatio,y=F(i.textAlign,this._renderedWidth-2*p,this._renderedHaloSize+this._renderedOutlineSize)+p,S=g+m+p,_=g>0;let x=this._lineThroughWidthOffset,M=0;if(o){i.save();const t=e.backgroundColor??[0,0,0,0],s=e.borderLine?.color??[0,0,0,0],n=2*(e.borderLine?.size??0);i.fillStyle=I(t),i.strokeStyle=I(s),i.lineWidth=n,i.fillRect(0,0,r.width,r.height),i.strokeRect(0,0,r.width,r.height),i.restore()}_&&this._renderHalo(i,y,S,x,M,e),m>0&&this._renderOutline(i,y,S,x,M,e),M+=S,x+=y;for(const t of this._textLines)_?(i.globalCompositeOperation="destination-out",i.fillStyle="rgb(0, 0, 0)",i.fillText(t,x,M),i.globalCompositeOperation="source-over",i.fillStyle=this._fillStyle,i.fillText(t,x,M)):(i.fillStyle=this._fillStyle,i.fillText(t,x,M)),s&&"none"!==s&&this._renderDecoration(i,x,M,s,n),M+=d;i.restore();const b=this._renderedWidth+2*this._lineThroughWidthOffset,w=this._renderedHeight,C=i.getImageData(0,0,b,w),k=new Uint8Array(C.data);if(e.premultiplyColors){let t;for(let e=0;e<k.length;e+=4)t=k[e+3]/255,k[e]=k[e]*t,k[e+1]=k[e+1]*t,k[e+2]=k[e+2]*t}let P,T;switch(e.horizontalAlignment){case"left":P=-.5;break;case"right":P=.5;break;default:P=0}switch(e.verticalAlignment){case"bottom":T=-.5;break;case"top":T=.5;break;case"baseline":T=-1/6;break;default:T=0}return{size:[b,w],image:new Uint32Array(k.buffer),sdf:!1,simplePattern:!1,anchorX:P,anchorY:T,canvas:r}}_renderHalo(t,e,r,i,s,n){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,h=l.getContext("2d");h.clearRect(0,0,o,a),v(h,n);const{decoration:c,weight:u}=n.font;h.fillStyle=this._haloStyle,h.strokeStyle=this._haloStyle,h.lineJoin="round",this._renderOutlineNative(h,e,r,c,u,this._renderedHaloSize+this._renderedOutlineSize),t.globalAlpha=this._parameters.halo.color[3],t.drawImage(l,0,0,o,a,i,s,o,a),t.globalAlpha=1}_renderOutline(t,e,r,i,s,n){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,h=l.getContext("2d");h.clearRect(0,0,o,a),v(h,n);const{decoration:c,weight:u}=n.font;h.fillStyle=this._outlineStyle,h.strokeStyle=this._outlineStyle,h.lineJoin="round",this._renderOutlineNative(h,e,r,c,u,this._renderedOutlineSize),t.globalAlpha=this._parameters.outline.color[3],t.drawImage(l,0,0,o,a,i,s,o,a),t.globalAlpha=1}_renderOutlineNative(t,e,r,i,s,n){const o=this._renderedLineHeight;for(const a of this._textLines){const l=2*n,h=5,c=.1;for(let n=0;n<h;n++){const o=(1-(h-1)*c+n*c)*l;t.lineWidth=o,t.strokeText(a,e,r),i&&"none"!==i&&this._renderDecoration(t,e,r,i,s,o)}r+=o}}computeTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas,i=r.getContext("2d");v(i,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const s=this._computeTextWidth(i,e),n=this._lineHeight*this._textLines.length;return r.width=s,r.height=n,[s*e.pixelRatio,n*e.pixelRatio]}computeRichTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas.getContext("2d"),i=this._layoutRichTextRuns(r,t,e),s=Math.max(...i.map(t=>t.width),0),n=i.reduce((t,e)=>t+e.height,0);return[s*e.pixelRatio,n*e.pixelRatio]}_renderRichTextOutline(t,e,r,i,s,n){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,h=l.getContext("2d");h.clearRect(0,0,o,a),h.fillStyle=n===this._renderedOutlineSize?this._outlineStyle:this._haloStyle,h.strokeStyle=h.fillStyle,h.lineJoin="round";let c=i;for(const t of e){let e=r;"center"===s.horizontalAlignment?e+=(this._renderedWidth-t.width)/2:"right"===s.horizontalAlignment&&(e+=this._renderedWidth-t.width-this._renderedHaloSize-this._renderedOutlineSize);let i=e;for(const e of t.segments){v(h,e.parameters,"left");const t=2*n,r=5,s=.1;for(let n=0;n<r;n++){const o=1-(r-1)*s+n*s;h.lineWidth=o*t,h.strokeText(e.text,i,c)}i+=e.width}if(s.font.decoration&&"none"!==s.font.decoration){const r=this._renderedWidth;this._renderedWidth=t.width,h.textAlign="left",this._renderDecoration(h,e,c,s.font.decoration,s.font.weight,2*n),this._renderedWidth=r}c+=t.height}n===this._renderedOutlineSize?t.globalAlpha=this._parameters.outline.color[3]:t.globalAlpha=this._parameters.halo.color[3],t.drawImage(l,0,0,o,a,this._lineThroughWidthOffset,0,o,a),t.globalAlpha=1}_layoutRichTextRuns(t,e,r){const i=[{segments:[],width:0,height:this._measureLineHeight(r)}];for(const s of e){const e=s.text.split(/\r?\n/),n=A(r,s);for(let s=0;s<e.length;s++){const o=e[s],a=i[i.length-1];if(o.length>0){const e=this._measureTextWidth(t,o,n);a.segments.push({text:o,width:e,parameters:n}),a.width+=e,a.height=Math.max(a.height,this._measureLineHeight(n))}s<e.length-1&&i.push({segments:[],width:0,height:this._measureLineHeight(r)})}}return i}_measureTextWidth(t,e,r){const i=this._parameters,s=this._textLines;this._parameters=r,this._textLines=[e],v(t,r,"left");const n=this._computeTextWidth(t,r);return this._parameters=i,this._textLines=s,n}_measureLineHeight(t){const e=this._parameters;this._parameters=t;const r=this._computeLineHeight();return this._parameters=e,r}_computeTextWidth(t,e){let r=0;for(const e of this._textLines)r=Math.max(r,t.measureText(e).width);const i=e.font;return("italic"===i.style||"oblique"===i.style||"string"==typeof i.weight&&("bold"===i.weight||"bolder"===i.weight)||"number"==typeof i.weight&&i.weight>600)&&(r+=.3*t.measureText("w").width),r+=2*(0,a.Lz)(this._parameters.halo.size),Math.round(r)}_computeLineHeightBase(){return 1.275*this._parameters.size}_computeLineHeight(){let t=this._computeLineHeightBase();const e=this._parameters.font.decoration;return e&&"underline"===e&&(t*=1.3),Math.round(t+2*(0,a.Lz)(this._parameters.halo.size))}_renderDecoration(t,e,r,i,s,n){let o=.9*this._lineHeight;const a="bold"===s?.06:"bolder"===s?.09:.04;switch(t.textAlign){case"center":e-=this._renderedWidth/2;break;case"right":e-=this._renderedWidth}const l=t.textBaseline;if("underline"===i)switch(o=.9*this._computeLineHeightBase(),l){case"top":r+=o;break;case"middle":r+=o/2}else if("line-through"===i)switch(l){case"top":r+=o/1.5;break;case"middle":r+=o/3}const h=n?1.5*n:Math.ceil(o*a);t.save(),t.beginPath(),t.strokeStyle=t.fillStyle,t.lineWidth=h,t.moveTo(e-this._lineThroughWidthOffset,r),t.lineTo(e+this._renderedWidth+2*this._lineThroughWidthOffset,r),t.stroke(),t.restore()}}function v(t,e,r){const i=Math.max(e.size,.5),s=e.font,n=`${s.style} ${s.weight} ${(0,a.Lz)(i).toFixed(1)}px ${s.family}, sans-serif`;t.font=n,t.textBaseline="top";let o=r??"left";if(!r)switch(e.horizontalAlignment){case"left":default:o="left";break;case"right":o="right";break;case"center":o="center"}t.textAlign=o}function A(t,e){return{...t,color:e.color??t.color,font:{...t.font,family:e.font.family??t.font.family,style:e.font.style??t.font.style,weight:e.font.weight??t.font.weight},size:e.fontSize}}function F(t,e,r){return"center"===t?.5*e:"right"===t?e-r:r}var E=r(93397),D=r(75434),U=r(69221);const B=Math.PI/180,H=()=>n.A.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class N{constructor(t){this._t=t}static createIdentity(){return new N([1,0,0,0,1,0])}clone(){const t=this._t;return new N(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new N([t,0,0,0,e,0])}scale(t,e){const r=this._t;return r[0]*=t,r[1]*=t,r[2]*=t,r[3]*=e,r[4]*=e,r[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new N([0,0,t,0,0,e])}translate(t,e){const r=this._t;return r[2]+=t,r[5]+=e,this}static createRotate(t){const e=Math.cos(t),r=Math.sin(t);return new N([e,-r,0,r,e,0])}rotate(t){return N.multiply(this,N.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],r=Math.sqrt(t*t+e*e);return[t/r,e/r]}static multiply(t,e,r){const i=t._t,s=e._t,n=i[0]*s[0]+i[3]*s[1],o=i[1]*s[0]+i[4]*s[1],a=i[2]*s[0]+i[5]*s[1]+s[2],l=i[0]*s[3]+i[3]*s[4],h=i[1]*s[3]+i[4]*s[4],c=i[2]*s[3]+i[5]*s[4]+s[5],u=r._t;return u[0]=n,u[1]=o,u[2]=a,u[3]=l,u[4]=h,u[5]=c,r}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new N([0,0,0,0,0,0]);e=1/e;const r=(t[1]*t[5]-t[2]*t[4])*e,i=(t[2]*t[3]-t[0]*t[5])*e,s=t[4]*e,n=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new N([s,n,r,o,a,i])}}class O{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._textScaling=[],this._geomUnitsPerPoint=1,this._placementPool=new y.A(()=>new m.W,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||N.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1),this._textScaling.push(1)}setTransform(t,e){this._transfos=[t||N.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)],this._textScaling=[1]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}scaleText(t){return t*this._textScaling[this._textScaling.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}reverseScaleText(t){return t/this._textScaling[this._textScaling.length-1]}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e=!1,r=1){const i=e?t.scaleRatio():1;N.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*i),this._textScaling.push(this._textScaling[this._textScaling.length-1]*r)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1),this._textScaling.splice(-1,1)}drawSymbol(t,e,r){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,r)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const r=t.symbolLayers;if(!r)return;const i=t.effects;if(i&&i.length>0){const t=this.executeEffects(i,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(r,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(r,e)}executeEffects(t,e){const r=this.geomUnitsPerPoint(),i=(0,E.ll)(t);let s=new d.kT(S.z.fromJSONCIM(e));for(const n of t){const t=(0,b.A)(n);t&&(s=t.execute(s,n,{geomUnitsPerPoint:r,tileKey:null,maxInflateSize:i,scale:null,spatialReference:e.spatialReference,preventClipping:!1}))}return s}drawSymbolLayers(t,e){let r=t.length;for(;r--;){const i=t[r];if(!i||!1===i.enable)continue;const s=i.effects;if(s&&s.length>0){const t=this.executeEffects(s,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(i,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(i,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const r=function(t,e,r){let i=(0,E.$w)(t.separation,w.D.CIMHatchFill.separation)*r,s=(0,E.$w)(t.rotation);if(0===i)return null;i<0&&(i=-i);let n=0;const o=.5*i;for(;n>o;)n-=i;for(;n<-o;)n+=i;const a=(0,l.vt)();(0,h.Rg)(a,e),a[0]-=o,a[1]-=o,a[2]+=o,a[3]+=o;const c=[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]]];for(;s>180;)s-=180;for(;s<0;)s+=180;const u=Math.cos(s*B),f=Math.sin(s*B),d=-i*f,m=i*u;let g,p,y,S;n=(0,E.$w)(t.offsetX)*r*f-(0,E.$w)(t.offsetY)*r*u,g=y=Number.MAX_VALUE,p=S=-Number.MAX_VALUE;for(const t of c){const e=t[0],r=t[1],i=u*e+f*r,s=-f*e+u*r;g=Math.min(g,i),y=Math.min(y,s),p=Math.max(p,i),S=Math.max(S,s)}y=Math.floor(y/i)*i;let _=u*g-f*y-d*n/i,x=f*g+u*y-m*n/i,M=u*p-f*y-d*n/i,b=f*p+u*y-m*n/i;const C=1+Math.round((S-y)/i),k=[];for(let t=0;t<C;t++)_+=d,x+=m,M+=d,b+=m,k.push([[_,x],[M,b]]);return{paths:k}}(e,t,this.geomUnitsPerPoint());r&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,r),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const r=t.markerPlacement;if(r){const i=(0,b.c)(r);if(i){const s="CIMMarkerPlacementInsidePolygon"===r.type||"CIMMarkerPlacementPolygonCenter"===r.type&&r.clipAtBoundary;s&&this.pushClipPath(e);const n=i.execute(S.z.fromJSONCIM(e),r,this.geomUnitsPerPoint(),null);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}s&&this.popClipPath()}}else{const r=this._placementPool.acquire();if((0,x.fT)(e))r.tx=e.x,r.ty=e.y,this.drawMarker(t,r);else if((0,x.Bi)(e)){const i=(0,_.l8)(e);i&&([r.tx,r.ty]=i,this.drawMarker(t,r))}else if((0,x.Rg)(e)){for(const i of e.paths)for(const e of i)if(r.tx=e[0],r.ty=e[1],this.drawMarker(t,r),this._earlyReturn)break}else for(const i of e.points)if(r.tx=i[0],r.ty=i[1],this.drawMarker(t,r),this._earlyReturn)break;this._placementPool.release(r)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const r=this._resourceManager.getResource(t.url),i=(0,E.$w)(t.size,w.D.CIMPictureMarker.size);if(null==r||i<=0)return;const s=r.width,n=r.height;if(!s||!n)return;const o=s/n,a=(0,E.$w)(t.scaleX,1),l=N.createIdentity(),h=t.anchorPoint;if(h){let e=h.x,r=h.y;"Absolute"!==t.anchorPointUnits&&(e*=i*o*a,r*=i),l.translate(-e,-r)}let c=(0,E.$w)(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&l.rotate(c*B);let u=(0,E.$w)(t.offsetX),f=(0,E.$w)(t.offsetY);if(u||f){if(this._mapRotation){const t=B*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=u*r+f*e;u=u*e-f*r,f=i}l.translate(u,f)}const d=this.geomUnitsPerPoint();1!==d&&l.scale(d,d);const m=e.getAngle();m&&l.rotate(m),l.translate(e.tx,e.ty),this.push(l),this.drawImage(t,i),this.pop()}drawVectorMarker(t,e){if(!t)return;const r=t.markerGraphics;if(!r)return;const i=(0,E.$w)(t.size,w.D.CIMVectorMarker.size),s=t.frame,n=s?s.ymax-s.ymin:0,o=i&&n?i/n:1,a=N.createIdentity();s&&a.translate(.5*-(s.xmax+s.xmin),.5*-(s.ymax+s.ymin));const l=t.anchorPoint;if(l){let e=l.x,r=l.y;"Absolute"!==t.anchorPointUnits?s&&(e*=s.xmax-s.xmin,r*=s.ymax-s.ymin):(e/=o,r/=o),a.translate(-e,-r)}1!==o&&a.scale(o,o);let h=(0,E.$w)(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&a.rotate(h*B);let c=(0,E.$w)(t.offsetX),u=(0,E.$w)(t.offsetY);if(c||u){if(this._mapRotation){const t=B*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=c*r+u*e;c=c*e-u*r,u=i}a.translate(c,u)}const f=this.geomUnitsPerPoint();1!==f&&a.scale(f,f);const d=e.getAngle();d&&a.rotate(d),a.translate(e.tx,e.ty);const m=t.scaleSymbolsProportionally?1:o;this.push(a,t.scaleSymbolsProportionally,m);for(const t of r){t?.symbol&&t.geometry||H().error("Invalid marker graphic",t);let e=t.textString;if("number"==typeof e&&(e=e.toString()),this.drawSymbol(t.symbol,t.geometry,e),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,r){if(!t)return;if(!(0,x.fT)(e))return;if((0,E.$w)(t.height,w.D.CIMTextSymbol.height)<=0)return;const i=N.createIdentity();let s=(0,E.$w)(t.angle);s=-s,s&&i.rotate(s*B);const n=(0,E.$w)(t.offsetX),o=(0,E.$w)(t.offsetY);(n||o)&&i.translate(n,o);const a=this.geomUnitsPerPoint();1!==a&&i.scale(a,a),i.translate(e.x,e.y),this.push(i),this.drawText(t,r),this.pop()}}class $ extends O{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new T(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return(0,l.fA)(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if((0,x.Bi)(t))this._processPath(t.rings,0);else if((0,x.Rg)(t))this._processPath(t.paths,0);else if((0,x.ZC)(t)){const e=V(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,r){if(!t||this._clipCount>0||null==r||r<=0)return;const i=Math.max(.5*this.transformSize((0,E.$w)(r,w.D.CIMSolidStroke.width)),.25);if((0,x.Bi)(t))this._processPath(t.rings,i);else if((0,x.Rg)(t))this._processPath(t.paths,i);else if((0,x.ZC)(t)){const e=V(t);e&&this._processPath(e.rings,i)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){(0,x.Bi)(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:r}=t,i=(0,E.$w)(t.scaleX,1);let s=i*e,n=e;const o=this._resourceManager.getResource(r);if(null!=o){const t=o.height/o.width;s=i*(e?t>1?e:e/t:o.width),n=e?t>1?e*t:e:o.height}this._merge(this.transformPt([-s/2,-n/2]),0),this._merge(this.transformPt([-s/2,n/2]),0),this._merge(this.transformPt([s/2,-n/2]),0),this._merge(this.transformPt([s/2,n/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new z);const r=X(t),i=(0,L.Z)({textString:e,font:r.font,symbol:t,supportsRichText:(0,L.q)(e)});let[s,n]=i?this._textRasterizer.computeRichTextSize(i,r):this._textRasterizer.computeTextSize(e,r);s=(0,a.PN)(s),n=(0,a.PN)(n);const o=this.transformSize(1)*this.reverseTransformScalar(1);s*=o,n*=o;const l=t.horizontalAlignment??w.D.CIMTextSymbol.horizontalalignment,h=t.verticalAlignment??w.D.CIMTextSymbol.verticalalignment;let c=0;switch(l){case"Left":c=s/2;break;case"Right":c=-s/2}let u=0;switch(h){case"Bottom":u=n/2;break;case"Top":u=-n/2;break;case"Baseline":u=n/6}this._merge(this.transformPt([-s/2+c,-n/2+u]),0),this._merge(this.transformPt([-s/2+c,n/2+u]),0),this._merge(this.transformPt([s/2+c,-n/2+u]),0),this._merge(this.transformPt([s/2+c,n/2+u]),0)}_processPath(t,e){if(t)for(const r of t){const t=r?r.length:0;if(t>1){this._merge(this.transformPt(r[0]),e);for(let i=1;i<t;i++)this._merge(this.transformPt(r[i]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class W extends O{constructor(t,e,r,i){super(e,r),this._applyAdditionalRenderProps=i,this._colorSubstitutionHelper=new M,this._ctx=t}drawSolidFill(t,e){if(!t)return;if((0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!0);else if((0,x.ZC)(t))this._buildPath(V(t).rings,!0);else{if(!(0,x.U9)(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const r=this._ctx;r.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",r.fill("evenodd")}drawSolidStroke(t,e,r,i,s,n){if(!t||!e||0===r)return;if((0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!1);else{if(!(0,x.ZC)(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(V(t).rings,!0)}const o=this._ctx;o.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",o.lineWidth=Math.max(this.transformSize(r),.5),this._setCapStyle(i),this._setJoinStyle(s),o.miterLimit=n,o.stroke()}pushClipPath(t){if(this._ctx.save(),(0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!0);else{if(!(0,x.ZC)(t))return;this._buildPath(V(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:r,url:i,tintColor:s}=t,n=(0,E.$w)(t.scaleX,1),o=this._resourceManager.getResource(i);if(null==o)return;let a=e*(o.width/o.height),l=e;e||(a=o.width,l=o.height);const h=(0,E.UE)(i)||"src"in o&&(0,E.UE)(o.src);let c="getFrame"in o?C(o):o;r&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,r)),this._applyAdditionalRenderProps&&!h&&s&&(c=this._colorSubstitutionHelper.tintImageData(c,s));const u=this.transformPt([0,0]),[f,d]=this.getTransformAngle(),m=this.transformSize(1),g=this._ctx;g.save(),g.setTransform({m11:n*m*f,m12:n*m*d,m21:-m*d,m22:m*f,m41:u[0],m42:u[1]}),g.drawImage(c,-a/2,-l/2,a,l),g.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new z);const r=X(t,this.transformSize((0,a.PN)(1))),i=(0,L.Z)({textString:e,font:r.font,symbol:t,supportsRichText:(0,L.q)(e)}),s=i?this._textRasterizer.rasterizeRichText(i,r):this._textRasterizer.rasterizeText(e,r);if(!s)return;const{size:n,anchorX:o,anchorY:l,canvas:h}=s,c=n[0]*(o+.5),u=n[1]*(l-.5),f=this._ctx,d=this.transformPt([0,0]),[m,g]=this.getTransformAngle();f.save(),f.setTransform({m11:1*m,m12:1*g,m21:-1*g,m22:1*m,m41:d[0]-1*c,m42:d[1]+1*u}),f.drawImage(h,0,0),f.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:r,height:i,offsetX:s,offsetY:n,rotation:o,scaleX:a,tintColor:l,url:h}=e;const c=this._resourceManager.getResource(h);if(null==c)return;if((0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!0);else if((0,x.ZC)(t))this._buildPath(V(t).rings,!0);else{if(!(0,x.U9)(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const u=this._ctx,f=(0,E.UE)(h)||"src"in c&&(0,E.UE)(c.src);let d,m="getFrame"in c?C(c):c;if(r&&(m=this._colorSubstitutionHelper.applyColorSubstitution(m,r)),this._applyAdditionalRenderProps){f||l&&(m=this._colorSubstitutionHelper.tintImageData(m,l)),d=u.createPattern(m,"repeat");const t=this.transformSize(1);o||(o=0),s?s*=t:s=0,n?n*=t:n=0,i&&(i*=t);const e=i?i/c.height:1,r=a&&i?a*i/c.width:1;if(0!==o||1!==e||1!==r||0!==s||0!==n){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(s,n).scaleSelf(r,e,1),d.setTransform(t)}}else d=u.createPattern(m,"repeat");u.save(),u.fillStyle=d,u.fill("evenodd"),u.restore()}drawPictureStroke(t,e){if(!t)return;let{colorSubstitutions:r,capStyle:i,joinStyle:n,miterLimit:o,tintColor:l,url:h,width:c}=e;const u=this._resourceManager.getResource(h);if(null==u)return;let f;if((0,x.Bi)(t))f=t.rings;else if((0,x.Rg)(t))f=t.paths;else{if(!(0,x.ZC)(t))return(0,x.U9)(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=V(t).rings}c||(c=u.width);const d=(0,E.UE)(h)||"src"in u&&(0,E.UE)(u.src);let m="getFrame"in u?C(u):u;r&&(m=this._colorSubstitutionHelper.applyColorSubstitution(m,r)),this._applyAdditionalRenderProps&&(d||l&&(m=this._colorSubstitutionHelper.tintImageData(m,l)));const g=Math.max(this.transformSize((0,a.Lz)(c)),.5),p=g/m.width,y=this._ctx,S=y.createPattern(m,"repeat-y");let _,M;y.save(),this._setCapStyle(i),this._setJoinStyle(n),void 0!==o&&(y.miterLimit=o),y.lineWidth=g;for(let t of f)if(t=(0,s.o8)(t),Y(t),t&&!(t.length<=1)){_=this.transformPt(t[0]);for(let e=1;e<t.length;e++){M=this.transformPt(t[e]);const r=G(_,M),i=new DOMMatrix;i.translateSelf(0,_[1]-g/2).scaleSelf(p,p,1).rotateSelf(0,0,90-r),S.setTransform(i),y.strokeStyle=S,y.beginPath(),y.moveTo(_[0],_[1]),y.lineTo(M[0],M[1]),y.stroke(),_=M}}y.restore()}drawGradientFill(t,e){if(!t)return;let r;if((0,x.Bi)(t))r=t.rings;else if((0,x.Rg)(t))r=t.paths;else{if(!(0,x.ZC)(t))return void H().error("Unable to draw gradient fill");r=V(t).rings}this._buildPath(r,!0);const{angle:i,gradientMethod:s,gradientSize:n,gradientSizeUnits:o}=e,h=w.D.CIMGradientFill,c=e.gradientType??h.gradientType,u=-(0,p.kU)(i??0),f=(0,l.Ie)();for(const t of r){const e=t?t.length:0;if(e>1)for(let r=0;r<e;r++){let e=this.transformPt(t[r]);"Linear"!==s&&"Rectangular"!==s||(e=k(e,-u)),(0,l.tK)(f,e)}}const[d,m,g,y]=f,S=this._ctx;switch(S.save(),s){case"Buffered":H().error(`Gradient method "${s}" currently unsupported.`);break;case"Linear":{const t=(m+y)/2,r="Absolute"===o?this.transformSize((0,a.Lz)(n)):(0,E.yX)(n,h.gradientSize)*(g-d),[i,s]="Discrete"===c?[g,g-r]:[d+r,d],l=k([i,t],u),f=k([s,t],u),p=S.createLinearGradient(l[0],l[1],f[0],f[1]);(0,P.AH)(p,e),S.fillStyle=p,S.fill("evenodd");break}case"Circular":{const t=(0,l.gX)(f),r=(0,l.ib)(f)/2,i="Absolute"===o?this.transformSize((0,a.Lz)(n)):(0,E.yX)(n,h.gradientSize)*r,[s,u]="Discrete"===c?[r,r-i]:[i,0],d=S.createRadialGradient(t[0],t[1],s,t[0],t[1],u);(0,P.AH)(d,e),S.fillStyle=d,S.fill("evenodd");break}case"Rectangular":{const r=(0,l.gX)(f),i=r[0],s=r[1],p=k(r,u),_=(r,i,s,n,o,a,l,h)=>{S.save(),this.pushClipPath(t);const c=k([o,a],u),f=k([l,h],u);S.beginPath(),S.moveTo(p[0],p[1]),S.lineTo(c[0],c[1]),S.lineTo(f[0],f[1]),S.lineTo(p[0],p[1]),S.clip();const d=k([r,i],u),m=k([s,n],u),g=S.createLinearGradient(d[0],d[1],m[0],m[1]);(0,P.AH)(g,e),S.fillStyle=g,S.fill("evenodd"),S.restore()};let x="Absolute"===o?this.transformSize((0,a.Lz)(n)):(0,E.yX)(n,h.gradientSize)*((0,l.VL)(f)/2),[M,b]="Discrete"===c?[g,g-x]:[i+x,i];_(M,s,b,s,g,m,g,y),[M,b]="Discrete"===c?[d,d+x]:[i-x,i],_(M,s,b,s,d,y,d,m),x="Absolute"===o?this.transformSize((0,a.Lz)(n)):(0,E.yX)(n,h.gradientSize)*((0,l.uJ)(f)/2);let[w,C]="Discrete"===c?[y,y-x]:[s+x,s];_(i,w,i,C,g,y,d,y),[w,C]="Discrete"===c?[m,m+x]:[s-x,s],_(i,w,i,C,d,m,g,m);break}}S.restore()}drawGradientStroke(t,e){const{capStyle:r,gradientMethod:i,gradientSize:n,gradientSizeUnits:o,joinStyle:l,miterLimit:h,width:c}=e;if(!t||0===c)return;let u;if((0,x.Bi)(t))u=t.rings;else if((0,x.Rg)(t))u=t.paths;else{if(!(0,x.ZC)(t))return void H().error("Unable to draw gradient stroke");u=V(t).rings}const f=e.gradientType??w.D.CIMGradientStroke.gradientType,d=Math.max(this.transformSize((0,a.Lz)(c)),.5),m=this._ctx;let g,p;m.save(),this._setCapStyle(r),this._setJoinStyle(l),void 0!==h&&(m.miterLimit=h),m.lineWidth=d;for(let t of u){if(t=(0,s.o8)(t),Y(t),!t||t.length<=1)continue;let r=0;g=this.transformPt(t[0]);for(let e=1;e<t.length;e++){p=this.transformPt(t[e]);const i=p[0]-g[0],s=p[1]-g[1];r+=Math.sqrt(i*i+s*s),g=p}const l="Absolute"===o?this.transformSize((0,a.Lz)(n)):(0,E.yX)(n,w.D.CIMGradientStroke.gradientSize)*("AcrossLine"===i?d:r);let h=0;g=this.transformPt(t[0]);for(let s=1;s<t.length;s++){p=this.transformPt(t[s]);const n=p[0]-g[0],o=p[1]-g[1],a=Math.sqrt(n*n+o*o);let c,u,y,S;switch(i){case"AcrossLine":{const[t,e]=k([n/a,o/a],-Math.PI/2),r=d/2,i="Discrete"===f?r:l-r;c=(g[0]+p[0])/2+t*i,u=(g[1]+p[1])/2+e*i,y=c-t*l,S=u-e*l;break}case"AlongLine":{const t=n/a,e=o/a;"Discrete"===f?(c=g[0]-t*h,u=g[1]-e*h,y=c+t*l,S=u+e*l):(y=g[0]+t*(r-h),S=g[1]+e*(r-h),c=y-t*l,u=S-e*l);break}default:return H().error("Unrecognized gradient method:",i),void m.restore()}const _=m.createLinearGradient(c,u,y,S);(0,P.AH)(_,e),m.strokeStyle=_,m.beginPath(),m.moveTo(g[0],g[1]),m.lineTo(p[0],p[1]),m.stroke(),h+=a,g=p}}m.restore()}_buildPath(t,e){const r=this._ctx;if(r.beginPath(),t)for(const i of t){const t=i?i.length:0;if(t>1){let s=this.transformPt(i[0]);r.moveTo(s[0],s[1]);for(let e=1;e<t;e++)s=this.transformPt(i[e]),r.lineTo(s[0],s[1]);e&&r.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function G(t,e){const r=e[0]-t[0],i=e[1]-t[1];return 180/Math.PI*Math.atan2(i,r)}const V=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null;function X(t,e=1){const r=(0,E.DW)(t),i=(0,E._d)(t.fontStyleName),s=t.fontFamilyName??g.Vb,{weight:n,style:o}=i,a=e*(t.height||5),l=(0,E.Bu)(t.horizontalAlignment),h=(0,E.Nl)(t.verticalAlignment),c=(0,E.pM)(t),u=(0,E.pM)(t.haloSymbol),f=null!=u?e*(t.haloSize??0):0,d=(0,E._1)(t.symbol),m=e*((0,E.xo)(t.symbol)||0),p="CIMBackgroundCallout"===t.callout?.type?t.callout.backgroundSymbol:null,y=(0,E.pM)(p),S=(0,E.xo)(p),_=(0,E._1)(p);return{color:c,size:a,horizontalAlignment:l,verticalAlignment:h,font:{family:s,style:(0,E.pV)(o),weight:(0,E.Kn)(n),decoration:r},outline:{size:m||0,color:d},halo:{size:f||0,color:u,style:o},backgroundColor:y,borderLine:null!=S&&null!=_?{size:S,color:_}:null,pixelRatio:1,premultiplyColors:!0}}function Y(t){let e,r,i,s,n,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],r=t[a][1]-o[1],s=0!==e?r/e:Math.PI/2,void 0!==i&&Math.abs(s-i)<=1e-4?(t.splice(a-1,1),o=n):(n=o,o=t[a],a++),i=s}var q=r(59868),Z=r(13195);const J=Math.PI,j=J/2,K=Math.PI/180,Q=96/72,tt=()=>n.A.getLogger("esri.symbols.cim.CIMSymbolHelper");function et(t){let e;switch(t.type){case"cim":return t.data;case"web-style":return t;case"simple-marker":{const r=nt.fromSimpleMarker(t);if(!r)throw new Error("InternalError: Cannot convert symbol to CIM");e=r;break}case"picture-marker":e=nt.fromPictureMarker(t);break;case"simple-line":e=nt.fromSimpleLineSymbol(t);break;case"simple-fill":e=nt.fromSimpleFillSymbol(t);break;case"picture-fill":e=nt.fromPictureFillSymbol(t);break;case"text":e=nt.fromTextSymbol(t)}return{type:"CIMSymbolReference",symbol:e}}function rt(t,e,r){switch(e.type){case"CIMSymbolReference":return rt(t,e.symbol,r);case"CIMPointSymbol":null==r&&(r={x:0,y:0}),t.drawSymbol(e,r);break;case"CIMLineSymbol":null==r&&(r={paths:[[[0,0],[10,0]]]}),t.drawSymbol(e,r);break;case"CIMPolygonSymbol":null==r&&(r={rings:[[[0,0],[0,10],[10,10],[10,0],[0,0]]]}),t.drawSymbol(e,r);break;case"CIMTextSymbol":{const r={x:0,y:0};t.drawSymbol(e,r);break}case"CIMVectorMarker":{const r=new m.W;t.drawMarker(e,r);break}}return t.envelope()}function it(t){if(!t)return 0;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAtExtremities":case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementAtRatioPositions":case"CIMMarkerPlacementOnLine":case"CIMMarkerPlacementOnVertices":return Math.abs(t.offset??0);default:return 0}}class st{static getSymbolInflateSize(t,e,r,i,s){return t||(t=[0,0,0,0]),e?this._getInflateSize(t,e,r,i,s):t}static safeSize(t){const e=Math.max(Math.abs(t[0]),Math.abs(t[2])),r=Math.max(Math.abs(t[1]),Math.abs(t[3]));return Math.sqrt(e*e+r*r)}static _vectorMarkerBounds(t,e,r,i){let s=!0;const n=(0,l.vt)();if(e?.markerGraphics)for(const o of e.markerGraphics){const e=[0,0,0,0];o.geometry&&((0,h.Rg)(n,o.geometry),e[0]=0,e[1]=0,e[2]=0,e[3]=0,this.getSymbolInflateSize(e,o.symbol,r,0,i),n[0]+=e[0],n[1]+=e[1],n[2]+=e[2],n[3]+=e[3],s?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],s=!1):(t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[2]),t[3]=Math.max(t[3],n[3])))}return t}static _getInflateSize(t,e,r,i,s){if(function(t){return void 0!==t.symbolLayers}(e)){const n=this._getLayersInflateSize(t,e.symbolLayers,r,i,s),o=(0,E.ll)(e.effects);return o>0&&(n[0]-=o,n[1]-=o,n[2]+=o,n[3]+=o),n}return this._getTextInflatedSize(t,e,s)}static _getLayersInflateSize(t,e,r,i,s){let n=!0;if(!e)return t;for(const o of e){if(!o)continue;let e=[0,0,0,0];switch(o.type){case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const t=o;let r=t.width;null!=r&&("Square"===t.capStyle||"Miter"===t.joinStyle?r/=1.4142135623730951:r/=2,e[0]=-r,e[1]=-r,e[2]=r,e[3]=r);break}case"CIMCharacterMarker":case"CIMVectorMarker":case"CIMPictureMarker":{const t=o;if("CIMVectorMarker"===o.type){const t=o;if(e=this._vectorMarkerBounds(e,t,r,s),t.frame){const r=(t.frame.xmin+t.frame.xmax)/2,i=(t.frame.ymin+t.frame.ymax)/2;if(e[0]-=r,e[1]-=i,e[2]-=r,e[3]-=i,null!=t.size){const r=t.size/(t.frame.ymax-t.frame.ymin);e[0]*=r,e[1]*=r,e[2]*=r,e[3]*=r}}}else if("CIMPictureMarker"===o.type){const i=o,s=r.getResource(i.url);let n=1;if(null!=s&&s.height&&(n=s.width/s.height),null!=t.size){const r=t.size/2,s=t.size*n*(i.scaleX??1)/2;e=[-s,-r,s,r]}}else if(null!=t.size){const r=t.size/2;e=[-r,-r,r,r]}if(t.anchorPoint){let r,i;"Absolute"===t.anchorPointUnits?(r=t.anchorPoint.x,i=t.anchorPoint.y):(r=t.anchorPoint.x*(e[2]-e[0]),i=t.anchorPoint.y*(e[3]-e[1]));const s=1.25*Math.sqrt(r*r+i*i);e[0]-=s,e[1]-=s,e[2]+=s,e[3]+=s}let n=(0,E.$w)(t.rotation);if(t.rotateClockwise&&(n=-n),i&&(n-=i),n){const t=K*n,r=Math.cos(t),i=Math.sin(t),s=(0,l.vt)([Z.MG,Z.MG,-Z.MG,-Z.MG]);(0,l.tK)(s,[e[0]*r-e[1]*i,e[0]*i+e[1]*r]),(0,l.tK)(s,[e[0]*r-e[3]*i,e[0]*i+e[3]*r]),(0,l.tK)(s,[e[2]*r-e[1]*i,e[2]*i+e[1]*r]),(0,l.tK)(s,[e[2]*r-e[3]*i,e[2]*i+e[3]*r]),e=s}let a=(0,E.$w)(t.offsetX),h=(0,E.$w)(t.offsetY);if(i){const t=K*i,e=Math.cos(t),r=Math.sin(t),s=a*r+h*e;a=a*e-h*r,h=s}e[0]+=a,e[1]+=h,e[2]+=a,e[3]+=h;const c=it(t.markerPlacement);c>0&&(e[0]-=c,e[1]-=c,e[2]+=c,e[3]+=c);break}}const a=(0,E.ll)(o.effects);a>0&&(e[0]-=a,e[1]-=a,e[2]+=a,e[3]+=a),n?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],n=!1):(t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3]))}return t}static _getTextInflatedSize(t,e,r){const i=(0,U.hV)(e.height??w.D.CIMTextSymbol.height);if(t[0]=-i/2,t[1]=-i/2,t[2]=i/2,t[3]=i/2,!r)return t;const s=r.get(e);if(!s)return t;if(!function(t){return"glyphs"===t.type?t.glyphs.length>0:t.runs.some(t=>t.glyphs.glyphs.length>0)}(s.glyphMosaicItems))return t;const{lineGapType:n,lineGap:o}=e,a=n?((t,e,r)=>{switch(t){case"ExtraLeading":return 1+e/r;case"Multiple":return e;case"Exact":return e/r}})(n,o??0,i):0,l=e.horizontalAlignment??w.D.CIMTextSymbol.horizontalalignment,h=e.verticalAlignment??w.D.CIMTextSymbol.verticalalignment,c="CIMBackgroundCallout"===e.callout?.type,u=(0,D.tA)(s.glyphMosaicItems,{scale:i/24,angle:(0,E.$w)(e.angle),xOffset:(0,E.$w)(e.offsetX),yOffset:(0,E.$w)(e.offsetY),horizontalAlignment:l,verticalAlignment:h,maxLineWidth:(0,U.Lu)(e.lineWidth),lineHeight:29*Math.max(.25,Math.min(a||1,4)),decoration:e.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:c}).boundsT,f=Math.sqrt(u.width*u.width+u.height*u.height);return t[0]-=u.x+f,t[1]-=u.y-f,t[2]+=u.x+f,t[3]+=-u.y+f,t}}class nt{static getEnvelope(t,e,r,i){if(!t)return null;const s=new $(r,i);if(Array.isArray(t)){let r;for(const i of t)r?r.union(rt(s,i,e)):r=rt(s,i,e);return r}return rt(s,t,e)}static getTextureInfo(t,e,r,i,s){const n=i??this.getEnvelope(t,null,e);if(!n)return[0,0,0,0,1];const o=Math.max(n.width,n.height)*Q;let a=null!=s?Math.max(s/o,1):1;a*=Q,n.x*=a,n.y*=a,n.width*=a,n.height*=a,n.width=Math.max(Math.ceil(n.x+n.width)-Math.floor(n.x),1)-1,n.height=Math.max(Math.ceil(n.y+n.height)-Math.floor(n.y),1)-1;let l=n.x+.5*n.width,h=n.y+.5*n.height;return l+=n.x-Math.floor(n.x),h+=n.y-Math.floor(n.y),i||(n.width+=r,n.height+=r,l+=r/2,h+=r/2),[n.width,n.height,l,h,a]}static getTextureAnchor(t,e,r){const[i,s,n,o,a]=this.getTextureInfo(t,e,2,null,r);return[-n/i,-o/s,s/a*Q]}static rasterize(t,e,r,i,s=!0,n){const[o,a,l,h,c]=this.getTextureInfo(e,i,2,r,n);t.width=o,t.height=a;const u=t.getContext("2d",{willReadFrequently:!0}),f=N.createScale(c,-c);f.translate(.5*o-l,.5*a+h);const d=new W(u,i,f);switch(e.type){case"CIMPointSymbol":{const t={type:"point",x:0,y:0};d.drawSymbol(e,t);break}case"CIMVectorMarker":{const t=new m.W;d.drawMarker(e,t);break}}const g=u.getImageData(0,0,t.width,t.height),p=new Uint8Array(g.data);if(s){let t;for(let e=0;e<p.length;e+=4)t=p[e+3]/255,p[e]=p[e]*t,p[e+1]=p[e+1]*t,p[e+2]=p[e+2]*t}return[p,t.width,t.height,-l/o,-h/a]}static fromTextSymbol(t){const{text:e}=t;return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:10,billboardMode3D:"FaceNearPlane",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:nt.createCIMTextSymbolfromTextSymbol(t),textString:e}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(t){const{height:e,outline:r,width:i,xoffset:s,xscale:n,yoffset:o,yscale:a}=t,l=[],h={type:"CIMPolygonSymbol",symbolLayers:l};if(r){const t=St(r);t&&l.push(t)}let c=t.url;"esriPFS"===t.type&&t.imageData&&(c=t.imageData);const u="angle"in t?t.angle??0:0,f=(i??0)*(n||1),d=(e??0)*(a||1);return l.push({type:"CIMPictureFill",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:c,height:d,width:f,offsetX:(0,E.$w)(s),offsetY:(0,E.$w)(o),rotation:(0,E.$w)(-u),colorSubstitutions:null}),h}static fromSimpleFillSymbol(t){const{color:e,style:r,outline:i}=t,n=[],o={type:"CIMPolygonSymbol",symbolLayers:n};if(i){const t=St(i);t&&n.push(t)}if(r&&"solid"!==r&&"none"!==r&&"esriSFSSolid"!==r&&"esriSFSNull"!==r){const t={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:ut(e),capStyle:"Butt",joinStyle:"Miter",width:.75}]};let i=0;const o=(0,a.PN)(yt(r)?8:10);switch(r){case"vertical":case"esriSFSVertical":i=90;break;case"forward-diagonal":case"esriSFSForwardDiagonal":case"diagonal-cross":case"esriSFSDiagonalCross":i=-45;break;case"backward-diagonal":case"esriSFSBackwardDiagonal":i=45;break;case"cross":case"esriSFSCross":i=0}n.push({type:"CIMHatchFill",lineSymbol:t,offsetX:0,offsetY:0,rotation:i,separation:o}),"cross"===r||"esriSFSCross"===r?n.push({type:"CIMHatchFill",lineSymbol:(0,s.o8)(t),offsetX:0,offsetY:0,rotation:90,separation:o}):"diagonal-cross"!==r&&"esriSFSDiagonalCross"!==r||n.push({type:"CIMHatchFill",lineSymbol:(0,s.o8)(t),offsetX:0,offsetY:0,rotation:45,separation:o})}else!r||"solid"!==r&&"esriSFSSolid"!==r||n.push({type:"CIMSolidFill",enable:!0,color:ut(e)});return o}static fromSimpleLineSymbol(t){const{cap:e,color:r,join:i,marker:s,miterLimit:n,style:o,width:a}=t;let l=null;"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(l=[{type:"CIMGeometricEffectDashes",dashTemplate:gt(o,e),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const h=[];if(s){let t;switch(s.placement){case"begin-end":t="Both";break;case"begin":t="JustBegin";break;case"end":t="JustEnd";break;default:t="None"}const e=nt.fromSimpleMarker(s,a,r).symbolLayers[0];e.markerPlacement={type:"CIMMarkerPlacementAtExtremities",placePerPart:!1,angleToLine:!0,keepUpright:!1,offset:0,extremityPlacement:t,offsetAlongLine:0},h.push(e)}return h.push({type:"CIMSolidStroke",color:"none"!==o&&"esriSLSNull"!==o?ut(r):[0,0,0,0],capStyle:at(e),joinStyle:lt(i),miterLimit:n,width:a,effects:l}),{type:"CIMLineSymbol",symbolLayers:h}}static fromPictureMarker(t){const{angle:e,height:r,width:i,xoffset:s,yoffset:n}=t;let o=t.url;return"esriPMS"===t.type&&t.imageData&&(o=t.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:r,width:i,offsetX:(0,E.$w)(s),offsetY:(0,E.$w)(n),rotation:(0,E.$w)(-e)}]}}static createCIMTextSymbolfromTextSymbol(t){const{angle:e,color:r,font:s,haloColor:n,haloSize:o,horizontalAlignment:a,kerning:l,lineWidth:h,text:c,verticalAlignment:u,xoffset:f,yoffset:d,backgroundColor:m,borderLineColor:g,borderLineSize:p}=t;let y,S,_,x,M,b;s&&(y=s.family,S=s.style,_=s.weight,x=s.size,M=s.decoration);let w=!1;return c&&(w=(0,i.y)(c)[1]),(m||p)&&(b={type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:ut(m)},{type:"CIMSolidStroke",enable:!0,color:ut(g),width:p??0}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null}),{type:"CIMTextSymbol",angle:e,blockProgression:2,depth3D:1,extrapolateBaselines:!0,fontEffects:0,fontEncoding:1,fontFamilyName:y||"Arial",fontStyleName:ft(S,_),fontType:0,haloSize:o,height:x,hinting:1,horizontalAlignment:ht(a??"center"),kerning:l,letterWidth:100,ligatures:!0,lineGapType:"Multiple",lineWidth:h,offsetX:(0,E.$w)(f),offsetY:(0,E.$w)(d),strikethrough:"line-through"===M,underline:"underline"===M,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:ut(r)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:ut(n)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:w?1:0,verticalAlignment:ct(u??"baseline"),verticalGlyphOrientation:0,wordSpacing:100,billboardMode3D:2,callout:b}}static createPictureMarkerRasterizationParam(t){const{angle:e,height:r,width:i,xoffset:s,yoffset:n}=t,o=t.url??t.source?.url??t.source?.imageData;return o?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureMarker",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:r,width:i,offsetX:(0,E.$w)(s),offsetY:(0,E.$w)(n),rotation:(0,E.$w)(-e)}}:null}static createPictureFillRasterizationParam(t){const{width:e,height:r,xoffset:i,yoffset:s,url:n}=t;return n?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureFill",enable:!0,scaleX:1,textureFilter:"Picture",tintColor:null,url:n,width:e,height:r,offsetX:(0,E.$w)(i),offsetY:(0,E.$w)(s),rotation:0}}:null}static fromSimpleMarker(t,e,r){const{style:i}=t,s=t.color??r;if("path"===i||"esriSMSPath"===i){const e=[];if("outline"in t&&t.outline){const r=t.outline;e.push({type:"CIMSolidStroke",enable:!0,width:r.width,color:ut(r.color),path:t.path})}e.push({type:"CIMSolidFill",enable:!0,color:ut(s),path:t.path});const[r,i]=pt("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:-(0,E.$w)(t.angle),size:(0,E.$w)(t.size||6),offsetX:(0,E.$w)(t.xoffset),offsetY:(0,E.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:r,markerGraphics:[{type:"CIMMarkerGraphic",geometry:i,symbol:{type:"CIMPolygonSymbol",symbolLayers:e}}]}]}}const n=[];let o,a,l=t.size;if("outline"in t&&t.outline&&"none"!==t.outline.style&&"esriSLSNull"!==t.outline.style){const e=t.outline,r="solid"!==e.style&&"esriSLSSolid"!==e.style;[o,a]=r?pt(i,t.size):pt(i);const s=e.width??q.A7.width;if(r){const e=s/t.size,r=(o.xmax-o.xmin)*e/2,i=(o.ymax-o.ymin)*e/2;o.xmin-=r,o.xmax+=r,o.ymin-=i,o.ymax+=i,l&&(l+=s)}const h="cross"!==t.style&&"x"!==t.style||"dot"===t?.outline.style||"short-dot"===t?.outline.style?"HalfGap":"FullPattern",c=r?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:gt(e.style,null).map(t=>e.width&&e.width>0?t*e.width:t),lineDashEnding:h,controlPointEnding:"FullPattern"}]:void 0;n.push({type:"CIMSolidStroke",capStyle:r?"Round":"Butt",enable:!0,width:s,color:ut(e.color),effects:c})}else!e||"line-marker"!==t.type||"cross"!==t.style&&"x"!==t.style?[o,a]=pt(i):([o,a]=pt(i),n.push({type:"CIMSolidStroke",enable:!0,width:e,color:ut(s)}));n.push({type:"CIMSolidFill",enable:!0,color:ut(s)});const h={type:"CIMPolygonSymbol",symbolLayers:n};return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,E.$w)(-t.angle),size:(0,E.$w)(l||6*e),offsetX:(0,E.$w)(t.xoffset),offsetY:(0,E.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:o,markerGraphics:[{type:"CIMMarkerGraphic",geometry:a,symbol:h}]}]}}static fromCIMHatchFill(t,e){const r=e*(t.separation??w.D.CIMHatchFill.separation),i=r/2,n=(0,s.o8)(t.lineSymbol);n.symbolLayers?.forEach(t=>{switch(t.type){case"CIMSolidStroke":null!=t.width&&(t.width*=e),t.effects?.forEach(t=>{if("CIMGeometricEffectDashes"===t.type){const r=t.dashTemplate;t.dashTemplate=r?.map(t=>t*e)}});break;case"CIMVectorMarker":{null!=t.size&&(t.size*=e);const r=t.markerPlacement;null!=r&&"placementTemplate"in r&&(r.placementTemplate=r.placementTemplate.map(t=>t*e));break}}});let o=this._getLineSymbolPeriod(n)||4;for(;o<4;)o*=2;const a=o/2;return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-a,xmax:a,ymin:-i,ymax:i},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-a,0],[a,0]]]},symbol:n}],size:r}}static async normalizeSymbolAndFetchResources(t,e,r=null){if(!t)return;const i=[];if("effects"in t&&t.effects)for(const e of t.effects)i.push((0,d.ai)(e));async function s(t){if("CIMTextSymbol"!==t.type)return;const{fontFamilyName:r,fontStyleName:i}=t;if("calcitewebcoreicons"===r?.toLowerCase())return;const{style:s,weight:n}=(0,E._d)(i),o=(0,E.DW)(t),a=new f.A({family:r,style:s,weight:n,decoration:o});try{await e.loadFont(a)}catch{tt().error(`Unsupported font ${r} in CIM symbol`)}}i.push(s(t)),ot(t,t=>{if(t.effects)for(const e of t.effects)i.push((0,d.ai)(e));if("CIMVectorMarker"===t.type){for(const e of t.markerGraphics)(0,c.Ed)(e.geometry)&&(e.geometry=(0,u.GS)(e.geometry,{maxDeviation:.01}));t.markerPlacement&&i.push((0,d.g1)(t.markerPlacement))}"url"in t&&t.url&&i.push(e.fetchResource(t.url,{signal:r})),"symbol"in t&&i.push(s(t.symbol))}),await Promise.all(i)}static _getLineSymbolPeriod(t){if(t){const e=this._getEffectsRepeat(t.effects);if(e)return e;if(t.symbolLayers)for(const e of t.symbolLayers)if(e){const t=this._getEffectsRepeat(e.effects);if(t)return t;switch(e.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=this._getPlacementRepeat(e.markerPlacement);if(t)return t}}}}return 0}static _getEffectsRepeat(t){if(t)for(const e of t)if(e)switch(e.type){case"CIMGeometricEffectDashes":{const t=e.dashTemplate;if(t&&t.length){let e=0;for(const r of t)e+=r;return 1&t.length&&(e*=2),e}break}case"CIMGeometricEffectWave":return e.period;default:tt().error(`unsupported geometric effect type ${e.type}`)}return 0}static _getPlacementRepeat(t){if(t)switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineVariableSize":{const e=t.placementTemplate;if(e&&e.length){let t=0;for(const r of e)t+=+r;return 1&e.length&&(t*=2),t}break}}return 0}static fromCIMInsidePolygon(t){const e=t.markerPlacement,r={...t};r.markerPlacement=null,r.anchorPoint=null;const i=Math.abs(e.stepX),s=Math.abs(e.stepY),n=(e.randomness??100)/100;let l,h,c,u;if("Random"===e.gridType){const t=(0,a.PN)(1024),r=Math.max(Math.floor(t/i),1),f=Math.max(Math.floor(t/s),1);l=r*i/2,h=f*s/2,c=2*h;const d=new o.A(e.seed),m=n*i/1.5,g=n*s/1.5;u=[];for(let t=0;t<r;t++)for(let e=0;e<f;e++){const r=t*i-l+m*(.5-d.getFloat()),n=e*s-h+g*(.5-d.getFloat());u.push({x:r,y:n}),0===t&&u.push({x:r+2*l,y:n}),0===e&&u.push({x:r,y:n+2*h})}}else!0===e.shiftOddRows?(l=i/2,h=s,c=2*s,u=[{x:-l,y:0},{x:l,y:0},{x:0,y:h},{x:0,y:-h}]):(l=i/2,h=s/2,c=s,u=[{x:-i,y:0},{x:0,y:-s},{x:-i,y:-s},{x:0,y:0},{x:i,y:0},{x:0,y:s},{x:i,y:s},{x:-i,y:s},{x:i,y:-s}]);return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-l,xmax:l,ymin:-h,ymax:h},markerGraphics:u.map(t=>({type:"CIMMarkerGraphic",geometry:t,symbol:{type:"CIMPointSymbol",symbolLayers:[r]}})),size:c}}}function ot(t,e){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const r=t.symbolLayers;if(!r)return;for(const t of r)if(e(t),"CIMVectorMarker"===t.type){const r=t.markerGraphics;if(!r)continue;for(const t of r)if(t){const r=t.symbol;r&&ot(r,e)}}break}}}const at=t=>{if(!t)return"Butt";switch(t){case"butt":return"Butt";case"square":return"Square";case"round":return"Round"}},lt=t=>{if(!t)return"Miter";switch(t){case"miter":return"Miter";case"round":return"Round";case"bevel":return"Bevel"}},ht=t=>{if(null==t)return"Center";switch(t){case"left":return"Left";case"right":return"Right";case"center":return"Center";case"justify":return"Justify"}},ct=t=>{if(null==t)return"Center";switch(t){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},ut=t=>{if(!t)return[0,0,0,0];const{r:e,g:r,b:i,a:s}=t;return[e,r,i,255*s]},ft=(t,e)=>{const r=dt(e),i=mt(t);return r&&i?`${r}-${i}`:`${r}${i}`},dt=t=>{if(!t)return"";switch(t.toLowerCase()){case"bold":case"bolder":return"bold"}return""},mt=t=>{if(!t)return"";switch(t.toLowerCase()){case"italic":case"oblique":return"italic"}return""},gt=(t,e)=>{const r=.001,i="butt"===e;switch(t){case"dash":case"esriSLSDash":return i?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return i?[4,3,1,3]:[3,4,r,4];case"dot":case"esriSLSDot":return i?[1,3]:[r,4];case"long-dash":case"esriSLSLongDash":return i?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return i?[8,3,1,3]:[7,4,r,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return i?[8,3,1,3,1,3]:[7,4,r,4,r,4];case"short-dash":case"esriSLSShortDash":return i?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return i?[4,1,1,1]:[3,2,r,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return i?[4,1,1,1,1,1]:[3,2,r,2,r,2];case"short-dot":case"esriSLSShortDot":return i?[1,1]:[r,2];case"solid":case"esriSLSSolid":case"none":return tt().error("Unexpected: style does not require rasterization"),[0,0];default:return tt().error(`Tried to rasterize SLS, but found an unexpected style: ${t}!`),[0,0]}},pt=(t,e=100)=>{const r=e/2;let i,s;const n=t;if("circle"===n||"esriSMSCircle"===n){const t=.25;let e=Math.acos(1-t/r),n=Math.ceil(J/e/4);0===n&&(n=1),e=j/n,n*=4;const o=[];o.push([r,0]);for(let t=1;t<n;t++)o.push([r*Math.cos(t*e),-r*Math.sin(t*e)]);o.push([r,0]),i={rings:[o]},s={xmin:-r,ymin:-r,xmax:r,ymax:r}}else if("cross"===n||"esriSMSCross"===n){const t=0;i={paths:[[[t,r],[t,-r]],[[r,t],[-r,t]]]},s={xmin:-r,ymin:-r,xmax:r,ymax:r}}else if("diamond"===n||"esriSMSDiamond"===n)i={rings:[[[-r,0],[0,r],[r,0],[0,-r],[-r,0]]]},s={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("square"===n||"esriSMSSquare"===n)i={rings:[[[-r,-r],[-r,r],[r,r],[r,-r],[-r,-r]]]},s={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("x"===n||"esriSMSX"===n)i={paths:[[[r,r],[-r,-r]],[[r,-r],[-r,r]]]},s={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("triangle"===n||"esriSMSTriangle"===n){const t=.5773502691896257*e,r=-t,n=2/3*e,o=n-e;i={rings:[[[r,o],[0,n],[t,o],[r,o]]]},s={xmin:r,ymin:o,xmax:t,ymax:n}}else"arrow"===n&&(i={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},s={xmin:-r,ymin:-r,xmax:r,ymax:r});return[s,i]},yt=t=>"vertical"===t||"horizontal"===t||"cross"===t||"esriSFSCross"===t||"esriSFSVertical"===t||"esriSFSHorizontal"===t;function St(t){if(!t)return null;let e=null;const{cap:r,color:i,join:s,miterLimit:n,style:o,width:a}=t;return"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(e=[{type:"CIMGeometricEffectDashes",dashTemplate:gt(o,r),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),{type:"CIMSolidStroke",color:"esriSLSNull"!==o&&"none"!==o?ut(i):[0,0,0,0],capStyle:at(r),joinStyle:lt(s),miterLimit:n,width:a,effects:e}}},44589(t,e,r){r.d(e,{AH:()=>a}),r(40804);var i=r(53966),s=(r(34727),r(35521),r(28076));const n=()=>i.A.getLogger("esri.symbols.cim.rasterizingUtils");let o;function a(t,e){const{colorRamp:r,gradientType:i}=e,n=l(r),a="CIMFixedColorRamp"===r.type;if("Continuous"===i&&!a)return h(t,n);const c=e.interval??s.D.CIMGradientFill.interval;if(a)return h(t,function(t,e){const r=[],i=(t.length-1)/(e-1);for(let s=0;s<e;s++){const n=t[Math.round(s*i)].color;r.push({offset:s/e,color:n}),r.push({offset:(s+1)/e,color:n})}return r}(n,c));const u=[];o??=document.createElement("canvas"),function(t,e,r,i,s){const n=r+2*s;t.width=n,t.height=i;const o=(s+1)/n,a=t.getContext("2d",{willReadFrequently:!0});if(e.length>0){const t=a.createLinearGradient(0,0,n,i);h(t,e,o),a.fillStyle=t}else a.fillStyle="rgba(128, 128, 128, 1)";a.fillRect(0,0,n,i)}(o,n,c,1,0);const f=o.getContext("2d").getImageData(0,0,c,1).data;for(let t=0,e=0;t<c;t++,e=4*t){const r=[f[e+0],f[e+1],f[e+2],f[e+3]];u.push({offset:t/c,color:r}),u.push({offset:(t+1)/c,color:r})}return h(t,u)}function l(t){const e=[];switch(t.type){case"CIMPolarContinuousColorRamp":case"CIMLinearContinuousColorRamp":{"CIMPolarContinuousColorRamp"===t.type&&n().warnOnce("CIMPolarContinuousColorRamp is currently unsupported. Falling back to CIMLinearContinuousColorRamp.");const r=t;e.push({offset:0,color:[r.fromColor[0],r.fromColor[1],r.fromColor[2],r.fromColor[3]/255]}),e.push({offset:1,color:[r.toColor[0],r.toColor[1],r.toColor[2],r.toColor[3]/255]});break}case"CIMFixedColorRamp":{const r=t,i=1/(r.colors.length-1);let s=0;for(const t of r.colors)e.push({offset:s,color:[t[0],t[1],t[2],t[3]/255]}),s+=i;break}case"CIMMultipartColorRamp":{const r=t,i=r.weights.reduce((t,e)=>t+e,0);let s=0;for(let t=0;t<r.colorRamps.length;t++){const n=r.colorRamps[t],o=r.weights[t],a=l(n);for(const t of a)e.push({offset:(s+t.offset*o)/i,color:t.color});s+=o}break}default:n().error(`Color ramp "${t.type}" currently unsupported.`)}return e}function h(t,e,r=0){for(const{offset:i,color:s}of e)t.addColorStop(Math.min(Math.max(i,r),1-r),`rgba(${s[0]}, ${s[1]}, ${s[2]}, ${s[3]})`)}}}]);
|
package/popup/Feature.d.ts
DELETED
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import type Graphic from "../Graphic.js";
|
|
2
|
-
import type EsriMap from "../Map.js";
|
|
3
|
-
import type Accessor from "../core/Accessor.js";
|
|
4
|
-
import type Point from "../geometry/Point.js";
|
|
5
|
-
import type SpatialReference from "../geometry/SpatialReference.js";
|
|
6
|
-
import type FeatureAbilities from "./support/FeatureAbilities.js";
|
|
7
|
-
import type { IdentifiableMixin, IdentifiableMixinProperties } from "../core/Identifiable.js";
|
|
8
|
-
import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
|
|
9
|
-
import type { FeatureFormattedAttributes, LastEditInfo, PopupTemplateContentResolved, RelatedInfo, State } from "./types.js";
|
|
10
|
-
import type { TimeZone } from "../time/types.js";
|
|
11
|
-
import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
|
|
12
|
-
import type { FeatureAbilitiesProperties } from "./support/FeatureAbilities.js";
|
|
13
|
-
import type { GraphicProperties } from "../Graphic.js";
|
|
14
|
-
import type { PointProperties } from "../geometry/Point.js";
|
|
15
|
-
|
|
16
|
-
/** @internal */
|
|
17
|
-
export interface FeatureProperties extends IdentifiableMixinProperties, Partial<Pick<Feature, "defaultPopupTemplateEnabled" | "map" | "view">> {
|
|
18
|
-
/**
|
|
19
|
-
* Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that the [Feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component should use when querying and displaying its content.
|
|
20
|
-
*
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
abilities?: FeatureAbilitiesProperties;
|
|
24
|
-
/**
|
|
25
|
-
* The [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) used to represent the feature.
|
|
26
|
-
*
|
|
27
|
-
* @internal
|
|
28
|
-
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
29
|
-
* @example
|
|
30
|
-
* let graphic = new Graphic({
|
|
31
|
-
* geometry: view.center,
|
|
32
|
-
* attributes: {
|
|
33
|
-
* "name": "Spruce",
|
|
34
|
-
* "family": "Pinaceae",
|
|
35
|
-
* "count": 126
|
|
36
|
-
* },
|
|
37
|
-
* symbol: new SimpleMarkerSymbol({
|
|
38
|
-
* style: "square",
|
|
39
|
-
* color: "blue",
|
|
40
|
-
* size: "8px"
|
|
41
|
-
* }),
|
|
42
|
-
* popupTemplate: {
|
|
43
|
-
* content: [
|
|
44
|
-
* {
|
|
45
|
-
* // Set popup template content
|
|
46
|
-
* }
|
|
47
|
-
* ]
|
|
48
|
-
* }
|
|
49
|
-
* });
|
|
50
|
-
*/
|
|
51
|
-
graphic?: GraphicProperties | null;
|
|
52
|
-
/**
|
|
53
|
-
* The [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) representing the location of the
|
|
54
|
-
* [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) interaction used to trigger the opening of the component.
|
|
55
|
-
*
|
|
56
|
-
* This value should be set when executing Arcade expressions in the Feature component that
|
|
57
|
-
* expect the `$userInput` profile variable to have a value.
|
|
58
|
-
*
|
|
59
|
-
* @internal
|
|
60
|
-
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
61
|
-
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
62
|
-
*/
|
|
63
|
-
location?: PointProperties | null;
|
|
64
|
-
/**
|
|
65
|
-
* The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations.
|
|
66
|
-
* This property should be set if executing Arcade expressions that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/).
|
|
67
|
-
*
|
|
68
|
-
* @internal
|
|
69
|
-
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
|
|
70
|
-
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
71
|
-
*/
|
|
72
|
-
spatialReference?: SpatialReferenceProperties | null;
|
|
73
|
-
/**
|
|
74
|
-
* Dates and times will be displayed in this time zone. By default this time zone is
|
|
75
|
-
* inherited from [MapView.timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone). When a MapView is not associated with this property then the property will fallback to the `system` time zone.
|
|
76
|
-
*
|
|
77
|
-
* **Possible Values**
|
|
78
|
-
*
|
|
79
|
-
* Value | Description |
|
|
80
|
-
* ----- | ----------- |
|
|
81
|
-
* system | Dates and times will be displayed in the timezone of the device or browser.
|
|
82
|
-
* unknown | Dates and time are not adjusted for any timezone.
|
|
83
|
-
* Specified IANA timezone | Dates and times will be displayed in the specified IANA time zone. See [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
84
|
-
*
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
timeZone?: TimeZone | null;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/** @internal */
|
|
91
|
-
export type PopupViewModelContent = PopupTemplateContentResolved;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Provides reactive state and logic for populating the [Feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component.
|
|
95
|
-
*
|
|
96
|
-
* The class resolves popup template content for the current [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/), including evaluating Arcade expressions, formatting attribute values, and fetching related feature information.
|
|
97
|
-
*
|
|
98
|
-
* @internal
|
|
99
|
-
* @see [Feature component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/)
|
|
100
|
-
* @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
|
|
101
|
-
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
102
|
-
* @see [Arcade - expression language](https://developers.arcgis.com/javascript/latest/arcade/)
|
|
103
|
-
* @since 5.1
|
|
104
|
-
*/
|
|
105
|
-
export default class Feature extends FeatureSuperclass {
|
|
106
|
-
/** @internal */
|
|
107
|
-
constructor(properties?: FeatureProperties);
|
|
108
|
-
/**
|
|
109
|
-
* Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that the [Feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component should use when querying and displaying its content.
|
|
110
|
-
*
|
|
111
|
-
* @internal
|
|
112
|
-
*/
|
|
113
|
-
get abilities(): FeatureAbilities;
|
|
114
|
-
set abilities(value: FeatureAbilitiesProperties);
|
|
115
|
-
/**
|
|
116
|
-
* The [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) of the feature.
|
|
117
|
-
*
|
|
118
|
-
* @internal
|
|
119
|
-
*/
|
|
120
|
-
get content(): PopupViewModelContent | null | undefined;
|
|
121
|
-
/**
|
|
122
|
-
* Enables automatic creation of a popup template for layers that have popups enabled but no
|
|
123
|
-
* popupTemplate defined. Automatic popup templates are supported for layers that
|
|
124
|
-
* support the `createPopupTemplate` method. (Supported for
|
|
125
|
-
* [BuildingComponentSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/buildingSublayers/BuildingComponentSublayer/),
|
|
126
|
-
* [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/),
|
|
127
|
-
* [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
|
|
128
|
-
* [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/),
|
|
129
|
-
* [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/),
|
|
130
|
-
* [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/)),
|
|
131
|
-
* [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/),
|
|
132
|
-
* [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/),
|
|
133
|
-
* [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/),
|
|
134
|
-
* [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/),
|
|
135
|
-
* [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/),
|
|
136
|
-
* [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/),
|
|
137
|
-
* [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/),
|
|
138
|
-
* [Sublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/),
|
|
139
|
-
* [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/),
|
|
140
|
-
* [VoxelLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VoxelLayer/),
|
|
141
|
-
* [WCSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WCSLayer/), and
|
|
142
|
-
* [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/)).
|
|
143
|
-
*
|
|
144
|
-
* @default false
|
|
145
|
-
* @internal
|
|
146
|
-
*/
|
|
147
|
-
accessor defaultPopupTemplateEnabled: boolean;
|
|
148
|
-
/**
|
|
149
|
-
* A read-only map of Arcade expression names to their evaluated values for the current feature.
|
|
150
|
-
*
|
|
151
|
-
* @internal
|
|
152
|
-
*/
|
|
153
|
-
get expressionAttributes(): Record<string, any> | null | undefined;
|
|
154
|
-
/**
|
|
155
|
-
* The formatted attributes calculated from `fieldInfo` [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
|
|
156
|
-
* content. They are obtained from the feature's [graphic](#graphic) attribute values
|
|
157
|
-
* and can be read:
|
|
158
|
-
* * globally using the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#fieldInfos) property
|
|
159
|
-
* directly at the root level of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/), or
|
|
160
|
-
* * per an individual content element. This element is defined with a [FieldsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/)
|
|
161
|
-
* popup element set on the PopupTemplate [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) property.
|
|
162
|
-
*
|
|
163
|
-
* @internal
|
|
164
|
-
*/
|
|
165
|
-
get formattedAttributes(): FeatureFormattedAttributes | null | undefined;
|
|
166
|
-
/**
|
|
167
|
-
* The [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) used to represent the feature.
|
|
168
|
-
*
|
|
169
|
-
* @internal
|
|
170
|
-
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
171
|
-
* @example
|
|
172
|
-
* let graphic = new Graphic({
|
|
173
|
-
* geometry: view.center,
|
|
174
|
-
* attributes: {
|
|
175
|
-
* "name": "Spruce",
|
|
176
|
-
* "family": "Pinaceae",
|
|
177
|
-
* "count": 126
|
|
178
|
-
* },
|
|
179
|
-
* symbol: new SimpleMarkerSymbol({
|
|
180
|
-
* style: "square",
|
|
181
|
-
* color: "blue",
|
|
182
|
-
* size: "8px"
|
|
183
|
-
* }),
|
|
184
|
-
* popupTemplate: {
|
|
185
|
-
* content: [
|
|
186
|
-
* {
|
|
187
|
-
* // Set popup template content
|
|
188
|
-
* }
|
|
189
|
-
* ]
|
|
190
|
-
* }
|
|
191
|
-
* });
|
|
192
|
-
*/
|
|
193
|
-
get graphic(): Graphic | null | undefined;
|
|
194
|
-
set graphic(value: GraphicProperties | null | undefined);
|
|
195
|
-
/**
|
|
196
|
-
* The heading for the feature.
|
|
197
|
-
*
|
|
198
|
-
* @default ""
|
|
199
|
-
* @internal
|
|
200
|
-
*/
|
|
201
|
-
get heading(): string;
|
|
202
|
-
/**
|
|
203
|
-
* Indicates whether the current [graphic](#graphic) resides in a non-spatial table.
|
|
204
|
-
*
|
|
205
|
-
* @internal
|
|
206
|
-
*/
|
|
207
|
-
get isFeatureFromTable(): boolean;
|
|
208
|
-
/**
|
|
209
|
-
* A read-only property containing metadata regarding the last edit performed on a feature.
|
|
210
|
-
* This object has the following properties:
|
|
211
|
-
*
|
|
212
|
-
* @internal
|
|
213
|
-
*/
|
|
214
|
-
get lastEditInfo(): LastEditInfo | null | undefined;
|
|
215
|
-
/**
|
|
216
|
-
* The [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) representing the location of the
|
|
217
|
-
* [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) interaction used to trigger the opening of the component.
|
|
218
|
-
*
|
|
219
|
-
* This value should be set when executing Arcade expressions in the Feature component that
|
|
220
|
-
* expect the `$userInput` profile variable to have a value.
|
|
221
|
-
*
|
|
222
|
-
* @internal
|
|
223
|
-
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
224
|
-
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
225
|
-
*/
|
|
226
|
-
get location(): Point | null | undefined;
|
|
227
|
-
set location(value: PointProperties | null | undefined);
|
|
228
|
-
/**
|
|
229
|
-
* A map is required when the input [graphic](#graphic) has a popupTemplate that contains [Arcade](https://developers.arcgis.com/arcade) expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use the `$map` profile variable to access data from layers within a map. Without a map, expressions that use `$map` will throw an error.
|
|
230
|
-
*
|
|
231
|
-
* Alternatively, the [view](#view) property can be used to provide the map instance for this property.
|
|
232
|
-
*
|
|
233
|
-
* @internal
|
|
234
|
-
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
|
|
235
|
-
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
236
|
-
* @example
|
|
237
|
-
* // The building footprints represent the buildings that intersect a clicked parcel
|
|
238
|
-
* let buildingFootprints = Intersects($feature, FeatureSetByName($map, "Building Footprints"));
|
|
239
|
-
*/
|
|
240
|
-
accessor map: EsriMap | null | undefined;
|
|
241
|
-
/**
|
|
242
|
-
* A read-only map containing information about related features for the current feature.
|
|
243
|
-
* The keys are related layer IDs as strings, and the values are [RelatedInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/types/#RelatedInfo) objects.
|
|
244
|
-
* This property is populated when the feature has related fields and is used to manage and display related feature information.
|
|
245
|
-
*
|
|
246
|
-
* @internal
|
|
247
|
-
*/
|
|
248
|
-
get relatedInfos(): Map<string, RelatedInfo>;
|
|
249
|
-
/**
|
|
250
|
-
* The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations.
|
|
251
|
-
* This property should be set if executing Arcade expressions that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/).
|
|
252
|
-
*
|
|
253
|
-
* @internal
|
|
254
|
-
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
|
|
255
|
-
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
256
|
-
*/
|
|
257
|
-
get spatialReference(): SpatialReference | null | undefined;
|
|
258
|
-
set spatialReference(value: SpatialReferenceProperties | null | undefined);
|
|
259
|
-
/**
|
|
260
|
-
* The current state of the Feature component.
|
|
261
|
-
*
|
|
262
|
-
* @default "disabled"
|
|
263
|
-
* @internal
|
|
264
|
-
*/
|
|
265
|
-
get state(): State;
|
|
266
|
-
/**
|
|
267
|
-
* Dates and times will be displayed in this time zone. By default this time zone is
|
|
268
|
-
* inherited from [MapView.timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone). When a MapView is not associated with this property then the property will fallback to the `system` time zone.
|
|
269
|
-
*
|
|
270
|
-
* **Possible Values**
|
|
271
|
-
*
|
|
272
|
-
* Value | Description |
|
|
273
|
-
* ----- | ----------- |
|
|
274
|
-
* system | Dates and times will be displayed in the timezone of the device or browser.
|
|
275
|
-
* unknown | Dates and time are not adjusted for any timezone.
|
|
276
|
-
* Specified IANA timezone | Dates and times will be displayed in the specified IANA time zone. See [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
277
|
-
*
|
|
278
|
-
* @internal
|
|
279
|
-
*/
|
|
280
|
-
get timeZone(): TimeZone;
|
|
281
|
-
set timeZone(value: TimeZone | null | undefined);
|
|
282
|
-
/**
|
|
283
|
-
* A reference to the [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
284
|
-
*
|
|
285
|
-
* > [!WARNING]
|
|
286
|
-
* >
|
|
287
|
-
* > A view is required if the user expects to display content in any of the following situations:
|
|
288
|
-
* > - The [graphic](#graphic) has a popupTemplate containing Arcade expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/) or reference the `$map` profile variable (i.e. access data from layers within a map).
|
|
289
|
-
* > - Content is displayed from the popup template of an [aggregate feature](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#isAggregate) (i.e. a [cluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) or [bin](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/)).
|
|
290
|
-
* > - Values from `date` and `timestamp-offset` [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type) should respect the view's [time zone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone).
|
|
291
|
-
*
|
|
292
|
-
* @internal
|
|
293
|
-
*/
|
|
294
|
-
accessor view: MapViewOrSceneView | null | undefined;
|
|
295
|
-
/**
|
|
296
|
-
* Indicates whether the feature is currently waiting for all of its content to finish loading.
|
|
297
|
-
*
|
|
298
|
-
* @internal
|
|
299
|
-
*/
|
|
300
|
-
get waitingForContent(): boolean;
|
|
301
|
-
/**
|
|
302
|
-
* Fetches and updates the geometry of the [graphic](#graphic).
|
|
303
|
-
* This method can be called to refresh the [graphic](#graphic)'s geometry before taking actions such as calling
|
|
304
|
-
* [View2D.goTo()](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#goTo) with the graphic as the `target`.
|
|
305
|
-
*
|
|
306
|
-
* @returns A promise that resolves when the geometry update attempt has completed.
|
|
307
|
-
* @internal
|
|
308
|
-
*/
|
|
309
|
-
updateGeometry(): Promise<void>;
|
|
310
|
-
}
|
|
311
|
-
declare const FeatureSuperclass: typeof Accessor & typeof IdentifiableMixin
|
package/popup/Feature.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../Graphic.js";import{FeatureSetQueryInterceptor as i}from"../arcade/featureset/support/FeatureSetQueryInterceptor.js";import r from"../core/Accessor.js";import{isSome as s}from"../core/arrayUtils.js";import{createTask as o}from"../core/asyncUtils.js";import{IdentifiableMixin as a}from"../core/Identifiable.js";import n from"../core/Logger.js";import{abortMaybe as l}from"../core/maybe.js";import{eachAlways as p,isAbortError as h,throwIfAborted as c}from"../core/promiseUtils.js";import{watch as u,initial as d,when as f}from"../core/reactiveUtils.js";import{throttle as m}from"../core/throttle.js";import{property as g,subclass as y}from"../core/accessorSupport/decorators.js";import _ from"../geometry/Point.js";import b from"../geometry/SpatialReference.js";import v from"./content/TextContent.js";import{compileExpressionInfos as T,formatArcadeValue as I}from"./support/arcadeFeatureUtils.js";import A from"./support/FeatureAbilities.js";import{preLayerQueryCallback as x,preRequestCallback as C,createFieldInfoMap as E,getAllFieldInfos as w,getSourceLayer as F,querySourceLayer as k,queryUpdatedFeature as j,isRelatableFeatureSupportedLayer as P,isAssociatedFeatureSupportedLayer as R,formatEditInfo as O,substituteFieldsInLinksAndAttributes as M,graphicCallback as Z,formatAttributes as U,isRelatedField as L}from"./support/featureUtils.js";import{queryLayerInfos as N,queryRelatedFeatures as S,setRelatedFeatures as H,getRelatedFieldInfo as G,createRelatedInfo as q,updateRelatedInfo as z}from"./support/relatedFeatureUtils.js";import{system as B}from"../time/constants.js";var Q;const D=1;let J=class extends(a(r)){static{Q=this}constructor(t){super(t),this._error=null,this._graphicChangedTask=null,this._evaluateExpressionAttributesTask=null,this._graphicExpressionAttributes=null,this.abilities=new A,this.content=null,this.description=null,this.defaultPopupTemplateEnabled=!1,this.expressionAttributes=null,this.formattedAttributes=null,this.graphic=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.heading="",this.view=null,this._graphicChangedThrottled=m(this._graphicChanged,()=>this.notifyChange("waitingForContent"),D,this),this._isAllowedContentType=t=>{const{abilities:e}=this;return"attachments"===t.type&&!!e.attachmentsContent||"custom"===t.type&&!!e.customContent||"fields"===t.type&&!!e.fieldsContent||"media"===t.type&&!!e.mediaContent||"text"===t.type&&!!e.textContent||"expression"===t.type&&!!e.expressionContent||"relationship"===t.type&&!!e.relationshipContent||"utility-network-associations"===t.type&&!!e.utilityNetworkAssociationsContent},this._evaluateExpressionAttributesThrottled=m(this._evaluateExpressionAttributes,()=>this.notifyChange("waitingForContent"),D,this),this.addHandles([u(()=>[this._effectivePopupTemplate,this.abilities.attachmentsContent,this.abilities.chartAnimation,this.abilities.customContent,this.abilities.expressionContent,this.abilities.fieldsContent,this.abilities.mediaContent,this.abilities.relationshipContent,this.abilities.textContent,this.abilities.utilityNetworkAssociationsContent,this.graphic,this.timeZone],()=>this._graphicChangedThrottled(),d),f(()=>{if(!this._graphicChangedTask?.finished||null==this._graphicChangedTask.value)return null;const t=this._graphicChangedTask.value,e=t?.expressionInfos?.dependencies;return[t,e?.has("view-scale")?this.view?.scale:null,e?.has("view-time-extent")?this.view?.timeExtent?.start:null,e?.has("view-time-extent")?this.view?.timeExtent?.end:null]},([t])=>this._evaluateExpressionAttributesThrottled(t))])}initialize(){this.addHandles([this._graphicChangedThrottled,this._evaluateExpressionAttributesThrottled])}destroy(){this._clear(),this._graphicChangedTask=l(this._graphicChangedTask),this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._error=null,this.graphic=null,this.relatedInfos.clear()}static{this.interceptor=new i(x,C)}get _effectivePopupTemplate(){return null!=this.graphic?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):null}get _fieldInfoMap(){return E(w(this._effectivePopupTemplate),this._layer)}get _layer(){return F(this.graphic)}get isFeatureFromTable(){return this._layer?.isTable||!1}get state(){return this.graphic?this._error?"error":this.waitingForContent?"loading":"ready":"disabled"}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(t){this._override("spatialReference",t)}get timeZone(){return this.view?.timeZone??B}set timeZone(t){this._overrideIfSome("timeZone",t)}get map(){return this.view?.map||null}set map(t){this._override("map",t)}get waitingForContent(){const{_graphicChangedThrottled:t,_evaluateExpressionAttributesThrottled:e,_graphicChangedTask:i,_evaluateExpressionAttributesTask:r}=this;return t.hasPendingUpdates()||e.hasPendingUpdates()||null!=i&&!i.finished||null!=r&&!r.finished}async updateGeometry(){const{graphic:t,spatialReference:e,_layer:i}=this;await(i?.load());const r=i?.objectIdField;if(!r||!t||!i)return;const s=t?.attributes?.[r];if(null==s)return;const o=[s],a=await k({layer:i,graphic:t,outFields:[],objectIds:o,returnGeometry:!0,spatialReference:e}),n=a?.geometry;n&&(t.geometry=n)}_clear(){this._set("heading",""),this._set("content",null),this._set("formattedAttributes",null),this._set("expressionAttributes",null)}_graphicChanged(){this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._graphicChangedTask=l(this._graphicChangedTask),this._graphicChangedTask=o(async t=>{this._error=null,this._clear();const{graphic:e}=this;try{if(!e)return null;const{_layer:i,_effectivePopupTemplate:r}=this,s=this.spatialReference;await j({graphic:e,popupTemplate:r,layer:i,spatialReference:s},{signal:t});const[{value:o},{value:a}]=await p([this._getContent(),this._getTitle()]),[,{value:n}]=await p([this._checkForRelatedFeatures({signal:t}),T(r?.expressionInfos,e)]);return{expressionInfos:n,content:o,heading:a}}catch(i){throw h(i)||(this._error=i,n.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:i,graphic:e,popupTemplate:this._effectivePopupTemplate})),i}})}_compileContentElement(t){return"relationship"===t.type?P(this._layer)?t:void 0:"utility-network-associations"===t.type?R(this._layer)?t:void 0:t}_compileContent(t){if(this.graphic)return Array.isArray(t)?t.filter(this._isAllowedContentType).map(t=>this._compileContentElement(t)).filter(s):"string"==typeof t?new v({text:t}).text:t}_compileLastEditInfo(){const{_effectivePopupTemplate:t,_layer:e,graphic:i,timeZone:r}=this;if(!t)return;const{lastEditInfoEnabled:s}=t,o=e?.editFieldsInfo;return s&&o?O(o,i?.attributes,r,e):void 0}_compileHeading(t){const{_fieldInfoMap:e,_layer:i,graphic:r,expressionAttributes:s}=this,o=r?.attributes??{},a=this.formattedAttributes?.global??{};return M({attributes:o,fieldInfoMap:e,globalAttributes:a,expressionAttributes:s,layer:i,text:t})}async _getTitle(){const{_effectivePopupTemplate:t,graphic:e}=this;return e?Z({type:"title",value:t?.title,event:{graphic:e}}):null}async _getContent(){const{_effectivePopupTemplate:t,graphic:e}=this;return e?Z({type:"content",value:t?.content,event:{graphic:e}}):null}_evaluateExpressionAttributes({heading:t,content:e,expressionInfos:i}){this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._evaluateExpressionAttributesTask=o(async r=>{const{graphic:s,map:o,view:a,spatialReference:l,location:p}=this;try{if(!s)return;let n;if(null!=i){const t=[];for(const[e,n]of i.expressions.entries())null!=n?t.push(n.evaluate({graphic:s,interceptor:Q.interceptor,location:p,map:o,options:{signal:r},spatialReference:l,view:a}).then(t=>[e,"string"==typeof t?I(t):t]).catch(()=>[e,void 0])):t.push(Promise.resolve([e,void 0]));n=Object.fromEntries(await Promise.all(t)),c(r)}this._set("expressionAttributes",n??null),this._graphicExpressionAttributes={...s.attributes,...n},this._set("formattedAttributes",this._createFormattedAttributes(e)),this._set("heading",this._compileHeading(t)),this._set("lastEditInfo",this._compileLastEditInfo()||null),this._set("content",this._compileContent(e)||null)}catch(u){h(u)||(this._error=u,n.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:u,graphic:s,popupTemplate:this._effectivePopupTemplate}))}})}_createMediaFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:i}){const{_effectivePopupTemplate:r,graphic:s,relatedInfos:o,_layer:a,_fieldInfoMap:n,_graphicExpressionAttributes:l,timeZone:p}=this;i.content[e]=U({attributes:{...l,...t.attributes},fieldInfoMap:n,fieldInfos:r?.fieldInfos,graphic:s,layer:a,relatedInfos:o,timeZone:p})}_createFieldsFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:i}){if(t.fieldInfos){const{graphic:r,relatedInfos:s,_layer:o,_fieldInfoMap:a,_graphicExpressionAttributes:n,timeZone:l}=this;i.content[e]=U({attributes:{...n,...t.attributes},fieldInfoMap:a,fieldInfos:t.fieldInfos,graphic:r,isContentFieldInfos:!0,layer:o,relatedInfos:s,timeZone:l})}}_createFormattedAttributes(t){const{_effectivePopupTemplate:e,graphic:i,relatedInfos:r,_layer:s,_fieldInfoMap:o,_graphicExpressionAttributes:a,timeZone:n}=this,l=e?.fieldInfos,p={global:U({attributes:a,fieldInfoMap:o,fieldInfos:l,graphic:i,layer:s,relatedInfos:r,timeZone:n}),content:[]};return Array.isArray(t)&&t.forEach((t,e)=>{"fields"===t.type&&this._createFieldsFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:p}),"media"===t.type&&this._createMediaFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:p})}),p}_checkForRelatedFeatures(t){const{graphic:e,_effectivePopupTemplate:i}=this;return this._queryRelatedInfos(e,w(i),t)}async _queryRelatedInfos(t,e,i){const{relatedInfos:r,_layer:s}=this;r.clear();const o=null!=s?.associatedLayer?await(s?.associatedLayer.load(i)):s;if(!o||!t)return;const a=e.filter(t=>!!t.fieldName&&L(t.fieldName));if(!a?.length)return;e.forEach(t=>this._configureRelatedInfo(t,o));const n=await N({relatedInfos:r,layer:o},i);Object.keys(n).forEach(t=>{const e=r.get(t.toString()),i=n[t]?.value;e&&i&&(e.layerInfo=i.data)});const l=await S({graphic:t,relatedInfos:r,layer:o},i);Object.keys(l).forEach(t=>{H(l[t]?.value,r.get(t.toString()))})}_configureRelatedInfo(t,e){const{relatedInfos:i}=this,r=G(t.fieldName||"");if(!r)return;const{layerId:s,fieldName:o}=r;if(!s)return;const a=i.get(s.toString())||q(s,e);a&&(z({relatedInfo:a,fieldName:o,fieldInfo:t}),this.relatedInfos.set(s,a))}};t([g()],J.prototype,"_error",void 0),t([g()],J.prototype,"_graphicChangedTask",void 0),t([g()],J.prototype,"_evaluateExpressionAttributesTask",void 0),t([g({readOnly:!0})],J.prototype,"_effectivePopupTemplate",null),t([g({readOnly:!0})],J.prototype,"_fieldInfoMap",null),t([g({readOnly:!0})],J.prototype,"_layer",null),t([g({type:A})],J.prototype,"abilities",void 0),t([g({readOnly:!0})],J.prototype,"content",void 0),t([g()],J.prototype,"description",void 0),t([g({type:Boolean})],J.prototype,"defaultPopupTemplateEnabled",void 0),t([g({readOnly:!0})],J.prototype,"expressionAttributes",void 0),t([g({readOnly:!0})],J.prototype,"isFeatureFromTable",null),t([g({readOnly:!0})],J.prototype,"state",null),t([g({readOnly:!0})],J.prototype,"formattedAttributes",void 0),t([g({type:e})],J.prototype,"graphic",void 0),t([g({readOnly:!0})],J.prototype,"lastEditInfo",void 0),t([g({type:_})],J.prototype,"location",void 0),t([g({readOnly:!0})],J.prototype,"relatedInfos",void 0),t([g({type:b})],J.prototype,"spatialReference",null),t([g()],J.prototype,"timeZone",null),t([g({readOnly:!0})],J.prototype,"heading",void 0),t([g()],J.prototype,"map",null),t([g({readOnly:!0})],J.prototype,"waitingForContent",null),t([g()],J.prototype,"view",void 0),J=Q=t([y("esri.popup.Feature")],J);const K=J;export{K as default};
|