????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/2.79d37d59bb6be6137bba.js |
(function(){var t={"esri/views/webgl/FramebufferObject":"/f24","esri/views/webgl/capabilities/load":"37NJ","esri/views/webgl/capabilities/LoseContext":"38Y5","esri/views/webgl/RenderingContext":"3KT0","esri/views/webgl/capabilities/isWebGL2Context":"7laH","esri/views/webgl/lib/glsl-tokenizer/lib/builtins":"9E9H","esri/views/webgl/lib/glsl-tokenizer/lib/operators":"CJs7","esri/views/webgl":"DJpR","esri/views/webgl/capabilities/Instancing":"DlJW","esri/views/webgl/Program":"G0ER","esri/views/webgl/lib/glsl-tokenizer/lib/literals":"Gc7o","esri/views/webgl/lib/glsl-tokenizer/string":"HXXw","esri/views/webgl/ShaderCompiler":"IROT","esri/views/webgl/Util":"Kfys","esri/views/webgl/ProgramCache":"NIl/","esri/views/webgl/BufferObject":"QFi0","esri/views/webgl/Renderbuffer":"Rrc3","esri/views/webgl/InstanceCounter":"TCFx","esri/views/webgl/programUtils":"U+8K","esri/views/webgl/capabilities/DisjointTimerQuery":"U6iw","esri/views/webgl/lib/glsl-tokenizer/index":"Ysiz","esri/views/webgl/ShaderTranspiler":"Zn9k","esri/views/webgl/Texture":"Zp3t","esri/views/webgl/renderState":"qbr3","esri/views/webgl/reservedWordsGLSL3":"tOQU","esri/views/webgl/enums":"uwSd","esri/views/webgl/capabilities/VertexArrayObjects":"veTl","esri/views/webgl/VertexArrayObject":"z2+Q"},e=this||window,i=e.webpackJsonp=e.webpackJsonp||[];i.registerAbsMids?i.registerAbsMids(t):(i.absMidsWaiting=i.absMidsWaiting||[]).push(t)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"/f24":function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("H1tY"),i("Rrc3"),i("Zp3t")],void 0===(n=(function(t,e,i,r,n){return function(){function t(e,o,s,a){if(this._context=null,this._glName=null,this._depthAttachment=null,this._stencilAttachment=null,this._colorAttachment=null,this._initialized=!1,this._context=e,this._desc={colorTarget:o.colorTarget,depthStencilTarget:o.depthStencilTarget,width:o.width,height:o.height,multisampled:o.multisampled},this._id=t._nextId++,i("esri-webgl-debug")&&e.instanceCounter.increment(4,this),s){var l=void 0;s instanceof n?(this._colorAttachment=s,l=s.descriptor):this._colorAttachment=new n(this._context,l=s),0!==this._desc.colorTarget&&console.error("Framebuffer is initialized with a texture however the descriptor indicates using a renderbuffer color attachment!"),t._validateTextureDimensions(l,this._desc)}if(a instanceof r)2===o.depthStencilTarget?this._stencilAttachment=a:1===o.depthStencilTarget||3===o.depthStencilTarget?this._depthAttachment=a:console.error('If a Renderbuffer is provided, "depthStencilTarget" must be one of STENCIL_RENDER_BUFFER, DEPTH_RENDER_BUFFER or DEPTH_STENCIL_RENDER_BUFFER'),t._validateBufferDimensions(a.descriptor,this._desc);else if(a){this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!");var c=void 0;a instanceof n?(this._depthStencilTexture=a,c=this._depthStencilTexture.descriptor):this._depthStencilTexture=new n(this._context,c=a),t._validateTextureDimensions(c,this._desc)}}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"descriptor",{get:function(){return this._desc},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this._colorAttachment instanceof n?this._colorAttachment:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colorAttachment",{get:function(){return this._colorAttachment},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"depthStencilAttachment",{get:function(){return this._depthStencilTexture||this._depthAttachment||this._stencilAttachment},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"depthStencilTexture",{get:function(){return this._depthStencilTexture},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._desc.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._desc.height},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){if(this._context){var t=this._context,e=t.getBoundFramebufferObject();this._disposeColorAttachment(),this._disposeDepthStencilAttachments(),this._glName&&(t.gl.deleteFramebuffer(this._glName),this._glName=null),i("esri-webgl-debug")&&t.instanceCounter.decrement(4,this),t.bindFramebuffer(e),this._context=null}},t.prototype.attachColorTexture=function(e){if(e){if(t._validateTextureDimensions(e.descriptor,this._desc),this._disposeColorAttachment(),this._initialized){this._context.bindFramebuffer(this);var i=this._context.gl;i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,e.glName,0)}this._colorAttachment=e}},t.prototype.detachColorTexture=function(){if(this._colorAttachment instanceof n){var t=this._colorAttachment;if(this._initialized){this._context.bindFramebuffer(this);var e=this._context.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,null,0)}return this._colorAttachment=null,t}},t.prototype.attachDepthStencilTexture=function(e){if(e){var i=e.descriptor;if(34041!==i.pixelFormat&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!"),34042!==i.dataType&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8_WEBGL!"),this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!"),t._validateTextureDimensions(i,this._desc),4!==this._desc.depthStencilTarget&&(this._desc.depthStencilTarget=4),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);var r=this._context.gl;r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,e.glName,0)}this._depthStencilTexture=e}},t.prototype.detachDepthStencilTexture=function(){var t=this._depthStencilTexture;if(t&&this._initialized){this._context.bindFramebuffer(this);var e=this._context.gl;this._context.gl.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,null,0)}return this._depthStencilTexture=null,t},t.prototype.attachDepthStencilBuffer=function(e){if(e){var i=e.descriptor;if(34041!==i.internalFormat&&33189!==i.internalFormat&&console.error("Depth/Stencil buffer must have correct internalFormat"),t._validateBufferDimensions(i,this._desc),this._disposeDepthStencilAttachments(),this._desc.depthStencilTarget=34041===i.internalFormat?3:1,this._initialized){this._context.bindFramebuffer(this);var r=this._context.gl;r.framebufferRenderbuffer(r.FRAMEBUFFER,1===this._desc.depthStencilTarget?r.DEPTH_ATTACHMENT:r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,e.glName)}this._depthAttachment=e}},t.prototype.detachDepthStencilBuffer=function(){var t=this._context.gl,e=this._depthAttachment;return e&&this._initialized&&(this._context.bindFramebuffer(this),t.framebufferRenderbuffer(t.FRAMEBUFFER,1===this._desc.depthStencilTarget?t.DEPTH_ATTACHMENT:t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,null)),this._depthAttachment=null,e},t.prototype.copyToTexture=function(t,e,i,r,n,o,s){(t<0||e<0||n<0||o<0)&&console.error("Offsets cannot be negative!"),(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!");var a=this._desc,l=s.descriptor;3553!==s.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(t+i>a.width||e+r>a.height||n+i>l.width||o+r>l.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");var c=this._context;c.bindTexture(s),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,n,o,t,e,i,r)},t.prototype.readPixels=function(t,e,i,r,n,o,s){(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!"),s||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,i,r,n,o,s)},t.prototype.resize=function(e,i){var r=this._desc;if(r.width!==e||r.height!==i)if(this._initialized){var o;r.width=e,r.height=i,this._colorAttachment instanceof n?((o=(s=this._colorAttachment).descriptor).width=e,o.height=i,this._colorAttachment.dispose(),this._colorAttachment=new n(this._context,o),t._validateTextureDimensions(s.descriptor,this._desc)):this._colorAttachment&&this._disposeColorAttachment(),null!=this._depthStencilTexture?((o=this._depthStencilTexture.descriptor).width=e,o.height=i,this._depthStencilTexture.dispose(),this._depthStencilTexture=new n(this._context,o)):(this._depthAttachment||this._stencilAttachment)&&(this._depthAttachment&&this._depthAttachment.resize(e,i),this._stencilAttachment&&this._stencilAttachment.resize(e,i)),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1}else{var s;r.width=e,r.height=i,this._colorAttachment instanceof n&&(s=this._colorAttachment).resize(e,i),this._depthStencilTexture&&this._depthStencilTexture.resize(e,i)}},t.prototype.initialize=function(){if(this._initialized)return!1;var t=this._context.gl;this._glName&&t.deleteFramebuffer(this._glName);var e=t.createFramebuffer(),o=this._desc;if(t.bindFramebuffer(t.FRAMEBUFFER,e),!this._colorAttachment)if(0===o.colorTarget)this._colorAttachment=new n(this._context,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071,width:o.width,height:o.height});else{var s=new r(this._context,{internalFormat:32854,width:o.width,height:o.height});t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,s.glName),this._colorAttachment=s}switch(this._colorAttachment instanceof n&&t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this._colorAttachment.glName,0),o.depthStencilTarget){case 1:case 3:this._depthAttachment||(this._depthAttachment=new r(this._context,{internalFormat:1===o.depthStencilTarget?33189:34041,width:o.width,height:o.height})),t.framebufferRenderbuffer(t.FRAMEBUFFER,1===o.depthStencilTarget?t.DEPTH_ATTACHMENT:t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this._depthAttachment.glName);break;case 2:this._stencilAttachment||(this._stencilAttachment=new r(this._context,{internalFormat:36168,width:o.width,height:o.height})),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.STENCIL_ATTACHMENT,t.RENDERBUFFER,this._stencilAttachment.glName);break;case 4:this._depthStencilTexture||(this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),this._depthStencilTexture=new n(this._context,{target:3553,pixelFormat:34041,dataType:34042,samplingMode:9728,wrapMode:33071,width:o.width,height:o.height})),t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,this._depthStencilTexture.glName,0)}return i("esri-validate-shaders")&&t.checkFramebufferStatus(t.FRAMEBUFFER)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!"),this._glName=e,this._initialized=!0,!0},t.prototype._disposeColorAttachment=function(){if(this._colorAttachment instanceof n){var t=this._colorAttachment;this._initialized&&(this._context.bindFramebuffer(this),(i=this._context.gl).framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,null,0)),t.dispose()}else if(this._colorAttachment instanceof WebGLRenderbuffer){var e=this._colorAttachment,i=this._context.gl;this._initialized&&(this._context.bindFramebuffer(this),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,null)),this._context.gl.deleteRenderbuffer(e)}this._colorAttachment=null},t.prototype._disposeDepthStencilAttachments=function(){var t=this._context.gl;this._depthAttachment&&(this._initialized&&(this._context.bindFramebuffer(this),t.framebufferRenderbuffer(t.FRAMEBUFFER,1===this._desc.depthStencilTarget?t.DEPTH_ATTACHMENT:t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,null)),this._depthAttachment.dispose(),this._depthAttachment=null),this._stencilAttachment&&(this._initialized&&(this._context.bindFramebuffer(this),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.STENCIL_ATTACHMENT,t.RENDERBUFFER,null)),this._stencilAttachment.dispose(),this._stencilAttachment=null),this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,null,0)),this._depthStencilTexture.dispose(),this._depthStencilTexture=null)},t._validateBufferDimensions=function(t,e){console.assert(t.width>=0&&t.height>=0),void 0!==e.width&&e.width>=0&&void 0!==e.height&&e.height>=0?e.width===t.width&&e.height===t.height||console.error("Renderbuffer dimensions must match the framebuffer's!"):(e.width=t.width,e.height=t.height)},t._validateTextureDimensions=function(t,e){console.assert(t.width>=0&&t.height>=0),3553!==t.target&&console.error("Texture type must be TEXTURE_2D!"),void 0!==e.width&&e.width>=0&&void 0!==e.height&&e.height>=0?e.width===t.width&&e.height===t.height||console.error("Color attachment texture must match the framebuffer's!"):(e.width=t.width,e.height=t.height)},t._nextId=0,t}()}).apply(null,r))||(t.exports=n)},"37NJ":function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("U6iw"),i("DlJW"),i("7laH"),i("38Y5"),i("veTl")],void 0===(n=(function(t,e,i,r,n,o,s){function a(t,e,i,r,o){if(r&&n.default(t))return!0;if(e[i])return!1;for(var s=0,a=o;s<a.length;s++)if(t.getExtension(a[s]))return!0;return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.loadCapabilities=function(t,e){var l,c,h,u,d,f,_,p,g,m=e&&e.disabledExtensions||{},b=e&&e.debugWebGLExtensions||{},T=null,x=null,v=null,y=null;return{get instancing(){return l||(l=r.load(t)),l},get vao(){return c||(c=s.load(t,m)),c},get compressedTextureS3TC(){return h||(h=function(t,e){if(e.compressedTextureS3TC)return null;var i=t.getExtension("WEBGL_compressed_texture_s3tc");return i?{COMPRESSED_RGB_S3TC_DXT1:i.COMPRESSED_RGB_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT1:i.COMPRESSED_RGBA_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT3:i.COMPRESSED_RGBA_S3TC_DXT3_EXT,COMPRESSED_RGBA_S3TC_DXT5:i.COMPRESSED_RGBA_S3TC_DXT5_EXT}:null}(t,m)),h},get textureFilterAnisotropic(){return u||(u=function(t,e){if(e.textureFilterAnisotropic)return null;var i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");return i?{MAX_TEXTURE_MAX_ANISOTROPY:i.MAX_TEXTURE_MAX_ANISOTROPY_EXT,TEXTURE_MAX_ANISOTROPY:i.TEXTURE_MAX_ANISOTROPY_EXT}:null}(t,m)),u},get disjointTimerQuery(){return d||(d=i.load(t,m)),d},get textureFloat(){return f||(f=function(t,e){if(n.default(t))return{textureFloat:!0,textureFloatLinear:!e.textureFloatLinear&&!!t.getExtension("OES_texture_float_linear"),textureHalfFloat:!0,textureHalfFloatLinear:!e.textureHalfFloatLinear&&!!t.getExtension("OES_texture_half_float_linear"),HALF_FLOAT:t.HALF_FLOAT};if(t instanceof WebGLRenderingContext){var i=!e.textureHalfFloat&&t.getExtension("OES_texture_half_float");return{textureFloat:!e.textureFloat&&!!t.getExtension("OES_texture_float"),textureFloatLinear:!e.textureFloatLinear&&!!t.getExtension("OES_texture_float_linear"),textureHalfFloat:!!i,textureHalfFloatLinear:!e.textureHalfFloatLinear&&!!t.getExtension("OES_texture_half_float_linear"),HALF_FLOAT:i?i.HALF_FLOAT_OES:void 0}}return null}(t,m)),f},get colorBufferFloat(){return _||(_=function(t,e){if(n.default(t)){var i=!e.colorBufferFloat&&t.getExtension("EXT_color_buffer_half_float"),r=!e.colorBufferFloat&&t.getExtension("EXT_color_buffer_float");return i||r?{textureFloat:!!r,textureHalfFloat:!!i,R16F:t.R16F,RG16F:t.RG16F,RGBA16F:t.RGBA16F,R32F:t.R32F,RG32F:t.RG32F,RGBA32F:t.RGBA32F,R11F_G11F_B10F:t.R11F_G11F_B10F,RGB16F:t.RGB16F}:null}return t instanceof WebGLRenderingContext?(i=!e.colorBufferFloat&&t.getExtension("EXT_color_buffer_half_float"),r=!e.colorBufferFloat&&t.getExtension("WEBGL_color_buffer_float"),i||r?{textureFloat:!!r,textureHalfFloat:!!i,RGBA16F:i?i.RGBA16F_EXT:void 0,RGB16F:i?i.RGB16F_EXT:void 0,RGBA32F:r?r.RGBA32F_EXT:void 0}:null):null}(t,m)),_},get blendMinMax(){return p||(p=function(t,e){if(n.default(t))return{MIN:t.MIN,MAX:t.MAX};if(e.blendMinMax)return null;var i=t.getExtension("EXT_blend_minmax");return i?{MIN:i.MIN_EXT,MAX:i.MAX_EXT}:null}(t,m)),p},get depthTexture(){return null===T&&(T=a(t,m,"depthTexture",!0,["WEBGL_depth_texture","MOZ_WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"])),T},get standardDerivatives(){return null===x&&(x=a(t,m,"standardDerivatives",!0,["OES_standard_derivatives"])),x},get shaderTextureLOD(){return null===v&&(v=a(t,m,"shaderTextureLOD",!0,["EXT_shader_texture_lod"])),v},get fragDepth(){return null===y&&(y=a(t,m,"fragDepth",!0,["EXT_frag_depth"])),y},get loseContext(){return g||(g=o.load(t,b)),g}}}}).apply(null,r))||(t.exports=n)},"38Y5":function(t,e,i){var r,n;r=[i.dj.c(t.i),e],void 0===(n=(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.load=function(t,e){var i=e.loseContext&&t.getExtension("WEBGL_lose_context");return i?{loseRenderingContext:function(){return i.loseContext()}}:null}}).apply(null,r))||(t.exports=n)},"3KT0":function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("H1tY"),i("LxLY"),i("uwSd"),i("TCFx"),i("qbr3"),i("7laH"),i("37NJ")],void 0===(n=(function(t,e,i,r,n,o,s,a,l){function c(t,e){switch(t){case 0:return 2*e;case 4:return e/3;case 5:case 6:return e-2}return 0}return function(){function t(t,e){var r=this;this.gl=null,this._blendEnabled=!1,this._blendColorState={r:0,g:0,b:0,a:0},this._blendFunctionState={srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0},this._blendEquationState={mode:32774,modeAlpha:32774},this._colorMaskState={r:!0,g:!0,b:!0,a:!0},this._polygonCullingEnabled=!1,this._cullFace=1029,this._frontFace=2305,this._scissorTestEnabled=!1,this._scissorRect={x:0,y:0,width:0,height:0},this._depthTestEnabled=!1,this._depthFunction=513,this._clearDepth=1,this._depthWriteEnabled=!0,this._depthRange={zNear:0,zFar:1},this._viewport=null,this._stencilTestEnabled=!1,this._polygonOffsetFillEnabled=!1,this._polygonOffset=[0,0],this._stencilFunction={face:1032,func:519,ref:0,mask:1},this._clearStencil=0,this._stencilWriteMask=1,this._stencilOperation={face:1032,fail:7680,zFail:7680,zPass:7680},this._clearColor={r:0,g:0,b:0,a:0},this._activeShaderProgram=null,this._activeVertexBuffer=null,this._activeIndexBuffer=null,this._activeFramebuffer=null,this._activeRenderbuffer=null,this._activeTextureUnit=0,this._textureUnitMap={},this._numOfDrawCalls=0,this._numOfTriangles=0,this.contextVersion=a.default(t)?"webgl2":"webgl",this.gl=t,t instanceof WebGLRenderingContext&&this.gl.getExtension("OES_element_index_uint"),this._capabilities=l.loadCapabilities(t,e);var n=this.gl.getParameter(this.gl.VIEWPORT);this._viewport={x:n[0],y:n[1],width:n[2],height:n[3]},i("esri-webgl-debug")&&(this.instanceCounter=new o.InstanceCounter),this._stateTracker=new s.StateTracker({setBlending:function(t){if(t){r.setBlendingEnabled(!0),r.setBlendEquationSeparate(t.opRgb,t.opAlpha),r.setBlendFunctionSeparate(t.srcRgb,t.dstRgb,t.srcAlpha,t.dstAlpha);var e=t.color;r.setBlendColor(e.r,e.g,e.b,e.a)}else r.setBlendingEnabled(!1)},setCulling:function(t){t?(r.setFaceCullingEnabled(!0),r.setCullFace(t.face),r.setFrontFace(t.mode)):r.setFaceCullingEnabled(!1)},setPolygonOffset:function(t){t?(r.setPolygonOffsetFillEnabled(!0),r.setPolygonOffset(t.factor,t.units)):r.setPolygonOffsetFillEnabled(!1)},setDepthTest:function(t){t?(r.setDepthTestEnabled(!0),r.setDepthFunction(t.func)):r.setDepthTestEnabled(!1)},setStencilTest:function(t){if(t){r.setStencilTestEnabled(!0);var e=t.function;r.setStencilFunction(e.func,e.ref,e.mask);var i=t.operation;r.setStencilOp(i.fail,i.zFail,i.zPass)}else r.setStencilTestEnabled(!1)},setDepthWrite:function(t){t?(r.setDepthWriteEnabled(!0),r.setDepthRange(t.zNear,t.zFar)):r.setDepthWriteEnabled(!1)},setColorWrite:function(t){t?r.setColorMask(t.r,t.g,t.b,t.a):r.setColorMask(!1,!1,!1,!1)},setStencilWrite:function(t){r.setStencilWriteMask(t?t.mask:0)}}),this.enforceState()}return Object.defineProperty(t.prototype,"contextAttributes",{get:function(){return this.gl.getContextAttributes()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parameters",{get:function(){if(!this._parameters){var t=this.capabilities.textureFilterAnisotropic;this._parameters={versionString:this.gl.getParameter(this.gl.VERSION),maxVertexTextureImageUnits:this.gl.getParameter(this.gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxVertexAttributes:this.gl.getParameter(this.gl.MAX_VERTEX_ATTRIBS),maxMaxAnisotropy:t?this.gl.getParameter(t.MAX_TEXTURE_MAX_ANISOTROPY):void 0,maxTextureImageUnits:this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS),maxTextureSize:this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE)}}return this._parameters},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.bindVAO(null),this.unbindBuffer(34962),this.unbindBuffer(34963),this._textureUnitMap={},i("esri-webgl-debug")&&this.instanceCounter.printResourceCount(),this.gl=null},t.prototype.setPipelineState=function(t){this._stateTracker.setPipeline(t)},t.prototype.setBlendingEnabled=function(t){this._blendEnabled!==t&&(!0===t?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._blendEnabled=t,this._stateTracker.invalidateBlending())},t.prototype.setBlendColor=function(t,e,i,r){t===this._blendColorState.r&&e===this._blendColorState.g&&i===this._blendColorState.b&&r===this._blendColorState.a||(this.gl.blendColor(t,e,i,r),this._blendColorState.r=t,this._blendColorState.g=e,this._blendColorState.b=i,this._blendColorState.a=r,this._stateTracker.invalidateBlending())},t.prototype.setBlendFunction=function(t,e){t===this._blendFunctionState.srcRGB&&e===this._blendFunctionState.dstRGB||(this.gl.blendFunc(t,e),this._blendFunctionState.srcRGB=t,this._blendFunctionState.srcAlpha=t,this._blendFunctionState.dstRGB=e,this._blendFunctionState.dstAlpha=e,this._stateTracker.invalidateBlending())},t.prototype.setBlendFunctionSeparate=function(t,e,i,r){this._blendFunctionState.srcRGB===t&&this._blendFunctionState.srcAlpha===i&&this._blendFunctionState.dstRGB===e&&this._blendFunctionState.dstAlpha===r||(this.gl.blendFuncSeparate(t,e,i,r),this._blendFunctionState.srcRGB=t,this._blendFunctionState.srcAlpha=i,this._blendFunctionState.dstRGB=e,this._blendFunctionState.dstAlpha=r,this._stateTracker.invalidateBlending())},t.prototype.setBlendEquation=function(t){this._blendEquationState.mode!==t&&(this.gl.blendEquation(t),this._blendEquationState.mode=t,this._blendEquationState.modeAlpha=t,this._stateTracker.invalidateBlending())},t.prototype.setBlendEquationSeparate=function(t,e){this._blendEquationState.mode===t&&this._blendEquationState.modeAlpha===e||(this.gl.blendEquationSeparate(t,e),this._blendEquationState.mode=t,this._blendEquationState.modeAlpha=e,this._stateTracker.invalidateBlending())},t.prototype.setColorMask=function(t,e,i,r){this._colorMaskState.r===t&&this._colorMaskState.g===e&&this._colorMaskState.b===i&&this._colorMaskState.a===r||(this.gl.colorMask(t,e,i,r),this._colorMaskState.r=t,this._colorMaskState.g=e,this._colorMaskState.b=i,this._colorMaskState.a=r,this._stateTracker.invalidateColorWrite())},t.prototype.setClearColor=function(t,e,i,r){this._clearColor.r===t&&this._clearColor.g===e&&this._clearColor.b===i&&this._clearColor.a===r||(this.gl.clearColor(t,e,i,r),this._clearColor.r=t,this._clearColor.g=e,this._clearColor.b=i,this._clearColor.a=r)},t.prototype.setFaceCullingEnabled=function(t){this._polygonCullingEnabled!==t&&(!0===t?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._polygonCullingEnabled=t,this._stateTracker.invalidateCulling())},t.prototype.setPolygonOffsetFillEnabled=function(t){this._polygonOffsetFillEnabled!==t&&(!0===t?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._polygonOffsetFillEnabled=t,this._stateTracker.invalidatePolygonOffset())},t.prototype.setPolygonOffset=function(t,e){this._polygonOffset[0]===t&&this._polygonOffset[1]===e||(this._polygonOffset[0]=t,this._polygonOffset[1]=e,this.gl.polygonOffset(t,e),this._stateTracker.invalidatePolygonOffset())},t.prototype.setCullFace=function(t){this._cullFace!==t&&(this.gl.cullFace(t),this._cullFace=t,this._stateTracker.invalidateCulling())},t.prototype.setFrontFace=function(t){this._frontFace!==t&&(this.gl.frontFace(t),this._frontFace=t,this._stateTracker.invalidateCulling())},t.prototype.setScissorTestEnabled=function(t){this._scissorTestEnabled!==t&&(!0===t?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._scissorTestEnabled=t)},t.prototype.setScissorRect=function(t,e,i,r){this._scissorRect.x===t&&this._scissorRect.y===e&&this._scissorRect.width===i&&this._scissorRect.height===r||(this.gl.scissor(t,e,i,r),this._scissorRect.x=t,this._scissorRect.y=e,this._scissorRect.width=i,this._scissorRect.height=r)},t.prototype.setDepthTestEnabled=function(t){this._depthTestEnabled!==t&&(!0===t?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._depthTestEnabled=t,this._stateTracker.invalidateDepthTest())},t.prototype.setClearDepth=function(t){this._clearDepth!==t&&(this.gl.clearDepth(t),this._clearDepth=t)},t.prototype.setDepthFunction=function(t){this._depthFunction!==t&&(this.gl.depthFunc(t),this._depthFunction=t,this._stateTracker.invalidateDepthTest())},t.prototype.setDepthWriteEnabled=function(t){this._depthWriteEnabled!==t&&(this.gl.depthMask(t),this._depthWriteEnabled=t,this._stateTracker.invalidateDepthWrite())},t.prototype.setDepthRange=function(t,e){this._depthRange.zNear===t&&this._depthRange.zFar===e||(this.gl.depthRange(t,e),this._depthRange.zNear=t,this._depthRange.zFar=e,this._stateTracker.invalidateDepthWrite())},t.prototype.setStencilTestEnabled=function(t){this._stencilTestEnabled!==t&&(!0===t?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._stencilTestEnabled=t,this._stateTracker.invalidateStencilTest())},t.prototype.setClearStencil=function(t){t!==this._clearStencil&&(this.gl.clearStencil(t),this._clearStencil=t)},t.prototype.setStencilFunction=function(t,e,i){this._stencilFunction.func===t&&this._stencilFunction.ref===e&&this._stencilFunction.mask===i||(this.gl.stencilFunc(t,e,i),this._stencilFunction.face=1032,this._stencilFunction.func=t,this._stencilFunction.ref=e,this._stencilFunction.mask=i,this._stateTracker.invalidateStencilTest())},t.prototype.setStencilFunctionSeparate=function(t,e,i,r){this._stencilFunction.face===t&&this._stencilFunction.func===e&&this._stencilFunction.ref===i&&this._stencilFunction.mask===r||(this.gl.stencilFuncSeparate(t,e,i,r),this._stencilFunction.face=t,this._stencilFunction.func=e,this._stencilFunction.ref=i,this._stencilFunction.mask=r,this._stateTracker.invalidateStencilTest())},t.prototype.setStencilWriteMask=function(t){this._stencilWriteMask!==t&&(this.gl.stencilMask(t),this._stencilWriteMask=t,this._stateTracker.invalidateStencilWrite())},t.prototype.setStencilOp=function(t,e,i){this._stencilOperation.fail===t&&this._stencilOperation.zFail===e&&this._stencilOperation.zPass===i||(this.gl.stencilOp(t,e,i),this._stencilOperation.face=1032,this._stencilOperation.fail=t,this._stencilOperation.zFail=e,this._stencilOperation.zPass=i,this._stateTracker.invalidateStencilTest())},t.prototype.setStencilOpSeparate=function(t,e,i,r){this._stencilOperation.face===t&&this._stencilOperation.fail===e&&this._stencilOperation.zFail===i&&this._stencilOperation.zPass===r||(this.gl.stencilOpSeparate(t,e,i,r),this._stencilOperation.face=t,this._stencilOperation.face=t,this._stencilOperation.fail=e,this._stencilOperation.zFail=i,this._stencilOperation.zPass=r,this._stateTracker.invalidateStencilTest())},t.prototype.setActiveTexture=function(t){var e=this._activeTextureUnit;return t>=0&&t!==this._activeTextureUnit&&(this.gl.activeTexture(n.BASE_TEXTURE_UNIT+t),this._activeTextureUnit=t),e},t.prototype.clear=function(t){t&&this.gl.clear(t)},t.prototype.clearSafe=function(t,e){void 0===e&&(e=255),t&&(16384&t&&this.setColorMask(!0,!0,!0,!0),256&t&&this.setDepthWriteEnabled(!0),1024&t&&this.setStencilWriteMask(e),this.gl.clear(t))},t.prototype.drawArrays=function(t,e,r){i("esri-webgl-debug")&&(this._numOfDrawCalls++,this._numOfTriangles+=c(t,r)),this.gl.drawArrays(t,e,r)},t.prototype.drawElements=function(t,e,r,n){i("esri-webgl-debug")&&(this._numOfDrawCalls++,this._numOfTriangles+=c(t,e)),5123!==r?5125===r&&this.gl.drawElements(t,e,r,n):this.gl.drawElements(t,e,r,n)},t.prototype.logIno=function(){i("esri-webgl-debug")&&console.log("DrawCalls: "+this._numOfDrawCalls+", Triangles: "+this._numOfTriangles)},Object.defineProperty(t.prototype,"capabilities",{get:function(){return this._capabilities},enumerable:!0,configurable:!0}),t.prototype.setViewport=function(t,e,i,r){var n=this._viewport;n.x===t&&n.y===e&&n.width===i&&n.height===r||(n.x=t,n.y=e,n.width=i,n.height=r,this.gl.viewport(t,e,i,r))},t.prototype.getViewport=function(){return{x:this._viewport.x,y:this._viewport.y,width:this._viewport.width,height:this._viewport.height}},t.prototype.bindProgram=function(t){if(!t)return this.gl.useProgram(null),void(this._activeShaderProgram=null);this._activeShaderProgram!==t&&(t.initialize(),this.gl.useProgram(t.glName),this._activeShaderProgram=t)},t.prototype.bindTexture=function(e,i){void 0===i&&(i=0),-1===t._MAX_TEXTURE_IMAGE_UNITS&&(t._MAX_TEXTURE_IMAGE_UNITS=this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS)),(i>=t._MAX_TEXTURE_IMAGE_UNITS||i<0)&&console.error("Input texture unit is out of range of available units!");var r=this._textureUnitMap[i];if(this.setActiveTexture(i),null==e||null==e.glName)return null!=r&&(this.gl.bindTexture(r.descriptor.target,null),r.setBoundToUnit(i,!1)),void(this._textureUnitMap[i]=null);r&&r.id===e.id?e.applyChanges():(r&&r.setBoundToUnit(i,!1),this.gl.bindTexture(e.descriptor.target,e.glName),e.setBoundToUnit(i,!0),e.applyChanges(),this._textureUnitMap[i]=e)},t.prototype.bindFramebuffer=function(t){if(r.isNone(t))return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),void(this._activeFramebuffer=null);this._activeFramebuffer!==t&&(t.initialize()||this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,t.glName),this._activeFramebuffer=t)},t.prototype.bindBuffer=function(e){e&&(34962===e.bufferType?this._activeVertexBuffer=t._bindBuffer(this.gl,e,e.bufferType,this._activeVertexBuffer):this._activeIndexBuffer=t._bindBuffer(this.gl,e,e.bufferType,this._activeIndexBuffer))},t.prototype.bindRenderbuffer=function(t){var e=this.gl;t||(e.bindRenderbuffer(e.RENDERBUFFER,null),this._activeRenderbuffer=null),this._activeRenderbuffer!==t&&(e.bindRenderbuffer(e.RENDERBUFFER,t.glName),this._activeRenderbuffer=t)},t.prototype.unbindBuffer=function(e){34962===e?this._activeVertexBuffer=t._bindBuffer(this.gl,null,e,this._activeVertexBuffer):this._activeIndexBuffer=t._bindBuffer(this.gl,null,e,this._activeIndexBuffer)},t.prototype.bindVAO=function(t){t?this._activeVertexArrayObject&&this._activeVertexArrayObject.id===t.id||(t.bind(),this._activeVertexArrayObject=t):this._activeVertexArrayObject&&(this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=null)},t.prototype.getBoundTexture=function(t){return this._textureUnitMap[t]},t.prototype.getBoundFramebufferObject=function(){return this._activeFramebuffer},t.prototype.getBoundVAO=function(){return this._activeVertexArrayObject},t.prototype.resetState=function(){this.bindProgram(null),this.bindVAO(null),this.bindFramebuffer(null),this.unbindBuffer(34962),this.unbindBuffer(34963);for(var t=0;t<this.parameters.maxTextureImageUnits;t++)this.bindTexture(null,t);this.setBlendingEnabled(!1),this.setBlendFunction(1,0),this.setBlendEquation(32774),this.setBlendColor(0,0,0,0),this.setFaceCullingEnabled(!1),this.setCullFace(1029),this.setFrontFace(2305),this.setPolygonOffsetFillEnabled(!1),this.setPolygonOffset(0,0),this.setScissorTestEnabled(!1),this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height),this.setDepthTestEnabled(!1),this.setDepthFunction(513),this.setDepthRange(0,1),this.setStencilTestEnabled(!1),this.setStencilFunction(519,0,0),this.setStencilOp(7680,7680,7680),this.setClearColor(0,0,0,0),this.setClearDepth(1),this.setClearStencil(0),this.setColorMask(!0,!0,!0,!0),this.setStencilWriteMask(4294967295),this.setDepthWriteEnabled(!0),this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)},t.prototype.enforceState=function(){var t=this.gl,e=this.capabilities.vao;e&&e.bindVertexArray(null);for(var r=0;r<this.parameters.maxVertexAttributes;r++)t.disableVertexAttribArray(r);if(this._activeVertexBuffer?t.bindBuffer(this._activeVertexBuffer.bufferType,this._activeVertexBuffer.glName):t.bindBuffer(34962,null),this._activeIndexBuffer?t.bindBuffer(this._activeIndexBuffer.bufferType,this._activeIndexBuffer.glName):t.bindBuffer(34963,null),e&&this._activeVertexArrayObject){var o=this._activeVertexArrayObject;this._activeVertexArrayObject&&(this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=null),this.bindVAO(o)}t.bindFramebuffer(t.FRAMEBUFFER,this._activeFramebuffer?this._activeFramebuffer.glName:null),t.useProgram(this._activeShaderProgram?this._activeShaderProgram.glName:null),t.blendColor(this._blendColorState.r,this._blendColorState.g,this._blendColorState.b,this._blendColorState.a),t.bindRenderbuffer(t.RENDERBUFFER,this._activeRenderbuffer?this._activeRenderbuffer.glName:null),!0===this._blendEnabled?t.enable(this.gl.BLEND):t.disable(this.gl.BLEND),t.blendEquationSeparate(this._blendEquationState.mode,this._blendEquationState.modeAlpha),t.blendFuncSeparate(this._blendFunctionState.srcRGB,this._blendFunctionState.dstRGB,this._blendFunctionState.srcAlpha,this._blendFunctionState.dstAlpha),t.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a),t.clearDepth(this._clearDepth),t.clearStencil(this._clearStencil),t.colorMask(this._colorMaskState.r,this._colorMaskState.g,this._colorMaskState.b,this._colorMaskState.a),t.cullFace(this._cullFace),t.depthFunc(this._depthFunction),t.depthRange(this._depthRange.zNear,this._depthRange.zFar),!0===this._depthTestEnabled?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),t.depthMask(this._depthWriteEnabled),t.frontFace(this._frontFace),t.lineWidth(1),!0===this._polygonCullingEnabled?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),t.polygonOffset(this._polygonOffset[0],this._polygonOffset[1]),!0===this._polygonOffsetFillEnabled?t.enable(t.POLYGON_OFFSET_FILL):t.disable(t.POLYGON_OFFSET_FILL),t.scissor(this._scissorRect.x,this._scissorRect.y,this._scissorRect.width,this._scissorRect.height),!0===this._scissorTestEnabled?t.enable(t.SCISSOR_TEST):t.disable(t.SCISSOR_TEST),t.stencilFunc(this._stencilFunction.func,this._stencilFunction.ref,this._stencilFunction.mask),t.stencilOpSeparate(this._stencilOperation.face,this._stencilOperation.fail,this._stencilOperation.zFail,this._stencilOperation.zPass),!0===this._stencilTestEnabled?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),t.stencilMask(this._stencilWriteMask);for(var s=0;s<this.parameters.maxTextureImageUnits;s++){t.activeTexture(n.BASE_TEXTURE_UNIT+s),t.bindTexture(3553,null);var a=this._textureUnitMap[s];a&&t.bindTexture(a.descriptor.target,a.glName)}t.activeTexture(n.BASE_TEXTURE_UNIT+this._activeTextureUnit),t.viewport(this._viewport.x,this._viewport.y,this._viewport.width,this._viewport.height),i("esri-webgl-debug")&&(this._numOfDrawCalls=0,this._numOfTriangles=0)},t._bindBuffer=function(t,e,i,r){return e?r===e?r:(t.bindBuffer(i,e.glName),e):(t.bindBuffer(i,null),null)},t._MAX_TEXTURE_IMAGE_UNITS=-1,t}()}).apply(null,r))||(t.exports=n)},"7laH":function(t,e,i){var r,n;r=[i.dj.c(t.i),e],void 0===(n=(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return window.WebGL2RenderingContext&&t instanceof window.WebGL2RenderingContext}}).apply(null,r))||(t.exports=n)},"9E9H":function(t,e,i){var r;void 0===(r=(function(){"use strict";return["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]}).apply(null,[]))||(t.exports=r)},CJs7:function(t,e,i){var r;void 0===(r=(function(){return["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]}).apply(null,[]))||(t.exports=r)},DJpR:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("QFi0"),i("/f24"),i("G0ER"),i("Rrc3"),i("3KT0"),i("IROT"),i("Zp3t"),i("z2+Q"),i("NIl/"),i("U+8K"),i("qLgY")],void 0===(n=(function(t,e,i,r,n,o,s,a,l,c,h,u,d){Object.defineProperty(e,"__esModule",{value:!0}),e.BufferObject=i,e.FramebufferObject=r,e.Program=n,e.Renderbuffer=o,e.RenderingContext=s,e.ShaderCompiler=a,e.Texture=l,e.VertexArrayObject=c,e.ProgramCache=h.ProgramCache,e.createProgram=u.createProgram,e.glslifyDefineMap=u.glslifyDefineMap,e.createContextOrErrorHTML=d.createContextOrErrorHTML}).apply(null,r))||(t.exports=n)},DlJW:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("7laH")],void 0===(n=(function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.load=function(t){if(i.default(t))return{drawArraysInstanced:t.drawArraysInstanced.bind(t),drawElementsInstanced:t.drawElementsInstanced.bind(t),vertexAttribDivisor:t.vertexAttribDivisor.bind(t)};var e=t.getExtension("ANGLE_instanced_arrays");return e?{drawArraysInstanced:e.drawArraysInstancedANGLE.bind(e),drawElementsInstanced:e.drawElementsInstancedANGLE.bind(e),vertexAttribDivisor:e.vertexAttribDivisorANGLE.bind(e)}:null}}).apply(null,r))||(t.exports=n)},G0ER:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("H1tY"),i("LxLY"),i("Zn9k")],void 0===(n=(function(t,e,i,r,n){var o=i("esri-debug-messages");function s(t,e){if(r.isNone(t)||t.length!==e.length)return!0;for(var i=0;i<t.length;++i)if(t[i]!==e[i])return!0;return!1}return function(){function t(e,r,n,o,s){if(void 0===s&&(s={}),this._context=null,this._glName=null,this._locations={},this._id=void 0,this._initialized=!1,this._vShader=null,this._fShader=null,this._defines={},this._nameToUniformLocation={},this._nameToAttribLocation={},this._nameToUniform1={},this._nameToUniform1v={},this._nameToUniform2={},this._nameToUniform3={},this._nameToUniform4={},this._nameToUniformMatrix3={},this._nameToUniformMatrix4={},e||console.error("RenderingContext isn't initialized!"),0===r.length&&console.error("Shaders source should not be empty!"),this._context=e,this._vertexShaderSource=r,this._fragmentShaderSource=n,Array.isArray(s))for(var a=0,l=s;a<l.length;a++)this._defines[l[a]]="1";else this._defines=s;this._id=t._nextId++,this._locations=o,i("esri-webgl-debug")&&e.instanceCounter.increment(3,this)}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"locations",{get:function(){return this._locations},enumerable:!0,configurable:!0}),t.prototype.getDefine=function(t){return this._defines[t]},t.prototype.dispose=function(){if(this._context){var t=this._context.gl;this._vShader&&(t.deleteShader(this._vShader),this._vShader=null),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null),this._glName&&(t.deleteProgram(this._glName),this._glName=null),i("esri-webgl-debug")&&this._context.instanceCounter.decrement(3,this),this._context=null}},t.prototype.initialize=function(){if(!this._initialized){this._vShader=this._loadShader(35633),this._fShader=this._loadShader(35632),this._vShader&&this._fShader||console.error("Error loading shaders!");var t=this._context.gl,e=t.createProgram();for(var r in t.attachShader(e,this._vShader),t.attachShader(e,this._fShader),this._locations)t.bindAttribLocation(e,this._locations[r],r);t.linkProgram(e),i("esri-validate-shaders")&&!t.getProgramParameter(e,t.LINK_STATUS)&&console.error("Could not initialize shader\nVALIDATE_STATUS: "+t.getProgramParameter(e,t.VALIDATE_STATUS)+", gl error ["+t.getError()+"]infoLog: "+t.getProgramInfoLog(e)),this._glName=e,this._initialized=!0}},t.prototype.getUniformLocation=function(t){return this.initialize(),void 0===this._nameToUniformLocation[t]&&(this._nameToUniformLocation[t]=this._context.gl.getUniformLocation(this._glName,t)),this._nameToUniformLocation[t]},t.prototype.hasUniform=function(t){return null!==this.getUniformLocation(t)},t.prototype.getAttribLocation=function(t){return this.initialize(),void 0===this._nameToAttribLocation[t]&&(this._nameToAttribLocation[t]=this._context.gl.getAttribLocation(this._glName,t)),this._nameToAttribLocation[t]},t.prototype.setUniform1i=function(t,e){var i=this._nameToUniform1[t];void 0!==i&&e===i||(this._context.bindProgram(this),this._context.gl.uniform1i(this.getUniformLocation(t),e),this._nameToUniform1[t]=e)},t.prototype.setUniform1iv=function(e,i){var r=this._nameToUniform1v[e];s(r,i)&&(this._context.bindProgram(this),this._context.gl.uniform1iv(this.getUniformLocation(e),i),void 0===r?this._nameToUniform1v[e]=t._arrayCopy(i):t._arrayAssign(i,r))},t.prototype.setUniform2iv=function(e,i){o&&i.length%2!=0&&console.error("Value array must have even number of elements!");var r=this._nameToUniform2[e];s(r,i)&&(this._context.bindProgram(this),this._context.gl.uniform2iv(this.getUniformLocation(e),i),void 0===r?this._nameToUniform2[e]=t._arrayCopy(i):t._arrayAssign(i,r))},t.prototype.setUniform3iv=function(e,i){o&&i.length%3!=0&&console.error("Value array must contain sets of three values!");var r=this._nameToUniform3[e];s(r,i)&&(this._context.bindProgram(this),this._context.gl.uniform3iv(this.getUniformLocation(e),i),void 0===r?this._nameToUniform3[e]=t._arrayCopy(i):t._arrayAssign(i,r))},t.prototype.setUniform4iv=function(e,i){o&&i.length%4!=0&&console.error("Value array must contain sets of four values!");var r=this._nameToUniform4[e];s(r,i)&&(this._context.bindProgram(this),this._context.gl.uniform4iv(this.getUniformLocation(e),i),void 0===r?this._nameToUniform4[e]=t._arrayCopy(i):t._arrayAssign(i,r))},t.prototype.setUniform1f=function(t,e){var i=this._nameToUniform1[t];void 0!==i&&e===i||(this._context.bindProgram(this),this._context.gl.uniform1f(this.getUniformLocation(t),e),this._nameToUniform1[t]=e)},t.prototype.setUniform1fv=function(e,i){var r=this._nameToUniform1v[e];s(r,i)&&(this._context.bindProgram(this),this._context.gl.uniform1fv(this.getUniformLocation(e),i),void 0===r?this._nameToUniform1v[e]=t._arrayCopy(i):t._arrayAssign(i,r))},t.prototype.setUniform2f=function(t,e,i){var r=this._nameToUniform2[t];void 0!==r&&e===r[0]&&i===r[1]||(this._context.bindProgram(this),this._context.gl.uniform2f(this.getUniformLocation(t),e,i),void 0===r?this._nameToUniform2[t]=[e,i]:(r[0]=e,r[1]=i))},t.prototype.setUniform2fv=function(e,i){o&&i.length%2!=0&&console.error("Value array must have even number of elements!");var r=this._nameToUniform2[e];s(r,i)&&(this._context.bindProgram(this),this._context.gl.uniform2fv(this.getUniformLocation(e),i),void 0===r?this._nameToUniform2[e]=t._arrayCopy(i):t._arrayAssign(i,r))},t.prototype.setUniform3f=function(t,e,i,r){var n=this._nameToUniform3[t];void 0!==n&&e===n[0]&&i===n[1]&&r===n[2]||(this._context.bindProgram(this),this._context.gl.uniform3f(this.getUniformLocation(t),e,i,r),void 0===n?this._nameToUniform3[t]=[e,i,r]:(n[0]=e,n[1]=i,n[2]=r))},t.prototype.setUniform3fv=function(e,i){o&&i.length%3!=0&&console.error("Value array must contain sets of three values!");var r=this._nameToUniform3[e];s(r,i)&&(this._context.bindProgram(this),this._context.gl.uniform3fv(this.getUniformLocation(e),i),void 0===r?this._nameToUniform3[e]=t._arrayCopy(i):t._arrayAssign(i,r))},t.prototype.setUniform4f=function(t,e,i,r,n){var o=this._nameToUniform4[t];void 0!==o&&e===o[0]&&i===o[1]&&r===o[2]&&n===o[3]||(this._context.bindProgram(this),this._context.gl.uniform4f(this.getUniformLocation(t),e,i,r,n),void 0===o?this._nameToUniform4[t]=[e,i,r,n]:(o[0]=e,o[1]=i,o[2]=r,o[3]=n))},t.prototype.setUniform4fv=function(e,i){o&&i.length%4!=0&&console.error("Value array must contain sets of four values!");var r=this._nameToUniform4[e];s(r,i)&&(this._context.bindProgram(this),this._context.gl.uniform4fv(this.getUniformLocation(e),i),void 0===r?this._nameToUniform4[e]=t._arrayCopy(i):t._arrayAssign(i,r))},t.prototype.setUniformMatrix3fv=function(e,i,n){void 0===n&&(n=!1),o&&i.length%9!=0&&console.error("Matrix array must contain sets ot 9 elements!");var a=this._nameToUniformMatrix3[e];(function(t,e){return!!r.isNone(t)||(9!==t.length?s(t,e):(o&&9!==e.length&&console.error("Matrix object must contain 16 elements!"),9!==t.length||t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]||t[6]!==e[6]||t[7]!==e[7]||t[8]!==e[8]))})(a,i)&&(this._context.bindProgram(this),this._context.gl.uniformMatrix3fv(this.getUniformLocation(e),n,i),void 0===a?this._nameToUniformMatrix3[e]=t._arrayCopy(i):t._arrayAssign(i,a))},t.prototype.setUniformMatrix4fv=function(e,i,n){void 0===n&&(n=!1),o&&i.length%16!=0&&console.error("Matrix array must contain sets ot 16 elements!");var a=this._nameToUniformMatrix4[e];(function(t,e){return!!r.isNone(t)||(16!==t.length?s(t,e):(o&&16!==e.length&&console.error("Matrix object must contain 16 elements!"),16!==t.length||t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]||t[6]!==e[6]||t[7]!==e[7]||t[8]!==e[8]||t[9]!==e[9]||t[10]!==e[10]||t[11]!==e[11]||t[12]!==e[12]||t[13]!==e[13]||t[14]!==e[14]||t[15]!==e[15]))})(a,i)&&(this._context.bindProgram(this),this._context.gl.uniformMatrix4fv(this.getUniformLocation(e),n,i),void 0===a?this._nameToUniformMatrix4[e]=t._arrayCopy(i):t._arrayAssign(i,a))},t.prototype.assertCompatibleVertexAttributeLocations=function(t){var e=t.locations===this.locations;return e||console.error("VertexAttributeLocations are incompatible"),e},t._padToThree=function(t){var e=t.toString();return t<1e3&&(e=(" "+t).slice(-3)),e},t.prototype._addLineNumbers=function(e){var i=2;return e.replace(/\n/g,(function(){return"\n"+t._padToThree(i++)+":"}))},t.prototype._loadShader=function(t){var e=35633===t,r=e?this._vertexShaderSource:this._fragmentShaderSource,o=r,s="";for(var a in this._defines)s+="#define "+a+" "+this._defines[a]+"\n";o=s+o,"webgl2"===this._context.contextVersion&&(o=n.transpileShader(o,e?"vertex":"fragment"));var l=this._context.gl,c=l.createShader(t);return l.shaderSource(c,o),l.compileShader(c),i("esri-validate-shaders")&&!l.getShaderParameter(c,l.COMPILE_STATUS)&&(console.error("Compile error in ".concat(e?"vertex":"fragment"," shader")),console.error(l.getShaderInfoLog(c)),console.error(this._addLineNumbers(o)),"webgl2"===this._context.contextVersion&&(console.log("Shader source before transpilation:"),console.log(r))),c},t._arrayCopy=function(t){for(var e=[],i=0;i<t.length;++i)e.push(t[i]);return e},t._arrayAssign=function(t,e){for(var i=0;i<t.length;++i)e[i]=t[i]},t._nextId=0,t}()}).apply(null,r))||(t.exports=n)},Gc7o:function(t,e,i){var r;void 0===(r=(function(){"use strict";return["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]}).apply(null,[]))||(t.exports=r)},HXXw:function(t,e,i){var r,n;r=[i("Ysiz")],void 0===(n=(function(t){return function(e){var i=t(),r=[];return(r=r.concat(i(e))).concat(i(null))}}).apply(null,r))||(t.exports=n)},IROT:function(t,e,i){var r,n;r=[i.dj.c(t.i),e],void 0===(n=(function(t,e){return function(){function t(t){this.readFile=t}return t.prototype.resolveIncludes=function(t){return this.resolve(t)},t.prototype.resolve=function(t,e){var i=this;if(void 0===e&&(e=new Map),e.has(t))return e.get(t);var r=this.read(t);if(!r)throw new Error("cannot find shader file "+t);for(var n=/^[^\S\n]*#include\s+<(\S+)>[^\S\n]?/gm,o=n.exec(r),s=[];null!=o;)s.push({path:o[1],start:o.index,length:o[0].length}),o=n.exec(r);var a=0,l="";return s.forEach((function(t){l+=r.slice(a,t.start),l+=e.has(t.path)?"":i.resolve(t.path,e),a=t.start+t.length})),l+=r.slice(a),e.set(t,l),l},t.prototype.read=function(t){return this.readFile(t)},t}()}).apply(null,r))||(t.exports=n)},Kfys:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("zOht"),i("pcDC"),i("LxLY")],void 0===(n=(function(t,e,i,r,n){function o(t){return t[0].stride}function s(t){switch(t){case 5126:case 5124:case 5125:return 4;case 5122:case 5123:return 2;case 5120:case 5121:return 1;default:throw r.neverReached(t),new Error("Unknown data type")}}function a(t){switch(t){case 6406:case 6409:case 36168:return 1;case 6410:case 33325:case 33189:case 32854:return 2;case 6407:return 3;case 6408:case 34041:case 33326:case 35898:case 33327:case 34041:return 4;case 33328:case 34842:return 8;case 34836:return 16;default:r.neverReached(t)}return 0}Object.defineProperty(e,"__esModule",{value:!0}),e.vertexCount=function(t,e){return t.vertexBuffers[e].size/o(t.layout[e])},e.getStride=o,e.getBytesPerElement=s,e.getTypedArrayConstructor=function(t){switch(t){case 5120:return Int8Array;case 5126:return Float32Array;case 5124:return Int32Array;case 5122:return Int16Array;case 5121:return Uint8Array;case 5125:return Uint32Array;case 5123:return Uint16Array;default:throw r.neverReached(t),new Error("Unknown data type")}},e.addDescriptor=function(t,e,i,r,n,o){var a=s(r);if(t.length>0){var l=t[0].stride,c=l+a*i;t.forEach((function(t){return t.stride=c})),t.push({name:e,count:i,type:r,offset:l,stride:c,normalized:n,divisor:o})}else t.push({name:e,count:i,type:r,offset:0,stride:a*i,normalized:n,divisor:o})},e.hasAttribute=function(t,e){for(var i=0;i<t.length;i++)if(t[i].name===e)return!0;return!1},e.findAttribute=function(t,e){for(var i=0;i<t.length;i++)if(t[i].name===e)return t[i];return null},e.copyFramebufferToTexture=function(t,e,i,r,n){void 0===n&&(n=0);var o=t.getBoundFramebufferObject(),s=t.getBoundTexture(0);t.bindFramebuffer(e),t.bindTexture(i,0),t.gl.copyTexImage2D(t.gl.TEXTURE_2D,n,i.descriptor.pixelFormat,r[0],r[1],r[2],r[3],0),t.gl.flush(),t.bindFramebuffer(o),t.bindTexture(s,0)},e.setBaseInstanceOffset=function(t,e){var r={};for(var n in t)r[n]=t[n].map((function(t){return t.divisor?i.__assign(i.__assign({},t),{baseInstance:e}):t}));return r},e.bindVertexBufferLayout=function(t,e,i,r,n){var o=t.gl,s=t.capabilities.instancing;t.bindBuffer(i);for(var a=0,l=r;a<l.length;a++){var c=l[a],h=e[c.name],u=(n||(0+c.baseInstance?c.baseInstance:0))*c.stride;if(void 0===h&&console.error("There is no location for vertex attribute '"+c.name+"' defined."),c.baseInstance&&!c.divisor&&console.error("Vertex attribute '"+c.name+"' uses baseInstanceOffset without divisor."),c.count<=4)o.vertexAttribPointer(h,c.count,c.type,c.normalized,c.stride,c.offset+u),o.enableVertexAttribArray(h),c.divisor&&c.divisor>0&&s&&s.vertexAttribDivisor(h,c.divisor);else if(9===c.count)for(var d=0;d<3;d++)o.vertexAttribPointer(h+d,3,c.type,c.normalized,c.stride,c.offset+12*d+u),o.enableVertexAttribArray(h+d),c.divisor&&c.divisor>0&&s&&s.vertexAttribDivisor(h+d,c.divisor);else if(16===c.count)for(d=0;d<4;d++)o.vertexAttribPointer(h+d,4,c.type,c.normalized,c.stride,c.offset+16*d+u),o.enableVertexAttribArray(h+d),c.divisor&&c.divisor>0&&s&&s.vertexAttribDivisor(h+d,c.divisor);else console.error("Unsupported vertex attribute element count: "+c.count)}},e.unbindVertexBufferLayout=function(t,e,i,r){var n=t.gl,o=t.capabilities.instancing;t.bindBuffer(i);for(var s=0,a=r;s<a.length;s++){var l=a[s],c=e[l.name];if(l.count<=4)n.disableVertexAttribArray(c),l.divisor&&l.divisor>0&&o&&o.vertexAttribDivisor(c,0);else if(9===l.count)for(var h=0;h<3;h++)n.disableVertexAttribArray(c+h),l.divisor&&l.divisor>0&&o&&o.vertexAttribDivisor(c+h,0);else if(16===l.count)for(h=0;h<4;h++)n.disableVertexAttribArray(c+h),l.divisor&&l.divisor>0&&o&&o.vertexAttribDivisor(c+h,0);else console.error("Unsupported vertex attribute element count: "+l.count)}t.unbindBuffer(34962)},e.getBytesPerElementFormat=a,e.getGpuMemoryUsage=function t(e){if(n.isNone(e))return 0;if("colorAttachment"in e)return e.glName?t(e.colorAttachment)+t(e.depthStencilAttachment):0;if("descriptor"in e)return e.glName?t(e.descriptor):0;var i=e.internalFormat||"pixelFormat"in e&&e.pixelFormat;if(!i)return 0;var r="hasMipmap"in e&&e.hasMipmap?1.3:1,o=e.width*e.height;return a(i)*o*r}}).apply(null,r))||(t.exports=n)},"NIl/":function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("U+8K")],void 0===(n=(function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this._programCacheByTemplate=new Map,this._rctx=t}return t.prototype.dispose=function(){this._programCacheByTemplate.forEach((function(t){t.programs.forEach((function(t){t.dispose()}))})),this._programCacheByTemplate=null},t.prototype.getProgram=function(t,e){var r=this;return this._programCacheByTemplate.has(t)||this.addProgramTemplate(t,(function(e){return i.createProgram(r._rctx,t,e)})),this.getProgramTemplateInstance(t,e)},t.prototype.addProgramTemplate=function(t,e){this._programCacheByTemplate.set(t,{constructor:e,programs:new Map})},t.prototype.getProgramTemplateInstance=function(t,e){var i=this._programCacheByTemplate.get(t);if(i){var r=e?JSON.stringify(e):"default";if(!i.programs.has(r)){var n=i.constructor(e);i.programs.set(r,n)}return i.programs.get(r)}return null},t}();e.ProgramCache=r}).apply(null,r))||(t.exports=n)},QFi0:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("H1tY"),i("rusB")],void 0===(n=(function(t,e,i,r){return function(){function t(e,r,n,o,s){this._context=null,this._glName=null,this._bufferType=void 0,this._usage=35044,this._size=-1,this._indexType=void 0,this._context=e,this._bufferType=r,this._usage=n,this._id=t._nextId++,this._glName=this._context.gl.createBuffer(),i("esri-webgl-debug")&&e.instanceCounter.increment(1,this),o&&this.setData(o,s)}return t.createIndex=function(e,i,r,n){return new t(e,34963,i,r,n)},t.createVertex=function(e,i,r){return new t(e,34962,i,r)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"usage",{get:function(){return this._usage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bufferType",{get:function(){return this._bufferType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"indexType",{get:function(){return this._indexType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"byteSize",{get:function(){return 34962===this._bufferType?this._size:5125===this._indexType?4*this._size:2*this._size},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._context&&(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),i("esri-webgl-debug")&&this._context.instanceCounter.decrement(1,this),this._context=null)},t.prototype.setData=function(t,e){if(t){if("number"==typeof t){if(t<0&&console.error("Buffer size cannot be negative!"),34963===this._bufferType&&e)switch(this._indexType=e,this._size=t,e){case 5123:t*=2;break;case 5125:t*=4}}else{var i=t.byteLength;r.isUint16Array(t)&&(i/=2,this._indexType=5123),r.isUint32Array(t)&&(i/=4,this._indexType=5125),this._size=i}var n=this._context.getBoundVAO();this._context.bindVAO(null),this._context.bindBuffer(this),this._context.gl.bufferData(this._bufferType,t,this._usage),this._context.bindVAO(n)}},t.prototype.setSubData=function(t,e,i,n){if(void 0===e&&(e=0),void 0===i&&(i=0),t){(e<0||e>=this._size)&&console.error("offset is out of range!");var o=e,s=i,a=n,l=t.byteLength;r.isUint16Array(t)&&(l/=2,o*=2,s*=2,a*=2),r.isUint32Array(t)&&(l/=4,o*=4,s*=4,a*=4),void 0===n&&(n=l-1),i>=n&&console.error("end must be bigger than start!"),e+i-n>this._size&&console.error("An attempt to write beyond the end of the buffer!");var c=this._context.getBoundVAO();this._context.bindVAO(null),this._context.bindBuffer(this);var h=this._context.gl,u=ArrayBuffer.isView(t)?t.buffer:t;h.bufferSubData(this._bufferType,o,u.slice(s,a)),this._context.bindVAO(c)}},t._nextId=0,t}()}).apply(null,r))||(t.exports=n)},Rrc3:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("H1tY")],void 0===(n=(function(t,e,i){return function(){function t(e,r){this._context=e,this._desc=r,this._glName=null,this._id=-1;var n=this._context.gl;i("esri-webgl-debug")&&this._context.instanceCounter.increment(5,this),this._id=++t._nextId,this._glName=n.createRenderbuffer(),this._context.bindRenderbuffer(this),n.renderbufferStorage(n.RENDERBUFFER,r.internalFormat,r.width,r.height)}return Object.defineProperty(t.prototype,"descriptor",{get:function(){return this._desc},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0}),t.prototype.resize=function(t,e){var i=this._context.gl,r=this._desc;r.width===t&&r.height===e||(r.width=t,r.height=e,this._context.bindRenderbuffer(this),i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height))},t.prototype.dispose=function(){this._glName&&(this._context.gl.deleteRenderbuffer(this._glName),this._glName=null),i("esri-webgl-debug")&&this._context&&this._context.instanceCounter.decrement(5,this),this._context=null},t._nextId=0,t}()}).apply(null,r))||(t.exports=n)},TCFx:function(t,e,i){var r,n;r=[i.dj.c(t.i),e],void 0===(n=(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){for(this._current=new Array,this._max=new Array,this._allocations=new Map;this._current.length<6;)this._current.push(0),this._max.push(0)}return t.prototype.increment=function(t,e){var i=++this._current[t];this._max[t]=Math.max(i,this._max[t])},t.prototype.decrement=function(t,e){--this._current[t]},Object.defineProperty(t.prototype,"max",{get:function(){return this._max},enumerable:!0,configurable:!0}),t.prototype.printResourceCount=function(){console.log("Live objects:"),console.log("Textures: "+this._current[0]),console.log("Buffers: "+this._current[1]),console.log("VAOs: "+this._current[2]),console.log("Programs: "+this._current[3]),console.log("Framebuffers: "+this._current[4]),console.log("Renderbuffers: "+this._current[5]),this._allocations.size>0&&(console.log(this._allocations.size+" live object allocations:"),this._allocations.forEach((function(t){return console.log(t)})))},t}();e.InstanceCounter=i}).apply(null,r))||(t.exports=n)},"U+8K":function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("G0ER")],void 0===(n=(function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.glslifyDefineMap=function(t){var e="";for(var i in t){var r=t[i];if("boolean"==typeof r)r&&(e+="#define "+i+"\n");else if("number"==typeof r)e+="#define "+i+" "+r.toFixed()+"\n";else if("object"==typeof r){var n=r.options,o=0;for(var s in n)e+="#define "+n[s]+" "+(o++).toFixed()+"\n";e+="#define "+i+" "+n[r.value]+"\n"}}return e},e.createProgram=function(t,e,r,n){r=r||{},n=n||"";var o="function"==typeof e.shaders?e.shaders(r):e.shaders;return new i(t,n+o.vertexShader,n+o.fragmentShader,e.attributes)}}).apply(null,r))||(t.exports=n)},U6iw:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("7laH")],void 0===(n=(function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.load=function(t,e){if(e.disjointTimerQuery)return null;var r=t.getExtension("EXT_disjoint_timer_query")||t.getExtension("EXT_disjoint_timer_query_webgl2");return r?i.default(t)?{createQuery:function(){return t.createQuery()},resultAvailable:function(e){return t.getQueryParameter(e,t.QUERY_RESULT_AVAILABLE)},getResult:function(e){return t.getQueryParameter(e,t.QUERY_RESULT)},disjoint:function(){return t.getParameter(r.GPU_DISJOINT_EXT)},beginTimeElapsed:function(e){return t.beginQuery(r.TIME_ELAPSED_EXT,e)},endTimeElapsed:function(){return t.endQuery(r.TIME_ELAPSED_EXT)},createTimestamp:function(t){return r.queryCounterEXT(t,r.TIMESTAMP_EXT)},timestampBits:function(){return t.getQuery(r.TIMESTAMP_EXT,r.QUERY_COUNTER_BITS_EXT)}}:{createQuery:function(){return r.createQueryEXT()},resultAvailable:function(t){return r.getQueryObjectEXT(t,r.QUERY_RESULT_AVAILABLE_EXT)},getResult:function(t){return r.getQueryObjectEXT(t,r.QUERY_RESULT_EXT)},disjoint:function(){return t.getParameter(r.GPU_DISJOINT_EXT)},beginTimeElapsed:function(t){return r.beginQueryEXT(r.TIME_ELAPSED_EXT,t)},endTimeElapsed:function(){return r.endQueryEXT(r.TIME_ELAPSED_EXT)},createTimestamp:function(t){return r.queryCounterEXT(t,r.TIMESTAMP_EXT)},timestampBits:function(){return r.getQueryEXT(r.TIMESTAMP_EXT,r.QUERY_COUNTER_BITS_EXT)}}:null}}).apply(null,r))||(t.exports=n)},Ysiz:function(t,e,i){var r,n;r=[i("Gc7o"),i("CJs7"),i("9E9H")],void 0===(n=(function(t,e,i){var r=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];return function(){var n,o,s,a=0,l=0,c=999,h=[],u=[],d=1,f=0,_=0,p=!1,g=!1,m="";return function(t){return u=[],null!==t?function(t){var e;for(a=0,s=(m+=t).length;n=m[a],a<s;){switch(e=a,c){case 0:a="/"===n&&"*"===o?(h.push(n),b(h.join("")),c=999,a+1):(h.push(n),o=n,a+1);break;case 1:case 2:a="\r"!==n&&"\n"!==n||"\\"===o?(h.push(n),o=n,a+1):(b(h.join("")),c=999,a);break;case 3:a=T();break;case 4:a="."===n||/[eE]/.test(n)?(h.push(n),c=5,o=n,a+1):"x"===n&&1===h.length&&"0"===h[0]?(c=11,h.push(n),o=n,a+1):/[^\d]/.test(n)?(b(h.join("")),c=999,a):(h.push(n),o=n,a+1);break;case 11:a=/[^a-fA-F0-9]/.test(n)?(b(h.join("")),c=999,a):(h.push(n),o=n,a+1);break;case 5:"f"===n&&(h.push(n),o=n,a+=1),a=/[eE]/.test(n)||"-"===n&&/[eE]/.test(o)?(h.push(n),o=n,a+1):/[^\d]/.test(n)?(b(h.join("")),c=999,a):(h.push(n),o=n,a+1);break;case 9999:a=v();break;case 9:a=/[^\s]/g.test(n)?(b(h.join("")),c=999,a):(h.push(n),o=n,a+1);break;case 999:h=h.length?[]:h,a="/"===o&&"*"===n?(_=l+a-1,c=0,o=n,a+1):"/"===o&&"/"===n?(_=l+a-1,c=1,o=n,a+1):"#"===n?(c=2,_=l+a,a):/\s/.test(n)?(c=9,_=l+a,a):(p=/\d/.test(n),g=/[^\w_]/.test(n),_=l+a,c=p?4:g?3:9999,a)}e!==a&&("\n"===m[e]?(f=0,++d):++f)}return l+=a,m=m.slice(a),u}(t.replace?t.replace(/\r\n/g,"\n"):t):(h.length&&b(h.join("")),c=10,b("(eof)"),u)};function b(t){t.length&&u.push({type:r[c],data:t,position:_,line:d,column:f})}function T(){if("."===o&&/\d/.test(n))return c=5,a;if("/"===o&&"*"===n)return c=0,a;if("/"===o&&"/"===n)return c=1,a;if("."===n&&h.length){for(;x(h););return c=5,a}if(";"===n||")"===n||"("===n){if(h.length)for(;x(h););return b(n),c=999,a+1}var t=2===h.length&&"="!==n;if(/[\w_\d\s]/.test(n)||t){for(;x(h););return c=999,a}return h.push(n),o=n,a+1}function x(t){for(var i,r,n=0;;){if(i=e.indexOf(t.slice(0,t.length+n).join("")),r=e[i],-1===i){if(n--+t.length>0)continue;r=t.slice(0,1).join("")}return b(r),_+=r.length,(h=h.slice(r.length)).length}}function v(){if(/[^\d\w_]/.test(n)){var e=h.join("");return c=t.indexOf(e)>-1?8:i.indexOf(e)>-1?7:6,b(h.join("")),c=999,a}return h.push(n),o=n,a+1}}}).apply(null,r))||(t.exports=n)},Zn9k:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("tOQU"),i("HXXw")],void 0===(n=(function(t,e,i,r){Object.defineProperty(e,"__esModule",{value:!0});var n=["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"];function o(t,e){for(var i=e-1;i>=0;i--){var r=t[i];if("whitespace"!==r.type&&"block-comment"!==r.type){if("keyword"!==r.type)break;if("attribute"===r.data||"in"===r.data)return!0}}return!1}function s(t,e,i,r){r=r||i;for(var n=0,o=t;n<o.length;n++){var a=o[n];if("ident"===a.type&&a.data===i)return r in e?e[r]++:e[r]=0,s(t,e,r+"_"+e[r],r)}return i}function a(t,e,i,r){void 0===r&&(r="lowp"),function(t,e,i){function r(t,e){for(var i=e;i<t.length;i++){var r=t[i];if("operator"===r.type&&";"===r.data)return i}return null}void 0===i&&(i="afterVersion");var n={data:"\n",type:"whitespace"},o=function(e){return e<t.length&&/[^\r\n]$/.test(t[e].data)},s=function(t){for(var e=-1,n=0,o=-1,s=0;s<t.length;s++){var a=t[s];if("preprocessor"===a.type&&(a.data.match(/\#(if|ifdef|ifndef)\s+.+/)?++n:a.data.match(/\#endif\s*.*/)&&--n),"afterVersion"!==i&&"afterPrecision"!==i||"preprocessor"===a.type&&/^#version/.test(a.data)&&(o=Math.max(o,s)),"afterPrecision"===i&&"keyword"===a.type&&"precision"===a.data){var l=r(t,s);if(null===l)throw new Error("precision statement not followed by any semicolons!");o=Math.max(o,l)}e<o&&0===n&&(e=s)}return e+1}(t);o(s-1)&&t.splice(s++,0,n);for(var a=0,l=e;a<l.length;a++)t.splice(s++,0,l[a]);o(s-1)&&o(s)&&t.splice(s,0,n)}(t,[{type:"keyword",data:"out"},{type:"whitespace",data:" "},{type:"keyword",data:r},{type:"whitespace",data:" "},{type:"keyword",data:i},{type:"whitespace",data:" "},{type:"ident",data:e},{type:"operator",data:";"}],"afterPrecision")}e.transpileShader=function(t,e){var l=function(t){return r(t)}(t);if("300 es"===function(t,e,i){void 0===e&&(e="100"),void 0===i&&(i="300 es");for(var r=/^\s*\#version\s+([0-9]+(\s+[a-zA-Z]+)?)\s*/,n=0,o=t;n<o.length;n++){var s=o[n];if("preprocessor"===s.type){var a=r.exec(s.data);if(a){var l=a[1].replace(/\s\s+/g," ");if(l===i)return l;if(l===e)return s.data="#version "+i,e;throw new Error("unknown glsl version: "+l)}}}return t.splice(0,0,{type:"preprocessor",data:"#version "+i},{type:"whitespace",data:"\n"}),null}(l,"100","300 es"))throw new Error("shader is already glsl 300 es");for(var c=null,h=null,u={},d={},f=0;f<l.length;++f)switch((_=l[f]).type){case"keyword":"vertex"===e&&"attribute"===_.data?_.data="in":"varying"===_.data&&(_.data="vertex"===e?"out":"in");break;case"builtin":/^texture(2D|Cube)(Proj)?(Lod|Grad)?(EXT)?$/.test(_.data.trim())&&(_.data=_.data.replace(/(2D|Cube|EXT)/g,"")),"fragment"===e&&"gl_FragColor"===_.data?(c||a(l,c=s(l,u,"fragColor"),"vec4"),_.data=c):"fragment"===e&&"gl_FragDepthEXT"===_.data&&(h||(h=s(l,u,"gl_FragDepth")),_.data=h);break;case"ident":if(i.indexOf(_.data)>=0){if("vertex"===e&&o(l,f))throw new Error("attribute in vertex shader uses a name that is a reserved word in glsl 300 es");_.data in d||(d[_.data]=s(l,u,_.data)),_.data=d[_.data]}}for(f=l.length-1;f>=0;--f){var _;if("preprocessor"===(_=l[f]).type){var p=_.data.match(/\#extension\s+(.*)\:/);if(p&&p[1]&&n.indexOf(p[1].trim())>=0){var g=l[f+1];l.splice(f,g&&"whitespace"===g.type?2:1)}var m=_.data.match(/\#ifdef\s+(.*)/);m&&m[1]&&n.indexOf(m[1].trim())>=0&&(_.data="#if 1");var b=_.data.match(/\#ifndef\s+(.*)/);b&&b[1]&&n.indexOf(b[1].trim())>=0&&(_.data="#if 0")}}return function(t){return t.map((function(t){return"eof"!==t.type?t.data:""})).join("")}(l)}}).apply(null,r))||(t.exports=n)},Zp3t:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("zOht"),i("H1tY"),i("xoE+"),i("LxLY")],void 0===(n=(function(t,e,i,r,n,o){return function(){function t(e,n,o){void 0===o&&(o=null),this._context=null,this._glName=null,this._id=-1,this._descriptor=void 0,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._boundToUnits=new Set,this._context=e,this._descriptor=i.__assign({target:3553,samplingMode:9729,wrapMode:10497,flipped:!1,hasMipmap:!1,isOpaque:!1,unpackAlignment:4,preMultiplyAlpha:!1},n),this._id=++t._nextId,r("esri-webgl-debug")&&e.instanceCounter.increment(0,this),this.setData(o)}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"descriptor",{get:function(){return this._descriptor},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){var t=this;if(this._context&&this._context.gl){if(this._glName){var e=this._context.gl;this._boundToUnits.forEach((function(e){t._context.bindTexture(null,e)})),e.deleteTexture(this._glName),this._glName=null}r("esri-webgl-debug")&&this._context.instanceCounter.decrement(0,this),this._context=null}},t.prototype.release=function(){this.dispose()},t.prototype.resize=function(t,e){var i=this._descriptor;i.width===t&&i.height===e||(i.width=t,i.height=e,this.setData(null))},t.prototype.setData=function(e){var i=this._context.gl;this._glName||(this._glName=i.createTexture()),void 0===e&&(e=null),null===e&&(this._descriptor.width=this._descriptor.width||4,this._descriptor.height=this._descriptor.height||4);var r=this._context.getBoundTexture(0);this._context.bindTexture(this,0);var n=this._descriptor;t._validateTexture(n),i.pixelStorei(i.UNPACK_ALIGNMENT,n.unpackAlignment),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n.flipped?1:0),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.preMultiplyAlpha?1:0);var s=n.pixelFormat,a=n.internalFormat?n.internalFormat:s;if(e instanceof ImageData||e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){var l=e.width,c=e.height;e instanceof HTMLVideoElement&&(l=e.videoWidth,c=e.videoHeight),n.width&&n.height&&console.assert(l===n.width&&c===n.height),i.texImage2D(i.TEXTURE_2D,0,a,s,n.dataType,e),n.hasMipmap&&this.generateMipmap(),void 0===n.width&&(n.width=l),void 0===n.height&&(n.height=c)}else if(null!=n.width&&null!=n.height||console.error("Width and height must be specified!"),i.DEPTH24_STENCIL8&&a===i.DEPTH_STENCIL&&(a=i.DEPTH24_STENCIL8),l=n.width,c=n.height,function(t){return o.isSome(t)&&"type"in t&&"compressed"===t.type}(e)){var h=Math.round(Math.log(Math.max(l,c))/Math.LN2)+1;n.hasMipmap=n.hasMipmap&&h===e.levels.length;for(var u=0;;++u){var d=e.levels[Math.min(u,e.levels.length-1)];if(i.compressedTexImage2D(i.TEXTURE_2D,u,a,l,c,0,d),1===l&&1===c||!n.hasMipmap)break;l=Math.max(1,l>>1),c=Math.max(1,c>>1)}}else if(o.isSome(e))i.texImage2D(i.TEXTURE_2D,0,a,l,c,0,s,n.dataType,e),n.hasMipmap&&this.generateMipmap();else for(u=0;i.texImage2D(i.TEXTURE_2D,u,a,l,c,0,s,n.dataType,null),(1!==l||1!==c)&&n.hasMipmap;++u)l=Math.max(1,l>>1),c=Math.max(1,c>>1);t._applySamplingMode(i,this._descriptor),t._applyWrapMode(i,this._descriptor),t._applyAnisotropicFilteringParameters(this._context,this._descriptor),this._context.bindTexture(r,0)},t.prototype.updateData=function(t,e,i,r,n,o){o||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");var s=this._context.gl,a=this._descriptor,l=this._context.getBoundTexture(0);this._context.bindTexture(this,0),(e<0||i<0||r>a.width||n>a.height||e+r>a.width||i+n>a.height)&&console.error("An attempt to update out of bounds of the texture!"),s.pixelStorei(s.UNPACK_ALIGNMENT,a.unpackAlignment),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,a.flipped?1:0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.preMultiplyAlpha?1:0),o instanceof ImageData||o instanceof HTMLImageElement||o instanceof HTMLCanvasElement||o instanceof HTMLVideoElement?s.texSubImage2D(s.TEXTURE_2D,t,e,i,a.pixelFormat,a.dataType,o):s.texSubImage2D(s.TEXTURE_2D,t,e,i,r,n,a.pixelFormat,a.dataType,o),this._context.bindTexture(l,0)},t.prototype.generateMipmap=function(){var e=this._descriptor;e.hasMipmap||(e.hasMipmap=!0,t._validateTexture(e)),9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);var i=this._context.getBoundTexture(0);this._context.bindTexture(this,0);var r=this._context.gl;r.generateMipmap(r.TEXTURE_2D),this._context.bindTexture(i,0)},t.prototype.setSamplingMode=function(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,t._validateTexture(this._descriptor),this._samplingModeDirty=!0)},t.prototype.setWrapMode=function(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,t._validateTexture(this._descriptor),this._wrapModeDirty=!0)},t.prototype.applyChanges=function(){var e=this._context.gl,i=this._descriptor;this._samplingModeDirty&&(t._applySamplingMode(e,i),this._samplingModeDirty=!1),this._wrapModeDirty&&(t._applyWrapMode(e,i),this._wrapModeDirty=!1)},t.prototype.setBoundToUnit=function(t,e){e?this._boundToUnits.add(t):this._boundToUnits.delete(t)},t._validateTexture=function(t){(t.width<0||t.height<0)&&console.error("Negative dimension parameters are not allowed!"),n.isPowerOfTwo(t.width)&&n.isPowerOfTwo(t.height)||("number"==typeof t.wrapMode?33071!==t.wrapMode&&console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"):33071===t.wrapMode.s&&33071===t.wrapMode.t||console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"),t.hasMipmap&&console.error("Mipmapping requires power-of-two textures!"))},t._applySamplingMode=function(t,e){var i=e.samplingMode,r=e.samplingMode;9985===i||9987===i?(i=9729,e.hasMipmap||(r=9729)):9984!==i&&9986!==i||(i=9728,e.hasMipmap||(r=9728)),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,r)},t._applyWrapMode=function(t,e){"number"==typeof e.wrapMode?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,e.wrapMode.t))},t._applyAnisotropicFilteringParameters=function(t,e){if(null!=e.maxAnisotropy){var i=t.capabilities.textureFilterAnisotropic;if(i){var r=t.gl;r.texParameterf(r.TEXTURE_2D,i.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy)}}},t._nextId=0,t}()}).apply(null,r))||(t.exports=n)},qbr3:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("zOht")],void 0===(n=(function(t,e,i){function r(t){return f.intern(t)}function n(t){return p.intern(t)}function o(t){return m.intern(t)}function s(t){return T.intern(t)}function a(t){return v.intern(t)}function l(t){return E.intern(t)}function c(t){return A.intern(t)}function h(t){return w.intern(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.simpleBlendingParams=function(t,e,i,r){return void 0===i&&(i=32774),void 0===r&&(r=[0,0,0,0]),{srcRgb:t,srcAlpha:t,dstRgb:e,dstAlpha:e,opRgb:i,opAlpha:i,color:{r:r[0],g:r[1],b:r[2],a:r[3]}}},e.separateBlendingParams=function(t,e,i,r,n,o,s){return void 0===n&&(n=32774),void 0===o&&(o=32774),void 0===s&&(s=[0,0,0,0]),{srcRgb:t,srcAlpha:e,dstRgb:i,dstAlpha:r,opRgb:n,opAlpha:o,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}},e.backFaceCullingParams={face:1029,mode:2305},e.defaultDepthWriteParams={zNear:0,zFar:1},e.defaultColorWriteParams={r:!0,g:!0,b:!0,a:!0},e.makeBlending=r,e.makeCulling=n,e.makePolygonOffset=o,e.makeDepthTest=s,e.makeStencilTest=a,e.makeDepthWrite=l,e.makeColorWrite=c,e.makeStencilWrite=h,e.makePipelineState=function(t){return M.intern(t)};var u=function(){function t(t,e){this.makeKey=t,this.makeRef=e,this.interns=new Map}return t.prototype.intern=function(t){if(!t)return null;var e=this.makeKey(t),i=this.interns;return i.has(e)||i.set(e,this.makeRef(t)),i.get(e)},t}();function d(t){return"["+t.join(",")+"]"}var f=new u(_,(function(t){return i.__assign({__tag:"Blending"},t)}));function _(t){return t?d([t.srcRgb,t.srcAlpha,t.dstRgb,t.dstAlpha,t.opRgb,t.opAlpha,t.color.r,t.color.g,t.color.b,t.color.a]):null}var p=new u(g,(function(t){return i.__assign({__tag:"Culling"},t)}));function g(t){return t?d([t.face,t.mode]):null}var m=new u(b,(function(t){return i.__assign({__tag:"PolygonOffset"},t)}));function b(t){return t?d([t.factor,t.units]):null}var T=new u(x,(function(t){return i.__assign({__tag:"DepthTest"},t)}));function x(t){return t?d([t.func]):null}var v=new u(y,(function(t){return i.__assign({__tag:"StencilTest"},t)}));function y(t){return t?d([t.function.func,t.function.ref,t.function.mask,t.operation.fail,t.operation.zFail,t.operation.zPass]):null}var E=new u(S,(function(t){return i.__assign({__tag:"DepthWrite"},t)}));function S(t){return t?d([t.zNear,t.zFar]):null}var A=new u(F,(function(t){return i.__assign({__tag:"ColorWrite"},t)}));function F(t){return t?d([t.r,t.g,t.b,t.a]):null}var w=new u(R,(function(t){return i.__assign({__tag:"StencilWrite"},t)}));function R(t){return t?d([t.mask]):null}var M=new u((function(t){return t?d([_(t.blending),g(t.culling),b(t.polygonOffset),x(t.depthTest),y(t.stencilTest),S(t.depthWrite),F(t.colorWrite),R(t.stencilWrite)]):null}),(function(t){return{blending:r(t.blending),culling:n(t.culling),polygonOffset:o(t.polygonOffset),depthTest:s(t.depthTest),stencilTest:a(t.stencilTest),depthWrite:l(t.depthWrite),colorWrite:c(t.colorWrite),stencilWrite:h(t.stencilWrite)}})),C=function(){function t(t){this._pipelineInvalid=!0,this._blendingInvalid=!0,this._cullingInvalid=!0,this._polygonOffsetInvalid=!0,this._depthTestInvalid=!0,this._stencilTestInvalid=!0,this._depthWriteInvalid=!0,this._colorWriteInvalid=!0,this._stencilWriteInvalid=!0,this._stateSetters=t}return t.prototype.setPipeline=function(t){(this._pipelineInvalid||t!==this._pipeline)&&(this.setBlending(t.blending),this.setCulling(t.culling),this.setPolygonOffset(t.polygonOffset),this.setDepthTest(t.depthTest),this.setStencilTest(t.stencilTest),this.setDepthWrite(t.depthWrite),this.setColorWrite(t.colorWrite),this.setStencilWrite(t.stencilWrite),this._pipeline=t),this._pipelineInvalid=!1},t.prototype.invalidateBlending=function(){this._blendingInvalid=!0,this._pipelineInvalid=!0},t.prototype.invalidateCulling=function(){this._cullingInvalid=!0,this._pipelineInvalid=!0},t.prototype.invalidatePolygonOffset=function(){this._polygonOffsetInvalid=!0,this._pipelineInvalid=!0},t.prototype.invalidateDepthTest=function(){this._depthTestInvalid=!0,this._pipelineInvalid=!0},t.prototype.invalidateStencilTest=function(){this._stencilTestInvalid=!0,this._pipelineInvalid=!0},t.prototype.invalidateDepthWrite=function(){this._depthWriteInvalid=!0,this._pipelineInvalid=!0},t.prototype.invalidateColorWrite=function(){this._colorWriteInvalid=!0,this._pipelineInvalid=!0},t.prototype.invalidateStencilWrite=function(){this._stencilTestInvalid=!0,this._pipelineInvalid=!0},t.prototype.setBlending=function(t){this._blending=this.setSubState(t,this._blending,this._blendingInvalid,this._stateSetters.setBlending),this._blendingInvalid=!1},t.prototype.setCulling=function(t){this._culling=this.setSubState(t,this._culling,this._cullingInvalid,this._stateSetters.setCulling),this._cullingInvalid=!1},t.prototype.setPolygonOffset=function(t){this._polygonOffset=this.setSubState(t,this._polygonOffset,this._polygonOffsetInvalid,this._stateSetters.setPolygonOffset),this._polygonOffsetInvalid=!1},t.prototype.setDepthTest=function(t){this._depthTest=this.setSubState(t,this._depthTest,this._depthTestInvalid,this._stateSetters.setDepthTest),this._depthTestInvalid=!1},t.prototype.setStencilTest=function(t){this._stencilTest=this.setSubState(t,this._stencilTest,this._stencilTestInvalid,this._stateSetters.setStencilTest),this._stencilTestInvalid=!1},t.prototype.setDepthWrite=function(t){this._depthWrite=this.setSubState(t,this._depthWrite,this._depthWriteInvalid,this._stateSetters.setDepthWrite),this._depthWriteInvalid=!1},t.prototype.setColorWrite=function(t){this._colorWrite=this.setSubState(t,this._colorWrite,this._colorWriteInvalid,this._stateSetters.setColorWrite),this._colorWriteInvalid=!1},t.prototype.setStencilWrite=function(t){this._stencilWrite=this.setSubState(t,this._stencilWrite,this._stencilWriteInvalid,this._stateSetters.setStencilWrite),this._stencilTestInvalid=!1},t.prototype.setSubState=function(t,e,i,r){return(i||t!==e)&&(r(t),this._pipelineInvalid=!0),t},t}();e.StateTracker=C}).apply(null,r))||(t.exports=n)},tOQU:function(t,e,i){var r,n;r=[i.dj.c(t.i),e],void 0===(n=(function(t,e){return["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"]}).apply(null,r))||(t.exports=n)},uwSd:function(t,e,i){var r,n;r=[i.dj.c(t.i),e],void 0===(n=(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BASE_TEXTURE_UNIT=33984}).apply(null,r))||(t.exports=n)},veTl:function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("7laH")],void 0===(n=(function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.load=function(t,e){if(i.default(t))return{createVertexArray:t.createVertexArray.bind(t),deleteVertexArray:t.deleteVertexArray.bind(t),bindVertexArray:t.bindVertexArray.bind(t)};if(e.vao)return null;var r=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object");return r?{createVertexArray:r.createVertexArrayOES.bind(r),deleteVertexArray:r.deleteVertexArrayOES.bind(r),bindVertexArray:r.bindVertexArrayOES.bind(r)}:null}}).apply(null,r))||(t.exports=n)},"z2+Q":function(t,e,i){var r,n;r=[i.dj.c(t.i),e,i("H1tY"),i("Kfys")],void 0===(n=(function(t,e,i,r){return function(){function t(e,r,n,o,s){this._context=null,this._glName=null,this._layout=null,this._locations=null,this._buffers=void 0,this._indexBuffer=void 0,this._initialized=!1,this._context=e,this._layout=n,this._buffers=o,this._locations=r,s&&(this._indexBuffer=s),this._id=t._nextId++,i("esri-webgl-debug")&&e.instanceCounter.increment(2,this)}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vertexBuffers",{get:function(){return this._buffers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"indexBuffer",{get:function(){return this._indexBuffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var t=this;return Object.keys(this._buffers).reduce((function(e,i){return e+t._buffers[i].size}),this._indexBuffer?this._indexBuffer.size:0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){return this._layout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"locations",{get:function(){return this._locations},enumerable:!0,configurable:!0}),t.prototype.dispose=function(t){if(void 0===t&&(t=!0),this._context){var e=this._context.capabilities.vao;if(e&&this._glName&&(e.deleteVertexArray(this._glName),this._glName=null),this._context.getBoundVAO()===this&&this._context.bindVAO(null),t){for(var r in this._buffers)this._buffers[r].dispose(),delete this._buffers[r];this._indexBuffer&&(this._indexBuffer.dispose(),this._indexBuffer=null)}i("esri-webgl-debug")&&this._context.instanceCounter.decrement(2,this),this._context=null}},t.prototype.initialize=function(){if(!this._initialized){var t=this._context.capabilities.vao;if(t){var e=t.createVertexArray();t.bindVertexArray(e),this._bindLayout(),t.bindVertexArray(null),this._glName=e}this._initialized=!0}},t.prototype.bind=function(){this.initialize();var t=this._context.capabilities.vao;t?t.bindVertexArray(this.glName):(this._context.bindVAO(null),this._bindLayout())},t.prototype._bindLayout=function(){var t=this._buffers,e=!!this._context.capabilities.vao,i=this._layout,n=this._indexBuffer;t||console.error("Vertex buffer dictionary is empty!");var o=this._context.gl;for(var s in t){var a=t[s];a||console.error("Vertex buffer is uninitialized!");var l=i[s];l||console.error("Vertex element descriptor is empty!"),r.bindVertexBufferLayout(this._context,this._locations,a,l)}n&&(e?o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,n.glName):this._context.bindBuffer(n))},t.prototype.unbind=function(){this.initialize();var t=this._context.capabilities.vao;t?t.bindVertexArray(null):this._unbindLayout()},t.prototype._unbindLayout=function(){var t=this._buffers,e=this._layout;for(var i in t||console.error("Vertex buffer dictionary is empty!"),t){var n=t[i];n||console.error("Vertex buffer is uninitialized!"),r.unbindVertexBufferLayout(this._context,this._locations,n,e[i])}var o=this._indexBuffer;o&&this._context.unbindBuffer(o.bufferType)},t._nextId=0,t}()}).apply(null,r))||(t.exports=n)}}]);