(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-68f9ea7c"],{"040f":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var s=i("a4ee"),r=i("a5d8"),n=i("59b2"),a=(i("b50f"),i("c120"),i("cea0"),i("d386"));const o=t=>{let e=class extends(Object(r["b"])(t)){constructor(){super(...arguments),this.graphics=null,this.renderer=null}};return Object(s["a"])([Object(n["b"])()],e.prototype,"graphics",void 0),Object(s["a"])([Object(n["b"])()],e.prototype,"renderer",void 0),Object(s["a"])([Object(n["b"])()],e.prototype,"updating",void 0),Object(s["a"])([Object(n["b"])()],e.prototype,"view",void 0),e=Object(s["a"])([Object(a["a"])("esri.views.layers.GraphicsView")],e),e}},"0722":function(t,e,i){"use strict";i.d(e,"a",(function(){return f}));i("c120");var s=i("b2b2"),r=i("1c92"),n=i("8c71"),a=i("738e"),o=i("19db"),c=i("7c4b"),h=i("c8dd"),l=i("7ce4"),u=i("d17d"),d=i("0fa6");class f extends c["a"]{constructor(t=null){super(),this._source=null,this._symbolizerParameters=null,this._vaoInvalidated=!0,this.coordScale=[1,1],this.height=null,this.stencilRef=0,this.resolution=null,this.pixelRatio=1,this.x=0,this.y=0,this.rotation=0,this.rawPixelData=null,this.width=null,this.source=t}destroy(){var t,e;Object(s["k"])(this.vaoData)&&(null==(t=this.vaoData.magdir)||t.vao.dispose(),null==(e=this.vaoData.scalar)||e.vao.dispose(),this.vaoData=null)}get symbolizerParameters(){return this._symbolizerParameters}set symbolizerParameters(t){JSON.stringify(this._symbolizerParameters)!==JSON.stringify(t)&&(this._symbolizerParameters=t,this.invalidateVAO())}get source(){return this._source}set source(t){this._source=t,this.invalidateVAO()}invalidateVAO(){var t,e;!this._vaoInvalidated&&Object(s["k"])(this.vaoData)&&(null==(t=this.vaoData.magdir)||t.vao.dispose(),null==(e=this.vaoData.scalar)||e.vao.dispose(),this.vaoData=null,this._vaoInvalidated=!0,this.requestRender())}updateVectorFieldVAO(t){if(this._vaoInvalidated){if(this._vaoInvalidated=!1,Object(s["k"])(this.source)&&!Object(s["k"])(this.vaoData)){const{style:e}=this.symbolizerParameters;switch(e){case"beaufort_ft":case"beaufort_km":case"beaufort_kn":case"beaufort_m":case"beaufort_mi":case"classified_arrow":case"ocean_current_kn":case"ocean_current_m":case"single_arrow":{const e=Object(o["d"])(this.source,this.symbolizerParameters),i=this._createVectorFieldVAO(t.context,e);this.vaoData={magdir:i}}break;case"simple_scalar":{const e=Object(o["e"])(this.source,this.symbolizerParameters),i=this._createVectorFieldVAO(t.context,e);this.vaoData={scalar:i}}break;case"wind_speed":{const e=Object(o["d"])(this.source,this.symbolizerParameters),i=this._createVectorFieldVAO(t.context,e),s=Object(o["e"])(this.source,this.symbolizerParameters),r=this._createVectorFieldVAO(t.context,s);this.vaoData={magdir:i,scalar:r}}}}this.ready(),this.requestRender()}}_createTransforms(){return{dvs:Object(n["b"])()}}setTransform(t){const e=Object(r["b"])(this.transforms.dvs),[i,s]=t.toScreenNoRotation([0,0],[this.x,this.y]),n=this.resolution/this.pixelRatio/t.resolution,o=n*this.width,c=n*this.height,h=Math.PI*this.rotation/180;Object(r["c"])(e,e,Object(a["b"])(i,s)),Object(r["c"])(e,e,Object(a["b"])(o/2,c/2)),Object(r["n"])(e,e,-h),Object(r["c"])(e,e,Object(a["b"])(-o/2,-c/2)),Object(r["j"])(e,e,Object(a["b"])(o,c)),Object(r["l"])(this.transforms.dvs,t.displayViewMat3,e)}onAttach(){this.invalidateVAO()}onDetach(){this.invalidateVAO()}_createVectorFieldVAO(t,e){const{vertexData:i,indexData:s}=e,r=l["a"].createVertex(t,u["D"].STATIC_DRAW,new Float32Array(i)),n=l["a"].createIndex(t,u["D"].STATIC_DRAW,new Uint32Array(s)),a=Object(h["g"])("vector-field",{geometry:[{location:0,name:"a_pos",count:2,type:u["k"].FLOAT,normalized:!1},{location:1,name:"a_offset",count:2,type:u["k"].FLOAT,normalized:!1},{location:2,name:"a_vv",count:2,type:u["k"].FLOAT,normalized:!1}]});return{vao:new d["a"](t,a.attributes,a.bufferLayouts,{geometry:r},n),elementCount:s.length}}}},"0c53":function(t,e,i){"use strict";i.d(e,"a",(function(){return c})),i.d(e,"b",(function(){return l}));var s=i("b2cd"),r=i("c120");const n=128e3;let a=null,o=null;async function c(){return a||(a=h()),a}async function h(){const t=Object(r["a"])("esri-csp-restrictions")?await i.e("chunk-038b6711").then(i.bind(null,"a546")).then(t=>t.l):await i.e("chunk-47c1d7bd").then(i.bind(null,"cfdc")).then(t=>t.l);o=await t.load({locateFile:()=>Object(s["b"])("esri/core/libs/libtess/libtess.wasm")})}function l(t,e){const i=Math.max(t.length,n);return o.triangulate(t,e,i)}},"0f0f2":function(t,e,i){"use strict";i.d(e,"a",(function(){return ce})),i.d(e,"b",(function(){return ae}));var s=i("ce50"),r=i("e92d"),n=i("f4cc"),a=i("8246"),o=i("c84e"),c=i("18c6"),h=i("b2b2"),l=i("a915"),u=i("a9a2"),d=i("8c81"),f=i("1d01"),p=i("d114"),m=i("6a2c"),_=i("6655"),y=(i("9812"),i("0c53")),x=i("8152"),g=i("3976"),b=i("2da5");function v(t,e,i,s,r,n,a){Q=0;const o=(s-i)*n,c=r&&r.length,h=c?(r[0]-i)*n:o;let l,u,d,f,p,m=O(e,i,s,0,h,n,!0);if(m&&m.next!==m.prev){if(c&&(m=D(e,i,s,r,m,n)),o>80*n){l=d=e[0+i*n],u=f=e[1+i*n];for(let t=n;t0)for(let c=s;c=s;c-=n)o=T(c+e*n,t[c+e*n],t[c+1+e*n],o);return o&&G(o,o.next)&&(R(o),o=o.next),o}function w(t,e=t){if(!t)return t;let i,s=t;do{if(i=!1,s.steiner||!G(s,s.next)&&0!==A(s.prev,s,s.next))s=s.next;else{if(R(s),s=e=s.prev,s===s.next)break;i=!0}}while(i||s!==e);return e}function j(t,e,i,s,r,n,a,o){if(!t)return;!o&&n&&(t=E(t,s,r,n));let c=t;for(;t.prev!==t.next;){const h=t.prev,l=t.next;if(n?S(t,s,r,n):M(t))e.push(h.index/i+a),e.push(t.index/i+a),e.push(l.index/i+a),R(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?j(t=W(t,e,i,a),e,i,s,r,n,a,2):2===o&&q(t,e,i,s,r,n,a):j(w(t),e,i,s,r,n,a,1);break}}}function M(t){const e=t.prev,i=t,s=t.next;if(A(e,i,s)>=0)return!1;let r=t.next.next;const n=r;let a=0;for(;r!==t.prev&&(0===a||r!==n);){if(a++,B(e.x,e.y,i.x,i.y,s.x,s.y,r.x,r.y)&&A(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function S(t,e,i,s){const r=t.prev,n=t,a=t.next;if(A(r,n,a)>=0)return!1;const o=r.xn.x?r.x>a.x?r.x:a.x:n.x>a.x?n.x:a.x,l=r.y>n.y?r.y>a.y?r.y:a.y:n.y>a.y?n.y:a.y,u=N(o,c,e,i,s),d=N(h,l,e,i,s);let f=t.prevZ,p=t.nextZ;for(;f&&f.z>=u&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&B(r.x,r.y,n.x,n.y,a.x,a.y,f.x,f.y)&&A(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&B(r.x,r.y,n.x,n.y,a.x,a.y,p.x,p.y)&&A(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=u;){if(f!==t.prev&&f!==t.next&&B(r.x,r.y,n.x,n.y,a.x,a.y,f.x,f.y)&&A(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&B(r.x,r.y,n.x,n.y,a.x,a.y,p.x,p.y)&&A(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function T(t,e,i,s){const r=Y.create(t,e,i);return s?(r.next=s.next,r.prev=s,s.next.prev=r,s.next=r):(r.prev=r,r.next=r),r}function R(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function I(t){let e=t,i=t;do{(e.x=i.next.y&&i.next.y!==i.y){const t=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(t<=s&&t>a){if(a=t,t===s){if(r===i.y)return i;if(r===i.next.y)return i.next}n=i.x=i.x&&i.x>=c&&s!==i.x&&B(rn.x)&&V(i,t)&&(n=i,u=l)),i=i.next;return n}function E(t,e,i,s){for(let r;r!==t;r=r.next){if(r=r||t,null===r.z&&(r.z=N(r.x,r.y,e,i,s)),r.prev.next!==r||r.next.prev!==r)return r.prev.next=r,r.next.prev=r,E(t,e,i,s);r.prevZ=r.prev,r.nextZ=r.next}return t.prevZ.nextZ=null,t.prevZ=null,z(t)}function z(t){let e,i=1;for(;;){let s,r=t;t=null,e=null;let n=0;for(;r;){n++,s=r;let a=0;for(;a0||o>0&&s;){let i;0===a?(i=s,s=s.nextZ,o--):0!==o&&s?r.z<=s.z?(i=r,r=r.nextZ,a--):(i=s,s=s.nextZ,o--):(i=r,r=r.nextZ,a--),e?e.nextZ=i:t=i,i.prevZ=e,e=i}r=s}if(e.nextZ=null,i*=2,n<2)return t}}function A(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function k(t,e,i,s){return!!(G(t,e)&&G(i,s)||G(t,s)&&G(i,e))||A(t,e,i)>0!=A(t,e,s)>0&&A(i,s,t)>0!=A(i,s,e)>0}function L(t,e){let i=t;do{if(i.index!==t.index&&i.next.index!==t.index&&i.index!==e.index&&i.next.index!==e.index&&k(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}function F(t,e,i,s,r,n){let a=0;for(let o=s,c=r-n;o=0&&(t-a)*(s-o)-(i-a)*(e-o)>=0&&(i-a)*(n-o)-(r-a)*(s-o)>=0}function V(t,e){return A(t.prev,t,t.next)<0?A(t,e,t.next)>=0&&A(t,t.prev,e)>=0:A(t,e,t.prev)<0||A(t,t.next,e)<0}function N(t,e,i,s,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-s)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function G(t,e){return t.x===e.x&&t.y===e.y}function U(t,e){return t.x-e.x}function W(t,e,i,s){let r=t;do{const n=r.prev,a=r.next.next;!G(n,a)&&k(n,r,r.next,a)&&V(n,a)&&V(a,n)&&(e.push(n.index/i+s),e.push(r.index/i+s),e.push(a.index/i+s),R(r),R(r.next),r=t=a),r=r.next}while(r!==t);return r}function q(t,e,i,s,r,n,a){let o=t;do{let t=o.next.next;for(;t!==o.prev;){if(o.index!==t.index&&K(o,t)){let c=H(o,t);return o=w(o,o.next),c=w(c,c.next),j(o,e,i,s,r,n,a,0),void j(c,e,i,s,r,n,a,0)}t=t.next}o=o.next}while(o!==t)}function K(t,e){return t.next.index!==e.index&&t.prev.index!==e.index&&!L(t,e)&&V(t,e)&&V(e,t)&&Z(t,e)}function Z(t,e){let i=t,s=!1;const r=(t.x+e.x)/2,n=(t.y+e.y)/2;do{i.y>n!=i.next.y>n&&i.next.y!==i.y&&r<(i.next.x-i.x)*(n-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}function H(t,e){const i=Y.create(t.index,t.x,t.y),s=Y.create(e.index,e.x,e.y),r=t.next,n=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,s.next=i,i.prev=s,n.next=s,s.prev=n,s}class Y{constructor(){this.index=0,this.x=0,this.y=0,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}static create(t,e,i){const s=Q0))break;r+=a,h.push(o+e),e+=n}const l=a.length;v(a,i,o,o+e,h,2,n);const u=st(a,i,l,a.length,n),d=Math.abs(r);if(Math.abs((u-d)/Math.max(1e-7,d))>$)return a.length=0,!1;c=t,o+=e}return!0}function nt(t){const{coords:e,lengths:i}=t,{buffer:s}=Object(y["b"])(e,i);return s}function at(t,e,i){let s=0;for(let r=0;ri||ai)return!0}s+=n}return!1}function ot(t,e){if(Object(h["j"])(t))return null;if(!at(t,-128,d["P"]+128))return t;tt.setPixelMargin(e),tt.reset(g["a"].Polygon);let i=0;for(let a=0;ar||lr){a=!0;continue}e.push({x:h,y:l})}let u=!1;const d=c.length;for(let t=1;tr||lr){u=!0;break}e.push({x:h,y:l})}if(u)a=!0;else{if(a){const t=i.resultWithStarts();if(t)for(const e of t)n.push(e)}else n.push({line:e,start:0});o++,a=!1}}return n=n.filter(t=>t.line.length>1),0===n.length?null:n}tt.setExtent(d["P"]),et.setExtent(d["P"]);var ht=i("ab39"),lt=i("c8dd"),ut=i("2629");const dt=8,ft=16,pt=65535,mt=t=>class extends t{constructor(...t){super(...t),this.tessellationProperties={},this._tessellationOptions={halfWidth:0,pixelCoordRatio:1,offset:0},this.geometryType=o["d"].LINE}writeGeometry(t,e,i,s){this._writeGeometry(t,e,i,s)}_initializeTessellator(t){const e=c["c"].load(this._materialKey),i=c["a"].load(this._materialKey),s=this._tessellationOptions,r=e.vvSizeFieldStops||e.vvSizeMinMaxValue||e.vvSizeScaleStops||e.vvSizeUnitValue,n=this.tessellationProperties._halfWidth(s,r,n,a,o,c,h,l,u,d,f)=>{const m=Object(p["a"])(f,Math.ceil(ft*t._halfWidth)),_=Object(p["b"])(Math.round(ft*h),Math.round(ft*l),Math.round(ft*u),Math.round(ft*d)),y=Object(p["b"])(ft*o,ft*c,0,t._bitset),x=t.out;return x.vertexBounds(s,r,e,i),x.vertexWrite(Object(p["a"])(dt*s,dt*r)),x.vertexWrite(t.id),x.vertexWrite(t._fillColor),x.vertexWrite(_),x.vertexWrite(m),x.vertexWrite(t._tl),x.vertexWrite(t._br),x.vertexWrite(y),x.vertexWrite(Object(p["a"])(Math.ceil(ft*t._halfReferenceWidth),0)),x.vertexWrite(t.minMaxZoom),x.vertexEnd(),t.offset+t.vertexCount++},yt=(t,e,i)=>(s,r,n,a,o,c,h,l,u,d,f)=>{const m=Object(p["b"])(0,0,ft*t._halfWidth,ft*t._halfReferenceWidth),_=Object(p["b"])(ft*h+128,ft*l+128,ft*u+128,ft*d+128),y=t.out,x=t._bitset<<24|t.id;return y.vertexBounds(s,r,e,i),y.vertexWrite(Object(p["a"])(dt*s,dt*r)),y.vertexWrite(x),y.vertexWrite(t._fillColor),t.key.simple||(y.vertexWrite(0),y.vertexWrite(0)),y.vertexWrite(m),y.vertexWrite(_),t.key.simple||y.vertexWrite(t.minMaxZoom),y.vertexEnd(),t.offset+t.vertexCount++},xt=t=>(e,i,s)=>{const r=t.out;r.indexWrite(e),r.indexWrite(i),r.indexWrite(s),t.indexCount+=3};var gt=i("f75e");const bt=r["a"].getLogger("esri.views.2d.engine.webgl.WGLLineTemplate");class vt extends(mt(gt["a"])){constructor(t,e,i,s,r,n,a,o,h,l,u,f,_,y,x,g,b,v,O){super();const w=c["c"].load(t);e&&(w.sdf=e.sdf,w.pattern=!0,w.textureBinding=e.textureBinding),this._capType=s,this._joinType=r,this._miterLimitCosine=Object(m["d"])(n),this.tessellationProperties._fillColor=a,this.tessellationProperties._tl=o,this.tessellationProperties._br=h,this._hasPattern=l,this._isDashed=u,this._zOrder=g,this._effects=b,this._minMaxZoom=Object(p["a"])(Math.round(v*d["w"]),Math.round(O*d["w"])),this._materialKey=w.data;const j=(_?d["g"]:0)|(y?d["m"]:0)|(f?d["h"]:0);this.tessellationProperties._bitset=j,this.tessellationProperties._halfWidth=.5*i,this.tessellationProperties._halfReferenceWidth=.5*x,this.tessellationProperties.offset=0,this._initializeTessellator(!1)}static fromCIMLine(t,e,i){const s=t.color,r=t.scaleFactor||1,n=!!t.dashTemplate;let a=t.cap;n&&a===ht["d"].ROUND&&(a=ht["d"].SQUARE);const o=t.join,c=Object(l["g"])(t.width)*r,h=Object(l["g"])(t.referenceWidth),f=Object(l["g"])(t.miterLimit),_=s&&Object(u["c"])(s)||0,[y,x]=Object(m["e"])(t.scaleInfo,i),g=!1;if(!e)return new vt(t.materialKey,e,c,a,o,f,_,0,0,!1,n,t.scaleDash,t.colorLocked,g,h,t.zOrder,t.effects,y,x);const{rect:b,width:v,height:O}=e,w=b.x+d["A"],j=b.y+d["A"],M=w+v,S=j+O,T=Object(p["a"])(w,j),R=Object(p["a"])(M,S),I=!1;return new vt(t.materialKey,e,c,a,o,f,_,T,R,!0,n,t.scaleDash,t.colorLocked,I,h,t.zOrder,t.effects,y,x)}static fromFillOutline(t){var e;return t.isOutlinedFill&&t.outline&&"esriSLSSolid"===(null==(e=t.outline)?void 0:e.style)?vt.fromSimpleLine({hash:"",materialKey:t.materialKey,...t.outline},null,!0):null}static fromSimpleLine(t,e,i=!1){const{color:s}=t,r="esriSLSSolid"!==t.style&&"esriSLSNull"!==t.style,n=Object(lt["i"])(t.cap||"round"),a=Object(lt["j"])(t.join||"round");let o=s&&"esriSLSNull"!==t.style&&Object(u["d"])(s)||0;"esriSLSNull"===t.style&&(o=0);const c=Object(l["g"])(t.width),h=t.miterLimit;if(!e)return new vt(t.materialKey,e,c,n,a,h,o,0,0,!1,r,!0,!1,i,c,0,null,m["b"],m["a"]);const{rect:f,width:_,height:y}=e,x=f.x+d["A"],g=f.y+d["A"],b=x+_,v=g+y,O=Object(p["a"])(x,g),w=Object(p["a"])(b,v);return new vt(t.materialKey,e,c,n,a,h,o,O,w,!0,r,!0,!1,i,c,0,null,m["b"],m["a"])}static fromPictureLineSymbol(t,e,i,s){return bt.error("PictureLineSymbol support does not exist!"),null}}const Ot=100,wt=1,jt=t=>class extends t{constructor(...t){super(...t),this.forceLibtess=!1,this._bitset=0,this._lineTemplate=null,this.geometryType=o["d"].FILL}_maybeAddLineTemplate(t){this._lineTemplate=vt.fromFillOutline(t)}_write(t,e,i,s){const r="esriGeometryPoint"===e.geometryType,n=c["a"].load(this._materialKey);t.recordStart(e.getDisplayId(),this._materialKey,this.geometryType,r),this._writeGeometry(t,e,n,s,r),n.outlinedFill&&Object(h["k"])(this._lineTemplate)&&this._lineTemplate.writeGeometry(t,e,s,r),t.recordEnd()}_writeGeometry(t,e,i,s,r){const n=this._getGeometry(e,s,r);if(Object(h["j"])(n))return;const a=[];if(!(n.maxLength>Ot)&&!this.forceLibtess&&rt(a,n))return void(a.length&&this._writeVertices(t,e,n.coords,n.lengths,i,a));const o=nt(n);this._writeVertices(t,e,o,[o.length/2],i)}_writeVertex(t,e,i,s,r,n){const a=Object(p["a"])(wt*s,wt*r);t.vertexBounds(s,r,0,0),t.vertexWrite(a),t.vertexWrite(e),i.dotDensity?t.vertexWriteF32(1/Math.abs(n.readGeometryArea())):(t.vertexWrite(this.fillColor),i.simple||(t.vertexWrite(this.tl),t.vertexWrite(this.br)),t.vertexWrite(this.aux2),t.vertexWrite(this.aux3),i.simple||t.vertexWrite(this._minMaxZoom))}_writeVertices(t,e,i,s,r,n){const a=e.getDisplayId(),o=this._bitset<<24|a,c=s.reduce((t,e)=>t+e),h=r.dotDensity?4:10,l=t.vertexCount();t.vertexEnsureSize(h*c);let u=0;if(n)for(const d of n){const s=i[2*d],n=i[2*d+1];this._writeVertex(t,o,r,s,n,e),u++}else for(let d=0;d0,a=e.readLegacyFeature(),o=this._materialCache,c=this._cimLayer.materialHash;if(!c)return Tt.error("A Dynamic mesh template must have a material hash value or function!"),Promise.reject(null);const h="function"==typeof c?c(a,i,s):c;if(o.has(h)){const t=o.get(h);return Promise.resolve(t)}const l=this._ongoingMaterialRequestMap.get(h);if(l)return l;const u=this._cimLayer,d=Object(Mt["a"])(u.cim,this._cimLayer.materialOverrides);d.mosaicHash=h;const{type:f,url:p}=u,m={cim:d,type:f,mosaicHash:h,url:p,size:null,dashTemplate:null,text:null,fontName:null};switch(f){case"marker":m.size=Object(St["d"])(u.size,a,i,s);break;case"line":m.dashTemplate=u.dashTemplate;break;case"text":m.text=Object(St["d"])(u.text,a,i,s),m.fontName=Object(St["d"])(u.fontName,a,i,s)}const _=t.getMosaicItem(m,r).then(t=>(n||(this._ongoingMaterialRequestMap.delete(h),o.set(h,t)),t)).catch(t=>(this._ongoingMaterialRequestMap.delete(h),Tt.error(".analyze()",t.message),null));return n||this._ongoingMaterialRequestMap.set(h,_),_}}var It=i("1aa6");const Dt=128;class Ct extends(jt(Rt)){constructor(t,e,i){var s;if(super(t),this._minMaxZoom=Object(p["a"])(Math.round(e*d["w"]),Math.round(i*d["w"])),Object(m["f"])(t.color)){const e=(e,i,s)=>{const r=t.color(e,i,s);return r&&Object(u["c"])(r)||0};this._dynamicPropertyMap.set("fillColor",e)}else{const e=t.color;this.fillColor=e&&Object(u["c"])(e)||0}const r="CIMMarkerPlacementInsidePolygon"===(null==(s=t.cim.placement)?void 0:s.type)&&t.cim.placement.shiftOddRows?2:1,n=t.height;if(Object(m["f"])(n)){const t=(t,e,i)=>n(t,e,i)*r;this._dynamicPropertyMap.set("_height",t)}else this._height=(n||0)*r;const a=t.offsetX;if(Object(m["f"])(a)){const t=(t,e,i)=>{let s=Object(l["g"])(a(t,e,i))+Dt;return s>255?s=255:s<0&&(s=0),s};this._dynamicPropertyMap.set("_offsetX",t)}else{let t=Object(l["g"])(a||0)+Dt;t>255?t=255:t<0&&(t=0),this._offsetX=t}const o=t.offsetY;if(Object(m["f"])(o)){const t=(t,e,i)=>{let s=Object(l["g"])(-o(t,e,i))+Dt;return s>255?s=255:s<0&&(s=0),s};this._dynamicPropertyMap.set("_offsetY",t)}else{let t=Object(l["g"])(-o||0)+Dt;t>255?t=255:t<0&&(t=0),this._offsetY=t}const _=t.scaleX;Object(m["f"])(_)?this._dynamicPropertyMap.set("_scaleX",_):this._scaleX=_||1;const y=t.angle;if(Object(m["f"])(y)){const t=(t,e,i)=>Object(f["d"])(y(t,e,i));this._dynamicPropertyMap.set("_angle",t)}else this._angle=Object(f["d"])(y)||0;if(Object(h["k"])(t.effects)){const e=t.effects;Object(m["f"])(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}this._cimFillLayer=t,this._fillMaterialKey=c["a"].load(t.materialKey)}static fromCIMFill(t,e){const[i,s]=Object(m["e"])(t.scaleInfo,e);return new Ct(t,i,s)}bindFeature(t,e,i){const s=t.readLegacyFeature();this._dynamicPropertyMap.forEach((t,r)=>{this[r]=t(s,e,i)});const r=this._fillMaterialKey,n=this._materialCache,a=(0,this._cimFillLayer.materialHash)(s,e,i),o=n.get(a);let c=null;if(o&&Object(It["a"])(o.spriteMosaicItem)&&(c=o.spriteMosaicItem),c){const{rect:t,width:e,height:i}=c,s=t.x+d["A"],n=t.y+d["A"],a=s+e,o=n+i;let h=Math.round(Object(l["g"])(this._height));h>255?h=255:h<=0&&(h=o-n);let u=Math.round(Object(l["g"])(this._height/i*e||0));u>255?u=255:u<=0&&(u=a-s);const f=this._scaleX,m=1;this.tl=Object(p["a"])(s,n),this.br=Object(p["a"])(a,o),this.aux2=Object(p["b"])(u,h,this._offsetX,this._offsetY),this.aux3=Object(p["b"])(f,m,this._angle,0),r.sdf=c.sdf,r.pattern=!0,r.textureBinding=c.textureBinding}else this.tl=0,this.br=0,this.aux2=0,this.aux3=0,r.sdf=!1,r.pattern=!1,r.textureBinding=0;this._materialKey=r.data}}class Pt extends(mt(Rt)){constructor(t,e,i){super(t),this._minMaxZoom=Object(p["a"])(Math.round(e*d["w"]),Math.round(i*d["w"])),this._cimLineLayer=t;let s=0;Object(m["f"])(t.width)||(s=.5*Object(l["g"])(t.width));const r=(e,i,r)=>Object(m["f"])(t.width)?.5*Object(l["g"])(t.width(e,i,r)):s;this._dynamicPropertyMap.set("_halfWidth",r),Object(m["f"])(t.cap)?this._dynamicPropertyMap.set("_capType",t.cap):this._capType=t.cap,Object(m["f"])(t.join)?this._dynamicPropertyMap.set("_joinType",t.join):this._joinType=t.join;const n=t.color;if(Object(m["f"])(n)){const t=(t,e,i)=>Object(u["c"])(n(t,e,i));this._dynamicPropertyMap.set("_fillColor",t)}else this._fillColor=n&&Object(u["c"])(n)||0;const a=t.miterLimit;if(Object(m["f"])(a)){const t=(t,e,i)=>Object(m["d"])(a(t,e,i));this._dynamicPropertyMap.set("_miterLimitCosine",t)}else this._miterLimitCosine=Object(m["d"])(a);if(Object(h["k"])(t.effects)){const e=t.effects;Object(m["f"])(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}this._scaleFactor=t.scaleFactor||1,this._isDashed=null!=t.dashTemplate,this.tessellationProperties._bitset=(t.colorLocked?1:0)|(t.scaleDash?1:0)<<1,this._materialKey=t.materialKey,this._initializeTessellator(!0)}static fromCIMLine(t,e){const[i,s]=Object(m["e"])(t.scaleInfo,e);return new Pt(t,i,s)}bindFeature(t,e,i){const s=t.readLegacyFeature();this._dynamicPropertyMap.forEach((t,r)=>{this[r]=t(s,e,i)}),this._halfWidth*=this._scaleFactor;const r=this._materialCache,n=(0,this._cimLineLayer.materialHash)(s,e,i),a=r.get(n);let o=null;if(a&&Object(It["a"])(a.spriteMosaicItem)&&(o=a.spriteMosaicItem),o){this._hasPattern=!0;const{rect:t,width:e,height:i}=o,s=t.x+d["A"],r=t.y+d["A"],n=s+e,a=r+i;this.tessellationProperties._tl=Object(p["a"])(s,r),this.tessellationProperties._br=Object(p["a"])(n,a)}else this._hasPattern=!1,this.tessellationProperties._tl=0,this.tessellationProperties._br=0;this.tessellationProperties._fillColor=this._fillColor,this.tessellationProperties._halfWidth=this._halfWidth,this.tessellationProperties.offset=0,this.tessellationProperties._halfReferenceWidth=this.tessellationProperties._halfWidth;const h=c["c"].load(this._materialKey);o&&(h.sdf=o.sdf,h.pattern=!0,h.textureBinding=o.textureBinding),this._materialKey=h.data}}var Et=i("2c63"),zt=i("738e"),At=i("f93c");const kt=Object(zt["a"])(),Lt=Object(Et["a"])(),Ft=r["a"].getLogger("esri.views.2d.engine.webgl.WGLDynamicMarkerTemplate");class Bt extends(Object(At["a"])(Rt)){constructor(t,e,i){super(t),this._cimMarkerLayer=t,this._minMaxZoom=Object(p["a"])(Math.round(e*d["w"]),Math.round(i*d["w"]));const s=t.color;if(Object(m["f"])(s)){const t=(t,e,i)=>Object(u["c"])(s(t,e,i));this._dynamicPropertyMap.set("_fillColor",t)}else this._fillColor=Object(u["c"])(s);const r=t.outlineColor;if(Object(m["f"])(r)){const t=(t,e,i)=>Object(u["c"])(r(t,e,i));this._dynamicPropertyMap.set("_outlineColor",t)}else this._outlineColor=Object(u["c"])(r);const n=t.size;if(Object(m["f"])(n)){const t=(t,e,i)=>Object(l["g"])(n(t,e,i));this._dynamicPropertyMap.set("_size",t)}else this._size=Object(l["g"])(n)||0;const a=t.scaleX;Object(m["f"])(a)?this._dynamicPropertyMap.set("_scaleX",a):this._scaleX=a||1;const o=t.offsetX;if(Object(m["f"])(o)){const t=(t,e,i)=>Object(l["g"])(o(t,e,i));this._dynamicPropertyMap.set("xOffset",t)}else this.xOffset=Object(l["g"])(o)||0;const c=t.offsetY;if(Object(m["f"])(c)){const t=(t,e,i)=>Object(l["g"])(c(t,e,i));this._dynamicPropertyMap.set("yOffset",t)}else this.yOffset=Object(l["g"])(c)||0;const f=t.outlineWidth;if(Object(m["f"])(f)){const t=(t,e,i)=>Object(l["g"])(f(t,e,i));this._dynamicPropertyMap.set("_outlineWidth",t)}else this._outlineWidth=Object(l["g"])(f)||0;const _=t.rotation;if(Object(m["f"])(_)?this._dynamicPropertyMap.set("_angle",_):this._angle=_||0,Object(h["k"])(t.effects)){const e=t.effects;Object(m["f"])(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}if(Object(h["k"])(t.markerPlacement)){const e=t.markerPlacement;Object(m["f"])(e)?this._dynamicPropertyMap.set("_markerPlacement",e):this._markerPlacement=e}this._scaleFactor=Object(h["u"])(t.scaleFactor,1),this._bitSet=(t.alignment===ht["a"].MAP?1:0)|(t.colorLocked?1:0)<<1|(t.scaleSymbolsProportionally?1:0)<<3,this._materialKey=t.materialKey}static fromCIMMarker(t,e){const[i,s]=Object(m["e"])(t.scaleInfo,e);return new Bt(t,i,s)}bindFeature(t,e,i){const r=t.readLegacyFeature();this._dynamicPropertyMap.forEach((t,s)=>{this[s]=t(r,e,i)});const n=this._cimMarkerLayer.materialHash,a="function"==typeof n?n(r,e,i):n,o=this._materialCache.get(a);if(!o||!Object(It["a"])(o.spriteMosaicItem)||!o.spriteMosaicItem)return void Ft.error(new s["a"]("mapview-cim","Encountered an error when binding feature"));const h=o.spriteMosaicItem,u=this._cimMarkerLayer.sizeRatio,f=h.width/h.height*this._scaleX,m=this._cimMarkerLayer.rotateClockwise?this._angle:-this._angle;let _=this._size,y=_*f;const x=this.xOffset,g=this.yOffset;this.xOffset*=this._scaleFactor,this.yOffset*=this._scaleFactor;const b=this._cimMarkerLayer.scaleSymbolsProportionally&&this._cimMarkerLayer.frameHeight?this._size/Object(l["g"])(this._cimMarkerLayer.frameHeight):1,v=this._outlineWidth*b,O=Object(l["g"])(this._cimMarkerLayer.referenceSize);let w=0,j=0;const M=this._cimMarkerLayer.anchorPoint;M&&(this._cimMarkerLayer.isAbsoluteAnchorPoint?this._size&&(w=-M.x/(this._size*f),j=M.y/this._size):(w=M.x,j=M.y)),this._sizeOutlineWidth=Object(p["b"])(Math.round(Math.min(Math.sqrt(128*y),255)),Math.round(Math.min(Math.sqrt(128*_),255)),Math.round(Math.min(Math.sqrt(128*v),255)),Math.round(Math.min(Math.sqrt(128*O),255))),this.angle=m;const S=Math.round(64*u);this._bitestAndDistRatio=Object(p["a"])(this._bitSet,S);const T=h.rect.x+d["A"],R=h.rect.y+d["A"],I=T+h.width,D=R+h.height;this._texUpperLeft=Object(p["a"])(T,R),this._texUpperRight=Object(p["a"])(I,R),this._texBottomLeft=Object(p["a"])(T,D),this._texBottomRight=Object(p["a"])(I,D);const C=c["d"].load(this._materialKey);C.sdf=h.sdf,C.pattern=!0,C.textureBinding=h.textureBinding,this._materialKey=C.data,this._anchorX=.5-(.5+w)*h.width/h.width,this._anchorY=.5-(.5+j)*h.height/h.height,y*=u,_*=u,y*=this._scaleFactor,_*=this._scaleFactor,y*=h.rect.width/h.width,_*=h.rect.height/h.height,this._computedWidth=y,this._computedHeight=_,this._applyTransformation(Lt,kt),this.xOffset=x,this.yOffset=g}}var Vt=i("32dd"),Nt=i("44d1"),Gt=i("32b6");const Ut=5;function Wt(t,e,i,s){return"string"==typeof t.text?t.text:"function"==typeof t.text?t.text(e,i,s):""}class qt extends(Object(Nt["a"])(Rt)){constructor(t,e,i){super(t),this._horizontalAlignment="center",this._verticalAlignment="middle",this._textToGlyphs=new Map,this._minMaxZoom=Object(p["a"])(Math.round(e*d["w"]),Math.round(i*d["w"]));const s=t.scaleFactor||1;this._cimTextLayer=t;const r=t.color;if(Object(m["f"])(r)){const t=(t,e,i)=>Object(u["c"])(r(t,e,i));this._dynamicPropertyMap.set("_color",t)}else this._color=Object(u["c"])(r);const n=t.outlineColor;if(Object(m["f"])(n)){const t=(t,e,i)=>Object(u["c"])(n(t,e,i));this._dynamicPropertyMap.set("_haloColor",t)}else this._haloColor=Object(u["c"])(n);let a;Object(m["f"])(t.size)||(a=Math.min(Math.round(Object(l["g"])(t.size*t.sizeRatio)),127));const o=(e,i,s)=>Object(m["f"])(t.size)?Math.min(Math.round(Object(l["g"])(t.size(e,i,s)*t.sizeRatio)),127):a;if(this._dynamicPropertyMap.set("_size",o),Object(m["f"])(t.outlineSize)){const e=(e,i,s)=>Math.min(Math.floor(Ut*Object(l["g"])(t.outlineSize(e,i,s)*t.sizeRatio)),127);this._dynamicPropertyMap.set("_haloSize",e)}else this._haloSize=Math.min(Math.floor(Ut*Object(l["g"])(t.outlineSize*t.sizeRatio)),127);let f;Object(m["f"])(t.offsetX)||(f=Math.round(Object(l["g"])(t.offsetX*t.sizeRatio)));const _=(e,i,s)=>Object(m["f"])(t.offsetX)?Math.round(Object(l["g"])(t.offsetX(e,i,s)*t.sizeRatio)):f;let y;this._dynamicPropertyMap.set("_xOffset",_),Object(m["f"])(t.offsetY)||(y=Math.round(Object(l["g"])(t.offsetY*t.sizeRatio)));const x=(e,i,s)=>Object(m["f"])(t.offsetY)?Math.round(Object(l["g"])(t.offsetY(e,i,s)*t.sizeRatio)):y;if(this._dynamicPropertyMap.set("_yOffset",x),Object(m["f"])(t.angle)?this._dynamicPropertyMap.set("_angle",t.angle):this._angle=t.angle,Object(m["f"])(t.horizontalAlignment)?this._dynamicPropertyMap.set("_horizontalAlignment",t.horizontalAlignment):this._horizontalAlignment=t.horizontalAlignment,Object(m["f"])(t.verticalAlignment)?this._dynamicPropertyMap.set("_verticalAlignment",t.verticalAlignment):this._verticalAlignment=t.verticalAlignment,Object(h["k"])(t.effects)){const e=t.effects;Object(m["f"])(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}if(Object(h["k"])(t.markerPlacement)){const e=t.markerPlacement;Object(m["f"])(e)?this._dynamicPropertyMap.set("_markerPlacement",e):this._textPlacement=e}Object(m["f"])(t.text)?this._dynamicPropertyMap.set("_text",t.text):this._text=t.text,this._scaleFactor=s;const g=Math.min(Math.round(Object(l["g"])(t.referenceSize*t.sizeRatio)),127);this._referenceSize=Math.round(Math.sqrt(256*g)),this._materialKey=t.materialKey;const b=c["f"].load(this._materialKey);b.sdf=!0,this._bitset=(t.alignment===ht["a"].MAP?1:0)|(t.colorLocked?1:0)<<1,this._materialKey=b.data,this._decoration="none",this._lineHeight=1,this._lineWidth=512,this._isCIM=!0}static fromCIMText(t,e){const[i,s]=Object(m["e"])(t.scaleInfo,e);return new qt(t,i,s)}async analyze(t,e,i,s){const r=e.readLegacyFeature(),n=Wt(this._cimTextLayer,r,i,s),a=await super.analyze(t,e,i,s,Object(Gt["a"])(n));return a&&a.glyphMosaicItems&&this._textToGlyphs.set(n,a.glyphMosaicItems),a}bindFeature(t,e,i){const s=t.readLegacyFeature();if(this._dynamicPropertyMap.forEach((t,r)=>{this[r]=t(s,e,i)}),!this._text||0===this._text.length)return void(this._shapingInfo=null);this._size*=this._scaleFactor,this._scale=this._size/d["r"],this._xOffset*=this._scaleFactor,this._yOffset*=this._scaleFactor,this._xAlignD=Object(Vt["e"])(this._horizontalAlignment||"center"),this._yAlignD=Object(Vt["g"])(this._verticalAlignment||"baseline");const r=this._textToGlyphs.get(this._text);this.bindTextInfo(r,!1)}}const Kt=128;class Zt extends(jt(gt["a"])){constructor(t,e,i,s,r,n,a,o,h,l,u,f,m,_,y,x){super(),this._effects=_;const g=c["a"].load(t);e&&(g.sdf=e.sdf,g.pattern=!0,g.textureBinding=e.textureBinding),this.fillColor=i,this.tl=s,this.br=r,this.aux2=Object(p["b"])(n,a,o,h),this.aux3=Object(p["b"])(l,u,f,0),this._bitset=m,this._minMaxZoom=Object(p["a"])(Math.round(y*d["w"]),Math.round(x*d["w"])),this._materialKey=g.data}static fromCIMFill(t,e,i){const s=t.color,r=s&&Object(u["c"])(s)||0,n=t.materialKey,[a,o]=Object(m["e"])(t.scaleInfo,i);if(!e)return new Zt(n,null,r,0,0,0,0,0,0,0,0,0,t.colorLocked?d["g"]:0,t.effects,a,o);const{rect:c,width:h,height:_}=e,y=t.scaleX||1,x=c.x+d["A"],g=c.y+d["A"],b=x+h,v=g+_,O=t.height,w=y*O;let j=Math.round(O);j>255?j=255:j<=0&&(j=v-g);let M=Math.round(w);M>255?M=255:M<=0&&(M=b-x);let S=Object(l["g"])(t.offsetX||0)+Kt;S>255&&(S=255);let T=Object(l["g"])(-t.offsetY||0)+Kt;T>255&&(T=255);const R=Object(p["a"])(x,g),I=Object(p["a"])(b,v);return new Zt(n,e,r,R,I,M,j,S,T,Kt,Kt,Object(f["b"])(t.angle),t.colorLocked?d["g"]:0,t.effects,a,o)}static fromSimpleFill(t,e,i=!1){const{color:s}=t,r=s&&"esriSFSNull"!==t.style&&Object(u["d"])(s)||0,n=i?d["g"]:0,a=t.materialKey;let o;if(e){const{rect:t,width:i,height:s}=e,c=t.x+d["A"],h=t.y+d["A"],l=c+i,u=h+s,f=Object(p["a"])(c,h),_=Object(p["a"])(l,u);o=new Zt(a,e,r,f,_,i,s,0,0,Kt,Kt,0,n,null,m["b"],m["a"])}else o=new Zt(a,null,r,0,0,0,0,0,0,0,0,0,n,null,m["b"],m["a"]);return o._maybeAddLineTemplate(t),o}static fromPictureFill(t,e,i=!1){const s=d["z"],{rect:r,width:n,height:a}=e,o=r.x+d["A"],c=r.y+d["A"],h=o+n,u=c+a,f=Object(p["a"])(o,c),_=Object(p["a"])(h,u);let y=Math.round(Object(l["g"])(t.width));y>255&&(y=255);let x=Math.round(Object(l["g"])(t.height));x>255&&(x=255);let g=Object(l["g"])(t.xoffset)+Kt;g>255&&(g=255);let b=Object(l["g"])(-t.yoffset)+Kt;b>255&&(b=255);const v=t.materialKey,O=i?d["g"]:0,w=new Zt(v,e,s,f,_,y,x,g,b,Kt*t.xscale,Kt*t.yscale,0,O,null,m["b"],m["a"]);return w._maybeAddLineTemplate(t),w}}var Ht=i("a8b5"),Yt=i("89e8");class Xt{constructor(){this._resolver=null}isHeld(){return!!this._resolver}async acquire(){if(!this._resolver)return this._resolver=Object(n["g"])(),Promise.resolve();await this._resolver.promise,await this.acquire()}release(){const t=this._resolver;this._resolver=null,t.resolve()}}async function Jt(t,e,i){try{await t.acquire(),await e(i),t.release()}catch(s){throw t.release(),s}}var Qt=i("f47d");const $t=r["a"].getLogger("esri.views.2d.engine.webgl.mesh.templates.WGLTemplateStore"),te=new Array,ee={isOutline:!1,isOutlinedFill:!1,placement:null,stride:{fill:"default"},vvFlags:0},ie={...a["g"],hash:JSON.stringify(a["g"]),materialKey:Object(c["g"])(o["d"].MARKER,ee)},se={...a["i"],hash:JSON.stringify(a["i"]),materialKey:Object(c["g"])(o["d"].LINE,ee)},re={...a["h"],hash:JSON.stringify(a["h"]),materialKey:Object(c["g"])(o["d"].FILL,ee)};function ne(t,e){const i=t.length;return t.push(null),e.then(e=>t[i]=e),t}function ae(t){return!!(1&t)}function oe(t){return"worker:port-closed"===t.name}class ce{constructor(t,e){this._idCounter=1,this._templateIdCounter=1,this._idToTemplateGroup=new Map,this._symbolToTemplate=new Map,this._fetchQueue=[],this._idToResolver=new Map,this._cimTemplateCache=new Map,this._cimAnalyses=[],this._lock=new Xt,this._fetchResource=t,this._tileInfo=e}get _markerError(){return this._errorTemplates.marker[0]}get _fillError(){return this._errorTemplates.fill[0]}get _lineError(){return this._errorTemplates.line[0]}get _textError(){return this._errorTemplates.line[0]}createTemplateGroup(t,e){this._initErrorTemplates();const i=t.hash;if(this._symbolToTemplate.has(i))return this._symbolToTemplate.get(i);const s=new Array;e&&this._createMeshTemplates(s,e,!0),this._createMeshTemplates(s,t,!1);const r=this._createGroupId("expanded-cim"===t.type&&he(t));return this._idToTemplateGroup.set(r,s),this._symbolToTemplate.set(i,r),r}getTemplateGroup(t){return this._idToTemplateGroup.has(t)?this._idToTemplateGroup.get(t):te}getDynamicTemplateGroup(t){return this._idToTemplateGroup.has(t)?(ae(t)||$t.error("mapview-template-store",`Id ${t} does not refer to a dynamic template`),this._idToTemplateGroup.get(t)):te}getMosaicItem(t,e){const i=this._createTemplateId(),s=new Promise(t=>this._idToResolver.set(i,t));return this._fetchQueue.push({symbol:t,id:i,glyphIds:e}),s}finalize(t){return this._fetchQueue.length||this._lock.isHeld()?Jt(this._lock,this._fetchAllQueuedResources.bind(this),t):Promise.resolve()}_initErrorTemplates(){this._errorTemplates||(this._errorTemplates={fill:this._createMeshTemplates([],re,!1),marker:this._createMeshTemplates([],ie,!1),line:this._createMeshTemplates([],se,!1)})}_fetchAllQueuedResources(t){if(!this._fetchQueue.length)return Promise.resolve();const e=this._fetchQueue,i=this._cimAnalyses;return this._fetchQueue=[],this._cimAnalyses=[],Promise.all(i).then(()=>this._fetchResource(e,t).then(t=>{for(const{id:e,mosaicItem:i}of t)this._idToResolver.get(e)(i),this._idToResolver.delete(e)})).catch(t=>{Object(n["m"])(t)?this._fetchQueue=this._fetchQueue.concat(e):oe(t)||$t.error(new s["a"]("mapview-template-store","Unable to fetch requested texture resources",t))})}_createGroupId(t){return this._idCounter++<<1|(t?1:0)}_createTemplateId(){return this._templateIdCounter++}async _createSMS(t){const{spriteMosaicItem:e}=await this.getMosaicItem(t);return Object(It["a"])(e,$t)?Ht["a"].fromSimpleMarker(t,e):this._markerError}async _createPMS(t){const{spriteMosaicItem:e}=await this.getMosaicItem(t);return Object(It["a"])(e,$t)?Ht["a"].fromPictureMarker(t,e):this._markerError}async _createSFS(t,e){const{spriteMosaicItem:i}=await this.getMosaicItem(t);return Object(It["a"])(i,$t)?Zt.fromSimpleFill(t,i,e):this._fillError}async _createPFS(t,e){const{spriteMosaicItem:i}=await this.getMosaicItem(t);return Object(It["a"])(i,$t)?Zt.fromPictureFill(t,i,e):this._fillError}async _createSLS(t,e){const{spriteMosaicItem:i}=await this.getMosaicItem(t);return Object(It["a"])(i,$t)?vt.fromSimpleLine(t,i):this._lineError}async _createLMS(t){const{spriteMosaicItem:e}=await this.getMosaicItem(t);return Object(It["a"])(e,$t)?Ht["a"].fromLineSymbolMarker(t,e):this._markerError}async _createTS(t){const{glyphMosaicItems:e}=await this.getMosaicItem(t);return Yt["a"].fromText(t,e)}async _createCIMText(t){const{glyphMosaicItems:e}=await this.getMosaicItem(Object(Qt["a"])(t),Object(Gt["a"])(t.text));return Object(It["a"])(e,$t)?Yt["a"].fromCIMText(t,e,this._tileInfo):this._textError}async _createCIMFill(t){const{spriteMosaicItem:e}=await this.getMosaicItem(Object(Qt["a"])(t));return Object(It["a"])(e,$t)?Zt.fromCIMFill(t,e,this._tileInfo):this._fillError}async _createCIMLine(t){const{spriteMosaicItem:e}=await this.getMosaicItem(Object(Qt["a"])(t));return Object(It["a"])(e,$t)?vt.fromCIMLine(t,e,this._tileInfo):this._lineError}async _createCIMMarker(t){const{spriteMosaicItem:e}=await this.getMosaicItem(Object(Qt["a"])(t));return Object(It["a"])(e,$t)?Ht["a"].fromCIMMarker(t,e,this._tileInfo):this._markerError}async _createCIM(t){const e=t.templateHash;if(this._cimTemplateCache.has(e))return this._cimTemplateCache.get(e);let i;switch(t.type){case"marker":i=await this._createCIMMarker(t);break;case"line":i=await this._createCIMLine(t);break;case"fill":i=await this._createCIMFill(t);break;case"text":i=await this._createCIMText(t)}return this._cimTemplateCache.set(e,i),i}async _createDynamicCIM(t){const e=t.templateHash;if(this._cimTemplateCache.has(e))return this._cimTemplateCache.get(e);let i;switch(t.type){case"marker":i=Bt.fromCIMMarker(t,this._tileInfo);break;case"line":i=Pt.fromCIMLine(t,this._tileInfo);break;case"fill":i=Ct.fromCIMFill(t,this._tileInfo);break;case"text":i=qt.fromCIMText(t,this._tileInfo)}return this._cimTemplateCache.set(e,i),i}_createPrimitiveMeshTemplates(t,e,i){switch(e.type){case"esriSMS":return ne(t,this._createSMS(e));case"esriPMS":return ne(t,this._createPMS(e));case"esriSFS":return ne(t,this._createSFS(e,i));case"line-marker":return ne(t,this._createLMS(e));case"esriPFS":return ne(t,this._createPFS(e,i));case"esriSLS":return ne(t,this._createSLS(e,!1));case"esriTS":return ne(t,this._createTS(e));default:return $t.error("Unable to create mesh template for unknown symbol type {: $ }{symbol.type}"),t}}_createMeshTemplates(t,e,i){if(-1!==e.type.indexOf("3d"))return $t.error("3D symbols are not supported with MapView"),t;if("expanded-cim"===e.type){for(const i of e.layers)"function"==typeof i.materialHash?ne(t,this._createDynamicCIM(i)):ne(t,this._createCIM(i));return t}if("composite-symbol"===e.type){for(const s of e.layers)this._createPrimitiveMeshTemplates(t,s,i);return t}return"cim"===e.type||"label"===e.type||"web-style"===e.type?t:this._createPrimitiveMeshTemplates(t,e,i)}}const he=t=>{if(!t.layers)return!1;for(const e of t.layers)if("function"==typeof e.materialHash)return!0;return!1}},"175e":function(t,e,i){"use strict";i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return c})),i.d(e,"c",(function(){return o})),i.d(e,"d",(function(){return f})),i.d(e,"e",(function(){return u})),i.d(e,"f",(function(){return l})),i.d(e,"g",(function(){return h})),i.d(e,"h",(function(){return d}));const s=8388607,r=8388608,n=254,a=255,o=0,c=1,h=t=>(t&r)>>>23,l=t=>t&s,u=t=>h(t)===c?n:a;function d(t){return h(t)===c}function f(t,e){return((e?r:0)|t)>>>0}},"19db":function(t,e,i){"use strict";i.d(e,"a",(function(){return m})),i.d(e,"b",(function(){return _})),i.d(e,"c",(function(){return y})),i.d(e,"d",(function(){return P})),i.d(e,"e",(function(){return C})),i.d(e,"f",(function(){return u})),i.d(e,"g",(function(){return E})),i.d(e,"h",(function(){return x})),i.d(e,"i",(function(){return l})),i.d(e,"j",(function(){return f}));var s=i("fa8a"),r=i("b2b2"),n=i("3e27"),a=i("9dee");const o=new Map;o.set("meter-per-second",1),o.set("kilometer-per-hour",.277778),o.set("knots",.514444),o.set("feet-per-second",.3048),o.set("mile-per-hour",.44704);const c=180/Math.PI,h=5,l=new s["a"]({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(t,e){return o.get(t)/o.get(e)||1}function d(t){return(450-t)%360}function f(t,e="geographic"){const[i,s]=t,r=Math.sqrt(i*i+s*s);let n=Math.atan2(s,i)*c;return n=(360+n)%360,"geographic"===e&&(n=d(n)),[r,n]}function p(t,e="geographic"){let i=t[1];"geographic"===e&&(i=d(i)),i%=360;const s=t[0];return[s*Math.cos(i/c),s*Math.sin(i/c)]}function m(t,e,i,s="geographic"){if(!Object(a["j"])(t)||Object(r["j"])(i))return t;const n="vector-magdir"===e?t.clone():Object(r["t"])(_(t,e)),o=n.pixels[1];for(let r=0;r0){const[s,r]=O(y,w,e,c),[n,a]=O(m,_,e,c);R.push(s),R.push(r),R.push(t),R.push(i),R.push(n),R.push(a)}else{const[s,r]=O(y,x,e,c),[n,a]=O(g,b,e,c),[o,h]=O(j,M,e,c);I.push(t),I.push(i),I.push(o),I.push(h),I.push(n),I.push(a),I.push(s),I.push(r)}w+=n,_+=n,x+=n,b+=n,M+=n}const[D,C]=O(l+s/2,u+a,e,c),P=s/2+d,[E,z]=O(l+P,u+a,e,c),[A,k]=O(l+s/2,u-o,e,c),[L,F]=O(l+P,u-o,e,c);return{pennants:R,barbs:I,shaft:[D,C,E,z,A,k,L,F]}}function O(t,e,i,s=1){const r=Math.sqrt(t*t+e*e)/s,n=(2*Math.PI+Math.atan2(e,t))%(2*Math.PI);return[r,(2*Math.PI+n-i)%(2*Math.PI)]}const w=[0,1,3,6,10,16,21,27,33,40,47,55,63],j=[0,.5,1,1.5,2],M=[0,.25,.5,1,1.5,2,2.5,3,3.5,4];function S(t,e,i,s){const r=u(s||"knots",i);let n;for(n=1;nt>0).length:f*p,b=new Float32Array(x*c),v=new Uint32Array(h*x);for(let l=0;l=h){var _;const i=null!=(_=(o[e]+360)%360/180*Math.PI)?_:2*Math.PI*Math.random(),{pennants:n,barbs:a,shaft:h}=I[Math.min(Math.floor(u/5),29)];if(n.length+a.length===0)continue;let y=d.length/c;const x=(t+.5)/s,g=(l+.5)/r;for(let t=0;t=(O-_)*(w-y)*(1-r)){b[s]=1;const[t,i]=f([x[s]/e,g[s]/e]);x[s]=t,g[s]=i}else b[s]=0,x[s]=0,g[s]=0}const O=new n["a"]({width:m,height:_,pixels:[x,g],mask:b});return O.updateStatistics(),O}},"1aa6":function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var s=i("ce50");function r(t,e){if(t&&"name"in t){const i=t;return e&&e.error(new s["a"](i.name,i.message,i.details)),!1}return!0}},"1ec3":function(t,e,i){"use strict";i.d(e,"a",(function(){return d})),i.d(e,"b",(function(){return m})),i.d(e,"c",(function(){return x}));var s=i("b2b2"),r=i("8188"),n=i("d641"),a=i("7f83"),o=i("9786");const c=[0,0];function h(t,e){if(!e)return null;if("x"in e){const i={x:0,y:0};return[i.x,i.y]=t(e.x,e.y,c),null!=e.z&&(i.z=e.z),null!=e.m&&(i.m=e.m),i}if("xmin"in e){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=t(e.xmin,e.ymin,c),[i.xmax,i.ymax]=t(e.xmax,e.ymax,c),e.hasZ&&(i.zmin=e.zmin,i.zmax=e.zmax,i.hasZ=!0),e.hasM&&(i.mmin=e.mmin,i.mmax=e.mmax,i.hasM=!0),i}return"rings"in e?{rings:l(e.rings,t),hasM:e.hasM,hasZ:e.hasZ}:"paths"in e?{paths:l(e.paths,t),hasM:e.hasM,hasZ:e.hasZ}:"points"in e?{points:u(e.points,t),hasM:e.hasM,hasZ:e.hasZ}:void 0}function l(t,e){const i=[];for(const s of t)i.push(u(s,e));return i}function u(t,e){const i=[];for(const s of t){const t=e(s[0],s[1],[0,0]);i.push(t),s.length>2&&t.push(s[2]),s.length>3&&t.push(s[3])}return i}async function d(t,e){if(!e)return;const i=Array.isArray(t)?t.map(t=>Object(s["k"])(t.geometry)&&t.geometry.spatialReference):[t];await Object(r["g"])(i.map(t=>({source:t,dest:e})))}const f=h.bind(null,o["c"]),p=h.bind(null,o["g"]);function m(t,e,i){if(!t)return t;if(i||(i=e,e=t.spatialReference),!Object(a["l"])(e)||!Object(a["l"])(i)||Object(a["d"])(e,i))return t;if(Object(o["a"])(e,i)){const e=Object(a["p"])(i)?f(t):p(t);return e.spatialReference=i,e}return Object(r["r"])(n["a"],[t],e,i,null)[0]}class _{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(t,e,i){if(!t||!t.length||!e||!i||Object(a["d"])(e,i))return t;const s={geometries:t,inSpatialReference:e,outSpatialReference:i,resolve:null};return this._jobs.push(s),new Promise(t=>{s.resolve=t,null===this._timer&&(this._timer=setTimeout(this._process,10))})}_process(){this._timer=null;const t=this._jobs.shift();if(!t)return;const{geometries:e,inSpatialReference:i,outSpatialReference:s,resolve:c}=t;Object(o["a"])(i,s)?Object(a["p"])(s)?c(e.map(f)):c(e.map(p)):c(Object(r["r"])(n["a"],e,i,s,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}}const y=new _;function x(t,e,i){return y.push(t,e,i)}},2616:function(t,e,i){"use strict";i.d(e,"a",(function(){return d})),i.d(e,"b",(function(){return b}));i("e06a");var s=i("e92d"),r=i("38a4"),n=i("b2b2"),a=i("f4cc"),o=i("880d"),c=i("7f83"),h=i("3af1");const l=s["a"].getLogger("esri.views.2d.engine.flow.dataUtils"),u=9;async function d(t,e,i){const s=performance.now(),r=f(t,e),n=performance.now(),o=m(t,r,e.width,e.height),c=performance.now(),h=y(o,!0),u=performance.now(),d=x(h),p=performance.now();if(t.profile){const t={"_createFlowFieldFromData()":Math.round(n-s),"_getStreamlines()":Math.round(c-n),"createAnimatedLinesData()":Math.round(u-c),"createLinesMesh()":Math.round(p-u),"Total elapsed time":Math.round(p-s)};l.info("createStreamlinesMesh profile",t)}return await Promise.resolve(),Object(a["v"])(i),d}function f(t,e){const i=_(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,s)=>{const r=Math.floor(t),n=Math.floor(s);if(r<0||r>=e.width)return[0,0];if(n<0||n>=e.height)return[0,0];const a=t-r,o=s-n,c=r,h=n,l=r{const r=Math.round(t),n=Math.round(s);return r<0||r>=e.width||n<0||n>=e.height?[0,0]:[i[2*(n*e.width+r)+0],i[2*(n*e.width+r)+1]]}}function p(t,e,i,s,r,n,a,o,c){const h=[];let l=i,u=s,d=0,[f,p]=e(l,u);f*=t.velocityScale,p*=t.velocityScale;const m=Math.sqrt(f*f+p*p);let _,y;h.push({x:l,y:u,t:d,speed:m});for(let x=0;xt.maxTurnAngle)return h;if(t.mergeLines){const t=Math.round(l*c),e=Math.round(u*c);if(t<0||t>a-1||e<0||e>o-1)return h;const i=n[e*a+t];if(-1!==i&&i!==r)return h;n[e*a+t]=r}h.push({x:l,y:u,t:d,speed:f}),_=p,y=m}return h}function m(t,e,i,s){const r=[],n=new o["a"],a=1/Math.max(t.lineCollisionWidth,1),c=Math.round(i*a),h=Math.round(s*a),l=new Int32Array(c*h);for(let o=0;ot.sort-e.sort);for(const{x:o,y:d}of u)if(n.getFloat()=e)continue;const c=n[o+r];s+=c*t[2*(h*e+(i+o))+0],a+=c*t[2*(h*e+(i+o))+1]}o[2*(h*e+i)+0]=s,o[2*(h*e+i)+1]=a}const c=new Float32Array(t.length);for(let h=0;h=i)continue;const l=n[c+r];s+=l*o[2*((t+c)*e+h)+0],a+=l*o[2*((t+c)*e+h)+1]}c[2*(t*e+h)+0]=s,c[2*(t*e+h)+1]=a}return c}function y(t,e){const i=new o["a"],s=t.reduce((t,e)=>t+e.length,0),r=new Float32Array(4*s),n=new Array(t.length);let a=0,c=0;for(const o of t){const t=a;for(const e of o)r[4*a+0]=e.x,r[4*a+1]=e.y,r[4*a+2]=e.t,r[4*a+3]=e.speed,a++;n[c++]={startVertex:t,numberOfVertices:o.length,totalTime:o[o.length-1].t,timeSeed:e?i.getFloat():0}}return{lineVertices:r,lineDescriptors:n}}function x(t,e=10){const{lineVertices:i,lineDescriptors:s}=t;let r=0,n=0;for(const u of s)r+=2*u.numberOfVertices,n+=6*(u.numberOfVertices-1);const a=new Float32Array(r*u),o=new Uint32Array(n);let c=0,h=0;function l(){o[h++]=c-2,o[h++]=c,o[h++]=c-1,o[h++]=c,o[h++]=c+1,o[h++]=c-1}function d(t,e,i,s,r,n,o,h){const l=c*u;let d=0;a[l+d++]=t,a[l+d++]=e,a[l+d++]=1,a[l+d++]=i,a[l+d++]=n,a[l+d++]=o,a[l+d++]=s/2,a[l+d++]=r/2,a[l+d++]=h,c++,a[l+d++]=t,a[l+d++]=e,a[l+d++]=-1,a[l+d++]=i,a[l+d++]=n,a[l+d++]=o,a[l+d++]=-s/2,a[l+d++]=-r/2,a[l+d++]=h,c++}for(const u of s){const{totalTime:t,timeSeed:s}=u;let r=null,n=null,a=null,o=null,c=null,h=null;for(let f=0;f0){x=p-r,g=m-n;const i=Math.sqrt(x*x+g*g);if(x/=i,g/=i,f>1){let t=x+c,i=g+h;const s=Math.sqrt(t*t+i*i);t/=s,i/=s;const r=Math.min(1/(t*x+i*g),e);t*=r,i*=r,b=-i,v=t}else b=-g,v=x;null!==b&&null!==v&&(d(r,n,a,b,v,t,s,y),l())}r=p,n=m,a=_,c=x,h=g,o=y}d(r,n,a,-h,c,t,s,o)}return{vertexData:a,indexData:o}}function g(t,e){const i=e.pixels,{width:s,height:n}=e,a=new Float32Array(s*n*2);if("vector-uv"===t)for(let r=0;r=i||(x.data[2*(t*i+g+e)+0]=c.data[2*(t*c.width+e)+0],x.data[2*(t*i+g+e)+1]=c.data[2*(t*c.width+e)+1]);g+=c.width}return x}async function v(t,e,i,s,r,a){const o={requestProjectedLocalDirections:!0,signal:a};if(Object(n["k"])(r)&&(o.timeExtent=r),"imagery"===t.type){await t.load({signal:a});const r=t.rasterInfo.dataType,c=await t.fetchImage(e,i,s,o);return!c||Object(n["j"])(c.pixelData)||Object(n["j"])(c.pixelData.pixelBlock)?{data:new Float32Array(i*s*2),width:i,height:s}:g(r,c.pixelData.pixelBlock)}await t.load({signal:a});const c=t.rasterInfo.dataType,h=await t.fetchPixels(e,i,s,o);return!h||Object(n["j"])(h.pixelBlock)?{data:new Float32Array(i*s*2),width:i,height:s}:g(c,h.pixelBlock)}},2629:function(t,e,i){"use strict";i.d(e,"a",(function(){return m}));var s=i("ab39"),r=i("8c81");function n(t,e){return t.x===e.x&&t.y===e.y}function a(t){if(!t)return;const e=t.length;if(e<=1)return;let i=0;for(let s=1;si){r=!0;const t=(i-s)/u;u=i-s,e=(1-t)*n+t*e,o=(1-t)*a+t*o,--c}const d=this.writeVertex(n,a,0,0,h,l,l,-h,0,-1,s),f=this.writeVertex(n,a,0,0,h,l,-l,h,0,1,s);s+=u;const p=this.writeVertex(e,o,0,0,h,l,l,-h,0,-1,s),m=this.writeVertex(e,o,0,0,h,l,-l,h,0,1,s);this.writeTriangle(d,f,p),this.writeTriangle(f,p,m),n=e,a=o}}_tessellate(t,e){const i=t[0],r=t[t.length-1],a=n(i,r),m=a?3:2;if(t.length=0&&F>=0&&a>=0&&G(L,F,a),L=F,F=a,a};a&&(M=t[t.length-2],R.x=r.x-M.x,R.y=r.y-M.y,D=u(R),R.x/=D,R.y/=D);let W=!1;for(let n=0;nB&&(W=!0)),W){const e=(B-V)/I;I=B-V,M={x:(1-e)*M.x+e*t[n].x,y:(1-e)*M.y+e*t[n].y},--n}else M=t[n];w=M.x,j=M.y;const e=n<=0&&!W,i=n===t.length-1;if(e||(V+=I),S=i?a?t[1]:null:t[n+1],S?(R.x=S.x-w,R.y=S.y-j,D=u(R),R.x/=D,R.y/=D):(R.x=void 0,R.y=void 0),!a){if(e){c(C,R),P=C.x,E=C.y,y===s["d"].SQUARE&&(U(-R.y-R.x,R.x-R.y,R.x,R.y,0,-1),U(R.y-R.x,-R.x-R.y,R.x,R.y,0,1)),y===s["d"].ROUND&&(U(-R.y-R.x,R.x-R.y,R.x,R.y,-1,-1),U(R.y-R.x,-R.x-R.y,R.x,R.y,-1,1)),y!==s["d"].ROUND&&y!==s["d"].BUTT||(U(-R.y,R.x,R.x,R.y,0,-1),U(R.y,-R.x,R.x,R.y,0,1));continue}if(i){o(C,T),P=C.x,E=C.y,y!==s["d"].ROUND&&y!==s["d"].BUTT||(U(T.y,-T.x,-T.x,-T.y,0,-1),U(-T.y,T.x,-T.x,-T.y,0,1)),y===s["d"].SQUARE&&(U(T.y-T.x,-T.x-T.y,-T.x,-T.y,0,-1),U(-T.y-T.x,T.x-T.y,-T.x,-T.y,0,1)),y===s["d"].ROUND&&(U(T.y-T.x,-T.x-T.y,-T.x,-T.y,1,-1),U(-T.y-T.x,T.x-T.y,-T.x,-T.y,1,1));continue}}let r,m,N=-d(T,R);if(Math.abs(N)<.01)f(T,R)>0?(C.x=T.x,C.y=T.y,N=1,r=Number.MAX_VALUE,m=!0):(c(C,R),N=1,r=1,m=!1);else{C.x=(T.x+R.x)/N,C.y=(T.y+R.y)/N,r=u(C);const t=(r-1)*v*_;m=r>4||t>I&&t>D}P=C.x,E=C.y;let G=x;switch(x){case s["o"].BEVEL:r<1.05&&(G=s["o"].MITER);break;case s["o"].ROUND:rg&&(G=s["o"].BEVEL)}switch(G){case s["o"].MITER:if(U(C.x,C.y,-T.x,-T.y,0,-1),U(-C.x,-C.y,-T.x,-T.y,0,1),i)break;if(O){const t=W?0:V;L=this.writeVertex(w,j,P,E,R.x,R.y,C.x,C.y,0,-1,t),F=this.writeVertex(w,j,P,E,R.x,R.y,-C.x,-C.y,0,1,t)}break;case s["o"].BEVEL:{const t=N<0;let e,s,r,n;if(t){const t=L;L=F,F=t,e=z,s=A}else e=A,s=z;if(m)r=t?c(this.innerPrev,T):o(this.innerPrev,T),n=t?o(this.innerNext,R):c(this.innerNext,R);else{const e=t?l(this.inner,C):h(this.inner,C);r=e,n=e}const a=t?o(this.bevelStart,T):c(this.bevelStart,T);U(r.x,r.y,-T.x,-T.y,e.x,e.y);const u=U(a.x,a.y,-T.x,-T.y,s.x,s.y);if(i)break;const d=t?c(this.bevelEnd,R):o(this.bevelEnd,R);if(m){const t=this.writeVertex(w,j,P,E,-T.x,-T.y,0,0,0,0,V);L=this.writeVertex(w,j,P,E,R.x,R.y,n.x,n.y,e.x,e.y,V),F=this.writeVertex(w,j,P,E,R.x,R.y,d.x,d.y,s.x,s.y,V),this.writeTriangle(u,t,F)}else{if(O){const t=this.bevelMiddle;t.x=(a.x+d.x)/2,t.y=(a.y+d.y)/2,p(k,t,-T.x,-T.y),U(t.x,t.y,-T.x,-T.y,k.x,k.y),p(k,t,R.x,R.y),L=this.writeVertex(w,j,P,E,R.x,R.y,t.x,t.y,k.x,k.y,V),F=this.writeVertex(w,j,P,E,R.x,R.y,n.x,n.y,e.x,e.y,V)}else{const t=L;L=F,F=t}U(d.x,d.y,R.x,R.y,s.x,s.y)}if(t){const t=L;L=F,F=t}break}case s["o"].ROUND:{const t=N<0;let e,s;if(t){const t=L;L=F,F=t,e=z,s=A}else e=A,s=z;const n=t?l(this.inner,C):h(this.inner,C);let a,u;m?(a=t?c(this.innerPrev,T):o(this.innerPrev,T),u=t?o(this.innerNext,R):c(this.innerNext,R)):(a=n,u=n);const d=t?o(this.roundStart,T):c(this.roundStart,T),_=t?c(this.roundEnd,R):o(this.roundEnd,R),y=U(a.x,a.y,-T.x,-T.y,e.x,e.y),x=U(d.x,d.y,-T.x,-T.y,s.x,s.y);if(i)break;const g=this.writeVertex(w,j,P,E,-T.x,-T.y,0,0,0,0,V);m||this.writeTriangle(L,F,g);const b=l(this.outer,n),v=this.writeVertex(w,j,P,E,R.x,R.y,_.x,_.y,s.x,s.y,V);let M,S;const I=r>2;if(I){let e;r!==Number.MAX_VALUE?(b.x/=r,b.y/=r,e=f(T,b),e=(r*(e*e-1)+1)/e):e=-1,M=t?o(this.startBreak,T):c(this.startBreak,T),M.x+=T.x*e,M.y+=T.y*e,S=t?c(this.endBreak,R):o(this.endBreak,R),S.x+=R.x*e,S.y+=R.y*e}p(k,b,-T.x,-T.y);const D=this.writeVertex(w,j,P,E,-T.x,-T.y,b.x,b.y,k.x,k.y,V);p(k,b,R.x,R.y);const B=O?this.writeVertex(w,j,P,E,R.x,R.y,b.x,b.y,k.x,k.y,V):D,G=g,W=O?this.writeVertex(w,j,P,E,R.x,R.y,0,0,0,0,V):g;let q=-1,K=-1;if(I&&(p(k,M,-T.x,-T.y),q=this.writeVertex(w,j,P,E,-T.x,-T.y,M.x,M.y,k.x,k.y,V),p(k,S,R.x,R.y),K=this.writeVertex(w,j,P,E,R.x,R.y,S.x,S.y,k.x,k.y,V)),O?I?(this.writeTriangle(G,x,q),this.writeTriangle(G,q,D),this.writeTriangle(W,B,K),this.writeTriangle(W,K,v)):(this.writeTriangle(G,x,D),this.writeTriangle(W,B,v)):I?(this.writeTriangle(g,x,q),this.writeTriangle(g,q,K),this.writeTriangle(g,K,v)):(this.writeTriangle(g,x,D),this.writeTriangle(g,B,v)),m?(L=this.writeVertex(w,j,P,E,R.x,R.y,u.x,u.y,e.x,e.y,V),F=v):(L=O?this.writeVertex(w,j,P,E,R.x,R.y,u.x,u.y,e.x,e.y,V):y,this.writeTriangle(L,W,v),F=v),t){const t=L;L=F,F=t}break}}}}}},2779:function(t,e,i){"use strict";i.d(e,"a",(function(){return U}));i("c120");var s=i("b2b2"),r=i("f4cc"),n=i("0c53"),a=i("175e"),o=i("ce50"),c=i("e92d"),h=i("38a4"),l=i("a915"),u=i("ab39"),d=i("32dd"),f=i("a9a2"),p=i("8c81"),m=i("c84e"),_=i("d114"),y=i("18c6"),x=i("6a2c");function g(t,e){return t[e+1]}function b(t){return t.length-1}function v(t){let e=0;for(let i=0;it._index||this._index===t._index&&this._distance>=t._distance}get _segment(){return this._segments[this._index+1]}get angle(){const t=this.dy,e=(0*t+-1*-this.dx)/(1*this.length);let i=Math.acos(e);return t>0&&(i=2*Math.PI-i),i}get xStart(){return this._xStart}get yStart(){return this._yStart}get x(){return this.xStart+this.distance*this.dx}get y(){return this.yStart+this.distance*this.dy}get dx(){return this._segment[0]}get dy(){return this._segment[1]}get xMidpoint(){return this.xStart+.5*this.dx}get yMidpoint(){return this.yStart+.5*this.dy}get xEnd(){return this.xStart+this.dx}get yEnd(){return this.yStart+this.dy}get length(){const{dx:t,dy:e}=this;return Math.sqrt(t*t+e*e)}get remainingLength(){return this.length*(1-this._distance)}get backwardLength(){return this.length*this._distance}get distance(){return this._distance}get done(){return this._done}hasPrev(){return this._index-1>=0}hasNext(){return this._index+1t)return this._seekBackwards(t-s);s+=this.length}return this._distance=0,e?this:null}seek(t,e=!1){if(t<0)return this._seekBackwards(Math.abs(t),e);if(t<=this.remainingLength)return this._distance=(this.backwardLength+t)/this.length,this;let i=this.remainingLength;for(;this.next();){if(i+this.length>t)return this.seek(t-i,e);i+=this.length}return this._distance=1,e?this:null}}function j(t,e,i,s=!0){const r=v(t),n=w.create(t),a=r/2;if(!s)return n.seek(a),void i(n.clone(),0,a+0*e,r);const o=Math.max((r-e)/2,0),c=Math.floor(o/e),h=a-c*e;n.seek(h);for(let l=-c;l<=c;l++)n.x<512&&n.x>=0&&n.y<512&&n.y>=0&&i(n.clone(),l,a+l*e,r),n.seek(e)}function M(t,e){const i=e;for(let s=0;s=0&&!(r[s+1]r[u]+l);a++){const s=l-r[a-1]+r[u],h=r[a]-r[a-1],d=r[a]-r[u]R.error(new o["a"](e,t)),D=1,C=0,P=4;function E(t,e){const i=!!t.minScale&&e.scaleToZoom(t.minScale)||0;return Object(h["f"])(i,0,25.5)}function z(t,e){const i=!!t.maxScale&&e.scaleToZoom(t.maxScale)||255;return Object(h["f"])(i,0,25.5)}function A(t){const e=new Map;return i=>(e.has(i)||e.set(i,t(i)),e.get(i))}const k=A(t=>{let e=0;if(0===t)return 1/0;for(;!(t%2);)e++,t/=2;return e}),L=t=>Math.floor(127*t+127),F=t=>Math.floor(10*t),B=t=>Math.round(t*(254/360));class V extends T["a"]{constructor(t,e,i,s){var r,n,a;super(t,i.font.size,i.haloSize||0,i.font.size,i.color&&Object(f["d"])(i.color)||0,i.haloColor&&Object(f["d"])(i.haloColor)||0,i.horizontalAlignment,i.verticalAlignment,Object(d["i"])(e.labelPlacement)?u["a"].MAP:u["a"].SCREEN,i.font.decoration,!1,i.angle||0,i.xoffset,i.yoffset,i.lineWidth,i.lineHeight,null,null,null,null,null),this._outLineLabelAngle=0,this._refPlacementPadding=0,this._refPlacementDirX=0,this._refPlacementDirY=0,this._refOffsetX=0,this._refOffsetY=0,this._zoomLevel=0,this.geometryType=m["d"].LABEL,this._allowOverrun=null!=(r=e.allowOverrun)&&r,this._repeatLabel=null==(n=e.repeatLabel)||n,this._labelPosition=null!=(a=e.labelPosition)?a:"curved";const o=E(e,s),c=z(e,s),h=e.labelPlacement,[_,x]=Object(d["c"])(h);this._xAlignD=_,this._yAlignD=x,this._minZoom=o,this._maxZoom=c,this._refPlacementPadding=Object(l["g"])(i.haloSize)+p["N"],this._repeatLabelDistance=e.repeatLabelDistance?Object(l["g"])(e.repeatLabelDistance):128;const g=y["b"].load(t);g.sdf=!0,this._materialKey=g.data}static fromLabelClass(t,e){if("esriServerLinePlacementCenterAlong"===t.labelPlacement){const e=t.symbol;e.xoffset=0,e.yoffset=0,e.angle=0,e.font.decoration="none"}return new V(t.materialKey,t,t.symbol,e)}get _shapedBox(){return Object(s["t"])(this._shapingInfo).bounds}setZoomLevel(t){this._zoomLevel=t}bindReferenceTemplate(t){let e=Object(d["f"])(this._xAlignD),i=Object(d["h"])(this._yAlignD);if(this._refOffsetX=0,this._refOffsetY=0,Object(s["j"])(t))return void(this._refSymbolAndPlacementOffset=Object(_["b"])(0,0,L(e),L(i)));if("circle"===t.boundsType&&(e||i)){const t=Math.sqrt(e*e+i*i);e/=t,i/=t}const r=Math.max(t.height,t.width),n=this._refPlacementPadding*P;this._refSymbolAndPlacementOffset=Object(_["b"])(n,r,L(e),L(i)),this._referenceSize=r,this._refPlacementDirX=e,this._refPlacementDirY=i,this._refOffsetX=t.xOffset,this._refOffsetY=t.yOffset}_write(t,e){if(Object(s["j"])(this._shapingInfo))return;const i=this._shapingInfo,r=e.getDisplayId(),n="esriGeometryPolygon"===e.geometryType?e.readLegacyCentroid():e.readLegacyGeometry();if(n)switch(this.current={out:t,inId:r,inShaping:i,zoomLevel:this._zoomLevel},e.geometryType){case"esriGeometryPolyline":this._placeLineLabels(n);break;case"esriGeometryPoint":case"esriGeometryPolygon":this._placePointLabels(n);break;default:I("mapview-labeling",`Geometry of type ${e.geometryType} is not supported`)}}_isVisible(t,e){const i=F(this.current.zoomLevel);return F(t)<=i&&i<=F(e)}_placePointLabels(t){const{out:e,inId:i,inShaping:s}=this.current;this._writeGlyphs(e,i,t,s)}_placeLineLabels(t){const e=M(t.paths,this.current.inShaping.bounds.width),i=this._placeSubdivGlyphs.bind(this),s=(this._shapedBox.width+this._repeatLabelDistance)/(1<=s);)this._placeOnSegment(n,e,a,i,-1,r),a+=n.length+C}_placeForward(t,e,i,s,r){const n=t.clone();let a=t.remainingLength+C;for(;n.next()&&!(a>=s);)this._placeOnSegment(n,e,a,i,1,r),a+=n.length+C}_placeFirst(t,e,i,s=!1){const r=t,n=this.current.inShaping,a=n.glyphs,o=this.current.zoomLevel,{out:c,inId:h}=this.current;for(const l of a){const a=l.x>n.bounds.x?i:1-i,u=a*t.remainingLength+(1-a)*t.backwardLength,d=Math.abs(l.x+l.width/2-n.bounds.x),f=Math.max(0,o+Math.log2(d/(u+C))),p=Math.max(e,s?0:f);if(l.maxZoom=25,l.angle=t.angle+(1-i)*Math.PI,l.minZoom=p,this._writeGlyph(c,h,r.x,r.y,l),i&&this._isVisible(l.minZoom,l.maxZoom)){const t=l.bounds;c.metricBoxWrite(t.center[0],t.center[1],t.width,t.height)}}}_placeOnSegment(t,e,i,s,r,n){const a=this.current.inShaping.glyphs,{out:o,inId:c}=this.current,h=this.current.inShaping,l=this.current.zoomLevel,u=t.dx/t.length,d=t.dy/t.length,f={x:t.x+i*-r*u,y:t.y+i*-r*d};for(const p of a){const a=p.x>h.bounds.x?n:1-n;if(!(a&&1===r||!a&&-1===r))continue;const u=Math.abs(p.x+p.width/2-h.bounds.x),d=Math.max(0,l+Math.log2(u/i)-.1),m=Math.max(s,l+Math.log2(u/(i+t.length+C)));if(0!==d&&(p.angle=t.angle+(1-n)*Math.PI,p.minZoom=m,p.maxZoom=d,this._writeGlyph(o,c,f.x,f.y,p),n&&this._isVisible(p.minZoom,p.maxZoom))){const i=p.bounds,s=t.x-e.x,r=t.y-e.y;o.metricBoxWrite(i.center[0]+s,i.center[1]+r,i.width,i.height)}}}_writeGlyphs(t,e,i,s,r=this._minZoom){if(i.x<0||i.x>=512||i.y<0||i.y>=512)return;const n=i.x+this._refOffsetX,a=i.y-this._refOffsetY;for(const l of s.glyphs)l.minZoom=r,l.maxZoom=this._maxZoom,this._writeGlyph(t,e,n,a,l);const o=this._refPlacementDirX,c=this._refPlacementDirY,h=s.boundsT;t.metricStart(e,r,n,a,o,c,this._referenceSize,this._materialKey),t.metricBoxWrite(h.center[0],h.center[1],h.width,h.height),t.metricEnd()}_writeVertexCommon(t,e,i,s){const r=this._color,n=this._haloColor,a=Object(_["b"])(0,0,this._size,this._haloSize),o=Math.max(s.minZoom,this._minZoom),c=Math.min(s.maxZoom,this._maxZoom),h=Object(_["b"])(F(o),F(c),this._outLineLabelAngle,0);t.vertexWrite(i),t.vertexWrite(e),t.vertexWrite(r),t.vertexWrite(n),t.vertexWrite(a),t.vertexWrite(this._refSymbolAndPlacementOffset),t.vertexWrite(h)}}var N=i("a8b5"),G=i("0f0f2");class U{constructor(t,e,i){this._loadPromise=Object(n["a"])(),this._geometryType=t,this._idField=e,this._templateStore=i}update(t,e){Object(s["k"])(t.mesh.labels)&&(this._labelTemplates=this._createLabelTemplates(t.mesh.labels,e)),this._schema=t}_createLabelTemplates(t,e){const i=new Map;if("simple"===t.type){for(const s of t.classes){const t=V.fromLabelClass(s,e);i.set(s.index,t)}return i}for(const s in t.classes){const r=t.classes[s];for(const t of r){const s=V.fromLabelClass(t,e);i.set(t.index,s)}}return i}get templates(){return this._templateStore}async analyze(t,e,i,n,o,c,h){if(Object(r["n"])(h))return;let l;"dictionary"===i.type&&(l=await i.analyze(this._idField,t.copy(),e,o,c,h));let u=0;for(;t.next();){let e;if(e=l?l[u++]:Object(s["k"])(n)&&Object(a["h"])(t.getDisplayId())&&1!==t.readAttribute("cluster_count")?n.match(this._idField,t,this._geometryType,o,c):i.match(this._idField,t,this._geometryType,o,c),t.setGroupId(e),Object(G["b"])(e)){const i=this._templateStore.getDynamicTemplateGroup(e);for(const e of i)e&&e.analyze&&e.analyze(this._templateStore,t,o,c)}}return await this._loadPromise,this._templateStore.finalize(h)}async analyzeGraphics(t,e,i,s,n,a){if(Object(r["n"])(a))return;const o=t.getCursor();for(i&&await i.analyze(this._idField,o.copy(),e,s,n,a);o.next();){let t=o.getGroupId();if(null!=t&&-1!==t||(t=i.match(this._idField,o,o.geometryType,s,n),o.setGroupId(t)),Object(G["b"])(t)){const e=this._templateStore.getDynamicTemplateGroup(t);for(const t of e)t&&t.analyze&&t.analyze(this._templateStore,o,s,n)}o.setGroupId(t)}return await this._loadPromise,this._templateStore.finalize(a)}writeGraphic(t,e,i,s){const r=e.getGroupId(),n=e.getDisplayId(),a=this._templateStore.getTemplateGroup(r);if(t.featureStart(e.insertAfter,0),null!=n){if(Object(G["b"])(r))for(const t of a)t&&t.bindFeature(e,null,null);if(a){for(const r of a)r&&r.write(t,e,i,s);t.featureEnd()}}}writeCursor(t,e,i,r,n,a,o){const c=e.getGroupId(),h=e.getDisplayId(),l=this._templateStore.getTemplateGroup(c),u=this._schema.mesh.sortKey;let d=0;if(Object(s["k"])(u)&&(d=null!=u.fieldIndex?e.getComputedNumericAtIndex(u.fieldIndex):null!=u.field?e.readAttribute(u.field):e.readAttribute(this._idField),d*="asc"===u.order?1:-1),t.featureStart(0,null==d||isNaN(d)?0:d),null!=h&&l){if(Object(G["b"])(c))for(const t of l)t.bindFeature(e,i,r);for(const i of l)i.write(t,e,n,o);if(Object(s["k"])(a)&&t.hasRecords){const i=a&&this._findLabelRef(l);this._writeLabels(t,e,a,i,n,o)}t.featureEnd()}}_findLabelRef(t){for(const e of t)if(e instanceof N["a"])return e;return null}_writeLabels(t,e,i,r,n,a){for(const o of i)if(Object(s["k"])(o)&&o){const{glyphs:i,rtl:s,index:c}=o,h=this._labelTemplates.get(c);h.setZoomLevel(n),h.bindReferenceTemplate(r),h.bindTextInfo(i,s),h.write(t,e,null,a)}}}},2855:function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));var s=i("a29a"),r=i("1c92"),n=i("8c71"),a=i("3349"),o=i("738e"),c=i("8c81"),h=i("e4b1");class l{acquire(t){return{refCount:1,version:-1,labelMat2d:Object(n["b"])(),tileMat3:Object(n["b"])(),dvs:Object(n["b"])()}}release(t){}}class u extends h["a"]{constructor(t,e,i){super(t,e,i,c["P"],c["P"])}destroy(){super.destroy(),this._transforms&&u.TransformCache.release(this.key.hash)}setTransform(t,e){const i=e/(t.resolution*t.pixelRatio),n=this.transforms.tileMat3,[c,h]=t.toScreenNoRotation([0,0],[this.x,this.y]),l=this.width/this.rangeX*i,u=this.height/this.rangeY*i;Object(r["o"])(n,l,0,0,0,u,0,c,h,1),Object(r["l"])(this.transforms.dvs,t.displayViewMat3,n);const d=this.transforms.labelMat2d,f=t.getScreenTransform(d,e),p=Object(o["a"])();Object(a["t"])(p,[this.x,this.y],f),Object(s["a"])(d,p),Object(s["f"])(d,t.viewMat2d,d)}_createTransforms(){return u.TransformCache.acquire(this.key.hash)}}u.TransformCache=new l},"2d39":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var s=i("3b1a"),r=i("c84e"),n=i("9a02");class a extends n["a"]{get requiresDedicatedFBO(){return this.children.some(t=>"additive"===t.blendFunction)}prepareRenderPasses(t){const e=t.registerRenderPass({name:"bitmap",brushes:[s["a"].bitmap],target:()=>this.children,drawPhase:r["c"].MAP});return[...super.prepareRenderPasses(t),e]}}},"2da5":function(t,e,i){"use strict";i.d(e,"a",(function(){return h})),i.d(e,"b",(function(){return c}));var s,r=i("8c81"),n=i("3976"),a=i("1d01");class o{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class c{constructor(t,e,i,s=8,n=8){this.lines=[],this.starts=[],this.validateTessellation=!0,this.pixelRatio=s,this.pixelMargin=n,this.tileSize=r["P"]*s,this.dz=t,this.yPos=e,this.xPos=i}setPixelMargin(t){t!==this.pixelMargin&&(this.pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this.finalRatio=this.tileSize/t*(1<>this.dz;e>i&&(e=i),this.margin=e,this.xmin=i*this.xPos-e,this.ymin=i*this.yPos-e,this.xmax=this.xmin+i+2*e,this.ymax=this.ymin+i+2*e}reset(t){this.type=t,this.lines=[],this.starts=[],this.line=null,this.start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new n["b"](t,e),this._firstPt=new n["b"](t,e),this._dist=0}lineTo(t,e){const i=this._isIn(t,e),s=new n["b"](t,e),r=n["b"].distance(this._prevPt,s);let a,c,h,l,u,d,f,p;if(i)this._prevIsIn?this._lineTo(t,e,!0):(a=this._prevPt,c=s,h=this._intersect(c,a),this.start=this._dist+r*(1-this._r),this._lineTo(h.x,h.y,!0),this._lineTo(c.x,c.y,!0));else if(this._prevIsIn)c=this._prevPt,a=s,h=this._intersect(c,a),this._lineTo(h.x,h.y,!0),this._lineTo(a.x,a.y,!1);else{const t=this._prevPt,e=s;if(t.x<=this.xmin&&e.x<=this.xmin||t.x>=this.xmax&&e.x>=this.xmax||t.y<=this.ymin&&e.y<=this.ymin||t.y>=this.ymax&&e.y>=this.ymax)this._lineTo(e.x,e.y,!1);else{const i=[];if((t.xthis.xmin||t.x>this.xmin&&e.x=this.ymax?d=!0:i.push(new o(l,this.xmin,p))),(t.xthis.xmax||t.x>this.xmax&&e.x=this.ymax?d=!0:i.push(new o(l,this.xmax,p))),(t.ythis.ymin||t.y>this.ymin&&e.y=this.xmax?u=!0:i.push(new o(l,f,this.ymin))),(t.ythis.ymax||t.y>this.ymax&&e.y=this.xmax?u=!0:i.push(new o(l,f,this.ymax))),0===i.length)u?d?this._lineTo(this.xmax,this.ymax,!0):this._lineTo(this.xmax,this.ymin,!0):d?this._lineTo(this.xmin,this.ymax,!0):this._lineTo(this.xmin,this.ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this.start=this._dist+r*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this.start=this._dist+r*i[0].ratio;for(let t=0;t2){const t=this._firstPt,e=this._prevPt;t.x===e.x&&t.y===e.y||this.lineTo(t.x,t.y);const i=this.line;let s=i.length;for(;s>=4&&(i[0].x===i[1].x&&i[0].x===i[s-2].x||i[0].y===i[1].y&&i[0].y===i[s-2].y);)i.pop(),i[0].x=i[s-2].x,i[0].y=i[s-2].y,--s}}result(t=!0){return this._pushLine(),0===this.lines.length?null:(this.type===n["a"].Polygon&&t&&l.simplify(this.tileSize,this.margin*this.finalRatio,this.lines),this.lines)}resultWithStarts(){if(this.type!==n["a"].LineString)throw new Error("Only valid for lines");this._pushLine();const t=this.lines,e=t.length;if(0===e)return null;const i=[];for(let s=0;s=this.xmin&&t<=this.xmax&&e>=this.ymin&&e<=this.ymax}_intersect(t,e){let i,s,r;if(e.x>=this.xmin&&e.x<=this.xmax)s=e.y<=this.ymin?this.ymin:this.ymax,r=(s-t.y)/(e.y-t.y),i=t.x+r*(e.x-t.x);else if(e.y>=this.ymin&&e.y<=this.ymax)i=e.x<=this.xmin?this.xmin:this.xmax,r=(i-t.x)/(e.x-t.x),s=t.y+r*(e.y-t.y);else{s=e.y<=this.ymin?this.ymin:this.ymax,i=e.x<=this.xmin?this.xmin:this.xmax;const n=(i-t.x)/(e.x-t.x),a=(s-t.y)/(e.y-t.y);n0&&(this.lines.push(this.line),this.starts.push(this.start)):this.type===n["a"].LineString?this.line.length>1&&(this.lines.push(this.line),this.starts.push(this.start)):this.type===n["a"].Polygon&&this.line.length>3&&(this.lines.push(this.line),this.starts.push(this.start))),this.line=[],this.start=0}_moveTo(t,e,i){this.type!==n["a"].Polygon?i&&(t=Math.round((t-(this.xmin+this.margin))*this.finalRatio),e=Math.round((e-(this.ymin+this.margin))*this.finalRatio),this.line.push(new n["b"](t,e))):(i||(tthis.xmax&&(t=this.xmax),ethis.ymax&&(e=this.ymax)),t=Math.round((t-(this.xmin+this.margin))*this.finalRatio),e=Math.round((e-(this.ymin+this.margin))*this.finalRatio),this.line.push(new n["b"](t,e)),this._is_h=!1,this._is_v=!1)}_lineTo(t,e,i){let s,r;if(this.type!==n["a"].Polygon)if(i){if(t=Math.round((t-(this.xmin+this.margin))*this.finalRatio),e=Math.round((e-(this.ymin+this.margin))*this.finalRatio),this.line.length>0&&(s=this.line[this.line.length-1],s.equals(t,e)))return;this.line.push(new n["b"](t,e))}else this.line&&this.line.length>0&&this._pushLine();else if(i||(tthis.xmax&&(t=this.xmax),ethis.ymax&&(e=this.ymax)),t=Math.round((t-(this.xmin+this.margin))*this.finalRatio),e=Math.round((e-(this.ymin+this.margin))*this.finalRatio),this.line&&this.line.length>0){s=this.line[this.line.length-1];const i=s.x===t,a=s.y===e;if(i&&a)return;this._is_h&&i||this._is_v&&a?(s.x=t,s.y=e,r=this.line[this.line.length-2],r.x===t&&r.y===e?(this.line.pop(),this.line.length<=1?(this._is_h=!1,this._is_v=!1):(r=this.line[this.line.length-2],this._is_h=r.x===t,this._is_v=r.y===e)):(this._is_h=r.x===t,this._is_v=r.y===e)):(this.line.push(new n["b"](t,e)),this._is_h=i,this._is_v=a)}else this.line.push(new n["b"](t,e))}}class h{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this.lines=[],this.line=null}moveTo(t,e){this.line&&this.lines.push(this.line),this.line=[];const i=this._ratio;this.line.push(new n["b"](t*i,e*i))}lineTo(t,e){const i=this._ratio;this.line.push(new n["b"](t*i,e*i))}close(){const t=this.line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this.line&&this.lines.push(this.line),0===this.lines.length?null:this.lines}}!function(t){t[t.sideLeft=0]="sideLeft",t[t.sideRight=1]="sideRight",t[t.sideTop=2]="sideTop",t[t.sideBottom=3]="sideBottom"}(s||(s={}));class l{static simplify(t,e,i){if(!i)return;const r=-e,n=t+e,a=-e,o=t+e,c=[],h=[],u=i.length;for(let l=0;le.y?(c.push(l),c.push(i),c.push(s.sideLeft),c.push(-1)):(h.push(l),h.push(i),h.push(s.sideLeft),h.push(-1))),u.x>=n&&(u.y=o&&(u.x>e.x?(c.push(l),c.push(i),c.push(s.sideBottom),c.push(-1)):(h.push(l),h.push(i),h.push(s.sideBottom),h.push(-1)))),u=e}if(0===c.length||0===h.length)return;l.fillParent(i,h,c),l.fillParent(i,c,h);const d=[];l.calcDeltas(d,h,c),l.calcDeltas(d,c,h),l.addDeltas(d,i)}static fillParent(t,e,i){const r=i.length,n=e.length;for(let o=0;o1&&s[n-2]===r?0:(s.push(r),l.calcDelta(r,i,e,s)+1)}static addDeltas(t,e){const i=t.length;let r=0;for(let s=0;sr&&(r=e)}for(let n=0;n=this._buffer.length){const e=this._roundToNearest((this._array.byteLength+t*this._buffer.BYTES_PER_ELEMENT)*s,this._buffer.BYTES_PER_ELEMENT),i=new ArrayBuffer(e),r=new this._ctor(i);r.set(this._buffer,0),this._array=i,this._buffer=r,this._i16View=new Int16Array(this._array)}}ensureSize(t){this._ensureSize(t)}writeF32(t){this._ensureSize(1);const e=this._pos;return new Float32Array(this._array,4*this._pos,1)[0]=t,this._pos++,e}push(t){this._ensureSize(1);const e=this._pos;return this._buffer[this._pos++]=t,e}writeFixed(t){this._buffer[this._pos++]=t}setValue(t,e){this._buffer[t]=e}i1616Add(t,e,i){this._i16View[2*t]+=e,this._i16View[2*t+1]+=i}getValue(t){return this._buffer[t]}incr(t){if(this._buffer.length!e.has(t.objectId))}append(t){for(const e of t)this._features.push(e)}getSize(){return this._features.length}getCursor(){return this.copy()}getQuantizationTransform(){return this._transform}getAttributeHash(){let t="";for(const e in this._current.attributes)t+=this._current.attributes[e];return t}getIndex(){return this._featureIndex}setIndex(t){this._featureIndex=t}getObjectId(){return this._current.objectId}getDisplayId(){return this._current.displayId}setDisplayId(t){this._current.displayId=t}getGroupId(){return this._current.groupId}setGroupId(t){this._current.groupId=t}copy(){const t=new c(this.instance,this._features,this.fullSchema());return this.copyInto(t),t}next(){for(;++this._featureIndext.toLowerCase()).includes(t.toLowerCase())}getFieldNames(){return Object.keys(this._current.attributes)}_readAttribute(t,e){const i=this._current.attributes[t];if(void 0!==i)return null!=i&&e&&this._dateFields.has(t)?new Date(i):i;const s=this.readAttributes(),r=t.toLocaleLowerCase().trim();for(const n in s)if(n.toLocaleLowerCase().trim()===r){const t=this._current.attributes[n];return null!=t&&e&&this._dateFields.has(n)?new Date(t):t}}copyInto(t){super.copyInto(t),t._featureIndex=this._featureIndex,t._transform=this._transform,t._dateFields=this._dateFields}_readAttributes(){return this._current.attributes}}},"44d1":function(t,e,i){"use strict";i.d(e,"a",(function(){return f}));var s=i("b2b2"),r=i("a915"),n=i("6655"),a=i("e416"),o=i("8c81"),c=i("c84e"),h=i("d114"),l=i("18c6"),u=i("1b4a");const d=8,f=t=>class extends t{constructor(...t){super(...t),this._isCIM=!1,this._vertexBoundsScale=1,this.geometryType=c["d"].TEXT,this._aux=Object(h["b"])(0,0,this._referenceSize,this._bitset)}bindTextInfo(t,e){t&&t.length?this._shapingInfo=Object(s["b"])(t,t=>Object(u["a"])(t,e,{scale:this._scale,angle:this._angle,xOffset:this._xOffset,yOffset:this._yOffset,hAlign:this._xAlignD,vAlign:this._yAlignD,maxLineWidth:Math.max(32,Math.min(this._lineWidth,512)),lineHeight:o["u"]*Math.max(.25,Math.min(this._lineHeight,4)),decoration:this._decoration,isCIM:this._isCIM})):this._shapingInfo=null}_write(t,e,i,s){const r=e.getDisplayId();this._writeGeometry(t,e,r,i,s)}_writeGeometry(t,e,i,r,a){const o=this._shapingInfo;if(Object(s["j"])(o))return;if(Object(s["k"])(this._textPlacement)){const s=null!=a?a:e.readLegacyGeometryForDisplay();return this._writePlacedText(t,i,s,o,r)}const c=a?Object(n["q"])(Object(n["d"])(a),2):"esriGeometryPolygon"===e.geometryType?e.readCentroid():e.readGeometryForDisplay();if(!Object(s["j"])(c)){if(c.isPoint){const[e,s]=c.coords;if(!t.hasAggregates&&t.hasPixelBufferEnabled&&(e<0||e>=512||s<0||s>=512))return;return this._writeGlyphs(t,i,{x:e,y:s},o)}c.forEachVertex((e,s)=>this._writeGlyphs(t,i,{x:e,y:s},o))}}_writePlacedText(t,e,i,n,o){const c=Object(s["t"])(this._textPlacement),h=a["a"].getPlacement(i,c,Object(r["g"])(1),o.geometryEngine);if(!h)return;let l=h.next();for(;null!=l;){const i=-l.getAngle();n.setRotation(i);const s=l.tx,r=-l.ty;s<0||s>=512||r<0||r>=512||(this._writeGlyphs(t,e,{x:s,y:r},n),n.setRotation(-i)),l=h.next()}}_writeGlyphs(t,e,i,s){const r=l["e"].load(this._materialKey),n=Object(h["a"])(Math.round(d*i.x),Math.round(d*i.y)),a=this._vertexBoundsScale,o=s.bounds,c=2*Math.max(o.width,o.height);for(const h of s.glyphs)r.textureBinding=h.textureBinding,t.recordStart(e,r.data,this.geometryType,!0),t.vertexBounds(i.x+o.x+this._xOffset,i.y+o.y-this._yOffset,c*a,c*a),this._writeVertices(t,e,n,h),t.recordEnd()}_writeGlyph(t,e,i,s,r){const n=l["e"].load(this._materialKey),a=Object(h["a"])(Math.round(d*i),Math.round(d*s));n.textureBinding=r.textureBinding,t.recordStart(e,n.data,this.geometryType,!0);const o=r.bounds,c=this._vertexBoundsScale;t.vertexBounds(i+o.x*c,s+o.y*c,o.width*c,o.height*c),this._writeVertices(t,e,a,r),t.recordEnd()}_writeVertices(t,e,i,s){const r=t.vertexCount();this._writeVertexCommon(t,e,i,s),t.vertexWrite(s.offsets.upperLeft),t.vertexWrite(s.texcoords.upperLeft),t.vertexEnd(),this._writeVertexCommon(t,e,i,s),t.vertexWrite(s.offsets.upperRight),t.vertexWrite(s.texcoords.upperRight),t.vertexEnd(),this._writeVertexCommon(t,e,i,s),t.vertexWrite(s.offsets.lowerLeft),t.vertexWrite(s.texcoords.lowerLeft),t.vertexEnd(),this._writeVertexCommon(t,e,i,s),t.vertexWrite(s.offsets.lowerRight),t.vertexWrite(s.texcoords.lowerRight),t.vertexEnd(),t.indexWrite(r+0),t.indexWrite(r+1),t.indexWrite(r+2),t.indexWrite(r+1),t.indexWrite(r+3),t.indexWrite(r+2)}_writeVertexCommon(t,e,i,s){const r=this._color,n=this._haloColor,a=Object(h["b"])(0,0,this._referenceSize,this._bitset),o=Object(h["b"])(0,0,this._size,this._haloSize);t.vertexWrite(i),t.vertexWrite(e),t.vertexWrite(r),t.vertexWrite(n),t.vertexWrite(o),t.vertexWrite(a),t.vertexWrite(this._minMaxZoom)}}},"4b0b":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var s=i("175e");class r{constructor(){this._freeIds=[],this._idCounter=1}createId(t=!1){return Object(s["d"])(this._getFreeId(),t)}releaseId(t){this._freeIds.push(t)}_getFreeId(){return this._freeIds.length?this._freeIds.pop():this._idCounter++}}var n=i("7de1");function a(t,e,i){if(!(t.length>e))for(;t.length<=e;)t.push(i)}class o{constructor(){this._numerics=[],this._strings=[],this._idGenerator=new r,this._allocatedSize=256,this._bitsets=[],this._instanceIds=[],this._bounds=[]}createBitset(){const t=this._bitsets.length;return this._bitsets.push(n["a"].create(this._allocatedSize,s["a"])),t+1}getBitset(t){return this._bitsets[t-1]}_expand(){this._allocatedSize<<=1;for(const t of this._bitsets)t.resize(this._allocatedSize)}_ensureNumeric(t,e){this._numerics[t]||(this._numerics[t]=[]),a(this._numerics[t],e,0)}_ensureInstanceId(t){a(this._instanceIds,t,0)}_ensureString(t,e){this._strings[t]||(this._strings[t]=[]),a(this._strings[t],e,null)}createDisplayId(t=!1){const e=this._idGenerator.createId();return e>this._allocatedSize&&this._expand(),Object(s["d"])(e,t)}releaseDisplayId(t){for(const e of this._bitsets)e.unset(t);return this._idGenerator.releaseId(t&s["a"])}getComputedNumeric(t,e){return this.getComputedNumericAtIndex(t&s["a"],0)}setComputedNumeric(t,e,i){return this.setComputedNumericAtIndex(t&s["a"],i,0)}getComputedString(t,e){return this.getComputedStringAtIndex(t&s["a"],0)}setComputedString(t,e,i){return this.setComputedStringAtIndex(t&s["a"],0,i)}getComputedNumericAtIndex(t,e){const i=t&s["a"];return this._ensureNumeric(e,i),this._numerics[e][i]}setComputedNumericAtIndex(t,e,i){const r=t&s["a"];this._ensureNumeric(e,r),this._numerics[e][r]=i}getInstanceId(t){const e=t&s["a"];return this._ensureInstanceId(e),this._instanceIds[e]}setInstanceId(t,e){const i=t&s["a"];this._ensureInstanceId(i),this._instanceIds[i]=e}getComputedStringAtIndex(t,e){const i=t&s["a"];return this._ensureString(e,i),this._strings[e][i]}setComputedStringAtIndex(t,e,i){const r=t&s["a"];this._ensureString(e,r),this._strings[e][r]=i}getXMin(t){return this._bounds[4*(t&s["a"])]}getYMin(t){return this._bounds[4*(t&s["a"])+1]}getXMax(t){return this._bounds[4*(t&s["a"])+2]}getYMax(t){return this._bounds[4*(t&s["a"])+3]}setBounds(t,e){const i=e.readHydratedGeometry();if(!i||!i.coords.length)return!1;let r=1/0,n=1/0,o=-1/0,c=-1/0;i.forEachVertex((t,e)=>{r=Math.min(r,t),n=Math.min(n,e),o=Math.max(o,t),c=Math.max(c,e)});const h=t&s["a"];return a(this._bounds,4*h+4,0),this._bounds[4*h]=r,this._bounds[4*h+1]=n,this._bounds[4*h+2]=o,this._bounds[4*h+3]=c,!0}}},"561f":function(t,e,i){"use strict";i.d(e,"a",(function(){return le}));var s=i("a4ee"),r=i("fc29"),n=i("f57e"),a=i("9096"),o=i("c120"),c=i("b2b2"),h=i("f4cc"),l=i("59b2"),u=(i("b50f"),i("cea0"),i("d386")),d=i("5996"),f=i("9180"),p=i("32ed"),m=i("a9ab"),_=i("28b1"),y=i("f547"),x=i("f70f"),g=i("7f83");function b(t){if(!t)return null;let e=null;const i=t.spatialReference,s=Object(g["e"])(i);if(!s)return"toJSON"in t?t.toJSON():t;const r=Object(g["p"])(i)?102100:4326,n=x["a"][r].maxX,a=x["a"][r].minX,o=x["a"][r].plus180Line,c=x["a"][r].minus180Line;let h;const l="toJSON"in t?t.toJSON():t;if(Object(m["f"])(l))h=w(l,n,a);else if(Object(m["e"])(l))l.points=l.points.map(t=>w(t,n,a)),h=l;else if(Object(m["d"])(l))h=O(l,s);else if(Object(m["g"])(l)||Object(m["h"])(l)){const t=I;Object(_["a"])(t,l);const i={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},s=Object(x["d"])(i.xmin,a)*(2*n),r=0===s?l:v(l,s);i.xmin+=s,i.xmax+=s,Object(y["b"])(i,o)&&i.xmax!==n||Object(y["b"])(i,c)&&i.xmin!==a?e=r:h=r}else h=l;return null!==e?(new R).cut(e,n):h}function v(t,e){const i=Object(x["b"])(t);for(const s of i)for(const t of s)t[0]+=e;return t}function O(t,e){if(!e)return t;const i=j(t,e).map(t=>t.extent);return i.length<2?i[0]||t:i.length>2?(t.xmin=e.valid[0],t.xmax=e.valid[1],t):{rings:i.map(t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]])}}function w(t,e,i){if(Array.isArray(t)){const s=t[0];if(s>e){const i=Object(x["d"])(s,e);t[0]=s+i*(-2*e)}else if(se){const i=Object(x["d"])(s,e);t.x+=i*(-2*e)}else if(s0;if(n>2*l){const t={xmin:af||m?i.push({extent:{xmin:u,ymin:s,xmax:l,ymax:r},frameIds:[d]},{extent:{xmin:h,ymin:s,xmax:f,ymax:r},frameIds:[p]}):i.push({extent:{xmin:u,ymin:s,xmax:f,ymax:r},frameIds:[d]});return i}function M(t,e){const[i,s]=e.valid,r=2*s;let n,a=0;return t>s?(n=Math.ceil(Math.abs(t-s)/r),t-=n*r,a=n):t=t.xmin&&e<=t.xmax&&i>=t.ymin&&i<=t.ymax}class R{cut(t,e){let i;if(t.rings)this.closed=!0,i=t.rings,this.minPts=4;else{if(!t.paths)return null;this.closed=!1,i=t.paths,this.minPts=2}const s=i.length,r=-2*e;for(let n=0;n=this.minPts){const e=[];for(const i of t)e.push([i[0]+r,i[1]]);i.push(e)}}return this.closed?t.rings=i:t.paths=i,t}}const I=Object(f["l"])();var D=i("1ec3"),C=i("793f"),P=i("a6c1"),E=i("8c81");const z=-1;class A{constructor(){this._dirties=[{vertexFrom:z,vertexCount:z,indexFrom:z,indexCount:z,allDirty:!1},{vertexFrom:z,vertexCount:z,indexFrom:z,indexCount:z,allDirty:!1},{vertexFrom:z,vertexCount:z,indexFrom:z,indexCount:z,allDirty:!1},{vertexFrom:z,vertexCount:z,indexFrom:z,indexCount:z,allDirty:!1},{vertexFrom:z,vertexCount:z,indexFrom:z,indexCount:z,allDirty:!1}]}hasDirty(){return this._dirties.some(t=>t.indexCount!==z||t.allDirty)}markAllClean(){for(const t of this._dirties)t.indexFrom=z,t.indexCount=z,t.vertexFrom=z,t.vertexCount=z,t.allDirty=!1}markAllDirty(){for(const t of this._dirties)t.allDirty=!0}forEach(t){for(let e=0;e0)&&(o.geometry={count:r,from:n,allDirty:a},h=!0),(a||s!==z&&i>0)&&(c={count:i,from:s,allDirty:a},h=!0),h&&t({indices:c,vertices:o},e)}}markDirtyIndices(t,e,i){const s=this._dirties[t],r=e,n=i;if(!s.allDirty)if(s.indexCount!==z){const t=Math.min(s.indexFrom,r),e=Math.max(s.indexFrom+s.indexCount,r+n)-t;s.indexFrom=t,s.indexCount=e}else s.indexFrom=r,s.indexCount=n}markDirtyVertices(t,e,i,s){const r=this._dirties[t],n=i,a=s;if(!r.allDirty)if(r.vertexCount!==z){const t=Math.min(r.vertexFrom,n),e=Math.max(r.vertexFrom+r.vertexCount,n+a)-t;r.vertexFrom=t,r.vertexCount=e}else r.vertexFrom=n,r.vertexCount=a}}class k{constructor(t){this._largestRange=null,this._parent=t,this._updateLargestRange()}get largestRange(){return this._largestRange}rangeCreated(t){(!this._largestRange||t.count>this._largestRange.count)&&(this._largestRange=t)}rangeResized(t,e){t===this._largestRange?t.countthis._largestRange.count)&&(this._largestRange=t)}findBestRange(t){let e=this._parent._freeHead,i=null;for(;null!==e;)e.count>=t&&(!i||e.count-t=a&&t+e<=o?(i=!1,s=!0):null!==n?(r=n,n=n.next):i=!1}return[r,n]}_updateLargestRange(){let t=null,e=this._parent._freeHead;for(;null!==e;)(!t||e.count>t.count)&&(t=e),e=e.next;this._largestRange=t}}class L{constructor(t,e){this._allocated=0,this._size=t,this._freeHead=t>0?{from:0,count:t,prev:null,next:null}:null,this._bookKeeper=e||new k(this),this._freeHead&&this._bookKeeper.rangeCreated(this._freeHead)}allocate(t){const e=this._bookKeeper.findBestRange(t);if(null===e)return-1;const i=e.from,s=e.count;if(e.from+=t,e.count-=t,this._bookKeeper.rangeResized(e,i,s),this._allocated+=t,0===e.count){const t=null!==e.prev?this._freeHead:e.next;L._removeRange(e),this._freeHead=t}return i}free(t,e){const[i,s]=this._bookKeeper.findAdjacentRanges(t,e),r={from:t,count:e,prev:i,next:s};if(null!==i&&(i.next=r),null!==s&&(s.prev=r),this._bookKeeper.rangeCreated(r),this._allocated-=e,null!==s&&r.from+r.count===s.from){const t=r.from,e=r.count;L._fuse(r,s),L._removeRange(s),this._bookKeeper.rangeResized(r,t,e),this._bookKeeper.rangeResized(s,void 0,0)}if(null!==i&&i.from+i.count===r.from){const t=i.from,e=i.count;L._fuse(i,r),L._removeRange(r),this._bookKeeper.rangeResized(i,t,e),this._bookKeeper.rangeResized(r,void 0,0)}this._freeHead=null!==r.prev?this._freeHead:r}get fragmentation(){const t=this._size-this._allocated;return 0===t?0:1-this._bookKeeper.largestRange.count/t}static _removeRange(t){null!==t.prev?null!==t.next?(t.prev.next=t.next,t.next.prev=t.prev):t.prev.next=null:null!==t.next&&(t.next.prev=null)}static _fuse(t,e){t.count+=e.count,t.next=e.next,e.from+=e.count,e.count=0,null!==e.next&&(e.next.prev=t)}}var F=i("c8dd");const B=["FILL","LINE","MARKER","TEXT","LABEL"];function V(t){const e=t.getStrides(),i={};for(let s=0;st.vertexCount?(this._freeVertices(n,t.vertexFrom,t.vertexCount),o=e.vertexCount,a=this._allocateVertices(n,o)):e.vertexCount===t.vertexCount?(a=t.vertexFrom,o=t.vertexCount):(this._freeVertices(n,t.vertexFrom+e.vertexCount,t.vertexCount-e.vertexCount),a=t.vertexFrom,o=e.vertexCount);let c,h,l,u=!0;if(void 0===t.indexFrom?(c=r,l=e.indexCount,h=this._allocateIndices(n,l)):e.indexCount>t.indexCount?(c=this._displayList.removeFromList(t),this._freeIndices(n,t.indexFrom,t.indexCount),l=e.indexCount,h=this._allocateIndices(n,l)):e.indexCount===t.indexCount?(u=!1,h=t.indexFrom,l=t.indexCount):(c=this._displayList.removeFromList(t),this._freeIndices(n,t.indexFrom+e.indexCount,t.indexCount-e.indexCount),h=t.indexFrom,l=e.indexCount),-1!==a&&-1!==h){const r=this._storageFor(n);if(Object(F["e"])(a,h,r.vertexBuffers,r.indexBuffer,e,i,s),t.vertexFrom=a,t.indexFrom=h,t.vertexCount=e.vertexCount,t.indexCount=e.indexCount,this._dirtyMap){this._dirtyMap.markDirtyIndices(t.geometryType,t.indexFrom,t.indexCount);for(const e in i)this._dirtyMap.markDirtyVertices(t.geometryType,e,t.vertexFrom,t.vertexCount)}return u&&this._displayList.addToList(t,c),!0}return-1!==a&&this._freeVertices(n,a,o),-1!==h&&this._freeIndices(n,h,l),t.setMeshDataFromBuffers(e,i,s),t.vertexFrom=void 0,t.vertexCount=0,t.indexFrom=void 0,t.indexCount=0,!1}tryAddMeshData(t,e){const i=e.vertexBuffer,s=e.indexBuffer,r=B[t.geometryType],n=this._allocateVertices(r,t.vertexCount);if(-1===n)return this._freeVertices(r,n,t.vertexCount),!1;const a=this._allocateIndices(r,t.indexCount);if(-1===a)return this._freeVertices(r,n,t.vertexCount),this._freeIndices(r,a,t.indexCount),!1;const o=this._storageFor(r);if(Object(F["e"])(n,a,o.vertexBuffers,o.indexBuffer,t,i,s),t.vertexFrom=n,t.indexFrom=a,this._dirtyMap){this._dirtyMap.markDirtyIndices(t.geometryType,t.indexFrom,t.indexCount);for(const e in i)this._dirtyMap.markDirtyVertices(t.geometryType,e,n,t.vertexCount)}return this._displayList.addToList(t),!0}_allocateVertices(t,e){const i=this._storageFor(t),s=i.vtxFreeList.allocate(e);return-1===s||i.vtxFreeList.fragmentation>N?-1:s}_freeVertices(t,e,i){this._storageFor(t).vtxFreeList.free(e,i)}_freeIndices(t,e,i){this._storageFor(t).idxFreeList.free(e,i)}_allocateIndices(t,e){const i=this._storageFor(t),s=i.idxFreeList.allocate(e);return-1===s||i.idxFreeList.fragmentation>N?-1:s}_storageFor(t){return this._freeListsAndStorage[t]}_stridesFor(t,e){return this._strides[t][e]}}var U=i("7ce4"),W=i("d17d"),q=i("0fa6");class K{constructor(t){this.geometryMap=Object(F["f"])(()=>({indexBuffer:U["a"].createIndex(t,W["D"].STATIC_DRAW),vao:null}),(e,i)=>({vertexBuffer:U["a"].createVertex(t,F["a"][i])}))}dispose(){for(let t=0;t<5;t++){const e=this.geometryMap[t];if(e){e.data.vao&&e.data.vao.dispose(!1),e.data.indexBuffer&&e.data.indexBuffer.dispose();for(const t in e.buffers)e.buffers[t]&&e.buffers[t].data.vertexBuffer.dispose()}}}get(t){const e=this.geometryMap[t];return{getVAO(t,i,s){if(!e.data.vao){const r={};for(const t in e.buffers)r[t]=e.buffers[t].data.vertexBuffer;e.data.vao=new q["a"](t,s,i,r,e.data.indexBuffer)}return e.data.vao}}}has(t){return null!=this.geometryMap[t]}upload(t,e){e.forEach((e,i)=>{this._upload(e,i,t)})}_upload(t,e,i){if(t.indices&&(t.indices.allDirty?this._uploadIndices(i,e):null!=t.indices.from&&null!=t.indices.count&&this._uploadIndices(i,e,t.indices.from,t.indices.count)),t.vertices){const s=t.vertices;for(const t in s){const r=s[t];r.allDirty?this._uploadVertices(i,e,t):null!=r.from&&null!=r.count&&this._uploadVertices(i,e,t,r.from,r.count)}}}_uploadVertices(t,e,i,s,r){const n=this.geometryMap[e];if(!n)return;const a=t.geometries[e].vertexBuffer[i];if(!a)return;const o=a.stride,c=a.data.buffer;n.buffers[i]&&c.byteLength>0&&(null!=s&&null!=r?n.buffers[i].data.vertexBuffer.setSubData(c,s*o,s*o,(s+r)*o):n.buffers[i].data.vertexBuffer.setData(c))}_uploadIndices(t,e,i,s){const r=this.geometryMap[e];if(!r)return;const n=4,a=t.geometries[e].indexBuffer.buffer;r.data.indexBuffer&&a.byteLength>0&&(null!=i&&null!=s?r.data.indexBuffer.setSubData(a,i*n,i*n,(i+s)*n):r.data.indexBuffer.setData(a))}}var Z=i("2855");class H extends Z["a"]{constructor(){super(...arguments),this._data=null,this._displayList=null,this._lastCommitTime=0,this._hasData=!1,this._invalidated=!1,this._wglBuffers=null,this._dirtyMap=new A}destroy(){super.destroy(),this.clear()}get hasData(){return!!this._hasData}get displayObjects(){var t;return null!=(t=this._displayObjects)?t:[]}getGeometry(t){return this._wglBuffers&&this._wglBuffers.has(t)?this._wglBuffers.get(t):null}getDisplayList(){return this._displayList}patch(t){if(!0===t.clear)return this.clear(),void(this._hasData=!1);const e=t.addOrUpdate,i=t.remove;!this._data&&e&&e.tileDisplayData.displayObjects.length?(e.tileDisplayData.computeDisplayList(),this._dirtyMap=new A,this._dispRecStore=G.fromTileData(e,this._dirtyMap),this._data=e,this._dirtyMap.markAllDirty(),this._hasData=!0,t.end&&this.ready()):this._data&&(e&&e.tileDisplayData.displayObjects.length||i.length)?this._doPatchData(t):t.end&&this.ready(),t.end&&!this._data&&this.clear(),this.requestRender(),this.emit("change")}commit(t){t.time&&t.time===this._lastCommitTime||(this._lastCommitTime=t.time,this.visible&&this._data&&(this._wglBuffers||(this._wglBuffers=new K(t.context)),(this._dirtyMap.hasDirty()||this._invalidated)&&(this._invalidated=!1,this._wglBuffers.upload(this._data.tileBufferData,this._dirtyMap),this._displayList=this._data.tileDisplayData.displayList.clone(),this._displayObjects=this._data.tileDisplayData.displayObjects.slice(),this._dirtyMap.markAllClean())))}clear(){this._data=null,this._displayList=null,this._dispRecStore=null,this._wglBuffers&&(this._wglBuffers.dispose(),this._wglBuffers=null)}_doPatchData(t){this._invalidated=!0,this._patchData(t)||(this._dirtyMap.markAllDirty(),this._data.reshuffle(),this._dispRecStore=G.fromTileData(this._data,this._dirtyMap)),this.requestRender()}_patchData(t){let e=!0;const i=t.addOrUpdate&&t.addOrUpdate.tileDisplayData&&t.addOrUpdate.tileDisplayData.displayObjects||[],s=(t.remove||[]).slice();for(const r of i)null!=r.insertAfter&&s.push(r.id);for(const r of s){const t=this._data.tileDisplayData.displayObjectRegistry.get(r);if(t){this._data.tileDisplayData.displayList.removeFromList(t.displayRecords);for(const i of t.displayRecords)this._dispRecStore.delete(i);this._data.tileDisplayData.displayObjectRegistry.delete(r);const e=this._data.tileDisplayData.displayObjects.indexOf(t);this._data.tileDisplayData.displayObjects.splice(e,1)}}for(const r of i){let i,s=this._data.tileDisplayData.displayObjectRegistry.get(r.id);if(s){const t=s.displayRecords;s.set(r),s.displayRecords=t;const e=s.displayRecords.length;for(let i=0;i=r.displayRecords.length||t.geometryType!==e.geometryType||t.symbolLevel!==e.symbolLevel||t.zOrder!==e.zOrder||t.materialKey!==e.materialKey)&&(this._dispRecStore.delete(s.displayRecords[i]),i=0){const i=this._data.tileDisplayData.displayObjectRegistry.get(s.insertAfter);i?(t=e.indexOf(i)+1,t0?1:0;let n=0;for(let r=t-1;r>=0&&n=0&&ni.indexFrom&&s<=i.indexFrom+i.indexCount){if(s=0&&ne.indexFrom&&t.indexFromt.clone()),t.line=this.line&&this.line.map(t=>t.clone()),t.marker=this.marker&&this.marker.map(t=>t.clone()),t.text=this.text&&this.text.map(t=>t.clone()),t.label=this.label&&this.label.map(t=>t.clone()),t.unified=this.unified&&this.unified.map(t=>t.clone()),t}}class rt{constructor(){this.geometryDPInfo=new st}clone(){const t=new rt;return t.zLevel=this.zLevel,t.geometryDPInfo=this.geometryDPInfo.clone(),t}}class nt{constructor(){this.zLevels=[]}clone(){const t=new nt;t.symbolLevel=this.symbolLevel;for(const e of this.zLevels)t.zLevels.push(e.clone());return t}}class at{constructor(){this.vertexData=new Map,this.vertexCount=0,this.indexData=[]}clear(){this.vertexData.clear(),this.vertexCount=0,this.indexData=[]}update(t,e,i){for(const s in t)this.vertexData.set(s,t[s]);for(const s in this.vertexData)null===t[s]&&this.vertexData.delete(s);this.vertexCount=e,this.indexData=i}}class ot{constructor(t,e,i,s=0,r=0){this.id=t,this.geometryType=e,this.materialKey=i,this.minZoom=s,this.maxZoom=r,this.meshData=null,this.symbolLevel=0,this.zOrder=0,this.vertexFrom=0,this.vertexCount=0,this.indexFrom=0,this.indexCount=0}get sortKey(){return void 0===this._sortKey&&this._computeSortKey(),this._sortKey}clone(){return this.copy()}copy(){const t=new ot(this.id,this.geometryType,this.materialKey);return t.vertexFrom=this.vertexFrom,t.vertexCount=this.vertexCount,t.indexFrom=this.indexFrom,t.indexCount=this.indexCount,t.zOrder=this.zOrder,t.symbolLevel=this.symbolLevel,t.meshData=this.meshData,t.minZoom=this.minZoom,t.maxZoom=this.maxZoom,t}setMeshDataFromBuffers(t,e,i){const s=new at;for(const r in e){const i=e[r].stride,n=e[r].data,a=[],o=Object(F["A"])(i);for(let e=0;et.clone()),t.insertAfter=this.insertAfter,t}set(t){this.id=t.id,this.displayRecords=t.displayRecords,this.insertAfter=t.insertAfter}serialize(t){return t.push(this.id),ct(t,this.displayRecords),t}static deserialize(t){const e=t.readInt32(),i=new lt(e),s={id:e};return i.displayRecords=ht(t,ot,s),i}}function ut(t){const e=[[],[],[],[],[]],i=t;for(const s of i)for(const t of s.displayRecords)e[t.geometryType].push(t);return e}class dt{constructor(){}get displayObjectRegistry(){if(!this._displayObjectRegistry){this._displayObjectRegistry=new Map;for(const t of this.displayObjects)this._displayObjectRegistry.set(t.id,t)}return this._displayObjectRegistry}get displayList(){return this._displayList}computeDisplayList(){this._displayList=new et;for(const t of this.displayObjects)for(const e of t.displayRecords)this._displayList.addToList(e)}clone(){const t=new dt;return this.displayObjects&&(t.displayObjects=this.displayObjects.map(t=>t.clone())),t}serialize(t){return ct(t,this.displayObjects),t}_deserializeObjects(t){const e=t.readInt32(),i=new Array(e),s=new Map;for(let r=0;r{const r=t.data[e];if(Object(c["k"])(r)){const t=ft["a"].from(r.records).getCursor();for(;t.next();){const i=t.id,r=t.materialKey,n=t.indexFrom,a=t.indexCount,o=t.vertexFrom,c=t.vertexCount,h=s.get(i),l=new ot(i,e,r);l.indexFrom=n,l.indexCount=a,l.vertexFrom=o,l.vertexCount=c,h.displayRecords.push(l)}i[e]=mt.fromVertexData(r,e)}else i[e]=new xt(e,0,{fill:"default"}).intoBuffers()}),Mt.fromMeshData({displayObjects:e,vertexBuffersMap:i})}static fromMeshData(t){const e=new Mt,i=new dt,s=new J;i.displayObjects=t.displayObjects;for(const r in t.vertexBuffersMap){const e=t.vertexBuffersMap[r];s.geometries[r].indexBuffer=e.indexBuffer,s.geometries[r].vertexBuffer=e.namedBuffers}return e.tileDisplayData=i,e.tileBufferData=s,e}static bind(t,e){const i=new Mt;return i.tileDisplayData=t,i.tileBufferData=e,i}static create(t,e){const i=new Mt;i.tileDisplayData=new dt,i.tileDisplayData.displayObjects=t;const s=[0,0,0,0,0],r=[0,0,0,0,0],n=[[],[],[],[],[]];for(const c of t)for(const t of c.displayRecords)n[t.geometryType].push(t),s[t.geometryType]+=t.meshData.vertexCount,r[t.geometryType]+=t.meshData.indexData.length;const a=new J,o=jt(e);for(let c=0;c!!t.geometry);for(const r of s){const t=Object(m["c"])(r.geometry);Object(Et["e"])(i,[r],t,!1,!1,"uid")}return new kt(e,i)}get geometryType(){const t=this._current;return t?t.geometryType:null}get insertAfter(){return this._current.insertAfter}readGraphic(){return this._current}getCursor(){return this.copy()}copy(){const t=new kt(this.instance,this._features);return this.copyInto(t),t}}var Lt=i("a915"),Ft=i("901f"),Bt=i("a8d5"),Vt=i("5ee9"),Nt=i("57e5"),Gt=i("008c"),Ut=i("8152"),Wt=i("334f");const qt=new Ut["a"],Kt=new Ut["a"],Zt="esriGeometryPolyline";function Ht(t){t.coords.length=0,t.lengths.length=0}class Yt{constructor(){this.bounds=Object(f["l"])(),this.graphic=null}static acquire(t=null,e,i,s,r){let n;return 0===Yt._pool.length?n=new Yt:(n=Yt._pool.pop(),this._set.delete(n)),n.acquire(t,e,i,s,r),n}static release(t){t&&!this._set.has(t)&&(t.release(),this._pool.push(t),this._set.add(t))}static getCentroidQuantized(t,e){if(Object(m["g"])(t.geometry)){const i=t.symbol;if(Object(c["j"])(i))return null;if(Object(Wt["f"])(i.type)||Object(Wt["g"])(i.type)){const i=Object(Nt["b"])(t.geometry);return Object(Gt["b"])(e,{},{x:i[0],y:i[1]},!1,!1)}}return null}acquire(t=null,e,i,s,r){t&&this.set(t,e,i,s,r)}release(){this.graphic=null,this.symbolResource=null,this.geometry=null}get symbol(){return this.symbolResource.symbol}set(t,e,i,s,r){this.graphic=t,this.geometry=i,this.symbolResource=e,this.bounds=s,r&&(this.size=r)}getGeometryQuantized(t,e,i,s){const r=this.geometry;if(Object(m["g"])(r)){const e=r.rings;if(1===e.length&&2===e[0].length)return Object(Gt["a"])(t,{paths:[[e[0][0],e[0][1]]]})}else{if(Object(m["h"])(r))return Ht(qt),Ht(Kt),Object(Et["i"])(qt,r),Object(Et["r"])(Kt,qt,r.hasZ,r.hasM,Zt,t.scale[0]),Object(Et["v"])(qt,Kt,r.hasZ,r.hasM,Zt,t),Object(Et["p"])(qt,r.hasZ,r.hasM);if(Object(m["e"])(r)){const n=.5*s*Math.max(Math.abs(this.size[0])+this.size[2]-this.size[0],Math.abs(this.size[1])+this.size[3]-this.size[1]),[a,o]=Object(x["c"])(i),c=o-a,h=r.points.filter(t=>{if(t[0]+n>o||t[0]-no?i[0]-=c:i[0]+=c,Object(f["j"])(e,t,n)||Object(f["j"])(e,i,n)}return Object(f["j"])(e,t,n)});return 0===h.length?{points:h}:Object(Gt["a"])(t,{points:h})}}return Object(Gt["a"])(t,this.geometry)}}Yt._pool=[],Yt._set=new Set;const Xt={minX:0,minY:0,maxX:0,maxY:0},Jt=Object(f["l"])(),Qt=1e-5;function $t(t,e,i,s,r){return Xt.minX=e,Xt.minY=i,Xt.maxX=s,Xt.maxY=r,t.search(Xt)}function te(t){return{minX:t.bounds[0],minY:t.bounds[1],maxX:t.bounds[2],maxY:t.bounds[3]}}class ee{constructor(t,e,i,s,r,n,a){this._graphics=s,this._onAdd=r,this._onRemove=n,this._hashToCIM=a,this._index=Object(Ft["a"])(9,te),this._itemByGraphic=new Map,this._inflatedSizeHelper=new C["a"],this._tileInfoView=t,this._uidFieldName=i;const o=t.getClosestInfoForScale(e);o&&(this._resolution=this._tileInfoView.getTileResolution(o.level))}setResourceManager(t){this._cimResourceManager=t,this._hittestDrawHelper=new Vt["c"](t)}hitTest(t,e,i,s,r){t=Object(Bt["b"])(t,this._tileInfoView.spatialReference);const n=.5*s*window.devicePixelRatio*i;Jt[0]=t-n,Jt[1]=e-n,Jt[2]=t+n,Jt[3]=e+n;const a=.5*s*(i+Wt["a"]),o=$t(this._index,t-a,e-a,t+a,e+a);if(!o||0===o.length)return[];const c=[],h=Object(f["l"])(),l=Object(f["l"])();for(const p of o){const{geometry:t,symbolResource:e}=p;this._getSymbolBounds(h,e,t,l,r),l[3]=l[2]=l[1]=l[0]=0,Object(f["w"])(h,Jt)&&p.graphic.visible&&c.push(p)}if(0===c.length)return[];const u=this._hittestDrawHelper,d=[];for(const f of c){const{geometry:t,symbolResource:e}=f,{hash:i,textInfo:n}=e,a=this._hashToCIM.get(i);a&&u.hitTest(Jt,a.symbol,t,n,r,s)&&d.push(f)}return d.sort(ie),d.map(t=>t.graphic)}getGraphicsData(t,e,i){const s=this._searchForItems(e);if(0===s.length||0===i.length)return[];s.sort((t,e)=>t.zorder-e.zorder),s[0].insertAfter=-1;for(let l=1;lt.graphic.uid-e.graphic.uid),i.sort((t,e)=>t.uid-e.uid);let r,n=0,a=0;const o=e.resolution,c=[],h={originPosition:"upperLeft",scale:[o,o],translate:[e.bounds[0],e.bounds[3]]};for(const l of i){for(a=-2;nt.zorder-e.zorder),c}queryTileData(t,e){if(0===this._graphics.length)return[];const{bounds:i,resolution:s}=e,r=this._searchForItems(e),n=[];return 0===r.length||this._createTileGraphics(n,t,r,{originPosition:"upperLeft",scale:[s,s],translate:[i[0],i[3]]},e),n}has(t){return this._itemByGraphic.has(t)}getBounds(t){const e=this._itemByGraphic.get(t);return e?e.bounds:null}getAllBounds(){return Array.from(this._itemByGraphic.values()).filter(t=>t.graphic.visible).map(t=>t.bounds)}addOrModify(t,e,i){if(!t||Object(c["j"])(e))return;this.has(t)&&this.remove(t),this._onAdd(t);const s=[0,0,0,0],r=this._getSymbolBounds(null,e,i,s,0),n=Yt.acquire(t,e,i,Object(c["k"])(r)?r:null,s);return this._itemByGraphic.set(t,n),i&&this._index.insert(n),n.bounds}remove(t){if(!this._itemByGraphic.has(t))return;this._onRemove(t);const e=this._itemByGraphic.get(t);e.bounds&&this._index.remove(e),this._itemByGraphic.delete(t)}updateZ(){const t=this._graphics.items;let e,i;for(let s=0;st.zorder-e.zorder);for(let f=0;f{const i=Object(Wt["d"])(t.graphic),s=Object(Wt["d"])(e.graphic);return i===s?e.zorder-t.zorder:i-s};var se=i("f47d"),re=i("040f"),ne=i("b2af"),ae=i("ec58");const oe=Object(o["a"])("esri-2d-graphic-debug");function ce(t,e,i){if(i.has(t))return i.get(t);const s={tile:e,addedOrModified:[],removed:[]};return i.set(t,s),s}let he=class extends(Object(re["a"])(Object(a["b"])(r["a"]))){constructor(t){super(t),this._storage=new Pt["a"],this._displayIds=new Map,this._controller=new AbortController,this._tiles=new Map,this._graphicStoreUpdate=!1,this._graphicsSet=new Set,this._matcher=Promise.resolve(null),this._tileUpdateSet=new Set,this._tilesToUpdate=new Map,this._graphicIdToAbortController=new Map,this._attached=!1,this._updatingGraphicsTimer=null,this._hashToExpandedSymbol=new Map,this._hashToExpandedSymbolPromise=new Map,this._hashToCIMSymbolPromise=new Map,this._hashToCIM=new Map,this._processing=!1,this._needsProcessing=!1,this._pendingUpdate={added:new Set,updated:new Set,removed:new Set},this.lastUpdateId=-1,this.updateRequested=!1,this.graphicUpdateHandler=this.graphicUpdateHandler.bind(this)}destroy(){this._updatingGraphicsTimer&&(clearTimeout(this._updatingGraphicsTimer),this._updatingGraphicsTimer=null,this.notifyChange("updating")),this._controller.abort(),this.container.destroy(),this._set("graphics",null),this._graphicStore.clear(),this._attributeStore=null,this._hashToExpandedSymbol.clear(),this.view=null,this.renderer=null,this._hashToCIM.clear(),this._hashToCIMSymbolPromise.clear(),this._hashToExpandedSymbolPromise.clear()}_createMatcher(t,e,i){if(t){const s=Object(Dt["a"])({indexCount:0,fields:{}},"feature",t);this._matcher=Object(It["a"])(s,e,null,i)}}_createDisplayId(t){return this._displayIds.has(t)||this._displayIds.set(t,this._storage.createDisplayId()),this._displayIds.get(t)}initialize(){this._attributeStore=new Ct["a"]({type:"local",initialize:t=>Promise.resolve(this.container.attributeView.initialize(t)),update:t=>this.container.attributeView.requestUpdate(t),render:()=>this.container.requestRender()},Object(ne["a"])()),this.container.hasHighlight=()=>this._attributeStore.hasHighlight;const t=t=>{this._createDisplayId(t.uid),this._setFilterState(t.uid,t.visible)},e=t=>{const e=this._displayIds.get(t.uid);this._displayIds.delete(t.uid),this._storage.releaseDisplayId(e)},i=new Rt["a"](this.container.getMaterialItems.bind(this.container),this.view.featuresTilingScheme.tileInfo);this._graphicStore=new ee(this.view.featuresTilingScheme,this.view.state.scale,this.uid,this.graphics,t,e,this._hashToCIM),this._meshFactory=new Tt["a"](null,this.uid,i),this._templateStore=i,this.handles.add([this.watch("renderer",t=>{this._createMatcher(t,i,this.container.stage.resourceManager);for(const e of this.graphics)this._pendingUpdate.updated.add(e);this.requestUpdate()}),this.view.graphicsTileStore.on("update",t=>this._onTileUpdate(t)),this.container.on("attach",()=>{oe&&this.container.enableRenderingBounds(()=>this._graphicStore.getAllBounds()),this.graphics.items.length>0&&this._graphicsChangeHandler({target:this.graphics,added:this.graphics.items,removed:[],moved:[]}),this.handles.add(this.graphics.on("change",t=>this._graphicsChangeHandler(t)),"graphics");const t=this.container.stage.resourceManager;this._createMatcher(this.renderer,i,t),this._graphicStore.setResourceManager(t),this._attached=!0,this.notifyChange("updating")})]);const s=this.view.graphicsTileStore.tiles;this._onTileUpdate({added:s,removed:[]})}get updating(){return!this._attached||null!==this._updatingGraphicsTimer||this._tileUpdateSet.size>0||this._tilesToUpdate.size>0}hitTest(t){if(!this.view||!this.view.position)return null;const{resolution:e,rotation:i}=this.view.state;return this._graphicStore.hitTest(t.x,t.y,2,e,i)}update(t){Object(h["v"])(this._controller.signal);const e=t.state,{resolution:i}=e;if(this._graphicStore.updateLevel(i),this._graphicStoreUpdate=!0,this.updateRequested=!1,this._pendingUpdate.updated.size>0){if(!this._processing)return void this._updateGraphics();this._needsProcessing=!0}}viewChange(){this.requestUpdate()}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.requestUpdateCallback())}processUpdate(t){this.updateRequested&&(this.updateRequested=!1,this.update(t))}graphicUpdateHandler(t){const{graphic:e,property:i,newValue:s}=t;switch(i){case"attributes":case"geometry":case"symbol":this._pendingUpdate.updated.add(e),this.requestUpdate();break;case"visible":this._setFilterState(e.uid,s),this._attributeStore.sendUpdates()}}setHighlight(t){const e=t.map(t=>this._displayIds.get(t));this._attributeStore.setHighlight(t,e)}_getIntersectingTiles(t){const e=this._graphicStore.getBounds(t);if(!e||0===Object(f["C"])(e)||0===Object(f["u"])(e))return[];const i=Object(Wt["e"])(e,this.view.spatialReference);return Object(c["k"])(i)?[...new Set([...this.view.graphicsTileStore.boundsIntersections(i[0]),...this.view.graphicsTileStore.boundsIntersections(i[1])])]:this.view.graphicsTileStore.boundsIntersections(e)}async _updateTile(t){Object(h["v"])(this._controller.signal);const e=t.tile,i=this._getGraphicsData(this._templateStore,e,t.addedOrModified),s=await this._processGraphics(e,i);return Object(h["v"])(this._controller.signal),this._patchTile(e.key,{type:"update",addOrUpdate:s,remove:t.removed,end:!0,clear:!1,sort:!1}),s}_patchTile(t,e){if(!this._tiles.has(t))return;const i=this._tiles.get(t);this.container.onTileData(i,e),this.container.requestRender()}_graphicsChangeHandler(t){const e=this._pendingUpdate;for(const i of t.added)e.added.add(i);for(const i of t.moved)e.updated.add(i);for(const i of t.removed)this._pendingUpdate.added.has(i)?e.added.delete(i):e.removed.add(i);this._processing?this._needsProcessing=!0:this._updateGraphics()}_getGraphicsToUpdate(){const t={added:[],removed:[],updated:[]};if(!this.graphics)return t;const e=this._pendingUpdate;for(const i of this.graphics.items)e.added.has(i)?t.added.push(i):e.updated.has(i)&&t.updated.push(i);for(const i of e.removed)this._graphicStore.has(i)&&t.removed.push(i);return e.added.clear(),e.removed.clear(),e.updated.clear(),t}async _updateGraphics(){this._processing=!0;const{added:t,removed:e,updated:i}=this._getGraphicsToUpdate(),s=this._tilesToUpdate;let r;try{if(!this._graphicStoreUpdate){const t=this.view.state,{resolution:e}=t;this._graphicStore.updateLevel(e)}const n=[],a=new Array(t.length+e.length);for(let t=0;t({name:e,alias:e,type:"string"==typeof t.attributes[e]?"esriFieldTypeString":"esriFieldTypeDouble"}));return Object(c["j"])(t.geometry)?null:{geometryType:Object(m["c"])(t.geometry),spatialReference:d["a"].fromJSON(t.geometry.spatialReference),fields:e}}_getSymbolForGraphic(t,e){return Object(h["v"])(this._controller.signal),Object(c["k"])(t.symbol)?Promise.resolve(t.symbol):Object(c["k"])(this.renderer)?this.renderer.getSymbolAsync(t,{scale:this.view.scale,abortOptions:e}):Promise.resolve(this._getNullSymbol(t))}_getCIMSymbol(t,e,i){let s=this._hashToCIM.get(e);if(s)return Promise.resolve(s);const r=Object(C["f"])(t);if(Object(c["k"])(r)){if("CIMSymbolReference"===r.type)return s=r,this._hashToCIM.set(e,s),Promise.resolve(s);let t=this._hashToCIMSymbolPromise.get(e);return t||(t=r.fetchCIMSymbol(i).then(t=>(this._hashToCIM.set(e,t.data),this._hashToCIMSymbolPromise.delete(e),t)).catch(t=>(this._hashToCIMSymbolPromise.delete(e),Object(h["u"])(t),null)),this._hashToCIMSymbolPromise.set(e,t),t)}return Promise.resolve(null)}_expandCIMSymbol(t,e,i,s){const r=this._hashToExpandedSymbol.get(i);if(r)return Promise.resolve(r);let n=this._hashToExpandedSymbolPromise.get(i);if(n)return n;const a=this.container.stage,o=this._getArcadeInfo(e),c=Object(Dt["c"])(null),h=Object(ae["createSymbolSchema"])(t,c);return n=Object(se["b"])(h,o,a.resourceManager,s),this._hashToExpandedSymbolPromise.set(i,n),n.then(t=>(this._hashToExpandedSymbol.set(i,t),this._hashToExpandedSymbolPromise.delete(i),t)),n}async _getSymbolResources(t,e){return Object(h["v"])(this._controller.signal),this.container.stage?this._getSymbolForGraphic(t,e).then(i=>{const s=i.hash();return this._getCIMSymbol(i,s,e).then(i=>Object(c["j"])(i)?null:this._expandCIMSymbol(i,t,s,e).then(t=>{const e=t.layers.filter(t=>"text"===t.type&&"string"==typeof t.text);if(e&&e.length>0){const i=new Array(e.length);for(let t=0;t{for(let t=0;t(Object(h["u"])(t),null)):null}async _projectAndNormalizeGeometry(t,e){if(Object(h["v"])(this._controller.signal),Object(c["j"])(t.geometry)||"mesh"===t.geometry.type)return null;let i=t.geometry;if(Object(m["g"])(i)){const t=i.rings;i.rings=t}else if(Object(m["h"])(i)){const t=i.paths;i.paths=t}else if(Object(m["d"])(i)){const s=await this._getSymbolForGraphic(t,e);Object(h["v"])(this._controller.signal),i=Object(Wt["f"])(s.type)||Object(Wt["g"])(s.type)?i.center:Object(Wt["h"])(i)}await Object(D["a"])(i.spatialReference,this.view.spatialReference);const s=b(i),r=Object(D["b"])(s,i.spatialReference,this.view.spatialReference);return Object(p["a"])(r),r}_onTileUpdate(t){const e=Object(g["e"])(this.view.spatialReference);if(t.added&&t.added.length>0)for(const i of t.added)this._addNewTile(i,e);if(t.removed&&t.removed.length>0)for(const i of t.removed)this._removeTile(i.key)}async _addGraphic(t){this._abortProcessingGraphic(t.uid),Object(h["v"])(this._controller.signal);const e=new AbortController;this._graphicIdToAbortController.set(t.uid,e);const i={signal:e.signal};try{await this._addOrUpdateGraphic(t,i),Object(h["v"])(this._controller.signal),this._graphicIdToAbortController.delete(t.uid)}catch(s){if(this._graphicIdToAbortController.delete(t.uid),!Object(h["m"])(s))throw s}}_updateGraphic(t,e){Object(h["v"])(this._controller.signal);const i=this._projectAndNormalizeGeometry(t,e),s=this._getSymbolResources(t,e);return Promise.all([i,s]).then(([e,i])=>{Object(h["v"])(this._controller.signal),this._graphicStore.addOrModify(t,i,e)})}_addOrUpdateGraphic(t,e){Object(h["v"])(this._controller.signal);const i=this._projectAndNormalizeGeometry(t,e),s=this._getSymbolResources(t,e);return Promise.all([i,s]).then(([e,i])=>{Object(h["v"])(this._controller.signal),this._graphicsSet.has(t)&&this._graphicStore.addOrModify(t,i,e)})}_addTile(t){const e=this.view.featuresTilingScheme.getTileBounds(Object(f["l"])(),t),i=new H(t,e[0],e[3]);return this._tiles.set(t,i),this.container.addChild(i),i}async _addNewTile(t,e){const i=this._addTile(t.key),s=this._graphicStore.queryTileData(this._templateStore,t);if(0===s.length)return;if(e){const i=Math.round((e.valid[1]-e.valid[0])/t.resolution);for(const t of s)t.geometry&&(Object(m["f"])(t.geometry)||Object(m["e"])(t.geometry))&&this._wrapPoints(t,i)}const r=t.key;this._tileUpdateSet.add(t.key),this.notifyChange("updating");try{const e={type:"update",clear:!1,addOrUpdate:await this._processGraphics(t,s),remove:[],end:!0,sort:!1};i.patch(e),this._tileUpdateSet.delete(r),this.notifyChange("updating")}catch(n){if(this._tileUpdateSet.delete(r),this.notifyChange("updating"),!Object(h["m"])(n))throw n}}_removeTile(t){if(!this._tiles.has(t))return;const e=this._tiles.get(t);this.container.removeChild(e),e.destroy(),this._tiles.delete(t)}_setFilterState(t,e){const i=this._displayIds.get(t),s=this._attributeStore.getHighlightFlag(t);this._attributeStore.setData(i,0,0,s|(e?E["q"]:0))}_getGraphicsData(t,e,i){const s=this.view,r=Object(g["e"])(s.spatialReference),n=this._graphicStore.getGraphicsData(t,e,i);if(r){const t=Math.round((r.valid[1]-r.valid[0])/e.resolution);for(const e of n)e.geometry&&(Object(m["f"])(e.geometry)||Object(m["e"])(e.geometry))&&this._wrapPoints(e,t)}return n}_wrapPoints(t,e){const i=t.geometry;Object(m["e"])(i)?this._wrapMultipoint(i,e):this._wrapPoint(t,e)}_wrapMultipoint(t,e){const i=t.points,s=[];let r=0,n=0;for(const[a,o]of i){if(s.push([a+r,o]),r=0,e===Wt["b"]){const t=5*Wt["a"];a+nWt["b"]-t&&(s.push([-e,0]),r=e)}else a+n<-Wt["a"]?(s.push([e,0]),r=-e):a+n>Wt["b"]+Wt["a"]&&(s.push([-e,0]),r=e);n+=a}t.points=s}_wrapPoint(t,e){const i=t.geometry;if(e===Wt["b"]){const s=5*Wt["a"];i.xWt["b"]-s&&(t.geometry={points:[[i.x,i.y],[-e,0]]})}else i.x<-Wt["a"]?t.geometry={points:[[i.x,i.y],[e,0]]}:i.x>Wt["b"]+Wt["a"]&&(t.geometry={points:[[i.x,i.y],[-e,0]]})}_processGraphics(t,e,i){if(!e||!e.length||!this._meshFactory)return null;const s=kt.from(e),r=this._meshFactory;return this._matcher.then(e=>r.analyzeGraphics(s,this.container.stage.resourceManager,e,null,null,i).then(()=>(this._attributeStore.sendUpdates(),this._processAnalyzedGraphics(t,s))))}_processAnalyzedGraphics(t,e){const i=this._meshFactory,s=e.getSize(),r=e.getCursor(),n={features:s,records:s,metrics:0},a=new St["a"](t.key.id,n,{fill:"default"},!1,!1),o=[];for(;r.next();){const e=r.readGraphic();e.insertAfter=-1===e.insertAfter?-1:this._displayIds.get(e.insertAfter),e.displayId=this._displayIds.get(e.attributes[this.uid]);const s=new lt(e.displayId);s.insertAfter=e.insertAfter,o.push(s),i.writeGraphic(a,r,t.level,this.container.stage.resourceManager)}const c=t.tileInfoView.tileInfo.isWrappable,h=a.serialize(c);if(1!==h.length)return new Mt;const l=h[0].message;return Mt.fromVertexData(l,o)}_abortProcessingGraphic(t){this._graphicIdToAbortController.has(t)&&this._graphicIdToAbortController.get(t).abort()}_getNullSymbol(t){const e=t.geometry;return Object(m["h"])(e)?P["g"]:Object(m["g"])(e)||Object(m["d"])(e)?P["f"]:P["e"]}_flipUpdatingGraphics(){this._updatingGraphicsTimer&&clearTimeout(this._updatingGraphicsTimer),this._updatingGraphicsTimer=setTimeout(()=>{this._updatingGraphicsTimer=null,this.notifyChange("updating")},160),this.notifyChange("updating")}};Object(s["a"])([Object(l["b"])({constructOnly:!0})],he.prototype,"requestUpdateCallback",void 0),Object(s["a"])([Object(l["b"])()],he.prototype,"container",void 0),Object(s["a"])([Object(l["b"])({constructOnly:!0})],he.prototype,"graphics",void 0),Object(s["a"])([Object(l["b"])()],he.prototype,"updating",null),Object(s["a"])([Object(l["b"])()],he.prototype,"view",void 0),Object(s["a"])([Object(l["b"])()],he.prototype,"updateRequested",void 0),he=Object(s["a"])([Object(u["a"])("esri.views.2d.layers.support.GraphicsView2D")],he);const le=he},"566d":function(t,e,i){"use strict";i.d(e,"a",(function(){return R}));var s=i("a4ee"),r=i("2c4f"),n=i("7d7d"),a=i("ce50"),o=i("477c"),c=i("59b2"),h=(i("b50f"),i("c120"),i("cea0"),i("d386")),l=i("00c0"),u=i("6a0ed");i("e92d"),i("2dd4");let d=class extends u["a"]{};d=Object(s["a"])([Object(h["a"])("esri.views.layers.support.ClipArea")],d);const f=d;var p;let m=p=class extends f{constructor(){super(...arguments),this.type="rect",this.left=null,this.right=null,this.top=null,this.bottom=null}clone(){return new p({left:this.left,right:this.right,top:this.top,bottom:this.bottom})}get version(){return(this._get("version")||0)+1}};Object(s["a"])([Object(c["b"])({type:[Number,String],json:{write:!0}})],m.prototype,"left",void 0),Object(s["a"])([Object(c["b"])({type:[Number,String],json:{write:!0}})],m.prototype,"right",void 0),Object(s["a"])([Object(c["b"])({type:[Number,String],json:{write:!0}})],m.prototype,"top",void 0),Object(s["a"])([Object(c["b"])({type:[Number,String],json:{write:!0}})],m.prototype,"bottom",void 0),Object(s["a"])([Object(c["b"])({readOnly:!0})],m.prototype,"version",null),m=p=Object(s["a"])([Object(h["a"])("esri.views.layers.support.ClipRect")],m);const _=m;i("e06a");var y,x=i("3760"),g=i("a9ab"),b=i("3af1"),v=i("1219");const O={base:x["a"],key:"type",typeMap:{extent:b["a"],polygon:v["a"]}};let w=y=class extends f{constructor(){super(...arguments),this.type="geometry",this.geometry=null}get version(){return(this._get("version")||0)+1}clone(){return new y({geometry:this.geometry.clone()})}};Object(s["a"])([Object(c["b"])({types:O,json:{read:g["a"],write:!0}})],w.prototype,"geometry",void 0),Object(s["a"])([Object(c["b"])({readOnly:!0})],w.prototype,"version",null),w=y=Object(s["a"])([Object(h["a"])("esri.views.layers.support.Geometry")],w);const j=w;let M=class extends f{constructor(){super(...arguments),this.type="path",this.path=[]}get version(){return(this._get("version")||0)+1}};Object(s["a"])([Object(c["b"])({type:[[[Number]]],json:{write:!0}})],M.prototype,"path",void 0),Object(s["a"])([Object(c["b"])({readOnly:!0})],M.prototype,"version",null),M=Object(s["a"])([Object(h["a"])("esri.views.layers.support.Path")],M);const S=M,T=r["a"].ofType({key:"type",base:f,typeMap:{rect:_,path:S,geometry:j}}),R=t=>{let e=class extends t{constructor(){super(...arguments),this.attached=!1,this.clips=new T,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1}initialize(){var t,e,i,s;const r=null==(t=null==(e=this.view)?void 0:e.spatialReferenceLocked)||t;(null==(i=this.view)?void 0:i.spatialReference)&&r&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new a["a"]("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer}))):(this.container||(this.container=new l["a"]),this.container.fadeTransitionEnabled=!0,this.container.opacity=0,this.container.clips=this.clips,this.handles.add([Object(o["e"])(()=>this.suspended,t=>{this.container&&(this.container.visible=!t),this.view&&!t&&this.updateRequested&&this.view.requestUpdate()},o["d"]),Object(o["e"])(()=>{var t,e;return null!=(t=null==(e=this.layer)?void 0:e.opacity)?t:1},t=>{this.container&&(this.container.opacity=t)},o["d"]),Object(o["e"])(()=>this.layer&&"blendMode"in this.layer?this.layer.blendMode:"normal",t=>{this.container&&(this.container.blendMode=t)},o["d"]),Object(o["e"])(()=>this.layer&&"effect"in this.layer?this.layer.effect:null,t=>{this.container&&(this.container.effect=t)},o["d"]),Object(o["b"])(()=>this.clips,"change",()=>{this.container&&(this.container.clips=this.clips)})]),null!=(s=this.view)&&s.whenLayerView?this.view.whenLayerView(this.layer).then(t=>{t===this&&this.processAttach()},()=>{}):this.when().then(()=>{this.processAttach()},()=>{}))}destroy(){this.processDetach(),this.updateRequested=!1}get spatialReferenceSupported(){var t;const e=null==(t=this.view)?void 0:t.spatialReference;return null==e||this.supportsSpatialReference(e)}get updating(){var t;return this.spatialReferenceSupported&&(!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())||!(null==(t=this.updatingHandles)||!t.updating))}get visibleAtCurrentScale(){return this.isVisibleAtScale(this.view.scale)}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0,this.requestUpdate())}processDetach(){this.attached&&(this.attached=!1,this.detach(),this.updateRequested=!1)}isVisibleAtScale(t){const e=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;if(!e)return!0;const{minScale:i,maxScale:s}=e;return(0===i||t<=i)&&(0===s||t>=s)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.suspended||this.view.requestUpdate())}processUpdate(t){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",t),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(t))):this.updateRequested=!1}hitTest(t,e){return Promise.resolve(null)}supportsSpatialReference(t){return!0}canResume(){return!!this.spatialReferenceSupported&&!!super.canResume()&&this.visibleAtCurrentScale}getSuspendInfo(){const t=super.getSuspendInfo(),e=!this.spatialReferenceSupported,i=this.visibleAtCurrentScale;return e&&(t.spatialReferenceNotSupported=e),i&&(t.outsideScaleRange=i),t}};return Object(s["a"])([Object(c["b"])()],e.prototype,"attached",void 0),Object(s["a"])([Object(c["b"])({type:T,set(t){const e=Object(n["b"])(t,this._get("clips"),T);this._set("clips",e)}})],e.prototype,"clips",void 0),Object(s["a"])([Object(c["b"])()],e.prototype,"container",void 0),Object(s["a"])([Object(c["b"])()],e.prototype,"moving",void 0),Object(s["a"])([Object(c["b"])({readOnly:!0})],e.prototype,"spatialReferenceSupported",null),Object(s["a"])([Object(c["b"])({readOnly:!0})],e.prototype,"updateParameters",void 0),Object(s["a"])([Object(c["b"])()],e.prototype,"updateRequested",void 0),Object(s["a"])([Object(c["b"])()],e.prototype,"updating",null),Object(s["a"])([Object(c["b"])()],e.prototype,"view",void 0),Object(s["a"])([Object(c["b"])({readOnly:!0})],e.prototype,"visibleAtCurrentScale",null),e=Object(s["a"])([Object(h["a"])("esri.views.2d.layers.LayerView2D")],e),e}},"601e":function(t,e,i){"use strict";i.d(e,"a",(function(){return l}));var s=i("ce50"),r=i("e92d"),n=i("c24e"),a=i("82fa"),o=i("89cb"),c=i("f47d");const h=r["a"].getLogger("esri/views/2d/engine/webgl/util/Matcher");async function l(t,e,i,s){switch(t.type){case"simple":return u.fromBasicRenderer(t,e,i,s);case"map":return p.fromUVRenderer(t,e,i,s);case"interval":return f.fromCBRenderer(t,e,i,s);case"dictionary":return x.fromDictionaryRenderer(t,e,i,s);case"subtype":return d.fromSubtypes(t,e,i,s)}}class u{constructor(){this.type="feature",this._defaultResult=null}static async fromBasicRenderer(t,e,i,s){const r=new u;if(t.symbol){const n=await Object(c["b"])(t.symbol,i,s),a=e.createTemplateGroup(n,null);r.setDefault(a)}return r}size(){return 1}getDefault(){return this._defaultResult}setDefault(t){this._defaultResult=t}match(t,e,i,s,r){return this.getDefault()}async analyze(t,e,i,s,r,n){return null}}class d extends u{constructor(t,e){super(),this._subMatchers=t,this._subtypeField=e}static async fromSubtypes(t,e,i,s){const r=new Map,n=[];for(const a in t.renderers){const o=parseInt(a,10),c=l(t.renderers[a],e,i,s).then(t=>r.set(o,t));n.push(c)}return await Promise.all(n),new d(r,t.subtypeField)}match(t,e,i,s,r){const n=e.readAttribute(this._subtypeField),a=this._subMatchers.get(n);return a?a.match(t,e,i,s,r):null}}class f extends u{constructor(t,e,i,s){super(),this.type="interval",this._intervals=[],this._isMaxInclusive=e,this._fieldIndex=s,this._field=t,this._normalizationInfo=i}static async fromCBRenderer(t,e,i,s){const{isMaxInclusive:r,normalizationField:n,normalizationTotal:a,normalizationType:o}=t,h=t.field,l=new f(h,r,{normalizationField:n,normalizationTotal:a,normalizationType:o},t.fieldIndex),u=await Object(c["b"])(t.backgroundFillSymbol,i,s);await Promise.all(t.intervals.map(async t=>{const r=await Object(c["b"])(t.symbol,i,s),n=await e.createTemplateGroup(r,u),a={min:t.min,max:t.max};l.add(a,n)}));const d=await Object(c["b"])(t.defaultSymbol,i,s);if(d){const t=await e.createTemplateGroup(d,u);l.setDefault(t)}return l}add(t,e){this._intervals.push({interval:t,result:e}),this._intervals.sort((t,e)=>t.interval.min-e.interval.min)}size(){return super.size()+this._intervals.length}match(t,e,i,s,r){if(null==this._fieldIndex&&!this._field)return this.getDefault();const n=null!=this._fieldIndex?e.getComputedNumericAtIndex(this._fieldIndex):this._getValueFromField(e);if(!n&&(null==n||isNaN(n)))return this.getDefault();for(let a=0;a=t.min,s=this._isMaxInclusive?n<=t.max:n{const r=await Object(c["b"])(t.symbol,i,s),n=await e.createTemplateGroup(r,a);""===t.value?o.setNullResult(n):o.add(t.value,n)}));const h=await Object(c["b"])(t.defaultSymbol,i,s);if(h){const t=await e.createTemplateGroup(h,a);o.setDefault(t)}return o}setNullResult(t){this._nullResult=t}add(t,e){this._resultsMap.set(t.toString(),e)}size(){return super.size()+this._resultsMap.size}match(t,e,i,s,r){if(null==this._fieldsIndex&&!this._fields)return this.getDefault();const n=null!=this._fieldsIndex?e.getComputedStringAtIndex(this._fieldsIndex):this._getValueFromFields(e);if(null!==this._nullResult&&(null==n||""===n||""===n))return this._nullResult;if(!n&&null==n)return this.getDefault();const a=n.toString();return this._resultsMap.has(a)?this._resultsMap.get(a):this.getDefault()}_getValueFromFields(t){const e=[];for(const i of this._fields){const s=t.readAttribute(i);null==s||""===s?e.push(""):e.push(s)}return e.join(this._seperator)}}async function m(t,e){const i=t||1;if("number"==typeof i)return(t,e,s)=>i;const s=await Object(a["d"])(i,e.spatialReference,e.fields);return(t,i,r)=>Object(o["a"])(s,t,{$view:r},e.geometryType,i)||1}let _;async function y(){return _||(_=i.e("chunk-2d2304b7").then(i.bind(null,"ec58"))),_}class x extends u{constructor(t,e,i,s,r,a){super(),this.type="dictionary",this._groupIdCache=new n["a"](100),this._loader=t,this._fieldMap=t.fieldMap,this._symbolFields=t.getSymbolFields(),this._templates=e,this._info=i,this._scaleFn=s,this._schemaUtilsModule=r,this._symbolOptions=a}static async fromDictionaryRenderer(t,e,s,r){const[{DictionaryLoader:n},a]=await Promise.all([Promise.resolve().then(i.bind(null,"226a")),y()]),o=new n(t.url,t.config,t.fieldMap);await o.fetchResources({spatialReference:s.spatialReference,fields:s.fields});const c=await m(t.scaleExpression,s);return new x(o,e,s,c,a,t.symbolOptions)}async _analyzeFeature(t,e,i,r,n){const a=t.readLegacyFeature(),o=this._scaleFn(a,i,r),l=this._attributeHash(a)+"-"+o,u=this._groupIdCache.get(l);if(u)return u;const d={...r,spatialReference:this._info.spatialReference,abortOptions:n,fields:this._info.fields},f=await this._loader.getSymbolAsync(a,d),p=this._schemaUtilsModule.createSymbolSchema(f,this._symbolOptions),m=Object(c["b"])(p,this._info,e,n).then(t=>{if("expanded-cim"!==t.type)return h.error(new s["a"]("mapview-bad-type",`Found unexpected type ${t.type} in dictionary response`)),null;t.hash+="-"+o;for(const e of t.layers)e.scaleFactor=o,e.templateHash+="-"+o;return this._templates.createTemplateGroup(t,null)});return this._groupIdCache.put(l,m,1),m}async analyze(t,e,i,s,r,n){const a=e.getCursor(),o=[];for(;a.next();)o.push(this._analyzeFeature(a,i,s,r,n));return Promise.all(o)}match(t,e,i,s,r){return null}_attributeHash(t){let e="";for(const i of this._symbolFields){const s=this._fieldMap[i];s&&(e+=t.attributes[s]+"-")}return e}}},6722:function(t,e,i){"use strict";i.d(e,"a",(function(){return h}));var s=i("c120"),r=i("c84e"),n=i("9a02"),a=i("6f75"),o=i("ec5e");const c=(t,e)=>t.key.level-e.key.level!=0?t.key.level-e.key.level:t.key.row-e.key.row!=0?t.key.row-e.key.row:t.key.col-e.key.col;class h extends n["a"]{constructor(t){super(),this._tileInfoView=t}get requiresDedicatedFBO(){return!1}renderChildren(t){this.sortChildren(c),this.setStencilReference(t),super.renderChildren(t)}createRenderParams(t){const{state:e}=t,i=super.createRenderParams(t);return i.requiredLevel=this._tileInfoView.getClosestInfoForScale(e.scale).level,i.displayLevel=this._tileInfoView.tileInfo.scaleToZoom(e.scale),i}prepareRenderPasses(t){const e=super.prepareRenderPasses(t);return e.push(t.registerRenderPass({name:"stencil",brushes:[o["a"]],drawPhase:r["c"].DEBUG|r["c"].MAP|r["c"].HIGHLIGHT,target:()=>this.getStencilTarget()})),Object(s["a"])("esri-tiles-debug")&&e.push(t.registerRenderPass({name:"tileInfo",brushes:[a["a"]],drawPhase:r["c"].DEBUG,target:()=>this.children})),e}getStencilTarget(){return this.children}updateTransforms(t){for(const e of this.children){const i=this._tileInfoView.getTileResolution(e.key);e.setTransform(t,i)}}setStencilReference(t){let e=1;for(const i of this.children)i.stencilRef=e++}}},"69c3":function(t,e,i){"use strict";i.d(e,"a",(function(){return T}));i("3e7b"),i("018d");var s=i("ae54"),r=(i("07cd"),i("d302"),i("8c81")),n=i("175e"),a=i("c84e"),o=i("c8dd");const c=new Map;function h(t,e,i){const{indicesPerRecord:s,multiplier:n,verticesPerRecord:a}=c.get(t);return{recordBytes:i*r["n"]*Uint32Array.BYTES_PER_ELEMENT,indexBytes:n*s*i*Uint32Array.BYTES_PER_ELEMENT,vertexBytes:n*a*i*e}}c.set(a["d"].MARKER,{multiplier:1,indicesPerRecord:6,verticesPerRecord:4}),c.set(a["d"].LINE,{multiplier:1,indicesPerRecord:24,verticesPerRecord:8}),c.set(a["d"].FILL,{multiplier:1,indicesPerRecord:10,verticesPerRecord:10}),c.set(a["d"].TEXT,{multiplier:8,indicesPerRecord:6,verticesPerRecord:4}),c.set(a["d"].LABEL,{multiplier:8,indicesPerRecord:6,verticesPerRecord:4});var l=i("3de4");class u{constructor(t,e,i){this._start={index:0,vertex:0};const s=h(t,e,i),r=e/4;this.geometryType=t,this._records=new l["a"](Int32Array,s.recordBytes),this._indices=new l["a"](Uint32Array,s.indexBytes),this._vertices=new l["a"](Uint32Array,s.vertexBytes),this._metrics=new l["a"](Float32Array,0),this._strideInt=r}serialize(t){const e=this._records.buffer(),i=this._indices.buffer(),s=this._vertices.buffer(),r=this._metrics.length?this._metrics.buffer():null,n=4*this._strideInt;return t.push(e,i,s),{stride:n,records:e,indices:i,vertices:s,metrics:r}}get strideInt(){return this._strideInt}get recordCount(){return this._records.length/r["n"]}get vertexCount(){return this._vertices.length/this._strideInt}get indexCount(){return this._indices.length}get indexWriter(){return this._indices}get vertexWriter(){return this._vertices}get metricWriter(){return this._metrics}vertexEnsureSize(t){this._vertices.ensureSize(t)}indexEnsureSize(t){this._indices.ensureSize(t)}recordStart(){this._start.index=this._indices.length,this._start.vertex=this._vertices.length}recordEnd(t,e,i,s,r,n,a,o){this._records.push(t),this._records.push(e),this._records.push(i),this._records.push(s),this._records.push(r),this._records.push(n),this._records.push(a),this._records.writeF32(o)}writeIndex(t){this._indices.push(t)}writeVertex(t){this._vertices.push(t)}writeVertexF32(t){this._vertices.writeF32(t)}copyLastFrom(t,e,i){const s=t._records.length-r["n"],n=t._records.getValue(s),a=t._records.getValue(s+1),o=t._records.getValue(s+2),c=t._records.getValue(s+4),h=t._records.getValue(s+6),l=t._records.getValue(s+7),u=this._vertices.length,d=(t._start.vertex-this._vertices.length)/this._strideInt,f=this._indices.length,p=this.vertexCount;for(let r=t._start.index;r!==t._indices.length;r++){const e=t._indices.getValue(r);this._indices.push(e-d)}for(let r=t._start.vertex;r!==t._vertices.length;r++){const e=t._vertices.getValue(r);this._vertices.push(e)}for(let r=u;r<=this._vertices.length;r+=this._strideInt)this._vertices.i1616Add(r,e,i);this._records.push(n),this._records.push(a),this._records.push(o),this._records.push(f),this._records.push(c),this._records.push(p),this._records.push(h),this._records.push(l)}}var d=i("a015");const f=1,p=2,m=4,_=8,y=16,x=32,g=64,b=128;function v(t){switch(t){case f:case _:case x:return-1;case p:case g:return 0;case m:case y:case b:return 1}}function O(t){switch(t){case f:case p:case m:return-1;case _:case y:return 0;case x:case g:case b:return 1}}const w=f|_|x,j=m|y|b,M=f|p|m,S=x|g|b;class T{constructor(t,e,i,s,r){this._hasAggregate=!1,this.hasRecords=!1,this._data={self:new Map,neighbors:new Array},this._current={geometryType:0,writer:null,overlaps:0,start:0,insertAfter:0,sortKey:0,id:0,materialKey:0,indexStart:0,vertStart:0,isDotDensity:!1,bufferingEnabled:!1,metricBoxLenPointer:0},this.hint=e,this.tileKey=t,this._hasAggregate=s,this._pixelBufferEnabled=r,this._strideOptions=i}get hasAggregates(){return this._hasAggregate}get hasPixelBufferEnabled(){return this._pixelBufferEnabled}serialize(t){const e=[];return e.push(this._serializeTileVertexData(this.tileKey,this.tileKey,this._data.self)),this._data.neighbors.forEach((i,r)=>{const n=1<=r["P"]-i?w:j|w)|(e<0+s?S:e>=r["P"]-s?M:S|M));this._current.overlaps|=n}_getVertexWriter(t){if(!this._data.self.has(t)){const e=this._data.self,i=Object(o["n"])(t,this._strideOptions).geometry;e.set(t,new u(t,i,this.hint.records))}return this._data.self.get(t)}}},"6a2c":function(t,e,i){"use strict";i.d(e,"a",(function(){return r})),i.d(e,"b",(function(){return s})),i.d(e,"c",(function(){return c})),i.d(e,"d",(function(){return l})),i.d(e,"e",(function(){return u})),i.d(e,"f",(function(){return h})),i.d(e,"g",(function(){return o})),i.d(e,"h",(function(){return n}));const s=0,r=100;function n(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function a(t,e){return Math.sqrt(t*t+e*e)}function o(t){const e=a(t[0],t[1]);t[0]/=e,t[1]/=e}function c(t,e){return a(t[0]-e[0],t[1]-e[1])}function h(t){return"function"==typeof t}function l(t=2){return 1/Math.max(t,1)}function u(t,e){return[!!t.minScale&&e.scaleToZoom(t.minScale)||s,!!t.maxScale&&e.scaleToZoom(t.maxScale)||r]}},"6c7a":function(t,e,i){"use strict";i.d(e,"a",(function(){return h}));var s=i("a4ee"),r=i("e92d"),n=i("f4cc"),a=i("477c"),o=i("59b2"),c=(i("b50f"),i("c120"),i("cea0"),i("d386"));const h=t=>{let e=class extends t{initialize(){this.handles.add(Object(a["b"])(()=>this.layer,"refresh",t=>{this.doRefresh(t.dataChanged).catch(t=>{Object(n["m"])(t)||r["a"].getLogger(this.declaredClass).error(t)})}),"RefreshableLayerView")}};return Object(s["a"])([Object(o["b"])()],e.prototype,"layer",void 0),e=Object(s["a"])([Object(c["a"])("esri.layers.mixins.RefreshableLayerView")],e),e}},"6f2d":function(t,e,i){"use strict";i.d(e,"a",(function(){return I}));var s=i("f4cc"),r=i("8ca7"),n=i("ce50"),a=i("c120"),o=i("e92d"),c=i("b2b2"),h=i("8c81"),l=i("175e"),u=i("c8dd"),d=i("97cb"),f=i("d17d"),p=i("d267"),m=i("a1ff");const _=o["a"].getLogger("esri.views.2d.engine.webgl.AttributeStoreView"),y=Object(d["b"])(d["a"],_);class x{constructor(t,e,i){this._texture=null,this._lastTexture=null,this._fbos={},this.texelSize=4;const{buffer:s,pixelType:r,textureOnly:n}=t,a=Object(u["l"])(r);this.shared=i,this.pixelType=r,this.size=e,this.textureOnly=n,n||(this.data=new a(Object(c["t"])(s))),this._resetRange()}destroy(){Object(c["b"])(this._texture,t=>t.dispose());for(const t in this._fbos)Object(c["b"])(this._fbos[t],e=>{"0"===t&&e.detachColorTexture(),e.dispose()}),this._fbos[t]=null;this._texture=null}get _textureDesc(){return{target:f["A"].TEXTURE_2D,wrapMode:f["B"].CLAMP_TO_EDGE,pixelFormat:f["p"].RGBA,dataType:this.pixelType,samplingMode:f["z"].NEAREST,width:this.size,height:this.size}}setData(t,e,i){const s=Object(l["f"])(t),r=Object(c["t"])(this.data),n=s*this.texelSize+e;!r||n>=r.length||(r[n]=i,this.dirtyStart=Math.min(this.dirtyStart,s),this.dirtyEnd=Math.max(this.dirtyEnd,s))}getData(t,e){if(Object(c["j"])(this.data))return null;const i=Object(l["f"])(t)*this.texelSize+e;return!this.data||i>=this.data.length?null:this.data[i]}getTexture(t){return Object(c["u"])(this._texture,()=>this._initTexture(t))}getFBO(t,e=0){if(Object(c["j"])(this._fbos[e])){const i={colorTarget:f["y"].TEXTURE,depthStencilTarget:f["m"].NONE},s=0===e?this.getTexture(t):this._textureDesc;this._fbos[e]=new p["a"](t,i,s)}return this._fbos[e]}get locked(){return!(this.pixelType!==f["q"].UNSIGNED_BYTE||!this.shared||this.textureOnly||!Object(a["a"])("esri-atomics")||!this.data)&&1===Atomics.load(this.data,0)}get hasDirty(){const t=this.dirtyStart;return this.dirtyEnd>=t}updateTexture(t,e){if(!this.locked){try{const e=this.dirtyStart,i=this.dirtyEnd;if(!this.hasDirty)return;this._resetRange();const s=Object(c["t"])(this.data).buffer,r=this.getTexture(t),a=4,o=(e-e%this.size)/this.size,h=(i-i%this.size)/this.size,l=o,d=this.size,f=h,p=o*this.size*a,m=(d+f*this.size)*a-p,y=Object(u["l"])(this.pixelType),x=new y(s,p*y.BYTES_PER_ELEMENT,m),g=this.size,b=f-l+1;if(b>this.size)return void _.error(new n["a"]("mapview-webgl","Out-of-bounds index when updating AttributeData"));r.updateData(0,0,l,g,b,x)}catch(i){}e()}}update(t){const{data:e,start:i,end:s}=t;if(Object(c["k"])(e)){const s=this.data,r=i*this.texelSize;for(let i=0;inew x(t,s,i));else for(let r=0;rObject(c["m"])(t,t=>t.destroy())),Object(c["b"])(this._defaultTexture,t=>t.dispose())}isEmpty(){const t=this._data;return Object(c["j"])(t)}isUpdating(){const t=Object(c["k"])(this._pendingAttributeUpdate),e=t;return Object(a["a"])("esri-2d-log-updating")&&console.log(`Updating AttributeStoreView ${e}\n -> hasPendingUpdate ${t}`),e}getBlock(t){return Object(c["j"])(this._data)?null:this._data[t]}setLabelMinZoom(t,e){this.setData(t,0,1,e)}getLabelMinZoom(t){return this.getData(t,0,1,255)}getFilterFlags(t){return this.getData(t,0,0,0)}getVVSize(t){return this.getData(t,h["e"],0,0)}getData(t,e,i,s){if(!this._data)return 0;const r=Object(c["t"])(this._data)[e];if(Object(c["j"])(r))return 0;const n=r.getData(t,i);return Object(c["k"])(n)?n:s}setData(t,e,i,s){const r=Object(c["t"])(this._data)[e];Object(c["t"])(r).setData(t,i,s)}lockTextureUpload(){this._locked=!0}unlockTextureUpload(){this._locked=!1}forceTextureUpload(){this._forceNextUpload=!0}async requestUpdate(t){if(this._pendingAttributeUpdate)return void _.error(new n["a"]("mapview-webgl","Tried to update attribute data with a pending update"));const e=Object(s["g"])();return y("AttributeStoreView Update Requested",t),this._pendingAttributeUpdate={data:t,resolver:e},e.promise}update(){if(this._initialized&&Object(c["k"])(this._pendingAttributeUpdate)){const{data:t,resolver:e}=this._pendingAttributeUpdate,i=Object(c["t"])(this._data);for(let s=0;sObject(c["b"])(e,e=>{y("Updating block "+s,e),t.update(e)}))}this._pendingAttributeUpdate=null,e(),this._onUpdate()}}bindTextures(t,e=!0){this.update();const i=this._getDefaultTexture(t);if(!this._initialized)return t.bindTexture(i,h["B"]),void(e&&(t.bindTexture(i,h["C"]),t.bindTexture(i,h["D"]),t.bindTexture(i,h["E"]),t.bindTexture(i,h["H"])));const s=Object(c["t"])(this._data);this._locked&&!this._forceNextUpload||(Object(c["h"])(s,e=>e.updateTexture(t,()=>this._onUpdate())),this._forceNextUpload=!1),t.bindTexture(Object(c["n"])(s[h["c"]],i,e=>e.getTexture(t)),h["B"]),e&&(t.bindTexture(Object(c["n"])(s[h["d"]],i,e=>e.getTexture(t)),h["H"]),t.bindTexture(Object(c["n"])(s[h["a"]],i,e=>e.getTexture(t)),h["C"]),t.bindTexture(Object(c["n"])(s[h["e"]],i,e=>e.getTexture(t)),h["D"]),t.bindTexture(Object(c["n"])(s[h["b"]],i,e=>e.getTexture(t)),h["E"]))}_getDefaultTexture(t){if(Object(c["j"])(this._defaultTexture)){const e={wrapMode:f["B"].CLAMP_TO_EDGE,pixelFormat:f["p"].RGBA,dataType:f["q"].UNSIGNED_BYTE,samplingMode:f["z"].NEAREST,width:1,height:1};this._defaultTexture=new m["a"](t,e,new Uint8Array(4))}return this._defaultTexture}}var b=i("6722"),v=i("9ef0"),O=i("a915"),w=i("8048"),j=i("9b40"),M=i("b2af");function S(t,e){const i=e.length;if(t{let i=1/0,s=0;for(const o in e.levels){const e=parseFloat(o),r=Math.abs(t-e);r=e.length?new v["a"]([0,0,0,0]):e[i].color;T(this.ddColors,t,4*i)}for(let i=0;i<8;i++)this.ddActiveDots[i]=ithis.onAttributeStoreUpdate())}destroy(){this.removeAllChildren(),this.children.forEach(t=>t.destroy()),this.attributeView.destroy(),this._materialItemsRequestQueue.clear()}setRendererInfo(t,e,i){this._rendererInfo.setInfo(t,e,i),this.requestRender()}async getMaterialItems(t,e){if(!t||0===t.length)return null;const i=Object(s["g"])();return this._materialItemsRequestQueue.push({items:t,abortOptions:e,resolver:i}),this.requestRender(),i.promise}doRender(t){if(t.context.capabilities.enable("textureFloat"),t.context.capabilities.enable("vao"),this._materialItemsRequestQueue.length>0){let e=this._materialItemsRequestQueue.pop();for(;e;)this._processMaterialItemRequest(t,e),e=this._materialItemsRequestQueue.pop()}super.doRender(t)}renderChildren(t){for(const e of this.children)e.commit(t);this._rendererInfo.update(t.state),super.renderChildren(t)}createRenderParams(t){const e=super.createRenderParams(t);return e.rendererInfo=this._rendererInfo,e.attributeView=this.attributeView,e}onAttributeStoreUpdate(){}_processMaterialItemRequest(t,{items:e,abortOptions:i,resolver:s}){const{painter:r,pixelRatio:n}=t,a=e.map(t=>r.textureManager.rasterizeItem(t.symbol,n,t.glyphIds,i));Promise.all(a).then(t=>{if(!this.stage)return void s.reject();const i=t.map((t,i)=>({id:e[i].id,mosaicItem:t}));s.resolve(i)},s.reject)}}},"7de1":function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));class s{constructor(t,e){this._mask=0,this._buf=t,this._mask=e}static fromBuffer(t,e){return new s(t,e)}static create(t,e=4294967295){const i=new Uint32Array(Math.ceil(t/32));return new s(i,e)}_getIndex(t){return Math.floor(t/32)}has(t){const e=this._mask&t;return!!(this._buf[this._getIndex(e)]&1<>>=1,s++}}countSet(){let t=0;return this.forEachSet(e=>{t++}),t}}},"7f5c":function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return q}));var s=i("a4ee"),r=i("8d60"),n=i("2c4f"),a=i("477c"),o=i("59b2"),c=(i("b50f"),i("c120"),i("cea0"),i("d386")),h=i("f626"),l=i("870c"),u=i("566d"),d=i("561f"),f=i("ff00"),p=i("fc29"),m=i("e92d"),_=i("b2b2"),y=i("f4cc"),x=i("9dee"),g=i("2d39"),b=i("00c0"),v=i("894c"),O=i("bdb8");const w=m["a"].getLogger("esri.views.2d.layers.imagery.ImageryView2D");let j=class extends p["a"]{constructor(){super(...arguments),this.attached=!1,this.container=new b["a"],this.updateRequested=!1,this.type="imagery",this._bitmapView=new g["a"]}destroy(){this.attached&&(this.detach(),this.attached=!1),this.updateRequested=!1}get updating(){return!this.attached||this.isUpdating()}update(t){this.strategy.update(t).catch(t=>{Object(y["m"])(t)||w.error(t)})}hitTest(t){return new r["a"]({attributes:{},geometry:t.clone(),layer:this.layer})}attach(){this.container.addChild(this._bitmapView);const t=this.layer.version>=10,e=this.layer.version>=10.1?this.layer.imageMaxHeight:2048,i=this.layer.version>=10.1?this.layer.imageMaxWidth:2048;this.strategy=new O["a"]({container:this._bitmapView,imageNormalizationSupported:t,imageMaxHeight:e,imageMaxWidth:i,fetchSource:this._fetchImage.bind(this),requestUpdate:()=>this.requestUpdate()})}detach(){this.strategy.destroy(),this._bitmapView.removeAllChildren(),this.container.removeAllChildren(),this.updateRequested=!1}redraw(){this.strategy.updateExports(t=>{t.source instanceof HTMLImageElement?t.requestRender():this.layer.applyRenderer({pixelBlock:t.source.pixelBlock}).then(e=>{const i=t.source;i.pixelBlock=e.pixelBlock,i.filter=t=>this.layer.applyFilter(t),this.container.requestRender()})})}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.view.requestUpdate())}isUpdating(){return this.strategy.updating||this.updateRequested}getPixelData(){if(this.updating)return null;const t=this.strategy.bitmaps;if(1===t.length&&t[0].source)return{extent:t[0].source.extent,pixelBlock:t[0].source.originalPixelBlock};if(t.length>1){const e=this.view.extent,i=t.map(t=>t.source).filter(t=>t.extent&&t.extent.intersects(e)).map(t=>({extent:t.extent,pixelBlock:t.originalPixelBlock})),s=Object(x["m"])(i,e);return Object(_["k"])(s)?{extent:s.extent,pixelBlock:s.pixelBlock}:null}return null}_fetchImage(t,e,i,s){return(s=s||{}).timeExtent=this.timeExtent,s.requestAsImageElement=!0,this.layer.fetchImage(t,e,i,s).then(t=>t.imageElement?t.imageElement:this.layer.applyRenderer(t.pixelData,{signal:s.signal}).then(e=>{const i=new v["a"](e.pixelBlock,e.extent.clone(),t.pixelData.pixelBlock);return i.filter=t=>this.layer.applyFilter(t),i}))}};Object(s["a"])([Object(o["b"])()],j.prototype,"attached",void 0),Object(s["a"])([Object(o["b"])()],j.prototype,"container",void 0),Object(s["a"])([Object(o["b"])()],j.prototype,"layer",void 0),Object(s["a"])([Object(o["b"])()],j.prototype,"strategy",void 0),Object(s["a"])([Object(o["b"])()],j.prototype,"timeExtent",void 0),Object(s["a"])([Object(o["b"])()],j.prototype,"view",void 0),Object(s["a"])([Object(o["b"])()],j.prototype,"updateRequested",void 0),Object(s["a"])([Object(o["b"])()],j.prototype,"updating",null),Object(s["a"])([Object(o["b"])()],j.prototype,"type",void 0),j=Object(s["a"])([Object(c["a"])("esri.views.2d.layers.imagery.ImageryView2D")],j);const M=j;var S=i("2eab"),T=i("9096"),R=i("3af1"),I=i("b4e0"),D=i("19db"),C=i("3bc3"),P=i("c84e"),E=i("9a02");class z extends E["a"]{constructor(){super(...arguments),this.symbolTypes=["triangle"]}get requiresDedicatedFBO(){return!1}prepareRenderPasses(t){const e=t.registerRenderPass({name:"imagery (vf)",brushes:[C["a"]],target:()=>this.children,drawPhase:P["c"].MAP});return[...super.prepareRenderPasses(t),e]}doRender(t){this.visible&&t.drawPhase===P["c"].MAP&&this.symbolTypes.forEach(e=>{t.renderPass=e,super.doRender(t)})}}var A=i("0722");const k=m["a"].getLogger("esri.views.2d.layers.imagery.VectorFieldView2D");let L=class extends p["a"]{constructor(t){super(t),this.update=Object(y["i"])((t,e)=>this._update(t,e).catch(t=>{Object(y["m"])(t)||k.error(t)}))}get updating(){return!!this._loading}redraw(t){if(!this.container.children.length)return;const e=this.container.children[0];e.symbolizerParameters=t,e.invalidateVAO(),this.container.symbolTypes="wind_speed"===t.style?["scalar","triangle"]:"simple_scalar"===t.style?["scalar"]:["triangle"],this.container.requestRender()}async _update(t,e,i){if(!t.stationary)return;const{extent:s,spatialReference:r}=t.state,n=new R["a"]({xmin:s.xmin,ymin:s.ymin,xmax:s.xmax,ymax:s.ymax,spatialReference:r}),[a,o]=t.state.size;this._loading=this.fetchPixels(n,a,o,i);const c=await this._loading;this._addToDisplay(c,e,t.state),this._loading=null}_addToDisplay(t,e,i){if(Object(_["j"])(t.pixelBlock))return this.container.children.forEach(t=>t.destroy()),void this.container.removeAllChildren();const{extent:s,pixelBlock:r}=t,n=new A["a"](r);n.offset=[0,0],n.symbolizerParameters=e,n.rawPixelData=t,n.invalidateVAO(),n.x=s.xmin,n.y=s.ymax,n.pixelRatio=i.pixelRatio,n.rotation=i.rotation,n.resolution=i.resolution,n.width=r.width*e.symbolTileSize,n.height=r.height*e.symbolTileSize,this.container.children.forEach(t=>t.destroy()),this.container.removeAllChildren(),this.container.symbolTypes="wind_speed"===e.style?["scalar","triangle"]:"simple_scalar"===e.style?["scalar"]:["triangle"],this.container.addChild(n)}};Object(s["a"])([Object(o["b"])()],L.prototype,"fetchPixels",void 0),Object(s["a"])([Object(o["b"])()],L.prototype,"container",void 0),Object(s["a"])([Object(o["b"])()],L.prototype,"_loading",void 0),Object(s["a"])([Object(o["b"])()],L.prototype,"updating",null),L=Object(s["a"])([Object(c["a"])("esri.views.2d.layers.imagery.ImageryVFStrategy")],L);const F=L;let B=class extends T["a"]{constructor(){super(...arguments),this.attached=!1,this.container=new z,this.type="imageryVF",this._dataParameters={exportParametersVersion:0,bbox:"",symbolTileSize:0,time:""},this._fetchpixels=async(t,e,i,s)=>{const r=await this._projectFullExtentPromise,{symbolTileSize:n}=this.layer.renderer,{extent:a,width:o,height:c}=Object(D["h"])(t,e,i,n,r);if(Object(_["k"])(r)&&!r.intersects(t))return{extent:a,pixelBlock:null};const h={bbox:`${a.xmin}, ${a.ymin}, ${a.xmax}, ${a.ymax}`,exportParametersVersion:this.layer.exportImageServiceParameters.version,symbolTileSize:n,time:JSON.stringify(this.timeExtent||"")};if(this._canReuseVectorFieldData(h)){const t=this.getPixelData();if(Object(_["k"])(t)&&`${t.extent.xmin}, ${t.extent.ymin}, ${t.extent.xmax}, ${t.extent.ymax}`===h.bbox)return t}const{pixelData:l}=await this.layer.fetchImage(a,o,c,{timeExtent:this.timeExtent,requestAsImageElement:!1,signal:s});return this._dataParameters=h,Object(_["j"])(l.pixelBlock)?{extent:a,pixelBlock:null}:{extent:a,pixelBlock:"vector-uv"===this.layer.rasterInfo.dataType?Object(_["t"])(Object(D["b"])(l.pixelBlock,"vector-uv")):l.pixelBlock}}}get updating(){return!this.attached||this._strategy.updating}attach(){this._projectFullExtentPromise=this._getProjectedFullExtent(this.view.spatialReference),this._strategy=new F({container:this.container,fetchPixels:this._fetchpixels}),this.handles.add(Object(a["e"])(()=>this.layer.renderer,t=>this._updateSymbolizerParams(t),a["d"]),"vector-field-view-update")}detach(){this._strategy.destroy(),this.container.children.forEach(t=>t.destroy()),this.container.removeAllChildren(),this.handles.remove("vector-field-view-update"),this._strategy=this.container=this._projectFullExtentPromise=null}getPixelData(){if(this.updating||!this.container.children.length)return null;const{extent:t,pixelBlock:e}=this.container.children[0].rawPixelData;return{extent:t,pixelBlock:e}}hitTest(t){return new r["a"]({attributes:{},geometry:t.clone(),layer:this.layer})}update(t){this._strategy.update(t,this._symbolizerParams)}redraw(){this._updateSymbolizerParams(this.layer.renderer),this._strategy.redraw(this._symbolizerParams)}_canReuseVectorFieldData(t){const e=this._dataParameters.exportParametersVersion===t.exportParametersVersion,i=this._dataParameters.time===t.time,s=this._dataParameters.symbolTileSize===t.symbolTileSize,r=this._dataParameters.bbox===t.bbox;return e&&i&&s&&r}async _getProjectedFullExtent(t){try{return await Object(I["h"])(this.layer.fullExtent,t)}catch(e){try{const e=(await Object(S["default"])(this.layer.url,{query:{option:"footprints",outSR:t.wkid||JSON.stringify(t.toJSON()),f:"json"}})).data.featureCollection.layers[0].layerDefinition.extent;return e?R["a"].fromJSON(e):null}catch{return null}}}_updateSymbolizerParams(t){"vector-field"===t.type&&(this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null}))}};Object(s["a"])([Object(o["b"])()],B.prototype,"attached",void 0),Object(s["a"])([Object(o["b"])()],B.prototype,"container",void 0),Object(s["a"])([Object(o["b"])()],B.prototype,"layer",void 0),Object(s["a"])([Object(o["b"])()],B.prototype,"timeExtent",void 0),Object(s["a"])([Object(o["b"])()],B.prototype,"type",void 0),Object(s["a"])([Object(o["b"])()],B.prototype,"view",void 0),Object(s["a"])([Object(o["b"])()],B.prototype,"updating",null),B=Object(s["a"])([Object(c["a"])("esri.views.2d.layers.imagery.VectorFieldView2D")],B);const V=B;var N=i("c802"),G=i("365a"),U=i("6c7a");let W=class extends(Object(N["a"])(Object(U["a"])(Object(u["a"])(G["a"])))){constructor(){super(...arguments),this._exportImageVersion=-1,this._highlightGraphics=new h["a"],this.subview=null}get pixelData(){return this.updating?null:"getPixelData"in this.subview?this.subview.getPixelData():null}get updating(){return!!(!this.subview||"updating"in this.subview&&this.subview.updating)}async hitTest(t,e){return this.subview?[this.subview.hitTest(t)]:null}update(t){var e;null==(e=this.subview)||e.update(t)}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.view&&(this._highlightView=new d["a"]({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new f["a"](this.view.featuresTilingScheme)}),this.container.addChild(this._highlightView.container)),this.handles.add([Object(a["e"])(()=>{var t;return null!=(t=this.layer.blendMode)?t:"normal"},t=>this.subview.container.blendMode=t,a["d"]),Object(a["e"])(()=>{var t;return null!=(t=this.layer.effect)?t:null},t=>this.subview.container.effect=t,a["d"]),Object(a["e"])(()=>this.layer.exportImageServiceParameters.version,t=>{t&&this._exportImageVersion!==t&&(this._exportImageVersion=t,this.requestUpdate())},a["c"]),Object(a["e"])(()=>this.timeExtent,t=>{this.subview.timeExtent=t,"redraw"in this.subview?this.requestUpdate():this.subview.redrawOrRefetch()},a["c"]),this.layer.on("redraw",()=>{"redraw"in this.subview?this.subview.redraw():this.subview.redrawOrRefetch()}),Object(a["e"])(()=>this.layer.renderer,()=>this._setSubView())],"imagerylayerview-update")}detach(){var t,e;this.layer.decreaseRasterJobHandlerUsage(),this.container.removeAllChildren(),this._detachSubview(this.subview),null==(t=this.subview)||t.destroy(),this.handles.remove("imagerylayerview-update"),this.subview=null,null==(e=this._highlightView)||e.destroy(),this._exportImageVersion=-1}moveStart(){}viewChange(){}moveEnd(){this.requestUpdate()}highlight(t,e){if(!((Array.isArray(t)?t[0]:n["a"].isCollection(t)?t.getItemAt(0):t)instanceof r["a"]))return{remove:()=>{}};let i=[];return Array.isArray(t)||n["a"].isCollection(t)?i=t.map(t=>t.clone()):t instanceof r["a"]&&(i=[t.clone()]),this._highlightGraphics.addMany(i),{remove:()=>{this._highlightGraphics.removeMany(i)}}}async doRefresh(){this.requestUpdate()}isUpdating(){return!this.subview||this.subview.updating}_setSubView(){var t;if(!this.view)return;const e=null==(t=this.layer.renderer)?void 0:t.type;let i="imagery";if("vector-field"===e&&"lerc"===this.layer.format?i="imageryVF":"flow"===e&&(i="flow"),this.subview){var s;if(this.subview.type===i)return this._attachSubview(this.subview),void("flow"===this.subview.type&&this.subview.redrawOrRefetch());this._detachSubview(this.subview),null==(s=this.subview)||s.destroy()}this.subview="imagery"===i?new M({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):"imageryVF"===i?new V({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):new l["a"]({layer:this.layer,layerView:this}),this._attachSubview(this.subview),this.requestUpdate()}_attachSubview(t){t&&!t.attached&&(t.attach(),t.attached=!0,this.container.addChildAt(t.container,0),t.container.blendMode=this.layer.blendMode,t.container.effect=this.layer.effect)}_detachSubview(t){null!=t&&t.attached&&(this.container.removeChild(t.container),t.detach(),t.attached=!1)}};Object(s["a"])([Object(o["b"])()],W.prototype,"pixelData",null),Object(s["a"])([Object(o["b"])({readOnly:!0})],W.prototype,"updating",null),Object(s["a"])([Object(o["b"])()],W.prototype,"subview",void 0),W=Object(s["a"])([Object(c["a"])("esri.views.2d.layers.ImageryLayerView2D")],W);const q=W},8332:function(t,e,i){"use strict";i.d(e,"a",(function(){return p})),i.d(e,"b",(function(){return h}));var s=i("b2b2"),r=i("a915"),n=i("a9a2"),a=i("8c81"),o=i("c84e"),c=i("3484");function h(t,e){if(!t||!e)return t;switch(e){case"radius":case"distance":return 2*t;case"diameter":case"width":return t;case"area":return Math.sqrt(t)}return t}function l(t){return{value:t.value,size:Object(r["j"])(t.size)}}function u(t){return t.map(t=>l(t))}function d(t){if("string"==typeof t||"number"==typeof t)return Object(r["j"])(t);const e=t;return{type:"size",expression:e.expression,stops:u(e.stops)}}const f=t=>{const e=[],i=[],s=u(t),n=s.length;for(let o=0;o<6;o++){const t=s[Math.min(o,n-1)];e.push(t.value),i.push(null==t.size?a["x"]:Object(r["g"])(t.size))}return{values:new Float32Array(e),sizes:new Float32Array(i)}};function p(t){const e=t&&t.length>0?{}:null,i=e?{}:null;if(!e)return{vvFields:e,vvRanges:i};for(const s of t)if(s.field&&(e[s.type]=s.field),"size"===s.type){i.size||(i.size={});const t=s;switch(Object(c["a"])(t)){case o["e"].SIZE_MINMAX_VALUE:i.size.minMaxValue={minDataValue:t.minDataValue,maxDataValue:t.maxDataValue,minSize:d(t.minSize),maxSize:d(t.maxSize)};break;case o["e"].SIZE_SCALE_STOPS:i.size.scaleStops={stops:u(t.stops)};break;case o["e"].SIZE_FIELD_STOPS:if(t.levels){const e={};for(const i in t.levels)e[i]=f(t.levels[i]);i.size.fieldStops={type:"level-dependent",levels:e}}else i.size.fieldStops={type:"static",...f(t.stops)};break;case o["e"].SIZE_UNIT_VALUE:i.size.unitValue={unit:t.valueUnit,valueRepresentation:t.valueRepresentation}}}else if("color"===s.type)i.color=y(s);else if("opacity"===s.type)i.opacity=m(s);else if("rotation"===s.type){const t=s;i.rotation={type:t.rotationType}}return{vvFields:e,vvRanges:i}}function m(t){const e={values:[0,0,0,0,0,0,0,0],opacities:[0,0,0,0,0,0,0,0]};if("string"==typeof t.field){if(!t.stops)return null;{if(t.stops.length>8)return null;const i=t.stops;for(let t=0;t<8;++t){const s=i[Math.min(t,i.length-1)];e.values[t]=s.value,e.opacities[t]=s.opacity}}}else{if(!(t.stops&&t.stops.length>=0))return null;{const i=t.stops&&t.stops.length>=0&&t.stops[0].opacity;for(let t=0;t<8;t++)e.values[t]=1/0,e.opacities[t]=i}}return e}function _(t,e,i){t[4*e+0]=i.r/255,t[4*e+1]=i.g/255,t[4*e+2]=i.b/255,t[4*e+3]=i.a}function y(t){if(Object(s["j"])(t))return null;if(t.normalizationField)return null;const e={field:null,values:[0,0,0,0,0,0,0,0],colors:[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]};if("string"==typeof t.field){if(!t.stops)return null;{if(t.stops.length>8)return null;e.field=t.field;const i=t.stops;for(let t=0;t<8;++t){const s=i[Math.min(t,i.length-1)];e.values[t]=s.value,_(e.colors,t,s.color)}}}else{if(!(t.stops&&t.stops.length>=0))return null;{const i=t.stops&&t.stops.length>=0&&t.stops[0].color;for(let t=0;t<8;t++)e.values[t]=1/0,_(e.colors,t,i)}}for(let i=0;i<32;i+=4)Object(n["b"])(e.colors,i,!0);return e}},"870c":function(t,e,i){"use strict";i.d(e,"a",(function(){return H}));var s=i("a4ee"),r=i("8d60"),n=i("9096"),a=i("477c"),o=i("59b2"),c=(i("b50f"),i("c120"),i("cea0"),i("d386")),h=i("2616"),l=i("c9ee"),u=i("c84e"),d=i("9a02");class f extends d["a"]{constructor(){super(...arguments),this.flowStyle=null}get requiresDedicatedFBO(){return!1}doRender(t){super.doRender(t)}prepareRenderPasses(t){const e=t.registerRenderPass({name:"flow",brushes:[l["a"]],target:()=>this.children,drawPhase:u["c"].MAP});return[...super.prepareRenderPasses(t),e]}}i("e06a");var p=i("fc29"),m=i("e92d"),_=i("38a4"),y=i("b2b2"),x=i("f4cc"),g=i("4ae5");const b=m["a"].getLogger("esri.views.2d.engine.flow.FlowDisplayData");class v{constructor(t,e,i,s){this.state={name:"created"},this.flowStyle=t,this.extent=e,this.size=i,this.pixelRatio=s}async load(){const t=new AbortController;this.state={name:"loading",abortController:t};const e=await this.flowStyle.loadResources({extent:this.extent,size:this.size,pixelRatio:this.pixelRatio},t.signal);this.state={name:"loaded",resources:e}}prepareForRendering(t){if("loaded"!==this.state.name)return void b.error("Only loaded resources can be attached.");const e=this.state.resources;e.prepareForRendering(t),this.state={name:"attached",resources:e}}destroy(){if("loading"===this.state.name)return this.state.abortController.abort(),void(this.state={name:"detached"});"attached"===this.state.name&&(this.state.resources.detach(),this.state={name:"detached"})}update(t){return!!this.flowStyle.areResourcesCompatible(t.flowStyle)&&(!(!this.extent.equals(t.extent)||this.size[0]!==t.size[0]||this.size[1]!==t.size[1]||this.pixelRatio!==t.pixelRatio)&&(this.flowStyle=t.flowStyle,!0))}}var O=i("1c92"),w=i("8c71"),j=i("7c4b");class M extends j["a"]{constructor(){super(...arguments),this._displayData=null}get displayData(){return this._displayData}set displayData(t){this._displayData=t,this.requestRender()}clear(){Object(y["k"])(this._displayData)&&(this._displayData.destroy(),this._displayData=null,this.requestRender())}setTransform(t){const{displayData:e}=this;if(Object(y["j"])(e))return;const i=e.extent.xmin,s=e.extent.ymax,r=[0,0];t.toScreen(r,[i,s]);const n=(e.extent.xmax-e.extent.xmin)/e.size[0]/t.resolution,a=Object(_["h"])(t.rotation),{dvs:o}=this.transforms;Object(O["k"])(o,[-1,1,0]),Object(O["d"])(o,o,[2/(t.size[0]*t.pixelRatio),-2/(t.size[1]*t.pixelRatio),1]),Object(O["c"])(o,o,[r[0],r[1],0]),Object(O["n"])(o,o,a),Object(O["d"])(o,o,[n*t.pixelRatio,n*t.pixelRatio,1])}_createTransforms(){return{dvs:Object(w["b"])()}}}var S=i("3af1");const T=1.15,R=m["a"].getLogger("esri.views.2d.engine.flow.FlowStrategy");let I=class extends p["a"]{constructor(t){super(t),this._flowDisplayObject=new M,this._loading=null}initialize(){this.flowContainer.addChild(this._flowDisplayObject)}destroy(){this._clear(),this.flowContainer.removeAllChildren()}get updating(){return null!=this._loading}update(t){const{flowStyle:e}=this.flowContainer;if(Object(y["j"])(e))return void this._clear();const{extent:i,rotation:s,resolution:r,pixelRatio:n}=t.state,a=C(i,s);a.expand(T);const o=[Math.round((a.xmax-a.xmin)/r),Math.round((a.ymax-a.ymin)/r)],c=new v(e,a,o,n);if(Object(y["k"])(this._loading)){if(this._loading.update(c))return;this._loading.destroy(),this._loading=null}!Object(y["j"])(this._flowDisplayObject.displayData)&&this._flowDisplayObject.displayData.update(c)||(c.load().then(()=>{this._flowDisplayObject.clear(),this._flowDisplayObject.displayData=this._loading,this._loading=null},t=>{Object(x["m"])(t)||(R.error("A resource failed to load.",t),this._loading=null)}),this._loading=c)}_clear(){this._flowDisplayObject.clear(),Object(y["k"])(this._loading)&&(this._loading.destroy(),this._loading=null)}};Object(s["a"])([Object(o["b"])()],I.prototype,"_loading",void 0),Object(s["a"])([Object(o["b"])()],I.prototype,"flowContainer",void 0),Object(s["a"])([Object(o["b"])()],I.prototype,"updating",null),I=Object(s["a"])([Object(c["a"])("esri.views.2d.engine.flow.FlowStrategy")],I);const D=I;function C(t,e){const i=new g["a"]({x:(t.xmax+t.xmin)/2,y:(t.ymax+t.ymin)/2,spatialReference:t.spatialReference}),s=t.xmax-t.xmin,r=t.ymax-t.ymin,n=Math.abs(Math.cos(Object(_["h"])(e))),a=Math.abs(Math.sin(Object(_["h"])(e))),o=n*s+a*r,c=a*s+n*r,h=new S["a"]({xmin:i.x-o/2,ymin:i.y-c/2,xmax:i.x+o/2,ymax:i.y+c/2,spatialReference:t.spatialReference});return h.centerAt(i),h}var P=i("7ce4"),E=i("d17d"),z=i("0fa6"),A=i("3f3e");const k=new Map;k.set("a_positionAndSide",0),k.set("a_timeInfo",1),k.set("a_extrude",2),k.set("a_speed",3);const L={geometry:[new A["a"]("a_positionAndSide",3,E["k"].FLOAT,0,36),new A["a"]("a_timeInfo",3,E["k"].FLOAT,12,36),new A["a"]("a_extrude",2,E["k"].FLOAT,24,36),new A["a"]("a_speed",1,E["k"].FLOAT,32,36)]};class F{constructor(t,e,i){this.values=i,this._vertexData=t,this._indexData=e}prepareForRendering(t){const e=P["a"].createVertex(t,E["D"].STATIC_DRAW,this._vertexData),i=P["a"].createIndex(t,E["D"].STATIC_DRAW,this._indexData),s=new z["a"](t,k,L,{geometry:e},i);this.vertexBuffer=e,this.indexBuffer=i,this.vertexArray=s,this._vertexData=null,this._indexData=null}detach(){this.vertexArray.dispose(),this.vertexBuffer.dispose(),this.indexBuffer.dispose()}get locations(){return k}}var B=i("a915");function V(t){const e=U(t),i=N(e),s=2*i,r=Math.round(Object(B["g"])(t.maxPathLength)/s)+1,n=i,a=10,o=W(t),c=q(t),{flowSpeed:h,trailLength:l,density:u}=t;return{lineRenderWidth:e,segmentLength:s,verticesPerLine:r,lineCollisionWidth:n,lineSpacing:a,lineColor:o,lineOpacity:c,lineSpeed:h,fadeDuration:l,density:u,smoothing:Object(B["g"])(t.smoothing),velocityScale:"flow-from"===t.flowRepresentation?1:-1,minWeightThreshold:.001,minSpeedThreshold:.001,maxTurnAngle:1,mergeLines:!0,interpolate:!0,profile:!1}}function N(t){return"constant"===t.kind?t.value[0]:t.values[t.values.length-1]}function G(t){const e=t.toRgba();return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function U(t){if(!t.hasVisualVariables("size"))return{kind:"constant",value:[Object(B["g"])(t.trailWidth)]};const e=t.getVisualVariablesForType("size")[0],i=[],s=[];let r;if(e.stops){for(const t of e.stops)i.push(t.value),s.push(t.size);r=e.stops.length}else i.push(e.minDataValue,e.maxDataValue),s.push(e.minSize,e.maxSize),r=2;return{kind:"ramp",stops:i,values:s,count:r}}function W(t){if(!t.hasVisualVariables("color"))return{kind:"constant",value:G(t.color)};const e=t.getVisualVariablesForType("color")[0],i=[],s=[];for(const r of e.stops)i.push(r.value),Array.prototype.push.apply(s,G(r.color));return{kind:"ramp",stops:i,values:s,count:e.stops.length}}function q(t){if(!t.hasVisualVariables("opacity"))return{kind:"constant",value:[1]};const e=t.getVisualVariablesForType("opacity")[0],i=[],s=[];for(const r of e.stops)i.push(r.value),s.push(r.opacity);return{kind:"ramp",stops:i,values:s,count:e.stops.length}}class K{constructor(t,e,i,s){this._loadImagery=t,this._createStreamlinesMesh=e,this._timeExtent=s,this._rendererSettings=V(i)}get animated(){return this._rendererSettings.lineSpeed>0}get renderSettings(){return this._rendererSettings}areResourcesCompatible(t){let e=!0;return e=e&&t._loadImagery===this._loadImagery,e=e&&t._createStreamlinesMesh===this._createStreamlinesMesh,e=e&&t._rendererSettings.verticesPerLine===this._rendererSettings.verticesPerLine,e=e&&t._rendererSettings.segmentLength===this._rendererSettings.segmentLength,e=e&&t._rendererSettings.lineSpacing===this._rendererSettings.lineSpacing,e=e&&t._rendererSettings.density===this._rendererSettings.density,e=e&&t._rendererSettings.smoothing===this._rendererSettings.smoothing,e=e&&t._rendererSettings.velocityScale===this._rendererSettings.velocityScale,e=e&&t._rendererSettings.minWeightThreshold===this._rendererSettings.minWeightThreshold,e=e&&t._rendererSettings.minSpeedThreshold===this._rendererSettings.minSpeedThreshold,e=e&&t._rendererSettings.mergeLines===this._rendererSettings.mergeLines,e=e&&t._rendererSettings.velocityScale===this._rendererSettings.velocityScale,e=e&&t._rendererSettings.interpolate===this._rendererSettings.interpolate,e=e&&t._rendererSettings.lineColor.kind===this._rendererSettings.lineColor.kind,e=e&&t._rendererSettings.lineOpacity.kind===this._rendererSettings.lineOpacity.kind,e=e&&t._rendererSettings.lineRenderWidth.kind===this._rendererSettings.lineRenderWidth.kind,e&&this._rendererSettings.mergeLines&&(e=t._rendererSettings.lineCollisionWidth===this._rendererSettings.lineCollisionWidth),e&&t._timeExtent!==this._timeExtent&&(e=!(!Object(y["k"])(t._timeExtent)||!Object(y["k"])(this._timeExtent))&&t._timeExtent.equals(this._timeExtent)),e}async loadResources(t,e){const{extent:i,size:s}=t;Object(x["v"])(e);const r=await this._loadImagery(i,s[0],s[1],this._timeExtent,e),{vertexData:n,indexData:a}=await this._createStreamlinesMesh(this._rendererSettings,r,e);return new F(n,a,{lineColor:this._rendererSettings.lineColor,lineOpacity:this._rendererSettings.lineOpacity,lineRenderWidth:this._rendererSettings.lineRenderWidth})}}let Z=class extends n["a"]{constructor(){super(...arguments),this._loadImagery=(t,e,i,s,r)=>Object(h["b"])(this.layer,t,e,i,s,r),this._createStreamlinesMesh=(t,e,i)=>this.layer.createStreamlinesMesh({flowData:e,rendererSettings:t},{signal:i}),this.attached=!1,this.container=null,this.layer=null,this.type="flow",this.timeExtent=null,this.redrawOrRefetch=async()=>{this._updateVisualization()}}get updating(){return!this._strategy||this._strategy.updating}attach(){const{layer:t}=this,e=()=>{this._loadImagery=(e,i,s,r,n)=>Object(h["b"])(t,e,i,s,r,n),this._updateVisualization()};"multidimensionalDefinition"in t?this.handles.add(Object(a["e"])(()=>t.multidimensionalDefinition,e)):this.handles.add([Object(a["e"])(()=>t.mosaicRule,e),Object(a["e"])(()=>t.renderingRule,e),Object(a["e"])(()=>t.definitionExpression,e)]),this.container=new f,this._strategy=new D({flowContainer:this.container}),this._updateVisualization()}detach(){this._strategy.destroy(),this.container.removeAllChildren(),this.container=null,this.handles.removeAll()}update(t){t.stationary?this._strategy.update(t):this.layerView.requestUpdate()}hitTest(t){return new r["a"]({attributes:{},geometry:t.clone(),layer:this.layer})}moveEnd(){}async doRefresh(){}_updateVisualization(){if("flow"!==this.layer.renderer.type)return;const t=new K(this._loadImagery,this._createStreamlinesMesh,this.layer.renderer,this.timeExtent);this.container.flowStyle=t,this.layerView.requestUpdate()}};Object(s["a"])([Object(o["b"])()],Z.prototype,"_strategy",void 0),Object(s["a"])([Object(o["b"])()],Z.prototype,"attached",void 0),Object(s["a"])([Object(o["b"])()],Z.prototype,"container",void 0),Object(s["a"])([Object(o["b"])()],Z.prototype,"layer",void 0),Object(s["a"])([Object(o["b"])()],Z.prototype,"layerView",void 0),Object(s["a"])([Object(o["b"])()],Z.prototype,"type",void 0),Object(s["a"])([Object(o["b"])()],Z.prototype,"updating",null),Object(s["a"])([Object(o["b"])()],Z.prototype,"timeExtent",void 0),Z=Object(s["a"])([Object(c["a"])("esri.views.2d.engine.flow.FlowView2D")],Z);const H=Z},"894c":function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var s=i("b2b2");class r{constructor(t,e,i){this.pixelBlock=t,this.extent=e,this.originalPixelBlock=i}get width(){return Object(s["k"])(this.pixelBlock)?this.pixelBlock.width:0}get height(){return Object(s["k"])(this.pixelBlock)?this.pixelBlock.height:0}render(t){const e=this.pixelBlock;if(Object(s["j"])(e))return;const i=this.filter({pixelBlock:e});if(Object(s["j"])(i.pixelBlock))return;const r=i.pixelBlock.getAsRGBA(),n=t.createImageData(i.pixelBlock.width,i.pixelBlock.height);n.data.set(r),t.putImageData(n,0,0)}getRenderedRasterPixels(){const t=this.filter({pixelBlock:this.pixelBlock});return Object(s["j"])(t.pixelBlock)?null:{width:t.pixelBlock.width,height:t.pixelBlock.height,renderedRasterPixels:new Uint8Array(t.pixelBlock.getAsRGBA().buffer)}}}},"89e8":function(t,e,i){"use strict";i.d(e,"a",(function(){return m}));var s=i("f57e"),r=i("a915"),n=i("ab39"),a=i("32dd"),o=i("a9a2"),c=i("8c81"),h=i("d114"),l=i("18c6"),u=i("6a2c"),d=i("44d1"),f=i("f75e");const p=5;class m extends(Object(d["a"])(f["a"])){constructor(t,e,i,s,o,u,d,f,m,_,y,x,g,b,v,O,w,j,M=!1,S,T){super(),this._xOffset=Object(r["g"])(g),this._yOffset=Object(r["g"])(b),this._decoration=_||"none",this._color=o,this._haloColor=u,this._haloSize=Math.min(Math.floor(p*Object(r["g"])(Object(r["j"])(i))),127),this._size=Math.min(Math.round(Object(r["g"])(e)),127);const R=Math.min(Math.round(Object(r["g"])(s||e)),127);this._referenceSize=Math.round(Math.sqrt(256*R)),this._scale=this._size/c["r"],this._angle=x,this._justify=Object(a["d"])(d||"center"),this._xAlignD=Object(a["e"])(d||"center"),this._yAlignD=Object(a["g"])(f||"baseline"),this._baseline="baseline"===(f||"baseline"),this._bitset=(m===n["a"].MAP?1:0)|(y?1:0)<<1;const I=l["e"].load(t);I.sdf=!0,this._materialKey=I.data,this._lineWidth=Object(r["g"])(v)||512,this._lineHeight=O||1,this._textPlacement=w,this._effects=j,this._isCIM=M,this._minMaxZoom=Object(h["a"])(Math.round(S*c["w"]),Math.round(T*c["w"]))}static fromText(t,e){const i=new m(t.materialKey,t.font.size,t.haloSize||0,t.font.size,t.color&&Object(o["d"])(t.color)||0,t.haloColor&&Object(o["d"])(t.haloColor)||0,t.horizontalAlignment,t.verticalAlignment,n["a"].SCREEN,t.font.decoration,!1,t.angle||0,t.xoffset,t.yoffset,t.lineWidth,t.lineHeight,null,null,!1,u["b"],u["a"]),[,r]=Object(s["a"])(t.text);return i.bindTextInfo(e,r),i._vertexBoundsScale=t.maxVVSize?t.maxVVSize/t.font.size:1,i}static fromCIMText(t,e,i){const r=t.scaleFactor||1,n=t.size*t.sizeRatio*r,[a,c]=Object(u["e"])(t.scaleInfo,i),h=new m(t.materialKey,n,t.outlineSize*t.sizeRatio,t.referenceSize,Object(o["c"])(t.color),Object(o["c"])(t.outlineColor),t.horizontalAlignment,t.verticalAlignment,t.alignment,t.decoration,t.colorLocked,t.angle,t.offsetX*t.sizeRatio*r,t.offsetY*t.sizeRatio*r,512,1,t.markerPlacement,t.effects,!0,a,c),[,l]=Object(s["a"])(t.text);return h.bindTextInfo(e,l),h._vertexBoundsScale=t.maxVVSize?t.maxVVSize/n:1,h}}},"92f2":function(t,e,i){"use strict";i.d(e,"a",(function(){return x}));var s=i("6f2d"),r=i("1c92"),n=i("8c71"),a=i("738e"),o=i("47f8"),c=i("a8d5"),h=i("7c4b"),l=i("c8dd"),u=i("7ce4"),d=i("d17d"),f=i("0fa6");const p=Math.PI/180,m=4;class _ extends h["a"]{constructor(t){super(),this._dvsMat3=Object(n["b"])(),this._localOrigin={x:0,y:0},this._getBounds=t}destroy(){this._vao&&(this._vao.dispose(!0),this._vao=null,this._vertexBuffer=null,this._indexBuffer=null),this._program&&(this._program.dispose(),this._program=null)}doRender(t){const{context:e}=t,i=this._getBounds();if(i.length<1)return;this._createShaderProgram(e),this._updateMatricesAndLocalOrigin(t),this._updateBufferData(e,i),e.setBlendingEnabled(!0),e.setDepthTestEnabled(!1),e.setStencilWriteMask(0),e.setStencilTestEnabled(!1),e.setBlendFunction(d["b"].ONE,d["b"].ONE_MINUS_SRC_ALPHA),e.setColorMask(!0,!0,!0,!0);const s=this._program;e.bindVAO(this._vao),e.useProgram(s),s.setUniformMatrix3fv("u_dvsMat3",this._dvsMat3),e.gl.lineWidth(1),e.drawElements(d["r"].LINES,8*i.length,d["k"].UNSIGNED_INT,0),e.bindVAO()}_createTransforms(){return{dvs:Object(n["b"])()}}_createShaderProgram(t){if(this._program)return;const e="precision highp float;\n uniform mat3 u_dvsMat3;\n\n attribute vec2 a_position;\n\n void main() {\n mediump vec3 pos = u_dvsMat3 * vec3(a_position, 1.0);\n gl_Position = vec4(pos.xy, 0.0, 1.0);\n }",i="precision mediump float;\n void main() {\n gl_FragColor = vec4(0.75, 0.0, 0.0, 0.75);\n }";this._program=t.programCache.acquire(e,i,y().attributes)}_updateMatricesAndLocalOrigin(t){const{state:e}=t,{displayMat3:i,size:s,resolution:n,pixelRatio:h,rotation:l,viewpoint:u}=e,d=p*l,{x:f,y:m}=u.targetGeometry,_=Object(c["b"])(f,e.spatialReference);this._localOrigin.x=_,this._localOrigin.y=m;const y=h*s[0],x=h*s[1],g=n*y,b=n*x,v=Object(r["b"])(this._dvsMat3);Object(r["l"])(v,v,i),Object(r["c"])(v,v,Object(a["b"])(y/2,x/2)),Object(r["d"])(v,v,Object(o["d"])(s[0]/g,-x/b,1)),Object(r["n"])(v,v,-d)}_updateBufferData(t,e){const{x:i,y:s}=this._localOrigin,r=2*m*e.length,n=new Float32Array(r),a=new Uint32Array(8*e.length);let o=0,c=0;for(const h of e)h&&(n[2*o+0]=h[0]-i,n[2*o+1]=h[1]-s,n[2*o+2]=h[0]-i,n[2*o+3]=h[3]-s,n[2*o+4]=h[2]-i,n[2*o+5]=h[3]-s,n[2*o+6]=h[2]-i,n[2*o+7]=h[1]-s,a[c+0]=o+0,a[c+1]=o+3,a[c+2]=o+3,a[c+3]=o+2,a[c+4]=o+2,a[c+5]=o+1,a[c+6]=o+1,a[c+7]=o+0,o+=4,c+=8);if(this._vertexBuffer?this._vertexBuffer.setData(n.buffer):this._vertexBuffer=u["a"].createVertex(t,d["D"].DYNAMIC_DRAW,n.buffer),this._indexBuffer?this._indexBuffer.setData(a):this._indexBuffer=u["a"].createIndex(t,d["D"].DYNAMIC_DRAW,a),!this._vao){const e=y();this._vao=new f["a"](t,e.attributes,e.bufferLayouts,{geometry:this._vertexBuffer},this._indexBuffer)}}}const y=()=>Object(l["g"])("bounds",{geometry:[{location:0,name:"a_position",count:2,type:d["k"].FLOAT}]});class x extends s["a"]{constructor(t){super(t),this.hasHighlight=()=>!0}destroy(){super.destroy(),this._boundsRenderer&&(this._boundsRenderer.destroy(),this._boundsRenderer=null)}enableRenderingBounds(t){this._boundsRenderer=new _(t),this.requestRender()}get hasLabels(){return!1}onTileData(t,e){t.patch(e),this.contains(t)||this.addChild(t),this.requestRender()}onTileError(t){t.clear(),this.contains(t)||this.addChild(t)}_renderChildren(t,e){for(const i of this.children)i.isReady&&i.hasData&&(i.commit(t),t.context.setStencilFunction(d["h"].EQUAL,i.stencilRef,255),i._displayList.replay(t,i,e))}}},"97cb":function(t,e,i){"use strict";i.d(e,"a",(function(){return r})),i.d(e,"b",(function(){return s}));const s=(t,e)=>t&&((...t)=>e.warn("DEBUG:",...t))||(()=>null),r=!1},"9a02":function(t,e,i){"use strict";i.d(e,"a",(function(){return R}));i("c120");var s=i("b2b2"),r=i("8c71"),n=i("3b1a"),a=i("00c0"),o=i("ce50"),c=i("e92d"),h=i("7c4b"),l=i("9812"),u=i("3349"),d=i("02f1"),f=i("6655"),p=i("8152"),m=i("d114"),_=i("7ce4"),y=i("d17d");const x=c["a"].getLogger("esri.views.2d.engine.webgl.Mesh2D"),g=t=>{switch(t.BYTES_PER_ELEMENT){case 1:return y["k"].UNSIGNED_BYTE;case 2:return y["k"].UNSIGNED_SHORT;case 4:return y["k"].UNSIGNED_INT;default:throw new o["a"]("Cannot get DataType of array")}},b=(t,e,i,s)=>{let r=0;for(let n=1;n0:r<0},v=({coords:t,lengths:e},i)=>{const s=[];for(let r=0,n=0;r({...i,[s]:_["a"].createVertex(t,e,this.vertices[s])}),{})),this._cache.vertexBuffers}}var w=i("0fa6");const j=c["a"].getLogger("esri.views.2d.engine.webgl.ClippingInfo"),M=t=>parseFloat(t)/100;class S extends h["a"]{constructor(t,e){super(),this._clip=e,this._cache={},this.stage=t,this._handle=e.watch("version",()=>this._invalidate()),this.ready()}static fromClipArea(t,e){return new S(t,e)}_destroyGL(){Object(s["k"])(this._cache.mesh)&&(this._cache.mesh.destroy(),this._cache.mesh=null),Object(s["k"])(this._cache.vao)&&(this._cache.vao.dispose(),this._cache.vao=null)}destroy(){this._destroyGL(),this._handle.remove()}getVAO(t,e,i,r){const[n,a]=e.size;if("geometry"!==this._clip.type&&this._lastWidth===n&&this._lastHeight===a||(this._lastWidth=n,this._lastHeight=a,this._destroyGL()),Object(s["j"])(this._cache.vao)){const s=this._createMesh(e,this._clip),n=s.getIndexBuffer(t),a=s.getVertexBuffers(t);this._cache.mesh=s,this._cache.vao=new w["a"](t,i,r,a,n)}return this._cache.vao}_createTransforms(){return{dvs:Object(r["b"])()}}_invalidate(){this._destroyGL(),this.requestRender()}_createScreenRect(t,e){const[i,s]=t.size,r="string"==typeof e.left?M(e.left)*i:e.left,n="string"==typeof e.right?M(e.right)*i:e.right,a="string"==typeof e.top?M(e.top)*s:e.top,o="string"==typeof e.bottom?M(e.bottom)*s:e.bottom,c=r,h=a;return{x:c,y:h,width:Math.max(i-n-c,0),height:Math.max(s-o-h,0)}}_createMesh(t,e){switch(e.type){case"rect":return O.fromRect(this._createScreenRect(t,e));case"path":return O.fromPath(e);case"geometry":return O.fromGeometry(t,e);default:return j.error(new o["a"]("mapview-bad-type","Unable to create ClippingInfo mesh from clip of type: ${clip.type}")),O.fromRect({x:0,y:0,width:1,height:1})}}}var T=i("c84e");class R extends a["a"]{constructor(){super(...arguments),this.name=this.constructor.name}set clips(t){this._clips=t,this.children.forEach(e=>e.clips=t),this._updateClippingInfo()}_createTransforms(){return{dvs:Object(r["b"])()}}doRender(t){const e=this.createRenderParams(t),{painter:i,globalOpacity:s,profiler:r,drawPhase:n}=e,a=n===T["c"].LABEL||n===T["c"].HIGHLIGHT?1:s*this.computedOpacity;r.recordContainerStart(this.name),i.beforeRenderLayer(e,this._clippingInfos?255:0,a),this.updateTransforms(t.state),this.renderChildren(e),i.compositeLayer(e,a),r.recordContainerEnd()}renderChildren(t){Object(s["j"])(this._renderPasses)&&(this._renderPasses=this.prepareRenderPasses(t.painter));for(const i of this.children)i.beforeRender(t);for(const i of this._renderPasses)try{i.render(t)}catch(e){}for(const i of this.children)i.afterRender(t)}createRenderParams(t){return t.requireFBO=this.requiresDedicatedFBO,t}prepareRenderPasses(t){return[t.registerRenderPass({name:"clip",brushes:[n["a"].clip],target:()=>this._clippingInfos,drawPhase:T["c"].MAP|T["c"].LABEL|T["c"].LABEL_ALPHA|T["c"].DEBUG|T["c"].HIGHLIGHT})]}updateTransforms(t){for(const e of this.children)e.setTransform(t)}onAttach(){super.onAttach(),this._updateClippingInfo()}onDetach(){super.onDetach(),this._updateClippingInfo()}_updateClippingInfo(){if(Object(s["k"])(this._clippingInfos)&&(this._clippingInfos.forEach(t=>t.destroy()),this._clippingInfos=null),!this.stage)return;const t=this._clips;Object(s["k"])(t)&&t.length&&(this._clippingInfos=t.items.map(t=>S.fromClipArea(this.stage,t))),this.requestRender()}}},"9f6d":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var s=i("b2b2"),r=i("8c81");const n=2147483647;class a{constructor(t){this._head=t,this._cursor=t}static from(t,e=0,i=t.byteLength/o.BYTES_PER_RECORD-e){const s=new o(new Int32Array(t,e*o.BYTES_PER_RECORD,i*o.ELEMENTS_PER_RECORD));return new a(s)}size(){let t=this._cursor,e=0;for(;t;)e+=t.size(),t=t._link;return e}get id(){return this._cursor.id}set id(t){this._cursor.id=t}get materialKey(){return this._cursor.materialKey}set materialKey(t){this._cursor.materialKey=t}get insertAfter(){return this._cursor.insertAfter}get indexFrom(){return this._cursor.indexFrom}set indexFrom(t){this._cursor.indexFrom=t}get indexCount(){return this._cursor.indexCount}set indexCount(t){this._cursor.indexCount=t}get vertexFrom(){return this._cursor.vertexFrom}set vertexFrom(t){this._cursor.vertexFrom=t}get vertexCount(){return this._cursor.vertexCount}set vertexCount(t){this._cursor.vertexCount=t}get sortKey(){return this._cursor.sortKey}set sortKey(t){this._cursor.sortKey=t}get index(){return this._cursor._indexStart+this._cursor._index}seekIndex(t){let e=t;for(this._cursor=this._head;this._cursor;){const t=this._cursor.size();if(e=this._packedRecords.length?0:this._packedRecords[t]}getCursor(){return this.copy()}copy(){const t=new o(this._packedRecords);return t._indexStart=this._indexStart,t._link=this._link,t._index=this._index,t._offsets=this._offsets,t._deletedCount=this._deletedCount,t}}o.ELEMENTS_PER_RECORD=r["n"],o.BYTES_PER_RECORD=o.ELEMENTS_PER_RECORD*Int32Array.BYTES_PER_ELEMENT},a015:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));i("ee0e");function s(t,e,i,s){const r=t.clone(),n=1<=n?(r.col=a-n,r.world+=1):r.col=a,r.row=o,r}},a8b5:function(t,e,i){"use strict";i.d(e,"a",(function(){return m}));var s=i("b2b2"),r=i("a915"),n=i("2c63"),a=i("738e"),o=i("ab39"),c=i("a9a2"),h=i("8c81"),l=i("d114"),u=i("18c6"),d=i("6a2c"),f=i("f93c"),p=i("f75e");class m extends(Object(f["a"])(p["a"])){constructor(t,e,i,s,r,c,d,f,p,m,_,y,x,g,b,v,O,w,j,M,S,T,R){super(),this.angle=s,this.height=d,this.width=c,this.xOffset=e*j,this.yOffset=i*j,this._markerPlacement=M,this._effects=S,this._anchorX=.5-(.5+v)*b.width/b.width,this._anchorY=.5-(.5+O)*b.height/b.height,this._minMaxZoom=Object(l["a"])(Math.round(T*h["w"]),Math.round(R*h["w"]));const I=(g===o["a"].MAP?h["i"]:h["j"])|(_?h["g"]:0)|(x?h["k"]:0)|(y?h["l"]:0),D=b&&b.sdf,C=u["d"].load(t);C.sdf=D,C.pattern=!0,C.textureBinding=b.textureBinding,this._materialKey=C.data,this._fillColor=r,this._outlineColor=p,this._sizeOutlineWidth=Object(l["b"])(Math.round(Math.min(Math.sqrt(128*c),255)),Math.round(Math.min(Math.sqrt(128*d),255)),Math.round(Math.min(Math.sqrt(128*m),255)),Math.round(Math.min(Math.sqrt(128*f),255)));const P=b.rect.x+h["A"],E=b.rect.y+h["A"],z=P+b.width,A=E+b.height;this._offsets.xUpperLeft=P,this._offsets.yUpperLeft=E,this._offsets.xUpperRight=z,this._offsets.yUpperRight=E,this._offsets.xBottomLeft=P,this._offsets.yBottomLeft=A,this._offsets.xBottomRight=z,this._offsets.yBottomRight=A,this._texUpperLeft=Object(l["a"])(P,E),this._texUpperRight=Object(l["a"])(z,E),this._texBottomLeft=Object(l["a"])(P,A),this._texBottomRight=Object(l["a"])(z,A),c*=w,d*=w,c*=j,d*=j;const k=Math.round(64*w);this._bitestAndDistRatio=Object(l["a"])(I,k),this._computedWidth=c,this._computedHeight=d;const L=Object(a["a"])(),F=Object(n["a"])();this._applyTransformation(F,L)}static fromCIMMarker(t,e,i){const n=e&&e.width||1,a=e&&e.height||1,h=t.size,l=n/a*t.scaleX,u=t.scaleSymbolsProportionally&&t.frameHeight?h/t.frameHeight:1;let f=Object(c["c"])(t.color);const p=Object(c["c"])(t.outlineColor),_=Object(r["g"])(h),y=_*l,x=Object(r["g"])(t.offsetX||0),g=Object(r["g"])(t.offsetY||0),b=Object(r["g"])(t.outlineWidth||0)*u,v=t.alignment||o["a"].SCREEN,O=Object(r["g"])(t.referenceSize),[w,j]=Object(d["e"])(t.scaleInfo,i);e.sdf||0!==f||(f=-1);let M=t.rotation||0;t.rotateClockwise||(M=-M);let S=0,T=0;const R=t.anchorPoint;R&&(t.isAbsoluteAnchorPoint?h&&(S=-R.x/(h*l),T=R.y/h):(S=R.x,T=R.y));const I=new m(t.materialKey,x,g,M,f,y,_,O,p,b,t.colorLocked,t.scaleSymbolsProportionally,!1,v,e,S,T,t.sizeRatio,Object(s["u"])(t.scaleFactor,1),t.markerPlacement,t.effects,w,j);return I._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/y:1,I._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/_:1,I}static fromPictureMarker(t,e){const i=Math.round(Object(r["g"])(t.width)),s=Math.round(Object(r["g"])(t.height)),n=h["z"],a=Math.round(Object(r["g"])(t.xoffset||0)),c=Math.round(Object(r["g"])(t.yoffset||0)),l=new m(t.materialKey,a,c,t.angle,n,i,s,s,0,0,!1,!1,!1,o["a"].SCREEN,e,0,0,1,1,null,null,d["b"],d["a"]);return l._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/t.width:1,l._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/t.height:1,l}static fromSimpleMarker(t,e){const i=Object(c["d"])(t.color),s=Math.round(Object(r["g"])(t.size)),n=s,a=Math.round(Object(r["g"])(t.xoffset||0)),h=Math.round(Object(r["g"])(t.yoffset||0)),l=t.style,u=t.outline,f=0|(u&&u.color&&Object(c["d"])(u.color)),p=0|(u&&u.width&&Math.round(Object(r["g"])(u.width))),_=new m(t.materialKey,a,h,t.angle,i,s,n,n,f,p,!1,!1,"esriSMSCross"===l||"esriSMSX"===l,o["a"].SCREEN,e,0,0,126/64,1,null,null,d["b"],d["a"]);return _.boundsType="esriSMSCircle"===l?"circle":"square",_._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/t.size:1,_._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/t.size:1,_}static fromLineSymbolMarker(t,e){const i=Object(c["d"])(t.color),s=6,n=Math.round(Object(r["g"])(s*t.lineWidth)),a=n,h="cross"===t.style||"x"===t.style;let l;switch(t.placement){case"begin-end":l=o["e"].Both;break;case"begin":l=o["e"].JustBegin;break;case"end":l=o["e"].JustEnd;break;default:l=o["e"].None}const u={type:"CIMMarkerPlacementAtExtremities",angleToLine:!0,offset:0,extremityPlacement:l,offsetAlongLine:0},f=new m(t.materialKey,0,0,0,i,n,a,a/s,i,h?Math.round(Object(r["g"])(t.lineWidth)):0,!1,!1,h,o["a"].MAP,e,0,0,126/64,1,u,null,d["b"],d["a"]);return f.boundsType="circle"===t.style?"circle":"square",f}}},ad73:function(t,e,i){"use strict";i.d(e,"a",(function(){return a})),i.d(e,"b",(function(){return n}));var s=i("b2b2"),r=i("c1da");async function n(t,e=t.popupTemplate){if(!Object(s["k"])(e))return[];const i=await e.getRequiredFields(t.fieldsIndex),{lastEditInfoEnabled:n}=e,{objectIdField:a,typeIdField:o,globalIdField:c,relationships:h}=t;if(i.includes("*"))return["*"];const l=n?await Object(r["n"])(t):[],u=Object(r["j"])(t.fieldsIndex,[...i,...l]);return o&&u.push(o),u&&a&&t.fieldsIndex.has(a)&&-1===u.indexOf(a)&&u.push(a),u&&c&&t.fieldsIndex.has(c)&&-1===u.indexOf(c)&&u.push(c),h&&h.forEach(e=>{const{keyField:i}=e;u&&i&&t.fieldsIndex.has(i)&&-1===u.indexOf(i)&&u.push(i)}),u}function a(t,e){return t.popupTemplate?t.popupTemplate:Object(s["k"])(e)&&e.defaultPopupTemplateEnabled&&Object(s["k"])(t.defaultPopupTemplate)?t.defaultPopupTemplate:null}},b4e0:function(t,e,i){"use strict";i.d(e,"a",(function(){return Z})),i.d(e,"b",(function(){return v})),i.d(e,"c",(function(){return G})),i.d(e,"d",(function(){return V})),i.d(e,"e",(function(){return k})),i.d(e,"f",(function(){return B})),i.d(e,"g",(function(){return b})),i.d(e,"h",(function(){return z})),i.d(e,"i",(function(){return j})),i.d(e,"j",(function(){return O})),i.d(e,"k",(function(){return u})),i.d(e,"l",(function(){return q})),i.d(e,"m",(function(){return K}));i("e06a");var s=i("ce50"),r=i("b2b2"),n=i("8048"),a=i("9415"),o=i("8188"),c=i("3af1"),h=i("4ae5"),l=i("5996");function u(t,e,i){return!Object(o["b"])(t,e,i)}function d(t,e,i){const r=u(t,e,i);if(r&&!Object(o["h"])())throw new s["a"]("rasterprojectionhelper-project","projection engine is not loaded");return r}const f=function(t,e,i,s=0){if(1===i[0])return[0,0];let r=1,n=-1,a=1,o=-1;for(let _=0;_t[_]?t[_]:r,n=n>t[_]?n:t[_],a=a>t[_+1]?t[_+1]:a,o=o>t[_+1]?o:t[_+1]);const{cols:c,rows:h}=e,l=(n-r)/c/i[0],u=(o-a)/h/i[1],d=2*s;let f=0,p=!1,m=[0,0];for(let _=0;_f&&(f=n+a,m=[n,a]),d&&f>d){p=!0;break}}if(p)break}return m},p={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},m=32,_=4,y=_,x=new Map,g=new Map;async function b(){if(Object(o["h"])())return null;await Object(o["i"])()}function v(t,e,i){return d(t.spatialReference,e)?i?Object(o["f"])(e,t.spatialReference,t):Object(o["f"])(t.spatialReference,e,t):null}function O(t,e,i,s=null){const a=t.spatialReference;if(a.equals(e))return t;d(a,e,s);const h=i.center,l=new c["a"]({xmin:h.x-t.x/2,xmax:h.x+t.x/2,ymin:h.y-t.y/2,ymax:h.y+t.y/2,spatialReference:a}),u=Object(o["m"])(l,e,s);if(Object(r["j"])(u))return null;const f={x:u.xmax-u.xmin,y:u.ymax-u.ymin},p=k(e);if(Object(r["k"])(p)&&f.x>=p){const i=Object(n["f"])(a)/Object(n["f"])(e);f.x=t.x*i,f.y=t.y*i}return f}function w(t,e=.01){return Object(n["f"])(t)?e/Object(n["f"])(t):0}function j(t,e,i=null,s=!0){const n=t.spatialReference;if(n.equals(e))return t;d(n,e,i);const a=Object(o["m"])(t,e,i);if(!s||!a)return a;const c=L(n,!0),h=L(e,!0),l=w(n);return l&&Object(r["k"])(c)&&Object(r["k"])(h)&&(a.x>0&&Math.abs(t.x-c[0])new h["a"](e[0],e[1],t.inSR));return Object(o["m"])(i,t.outSR,t.datumTransformation).map(t=>t?[t.x,t.y]:[NaN,NaN])}function T(t){const{inSR:e,outSR:i,datumTransformation:s}=t,n=I(e),{points:o,mask:c}=C(t,n);if(!e.isGeographic){const t=e.wkid?a["a"].coordsys(e.wkid):a["a"].fromString(e.isGeographic?a["b"].PE_TYPE_GEOGCS:a["b"].PE_TYPE_PROJCS,e.wkt);a["c"].projToGeog(t,o.length,o)}if(Object(r["k"])(s)&&s.steps.length&&s.steps.forEach(t=>{const e=t.wkid?a["a"].geogtran(t.wkid):a["a"].fromString(a["b"].PE_TYPE_GEOGTRAN,t.wkt);a["d"].geogToGeog(e,o.length,o,null,t.isInverse?a["b"].PE_TRANSFORM_2_TO_1:a["b"].PE_TRANSFORM_1_TO_2)}),!i.isGeographic){const t=I(i,!0),e=Object(r["k"])(t)&&t.isEnvelope?[t.bbox[1],t.bbox[3]]:[-90,90];P(o,e);const s=i.wkid?a["a"].coordsys(i.wkid):a["a"].fromString(i.isGeographic?a["b"].PE_TYPE_GEOGCS:a["b"].PE_TYPE_PROJCS,i.wkt);a["c"].geogToProj(s,o.length,o)}let h=o;if(c&&o.length!==c.length){h=[];for(let t=0,e=0;t1===t.getInclusive()&&1===t.getKind());if(!o){if(o=r.find(t=>1===t.getInclusive()&&0===t.getKind()),!o)return null;n=!0}const c=s.isPannableRectangle(),h=o.getCoord();if(n)return{isEnvelope:n,isPannable:c,vertices:h,coef:null,bbox:[h[0][0]-e,h[0][1]-e,h[1][0]+e,h[1][1]+e]};let l=0;const u=[];let[d,f]=h[0],[p,m]=h[0];for(let a=0,_=h.length;a<_;a++){l++,l===_&&(l=0);const[t,e]=h[a],[i,s]=h[l];if(s===e)u.push([t,i,e,s,2]);else{const r=(i-t)/(s-e||1e-4),n=t-r*e;et?p:t,m=m>e?m:e}return{isEnvelope:!1,isPannable:c,vertices:h,coef:u,bbox:[d,f,p,m]}}function C(t,e){const i=[],{cols:s,rows:n,xres:a,yres:o,usePixelCenter:c}=t;let{xmin:h,ymax:l}=t;if(c&&(h+=a/2,l-=o/2),!Object(r["k"])(e)){for(let t=0;t=t&&s<=c;for(let t=0;t=r&&e<=d&&(i.push([s,e]),u[p]=1)}}return{points:i,mask:u}}const{coef:d}=e,f=[];for(let r=0;r=a&&t<=o){const r=s*t+n;e.push(r),i.push(c)}}let s=e;if(e.length>2){let t=2===i[0]?0:i[0],r=e[0];s=[];for(let n=1;nt-e)}else e[0]>e[1]&&(s=[e[1],e[0]]);f.push(s)}for(let r=0,p=0;r=r[0]&&t<=r[1]&&(i.push([t,s]),u[p]=1);else if(r.length>2){let e=!1;for(let i=0;i=r[i]&&t<=r[i+1]){e=!0;break}e&&(i.push([t,s]),u[p]=1)}}}return{points:i,mask:u}}function P(t,e){const[i,s]=e;for(let r=0;rs)&&(t[r]=[NaN,NaN])}}function E(t){const e=k(t[0].spatialReference);if(t.length<2||!Object(r["k"])(e))return t[0];let{xmin:i,xmax:s,ymin:n,ymax:a}=t[0];for(let r=1;rw(t.spatialReference)){const{xmin:e,xmax:i}=t;for(let s=0;s<=n;s++){const r=0===s?e:-a/2,o=s===n?i-a*s:a/2;h[s]=new c["a"]({xmin:r,xmax:o,ymin:t.ymin,ymax:t.ymax,spatialReference:t.spatialReference})}}return E(h.map(t=>A(t,e,i,s)).filter(t=>!!t))}function A(t,e,i=null,s=!0,n=!0){const a=t.spatialReference;if(a.equals(e))return t;d(a,e,i);const c=Object(o["m"])(t,e,i);if(n&&e.isWebMercator&&c&&(c.ymax=Math.min(20037508.342787,c.ymax),c.ymin=Math.max(-20037508.342787,c.ymin),c.ymin>=c.ymax))return null;if(!s||!c)return c;const l=L(a,!0),u=L(e,!0);if(Object(r["j"])(l)||Object(r["j"])(u))return c;const f=w(a,.001),p=w(a,500),m=w(e,.001);if(Math.abs(c.xmin-u[0])p){c.xmin=u[0];const s=[];s.push(new h["a"](t.xmax,t.ymin,a)),s.push(new h["a"](t.xmax,(t.ymin+t.ymax)/2,a)),s.push(new h["a"](t.xmax,t.ymax,a));const r=s.map(t=>j(t,e,i)).filter(t=>!isNaN(null==t?void 0:t.x)).map(t=>t.x);c.xmax=Math.max.apply(null,r)}if(rp){c.xmax=u[1];const s=[];s.push(new h["a"](t.xmin,t.ymin,a)),s.push(new h["a"](t.xmin,(t.ymin+t.ymax)/2,a)),s.push(new h["a"](t.xmin,t.ymax,a));const r=s.map(t=>j(t,e,i)).filter(t=>!isNaN(null==t?void 0:t.x)).map(t=>t.x);c.xmin=Math.min.apply(null,r)}}else{const t=w(e,.001);Math.abs(c.xmin-u[0])0&&s.outofBoundPointCounty)&&(u(h,l,t.datumTransformation)&&(h.isGeographic||Object(r["k"])(I(h))),i=[_,_],s=U({...t,spacing:i}),n={cols:s.size[0]+1,rows:s.size[1]+1},o=f(s.offsets,n,i,y)),s.error=o,i[0]>1&&(s.coefficients=W(s.offsets,n,a)),t.includeGCSGrid&&!h.isGeographic&&!h.isWebMercator)if(l.isGeographic)s.gcsGrid={offsets:s.offsets,coefficients:s.coefficients,spacing:i};else{const e=I(h);if(Object(r["k"])(e)&&!e.isEnvelope){const e=N(h),r=z(t.projectedExtent,e),{offsets:o}=U({...t,srcBufferExtent:r,spacing:i}),c=W(o,n,a);s.gcsGrid={offsets:o,coefficients:c,spacing:i}}}return s}function U(t){const{projectedExtent:e,srcBufferExtent:i,pixelSize:s,datumTransformation:n,rasterTransform:a}=t,o=e.spatialReference,c=i.spatialReference;d(o,c);const{xmin:l,ymin:u,xmax:f,ymax:p}=e,y=k(c),x=Object(r["k"])(y)&&(t.hasWrapAround||"gcs-shift"===(null==a?void 0:a.type)),g=t.spacing||[m,m],b=g[0]*s.x,v=g[1]*s.y,O=1===g[0],j=Math.ceil((f-l)/b-.1/g[0])+(O?0:1),S=Math.ceil((p-u)/v-.1/g[1])+(O?0:1),T=M({cols:j,rows:S,xmin:l,ymax:p,xres:b,yres:v,inSR:o,outSR:c,datumTransformation:n,preferPE:g[0]<=_,usePixelCenter:O}),R=[];let I,D=0;const C=O?-1:NaN,{xmin:P,xmax:E,ymax:z,width:A,height:L}=i,F=w(c,500);for(let r=0;rE&&i[0]>y/2-F&&(i[0]-=y),!i||isNaN(i[0])||isNaN(i[1]))R.push(C),R.push(C),t.push(null),D++;else{if(a){const t=a.inverseTransform(new h["a"]({x:i[0],y:i[1],spatialReference:c}));i=[t.x,t.y]}t.push(i),r>0&&x&&I[e]&&i[0]=l)a=c.length,o=s/l>8;else{let t,e=u;for(let r=1;r<=c.length;r++){if(t=(c[r-1].x+c[r-1].y)/2,s<=t){s===t?a=r:"down"===i?(a=r-1,o=s/e>8):a="up"===i||s-e>t-s||s/e>2?r:r-1;break}e=t}}const d=0===a?n:c[a-1];return{pyramidLevel:a,pyramidResolution:new h["a"]({x:d.x,y:d.y,spatialReference:e.spatialReference}),excessiveReading:o}}const l=Math.log(t.x/n.x)/Math.LN2,u=Math.log(t.y/n.y)/Math.LN2,d=e.storageInfo.maximumPyramidLevel||0;a="down"===i?Math.floor(Math.min(l,u)):"up"===i?Math.ceil(Math.max(l,u)):Math.round((l+u)/2),a<0?a=0:a>d&&(o=a>d+3,a=d);const f=2**a;return{pyramidLevel:a,pyramidResolution:new h["a"]({x:f*e.nativePixelSize.x,y:f*e.nativePixelSize.y,spatialReference:e.spatialReference}),excessiveReading:o}}function Z(t,e,i=512,s=!0){const{extent:r,spatialReference:a,pixelSize:o}=t,c=O(new h["a"]({x:o.x,y:o.y,spatialReference:a}),e,r);if(null==c)return{projectedPixelSize:null,scales:null,srcResolutions:null,isCustomTilingScheme:!1};const l=(c.x+c.y)/2,u=Object(n["f"])(e),d=l*u*96*39.37,f=e.isGeographic?256/i*295828763.7958547:256/i*591657527.591555;let p="vector-magdir"===t.dataType||"vector-uv"===t.dataType;const m=z(r,e);p||s&&(e.isGeographic||e.isWebMercator)&&(p=m.xmin*m.xmax<0);let _,y=d;const x=1.001;if(p){y=f;const t=e.isGeographic?1341104507446289e-21:.29858214164761665,i=t*(96*u*39.37),s=e.isGeographic?4326:3857;_=O(new h["a"]({x:t,y:t,spatialReference:{wkid:s}}),a,m),_.x*=y/i,_.y*=y/i}else{_={x:o.x,y:o.y};const e=Math.ceil(Math.log(Math.min(t.width,t.height)/32)/Math.LN2);let i=0;for(;y=w;)y/=2,_.x/=2,_.y/=2,g.push(y),b.push({x:_.x,y:_.y});return{projectedPixelSize:c,scales:g,srcResolutions:b,isCustomTilingScheme:!p}}},bdb8:function(t,e,i){"use strict";i.d(e,"a",(function(){return j}));var s=i("a4ee"),r=i("fc29"),n=i("f4cc"),a=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("d386")),c=i("3af1"),h=i("9180"),l=i("7f83"),u=i("dff3");const d=Math.PI/180;function f(t){return t*d}function p(t,e){const i=f(e.rotation),s=Math.abs(Math.cos(i)),r=Math.abs(Math.sin(i)),[n,a]=e.size;return t[0]=Math.round(a*r+n*s),t[1]=Math.round(a*s+n*r),t}function m(t,e,i,s){const[r,n]=e,[a,o]=s,c=.5*i;return t[0]=r-c*a,t[1]=n-c*o,t[2]=r+c*a,t[3]=n+c*o,t}var _=i("c73a"),y=i("018d"),x=i("ae54");const g=Object(h["l"])(),b=[0,0],v=new x["a"](0,0,0,0),O={container:null,fetchSource:null,requestUpdate:null,imageMaxWidth:2048,imageMaxHeight:2048,imageRotationSupported:!1,imageNormalizationSupported:!1,hidpi:!1};let w=class extends r["a"]{constructor(t){super(t),this._imagePromise=null,this.bitmaps=[],this.hidpi=O.hidpi,this.imageMaxWidth=O.imageMaxWidth,this.imageMaxHeight=O.imageMaxHeight,this.imageRotationSupported=O.imageRotationSupported,this.imageNormalizationSupported=O.imageNormalizationSupported,this.update=Object(n["i"])(async(t,e)=>{if(!t.stationary||this.destroyed)return null;const i=t.state,s=Object(l["e"])(i.spatialReference),r=this.hidpi?t.pixelRatio:1,n=this.imageNormalizationSupported&&i.worldScreenWidth&&i.worldScreenWidththis.imageMaxWidth||Math.floor(b[1]*r)>this.imageMaxHeight,o=s&&(i.extent.xmins.valid[1]),c=!this.imageNormalizationSupported&&o,h=!a&&!c,u=this.imageRotationSupported?i.rotation:0;if(h){const t=n?i.paddedViewState.center:i.center;this._imagePromise=this._singleExport(i,b,t,i.resolution,u,r,e)}else{let t=Math.min(this.imageMaxWidth,this.imageMaxHeight);c&&(t=Math.min(i.worldScreenWidth,t)),this._imagePromise=this._tiledExport(i,t,u,r,e)}return this._imagePromise.then(async t=>{if(this._imagePromise=null,!this.destroyed){this.bitmaps=null!=t?t:[];for(const e of this.container.children)t.includes(e)||e.fadeOut().then(()=>{e.remove()});for(const e of t)this.container.addChild(e),e.fadeIn()}}).catch(t=>{throw this._imagePromise=null,t})},5e3)}destroy(){this.bitmaps=[]}get updating(){return!this.destroyed&&null!==this._imagePromise}updateExports(t){for(const e of this.container.children){if(!e.visible||!e.stage)return;t(e),e.invalidateTexture(),e.requestRender()}}async _export(t,e,i,s,r,n){const a=await this.fetchSource(t,Math.floor(e*r),Math.floor(i*r),{rotation:s,pixelRatio:r,signal:n}),o=new _["a"](a,"additive");return o.x=t.xmin,o.y=t.ymax,o.resolution=t.width/e,o.rotation=s,o.pixelRatio=r,o}async _singleExport(t,e,i,s,r,n,a){m(g,i,s,e);const o=new c["a"](g[0],g[1],g[2],g[3],t.spatialReference);return[await this._export(o,e[0],e[1],r,n,a)]}_tiledExport(t,e,i,s,r){const n=u["a"].create({size:e,spatialReference:t.spatialReference,scales:[t.scale]}),a=new y["a"](n),o=a.getTileCoverage(t);if(!o)return null;const h=[];return o.forEach((n,o,l,u)=>{v.set(n,o,l,u),a.getTileBounds(g,v);const d=new c["a"](g[0],g[1],g[2],g[3],t.spatialReference);h.push(this._export(d,e,e,i,s,r))}),Promise.all(h)}};Object(s["a"])([Object(a["b"])()],w.prototype,"_imagePromise",void 0),Object(s["a"])([Object(a["b"])()],w.prototype,"bitmaps",void 0),Object(s["a"])([Object(a["b"])()],w.prototype,"container",void 0),Object(s["a"])([Object(a["b"])()],w.prototype,"fetchSource",void 0),Object(s["a"])([Object(a["b"])()],w.prototype,"hidpi",void 0),Object(s["a"])([Object(a["b"])()],w.prototype,"imageMaxWidth",void 0),Object(s["a"])([Object(a["b"])()],w.prototype,"imageMaxHeight",void 0),Object(s["a"])([Object(a["b"])()],w.prototype,"imageRotationSupported",void 0),Object(s["a"])([Object(a["b"])()],w.prototype,"imageNormalizationSupported",void 0),Object(s["a"])([Object(a["b"])()],w.prototype,"requestUpdate",void 0),Object(s["a"])([Object(a["b"])()],w.prototype,"updating",null),w=Object(s["a"])([Object(o["a"])("esri.views.2d.layers.support.ExportStrategy")],w);const j=w},c73a:function(t,e,i){"use strict";i.d(e,"a",(function(){return m}));var s=i("b2b2"),r=i("1c92"),n=i("8c71"),a=i("738e"),o=i("7c4b"),c=i("894c"),h=i("d17d"),l=i("a1ff");function u(t){return t&&"render"in t}function d(t){return t&&!("render"in t)}function f(t){const e=document.createElement("canvas");return e.width=t.width,e.height=t.height,t.render(e.getContext("2d")),e}function p(t,e,i){const s={target:h["A"].TEXTURE_2D,pixelFormat:h["p"].RGBA,internalFormat:h["p"].RGBA,dataType:h["q"].UNSIGNED_BYTE,wrapMode:h["B"].CLAMP_TO_EDGE};return e&&i&&(s.width=e,s.height=i),new l["a"](t,s)}class m extends o["a"]{constructor(t=null,e,i=!0){super(),this.requestRenderOnSourceChangedEnabled=i,this._textureInvalidated=!0,this.stencilRef=0,this.coordScale=[1,1],this._height=void 0,this.pixelRatio=1,this.resolution=0,this.rotation=0,this._source=null,this._width=void 0,this.x=0,this.y=0,this.blendFunction=e,this.source=t,this.requestRender=this.requestRender.bind(this)}destroy(){this._texture&&(this._texture.dispose(),this._texture=null)}get isSourceScaled(){return this.width!==this.sourceWidth||this.height!==this.sourceHeight}get height(){return void 0!==this._height?this._height:this.sourceHeight}set height(t){this._height=t}get source(){return this._source}set source(t){this._source=t,this.invalidateTexture()}get sourceHeight(){return this._source instanceof HTMLImageElement?this._source.naturalHeight:this._source.height}get sourceWidth(){return this._source instanceof HTMLImageElement?this._source.naturalWidth:this._source.width}get width(){return void 0!==this._width?this._width:this.sourceWidth}set width(t){this._width=t}beforeRender(t){super.beforeRender(t),this.updateTexture(t.context)}invalidateTexture(){this._textureInvalidated||(this._textureInvalidated=!0,this.requestRenderOnSourceChangedEnabled&&this.requestRender())}_createTransforms(){return{dvs:Object(n["b"])()}}setTransform(t){const e=Object(r["b"])(this.transforms.dvs),[i,s]=t.toScreenNoRotation([0,0],[this.x,this.y]),n=this.resolution/this.pixelRatio/t.resolution,o=n*this.width,c=n*this.height,h=Math.PI*this.rotation/180;Object(r["c"])(e,e,Object(a["b"])(i,s)),Object(r["c"])(e,e,Object(a["b"])(o/2,c/2)),Object(r["n"])(e,e,-h),Object(r["c"])(e,e,Object(a["b"])(-o/2,-c/2)),Object(r["j"])(e,e,Object(a["b"])(o,c)),Object(r["l"])(this.transforms.dvs,t.displayViewMat3,e)}setSamplingProfile(t){this._texture&&(t.mips&&!this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._texture.setSamplingMode(t.samplingMode))}bind(t,e){this._texture&&t.bindTexture(this._texture,e)}updateTexture(t){var e;if(!this.stage)return null==(e=this._texture)||e.dispose(),void(this._texture=null);if(!this._textureInvalidated)return;this._textureInvalidated=!1,this._texture||(this.source?this._texture=p(t,this.sourceWidth,this.sourceHeight):this._texture=p(t));const i=this.source;if(i){if(this._texture.resize(this.sourceWidth,this.sourceHeight),u(i))if(i instanceof c["a"]){const t=i.getRenderedRasterPixels();this._texture.setData(Object(s["k"])(t)?t.renderedRasterPixels:null)}else this._texture.setData(f(i));else d(i)&&this._texture.setData(i);this.ready()}else this._texture.setData(null)}onAttach(){this.invalidateTexture()}onDetach(){this.invalidateTexture()}}},c802:function(t,e,i){"use strict";i.d(e,"a",(function(){return d}));var s=i("a4ee"),r=i("ce50"),n=i("b2b2"),a=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("d386")),c=i("4ae5"),h=i("22f4"),l=i("69dd"),u=i("ad73");const d=t=>{let e=class extends t{constructor(){super(...arguments),this.view=null}async fetchPopupFeatures(t,e){const{layer:i}=this;if(!t)throw new r["a"]("imagerylayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:i});const{popupEnabled:s}=i,a=Object(u["a"])(i,e);if(!s||!Object(n["k"])(a))throw new r["a"]("imagerylayerview:fetchPopupFeatures","Missing required popupTemplate or popupEnabled",{popupEnabled:s,popupTemplate:a});const o=await a.getRequiredFields(),h=new l["a"];h.timeExtent=this.timeExtent,h.geometry=t,h.outFields=o,h.outSpatialReference=t.spatialReference;const d=this.view.resolution,f="2d"===this.view.type?new c["a"](d,d,this.view.spatialReference):new c["a"](.5*d,.5*d,this.view.spatialReference),{returnTopmostRaster:p,showNoDataRecords:m}=a.layerOptions||{returnTopmostRaster:!0,showNoDataRecords:!1},_={returnDomainValues:!0,returnTopmostRaster:p,pixelSize:f,showNoDataRecords:m,signal:Object(n["k"])(e)?e.signal:null};return i.queryVisibleRasters(h,_).then(t=>t)}canResume(){var t;return!!super.canResume()&&(null==(t=this.timeExtent)||!t.isEmpty)}};return Object(s["a"])([Object(a["b"])()],e.prototype,"layer",void 0),Object(s["a"])([Object(a["b"])()],e.prototype,"suspended",void 0),Object(s["a"])([Object(a["b"])(h["a"])],e.prototype,"timeExtent",void 0),Object(s["a"])([Object(a["b"])()],e.prototype,"view",void 0),e=Object(s["a"])([Object(o["a"])("esri.views.layers.ImageryLayerView")],e),e}},d641:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));const s={convertToGEGeometry:r,exportPoint:a,exportPolygon:c,exportPolyline:l,exportMultipoint:d,exportExtent:p};function r(t,e){return null==e?null:t.convertJSONToGeometry(e)}class n{constructor(t,e,i){this.x=t,this.y=e,this.spatialReference=i,this.z=void 0,this.m=void 0}}function a(t,e,i){const s=new n(t.getPointX(e),t.getPointY(e),i),r=t.hasZ(e),a=t.hasM(e);return r&&(s.z=t.getPointZ(e)),a&&(s.m=t.getPointM(e)),s}class o{constructor(t,e,i,s){this.rings=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}function c(t,e,i){return new o(t.exportPaths(e),i,t.hasZ(e),t.hasM(e))}class h{constructor(t,e,i,s){this.paths=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}function l(t,e,i){return new h(t.exportPaths(e),i,t.hasZ(e),t.hasM(e))}class u{constructor(t,e,i,s){this.points=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}function d(t,e,i){return new u(t.exportPoints(e),i,t.hasZ(e),t.hasM(e))}class f{constructor(t,e,i,s,r){this.xmin=t,this.ymin=e,this.xmax=i,this.ymax=s,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}function p(t,e,i){const s=t.hasZ(e),r=t.hasM(e),n=new f(t.getXMin(e),t.getYMin(e),t.getXMax(e),t.getYMax(e),i);if(s){const i=t.getZExtent(e);n.zmin=i.vmin,n.zmax=i.vmax}if(r){const i=t.getMExtent(e);n.mmin=i.vmin,n.mmax=i.vmax}return n}},d806:function(t,e,i){"use strict";i.d(e,"a",(function(){return O}));var s=i("ce50"),r=i("c120"),n=i("e92d"),a=i("38a4"),o=i("b2b2"),c=i("f4cc"),h=i("0f1c"),l=i("80b7"),u=i("8c81"),d=i("175e"),f=i("c8dd"),p=i("97cb"),m=i("8332"),_=i("d17d");const y=n["a"].getLogger("esri.views.layers.2d.features.support.AttributeStore"),x=Object(p["b"])(p["a"],y),g={sharedArrayBuffer:Object(r["a"])("esri-shared-array-buffer"),atomics:Object(r["a"])("esri-atomics")};function b(t,e){return i=>e(t(i))}class v{constructor(t,e,i,s){this.size=0,this.texelSize=4;const{pixelType:r,layout:n,textureOnly:a}=s;this.textureOnly=a||!1,this.pixelType=r,this._ctype=e,this.layout=n,this._resetRange(),this._shared=t,this.size=i,a||(this.data=this._initData(r,i,t,e))}get buffer(){return Object(o["b"])(this.data,t=>t.buffer)}unsetComponentAllTexels(t,e){const i=Object(o["t"])(this.data);for(let s=0;se)return null;this._resetRange();const s=!(this._shared||"local"===this._ctype),r=this.pixelType,n=this.layout,a=Object(o["t"])(this.data);return{start:t,end:e,data:s&&a.slice(t*i,(e+1)*i)||null,pixelType:r,layout:n}}_initData(t,e,i,s){const r=i&&"local"!==s?SharedArrayBuffer:ArrayBuffer,n=Object(f["l"])(t),a=new n(new r(e*e*4*n.BYTES_PER_ELEMENT));for(let o=0;onull)}destroy(){this._abortController.abort()}get hasScaleExpr(){return this._hasScaleExpr}get _signal(){return this._abortController.signal}get hasHighlight(){return this._idsToHighlight.size>0}update(t,e){this.config=e;const i=e.schema.processors[0].storage,s=Object(h["a"])(this._schema,i);if((t.targets.feature||t.targets.aggregate)&&(t.storage.data=!0),s&&(Object(r["a"])("esri-2d-update-debug")&&console.debug("Applying Update - AttributeStore:",s),t.storage.data=!0,this._schema=i,this._attributeComputeMap.clear(),!Object(o["j"])(i))){switch(i.target){case"feature":this._targetType=d["c"];break;case"aggregate":this._targetType=d["b"]}if("subtype"===i.type)for(const t in i.mapping){const e=i.mapping[t];if(Object(o["k"])(e))for(const t of e.mapping)this._bindAttribute(t)}else for(const t of i.mapping)this._bindAttribute(t)}}onTileData(t,e){if(Object(o["j"])(e.addOrUpdate))return;const i=e.addOrUpdate.getCursor();for(;i.next();){const t=i.getDisplayId();this.setAttributeData(t,i)}}invalidateResources(){this._createResourcesPromise=null,this._abortController.abort(),this._abortController=new AbortController}async setHighlight(t,e){const i=1,s=this._getBlock(0),r=e.map(t=>Object(d["f"])(t));s.lock(),s.unsetComponentAllTexels(0,i),s.setComponent(0,i,r),s.unlock(),this._idsToHighlight.clear();for(const n of t)this._idsToHighlight.add(n);await this.sendUpdates()}async updateFilters(t,e){const{config:i,service:s,spatialReference:n}=e,{filters:a}=i,o=a.map((t,e)=>this._updateFilter(t,e,s,n));(await Promise.all(o)).some(t=>t)&&(t.storage.filters=!0,Object(r["a"])("esri-2d-update-debug")&&console.debug("Applying Update - AttributeStore:","Filters changed"))}setData(t,e,i,s){const r=Object(d["f"])(t);this._ensureSizeForTexel(r),this._getBlock(e).setData(t,i,s)}getData(t,e,i){return this._getBlock(e).getData(t,i)}getHighlightFlag(t){return this._idsToHighlight.has(t)?u["s"]:0}unsetAttributeData(t){const e=Object(d["f"])(t);this._getBlock(0).setData(e,0,0)}setAttributeData(t,e){const i=Object(d["f"])(t);if(this._ensureSizeForTexel(i),this._getBlock(0).setData(i,0,this.getFilterFlags(e)),this._targetType!==Object(d["g"])(t))return;const s=this._attributeComputeMap,r=this.config.supportsTextureFloat?1:2,n=4;s.size&&s.forEach((t,s)=>{const o=s*r%n,c=Math.floor(s*r/n),h=this._getBlock(c+u["e"]),l=t(e);if(this.config.supportsTextureFloat)h.setData(i,o,l);else if(l===u["x"])h.setData(i,o,255),h.setData(i,o+1,255);else{const t=Object(a["f"])(Math.round(l),-32767,32766)+32768,e=255&t,s=(65280&t)>>8;h.setData(i,o,e),h.setData(i,o+1,s)}})}sendUpdates(){if(this._nextUpdate)return this._nextUpdate.promise;if(this._currUpdate)return this._nextUpdate=Object(c["g"])(),this._nextUpdate.promise;const t={blocks:this._blocks.map(t=>Object(o["k"])(t)?t.toMessage():null)};return this._currUpdate=this._createResources().then(()=>{const e=()=>{if(this._currUpdate=null,this._nextUpdate){const t=this._nextUpdate;this._nextUpdate=null,this.sendUpdates().then(()=>t.resolve())}},i=this._client.update(t,this._signal).then(e).catch(e);return this._client.render(this._signal),i}).catch(t=>Object(c["m"])(t)?(this._createResourcesPromise=null,this._createResources()):(y.error(new s["a"]("mapview-attribute-store","Encountered an error during client update",t)),Promise.resolve())),this._currUpdate}_ensureSizeForTexel(t){for(;t>=this._size*this._size;)if(this._expand())return}_bindAttribute(t){function e(){return t.normalizationField?e=>{const i=e.readAttribute(t.normalizationField);return i?e.readAttribute(t.field)/i:null}:e=>e.readAttribute(t.field)}function i(){return t.normalizationField&&y.warn("mapview-arcade","Ignoring normalizationField specified with an arcade expression which is not supported."),e=>e.getComputedNumericAtIndex(t.fieldIndex)}let s;if(null!=t.fieldIndex)s=i();else{if(!t.field)return;s=e()}t.valueRepresentation&&(s=b(s,e=>Object(m["b"])(e,t.valueRepresentation)));const r=t=>null===t||isNaN(t)||t===1/0?u["x"]:t;this._attributeComputeMap.set(t.binding,b(s,r))}_createResources(){if(Object(o["k"])(this._createResourcesPromise))return this._createResourcesPromise;this._getBlock(u["a"]),this._getBlock(u["d"]),x("Initializing AttributeStore");const t={shared:g.sharedArrayBuffer&&!("local"===this._client.type),size:this._size,blocks:Object(o["m"])(this._blocks,t=>({textureOnly:t.textureOnly,buffer:t.buffer,pixelType:t.pixelType}))},e=this._client.initialize(t,this._signal).catch(t=>{Object(c["m"])(t)?this._createResourcesPromise=null:y.error(new s["a"]("mapview-attribute-store","Encountered an error during client initialization",t))});return this._createResourcesPromise=e,e.then(()=>Object(o["j"])(this._createResourcesPromise)?this._createResources():void 0),e}_getBlock(t){const e=this._blocks[t];if(Object(o["k"])(e))return e;x("Initializing AttributeBlock at index "+t);const i=g.sharedArrayBuffer,s=this._client.type,r=new v(i,s,this._size,this._blockDescriptors[t]);return this._blocks[t]=r,this._createResourcesPromise=null,r}_expand(){if(this._sizee.expand(t)),this._createResourcesPromise=null,this._size=t,0}return y.error(new s["a"]("mapview-limitations","Maximum number of onscreen features exceeded.")),-1}async _updateFilter(t,e,i,s){const r=this._filters[e],n=Object(o["k"])(r)&&r.hash;if(!r&&!t)return!1;if(n===JSON.stringify(t))return!1;if(Object(o["j"])(t)){if(!r)return!1;const t=1<{let s=h*t[2]-h*e[2];return 0===s&&i&&(s=t[4]-e[4]),s}),u.length){let t=6*u[0][2];l[0]=u[0][0]/t,l[1]=u[0][1]/t,i&&(t=6*u[0][4],l[2]=0!==t?u[0][3]/t:0),(l[0]d[1]||l[1]d[3]||i&&(l[2]d[5]))&&(l.length=0)}if(!l.length){const t=e.lengths[0]?o(p,0,f[0],i,n):null;if(!t)return null;l[0]=t[0],l[1]=t[1],i&&t.length>2&&(l[2]=t[2])}return t}function a(t,e,i,s,n,a,o=1){const c=r(n,a);let h=i,l=i+c,u=0,d=0,f=0,p=0,m=0;for(let r=0,y=s-1;rt[1]&&(t[1]=i),st[3]&&(t[3]=s),n&&(rt[5]&&(t[5]=r))}if(p*o>0&&(p*=-1),m*o>0&&(m*=-1),!p)return null;const _=[u,d,.5*p];return n&&(_[3]=f,_[4]=.5*m),_}function o(t,e,i,s,n){const a=r(s,n);let o=e,d=e+a,f=0,p=0,m=0,_=0;for(let r=0,y=i-1;r0?s?[p/f,m/f,_/f]:[p/f,m/f]:i>0?s?[t[e],t[e+1],t[e+2]]:[t[e],t[e+1]]:null}function c(t,e,i,s){const r=i-t,n=s-e;return Math.sqrt(r*r+n*n)}function h(t,e,i,s,r,n){const a=s-t,o=r-e,c=n-i;return Math.sqrt(a*a+o*o+c*c)}function l(t,e,i,s){return[t+.5*(i-t),e+.5*(s-e)]}function u(t,e,i,s,r,n){return[t+.5*(s-t),e+.5*(r-e),i+.5*(n-i)]}},e416:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var s=i("b6a7"),r=i("9344");class n{static getPlacement(t,e,i,n){const a=Object(r["b"])(e);if(!a)return null;const o=Object(s["c"])(t);return a.execute(o,e,i,n)}}},f0d0:function(t,e,i){"use strict";i.d(e,"a",(function(){return M}));i("e06a");var s,r,n,a=i("c120"),o=i("b2b2"),c=i("d97e"),h=i("6655"),l=i("8152"),u=i("7de1"),d=i("a9ab");let f=0;const p=null!=(s=Object(a["a"])("featurelayer-simplify-thresholds"))?s:[.5,.5,.5,.5],m=p[0],_=p[1],y=p[2],x=p[3],g=null!=(r=Object(a["a"])("featurelayer-simplify-payload-size-factors"))?r:[1,2,4],b=g[0],v=g[1],O=g[2],w=null!=(n=Object(a["a"])("featurelayer-simplify-mobile-factor"))?n:2,j=Object(a["a"])("esri-mobile");class M{constructor(t,e){this.type="FeatureSetReader",this.arcadeDeclaredClass="esri.arcade.Feature",this.seen=!1,this.instance=0,this._tx=0,this._ty=0,this._sx=1,this._sy=1,this._deleted=null,this._joined=[],this._objectIdToIndex=null,this._level=0,this.instance=t,this._layerSchema=e}static createInstance(){return f++,f=f>65535?0:f,f}get isEmpty(){return Object(o["k"])(this._deleted)&&this._deleted.countSet()===this.getSize()}set level(t){this._level=t}getAreaSimplificationThreshold(t,e){let i=1;const s=j?w:1;e>4e6?i=O*s:e>1e6?i=v*s:e>5e5?i=b*s:e>1e5&&(i=s);let r=0;t>4e3?r=x*i:t>2e3?r=y*i:t>100?r=_:t>15&&(r=m);let n=8;return this._level<4?n=1:this._level<5?n=2:this._level<6&&(n=4),r*n}setArcadeSpatialReference(t){this._arcadeSpatialReference=t}attachStorage(t){this._storage=t}getQuantizationTransform(){throw new Error("Unable to find transform for featureSet")}getStorage(){return this._storage}getComputedNumeric(t){return this.getComputedNumericAtIndex(0)}setComputedNumeric(t,e){return this.setComputedNumericAtIndex(e,0)}getComputedString(t){return this.getComputedStringAtIndex(0)}setComputedString(t,e){return this.setComputedStringAtIndex(0,e)}getComputedNumericAtIndex(t){return this._storage.getComputedNumericAtIndex(this.getDisplayId(),t)}setComputedNumericAtIndex(t,e){this._storage.setComputedNumericAtIndex(this.getDisplayId(),t,e)}getComputedStringAtIndex(t){return this._storage.getComputedStringAtIndex(this.getDisplayId(),t)}setComputedStringAtIndex(t,e){return this._storage.setComputedStringAtIndex(this.getDisplayId(),t,e)}transform(t,e,i,s){const r=this.copy();return r._tx+=t,r._ty+=e,r._sx*=i,r._sy*=s,r}readAttribute(t,e=!1){const i=this._readAttribute(t,e);if(void 0!==i)return i;for(const s of this._joined){s.setIndex(this.getIndex());const i=s._readAttribute(t,e);if(void 0!==i)return i}}readAttributes(){const t=this._readAttributes();for(const e of this._joined){e.setIndex(this.getIndex());const i=e._readAttributes();for(const e of Object.keys(i))t[e]=i[e]}return t}joinAttributes(t){this._joined.push(t)}readArcadeFeature(){return this}geometry(){const t=this.readHydratedGeometry(),e=Object(h["l"])(t,this.geometryType,this.hasZ,this.hasM),i=Object(d["a"])(e);return i&&(i.spatialReference=this._arcadeSpatialReference),i}field(t){if(this.hasField(t))return this.readAttribute(t,!0);for(const e of this._joined)if(e.setIndex(this.getIndex()),e.hasField(t))return e._readAttribute(t,!0);throw new Error(`Field ${t} does not exist`)}setField(t,e){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.getFieldNames()}castToText(){return JSON.stringify(this.readLegacyFeature())}gdbVersion(){return null}fullSchema(){return this._layerSchema}castAsJson(t=null){return{attributes:this._readAttributes(),geometry:!0===(null==t?void 0:t.keepGeometryType)?this.geometry():this.geometry().toJSON()}}castAsJsonAsync(t=null,e=null){return Promise.resolve(this.castAsJson(e))}removeIds(t){if(Object(o["j"])(this._objectIdToIndex)){const t=new Map,e=this.getCursor();for(;e.next();)t.set(e.getObjectId(),e.getIndex());this._objectIdToIndex=t}const e=this._objectIdToIndex;for(const i of t)e.has(i)&&this.removeAtIndex(e.get(i))}removeAtIndex(t){Object(o["j"])(this._deleted)&&(this._deleted=u["a"].create(this.getSize())),this._deleted.set(t)}readGeometryForDisplay(){return this.readUnquantizedGeometry(!0)}readLegacyGeometryForDisplay(){return this.readLegacyGeometry(!0)}*features(){const t=this.getCursor();for(;t.next();)yield t.readOptimizedFeature()}_getExists(){return Object(o["j"])(this._deleted)||!this._deleted.has(this.getIndex())}_computeCentroid(){if("esriGeometryPolygon"!==this.geometryType)return null;const t=this.readUnquantizedGeometry();if(!t||t.hasIndeterminateRingOrder)return null;const e=Object(o["u"])(this.getQuantizationTransform(),null);return Object(c["a"])(new l["a"],t,this.hasM,this.hasZ,e)}copyInto(t){t.seen=this.seen,t._storage=this._storage,t._arcadeSpatialReference=this._arcadeSpatialReference,t._joined=this._joined,t._tx=this._tx,t._ty=this._ty,t._sx=this._sx,t._sy=this._sy,t._deleted=this._deleted,t._objectIdToIndex=this._objectIdToIndex}}},f75e:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var s=i("b2b2"),r=i("5dbb");class n{bindFeature(t,e,i){}write(t,e,i,n){var a;if(Object(s["j"])(this._effects)||0===(null==(a=this._effects)?void 0:a.length))return this._write(t,e,n);const o=r["a"].executeEffects(this._effects,e.readLegacyGeometryForDisplay(),n.geometryEngine);let c=r["a"].next(o);for(;c;)this._write(t,e,n,c),c=r["a"].next(o)}_write(t,e,i,s){}}},f93c:function(t,e,i){"use strict";i.d(e,"a",(function(){return m}));var s=i("b2b2"),r=i("a915"),n=i("a29a"),a=i("2c63"),o=i("3349"),c=i("738e"),h=i("6655"),l=i("e416"),u=i("c84e"),d=i("d114");const f=3.14159265359/180,p=8,m=t=>class extends t{constructor(...t){super(...t),this.angle=0,this.xOffset=0,this.yOffset=0,this.width=0,this.height=0,this.boundsType="square",this._anchorX=0,this._anchorY=0,this._computedWidth=0,this._computedHeight=0,this._vertexBoundsScaleX=1,this._vertexBoundsScaleY=1,this._offsets={xUpperLeft:0,yUpperLeft:0,xUpperRight:0,yUpperRight:0,xBottomLeft:0,yBottomLeft:0,xBottomRight:0,yBottomRight:0},this.geometryType=u["d"].MARKER}_write(t,e,i,s){const r=e.getDisplayId();t.recordStart(r,this._materialKey,this.geometryType,!0),this._writeGeometry(t,e,r,i,s),t.recordEnd()}_writeGeometry(t,e,i,r,n){if(Object(s["k"])(this._markerPlacement))return this._writePlacedMarkers(t,e,r,n);if(!n&&"esriGeometryPoint"===e.geometryType){const s=e.getX(),r=e.getY();if(!t.hasAggregates&&t.hasPixelBufferEnabled&&(s<0||s>=513||r<0||r>=513))return;return this._writeVertices(t,i,this._getPos(s,r),s,r)}const a=n?Object(h["q"])(Object(h["d"])(n),2):"esriGeometryPolygon"===e.geometryType?e.readCentroid():e.readGeometryForDisplay();if(!Object(s["j"])(a)){if(a.isPoint){const[e,s]=a.coords;if(!t.hasAggregates&&t.hasPixelBufferEnabled&&(e<0||e>=512||s<0||s>=512))return;return this._writeVertices(t,i,this._getPos(e,s),e,s)}a.forEachVertex((e,s)=>this._writeVertices(t,i,this._getPos(e,s),e,s))}}_writePlacedMarkers(t,e,i,n){const o=null!=n?n:e.readLegacyGeometryForDisplay(),h=l["a"].getPlacement(o,Object(s["t"])(this._markerPlacement),Object(r["g"])(1),i.geometryEngine);if(!h)return;const u=e.getDisplayId(),d=Object(c["a"])(),p=Object(a["a"])(),m=-128,_=640;let y=h.next();for(;null!=y;){const e=y.tx,i=-y.ty;e>=m&&e<=_&&i>=m&&i<=_&&(this._applyTransformation(p,d,-y.getAngle()/f),this._writeVertices(t,u,this._getPos(e,i),e,i)),y=h.next()}}_writeVertices(t,e,i,s,r){const n=t.vertexCount();if(this.angle){const e=Math.max(this._computedWidth*this._vertexBoundsScaleX,this._computedHeight*this._vertexBoundsScaleY);t.vertexBounds(s+this.xOffset,r-this.yOffset,e,e)}else t.vertexBounds(s+this.xOffset,r-this.yOffset,this._computedWidth*this._vertexBoundsScaleX,this._computedHeight*this._vertexBoundsScaleY);t.vertexWrite(i),t.vertexWrite(this._offsetUpperLeft),t.vertexWrite(this._texUpperLeft),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.vertexWrite(i),t.vertexWrite(this._offsetUpperRight),t.vertexWrite(this._texUpperRight),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.vertexWrite(i),t.vertexWrite(this._offsetBottomLeft),t.vertexWrite(this._texBottomLeft),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.vertexWrite(i),t.vertexWrite(this._offsetBottomRight),t.vertexWrite(this._texBottomRight),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.indexWrite(n+0),t.indexWrite(n+1),t.indexWrite(n+2),t.indexWrite(n+1),t.indexWrite(n+3),t.indexWrite(n+2)}_applyTransformation(t,e,i=0){Object(n["a"])(t,Object(c["b"])(this.xOffset,-this.yOffset)),this.angle+i!==0&&Object(n["g"])(t,t,f*(this.angle+i));const s=this._computedWidth,r=this._computedHeight,a=(this._anchorX-.5)*s,h=(this._anchorY-.5)*r;Object(o["s"])(e,a,h),Object(o["t"])(e,e,t),this._offsetUpperLeft=Object(d["a"])(16*e[0],16*e[1]),this._offsets.xUpperLeft=e[0],this._offsets.yUpperLeft=e[1],Object(o["s"])(e,a+s,h),Object(o["t"])(e,e,t),this._offsetUpperRight=Object(d["a"])(16*e[0],16*e[1]),this._offsets.xUpperRight=e[0],this._offsets.yUpperRight=e[1],Object(o["s"])(e,a,h+r),Object(o["t"])(e,e,t),this._offsetBottomLeft=Object(d["a"])(16*e[0],16*e[1]),this._offsets.xBottomLeft=e[0],this._offsets.yBottomLeft=e[1],Object(o["s"])(e,a+s,h+r),Object(o["t"])(e,e,t),this._offsetBottomRight=Object(d["a"])(16*e[0],16*e[1]),this._offsets.xBottomRight=e[0],this._offsets.yBottomRight=e[1]}_getPos(t,e){return Object(d["a"])(Math.round(p*t),Math.round(p*e))}}},ff00:function(t,e,i){"use strict";i.d(e,"a",(function(){return h}));var s=i("a4ee"),r=(i("e92d"),i("cea0"),i("b50f"),i("c120"),i("2dd4"),i("d386")),n=i("c84e"),a=i("92f2"),o=i("d17d");let c=class extends a["a"]{renderChildren(t){if(t.drawPhase!==n["c"].HIGHLIGHT)return;if(this.attributeView.bindTextures(t.context),!this.children.some(t=>t.hasData))return;super.renderChildren(t);const{painter:e}=t,i=e.effects.highlight;i.bind(t),t.context.setColorMask(!0,!0,!0,!0),t.context.clear(o["e"].COLOR_BUFFER_BIT),this._renderChildren(t,i.defines.concat(["highlightAll"])),i.draw(t),i.unbind()}};c=Object(s["a"])([Object(r["a"])("esri.views.2d.layers.support.HighlightGraphicContainer")],c);const h=c}}]); //# sourceMappingURL=chunk-68f9ea7c.683d6aff.js.map