12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1659aab9","chunk-2d2304b7"],{"334f":function(e,t,i){"use strict";i.d(t,"a",(function(){return p})),i.d(t,"b",(function(){return m})),i.d(t,"c",(function(){return g})),i.d(t,"d",(function(){return h})),i.d(t,"e",(function(){return d})),i.d(t,"f",(function(){return y})),i.d(t,"g",(function(){return b})),i.d(t,"h",(function(){return v}));var n=i("f57e"),r=i("b2b2"),o=i("a915"),a=i("1219"),l=i("9180"),s=i("f70f"),c=i("32dd"),u=i("8c81"),f=i("1b4a");const m=512,p=50;function d(e,t){if(!t.isWrappable)return null;const[i,n]=Object(s["c"])(t);return e[2]>n?[Object(l["l"])([e[0],e[1],n,e[3]]),Object(l["l"])([i,e[1],i+e[2]-n,e[3]])]:e[0]<i?[Object(l["l"])([i,e[1],e[2],e[3]]),Object(l["l"])([n-(i-e[0]),e[1],n,e[3]])]:null}function b(e){return"text"===e||"esriTS"===e}function y(e){return"simple-marker"===e||"picture-marker"===e||"esriSMS"===e||"esriPMS"===e}function h(e){switch(Object(r["t"])(e.geometry).type){case"point":case"multipoint":return 0;case"polyline":return 1;case"polygon":case"extent":return 2}return 0}function g(e,t,i){var r,a,l;if(!i||0===i.glyphMosaicItems.length)return e;const s=Object(n["a"])(t.text)[1],m=i.glyphMosaicItems,p=Object(f["a"])(m,s,{scale:Object(o["g"])(t.font.size)/u["r"],angle:null!=(r=t.angle)?r:0,xOffset:null!=(a=t.xoffset)?a:0,yOffset:null!=(l=t.yoffset)?l:0,hAlign:Object(c["e"])(t.horizontalAlignment||"center"),vAlign:Object(c["g"])(t.verticalAlignment||"baseline"),maxLineWidth:Math.max(32,Math.min(t.lineWidth||512,512)),lineHeight:u["u"]*Math.max(.25,Math.min(t.lineHeight||1,4)),decoration:t.font.decoration||"none",isCIM:!1}).bounds;return e[0]=Object(o["g"])(p.x-p.halfWidth),e[1]=Object(o["g"])(p.y-p.halfHeight),e[2]=Object(o["g"])(p.width),e[3]=Object(o["g"])(p.height),e}function v(e){if(!e)return null;const{xmin:t,ymin:i,xmax:n,ymax:r,spatialReference:o}=e;return new a["a"]({rings:[[[t,i],[t,r],[n,r],[n,i],[t,i]]],spatialReference:o})}},3484:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("ce50"),r=i("e92d"),o=i("c84e"),a=i("c8dd");const l=r["a"].getLogger("esri.views.2d.engine.webgl");function s(e){return Object(a["u"])(e.minDataValue)&&Object(a["u"])(e.maxDataValue)&&null!=e.minSize&&null!=e.maxSize?o["e"].SIZE_MINMAX_VALUE:(e.expression&&"view.scale"===e.expression||e.valueExpression&&"$view.scale"===e.valueExpression)&&Array.isArray(e.stops)?o["e"].SIZE_SCALE_STOPS:(null!=e.field||e.expression&&"view.scale"!==e.expression||e.valueExpression&&"$view.scale"!==e.valueExpression)&&(Array.isArray(e.stops)||"levels"in e&&e.levels)?o["e"].SIZE_FIELD_STOPS:(null!=e.field||e.expression&&"view.scale"!==e.expression||e.valueExpression&&"$view.scale"!==e.valueExpression)&&null!=e.valueUnit?o["e"].SIZE_UNIT_VALUE:(l.error(new n["a"]("mapview-bad-type","Found invalid size VisualVariable",e)),o["e"].NONE)}},"405c":function(e,t,i){"use strict";i.d(t,"a",(function(){return m})),i.d(t,"b",(function(){return u})),i.d(t,"c",(function(){return a})),i.d(t,"d",(function(){return f}));var n=i("661c"),r=i("a9ab"),o=i("0eee");function a(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":{const t=e.symbolLayers;return t&&1===t.length?a(t[0]):null}case"CIMVectorMarker":{var t;const i=e.markerGraphics;if(!i||1!==i.length)return null;const n=i[0];if(!n)return null;const r=n.geometry;if(!r)return null;const o=n.symbol;return!o||"CIMPolygonSymbol"!==o.type&&"CIMLineSymbol"!==o.type||null!=(t=o.symbolLayers)&&t.some(e=>!!e.effects)?null:{geom:r,asFill:"CIMPolygonSymbol"===o.type}}case"sdf":return{geom:e.geom,asFill:e.asFill}}return null}function l(e){return e?e.rings?e.rings:e.paths?e.paths:void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax?[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]:null:null}function s(e){let t=1/0,i=-1/0,n=1/0,r=-1/0;for(const o of e)for(const e of o)e[0]<t&&(t=e[0]),e[0]>i&&(i=e[0]),e[1]<n&&(n=e[1]),e[1]>r&&(r=e[1]);return new o["a"](t,n,i-t,r-n)}function c(e){let t=1/0,i=-1/0,n=1/0,r=-1/0;for(const o of e)for(const e of o)e[0]<t&&(t=e[0]),e[0]>i&&(i=e[0]),e[1]<n&&(n=e[1]),e[1]>r&&(r=e[1]);return[t,n,i,r]}function u(e){return e?e.rings?c(e.rings):e.paths?c(e.paths):Object(r["d"])(e)?[e.xmin,e.ymin,e.xmax,e.ymax]:null:null}function f(e,t,i,n,r){const[o,a,l,s]=e;if(l<o||s<a)return[0,0,0];const c=l-o,u=s-a,f=128,m=1,p=Math.floor(.5*(.5*f-m)),d=(f-2*(p+m))/Math.max(c,u),b=Math.round(c*d)+2*p,y=Math.round(u*d)+2*p;let h=1;t&&(h=y/d/(t.ymax-t.ymin));let g=0,v=0;if(n)if(r){if(t&&i&&t.ymax-t.ymin>0){const e=(t.xmax-t.xmin)/(t.ymax-t.ymin);g=n.x/(i*e),v=n.y/i}}else g=n.x,v=n.y;return g=.5*(t.xmax+t.xmin)+g*(t.xmax-t.xmin),v=.5*(t.ymax+t.ymin)+v*(t.ymax-t.ymin),g-=o,v-=a,g*=d,v*=d,g+=p,v+=p,[h,g/b-.5,-(v/y-.5)]}function m(e){const t=l(e.geom),i=s(t),n=128,r=1,o=Math.floor(.5*(.5*n-r)),a=(n-2*(o+r))/Math.max(i.width,i.height),c=Math.round(i.width*a)+2*o,u=Math.round(i.height*a)+2*o,f=[];for(const l of t)if(l&&l.length>1){const t=[];for(const n of l){let[r,l]=n;r-=i.x,l-=i.y,r*=a,l*=a,r+=o-.5,l+=o-.5,e.asFill?t.push([r,l]):t.push([Math.round(r),Math.round(l)])}if(e.asFill){const e=t.length-1;t[0][0]===t[e][0]&&t[0][1]===t[e][1]||t.push(t[0])}f.push(t)}const m=p(f,c,u,o);return e.asFill&&d(f,c,u,o,m),[b(m,o),c,u]}function p(e,t,i,n){const r=t*i,o=new Array(r),a=n*n+1;for(let l=0;l<r;++l)o[l]=a;for(const l of e){const e=l.length;for(let r=1;r<e;++r){const e=l[r-1],a=l[r];let s,c,u,f;e[0]<a[0]?(s=e[0],c=a[0]):(s=a[0],c=e[0]),e[1]<a[1]?(u=e[1],f=a[1]):(u=a[1],f=e[1]);let m=Math.floor(s)-n,p=Math.floor(c)+n,d=Math.floor(u)-n,b=Math.floor(f)+n;m<0&&(m=0),p>t&&(p=t),d<0&&(d=0),b>i&&(b=i);const y=a[0]-e[0],h=a[1]-e[1],g=y*y+h*h;for(let n=m;n<p;n++)for(let r=d;r<b;r++){let l,s,c=(n-e[0])*y+(r-e[1])*h;c<0?(l=e[0],s=e[1]):c>g?(l=a[0],s=a[1]):(c/=g,l=e[0]+c*y,s=e[1]+c*h);const u=(n-l)*(n-l)+(r-s)*(r-s),f=(i-r-1)*t+n;u<o[f]&&(o[f]=u)}}}for(let l=0;l<r;++l)o[l]=Math.sqrt(o[l]);return o}function d(e,t,i,n,r){for(const o of e){const e=o.length;for(let a=1;a<e;++a){const e=o[a-1],l=o[a];let s,c,u,f;e[0]<l[0]?(s=e[0],c=l[0]):(s=l[0],c=e[0]),e[1]<l[1]?(u=e[1],f=l[1]):(u=l[1],f=e[1]);let m=Math.floor(s),p=Math.floor(c)+1,d=Math.floor(u),b=Math.floor(f)+1;m<n&&(m=n),p>t-n&&(p=t-n),d<n&&(d=n),b>i-n&&(b=i-n);for(let o=d;o<b;++o){if(e[1]>o==l[1]>o)continue;const a=(i-o-1)*t;for(let t=m;t<p;++t)t<(l[0]-e[0])*(o-e[1])/(l[1]-e[1])+e[0]&&(r[a+t]=-r[a+t]);for(let e=n;e<m;++e)r[a+e]=-r[a+e]}}}}function b(e,t){const i=2*t,r=e.length,o=new Uint8Array(4*r);for(let a=0;a<r;++a){const t=.5-e[a]/i;Object(n["a"])(t,o,4*a)}return o}},"45a5":function(e,t,i){"use strict";i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return o}));var n=i("fa8a");const r=new n["a"]({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch",mesh:"mesh"});function o(e){return r.toJSON(e)}function a(e){const{bandCount:t,attributeTable:i,colormap:n,pixelType:r}=e.rasterInfo;return 1===t&&(null!=i||null!=n||"u8"===r||"s8"===r)}},"4fcb":function(e,t,i){"use strict";i.d(t,"a",(function(){return W})),i.d(t,"b",(function(){return k}));var n=i("9ef0"),r=i("7ffa"),o=i("e92d"),a=i("b2b2"),l=i("a915"),s=i("b3b6"),c=i("82fa"),u=i("793f"),f=i("ab39"),m=i("405c"),p=i("36b8"),d=i("5dbb"),b=i("89cb"),y=i("e513");const h=o["a"].getLogger("esri.symbols.cim.cimAnalyzer");function g(e){switch(e){case"Butt":return f["d"].BUTT;case"Square":return f["d"].SQUARE;default:return f["d"].ROUND}}function v(e){switch(e){case"Bevel":return f["o"].BEVEL;case"Miter":return f["o"].MITER;default:return f["o"].ROUND}}function O(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function S(e){switch(e){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function x(e){let t="",i="";if(e){const n=e.toLowerCase();-1!==n.indexOf("italic")?t="italic":-1!==n.indexOf("oblique")&&(t="oblique"),-1!==n.indexOf("bold")?i="bold":-1!==n.indexOf("light")&&(i="lighter")}return{style:t,weight:i}}function j(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function w(e,t,i,n){let r;e[t]?r=e[t]:(r={},e[t]=r),r[i]=n}function N(e){const t=e.markerPlacement;return t&&t.angleToLine?f["a"].MAP:f["a"].SCREEN}async function k(e,t,i,n,r){const o=null!=n?n:[];if(!e)return o;let a,l;const s={};if("CIMSymbolReference"!==e.type)return h.error("Expect cim type to be 'CIMSymbolReference'"),o;if(a=e.symbol,l=e.primitiveOverrides,l){const e=[];for(const i of l){const n=i.valueExpressionInfo;if(n&&t){const r=n.expression,o=Object(c["d"])(r,t.spatialReference,t.fields).then(e=>{e&&w(s,i.primitiveName,i.propertyName,e)});e.push(o)}else null!=i.value&&w(s,i.primitiveName,i.propertyName,i.value)}e.length>0&&await Promise.all(e)}const u=[];switch(q(a,i,u),u.length>0&&await Promise.all(u),a.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":z(a,l,s,t,o,i,r)}return o}function z(e,t,i,n,r,o,a){if(!e)return;const l=e.symbolLayers;if(!l)return;const s=e.effects;let c;const m=u["b"].getSize(e);"CIMPointSymbol"===e.type&&"Map"===e.angleAlignment&&(c=f["a"].MAP);let p=l.length;for(;p--;){const f=l[p];if(!f||!1===f.enable)continue;let d;s&&s.length&&(d=[...s]);const b=f.effects;b&&b.length&&(s?d.push(...b):d=[...b]);const y=[];let g;u["c"].findEffectOverrides(d,t,y),g=y.length>0?U(d,y,i,n):d;const v=[];switch(u["c"].findApplicableOverrides(f,t,v),f.type){case"CIMSolidFill":C(f,g,i,v,n,r);break;case"CIMPictureFill":M(f,g,i,v,n,o,r);break;case"CIMHatchFill":I(f,g,i,v,n,r);break;case"CIMGradientFill":E(f,g,i,v,n,r);break;case"CIMSolidStroke":F(f,g,i,v,n,r,"CIMPolygonSymbol"===e.type,m);break;case"CIMPictureStroke":P(f,g,i,v,n,r,"CIMPolygonSymbol"===e.type,m);break;case"CIMGradientStroke":V(f,g,i,v,n,r,"CIMPolygonSymbol"===e.type,m);break;case"CIMCharacterMarker":if(L(f,g,i,v,n,r))break;break;case"CIMPictureMarker":if(L(f,g,i,v,n,r))break;"CIMLineSymbol"===e.type&&(c=N(f)),T(f,g,i,v,n,o,r,c,m);break;case"CIMVectorMarker":if(L(f,g,i,v,n,r))break;"CIMLineSymbol"===e.type&&(c=N(f)),R(f,g,i,v,n,r,o,c,m,a);break;default:h.error("Cannot analyze CIM layer",f.type)}}}function C(e,t,i,n,r,o){const a=e.primitiveName,l=Object(p["e"])(e.color),[c,u]=B(n,a,t,null),f=Object(s["b"])(JSON.stringify(e)+u).toString();o.push({type:"fill",templateHash:f,materialHash:c?()=>f:f,cim:e,materialOverrides:null,colorLocked:e.colorLocked,color:_(a,i,"Color",r,l,D),height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,effects:t})}function M(e,t,i,n,r,o,l){const c=e.primitiveName,u=e.tintColor?Object(p["e"])(e.tintColor):{r:255,g:255,b:255,a:1},[f,m]=B(n,c,t,null),d=Object(s["b"])(JSON.stringify(e)+m).toString(),b=Object(s["b"])(`${e.url}${JSON.stringify(e.colorSubstitutions)}`).toString();let y=Object(p["f"])(e.scaleX);if("width"in e){const t=e.width;let i=1;const n=o.getResource(e.url);Object(a["k"])(n)&&(i=n.width/n.height),y/=i*(e.height/t)}l.push({type:"fill",templateHash:d,materialHash:f?()=>b:b,cim:e,materialOverrides:null,colorLocked:e.colorLocked,effects:t,color:_(c,i,"TintColor",r,u,D),height:_(c,i,"Height",r,e.height),scaleX:_(c,i,"ScaleX",r,y),angle:_(c,i,"Rotation",r,Object(p["f"])(e.rotation)),offsetX:_(c,i,"OffsetX",r,Object(p["f"])(e.offsetX)),offsetY:_(c,i,"OffsetY",r,Object(p["f"])(e.offsetY)),url:e.url})}function I(e,t,i,n,r,o){const a=["Rotation","OffsetX","OffsetY"],l=n.filter(t=>t.primitiveName!==e.primitiveName&&-1===a.indexOf(t.propertyName)),c=e.primitiveName,[u,f]=B(n,c,t,null),m=Object(s["b"])(JSON.stringify(e)+f).toString(),d=Object(s["b"])(`${e.separation}${JSON.stringify(e.lineSymbol)}`).toString();o.push({type:"fill",templateHash:m,materialHash:u?G(d,i,l,r):d,cim:e,materialOverrides:l,colorLocked:e.colorLocked,effects:t,color:{r:255,g:255,b:255,a:1},height:_(c,i,"Separation",r,e.separation),scaleX:1,angle:_(c,i,"Rotation",r,Object(p["f"])(e.rotation)),offsetX:_(c,i,"OffsetX",r,Object(p["f"])(e.offsetX)),offsetY:_(c,i,"OffsetY",r,Object(p["f"])(e.offsetY))})}function E(e,t,i,n,r,o){const a=e.primitiveName,[l,c]=B(n,a,t,null),u=Object(s["b"])(JSON.stringify(e)+c).toString();o.push({type:"fill",templateHash:u,materialHash:l?G(u,i,n,r):u,cim:e,materialOverrides:null,colorLocked:e.colorLocked,effects:t,color:{r:128,g:128,b:128,a:1},height:0,angle:0,offsetX:0,offsetY:0,scaleX:1})}function F(e,t,i,n,r,o,a,l){const c=e.primitiveName,u=Object(p["e"])(e.color),f=void 0!==e.width?e.width:4,m=g(e.capStyle),d=v(e.joinStyle),b=e.miterLimit,[y,h]=B(n,c,t,null),O=Object(s["b"])(JSON.stringify(e)+h).toString();let S,x;if(t&&t instanceof Array&&t.length>0){const e=t[t.length-1];if("CIMGeometricEffectDashes"===e.type&&"NoConstraint"===e.lineDashEnding&&null===e.offsetAlongLine){const e=(t=[...t]).pop();S=e.dashTemplate,x=e.scaleDash}}o.push({type:"line",templateHash:O,materialHash:y?()=>O:O,cim:e,materialOverrides:null,isOutline:a,colorLocked:e.colorLocked,effects:t,color:_(c,i,"Color",r,u,D),width:_(c,i,"Width",r,f),cap:_(c,i,"CapStyle",r,m),join:_(c,i,"JoinStyle",r,d),miterLimit:_(c,i,"MiterLimit",r,b),referenceWidth:l,zOrder:Y(e.name),dashTemplate:S,scaleDash:x})}function P(e,t,i,n,r,o,a,l){const c=Object(s["b"])(`${e.url}${JSON.stringify(e.colorSubstitutions)}`).toString(),u=e.primitiveName,f=Object(p["e"])(e.tintColor),m=void 0!==e.width?e.width:4,d=g(e.capStyle),b=v(e.joinStyle),y=e.miterLimit,[h,O]=B(n,u,t,null),S=Object(s["b"])(JSON.stringify(e)+O).toString();o.push({type:"line",templateHash:S,materialHash:h?()=>c:c,cim:e,materialOverrides:null,isOutline:a,colorLocked:e.colorLocked,effects:t,color:_(u,i,"TintColor",r,f,D),width:_(u,i,"Width",r,m),cap:_(u,i,"CapStyle",r,d),join:_(u,i,"JoinStyle",r,b),miterLimit:_(u,i,"MiterLimit",r,y),referenceWidth:l,zOrder:Y(e.name),dashTemplate:null,scaleDash:!1,url:e.url})}function V(e,t,i,n,r,o,a,l){const c=e.primitiveName,u=void 0!==e.width?e.width:4,f=g(e.capStyle),m=v(e.joinStyle),p=e.miterLimit,[d,b]=B(n,c,t,null),y=Object(s["b"])(JSON.stringify(e)+b).toString();o.push({type:"line",templateHash:y,materialHash:d?G(y,i,n,r):y,cim:e,materialOverrides:null,isOutline:a,colorLocked:e.colorLocked,effects:t,color:{r:128,g:128,b:128,a:1},width:_(c,i,"Width",r,u),cap:_(c,i,"CapStyle",r,f),join:_(c,i,"JoinStyle",r,m),miterLimit:_(c,i,"MiterLimit",r,p),referenceWidth:l,zOrder:Y(e.name),dashTemplate:null,scaleDash:!1})}function L(e,t,i,n,r,o){const a=e.markerPlacement;if(!a||"CIMMarkerPlacementInsidePolygon"!==a.type)return!1;const l=a,c=["Rotation","OffsetX","OffsetY"],u=n.filter(t=>t.primitiveName!==e.primitiveName&&-1===c.indexOf(t.propertyName)),f="url"in e?e.url:null,[m,d]=B(n,l.primitiveName,t,null),b=Object(s["b"])(JSON.stringify(e)+d).toString();let y=l.stepY,h=null,g=1;return a.shiftOddRows&&(y*=2,h=function(e){return e?2*e:0},g=.5),o.push({type:"fill",templateHash:b,materialHash:m?G(b,i,u,r):b,cim:e,materialOverrides:u,colorLocked:e.colorLocked,effects:t,color:{r:255,g:255,b:255,a:1},height:_(l.primitiveName,i,"StepY",r,y,h),scaleX:g,angle:_(l.primitiveName,i,"GridAngle",r,l.gridAngle),offsetX:_(l.primitiveName,i,"OffsetX",r,Object(p["f"])(l.offsetX)),offsetY:_(l.primitiveName,i,"OffsetY",r,Object(p["f"])(l.offsetY)),url:f}),!0}function T(e,t,i,n,r,o,l,c,u){var f;const m=e.primitiveName,d=Object(p["f"])(e.size);let b=Object(p["f"])(e.scaleX);const y=Object(p["f"])(e.rotation),h=Object(p["f"])(e.offsetX),g=Object(p["f"])(e.offsetY),v=e.tintColor?Object(p["e"])(e.tintColor):{r:255,g:255,b:255,a:1},O=Object(s["b"])(`${e.url}${JSON.stringify(e.colorSubstitutions)}`).toString(),S=K(e.markerPlacement,n,i,r),[x,j]=B(n,m,t,S),w=Object(s["b"])(JSON.stringify(e)+j).toString(),N=null!=(f=e.anchorPoint)?f:{x:0,y:0};if("width"in e){const t=e.width;let i=1;const n=o.getResource(e.url);Object(a["k"])(n)&&(i=n.width/n.height),b/=i*(d/t)}l.push({type:"marker",templateHash:w,materialHash:x?()=>O:O,cim:e,materialOverrides:null,colorLocked:e.colorLocked,effects:t,scaleSymbolsProportionally:!1,alignment:c,size:_(m,i,"Size",r,d),scaleX:_(m,i,"ScaleX",r,b),rotation:_(m,i,"Rotation",r,y),offsetX:_(m,i,"OffsetX",r,h),offsetY:_(m,i,"OffsetY",r,g),color:_(m,i,"TintColor",r,v,D),anchorPoint:{x:N.x,y:-N.y},isAbsoluteAnchorPoint:"Relative"!==e.anchorPointUnits,outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,frameHeight:0,rotateClockwise:e.rotateClockwise,referenceSize:u,sizeRatio:1,markerPlacement:e.markerPlacement,url:e.url})}function R(e,t,i,n,r,o,a,l,s,c){const u=e.markerGraphics;if(!u)return;let f=0;if(e.scaleSymbolsProportionally){const t=e.frame;t&&(f=t.ymax-t.ymin)}const m=K(e.markerPlacement,n,i,r);for(const p of u)if(p){const u=p.symbol;if(!u)continue;switch(u.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":J(e,t,m,p,n,i,r,o,a,l,s,f,c);break;case"CIMTextSymbol":A(e,t,m,p,i,n,r,o,l,s,f)}}}function A(e,t,i,n,r,o,a,l,c,f,m){const d=[];u["c"].findApplicableOverrides(n,o,d);const b=n.geometry;if(!("x"in b)||!("y"in b))return;const h=n.symbol,g=j(h),v=x(h.fontStyleName),w=Object(y["a"])(h.fontFamilyName);h.font={family:w,decoration:g,...v};const N=e.frame,k=b.x-.5*(N.xmin+N.xmax),z=b.y-.5*(N.ymin+N.ymax),C=e.size/m,M=e.primitiveName,I=Object(p["f"])(h.height)*C,E=Object(p["f"])(h.angle),F=Object(p["f"])(e.offsetX)+(Object(p["f"])(h.offsetX)+k)*C,P=Object(p["f"])(e.offsetY)+(Object(p["f"])(h.offsetY)+z)*C,V=Object(p["e"])(u["b"].getFillColor(h));let L=Object(p["e"])(u["b"].getStrokeColor(h)),T=u["b"].getStrokeWidth(h);T||(L=Object(p["e"])(u["b"].getFillColor(h.haloSymbol)),T=h.haloSize*C);const[R,A]=B(o,M,t,i),J=JSON.stringify(e.effects)+Number(e.colorLocked)+JSON.stringify(e.anchorPoint)+e.anchorPointUnits+JSON.stringify(e.markerPlacement),X=Object(s["b"])(JSON.stringify(n)+J+A).toString();let H=_(n.primitiveName,r,"TextString",a,n.textString,p["a"],h.textCase);if(null==H)return;const{fontStyleName:$}=h,Y=w+($?"-"+$.toLowerCase():"-regular"),D=Y;"string"==typeof H&&H.indexOf("[")>-1&&h.fieldMap&&(H=Object(p["c"])(h.fieldMap,H,h.textCase)),l.push({type:"text",templateHash:X,materialHash:R||"function"==typeof H||H.match(/\[(.*?)\]/)?(e,t,i)=>D+"-"+Object(p["d"])(H,e,t,i):D+"-"+Object(s["b"])(H),cim:h,materialOverrides:null,colorLocked:e.colorLocked,effects:t,alignment:c,anchorPoint:{x:e.anchorPoint?e.anchorPoint.x:0,y:e.anchorPoint?e.anchorPoint.y:0},isAbsoluteAnchorPoint:"Relative"!==e.anchorPointUnits,fontName:Y,decoration:g,weight:_(M,r,"Weight",a,v.weight),style:_(M,r,"Size",a,v.style),size:_(M,r,"Size",a,I),angle:_(M,r,"Rotation",a,E),offsetX:_(M,r,"OffsetX",a,F),offsetY:_(M,r,"OffsetY",a,P),horizontalAlignment:O(h.horizontalAlignment),verticalAlignment:S(h.verticalAlignment),text:H,color:V,outlineColor:L,outlineSize:T,referenceSize:f,sizeRatio:1,markerPlacement:i})}function J(e,t,i,n,r,o,l,c,f,b,y,h,g){const v=n.symbol,O=v.symbolLayers;if(!O)return;if(g)return void H(e,t,i,n,o,r,l,c,f,b,y,h);let S=O.length;if(Z(O))return void X(e,t,i,n,O,r,o,l,c,b,y,h);const x=d["a"].applyEffects(v.effects,n.geometry,f.geometryEngine);if(x)for(;S--;){const g=O[S];if(g&&!1!==g.enable)switch(g.type){case"CIMSolidFill":case"CIMSolidStroke":{var j;const v=d["a"].applyEffects(g.effects,x,f.geometryEngine),O=Object(m["b"])(v);if(!O)continue;const[S,w,N]=Object(m["d"])(O,e.frame,e.size,e.anchorPoint,"Relative"!==e.anchorPointUnits),k="CIMSolidFill"===g.type,z={type:"sdf",geom:v,asFill:k},C=e.primitiveName,M=null!=(j=Object(p["f"])(e.size))?j:10,I=Object(p["f"])(e.rotation),E=Object(p["f"])(e.offsetX),F=Object(p["f"])(e.offsetY),P=g.path,V=g.primitiveName,L=Object(p["e"])(k?u["b"].getFillColor(g):u["b"].getStrokeColor(g)),T=k?{r:0,g:0,b:0,a:0}:Object(p["e"])(u["b"].getStrokeColor(g)),R=u["b"].getStrokeWidth(g);if(!k&&!R)break;let A=!1,J="";for(const e of r)e.primitiveName!==V&&e.primitiveName!==C||(void 0!==e.value?J+=`-${e.primitiveName}-${e.propertyName}-${JSON.stringify(e.value)}`:e.valueExpressionInfo&&(A=!0));Object(a["k"])(t)&&"function"==typeof t&&(A=!0);const X=JSON.stringify({...e,markerGraphics:null}),H=Object(s["b"])(JSON.stringify(z)+P).toString(),$={type:"marker",templateHash:Object(s["b"])(JSON.stringify(n)+JSON.stringify(g)+X+J).toString(),materialHash:A?()=>H:H,cim:z,materialOverrides:null,colorLocked:e.colorLocked,effects:t,scaleSymbolsProportionally:e.scaleSymbolsProportionally,alignment:b,anchorPoint:{x:w,y:N},isAbsoluteAnchorPoint:!1,size:_(e.primitiveName,o,"Size",l,M),rotation:_(e.primitiveName,o,"Rotation",l,I),offsetX:_(e.primitiveName,o,"OffsetX",l,E),offsetY:_(e.primitiveName,o,"OffsetY",l,F),scaleX:1,frameHeight:h,rotateClockwise:e.rotateClockwise,referenceSize:y,sizeRatio:S,color:_(V,o,"Color",l,L,D),outlineColor:_(V,o,"Color",l,T,D),outlineWidth:_(V,o,"Width",l,R),markerPlacement:i,path:P};c.push($);break}default:H(e,t,i,n,o,r,l,c,f,b,y,h)}}}function X(e,t,i,n,r,o,a,l,c,f,d,b){const y=n.geometry,h=r[0],g=r[1],v=Object(m["b"])(y);if(!v)return;const[O,S,x]=Object(m["d"])(v,e.frame,e.size,e.anchorPoint,"Relative"!==e.anchorPointUnits),j={type:"sdf",geom:y,asFill:!0},w=e.primitiveName,N=Object(p["f"])(e.size),k=Object(p["f"])(e.rotation),z=Object(p["f"])(e.offsetX),C=Object(p["f"])(e.offsetY),M=g.path,I=g.primitiveName,E=h.primitiveName,F=Object(p["e"])(u["b"].getFillColor(g)),P=Object(p["e"])(u["b"].getStrokeColor(h)),V=u["b"].getStrokeWidth(h);let L=!1,T="";for(const s of o)s.primitiveName!==I&&s.primitiveName!==E&&s.primitiveName!==w||(void 0!==s.value?T+=`-${s.primitiveName}-${s.propertyName}-${JSON.stringify(s.value)}`:s.valueExpressionInfo&&(L=!0));const R=JSON.stringify({...e,markerGraphics:null}),A=Object(s["b"])(JSON.stringify(j)+M).toString(),J={type:"marker",templateHash:Object(s["b"])(JSON.stringify(n)+JSON.stringify(g)+JSON.stringify(h)+R+T).toString(),materialHash:L?()=>A:A,cim:j,materialOverrides:null,colorLocked:e.colorLocked,effects:t,scaleSymbolsProportionally:e.scaleSymbolsProportionally,alignment:f,anchorPoint:{x:S,y:x},isAbsoluteAnchorPoint:!1,size:_(e.primitiveName,a,"Size",l,N),rotation:_(e.primitiveName,a,"Rotation",l,k),offsetX:_(e.primitiveName,a,"OffsetX",l,z),offsetY:_(e.primitiveName,a,"OffsetY",l,C),scaleX:1,frameHeight:b,rotateClockwise:e.rotateClockwise,referenceSize:d,sizeRatio:O,color:_(I,a,"Color",l,F,D),outlineColor:_(E,a,"Color",l,P,D),outlineWidth:_(E,a,"Width",l,V),markerPlacement:i,path:M};c.push(J)}function H(e,t,i,n,r,o,c,f,m,d,b,y){const h=$(e,n);let g=[];const v=["Rotation","OffsetX","OffsetY"];g=o.filter(t=>t.primitiveName!==e.primitiveName||-1===v.indexOf(t.propertyName));let O="";for(const a of o)void 0!==a.value&&(O+=`-${a.primitiveName}-${a.propertyName}-${JSON.stringify(a.value)}`);const[S,x,j]=u["b"].getTextureAnchor(h,m),w=e.primitiveName,N=Object(p["f"])(e.rotation),k=Object(p["f"])(e.offsetX),z=Object(p["f"])(e.offsetY),C=Object(s["b"])(JSON.stringify(h)+O).toString(),M={type:"marker",templateHash:C,materialHash:g.length>0||Object(a["k"])(t)&&"function"==typeof t?G(C,r,g,c):C,cim:h,materialOverrides:g,colorLocked:e.colorLocked,effects:t,scaleSymbolsProportionally:e.scaleSymbolsProportionally,alignment:d,anchorPoint:{x:S,y:x},isAbsoluteAnchorPoint:!1,size:e.size,rotation:_(w,r,"Rotation",c,N),offsetX:_(w,r,"OffsetX",c,k),offsetY:_(w,r,"OffsetY",c,z),color:{r:255,g:255,b:255,a:1},outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,scaleX:1,frameHeight:y,rotateClockwise:e.rotateClockwise,referenceSize:b,sizeRatio:j/Object(l["g"])(e.size),markerPlacement:i};f.push(M)}function $(e,t){return{type:e.type,enable:!0,name:e.name,colorLocked:e.colorLocked,primitiveName:e.primitiveName,anchorPoint:e.anchorPoint,anchorPointUnits:e.anchorPointUnits,offsetX:0,offsetY:0,rotateClockwise:e.rotateClockwise,rotation:0,size:e.size,billboardMode3D:e.billboardMode3D,depth3D:e.depth3D,frame:e.frame,markerGraphics:[t],scaleSymbolsProportionally:e.scaleSymbolsProportionally,respectFrame:e.respectFrame,clippingPath:e.clippingPath}}function Y(e){if(e&&0===e.indexOf("Level_")){const t=parseInt(e.substr(6),10);if(!isNaN(t))return t}return 0}function D(e){if(!e||0===e.length)return null;const t=new n["a"](e).toRgba();return{r:t[0],g:t[1],b:t[2],a:t[3]}}function _(e,t,i,n,r,o,a){const l=t[e];if(l){const e=l[i];if("string"==typeof e||"number"==typeof e||e instanceof Array)return o?o.call(null,e,a):e;if(null!=e&&e instanceof c["a"])return(t,i,l)=>{let s=Object(b["a"])(e,t,{$view:l},n.geometryType,i);return null!==s&&o&&(s=o.call(null,s,a)),null!==s?s:r}}return r}function U(e,t,i,n){for(const r of t)if(r.valueExpressionInfo){const e=i[r.primitiveName]&&i[r.primitiveName][r.propertyName];e instanceof c["a"]&&(r.fn=(t,i,r)=>Object(b["a"])(e,t,{$view:r},n.geometryType,i))}const o=e=>e?e.charAt(0).toLowerCase()+e.substr(1):e;return(i,n,a)=>{for(const e of t)e.fn&&(e.value=e.fn(i,n,a));const l=[];for(let c of e){var s;const e=null==(s=c)?void 0:s.primitiveName;if(e){let i=!1;for(const n of t)if(n.primitiveName===e){const e=o(n.propertyName);null!=n.value&&n.value!==c[e]&&(i||(c=Object(r["a"])(c),i=!0),c[e]=n.value)}}l.push(c)}return l}}function K(e,t,i,n){const o=[];if(u["c"].findApplicableOverrides(e,t,o),0===o.length)return e;for(const r of o)if(r.valueExpressionInfo){const e=i[r.primitiveName]&&i[r.primitiveName][r.propertyName];e instanceof c["a"]&&(r.fn=(t,i,r)=>Object(b["a"])(e,t,{$view:r},n.geometryType,i))}const a=e=>e?e.charAt(0).toLowerCase()+e.substr(1):e;return(t,i,n)=>{for(const e of o)e.fn&&(e.value=e.fn(t,i,n));const l=Object(r["a"])(e),s=e.primitiveName;for(const e of o)if(e.primitiveName===s){const t=a(e.propertyName);null!=e.value&&e.value!==l[t]&&(l[t]=e.value)}return l}}function G(e,t,i,n){for(const r of i)if(r.valueExpressionInfo){const e=t[r.primitiveName]&&t[r.primitiveName][r.propertyName];e instanceof c["a"]&&(r.fn=(t,i,r)=>Object(b["a"])(e,t,{$view:r},n.geometryType,i))}return(t,n,r)=>{for(const e of i)e.fn&&(e.value=e.fn(t,n,r));return Object(s["b"])(e+u["c"].buildOverrideKey(i)).toString()}}function W(e,t){if(!t||0===t.length)return e;const i=JSON.parse(JSON.stringify(e));return u["c"].applyOverrides(i,t),i}function B(e,t,i,n){let r=!1,o="";for(const a of e)a.primitiveName===t&&(void 0!==a.value?o+=`-${a.primitiveName}-${a.propertyName}-${JSON.stringify(a.value)}`:a.valueExpressionInfo&&(r=!0));return Object(a["k"])(i)&&"function"==typeof i&&(r=!0),Object(a["k"])(n)&&"function"==typeof n&&(r=!0),[r,o]}function q(e,t,i){if(e&&t)switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const n=e.symbolLayers;if(!n)return;for(const e of n)switch(ee(e,t,i),e.type){case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":case"CIMPictureStroke":case"CIMGradientStroke":case"CIMCharacterMarker":case"CIMPictureMarker":"url"in e&&e.url&&i.push(t.fetchResource(e.url,null));break;case"CIMVectorMarker":{const n=e.markerGraphics;if(!n)continue;for(const e of n)if(e){const n=e.symbol;n&&q(n,t,i)}}}}}}const Z=e=>e&&2===e.length&&e[0].enable&&e[1].enable&&"CIMSolidStroke"===e[0].type&&"CIMSolidFill"===e[1].type&&!e[0].effects&&!e[1].effects;let Q;function ee(e,t,i){e.effects&&!Object(a["k"])(t.geometryEngine)&&(Q?i.push(Q):Object(p["l"])(e.effects)&&(Q=Object(p["g"])(),i.push(Q),Q.then(e=>t.geometryEngine=e)))}},"5dbb":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("a9ab"),r=i("b6a7"),o=i("fe24"),a=i("9344");const l=96/72;class s{static executeEffects(e,t,i){const n=Object(r["c"])(t),s=l;let c=new o["a"](n);for(const r of e){const e=Object(a["a"])(r);e&&(c=e.execute(c,r,s,i))}return c}static next(e){const t=e.next();return Object(r["d"])(t),t}static applyEffects(e,t,i){if(!e)return t;let r=new o["a"](t);for(const n of e){const e=Object(a["a"])(n);e&&(r=e.execute(r,n,1,i))}let l,s=null;for(;l=r.next();)s?Object(n["h"])(s)?Object(n["h"])(l)&&s.paths.push(...l.paths):Object(n["g"])(s)&&Object(n["g"])(l)&&s.rings.push(...l.rings):s=l;return s}}},"7efa":function(e,t,i){"use strict";i.d(t,"a",(function(){return g})),i.d(t,"b",(function(){return n}));const n={Base64:0,Hex:1,String:2,Raw:3},r=8,o=(1<<r)-1;function a(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function l(e){const t=[];for(let i=0,n=e.length*r;i<n;i+=r)t[i>>5]|=(e.charCodeAt(i/r)&o)<<i%32;return t}function s(e){const t=[];for(let i=0,n=32*e.length;i<n;i+=r)t.push(String.fromCharCode(e[i>>5]>>>i%32&o));return t.join("")}function c(e){const t="0123456789abcdef",i=[];for(let n=0,r=4*e.length;n<r;n++)i.push(t.charAt(e[n>>2]>>n%4*8+4&15)+t.charAt(e[n>>2]>>n%4*8&15));return i.join("")}function u(e){const t="=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=[];for(let r=0,o=4*e.length;r<o;r+=3){const o=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let a=0;a<4;a++)8*r+6*a>32*e.length?n.push(t):n.push(i.charAt(o>>6*(3-a)&63))}return n.join("")}function f(e,t){return e<<t|e>>>32-t}function m(e,t,i,n,r,o){return a(f(a(a(t,e),a(n,o)),r),i)}function p(e,t,i,n,r,o,a){return m(t&i|~t&n,e,t,r,o,a)}function d(e,t,i,n,r,o,a){return m(t&n|i&~n,e,t,r,o,a)}function b(e,t,i,n,r,o,a){return m(t^i^n,e,t,r,o,a)}function y(e,t,i,n,r,o,a){return m(i^(t|~n),e,t,r,o,a)}function h(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let i=1732584193,n=-271733879,r=-1732584194,o=271733878;for(let l=0;l<e.length;l+=16){const t=i,s=n,c=r,u=o;i=p(i,n,r,o,e[l+0],7,-680876936),o=p(o,i,n,r,e[l+1],12,-389564586),r=p(r,o,i,n,e[l+2],17,606105819),n=p(n,r,o,i,e[l+3],22,-1044525330),i=p(i,n,r,o,e[l+4],7,-176418897),o=p(o,i,n,r,e[l+5],12,1200080426),r=p(r,o,i,n,e[l+6],17,-1473231341),n=p(n,r,o,i,e[l+7],22,-45705983),i=p(i,n,r,o,e[l+8],7,1770035416),o=p(o,i,n,r,e[l+9],12,-1958414417),r=p(r,o,i,n,e[l+10],17,-42063),n=p(n,r,o,i,e[l+11],22,-1990404162),i=p(i,n,r,o,e[l+12],7,1804603682),o=p(o,i,n,r,e[l+13],12,-40341101),r=p(r,o,i,n,e[l+14],17,-1502002290),n=p(n,r,o,i,e[l+15],22,1236535329),i=d(i,n,r,o,e[l+1],5,-165796510),o=d(o,i,n,r,e[l+6],9,-1069501632),r=d(r,o,i,n,e[l+11],14,643717713),n=d(n,r,o,i,e[l+0],20,-373897302),i=d(i,n,r,o,e[l+5],5,-701558691),o=d(o,i,n,r,e[l+10],9,38016083),r=d(r,o,i,n,e[l+15],14,-660478335),n=d(n,r,o,i,e[l+4],20,-405537848),i=d(i,n,r,o,e[l+9],5,568446438),o=d(o,i,n,r,e[l+14],9,-1019803690),r=d(r,o,i,n,e[l+3],14,-187363961),n=d(n,r,o,i,e[l+8],20,1163531501),i=d(i,n,r,o,e[l+13],5,-1444681467),o=d(o,i,n,r,e[l+2],9,-51403784),r=d(r,o,i,n,e[l+7],14,1735328473),n=d(n,r,o,i,e[l+12],20,-1926607734),i=b(i,n,r,o,e[l+5],4,-378558),o=b(o,i,n,r,e[l+8],11,-2022574463),r=b(r,o,i,n,e[l+11],16,1839030562),n=b(n,r,o,i,e[l+14],23,-35309556),i=b(i,n,r,o,e[l+1],4,-1530992060),o=b(o,i,n,r,e[l+4],11,1272893353),r=b(r,o,i,n,e[l+7],16,-155497632),n=b(n,r,o,i,e[l+10],23,-1094730640),i=b(i,n,r,o,e[l+13],4,681279174),o=b(o,i,n,r,e[l+0],11,-358537222),r=b(r,o,i,n,e[l+3],16,-722521979),n=b(n,r,o,i,e[l+6],23,76029189),i=b(i,n,r,o,e[l+9],4,-640364487),o=b(o,i,n,r,e[l+12],11,-421815835),r=b(r,o,i,n,e[l+15],16,530742520),n=b(n,r,o,i,e[l+2],23,-995338651),i=y(i,n,r,o,e[l+0],6,-198630844),o=y(o,i,n,r,e[l+7],10,1126891415),r=y(r,o,i,n,e[l+14],15,-1416354905),n=y(n,r,o,i,e[l+5],21,-57434055),i=y(i,n,r,o,e[l+12],6,1700485571),o=y(o,i,n,r,e[l+3],10,-1894986606),r=y(r,o,i,n,e[l+10],15,-1051523),n=y(n,r,o,i,e[l+1],21,-2054922799),i=y(i,n,r,o,e[l+8],6,1873313359),o=y(o,i,n,r,e[l+15],10,-30611744),r=y(r,o,i,n,e[l+6],15,-1560198380),n=y(n,r,o,i,e[l+13],21,1309151649),i=y(i,n,r,o,e[l+4],6,-145523070),o=y(o,i,n,r,e[l+11],10,-1120210379),r=y(r,o,i,n,e[l+2],15,718787259),n=y(n,r,o,i,e[l+9],21,-343485551),i=a(i,t),n=a(n,s),r=a(r,c),o=a(o,u)}return[i,n,r,o]}function g(e,t=n.Hex){const i=t||n.Base64,o=h(l(e),e.length*r);switch(i){case n.Raw:return o;case n.Hex:return c(o);case n.String:return s(o);case n.Base64:return u(o)}}},"9bae":function(e,t,i){"use strict";i.d(t,"a",(function(){return j})),i.d(t,"b",(function(){return O})),i.d(t,"c",(function(){return S})),i.d(t,"d",(function(){return w}));var n,r=i("ce50"),o=i("c120"),a=i("e92d"),l=i("b2b2"),s=i("7efa"),c=i("c3fcb"),u=i("9a81"),f=i("a4ee"),m=i("7ffa"),p=i("59b2"),d=(i("cea0"),i("d386")),b=i("09db"),y=i("86f2d");let h=n=class extends c["a"]{writeLevels(e,t,i){for(const n in e){const e=this.levels[n];return void(t.stops=e)}}clone(){return new n({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:Object(y["e"])(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:Object(y["e"])(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops&&this.stops.map(e=>e.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions&&this.legendOptions.clone(),levels:Object(m["a"])(this.levels)})}};Object(f["a"])([Object(p["b"])()],h.prototype,"levels",void 0),Object(f["a"])([Object(b["a"])("levels")],h.prototype,"writeLevels",null),h=n=Object(f["a"])([Object(d["a"])("esri.views.2d.engine.LevelDependentSizeVariable")],h);const g=a["a"].getLogger("esri.views.2d.layers.support.clusterUtils");o["a"].add("esri-cluster-arcade-enabled",!0);const v=Object(o["a"])("esri-cluster-arcade-enabled"),O=(e,t,i,n)=>{const r=t.clone();if(!w(r))return r;if(i.fields)for(const o of i.fields)k(e,o);if("visualVariables"in r){const t=(r.visualVariables||[]).filter(e=>"$view.scale"!==e.valueExpression),o=S(t);t.forEach(t=>{"rotation"===t.type?t.field?t.field=C(e,t.field,"avg_angle"):t.valueExpression&&(t.field=z(e,t.valueExpression,"avg_angle"),t.valueExpression=null):t.normalizationField?(t.field=C(e,t.field,"norm",t.normalizationField),t.normalizationField=null):t.field?t.field=C(e,t.field,"avg"):(t.field=z(e,t.valueExpression,"avg"),t.valueExpression=null)}),Object(l["j"])(o)&&!x(t)&&(t.push(j(i,n)),r.dynamicClusterSize=!0),r.visualVariables=t}switch(r.type){case"simple":break;case"unique-value":r.field?r.field=C(e,r.field,"mode"):r.valueExpression&&(r.field=z(e,r.valueExpression,"mode"),r.valueExpression=null);break;case"class-breaks":r.normalizationField?(r.field=C(e,r.field,"norm",r.normalizationField),r.normalizationField=null):r.field?r.field=C(e,r.field,"avg"):(r.field=z(e,r.valueExpression,"avg"),r.valueExpression=null)}return r},S=e=>{for(const t of e)if("size"===t.type)return t;return null},x=e=>{for(const t of e)if("cluster_count"===t.field)return!0;return!1},j=(e,t)=>{const i=[new u["a"]({value:0,size:0}),new u["a"]({value:1})];if(Object(l["j"])(t))return new c["a"]({field:"cluster_count",stops:[...i,new u["a"]({value:2,size:0})]});const n=Object.keys(t).reduce((n,r)=>({...n,[r]:[...i,new u["a"]({value:Math.max(2,t[r].minValue),size:e.clusterMinSize}),new u["a"]({value:Math.max(3,t[r].maxValue),size:e.clusterMaxSize})]}),{});return new h({field:"cluster_count",levels:n})},w=e=>{const t=t=>g.error(new r["a"]("Unsupported-renderer",t,{renderer:e}));if("unique-value"===e.type){if(e.field2||e.field3)return t("FeatureReductionCluster does not support multi-field UniqueValueRenderers"),!1}else if("class-breaks"===e.type){if(e.normalizationField){const i=e.normalizationType;if("field"!==i)return t("FeatureReductionCluster does not support a normalizationType of "+i),!1}}else if("simple"!==e.type)return t("FeatureReductionCluster does not support renderers of type "+e.type),!1;if(!v){if("valueExpression"in e&&e.valueExpression)return t("FeatureReductionCluster does not currently support renderer.valueExpression. Support will be added in a future release"),!1;if(("visualVariables"in e&&e.visualVariables||[]).some(e=>!(!("valueExpression"in e)||!e.valueExpression)))return t("FeatureReductionCluster does not currently support visualVariables with a valueExpression. Support will be added in a future release"),!1}return!0};function N(e,t,i){switch(e){case"avg":case"avg_angle":return"cluster_avg_"+t;case"mode":return"cluster_type_"+t;case"norm":{const e=i,n="field",r=t.toLowerCase()+",norm:"+n+","+e.toLowerCase();return"cluster_avg_"+Object(s["a"])(r)}}}function k(e,t){const{name:i,outStatistic:n}=t,{onStatisticField:o,onStatisticValueExpression:a,statisticType:l}=n;if(a){const t=Object(s["a"])(a.toLowerCase());e.push({name:i,outStatistic:{onStatisticField:t,onStatisticValueExpression:a,statisticType:l}})}else o?e.push({name:i,outStatistic:{onStatisticField:o,statisticType:l}}):g.error(new r["a"]("mapview-unsupported-field","Unable to handle field",{field:t}))}function z(e,t,i){const n=Object(s["a"])(t),r="mode"===i?"cluster_type_"+n:"cluster_avg_"+n;return e.some(e=>e.name===r)||e.push({name:r,outStatistic:{onStatisticField:n,onStatisticValueExpression:t,statisticType:i}}),r}function C(e,t,i,n){if("cluster_count"===t||e.some(e=>e.name===t))return t;const r=N(i,t,n);return e.some(e=>e.name===r)||("norm"===i?e.push({name:r,outStatistic:{onStatisticField:t,onStatisticNormalizationField:n,statisticType:i}}):e.push({name:r,outStatistic:{onStatisticField:t,statisticType:i}})),r}},a305:function(e,t,i){"use strict";i.d(t,"a",(function(){return _})),i.d(t,"b",(function(){return C})),i.d(t,"c",(function(){return N}));var n=i("ce50"),r=i("c120"),o=i("7ffa"),a=i("e92d"),l=i("b2b2"),s=i("a915"),c=i("c8dd"),u=i("c84e"),f=i("3484");function m(e){if(!e)return u["e"].NONE;let t=0;for(const i of e)if("size"===i.type){const e=Object(f["a"])(i);t|=e,"outline"===i.target&&(t|=e<<4)}else"color"===i.type?t|=u["e"].COLOR:"opacity"===i.type?t|=u["e"].OPACITY:"rotation"===i.type&&(t|=u["e"].ROTATION);return t}var p=i("ec58"),d=(i("793f"),i("0eee")),b=i("8c81");i("334f"),i("f47d");function y(e){if(!("visualVariables"in e))return 0;if(!e.hasVisualVariables("size"))return 0;const t=e.getVisualVariablesForType("size");if(!t[0])return 0;const i=t[0];if("outline"===i.target)return 0;if("stops"===i.transformationType)return i.stops.map(e=>e.size).reduce(h,0);if("clamped-linear"===i.transformationType){let e=-1/0,t=-1/0;return e="number"==typeof i.maxSize?i.maxSize:i.maxSize.stops.map(e=>e.size).reduce(h,0),t="number"==typeof i.minSize?i.minSize:i.minSize.stops.map(e=>e.size).reduce(h,0),Math.max(e,t)}return"real-world-size"===i.transformationType?30:void 0}b["f"].metrics,new d["a"](0,0,24,24);function h(e,t){return Math.max(e,t)}var g=i("b433"),v=i("9bae"),O=i("45a5");const S=a["a"].getLogger("esri.views.2d.layers.features.schemaUtils"),x="ValidationError",j={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null};function w(e){return e}function N(e){let t=0,i=0,n=!1,r=!0,o=!0;if(Object(l["k"])(e)){if(i=y(e),"visualVariables"in e&&(t=m(e.visualVariables||[]),n="dot-density"===e.type),"dictionary"===e.type)return{maxVVSize:i,supportsOutlineFills:!1,vvFlags:t,stride:{fill:"default"}};if(!n){const t=e.getSymbols();"backgroundFillSymbol"in e&&e.backgroundFillSymbol&&t.push(e.backgroundFillSymbol);for(const e of t)if("cim"===e.type&&(r=!1),"simple-fill"===e.type||"picture-fill"===e.type){const t=e.outline;t&&"none"!==t.style&&"solid"!==t.style&&(o=!1);const i=t&&"none"!==t.style&&"solid"!==t.style,n="simple-fill"===e.type&&"none"!==e.style&&"solid"!==e.style;("picture-fill"===e.type||n||i)&&(r=!1)}}}return n&&(o=!1),{vvFlags:t,maxVVSize:i,supportsOutlineFills:o,stride:{fill:n?"dot-density":r?"simple":"default"}}}function k(e,t){const i=e.labelPlacement,r=j[t];if(!e.symbol)return S.warn("No ILabelClass symbol specified."),!0;if(!r)return S.error(new n["a"]("mapview-labeling:unsupported-geometry-type",`Unable to create labels for Feature Layer, ${t} is not supported`)),!0;if(!r.some(e=>e===i)){const n=r[0];i&&S.warn(`Found invalid label placement type ${i} for ${t}. Defaulting to ${n}`),e.labelPlacement=n}return!1}function z(e,t){const i=Object(o["a"])(e);return i.some(e=>k(e,t))?[]:i}function C(e){return Object(r["a"])("esri-2d-update-debug")&&console.debug("Created new schema",M(e,!0)),M(e)}function M(e,t=!1){try{var i,n;const r=R(e,t),o={};return r.map(t=>I(o,e,t)),{source:{definitionExpression:e.definitionExpression,fields:e.fields.map(e=>e.toJSON()),gdbVersion:e.gdbVersion,historicMoment:null==(i=e.historicMoment)?void 0:i.getTime(),outFields:e.availableFields,pixelBuffer:e.pixelBuffer,spatialReference:e.spatialReference.toJSON(),timeExtent:null==(n=e.timeExtent)?void 0:n.toJSON(),customParameters:e.customParameters},attributes:{fields:{},indexCount:0},processors:r,targets:o}}catch(r){if(r.fieldName===x)return S.error(r),null;throw r}}function I(e,t,i){switch(i.target){case"feature":return void P(e,F(t),i);case"aggregate":{if(!("featureReduction"in t))return;const r=t.featureReduction;if("selection"===r.type)throw new n["a"](x,"Mapview does not support `selection` reduction type",r);return P(e,F(t),i),void V(e,r,i)}}}function E(e,t){for(const i in t){const n=t[i];if(n.target!==e.name)continue;const r=e.attributes[i];r?(r.context.mesh=r.context.mesh||n.context.mesh,r.context.storage=r.context.storage||n.context.storage):e.attributes[i]=n}return e}function F(e){var t,i,n,r,o;return[null!=(t=null==(i=Object(l["t"])(e.filter))?void 0:i.toJSON())?t:null,null!=(n=null==(r=Object(l["t"])(null==(o=Object(l["t"])(e.featureEffect))?void 0:o.filter))?void 0:r.toJSON())?n:null]}function P(e,t,i){return e.feature||(e.feature={name:"feature",input:"source",filters:t,attributes:{}}),E(e.feature,i.attributes.fields),e}function V(e,t,i){return e.aggregate||(e.aggregate={name:"aggregate",input:"feature",filters:null,attributes:{},params:{clusterRadius:Object(s["g"])(t.clusterRadius/2),clusterPixelBuffer:64*Math.ceil(Object(s["g"])(t.clusterMaxSize)/64),fields:i.aggregateFields}}),E(e.aggregate,i.attributes.fields),e}function L(e,t){return t.field?T(e,{...t,type:"field",field:t.field}):t.valueExpression?T(e,{...t,type:"expression",valueExpression:t.valueExpression}):{field:null,fieldIndex:null}}function T(e,t){switch(t.type){case"expression":{const i=w(t.valueExpression);if(!e.fields[i]){const n=e.indexCount++;e.fields[i]={...t,name:i,fieldIndex:n}}return{fieldIndex:e.fields[i].fieldIndex}}case"label-expression":{const i=w(JSON.stringify(t.label));if(!e.fields[i]){const n=e.indexCount++;e.fields[i]={...t,name:i,fieldIndex:n}}return{fieldIndex:e.fields[i].fieldIndex}}case"field":{const i=t.field;return"aggregate"===t.target&&e.fields[i]||(e.fields[i]={...t,name:i}),{field:i}}case"statistic":return e.fields[t.name]={...t},{field:t.name}}}function R(e,t=!1){const i=new Array;let n=0;return i.push(J(e,n++,t)),i}function A(e,t,i,n,r,o=!1){const a=T(t,{type:"label-expression",target:n,context:{mesh:!0},resultType:"string",label:{labelExpression:i.labelExpression,labelExpressionInfo:i.labelExpressionInfo?{expression:i.labelExpressionInfo.expression}:null,symbol:!!i.symbol,where:i.where}}),{fieldIndex:l}=a,s=N(e);return{...Object(p["createSymbolSchema"])(i,s,o),fieldIndex:l,target:n,index:r}}function J(e,t,i=!1){const r={indexCount:0,fields:{}},o="featureReduction"in e&&e.featureReduction,a=o?"aggregate":"feature";if("sublayers"in e){const t={type:"subtype",subtypeField:e.subtypeField,renderers:{},stride:{fill:"default"}},o={type:"subtype",mapping:{},target:"feature"},s={type:"subtype",classes:{}},c={type:"symbol",target:"feature",aggregateFields:[],attributes:r,storage:o,mesh:{matcher:t,aggregateMatcher:null,labels:s,sortKey:null}},u=new Set;let f=0;for(const{renderer:m,subtypeCode:p,labelingInfo:d,labelsVisible:b}of e.sublayers){const e=_(r,a,m,i),c=$(r,a,m),y=b&&d;if("visualVariables"in m&&m.visualVariables&&m.visualVariables.length)throw new n["a"](x,"Visual variables are currently not supported for subtype layers");if("dictionary"===e.type)throw new n["a"](x,"Dictionary renderer is not supported in subtype layers");if("subtype"===e.type)throw new n["a"](x,"Nested subtype renderers is not supported");if(Object(l["k"])(c)&&"subtype"===c.type)throw new n["a"](x,"Nested subtype storage is not supported");if(Object(l["k"])(c)&&"dot-density"===c.type)throw new n["a"](x,"Dot density attributes are not supported in subtype layers");if(u.has(p))throw new n["a"](x,"Subtype codes for sublayers must be unique");u.add(p),t.renderers[p]=e,o.mapping[p]=c,y&&(s.classes[p]=y.map(e=>A(m,r,e,"feature",f++,i)))}return c}if("heatmap"===e.renderer.type){const{blurRadius:t,fieldOffset:i,field:n}=e.renderer;return{type:"heatmap",aggregateFields:[],attributes:r,target:a,storage:null,mesh:{blurRadius:t,fieldOffset:i,field:L(r,{target:a,field:n,resultType:"numeric"}).field}}}{const t=[],l="aggregate"===a?Object(v["b"])(t,e.renderer,o,null):e.renderer;H(r,t);const s=_(r,a,l,i);let c=null;const u=$(r,a,l),f=Object(O["b"])(e.geometryType);let m=e.labelsVisible&&e.labelingInfo||[],d=[];if(o){if("selection"===o.type)throw new n["a"](x,"Mapview does not support `selection` reduction type",o);if(o.symbol){const e=N(l);c={type:"simple",symbol:Object(p["createSymbolSchema"])(o.symbol,e,i),stride:e.stride}}d=o&&o.labelsVisible&&o.labelingInfo||[]}m=z(m,f),d=z(d,f);let b=0;const y=[...m.map(e=>A(l,r,e,"feature",b++,i)),...d.map(e=>A(l,r,e,"aggregate",b++,i))],h=X(r,e.orderBy);return{type:"symbol",target:a,attributes:r,aggregateFields:t,storage:u,mesh:{matcher:s,labels:{type:"simple",classes:y},aggregateMatcher:c,sortKey:h}}}}function X(e,t){if(Object(l["j"])(t)||!t.length)return null;t.length>1&&S.warn(`Layer rendering currently only supports ordering by 1 orderByInfo, but found ${t.length}. All but the first will be discarded`);const i=t[0],r="ascending"===i.order?"asc":"desc";return i.field?{field:i.field,order:r}:i.valueExpression?{fieldIndex:T(e,{type:"expression",target:"feature",valueExpression:i.valueExpression,resultType:"numeric"}).fieldIndex,order:r}:(S.error(new n["a"](x,"Expected to find a field or valueExpression for OrderByInfo",i)),null)}function H(e,t){const i={mesh:!0,storage:!0};for(const n of t){const{name:t,outStatistic:r}=n,{statisticType:o,onStatisticField:a}=r;let l=null,s=null,c=null;const u="numeric",f="feature";"onStatisticValueExpression"in r?s=T(e,{type:"expression",target:f,valueExpression:r.onStatisticValueExpression,resultType:u}).fieldIndex:"onStatisticNormalizationField"in r?(l=T(e,{type:"field",target:f,field:a,resultType:u}).field,c=r.onStatisticNormalizationField):l=T(e,{type:"field",target:f,field:a,resultType:u}).field,T(e,{type:"statistic",target:"aggregate",name:t,context:i,inField:l,inNormalizationField:c,inFieldIndex:s,statisticType:o})}}function $(e,t,i){switch(i.type){case"dot-density":return Y(e,t,i.attributes);case"simple":case"class-breaks":case"unique-value":case"dictionary":return D(e,t,i.visualVariables);case"heatmap":return null}}function Y(e,t,i){return i&&i.length?{type:"dot-density",mapping:i.map((i,n)=>{const{field:r,fieldIndex:o}=L(e,{valueExpression:i.valueExpression,field:i.field,resultType:"numeric",target:t});return{binding:n,field:r,fieldIndex:o}}),target:t}:{type:"dot-density",mapping:[],target:t}}function D(e,t,i){if(!i||!i.length)return{type:"visual-variable",mapping:[],target:t};const n={storage:!0},r="numeric";return{type:"visual-variable",mapping:Object(g["b"])(i).map(i=>{var o;const a=Object(c["p"])(i.type),{field:l,fieldIndex:s}=L(e,{target:t,valueExpression:i.valueExpression,field:i.field,context:n,resultType:r});switch(i.type){case"size":return"$view.scale"===i.valueExpression?null:{type:"size",binding:a,field:l,fieldIndex:s,normalizationField:L(e,{target:t,field:i.normalizationField,context:n,resultType:r}).field,valueRepresentation:null!=(o=i.valueRepresentation)?o:null};case"color":return{type:"color",binding:a,field:l,fieldIndex:s,normalizationField:L(e,{target:t,field:i.normalizationField,context:n,resultType:r}).field};case"opacity":return{type:"opacity",binding:a,field:l,fieldIndex:s,normalizationField:L(e,{target:t,field:i.normalizationField,context:n,resultType:r}).field};case"rotation":return{type:"rotation",binding:a,field:l,fieldIndex:s}}}).filter(e=>e),target:t}}function _(e,t,i,n=!1){const r=Object(l["u"])(e,{indexCount:0,fields:{}});switch(i.type){case"simple":case"dot-density":return U(r,i,n);case"class-breaks":return K(r,t,i,n);case"unique-value":return G(r,t,i,n);case"dictionary":return W(r,i,n)}}function U(e,t,i=!1){const n=t.getSymbols(),r=n.length?n[0]:null,o=N(t);return{type:"simple",symbol:Object(p["createSymbolSchema"])(r,o,i),stride:o.stride}}function K(e,t,i,n=!1){const r={mesh:!0,use:"renderer.field"},o=i.backgroundFillSymbol,{field:a,fieldIndex:l}=L(e,{target:t,field:i.field,valueExpression:i.valueExpression,resultType:"numeric",context:r}),s=i.normalizationType,c="log"===s?"esriNormalizeByLog":"percent-of-total"===s?"esriNormalizeByPercentOfTotal":"field"===s?"esriNormalizeByField":null,u=N(i),f=i.classBreakInfos.map(e=>({symbol:Object(p["createSymbolSchema"])(e.symbol,u,n),min:e.minValue,max:e.maxValue})).sort((e,t)=>e.min-t.min);return{type:"interval",attributes:e.fields,field:a,fieldIndex:l,backgroundFillSymbol:Object(p["createSymbolSchema"])(o,u,n),defaultSymbol:Object(p["createSymbolSchema"])(i.defaultSymbol,u,n),intervals:f,normalizationField:i.normalizationField,normalizationTotal:i.normalizationTotal,normalizationType:c,isMaxInclusive:i.isMaxInclusive,stride:u.stride}}function G(e,t,i,r=!1){const o=[],a=i.backgroundFillSymbol,l={target:t,context:{mesh:!0},resultType:"string"};if(i.field&&"string"!=typeof i.field)throw new n["a"](x,"Expected renderer.field to be a string",i);const{field:s,fieldIndex:c}=L(e,{...l,field:i.field,valueExpression:i.valueExpression}),u=N(i);for(const n of i.uniqueValueInfos)o.push({value:""+n.value,symbol:Object(p["createSymbolSchema"])(n.symbol,u,r)});return{type:"map",attributes:e.fields,field:s,fieldIndex:c,field2:L(e,{...l,field:i.field2}).field,field3:L(e,{...l,field:i.field3}).field,fieldDelimiter:i.fieldDelimiter,backgroundFillSymbol:Object(p["createSymbolSchema"])(a,u),defaultSymbol:Object(p["createSymbolSchema"])(i.defaultSymbol,u),map:o,stride:u.stride}}function W(e,t,i=!1){const n=N(t);return{type:"dictionary",config:t.config,fieldMap:t.fieldMap,scaleExpression:t.scaleExpression,url:t.url,symbolOptions:n,stride:n.stride}}},b433:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return c}));var n=i("e92d"),r=i("a915");const o=8,a=o-2,l=n["a"].getLogger("esri.renderers.visualVariables.support.utils"),s=e=>{if(!("visualVariables"in e)||!e.visualVariables||!e.visualVariables.length)return e;const t=e.clone(),i=t.visualVariables.map(e=>u(e)?f(e):e);return t.visualVariables=i,t};function c(e){return e.map(e=>u(e)?f(e.clone()):e)}function u(e){return("size"===e.type||"color"===e.type||"opacity"===e.type)&&null!=e.stops}function f(e){return e.stops=b(e.type,e.stops),e}function m(e,t,i){return(1-i)*e+i*t}function p(e,t){const[i,...n]=t,o=n.pop(),l=n[0].value,s=n[n.length-1].value,c=(s-l)/a,u=[];for(let a=l;a<s;a+=c){let i=0;for(;a>=n[i].value;)i++;const o=n[i],l=t[i-1],s=a-l.value,c=o.value===l.value?1:s/(o.value-l.value);if("color"===e){const e=n[i],r=t[i-1],o=e.color.clone();o.r=m(r.color.r,o.r,c),o.g=m(r.color.g,o.g,c),o.b=m(r.color.b,o.b,c),o.a=m(r.color.a,o.a,c),u.push({value:a,color:o,label:e.label})}else if("size"===e){const e=n[i],o=t[i-1],l=Object(r["j"])(e.size),s=m(Object(r["j"])(o.size),l,c);u.push({value:a,size:s,label:e.label})}else{const e=n[i],r=m(t[i-1].opacity,e.opacity,c);u.push({value:a,opacity:r,label:e.label})}}return[i,...u,o]}function d(e){const[t,...i]=e,n=i.pop();for(;i.length>a;){let e=0,t=0;for(let n=1;n<i.length;n++){const r=i[n-1],o=i[n],a=Math.abs(o.value-r.value);a>t&&(t=a,e=n)}i.splice(e,1)}return[t,...i,n]}function b(e,t){return t.length<=o?t:(l.warn(`Found ${t.length} Visual Variable stops, but MapView only supports ${o}. Displayed stops will be simplified.`),t.length>2*o?p(e,t):d(t))}},e513:function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return r}));function n(e){const t=e.toLowerCase().split(" ").join("-");switch(t){case"serif":return"noto-serif";case"sans-serif":return"arial-unicode-ms";case"monospace":return"ubuntu-mono";case"fantasy":return"cabin-sketch";case"cursive":return"redressed";default:return t}}function r(e){const t=o(e)+a(e);return n(e.family)+(t.length>0?t:"-regular")}function o(e){if(!e.weight)return"";switch(e.weight.toLowerCase()){case"bold":case"bolder":return"-bold"}return""}function a(e){if(!e.style)return"";switch(e.style.toLowerCase()){case"italic":case"oblique":return"-italic"}return""}},ec58:function(e,t,i){"use strict";i.r(t),i.d(t,"createSymbolSchema",(function(){return l}));var n=i("c84e"),r=i("18c6");function o(e){var t;return"line-marker"===e.type?{type:"line-marker",color:null==(t=e.color)?void 0:t.toJSON(),placement:e.placement,style:e.style}:e.constructor.fromJSON(e.toJSON()).toJSON()}function a(e){return hydrateKey(e)}function l(e,t,i){if(!e)return null;switch(e.type){case"simple-fill":case"picture-fill":return c(e,t,i);case"simple-marker":case"picture-marker":return f(e,t,i);case"simple-line":return u(e,t,i);case"text":return m(e,t,i);case"label":return s(e,t,i);case"cim":return{type:"cim",rendererKey:t.vvFlags,data:e.data,maxVVSize:t.maxVVSize};case"CIMSymbolReference":return{type:"cim",rendererKey:t.vvFlags,data:e,maxVVSize:t.maxVVSize};case"web-style":return{...o(e),type:"web-style",hash:e.hash(),rendererKey:t.vvFlags,maxVVSize:t.maxVVSize};default:throw new Error("symbol not supported "+e.type)}}function s(e,t,i){const o=e.toJSON(),l=Object(r["g"])(n["d"].LABEL,{...t,placement:o.labelPlacement});return{materialKey:i?a(l):l,hash:e.hash(),...o,labelPlacement:o.labelPlacement}}function c(e,t,i){const l=t.supportsOutlineFills,s=Object(r["g"])(n["d"].FILL,{...t,isOutlinedFill:l}),c=i?a(s):s,u=e.clone(),f=u.outline;t.supportsOutlineFills||(u.outline=null);const m={materialKey:c,hash:u.hash(),isOutlinedFill:!!t.supportsOutlineFills,...o(u)};if(t.supportsOutlineFills)return m;const p=[];if(p.push(m),f){const e=Object(r["g"])(n["d"].LINE,{...t,isOutline:!0}),l={materialKey:i?a(e):e,hash:f.hash(),...o(f)};p.push(l)}return{type:"composite-symbol",layers:p,hash:p.reduce((e,t)=>t.hash+e,"")}}function u(e,t,i){const l=Object(r["g"])(n["d"].LINE,t),s=i?a(l):l,c=e.clone(),u=c.marker;c.marker=null;const f=[];if(f.push({materialKey:s,hash:c.hash(),...o(c)}),u){var m;const e=Object(r["g"])(n["d"].MARKER,t),l=i?a(e):e;u.color=null!=(m=u.color)?m:c.color,f.push({materialKey:l,hash:u.hash(),lineWidth:c.width,...o(u)})}return{type:"composite-symbol",layers:f,hash:f.reduce((e,t)=>t.hash+e,"")}}function f(e,t,i){const l=Object(r["g"])(n["d"].MARKER,t),s=i?a(l):l,c=o(e);return{materialKey:s,hash:e.hash(),...c,angle:e.angle,maxVVSize:t.maxVVSize}}function m(e,t,i){const l=Object(r["g"])(n["d"].TEXT,t),s=i?a(l):l,c=o(e);return{materialKey:s,hash:e.hash(),...c,angle:e.angle,maxVVSize:t.maxVVSize}}},f47d:function(e,t,i){"use strict";i.d(t,"a",(function(){return S})),i.d(t,"b",(function(){return O}));var n=i("4fcb"),r=i("c84e"),o=i("18c6");const a={marker:r["d"].MARKER,fill:r["d"].FILL,line:r["d"].LINE,text:r["d"].TEXT};class l{constructor(e,t,i,n){const r={minScale:null==t?void 0:t.minScale,maxScale:null==t?void 0:t.maxScale},l=s(r);this.layers=e,this.data=t,this.hash=this._createHash()+l,this.rendererKey=i;const c={isOutline:!1,isOutlinedFill:!1,placement:null,stride:{fill:"default"},vvFlags:i};for(const s of e){const e=a[s.type];s.materialKey=Object(o["g"])(e,c),s.maxVVSize=n,s.scaleInfo=r,s.templateHash+=l}}get type(){return"expanded-cim"}_createHash(){let e="";for(const t of this.layers)e+=t.templateHash;return e}}function s(e){return e.minScale||e.maxScale?e.minScale+"-"+e.maxScale:""}var c=i("49b8"),u=i("ce50"),f=i("f4cc"),m=i("e041"),p=i("0224"),d=i("fcf2"),b=i("343a");async function y(e,t,i){if(!e.name)return Promise.reject(new u["a"]("style-symbol-reference-name-missing","Missing name in style symbol reference"));if(e.styleName&&"Esri2DPointSymbolsStyle"===e.styleName)return h(e,i);try{return g(await Object(b["b"])(e,t,i),e.name,t,i)}catch(n){return Object(f["v"])(n),null}}async function h(e,t){const i=b["a"].replace(/\{SymbolName\}/gi,e.name);try{const e=await Object(b["d"])(i,t);return Object(b["c"])(e.data)}catch(n){return Object(f["v"])(n),null}}async function g(e,t,i,n){const r=e.data,o={portal:i&&i.portal||p["a"].getDefault(),url:Object(m["M"])(e.baseUrl),origin:"portal-item"},a=r.items.find(e=>e.name===t);if(!a)throw new u["a"]("symbolstyleutils:symbol-name-not-found",`The symbol name '${t}' could not be found`,{symbolName:t});let l=Object(d["b"])(Object(b["e"])(a,"cimRef"),o);Object(c["b"])()&&(l=Object(c["a"])(l));try{const e=await Object(b["d"])(l,n);return Object(b["c"])(e.data)}catch(s){return Object(f["v"])(s),null}}const v=async(e,t,i)=>new l(await Object(n["b"])(e.data,t,i),e.data,e.rendererKey,e.maxVVSize),O=async(e,t,i,n)=>{if(!e)return null;if("cim"===e.type)return v(e,t,i);if("web-style"===e.type){const r={type:"cim",data:await y(e,null,n),rendererKey:e.rendererKey,maxVVSize:e.maxVVSize};return v(r,t,i)}return e};function S(e){if(!e)return null;const{type:t,cim:i,url:n,materialHash:r}=e,o={cim:i,type:t,mosaicHash:r,url:n,size:null,dashTemplate:null,path:null,text:null,fontName:null};switch(t){case"marker":o.size=e.size,o.path=e.path;break;case"line":o.dashTemplate=e.dashTemplate;break;case"text":o.text=e.text,o.fontName=e.fontName}return o}}}]);
- //# sourceMappingURL=chunk-1659aab9.2709695b.js.map
|