????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/17.a94e7a86c2fd9234e4b6.js |
(function(){var e={"esri/views/3d/layers/graphics/elevationAlignmentUtils":"/9Lg","esri/renderers/support/clickToleranceUtils":"/E+R","esri/views/3d/layers/graphics/GraphicState":"/NuL","esri/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass":"0W55","esri/core/libs/earcut/earcut":"1E+e","esri/views/3d/interactive/editingTools/manipulatorUtils":"1eTA","esri/views/3d/webgl-engine/lighting/SphericalHarmonics":"2Mej","esri/views/3d/interactive/visualElements/VisualElementResources":"2W+Z","esri/geometry/support/triangulationUtils":"3Zlx","esri/core/libs/gl-matrix-2/factories/vec4f32":"3gjc","esri/views/3d/interactive/editingTools/manipulations/Manipulation":"48/q","esri/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool":"4QR8","esri/views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl":"58az","esri/views/3d/interactive/manipulatorUtils":"5T2R","esri/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation":"6hC7","esri/views/3d/interactive/editingTools/manipulations/MoveXYGraphicManipulation":"73uV","esri/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl":"7zqm","esri/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool":"A5GR","esri/views/3d/interactive/editingTools/manipulations/MoveManipulation":"BhkK","esri/core/libs/gl-matrix-2/mat2":"CqfC","esri/views/3d/webgl-engine/shaders/ColorMaterial.glsl":"DFuO","esri/views/3d/support/debugFlags":"Dk48","esri/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl":"E/g4","esri/views/3d/webgl-engine/shaders/ColorMaterialTechnique":"EiS2","esri/views/3d/webgl-engine/lib/GLMaterialRep":"FU3N","esri/views/3d/webgl-engine/materials/lineStippleUtils":"FbvD","esri/views/3d/interactive/editingTools/manipulations/config":"Fe95","esri/views/3d/interactive/editingTools/visualElementUtils":"G+tB","esri/views/3d/webgl-engine/core/shaderTechnique/CommonUniformStore":"GDWR","esri/views/3d/layers/graphics/constants":"HbaO","esri/views/3d/layers/graphics/sdfPrimitives":"J2BX","esri/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation":"JXo2","esri/views/3d/webgl-engine/lib/LongVectorMath":"KPBO","esri/views/3d/webgl-engine/core/shaderLibrary/util/TextureOnly.glsl":"KQg4","esri/views/3d/interactive/editingTools/ManipulatorState":"Kvb2","esri/core/libs/gl-matrix-2/mat2f64":"KwnQ","esri/views/3d/webgl-engine/materials/internal/DefaultBufferWriter":"LZD4","esri/views/3d/interactive/visualElements/LaserlineVisualElement":"MCHn","esri/views/interactive/GraphicManipulator":"N78w","esri/views/support/drapedUtils":"NbdF","esri/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl":"NiJV","esri/views/3d/interactive/editingTools/lineGraphicVisualElementUtils":"PLh7","esri/views/3d/interactive/visualElements/LineVisualElement":"PXiz","esri/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer":"Px2u","esri/views/3d/webgl-engine/lighting/SceneLighting":"QDiq","esri/views/3d/interactive/visualElements/OutlineVisualElement":"R4nD","esri/views/3d/webgl-engine/materials/RibbonLineMaterial":"RC9r","esri/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform":"RWrl","esri/views/3d/webgl-engine/lib/RenderContext":"Raj5","esri/views/3d/webgl-engine/lib/Camera":"RsYQ","esri/views/3d/webgl-engine/shaders/RibbonLineTechnique":"SNs2","esri/views/3d/interactive/visualElements/VerticesVisualElement":"T95R","esri/views/3d/interactive/editingTools/snapping/SnapToScene":"TIRl","esri/views/3d/webgl-engine/shaders/LaserlinePath.glsl":"UGy0","esri/views/3d/webgl-engine/shaders/HUDMaterial.glsl":"VQEQ","esri/views/3d/interactive/editingTools/settings":"X5J5","esri/views/3d/webgl-engine/lib/TextureTechnique":"XcBT","esri/views/3d/webgl-engine/lib/Layer":"ZO6V","esri/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl":"aRjO","esri/views/3d/webgl-engine/materials/VisualVariableMaterialParameters":"ama6","esri/views/3d/interactive/visualElements/DrapedVisualElementResources":"as1Q","esri/views/3d/webgl-engine/lib/RenderGeometry":"cjy9","esri/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputOptions":"dl/g","esri/views/3d/interactive/editingTools/manipulations/moveUtils":"dtql","esri/views/3d/webgl-engine/lib/localOrigin":"eHCP","esri/views/3d/layers/graphics/ElevationContext":"fOZq","esri/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique":"fQ2U","esri/views/3d/webgl-engine/shaders/LaserlineTechnique":"fUJJ","esri/views/3d/support/LaserlinePathData":"gG9S","esri/views/3d/layers/graphics/lineUtils":"hADE","esri/views/3d/support/LaserLineRenderer":"hX2R","esri/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl":"hk44","esri/views/3d/webgl-engine/lib/GridLocalOriginFactory":"hkmr","esri/views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl":"hs8d","esri/views/3d/interactive/visualElements/PointVisualElement":"i10q","esri/views/3d/terrain/OverlayRenderer":"ij3I","esri/core/libs/gl-matrix-2/vec4f32":"j2SP","esri/views/3d/webgl-engine/lib/Octree":"mYMs","esri/views/3d/webgl-engine/shaders/RibbonLine.glsl":"ne9J","esri/views/3d/webgl-engine/materials/ColorMaterial":"o5p5","esri/views/3d/webgl-engine/shaders/HUDMaterialTechnique":"pqGg","esri/views/3d/interactive/editingTools/manipulations/MoveZManipulation":"pvGl","esri/views/3d/webgl-engine/shaders/Laserlines.glsl":"qSzK","esri/views/3d/webgl-engine/lighting/Lightsources":"qUb7","esri/views/3d/interactive/editingTools":"qkUi","esri/core/libs/gl-matrix-2/types/mat4":"qvwY","esri/views/3d/webgl-engine/shaders/LaserlinePathTechnique":"raiv","esri/views/3d/interactive/editingTools/reshapeGraphic/GraphicReshapeTool":"uNfR","esri/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl":"uUnu","esri/views/3d/webgl-engine/materials/ShadedColorMaterial":"uZGf","esri/views/3d/interactive/editingTools/draw/DrawGraphicTool":"ub+M","esri/views/3d/interactive/editingTools/pointGraphicVisualElementUtils":"uinn","esri/views/3d/layers/graphics/pointUtils":"v+nG","esri/views/3d/support/ElevationProvider":"vA3N","esri/core/libs/gl-matrix-2/math/mat2":"vJh7","esri/views/3d/webgl-engine/materials/HUDMaterial":"xFEL","esri/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository":"y68M","esri/views/3d/layers/graphics/featureExpressionInfoUtils":"yVFQ","esri/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation":"yjgM","esri/core/libs/gl-matrix-2/factories/mat2f64":"z4cv","esri/views/3d/webgl-engine/lib/rendererUtils":"znI2"},t=this||window,n=t.webpackJsonp=t.webpackJsonp||[];n.registerAbsMids?n.registerAbsMids(e):(n.absMidsWaiting=n.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{"/9Lg":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("pcDC"),n("FXVB"),n("1m5D"),n("Rdxj"),n("BwdQ"),n("vA3N"),n("mmEe")],void 0===(r=(function(e,t,n,i,r,o,a,s,l){function c(e,t,i,r,o){var a=e.z||0;switch(i.mode){case"on-the-ground":var l=s.getElevationAtPoint(t,e,"ground")||0;return o&&(o.verticalDistanceToGround=0,o.sampledElevation=l),l;case"relative-to-ground":l=s.getElevationAtPoint(t,e,"ground")||0;var c=i.geometryZWithOffset(a,r);return o&&(o.verticalDistanceToGround=c,o.sampledElevation=l),c+l;case"relative-to-scene":return l=s.getElevationAtPoint(t,e,"scene")||0,c=i.geometryZWithOffset(a,r),o&&(o.verticalDistanceToGround=c,o.sampledElevation=l),c+l;case"absolute-height":if(c=i.geometryZWithOffset(a,r),o){var u=s.getElevationAtPoint(t,e,"ground")||0;o.verticalDistanceToGround=c-u,o.sampledElevation=u}return c;default:return n.neverReached(i.mode),0}}var u;Object.defineProperty(t,"__esModule",{value:!0}),t.applyPerVertexElevationAlignment=function(e,t,n,i,r,o,a,s,c,u,d){var h,f,v=p[d.mode],g=0;if(l.bufferToBuffer(e,t,n,i,c.spatialReference,r,s)&&(v.requiresAlignment(d)?(g=v.applyElevationAlignmentBuffer(i,r,o,a,s,c,u,d),h=o,f=a):(h=i,f=r),l.bufferToBuffer(h,c.spatialReference,f,o,u.spatialReference,a,s)))return g},t.evaluateElevationAlignmentAtPoint=c,t.elevationModeChangeUpdateType=function(e,t,n){return null==t||null==n?e.definedChanged:"on-the-ground"===t&&"on-the-ground"===n?e.staysOnTheGround:t===n||"on-the-ground"!==t&&"on-the-ground"!==n?u.UPDATE:e.onTheGroundChanged},t.needsElevationUpdates2D=function(e){return"relative-to-ground"===e||"relative-to-scene"===e},t.needsElevationUpdates3D=function(e){return"absolute-height"!==e},t.applyElevationAlignmentForHUD=function(e,t,n,r,o){var s=c(t,n,o,r,h);a.updateVertexAttributeAuxpos1w(e,h.verticalDistanceToGround);var u=h.sampledElevation,p=i.mat4.copy(d,e.objectTransformation);return f[0]=t.x,f[1]=t.y,f[2]=s,l.computeLinearTransformation(t.spatialReference,f,p,r.spatialReference)?e.objectTransformation=p:console.warn("Could not locate symbol object properly, it might be misplaced"),u},function(e){e[e.NONE=0]="NONE",e[e.UPDATE=1]="UPDATE",e[e.RECREATE=2]="RECREATE"}(u=t.SymbolUpdateType||(t.SymbolUpdateType={}));var p={"absolute-height":{applyElevationAlignmentBuffer:function(e,t,n,i,r,o,a,s){var l=s.calculateOffsetRenderUnits(a),c=s.featureExpressionInfoContext;t*=3,i*=3;for(var u=0;u<r;++u){var p=e[t+1],d=e[t+2];n[i+0]=e[t+0],n[i+1]=p,n[i+2]=null==c?d+l:l,t+=3,i+=3}return 0},requiresAlignment:function(e){return 0!==e.meterUnitOffset||null!=e.featureExpressionInfoContext}},"on-the-ground":{applyElevationAlignmentBuffer:function(e,t,n,i,r,o){var a=0,s=o.spatialReference;t*=3,i*=3;for(var l=0;l<r;++l){var c=e[t+0],u=e[t+1],p=o.getElevation(c,u,e[t+2],s,"ground")||0;a+=p,n[i+0]=c,n[i+1]=u,n[i+2]=p,t+=3,i+=3}return a/r},requiresAlignment:function(){return!0}},"relative-to-ground":{applyElevationAlignmentBuffer:function(e,t,n,i,r,o,a,s){var l=0,c=s.calculateOffsetRenderUnits(a),u=s.featureExpressionInfoContext,p=o.spatialReference;t*=3,i*=3;for(var d=0;d<r;++d){var h=e[t+0],f=e[t+1],v=e[t+2],g=o.getElevation(h,f,v,p,"ground")||0;l+=g,n[i+0]=h,n[i+1]=f,n[i+2]=null==u?v+g+c:g+c,t+=3,i+=3}return l/r},requiresAlignment:function(){return!0}},"relative-to-scene":{applyElevationAlignmentBuffer:function(e,t,n,i,r,o,a,s){var l=0,c=s.calculateOffsetRenderUnits(a),u=s.featureExpressionInfoContext,p=o.spatialReference;t*=3,i*=3;for(var d=0;d<r;++d){var h=e[t+0],f=e[t+1],v=e[t+2],g=o.getElevation(h,f,v,p,"scene")||0;l+=g,n[i+0]=h,n[i+1]=f,n[i+2]=null==u?v+g+c:g+c,t+=3,i+=3}return l/r},requiresAlignment:function(){return!0}}},d=r.mat4f64.create(),h={verticalDistanceToGround:0,sampledElevation:0},f=o.vec3f64.create()}).apply(null,i))||(e.exports=r)},"/E+R":function(e,t,n){var i,r;i=[n.dj.c(e.i),t],void 0===(r=(function(e,t){function n(e,t){return t?"xoffset"in t&&t.xoffset?Math.max(e,Math.abs(t.xoffset)):"yoffset"in t&&t.yoffset?Math.max(e,Math.abs(t.yoffset||0)):e:e}function i(e,t){return"number"==typeof e?e:e&&e.stops&&e.stops.length?function(e){for(var t=0,n=0,i=0;i<e.length;i++){var r=e[i].size;"number"==typeof r&&(t+=r,n++)}return t/n}(e.stops):t}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateTolerance=function(e){var t=e&&e.renderer,r="touch"===(e&&e.event&&e.event.pointerType)?9:6;if(!t)return r;var o="visualVariables"in t?function(e,t){if(!t)return e;var n=t.filter((function(e){return"size"===e.type})).map((function(t){var n=t.minSize;return(i(t.maxSize,e)+i(n,e))/2})),r=0,o=n.length;if(0===o)return e;for(var a=0;a<o;a++)r+=n[a];var s=Math.floor(r/o);return Math.max(s,e)}(r,t.visualVariables):r;if("simple"===t.type)return n(o,t.symbol);if("unique-value"===t.type){var a=o;return t.uniqueValueInfos.forEach((function(e){a=n(a,e.symbol)})),a}if("class-breaks"===t.type){var s=o;return t.classBreakInfos.forEach((function(e){s=n(s,e.symbol)})),s}return o}}).apply(null,i))||(e.exports=r)},"/NuL":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("BcWh"),n("Vx27")],void 0===(r=(function(e,t,n,i,r){Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.tracking=!1,n.displaying=!1,n.isDraped=!1,n}return n.__extends(t,e),n.__decorate([r.property({constructOnly:!0})],t.prototype,"graphic",void 0),n.__decorate([r.property()],t.prototype,"tracking",void 0),n.__decorate([r.property()],t.prototype,"displaying",void 0),n.__decorate([r.property()],t.prototype,"isDraped",void 0),n.__decorate([r.subclass("esri.views.3d.layers.graphics.GraphicState")],t)}(i.EventedAccessor);t.GraphicState=o}).apply(null,i))||(e.exports=r)},"0W55":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("7Aei")],void 0===(r=(function(e,t,n,i){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenSpacePass=function(e){e.attributes.add("position","vec2"),e.varyings.add("uv","vec2"),e.vertex.code.add(i.glsl(r||(r=n.__makeTemplateObject(["\n void main(void) {\n gl_Position = vec4(position, 0.0, 1.0);\n uv = position * 0.5 + vec2(0.5);\n } \n "],["\n void main(void) {\n gl_Position = vec4(position, 0.0, 1.0);\n uv = position * 0.5 + vec2(0.5);\n } \n "]))))}}).apply(null,i))||(e.exports=r)},"1E+e":function(e,t,n){var i,r;i=[n.dj.c(e.i),t],void 0===(r=(function(e,t){function n(e,t,n,i,r){var o;if(r===h(e,t,n,i)>0)for(var a=t;a<n;a+=i)o=s(a,e[a],e[a+1],o);else for(a=n-i;a>=t;a-=i)o=s(a,e[a],e[a+1],o);return o&&m(o,o.next)&&(l(o),o=o.next),o}function i(e,t){if(void 0===t&&(t=e),!e)return e;var n,i=e;do{if(n=!1,i.steiner||!m(i,i.next)&&0!==p(i.prev,i,i.next))i=i.next;else{if(l(i),(i=t=i.prev)===i.next)break;n=!0}}while(n||i!==t);return t}function r(e,t,n,s,c,u,p){if(void 0===p&&(p=0),e){!p&&u&&(e=function e(t,n,i,r){for(var o=void 0;o!==t;o=o.next){if(null===(o=o||t).z&&(o.z=g(o.x,o.y,n,i,r)),o.prev.next!==o||o.next.prev!==o)return o.prev.next=o,o.next.prev=o,e(t,n,i,r);o.prevZ=o.prev,o.nextZ=o.next}return t.prevZ.nextZ=null,t.prevZ=null,function(e){for(var t,n=1;;){var i=e,r=void 0;e=null,t=null;for(var o=0;i;){o++,r=i;for(var a=0;a<n&&r;a++)r=r.nextZ;for(var s=n;a>0||s>0&&r;){var l=void 0;0===a?(l=r,r=r.nextZ,s--):0!==s&&r?i.z<=r.z?(l=i,i=i.nextZ,a--):(l=r,r=r.nextZ,s--):(l=i,i=i.nextZ,a--),t?t.nextZ=l:e=l,l.prevZ=t,t=l}i=r}if(t.nextZ=null,n*=2,o<2)return e}}(t)}(e,s,c,u));for(var d=e;e.prev!==e.next;){var h=e.prev,f=e.next;if(u?a(e,s,c,u):o(e))t.push(h.index/n),t.push(e.index/n),t.push(f.index/n),l(e),e=f.next,d=f.next;else if((e=f)===d){p?1===p?r(e=_(e,t,n),t,n,s,c,u,2):2===p&&b(e,t,n,s,c,u):r(i(e),t,n,s,c,u,1);break}}}}function o(e){var t=e.prev,n=e,i=e.next;if(p(t,n,i)>=0)return!1;for(var r=e.next.next,o=r,a=0;r!==e.prev&&(0===a||r!==o);){if(a++,f(t.x,t.y,n.x,n.y,i.x,i.y,r.x,r.y)&&p(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function a(e,t,n,i){var r=e.prev,o=e,a=e.next;if(p(r,o,a)>=0)return!1;for(var s=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,l=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,c=g(r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,t,n,i),u=g(s,l,t,n,i),d=e.prevZ,h=e.nextZ;d&&d.z>=c&&h&&h.z<=u;){if(d!==e.prev&&d!==e.next&&f(r.x,r.y,o.x,o.y,a.x,a.y,d.x,d.y)&&p(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,h!==e.prev&&h!==e.next&&f(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&p(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;d&&d.z>=c;){if(d!==e.prev&&d!==e.next&&f(r.x,r.y,o.x,o.y,a.x,a.y,d.x,d.y)&&p(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;h&&h.z<=u;){if(h!==e.prev&&h!==e.next&&f(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&p(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function s(e,t,n,i){var r=new w(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function l(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function c(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function u(e,t){if(t=function(e,t){var n,i=t,r=e.x,o=e.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==t);if(!n)return null;if(r===a)return n.prev;var l,c=n,u=n.x,p=n.y,d=1/0;for(i=n.next;i!==c;)r>=i.x&&i.x>=u&&r!==i.x&&f(o<p?r:a,o,u,p,o<p?a:r,o,i.x,i.y)&&((l=Math.abs(o-i.y)/(r-i.x))<d||l===d&&i.x>n.x)&&v(i,e)&&(n=i,d=l),i=i.next;return n}(e,t)){var n=S(t,e);i(n,n.next)}}function p(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function d(e,t,n,i){return!!(m(e,t)&&m(n,i)||m(e,i)&&m(n,t))||p(e,t,n)>0!=p(e,t,i)>0&&p(n,i,e)>0!=p(n,i,t)>0}function h(e,t,n,i){for(var r=0,o=t,a=n-i;o<n;o+=i)r+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return r}function f(e,t,n,i,r,o,a,s){return(r-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(i-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function v(e,t){return p(e.prev,e,e.next)<0?p(e,t,e.next)>=0&&p(e,e.prev,t)>=0:p(e,t,e.prev)<0||p(e,e.next,t)<0}function g(e,t,n,i,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e,t){return e.x===t.x&&e.y===t.y}function y(e,t){return e.x-t.x}function _(e,t,n){var i=e;do{var r=i.prev,o=i.next.next;!m(r,o)&&d(r,i,i.next,o)&&v(r,o)&&v(o,r)&&(t.push(r.index/n),t.push(i.index/n),t.push(o.index/n),l(i),l(i.next),i=e=o),i=i.next}while(i!==e);return i}function b(e,t,n,o,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.index!==c.index&&x(l,c)){var u=S(l,c);return l=i(l,l.next),u=i(u,u.next),r(l,t,n,o,a,s),void r(u,t,n,o,a,s)}c=c.next}l=l.next}while(l!==e)}function x(e,t){return e.next.index!==t.index&&e.prev.index!==t.index&&!function(e,t){var n=e;do{if(n.index!==e.index&&n.next.index!==e.index&&n.index!==t.index&&n.next.index!==t.index&&d(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&v(e,t)&&v(t,e)&&function(e,t){var n=e,i=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==e);return i}(e,t)}function S(e,t){var n=new w(e.index,e.x,e.y),i=new w(t.index,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}Object.defineProperty(t,"__esModule",{value:!0}),t.earcut=function(e,t,o){var a,s,l,p,d,h=t&&t.length,f=h?t[0]*o:e.length,v=n(e,0,f,o,!0),g=new Array;if(!v||v.next===v.prev)return g;if(h&&(v=function(e,t,r,o){for(var a=new Array,s=0,l=t.length;s<l;s++){var p=n(e,t[s]*o,s<l-1?t[s+1]*o:e.length,o,!1);p===p.next&&(p.steiner=!0),a.push(c(p))}a.sort(y);for(var d=0,h=a;d<h.length;d++)u(h[d],r),r=i(r,r.next);return r}(e,t,v,o)),e.length>80*o){a=l=e[0],s=p=e[1];for(var m=o;m<f;m+=o){var _=e[m],b=e[m+1];a=Math.min(a,_),s=Math.min(s,b),l=Math.max(l,_),p=Math.max(p,b)}d=0!==(d=Math.max(l-a,p-s))?1/d:0}return r(v,g,o,a,s,d),g},t.deviation=function(e,t,n,i){var r=t&&t.length,o=Math.abs(h(e,0,r?t[0]*n:e.length,n));if(r)for(var a=0,s=t.length;a<s;a++)o-=Math.abs(h(e,t[a]*n,a<s-1?t[a+1]*n:e.length,n));var l=0;for(a=0;a<i.length;a+=3){var c=i[a]*n,u=i[a+1]*n,p=i[a+2]*n;l+=Math.abs((e[c]-e[p])*(e[u+1]-e[c+1])-(e[c]-e[u])*(e[p+1]-e[c+1]))}return 0===o&&0===l?0:Math.abs((l-o)/o)};var w=function(e,t,n){this.index=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}}).apply(null,i))||(e.exports=r)},"1eTA":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("DtIM")],void 0===(r=(function(e,t,n,i){Object.defineProperty(t,"__esModule",{value:!0}),t.canMoveZ=function(e,t){return void 0===t&&(t=i.getGraphicEffectiveElevationInfo(e)),"on-the-ground"!==t.mode&&!(n.isNone(e.geometry)||!e.geometry.hasZ)},t.disableDisplayOnGrab=function(e,t){var i=null,r=e.events.on("grab-changed",(function(r){n.isSome(i)&&(i.remove(),i=null),"start"===r.action?(i=e.disableDisplay(),t&&t(r)):t&&t(r)}));return{remove:function(){n.isSome(i)&&i.remove(),r.remove()}}}}).apply(null,i))||(e.exports=r)},"2Mej":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("xoE+"),n("0LE5"),n("Rdxj"),n("KPBO"),n("qUb7")],void 0===(r=(function(e,t,n,i,r,o,a){function s(e){return(e+1)*(e+1)}function l(e){return n.clamp(Math.floor(Math.sqrt(e)-1),0,2)}function c(e,t,n){var i=e[0],r=e[1],o=e[2],a=n||[];return a.length=s(t),t>=0&&(a[0]=.28209479177),t>=1&&(a[1]=.4886025119*i,a[2]=.4886025119*o,a[3]=.4886025119*r),t>=2&&(a[4]=1.09254843059*i*r,a[5]=1.09254843059*r*o,a[6]=.31539156525*(3*o*o-1),a[7]=1.09254843059*i*o,a[8]=.54627421529*(i*i-r*r)),a}function u(e,t){var n=s(e),i=t||{r:[],g:[],b:[]};i.r.length=i.g.length=i.b.length=n;for(var r=0;r<n;r++)i.r[r]=i.g[r]=i.b[r]=0;return i}function p(e,t){for(var n=l(t.r.length),r=0,a=e;r<a.length;r++){var s=a[r];i.vec3.negate(y,s.direction),c(y,n,g),o.elementwiseProduct(g,_),o.scalarProduct(g,s.intensity[0],m),o.add(t.r,m),o.scalarProduct(g,s.intensity[1],m),o.add(t.g,m),o.scalarProduct(g,s.intensity[2],m),o.add(t.b,m)}return t}function d(e,t){c(y,0,g);for(var n=0,i=e;n<i.length;n++){var r=i[n];t.r[0]+=g[0]*_[0]*r.intensity[0]*4*Math.PI,t.g[0]+=g[0]*_[0]*r.intensity[1]*4*Math.PI,t.b[0]+=g[0]*_[0]*r.intensity[2]*4*Math.PI}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.numberOfCoefficients=s,t.numberOfCoefficientsInBand=function(e){return 2*e+1},t.orderFromNumberOfCoefficients=l,t.computeCoefficients=c,t.initSHCoefficients=u,t.projectFillLights=p,t.projectAmbientLights=d,t.combineLights=function(e,t,n){u(t,n.sphericalHarmonics.sh),i.vec3.set(n.main.intensity,0,0,0);var r=!1,s=h,l=f,c=v;s.length=0,l.length=0,c.length=0;for(var g=0,m=e;g<m.length;g++)(b=m[g])instanceof a.MainLight&&!r?(i.vec3.copy(n.main.direction,b.direction),n.main.intensity[0]=b.intensity[0],n.main.intensity[1]=b.intensity[1],n.main.intensity[2]=b.intensity[2],n.main.castShadows=b.castShadows,r=!0):b instanceof a.MainLight||b instanceof a.FillLight?s.push(b):b instanceof a.AmbientLight?l.push(b):b instanceof a.SphericalHarmonicsLight&&c.push(b);p(s,n.sphericalHarmonics.sh),d(l,n.sphericalHarmonics.sh);for(var y=0,_=c;y<_.length;y++){var b=_[y];o.add(n.sphericalHarmonics.sh.r,b.sh.r),o.add(n.sphericalHarmonics.sh.g,b.sh.g),o.add(n.sphericalHarmonics.sh.b,b.sh.b)}};var h=[],f=[],v=[],g=[0],m=[0],y=r.vec3f64.create(),_=[3.141593,2.094395,2.094395,2.094395,.785398,.785398,.785398,.785398,.785398]}).apply(null,i))||(e.exports=r)},"2W+Z":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("8MXS"),n("ys4y"),n("ZO6V"),n("ZJC8"),n("yqrJ")],void 0===(r=(function(e,t,n,i,r,o,a,s){Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e){this.resourceFactory=e,this._resources=null,this._hidden=!1,this._attached=!1}return e.prototype.destroy=function(){this._destroyResources()},Object.defineProperty(e.prototype,"object",{get:function(){return n.isSome(this._resources)?this._resources.object:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resources",{get:function(){return n.isSome(this._resources)?this._resources.external:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hidden",{get:function(){return this._hidden},set:function(e){e!==this._hidden&&(this._hidden=e,this._syncHidden())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attached",{get:function(){return this._attached},set:function(e){e!==this._attached&&(this._attached=e,this._createOrDestroyResources())},enumerable:!0,configurable:!0}),e.prototype.recreate=function(){this.attached&&this._createResources()},e.prototype.recreateGeometry=function(){if(this.resourceFactory.recreateGeometry){if(!n.isNone(this._resources)){var e=this._resources.object,t=this.resourceFactory.view._stage;this._resources.external.forEach((function(e){e instanceof r&&t.remove(2,e.id)})),e.removeAllGeometries();for(var i=0,o=this.resourceFactory.recreateGeometry(this._resources.external,e,this._resources.layer);i<o.length;i++)t.add(2,o[i])}}else this.recreate()},e.prototype._createOrDestroyResources=function(){this._attached?this._resources||this._createResources():this._destroyResources()},e.prototype._createResources=function(){var e=this;this._destroyResources();var t=this.resourceFactory.view._stage;if(t){var n=new o("element",{isPickable:!1});t.add(0,n),t.addToViewContent([n.id]);var r=new a({idHint:"element",castShadow:!1}),s=this.resourceFactory.createResources(r,n);s.forEach((function(n){t.add(e._contentTypeFromResource(n),n)})),t.add(1,r),n.addObject(r),this._hidden&&r.setVisible(!1);var l=this.resourceFactory.cameraChanged?i.init(this.resourceFactory.view.state,"camera",(function(t){return e.resourceFactory.cameraChanged(t)})):null;this._resources={layer:n,object:r,external:s,cameraHandle:l}}},e.prototype._contentTypeFromResource=function(e){return e instanceof r?2:e instanceof s?4:3},e.prototype._destroyResources=function(){var e=this;if(!n.isNone(this._resources)){var t=this.resourceFactory.view._stage;t.remove(1,this._resources.object.id),t.remove(0,this._resources.layer.id),this._resources.external.forEach((function(n){t.remove(e._contentTypeFromResource(n),n.id),"dispose"in n&&n.dispose()})),this._resources.object.dispose(),this._resources.cameraHandle&&this._resources.cameraHandle.remove(),this._resources=null}},e.prototype._syncHidden=function(){n.isNone(this._resources)||this._resources.object.setVisible(!this._hidden)},e}();t.VisualElementResources=l}).apply(null,i))||(e.exports=r)},"3Zlx":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("1E+e"),n("ZPQp"),n("jmRc")],void 0===(r=(function(e,t,n,i,r){function o(e,t,n){for(var r=e.length,o=new Array(r),s=new Array(r),l=new Array(r),c=0,u=0,p=0,d=0,h=0;h<r;++h)d+=e[h].length;for(var f=new Float64Array(3*d),v=0,g=r-1;g>=0;g--){var m=e[g],y=1===n&&!i.isClockwise(m,!1,!1);if(y&&1!==r)o[c++]=m;else{var _=m.length;for(h=0;h<c;++h)_+=o[h].length;var b={index:v,pathLengths:new Array(c+1),count:_,holeIndices:new Array(c)};b.pathLengths[0]=m.length,m.length>0&&(l[p++]={index:v,count:m.length}),v=y?a(m,m.length-1,-1,f,v,m.length,t):a(m,0,1,f,v,m.length,t);for(var x=0;x<c;++x){var S=o[x];b.holeIndices[x]=v,b.pathLengths[x+1]=S.length,S.length>0&&(l[p++]={index:v,count:S.length}),v=a(S,0,1,f,v,S.length,t)}c=0,b.count>0&&(s[u++]=b)}}for(x=0;x<c;++x)(S=o[x]).length>0&&(l[p++]={index:v,count:S.length}),v=a(S,0,1,f,v,S.length,t);return u<r&&(s.length=u),p<r&&(l.length=p),{position:f,polygons:s,outlines:l}}function a(e,t,n,i,r,o,a){r*=3;for(var s=0;s<o;++s){var l=e[t];i[r++]=l[0],i[r++]=l[1],i[r++]=a?l[2]:0,t+=n}return r/3}Object.defineProperty(t,"__esModule",{value:!0}),t.triangulate=function(e){for(var t=o(e.rings,e.hasZ,1),i=[],a=0,s=0,l=function(e){var r=e.index,o=new Float64Array(t.position.buffer,3*r*t.position.BYTES_PER_ELEMENT,3*e.count),l=e.holeIndices.map((function(e){return e-r})),c=new Uint32Array(n.earcut(o,l,3));i.push({position:o,faces:c}),a+=o.length,s+=c.length},c=0,u=t.polygons;c<u.length;c++)l(u[c]);var p=function(e,t,n){if(1===e.length)return e[0];for(var i=new Float64Array(t),r=new Uint32Array(n),o=0,a=0,s=0,l=0,c=e;l<c.length;l++){for(var u=c[l],p=0;p<u.position.length;p++)i[o++]=u.position[p];for(p=0;p<u.faces.length;p++)r[a++]=u.faces[p]+s;s=o/3}return{position:i,faces:r}}(i,a,s),d=r.default(p.position.buffer,6,{originalIndices:p.faces});return p.position=new Float64Array(d.buffer),p.faces=d.indices,p},t.pathsToTriangulationInfo=o}).apply(null,i))||(e.exports=r)},"3gjc":function(e,t,n){var i,r;i=[n.dj.c(e.i),t],void 0===(r=(function(e,t){function n(){return new Float32Array(4)}function i(e,t,n,i){var r=new Float32Array(4);return r[0]=e,r[1]=t,r[2]=n,r[3]=i,r}function r(){return n()}function o(){return i(1,1,1,1)}function a(){return i(1,0,0,0)}function s(){return i(0,1,0,0)}function l(){return i(0,0,1,0)}function c(){return i(0,0,0,1)}Object.defineProperty(t,"__esModule",{value:!0}),t.create=n,t.clone=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},t.fromValues=i,t.createView=function(e,t){return new Float32Array(e,t,4)},t.zeros=r,t.ones=o,t.unitX=a,t.unitY=s,t.unitZ=l,t.unitW=c,t.ZEROS=r(),t.ONES=o(),t.UNIT_X=a(),t.UNIT_Y=s(),t.UNIT_Z=l(),t.UNIT_W=c()}).apply(null,i))||(e.exports=r)},"48/q":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("woUR")],void 0===(r=(function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._available=!0}return Object.defineProperty(e.prototype,"location",{set:function(e){this.forEachManipulator3D((function(t){return t.location=e}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elevationAlignedLocation",{set:function(e){this.forEachManipulator3D((function(t){return t.elevationAlignedLocation=e}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elevationInfo",{set:function(e){this.forEachManipulator3D((function(t){return t.elevationInfo=e}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"available",{get:function(){return this._available},set:function(e){this._available=e,this.forEachManipulator3D((function(t){return t.available=e}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"grabbing",{get:function(){return this.someManipulator((function(e){return e.grabbing}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dragging",{get:function(){return this.someManipulator((function(e){return e.dragging}))},enumerable:!0,configurable:!0}),e.prototype.hasManipulator=function(e){return this.someManipulator((function(t){return t===e}))},e.prototype.someManipulator=function(e){var t=!1;return this.forEachManipulator((function(n){!t&&e(n)&&(t=!0)})),t},e.prototype.forEachManipulator3D=function(e){this.forEachManipulator((function(t,i){t instanceof n.Manipulator3D&&e(t,i)}))},e}();t.Manipulation=i}).apply(null,i))||(e.exports=r)},"4QR8":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("BcWh"),n("eIBl"),n("XwIv"),n("LxLY"),n("Vx27"),n("qysZ"),n("DtIM"),n("5T2R"),n("1eTA"),n("G+tB"),n("Fe95"),n("BhkK"),n("RWrl"),n("/NuL"),n("X7Ps")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m){Object.defineProperty(t,"__esModule",{value:!0});var y=function(e){function t(t){var n=e.call(this,t)||this;return n.enableZ=!0,n.enableRotation=!0,n.enableScaling=!0,n.type="transform-3d",n.handles=new r,n.scaleRotate=null,n}return n.__extends(t,e),t.prototype.initialize=function(){var e=this;this.graphicState=new g.GraphicState({graphic:this.graphic}),this.moveManipulation=new f.MoveManipulation({tool:this,view:this.view,snapToScene:this.snapToScene,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZ&&p.canMoveZ(this.graphic),radius:f.MoveManipulation.radiusForSymbol(this.graphic.symbol)}),this.moveManipulation.forEachManipulator((function(t){return e.handles.add(t.events.on("immediate-click",(function(e){return e.stopPropagation()})))})),this.moveManipulation.elevationInfo=c.getGraphicEffectiveElevationInfo(this.graphic),this.moveManipulation.createGraphicDragPipeline(this.graphicState,(function(t){var n={graphic:t.graphic,dxScreen:t.dxScreen,dyScreen:t.dyScreen};switch(t.action){case"start":e.emit("graphic-translate-start",n);break;case"update":e.emit("graphic-translate",n);break;case"end":e.emit("graphic-translate-stop",n)}})),this.moveManipulation.angle=this.symbolRotationAngle,(this.enableScaling||this.enableRotation)&&(this.scaleRotate=new v.GraphicScaleRotateTransform({tool:this,mode:this.enableScaling&&this.enableRotation?null:this.enableScaling?"scale":"rotate"}),this.handles.add(this.scaleRotate.events.on("scale-changed",(function(){return e.onScaleChanged()})))),this.handles.add([d.createVisualElements({view:this.view,graphic:this.graphic,forEachManipulator:function(t){return e.forEachManipulator(t)},onManipulatorsChanged:function(){return o.makeHandle()}}),this.graphic.watch("symbol",(function(){return e.updateMoveAngle()})),this.graphicState.on("changed",(function(){return e.onGeometryChanged()})),this.hideManipulatorsForGraphicState(),this.view.watch("scale",(function(){return e.updateMoveAngle()}))]),this.handles.add(this.view.trackGraphicState(this.graphicState)),this.onGeometryChanged()},t.prototype.forEachManipulator=function(e){this.moveManipulation.forEachManipulator(e),a.isSome(this.scaleRotate)&&this.scaleRotate.forEachManipulator(e)},t.prototype.hideManipulatorsForGraphicState=function(){var e=this;return this.graphicState.watch("displaying",(function(t){e.forEachManipulator((function(e){return e.available=t})),e.moveManipulation.zManipulation.available=t&&e.enableZ&&p.canMoveZ(e.graphic)}))},t.prototype.destroy=function(){this.handles.destroy(),this.moveManipulation.destroy(),a.isSome(this.scaleRotate)&&(this.scaleRotate.destroy(),this.scaleRotate=null),this._set("view",null),this._set("graphic",null)},Object.defineProperty(t.prototype,"snapToScene",{set:function(e){this.moveManipulation&&(this.moveManipulation.snapToScene=e),this._set("snapToScene",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"symbolRotationAngle",{get:function(){var e=this.graphic.symbol;if(e){var t=e.symbolLayers.find((function(e){return"object"===e.type}));return l.toRadian(-(t&&t.heading||0))}return 0},enumerable:!0,configurable:!0}),t.prototype.reset=function(){},t.prototype.onDetach=function(){a.isSome(this.scaleRotate)&&this.scaleRotate.cancelActiveAnimation()},t.prototype.onHide=function(){a.isSome(this.scaleRotate)&&this.scaleRotate.cancelActiveAnimation()},t.prototype.onScaleChanged=function(){if(!a.isNone(this.scaleRotate)){var e=this.scaleRotate.getScale();this.moveManipulation.displayScale=e}},t.prototype.updateMoveAngle=function(){this.moveManipulation.angle="local"===this.view.viewingMode||this.view.scale<h.ALIGN_ARROWS_SCALE_THRESHOLD?this.symbolRotationAngle:0},t.prototype.onGeometryChanged=function(){u.placeAtGraphic(this.view,this.moveManipulation,this.graphic)},Object.defineProperty(t.prototype,"test",{get:function(){return{discManipulator:this.moveManipulation.xyManipulation.test.discManipulator,ringManipulator:a.isSome(this.scaleRotate)?this.scaleRotate.test.ringManipulator:null,arrowManipulators:this.moveManipulation.xyAxisManipulation.test.arrowManipulators}},enumerable:!0,configurable:!0}),n.__decorate([s.property({constructOnly:!0,nonNullable:!0})],t.prototype,"view",void 0),n.__decorate([s.property({constructOnly:!0,nonNullable:!0})],t.prototype,"graphic",void 0),n.__decorate([s.property({constructOnly:!0,nonNullable:!0})],t.prototype,"enableZ",void 0),n.__decorate([s.property()],t.prototype,"enableRotation",void 0),n.__decorate([s.property()],t.prototype,"enableScaling",void 0),n.__decorate([s.property({value:!1})],t.prototype,"snapToScene",null),n.__decorate([s.property({readOnly:!0})],t.prototype,"type",void 0),n.__decorate([s.subclass("esri.views.3d.interactive.editingTools.graphicTransform3D.GraphicTransformTool")],t)}(i.EventedMixin(m.InteractiveToolBase));t.GraphicTransformTool=y}).apply(null,i))||(e.exports=r)},"58az":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("7Aei")],void 0===(r=(function(e,t,n,i){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CameraSpace=function(e){e.fragment.uniforms.add("projInfo","vec4"),e.fragment.uniforms.add("zScale","vec2"),e.fragment.code.add(i.glsl(r||(r=n.__makeTemplateObject(["\n vec3 reconstructPosition(vec2 fragCoord, float depth) {\n return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth);\n }\n "],["\n vec3 reconstructPosition(vec2 fragCoord, float depth) {\n return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth);\n }\n "]))))}}).apply(null,i))||(e.exports=r)},"5T2R":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("FXVB"),n("0LE5"),n("O7NG"),n("ZcgO"),n("woUR"),n("BwdQ"),n("JjCO"),n("ys4y"),n("4ziW"),n("o5p5"),n("uZGf")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h){function f(e,t){void 0===t&&(t=4);var n=o.vec4f64.fromValues(e[0],e[1],e[2],e.length>3?e[3]:1),i=new h.ShadedColorMaterial({color:n,transparent:e[3]<1,writeDepth:!0,cullFace:2},"manipulator");return i.renderOccluded=t,i}function v(e,t,n,i){var o=r.vec3.normalize(c.sv3d.get(),e),a=r.vec3.normalize(c.sv3d.get(),t),s=r.vec3.cross(c.sv3d.get(),o,a);return i[0]=o[0],i[1]=o[1],i[2]=o[2],i[3]=0,i[4]=a[0],i[5]=a[1],i[6]=a[2],i[7]=0,i[8]=s[0],i[9]=s[1],i[10]=s[2],i[11]=0,i[12]=n[0],i[13]=n[1],i[14]=n[2],i[15]=1,i}function g(e,t){var i=e.getViewForGraphic(t);return n.isSome(i)&&"computeAttachmentOrigin"in i?i.computeAttachmentOrigin(t,e.spatialReference):null}Object.defineProperty(t,"__esModule",{value:!0}),t.createManipulatorMaterial=f,t.createManipulatorOutlineMaterial=function(e,t){void 0===t&&(t=4);var n=o.vec4f64.fromValues(e[0],e[1],e[2],4===e.length?e[3]:1),i=new d({color:n,transparent:!0,writeDepth:!0,cullFace:1},"manipulator-outline");return i.renderOccluded=t,i},t.createSphereManipulator=function(e,t,n){return new s.Manipulator3D({view:e,renderObjects:[{geometry:new u(p.createSphereGeometry(1,32,32),"manipulator"),material:f(o.vec4f64.fromValues(t[0],t[1],t[2],null!=n?n:1))}]})},t.calculateInputRotationTransform=function(e,t,n,o){var a=r.vec3.subtract(c.sv3d.get(),e,n),s=v(a,r.vec3.cross(c.sv3d.get(),o,a),n,c.sm4d.get());i.mat4.invert(s,s);var l=r.vec3.transformMat4(c.sv3d.get(),t,s);return Math.atan2(l[1],l[0])},t.calculateTranslateRotateFromBases=v,t.getGraphicAttachmentOrigin=g,t.placeAtGraphic=function(e,t,i){var r=g(e,i);n.isSome(r)?t.elevationAlignedLocation=r:function(e,t){if(!n.isNone(t)){var i=l.computeCentroid(t);n.isNone(i)||(e.location=a.hydrateGeometry(i))}}(t,i.geometry)}}).apply(null,i))||(e.exports=r)},"62Ht":function(e,t){},"6hC7":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("QDcU"),n("BcWh"),n("eIBl"),n("XwIv"),n("LxLY"),n("FXVB"),n("1m5D"),n("0LE5"),n("Rdxj"),n("DtIM"),n("woUR"),n("B3XD"),n("X5J5"),n("Fe95"),n("48/q"),n("dtql"),n("JjCO"),n("ys4y"),n("4ziW"),n("o5p5"),n("bz+r")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x,S,w){Object.defineProperty(t,"__esModule",{value:!0});var O=function(e){function t(t){var n=e.call(this)||this;return n._handles=new o,n._arrowManipulatorInfos=new Array,n._opaqueMaterial=n.createMaterial(),n._transparentMaterial=n.createMaterial(.5),n._angle=0,n._scale=1,n._radius=g.DISC_RADIUS,n._updateAfterDrag=!1,n.events=new r,n._tool=t.tool,n._view=t.view,null!=t.radius&&(n._radius=t.radius),n._createManipulators(),n.forEachManipulator((function(e){return n._tool.manipulators.add(e)})),n}return n.__extends(t,e),Object.defineProperty(t.prototype,"orthogonalAvailable",{set:function(e){this._arrowManipulatorInfos[1].manipulator.available=e,this._arrowManipulatorInfos[3].manipulator.available=e},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){var e=this;this.forEachManipulator((function(t){e._tool.manipulators.remove(t),t.destroy()})),this._handles.removeAll(),this._tool=null,this._view=null,this._arrowManipulatorInfos.length=0},t.prototype.forEachManipulator=function(e){this._arrowManipulatorInfos.map((function(t){return e(t.manipulator,1)}))},t.prototype.createGraphicDragPipeline=function(e,t){var n=this,i=e.graphic,r=d.getGraphicEffectiveElevationInfo(i),o=s.unwrap(i.geometry).spatialReference;return y.createGraphicMoveDragPipeline(e,t,(function(e){return n.createDragPipeline(e,r,o)}))},t.prototype.createDragPipeline=function(e,t,n){var i=this;return a.handlesGroup(this._arrowManipulatorInfos.map((function(r,o){return w.createManipulatorDragEventPipeline(r.manipulator,(function(r,a,s,l){var c=a.next(f.screenToMapXYAtLocation(i._view,r.elevationAlignedLocation,t,n)).next(w.constrainToMapAxis(r.location,i.angle+(o+1)*Math.PI*.5)).next(w.addScreenDelta());e(r,c,s,l)}))})))},Object.defineProperty(t.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.dragging?this._updateAfterDrag=!0:this._updateManipulatorTransform()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"displayScale",{get:function(){return this._scale},set:function(e){this._scale=e,this._updateManipulatorTransform()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this._radius},set:function(e){this._radius!==e&&(this._radius=e,this._updateManipulators())},enumerable:!0,configurable:!0}),t.prototype._updateManipulators=function(){for(var e=0;e<this._arrowManipulatorInfos.length;e++)this._updateArrowManipulator(this._arrowManipulatorInfos[e],e);this._updateManipulatorTransform()},t.prototype._updateArrowManipulator=function(e,t){var n=e.manipulator,i=e.transform,r=this._radius/g.DISC_RADIUS,o=g.DISC_TRANSLATE_ARROW_SIZE*r,a=Math.sqrt(o*o*3/4),s=x.createExtrudedTriangle(a,o/2,o/2,g.DISC_HEIGHT);x.transformInPlace(s,l.mat4.fromTranslation(_.sm4d.get(),u.vec3.set(_.sv3d.get(),0,-a/3,0)));var c=new b(s,"move-xy-axis-arrow");n.renderObjects=[{geometry:c,material:this._opaqueMaterial,stateMask:2},{geometry:c,material:this._transparentMaterial,stateMask:1}],n.radius=a/3*2*1.2;var p=l.mat4.identity(_.sm4d.get());l.mat4.fromZRotation(p,t*Math.PI/2);var d=l.mat4.identity(_.sm4d.get());l.mat4.fromTranslation(d,u.vec3.set(_.sv3d.get(),0,g.DISC_TRANSLATE_ARROW_OFFSET*r,0)),l.mat4.multiply(i,p,d)},t.prototype._createManipulators=function(){for(var e=0;e<4;e++){var t=this._createArrowManipulator(e);this._arrowManipulatorInfos.push(t)}this._updateManipulatorTransform()},t.prototype._updateManipulatorTransform=function(){var e=this.angle,t=l.mat4.identity(_.sm4d.get());l.mat4.rotate(t,t,e,p.vec3f64.fromValues(0,0,1));var n=l.mat4.fromScaling(_.sm4d.get(),u.vec3.set(_.sv3d.get(),this.displayScale,this.displayScale,this.displayScale)),i=l.mat4.identity(_.sm4d.get());l.mat4.multiply(i,n,t);for(var r=0,o=this._arrowManipulatorInfos;r<o.length;r++){var a=o[r],s=l.mat4.multiply(_.sm4d.get(),i,a.transform);a.manipulator.modelTransform=s}},t.prototype._createArrowManipulator=function(e){var t=this,n=new h.Manipulator3D({view:this._view,autoScaleRenderObjects:!1,worldOriented:!0,focusMultiplier:1,touchMultiplier:1,collisionType:{type:"disc",direction:p.vec3f64.fromValues(0,0,1)}}),i={manipulator:n,transform:c.mat4f64.create()};return this._updateArrowManipulator(i,e),this._handles.add(n.events.on("drag",(function(e){t._updateAfterDrag&&"end"===e.action&&!t.dragging&&(t._updateManipulatorTransform(),t._updateAfterDrag=!1)}))),i},t.prototype.createMaterial=function(e){void 0===e&&(e=1);var t=i.toUnitRGBA(v.colors.main);t[3]*=e;var n=new S({color:t,transparent:1!==e,cullFace:2},"graphic-transform");return n.renderOccluded=2,n},Object.defineProperty(t.prototype,"test",{get:function(){return{arrowManipulators:this._arrowManipulatorInfos.map((function(e){return e.manipulator}))}},enumerable:!0,configurable:!0}),t}(m.Manipulation);t.MoveXYAxisManipulation=O}).apply(null,i))||(e.exports=r)},"73uV":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("eIBl"),n("LxLY"),n("B3XD"),n("48/q"),n("dtql"),n("bz+r"),n("N78w")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c){Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t){var n=e.call(this)||this;return n._handles=new i,n._view=t.view,n._tool=t.tool,n._graphicState=t.graphicState,n._createManipulator(),n.forEachManipulator((function(e){return n._tool.manipulators.add(e)})),n}return n.__extends(t,e),t.prototype.destroy=function(){var e=this;this._handles.destroy(),this.forEachManipulator((function(t){e._tool.manipulators.remove(t),t.destroy()})),this._tool=null,this._view=null,this._manipulator=null,this._graphicState=null},t.prototype.forEachManipulator=function(e){e(this._manipulator,1)},t.prototype.createGraphicDragPipeline=function(e){var t=this;return s.createGraphicMoveDragPipeline(this._graphicState,e,(function(e){return t.createDragPipeline(e)}))},t.prototype.createDragPipeline=function(e){var t=this._view,n=this._graphicState.graphic,i=r.isSome(n.geometry)?n.geometry.spatialReference:null;return l.createManipulatorDragEventPipeline(this._manipulator,(function(r,a,s,c){var u=a.next(o.screenToMapXYForGraphic(c,t,n,i)).next(l.addMapDelta()).next(l.addScreenDelta());e(r,u,s,c)}))},t.prototype._createManipulator=function(){this._manipulator=new c.GraphicManipulator({graphic:this._graphicState.graphic,view:this._view,selectable:!0,cursor:"move"})},t}(a.Manipulation);t.MoveXYGraphicManipulation=u}).apply(null,i))||(e.exports=r)},"7zqm":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("7Aei")],void 0===(r=(function(e,t,n,i){var r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.LineStipple=function(e,t){e.defines.addFloat("STIPPLE_ALPHA_COLOR_DISCARD",.001),e.defines.addFloat("STIPPLE_ALPHA_HIGHLIGHT_DISCARD",.5),t.stippleEnabled?function(e,t){e.vertex.uniforms.add("stipplePatternPixelSizeInv","float"),t.stippleUVMaxEnabled&&e.varyings.add("stipplePatternUvMax","float"),e.varyings.add("stipplePatternUv","float"),e.fragment.uniforms.add("stipplePatternTexture","sampler2D"),t.stippleOffColorEnabled&&e.fragment.uniforms.add("stippleOffColor","vec4"),e.fragment.code.add(i.glsl(r||(r=n.__makeTemplateObject(["\n float getStippleAlpha() {\n float stipplePatternUvClamped = stipplePatternUv * gl_FragCoord.w;\n ","\n\n return texture2D(stipplePatternTexture, vec2(mod(stipplePatternUvClamped, 1.0), 0.5)).a;\n }"],["\n float getStippleAlpha() {\n float stipplePatternUvClamped = stipplePatternUv * gl_FragCoord.w;\n ","\n\n return texture2D(stipplePatternTexture, vec2(mod(stipplePatternUvClamped, 1.0), 0.5)).a;\n }"])),t.stippleUVMaxEnabled?"stipplePatternUvClamped = clamp(stipplePatternUvClamped, 0.0, stipplePatternUvMax);":"")),e.fragment.code.add(i.glsl(t.stippleOffColorEnabled?o||(o=n.__makeTemplateObject(["\n #define discardByStippleAlpha(stippleAlpha, threshold) {}\n #define blendStipple(color, stippleAlpha) mix(color, stippleOffColor, stippleAlpha)\n "],["\n #define discardByStippleAlpha(stippleAlpha, threshold) {}\n #define blendStipple(color, stippleAlpha) mix(color, stippleOffColor, stippleAlpha)\n "])):a||(a=n.__makeTemplateObject(["\n #define discardByStippleAlpha(stippleAlpha, threshold) if (stippleAlpha < threshold) { discard; }\n #define blendStipple(color, stippleAlpha) vec4(color.rgb, color.a * stippleAlpha)\n "],["\n #define discardByStippleAlpha(stippleAlpha, threshold) if (stippleAlpha < threshold) { discard; }\n #define blendStipple(color, stippleAlpha) vec4(color.rgb, color.a * stippleAlpha)\n "]))))}(e,t):function(e){e.fragment.code.add(i.glsl(s||(s=n.__makeTemplateObject(["\n float getStippleAlpha() { return 1.0; }\n\n #define discardByStippleAlpha(_stippleAlpha_, _threshold_) {}\n #define blendStipple(color, _stippleAlpha_) color\n "],["\n float getStippleAlpha() { return 1.0; }\n\n #define discardByStippleAlpha(_stippleAlpha_, _threshold_) {}\n #define blendStipple(color, _stippleAlpha_) color\n "]))))}(e)}}).apply(null,i))||(e.exports=r)},A5GR:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("y4WC"),n("BcWh"),n("eIBl"),n("XwIv"),n("LxLY"),n("Vx27"),n("ZcgO"),n("DtIM"),n("5T2R"),n("1eTA"),n("G+tB"),n("Fe95"),n("BhkK"),n("dtql"),n("73uV"),n("qflc"),n("R4nD"),n("/NuL"),n("bz+r"),n("X7Ps")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x,S){Object.defineProperty(t,"__esModule",{value:!0});var w=function(e){this.allGraphics=e,this.type="graphic-move-start"};t.GraphicMoveStartEvent=w;var O=function(e,t,n){this.dx=e,this.dy=t,this.allGraphics=n,this.type="graphic-move"};t.GraphicMoveEvent=O;var P=function(e){this.allGraphics=e,this.type="graphic-move-stop"};t.GraphicMoveStopEvent=P;var M=function(e){function t(t){var n=e.call(this,t)||this;return n.graphics=new i,n.enableZ=!0,n.type="move-3d",n._toolHandles=new o,n._handles=new o,n}return n.__extends(t,e),t.prototype.initialize=function(){var e=this;this._toolHandles.add([this.graphics.on("change",(function(){return e._refreshManipulators()}))]),this._refreshManipulators()},t.prototype.destroy=function(){this._handles.destroy(),this._handles=null,this._toolHandles.destroy(),this._toolHandles=null,this.graphics.removeAll(),this._set("view",null)},t.prototype.reset=function(){},t.prototype._refreshManipulators=function(){var e=this;this._handles.removeAll(),this._moveManipulation&&this._moveManipulation.destroy(),this.manipulators.removeAll();var t=this.graphics.toArray().filter((function(e){return 0===y.isSupportedGraphic(e)})).map((function(e){return new C(e)}));t.length&&(this.createManipulators(t),this.createVisualElements(t),this._handles.add(t.map((function(t){return e.view.trackGraphicState(t.state)}))),this.updateMoveManipulation(t))},t.prototype.createManipulators=function(e){for(var t=this,i=function(i){var o=i.state;i.manipulationXY=new m.MoveXYGraphicManipulation({tool:r,view:r.view,graphicState:o}),i.manipulationXY.forEachManipulator((function(e){return t._handles.add(e.events.on("immediate-click",(function(e){t.emit("immediate-click",n.__assign(n.__assign({},e),{graphic:o.graphic})),e.stopPropagation()})))})),r._handles.add(i.manipulationXY.createDragPipeline((function(n,i,r){return t.buildDragEventPipeline(n,i,r,e)})))},r=this,o=0,a=e;o<a.length;o++)i(a[o]);this.createMoveManipulation(e)},t.prototype.createMoveManipulation=function(e){var t=this,i=new v.MoveManipulation({tool:this,view:this.view,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:1===e.length?v.MoveManipulation.radiusForSymbol(e[0].graphic.symbol):f.DISC_RADIUS});this._moveManipulation=i,i.elevationInfo={mode:"absolute-height",offset:0},i.forEachManipulator((function(e){t._handles.add(e.events.on("immediate-click",(function(r){i.zManipulation.hasManipulator(e)||1!==t.graphics.length||t.emit("immediate-click",n.__assign(n.__assign({},r),{graphic:t.graphics.getItemAt(0)})),r.stopPropagation()})))}));for(var r=function(){return t.updateMoveManipulation(e)},o=0,a=e;o<a.length;o++){var l=a[o];this._handles.add([l.state.on("changed",r),l.state.watch("displaying",r)])}var c=e[e.length-1];this._handles.add(c.state.on("changed",(function(){return t.updateMoveManipulationAngle(c)}))),this._handles.add(i.createDragPipeline((function(n,i,r){t.buildDragEventPipeline(n,i,r,e)}),u.getGraphicEffectiveElevationInfo(c.graphic),s.unwrap(c.graphic.geometry).spatialReference)),this.updateMoveManipulationAngle(c)},t.prototype.createVisualElements=function(e){for(var t=this,n=function(n){var r=h.createVisualElements({view:i.view,graphic:n.graphic,forEachManipulator:function(e){n.manipulationXY.forEachManipulator(e),t._moveManipulation.forEachManipulator(e)},onManipulatorsChanged:function(){return a.makeHandle()}});n.geometryRepresentation=r.visualElement,n.geometryRepresentation instanceof _.OutlineVisualElement&&i._handles.add([n.geometryRepresentation.events.on("attachment-origin-changed",(function(){n.state.isDraped||t.updateMoveManipulation(e)})),n.state.watch("isDraped",(function(){return t.updateMoveManipulation(e)}))]),i._handles.add(r)},i=this,r=0,o=e;r<o.length;r++)n(o[r])},t.prototype.updateMoveManipulationAngle=function(e){this._moveManipulation.angleDeferred=function(){return g.primaryShapeOrientation(e.graphic.geometry)}},t.prototype.updateMoveManipulation=function(e){for(var t=c.makeDehydratedPoint(0,0,0,this.view.spatialReference),n=0,i=!1,r=this._moveManipulation,o=0,a=e;o<a.length;o++){var l=a[o];if(l.state.displaying){var u=l.state.graphic;this.enableZ&&d.canMoveZ(u)&&(i=!0);var h=l.geometryRepresentation instanceof _.OutlineVisualElement&&!l.state.isDraped?l.geometryRepresentation.attachmentOrigin:p.getGraphicAttachmentOrigin(this.view,u);s.isSome(h)&&(t.x+=h.x,t.y+=h.y,t.z+=h.z,n++)}}n>0?(t.x/=n,t.y/=n,t.z/=n,r.location=t,r.xyManipulation.available=!0,r.xyAxisManipulation.available=!0,r.zManipulation.available=i):r.available=!1},t.prototype.buildDragEventPipeline=function(e,t,n,i){var r=this,o=[],a=[],s=null,l=null,c=function(){for(var e=0,t=o;e<t.length;e++)t[e].dragging=!1;o.length=0,a.length=0,s=null,l=null,r._moveManipulation.interactive=!0};t.next((function(t){if("start"===t.action){o.length=0,a.length=0;for(var n=0,c=i;n<c.length;n++){var u=c[n];u.dragging||!u.manipulationXY.hasManipulator(e)&&u.manipulationXY.grabbing||(o.push(u),a.push(u.graphic),u.dragging=!0)}if(0!==a.length&&(r._moveManipulation.interactive=!1,s=x.dragGraphicMany(a),l=x.resetGraphicMany(a),r.emit("graphic-move-start",new w(a)),r.destroyed))return null}return 0!==a.length?t:null})).next((function(e){return s(e)})).next((function(e){switch(e.action){case"start":case"update":if(e.translationX||e.translationY||e.translationZ){var t=r.view.toScreen(e.mapStart),n=r.view.toScreen(e.mapEnd);if(r.emit("graphic-move",new O(n.x-t.x,n.y-t.y,a)),r.destroyed)return null}break;case"end":if(r.emit("graphic-move-stop",new P(a)),r.destroyed)return null;c()}})),n.next((function(e){return l(e)})).next((function(){if(r.emit("graphic-move-stop",new P(a)),r.destroyed)return null;c()}))},n.__decorate([l.property({constructOnly:!0,nonNullable:!0})],t.prototype,"view",void 0),n.__decorate([l.property({readOnly:!0})],t.prototype,"graphics",void 0),n.__decorate([l.property({constructOnly:!0,nonNullable:!0})],t.prototype,"enableZ",void 0),n.__decorate([l.property({readOnly:!0})],t.prototype,"type",void 0),n.__decorate([l.subclass("esri.views.3d.interactive.editingTools.graphicMove3D.GraphicMoveTool")],t)}(r.EventedMixin(S.InteractiveToolBase));t.GraphicMoveTool=M;var C=function(){function e(e){this.state=null,this.geometryRepresentation=null,this.manipulationXY=null,this.dragging=!1,this.state=new b.GraphicState({graphic:e})}return Object.defineProperty(e.prototype,"graphic",{get:function(){return this.state.graphic},enumerable:!0,configurable:!0}),e}()}).apply(null,i))||(e.exports=r)},B3XD:function(e,t){},BhkK:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("eIBl"),n("XwIv"),n("H1tY"),n("LxLY"),n("Fe95"),n("48/q"),n("6hC7"),n("yjgM"),n("pvGl")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p){Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t){var n=e.call(this)||this;n._handles=new i,n._angleDeferred=null,n._interactive=!0;var r=t.tool,o=t.view,a=t.snapToScene,s=t.radius;return n._view=o,n.xyManipulation=new u.MoveXYDiscManipulation({tool:r,view:o,snapToScene:a,radius:s}),n.xyAxisManipulation=new c.MoveXYAxisManipulation({tool:r,view:o,radius:s}),n.zManipulation=new p.MoveZManipulation({tool:r,view:o,radius:s}),n.xyManipulation.available=t.xyAvailable,n.xyAxisManipulation.available=t.xyAxisAvailable,n.zManipulation.available=t.zAvailable,n.autoHideXYAxis(),n.forEachManipulator((function(e){n._handles.add(e.events.on("grab-changed",(function(){return n.updateManipulatorInteractivity()})))})),n}return n.__extends(t,e),t.prototype.destroy=function(){this._handles.destroy(),this.xyManipulation.destroy(),this.xyAxisManipulation.destroy(),this.zManipulation.destroy()},t.prototype.createGraphicDragPipeline=function(e,t){return r.handlesGroup([this.xyManipulation.createGraphicDragPipeline(e,t),this.xyAxisManipulation.createGraphicDragPipeline(e,t),this.zManipulation.createGraphicDragPipeline(e,t)])},t.prototype.createDragPipeline=function(e,t,n){return r.handlesGroup([this.xyManipulation.createDragPipeline(e,t,n),this.xyAxisManipulation.createDragPipeline(e,t,n),this.zManipulation.createDragPipeline(e,n)])},Object.defineProperty(t.prototype,"snapToScene",{set:function(e){this.xyManipulation.snapToScene=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"angle",{set:function(e){this._angleDeferred=null,this.xyAxisManipulation.angle=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"angleDeferred",{set:function(e){this.xyAxisVisible?this.angle=e():this._angleDeferred=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"interactive",{set:function(e){this._interactive!==e&&(this._interactive=e,this.updateManipulatorInteractivity())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"radius",{set:function(e){this.xyAxisManipulation.radius=e,this.xyManipulation.radius=e,this.zManipulation.radius=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"displayScale",{set:function(e){this.xyManipulation.displayScale=e,this.xyAxisManipulation.displayScale=e},enumerable:!0,configurable:!0}),t.prototype.forEachManipulator=function(e){this.xyManipulation.forEachManipulator((function(t){return e(t,1)})),this.xyAxisManipulation.forEachManipulator((function(t){return e(t,1)})),this.zManipulation.forEachManipulator((function(t){return e(t,0)}))},Object.defineProperty(t.prototype,"xyAxisVisible",{get:function(){var e=this.xyManipulation.someManipulator((function(e){return e.focused}))||this.xyAxisManipulation.someManipulator((function(e){return e.focused}));return this._view.inputManager&&"touch"===this._view.inputManager.latestPointerType||e},enumerable:!0,configurable:!0}),t.prototype.autoHideXYAxis=function(){var e=this,t=this.xyAxisManipulation,n=this.xyManipulation;if(!o("esri-mobile")){var i=[];n.forEachManipulator((function(e){return i.push(e)})),t.forEachManipulator((function(e){return i.push(e)}));for(var r=function(){var n=[];e.xyAxisVisible?a.isSome(e._angleDeferred)&&(e.angle=e._angleDeferred()):t.forEachManipulator((function(e){return n.push(e.disableDisplay())})),e._handles.remove(h),e._handles.add(n,h)},s=0,l=i;s<l.length;s++)this._handles.add(l[s].events.on("focus-changed",r));this._view.inputManager&&this._handles.add(this._view.inputManager.watch("latestPointerType",r)),r()}},t.prototype.updateManipulatorInteractivity=function(){var e=this,t=this.grabbing;this.forEachManipulator((function(n){n.interactive=!t&&e._interactive||n.grabbing}))},t.radiusForSymbol=function(e){var t=a.isSome(e)&&"point-3d"===e.type&&e.symbolLayers;return t&&t.length>0&&t.some((function(e){return"icon"===e.type}))?s.DISC_RADIUS_SMALL:s.DISC_RADIUS},t}(l.Manipulation);t.MoveManipulation=d;var h="disable-xy-axis-display"}).apply(null,i))||(e.exports=r)},CqfC:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("vJh7")],void 0===(r=(function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mat2=n}).apply(null,i))||(e.exports=r)},DFuO:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("fese"),n("3kdR"),n("6t3m"),n("7Aei"),n("aExC")],void 0===(r=(function(e,t,n,i,r,o,a,s){var l,c;Object.defineProperty(t,"__esModule",{value:!0}),t.build=function(e){var t=new s.ShaderBuilder;return t.include(r.Transform,{linearDepth:!1}),t.include(o.VertexColor,e),t.vertex.uniforms.add("proj","mat4").add("view","mat4"),t.attributes.add("position","vec3"),t.varyings.add("vpos","vec3"),t.vertex.code.add(a.glsl(l||(l=n.__makeTemplateObject(["\n void main(void) {\n vpos = position;\n forwardNormalizedVertexColor();\n gl_Position = transformPosition(proj, view, vpos);\n }\n "],["\n void main(void) {\n vpos = position;\n forwardNormalizedVertexColor();\n gl_Position = transformPosition(proj, view, vpos);\n }\n "])))),t.include(i.Slice,e),t.fragment.uniforms.add("eColor","vec4"),t.fragment.code.add(a.glsl(c||(c=n.__makeTemplateObject(["\n void main() {\n discardBySlice(vpos);\n ","\n gl_FragColor = highlightSlice(gl_FragColor, vpos);\n }\n "],["\n void main() {\n discardBySlice(vpos);\n ","\n gl_FragColor = highlightSlice(gl_FragColor, vpos);\n }\n "])),e.attributeColor?"gl_FragColor = vColor * eColor;":"gl_FragColor = eColor;")),t}}).apply(null,i))||(e.exports=r)},Dk48:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("Gtr7"),n("Vx27")],r=(function(e,t,n,i,r){return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,t.SCENEVIEW_LOCKING_LOG=!1,t.HIGHLIGHTS_GRID_OPTIMIZATION_DISABLED=!1,t.HIGHLIGHTS_PROFILE_TO_CONSOLE=!1,t.DECONFLICTOR_SHOW_VISIBLE=!1,t.DECONFLICTOR_SHOW_INVISIBLE=!1,t.DECONFLICTOR_SHOW_GRID=!1,t.LABELS_SHOW_BORDER=!1,t.OVERLAY_DRAW_DEBUG_TEXTURE=!1,t.OVERLAY_SHOW_CENTER=!1,t.TERRAIN_DEBUG_POPUP=!1,t.TESTS_DISABLE_UPDATE_THRESHOLDS=!1,t.DISABLE_DECONFLICTOR_VISIBILITY_OFFSET=!1,t.DISABLE_ELEVATION_ALIGNERS_ITERATIVE_UPDATES=!1,t.DRAW_MESH_GEOMETRY_NORMALS=!1,t.FEATURE_TILE_FETCH_SHOW_TILES=!1,t.FEATURE_TILE_TREE_SHOW_TILES=!1,t.I3S_TREE_SHOW_TILES=!1,t.I3S_SHOW_MODIFICATIONS=!1,t.ENABLE_PROFILE_DEPTH_RANGE=!1,t.DISABLE_FAST_UPDATES=!1,t.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,t.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,t.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,t}return n.__extends(t,e),n.__decorate([r.property()],t.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),n.__decorate([r.property()],t.prototype,"SCENEVIEW_LOCKING_LOG",void 0),n.__decorate([r.property()],t.prototype,"HIGHLIGHTS_GRID_OPTIMIZATION_DISABLED",void 0),n.__decorate([r.property()],t.prototype,"HIGHLIGHTS_PROFILE_TO_CONSOLE",void 0),n.__decorate([r.property()],t.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),n.__decorate([r.property()],t.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),n.__decorate([r.property()],t.prototype,"DECONFLICTOR_SHOW_GRID",void 0),n.__decorate([r.property()],t.prototype,"LABELS_SHOW_BORDER",void 0),n.__decorate([r.property()],t.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),n.__decorate([r.property()],t.prototype,"OVERLAY_SHOW_CENTER",void 0),n.__decorate([r.property()],t.prototype,"TERRAIN_DEBUG_POPUP",void 0),n.__decorate([r.property()],t.prototype,"TESTS_DISABLE_UPDATE_THRESHOLDS",void 0),n.__decorate([r.property()],t.prototype,"DISABLE_DECONFLICTOR_VISIBILITY_OFFSET",void 0),n.__decorate([r.property()],t.prototype,"DISABLE_ELEVATION_ALIGNERS_ITERATIVE_UPDATES",void 0),n.__decorate([r.property()],t.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),n.__decorate([r.property()],t.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),n.__decorate([r.property()],t.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),n.__decorate([r.property()],t.prototype,"I3S_TREE_SHOW_TILES",void 0),n.__decorate([r.property()],t.prototype,"I3S_SHOW_MODIFICATIONS",void 0),n.__decorate([r.property()],t.prototype,"ENABLE_PROFILE_DEPTH_RANGE",void 0),n.__decorate([r.property()],t.prototype,"DISABLE_FAST_UPDATES",void 0),n.__decorate([r.property()],t.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),n.__decorate([r.property()],t.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),n.__decorate([r.property()],t.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),n.__decorate([r.subclass("esri.views.3d.support.DebugFlags")],t)}(i))}).apply(null,i),void 0===r||(e.exports=r)},"E/g4":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("7Aei")],void 0===(r=(function(e,t,n,i){var r,o,a,s,l,c;Object.defineProperty(t,"__esModule",{value:!0}),t.RibbonVertexPosition=function(e,t){e.vertex.uniforms.add("intrinsicWidth","float"),t.vvSize?(e.attributes.add("sizeFeatureAttribute","float"),e.vertex.uniforms.add("vvSizeMinSize","vec3"),e.vertex.uniforms.add("vvSizeMaxSize","vec3"),e.vertex.uniforms.add("vvSizeOffset","vec3"),e.vertex.uniforms.add("vvSizeFactor","vec3"),e.vertex.code.add(i.glsl(r||(r=n.__makeTemplateObject(["\n float getSize() {\n return intrinsicWidth * clamp(vvSizeOffset + sizeFeatureAttribute * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).x;\n }\n "],["\n float getSize() {\n return intrinsicWidth * clamp(vvSizeOffset + sizeFeatureAttribute * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).x;\n }\n "]))))):(e.attributes.add("size","float"),e.vertex.code.add(i.glsl(o||(o=n.__makeTemplateObject(["\n float getSize(){\n return intrinsicWidth * size;\n }\n "],["\n float getSize(){\n return intrinsicWidth * size;\n }\n "]))))),t.vvOpacity?(e.attributes.add("opacityFeatureAttribute","float"),e.vertex.defines.addInt("VV_OPACITY_N",8),e.vertex.code.add(i.glsl(a||(a=n.__makeTemplateObject(["\n uniform float vvOpacityValues[VV_OPACITY_N];\n uniform float vvOpacityOpacities[VV_OPACITY_N];\n\n float interpolateOpacity( float value ){\n if (value <= vvOpacityValues[0]) {\n return vvOpacityOpacities[0];\n }\n\n for (int i = 1; i < VV_OPACITY_N; ++i) {\n if (vvOpacityValues[i] >= value) {\n float f = (value - vvOpacityValues[i-1]) / (vvOpacityValues[i] - vvOpacityValues[i-1]);\n return mix(vvOpacityOpacities[i-1], vvOpacityOpacities[i], f);\n }\n }\n\n return vvOpacityOpacities[VV_OPACITY_N - 1];\n }\n\n vec4 applyOpacity( vec4 color ){\n return vec4(color.xyz, interpolateOpacity(opacityFeatureAttribute));\n }\n "],["\n uniform float vvOpacityValues[VV_OPACITY_N];\n uniform float vvOpacityOpacities[VV_OPACITY_N];\n\n float interpolateOpacity( float value ){\n if (value <= vvOpacityValues[0]) {\n return vvOpacityOpacities[0];\n }\n\n for (int i = 1; i < VV_OPACITY_N; ++i) {\n if (vvOpacityValues[i] >= value) {\n float f = (value - vvOpacityValues[i-1]) / (vvOpacityValues[i] - vvOpacityValues[i-1]);\n return mix(vvOpacityOpacities[i-1], vvOpacityOpacities[i], f);\n }\n }\n\n return vvOpacityOpacities[VV_OPACITY_N - 1];\n }\n\n vec4 applyOpacity( vec4 color ){\n return vec4(color.xyz, interpolateOpacity(opacityFeatureAttribute));\n }\n "]))))):e.vertex.code.add(i.glsl(s||(s=n.__makeTemplateObject(["\n vec4 applyOpacity( vec4 color ){\n return color;\n }\n "],["\n vec4 applyOpacity( vec4 color ){\n return color;\n }\n "])))),t.vvColor?(e.attributes.add("colorFeatureAttribute","float"),e.vertex.defines.addInt("VV_COLOR_N",8),e.vertex.code.add(i.glsl(l||(l=n.__makeTemplateObject(["\n uniform float vvColorValues[VV_COLOR_N];\n uniform vec4 vvColorColors[VV_COLOR_N];\n\n vec4 interpolateColor( float value ) {\n if (value <= vvColorValues[0]) {\n return vvColorColors[0];\n }\n\n for (int i = 1; i < VV_COLOR_N; ++i) {\n if (vvColorValues[i] >= value) {\n float f = (value - vvColorValues[i-1]) / (vvColorValues[i] - vvColorValues[i-1]);\n return mix(vvColorColors[i-1], vvColorColors[i], f);\n }\n }\n\n return vvColorColors[VV_COLOR_N - 1];\n }\n\n vec4 getColor(){\n return applyOpacity(interpolateColor(colorFeatureAttribute));\n }\n "],["\n uniform float vvColorValues[VV_COLOR_N];\n uniform vec4 vvColorColors[VV_COLOR_N];\n\n vec4 interpolateColor( float value ) {\n if (value <= vvColorValues[0]) {\n return vvColorColors[0];\n }\n\n for (int i = 1; i < VV_COLOR_N; ++i) {\n if (vvColorValues[i] >= value) {\n float f = (value - vvColorValues[i-1]) / (vvColorValues[i] - vvColorValues[i-1]);\n return mix(vvColorColors[i-1], vvColorColors[i], f);\n }\n }\n\n return vvColorColors[VV_COLOR_N - 1];\n }\n\n vec4 getColor(){\n return applyOpacity(interpolateColor(colorFeatureAttribute));\n }\n "]))))):(e.attributes.add("color","vec4"),e.vertex.code.add(i.glsl(c||(c=n.__makeTemplateObject(["\n vec4 getColor(){\n return applyOpacity(color);\n }\n "],["\n vec4 getColor(){\n return applyOpacity(color);\n }\n "])))))}}).apply(null,i))||(e.exports=r)},EiS2:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("fese"),n("3kdR"),n("W/V4"),n("FQ4r"),n("lBa0"),n("ff/U"),n("lfQW"),n("DFuO"),n("G0ER"),n("qbr3"),n("2Kdy")],r=(function(e,t,i,r,o,a,s,l,c,u,p,d,h){Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initializeProgram=function(e){var n=t.shader.get(),i=this.configuration,r=n.build({attributeColor:i.vertexColors,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:i.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1});return new d(e.rctx,r.generateSource("vertex"),r.generateSource("fragment"),c.Default3D)},t.prototype.bindPass=function(e,t,n){this.program.setUniform4fv("eColor",t.color)},t.prototype.bindDraw=function(e){o.Transform.bindUniforms(this.program,e),r.Slice.bindUniformsWithOrigin(this.program,this.configuration,e)},t.prototype.initializePipeline=function(){var e=this.configuration,t=h.separateBlendingParams(770,1,771,771),n=0===e.output?e.transparent&&t:null,i=function(t){return h.makePipelineState({blending:n,polygonOffset:e.polygonOffset&&v,culling:(i=e.cullFace,0!==i&&{face:1===i?1028:1029,mode:2305}),depthTest:u.depthCompareLess,depthWrite:e.writeDepth&&h.defaultDepthWriteParams,colorWrite:h.defaultColorWriteParams,stencilWrite:e.sceneHasOcludees?u.stencilWriteMaskOn:null,stencilTest:e.sceneHasOcludees?t?u.stencilToolMaskBaseParams:u.stencilBaseAllZerosParams:null});var i};return this._occludeeState=i(!0),i(!1)},Object.defineProperty(t.prototype,"opaqueOccludeeState",{get:function(){return this._occludeeState},enumerable:!0,configurable:!0}),t.shader=new a.ReloadableShaderModule(p,(function(){return new Promise((function(e,t){Promise.resolve().then((function(){var t=[n("DFuO")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))})),t}(s.ShaderTechnique);t.ColorMaterialTechnique=f;var v={factor:1,units:1},g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.output=0,t.cullFace=0,t.slicePlaneEnabled=!1,t.sliceHighlightDisabled=!1,t.vertexColors=!1,t.transparent=!1,t.polygonOffset=!1,t.writeDepth=!0,t.sceneHasOcludees=!1,t}return i.__extends(t,e),i.__decorate([l.parameter({count:7})],t.prototype,"output",void 0),i.__decorate([l.parameter({count:3})],t.prototype,"cullFace",void 0),i.__decorate([l.parameter()],t.prototype,"slicePlaneEnabled",void 0),i.__decorate([l.parameter()],t.prototype,"sliceHighlightDisabled",void 0),i.__decorate([l.parameter()],t.prototype,"vertexColors",void 0),i.__decorate([l.parameter()],t.prototype,"transparent",void 0),i.__decorate([l.parameter()],t.prototype,"polygonOffset",void 0),i.__decorate([l.parameter()],t.prototype,"writeDepth",void 0),i.__decorate([l.parameter()],t.prototype,"sceneHasOcludees",void 0),t}(l.ShaderTechniqueConfiguration);t.ColorMaterialTechniqueConfiguration=g}).apply(null,i),void 0===r||(e.exports=r)},FU3N:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("qsST"),n("LxLY"),n("dl/g"),n("CIy2")],void 0===(r=(function(e,t,n,i,r,o){var a=n.getLogger("esri.views.3d.webgl-engine.lib.GLMaterialRep"),s=function(){function e(e){this.refCnt=0,this.glMaterial=e}return e.prototype.incRefCnt=function(){++this.refCnt},e.prototype.decRefCnt=function(){--this.refCnt,o.assert(this.refCnt>=0)},e.prototype.getRefCnt=function(){return this.refCnt},e.prototype.getGLMaterial=function(){return this.glMaterial},e}();return function(){function e(e,t,n){this._textureRep=e,this._techniqueRep=t,this.onMaterialChanged=n,this._id2glMaterialRef=new Map}return e.prototype.acquire=function(e,t){this.ownMaterial(e);var n,i=r.getShaderOutputID(e.id,t),o=this._id2glMaterialRef.get(i);return null==o?(n=e.getGLMaterial({material:e,techniqueRep:this._techniqueRep,textureRep:this._textureRep,output:t}),o=new s(n),this._id2glMaterialRef.set(i,o)):n=o.getGLMaterial(),o.incRefCnt(),n},e.prototype.release=function(e,t){var n=r.getShaderOutputID(e.id,t),i=this._id2glMaterialRef.get(n);if(i.decRefCnt(),0===i.getRefCnt()){var o=i.getGLMaterial();o&&o.dispose(),this._id2glMaterialRef.delete(n)}},e.prototype.materialChanged=function(e){for(var t=0,n=r.ShaderOutputTypes;t<n.length;t++){var i=n[t];if(5!==i.output&&6!==i.output){var o=this._id2glMaterialRef.get(r.getShaderOutputID(e.id,i.output));if(o&&o.getGLMaterial()){var a=o.getGLMaterial();a.updateParameters&&a.updateParameters()}}}this.onMaterialChanged&&this.onMaterialChanged(e)},e.prototype.ownMaterial=function(e){i.isSome(e.materialRepository)&&e.materialRepository!==this&&a.error("Material is already owned by a different material repository"),e.materialRepository=this},e}()}).apply(null,i))||(e.exports=r)},FbvD:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("DJpR")],void 0===(r=(function(e,t,n,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.cache=new Map}return e.prototype.dispose=function(){this.cache.forEach((function(e){n.isSome(e.texture)&&(e.texture.dispose(),e.texture=null)})),this.cache.clear()},e.prototype.acquire=function(e){if(n.isNone(e))return null;var t=this.patternId(e),r=this.cache.get(t);if(r)return r.refCount++,r.bind;var o=this.patternToTextureData(e,2),a=o.length/2,s={refCount:1,texture:null,bind:function(e,t){return n.isNone(s.texture)&&(s.texture=new i.Texture(e,{width:o.length,height:1,internalFormat:6406,pixelFormat:6406,dataType:5121,wrapMode:33071},o)),e.bindTexture(s.texture,t),a}};return this.cache.set(t,s),s.bind},e.prototype.release=function(e){if(!n.isNone(e)){var t=this.patternId(e),i=this.cache.get(t);i&&(i.refCount--,0===i.refCount&&(n.isSome(i.texture)&&i.texture.dispose(),this.cache.delete(t)))}},e.prototype.swap=function(e,t){var n=this.acquire(t);return this.release(e),n},e.prototype.bind=function(e,t,i,r,o){var a=n.isSome(r)?r(e,o)*t.pixelRatio:1;i.setUniform1i("stipplePatternTexture",o),i.setUniform1f("stipplePatternPixelSizeInv",1/a)},e.prototype.patternId=function(e){return e.join(",")},e.prototype.patternToTextureData=function(e,t){for(var n=e.reduce((function(e,t){return e+t}))*t,i=new Uint8Array(n),r=!0,o=0,a=0,s=e;a<s.length;a++){for(var l=s[a],c=0;c<l*t;c++)i[o++]=r?255:0;r=!r}return i},e}();t.StippleTextureRepository=r,t.createStipplePattern=function(e){return n.isNone(e)?e:e.slice()},t.createStipplePatternSimple=function(e){return[e,e]}}).apply(null,i))||(e.exports=r)},Fe95:function(e,t,n){var i,r;i=[n.dj.c(e.i),t],void 0===(r=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HANDLE_COLOR=[1,.5,0],t.GEOMETRY_SEGMENTS=128,t.DISC_RADIUS=70,t.DISC_COLLISION_RADIUS=80,t.DISC_HEIGHT=.02,t.DISC_TRANSLATE_ARROW_SIZE=54,t.DISC_TRANSLATE_ARROW_OFFSET=100,t.DISC_RADIUS_SMALL=Math.ceil(t.DISC_RADIUS/3*2),t.RING_RADIUS=160,t.RING_HEIGHT=.5,t.RING_THICKNESS=24,t.INDICATOR_THICKNESS=9,t.INNER_INDICATOR_RADIUS=t.RING_RADIUS+30,t.OUTER_INDICATOR_RADIUS=t.RING_RADIUS+53,t.ROTATE_INDICATOR_ARROW_TIP_LENGTH=60,t.ROTATE_INDICATOR_ARROW_TIP_RADIUS=23,t.ROTATE_INDICATOR_ARC_LENGTH=5*Math.PI/12,t.SCALE_INDICATOR_ARC_LENGTH=1*Math.PI/3,t.DRAG_THRESHOLD_PX=10,t.ROTATE_INDICATOR_ARROW_PLACEMENT_PERCENTAGE=.2,t.SCALE_INDICATOR_OFFSET1=30,t.SCALE_INDICATOR_OFFSET2=53,t.SCALE_INDICATOR_DIRECTION_BUFFER=.2,t.ROTATE_INDICATOR_DIRECTION_BUFFER=.3,t.RING_INDICATOR_DELAY_MS=200,t.RING_RESET_ANIMATION_SPEED_FACTOR=3,t.ALIGN_ARROWS_SCALE_THRESHOLD=1e6}).apply(null,i))||(e.exports=r)},"G+tB":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("PLh7"),n("uinn")],void 0===(r=(function(e,t,n,i,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createVisualElements=function(e){switch(n.unwrap(e.graphic.geometry).type){case"point":return r.createVisualElements(e);case"polygon":case"polyline":return i.createVisualElements(e);default:return null}}}).apply(null,i))||(e.exports=r)},GDWR:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("KY0m")],void 0===(r=(function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._uniforms={proj:[],shadowMapDistance:[],viewportPixelSz:[],lightingMainDirection:[]}}return e.prototype.dispose=function(){this._uniforms=null},e.prototype.getPrograms=function(e){return this._uniforms[e]||[]},e.prototype.subscribeProgram=function(e){for(var t in this._uniforms)e.hasUniform(t)&&this._uniforms[t].push(e)},e.prototype.unsubscribeProgram=function(e){for(var t in this._uniforms)n.removeUnordered(this._uniforms[t],e)},e}();t.CommonUniformStore=i}).apply(null,i))||(e.exports=r)},HbaO:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("O7NG")],void 0===(r=(function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIconElevationOffset=1,t.SUSPEND_RESUME_EXTENT_OPTIMISM=1.2,t.TRANSPARENT_UNIT=n.vec4f64.ZEROS,t.WHITE_UNIT=n.vec4f64.ONES}).apply(null,i))||(e.exports=r)},J2BX:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("pcDC"),n("CIy2")],void 0===(r=(function(e,t,n,i){function r(e,t){for(var n=e,r=new Uint8Array(4*n*n),o=n/2-.5,a=t/2,s=0;s<n;s++)for(var l=0;l<n;l++){var c=l+n*s,u=l-o,p=s-o,d=Math.sqrt(u*u+p*p)-a;i.packFloatRGBA(d=d/e+.5,r,4*c)}return r}function o(e,t){return u(e,t,!1)}function a(e,t){return u(e,t,!0)}function s(e,t){return p(e,t,!1)}function l(e,t){return p(e,t,!0)}function c(e,t){for(var n=new Uint8Array(4*e*e),r=Math.sqrt(1.25),o=(e-t)/2,a=0;a<e;a++)for(var s=0;s<e;s++){var l=a*e+s,c=(s-o)/t,u=(a-o+.75)/t,p=Math.max(-(1*c+-.5*u)/r,(1*(c-1)+-.5*-u)/r,-u)*t/e+.5;i.packFloatRGBA(p,n,4*l)}return n}function u(e,t,n){n&&(t/=Math.SQRT2);for(var r=new Uint8Array(4*e*e),o=0;o<e;o++)for(var a=0;a<e;a++){var s=a-.5*e+.25,l=.5*e-o-.75,c=o*e+a;if(n){var u=(s+l)/Math.SQRT2;l=(l-s)/Math.SQRT2,s=u}var p=Math.max(Math.abs(s),Math.abs(l))-.5*t;i.packFloatRGBA(p=p/e+.5,r,4*c)}return r}function p(e,t,n){n&&(t*=Math.SQRT2);for(var r=.5*t,o=new Uint8Array(4*e*e),a=0;a<e;a++)for(var s=0;s<e;s++){var l=s-.5*e,c=.5*e-a-1,u=a*e+s;if(n){var p=(l+c)/Math.SQRT2;c=(c-l)/Math.SQRT2,l=p}var d=void 0;d=(d=(l=Math.abs(l))>(c=Math.abs(c))?l>r?Math.sqrt((l-r)*(l-r)+c*c):c:c>r?Math.sqrt(l*l+(c-r)*(c-r)):l)/e+.5,i.packFloatRGBA(d,o,4*u)}return o}Object.defineProperty(t,"__esModule",{value:!0}),t.createType=function(e,t,i){switch(e){case"circle":return r(t,i);case"square":return o(t,i);case"cross":return s(t,i);case"x":return l(t,i);case"kite":return a(t,i);case"triangle":return c(t,i);default:return n.neverReached(e),r(t,i)}},t.createCircle=r,t.createSquare=o,t.createKite=a,t.createCross=s,t.createX=l,t.createTriangle=c}).apply(null,i))||(e.exports=r)},JXo2:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("pcDC"),n("BcWh"),n("eIBl"),n("XwIv"),n("LxLY"),n("8MXS"),n("Vx27"),n("0LE5"),n("ZcgO"),n("DtIM"),n("woUR"),n("5T2R"),n("B3XD"),n("1eTA"),n("X5J5"),n("G+tB"),n("YsOV"),n("Fe95"),n("BhkK"),n("dtql"),n("73uV"),n("R4nD"),n("/NuL"),n("JjCO"),n("ys4y"),n("4ziW"),n("bz+r")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x,S,w,O,P,M,C,D,R){Object.defineProperty(t,"__esModule",{value:!0});var E=function(e){function t(t){var n=e.call(this,t)||this;return n._vertexManipulatorMaterial=f.createManipulatorMaterial(m.settings.colorToVec4(m.settings.reshapeManipulators.vertex.color),m.settings.reshapeManipulators.vertex.renderOccludedFlag),n._vertexManipulatorOutlineMaterial=f.createManipulatorOutlineMaterial(m.settings.colorToVec4(m.settings.reshapeManipulators.vertex.outlineColor),m.settings.reshapeManipulators.vertex.renderOccludedFlag),n._vertexManipulatorHoverOutlineMaterial=f.createManipulatorOutlineMaterial(m.settings.colorToVec4(m.settings.reshapeManipulators.vertex.hoverOutlineColor),m.settings.reshapeManipulators.vertex.renderOccludedFlag),n._edgeManipulatorMaterial=f.createManipulatorMaterial(m.settings.colorToVec4(m.settings.reshapeManipulators.edge.color),m.settings.reshapeManipulators.edge.renderOccludedFlag),n._edgeManipulatorOutlineMaterial=f.createManipulatorOutlineMaterial(m.settings.colorToVec4(m.settings.reshapeManipulators.edge.outlineColor),m.settings.reshapeManipulators.edge.renderOccludedFlag),n._selectedManipulatorMaterial=f.createManipulatorMaterial(m.settings.colorToVec4(m.settings.reshapeManipulators.selected.color),m.settings.reshapeManipulators.selected.renderOccludedFlag),n._selectedManipulatorOutlineMaterial=f.createManipulatorOutlineMaterial(m.settings.colorToVec4(m.settings.reshapeManipulators.selected.outlineColor),m.settings.reshapeManipulators.selected.renderOccludedFlag),n._selectedManipulatorHoverOutlineMaterial=f.createManipulatorOutlineMaterial(m.settings.colorToVec4(m.settings.reshapeManipulators.selected.hoverOutlineColor),m.settings.reshapeManipulators.selected.renderOccludedFlag),n._selectedIndex=0,n._vertexManipulatorGeometry=null,n._vertexManipulatorOutlineGeometry=null,n._edgeManipulatorGeometry=null,n._edgeManipulatorOutlineGeometry=null,n._handles=new o,n._manipulatorHandles=new o,n._manipulatorInfos=[],n._reshapeHelper=null,n._graphicMoveManipulation=null,n._moveManipulation=null,n._numGrabbing=0,n._numDragging=0,n._reshapeEventState=0,n._outlineVisualElement=null,n.tool=null,n.outputGeometry=null,n._vertexLaserLineVisualElement=null,n}return n.__extends(t,e),t.prototype.initialize=function(){var e=this,t=new P.GraphicState({graphic:this.graphic});this._graphicState=t,this._handles.add([t.watch("displaying",(function(t){for(var n=0,i=e._manipulatorInfos;n<i.length;n++)i[n].manipulator.available=t})),this.view.trackGraphicState(t)])},t.prototype.destroy=function(){this._clear(),this._handles.destroy()},Object.defineProperty(t.prototype,"inputGeometry",{get:function(){return s.isSome(this._reshapeHelper)?this._reshapeHelper.geometry:null},set:function(e){this._recreateManipulators(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"manipulators",{get:function(){return this.tool.manipulators},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this.tool.view},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphic",{get:function(){return this.tool.graphic},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableZ",{get:function(){return this.tool.enableZ},enumerable:!0,configurable:!0}),t.prototype.removeSelectedVertices=function(){var e=this._manipulatorInfos.filter((function(e){return e.manipulator.selected&&"vertex"===e.handle.type}));this._removeVertices(e)},t.prototype.manipulatorSelectionChanged=function(){this.emit("manipulators-changed")},t.prototype._clear=function(){this._moveManipulation&&this._moveManipulation.destroy(),this._graphicMoveManipulation&&this._graphicMoveManipulation.destroy(),this._manipulatorHandles.removeAll(),this.manipulators.removeAll(),this._manipulatorInfos=[],this._graphicMoveManipulation=null,this._moveManipulation=null,this._reshapeHelper=null,this._numGrabbing=0,this._numDragging=0},t.prototype._recreateManipulators=function(e){if(void 0===e&&(e=this.inputGeometry),this._clear(),!s.isNone(e)){this._reshapeHelper=new L(_.EditGeometry.fromGeometry(e,this.view.viewingMode),e.type);for(var t=d.getGraphicEffectiveElevationInfo(this.graphic),n=0,i=this._reshapeHelper.data.components;n<i.length;n++){for(var r=i[n],o=0,a=r.vertices;o<a.length;o++)this._createPerVertexManipulator(a[o],t);for(var l=0,c=r.edges;l<c.length;l++)this._createPerVertexManipulator(c[l],t)}this._createGraphicMoveManipulators(t)}},t.prototype._perGraphicManipulatorDragAction=function(e,t){if("end"!==t.action){for(var n=[],i=this._manipulatorInfos.some((function(e){return"vertex"===e.handle.type&&e.manipulator.selected})),r=1===e&&i,o=s.unwrap(this._reshapeHelper),a=0,l=this._manipulatorInfos;a<l.length;a++)"vertex"===(d=l[a]).handle.type&&(d.manipulator.grabbing||r&&!d.manipulator.selected||(s.unwrap(o).moveVertices([d.handle],t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ),n.push(d.handle.pos),this._updateManipulatorPosition(d)));if(0!==n.length){for(var c=0,u=0,p=this._manipulatorInfos;u<p.length;u++){var d;"vertex"===(d=p[u]).handle.type&&c++}if(this.outputGeometry=o.geometry,n.length===c){if(this._updateEventState(1),this.destroyed)return;if(this.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,mover:this.graphic}),this.destroyed)return}else{if(this._updateEventState(2),this.destroyed)return;if(this.emit("reshape",{type:"reshape",mover:this.graphic}),this.destroyed)return}}}},t.prototype._perVertexManipulatorDragAction=function(e,t){if(this._updateEventState(2),!this.destroyed){var n=t.mapDeltaX,i=t.mapDeltaY,r=t.mapDeltaZ;if(n||i||r){for(var o=[],a=0,l=this._manipulatorInfos;a<l.length;a++){var c=l[a];T(c)&&(c.manipulator.selected&&!c.manipulator.grabbing||c===e)&&o.push(c)}for(var u=s.unwrap(this._reshapeHelper),p=0,d=o;p<d.length;p++){var h=d[p];u.moveVertices([h.handle],n,i,r)}this.outputGeometry=u.geometry;for(var f=0,v=o;f<v.length;f++)this._updateManipulatorPosition(h=v[f]);this.emit("reshape",{type:"reshape",mover:this.graphic})}}},t.prototype._updateEventState=function(e){if(e===this._reshapeEventState)return!1;switch(e){case 0:if(0!==this._numGrabbing||0!==this._numDragging)return!1;switch(this._reshapeEventState){case 1:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic});break;case 2:this.emit("reshape",{type:"reshape-stop",mover:this.graphic})}break;case 1:switch(this._reshapeEventState){case 0:this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic});break;case 2:this.emit("reshape",{type:"reshape-stop",mover:this.graphic}),this.destroyed||this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic})}break;case 2:switch(this._reshapeEventState){case 0:this.emit("reshape",{type:"reshape-start",mover:this.graphic});break;case 1:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic}),this.destroyed||this.emit("reshape",{type:"reshape-start",mover:this.graphic})}}if(this.destroyed)return!1;var t=this._reshapeEventState!==e;return this._reshapeEventState=e,t},t.prototype._createGraphicMoveManipulators=function(e){var t=this;this._graphicMoveManipulation=new w.MoveXYGraphicManipulation({tool:this.tool,view:this.view,graphicState:this._graphicState}),this._manipulatorHandles.add(this._graphicMoveManipulation.createDragPipeline((function(e,n,i){n.next((function(e){return t._trackNumDragging(e)})).next((function(e){t._perGraphicManipulatorDragAction(0,e)})),i.next(t._cancelDragOperation())}))),this._graphicMoveManipulation.forEachManipulator((function(e){return t._manipulatorHandles.add([t._watchAndUpdateGrabState(e,!1),e.events.on("immediate-click",(function(e){t._manipulatorInfos.some((function(e){return e.manipulator.selected}))?t._clearSelection():t.emit("immediate-click"),e.stopPropagation()}))])})),this._moveManipulation=new x.MoveManipulation({tool:this.tool,view:this.view,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZ&&g.canMoveZ(this.graphic),snapToScene:!1,radius:x.MoveManipulation.radiusForSymbol(this.graphic.symbol)}),this._moveManipulation.forEachManipulator((function(e){t._handles.add([t._watchAndUpdateGrabState(e,!1),e.events.on("immediate-click",(function(n){t._moveManipulation.zManipulation.hasManipulator(e)||t._manipulatorInfos.some((function(e){return e.manipulator.selected}))||t.emit("immediate-click"),n.stopPropagation()}))])})),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};var n=s.unwrap(this.graphic.geometry).spatialReference;this._handles.add([this._moveManipulation.createDragPipeline((function(e,n,i){n.next((function(e){return t._trackNumDragging(e)})).next(R.addMapDelta()).next((function(e){t._perGraphicManipulatorDragAction(1,e)})),i.next(t._cancelDragOperation())}),e,n),l.init(this._graphicState,"displaying",(function(e){t._moveManipulation.xyManipulation.available=e,t._moveManipulation.xyAxisManipulation.available=!0,t._moveManipulation.zManipulation.available=e&&t.enableZ&&g.canMoveZ(t.graphic),t._updateMoveManipulationPosition()})),this._graphicState.on("changed",(function(){return t._updateMoveManipulationPosition()}))]),this._updateMoveManipulationPosition();var i=y.createVisualElements({view:this.view,graphic:this.graphic,forEachManipulator:function(e){if(!t.destroyed){t._graphicMoveManipulation.forEachManipulator(e);for(var n=0,i=t._manipulatorInfos;n<i.length;n++)e(i[n].manipulator,1);t._moveManipulation.forEachManipulator(e)}},onManipulatorsChanged:function(e){return t.on("manipulators-changed",e)}});this._outlineVisualElement=i.visualElement instanceof O.OutlineVisualElement?i.visualElement:null,s.isSome(this._outlineVisualElement)&&this._manipulatorHandles.add([this._outlineVisualElement.events.on("attachment-origin-changed",(function(){t._graphicState.isDraped||t._updateMoveManipulationPosition()})),this._graphicState.watch("isDraped",(function(){return t._updateMoveManipulationPosition()}))]),this._manipulatorHandles.add(i)},t.prototype._createPerVertexManipulator=function(e,t){var n=this;if(void 0===t&&(t=d.getGraphicEffectiveElevationInfo(this.graphic)),s.isNone(this._vertexManipulatorGeometry)||s.isNone(this._vertexManipulatorOutlineGeometry)){var i=m.settings.reshapeManipulators.vertex,r=(l=i.size/2)/(c=l+i.collisionPadding);this._vertexManipulatorGeometry=new C(D.createSphereGeometry(r,16,16),"reshape-manipulator");var o=(l+i.outlineSize)/c;this._vertexManipulatorOutlineGeometry=new C(D.createSphereGeometry(o,16,16),"reshape-manipulator-outline")}if(s.isNone(this._edgeManipulatorGeometry)||s.isNone(this._edgeManipulatorOutlineGeometry)){var l,c,u=m.settings.reshapeManipulators.edge;r=(l=u.size/2)/(c=l+u.collisionPadding),this._edgeManipulatorGeometry=new C(D.createSphereGeometry(r,16,16),"reshape-manipulator"),this._edgeManipulatorOutlineGeometry=new C(D.createSphereGeometry(o=(l+u.outlineSize)/c,16,16),"reshape-manipulator-outline")}var p=new h.Manipulator3D({view:this.view,renderObjects:[{geometry:this._vertexManipulatorGeometry,material:this._vertexManipulatorMaterial,stateMask:4|j.Vertex},{geometry:this._vertexManipulatorOutlineGeometry,material:this._vertexManipulatorOutlineMaterial,stateMask:5|j.Vertex},{geometry:this._vertexManipulatorOutlineGeometry,material:this._vertexManipulatorHoverOutlineMaterial,stateMask:6|j.Vertex},{geometry:this._edgeManipulatorGeometry,material:this._vertexManipulatorMaterial,stateMask:6|j.Edge},{geometry:this._vertexManipulatorOutlineGeometry,material:this._vertexManipulatorHoverOutlineMaterial,stateMask:6|j.Edge},{geometry:this._edgeManipulatorGeometry,material:this._edgeManipulatorMaterial,stateMask:5|j.Edge},{geometry:this._edgeManipulatorOutlineGeometry,material:this._edgeManipulatorOutlineMaterial,stateMask:5|j.Edge},{geometry:this._vertexManipulatorGeometry,material:this._selectedManipulatorMaterial,stateMask:8},{geometry:this._vertexManipulatorOutlineGeometry,material:this._selectedManipulatorOutlineMaterial,stateMask:9},{geometry:this._vertexManipulatorOutlineGeometry,material:this._selectedManipulatorHoverOutlineMaterial,stateMask:10}],elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:!(!this.graphic.visible||!this.graphic.layer.visible)});this._setTypeSpecificManipulatorSettings(p,e,t);var f="edge"===e.type?{manipulator:p,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:p,handle:e,type:"vertex",selectedIndex:0};if(this._manipulatorInfos.push(f),this.manipulators.add(p),this._updateManipulatorPosition(f),"edge"===f.type){var g=this._getManipulatorInfoFromHandle(f.handle.left).manipulator.events.on("location-update",(function(){return n._updateManipulatorPosition(f)})),y=this._getManipulatorInfoFromHandle(f.handle.right).manipulator.events.on("location-update",(function(){return n._updateManipulatorPosition(f)}));f.locationUpdateHandle=a.handlesGroup([g,y]),this._manipulatorHandles.add(f.locationUpdateHandle,p)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(p,!0),p);var _=R.createManipulatorDragEventPipeline(p,(function(e,t,i){t.next((function(e){return n._trackNumDragging(e)})).next((function(e){return I(f)&&n._splitEdgeManipulator(f),e})).next(v.screenToMapXYForGraphicAtLocation(n.view,n.graphic,e.elevationAlignedLocation,e.location.spatialReference)).next(R.addMapDelta()).next((function(e){"vertex"===f.type?n._perVertexManipulatorDragAction(f,e):console.error("drag operation on non-vertex manipulator not allowed")})),i.next(n._cancelDragOperation())}));return this._manipulatorHandles.add(_,p),this._manipulatorHandles.add([p.events.on("immediate-click",(function(e){return n._manipulatorClickCallback(e,f)})),p.events.on("select-changed",(function(){f.selectedIndex=++n._selectedIndex,n._updateMoveManipulationPosition()}))]),this.emit("manipulators-changed"),p},t.prototype._trackNumDragging=function(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e},t.prototype._cancelDragOperation=function(){var e=this,t=s.isSome(this._reshapeHelper)?this._reshapeHelper.geometry.clone():null;return function(){switch(e._numDragging--,e.inputGeometry=t,e.outputGeometry=t,e._reshapeEventState){case 0:break;case 1:e.emit("move",{type:"move",dx:0,dy:0,mover:e.graphic});break;case 2:e.emit("reshape",{type:"reshape",mover:e.graphic})}e.destroyed||e._updateEventState(0)}},t.prototype._setTypeSpecificManipulatorSettings=function(e,t,n){switch(t.type){case"vertex":e.state=j.Vertex,e.selectable=!0,e.cursor="move",e.collisionPriority=2,e.radius=m.settings.reshapeManipulators.vertex.size/2+m.settings.reshapeManipulators.vertex.collisionPadding,e.elevationInfo=n;break;case"edge":e.state=j.Edge,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1,e.radius=m.settings.reshapeManipulators.edge.size/2+m.settings.reshapeManipulators.edge.collisionPadding,e.elevationInfo={mode:"absolute-height",offset:0};break;default:i.neverReached(t)}},t.prototype._watchAndUpdateGrabState=function(e,t){var n=this;return e.events.on("grab-changed",(function(i){if("start"===i.action)t&&n._updateSelection(e),n._numGrabbing++;else if(n._numGrabbing--,n._updateEventState(0),n.destroyed)return;n._moveManipulation.interactive=!n._numGrabbing}))},t.prototype._clearSelection=function(){for(var e=0,t=this._manipulatorInfos;e<t.length;e++){var n=t[e];n.manipulator.grabbing||(n.manipulator.selected=!1)}},t.prototype._updateSelection=function(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.emit("manipulators-changed"))},t.prototype._removeManipulator=function(e){e&&(this._manipulatorHandles.remove(e.manipulator),this._manipulatorInfos.splice(this._manipulatorInfos.indexOf(e),1),this.manipulators.remove(e.manipulator),this.emit("manipulators-changed"))},t.prototype._getManipulatorInfoFromHandle=function(e){if(e)for(var t=0,n=this._manipulatorInfos;t<n.length;t++){var i=n[t];if(e===i.handle)return i}return null},t.prototype._updateManipulatorPosition=function(e){if(e){var t=s.unwrap(this._reshapeHelper);if("vertex"===e.handle.type)e.manipulator.location=t.data.coordinateHelper.toPoint(e.handle.pos,V),e.manipulator.grabbing&&s.isSome(this._vertexLaserLineVisualElement)&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.handle.type){var n=this._getManipulatorInfoFromHandle(e.handle.left).manipulator.elevationAlignedLocation,i=this._getManipulatorInfoFromHandle(e.handle.right).manipulator.elevationAlignedLocation;e.manipulator.elevationAlignedLocation=p.makeDehydratedPoint(n.x+.5*(i.x-n.x),n.y+.5*(i.y-n.y),n.hasZ&&i.hasZ?n.z+.5*(i.z-n.z):void 0,t.geometry.spatialReference)}}},t.prototype._splitEdgeManipulator=function(e){var t=s.unwrap(this._reshapeHelper),n=s.unwrap(t.splitEdge(e.handle,.5).createdVertex);e.locationUpdateHandle.remove(),e.locationUpdateHandle=void 0;var i=e;i.handle=n,i.type="vertex";var r=d.getGraphicEffectiveElevationInfo(this.graphic);this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,r),n.left&&this._createPerVertexManipulator(n.left),n.right&&this._createPerVertexManipulator(n.right),this.outputGeometry=t.geometry,this._updateManipulatorPosition(i),this._updateSelection(e.manipulator);var o=t.data.coordinateHelper.toArray(i.handle.pos),a=t.data.components.indexOf(n.component);this.emit("vertex-add",{type:"vertex-add",vertices:[{coordinates:o,componentIndex:a,vertexIndex:s.unwrap(n.index)}],added:o})},t.prototype._updateMoveManipulationPosition=function(){var e=this,t=M.sv3d.get();u.vec3.set(t,0,0,0);for(var n=0,i=!1,r=null,o=null,a=0,l=this._manipulatorInfos;a<l.length;a++){var c=l[a];T(c)&&(c.manipulator.selected?(n++,u.vec3.add(t,t,c.manipulator.renderLocation),s.isNone(r)||c.selectedIndex>r.selectedIndex?(o=r,r=c):(s.isNone(o)||c.selectedIndex>o.selectedIndex)&&(o=c)):i=!0)}if(this._moveManipulation.xyAxisManipulation.orthogonalAvailable=!0,this._moveManipulation.xyAxisManipulation.available=!0,0!==n){var p=0;if(s.isSome(r)){var d=r.handle.pos,h=s.isSome(o)?o.handle.pos:r.handle.left&&r.handle.left.left?r.handle.left.left.pos:null,v=!s.isSome(o)&&r.handle.right&&r.handle.right.right?r.handle.right.right.pos:null;h&&v?this._moveManipulation.xyAxisManipulation.available=!1:h?p=A(h,d):v&&(p=A(d,v))}this._moveManipulation.xyAxisManipulation.orthogonalAvailable=1!==n,this._moveManipulation.angle=p,this._moveManipulation.radius=b.DISC_RADIUS_SMALL}else this._moveManipulation.angleDeferred=function(){return S.primaryShapeOrientation(s.unwrap(e.graphic.geometry))},this._moveManipulation.radius=x.MoveManipulation.radiusForSymbol(this.graphic.symbol);0!==n&&i?(u.vec3.scale(t,t,1/n),V.spatialReference=s.unwrap(this._reshapeHelper).geometry.spatialReference,this.view.renderCoordsHelper.fromRenderCoords(t,V),this._moveManipulation.elevationAlignedLocation=V):s.isSome(this._outlineVisualElement)&&!this._graphicState.isDraped&&s.isSome(this._outlineVisualElement.attachmentOrigin)?this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin:f.placeAtGraphic(this.view,this._moveManipulation,this.graphic)},t.prototype._removeVertices=function(e){for(var t=[],n=s.unwrap(this._reshapeHelper),i=0,r=e;i<r.length;i++){var o=r[i];if("vertex"===o.handle.type&&n.canRemoveVertex()){t.push(o.handle),this._removeManipulator(o),this._removeManipulator(this._getManipulatorInfoFromHandle(o.handle.left)),this._removeManipulator(this._getManipulatorInfoFromHandle(o.handle.right));var a=s.unwrap(n.removeVertices([o.handle]).removedVertices[0].createdEdge);a&&this._createPerVertexManipulator(a)}}if(t.length>0){var l=t.map((function(e){var t=n.data.components.indexOf(e.component);return{coordinates:n.data.coordinateHelper.toArray(e.pos),componentIndex:t,vertexIndex:s.unwrap(e.index)}}));this.outputGeometry=n.geometry;var c=this._updateEventState(2);if(this.destroyed)return;if(this.emit("vertex-remove",{type:"vertex-remove",removed:l.map((function(e){return e.coordinates})),vertices:l}),this.destroyed)return;if(c&&(this._updateEventState(0),this.destroyed))return;this._updateMoveManipulationPosition()}},t.prototype._manipulatorClickCallback=function(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.handle.type&&(t.manipulator.selected=!t.manipulator.selected),"vertex"===t.handle.type&&2===e.button&&this._removeVertices([t]),I(t)&&0===e.button&&this._splitEdgeManipulator(t),e.stopPropagation()},n.__decorate([c.property({constructOnly:!0})],t.prototype,"tool",void 0),n.__decorate([c.property()],t.prototype,"inputGeometry",null),n.__decorate([c.property()],t.prototype,"outputGeometry",void 0),n.__decorate([c.subclass("esri.views.3d.interactive.editingTools.graphicReshape3D.ReshapeOperation")],t)}(r.EventedAccessor);function A(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function T(e){return"vertex"===e.handle.type}function I(e){return"edge"===e.handle.type}t.ReshapeOperation=E;var j,V=p.makeDehydratedPoint(0,0,null,null);!function(e){e.Vertex=16,e.Edge=32}(j||(j={}));var L=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.type=n,i._geometry=null,i}return n.__extends(t,e),Object.defineProperty(t.prototype,"geometry",{get:function(){if(this._dirty){switch(this.type){case"polyline":this._geometry=this.data.toPolyline();break;case"polygon":this._geometry=this.data.toPolygon()}this._dirty=!1}return this._geometry},enumerable:!0,configurable:!0}),t}(_.EditGeometryHelper);t.ReshapeGeometryHelper=L}).apply(null,i))||(e.exports=r)},KPBO:function(e,t,n){var i,r;i=[n.dj.c(e.i),t],void 0===(r=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dotProduct=function(e,t){for(var n=0,i=0;i<e.length;i++)n+=e[i]*t[i];return n},t.elementwiseProduct=function(e,t,n){(n=n||e).length=e.length;for(var i=0;i<e.length;i++)n[i]=e[i]*t[i];return n},t.scalarProduct=function(e,t,n){(n=n||e).length=e.length;for(var i=0;i<e.length;i++)n[i]=e[i]*t;return n},t.add=function(e,t,n){(n=n||e).length=e.length;for(var i=0;i<e.length;i++)n[i]=e[i]+t[i];return n}}).apply(null,i))||(e.exports=r)},KQg4:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("0W55"),n("7Aei"),n("aExC")],void 0===(r=(function(e,t,n,i,r,o){var a;Object.defineProperty(t,"__esModule",{value:!0}),t.build=function(){var e=new o.ShaderBuilder;return e.include(i.ScreenSpacePass),e.fragment.uniforms.add("tex","sampler2D"),e.fragment.uniforms.add("color","vec4"),e.fragment.code.add(r.glsl(a||(a=n.__makeTemplateObject(["\n void main() {\n vec4 texColor = texture2D(tex, uv);\n gl_FragColor = texColor * color;\n }\n "],["\n void main() {\n vec4 texColor = texture2D(tex, uv);\n gl_FragColor = texColor * color;\n }\n "])))),e}}).apply(null,i))||(e.exports=r)},Kvb2:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("woUR")],void 0===(r=(function(e,t,n,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.grabbingState=0,this.zManipulator=null,this.firstSelected=null,this.numSelected=0,this.firstGrabbedXY=null}return e.prototype.update=function(e){var t=this;this.grabbingState=0,this.zManipulator=null,this.numSelected=0,this.firstSelected=null,this.firstGrabbedXY=null,e.forEachManipulator((function(e,r){if(0===r&&(t.zManipulator=e),e instanceof i.Manipulator3D&&(e.selected&&(0===t.numSelected&&(t.firstSelected=e),t.numSelected++),n.isNone(t.firstGrabbedXY)&&e.grabbing&&1===r&&(t.firstGrabbedXY=e)),e.grabbing)switch(t.grabbingState|=1,r){case 0:t.grabbingState|=2;break;case 1:t.grabbingState|=4}}))},e}();t.ManipulatorState=r}).apply(null,i))||(e.exports=r)},KwnQ:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("z4cv")],void 0===(r=(function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mat2f64=n}).apply(null,i))||(e.exports=r)},LZD4:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("2B1V"),n("CIy2"),n("ILj8")],void 0===(r=(function(e,t,n,i,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PositionLayout=n.newLayout().vec3f(i.VertexAttrConstants.POSITION),t.PositionUVLayout=n.newLayout().vec3f(i.VertexAttrConstants.POSITION).vec2f(i.VertexAttrConstants.UV0),t.PositionColorLayout=n.newLayout().vec3f(i.VertexAttrConstants.POSITION).vec4u8(i.VertexAttrConstants.COLOR);var o=function(){function e(e){this.vertexBufferLayout=e}return e.prototype.allocate=function(e){return this.vertexBufferLayout.createBuffer(e)},e.prototype.elementCount=function(e){return e.indices[i.VertexAttrConstants.POSITION].length},e.prototype.write=function(e,t,n,i){r.writeDefaultAttributes(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,n,i)},e}();t.DefaultBufferWriter=o}).apply(null,i))||(e.exports=r)},MCHn:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("0LE5"),n("Rdxj"),n("aWgr"),n("hX2R"),n("qSzK")],void 0===(r=(function(e,t,n,i,r,o,a,s){Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e){this.view=null,this._angleCutoff=s.defaultAngleCutoff,this._style={},this._heightManifoldTarget=r.vec3f64.create(),this._heightManifoldEnabled=!1,this._intersectsLine=o.lineSegment.create(),this._intersectsLineEnabled=!1,this._intersectsLineInfinite=!1,this._pathVerticalPlaneBuffers=null;var t=!0;for(var n in e)n in this?"attached"===n?t=e[n]:this[n]=e[n]:console.error("Cannot set unknown property",n);this.attached=t}return e.prototype.destroy=function(){this.disposeRenderer()},Object.defineProperty(e.prototype,"attached",{get:function(){return!!this.renderer},set:function(e){e?this.ensureRenderer():this.disposeRenderer()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angleCutoff",{get:function(){return this._angleCutoff},set:function(e){this._angleCutoff!==e&&(this._angleCutoff=e,this.syncAngleCutoff())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},set:function(e){this._style=e,this.syncStyle()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"heightManifoldTarget",{get:function(){return this._heightManifoldEnabled?this._heightManifoldTarget:null},set:function(e){n.isSome(e)?(i.vec3.copy(this._heightManifoldTarget,e),this._heightManifoldEnabled=!0):this._heightManifoldEnabled=!1,this.syncRenderer(),this.syncHeightManifold()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intersectsWorldUpAtLocation",{set:function(e){if(n.isNone(e))this.intersectsLine=null;else{var t=this.view.renderCoordsHelper.worldUpAtPosition(e,c);this.intersectsLine=o.lineSegment.fromValues(e,t),this.intersectsLineInfinite=!0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intersectsLine",{get:function(){return this._intersectsLineEnabled?this._intersectsLine:null},set:function(e){n.isSome(e)?(o.lineSegment.copy(e,this._intersectsLine),this._intersectsLineEnabled=!0):this._intersectsLineEnabled=!1,this.syncIntersectsLine(),this.syncRenderer()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intersectsLineInfinite",{get:function(){return this._intersectsLineInfinite},set:function(e){this._intersectsLineInfinite=e,this.syncIntersectsLineInfinite()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathVerticalPlane",{get:function(){return this._pathVerticalPlaneBuffers},set:function(e){this._pathVerticalPlaneBuffers=e,this.syncPathVerticalPlane(),this.syncRenderer()},enumerable:!0,configurable:!0}),e.prototype.syncRenderer=function(){this.attached&&(this._intersectsLineEnabled||this._heightManifoldEnabled||n.isSome(this._pathVerticalPlaneBuffers))?this.ensureRenderer():this.disposeRenderer()},e.prototype.ensureRenderer=function(){n.isSome(this.renderer)||(this.renderer=new a.LaserLineRenderer(this.view.renderCoordsHelper,void 0,{contrastControlEnabled:!0}),this.syncStyle(),this.syncHeightManifold(),this.syncIntersectsLine(),this.syncIntersectsLineInfinite(),this.syncPathVerticalPlane(),this.syncAngleCutoff(),this.view._stage&&this.view._stage.addRenderPlugin(this.renderer.renderSlots,this.renderer))},e.prototype.syncStyle=function(){n.isNone(this.renderer)||(this.renderer.setParameterValues(this._style),null!=this._style.intersectsLineRadius&&(this.renderer.intersectsLineRadius=this._style.intersectsLineRadius))},e.prototype.syncAngleCutoff=function(){n.isNone(this.renderer)||this.renderer.setParameterValues({angleCutoff:this._angleCutoff})},e.prototype.syncHeightManifold=function(){n.isNone(this.renderer)||(this.renderer.heightManifoldEnabled=this._heightManifoldEnabled,this._heightManifoldEnabled&&(this.renderer.heightManifoldTarget=this._heightManifoldTarget))},e.prototype.syncIntersectsLine=function(){n.isNone(this.renderer)||(this.renderer.intersectsLineEnabled=this._intersectsLineEnabled,this._intersectsLineEnabled&&(this.renderer.intersectsLineSegment=this._intersectsLine))},e.prototype.syncIntersectsLineInfinite=function(){n.isNone(this.renderer)||(this.renderer.intersectsLineInfinite=this._intersectsLineInfinite)},e.prototype.syncPathVerticalPlane=function(){n.isNone(this.renderer)||(this.renderer.pathVerticalPlaneEnabled=n.isSome(this._pathVerticalPlaneBuffers),n.isSome(this._pathVerticalPlaneBuffers)&&(this.renderer.pathVerticalPlaneBuffers=this._pathVerticalPlaneBuffers))},e.prototype.disposeRenderer=function(){n.isSome(this.renderer)&&this.view._stage&&(this.view._stage.removeRenderPlugin(this.renderer),this.renderer=null)},e}();t.LaserlineVisualElement=l;var c=r.vec3f64.create()}).apply(null,i))||(e.exports=r)},N78w:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("Gtr7"),n("BcWh"),n("qsST"),n("LxLY"),n("jBNx"),n("Vx27"),n("W9tT"),n("0LE5"),n("Rdxj"),n("vtMp"),n("DtIM"),n("dXKx"),n("5ldw"),n("NbdF")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g){Object.defineProperty(t,"__esModule",{value:!0});var m=o.getLogger("esri.views.interactive.GraphicManipulator"),y=function(e){function t(t){var n=e.call(this,t)||this;return n.layer=null,n.interactive=!0,n.selectable=!1,n.grabbable=!0,n.dragging=!1,n.cursor=null,n.events=new r.EventEmitter,n._circleCollisionCache=null,n._graphicSymbolChangedHandle=null,n._originalSymbol=null,n}return n.__extends(t,e),Object.defineProperty(t.prototype,"graphic",{set:function(e){"mesh"!==a.get(e.geometry,"type")?(this._circleCollisionCache=null,this._originalSymbol=e.symbol,this._set("graphic",e),this.attachSymbolChanged()):m.error("Mesh geometries are not supported")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"elevationInfo",{get:function(){var e="elevationInfo"in this.graphic.layer&&this.graphic.layer.elevationInfo,t=h.getGraphicEffectiveElevationMode(this.graphic);return new v({mode:t,offset:e?e.offset:0})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"focusedSymbol",{set:function(e){e!==this._get("focusedSymbol")&&(this._set("focusedSymbol",e),this._updateGraphicSymbol(),this._circleCollisionCache=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"grabbing",{set:function(e){e!==this._get("grabbing")&&(this._set("grabbing",e),this._updateGraphicSymbol())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hovering",{set:function(e){e!==this._get("hovering")&&(this._set("hovering",e),this._updateGraphicSymbol())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{set:function(e){e!==this._get("selected")&&(this._set("selected",e),this._updateGraphicSymbol(),this.events.emit("select-changed",{action:e?"select":"deselect"}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_focused",{get:function(){return this._get("hovering")||this._get("grabbing")},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.detachSymbolChanged(),this._resetGraphicSymbol(),this._set("view",null)},t.prototype.intersectionDistance=function(e){var t=this._get("graphic");if(!1===t.visible)return null;var n=this._get("focusedSymbol"),i=a.isSome(n)?n:t.symbol,r=t.geometry;if(a.isNone(r))return null;var o=this._get("view");return"2d"===o.type?this._intersectDistance2D(e,o,r,i):this._intersectDistance3D(e,o,t)},t.prototype.attach=function(){this.attachSymbolChanged(),a.isSome(this.layer)&&this.layer.add(this.graphic)},t.prototype.detach=function(){this.detachSymbolChanged(),this._resetGraphicSymbol(),a.isSome(this.layer)&&this.layer.remove(this.graphic)},t.prototype.attachSymbolChanged=function(){var e=this;this.detachSymbolChanged(),this._graphicSymbolChangedHandle=this.graphic.watch("symbol",(function(t){a.isSome(t)&&t!==e.focusedSymbol&&t!==e._originalSymbol&&(e._originalSymbol=t,e._focused&&a.isSome(e.focusedSymbol)&&(e.graphic.symbol=e.focusedSymbol))}),!0)},t.prototype.detachSymbolChanged=function(){a.isSome(this._graphicSymbolChangedHandle)&&(this._graphicSymbolChangedHandle.remove(),this._graphicSymbolChangedHandle=null)},t.prototype._updateGraphicSymbol=function(){this.graphic.symbol=this._focused&&a.isSome(this.focusedSymbol)?this.focusedSymbol:this._originalSymbol},t.prototype._resetGraphicSymbol=function(){this.graphic.symbol=this._originalSymbol},t.prototype._intersectDistance2D=function(e,t,n,i){if(i=i||f.getDefaultSymbol2D(n),a.isNone(i))return null;var r=this._circleCollisionCache;if("point"!==n.type||"simple-marker"!==i.type){var o=g.intersectsDrapedGeometry(e,n,t);return a.isSome(o)?1:null}if(a.isNone(r)||!r.originalPoint.equals(n)){var l=n,u=t.spatialReference;d.canProject(l,u)&&(o=d.project(l,u),r={originalPoint:l.clone(),mapPoint:o,radiusPx:s.pt2px(i.size)},this._circleCollisionCache=r)}if(a.isSome(r)){var p=s.screenPointObjectToArray(e,b),h=t.state.toScreen(x,r.mapPoint.x,r.mapPoint.y),v=r.radiusPx;return c.vec2.squaredDistance(p,h)<v*v?1:null}return null},t.prototype._intersectDistance3D=function(e,t,n){var i=t.toMap(e,{include:[n]});if(!i)return null;var r=_;return t.renderCoordsHelper.toRenderCoords(i,r)?u.vec3.distance(r,t.state.camera.eye):null},n.__decorate([l.property({constructOnly:!0,nonNullable:!0})],t.prototype,"graphic",null),n.__decorate([l.property({readOnly:!0,dependsOn:["graphic"]})],t.prototype,"elevationInfo",null),n.__decorate([l.property({constructOnly:!0,nonNullable:!0})],t.prototype,"view",void 0),n.__decorate([l.property({value:null})],t.prototype,"focusedSymbol",null),n.__decorate([l.property({constructOnly:!0})],t.prototype,"layer",void 0),n.__decorate([l.property()],t.prototype,"interactive",void 0),n.__decorate([l.property()],t.prototype,"selectable",void 0),n.__decorate([l.property()],t.prototype,"grabbable",void 0),n.__decorate([l.property({value:!1})],t.prototype,"grabbing",null),n.__decorate([l.property()],t.prototype,"dragging",void 0),n.__decorate([l.property()],t.prototype,"hovering",null),n.__decorate([l.property({value:!1})],t.prototype,"selected",null),n.__decorate([l.property()],t.prototype,"cursor",void 0),n.__decorate([l.subclass("esri.views.interactive.GraphicManipulator")],t)}(i);t.GraphicManipulator=y;var _=p.vec3f64.create(),b=s.createScreenPointArray(),x=s.createScreenPointArray()}).apply(null,i))||(e.exports=r)},NbdF:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("TMur"),n("LxLY"),n("8uEs"),n("/E+R")],void 0===(r=(function(e,t,n,i,r,o){function a(e,t,i,o){var a;if(void 0===o&&(o=new n.Extent),"2d"===i.type)a=t*i.resolution;else if("3d"===i.type){var s=i.basemapTerrain,l=s.overlayManager,c=l?l.overlayPixelSizeInMapUnits(e):1;a=s&&!s.spatialReference.equals(i.spatialReference)?r.getMetersPerUnitForSR(s.spatialReference)/r.getMetersPerUnitForSR(i.spatialReference):t*c}var u=e.x-a,p=e.y-a,d=e.x+a,h=e.y+a,f=i.spatialReference;return o.xmin=Math.min(u,d),o.ymin=Math.min(p,h),o.xmax=Math.max(u,d),o.ymax=Math.max(p,h),o.spatialReference=f,o}Object.defineProperty(t,"__esModule",{value:!0}),t.createQueryGeometry=a,t.intersectsDrapedGeometry=function(e,t,n){var r=n.toMap(e);return i.isNone(r)?null:a(r,o.calculateTolerance(),n,s).intersects(t)?r:null};var s=new n.Extent}).apply(null,i))||(e.exports=r)},NiJV:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("fese"),n("3kdR"),n("7Aei"),n("aExC")],void 0===(r=(function(e,t,n,i,r,o,a){var s,l;Object.defineProperty(t,"__esModule",{value:!0}),t.build=function(e){var t=new a.ShaderBuilder;return t.include(r.Transform,{linearDepth:!1}),t.vertex.uniforms.add("proj","mat4").add("view","mat4").add("viewNormal","mat4"),t.fragment.uniforms.add("color","vec4").add("shadedColor","vec4").add("shadingDirection","vec3"),t.attributes.add("position","vec3"),t.attributes.add("normal","vec3"),t.varyings.add("vWorldPosition","vec3"),t.varyings.add("vViewNormal","vec3"),t.varyings.add("vViewDirection","vec3"),t.vertex.code.add(o.glsl(s||(s=n.__makeTemplateObject(["\n void main(void) {\n vWorldPosition = position;\n\n vec3 worldNormal = normal;\n vViewNormal = (viewNormal * vec4(worldNormal, 1)).xyz;\n\n gl_Position = transformPosition(proj, view, vWorldPosition);\n }\n "],["\n void main(void) {\n vWorldPosition = position;\n\n vec3 worldNormal = normal;\n vViewNormal = (viewNormal * vec4(worldNormal, 1)).xyz;\n\n gl_Position = transformPosition(proj, view, vWorldPosition);\n }\n "])))),t.include(i.Slice,e),t.fragment.code.add(o.glsl(l||(l=n.__makeTemplateObject(["\n void main() {\n discardBySlice(vWorldPosition);\n\n vec3 viewNormalNorm = normalize(vViewNormal);\n\n float shadingFactor = 1.0 - clamp(-dot(viewNormalNorm, shadingDirection), 0.0, 1.0);\n vec4 colorWithShading = mix(color, shadedColor, shadingFactor);\n\n gl_FragColor = highlightSlice(colorWithShading, vWorldPosition);\n }\n "],["\n void main() {\n discardBySlice(vWorldPosition);\n\n vec3 viewNormalNorm = normalize(vViewNormal);\n\n float shadingFactor = 1.0 - clamp(-dot(viewNormalNorm, shadingDirection), 0.0, 1.0);\n vec4 colorWithShading = mix(color, shadedColor, shadingFactor);\n\n gl_FragColor = highlightSlice(colorWithShading, vWorldPosition);\n }\n "])))),t}}).apply(null,i))||(e.exports=r)},PLh7:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("XwIv"),n("xoE+"),n("LxLY"),n("0LE5"),n("Rdxj"),n("DtIM"),n("woUR"),n("Kvb2"),n("X5J5"),n("MCHn"),n("PXiz"),n("R4nD"),n("/NuL")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f){function v(e){return r.isSome(e.geometry)&&("polygon"===e.geometry.type||"polyline"===e.geometry.type)}Object.defineProperty(t,"__esModule",{value:!0}),t.createVisualElements=function(e){var t=e.view,a=e.graphic,m=new f.GraphicState({graphic:a}),y=[],_=function(e,t,i){var r=e.graphic,o=new h.OutlineVisualElement({view:e.view,geometry:v(r)?r.geometry:null,elevationInfo:s.getGraphicEffectiveElevationInfo(r),attached:!1});u.settings.visualElements.lineGraphics.shadowStyle.apply(o);var a=function(){o.attached=t.displaying};return u.settings.visualElements.lineGraphics.outline.apply(o),i.push(t.watch("displaying",a),t.watch("isDraped",(function(e){return o.isDraped=e})),t.on("changed",(function(){return o.geometry=v(r)?r.geometry:null})),n.destroyHandle(o)),a(),o}(e,m,y);return function(e,t,a,h){var f=e.graphic,m=e.view,y=s.getGraphicEffectiveElevationInfo(f),_="on-the-ground"===y.mode||!y.offset&&"absolute-height"!==y.mode,b=new c.ManipulatorState,x=new d.LineVisualElement({view:m,infinite:u.settings.visualElements.zVerticalLine.infiniteType,attached:!1});u.settings.visualElements.pointGraphics.shadowStyle.apply(x);var S=i.deg2rad(u.settings.visualElements.heightPlaneAngleCutoff),w=new p.LaserlineVisualElement({view:m,attached:!1,angleCutoff:S});u.settings.visualElements.heightPlane.apply(w);var O=1,P=1,M=function(){if(b.update(e),!a.displaying||_&&(a.isDraped||!v(f)||!f.geometry.hasZ))return t.laserlineEnabled=!1,x.attached=!1,void(w.attached=!1);t.laserlineEnabled=!0;var n=4&b.grabbingState?u.settings.visualElements.laserlineAlphaMultiplier:1;n!==O&&(O=n,u.settings.visualElements.lineGraphics.shadowStyle.apply(t,n),u.settings.visualElements.pointGraphics.shadowStyle.apply(x,n));var i=2&b.grabbingState?u.settings.visualElements.laserlineAlphaMultiplier:1;i!==P&&(P=i,u.settings.visualElements.heightPlane.apply(w,i)),function(e,t){var n=1===t.numSelected?t.firstSelected:t.numSelected>1&&r.isSome(t.firstGrabbedXY)?t.firstGrabbedXY:null;r.isSome(n)?(u.settings.visualElements.zVerticalLine.infinite&&(e.worldDownAtLocation=n.renderLocation),e.attached=!0):e.attached=!1}(x,b),function(e,t,n,i){if(i.numSelected>0){o.vec3.set(g,0,0,0);var a=0;e.forEachManipulator((function(e,t){1===t&&e.selected&&e instanceof l.Manipulator3D&&(o.vec3.add(g,g,e.renderLocation),a++)})),a>0?(n.heightManifoldTarget=o.vec3.scale(g,g,1/a),n.attached=!0):n.attached=!1}else{var s=t.attachmentOrigin;r.isSome(s)&&e.view.renderCoordsHelper.toRenderCoords(s,g)?(n.heightManifoldTarget=g,n.attached=!0):n.attached=!1}}(e,t,w,b)};u.settings.visualElements.zVerticalLine.apply(x),h.push(a.on("changed",M),a.watch("displaying",M),t.events.on("attachment-origin-changed",M),n.destroyHandle(x),n.destroyHandle(w));var C=[],D=function(){n.handlesGroup(C).remove(),C.length=0,e.forEachManipulator((function(e){return C.push(e.events.on("grab-changed",M))})),e.forEachManipulator((function(e){return C.push(e.events.on("select-changed",M))})),M()};D(),h.push(e.onManipulatorsChanged(D),n.refHandle((function(){return n.handlesGroup(C)})))}(e,_,m,y),y.push(t.maskOccludee(a)),y.push(t.trackGraphicState(m)),{visualElement:_,remove:function(){n.handlesGroup(y).remove()}}};var g=a.vec3f64.create()}).apply(null,i))||(e.exports=r)},PXiz:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("1m5D"),n("0LE5"),n("Rdxj"),n("2fXB"),n("j2SP"),n("MCHn"),n("2W+Z"),n("aWgr"),n("fXZm"),n("ys4y"),n("4ziW"),n("RC9r"),n("SNs2")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v){Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e){var t=this;this.view=null,this._ray=u.ray.create(),this._isWorldDown=!1,this._start=o.vec3f64.create(),this._end=o.vec3f64.fromValues(1,0,0),this._width=1,this._color=s.vec4f32.fromValues(1,0,1,1),this._innerWidth=1,this._innerColor=s.vec4f32.fromValues(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._falloff=0,this._infinite=0,this._laserlineStyle=null,this._laserlineEnabled=!1,this._occludedMode=4,this.resources=new c.VisualElementResources({view:e.view,cameraChanged:function(){return t.updateGeometry()},createResources:function(e){return t.createResources(e)}}),this._laserline=new l.LaserlineVisualElement({view:e.view});var n=!0;for(var i in e)i in this?"attached"===i?n=e[i]:this[i]=e[i]:console.error("Cannot set unknown property",i);this.attached=n}return e.prototype.destroy=function(){this.resources.destroy(),this._laserline.destroy()},Object.defineProperty(e.prototype,"laserlineAttached",{get:function(){return this.attached&&!this.hidden&&this._laserlineEnabled&&n.isSome(this._laserlineStyle)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hidden",{get:function(){return this.resources.hidden},set:function(e){this.resources.hidden=e,this._laserline.attached=this.laserlineAttached},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attached",{get:function(){return this.resources.attached},set:function(e){this.resources.attached=e,this._laserline.attached=this.laserlineAttached},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"worldDownAtLocation",{set:function(e){this._isWorldDown=!0,r.vec3.copy(this._start,e),this.view.renderCoordsHelper.worldUpAtPosition(e,this._end),r.vec3.subtract(this._end,e,this._end),u.ray.fromPoints(this._start,this._end,this._ray),this.updateGeometry()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._start},set:function(e){this._isWorldDown=!1,r.vec3.exactEquals(this._start,e)||(r.vec3.copy(this._start,e),u.ray.fromPoints(this._start,this._end,this._ray),this.updateGeometry())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},set:function(e){this._isWorldDown=!1,r.vec3.exactEquals(this._end,e)||(r.vec3.copy(this._end,e),u.ray.fromPoints(this._start,this._end,this._ray),this.updateGeometry())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(e){e!==this._width&&(this._width=e,this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){a.vec4.exactEquals(e,this._color)||(a.vec4.copy(this._color,e),this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerWidth",{get:function(){return this._innerWidth},set:function(e){e!==this._innerWidth&&(this._innerWidth=e,this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerColor",{get:function(){return this._innerColor},set:function(e){a.vec4.exactEquals(e,this._innerColor)||(a.vec4.copy(this._innerColor,e),this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stipplePattern",{get:function(){return this._stipplePattern},set:function(e){var t=n.isSome(e)!==n.isSome(this._stipplePattern);this._stipplePattern=e,t?this.resources.recreate():this.updateMaterial()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stippleOffColor",{get:function(){return this._stippleOffColor},set:function(e){(n.isNone(e)||n.isNone(this._stippleOffColor)||!a.vec4.exactEquals(e,this._stippleOffColor))&&(this._stippleOffColor=n.isSome(e)?s.vec4f32.clone(e):null,this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"falloff",{get:function(){return this._falloff},set:function(e){e!==this._falloff&&(this._falloff=e,this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"infinite",{get:function(){return this._infinite},set:function(e){e!==this._infinite&&(this._infinite=e,this.updateGeometry())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"laserlineStyle",{get:function(){return this._laserlineStyle},set:function(e){this._laserlineStyle=e,this._laserline.attached=this.laserlineAttached,n.isSome(e)&&(this._laserline.style=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"laserlineEnabled",{get:function(){return this._laserlineEnabled},set:function(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this.laserlineAttached)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"occludedMode",{get:function(){return this._occludedMode},set:function(e){e!==this._occludedMode&&(this._occludedMode=e,n.isSome(this.resources.resources)&&(this.resources.resources.material.renderOccluded=e))},enumerable:!0,configurable:!0}),e.prototype.updateMaterial=function(){var e=this.resources.resources;n.isNone(e)||e.material.setParameterValues(this.materialParameters)},Object.defineProperty(e.prototype,"materialParameters",{get:function(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,innerWidth:this._innerWidth,innerColor:this._innerColor,falloff:this._falloff}},enumerable:!0,configurable:!0}),e.prototype.updateGeometry=function(){var e=this.resources.object;n.isNone(e)||this.updateVertices(e)},e.prototype.updateVertices=function(e){if(this._infinite){var t=this.view.state.camera;switch(p.fromRay(this._ray,m),this._infinite){case 2:m.c0=-Number.MAX_VALUE;break;case 1:case 3:var n=this._ray.origin,i=this.view.elevationProvider.getElevation(n[0],n[1],n[2],this.view.renderCoordsHelper.spatialReference,"ground"),o=this.view.renderCoordsHelper.getAltitude(n);this._isWorldDown&&o<i&&r.vec3.negate(m.ray.direction,m.ray.direction),3===this._infinite&&null!=i&&(m.c1=Math.abs(o-i))}if(!u.frustum.intersectClipRay(t.frustum.planes,m))return void this.updateVertexAttributes(e,this._start,this._end);var a=p.getStart(m,y),s=p.getEnd(m,_);this.updateVertexAttributes(e,a,s),this._laserline.intersectsLine=u.lineSegment.fromPoints(a,s,b)}else this.updateVertexAttributes(e,this._start,this._end),this._laserline.intersectsLine=u.lineSegment.fromPoints(this._start,this._end,b)},e.prototype.updateVertexAttributes=function(e,t,n){var i=e.geometryRecords[0].geometry.data.getVertexAttr()[v.RibbonVertexAttributeConstants.POSITION].data;i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=n[0],i[4]=n[1],i[5]=n[2],e.geometryVertexAttrsUpdated(0)},e.prototype.createResources=function(e){var t=[o.vec3f64.create(),o.vec3f64.create()],n=new d(h.createPolylineGeometry(t),"lineVisualElement"),r=new f(this.materialParameters,"lineVisualElement");return r.renderOccluded=this._occludedMode,e.addGeometry(n,r,i.mat4f64.IDENTITY),this.updateVertices(e),{material:r,geometry:n,forEach:function(e){return e(r),e(n)}}},e}();t.LineVisualElement=g;var m=p.create(),y=o.vec3f64.create(),_=o.vec3f64.create(),b=u.lineSegment.create()}).apply(null,i))||(e.exports=r)},Px2u:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("Gtr7"),n("R2Zq"),n("LxLY"),n("KBgh"),n("Vx27"),n("FNtW"),n("znI2")],r=(function(e,t,n,i,r,o,a,s,l,c){Object.defineProperty(t,"__esModule",{value:!0});var u=function(){},p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._pendingAddsRemoves=new Map,t._adds=new a,t._removes=new a,t._updates=new a({allocator:function(e){return e||new u},deallocator:function(e){return e.renderGeometry=null,e}}),t._materialRenderers=new Map,t._sortedMaterialRenderers=new a,t._hasHighlights=!1,t._hasWater=!1,t}return n.__extends(t,e),t.prototype.dispose=function(){this._adds.prune(),this._removes.prune(),this._updates.prune(),this._materialRenderers&&(this._materialRenderers.forEach((function(e){return e.dispose()})),this._materialRenderers.clear(),this._sortedMaterialRenderers.clear())},Object.defineProperty(t.prototype,"updating",{get:function(){return this._pendingAddsRemoves.size>0||this._updates.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasHighlights",{get:function(){return this._hasHighlights},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasWater",{get:function(){return this._hasWater},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rendersOccluded",{get:function(){return r.someMap(this._materialRenderers,(function(e){return e.rendersOccluded}))},enumerable:!0,configurable:!0}),t.prototype.stopAnimationsAtTime=function(e){this._sortedMaterialRenderers.forEach((function(t){return o.applySome(t.material.animation,(function(t){return t.stopAtTime(e)}))}))},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.updating&&0===this._materialRenderers.size},enumerable:!0,configurable:!0}),t.prototype.commitChanges=function(){var e=this,t=!1;if(!this.updating)return!1;this.updateAddsRemoves();var n=c.splitRenderGeometryChangeSetByMaterial({numToAdd:this._adds.length,toAdd:this._adds.data,numToRemove:this._removes.length,toRemove:this._removes.data,numToUpdate:this._updates.length,toUpdate:this._updates.data}),i=!1,o=!1;return n.forEach((function(n,r){var a=e._materialRenderers.get(r);if(!a&&n.toAdd.length>0&&(a=r.createRenderer(e.rctx,e.materialRepository),e._materialRenderers.set(r,a),t=!0,i=!0,o=!0),a){var s=i||a.hasHighlights,l=o||a.hasWater;a.modify(n),i=i||s!==a.hasHighlights,o=o||l!==a.hasWater,a.isEmpty&&(e._materialRenderers.delete(r),a.dispose(),t=!0)}})),this._adds.clear(),this._removes.clear(),this._updates.clear(),this._pendingAddsRemoves.clear(),t&&this.updateSortedMaterialRenderers(),i&&(this._hasHighlights=r.someMap(this._materialRenderers,(function(e){return e.hasHighlights}))),o&&(this._hasWater=r.someMap(this._materialRenderers,(function(e){return e.hasWater}))),this.notifyChange("updating"),!0},t.prototype.add=function(e){for(var t=0===this._pendingAddsRemoves.size,n=0,i=e;n<i.length;n++)this._pendingAddsRemoves.set(i[n],0);t&&this._pendingAddsRemoves.size>0&&this.notifyChange("updating")},t.prototype.remove=function(e){for(var t=0===this._pendingAddsRemoves.size,n=0,i=e;n<i.length;n++){var r=i[n],o=this._pendingAddsRemoves.get(r);0===o?this._pendingAddsRemoves.set(r,2):2!==o&&this._pendingAddsRemoves.set(r,1)}t&&this._pendingAddsRemoves.size>0&&this.notifyChange("updating")},t.prototype.modify=function(e,t){for(var n=0===this._updates.length,i=0,r=e;i<r.length;i++){var o=r[i],a=this._updates.pushNew();a.renderGeometry=o,a.updateType=t}n&&this._updates.length>0&&this.notifyChange("updating")},t.prototype.updateLogic=function(e){for(var t=!1,n=0;n<this._sortedMaterialRenderers.length;n++){var i=this._sortedMaterialRenderers.data[n].materialRenderer;i.updateLogic&&i.updateLogic(e)&&(t=!0)}return t},t.prototype.draw=function(e,t,n){for(var i=0;i<this._sortedMaterialRenderers.length;i++){var r=this._sortedMaterialRenderers.data[i];if(l.materialPredicate(r.material,e)){var o=n.getMaterialRenderStatsObject(r.materialRenderer.type);r.materialRenderer.render(null,e,t,o)}}},t.prototype.updateSortedMaterialRenderers=function(){var e=this;this._sortedMaterialRenderers.clear();var t=0;this._materialRenderers.forEach((function(n,i){i.insertOrder=t++,e._sortedMaterialRenderers.push({material:i,materialRenderer:n})})),this._sortedMaterialRenderers.sort((function(e,t){var n=t.material.renderPriority-e.material.renderPriority;return 0!==n?n:e.material.insertOrder-t.material.insertOrder}))},t.prototype.updateAddsRemoves=function(){var e=this;this._adds.clear(),this._removes.clear(),this._pendingAddsRemoves.forEach((function(t,n){switch(t){case 0:e._adds.push(n);break;case 1:e._removes.push(n)}}));for(var t=0;t<this._updates.length;)this._pendingAddsRemoves.has(this._updates.data[t].renderGeometry)?this._updates.removeUnorderedIndex(t):t++},Object.defineProperty(t.prototype,"test",{get:function(){return{sortedMaterialRenderers:this._sortedMaterialRenderers}},enumerable:!0,configurable:!0}),n.__decorate([s.property()],t.prototype,"rctx",void 0),n.__decorate([s.property()],t.prototype,"materialRepository",void 0),n.__decorate([s.property()],t.prototype,"updating",null),n.__decorate([s.subclass("esri.views.3d.webgl-engine.lib.SortedRenderGeometryRenderer")],t)}(i);t.SortedRenderGeometryRenderer=p}).apply(null,i),void 0===r||(e.exports=r)},QDiq:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("0LE5"),n("Rdxj"),n("2Mej")],void 0===(r=(function(e,t,n,i,r){Object.defineProperty(t,"__esModule",{value:!0});var o=i.vec3f64.create(),a=function(){function e(){this._renderLighting={main:{intensity:i.vec3f64.create(),direction:i.vec3f64.fromValues(1,0,0),castShadows:!1},sphericalHarmonics:{sh:{r:[0],g:[0],b:[0]}}},this._shOrder=2,this._oldSunlight={direction:i.vec3f64.create(),ambient:{color:i.vec3f64.create(),intensity:0},diffuse:{color:i.vec3f64.create(),intensity:0}}}return e.prototype.setLightDirectionUniform=function(e){e.setUniform3fv("lightingMainDirection",this._renderLighting.main.direction)},e.prototype.setUniforms=function(e,t){void 0===t&&(t=!1),e.setUniform1f("lightingFixedFactor",t?(1-this._info.groundLightingFactor)*(1-this._info.globalFactor):0),e.setUniform1f("lightingGlobalFactor",this._info.globalFactor),this.setLightDirectionUniform(e),e.setUniform3fv("lightingMainIntensity",this._renderLighting.main.intensity),e.setUniform1f("ambientBoostFactor",.4);var n=this._renderLighting.sphericalHarmonics.sh;0===this._shOrder?e.setUniform3f("lightingAmbientSH0",n.r[0],n.g[0],n.b[0]):1===this._shOrder?(e.setUniform4f("lightingAmbientSH_R",n.r[0],n.r[1],n.r[2],n.r[3]),e.setUniform4f("lightingAmbientSH_G",n.g[0],n.g[1],n.g[2],n.g[3]),e.setUniform4f("lightingAmbientSH_B",n.b[0],n.b[1],n.b[2],n.b[3])):2===this._shOrder&&(e.setUniform3f("lightingAmbientSH0",n.r[0],n.g[0],n.b[0]),e.setUniform4f("lightingAmbientSH_R1",n.r[1],n.r[2],n.r[3],n.r[4]),e.setUniform4f("lightingAmbientSH_G1",n.g[1],n.g[2],n.g[3],n.g[4]),e.setUniform4f("lightingAmbientSH_B1",n.b[1],n.b[2],n.b[3],n.b[4]),e.setUniform4f("lightingAmbientSH_R2",n.r[5],n.r[6],n.r[7],n.r[8]),e.setUniform4f("lightingAmbientSH_G2",n.g[5],n.g[6],n.g[7],n.g[8]),e.setUniform4f("lightingAmbientSH_B2",n.b[5],n.b[6],n.b[7],n.b[8]))},e.prototype.set=function(e){this._info=e,r.combineLights(e.lights,this._shOrder,this._renderLighting),n.vec3.negate(this._oldSunlight.direction,this._renderLighting.main.direction);var t=1/Math.PI;this._oldSunlight.ambient.color[0]=.282095*this._renderLighting.sphericalHarmonics.sh.r[0]*t,this._oldSunlight.ambient.color[1]=.282095*this._renderLighting.sphericalHarmonics.sh.g[0]*t,this._oldSunlight.ambient.color[2]=.282095*this._renderLighting.sphericalHarmonics.sh.b[0]*t,this._oldSunlight.ambient.intensity=1,this._oldSunlight.diffuse.color[0]=this._renderLighting.main.intensity[0]*t,this._oldSunlight.diffuse.color[1]=this._renderLighting.main.intensity[1]*t,this._oldSunlight.diffuse.color[2]=this._renderLighting.main.intensity[2]*t,this._oldSunlight.diffuse.intensity=1;var i=n.vec3.copy(o,this._oldSunlight.diffuse.color);n.vec3.scale(i,i,.4*this._info.globalFactor),n.vec3.add(this._oldSunlight.ambient.color,this._oldSunlight.ambient.color,i)},Object.defineProperty(e.prototype,"globalFactor",{get:function(){return this._info.globalFactor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"old",{get:function(){return this._oldSunlight},enumerable:!0,configurable:!0}),e}();t.SceneLighting=a}).apply(null,i))||(e.exports=r)},R4nD:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("BcWh"),n("LxLY"),n("0LE5"),n("Rdxj"),n("2fXB"),n("j2SP"),n("WRgd"),n("ZcgO"),n("as1Q"),n("MCHn"),n("2W+Z"),n("fOZq"),n("hADE"),n("mmEe"),n("ys4y"),n("+nCE"),n("cjy9"),n("RC9r"),n("SNs2")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b){Object.defineProperty(t,"__esModule",{value:!0});var x=function(){function e(e){var t=this;this.view=null,this._attachmentOrigin=c.makeDehydratedPoint(0,0,0,null),this._attachmentOriginDirty=!0,this.events=new n,this._isDraped=!1,this._geometry=null,this._width=1,this._color=s.vec4f32.fromValues(1,0,1,1),this._innerWidth=1,this._innerColor=s.vec4f32.fromValues(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._falloff=0,this._elevationInfo=null,this._laserlineStyle=null,this._laserlineEnabled=!1,this._occludedMode=8,this.resources=new d.VisualElementResources({view:e.view,createResources:function(e){return t.createResources(e)},recreateGeometry:function(e,n){return e.geometries.length=0,t.recreateGeometry(n,e.material,e.geometries),e.geometries}}),this._attachmentOrigin.spatialReference=e.view.spatialReference,this.drapedResources=new u.DrapedVisualElementResources({view:e.view,createResources:function(){return t.createDrapedResources()},recreateGeometry:function(e){e.geometries=t.createRenderGeometriesDraped(e.material),t.attachmentOriginChanged()}});var i=!0;for(var r in this._laserline=new p.LaserlineVisualElement({view:e.view}),e)r in this?"attached"===r?i=e[r]:this[r]=e[r]:console.error("Cannot set unknown property",r);this.attached=i}return e.prototype.destroy=function(){this.resources.destroy(),this.drapedResources.destroy(),this._laserline.destroy()},Object.defineProperty(e.prototype,"isDraped",{get:function(){return this._isDraped},set:function(e){e!==this._isDraped&&(this._isDraped=e,this.updateAttached(this.attached),this._laserline.attached=this.laserlineAttached)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"laserlineAttached",{get:function(){return this.attached&&!this.hidden&&i.isSome(this._laserlineStyle)&&!this.isDraped&&this.laserlineEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hidden",{get:function(){return this.resources.hidden},set:function(e){this.resources.hidden=e,this.drapedResources.hidden=e,this._laserline.attached=this.laserlineAttached},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attached",{get:function(){return this.resources.attached||this.drapedResources.attached},set:function(e){this.updateAttached(e)},enumerable:!0,configurable:!0}),e.prototype.updateAttached=function(e){this.resources.attached=!this.isDraped&&e,this.drapedResources.attached=this.isDraped&&e,this._laserline.attached=this.laserlineAttached,this.attached&&this.attachmentOriginChanged()},Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},set:function(e){this._geometry=e,this.resources.recreateGeometry(),this.drapedResources.recreateGeometry()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(e){e!==this._width&&(this._width=e,this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){a.vec4.exactEquals(e,this._color)||(a.vec4.copy(this._color,e),this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerWidth",{get:function(){return this._innerWidth},set:function(e){e!==this._innerWidth&&(this._innerWidth=e,this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerColor",{get:function(){return this._innerColor},set:function(e){a.vec4.exactEquals(e,this._innerColor)||(a.vec4.copy(this._innerColor,e),this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stipplePattern",{get:function(){return this._stipplePattern},set:function(e){var t=i.isSome(e)!==i.isSome(this._stipplePattern);this._stipplePattern=e,t?this.resources.recreate():this.updateMaterial()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stippleOffColor",{get:function(){return this._stippleOffColor},set:function(e){e&&this._stippleOffColor&&a.vec4.exactEquals(e,this._stippleOffColor)||(this._stippleOffColor=e?s.vec4f32.clone(e):null,this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"falloff",{get:function(){return this._falloff},set:function(e){e!==this._falloff&&(this._falloff=e,this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elevationInfo",{get:function(){return this._elevationInfo},set:function(e){this._elevationInfo=e,this.resources.recreateGeometry()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"laserlineStyle",{get:function(){return this._laserlineStyle},set:function(e){this._laserlineStyle=e,this._laserline.attached=this.laserlineAttached,i.isSome(e)&&(this._laserline.style=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"laserlineEnabled",{get:function(){return this._laserlineEnabled},set:function(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this.laserlineAttached)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"occludedMode",{get:function(){return this._occludedMode},set:function(e){e!==this._occludedMode&&(this._occludedMode=e,i.isSome(this.resources.resources)&&(this.resources.resources.material.renderOccluded=e),i.isSome(this.drapedResources.resources)&&(this.drapedResources.resources.material.renderOccluded=e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attachmentOrigin",{get:function(){if(!this._attachmentOriginDirty)return this._attachmentOrigin;var e=i.isSome(this.resources.resources)?this.resources.resources.geometries:null;if(!e||0===e.length)return null;r.vec3.set(O,0,0,0);for(var t=b.RibbonVertexAttributeConstants.POSITION,n=0,o=i.unwrap(this.resources.resources).material.getParameters().isClosed,a=0,s=e;a<s.length;a++){var l=s[a];m.computeAttachmentOriginLines(l.getAttribute(t),l.getIndices(t),o,w)&&(r.vec3.add(O,O,w),n++)}return 0===n?null:(r.vec3.scale(O,O,1/n),this.view.renderCoordsHelper.fromRenderCoords(O,this._attachmentOrigin),this._attachmentOriginDirty=!1,this._attachmentOrigin)},enumerable:!0,configurable:!0}),e.prototype.updateMaterial=function(){i.isSome(this.resources.resources)&&this.resources.resources.material.setParameterValues(this.materialParameters),i.isSome(this.drapedResources.resources)&&this.drapedResources.resources.material.setParameterValues(this.materialParameters)},Object.defineProperty(e.prototype,"isClosed",{get:function(){return i.isSome(this.geometry)&&"polygon"===this.geometry.type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"materialParameters",{get:function(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,isClosed:this.isClosed,falloff:this._falloff,innerColor:this._innerColor,innerWidth:this._innerWidth,join:"round",stippleIntegerRepeats:!0,polygonOffset:!0}},enumerable:!0,configurable:!0}),e.prototype.recreateGeometry=function(e,t,n){for(var i=0,r=this.createRenderGeometries();i<r.length;i++){var o=r[i];e.addGeometry(o,t),n.push(o)}this.attachmentOriginChanged()},e.prototype.attachmentOriginChanged=function(){this._attachmentOriginDirty=!0,this.events.emit("attachment-origin-changed")},e.prototype.createResources=function(e){var t=new _(this.materialParameters,"lineVisualElement");t.renderOccluded=8;var n=[];return this.recreateGeometry(e,t,n),{material:t,geometries:n,forEach:function(e){e(t),n.forEach(e)}}},e.prototype.createDrapedResources=function(){var e=new _(this.materialParameters,"lineVisualElement");return e.renderOccluded=4,{material:e,geometries:this.createRenderGeometriesDraped(e)}},e.prototype.createRenderGeometriesDraped=function(e){var t=this.geometry;if(i.isNone(t))return[];for(var n=[],o=0,a=f.geometryToRenderInfoDraped(t,this.view.basemapTerrain.spatialReference).lines;o<a.length;o++){var s=a[o].position,c=new y(f.createGeometryData({attributeData:{position:s},removeDuplicateStartEnd:this.isClosed?1:0}));c.material=e;var u=l.empty(S);l.expandWithBuffer(u,s),r.vec3.set(c.center,.5*(u[0]+u[3]),.5*(u[1]+u[4]),0),c.bsRadius=.5*Math.sqrt((u[3]-u[0])*(u[3]-u[0])+(u[4]-u[1])*(u[4]-u[1])),n.push(c)}return n},e.prototype.calculateMapBounds=function(e){if(i.isNone(this.resources.resources))return!1;for(var t=this.view.renderCoordsHelper,n=0,r=this.resources.resources.geometries;n<r.length;n++){var o=r[n].data.getAttribute("position"),a=o.data,s=new Float64Array(a.length);v.bufferToBuffer(o.data,t.spatialReference,0,s,this.view.spatialReference,0,a.length/3),l.expandWithBuffer(e,s)}return!0},e.prototype.createRenderGeometries=function(){var e=this.geometry;if(i.isNone(e))return[];for(var t=[],n=[],r=0,o=f.geometryToRenderInfo(e,this.view.elevationProvider,this.view.renderCoordsHelper,h.ElevationContext.fromElevationInfo(this.elevationInfo)).lines;r<o.length;r++){var a=o[r],s=a.position,l=f.createGeometryData({attributeData:{position:s,mapPosition:a.mapPosition},removeDuplicateStartEnd:this.isClosed?1:0});t.push(new g(l,"geometryOutlineVisualElement")),n.push(s)}return this._laserline.pathVerticalPlane=n,t},e}();t.OutlineVisualElement=x;var S=l.create(),w=o.vec3f64.create(),O=o.vec3f64.create()}).apply(null,i))||(e.exports=r)},RC9r:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("qsST"),n("xoE+"),n("LxLY"),n("jBNx"),n("W9tT"),n("0LE5"),n("Rdxj"),n("aWgr"),n("2B1V"),n("+nCE"),n("tUyH"),n("FNtW"),n("CIy2"),n("ama6"),n("s6rJ"),n("ZeO9"),n("PwS/"),n("SNs2"),n("SNs2")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x){var S=i.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial"),w=function(e){function t(t,n){var i=e.call(this,n)||this;return i.techniqueConfig=new x.RibbonLineTechniqueConfiguration,i.params=m.copyParameters(t,P),i.validateParams(),i.params.transparent=i.params.color[3]<1||i.params.transparent,i.layout=i.createLayout(),i}return n.__extends(t,e),t.prototype.dispose=function(){},t.prototype.setParameterValues=function(e){for(var t in e)if("cap"!==t){if("join"===t&&"round"===this.params[t]!=("round"===e[t])){S.error("join cannot be changed after creation");continue}if("stipplePattern"===t&&!!this.params[t]!=!!e[t]){S.error("stippledness cannot be changed after creation");continue}this.params[t]=e[t]}else S.error("cap cannot be changed after creation");this.validateParams(),this.parametersChanged()},t.prototype.getParameters=function(){return this.params},t.prototype.getPassParameters=function(){return this.params},t.prototype.getTechniqueConfig=function(e){this.techniqueConfig.output=e;var t=o.isSome(this.params.stipplePattern);return this.techniqueConfig.stippleEnabled=t,this.techniqueConfig.stippleIntegerRepeatsEnabled=t&&this.params.stippleIntegerRepeats,this.techniqueConfig.stippleOffColorEnabled=t&&o.isSome(this.params.stippleOffColor),this.techniqueConfig.slicePlaneEnabled=this.params.slicePlaneEnabled,this.techniqueConfig.sceneHasOcludees=this.params.sceneHasOcludees,this.techniqueConfig.roundJoins="round"===this.params.join,this.techniqueConfig.roundCaps="round"===this.params.cap,this.techniqueConfig.transparent=this.params.transparent,this.techniqueConfig.polygonOffset=this.params.polygonOffset,this.techniqueConfig.writeDepth=this.params.writeDepth,this.techniqueConfig.vvColor=this.params.vvColorEnabled,this.techniqueConfig.vvOpacity=this.params.vvOpacityEnabled,this.techniqueConfig.vvSize=this.params.vvSizeEnabled,this.techniqueConfig.innerColorEnabled=this.params.innerWidth>0&&o.isSome(this.params.innerColor),this.techniqueConfig.falloffEnabled=this.params.falloff>0,this.techniqueConfig.occluder=8===this.renderOccluded,this.techniqueConfig},t.prototype.intersect=function(e,t,n,i,r,o,a,s,l){l?this.intersectDrapedLineGeometry(e,i,o,a):this.intersectLineGeometry(e,t,n,i,this.params.width,a)},t.prototype.intersectDrapedLineGeometry=function(e,t,n,i){if(t.options.selectionMode){var o=e.getAttribute(x.RibbonVertexAttributeConstants.POSITION).data,a=e.getAttribute(x.RibbonVertexAttributeConstants.SIZE),s=this.params.width;if(this.params.vvSizeEnabled){var l=e.getAttribute(x.RibbonVertexAttributeConstants.SIZEFEATUREATTRIBUTE).data[0];s*=r.clamp(this.params.vvSizeOffset[0]+l*this.params.vvSizeFactor[0],this.params.vvSizeMinSize[0],this.params.vvSizeMaxSize[0])}else a&&(s*=a.data[0]);for(var c=n[0],u=n[1],p=(s/2+4)*e.pixelRatio,d=Number.MAX_VALUE,h=0;h<o.length-5;h+=3){var f=o[h],v=o[h+1],g=c-f,m=u-v,y=o[h+3]-f,_=o[h+4]-v,b=r.clamp((y*g+_*m)/(y*y+_*_),0,1),S=y*b-g,w=_*b-m,O=S*S+w*w;O<d&&(d=O)}d<p*p&&i()}},t.prototype.intersectLineGeometry=function(e,t,n,i,o,a){if(i.options.selectionMode&&!_.isInstanceHidden(t))if(v.isTranslationMatrix(n)){var c=e.data.getVertexAttr(),p=c[x.RibbonVertexAttributeConstants.POSITION].data,d=o;this.params.vvSizeEnabled?d*=r.clamp(this.params.vvSizeOffset[0]+c[x.RibbonVertexAttributeConstants.SIZEFEATUREATTRIBUTE].data[0]*this.params.vvSizeFactor[0],this.params.vvSizeMinSize[0],this.params.vvSizeMaxSize[0]):c[x.RibbonVertexAttributeConstants.SIZE]&&(d*=c[x.RibbonVertexAttributeConstants.SIZE].data[0]);var h=i.camera,f=j;s.vec2.copy(f,i.point);var g=d*h.pixelRatio/2+4*h.pixelRatio;l.vec3.set(B[0],f[0]-g,f[1]+g,0),l.vec3.set(B[1],f[0]+g,f[1]+g,0),l.vec3.set(B[2],f[0]+g,f[1]-g,0),l.vec3.set(B[3],f[0]-g,f[1]-g,0);for(var m=0;m<4;m++)h.unprojectPoint(B[m],W[m]);u.plane.fromPoints(h.eye,W[0],W[1],k),u.plane.fromPoints(h.eye,W[1],W[2],Z),u.plane.fromPoints(h.eye,W[2],W[3],X),u.plane.fromPoints(h.eye,W[3],W[0],Y);var y=Number.MAX_VALUE,b=this.params.isClosed?p.length-2:p.length-5;for(m=0;m<b;m+=3){E[0]=p[m]+n[12],E[1]=p[m+1]+n[13],E[2]=p[m+2]+n[14];var w=(m+3)%p.length;if(A[0]=p[w]+n[12],A[1]=p[w+1]+n[13],A[2]=p[w+2]+n[14],!(u.plane.signedDistance(k,E)<0&&u.plane.signedDistance(k,A)<0||u.plane.signedDistance(Z,E)<0&&u.plane.signedDistance(Z,A)<0||u.plane.signedDistance(X,E)<0&&u.plane.signedDistance(X,A)<0||u.plane.signedDistance(Y,E)<0&&u.plane.signedDistance(Y,A)<0)){if(h.projectPoint(E,V),h.projectPoint(A,L),V[2]<0&&L[2]>0){l.vec3.subtract(T,E,A);var O=h.frustum,P=-u.plane.signedDistance(O.planes[4],E)/l.vec3.dot(T,u.plane.normal(O.planes[4]));l.vec3.scale(T,T,P),l.vec3.add(E,E,T),h.projectPoint(E,V)}else if(V[2]>0&&L[2]<0)l.vec3.subtract(T,A,E),P=-u.plane.signedDistance((O=h.frustum).planes[4],A)/l.vec3.dot(T,u.plane.normal(O.planes[4])),l.vec3.scale(T,T,P),l.vec3.add(A,A,T),h.projectPoint(A,L);else if(V[2]<0&&L[2]<0)continue;V[2]=0,L[2]=0;var M=u.lineSegment.distance2(u.lineSegment.fromPoints(V,L,U),f);M<y&&(y=M,l.vec3.copy(z,E),l.vec3.copy(G,A))}}var C=i.rayBeginPoint,D=i.rayEndPoint;if(y<g*g){var R=Number.MAX_VALUE;if(u.lineSegment.closestLineSegmentPoint(u.lineSegment.fromPoints(z,G,U),u.lineSegment.fromPoints(C,D,N),I)){l.vec3.subtract(I,I,C);var F=l.vec3.length(I);l.vec3.scale(I,I,1/F),R=F/l.vec3.distance(C,D)}a(R,I)}}else S.error("intersection assumes a translation-only matrix")},t.prototype.computeAttachmentOrigin=function(e,t){var n=e.data,i="getVertexAttr"in n?n.getVertexAttr():"vertexAttr"in n?n.vertexAttr:null;if(!i)return null;var r=x.RibbonVertexAttributeConstants.POSITION,o="getVertexAttr"in n?n.getIndices(r):null;return d.computeAttachmentOriginLines(i[r],o,o&&this.params.isClosed,t)},t.prototype.createLayout=function(){var e=p.newLayout().vec3f(x.RibbonVertexAttributeConstants.POSITION).f32(x.RibbonVertexAttributeConstants.SUBDIVISIONFACTOR).vec2f(x.RibbonVertexAttributeConstants.UV0).vec3f(x.RibbonVertexAttributeConstants.AUXPOS1).vec3f(x.RibbonVertexAttributeConstants.AUXPOS2);return e.f32(this.params.vvSizeEnabled?x.RibbonVertexAttributeConstants.SIZEFEATUREATTRIBUTE:x.RibbonVertexAttributeConstants.SIZE),this.params.vvColorEnabled?e.f32(x.RibbonVertexAttributeConstants.COLORFEATUREATTRIBUTE):e.vec4f(x.RibbonVertexAttributeConstants.COLOR),this.params.vvOpacityEnabled&&e.f32(x.RibbonVertexAttributeConstants.OPACITYFEATUREATTRIBUTE),e},t.prototype.createBufferWriter=function(){return new M(this.layout,this.params)},t.prototype.createRenderer=function(e,t){return new y(e,t,this,x.ribbonVertexAttributeLocations)},t.prototype.getGLMaterial=function(e){return 0===e.output||4===e.output?new O(e):void 0},t.prototype.validateParams=function(){"miter"!==this.params.join&&(this.params.miterLimit=0)},t}(f.Material),O=function(e){function t(t){var n=e.call(this,t)||this;return n.updateParameters(),n}return n.__extends(t,e),t.prototype.updateParameters=function(){this.technique=this.techniqueRep.acquireAndReleaseExisting(b.RibbonLineTechnique,this.material.getTechniqueConfig(this.output),this.technique)},t.prototype.beginSlot=function(e){return this.technique.configuration.occluder?3===e||10===e||11===e:0===this.output?(this.targetSlot=this.technique.configuration.writeDepth?5:8,e===this.targetSlot):3===e},t.prototype._updateOccludeeState=function(e){e.hasOccludees!==this.material.getParameters().sceneHasOcludees&&(this.material.setParameterValues({sceneHasOcludees:e.hasOccludees}),this.updateParameters())},t.prototype.ensureParameters=function(e){0===this.output&&this._updateOccludeeState(e)},t.prototype.bind=function(e,t){e.bindProgram(this.technique.program),this.technique.bindPass(e,this.material.getPassParameters(),t)},t.prototype.getPipelineState=function(e,t){return t?this.technique.occludeePipeline:this.technique.configuration.occluder?11===e?this.technique.occluderPipelineTransparent:10===e?this.technique.occluderPipelineOpaque:this.technique.occluderPipelineMaskWrite:this.technique.pipeline},t}(h.GLMaterial),P=n.__assign({width:0,color:[1,1,1,1],join:"miter",cap:"butt",miterLimit:5,writeDepth:!0,polygonOffset:!1,stipplePattern:null,stippleIntegerRepeats:!1,stippleOffColor:null,slicePlaneEnabled:!1,vvFastUpdate:!1,transparent:!1,isClosed:!1,falloff:0,innerWidth:0,innerColor:null,sceneHasOcludees:!1},g.Default),M=function(){function e(e,t){if(this.params=t,this.numCapSubdivisions=0,this.numJoinSubdivisions=0,this.vertexBufferLayout=e,!t.isClosed)switch(this.params.cap){case"butt":this.numCapSubdivisions=0;break;case"square":this.numCapSubdivisions=1;break;case"round":this.numCapSubdivisions=D}switch(this.params.join){case"miter":case"bevel":this.numJoinSubdivisions=t.stipplePattern?1:0;break;case"round":this.numJoinSubdivisions=R}}return e.prototype.allocate=function(e){return this.vertexBufferLayout.createBuffer(e)},e.prototype.elementCount=function(e){var t=e.indices[x.RibbonVertexAttributeConstants.POSITION].length/2+1,n=this.params.isClosed,i=n?2:2*(2*this.numCapSubdivisions+2),r=n?0:1,o=n?t:t-1;if(e.vertexAttr[x.RibbonVertexAttributeConstants.SUBDIVISIONS])for(var a=e.vertexAttr[x.RibbonVertexAttributeConstants.SUBDIVISIONS].data,s=r;s<o;++s)i+=4+2*a[s];else i+=(o-r)*(2*this.numJoinSubdivisions+4);return i+2},e.prototype.write=function(e,t,n,i){var r=this,o=F,a=H,s=q,c=t.vertexAttr[x.RibbonVertexAttributeConstants.POSITION].data,u=t.indices&&t.indices[x.RibbonVertexAttributeConstants.POSITION];u&&u.length!==2*(c.length/3-1)&&console.warn("RibbonLineMaterial does not support indices");var p=null;t.vertexAttr[x.RibbonVertexAttributeConstants.SUBDIVISIONS]&&(p=t.vertexAttr[x.RibbonVertexAttributeConstants.SUBDIVISIONS].data);var d=1,h=0;this.params.vvSizeEnabled?h=t.vertexAttr[x.RibbonVertexAttributeConstants.SIZEFEATUREATTRIBUTE].data[0]:t.vertexAttr[x.RibbonVertexAttributeConstants.SIZE]&&(d=t.vertexAttr[x.RibbonVertexAttributeConstants.SIZE].data[0]);var f=[1,1,1,1],v=0;this.params.vvColorEnabled?v=t.vertexAttr[x.RibbonVertexAttributeConstants.COLORFEATUREATTRIBUTE].data[0]:t.vertexAttr[x.RibbonVertexAttributeConstants.COLOR]&&(f=t.vertexAttr[x.RibbonVertexAttributeConstants.COLOR].data);var g=0;this.params.vvOpacityEnabled&&(g=t.vertexAttr[x.RibbonVertexAttributeConstants.OPACITYFEATUREATTRIBUTE].data[0]);var m=c.length/3,y=e.transformation,_=new Float32Array(n.buffer),b=this.vertexBufferLayout.stride/4,S=i*b,w=S,O=function(e,t,n,i,o,a){_[S++]=t[0],_[S++]=t[1],_[S++]=t[2],_[S++]=i,_[S++]=o,_[S++]=a,_[S++]=e[0],_[S++]=e[1],_[S++]=e[2],_[S++]=n[0],_[S++]=n[1],_[S++]=n[2],_[S++]=r.params.vvSizeEnabled?h:d,r.params.vvColorEnabled?_[S++]=v:(_[S++]=f[0],_[S++]=f[1],_[S++]=f[2],_[S++]=f[3]),r.params.vvOpacityEnabled&&(_[S++]=g)};S+=b,l.vec3.set(a,c[0],c[1],c[2]),y&&l.vec3.transformMat4(a,a,y);var P=this.params.isClosed;if(P){var M=c.length-3;l.vec3.set(o,c[M],c[M+1],c[M+2]),y&&l.vec3.transformMat4(o,o,y)}else{l.vec3.copy(o,a),l.vec3.set(s,c[3],c[4],c[5]),y&&l.vec3.transformMat4(s,s,y);for(var D=0;D<this.numCapSubdivisions;++D)O(o,a,s,I=1-D/this.numCapSubdivisions,1,-4),O(o,a,s,I,1,4);O(o,a,s,0,0,-4),O(o,a,s,0,0,4),l.vec3.copy(o,a),l.vec3.copy(a,s)}var R=P?m:m-1;for(D=P?0:1;D<R;D++){var E=(D+1)%m*3;l.vec3.set(s,c[E+0],c[E+1],c[E+2]),y&&l.vec3.transformMat4(s,s,y),O(o,a,s,0,1,-1),O(o,a,s,0,1,1);for(var A=p?p[D]:this.numJoinSubdivisions,T=0;T<A;++T)O(o,a,s,I=(T+1)/(A+1),1,-2),O(o,a,s,I,1,2);O(o,a,s,1,0,-2),O(o,a,s,1,0,2),l.vec3.copy(o,a),l.vec3.copy(a,s)}if(P)S=C(_,w+b,_,S,2*b);else for(O(o,a,s,0,1,-5),O(o,a,s,0,1,5),D=0;D<this.numCapSubdivisions;++D){var I;O(o,a,s,I=(D+1)/this.numCapSubdivisions,1,-5),O(o,a,s,I,1,5)}C(_,w+b,_,w,b),S=C(_,S-b,_,S,b)},e}();function C(e,t,n,i,r){for(var o=0;o<r;o++)n[i++]=e[t++];return i}var D=3,R=1,E=c.vec3f64.create(),A=c.vec3f64.create(),T=c.vec3f64.create(),I=c.vec3f64.create(),j=c.vec3f64.create(),V=a.createRenderScreenPointArray3(),L=a.createRenderScreenPointArray3(),z=c.vec3f64.create(),G=c.vec3f64.create(),U=u.lineSegment.create(),N=u.lineSegment.create(),F=c.vec3f64.create(),H=c.vec3f64.create(),q=c.vec3f64.create(),B=[a.createRenderScreenPointArray3(),a.createRenderScreenPointArray3(),a.createRenderScreenPointArray3(),a.createRenderScreenPointArray3()],W=[c.vec3f64.create(),c.vec3f64.create(),c.vec3f64.create(),c.vec3f64.create()],k=u.plane.create(),Z=u.plane.create(),X=u.plane.create(),Y=u.plane.create();return w}).apply(null,i))||(e.exports=r)},RWrl:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("BcWh"),n("eIBl"),n("xoE+"),n("LxLY"),n("afW+"),n("jBNx"),n("8MXS"),n("FXVB"),n("1m5D"),n("0LE5"),n("Rdxj"),n("qysZ"),n("DtIM"),n("woUR"),n("5T2R"),n("B3XD"),n("Fe95"),n("aWgr"),n("AzkI"),n("JjCO"),n("ys4y"),n("4ziW"),n("o5p5"),n("bz+r")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x,S,w,O,P,M){var C;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ScaleIn=32,e.ScaleOut=64,e.RotateLeft=128,e.RotateRight=256,e.Unlocked=1024,e.DelayedFocused=2048,e.TouchInput=32768}(C||(C={}));var D=function(){function e(e){var t=this;this.mode=null,this._handles=new r,this._scaleRotateDragData=null,this._activeAnimation=null,this.events=new i,this.getFocused=function(){return t.ringManipulator.focused},this.getScale=function(){return a.isSome(t._scaleRotateDragData)&&"scale"===t._scaleRotateDragData.mode?t._scaleRotateDragData.scale:1},this.tool=e.tool,this.mode=e.mode,this.createManipulator(),this.updateDragState(),this.updateManipulatorTransform()}return e.prototype.destroy=function(){a.isSome(this._activeAnimation)&&(this._activeAnimation.frameTask.remove(),this._activeAnimation=null),this._handles.removeAll(),this.tool.manipulators.remove(this.ringManipulator),this.ringManipulator=null},e.prototype.startAnimation=function(e){var t=this;this.cancelActiveAnimation(),e.start();var i=s.addFrameTask({update:function(n){e.update(n.deltaTime)&&t.cancelActiveAnimation()}});this._activeAnimation=n.__assign(n.__assign({},e),{frameTask:i})},e.prototype.cancelActiveAnimation=function(){a.isSome(this._activeAnimation)&&(this._activeAnimation.frameTask.remove(),this._activeAnimation.destroy(),this._activeAnimation=null)},e.prototype.forEachManipulator=function(e){e(this.ringManipulator,2)},e.prototype.createManipulator=function(){var e=this;this.ringManipulator=this.createRingManipulator(),this.tool.manipulators.add(this.ringManipulator);var t=this.tool.graphicState.graphic,n=M.createManipulatorDragEventPipeline(this.ringManipulator,(function(n,i,r){e._scaleRotateDragData=null;var s=function(e,t){var n=e.allLayerViews.find((function(e){return e.layer===t.layer}));if(a.isNone(t.symbol))return null;var i=t.symbol;return{symbolLayers:i.symbolLayers.map((function(e){var t=null;return"object"===e.type&&(t=e.heading),{heading:t,size:n.getSymbolLayerSize(i,e)}})).toArray()}}(e.tool.view,t);if(a.isNone(s))return e.updateDragState(),null;var l={mode:"none",origin:h.vec3f64.clone(n.renderLocation),angle:0,startAngle:e.tool.symbolRotationAngle,angleDir:0,scale:1,scaleDir:0,startSymbolData:s};e._scaleRotateDragData=l,e.updateDragState();var c=S.sv3d.get();e.tool.view.renderCoordsHelper.worldUpAtPosition(n.renderLocation,c),i.next(y.screenToRenderPlane(e.tool.view,b.plane.fromPositionAndNormal(n.renderLocation,c))).next((function(n){var i=b.plane.normal(n.plane),r=m.calculateInputRotationTransform(n.renderStart,n.renderEnd,l.origin,i),s=x.cyclicalPI.shortestSignedDiff(l.angle,r);l.angleDir=o.clamp(l.angleDir+s,-_.ROTATE_INDICATOR_DIRECTION_BUFFER,_.ROTATE_INDICATOR_DIRECTION_BUFFER),l.angle=r;var c=function(e,t){var n=d.vec3.subtract(S.sv3d.get(),t.renderStart,e.origin),i=d.vec3.subtract(S.sv3d.get(),t.renderEnd,e.origin),r=d.vec3.length(n),o=d.vec3.length(i);return 0===r?0:o/r}(l,n);if(l.scaleDir=o.clamp(l.scaleDir+(c-l.scale),-_.SCALE_INDICATOR_DIRECTION_BUFFER,_.SCALE_INDICATOR_DIRECTION_BUFFER),l.scale=c,e.onScaleChanged(),"none"===l.mode){var u=e.mode||function(e,t,n,i){var r=e.renderStart,o=e.renderEnd,a=R(r,i,S.sv3d.get()),s=R(o,i,S.sv3d.get());if(d.vec3.squaredDistance(a,s)<_.DRAG_THRESHOLD_PX*_.DRAG_THRESHOLD_PX)return null;var l=d.vec3.subtract(S.sv3d.get(),r,n),c=d.vec3.cross(S.sv3d.get(),l,t),u=r,p=d.vec3.add(S.sv3d.get(),u,c),h=R(n,i,S.sv3d.get()),f=a,v=R(p,i,S.sv3d.get()),g=d.vec3.subtract(S.sv3d.get(),v,f),m=d.vec3.subtract(S.sv3d.get(),a,h),y=b.ray.wrap(f,g),x=b.ray.wrap(h,m);return b.ray.distance2(y,s)<b.ray.distance2(x,s)?"rotate":"scale"}(n,n.plane,l.origin,e.tool.view.state.camera);if(a.isSome(u)){switch(u){case"rotate":e.tool.emit("graphic-rotate-start",{graphic:t,angle:l.angle});break;case"scale":e.tool.emit("graphic-scale-start",{graphic:t,scale:l.scale})}l.mode=u}}if(e.updateDragState(),a.isSome(t.symbol)){var p=t.symbol.clone(),h=0,f=1;switch(l.mode){default:case"none":break;case"scale":f=l.scale;break;case"rotate":h=l.angle}e.applySymbolData(p,l.startSymbolData,h,f),t.symbol=p,e.updateManipulatorTransform()}switch(n.action){case"start":case"update":switch(l.mode){case"rotate":e.tool.emit("graphic-rotate",{graphic:t,angle:l.angle});break;case"scale":e.tool.emit("graphic-scale",{graphic:t,scale:l.scale})}break;case"end":switch(l.mode){case"rotate":e.tool.emit("graphic-rotate-stop",{graphic:t,angle:l.angle});break;case"scale":e.tool.emit("graphic-scale-stop",{graphic:t,scale:l.scale})}}"end"===n.action&&(e.startAnimation(E(e,(function(){return e.onScaleChanged()}))),e._scaleRotateDragData=null,e.updateDragState())})),r.next(M.resetSymbol(t)).next((function(){if(a.isSome(e._scaleRotateDragData)){switch(e._scaleRotateDragData.mode){case"none":break;case"rotate":e.tool.emit("graphic-rotate-stop",{graphic:t,angle:e._scaleRotateDragData.startAngle});break;case"scale":e.tool.emit("graphic-scale-stop",{graphic:t,scale:1})}e.startAnimation(E(e,(function(){return e.onScaleChanged()}))),e._scaleRotateDragData=null}}))}));this._handles.add(n),this._handles.add([this.ringManipulator.events.on("focus-changed",(function(t){var n,i,r,o,a;"focus"===t.action?e.startAnimation((n=e,i=function(){return e.updateDelayedFocusedState()},r=0,o=null,a=function(){return!1},{start:function(){o=n.getFocused,n.getFocused=a,r=0,i()},update:function(e){return r+=e,!o()||r>_.RING_INDICATOR_DELAY_MS?1:0},destroy:function(){n.getFocused=o,i()}})):e.updateDelayedFocusedState()})),this.ringManipulator.events.on("immediate-click",(function(e){e.stopPropagation()})),c.init(this.tool.graphicState,"displaying",(function(t){return e.ringManipulator.available=t})),this.tool.graphicState.on("changed",(function(){return m.placeAtGraphic(e.tool.view,e.ringManipulator,t)}))]),m.placeAtGraphic(this.tool.view,this.ringManipulator,t)},e.prototype.onScaleChanged=function(){this.events.emit("scale-changed"),this.updateManipulatorTransform()},e.prototype.updateDelayedFocusedState=function(){this.ringManipulator.updateStateEnabled(C.DelayedFocused,this.getFocused())},e.prototype.updateDragState=function(){if(this.ringManipulator.updateStateEnabled(C.Unlocked,!(a.isSome(this._scaleRotateDragData)&&"none"!==this._scaleRotateDragData.mode)),a.isSome(this._scaleRotateDragData))switch(this._scaleRotateDragData.mode){case"rotate":this.ringManipulator.updateStateEnabled(C.ScaleIn|C.ScaleOut,!1),this.ringManipulator.updateStateEnabled(C.RotateLeft,this._scaleRotateDragData.angleDir<0),this.ringManipulator.updateStateEnabled(C.RotateRight,this._scaleRotateDragData.angleDir>=0);break;case"scale":this.ringManipulator.updateStateEnabled(C.RotateLeft|C.RotateRight,!1),this.ringManipulator.updateStateEnabled(C.ScaleIn,this._scaleRotateDragData.scaleDir<0),this.ringManipulator.updateStateEnabled(C.ScaleOut,this._scaleRotateDragData.scaleDir>=0)}else this.ringManipulator.updateStateEnabled(C.ScaleIn|C.ScaleOut|C.RotateLeft|C.RotateRight,!1)},e.prototype.updateManipulatorTransform=function(){var e=u.mat4.identity(S.sm4d.get());u.mat4.rotate(e,e,this.tool.symbolRotationAngle,h.vec3f64.fromValues(0,0,1));var t=this.getScale(),n=u.mat4.fromScaling(S.sm4d.get(),d.vec3.set(S.sv3d.get(),t,t,t)),i=u.mat4.identity(S.sm4d.get());u.mat4.multiply(i,n,e),this.ringManipulator.modelTransform=i},e.prototype.createRingManipulator=function(){for(var e=function(e,t,n){for(var i=[],r=Math.ceil(_.GEOMETRY_SEGMENTS*(t-e)/(2*Math.PI)),o=0;o<r+1;o++){var a=e+o*(t-e)/r;i.push(h.vec3f64.fromValues(n*Math.cos(a),n*Math.sin(a),0))}return i},t=function(t){return e(0,2*Math.PI,t)},i=function(e,t){return new w(O.createPathExtrusionGeometry(function(e){return[[-e/2,0],[e/2,0],[e/2,_.RING_HEIGHT/2],[-e/2,_.RING_HEIGHT/2]]}(t),e,[],[],!1),"graphic-transform-ring")},r=t(_.RING_RADIUS),o=i(r,_.RING_THICKNESS),a={left:[],right:[]},s=[],l=0;l<2;l++){var c=(D=l*Math.PI-Math.PI/4)+(R=Math.PI/2-_.ROTATE_INDICATOR_ARC_LENGTH),d=D+Math.PI/2-R,f=i(E=e(c,d,_.INNER_INDICATOR_RADIUS),_.INDICATOR_THICKNESS);s.push(E),s.push(e(c,d,_.OUTER_INDICATOR_RADIUS-_.RING_THICKNESS/2)),a.left.push(f),a.right.push(f);for(var m=0;m<2;m++){var y=0===m,b=p.mat4f64.create();if(y){u.mat4.scale(b,b,[1,-1,1]),u.mat4.rotate(b,b,-c,[0,0,1]);var x=Math.round(_.ROTATE_INDICATOR_ARROW_PLACEMENT_PERCENTAGE*(E.length-1));b[12]=E[x][0],b[13]=E[x][1],b[14]=E[x][2]}else u.mat4.rotate(b,b,d,[0,0,1]),x=Math.round((1-_.ROTATE_INDICATOR_ARROW_PLACEMENT_PERCENTAGE)*(E.length-1)),b[12]=E[x][0],b[13]=E[x][1],b[14]=E[x][2];var S=O.createExtrudedTriangle(_.ROTATE_INDICATOR_ARROW_TIP_LENGTH,0,_.ROTATE_INDICATOR_ARROW_TIP_RADIUS,_.RING_HEIGHT);O.transformInPlace(S,b);var P=new w(S,"graphic-transform-ring-rotate");(y?a.left:a.right).push(P)}}var M=[];for(l=0;l<2;l++){c=(D=l*Math.PI-Math.PI/4)+(R=Math.PI/2-_.SCALE_INDICATOR_ARC_LENGTH),d=D+Math.PI/2-R;var D,R,E=e(c,d,_.OUTER_INDICATOR_RADIUS);M.push(i(E,_.INDICATOR_THICKNESS))}var A=t(_.RING_RADIUS+_.SCALE_INDICATOR_OFFSET1),T=t(_.RING_RADIUS+_.SCALE_INDICATOR_OFFSET2),I=i(A,_.INDICATOR_THICKNESS),j=i(T,_.INDICATOR_THICKNESS),V=t(_.RING_RADIUS-_.SCALE_INDICATOR_OFFSET1),L=t(_.RING_RADIUS-_.SCALE_INDICATOR_OFFSET2),z=i(V,_.INDICATOR_THICKNESS),G=i(L,_.INDICATOR_THICKNESS),U=this.createMaterial(),N=this.createMaterial(.66),F=this.createMaterial(.5),H=this.createMaterial(.33),q=[{geometry:o,material:U,stateMask:C.DelayedFocused},{geometry:o,material:F,stateMask:0}];this.mode&&"scale"!==this.mode||(q=q.concat([{geometry:M,material:U,stateMask:C.DelayedFocused|C.Unlocked},{geometry:I,material:N,stateMask:C.DelayedFocused|C.ScaleIn},{geometry:j,material:H,stateMask:C.DelayedFocused|C.ScaleIn},{geometry:z,material:N,stateMask:C.DelayedFocused|C.ScaleOut},{geometry:G,material:H,stateMask:C.DelayedFocused|C.ScaleOut}])),this.mode&&"rotate"!==this.mode||(q=q.concat([{geometry:a.right,material:U,stateMask:C.DelayedFocused|C.Unlocked},{geometry:a.left,material:U,stateMask:C.DelayedFocused|C.RotateLeft},{geometry:a.right,material:U,stateMask:C.DelayedFocused|C.RotateRight}]));var B=n.__spreadArrays([r],s);return new g.Manipulator3D({view:this.tool.view,renderObjects:q,autoScaleRenderObjects:!1,worldOriented:!0,radius:_.RING_THICKNESS,focusMultiplier:1,touchMultiplier:1.5,elevationInfo:v.getGraphicEffectiveElevationInfo(this.tool.graphicState.graphic),collisionType:{type:"ribbon",paths:B,direction:h.vec3f64.fromValues(0,0,1)}})},e.prototype.createMaterial=function(e){void 0===e&&(e=1);var t=n.__spreadArrays(_.HANDLE_COLOR,[e]),i=new P({color:t,transparent:1!==e,cullFace:2},"graphic-transform");return i.renderOccluded=2,i},e.prototype.applySymbolData=function(e,t,n,i){var r=this;e.symbolLayers.forEach((function(e,o){var s=t.symbolLayers[o],l=s.heading,c=s.size;"object"===e.type&&(e.heading=(a.isSome(l)?l:0)-f.toDegree(n),a.isSome(c)&&"width"in c&&(c.width=r.enforceNonZeroSize(c.width),c.height=r.enforceNonZeroSize(c.height),c.depth=r.enforceNonZeroSize(c.depth),e.width=c.width*i,e.depth=c.depth*i,e.height=c.height*i))}))},e.prototype.enforceNonZeroSize=function(e){return e||this.tool.view.state.camera.computeRenderPixelSizeAt(this.ringManipulator.renderLocation)},Object.defineProperty(e.prototype,"test",{get:function(){return{ringManipulator:this.ringManipulator}},enumerable:!0,configurable:!0}),e}();function R(e,t,n){var i=t.projectPoint(e,l.castRenderScreenPointArray(A)),r=t.renderToScreen(i,T);return d.vec3.set(n,r[0],r[1],0)}function E(e,t){var n=null,i=1,r=function(){return i};return{start:function(){i=e.getScale(),n=e.getScale,e.getScale=r,t()},update:function(e){return i+=((i+1)/2-i)*Math.min(e*_.RING_RESET_ANIMATION_SPEED_FACTOR,1),t(),Math.abs(i-1)<.01?1:0},destroy:function(){e.getScale=n,t()}}}t.GraphicScaleRotateTransform=D;var A=h.vec3f64.create(),T=l.createScreenPointArray()}).apply(null,i))||(e.exports=r)},Raj5:function(e,t,n){var i,r;i=[n.dj.c(e.i),t],void 0===(r=(function(e,t){var n=function(){function e(e,t,n,r,o,a){this.camera=null,this.pass=0,this.slot=0,this.highlightDepthTexture=null,this.renderOccludedMask=i,this.hasOccludees=!1,this.rctx=e,this.offscreenRenderingHelper=t,this.scenelightingData=n,this.shadowMap=r,this.ssaoHelper=o,this.sliceHelper=a}return e.prototype.resetRenderOccludedMask=function(){this.renderOccludedMask=i},Object.defineProperty(e.prototype,"isHighlightPass",{get:function(){return 4===this.pass},enumerable:!0,configurable:!0}),e}(),i=13;return n}).apply(null,i))||(e.exports=r)},RsYQ:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("xoE+"),n("jBNx"),n("FXVB"),n("1m5D"),n("0LE5"),n("Rdxj"),n("2fXB"),n("O7NG"),n("aWgr"),n("AzkI"),n("18xY"),n("CIy2")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h){Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t,n){void 0===e&&(e=s.vec3f64.create()),void 0===t&&(t=s.vec3f64.create()),void 0===n&&(n=s.vec3f64.fromValues(0,0,1)),this._viewUp=s.vec3f64.create(),this._viewForward=s.vec3f64.create(),this._viewRight=s.vec3f64.create(),this._ray=u.ray.createWrapper(),this._viewport=c.vec4f64.fromValues(0,0,1,1),this._padding=c.vec4f64.fromValues(0,0,0,0),this._fov=55/180*Math.PI,this._near=1,this._far=1e3,this._viewDirty=!0,this._viewMatrix=o.mat4f64.create(),this._projectionDirty=!0,this._projectionMatrix=o.mat4f64.create(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=o.mat4f64.create(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=o.mat4f64.create(),this._frustumDirty=!0,this._frustum=u.frustum.create(),this._fullViewport=null,this.pixelRatio=1,this.relativeElevation=0,this._eye=s.vec3f64.clone(e),this._center=s.vec3f64.clone(t),this._up=s.vec3f64.clone(n),this._padding=c.vec4f64.create()}return Object.defineProperty(e.prototype,"eye",{get:function(){return this._eye},set:function(e){this._compareAndSetView(e,this._eye)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return this._center},set:function(e){this._compareAndSetView(e,this._center)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ray",{get:function(){return this._ray.origin=this.eye,this._ray.direction||(this._ray.direction=s.vec3f64.create()),a.vec3.subtract(this._ray.direction,this.center,this.eye),this._ray},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"up",{get:function(){return this._up},set:function(e){this._compareAndSetView(e,this._up)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewMatrix",{get:function(){return this._ensureViewClean(),this._viewMatrix},set:function(e){r.mat4.copy(this._viewMatrix,e),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewForward",{get:function(){return this._ensureViewClean(),this._viewForward},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewUp",{get:function(){return this._ensureViewClean(),this._viewUp},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewRight",{get:function(){return this._ensureViewClean(),this._viewRight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"near",{get:function(){return this._near},set:function(e){this._near!==e&&(this._near=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"far",{get:function(){return this._far},set:function(e){this._far!==e&&(this._far=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewport",{get:function(){return this._viewport},set:function(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this._viewport[0]},set:function(e){this._viewport[0]!==(e+=this._padding[3])&&(this._viewport[0]=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._viewport[1]},set:function(e){this._viewport[1]!==(e+=this._padding[2])&&(this._viewport[1]=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._viewport[2]},set:function(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._viewport[3]},set:function(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullWidth",{get:function(){return this._viewport[2]+this._padding[1]+this._padding[3]},set:function(e){this.width=e-(this._padding[1]+this._padding[3])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullHeight",{get:function(){return this._viewport[3]+this._padding[0]+this._padding[2]},set:function(e){this.height=e-(this._padding[0]+this._padding[2])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullViewport",{get:function(){return this._fullViewport||(this._fullViewport=c.vec4f64.create()),this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"aspect",{get:function(){return this.width/this.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this._padding},set:function(e){this._padding[0]===e[0]&&this._padding[1]===e[1]&&this._padding[2]===e[2]&&this._padding[3]===e[3]||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),l.vec4.copy(this._padding,e),this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewProjectionMatrix",{get:function(){return this._viewProjectionDirty&&(r.mat4.multiply(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"projectionMatrix",{get:function(){if(this._projectionDirty){var e=this.width,t=this.height,n=this.near*Math.tan(this.fovY/2),i=n*this.aspect;r.mat4.frustum(this._projectionMatrix,-i*(1+2*this._padding[3]/e),i*(1+2*this._padding[1]/e),-n*(1+2*this._padding[2]/t),n*(1+2*this._padding[0]/t),this.near,this.far),this._projectionDirty=!1}return this._projectionMatrix},set:function(e){r.mat4.copy(this._projectionMatrix,e),this._projectionDirty=!1,this._viewProjectionDirty=!0,this._frustumDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fov",{get:function(){return this._fov},set:function(e){this._fov=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fovX",{get:function(){return h.fovd2fovx(this._fov,this.width,this.height)},set:function(e){this._fov=h.fovx2fovd(e,this.width,this.height),this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fovY",{get:function(){return h.fovd2fovy(this._fov,this.width,this.height)},set:function(e){this._fov=h.fovy2fovd(e,this.width,this.height),this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"distance",{get:function(){return a.vec3.distance(this._center,this._eye)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"frustum",{get:function(){return this._recomputeFrustum(),this._frustum},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewInverseTransposeMatrix",{get:function(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(this._viewInverseTransposeMatrix||(this._viewInverseTransposeMatrix=o.mat4f64.create()),r.mat4.invert(this._viewInverseTransposeMatrix,this.viewMatrix),r.mat4.transpose(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix},enumerable:!0,configurable:!0}),e.prototype.depthNDCToWorld=function(e){return 2*this.near*this.far/(this.far+this.near-(2*e-1)*(this.far-this.near))},Object.defineProperty(e.prototype,"perRenderPixelRatio",{get:function(){return Math.tan(this.fovX/2)/(this.width/2)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"perScreenPixelRatio",{get:function(){return this.perRenderPixelRatio*this.pixelRatio},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"aboveGround",{get:function(){return this.relativeElevation>=0},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(e){var t=e;return a.vec3.copy(this._eye,t._eye),a.vec3.copy(this._center,t._center),a.vec3.copy(this._up,t._up),l.vec4.copy(this._viewport,t._viewport),l.vec4.copy(this._padding,t._padding),this._near=t._near,this._far=t._far,this._fov=t._fov,this.relativeElevation=e.relativeElevation,this._viewDirty=t._viewDirty,this._viewDirty||(r.mat4.copy(this._viewMatrix,t._viewMatrix),a.vec3.copy(this._viewRight,t._viewRight),a.vec3.copy(this._viewUp,t._viewUp),a.vec3.copy(this._viewForward,t._viewForward)),t._projectionDirty?this._projectionDirty=!0:(r.mat4.copy(this._projectionMatrix,t._projectionMatrix),this._projectionDirty=!1),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||(u.frustum.copy(t._frustum,this._frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(this._viewInverseTransposeMatrix?r.mat4.copy(this._viewInverseTransposeMatrix,t._viewInverseTransposeMatrix):this._viewInverseTransposeMatrix=o.mat4f64.clone(t._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),t._fullViewport?this._fullViewport?l.vec4.copy(this._fullViewport,t._fullViewport):this._fullViewport=c.vec4f64.clone(t._fullViewport):this._fullViewport=null,this.pixelRatio=e.pixelRatio,this},e.prototype.copyViewFrom=function(e){this.eye=e.eye,this.center=e.center,this.up=e.up},e.prototype.clone=function(){var t=new e;return t.copyFrom(this),t},e.prototype.equals=function(e){return a.vec3.exactEquals(this._eye,e._eye)&&a.vec3.exactEquals(this._center,e._center)&&a.vec3.exactEquals(this._up,e._up)&&l.vec4.exactEquals(this._viewport,e._viewport)&&l.vec4.exactEquals(this._padding,e._padding)&&this._near===e._near&&this._far===e._far&&this._fov===e._fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation},e.prototype.almostEquals=function(e){if(this.pixelRatio!==e.pixelRatio||Math.abs(e._fov-this._fov)>=.001)return!1;a.vec3.sub(m,e._eye,e._center),a.vec3.sub(y,this._eye,this._center);var t=a.vec3.dot(m,y),n=a.vec3.sqrLen(m),i=a.vec3.sqrLen(y);return t*t>=(1-1e-10)*n*i&&a.vec3.sqrDist(e._eye,this._eye)<5e-4*Math.max(n,i)*5e-4&&l.vec4.squaredDistance(e._padding,this._padding)<.5&&l.vec4.squaredDistance(e._viewport,this._viewport)<.5},e.prototype.markViewDirty=function(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0},e.prototype.computeRenderPixelSizeAt=function(e){return this.computeRenderPixelSizeAtDist(this.viewDirectionDistance(e))},e.prototype.computeRenderPixelSizeAtDist=function(e){return e*this.perRenderPixelRatio},e.prototype.computeScreenPixelSizeAt=function(e){return this.computeScreenPixelSizeAtDist(this.viewDirectionDistance(e))},e.prototype.viewDirectionDistance=function(e){return Math.abs(d.projectPointSignedLength(this.viewForward,a.vec3.subtract(m,e,this._eye)))},e.prototype.computeScreenPixelSizeAtDist=function(e){return e*this.perScreenPixelRatio},e.prototype.computeDistanceFromRadius=function(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))},e.prototype.getScreenCenter=function(e){return void 0===e&&(e=i.createScreenPointArray()),e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e},e.prototype.getRenderCenter=function(e,t,n){return void 0===t&&(t=.5),void 0===n&&(n=.5),e||(e=i.createRenderScreenPointArray3()),e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*n,e.length>2&&(e[2]=.5),e},e.prototype.setGLViewport=function(e){var t=this.viewport,n=this.padding;e.setViewport(t[0]-n[3],t[1]-n[2],t[2]+n[1]+n[3],t[3]+n[0]+n[2])},e.prototype.applyProjection=function(e,t,i){void 0===i&&(i=!1),e!==v&&a.vec3.copy(v,e),v[3]=1,i&&(t[2]=-v[2]),l.vec4.transformMat4(v,v,this.projectionMatrix),a.vec3.scale(v,v,1/Math.abs(v[3]));var r=this.fullViewport;return t[0]=n.lerp(0,r[0]+r[2],.5+.5*v[0]),t[1]=n.lerp(0,r[1]+r[3],.5+.5*v[1]),i||(t[2]=.5*(v[2]+1)),t},e.prototype.projectPoint=function(e,t){if(v[0]=e[0],v[1]=e[1],v[2]=e[2],v[3]=1,l.vec4.transformMat4(v,v,this.viewProjectionMatrix),0===v[3])return null;a.vec3.scale(v,v,1/Math.abs(v[3]));var i=this.fullViewport;return"x"in t?(t.x=n.lerp(0,i[0]+i[2],.5+.5*v[0]),t.y=n.lerp(0,i[1]+i[3],.5+.5*v[1])):(t[0]=n.lerp(0,i[0]+i[2],.5+.5*v[0]),t[1]=n.lerp(0,i[1]+i[3],.5+.5*v[1]),t.length>2&&(t[2]=.5*(v[2]+1))),t},e.prototype.unprojectPoint=function(e,t){if(r.mat4.multiply(g,this.projectionMatrix,this.viewMatrix),!r.mat4.invert(g,g))return null;var n=this.fullViewport;return v[0]=2*(e[0]-n[0])/n[2]-1,v[1]=2*(e[1]-n[1])/n[3]-1,v[2]=2*e[2]-1,v[3]=1,l.vec4.transformMat4(v,v,g),0===v[3]?null:(t[0]=v[0]/v[3],t[1]=v[1]/v[3],t[2]=v[2]/v[3],t)},e.prototype.computeUp=function(e){"global"===e?this.computeUpGlobal():this.computeUpLocal()},e.prototype.screenToRender=function(e,t){var n=this.fullHeight-e[1]*this.pixelRatio;return t[0]=e[0]*this.pixelRatio,t[1]=n,t},e.prototype.renderToScreen=function(e,t){var n=(this.fullHeight-e[1])/this.pixelRatio;return t[0]=e[0]/this.pixelRatio,t[1]=n,t},e.prototype.computeUpGlobal=function(){a.vec3.subtract(m,this.center,this.eye);var e=a.vec3.length(this.center);e<1?(a.vec3.set(this.up,0,0,1),this.markViewDirty()):Math.abs(a.vec3.dot(m,this.center))>.9999*a.vec3.length(m)*e||(a.vec3.cross(this.up,m,this.center),a.vec3.cross(this.up,this.up,m),a.vec3.normalize(this.up,this.up),this.markViewDirty())},e.prototype.computeUpLocal=function(){p.directionFromTo(m,this.eye,this.center),Math.abs(m[2])<=.9999&&(a.vec3.scale(m,m,m[2]),a.vec3.set(this.up,-m[0],-m[1],1-m[2]),a.vec3.normalize(this.up,this.up),this.markViewDirty())},e.prototype._compareAndSetView=function(e,t){a.vec3.exactEquals(e,t)||(a.vec3.copy(t,e),this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0)},e.prototype._recomputeFrustum=function(){this._frustumDirty&&(u.frustum.fromMatrix(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)},e.prototype._ensureViewClean=function(){this._viewDirty&&(r.mat4.lookAt(this._viewMatrix,this._eye,this._center,this._up),a.vec3.set(this._viewForward,-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10]),a.vec3.set(this._viewUp,this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9]),a.vec3.set(this._viewRight,this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8]),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)},e}();t.default=f;var v=c.vec4f64.create(),g=o.mat4f64.create(),m=s.vec3f64.create(),y=s.vec3f64.create()}).apply(null,i))||(e.exports=r)},SNs2:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("LxLY"),n("LxLY"),n("fese"),n("3kdR"),n("PaEL"),n("3PFg"),n("W/V4"),n("FQ4r"),n("lBa0"),n("lfQW"),n("ne9J"),n("G0ER"),n("qbr3"),n("2Kdy")],r=(function(e,t,i,r,o,a,s,l,c,u,p,d,h,f,v,g){Object.defineProperty(t,"__esModule",{value:!0}),t.RibbonVertexAttributeConstants={POSITION:"position",SUBDIVISIONFACTOR:"subdivisionFactor",UV0:"uv0",AUXPOS1:"auxpos1",AUXPOS2:"auxpos2",SUBDIVISIONS:"subdivisions",COLOR:"color",COLORFEATUREATTRIBUTE:"colorFeatureAttribute",SIZE:"size",SIZEFEATUREATTRIBUTE:"sizeFeatureAttribute",OPACITYFEATUREATTRIBUTE:"opacityFeatureAttribute"},t.ribbonVertexAttributeLocations={position:0,subdivisionFactor:1,uv0:2,auxpos1:3,auxpos2:4,size:6,sizeFeatureAttribute:6,color:5,colorFeatureAttribute:5,opacityFeatureAttribute:7};var m=function(e){function p(t,n){var i=e.call(this,t,n)||this;return i.stipplePattern=null,i.stippleTextureBind=null,i.stippleTextureRepository=t.stippleTextureRepository,i}return i.__extends(p,e),p.prototype.initializeProgram=function(e){var n=p.shader.get(),i=this.configuration,r=n.build({output:i.output,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:i.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,stippleEnabled:i.stippleEnabled,stippleOffColorEnabled:i.stippleOffColorEnabled,stippleUVMaxEnabled:i.stippleIntegerRepeatsEnabled,stippleIntegerRepeatsEnabled:i.stippleIntegerRepeatsEnabled,roundCaps:i.roundCaps,roundJoins:i.roundJoins,vvColor:i.vvColor,vvSize:i.vvSize,vvInstancingEnabled:!0,vvOpacity:i.vvOpacity,falloffEnabled:i.falloffEnabled,innerColorEnabled:i.innerColorEnabled});return new v(e.rctx,r.generateSource("vertex"),r.generateSource("fragment"),t.ribbonVertexAttributeLocations)},p.prototype.dispose=function(){e.prototype.dispose.call(this),this.stippleTextureRepository.release(this.stipplePattern),this.stipplePattern=null,this.stippleTextureBind=null},p.prototype.bindPass=function(e,t,n){if(4===this.configuration.output&&l.OutputHighlight.bindOutputHighlight(e,this.program,n),this.program.setUniform1f("intrinsicWidth",t.width),this.program.setUniform4fv("intrinsicColor",t.color),this.program.setUniform1f("miterLimit","miter"!==t.join?0:t.miterLimit),this.program.setUniform1f("nearPlane",n.nearFar[0]),this.program.setUniform1f("pixelRatio",n.pixelRatio),this.program.setUniform2fv("screenSize",[n.viewport[2],n.viewport[3]]),c.VisualVariables.bindUniformsWithOpacity(this.program,t),this.stipplePattern!==t.stipplePattern){var i=t.stipplePattern;this.stippleTextureBind=this.stippleTextureRepository.swap(this.stipplePattern,i),this.stipplePattern=i}if(this.configuration.stippleEnabled){var a=o.isSome(this.stippleTextureBind)?this.stippleTextureBind(e,0)*n.pixelRatio:1;if(this.program.setUniform1i("stipplePatternTexture",0),this.program.setUniform1f("stipplePatternPixelSizeInv",1/a),this.configuration.stippleOffColorEnabled){var s=r.unwrap(t.stippleOffColor);this.program.setUniform4f("stippleOffColor",s[0],s[1],s[2],s.length>3?s[3]:1)}}this.configuration.falloffEnabled&&this.program.setUniform1f("falloff",t.falloff),this.configuration.innerColorEnabled&&(this.program.setUniform4fv("innerColor",r.unwrapOr(t.innerColor,t.color)),this.program.setUniform1f("innerWidth",t.innerWidth*n.pixelRatio))},p.prototype.bindDraw=function(e){s.Transform.bindUniforms(this.program,e),a.Slice.bindUniformsWithOrigin(this.program,this.configuration,e)},p.prototype.initializePipeline=function(){var e=this.configuration,t=g.separateBlendingParams(770,1,771,771),n=e.polygonOffset&&y;if(e.occluder&&(this._occluderPipelineTransparent=g.makePipelineState({blending:t,polygonOffset:n,depthTest:h.depthCompareAlways,depthWrite:null,colorWrite:g.defaultColorWriteParams,stencilWrite:null,stencilTest:h.stencilToolTransparentOccluderParams}),this._occluderPipelineOpaque=g.makePipelineState({polygonOffset:n,depthTest:h.depthCompareAlways,depthWrite:null,colorWrite:g.defaultColorWriteParams,stencilWrite:h.stencilWriteMaskOff,stencilTest:h.stencilToolMaskOccluderParams}),this._occluderPipelineMaskWrite=g.makePipelineState({polygonOffset:n,depthTest:h.depthCompareLess,depthWrite:null,colorWrite:null,stencilWrite:h.stencilWriteMaskOn,stencilTest:h.stencilToolMaskBaseParams})),0===e.output){var i=function(i){return g.makePipelineState({blending:t,polygonOffset:n,depthTest:h.depthCompareLess,depthWrite:!e.transparent&&e.writeDepth&&g.defaultDepthWriteParams,colorWrite:g.defaultColorWriteParams,stencilWrite:e.sceneHasOcludees?h.stencilWriteMaskOn:null,stencilTest:e.sceneHasOcludees?i?h.stencilToolMaskBaseParams:e.sceneHasOcludees?h.stencilBaseAllZerosParams:null:null})};return this._occludeePipeline=i(!0),i(!1)}return g.makePipelineState({polygonOffset:n,depthTest:h.depthCompareLess,depthWrite:!e.transparent&&e.writeDepth&&g.defaultDepthWriteParams,colorWrite:g.defaultColorWriteParams})},Object.defineProperty(p.prototype,"occluderPipelineTransparent",{get:function(){return this._occluderPipelineTransparent},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"occluderPipelineOpaque",{get:function(){return this._occluderPipelineOpaque},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"occludeePipeline",{get:function(){return this._occludeePipeline},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"occluderPipelineMaskWrite",{get:function(){return this._occluderPipelineMaskWrite},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"primitiveType",{get:function(){return 5},enumerable:!0,configurable:!0}),p.shader=new u.ReloadableShaderModule(f,(function(){return new Promise((function(e,t){Promise.resolve().then((function(){var t=[n("ne9J")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))})),p}(p.ShaderTechnique);t.RibbonLineTechnique=m;var y={factor:0,units:-4},_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.output=0,t.occluder=!1,t.slicePlaneEnabled=!1,t.sliceHighlightDisabled=!1,t.vertexColors=!1,t.transparent=!1,t.polygonOffset=!1,t.writeDepth=!1,t.stippleEnabled=!1,t.stippleOffColorEnabled=!1,t.stippleIntegerRepeatsEnabled=!1,t.roundCaps=!1,t.roundJoins=!1,t.vvSize=!1,t.vvColor=!1,t.vvOpacity=!1,t.falloffEnabled=!1,t.innerColorEnabled=!1,t.sceneHasOcludees=!1,t}return i.__extends(t,e),i.__decorate([d.parameter({count:7})],t.prototype,"output",void 0),i.__decorate([d.parameter()],t.prototype,"occluder",void 0),i.__decorate([d.parameter()],t.prototype,"slicePlaneEnabled",void 0),i.__decorate([d.parameter()],t.prototype,"sliceHighlightDisabled",void 0),i.__decorate([d.parameter()],t.prototype,"vertexColors",void 0),i.__decorate([d.parameter()],t.prototype,"transparent",void 0),i.__decorate([d.parameter()],t.prototype,"polygonOffset",void 0),i.__decorate([d.parameter()],t.prototype,"writeDepth",void 0),i.__decorate([d.parameter()],t.prototype,"stippleEnabled",void 0),i.__decorate([d.parameter()],t.prototype,"stippleOffColorEnabled",void 0),i.__decorate([d.parameter()],t.prototype,"stippleIntegerRepeatsEnabled",void 0),i.__decorate([d.parameter()],t.prototype,"roundCaps",void 0),i.__decorate([d.parameter()],t.prototype,"roundJoins",void 0),i.__decorate([d.parameter()],t.prototype,"vvSize",void 0),i.__decorate([d.parameter()],t.prototype,"vvColor",void 0),i.__decorate([d.parameter()],t.prototype,"vvOpacity",void 0),i.__decorate([d.parameter()],t.prototype,"falloffEnabled",void 0),i.__decorate([d.parameter()],t.prototype,"innerColorEnabled",void 0),i.__decorate([d.parameter()],t.prototype,"sceneHasOcludees",void 0),t}(d.ShaderTechniqueConfiguration);t.RibbonLineTechniqueConfiguration=_}).apply(null,i),void 0===r||(e.exports=r)},T95R:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("BcWh"),n("LxLY"),n("jBNx"),n("FXVB"),n("1m5D"),n("0LE5"),n("Rdxj"),n("2fXB"),n("O7NG"),n("WRgd"),n("X5J5"),n("as1Q"),n("2W+Z"),n("fOZq"),n("v+nG"),n("mmEe"),n("RsYQ"),n("ys4y"),n("4ziW"),n("o5p5"),n("uZGf")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x,S){Object.defineProperty(t,"__esModule",{value:!0});var w=function(){function e(e){var t=this;this.view=null,this.camera=new y.default,this.events=new n,this._isDraped=!1,this._vertices=null,this._spatialReference=null,this._color=d.settings.colorToVec4(d.settings.reshapeManipulators.vertex.color),this._elevationInfo=null,this._occludedMode=8,this.resources=new f.VisualElementResources({view:e.view,createResources:function(e){return t.createResources(e)},recreateGeometry:function(e,n){return e.geometries.length=0,t.recreateGeometry(n,e.vertexMaterial,e.vertexOutlineMaterial,e.geometries),e.geometries}}),this.drapedResources=new h.DrapedVisualElementResources({view:e.view,createResources:function(){return t.createDrapedResources()},recreateGeometry:function(e){}});var i=!0;for(var r in e)r in this?"attached"===r?i=e[r]:this[r]=e[r]:console.error("Cannot set unknown property",r);this.attached=i}return e.prototype.onViewChange=function(){this.camera.copyFrom(this.view.state.camera)},e.prototype.destroy=function(){this.resources.destroy(),this.drapedResources.destroy()},Object.defineProperty(e.prototype,"isDraped",{get:function(){return this._isDraped},set:function(e){e!==this._isDraped&&(this._isDraped=e,this.updateAttached(this.attached))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hidden",{get:function(){return this.resources.hidden},set:function(e){this.resources.hidden=e,this.drapedResources.hidden=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attached",{get:function(){return this.resources.attached||this.drapedResources.attached},set:function(e){this.updateAttached(e)},enumerable:!0,configurable:!0}),e.prototype.updateAttached=function(e){this.resources.attached=!this.isDraped&&e,this.drapedResources.attached=this.isDraped&&e},Object.defineProperty(e.prototype,"vertices",{get:function(){return this._vertices},set:function(e){this._vertices=e,this.resources.recreateGeometry(),this.drapedResources.recreateGeometry()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spatialReference",{get:function(){return this._spatialReference},set:function(e){this._spatialReference=e,this.resources.recreateGeometry(),this.drapedResources.recreateGeometry()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){c.vec4.exactEquals(e,this._color)||(c.vec4.copy(this._color,e),this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elevationInfo",{get:function(){return this._elevationInfo},set:function(e){this._elevationInfo=e,this.resources.recreateGeometry()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"occludedMode",{get:function(){return this._occludedMode},set:function(e){e!==this._occludedMode&&(this._occludedMode=e,i.isSome(this.resources.resources)&&(this.resources.resources.vertexMaterial.renderOccluded=e,this.resources.resources.vertexOutlineMaterial.renderOccluded=e),i.isSome(this.drapedResources.resources))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"vertexMaterialParameters",{get:function(){return{color:this._color,transparent:this._color[3]<1}},enumerable:!0,configurable:!0}),e.prototype.updateMaterial=function(){i.isSome(this.resources.resources)&&this.resources.resources.vertexMaterial.setParameterValues(this.vertexMaterialParameters)},e.prototype.recreateGeometry=function(e,t,n,i){for(var r=0,o=this.createRenderGeometries();r<o.length;r++){var a=o[r];e.addGeometry(a.vertexGeometry,t,a.xform),i.push(a.vertexGeometry),e.addGeometry(a.vertexOutlineGeometry,n,a.xform),i.push(a.vertexOutlineGeometry)}},e.prototype.createResources=function(e){var t=this.color,n=u.vec4f64.fromValues(t[0],t[1],t[2],t.length>3?t[3]:1),i=new S.ShadedColorMaterial({color:n,transparent:t[3]<1,writeDepth:!0,cullFace:2},"manipulator");i.renderOccluded=d.settings.reshapeManipulators.vertex.renderOccludedFlag;var r=d.settings.colorToVec4(d.settings.reshapeManipulators.vertex.outlineColor),o=u.vec4f64.fromValues(r[0],r[1],r[2],4===r.length?r[3]:1),a=new x({color:o,transparent:!0,writeDepth:!0,cullFace:1},"manipulator-outline");a.renderOccluded=d.settings.reshapeManipulators.vertex.renderOccludedFlag;var s=[];return this.recreateGeometry(e,i,a,s),{vertexMaterial:i,vertexOutlineMaterial:a,geometries:s,forEach:function(e){e(i),e(a),s.forEach(e)}}},e.prototype.createDrapedResources=function(){return{geometries:null}},e.prototype.calculateMapBounds=function(e){if(i.isNone(this.resources.resources))return!1;for(var t=this.view.renderCoordsHelper,n=0,r=this.resources.resources.geometries;n<r.length;n++){var o=r[n].data.getAttribute("position"),a=o.data,s=new Float64Array(a.length);m.bufferToBuffer(o.data,t.spatialReference,0,s,this.view.spatialReference,0,a.length/3),p.expandWithBuffer(e,s)}return!0},e.prototype.computeScreenLocation=function(e,t){return t.pixelSize=this.camera.computeScreenPixelSizeAt(e),this.camera.projectPoint(e,t.renderScreenPointArray),this.camera.renderToScreen(t.renderScreenPointArray,t.screenPointArray),t},e.prototype.computeTransform=function(e,t){var n=a.mat4f64.create(),i=t*this.computeScreenLocation(e,O).pixelSize;return o.mat4.set(n,i,0,0,0,0,i,0,0,0,0,i,0,0,0,0,1),n[12]+=e[0],n[13]+=e[1],n[14]+=e[2],n[15]=1,n},e.prototype.createRenderGeometries=function(){var e=this.vertices;if(i.isNone(e)||0===e.length)return[];if(!this.view.state||!this.view.state.camera)return[];this.camera.copyFrom(this.view.state.camera);for(var t=d.settings.reshapeManipulators.vertex,n=t.size/2,r=n+t.collisionPadding,o=n/r,a=(n+t.outlineSize)/r,l=g.geometryToRenderInfo(e,this.spatialReference,this.view.elevationProvider,this.view.renderCoordsHelper,v.ElevationContext.fromElevationInfo(this.elevationInfo)),c=[],u=l.numVertices,p=l.position,h=0;h<u;++h){var f=new _(b.createSphereGeometry(o,16,16),"VerticesVisualElement-vertex"),m=new _(b.createSphereGeometry(a,16,16),"VerticesVisualElement-vertexOutline"),y=s.vec3.set(P,p[3*h+0],p[3*h+1],p[3*h+2]),x=this.computeTransform(y,r);c.push({vertexGeometry:f,vertexOutlineGeometry:m,xform:x})}return c},e}();t.VerticesVisualElement=w;var O={screenPointArray:r.createScreenPointArray(),renderScreenPointArray:r.createRenderScreenPointArray3(),pixelSize:0},P=l.vec3f64.create()}).apply(null,i))||(e.exports=r)},TIRl:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("LxLY"),n("DtIM"),n("bz+r")],void 0===(r=(function(e,t,n,i,r,o){Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this.view=null,this.elevationInfo=null,this.lastDragEvent=null,this.next=new o.EventPipeline,this._enabled=!1}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){if(this._enabled!==e&&i.isSome(this.lastDragEvent)){var t=this.lastDragEvent.mapEnd,n=this.snap(this.lastDragEvent.screenEnd);i.isSome(n)&&this.next.execute({action:"update",mapStart:this.lastDragEvent.mapStart,mapEnd:!0===e?n:t,screenStart:this.lastDragEvent.screenEnd,screenEnd:this.lastDragEvent.screenEnd})}this._enabled=e},enumerable:!0,configurable:!0}),e.prototype.snap=function(e){var t=i.isSome(this.view)?this.view.toMap(e,{exclude:[]}):null;return i.isSome(t)&&i.isSome(this.view)&&(t.z=r.getZForElevationMode(t,this.view,this.elevationInfo)),t},e.prototype.createDragEventPipelineStep=function(e,t){var r=this;return this.view=e,this.elevationInfo=t,this.lastDragEvent=null,function(e){if(r.lastDragEvent="end"!==e.action?n.__assign({},e):null,r._enabled){var t=r.snap(e.screenEnd);return i.isSome(t)?{action:e.action,mapStart:e.mapStart,mapEnd:t,screenStart:e.screenStart,screenEnd:e.screenEnd}:null}return{action:e.action,mapStart:e.mapStart,mapEnd:e.mapEnd,screenStart:e.screenStart,screenEnd:e.screenEnd}}},e}();t.SnapToScene=a}).apply(null,i))||(e.exports=r)},UGy0:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("hk44"),n("7Aei"),n("aExC")],void 0===(r=(function(e,t,n,i,r,o){var a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.build=function(e){var t=new o.ShaderBuilder;return t.include(i.Laserline,e),t.vertex.uniforms.add("uModelViewMatrix","mat4"),t.vertex.uniforms.add("uProjectionMatrix","mat4"),t.attributes.add("start","vec3"),t.attributes.add("end","vec3"),t.attributes.add("up","vec3"),t.attributes.add("extrude","vec2"),t.varyings.add("uv","vec2"),t.varyings.add("vViewStart","vec3"),t.varyings.add("vViewEnd","vec3"),t.varyings.add("vViewPlane","vec4"),t.vertex.uniforms.add("glowWidth","float"),t.vertex.uniforms.add("pixelToNDC","vec2"),t.vertex.code.add(r.glsl(a||(a=n.__makeTemplateObject(["\n void main() {\n vec3 pos = mix(start, end, extrude.x);\n\n vec4 viewPos = uModelViewMatrix * vec4(pos, 1);\n vec4 projPos = uProjectionMatrix * viewPos;\n vec2 ndcPos = projPos.xy / projPos.w;\n\n vec3 viewUp = (uModelViewMatrix * vec4(extrude.y * up, 0)).xyz;\n vec4 projPosUp = uProjectionMatrix * vec4(viewPos.xyz + viewUp, 1);\n vec2 projExtrudeDir = normalize(projPosUp.xy / projPosUp.w - ndcPos);\n\n vec2 lxy = abs(sign(projExtrudeDir) - ndcPos);\n ndcPos += length(lxy) * projExtrudeDir;\n\n vec3 worldPlaneNormal = normalize(cross(up, normalize(end - start)));\n vec3 viewPlaneNormal = (uModelViewMatrix * vec4(worldPlaneNormal, 0)).xyz;\n\n vViewStart = (uModelViewMatrix * vec4(start, 1)).xyz;\n vViewEnd = (uModelViewMatrix * vec4(end, 1)).xyz;\n vViewPlane = vec4(viewPlaneNormal, -dot(viewPlaneNormal, vViewStart));\n\n // Add enough padding in the X screen space direction for glow\n float xPaddingPixels = sign(dot(viewPlaneNormal, viewPos.xyz)) * (extrude.x * 2.0 - 1.0) * glowWidth;\n ndcPos.x += xPaddingPixels * pixelToNDC.x;\n\n uv = ndcPos * 0.5 + 0.5;\n gl_Position = vec4(ndcPos, 0, 1);\n }\n "],["\n void main() {\n vec3 pos = mix(start, end, extrude.x);\n\n vec4 viewPos = uModelViewMatrix * vec4(pos, 1);\n vec4 projPos = uProjectionMatrix * viewPos;\n vec2 ndcPos = projPos.xy / projPos.w;\n\n vec3 viewUp = (uModelViewMatrix * vec4(extrude.y * up, 0)).xyz;\n vec4 projPosUp = uProjectionMatrix * vec4(viewPos.xyz + viewUp, 1);\n vec2 projExtrudeDir = normalize(projPosUp.xy / projPosUp.w - ndcPos);\n\n vec2 lxy = abs(sign(projExtrudeDir) - ndcPos);\n ndcPos += length(lxy) * projExtrudeDir;\n\n vec3 worldPlaneNormal = normalize(cross(up, normalize(end - start)));\n vec3 viewPlaneNormal = (uModelViewMatrix * vec4(worldPlaneNormal, 0)).xyz;\n\n vViewStart = (uModelViewMatrix * vec4(start, 1)).xyz;\n vViewEnd = (uModelViewMatrix * vec4(end, 1)).xyz;\n vViewPlane = vec4(viewPlaneNormal, -dot(viewPlaneNormal, vViewStart));\n\n // Add enough padding in the X screen space direction for glow\n float xPaddingPixels = sign(dot(viewPlaneNormal, viewPos.xyz)) * (extrude.x * 2.0 - 1.0) * glowWidth;\n ndcPos.x += xPaddingPixels * pixelToNDC.x;\n\n uv = ndcPos * 0.5 + 0.5;\n gl_Position = vec4(ndcPos, 0, 1);\n }\n "])))),t.fragment.uniforms.add("globalAlpha","float"),t.fragment.uniforms.add("perScreenPixelRatio","float"),t.fragment.code.add(r.glsl(s||(s=n.__makeTemplateObject(["\n float planeDistancePixels(vec4 plane, vec3 pos, vec3 start, vec3 end) {\n vec3 origin = mix(start, end, 0.5);\n vec3 basis = end - origin;\n vec3 posAtOrigin = pos - origin;\n\n float x = dot(normalize(basis), posAtOrigin);\n float y = dot(plane.xyz, posAtOrigin);\n\n float dx = max(abs(x) - length(basis), 0.0);\n float dy = y;\n\n float dist = length(vec2(dx, dy));\n\n float width = fwidth(y);\n float maxPixelDistance = length(pos) * perScreenPixelRatio * 2.0;\n float pixelDist = dist / min(width, maxPixelDistance);\n return abs(pixelDist);\n }\n\n void main() {\n vec3 pos;\n vec3 normal;\n float depthDiscontinuityAlpha;\n\n if (!laserlineReconstructFromDepth(pos, normal, depthDiscontinuityAlpha)) {\n discard;\n }\n\n float distance = planeDistancePixels(vViewPlane, pos, vViewStart, vViewEnd);\n\n vec4 color = laserlineProfile(distance);\n float alpha = 1.0 - smoothstep(0.995, 0.999, abs(dot(normal, vViewPlane.xyz)));\n\n gl_FragColor = laserlineOutput(color * alpha * depthDiscontinuityAlpha);\n }\n "],["\n float planeDistancePixels(vec4 plane, vec3 pos, vec3 start, vec3 end) {\n vec3 origin = mix(start, end, 0.5);\n vec3 basis = end - origin;\n vec3 posAtOrigin = pos - origin;\n\n float x = dot(normalize(basis), posAtOrigin);\n float y = dot(plane.xyz, posAtOrigin);\n\n float dx = max(abs(x) - length(basis), 0.0);\n float dy = y;\n\n float dist = length(vec2(dx, dy));\n\n float width = fwidth(y);\n float maxPixelDistance = length(pos) * perScreenPixelRatio * 2.0;\n float pixelDist = dist / min(width, maxPixelDistance);\n return abs(pixelDist);\n }\n\n void main() {\n vec3 pos;\n vec3 normal;\n float depthDiscontinuityAlpha;\n\n if (!laserlineReconstructFromDepth(pos, normal, depthDiscontinuityAlpha)) {\n discard;\n }\n\n float distance = planeDistancePixels(vViewPlane, pos, vViewStart, vViewEnd);\n\n vec4 color = laserlineProfile(distance);\n float alpha = 1.0 - smoothstep(0.995, 0.999, abs(dot(normal, vViewPlane.xyz)));\n\n gl_FragColor = laserlineOutput(color * alpha * depthDiscontinuityAlpha);\n }\n "])))),t}}).apply(null,i))||(e.exports=r)},VQEQ:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("W9tT"),n("DIqE"),n("O7NG"),n("fese"),n("hs8d"),n("uUnu"),n("aRjO"),n("PaEL"),n("3PFg"),n("IwVr"),n("rCq5"),n("DKwL"),n("2o+p"),n("7Aei"),n("aExC")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m){function y(e,t){var n,r,o;return void 0===t&&(t=L),e.textureIsSignedDistanceField?((o=t)[0]=(n=e.anchorPos)[0]*((r=e.distanceFieldBoundingBox)[2]-r[0])+r[0],o[1]=n[1]*(r[3]-r[1])+r[1]):i.vec2.copy(t,e.anchorPos),t}Object.defineProperty(t,"__esModule",{value:!0}),t.build=function(e){var t=new m.ShaderBuilder,i=e.signedDistanceFieldEnabled;if(t.include(s.AlignPixel),t.include(l.HUD,e),t.include(a.Slice,e),6===e.output)return t.include(c.HUDOcclusionPass,e),t;t.include(v.ScreenSizePerspective),t.include(f.RgbaFloatEncoding),t.include(h.ColorConversion,{stages:1}),t.include(p.VisualVariables,e),t.varyings.add("vcolor","vec4"),t.varyings.add("vtc","vec2"),t.varyings.add("vsize","vec2"),e.binaryHighlightOcclusionEnabled&&t.varyings.add("voccluded","float"),t.vertex.uniforms.add("screenOffset","vec2").add("anchorPos","vec2").add("textureCoordinateScaleFactor","vec2").add("materialColor","vec4"),i&&t.vertex.uniforms.add("outlineColor","vec4"),e.screenSizePerspectiveEnabled&&t.vertex.uniforms.add("screenSizePerspective","vec4"),(e.debugDrawBorder||e.binaryHighlightOcclusionEnabled)&&t.varyings.add("debugBorderCoords","vec4"),t.attributes.add("uv0","vec2"),t.attributes.add("color","vec4"),t.attributes.add("size","vec2"),t.attributes.add("auxpos2","vec4"),t.vertex.code.add(g.glsl(x||(x=n.__makeTemplateObject(["\n void main(void) {\n ProjectHUDAux projectAux;\n vec4 posProj = projectPositionHUD(projectAux);\n\n if (rejectBySlice(projectAux.posModel)) {\n // Project outside of clip plane\n gl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n return;\n }\n vec2 inputSize;\n ","\n\n ","\n\n vec2 combinedSize = inputSize * pixelRatio;\n vec4 quadOffset = vec4(0.0);\n\n ","\n\n ","\n "],["\n void main(void) {\n ProjectHUDAux projectAux;\n vec4 posProj = projectPositionHUD(projectAux);\n\n if (rejectBySlice(projectAux.posModel)) {\n // Project outside of clip plane\n gl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n return;\n }\n vec2 inputSize;\n ","\n\n ","\n\n vec2 combinedSize = inputSize * pixelRatio;\n vec4 quadOffset = vec4(0.0);\n\n ","\n\n ","\n "])),g.glsl(e.screenSizePerspectiveEnabled?_||(_=n.__makeTemplateObject(["\n inputSize = screenSizePerspectiveScaleVec2(size, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspective);\n vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);\n "],["\n inputSize = screenSizePerspectiveScaleVec2(size, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspective);\n vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);\n "])):b||(b=n.__makeTemplateObject(["\n inputSize = size;\n vec2 screenOffsetScaled = screenOffset;"],["\n inputSize = size;\n vec2 screenOffsetScaled = screenOffset;"]))),e.vvSize?"inputSize *= vvScale(auxpos2).xx;":"",e.occlusionTestEnabled||e.binaryHighlightOcclusionEnabled?"bool visible = testVisibilityHUD(posProj);":"",e.binaryHighlightOcclusionEnabled?"voccluded = visible ? 0.0 : 1.0;":""));var r=g.glsl(S||(S=n.__makeTemplateObject(["\n vec2 uv01 = floor(uv0);\n vec2 uv = uv0 - uv01;\n quadOffset.xy = ((uv01 - anchorPos) * 2.0 * combinedSize + screenOffsetScaled) / viewport.zw * posProj.w;\n "],["\n vec2 uv01 = floor(uv0);\n vec2 uv = uv0 - uv01;\n quadOffset.xy = ((uv01 - anchorPos) * 2.0 * combinedSize + screenOffsetScaled) / viewport.zw * posProj.w;\n "]))),o=g.glsl(i?w||(w=n.__makeTemplateObject(["\n posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;"],["\n posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;"])):O||(O=n.__makeTemplateObject(["\n posProj += quadOffset;\n if (inputSize.x == size.x) {\n posProj = alignToPixelOrigin(posProj, viewport.zw);\n }"],["\n posProj += quadOffset;\n if (inputSize.x == size.x) {\n posProj = alignToPixelOrigin(posProj, viewport.zw);\n }"])));t.vertex.code.add(g.glsl(M||(M=n.__makeTemplateObject(["\n ","\n ","\n ","\n\n bool alphaDiscard = vcolor.a < ",";\n ",'\n if (alphaDiscard) {\n // "early discard" if both symbol color (= fill) and outline color (if applicable) are transparent\n gl_Position = vec4(1e38, 1e38, 1e38, 1.0);\n return;\n } else {\n ',"\n gl_Position = posProj;\n }\n\n vtc = uv * textureCoordinateScaleFactor;\n\n ","\n vsize = inputSize;\n ","\n }\n "],["\n ","\n ","\n ","\n\n bool alphaDiscard = vcolor.a < ",";\n ",'\n if (alphaDiscard) {\n // "early discard" if both symbol color (= fill) and outline color (if applicable) are transparent\n gl_Position = vec4(1e38, 1e38, 1e38, 1.0);\n return;\n } else {\n ',"\n gl_Position = posProj;\n }\n\n vtc = uv * textureCoordinateScaleFactor;\n\n ","\n vsize = inputSize;\n ","\n }\n "])),e.occlusionTestEnabled?"if (visible) {":"",r,e.vvColor?"vcolor = vvGetColor(auxpos2, vvColorValues, vvColorColors) * materialColor;":"vcolor = color / 255.0 * materialColor;",g.glsl.float(d.symbolAlphaCutoff),i?"alphaDiscard = alphaDiscard && outlineColor.a < "+g.glsl.float(d.symbolAlphaCutoff)+";":"",o,e.debugDrawBorder?"debugBorderCoords = vec4(uv01, 1.5 / combinedSize);":"",e.occlusionTestEnabled?g.glsl(P||(P=n.__makeTemplateObject(["} else { vtc = vec2(0.0);\n ",""],["} else { vtc = vec2(0.0);\n ",""])),e.debugDrawBorder?"debugBorderCoords = vec4(0.5, 0.5, 1.5 / combinedSize);}":"}"):"")),t.fragment.uniforms.add("tex","sampler2D"),i&&(t.fragment.uniforms.add("outlineColor","vec4"),t.fragment.uniforms.add("outlineSize","float"));var y=e.debugDrawBorder?g.glsl(C||(C=n.__makeTemplateObject(["(isBorder > 0.0 ? 0.0 : ",")"],["(isBorder > 0.0 ? 0.0 : ",")"])),g.glsl.float(d.defaultMaskAlphaCutoff)):g.glsl.float(d.defaultMaskAlphaCutoff),L=g.glsl(T||(T=n.__makeTemplateObject(["\n ","\n\n ","\n\n ","\n "],["\n ","\n\n ","\n\n ","\n "])),e.debugDrawBorder?g.glsl(D||(D=n.__makeTemplateObject(["\n float isBorder = float(any(lessThan(debugBorderCoords.xy, debugBorderCoords.zw)) || any(greaterThan(debugBorderCoords.xy, 1.0 - debugBorderCoords.zw)));"],["\n float isBorder = float(any(lessThan(debugBorderCoords.xy, debugBorderCoords.zw)) || any(greaterThan(debugBorderCoords.xy, 1.0 - debugBorderCoords.zw)));"]))):"",i?g.glsl(R||(R=n.__makeTemplateObject(["\n vec4 fillPixelColor = vcolor;\n\n // Attempt to sample texel centers to avoid that thin cross outlines\n // disappear with large symbol sizes.\n // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/7058#issuecomment-603041\n const float txSize = 128.0;\n const float texelSize = 1.0 / txSize;\n // Calculate how much we have to add/subtract to/from each texel to reach the size of an onscreen pixel\n vec2 scaleFactor = (vsize - txSize) * texelSize;\n vec2 samplePos = vtc + (vec2(1.0, -1.0) * texelSize) * scaleFactor;\n\n // Get distance and map it into [-0.5, 0.5]\n float d = rgba2float(texture2D(tex, samplePos)) - 0.5;\n\n // Distance in output units (i.e. pixels)\n float dist = d * vsize.x;\n\n // Create smooth transition from the icon into its outline\n float fillAlphaFactor = clamp(0.5 - dist, 0.0, 1.0);\n fillPixelColor.a *= fillAlphaFactor;\n\n if (outlineSize > 0.25) {\n vec4 outlinePixelColor = outlineColor;\n float clampedOutlineSize = min(outlineSize, 0.5*vsize.x);\n\n // Create smooth transition around outline\n float outlineAlphaFactor = clamp(0.5 - (abs(dist) - 0.5*clampedOutlineSize), 0.0, 1.0);\n outlinePixelColor.a *= outlineAlphaFactor;\n\n if (\n outlineAlphaFactor + fillAlphaFactor < "," ||\n fillPixelColor.a + outlinePixelColor.a < ","\n ) {\n discard;\n }\n\n // perform un-premultiplied over operator (see https://en.wikipedia.org/wiki/Alpha_compositing#Description)\n float compositeAlpha = outlinePixelColor.a + fillPixelColor.a * (1.0 - outlinePixelColor.a);\n vec3 compositeColor = vec3(outlinePixelColor) * outlinePixelColor.a +\n vec3(fillPixelColor) * fillPixelColor.a * (1.0 - outlinePixelColor.a);\n\n gl_FragColor = vec4(compositeColor, compositeAlpha);\n } else {\n if (fillAlphaFactor < ",") {\n discard;\n }\n\n gl_FragColor = premultiplyAlpha(fillPixelColor);\n }\n\n // visualize SDF:\n // gl_FragColor = vec4(clamp(-dist/vsize.x*2.0, 0.0, 1.0), clamp(dist/vsize.x*2.0, 0.0, 1.0), 0.0, 1.0);\n "],["\n vec4 fillPixelColor = vcolor;\n\n // Attempt to sample texel centers to avoid that thin cross outlines\n // disappear with large symbol sizes.\n // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/7058#issuecomment-603041\n const float txSize = 128.0;\n const float texelSize = 1.0 / txSize;\n // Calculate how much we have to add/subtract to/from each texel to reach the size of an onscreen pixel\n vec2 scaleFactor = (vsize - txSize) * texelSize;\n vec2 samplePos = vtc + (vec2(1.0, -1.0) * texelSize) * scaleFactor;\n\n // Get distance and map it into [-0.5, 0.5]\n float d = rgba2float(texture2D(tex, samplePos)) - 0.5;\n\n // Distance in output units (i.e. pixels)\n float dist = d * vsize.x;\n\n // Create smooth transition from the icon into its outline\n float fillAlphaFactor = clamp(0.5 - dist, 0.0, 1.0);\n fillPixelColor.a *= fillAlphaFactor;\n\n if (outlineSize > 0.25) {\n vec4 outlinePixelColor = outlineColor;\n float clampedOutlineSize = min(outlineSize, 0.5*vsize.x);\n\n // Create smooth transition around outline\n float outlineAlphaFactor = clamp(0.5 - (abs(dist) - 0.5*clampedOutlineSize), 0.0, 1.0);\n outlinePixelColor.a *= outlineAlphaFactor;\n\n if (\n outlineAlphaFactor + fillAlphaFactor < "," ||\n fillPixelColor.a + outlinePixelColor.a < ","\n ) {\n discard;\n }\n\n // perform un-premultiplied over operator (see https://en.wikipedia.org/wiki/Alpha_compositing#Description)\n float compositeAlpha = outlinePixelColor.a + fillPixelColor.a * (1.0 - outlinePixelColor.a);\n vec3 compositeColor = vec3(outlinePixelColor) * outlinePixelColor.a +\n vec3(fillPixelColor) * fillPixelColor.a * (1.0 - outlinePixelColor.a);\n\n gl_FragColor = vec4(compositeColor, compositeAlpha);\n } else {\n if (fillAlphaFactor < ",") {\n discard;\n }\n\n gl_FragColor = premultiplyAlpha(fillPixelColor);\n }\n\n // visualize SDF:\n // gl_FragColor = vec4(clamp(-dist/vsize.x*2.0, 0.0, 1.0), clamp(dist/vsize.x*2.0, 0.0, 1.0), 0.0, 1.0);\n "])),y,g.glsl.float(d.symbolAlphaCutoff),y):g.glsl(E||(E=n.__makeTemplateObject(["\n vec4 texColor = texture2D(tex, vtc, -0.5);\n if (texColor.a < ",") {\n discard;\n }\n gl_FragColor = texColor * premultiplyAlpha(vcolor);\n "],["\n vec4 texColor = texture2D(tex, vtc, -0.5);\n if (texColor.a < ",") {\n discard;\n }\n gl_FragColor = texColor * premultiplyAlpha(vcolor);\n "])),y),e.debugDrawBorder?g.glsl(A||(A=n.__makeTemplateObject(["gl_FragColor = mix(gl_FragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder);"],["gl_FragColor = mix(gl_FragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder);"]))):"");return 0===e.output&&t.fragment.code.add(g.glsl(I||(I=n.__makeTemplateObject(["\n void main() {\n ","\n }\n "],["\n void main() {\n ","\n }\n "])),L)),4===e.output&&(t.include(u.OutputHighlight),t.fragment.code.add(g.glsl(V||(V=n.__makeTemplateObject(["\n void main() {\n ","\n ","\n }\n "],["\n void main() {\n ","\n ","\n }\n "])),L,e.binaryHighlightOcclusionEnabled?g.glsl(j||(j=n.__makeTemplateObject(["\n if (voccluded == 1.0) {\n gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n } else {\n gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);\n }"],["\n if (voccluded == 1.0) {\n gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n } else {\n gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);\n }"]))):"outputHighlight();"))),t},function(e){e.bindUniforms=function(e,t,n){e.setUniform4fv("materialColor",t.color),t.textureIsSignedDistanceField&&(t.outlineColor[3]<=0||t.outlineSize<=0?(e.setUniform4fv("outlineColor",o.vec4f64.ZEROS),e.setUniform1f("outlineSize",0)):(e.setUniform4fv("outlineColor",t.outlineColor),e.setUniform1f("outlineSize",t.outlineSize)));var i=n.pixelRatio||1;e.setUniform2f("screenOffset",2*t.screenOffset[0]*i,2*t.screenOffset[1]*i),e.setUniform2fv("anchorPos",y(t))}}(t.HUDMaterial||(t.HUDMaterial={})),t.calculateAnchorPosForRendering=y;var _,b,x,S,w,O,P,M,C,D,R,E,A,T,I,j,V,L=r.vec2f64.create()}).apply(null,i))||(e.exports=r)},X5J5:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("QDcU"),n("KtQ6"),n("pcDC"),n("O7NG"),n("FbvD")],void 0===(r=(function(e,t,n,i,r,o,a,s){function l(e,t){var n=e.clone();return n.a*=t,n}function c(e,t){var n=e.clone(),i=r.toHSV(n);i.s*=t;var o=r.toRGB(i);return n.r=o.r,n.g=o.g,n.b=o.b,n}function u(e,t){if(t)for(var n in t)e[n]=t[n]}Object.defineProperty(t,"__esModule",{value:!0}),t.colors={main:new i([255,127,0]),selected:new i([255,255,255]),staged:new i([12,207,255]),outline:new i([0,0,0,.5]),selectedOutline:new i([255,255,255])};var p=function(){function e(e){this.color=t.colors.main,this.height=90,this.coneHeight=40,this.coneWidth=23,this.width=3,this.occludedMode="always",u(this,e)}return Object.defineProperty(e.prototype,"occludedFlag",{get:function(){return w(this.occludedMode)},enumerable:!0,configurable:!0}),e}(),d=function(){function e(e){this.size=11,this.outlineSize=1,this.collisionPadding=9,this.color=t.colors.main,this.outlineColor=t.colors.outline,this.occludedMode="always",this.hoverOutlineColor=t.colors.selectedOutline,u(this,e)}return Object.defineProperty(e.prototype,"renderOccludedFlag",{get:function(){return w(this.occludedMode)},enumerable:!0,configurable:!0}),e.prototype.apply=function(e,t){var n=this[e];t.setParameterValues({color:S(n),transparent:"color"!==e||n.a<1}),t.renderOccluded=this.renderOccludedFlag},e}(),h=function(e){this.vertex=new d({color:t.colors.main,outlineColor:t.colors.outline}),this.edge=new d({color:c(l(t.colors.main,2/3),.5),outlineColor:l(t.colors.outline,.5),size:8,collisionPadding:8}),this.selected=new d({color:t.colors.selected,outlineColor:t.colors.outline}),u(this,e)},f=function(){function e(e){this.color=t.colors.selected,this.width=1.5,this.stipplePattern=s.createStipplePattern([5,5]),this.stippleOffColor=t.colors.outline,this.falloff=0,this.innerWidth=1.5,this.innerColor=t.colors.selected,this.occludedMode="transparent",this.occludedLayer="default",u(this,e)}return e.prototype.apply=function(e){e.color=S(this.color),e.width=this.width,e.stipplePattern=this.stipplePattern,e.stippleOffColor=S(this.stippleOffColor),e.falloff=this.falloff,e.innerWidth=this.innerWidth,e.innerColor=S(this.innerColor),e.occludedMode=w(this.occludedMode,{layer:this.occludedLayer})},e}(),v=function(){function e(e){this.color=t.colors.selected,this.size=4,this.outlineSize=1,this.outlineColor=t.colors.outline,this.shape="square",u(this,e)}return e.prototype.apply=function(e){e.color=S(this.color),e.size=this.size,e.outlineSize=this.outlineSize,e.outlineColor=S(this.outlineColor),e.primitive=this.shape},e}(),g=function(){function e(e){this.innerColor=t.colors.selected,this.innerWidth=1,this.glowColor=t.colors.main,this.glowWidth=8,this.glowFalloff=8,this.globalAlpha=.3,this.globalAlphaContrastBoost=1.5,this.radius=3,this.heightFillColor=t.colors.main,u(this,e)}return e.prototype.apply=function(e,t){void 0===t&&(t=1);var n={glowColor:i.toUnitRGB(this.glowColor),glowFalloff:this.glowFalloff,glowWidth:this.glowWidth,innerColor:i.toUnitRGB(this.innerColor),innerWidth:this.innerWidth,globalAlpha:this.globalAlpha*t,globalAlphaContrastBoost:this.globalAlphaContrastBoost,intersectsLineRadius:this.radius};"style"in e?e.style=n:e.laserlineStyle=n},e}(),m=function(e){this.outline=new f({color:t.colors.selected,occludedMode:"transparent",occludedLayer:"foreground",stippleOffColor:t.colors.outline,stipplePattern:s.createStipplePattern([5,5]),width:1.5}),this.staged=new f({color:t.colors.selected,occludedMode:"transparent",occludedLayer:"foreground",innerColor:t.colors.staged,stippleOffColor:t.colors.outline,stipplePattern:s.createStipplePattern([5,5]),width:1.5}),this.shadowStyle=new g({globalAlpha:.3,glowColor:t.colors.main,glowFalloff:8,glowWidth:8,innerColor:t.colors.selected,innerWidth:1}),u(this,e)},y=function(e){this.outline=new v({color:t.colors.selected,outlineColor:t.colors.outline,outlineSize:1,shape:"circle",size:4}),this.shadowStyle=new g({globalAlpha:.3,glowColor:t.colors.main,glowFalloff:1.5,glowWidth:6,innerColor:t.colors.selected,innerWidth:1,radius:2}),u(this,e)},_=function(e){function t(t){var n=e.call(this)||this;return n.infinite="ground",u(n,t),n}return n.__extends(t,e),Object.defineProperty(t.prototype,"infiniteType",{get:function(){switch(this.infinite){case"single":return 1;case"double":return 2;case"ground":return 3;default:return o.neverReached(this.infinite),1}},enumerable:!0,configurable:!0}),t}(f),b=function(e){this.lineGraphics=new m,this.pointGraphics=new y,this.heightPlane=new g({globalAlpha:.3,glowColor:t.colors.main,glowFalloff:8,glowWidth:8,innerColor:t.colors.selected,innerWidth:1}),this.heightBox=new g({globalAlpha:.3,glowColor:t.colors.main,glowFalloff:8,glowWidth:8,innerColor:t.colors.selected,innerWidth:0,heightFillColor:t.colors.main}),this.zVerticalLine=new _({color:l(t.colors.main,.5),falloff:2,innerColor:l(t.colors.selected,0),occludedMode:"transparent",stipplePattern:null,width:5,infinite:"ground"}),this.laserlineAlphaMultiplier=1.5,this.heightPlaneAngleCutoff=20,u(this,e)},x=function(){function e(e){this.visualElements=new b,this.reshapeManipulators=new h,this.zManipulator=new p,u(this,e)}return e.prototype.colorToVec4=function(e){return S(e)},e}();function S(e){return a.vec4f64.fromArray(i.toUnitRGBA(e))}function w(e,t){var n=t&&"foreground"===t.layer;switch(e){case"always":return n?32:16;case"transparent":return n?8:4;case"always-transparent":return 2;default:o.neverReached(e)}return 1}t.settings=new x}).apply(null,i))||(e.exports=r)},XcBT:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("KQg4"),n("W/V4"),n("FQ4r"),n("lBa0"),n("ff/U"),n("G0ER"),n("qbr3"),n("2Kdy")],r=(function(e,t,i,r,o,a,s,l,c,u){Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initializeProgram=function(e){var n=t.shader.get().build();return new c(e.rctx,n.generateSource("vertex"),n.generateSource("fragment"),l.Default3D)},t.prototype.initializePipeline=function(){return u.makePipelineState(this.configuration.hasAlpha?{blending:u.separateBlendingParams(770,1,771,771),colorWrite:u.defaultColorWriteParams}:{colorWrite:u.defaultColorWriteParams})},t.shader=new o.ReloadableShaderModule(r,(function(){return new Promise((function(e,t){Promise.resolve().then((function(){var t=[n("KQg4")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))})),t}(a.ShaderTechnique);t.TextureTechnique=p;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasAlpha=!1,t}return i.__extends(t,e),i.__decorate([s.parameter()],t.prototype,"hasAlpha",void 0),t}(s.ShaderTechniqueConfiguration);t.TextureTechniqueConfiguration=d}).apply(null,i),void 0===r||(e.exports=r)},ZO6V:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("KY0m"),n("BcWh"),n("Rdxj"),n("W0kZ"),n("mYMs")],void 0===(r=(function(e,t,n,i,r,o,a,s){return function(e){function t(n,i,r){var a=e.call(this)||this;return a._parentStages=new Map,a._objects=new Set,a.id=t._idGen.gen(n),a.apiLayerUid=r,a.name=n,a.group=(i=i||{}).group||"",a.isVisible=null==i.isVisible||i.isVisible,a.isPickable=null==i.isPickable||i.isPickable,a.isSliceable=!1,a.translation=i.translation?o.vec3f64.clone(i.translation):o.vec3f64.create(),a}return n.__extends(t,e),t.prototype.addParentStage=function(e){if(!this._parentStages.has(e)){var t=this.on("dirty",(function(t){e.notifyDirty(t.origin,t.dirtyType,t.subObject)}));this._parentStages.set(e,t)}},t.prototype.removeParentStage=function(e){var t=this._parentStages.get(e);t&&(t.remove(),this._parentStages.delete(e)),this.invalidateSpatialQueryAccelerator()},t.prototype.getName=function(){return this.name},t.prototype.getGroup=function(){return this.group},t.prototype.getTranslation=function(){return this.translation},t.prototype.getObjectIds=function(){return i.keysOfSet(this._objects,(function(e){return e.id}))},t.prototype.getObjects=function(){return i.keysOfSet(this._objects)},t.prototype.addObject=function(e){this._objects.add(e),e.parentLayer=this,this.notifyDirty("layerObjectAdded",e),this._octree&&this._octree.add(e)},t.prototype.hasObject=function(e){return this._objects.has(e)},t.prototype.removeObject=function(e){return!!this._objects.delete(e)&&(e.parentLayer=null,this.notifyDirty("layerObjectRemoved",e),this._octree&&this._octree.remove(e),!0)},t.prototype.notifyObjectBBChanged=function(e,t){this._octree&&this._octree.update(e,t)},t.prototype.getSpatialQueryAccelerator=function(){return!this._octree&&this._objects.size>50&&this._createOctree(),this._octree},t.prototype.shaderTransformationChanged=function(){this.notifyDirty("shaderTransformationChanged",null)},t.prototype.invalidateSpatialQueryAccelerator=function(){this._octree&&(this._octree.destroy(),this._octree=null)},t.prototype.notifyDirty=function(e,t,n,i){n=n||0,this.emit("dirty",{origin:i||this,dirtyType:e,subObject:t})},t.prototype._createOctree=function(){this._octree=new s({getRadius:function(e){return e.getBSRadius()},getCenter:function(e){return e.getCenter()}}),this._octree.add(i.keysOfSet(this._objects))},t._idGen=new a.IdGen,t}(r)}).apply(null,i))||(e.exports=r)},aRjO:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("7Aei")],void 0===(r=(function(e,t,n,i){var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.HUDOcclusionPass=function(e){var t=e;t.vertex.code.add(i.glsl(r||(r=n.__makeTemplateObject(["\n void main(void) {\n vec4 posProjCenter;\n if (dot(position, position) > 0.0) {\n // Render single point to center of the pixel to avoid subpixel\n // filtering to affect the marker color\n ProjectHUDAux projectAux;\n vec4 posProj = projectPositionHUD(projectAux);\n posProjCenter = alignToPixelCenter(posProj, viewport.zw);\n\n vec3 vpos = projectAux.posModel;\n if (rejectBySlice(vpos)) {\n // Project out of clip space\n posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);\n }\n }\n else {\n // Project out of clip space\n posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);\n }\n\n gl_Position = posProjCenter;\n gl_PointSize = 1.0;\n }\n "],["\n void main(void) {\n vec4 posProjCenter;\n if (dot(position, position) > 0.0) {\n // Render single point to center of the pixel to avoid subpixel\n // filtering to affect the marker color\n ProjectHUDAux projectAux;\n vec4 posProj = projectPositionHUD(projectAux);\n posProjCenter = alignToPixelCenter(posProj, viewport.zw);\n\n vec3 vpos = projectAux.posModel;\n if (rejectBySlice(vpos)) {\n // Project out of clip space\n posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);\n }\n }\n else {\n // Project out of clip space\n posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);\n }\n\n gl_Position = posProjCenter;\n gl_PointSize = 1.0;\n }\n "])))),t.fragment.uniforms.add("color","vec4"),t.fragment.code.add(i.glsl(o||(o=n.__makeTemplateObject(["\n void main() {\n gl_FragColor = color;\n }\n "],["\n void main() {\n gl_FragColor = color;\n }\n "]))))},function(e){e.bindUniforms=function(e){e.setUniform4f("color",1,1,1,1)}}(t.HUDOcclusion||(t.HUDOcclusion={}))}).apply(null,i))||(e.exports=r)},ama6:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("51bw"),n("vlC2")],void 0===(r=(function(e,t,n,i){var r;return function(e){e.Default={vvSizeEnabled:!1,vvSizeMinSize:i.vec3f32.fromValues(1,1,1),vvSizeMaxSize:i.vec3f32.fromValues(100,100,100),vvSizeOffset:i.vec3f32.fromValues(0,0,0),vvSizeFactor:i.vec3f32.fromValues(1,1,1),vvSizeValue:i.vec3f32.fromValues(1,1,1),vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvOpacityEnabled:!1,vvOpacityValues:[0,0,0,0,0,0,0,0],vvOpacityOpacities:[1,1,1,1,1,1,1,1],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:n.mat3f64.create()}}(r||(r={})),r}).apply(null,i))||(e.exports=r)},as1Q:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY")],void 0===(r=(function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.resourceFactory=e,this._resources=null,this._hidden=!1,this._attached=!1}return e.prototype.destroy=function(){this._destroyResources()},Object.defineProperty(e.prototype,"resources",{get:function(){return n.isSome(this._resources)?this._resources.external:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hidden",{get:function(){return this._hidden},set:function(e){e!==this._hidden&&(this._hidden=e,this._syncGeometriesToRenderer())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attached",{get:function(){return this._attached},set:function(e){e!==this._attached&&(this._attached=e,this._createOrDestroyResources())},enumerable:!0,configurable:!0}),e.prototype.recreate=function(){this.attached&&this._createResources()},e.prototype.recreateGeometry=function(){this.resourceFactory.recreateGeometry?n.isNone(this._resources)||(this.ensureRenderGeometriesRemoved(),this.resourceFactory.recreateGeometry(this._resources.external),this._syncGeometriesToRenderer()):this.recreate()},e.prototype._createOrDestroyResources=function(){this._attached?n.isNone(this._resources)&&this._createResources():this._destroyResources()},e.prototype._createResources=function(){this._destroyResources();var e=this.resourceFactory.createResources();this._resources={layerView:{view:this.resourceFactory.view,notifyGraphicUpdate:function(){},watch:function(){return{remove:function(){}}}},external:e,geometriesAdded:!1},this._syncGeometriesToRenderer()},e.prototype._destroyResources=function(){n.isNone(this._resources)||(this.ensureRenderGeometriesRemoved(),this._resources=null)},e.prototype._syncGeometriesToRenderer=function(){this._hidden?this.ensureRenderGeometriesRemoved():this._hidden||this.ensureRenderGeometriesAdded()},e.prototype.ensureRenderGeometriesRemoved=function(){n.isNone(this._resources)||this._resources.geometriesAdded&&(this.resourceFactory.view.basemapTerrain.overlayManager.renderer.removeGeometries(this._resources.external.geometries,this._resources.layerView,2),this._resources.geometriesAdded=!1)},e.prototype.ensureRenderGeometriesAdded=function(){n.isNone(this._resources)||this._resources.geometriesAdded||(this.resourceFactory.view.basemapTerrain.overlayManager.renderer.addGeometries(this._resources.external.geometries,this._resources.layerView,2),this._resources.geometriesAdded=!0)},e}();t.DrapedVisualElementResources=i}).apply(null,i))||(e.exports=r)},cjy9:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("FXVB"),n("1m5D"),n("0LE5"),n("Rdxj"),n("CIzB"),n("AzkI"),n("+nCE"),n("62Ht"),n("CIy2"),n("PwS/")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d){return function(){function e(e,t,n,i,r,o,s){this.uniqueName=null,this.shaderTransformationDirty=!0,this.data=e.toRenderData(),this.boundingInfo=t,this.material=n,this.origin=null,this.center=a.vec3f64.create(),this.bsRadius=0,this.transformation=null,this.calculateShaderTransformation=r,i&&this.updateTransformation(i,o),this.castShadow=s,this.instanceParameters={highlights:null,occludees:null,visible:!0}}return e.prototype.updateTransformation=function(e,t){this.transformation=e,this.shaderTransformationDirty=!0,this.bsRadius=this.getBoundingSphere(e,t,this.center)},e.prototype.shaderTransformationChanged=function(){this.shaderTransformationDirty=!0},e.prototype.getBoundingSphere=function(e,t,n){return t=t||l.maxScale(e),o.vec3.transformMat4(n,this.boundingInfo.getCenter(),e),this.boundingInfo.getBSRadius()*t},Object.defineProperty(e.prototype,"hasShaderTransformation",{get:function(){return!!this.calculateShaderTransformation},enumerable:!0,configurable:!0}),e.prototype.getShaderTransformation=function(){return this.calculateShaderTransformation?(this.shaderTransformationDirty&&(this.shaderTransformation||(this.shaderTransformation=r.mat4f64.create()),i.mat4.copy(this.shaderTransformation,this.calculateShaderTransformation(n.unwrapOr(this.transformation,s.IDENTITY))),this.shaderTransformationDirty=!1),this.shaderTransformation):n.unwrapOr(this.transformation,s.IDENTITY)},e.prototype.computeAttachmentOrigin=function(e){if(this.material.computeAttachmentOrigin)return!!this.material.computeAttachmentOrigin(this,e)&&(n.isSome(this.transformation)&&o.vec3.transformMat4(e,e,this.transformation),!0);var t=this.getIndices(p.VertexAttrConstants.POSITION),i=this.getAttribute(p.VertexAttrConstants.POSITION);return!!c.computeAttachmentOriginTriangles(i,t,e)&&(n.isSome(this.transformation)&&o.vec3.transformMat4(e,e,this.transformation),!0)},e.prototype.getIndices=function(e){return"indices"in this.data?this.data.indices[e]:null},e.prototype.getAttribute=function(e){return"vertexAttr"in this.data?this.data.vertexAttr[e]:null},e.prototype.addHighlight=function(){var e=u.generateObject3DStateId(0),t=this.instanceParameters;return t.highlights=d.addObject3DStateID(t.highlights,e),e},e.prototype.removeHighlight=function(e){var t=this.instanceParameters;t.highlights=d.removeObject3DStateID(t.highlights,e)},e}()}).apply(null,i))||(e.exports=r)},"dl/g":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("KY0m")],void 0===(r=(function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ShaderOutputTypes=[{output:0,name:"color"},{output:1,name:"depth"},{output:2,name:"normal"},{output:3,name:"depthShadowMap"},{output:4,name:"highlight"},{output:5,name:"draped"},{output:6,name:"occlusion"}],t.getShaderOutputID=function(e,i){return e+"_"+n.find(t.ShaderOutputTypes,(function(e){return e.output===i})).name}}).apply(null,i))||(e.exports=r)},dtql:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("CqfC"),n("KwnQ"),n("W9tT"),n("DIqE"),n("21p4"),n("lRq4"),n("AzkI"),n("bz+r")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u){Object.defineProperty(t,"__esModule",{value:!0}),t.createGraphicMoveDragPipeline=function(e,t,n){var i=e.graphic,r=function(e,n){return t({action:e,graphic:i,dxScreen:n.screenDeltaX,dyScreen:n.screenDeltaY})};return n((function(e,t,n){t.next((function(e){return"start"===e.action&&r("start",e),e})).next(u.dragGraphic(i)).next((function(e){switch(e.action){case"start":case"update":(e.translationX||e.translationY||e.translationZ)&&r("update",e);break;case"end":r("end",e)}return e})),n.next(u.resetGraphic(i)).next((function(){r("end",{screenDeltaX:0,screenDeltaY:0})}))}))},t.primaryShapeOrientation=function(e){if(n.isNone(e)||"polyline"!==e.type&&"polygon"!==e.type)return 0;var t=s.convexHull(e),r=t&&t.rings&&t.rings[0];if(!r)return 0;!function(e){for(var t=0,n=0,i=0,r=e;i<r.length;i++){var o=r[i];t+=o[0],n+=o[1]}t/=e.length,n/=e.length;for(var a=0,s=e;a<s.length;a++)(o=s[a])[0]-=t,o[1]-=n}(r);for(var a=[],u=0;u<r.length-1;u++){var f=Math.atan2(r[u+1][1]-r[u][1],r[u+1][0]-r[u][0]),v=c.cyclical2PI.normalize(f)%(Math.PI/2);a.push(v)}for(var g=a.sort((function(e,t){return e-t})),m=null,y=0,_=Number.POSITIVE_INFINITY,b=0,x=g;b<x.length;b++)if((f=x[b])!==m){m=f,i.mat2.fromRotation(p,f),l.empty(d);for(var S=0,w=r;S<w.length;S++)o.vec2.transformMat2(h,w[S],p),l.expandPointInPlace(d,h);var O=l.area(d);((O>_?_/O:O/_)>=.99&&f<y||O<_)&&(y=f,_=O)}return y};var p=r.mat2f64.create(),d=l.create(),h=a.vec2f64.create()}).apply(null,i))||(e.exports=r)},eHCP:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("Rdxj")],void 0===(r=(function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.fromVector=function(e,t){return{vec3:n.vec3f64.clone(e),id:t}},t.fromValues=function(e,t,i,r){return{vec3:n.vec3f64.fromValues(e,t,i),id:r}}}).apply(null,i))||(e.exports=r)},fOZq:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("sSIw"),n("yVFQ")],void 0===(r=(function(e,t,n,i,r){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this._meterUnitOffset=0,this._renderUnitOffset=0,this._unit="meters",this._metersPerElevationInfoUnit=1,this._featureExpressionInfoContext=null,this.centerPointInElevationSR=null,this.mode=null}return Object.defineProperty(e.prototype,"featureExpressionInfoContext",{get:function(){return this._featureExpressionInfoContext},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"meterUnitOffset",{get:function(){return this._meterUnitOffset},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unit",{get:function(){return this._unit},set:function(e){this._unit=e,this._metersPerElevationInfoUnit=i.getMetersPerUnit(e)},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this.mode=null,this._meterUnitOffset=0,this._renderUnitOffset=0,this._featureExpressionInfoContext=null,this.unit="meters"},Object.defineProperty(e.prototype,"offsetMeters",{set:function(e){this._meterUnitOffset=e,this._renderUnitOffset=0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsetElevationInfoUnits",{set:function(e){this._meterUnitOffset=e*this._metersPerElevationInfoUnit,this._renderUnitOffset=0},enumerable:!0,configurable:!0}),e.prototype.addOffsetRenderUnits=function(e){this._renderUnitOffset+=e},e.prototype.geometryZWithOffset=function(e,t){var n=this.calculateOffsetRenderUnits(t);return null!=this.featureExpressionInfoContext?n:e+n},e.prototype.calculateOffsetRenderUnits=function(e){var t=this._meterUnitOffset,n=this.featureExpressionInfoContext;return null!=n&&(t+=r.execute(n)*this._metersPerElevationInfoUnit),t/e.unitInMeters+this._renderUnitOffset},e.prototype.setFromElevationInfo=function(e){this.mode=e.mode,this.unit=e.unit||"meters",this.offsetElevationInfoUnits=n.unwrapOr(e.offset,0)},e.prototype.updateFeatureExpressionInfoContext=function(e,t,i){if(n.isNone(e))this._featureExpressionInfoContext=null;else{var o=e&&e.arcade;o&&n.isSome(t)&&n.isSome(i)?(this._featureExpressionInfoContext=r.clone(e),r.setContextFeature(this._featureExpressionInfoContext,r.createFeature(o.modules,t,i))):this._featureExpressionInfoContext=e}},e.fromElevationInfo=function(t){var i=new e;return n.isSome(t)&&i.setFromElevationInfo(t),i},e}();t.ElevationContext=o}).apply(null,i))||(e.exports=r)},fQ2U:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("O7NG"),n("fese"),n("3kdR"),n("W/V4"),n("FQ4r"),n("lBa0"),n("ff/U"),n("NiJV"),n("G0ER"),n("qbr3"),n("2Kdy")],r=(function(e,t,i,r,o,a,s,l,c,u,p,d,h){Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initializeProgram=function(e){var n=t.shader.get(),i=this.configuration,r=n.build({slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:i.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1});return new d(e.rctx,r.generateSource("vertex"),r.generateSource("fragment"),u.Default3D)},t.prototype.bindPass=function(e,t,n){var i=t.color,r=t.shadingTint;this.program.setUniform4fv("color",i),this.program.setUniform4fv("shadedColor",this.blendColor(g,r,i)),this.program.setUniform3fv("shadingDirection",t.shadingDirection),this.program.setUniformMatrix4fv("viewNormal",n.viewInvTransp)},t.prototype.blendColor=function(e,t,n){var i=1-t[3],r=t[3]+n[3]*i;return 0===r?(e[3]=r,e):(e[0]=(t[0]*t[3]+n[0]*n[3]*i)/r,e[1]=(t[1]*t[3]+n[1]*n[3]*i)/r,e[2]=(t[2]*t[3]+n[2]*n[3]*i)/r,e[3]=n[3],e)},t.prototype.bindDraw=function(e){a.Transform.bindUniforms(this.program,e),o.Slice.bindUniformsWithOrigin(this.program,this.configuration,e)},t.prototype.initializePipeline=function(){var e,t=this.configuration,n=0===t.output?t.transparent&&h.separateBlendingParams(770,1,771,771):null;return h.makePipelineState({blending:n,culling:(e=t.cullFace,0!==e&&{face:1===e?1028:1029,mode:2305}),depthTest:{func:515},depthWrite:t.writeDepth&&h.defaultDepthWriteParams,colorWrite:h.defaultColorWriteParams})},t.shader=new s.ReloadableShaderModule(p,(function(){return new Promise((function(e,t){Promise.resolve().then((function(){var t=[n("NiJV")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))})),t}(l.ShaderTechnique);t.ShadedColorMaterialTechnique=f;var v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.output=0,t.cullFace=0,t.slicePlaneEnabled=!1,t.sliceHighlightDisabled=!1,t.transparent=!1,t.writeDepth=!0,t}return i.__extends(t,e),i.__decorate([c.parameter({count:7})],t.prototype,"output",void 0),i.__decorate([c.parameter({count:3})],t.prototype,"cullFace",void 0),i.__decorate([c.parameter()],t.prototype,"slicePlaneEnabled",void 0),i.__decorate([c.parameter()],t.prototype,"sliceHighlightDisabled",void 0),i.__decorate([c.parameter()],t.prototype,"transparent",void 0),i.__decorate([c.parameter()],t.prototype,"writeDepth",void 0),t}(c.ShaderTechniqueConfiguration);t.ShadedColorMaterialTechniqueConfiguration=v;var g=r.vec4f64.create()}).apply(null,i),void 0===r||(e.exports=r)},fUJJ:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("xoE+"),n("W/V4"),n("FQ4r"),n("lBa0"),n("ff/U"),n("qSzK"),n("G0ER"),n("qbr3"),n("qbr3"),n("2Kdy")],r=(function(e,t,i,r,o,a,s,l,c,u,p,d){Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initializeProgram=function(e){var n=t.shader.get().build(this.configuration);return new u(e.rctx,n.generateSource("vertex"),n.generateSource("fragment"),l.Default3D)},t.prototype.bind=function(e,t){this.program.setUniform3fv("innerColor",e.innerColor),this.program.setUniform1f("innerWidth",e.innerWidth*t.pixelRatio),this.program.setUniform3fv("glowColor",e.glowColor),this.program.setUniform1f("glowWidth",e.glowWidth*t.pixelRatio),this.program.setUniform1f("glowFalloff",e.glowFalloff),this.program.setUniform1f("globalAlpha",e.globalAlpha),this.configuration.contrastControlEnabled&&this.program.setUniform1f("globalAlphaContrastBoost",null!=e.globalAlphaContrastBoost?e.globalAlphaContrastBoost:1);var n=null!=e.angleCutoff?e.angleCutoff:c.defaultAngleCutoff;this.program.setUniform2f("angleCutoff",Math.cos(n),Math.cos(Math.max(0,n-r.deg2rad(2)))),this.configuration.intersectsLineEnabled&&this.program.setUniform1f("perScreenPixelRatio",t.perScreenPixelRatio)},t.prototype.initializePipeline=function(){return d.makePipelineState({blending:p.simpleBlendingParams(1,771),colorWrite:d.defaultColorWriteParams})},t.shader=new o.ReloadableShaderModule(c,(function(){return new Promise((function(e,t){Promise.resolve().then((function(){var t=[n("qSzK")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))})),t}(a.ShaderTechnique);t.LaserlineTechnique=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.heightManifoldEnabled=!1,t.pointDistanceEnabled=!1,t.lineVerticalPlaneEnabled=!1,t.intersectsLineEnabled=!1,t.contrastControlEnabled=!1,t}return i.__extends(t,e),i.__decorate([s.parameter()],t.prototype,"heightManifoldEnabled",void 0),i.__decorate([s.parameter()],t.prototype,"pointDistanceEnabled",void 0),i.__decorate([s.parameter()],t.prototype,"lineVerticalPlaneEnabled",void 0),i.__decorate([s.parameter()],t.prototype,"intersectsLineEnabled",void 0),i.__decorate([s.parameter()],t.prototype,"contrastControlEnabled",void 0),t}(s.ShaderTechniqueConfiguration);t.LaserlineTechniqueConfiguration=f}).apply(null,i),void 0===r||(e.exports=r)},gG9S:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("0LE5"),n("Rdxj"),n("DJpR"),n("MzcX"),n("2B1V"),n("raiv")],void 0===(r=(function(e,t,n,i,r,o,a,s,l){Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e){this._renderCoordsHelper=e,this._buffers=null,this._origin=r.vec3f64.create(),this._dirty=!1,this._count=0,this._vao=null}return Object.defineProperty(e.prototype,"vertices",{set:function(e){for(var t=new Float64Array(3*e.length),n=0,i=0,r=e;i<r.length;i++){var o=r[i];t[n++]=o[0],t[n++]=o[1],t[n++]=o[2]}this.buffers=[t]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"buffers",{set:function(e){if(this._buffers=e,this._buffers.length>0){var t=this._buffers[0],n=3*Math.floor(t.length/3/2);i.vec3.set(this._origin,t[n+0],t[n+1],t[n+2])}else i.vec3.set(this._origin,0,0,0);this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"origin",{get:function(){return this._origin},enumerable:!0,configurable:!0}),e.prototype.draw=function(e){var t=this.ensureVAO(e);n.isSome(t)&&(e.bindVAO(t),e.drawArrays(4,0,this._count))},e.prototype.dispose=function(){n.isSome(this._vao)&&this._vao.dispose()},e.prototype.ensureVAO=function(e){return n.isNone(this._buffers)?null:(n.isNone(this._vao)&&(this._vao=this.createVAO(e,this._buffers)),this.ensureVertexData(this._vao,this._buffers),this._vao)},e.prototype.createVAO=function(e,t){var n=this.createDataBuffer(t);return this._dirty=!1,new o.VertexArrayObject(e,l.LaserlinePathTechnique.attributeLocations,{data:a.glLayout(d)},{data:o.BufferObject.createVertex(e,35044,n)})},e.prototype.ensureVertexData=function(e,t){if(this._dirty){var n=this.createDataBuffer(t);e.vertexBuffers.data.setData(n),this._dirty=!1}},e.prototype.numberOfRenderVertices=function(e){return 2*(e.length/3-1)*3},e.prototype.createDataBuffer=function(e){var t=this,n=e.reduce((function(e,n){return e+t.numberOfRenderVertices(n)}),0);this._count=n;for(var r=d.createBuffer(n),o=this._origin,a=0,s=0,l=0,c=e;l<c.length;l++){for(var h=c[l],f=0;f<h.length;f+=3){var v=i.vec3.set(p,h[f+0],h[f+1],h[f+2]);0===f?s=this._renderCoordsHelper.getAltitude(v):this._renderCoordsHelper.setAltitude(s,v);var g=this._renderCoordsHelper.worldUpAtPosition(v,u),m=a+2*f,y=i.vec3.subtract(p,v,o);if(f<h.length-3){r.up.setVec(m,g),r.up.setVec(m+3,g),r.up.setVec(m+5,g);for(var _=0;_<6;_++)r.start.setVec(m+_,y);r.extrude.setValues(m+0,0,-1),r.extrude.setValues(m+1,1,-1),r.extrude.setValues(m+2,1,1),r.extrude.setValues(m+3,0,-1),r.extrude.setValues(m+4,1,1),r.extrude.setValues(m+5,0,1)}if(f>0)for(r.up.setVec(m-2,g),r.up.setVec(m-4,g),r.up.setVec(m-5,g),_=-6;_<0;_++)r.end.setVec(m+_,y)}a+=this.numberOfRenderVertices(h)}return r.buffer},e}();t.LaserlinePathData=c;var u=r.vec3f64.create(),p=r.vec3f64.create(),d=s.newLayout().vec3f("start").vec3f("end").vec3f("up").vec2f("extrude")}).apply(null,i))||(e.exports=r)},hADE:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("xoE+"),n("LxLY"),n("rusB"),n("0LE5"),n("Rdxj"),n("3Zlx"),n("HbaO"),n("/9Lg"),n("mmEe"),n("ij3I"),n("AgDx"),n("SNs2")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h){function f(e,t,n){for(var i=new Array,r=0,o=e;r<o.length;r++){var a=o[r],s=a.count;if(!(s<=1)){var l=3*a.index,c=l+3*s;i.push({position:t.subarray(l,c),mapPosition:n?n.subarray(l,c):void 0})}}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.createGeometryData=function(e){var t={},a={};!function(e,t,n){for(var i=e.attributeData.position,o=(p=i)[0]===p[(d=p.length)-3]&&p[1]===p[d-2]&&p[2]===p[d-1]&&1===e.removeDuplicateStartEnd,a=i.length/3-(o?1:0),s=new Uint32Array(2*(a-1)),l=o?r.slice(i,0,i.length-3):i,c=0,u=0;u<a-1;u++)s[c++]=u,s[c++]=u+1;var p,d;t[h.RibbonVertexAttributeConstants.POSITION]={size:3,data:l,offsetIdx:0,strideIdx:3},n[h.RibbonVertexAttributeConstants.POSITION]=s}(e,a,t);var s=new Uint32Array(t[h.RibbonVertexAttributeConstants.POSITION].length);return function(e,t,n){var r=e.attributeData.mapPosition;i.isNone(r)||(n.mapPos=n[h.RibbonVertexAttributeConstants.POSITION],t.mapPos={size:3,data:r,offsetIdx:0,strideIdx:3})}(e,a,t),function(e,t,n,r){i.isSome(e.attributeData.colorFeature)||(t[h.RibbonVertexAttributeConstants.COLOR]={size:4,data:i.unwrapOr(e.attributeData.color,l.WHITE_UNIT),offsetIdx:0,strideIdx:4},n[h.RibbonVertexAttributeConstants.COLOR]=r)}(e,a,t,s),function(e,t,n,r){i.isSome(e.attributeData.sizeFeature)||(t[h.RibbonVertexAttributeConstants.SIZE]={size:1,data:new Float32Array([i.unwrapOr(e.attributeData.size,1)]),offsetIdx:0,strideIdx:1},n[h.RibbonVertexAttributeConstants.SIZE]=r)}(e,a,t,s),function(e,t,n,r){var o=e.attributeData.colorFeature;i.isNone(o)||(t[h.RibbonVertexAttributeConstants.COLORFEATUREATTRIBUTE]={size:1,data:new Float32Array([o]),offsetIdx:0,strideIdx:1},n[h.RibbonVertexAttributeConstants.COLOR]=r)}(e,a,t,s),function(e,t,n,r){var o=e.attributeData.sizeFeature;i.isNone(o)||(t[h.RibbonVertexAttributeConstants.SIZEFEATUREATTRIBUTE]={size:1,data:new Float32Array([o]),offsetIdx:0,strideIdx:1},n[h.RibbonVertexAttributeConstants.SIZEFEATUREATTRIBUTE]=r)}(e,a,t,s),function(e,t,n,r){var o=e.attributeData.opacityFeature;i.isNone(o)||(t[h.RibbonVertexAttributeConstants.OPACITYFEATUREATTRIBUTE]={size:1,data:new Float32Array([o]),offsetIdx:0,strideIdx:1},n[h.RibbonVertexAttributeConstants.OPACITYFEATUREATTRIBUTE]=r)}(e,a,t,s),function(e,t,r){if("round"===e.join){var a=t[h.RibbonVertexAttributeConstants.POSITION].data,s=a.length/3,l=new Float32Array(s),c=v,u=g;o.vec3.set(c,0,0,0);for(var p=i.unwrapOr(e.uniformSize,1),d=-1;d<s;++d){var f=d<0?s+d:d,y=(d+1)%s;if(o.vec3.set(u,a[3*y+0]-a[3*f+0],a[3*y+1]-a[3*f+1],a[3*y+2]-a[3*f+2]),o.vec3.normalize(u,u),d>=0){var _=(Math.PI-n.acosClamped(o.vec3.dot(c,u)))*m*1*(1.863798+-2.0062872/Math.pow(1+p/18.2313,.8856294));l[d]=Math.max(Math.floor(_),0)}o.vec3.scale(c,u,-1)}t[h.RibbonVertexAttributeConstants.SUBDIVISIONS]={size:1,data:l,offsetIdx:0,strideIdx:1},r[h.RibbonVertexAttributeConstants.SUBDIVISIONS]=r[h.RibbonVertexAttributeConstants.POSITION]}}(e,a,t),new d.GeometryData(a,t,"line")},t.geometryToRenderInfo=function(e,t,n,i){var r=s.pathsToTriangulationInfo("polygon"===e.type?e.rings:e.paths,e.hasZ,"polygon"===e.type?1:0),o=r.position,a=r.outlines,l=new Float64Array(o.length),u=c.applyPerVertexElevationAlignment(o,e.spatialReference,0,l,0,o,0,o.length/3,t,n,i),p=null!=u;return{lines:p?f(a,o,l):[],projectionSuccess:p,sampledElevation:u}},t.geometryToRenderInfoDraped=function(e,t){for(var n=s.pathsToTriangulationInfo("polygon"===e.type?e.rings:e.paths,!1,"polygon"===e.type?1:0),i=n.position,r=n.outlines,o=u.bufferToBuffer(i,e.spatialReference,0,i,t,0,i.length/3),a=2;a<i.length;a+=3)i[a]=p.DRAPED_Z;return{lines:o?f(r,i):[],projectionSuccess:o}};var v=a.vec3f64.create(),g=a.vec3f64.create(),m=4/Math.PI}).apply(null,i))||(e.exports=r)},hX2R:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("xoE+"),n("LxLY"),n("DIqE"),n("0LE5"),n("Rdxj"),n("2fXB"),n("O7NG"),n("aWgr"),n("gG9S"),n("/Bau"),n("CIy2"),n("s6rJ"),n("raiv"),n("fUJJ")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v){Object.defineProperty(t,"__esModule",{value:!0});var g=a.vec3f64.create(),m=l.vec4f64.create(),y={glowColor:[1,.5,0],glowWidth:8,glowFalloff:8,innerColor:[1,1,1],innerWidth:1,globalAlpha:.75,angleCutoff:n.deg2rad(6),globalAlphaContrastBoost:2};function _(e,t,n,i){var r=g,a=m;o.vec3.transformMat4(r,t,i),o.vec3.copy(a,n),a[3]=0,s.vec4.transformMat4(a,a,i),c.plane.fromPositionAndNormal(r,a,e)}var b=function(){function e(e,t,n){void 0===t&&(t={}),void 0===n&&(n={contrastControlEnabled:!1}),this._technique=null,this._projInfo=l.vec4f64.create(),this._zScale=r.vec2f64.create(),this._heightManifoldEnabled=!1,this._heightManifoldTarget=a.vec3f64.create(),this._pointDistanceEnabled=!1,this._pointDistanceOrigin=a.vec3f64.create(),this._pointDistanceTarget=a.vec3f64.create(),this._lineVerticalPlaneEnabled=!1,this._lineVerticalPlaneSegment=c.lineSegment.create(),this._intersectsLineEnabled=!1,this._intersectsLineSegment=c.lineSegment.create(),this._intersectsLineRadius=3,this._intersectsLineInfinite=!1,this._pathVerticalPlaneEnabled=!1,this._pathVerticalPlaneData=null,this._pathTechnique=null,this.canRender=!0,this._tempNormal=a.vec3f64.create(),this._tempDir=a.vec3f64.create(),this._tempUp=a.vec3f64.create(),this._tempVec3A=a.vec3f64.create(),this._tempVec3B=a.vec3f64.create(),this._tempVec4=l.vec4f64.create(),this._tempPlane=c.plane.create(),this._tempSphere=c.sphere.create(),this._renderCoordsHelper=e,this._params=h.copyParameters(t,y),this._config=n}return Object.defineProperty(e.prototype,"renderSlots",{get:function(){return[this._config.contrastControlEnabled?17:16]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"needsLinearDepth",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"heightManifoldEnabled",{get:function(){return this._heightManifoldEnabled},set:function(e){this._heightManifoldEnabled!==e&&(this._heightManifoldEnabled=e,this._requestRender())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"heightManifoldTarget",{get:function(){return this._heightManifoldTarget},set:function(e){o.vec3.copy(this._heightManifoldTarget,e),this._requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointDistanceEnabled",{get:function(){return this._pointDistanceEnabled},set:function(e){e!==this._pointDistanceEnabled&&(this._pointDistanceEnabled=e,this._requestRender())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointDistanceTarget",{get:function(){return this._pointDistanceTarget},set:function(e){o.vec3.copy(this._pointDistanceTarget,e),this._requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointDistanceOrigin",{get:function(){return this._pointDistanceOrigin},set:function(e){o.vec3.copy(this._pointDistanceOrigin,e),this._requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineVerticalPlaneEnabled",{get:function(){return this._lineVerticalPlaneEnabled},set:function(e){e!==this._lineVerticalPlaneEnabled&&(this._lineVerticalPlaneEnabled=e,this._requestRender())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineVerticalPlaneSegment",{get:function(){return this._lineVerticalPlaneSegment},set:function(e){c.lineSegment.copy(e,this._lineVerticalPlaneSegment),this._requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intersectsLineEnabled",{get:function(){return this._intersectsLineEnabled},set:function(e){e!==this._intersectsLineEnabled&&(this._intersectsLineEnabled=e,this._requestRender())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intersectsLineSegment",{get:function(){return this._intersectsLineSegment},set:function(e){c.lineSegment.copy(e,this._intersectsLineSegment),this._requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intersectsLineRadius",{get:function(){return this._intersectsLineRadius},set:function(e){e!==this._intersectsLineRadius&&(this._intersectsLineRadius=e,this._requestRender())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intersectsLineInfinite",{get:function(){return this._intersectsLineInfinite},set:function(e){e!==this._intersectsLineInfinite&&(this._intersectsLineInfinite=e,this._requestRender())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathVerticalPlaneEnabled",{get:function(){return this._pathVerticalPlaneEnabled},set:function(e){e!==this._pathVerticalPlaneEnabled&&(this._pathVerticalPlaneEnabled=e,i.isSome(this._pathVerticalPlaneData)&&this._requestRender())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathVerticalPlaneVertices",{set:function(e){i.isNone(this._pathVerticalPlaneData)&&(this._pathVerticalPlaneData=new u.LaserlinePathData(this._renderCoordsHelper)),this._pathVerticalPlaneData.vertices=e,this.pathVerticalPlaneEnabled&&this._requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathVerticalPlaneBuffers",{set:function(e){i.isNone(this._pathVerticalPlaneData)&&(this._pathVerticalPlaneData=new u.LaserlinePathData(this._renderCoordsHelper)),this._pathVerticalPlaneData.buffers=e,this.pathVerticalPlaneEnabled&&this._requestRender()},enumerable:!0,configurable:!0}),e.prototype.setParameterValues=function(e){h.updateParameters(this._params,e)&&this._requestRender()},e.prototype.initializeRenderContext=function(e){this._initContext=e,this._quadVAO=p.createQuadVAO(e.rctx),this._techniqueRepository=e.shaderTechniqueRep,this._techniqueConfig=new v.LaserlineTechniqueConfiguration,this._pathTechniqueConfig=new f.LaserlinePathTechniqueConfiguration},e.prototype.uninitializeRenderContext=function(){this._quadVAO.dispose(),this._quadVAO=null,i.isSome(this._technique)&&this._techniqueRepository.release(this._technique),i.isSome(this._pathVerticalPlaneData)&&this._pathVerticalPlaneData.dispose(),i.isSome(this._pathTechnique)&&this._techniqueRepository.release(this._pathTechnique)},e.prototype.render=function(e){var t=this.heightManifoldEnabled||this.pointDistanceEnabled||this.lineVerticalPlaneSegment||this.intersectsLineEnabled,n=this.pathVerticalPlaneEnabled;if(!t&&!n)return!0;var i=e.camera;return d.inverseProjectionInfo(i.projectionMatrix,i.fullWidth,i.fullHeight,this._projInfo,this._zScale),t&&this.renderUnified(e),n&&this.renderPath(e),!0},e.prototype.renderUnified=function(e){var t=e.rctx,n=this._selectTechnique(),i=n.program;t.bindProgram(i),n.bindPipelineState(t),this.bindGlobalUniforms(e,i),this.bindHeightManifoldUniforms(e,i),this.bindPointDistanceUniforms(e,i),this.bindLineVerticalPlaneUniforms(e,i),this.bindIntersectsLineUniforms(e,i),n.bind(this._params,e.camera),t.bindVAO(this._quadVAO),t.drawArrays(5,0,4)},e.prototype.renderPath=function(e){if(!i.isNone(this._pathVerticalPlaneData)){this._pathTechniqueConfig.contrastControlEnabled=this._config.contrastControlEnabled,this._pathTechnique=this._techniqueRepository.acquireAndReleaseExisting(f.LaserlinePathTechnique,this._pathTechniqueConfig,this._pathTechnique);var t=e.rctx,n=this._pathTechnique,r=n.program;t.bindProgram(r),n.bindPipelineState(t),this.bindGlobalUniforms(e,r),n.bind(this._params,this._pathVerticalPlaneData.origin,e.camera),this._pathVerticalPlaneData.draw(e.rctx)}},e.prototype.bindHeightManifoldUniforms=function(e,t){if(this.heightManifoldEnabled){var n=this._tempVec3A,i=this._tempPlane;this._renderCoordsHelper.worldUpAtPosition(this._heightManifoldTarget,n),_(i,this._heightManifoldTarget,n,e.camera.viewMatrix),t.setUniform4fv("heightPlane",i)}},e.prototype.bindPointDistanceUniforms=function(e,t){if(this._pointDistanceEnabled){var n=e.camera,i=this._tempSphere;o.vec3.copy(i.center,this._pointDistanceOrigin),o.vec3.transformMat4(i.center,i.center,n.viewMatrix),i.radius=o.vec3.distance(this._pointDistanceOrigin,this._pointDistanceTarget),t.setUniform4f("pointDistanceSphere",i.center[0],i.center[1],i.center[2],i.radius)}},e.prototype.bindLineVerticalPlaneUniforms=function(e,t){if(this._lineVerticalPlaneEnabled){var n=this._renderCoordsHelper,i=e.camera,r=this._tempPlane,a=this._tempVec3A,s=this._tempUp,l=this._tempDir,u=this._tempNormal;c.lineSegment.pointAt(this._lineVerticalPlaneSegment,.5,a),n.worldUpAtPosition(a,s),o.vec3.normalize(l,this._lineVerticalPlaneSegment.vector),o.vec3.cross(u,s,l),o.vec3.normalize(u,u),_(r,this._lineVerticalPlaneSegment.origin,u,i.viewMatrix),t.setUniform4fv("lineVerticalPlane",r);var p=this._tempVec3A;o.vec3.copy(p,this._lineVerticalPlaneSegment.origin),n.setAltitude(0,p),o.vec3.transformMat4(p,p,i.viewMatrix),t.setUniform3fv("lineVerticalStart",p);var d=this._tempVec3B;o.vec3.add(d,this._lineVerticalPlaneSegment.origin,this._lineVerticalPlaneSegment.vector),n.setAltitude(0,d),o.vec3.transformMat4(d,d,i.viewMatrix),t.setUniform3fv("lineVerticalEnd",d)}},e.prototype.bindIntersectsLineUniforms=function(e,t){if(this._intersectsLineEnabled){var n=S,i=w;if(this._intersectsLineInfinite){var r=e.camera;if(c.clipRay.fromRay(c.ray.wrap(this._intersectsLineSegment.origin,this._intersectsLineSegment.vector),x),x.c0=-Number.MAX_VALUE,!c.frustum.intersectClipRay(r.frustum.planes,x))return;c.clipRay.getStart(x,n),c.clipRay.getEnd(x,i)}else o.vec3.copy(n,this._intersectsLineSegment.origin),o.vec3.add(i,this._intersectsLineSegment.origin,this._intersectsLineSegment.vector);var a=this._tempVec3A;o.vec3.transformMat4(a,n,e.camera.viewMatrix),t.setUniform3fv("intersectsLineStart",a);var l=this._tempVec4;o.vec3.copy(l,this._intersectsLineSegment.vector),this._tempVec4[3]=0,s.vec4.transformMat4(this._tempVec4,this._tempVec4,e.camera.viewMatrix),o.vec3.transformMat4(i,i,e.camera.viewMatrix),t.setUniform3fv("intersectsLineEnd",i),o.vec3.normalize(l,l),t.setUniform3f("intersectsLineDirection",l[0],l[1],l[2]),t.setUniform1f("intersectsLineRadius",this._intersectsLineRadius)}},e.prototype.bindGlobalUniforms=function(e,t){var n=e.camera;t.setUniform4fv("projInfo",this._projInfo),t.setUniform2fv("zScale",this._zScale),t.setUniform2f("nearFar",n.near,n.far),this._heightManifoldEnabled?t.setUniform1f("maxPixelDistance",2*n.computeScreenPixelSizeAt(this._heightManifoldTarget)):this._pointDistanceEnabled?t.setUniform1f("maxPixelDistance",2*n.computeScreenPixelSizeAt(this._pointDistanceTarget)):this._lineVerticalPlaneEnabled&&t.setUniform1f("maxPixelDistance",2*n.computeScreenPixelSizeAt(this._lineVerticalPlaneSegment.origin)),t.setUniform1i("depthMap",0),e.rctx.bindTexture(e.offscreenRenderingHelper.linearDepthTexture,0),t.setUniform1i("frameColor",1),e.rctx.bindTexture(e.offscreenRenderingHelper.mainColorTexture,1)},e.prototype._requestRender=function(){this._initContext&&this._initContext.requestRender()},e.prototype._selectTechnique=function(){return this._techniqueConfig.heightManifoldEnabled=this.heightManifoldEnabled,this._techniqueConfig.lineVerticalPlaneEnabled=this.lineVerticalPlaneEnabled,this._techniqueConfig.pointDistanceEnabled=this.pointDistanceEnabled,this._techniqueConfig.intersectsLineEnabled=this.intersectsLineEnabled,this._techniqueConfig.contrastControlEnabled=this._config.contrastControlEnabled,this._technique=this._techniqueRepository.acquireAndReleaseExisting(v.LaserlineTechnique,this._techniqueConfig,this._technique),this._technique},e}();t.LaserLineRenderer=b;var x=c.clipRay.create(),S=a.vec3f64.create(),w=a.vec3f64.create()}).apply(null,i))||(e.exports=r)},hk44:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("6vp1"),n("58az"),n("7Aei")],void 0===(r=(function(e,t,n,i,r,o){var a,s,l,c,u,p;Object.defineProperty(t,"__esModule",{value:!0}),t.Laserline=function(e,t){e.extensions.add("GL_OES_standard_derivatives"),e.include(i.ReadLinearDepth),e.include(r.CameraSpace),e.fragment.uniforms.add("glowColor","vec3"),e.fragment.uniforms.add("glowWidth","float"),e.fragment.uniforms.add("glowFalloff","float"),e.fragment.uniforms.add("innerColor","vec3"),e.fragment.uniforms.add("innerWidth","float"),e.fragment.uniforms.add("depthMap","sampler2D"),e.fragment.uniforms.add("nearFar","vec2"),e.fragment.uniforms.add("frameColor","sampler2D"),t.contrastControlEnabled&&e.fragment.uniforms.add("globalAlphaContrastBoost","float"),e.fragment.code.add(o.glsl(a||(a=n.__makeTemplateObject(["\n vec4 blendPremultiplied(vec4 source, vec4 dest) {\n float oneMinusSourceAlpha = 1.0 - source.a;\n\n return vec4(\n source.rgb + dest.rgb * oneMinusSourceAlpha,\n source.a + dest.a * oneMinusSourceAlpha\n );\n }\n "],["\n vec4 blendPremultiplied(vec4 source, vec4 dest) {\n float oneMinusSourceAlpha = 1.0 - source.a;\n\n return vec4(\n source.rgb + dest.rgb * oneMinusSourceAlpha,\n source.a + dest.a * oneMinusSourceAlpha\n );\n }\n "])))),e.fragment.code.add(o.glsl(s||(s=n.__makeTemplateObject(["\n vec4 premultipliedColor(vec3 rgb, float alpha) {\n return vec4(rgb * alpha, alpha);\n }\n "],["\n vec4 premultipliedColor(vec3 rgb, float alpha) {\n return vec4(rgb * alpha, alpha);\n }\n "])))),e.fragment.code.add(o.glsl(l||(l=n.__makeTemplateObject(["\n vec4 laserlineProfile(float dist) {\n if (dist > glowWidth) {\n return vec4(0.0);\n }\n\n float innerAlpha = (1.0 - smoothstep(0.0, innerWidth, dist));\n float glowAlpha = pow(max(0.0, 1.0 - dist / glowWidth), glowFalloff);\n\n return blendPremultiplied(\n premultipliedColor(innerColor, innerAlpha),\n premultipliedColor(glowColor, glowAlpha)\n );\n }\n "],["\n vec4 laserlineProfile(float dist) {\n if (dist > glowWidth) {\n return vec4(0.0);\n }\n\n float innerAlpha = (1.0 - smoothstep(0.0, innerWidth, dist));\n float glowAlpha = pow(max(0.0, 1.0 - dist / glowWidth), glowFalloff);\n\n return blendPremultiplied(\n premultipliedColor(innerColor, innerAlpha),\n premultipliedColor(glowColor, glowAlpha)\n );\n }\n "])))),e.fragment.code.add(o.glsl(c||(c=n.__makeTemplateObject(["\n bool laserlineReconstructFromDepth(out vec3 pos, out vec3 normal, out float depthDiscontinuityAlpha) {\n float depth = linearDepthFromTexture(depthMap, uv, nearFar);\n\n if (-depth == nearFar[0]) {\n return false;\n }\n\n pos = reconstructPosition(gl_FragCoord.xy, depth);\n normal = normalize(cross(dFdx(pos), dFdy(pos)));\n\n float ddepth = fwidth(depth);\n depthDiscontinuityAlpha = 1.0 - smoothstep(0.0, 0.01, -ddepth / depth);\n\n return true;\n }\n "],["\n bool laserlineReconstructFromDepth(out vec3 pos, out vec3 normal, out float depthDiscontinuityAlpha) {\n float depth = linearDepthFromTexture(depthMap, uv, nearFar);\n\n if (-depth == nearFar[0]) {\n return false;\n }\n\n pos = reconstructPosition(gl_FragCoord.xy, depth);\n normal = normalize(cross(dFdx(pos), dFdy(pos)));\n\n float ddepth = fwidth(depth);\n depthDiscontinuityAlpha = 1.0 - smoothstep(0.0, 0.01, -ddepth / depth);\n\n return true;\n }\n "])))),e.fragment.code.add(o.glsl(t.contrastControlEnabled?u||(u=n.__makeTemplateObject(["\n float rgbToLuminance(vec3 color) {\n return dot(vec3(0.2126, 0.7152, 0.0722), color);\n }\n\n vec4 laserlineOutput(vec4 color) {\n float backgroundLuminance = rgbToLuminance(texture2D(frameColor, uv).rgb);\n float alpha = clamp(globalAlpha * max(backgroundLuminance * globalAlphaContrastBoost, 1.0), 0.0, 1.0);\n\n return color * alpha;\n }\n "],["\n float rgbToLuminance(vec3 color) {\n return dot(vec3(0.2126, 0.7152, 0.0722), color);\n }\n\n vec4 laserlineOutput(vec4 color) {\n float backgroundLuminance = rgbToLuminance(texture2D(frameColor, uv).rgb);\n float alpha = clamp(globalAlpha * max(backgroundLuminance * globalAlphaContrastBoost, 1.0), 0.0, 1.0);\n\n return color * alpha;\n }\n "])):p||(p=n.__makeTemplateObject(["\n vec4 laserlineOutput(vec4 color) {\n return color * globalAlpha;\n }\n "],["\n vec4 laserlineOutput(vec4 color) {\n return color * globalAlpha;\n }\n "]))))}}).apply(null,i))||(e.exports=r)},hkmr:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("1m5D"),n("0LE5"),n("Rdxj"),n("Z4y+"),n("mmEe"),n("ys4y"),n("AgDx"),n("ZO6V"),n("eHCP"),n("ZJC8"),n("CIy2"),n("RC9r")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f){var v=0,g=function(){function e(){this.ROOT_ORIGIN_ID="rg_root_"+v++,this._origins=new Map,this._gridSize=42e5}return e.prototype.getOrigin=function(t){var i=this._origins.get(this.ROOT_ORIGIN_ID);if(null==i){if(n.isSome(e.testOrigin)){var o=e.testOrigin;return this._origins.set(this.ROOT_ORIGIN_ID,p.fromValues(o[0],o[1],o[2],this.ROOT_ORIGIN_ID)),this.getOrigin(t)}var a=p.fromValues(t[0]+Math.random()-.5,t[1]+Math.random()-.5,t[2]+Math.random()-.5,this.ROOT_ORIGIN_ID);return this._origins.set(this.ROOT_ORIGIN_ID,a),a}r.vec3.subtract(m,t,i.vec3),m[0]=Math.abs(m[0]),m[1]=Math.abs(m[1]),m[2]=Math.abs(m[2]);var s=this._gridSize;if(m[0]<s&&m[1]<s&&m[2]<s)return i;var l=Math.round(t[0]/s),c=Math.round(t[1]/s),u=Math.round(t[2]/s),d="rg_"+l+"/"+c+"/"+u,h=this._origins.get(d);return h||(h=p.fromValues(l*s,c*s,u*s,d),this._origins.set(d,h)),h},e.prototype._drawOriginBox=function(e){var t=window.view,n=t._stage;if(null==this._object){this._material=new f({width:2,color:[0,1,0,1]},"GridLocalOriginMaterial"),n.add(3,this._material);var r=new u("GridLocalOrigin",{isPickable:!1});n.add(0,r),this._object=new d({idHint:"GridLocalOrigin",castShadow:!1}),n.add(1,this._object),r.addObject(this._object),n.addToViewContent([r.id])}for(var o=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],p=o.length,v=new Float32Array(3*p),g=new Uint32Array(2*(p-1)),m=.5*this._gridSize,y=0;y<p;y++)v[3*y+0]=e[0]+(1&o[y]?m:-m),v[3*y+1]=e[1]+(2&o[y]?m:-m),v[3*y+2]=e[2]+(4&o[y]?m:-m),y>0&&(g[2*y+0]=y-1,g[2*y+1]=y);s.bufferToBuffer(v,a.WebMercator,0,v,t.spatialReference,0,p);var _={};_[h.VertexAttrConstants.POSITION]={size:3,data:v};var b={};b[h.VertexAttrConstants.POSITION]=g;var x=new c.GeometryData(_,b,"line"),S=new l(x,"GridLocalOriginBox");n.add(2,S),this._object.addGeometry(S,this._material,i.mat4f64.IDENTITY),console.log(this._origins.size,e)},e}(),m=o.vec3f64.create();return function(e){e.testOrigin=null}(g||(g={})),g}).apply(null,i))||(e.exports=r)},hs8d:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("7Aei")],void 0===(r=(function(e,t,n,i){var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.AlignPixel=function(e){var t=i.glsl(r||(r=n.__makeTemplateObject(["\n vec4 alignToPixelCenter(vec4 clipCoord, vec2 widthHeight) {\n vec2 xy = vec2(0.500123) + 0.5 * clipCoord.xy / clipCoord.w;\n vec2 pixelSz = vec2(1.0) / widthHeight;\n vec2 ij = (floor(xy * widthHeight) + vec2(0.5)) * pixelSz;\n vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;\n return vec4(result, clipCoord.zw);\n }\n "],["\n vec4 alignToPixelCenter(vec4 clipCoord, vec2 widthHeight) {\n vec2 xy = vec2(0.500123) + 0.5 * clipCoord.xy / clipCoord.w;\n vec2 pixelSz = vec2(1.0) / widthHeight;\n vec2 ij = (floor(xy * widthHeight) + vec2(0.5)) * pixelSz;\n vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;\n return vec4(result, clipCoord.zw);\n }\n "]))),a=i.glsl(o||(o=n.__makeTemplateObject(["\n\n vec4 alignToPixelOrigin(vec4 clipCoord, vec2 widthHeight) {\n vec2 xy = vec2(0.5) + 0.5 * clipCoord.xy / clipCoord.w;\n vec2 pixelSz = vec2(1.0) / widthHeight;\n vec2 ij = floor((xy + 0.5 * pixelSz) * widthHeight) * pixelSz;\n vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;\n return vec4(result, clipCoord.zw);\n }\n "],["\n\n vec4 alignToPixelOrigin(vec4 clipCoord, vec2 widthHeight) {\n vec2 xy = vec2(0.5) + 0.5 * clipCoord.xy / clipCoord.w;\n vec2 pixelSz = vec2(1.0) / widthHeight;\n vec2 ij = floor((xy + 0.5 * pixelSz) * widthHeight) * pixelSz;\n vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;\n return vec4(result, clipCoord.zw);\n }\n "])));e.vertex.code.add(t),e.vertex.code.add(a),e.fragment.code.add(t),e.fragment.code.add(a)}}).apply(null,i))||(e.exports=r)},i10q:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("xoE+"),n("LxLY"),n("0LE5"),n("Rdxj"),n("2fXB"),n("O7NG"),n("WRgd"),n("2W+Z"),n("/9Lg"),n("fOZq"),n("J2BX"),n("mmEe"),n("JjCO"),n("ys4y"),n("4ziW"),n("yqrJ"),n("CIy2"),n("xFEL")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_){Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(e){var t=this;this.view=null,this._geometry=null,this._size=3,this._color=s.vec4f64.fromValues(1,0,1,1),this._primitive="square",this._outlineSize=1,this._outlineColor=s.vec4f64.fromValues(1,1,1,1),this._elevationInfo=null,this.resources=new c.VisualElementResources({view:e.view,createResources:function(e){return t.createResources(e)},recreateGeometry:function(e,n){return e.geometry=t.recreateGeometry(n,e.material),i.isSome(e.geometry)?[e.geometry]:[]}});var n=!0;for(var r in e)r in this?"attached"===r?n=e[r]:this[r]=e[r]:console.error("Cannot set unknown property",r);this.attached=n}return e.prototype.destroy=function(){this.resources.destroy()},Object.defineProperty(e.prototype,"hidden",{get:function(){return this.resources.hidden},set:function(e){this.resources.hidden=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attached",{get:function(){return this.resources.attached},set:function(e){this.resources.attached=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},set:function(e){this._geometry=e,this.resources.recreateGeometry()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},set:function(e){if(e!==this._size){var t=this.preferredTextureSize;this._size=e,t<this.preferredTextureSize?i.isSome(this.resources)&&this.resources.recreate():this.updateSizeAttribute()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){a.vec4.exactEquals(e,this._color)||(a.vec4.copy(this._color,e),this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primitive",{get:function(){return this._primitive},set:function(e){this._primitive!==e&&(this._primitive=e,i.isSome(this.resources)&&this.resources.recreate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineSize",{get:function(){return this._outlineSize},set:function(e){e!==this._outlineSize&&(this._outlineSize=e,this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineColor",{get:function(){return this._outlineColor},set:function(e){a.vec4.exactEquals(e,this._outlineColor)||(a.vec4.copy(this._outlineColor,e),this.updateMaterial())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elevationInfo",{get:function(){return this._elevationInfo},set:function(e){this._elevationInfo=e,this.resources&&this.resources.recreateGeometry()},enumerable:!0,configurable:!0}),e.prototype.updateMaterial=function(){var e=this.resources.resources;i.isNone(e)||e.material.setParameterValues(this.materialParameters(e.texture.id))},e.prototype.updateSizeAttribute=function(){var e=this.resources.resources,t=this.resources.object;if(!i.isNone(e)&&!i.isNone(t)){var n=e.geometry;if(!i.isNone(n)){var r=n.data.getVertexAttr()[y.VertexAttrConstants.SIZE].data,o=this.geometrySize;r[0]=o,r[1]=o,t.geometryVertexAttrsUpdated(0)}}},e.prototype.materialParameters=function(e){return{color:this._color,textureIsSignedDistanceField:!0,distanceFieldBoundingBox:S,occlusionTest:!1,outlineColor:this._outlineColor,outlineSize:this._outlineSize,textureId:e,polygonOffset:!1,shaderPolygonOffset:0,drawInSecondSlot:!0,depthEnabled:!1}},Object.defineProperty(e.prototype,"geometrySize",{get:function(){return this._size/x},enumerable:!0,configurable:!0}),e.prototype.recreateGeometry=function(e,t){var n=this.createRenderGeometry();return i.isSome(n)&&e.addGeometry(n,t),n},e.prototype.createResources=function(e){var t=this.createTexture(),n=new _.default(this.materialParameters(t.id),"pointVisualElement");n.renderOccluded=8;var r=this.recreateGeometry(e,n);return{material:n,texture:t,geometry:r,forEach:function(e){e(t),e(n),i.isSome(this.geometry)&&e(this.geometry)}}},Object.defineProperty(e.prototype,"preferredTextureSize",{get:function(){return n.clamp(n.nextHighestPowerOfTwo(2*this.geometrySize),16,128)},enumerable:!0,configurable:!0}),e.prototype.createTexture=function(){var e=this.preferredTextureSize;return new m(d.createType(this._primitive,e,e*x),"pointVisualElement",{mipmap:!1,wrap:{s:33071,t:33071},width:e,height:e,components:4,noUnpackFlip:!0})},e.prototype.calculateMapBounds=function(e){if(i.isNone(this.resources.resources)||i.isNone(this.resources.resources.geometry))return!1;var t=this.resources.resources.geometry.data.getAttribute("position");return h.vectorToVector(t.data,this.view.renderCoordsHelper.spatialReference,w,this.view.spatialReference),l.expandWithBuffer(e,w),!0},e.prototype.createRenderGeometry=function(){var e=this.geometry;if(i.isNone(e))return null;var t=this.view.renderCoordsHelper,n=u.evaluateElevationAlignmentAtPoint(e,this.view.elevationProvider,p.ElevationContext.fromElevationInfo(this.elevationInfo),t),o=r.vec3.set(f.sv3d.get(),e.x,e.y,n),a=f.sv3d.get();h.vectorToVector(o,e.spatialReference,a,t.spatialReference);var s=this.geometrySize,l=g.createPointGeometry(null,a,null,[s,s],[0,0,0,1]);return new v(l)},e}();t.PointVisualElement=b;var x=.5,S=[x/2,x/2,1-x/2,1-x/2],w=o.vec3f64.create()}).apply(null,i))||(e.exports=r)},ij3I:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("Gtr7"),n("eIBl"),n("qsST"),n("R2Zq"),n("LxLY"),n("KBgh"),n("ULaq"),n("8MXS"),n("Vx27"),n("FXVB"),n("Rdxj"),n("Dk48"),n("GDWR"),n("y68M"),n("KRuQ"),n("RsYQ"),n("FU3N"),n("/Bau"),n("hkmr"),n("9DjX"),n("Raj5"),n("FLCf"),n("Px2u"),n("XcBT"),n("qUb7"),n("QDiq"),n("FbvD"),n("/f24"),n("Zp3t"),n("Kfys")],r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x,S,w,O,P,M,C,D,R,E,A,T){Object.defineProperty(t,"__esModule",{value:!0});var I=o.getLogger("esri.views.3d.webgl-engine.lib.OverlayRenderer"),j=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._hasHighlights=!1,t._rendersOccluded=!1,t._hasWater=!1,t._lighting=new D.SceneLighting,t._localOrigins=new x,t._handles=new r,t._layerRenderers=new Map,t._sortedLayerRenderersDirty=!1,t._sortedLayerRenderers=new l,t._stats=new O.RenderStatsAggregator,t._geometries=new Map,t._renderTargets={},t._uniqueIdx=0,t.longitudeCyclical=null,t}return n.__extends(i,e),i.prototype.initialize=function(){var e=this;this._rctx=this.renderView.renderingContext,this._renderContext=new w(this._rctx,null,null,null,null,null),this._stippleTextureRepository=new R.StippleTextureRepository,this.waterTextureRepository=this.renderView.waterTextureRepository,this._shaderTechniqueRepository=new g.ShaderTechniqueRepository({rctx:this._rctx,viewingMode:1,commonUniformStore:new v.CommonUniformStore,stippleTextureRepository:this._stippleTextureRepository,waterTextureRepository:this.waterTextureRepository}),u.init(this.waterTextureRepository,"loadingState",(function(){return e.emitContentChanged()})),this._materialRepository=new _(this.renderView.textureRepository,this._shaderTechniqueRepository),this._materialRepository.onMaterialChanged=function(n){(n.renderOccluded&t.overlayRenderOccludedFlag)>0!==e._rendersOccluded&&e.updateRendersOccluded(),e.emitContentChanged(),e.notifyChange("updating")},this._compositingHelper=this.renderView.compositingHelper,this._bindParameters={slot:null,fovY:0,highlightDepthTexture:b.createEmptyDepthTexture(this._rctx),nearFar:[z.near,z.far],origin:null,pixelRatio:null,proj:null,shadowMappingEnabled:!1,slicePlane:null,ssaoEnabled:!1,view:null,viewInvTransp:null,viewport:null,hasOccludees:!1,linearDepthTexture:null,linearDepthTextureID:0,lastFrameColorTexture:null,lastFrameColorTextureID:0,reprojectionMat:null,ssrViewMat:null,rpProjectionMat:null,ssrEnabled:!1},this._lighting.set({lights:[new C.AmbientLight(h.vec3f64.fromValues(1,1,1))],groundLightingFactor:1,globalFactor:0})},i.prototype.dispose=function(){for(var e in this._handles.destroy(),this._layerRenderers.forEach((function(e){return e.dispose()})),this._layerRenderers.clear(),this._renderTargets)this._renderTargets[e].dispose();this._renderTargets=null,this._bindParameters.highlightDepthTexture.dispose(),this._bindParameters.highlightDepthTexture=null,this._shaderTechniqueRepository.dispose(),this._shaderTechniqueRepository=null},i.prototype.disposeRenderTarget=function(e){var t=this._renderTargets[e];t&&t.dispose(),delete this._renderTargets[e]},Object.defineProperty(i.prototype,"updating",{get:function(){return this._sortedLayerRenderersDirty||a.someMap(this._layerRenderers,(function(e){return e.updating}))||this.waterTextureRepository.updating},enumerable:!0,configurable:!0}),i.prototype.commitChanges=function(){var e=this,t=!1;this._layerRenderers.forEach((function(n,i){n.commitChanges()&&(t=!0),n.isEmpty&&(e._layerRenderers.delete(i),e._sortedLayerRenderersDirty=!0,e._handles.remove(i))})),this._sortedLayerRenderersDirty&&(this.updateSortedLayerRenderers(),t=!0),this.notifyChange("updating"),t&&(this.emitContentChanged(),this.updateHasHighlights(),this.updateRendersOccluded(),this.updateHasWater())},i.prototype.getRenderTargetTexture=function(e){var t=this._renderTargets[e];return t?t.colorTexture:null},i.prototype.addGeometries=function(e,t,n){for(var i=0,r=e;i<r.length;i++){var o=r[i];null==o.origin&&(o.origin=this._localOrigins.getOrigin(o.center)),o.uniqueName||(o.uniqueName="ov:"+this._uniqueIdx++),this._geometries.set(o.uniqueName,o)}this.ensureLayerRenderer(t).add(e),2===n&&this.notifyGraphicUpdate(e,t,2)},i.prototype.removeGeometries=function(e,t,n){for(var i=0,r=e;i<r.length;i++)this._geometries.delete(r[i].uniqueName);var o=this._layerRenderers.get(t);o?(o.remove(e),2===n&&this.notifyGraphicUpdate(e,t,2)):I.warn("Attempted to remove geometry for nonexistent layer")},i.prototype.updateGeometries=function(e,t,n){var i=this._layerRenderers.get(t);i?(i.modify(e,n),this.notifyUpdateGeometries(e,t,n)):I.warn("Attempted to update geometry for nonexistent layer")},i.prototype.notifyUpdateGeometries=function(e,t,n){this.notifyGraphicUpdate(e,t,4===n||2===n?2:1===n?1:0)},i.prototype.notifyGraphicUpdate=function(e,t,n){if(0!==n)for(var i=-1,r=0,o=e;r<o.length;r++){var a=o[r].data.graphicUid;a!==i&&(t.notifyGraphicUpdate(a,n),i=a)}},i.prototype.updateHighlights=function(e,t){var n=this._layerRenderers.get(t);n?n.modify(e,8):I.warn("Attempted to update highlights for nonexistent layer")},i.prototype.isEmpty=function(){return 0===this._geometries.size&&!f.OVERLAY_DRAW_DEBUG_TEXTURE},Object.defineProperty(i.prototype,"hasHighlights",{get:function(){return this._hasHighlights},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasWater",{get:function(){return this._hasWater},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rendersOccluded",{get:function(){return this._rendersOccluded},enumerable:!0,configurable:!0}),i.prototype.updateLogic=function(e){var t=!1;return this._layerRenderers.forEach((function(n){n.updateLogic(e)&&(t=!0)})),t},i.prototype.updateLayerOrder=function(){this._sortedLayerRenderersDirty=!0},i.prototype.draw=function(e,t){return this.drawPass(0,e,t)},i.prototype.drawWithoutRasterImage=function(e,t){return this.drawPass(0,e,t,2)},i.prototype.drawNormals=function(e,t){return this.drawPass(2,e,t)},i.prototype.drawHighlights=function(e,t){return this.drawPass(4,e,t)},i.prototype.drawOccluded=function(e,t){return this.drawPass(0,e,t,1)},i.prototype.drawPass=function(e,n,i,r){var o=this;if(void 0===r&&(r=0),0===i.numViews)return!1;if(this._pixelRatio=i.pixelRatio*Math.abs(i.views[0].extent[2]-i.views[0].extent[0])/Math.abs(i.views[0].viewport[2]-i.views[0].viewport[0]),this.isEmpty()||4===e&&!this.hasHighlights||2===e&&!this.hasWater)return!1;if(!this.hasNonZeroSizedView(i))return!1;var a=i.width,l=i.height,c=this._renderTargets[n];if(!c)return!1;c.resize(a,l);var u=this._rctx,p=z;if(p.pixelRatio=i.pixelRatio||1,this._renderContext.pass=e,this._bindParameters.pixelRatio=p.pixelRatio,u.bindFramebuffer(c),u.setClearColor(0,0,0,0),u.clearSafe(16384),this.updateLightingUniforms(),1===r&&(this._renderContext.renderOccludedMask=t.overlayRenderOccludedFlag),f.OVERLAY_DRAW_DEBUG_TEXTURE&&1!==r)for(var d=0;d<i.numViews;d++)this.setViewParameters(i.views[d],p),this.drawDebugTexture(a,l,L[i.index%L.length]);return this._layerRenderers.size>0&&this._sortedLayerRenderers.forEach((function(t){var n=t.layerView,d=t.renderer;if(2!==r||!s.isSome(n)||0!==n.drapeSourceType){var h=s.isSome(n)&&s.isSome(n.fullOpacity)&&n.fullOpacity<1&&0===e;h&&(o.bindTemporaryFramebuffer(a,l),u.clearSafe(16384));for(var f=0;f<i.numViews;f++)o.setViewParameters(i.views[f],p),d.draw(o._renderContext,o._bindParameters,o._stats);h&&(u.bindFramebuffer(c),o._compositingHelper.composite(o.temporaryTexture,2,s.unwrap(s.unwrap(n).fullOpacity)))}})),u.bindFramebuffer(null),c.colorTexture.descriptor.hasMipmap&&c.colorTexture.generateMipmap(),this._renderContext.resetRenderOccludedMask(),!0},i.prototype.createRenderTarget=function(e,t){for(var n=e,i=0;this._renderTargets[n];)n=e+"_"+ ++i;return this._renderTargets[n]=new E(this._rctx,{colorTarget:0,depthStencilTarget:0},{target:3553,pixelFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9987,hasMipmap:t,maxAnisotropy:8,width:0,height:0}),n},i.prototype.disposeRenderTargetMemory=function(e){var t=this._renderTargets[e];t&&t.resize(0,0)},i.prototype.bindTemporaryFramebuffer=function(e,t){s.isNone(this._temporaryRenderTargetId)&&(this._temporaryRenderTargetId=this.createRenderTarget("temp",!1));var n=this._renderTargets[this._temporaryRenderTargetId];n.resize(e,t),this._rctx.bindFramebuffer(n)},Object.defineProperty(i.prototype,"temporaryTexture",{get:function(){return this._renderTargets[s.unwrap(this._temporaryRenderTargetId)].colorTexture},enumerable:!0,configurable:!0}),i.prototype.getGpuMemoryUsage=function(){var e=0;for(var t in this._renderTargets)e+=T.getGpuMemoryUsage(this._renderTargets[t]);return e},i.prototype.getStats=function(){return this._stats.getAggregatedStats()},i.prototype.hotReloadShaders=function(){return n.__awaiter(this,void 0,void 0,(function(){return n.__generator(this,(function(e){switch(e.label){case 0:return[4,this._shaderTechniqueRepository.hotReload()];case 1:return e.sent(),[2]}}))}))},i.prototype.intersect=function(e,t,n){var i=this,r=0;this._geometries.forEach((function(o){if(!n||n(o)){i.intersectRenderGeometry(o,t,0,e,r);var a=i.longitudeCyclical;a&&(o.center[0]-o.bsRadius<a.min&&i.intersectRenderGeometry(o,t,a.range,e,r),o.center[0]+o.bsRadius>a.max&&i.intersectRenderGeometry(o,t,-a.range,e,r)),r++}}))},i.prototype.intersectRenderGeometry=function(e,t,n,i,r){var o=this,a=0;s.isSome(e.transformation)&&(n+=e.transformation[12],a=e.transformation[13]),G[0]=t[0]-n,G[1]=t[1]-a,G[2]=1,U[0]=t[0]-n,U[1]=t[1]-a,U[2]=0,e.pixelRatio=this._pixelRatio,e.material.intersect(e,null,e.getShaderTransformation(),i,G,U,(function(t,n,a){o.addIntersectionResult(a,e.material.renderPriority,r,i,e.data.layerUid,e.data.graphicUid)}),e.calculateShaderTransformation,!0)},i.prototype.addIntersectionResult=function(e,t,n,i,r,o){var a={type:"external",metadata:{layerUid:r,graphicUid:o}},s=function(r){r.set(a,null,i.results.ground.dist,i.results.ground.normal,i.results.ground.transformation,t,null,null,e,n),r.intersector="OverlayRenderer"};if((null==i.results.min.drapedLayerOrder||t>=i.results.min.drapedLayerOrder)&&(null==i.results.min.dist||i.results.ground.dist<=i.results.min.dist)&&s(i.results.min),0!==i.options.store&&(null==i.results.max.drapedLayerOrder||t<i.results.max.drapedLayerOrder)&&(null==i.results.max.dist||i.results.ground.dist>i.results.max.dist)&&s(i.results.max),2===i.options.store){var l=new S.IntersectorResult(i.ray);s(l),i.results.all.push(l)}},i.prototype.stopAnimationsAtTime=function(e){this._sortedLayerRenderers.forEach((function(t){return t.renderer.stopAnimationsAtTime(e)}))},i.prototype.ensureLayerRenderer=function(e){var t=this,n=this._layerRenderers.get(e);return n||(n=new P.SortedRenderGeometryRenderer({rctx:this._rctx,materialRepository:this._materialRepository}),this._layerRenderers.set(e,n),this._sortedLayerRenderersDirty=!0,this._handles.add([e.watch("fullOpacity",(function(){return t.emitContentChanged()})),u.init(n,"updating",(function(){return t.notifyChange("updating")}))],e)),n},i.prototype.updateSortedLayerRenderers=function(){var e=this;if(this._sortedLayerRenderersDirty&&(this._sortedLayerRenderersDirty=!1,this._sortedLayerRenderers.clear(),0!==this._layerRenderers.size)){var t=a.firstKeyOfMap(this._layerRenderers).view.allLayerViews,n=c.SetFromValues(a.valuesOfMap(this._layerRenderers));t.forEach((function(t){var i=t,r=e._layerRenderers.get(i);r&&(e._sortedLayerRenderers.push(new V(i,r)),n.delete(r))})),n.forEach((function(t){e._sortedLayerRenderers.push(new V(null,t))}))}},i.prototype.setViewParameters=function(e,t){t.viewport=e.viewport;var n=e.extent;d.mat4.ortho(t.projectionMatrix,0,n[2]-n[0],0,n[3]-n[1],t.near,t.far),d.mat4.identity(t.viewMatrix),d.mat4.translate(t.viewMatrix,t.viewMatrix,[-e.extent[0],-e.extent[1],0]),t.setGLViewport(this._rctx),this._renderContext.camera=t,this._bindParameters.view=t.viewMatrix,this._bindParameters.proj=t.projectionMatrix,this._bindParameters.viewInvTransp=t.viewInverseTransposeMatrix,this._bindParameters.viewport=t.fullViewport,this._shaderTechniqueRepository.getProgramsUsingUniform("proj").forEach((function(e){e.setUniformMatrix4fv("proj",t.projectionMatrix)}))},i.prototype.updateLightingUniforms=function(){var e=this;this._shaderTechniqueRepository.getProgramsUsingUniform("lightingMainDirection").forEach((function(t){e._lighting.setUniforms(t)}))},i.prototype.hasNonZeroSizedView=function(e){for(var t=0;t<e.numViews;t++){var n=e.views[t];if(n.extent[0]!==n.extent[2]&&n.extent[1]!==n.extent[3])return!0}return!1},i.prototype.emitContentChanged=function(){this.onContentChanged&&this.onContentChanged()},i.prototype.updateHasWater=function(){var e=a.someMap(this._layerRenderers,(function(e){return e.hasWater}));e!==this._hasWater&&(this._hasWater=e)},i.prototype.updateHasHighlights=function(){var e=a.someMap(this._layerRenderers,(function(e){return e.hasHighlights}));e!==this._hasHighlights&&(this._hasHighlights=e,this.onHasHighlightsChanged&&this.onHasHighlightsChanged(this._hasHighlights))},i.prototype.updateRendersOccluded=function(){var e=a.someMap(this._layerRenderers,(function(e){return e.rendersOccluded}));e!==this._rendersOccluded&&(this._rendersOccluded=e,this.onRendersOccludedChanged&&this.onRendersOccludedChanged(this.rendersOccluded))},i.prototype.drawDebugTexture=function(e,t,n){var i=this._rctx;this.ensureDebugPatternResources(e,t);var r=this._debugPatternProgram;i.bindProgram(r),i.setPipelineState(this._debugPatternPipelineState),r.setUniform4f("color",n[0],n[1],n[2],1),r.setUniform1i("tex",0),i.bindTexture(this._debugPatternTexture,0),i.bindVAO(this._quadVAO),i.drawArrays(5,0,T.vertexCount(this._quadVAO,"geometry"))},i.prototype.ensureDebugPatternResources=function(e,t){if(!this._debugPatternTexture){for(var n=new Uint8Array(e*t*4),i=0,r=0;r<t;r++)for(var o=0;o<e;o++){var a=Math.floor(o/10),s=Math.floor(r/10);a<2||s<2||10*a>e-20||10*s>t-20?(n[i++]=255,n[i++]=255,n[i++]=255,n[i++]=255):(n[i++]=255,n[i++]=255,n[i++]=255,n[i++]=1&a&&1&s?1&o^1&r?0:255:1&a^1&s?0:128)}this._debugPatternTexture=new A(this._rctx,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,width:e,height:t},n);var l=new M.TextureTechniqueConfiguration;l.hasAlpha=!0,this._debugTextureTechnique=this._shaderTechniqueRepository.acquireAndReleaseExisting(M.TextureTechnique,l,this._debugTextureTechnique),this._debugPatternProgram=this._debugTextureTechnique.program,this._debugPatternPipelineState=this._debugTextureTechnique.pipeline,this._quadVAO=b.createQuadVAO(this._rctx)}},Object.defineProperty(i.prototype,"test",{get:function(){return{layerRenderers:this._layerRenderers}},enumerable:!0,configurable:!0}),n.__decorate([m.autoDispose()],i.prototype,"_shaderTechniqueRepository",void 0),n.__decorate([m.autoDispose()],i.prototype,"_stippleTextureRepository",void 0),n.__decorate([p.property(),m.autoDispose()],i.prototype,"waterTextureRepository",void 0),n.__decorate([p.property()],i.prototype,"renderView",void 0),n.__decorate([p.property({type:Boolean,readOnly:!0,dependsOn:["waterTextureRepository.updating"]})],i.prototype,"updating",null),n.__decorate([p.subclass("esri.views.3d.terrain.OverlayRenderer")],i)}(m.AutoDisposableMixin(i));t.OverlayRenderer=j;var V=function(e,t){this.layerView=e,this.renderer=t},L=[[1,.5,.5],[.5,.5,1],[.5,1,.5]],z=new y.default;z.near=1,z.far=1e4;var G=h.vec3f64.create(),U=h.vec3f64.create();t.DRAPED_Z=-2,t.overlayRenderOccludedFlag=4}).apply(null,i),void 0===r||(e.exports=r)},j2SP:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("3gjc")],void 0===(r=(function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.vec4f32=n}).apply(null,i))||(e.exports=r)},mYMs:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("SyoC"),n("KBgh"),n("0LE5"),n("Rdxj"),n("aWgr"),n("CIy2")],void 0===(r=(function(e,t,n,i,r,o,a,s){var l=function(){function e(e,t){this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._objectCount=0,this._objectToBoundingSphere=e,t&&(void 0!==t.maximumObjectsPerNode&&(this._maximumObjectsPerNode=t.maximumObjectsPerNode),void 0!==t.maximumDepth&&(this._maximumDepth=t.maximumDepth)),this._root=new c(null,o.vec3f64.fromValues(0,0,0),0)}return Object.defineProperty(e.prototype,"center",{get:function(){return this._root.center},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return 2*this._root.halfSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this._root.node},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumObjectsPerNode",{get:function(){return this._maximumObjectsPerNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumDepth",{get:function(){return this._maximumDepth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"objectCount",{get:function(){return this._objectCount},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._degenerateObjects.clear(),this._root=null,c.clearPool(),_[0]=null,P.prune(),A.prune(),T.prune()},e.prototype.add=function(e,t){var n=b(e);this._objectCount+=t=null==t?n.length:t,this._grow(n,t);for(var i=c.acquire(),r=0;r<t;r++){var o=n[r];this._isDegenerate(o)?this._degenerateObjects.add(o):(i.init(this._root),this._add(o,i))}c.release(i)},e.prototype.remove=function(e,t){var n=b(e);this._objectCount-=n.length;for(var i=c.acquire(),r=0,o=n;r<o.length;r++){var a=o[r],s=t||this._boundingSphereFromObject(a,M);this._isValidRadius(s.radius)?(i.init(this._root),this._remove(a,s,i)):this._degenerateObjects.delete(a)}c.release(i),this._shrink()},e.prototype.update=function(e,t){!this._isValidRadius(t.radius)&&this._isDegenerate(e)||(this.remove(e,t),this.add(e))},e.prototype.forEachAlongRay=function(e,t,n){var i=this,r=a.ray.wrap(e,t);this._forEachNode(this._root,(function(e){if(!i._intersectsNode(r,e))return!1;var t=e.node;return t.terminals.forEach((function(e){i._intersectsObject(r,e)&&n(e)})),null!==t.residents&&t.residents.forEach((function(e){i._intersectsObject(r,e)&&n(e)})),!0}))},e.prototype.forEachAlongRayWithVerticalOffset=function(e,t,n,i){var r=this,o=a.ray.wrap(e,t);this._forEachNode(this._root,(function(e){if(!r._intersectsNodeWithOffset(o,e,i))return!1;var t=e.node;return t.terminals.forEach((function(e){r._intersectsObjectWithOffset(o,e,i)&&n(e)})),null!==t.residents&&t.residents.forEach((function(e){r._intersectsObjectWithOffset(o,e,i)&&n(e)})),!0}))},e.prototype.forEach=function(e){this._forEachNode(this._root,(function(t){var n=t.node;return n.terminals.forEach(e),null!==n.residents&&n.residents.forEach(e),!0})),this._degenerateObjects.forEach(e)},e.prototype.forEachDegenerateObject=function(e){this._degenerateObjects.forEach(e)},e.prototype.findClosest=function(e,t,n,i,r){return this._findClosest(e,"front-to-back"===t?1:-1,n,i,r)},e.prototype.forEachInDepthRange=function(e,t,n,i,r,o,a,s){this._forEachInDepthRange(e,t,"front-to-back"===n?1:-1,i,r,o,a,s)},e.prototype.forEachNode=function(e){this._forEachNode(this._root,(function(t){return e(t.node,t.center,2*t.halfSize)}))},e.prototype._intersectsNode=function(e,t){return d(t.center,2*-t.halfSize,w),d(t.center,2*t.halfSize,O),s.rayBoxTest(e.origin,e.direction,w,O)},e.prototype._intersectsNodeWithOffset=function(e,t,n){return d(t.center,2*-t.halfSize,w),d(t.center,2*t.halfSize,O),n.applyToMinMax(w,O),s.rayBoxTest(e.origin,e.direction,w,O)},e.prototype._intersectsObject=function(e,t){var n=this._objectToBoundingSphere.getRadius(t);return!(n>0)||a.sphere.intersectsRay(a.sphere.wrap(n,this._objectToBoundingSphere.getCenter(t)),e)},e.prototype._intersectsObjectWithOffset=function(e,t,n){var i=this._objectToBoundingSphere.getRadius(t);return!(i>0)||a.sphere.intersectsRay(n.applyToBoundingSphere(i,this._objectToBoundingSphere.getCenter(t)),e)},e.prototype._forEachNode=function(e,t){for(var n=c.acquire().init(e),i=[n];0!==i.length;){if(t(n=i.pop())&&!n.isLeaf())for(var r=0;r<n.node.children.length;r++)n.node.children[r]&&i.push(c.acquire().init(n).advance(r));c.release(n)}},e.prototype._forEachNodeDepthOrdered=function(e,t,n,i){void 0===i&&(i=1);var r=c.acquire().init(e),o=[r];for(function(e,t,n){if(!A.length)for(var i=0;i<8;++i)A.push({index:0,distance:0});for(i=0;i<8;++i){var r=g[i];A.data[i].index=i,A.data[i].distance=v(e,t,r)}for(A.sort((function(e,t){return e.distance-t.distance})),n.clear(),i=0;i<8;++i)n.push(A.data[i].index)}(n,i,T);0!==o.length;){if(t(r=o.pop())&&!r.isLeaf())for(var a=7;a>=0;--a){var s=T.data[a];s>=r.node.children.length||r.node.children[s]&&o.push(c.acquire().init(r).advance(s))}c.release(r)}},e.prototype._findClosest=function(e,t,n,i,o){var a=this,s=1/0,l=1/0,c=null,u=f(e,t),p=0,d=function(r){if(++p,!i||i(r)){var o=a._objectToBoundingSphere.getCenter(r),u=a._objectToBoundingSphere.getRadius(r);if(!n||!h(o,u,n)){var d=v(e,t,o),f=d-u;f<s&&(s=f,l=d+u,c=r)}}};return this._forEachNodeDepthOrdered(this._root,(function(i){if(null!=o&&p>=o)return!1;if(n&&h(i.center,i.halfSize*y,n))return!1;if(r.vec3.scale(S,u,i.halfSize),r.vec3.add(S,S,i.center),v(e,t,S)>l)return!1;var a=i.node;return a.terminals.forEach((function(e){d(e)})),null!==a.residents&&a.residents.forEach((function(e){d(e)})),!0}),e,t),c},e.prototype._forEachInDepthRange=function(e,t,n,i,o,a,s,l){var c=this,u=-1/0,p=1/0,d={setRange:function(e){1===n?(u=Math.max(u,e.near),p=Math.min(p,e.far)):(u=Math.max(u,-e.far),p=Math.min(p,-e.near))}};d.setRange(i);var g=v(t,n,e),m=f(t,n),_=f(t,-1*n),b=0,x=function(e){if(++b,!s||s(e)){var i=c._objectToBoundingSphere.getCenter(e),r=c._objectToBoundingSphere.getRadius(e),l=v(t,n,i)-g;l-r>p||l+r<u||a&&h(i,r,a)||o(e,d)}};this._forEachNodeDepthOrdered(this._root,(function(e){if(null!=l&&b>=l)return!1;if(a&&h(e.center,e.halfSize*y,a))return!1;if(r.vec3.scale(S,m,e.halfSize),r.vec3.add(S,S,e.center),v(t,n,S)-g>p)return!1;if(r.vec3.scale(S,_,e.halfSize),r.vec3.add(S,S,e.center),v(t,n,S)-g<u)return!1;var i=e.node;return i.terminals.forEach((function(e){x(e)})),null!==i.residents&&i.residents.forEach((function(e){x(e)})),!0}),t,n)},e.prototype._remove=function(e,t,n){P.clear();var i=n.advanceTo(t,(function(e,t){P.push(e.node),P.push(t)}))?n.node.terminals:n.node.residents;if(i.removeUnordered(e),0===i.length)for(var r=P.length-2;r>=0&&this._purge(P.data[r],P.data[r+1]);r-=2);},e.prototype._nodeIsEmpty=function(e){if(0!==e.terminals.length)return!1;if(null!==e.residents)return 0===e.residents.length;for(var t=0;t<e.children.length;t++)if(e.children[t])return!1;return!0},e.prototype._purge=function(e,t){return t>=0&&(e.children[t]=null),!!this._nodeIsEmpty(e)&&(null===e.residents&&(e.residents=new i({shrink:!0})),!0)},e.prototype._add=function(e,t){t.advanceTo(this._boundingSphereFromObject(e,M))?t.node.terminals.push(e):(t.node.residents.push(e),t.node.residents.length>this._maximumObjectsPerNode&&t.depth<this._maximumDepth&&this._split(t))},e.prototype._split=function(e){var t=e.node.residents;e.node.residents=null;for(var n=0;n<t.length;n++){var i=c.acquire().init(e);this._add(t.data[n],i),c.release(i)}},e.prototype._grow=function(e,t){var n=this;if(0!==t){var i=this._boundingSphereFromObjects(e,t,(function(e,t){return n._boundingSphereFromObject(e,t)}),C);if(this._isValidRadius(i.radius)&&!this._fitsInsideTree(i))if(this._nodeIsEmpty(this._root.node))r.vec3.copy(this._root.center,i.center),this._root.halfSize=1.25*i.radius;else{var o=c.acquire();this._rootBoundsForRootAsSubNode(i,o),this._placingRootViolatesMaxDepth(o)?this._rebuildTree(i,o):this._growRootAsSubNode(o),c.release(o)}}},e.prototype._rebuildTree=function(e,t){var n=this;r.vec3.copy(D.center,t.center),D.radius=t.halfSize;var i=this._boundingSphereFromObjects([e,D],2,(function(e){return e}),R),o=c.acquire().init(this._root);this._root.initFrom(null,i.center,1.25*i.radius),this._forEachNode(o,(function(e){return n.add(e.node.terminals.data,e.node.terminals.length),null!==e.node.residents&&n.add(e.node.residents.data,e.node.residents.length),!0})),c.release(o)},e.prototype._placingRootViolatesMaxDepth=function(e){var t=0;return this._forEachNode(this._root,(function(e){return t=Math.max(t,e.depth),!0})),t+Math.log(e.halfSize/this._root.halfSize)*Math.LOG2E>this._maximumDepth},e.prototype._rootBoundsForRootAsSubNode=function(e,t){for(var n=e.radius,i=e.center,r=-1/0,o=this._root.center,a=this._root.halfSize,s=0;s<3;s++){var l=i[s]+n-(o[s]+a),c=Math.max(0,Math.ceil((o[s]-a-(i[s]-n))/(2*a))),u=Math.max(0,Math.ceil(l/(2*a)))+1,p=Math.pow(2,Math.ceil(Math.log(c+u)*Math.LOG2E));r=Math.max(r,p),E[s].min=c,E[s].max=u}for(s=0;s<3;s++){var d=(r-((c=E[s].min)+(u=E[s].max)))/2;c+=Math.ceil(d),u+=Math.floor(d),x[s]=o[s]-a-c*a*2+(u+c)*a}return t.initFrom(null,x,r*a,0)},e.prototype._growRootAsSubNode=function(e){var t=this._root.node;r.vec3.copy(C.center,this._root.center),C.radius=this._root.halfSize,this._root.init(e),e.advanceTo(C,null,!0),e.node.children=t.children,e.node.residents=t.residents,e.node.terminals=t.terminals},e.prototype._shrink=function(){for(;;){var e=this._findShrinkIndex();if(-1===e)break;this._root.advance(e),this._root.depth=0}},e.prototype._findShrinkIndex=function(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;for(var e=null,t=this._root.node.children,n=0,i=0;i<t.length&&null==e;)e=t[n=i++];for(;i<t.length;)if(t[i++])return-1;return n},e.prototype._isDegenerate=function(e){var t=this._objectToBoundingSphere.getRadius(e);return!this._isValidRadius(t)},e.prototype._isValidRadius=function(e){return!isNaN(e)&&e!==-1/0&&e!==1/0&&e>0},e.prototype._fitsInsideTree=function(e){var t=this._root.center,n=this._root.halfSize,i=e.center;return e.radius<=n&&i[0]>=t[0]-n&&i[0]<=t[0]+n&&i[1]>=t[1]-n&&i[1]<=t[1]+n&&i[2]>=t[2]-n&&i[2]<=t[2]+n},e.prototype._boundingSphereFromObject=function(e,t){return r.vec3.copy(t.center,this._objectToBoundingSphere.getCenter(e)),t.radius=this._objectToBoundingSphere.getRadius(e),t},e.prototype._boundingSphereFromObjects=function(e,t,n,i){if(1===t){var o=n(e[0],C);r.vec3.copy(i.center,o.center),i.radius=o.radius}else{w[0]=1/0,w[1]=1/0,w[2]=1/0,O[0]=-1/0,O[1]=-1/0,O[2]=-1/0;for(var a=0;a<t;a++)o=n(e[a],C),this._isValidRadius(o.radius)&&(u(w,o.center,o.radius),p(O,o.center,o.radius));r.vec3.lerp(i.center,w,O,.5),i.radius=Math.max(O[0]-w[0],O[1]-w[1],O[2]-w[2])/2}return i},e}(),c=function(){function e(e,t,n){void 0===n&&(n=0),this.center=o.vec3f64.create(),this.initFrom(e,t,n,0)}return e.prototype.init=function(e){return this.initFrom(e.node,e.center,e.halfSize,e.depth)},e.prototype.initFrom=function(t,n,i,o){return void 0===t&&(t=null),void 0===i&&(i=this.halfSize),void 0===o&&(o=this.depth),this.node=t||e.createEmptyNode(),n&&r.vec3.copy(this.center,n),this.halfSize=i,this.depth=o,this},e.prototype.advance=function(t){var n=this.node.children[t];n||(n=e.createEmptyNode(),this.node.children[t]=n),this.node=n,this.halfSize/=2,this.depth++;var i=g[t];return this.center[0]+=i[0]*this.halfSize,this.center[1]+=i[1]*this.halfSize,this.center[2]+=i[2]*this.halfSize,this},e.prototype.advanceTo=function(e,t,n){for(void 0===n&&(n=!1);;){if(this.isTerminalFor(e))return t&&t(this,-1),!0;if(this.isLeaf()&&!n)return t&&t(this,-1),!1;this.isLeaf()&&(this.node.residents=null);var i=this._childIndex(e);t&&t(this,i),this.advance(i)}},e.prototype.isLeaf=function(){return null!=this.node.residents},e.prototype.isTerminalFor=function(e){return e.radius>this.halfSize/2},e.prototype._childIndex=function(e){for(var t=e.center,n=this.center,i=0,r=0;r<3;r++)n[r]<t[r]&&(i|=1<<r);return i},e.createEmptyNode=function(){return{children:[null,null,null,null,null,null,null,null],terminals:new i({shrink:!0}),residents:new i({shrink:!0})}},e.acquire=function(){return e._pool.acquire()},e.release=function(t){e._pool.release(t)},e.clearPool=function(){e._pool.prune()},e._pool=new n(e),e}();function u(e,t,n){e[0]=Math.min(e[0],t[0]-n),e[1]=Math.min(e[1],t[1]-n),e[2]=Math.min(e[2],t[2]-n)}function p(e,t,n){e[0]=Math.max(e[0],t[0]+n),e[1]=Math.max(e[1],t[1]+n),e[2]=Math.max(e[2],t[2]+n)}function d(e,t,n){return(n=n||e)[0]=e[0]+t,n[1]=e[1]+t,n[2]=e[2]+t,n}function h(e,t,n){return!a.frustum.intersectsSphere(n.planes,a.sphere.wrap(t,e))}function f(e,t){for(var n=1/0,i=null,r=0;r<8;++r){var o=v(e,t,m[r]);o<n&&(n=o,i=m[r])}return i}function v(e,t,n){return t*(e[0]*n[0]+e[1]*n[1]+e[2]*n[2])}var g=[o.vec3f64.fromValues(-1,-1,-1),o.vec3f64.fromValues(1,-1,-1),o.vec3f64.fromValues(-1,1,-1),o.vec3f64.fromValues(1,1,-1),o.vec3f64.fromValues(-1,-1,1),o.vec3f64.fromValues(1,-1,1),o.vec3f64.fromValues(-1,1,1),o.vec3f64.fromValues(1,1,1)],m=[o.vec3f64.fromValues(-1,-1,-1),o.vec3f64.fromValues(-1,-1,1),o.vec3f64.fromValues(-1,1,-1),o.vec3f64.fromValues(-1,1,1),o.vec3f64.fromValues(1,-1,-1),o.vec3f64.fromValues(1,-1,1),o.vec3f64.fromValues(1,1,-1),o.vec3f64.fromValues(1,1,1)],y=Math.sqrt(3),_=[null];function b(e){return Array.isArray(e)?e:(_[0]=e,_)}var x=o.vec3f64.create(),S=o.vec3f64.create(),w=o.vec3f64.create(),O=o.vec3f64.create(),P=new i,M={center:o.vec3f64.create(),radius:0},C={center:o.vec3f64.create(),radius:0},D={center:o.vec3f64.create(),radius:0},R={center:o.vec3f64.create(),radius:0},E=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],A=new i,T=new i;return l}).apply(null,i))||(e.exports=r)},ne9J:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("fese"),n("E/g4"),n("7zqm"),n("quQL"),n("7Aei"),n("aExC")],void 0===(r=(function(e,t,n,i,r,o,a,s,l){var c,u,p,d,h,f,v,g,m,y,_,b,x,S,w,O,P,M,C,D,R,E,A,T,I;Object.defineProperty(t,"__esModule",{value:!0}),t.build=function(e){var t=new l.ShaderBuilder;t.extensions.add("GL_OES_standard_derivatives"),t.include(a.PiUtils),t.include(r.RibbonVertexPosition,e),t.include(o.LineStipple,e),t.vertex.uniforms.add("proj","mat4").add("view","mat4").add("nearPlane","float").add("pixelRatio","float").add("miterLimit","float").add("screenSize","vec2"),t.attributes.add("position","vec3"),t.attributes.add("subdivisionFactor","float"),t.attributes.add("uv0","vec2"),t.attributes.add("auxpos1","vec3"),t.attributes.add("auxpos2","vec3"),t.varyings.add("vColor","vec4"),t.varyings.add("vpos","vec3");var j=e.falloffEnabled,V=e.innerColorEnabled;return V&&t.varyings.add("vLineDistance","float"),j&&t.varyings.add("vLineDistanceNorm","float"),e.falloffEnabled&&t.fragment.uniforms.add("falloff","float"),e.innerColorEnabled&&(t.fragment.uniforms.add("innerColor","vec4"),t.fragment.uniforms.add("innerWidth","float")),t.vertex.code.add(s.glsl(c||(c=n.__makeTemplateObject(["\n\t\t#define PERPENDICULAR(v) vec2(v.y, -v.x);\n\t\t#define ISOUTSIDE (left.x * right.y - left.y * right.x)*uv0.y > 0.0\n\n\t\tfloat interp(float ncp, vec4 a, vec4 b) {\n\t\t\treturn (-ncp - a.z) / (b.z - a.z);\n\t\t}\n\n\t\tvec2 rotate(vec2 v, float a) {\n\t\t\tfloat s = sin(a);\n\t\t\tfloat c = cos(a);\n\t\t\tmat2 m = mat2(c, -s, s, c);\n\t\t\treturn m * v;\n\t\t}\n"],["\n\t\t#define PERPENDICULAR(v) vec2(v.y, -v.x);\n\t\t#define ISOUTSIDE (left.x * right.y - left.y * right.x)*uv0.y > 0.0\n\n\t\tfloat interp(float ncp, vec4 a, vec4 b) {\n\t\t\treturn (-ncp - a.z) / (b.z - a.z);\n\t\t}\n\n\t\tvec2 rotate(vec2 v, float a) {\n\t\t\tfloat s = sin(a);\n\t\t\tfloat c = cos(a);\n\t\t\tmat2 m = mat2(c, -s, s, c);\n\t\t\treturn m * v;\n\t\t}\n"])))),t.vertex.code.add(s.glsl(u||(u=n.__makeTemplateObject(["\n vec4 projectAndScale(vec4 pos) {\n vec4 posNdc = proj * pos;\n\n // Note that posNdc is in -1:1, scaling by screenSize converts this to a coordinate system\n // that is twice scaled (going from -size:size).\n posNdc.xy *= screenSize / posNdc.w;\n return posNdc;\n }\n"],["\n vec4 projectAndScale(vec4 pos) {\n vec4 posNdc = proj * pos;\n\n // Note that posNdc is in -1:1, scaling by screenSize converts this to a coordinate system\n // that is twice scaled (going from -size:size).\n posNdc.xy *= screenSize / posNdc.w;\n return posNdc;\n }\n"])))),t.vertex.code.add(s.glsl(p||(p=n.__makeTemplateObject(["\n void clipAndTransform(inout vec4 pos, inout vec4 prev, inout vec4 next, in bool isStartVertex) {\n float vnp = nearPlane*0.99;\n\n //current pos behind ncp --\x3e we need to clip\n if(pos.z > -nearPlane) {\n if (!isStartVertex) {\n //previous in front of ncp\n if(prev.z < -nearPlane) {\n pos = mix(prev, pos, interp(vnp, prev, pos));\n next = pos;\n } else {\n pos = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n //next in front of ncp\n if(isStartVertex) {\n if(next.z < -nearPlane) {\n pos = mix(pos, next, interp(vnp, pos, next));\n prev = pos;\n } else {\n pos = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n } else {\n //current position visible\n //previous behind ncp\n if (prev.z > -nearPlane) {\n prev = mix(pos, prev, interp(vnp, pos, prev));\n }\n //next behind ncp\n if (next.z > -nearPlane) {\n next = mix(next, pos, interp(vnp, next, pos));\n }\n }\n\n pos = projectAndScale(pos);\n next = projectAndScale(next);\n prev = projectAndScale(prev);\n }\n"],["\n void clipAndTransform(inout vec4 pos, inout vec4 prev, inout vec4 next, in bool isStartVertex) {\n float vnp = nearPlane*0.99;\n\n //current pos behind ncp --\x3e we need to clip\n if(pos.z > -nearPlane) {\n if (!isStartVertex) {\n //previous in front of ncp\n if(prev.z < -nearPlane) {\n pos = mix(prev, pos, interp(vnp, prev, pos));\n next = pos;\n } else {\n pos = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n //next in front of ncp\n if(isStartVertex) {\n if(next.z < -nearPlane) {\n pos = mix(pos, next, interp(vnp, pos, next));\n prev = pos;\n } else {\n pos = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n } else {\n //current position visible\n //previous behind ncp\n if (prev.z > -nearPlane) {\n prev = mix(pos, prev, interp(vnp, pos, prev));\n }\n //next behind ncp\n if (next.z > -nearPlane) {\n next = mix(next, pos, interp(vnp, next, pos));\n }\n }\n\n pos = projectAndScale(pos);\n next = projectAndScale(next);\n prev = projectAndScale(prev);\n }\n"])))),t.vertex.code.add(s.glsl(d||(d=n.__makeTemplateObject(["\n void main(void) {\n float coverage = 1.0;\n vpos = position;\n\n // Check for special value of uv0.y which is used by the Renderer when graphics\n // are removed before the VBO is recompacted. If this is the case, then we just\n // project outside of clip space.\n if (uv0.y == 0.0) {\n // Project out of clip space\n gl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n }\n else {\n bool isStartVertex = abs(abs(uv0.y)-3.0) == 1.0;\n bool isJoin = abs(uv0.y)-3.0 < 0.0;\n\n float lineWidth = getSize() * pixelRatio;\n\n // convert sub-pixel coverage to alpha\n if (lineWidth < 1.0) {\n coverage = lineWidth;\n lineWidth = 1.0;\n }else{\n // Ribbon lines cannot properly render non-integer sizes. Round width to integer size if\n // larger than one for better quality. Note that we do render < 1 pixels more or less correctly\n // so we only really care to round anything larger than 1.\n lineWidth = floor(lineWidth + 0.5);\n }\n\n vec4 pos = view * vec4(position.xyz, 1.0);\n vec4 prev = view * vec4(auxpos1.xyz, 1.0);\n vec4 next = view * vec4(auxpos2.xyz, 1.0);\n\n clipAndTransform(pos, prev, next, isStartVertex);\n\n vec2 left = (pos.xy - prev.xy);\n vec2 right = (next.xy - pos.xy);\n\n float leftLen = length(left);\n float rightLen = length(right);\n "],["\n void main(void) {\n float coverage = 1.0;\n vpos = position;\n\n // Check for special value of uv0.y which is used by the Renderer when graphics\n // are removed before the VBO is recompacted. If this is the case, then we just\n // project outside of clip space.\n if (uv0.y == 0.0) {\n // Project out of clip space\n gl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n }\n else {\n bool isStartVertex = abs(abs(uv0.y)-3.0) == 1.0;\n bool isJoin = abs(uv0.y)-3.0 < 0.0;\n\n float lineWidth = getSize() * pixelRatio;\n\n // convert sub-pixel coverage to alpha\n if (lineWidth < 1.0) {\n coverage = lineWidth;\n lineWidth = 1.0;\n }else{\n // Ribbon lines cannot properly render non-integer sizes. Round width to integer size if\n // larger than one for better quality. Note that we do render < 1 pixels more or less correctly\n // so we only really care to round anything larger than 1.\n lineWidth = floor(lineWidth + 0.5);\n }\n\n vec4 pos = view * vec4(position.xyz, 1.0);\n vec4 prev = view * vec4(auxpos1.xyz, 1.0);\n vec4 next = view * vec4(auxpos2.xyz, 1.0);\n\n clipAndTransform(pos, prev, next, isStartVertex);\n\n vec2 left = (pos.xy - prev.xy);\n vec2 right = (next.xy - pos.xy);\n\n float leftLen = length(left);\n float rightLen = length(right);\n "])))),e.stippleEnabled&&t.vertex.code.add(s.glsl(h||(h=n.__makeTemplateObject(["\n // uv0.x is either 0 or 1, depending on whether this is considered the start of a line segment\n // or the end. If start, then use pos->next, otherwise use prev->pos to define the line segment\n // vector\n vec4 stippleSegmentInfo = mix(vec4(pos.xy, right), vec4(prev.xy, left), uv0.x);\n vec2 stippleSegmentOrigin = stippleSegmentInfo.xy;\n\n // Scale s.t. it's in units of stipple pattern size.\n vec2 stippleSegmentDirection = stippleSegmentInfo.zw;\n "],["\n // uv0.x is either 0 or 1, depending on whether this is considered the start of a line segment\n // or the end. If start, then use pos->next, otherwise use prev->pos to define the line segment\n // vector\n vec4 stippleSegmentInfo = mix(vec4(pos.xy, right), vec4(prev.xy, left), uv0.x);\n vec2 stippleSegmentOrigin = stippleSegmentInfo.xy;\n\n // Scale s.t. it's in units of stipple pattern size.\n vec2 stippleSegmentDirection = stippleSegmentInfo.zw;\n "])))),t.vertex.code.add(s.glsl(f||(f=n.__makeTemplateObject(['\n left = (leftLen > 0.001) ? left/leftLen : vec2(0.0, 0.0);\n right = (rightLen > 0.001) ? right/rightLen : vec2(0.0, 0.0);\n\n vec2 capDisplacementDir = vec2(0, 0);\n vec2 joinDisplacementDir = vec2(0, 0);\n float displacementLen = lineWidth;\n\n if (isJoin) {\n\n // JOIN handling ---------------------------------------------------\n // determine if vertex is on the "outside or "inside" of the join\n bool isOutside = ISOUTSIDE;\n\n // compute miter join position first\n joinDisplacementDir = normalize(left + right);\n joinDisplacementDir = PERPENDICULAR(joinDisplacementDir);\n\n // compute miter stretch\n if (leftLen > 0.001 && rightLen > 0.001) {\n float nDotSeg = dot(joinDisplacementDir, left);\n displacementLen /= length(nDotSeg * left - joinDisplacementDir);\n\n // limit displacement of inner vertices\n if (!isOutside) {\n displacementLen = min(displacementLen, min(leftLen, rightLen)/abs(nDotSeg));\n }\n }\n\n if (isOutside && (displacementLen > miterLimit * lineWidth)) {\n '],['\n left = (leftLen > 0.001) ? left/leftLen : vec2(0.0, 0.0);\n right = (rightLen > 0.001) ? right/rightLen : vec2(0.0, 0.0);\n\n vec2 capDisplacementDir = vec2(0, 0);\n vec2 joinDisplacementDir = vec2(0, 0);\n float displacementLen = lineWidth;\n\n if (isJoin) {\n\n // JOIN handling ---------------------------------------------------\n // determine if vertex is on the "outside or "inside" of the join\n bool isOutside = ISOUTSIDE;\n\n // compute miter join position first\n joinDisplacementDir = normalize(left + right);\n joinDisplacementDir = PERPENDICULAR(joinDisplacementDir);\n\n // compute miter stretch\n if (leftLen > 0.001 && rightLen > 0.001) {\n float nDotSeg = dot(joinDisplacementDir, left);\n displacementLen /= length(nDotSeg * left - joinDisplacementDir);\n\n // limit displacement of inner vertices\n if (!isOutside) {\n displacementLen = min(displacementLen, min(leftLen, rightLen)/abs(nDotSeg));\n }\n }\n\n if (isOutside && (displacementLen > miterLimit * lineWidth)) {\n '])))),t.vertex.code.add(s.glsl(e.roundJoins?v||(v=n.__makeTemplateObject(["\n vec2 startDir;\n vec2 endDir;\n\n if (leftLen < 0.001) {\n startDir = right;\n }\n else{\n startDir = left;\n }\n startDir = normalize(startDir);\n startDir = PERPENDICULAR(startDir);\n\n if (rightLen < 0.001) {\n endDir = left;\n }\n else{\n endDir = right;\n }\n endDir = normalize(endDir);\n endDir = PERPENDICULAR(endDir);\n\n float rotationAngle = acos(clamp(dot(startDir, endDir), -1.0, 1.0));\n joinDisplacementDir = rotate(startDir, -sign(uv0.y) * subdivisionFactor * rotationAngle);\n "],["\n vec2 startDir;\n vec2 endDir;\n\n if (leftLen < 0.001) {\n startDir = right;\n }\n else{\n startDir = left;\n }\n startDir = normalize(startDir);\n startDir = PERPENDICULAR(startDir);\n\n if (rightLen < 0.001) {\n endDir = left;\n }\n else{\n endDir = right;\n }\n endDir = normalize(endDir);\n endDir = PERPENDICULAR(endDir);\n\n float rotationAngle = acos(clamp(dot(startDir, endDir), -1.0, 1.0));\n joinDisplacementDir = rotate(startDir, -sign(uv0.y) * subdivisionFactor * rotationAngle);\n "])):g||(g=n.__makeTemplateObject(["\n // convert to bevel join if miterLimit is exceeded\n if (leftLen < 0.001) {\n joinDisplacementDir = right;\n }\n else if (rightLen < 0.001) {\n joinDisplacementDir = left;\n }\n else {\n joinDisplacementDir = isStartVertex ? right : left;\n }\n joinDisplacementDir = normalize(joinDisplacementDir);\n joinDisplacementDir = PERPENDICULAR(joinDisplacementDir);\n "],["\n // convert to bevel join if miterLimit is exceeded\n if (leftLen < 0.001) {\n joinDisplacementDir = right;\n }\n else if (rightLen < 0.001) {\n joinDisplacementDir = left;\n }\n else {\n joinDisplacementDir = isStartVertex ? right : left;\n }\n joinDisplacementDir = normalize(joinDisplacementDir);\n joinDisplacementDir = PERPENDICULAR(joinDisplacementDir);\n "])))),t.vertex.code.add(s.glsl(m||(m=n.__makeTemplateObject(["\n displacementLen = lineWidth;\n }\n } else {\n // CAP handling ---------------------------------------------------\n if (leftLen < 0.001) {\n joinDisplacementDir = right;\n }\n else if (rightLen < 0.001) {\n joinDisplacementDir = left;\n }\n else {\n joinDisplacementDir = isStartVertex ? right : left;\n }\n joinDisplacementDir = normalize(joinDisplacementDir);\n joinDisplacementDir = PERPENDICULAR(joinDisplacementDir);\n displacementLen = lineWidth;\n\n capDisplacementDir = isStartVertex ? -right : left;\n "],["\n displacementLen = lineWidth;\n }\n } else {\n // CAP handling ---------------------------------------------------\n if (leftLen < 0.001) {\n joinDisplacementDir = right;\n }\n else if (rightLen < 0.001) {\n joinDisplacementDir = left;\n }\n else {\n joinDisplacementDir = isStartVertex ? right : left;\n }\n joinDisplacementDir = normalize(joinDisplacementDir);\n joinDisplacementDir = PERPENDICULAR(joinDisplacementDir);\n displacementLen = lineWidth;\n\n capDisplacementDir = isStartVertex ? -right : left;\n "])))),t.vertex.code.add(s.glsl(e.roundCaps?y||(y=n.__makeTemplateObject(["\n float angle = subdivisionFactor*PI*0.5;\n joinDisplacementDir *= cos(angle);\n capDisplacementDir *= sin(angle);\n "],["\n float angle = subdivisionFactor*PI*0.5;\n joinDisplacementDir *= cos(angle);\n capDisplacementDir *= sin(angle);\n "])):_||(_=n.__makeTemplateObject(["\n capDisplacementDir *= subdivisionFactor;\n "],["\n capDisplacementDir *= subdivisionFactor;\n "])))),t.vertex.code.add(s.glsl(w||(w=n.__makeTemplateObject(["\n }\n\n // Displacement (in pixels) caused by join/or cap\n vec2 dpos = joinDisplacementDir * sign(uv0.y) * displacementLen + capDisplacementDir * displacementLen;\n\n ","\n\n ","\n ","\n\n pos.xy += dpos;\n "],["\n }\n\n // Displacement (in pixels) caused by join/or cap\n vec2 dpos = joinDisplacementDir * sign(uv0.y) * displacementLen + capDisplacementDir * displacementLen;\n\n ","\n\n ","\n ","\n\n pos.xy += dpos;\n "])),j||V?s.glsl(b||(b=n.__makeTemplateObject(["float lineDist = lineWidth * sign(uv0.y) * pos.w;"],["float lineDist = lineWidth * sign(uv0.y) * pos.w;"]))):"",V?s.glsl(x||(x=n.__makeTemplateObject(["vLineDistance = lineDist;"],["vLineDistance = lineDist;"]))):"",j?s.glsl(S||(S=n.__makeTemplateObject(["vLineDistanceNorm = lineDist / lineWidth;"],["vLineDistanceNorm = lineDist / lineWidth;"]))):"")),e.stippleEnabled&&(t.vertex.code.add(s.glsl(O||(O=n.__makeTemplateObject(["\n {\n // Compute the stipple pattern UV coordinate from the actual position, based on the origin\n // and direction of the line segment on which the stipple pattern is based.\n\n // Project the vector from the origin of the segment to the vertex onto the line segment.\n // Note the 0.5 factor due to projected positions being at twice the screen size scale (see projectAndScale)\n vec2 posVec = pos.xy - stippleSegmentOrigin;\n\n float stippleSegmentDirectionLength = length(stippleSegmentDirection);\n "],["\n {\n // Compute the stipple pattern UV coordinate from the actual position, based on the origin\n // and direction of the line segment on which the stipple pattern is based.\n\n // Project the vector from the origin of the segment to the vertex onto the line segment.\n // Note the 0.5 factor due to projected positions being at twice the screen size scale (see projectAndScale)\n vec2 posVec = pos.xy - stippleSegmentOrigin;\n\n float stippleSegmentDirectionLength = length(stippleSegmentDirection);\n "])))),e.stippleIntegerRepeatsEnabled&&t.vertex.code.add(s.glsl(P||(P=n.__makeTemplateObject(["\n float numberOfPatternRepeats = stippleSegmentDirectionLength * 0.5 * stipplePatternPixelSizeInv;\n float roundedNumberOfPatternRepeats = max(1.0, floor(numberOfPatternRepeats + 0.5));\n stipplePatternUvMax = roundedNumberOfPatternRepeats;\n "],["\n float numberOfPatternRepeats = stippleSegmentDirectionLength * 0.5 * stipplePatternPixelSizeInv;\n float roundedNumberOfPatternRepeats = max(1.0, floor(numberOfPatternRepeats + 0.5));\n stipplePatternUvMax = roundedNumberOfPatternRepeats;\n "])))),t.vertex.code.add(s.glsl(M||(M=n.__makeTemplateObject(["\n if (stippleSegmentDirectionLength >= 0.001) {\n // Project the vertex position onto the line segment.\n float projectedLength = dot(stippleSegmentDirection, posVec) / stippleSegmentDirectionLength * 0.5;\n ","\n stipplePatternUv = projectedLength * wholeNumberOfRepeatsScale * stipplePatternPixelSizeInv * pos.w;\n } else {\n stipplePatternUv = 1.0;\n }\n }\n "],["\n if (stippleSegmentDirectionLength >= 0.001) {\n // Project the vertex position onto the line segment.\n float projectedLength = dot(stippleSegmentDirection, posVec) / stippleSegmentDirectionLength * 0.5;\n ","\n stipplePatternUv = projectedLength * wholeNumberOfRepeatsScale * stipplePatternPixelSizeInv * pos.w;\n } else {\n stipplePatternUv = 1.0;\n }\n }\n "])),e.stippleIntegerRepeatsEnabled?"float wholeNumberOfRepeatsScale = roundedNumberOfPatternRepeats / numberOfPatternRepeats;":"float wholeNumberOfRepeatsScale = 1.0;"))),t.vertex.code.add(s.glsl(C||(C=n.__makeTemplateObject(["\n // Convert back into NDC\n pos.xy = pos.xy / screenSize * pos.w;\n\n vColor = getColor();\n vColor.a *= coverage;\n\n gl_Position = pos;\n }\n }\n "],["\n // Convert back into NDC\n pos.xy = pos.xy / screenSize * pos.w;\n\n vColor = getColor();\n vColor.a *= coverage;\n\n gl_Position = pos;\n }\n }\n "])))),t.include(i.Slice,e),0===e.output&&(t.fragment.uniforms.add("intrinsicColor","vec4"),t.fragment.code.add(s.glsl(D||(D=n.__makeTemplateObject(["\n void main() {\n discardBySlice(vpos);\n float stippleAlpha = getStippleAlpha();\n discardByStippleAlpha(stippleAlpha, STIPPLE_ALPHA_COLOR_DISCARD);\n\n vec4 color = intrinsicColor * vColor;\n "],["\n void main() {\n discardBySlice(vpos);\n float stippleAlpha = getStippleAlpha();\n discardByStippleAlpha(stippleAlpha, STIPPLE_ALPHA_COLOR_DISCARD);\n\n vec4 color = intrinsicColor * vColor;\n "])))),e.innerColorEnabled&&(t.fragment.uniforms.add("pixelRatio","float"),t.fragment.code.add(s.glsl(R||(R=n.__makeTemplateObject(["\n float distToInner = abs(vLineDistance * gl_FragCoord.w) - innerWidth;\n float innerAA = clamp(0.5 - distToInner, 0.0, 1.0);\n float innerAlpha = innerColor.a + color.a * (1.0 - innerColor.a);\n color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);\n "],["\n float distToInner = abs(vLineDistance * gl_FragCoord.w) - innerWidth;\n float innerAA = clamp(0.5 - distToInner, 0.0, 1.0);\n float innerAlpha = innerColor.a + color.a * (1.0 - innerColor.a);\n color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);\n "]))))),t.fragment.code.add(s.glsl(E||(E=n.__makeTemplateObject(["\n vec4 finalColor = blendStipple(color, stippleAlpha);\n "],["\n vec4 finalColor = blendStipple(color, stippleAlpha);\n "])))),e.falloffEnabled&&t.fragment.code.add(s.glsl(A||(A=n.__makeTemplateObject(["\n finalColor.a *= pow(max(0.0, 1.0 - abs(vLineDistanceNorm * gl_FragCoord.w)), falloff);\n "],["\n finalColor.a *= pow(max(0.0, 1.0 - abs(vLineDistanceNorm * gl_FragCoord.w)), falloff);\n "])))),t.fragment.code.add(s.glsl(T||(T=n.__makeTemplateObject(["\n gl_FragColor = highlightSlice(finalColor, vpos);\n }\n "],["\n gl_FragColor = highlightSlice(finalColor, vpos);\n }\n "]))))),4===e.output&&t.fragment.code.add(s.glsl(I||(I=n.__makeTemplateObject(["\n void main() {\n discardBySlice(vpos);\n discardByStippleAlpha(getStippleAlpha(), STIPPLE_ALPHA_HIGHLIGHT_DISCARD);\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n "],["\n void main() {\n discardBySlice(vpos);\n discardByStippleAlpha(getStippleAlpha(), STIPPLE_ALPHA_HIGHLIGHT_DISCARD);\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n "])))),t}}).apply(null,i))||(e.exports=r)},o5p5:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("tUyH"),n("FNtW"),n("LZD4"),n("s6rJ"),n("s6rJ"),n("ZeO9"),n("EiS2")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c){var u=function(e){function t(t,n){var i=e.call(this,n)||this;return i.supportsEdges=!0,i.techniqueConfig=new c.ColorMaterialTechniqueConfiguration,i.params=s.copyParameters(t,d),i}return n.__extends(t,e),t.prototype.setParameterValues=function(e){a.updateParameters(this.params,e)&&this.parametersChanged()},t.prototype.getParameters=function(){return this.params},t.prototype.getTechniqueConfig=function(e){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.params.cullFace,this.techniqueConfig.vertexColors=this.params.vertexColors,this.techniqueConfig.slicePlaneEnabled=this.params.slicePlaneEnabled,this.techniqueConfig.transparent=this.params.transparent,this.techniqueConfig.polygonOffset=this.params.polygonOffset,this.techniqueConfig.writeDepth=this.params.writeDepth,this.techniqueConfig.sceneHasOcludees=this.params.sceneHasOcludees,this.techniqueConfig},t.prototype.getPassParameters=function(){return this.params},t.prototype.intersect=function(e,t,n,i,r,o,a){s.intersectTriangleGeometry(e,t,i,r,o,void 0,a)},t.prototype.getGLMaterial=function(e){return 0===e.output||4===e.output?new p(e):void 0},t.prototype.createBufferWriter=function(){return new o.DefaultBufferWriter(o.PositionColorLayout)},t.prototype.createRenderer=function(e,t){return new l(e,t,this)},t}(r.Material),p=function(e){function t(t){var n=e.call(this,t)||this;return n.updateParameters(),n}return n.__extends(t,e),t.prototype.updateParameters=function(){this.technique=this.techniqueRep.acquireAndReleaseExisting(c.ColorMaterialTechnique,this.material.getTechniqueConfig(this.output),this.technique)},t.prototype.beginSlot=function(e){return 4===this.output?3===e:e===(this.technique.configuration.transparent?this.technique.configuration.writeDepth?5:8:3)},t.prototype._updateOccludeeState=function(e){e.hasOccludees!==this.material.getParameters().sceneHasOcludees&&(this.material.setParameterValues({sceneHasOcludees:e.hasOccludees}),this.updateParameters())},t.prototype.ensureParameters=function(e){0===this.output&&this._updateOccludeeState(e)},t.prototype.bind=function(e,t){e.bindProgram(this.technique.program),this.technique.bindPass(e,this.material.getPassParameters(),t)},t.prototype.getPipelineState=function(e,t){return t?this.technique.opaqueOccludeeState:this.technique.pipeline},t}(i.GLMaterial),d={color:[1,1,1,1],transparent:!1,writeDepth:!0,vertexColors:!1,polygonOffset:!1,slicePlaneEnabled:!1,cullFace:0,sceneHasOcludees:!1};return u}).apply(null,i))||(e.exports=r)},pqGg:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("fese"),n("3kdR"),n("xDGw"),n("uUnu"),n("aRjO"),n("PaEL"),n("3PFg"),n("naZ0"),n("2o+p"),n("W/V4"),n("FQ4r"),n("lBa0"),n("ff/U"),n("VQEQ"),n("VQEQ"),n("G0ER"),n("qbr3"),n("qbr3"),n("2Kdy")],r=(function(e,t,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x){Object.defineProperty(t,"__esModule",{value:!0});var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initializeProgram=function(e){var n=t.shader.get(),i=this.configuration,r=n.build({output:i.output,viewingMode:e.viewingMode,occlusionTestEnabled:i.occlusionTestEnabled,signedDistanceFieldEnabled:i.sdf,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!0,debugDrawBorder:i.debugDrawBorder,binaryHighlightOcclusionEnabled:i.binaryHighlightOcclusion,screenCenterOffsetUnitsEnabled:i.screenCenterOffsetUnitsEnabled,screenSizePerspectiveEnabled:i.screenSizePerspective,verticalOffsetEnabled:i.verticalOffset,vvSize:i.vvSize,vvColor:i.vvColor,vvInstancingEnabled:!1});return new _(e.rctx,r.generateSource("vertex"),r.generateSource("fragment"),g.Default3D)},t.prototype.bindPass=function(e,t,n){this.program.setUniform1f("cameraGroundRelative",n.cameraAboveGround?1:-1),this.program.setUniform1f("perDistancePixelRatio",Math.tan(n.fovY/2)/(n.viewport[2]/2)),this.program.setUniformMatrix4fv("viewNormal",n.viewInvTransp),this.program.setUniform1f("polygonOffset",t.shaderPolygonOffset),a.VerticalOffset.bindUniforms(this.program,t,n),d.ScreenSizePerspective.bindUniforms(this.program,t),p.Viewport.bindUniforms(this.program,n),6===this.configuration.output?l.HUDOcclusion.bindUniforms(this.program):(s.HUD.bindUniforms(this.program,n),y.HUDMaterial.bindUniforms(this.program,t,n),u.VisualVariables.bindUniforms(this.program,t),this.configuration.occlusionTestEnabled&&s.HUD.bindVisibilityTexture(e,this.program,n)),4===this.configuration.output&&c.OutputHighlight.bindOutputHighlight(e,this.program,n)},t.prototype.bindDraw=function(e){o.Transform.bindUniforms(this.program,e),p.Camera.bindUniforms(this.program,e),r.Slice.bindUniformsWithOrigin(this.program,this.configuration,e)},t.prototype.initializePipeline=function(){return x.makePipelineState(4===this.configuration.output?{blending:b.separateBlendingParams(1,1,771,771),polygonOffset:this.configuration.polygonOffsetEnabled&&{factor:0,units:-4},depthTest:{func:513},colorWrite:x.defaultColorWriteParams}:6===this.configuration.output?{depthTest:{func:515},depthWrite:x.defaultDepthWriteParams,colorWrite:x.defaultColorWriteParams}:{blending:b.simpleBlendingParams(1,771),polygonOffset:this.configuration.polygonOffsetEnabled&&{factor:0,units:-4},depthTest:{func:this.configuration.depthEnabled?515:519},depthWrite:this.configuration.depthEnabled?x.defaultDepthWriteParams:void 0,colorWrite:x.defaultColorWriteParams})},Object.defineProperty(t.prototype,"primitiveType",{get:function(){return 6===this.configuration.output?0:4},enumerable:!0,configurable:!0}),t.shader=new h.ReloadableShaderModule(m,(function(){return new Promise((function(e,t){Promise.resolve().then((function(){var t=[n("VQEQ")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))})),t}(f.ShaderTechnique);t.HUDMaterialTechnique=S;var w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.output=0,t.occlusionTestEnabled=!0,t.sdf=!1,t.vvSize=!1,t.vvColor=!1,t.verticalOffset=!1,t.screenSizePerspective=!1,t.screenCenterOffsetUnitsEnabled=0,t.debugDrawBorder=!0,t.binaryHighlightOcclusion=!0,t.slicePlaneEnabled=!1,t.polygonOffsetEnabled=!1,t.depthEnabled=!0,t}return i.__extends(t,e),i.__decorate([v.parameter({count:7})],t.prototype,"output",void 0),i.__decorate([v.parameter()],t.prototype,"occlusionTestEnabled",void 0),i.__decorate([v.parameter()],t.prototype,"sdf",void 0),i.__decorate([v.parameter()],t.prototype,"vvSize",void 0),i.__decorate([v.parameter()],t.prototype,"vvColor",void 0),i.__decorate([v.parameter()],t.prototype,"verticalOffset",void 0),i.__decorate([v.parameter()],t.prototype,"screenSizePerspective",void 0),i.__decorate([v.parameter({count:2})],t.prototype,"screenCenterOffsetUnitsEnabled",void 0),i.__decorate([v.parameter()],t.prototype,"debugDrawBorder",void 0),i.__decorate([v.parameter()],t.prototype,"binaryHighlightOcclusion",void 0),i.__decorate([v.parameter()],t.prototype,"slicePlaneEnabled",void 0),i.__decorate([v.parameter()],t.prototype,"polygonOffsetEnabled",void 0),i.__decorate([v.parameter()],t.prototype,"depthEnabled",void 0),t}(v.ShaderTechniqueConfiguration);t.HUDMaterialTechniqueConfiguration=w}).apply(null,i),void 0===r||(e.exports=r)},pvGl:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("KtQ6"),n("BcWh"),n("eIBl"),n("xoE+"),n("LxLY"),n("FXVB"),n("1m5D"),n("0LE5"),n("Rdxj"),n("woUR"),n("5T2R"),n("B3XD"),n("X5J5"),n("Fe95"),n("48/q"),n("dtql"),n("ys4y"),n("4ziW"),n("bz+r")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x){Object.defineProperty(t,"__esModule",{value:!0});var S=function(e){function t(t){var n=e.call(this)||this;return n._handles=new o,n._radius=g.DISC_RADIUS,n.events=new r,n._tool=t.tool,n._view=t.view,null!=t.radius&&(n._radius=t.radius),n.createManipulator(),n.forEachManipulator((function(e){return n._tool.manipulators.add(e)})),n}return n.__extends(t,e),t.prototype.destroy=function(){var e=this;this._handles.destroy(),this.forEachManipulator((function(t){e._tool.manipulators.remove(t),t.destroy()}))},t.prototype.forEachManipulator=function(e){e(this._manipulator,0)},t.prototype.createGraphicDragPipeline=function(e,t){var n=this,i=s.unwrap(e.graphic.geometry).spatialReference;return y.createGraphicMoveDragPipeline(e,t,(function(e){return n.createDragPipeline(e,i)}))},t.prototype.createDragPipeline=function(e,t){var n=this._view;return x.createManipulatorDragEventPipeline(this._manipulator,(function(i,r,o,a){var s=r.next(f.screenToZConstrained(n,i.renderLocation,t)).next(x.addScreenDelta());e(i,s,o,a)}))},Object.defineProperty(t.prototype,"radius",{get:function(){return this._radius},set:function(e){e!==this._radius&&(this._radius=e,this.updateManipulator())},enumerable:!0,configurable:!0}),t.prototype.updateManipulator=function(){var e=this._radius/g.DISC_RADIUS,t=v.settings.zManipulator.height*e,n=v.settings.zManipulator.coneHeight*e,r=v.settings.zManipulator.coneWidth*e,o=v.settings.zManipulator.width*e,a=[p.vec3f64.fromValues(0,0,0),p.vec3f64.fromValues(0,0,t)],s=new _(b.createTubeGeometry(a,o/2,16,!1),"move-z"),u=b.createConeGeometry(n,r/2,16,!1),d=new _(u),f=[p.vec3f64.fromValues(0,0,0),p.vec3f64.fromValues(0,0,t+n)],m=function(e){var n=c.mat4f64.create();return l.mat4.translate(n,n,[0,0,t]),l.mat4.rotateX(n,n,Math.PI/2),n}(),y=function(e,t){var n=i.darken(v.settings.zManipulator.color,t);return[n.r/255,n.g/255,n.b/255,v.settings.zManipulator.color.a*e]},x=h.createManipulatorMaterial(y(1,.25),1),S=h.createManipulatorMaterial(y(1,0),1),w=h.createManipulatorMaterial(y(.7,0),v.settings.zManipulator.occludedFlag),O=h.createManipulatorMaterial(y(.85,0),v.settings.zManipulator.occludedFlag);this._manipulator.renderObjects=[{geometry:d,transform:m,material:x,stateMask:1},{geometry:s,material:x,stateMask:1},{geometry:d,transform:m,material:S,stateMask:2},{geometry:s,material:S,stateMask:2},{geometry:d,transform:m,material:w,stateMask:1},{geometry:s,material:w,stateMask:1},{geometry:d,transform:m,material:O,stateMask:2},{geometry:s,material:O,stateMask:2}],this._manipulator.radius=o/2+2,this._manipulator.collisionType={type:"line",paths:[f]}},t.prototype.createManipulator=function(){var e=this,t=new d.Manipulator3D({view:this._view,autoScaleRenderObjects:!1,worldSized:!1,selectable:!1,cursor:"ns-resize",elevationInfo:this.elevationInfo,worldOriented:!0,collisionPriority:1.6});t.applyObjectTransform=function(t){var n=e._view.state.camera,i=w;e._view.renderCoordsHelper.toRenderCoords(e._manipulator.elevationAlignedLocation,i);var r=u.vec3.dist(n.eye,i),o=n.computeRenderPixelSizeAtDist(r),s=u.vec3.subtract(O,i,n.eye);u.vec3.normalize(s,s);var l=P;e._view.renderCoordsHelper.worldUpAtPosition(w,l);var c=Math.abs(u.vec3.dot(s,l)),p=u.vec3.cross(O,s,l),d=u.vec3.cross(O,p,l),h=a.clamp(c,.01,1),f=1-Math.sqrt(1-h*h)/h/n.fullWidth,m=v.settings.zManipulator.width*(e._radius/g.DISC_RADIUS);u.vec3.scale(d,u.vec3.normalize(d,d),(1/f-1)*r+o*m),t[12]-=O[0],t[13]-=O[1],t[14]-=O[2]},this._manipulator=t,this.updateManipulator()},t}(m.Manipulation);t.MoveZManipulation=S;var w=p.vec3f64.create(),O=p.vec3f64.create(),P=p.vec3f64.create()}).apply(null,i))||(e.exports=r)},qSzK:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("xoE+"),n("hk44"),n("0W55"),n("7Aei"),n("aExC")],void 0===(r=(function(e,t,n,i,r,o,a,s){var l,c,u,p,d,h,f,v,g,m;Object.defineProperty(t,"__esModule",{value:!0}),t.defaultAngleCutoff=i.deg2rad(6),t.build=function(e){var t=new s.ShaderBuilder;return t.extensions.add("GL_OES_standard_derivatives"),t.include(o.ScreenSpacePass),t.include(r.Laserline,e),t.fragment.uniforms.add("angleCutoff","vec2"),t.fragment.uniforms.add("globalAlpha","float"),e.heightManifoldEnabled&&t.fragment.uniforms.add("heightPlane","vec4"),e.pointDistanceEnabled&&t.fragment.uniforms.add("pointDistanceSphere","vec4"),e.lineVerticalPlaneEnabled&&t.fragment.uniforms.add("lineVerticalPlane","vec4").add("lineVerticalStart","vec3").add("lineVerticalEnd","vec3"),(e.heightManifoldEnabled||e.pointDistanceEnabled||e.lineVerticalPlaneEnabled)&&t.fragment.uniforms.add("maxPixelDistance","float"),e.intersectsLineEnabled&&t.fragment.uniforms.add("intersectsLineStart","vec3").add("intersectsLineEnd","vec3").add("intersectsLineDirection","vec3").add("intersectsLineRadius","float").add("perScreenPixelRatio","float"),(e.lineVerticalPlaneEnabled||e.heightManifoldEnabled)&&t.fragment.code.add(a.glsl(l||(l=n.__makeTemplateObject(["\n float planeDistancePixels(vec4 plane, vec3 pos) {\n float dist = dot(plane.xyz, pos) + plane.w;\n float width = fwidth(dist);\n dist /= min(width, maxPixelDistance);\n return abs(dist);\n }"],["\n float planeDistancePixels(vec4 plane, vec3 pos) {\n float dist = dot(plane.xyz, pos) + plane.w;\n float width = fwidth(dist);\n dist /= min(width, maxPixelDistance);\n return abs(dist);\n }"])))),e.pointDistanceEnabled&&t.fragment.code.add(a.glsl(c||(c=n.__makeTemplateObject(["\n float sphereDistancePixels(vec4 sphere, vec3 pos) {\n float dist = distance(sphere.xyz, pos) - sphere.w;\n float width = fwidth(dist);\n dist /= min(width, maxPixelDistance);\n return abs(dist);\n }\n "],["\n float sphereDistancePixels(vec4 sphere, vec3 pos) {\n float dist = distance(sphere.xyz, pos) - sphere.w;\n float width = fwidth(dist);\n dist /= min(width, maxPixelDistance);\n return abs(dist);\n }\n "])))),e.intersectsLineEnabled&&t.fragment.code.add(a.glsl(u||(u=n.__makeTemplateObject(["\n float lineDistancePixels(vec3 start, vec3 dir, float radius, vec3 pos) {\n float dist = length(cross(dir, pos - start)) / (length(pos) * perScreenPixelRatio);\n return abs(dist) - radius;\n }\n "],["\n float lineDistancePixels(vec3 start, vec3 dir, float radius, vec3 pos) {\n float dist = length(cross(dir, pos - start)) / (length(pos) * perScreenPixelRatio);\n return abs(dist) - radius;\n }\n "])))),(e.lineVerticalPlaneEnabled||e.intersectsLineEnabled)&&t.fragment.code.add(a.glsl(p||(p=n.__makeTemplateObject(["\n bool pointIsWithinLine(vec3 pos, vec3 start, vec3 end) {\n vec3 dir = end - start;\n float t2 = dot(dir, pos - start);\n float l2 = dot(dir, dir);\n return t2 >= 0.0 && t2 <= l2;\n }\n "],["\n bool pointIsWithinLine(vec3 pos, vec3 start, vec3 end) {\n vec3 dir = end - start;\n float t2 = dot(dir, pos - start);\n float l2 = dot(dir, dir);\n return t2 >= 0.0 && t2 <= l2;\n }\n "])))),t.fragment.code.add(a.glsl(d||(d=n.__makeTemplateObject(["\n void main() {\n vec3 pos;\n vec3 normal;\n float depthDiscontinuityAlpha;\n\n if (!laserlineReconstructFromDepth(pos, normal, depthDiscontinuityAlpha)) {\n discard;\n }\n\n vec4 color = vec4(0, 0, 0, 0);\n "],["\n void main() {\n vec3 pos;\n vec3 normal;\n float depthDiscontinuityAlpha;\n\n if (!laserlineReconstructFromDepth(pos, normal, depthDiscontinuityAlpha)) {\n discard;\n }\n\n vec4 color = vec4(0, 0, 0, 0);\n "])))),e.heightManifoldEnabled&&t.fragment.code.add(a.glsl(h||(h=n.__makeTemplateObject(["\n {\n float heightManifoldAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, heightPlane.xyz)));\n vec4 heightManifoldColor = laserlineProfile(planeDistancePixels(heightPlane, pos));\n color = max(color, heightManifoldColor * heightManifoldAlpha);\n }\n "],["\n {\n float heightManifoldAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, heightPlane.xyz)));\n vec4 heightManifoldColor = laserlineProfile(planeDistancePixels(heightPlane, pos));\n color = max(color, heightManifoldColor * heightManifoldAlpha);\n }\n "])))),e.pointDistanceEnabled&&t.fragment.code.add(a.glsl(f||(f=n.__makeTemplateObject(["\n {\n // distance to sphere\n float pointDistanceSphereDistance = sphereDistancePixels(pointDistanceSphere, pos);\n vec4 pointDistanceSphereColor = laserlineProfile(pointDistanceSphereDistance);\n float pointDistanceSphereAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, normalize(pos - pointDistanceSphere.xyz))));\n\n color = max(color, pointDistanceSphereColor * pointDistanceSphereAlpha);\n }\n "],["\n {\n // distance to sphere\n float pointDistanceSphereDistance = sphereDistancePixels(pointDistanceSphere, pos);\n vec4 pointDistanceSphereColor = laserlineProfile(pointDistanceSphereDistance);\n float pointDistanceSphereAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, normalize(pos - pointDistanceSphere.xyz))));\n\n color = max(color, pointDistanceSphereColor * pointDistanceSphereAlpha);\n }\n "])))),e.lineVerticalPlaneEnabled&&t.fragment.code.add(a.glsl(v||(v=n.__makeTemplateObject(["\n {\n if (pointIsWithinLine(pos, lineVerticalStart, lineVerticalEnd)) {\n float lineVerticalDistance = planeDistancePixels(lineVerticalPlane, pos);\n\n vec4 lineVerticalColor = laserlineProfile(lineVerticalDistance);\n float lineVerticalAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, lineVerticalPlane.xyz)));\n\n color = max(color, lineVerticalColor * lineVerticalAlpha);\n }\n }\n "],["\n {\n if (pointIsWithinLine(pos, lineVerticalStart, lineVerticalEnd)) {\n float lineVerticalDistance = planeDistancePixels(lineVerticalPlane, pos);\n\n vec4 lineVerticalColor = laserlineProfile(lineVerticalDistance);\n float lineVerticalAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, lineVerticalPlane.xyz)));\n\n color = max(color, lineVerticalColor * lineVerticalAlpha);\n }\n }\n "])))),e.intersectsLineEnabled&&t.fragment.code.add(a.glsl(g||(g=n.__makeTemplateObject(["\n {\n if (pointIsWithinLine(pos, intersectsLineStart, intersectsLineEnd)) {\n float intersectsLineDistance = lineDistancePixels(intersectsLineStart, intersectsLineDirection, intersectsLineRadius, pos);\n vec4 intersectsLineColor = laserlineProfile(intersectsLineDistance);\n float intersectsLineAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, 1.0 - abs(dot(normal, intersectsLineDirection)));\n\n color = max(color, intersectsLineColor * intersectsLineAlpha);\n }\n }\n "],["\n {\n if (pointIsWithinLine(pos, intersectsLineStart, intersectsLineEnd)) {\n float intersectsLineDistance = lineDistancePixels(intersectsLineStart, intersectsLineDirection, intersectsLineRadius, pos);\n vec4 intersectsLineColor = laserlineProfile(intersectsLineDistance);\n float intersectsLineAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, 1.0 - abs(dot(normal, intersectsLineDirection)));\n\n color = max(color, intersectsLineColor * intersectsLineAlpha);\n }\n }\n "])))),t.fragment.code.add(a.glsl(m||(m=n.__makeTemplateObject(["\n gl_FragColor = laserlineOutput(color * depthDiscontinuityAlpha);\n }\n "],["\n gl_FragColor = laserlineOutput(color * depthDiscontinuityAlpha);\n }\n "])))),t}}).apply(null,i))||(e.exports=r)},qUb7:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("Rdxj")],void 0===(r=(function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MainLight=function(e,t,i){void 0===e&&(e=n.vec3f64.create()),void 0===t&&(t=n.vec3f64.fromValues(.57735,.57735,.57735)),void 0===i&&(i=!0),this.intensity=e,this.direction=t,this.castShadows=i},t.FillLight=function(e,t){void 0===e&&(e=n.vec3f64.create()),void 0===t&&(t=n.vec3f64.fromValues(.57735,.57735,.57735)),this.intensity=n.vec3f64.create(),this.direction=n.vec3f64.create(),this.intensity=e,this.direction=t},t.AmbientLight=function(e){void 0===e&&(e=n.vec3f64.create()),this.intensity=e},t.SphericalHarmonicsLight=function(){this.sh={r:[0],g:[0],b:[0]}}}).apply(null,i))||(e.exports=r)},qkUi:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("ub+M"),n("owRV"),n("A5GR"),n("uNfR"),n("4QR8")],void 0===(r=(function(e,t,n,i,r,o,a){Object.defineProperty(t,"__esModule",{value:!0}),t.DrawGraphicTool=n.DrawGraphicTool,t.DrawOperation=i.DrawOperation,t.GraphicMoveTool=r.GraphicMoveTool,t.GraphicReshapeTool=o.GraphicReshapeTool,t.GraphicTransformTool=a.GraphicTransformTool}).apply(null,i))||(e.exports=r)},qvwY:function(e,t,n){var i,r;i=[n.dj.c(e.i),t],void 0===(r=(function(e,t){function n(e){return e instanceof Float32Array&&e.length>=16}function i(e){return Array.isArray(e)&&e.length>=16}Object.defineProperty(t,"__esModule",{value:!0}),t.isMat4f32=n,t.isMat4f64=i,t.isMat4=function(e){return n(e)||i(e)}}).apply(null,i))||(e.exports=r)},raiv:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("FXVB"),n("1m5D"),n("W/V4"),n("FQ4r"),n("lBa0"),n("UGy0"),n("G0ER"),n("qbr3"),n("qbr3"),n("2Kdy")],r=(function(e,t,i,r,o,a,s,l,c,u,p,d){Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initializeProgram=function(e){var n=t.shader.get().build(this.configuration);return new u(e.rctx,n.generateSource("vertex"),n.generateSource("fragment"),t.attributeLocations)},t.prototype.bind=function(e,t,n){this.program.setUniform3fv("innerColor",e.innerColor),this.program.setUniform1f("innerWidth",e.innerWidth*n.pixelRatio),this.program.setUniform3fv("glowColor",e.glowColor),this.program.setUniform1f("glowWidth",e.glowWidth*n.pixelRatio),this.program.setUniform1f("glowFalloff",e.glowFalloff),this.program.setUniform1f("globalAlpha",e.globalAlpha),this.program.setUniform1f("perScreenPixelRatio",n.perScreenPixelRatio),this.program.setUniform2f("pixelToNDC",2/n.fullWidth,2/n.fullHeight),this.program.setUniformMatrix4fv("uProjectionMatrix",n.projectionMatrix),r.mat4.translate(v,n.viewMatrix,t),this.program.setUniformMatrix4fv("uModelViewMatrix",v),this.configuration.contrastControlEnabled&&this.program.setUniform1f("globalAlphaContrastBoost",null!=e.globalAlphaContrastBoost?e.globalAlphaContrastBoost:1)},t.prototype.initializePipeline=function(){return d.makePipelineState({blending:p.simpleBlendingParams(1,771),colorWrite:d.defaultColorWriteParams})},t.prototype.bindPipelineState=function(e){e.setPipelineState(this.pipeline)},t.shader=new a.ReloadableShaderModule(c,(function(){return new Promise((function(e,t){Promise.resolve().then((function(){var t=[n("UGy0")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))})),t.attributeLocations={start:0,end:1,up:2,extrude:3},t}(s.ShaderTechnique);t.LaserlinePathTechnique=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.contrastControlEnabled=!1,t}return i.__extends(t,e),i.__decorate([l.parameter()],t.prototype,"contrastControlEnabled",void 0),t}(l.ShaderTechniqueConfiguration);t.LaserlinePathTechniqueConfiguration=f;var v=o.mat4f64.create()}).apply(null,i),void 0===r||(e.exports=r)},uNfR:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("BcWh"),n("eIBl"),n("LxLY"),n("8MXS"),n("Vx27"),n("9O7+"),n("JXo2"),n("X7Ps")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u){Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t){var n=e.call(this,t)||this;return n._handles=new r,n._reshapeOperation=null,n._internalGeometryUpdate=!1,n.type="reshape-3d",n}return n.__extends(t,e),t.prototype.destroy=function(){this._handles.removeAll(),this._reshapeOperation&&(this._reshapeOperation.destroy(),this._reshapeOperation=null),this._set("view",null),this._set("graphic",null)},Object.defineProperty(t.prototype,"selectionManagementDisabled",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype._updateGeometry=function(){var e=this.graphic.geometry;this._reshapeOperation.inputGeometry=0!==l.isSupportedGraphic(this.graphic)||!o.isSome(e)||"polygon"!==e.type&&"polyline"!==e.type?null:e.clone()},t.prototype._updateGraphic=function(){var e=this;if(this._handles.remove("onGraphicGeometryChange"),this._updateGeometry(),0===l.isSupportedGraphic(this.graphic)){var t=this.watch("graphic.geometry",(function(){!1===e._internalGeometryUpdate&&e._updateGeometry()}),!0);this._handles.add(t,"onGraphicGeometryChange")}},t.prototype.manipulatorSelectionChanged=function(){this._reshapeOperation&&this._reshapeOperation.manipulatorSelectionChanged()},t.prototype._onReshapeGeometryChanged=function(){o.isNone(this.graphic)||(this._internalGeometryUpdate=!0,this.graphic.geometry=this._reshapeOperation.outputGeometry.clone(),this._internalGeometryUpdate=!1)},t.prototype.initialize=function(){var e=this;this._reshapeOperation=new c.ReshapeOperation({tool:this}),this._handles.add([this._reshapeOperation.on("reshape",(function(t){"reshape"===t.type&&e._onReshapeGeometryChanged(),e.emit("reshape",t)})),this._reshapeOperation.on("move",(function(t){"move"===t.type&&e._onReshapeGeometryChanged(),e.emit("move",t)})),this._reshapeOperation.on("vertex-add",(function(t){e._onReshapeGeometryChanged(),e.emit("vertex-add",t)})),this._reshapeOperation.on("vertex-remove",(function(t){e._onReshapeGeometryChanged(),e.emit("vertex-remove",t)})),this._reshapeOperation.on("immediate-click",(function(){return e.emit("immediate-click")})),a.init(this,"graphic",(function(){e._updateGraphic()}),!0)])},t.prototype.onInputEvent=function(e){"key-down"!==e.type||"Delete"!==e.key&&"Backspace"!==e.key||this._reshapeOperation.removeSelectedVertices()},t.prototype.reset=function(){},n.__decorate([s.property({constructOnly:!0,nonNullable:!0})],t.prototype,"view",void 0),n.__decorate([s.property({constructOnly:!0})],t.prototype,"graphic",void 0),n.__decorate([s.property({constructOnly:!0,nonNullable:!0,value:!0})],t.prototype,"enableZ",void 0),n.__decorate([s.property({readOnly:!0})],t.prototype,"type",void 0),n.__decorate([s.subclass("esri.views.3d.interactive.editingTools.graphicReshape3D.GraphicReshapeTool")],t)}(i.EventedMixin(u.InteractiveToolBase));t.GraphicReshapeTool=p}).apply(null,i))||(e.exports=r)},uUnu:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("2o+p"),n("7Aei")],void 0===(r=(function(e,t,n,i,r){function o(e,t){var o=e;o.include(i.ScreenSizePerspective),o.attributes.add("position","vec3"),o.attributes.add("normal","vec3"),o.attributes.add("auxpos1","vec4"),o.vertex.uniforms.add("proj","mat4"),o.vertex.uniforms.add("view","mat4"),o.vertex.uniforms.add("viewNormal","mat4"),o.vertex.uniforms.add("viewport","vec4"),o.vertex.uniforms.add("camPos","vec3"),o.vertex.uniforms.add("polygonOffset","float"),o.vertex.uniforms.add("cameraGroundRelative","float"),o.vertex.uniforms.add("pixelRatio","float"),o.vertex.uniforms.add("perDistancePixelRatio","float"),o.vertex.uniforms.add("uRenderTransparentlyOccludedHUD","float"),t.verticalOffsetEnabled&&o.vertex.uniforms.add("verticalOffset","vec4"),t.screenSizePerspectiveEnabled&&o.vertex.uniforms.add("screenSizePerspectiveAlignment","vec4"),o.vertex.uniforms.add("hudVisibilityTexture","sampler2D"),o.vertex.defines.addFloat("SMALL_OFFSET_ANGLE",.984807753012208),o.vertex.code.add(r.glsl(a||(a=n.__makeTemplateObject(["\n struct ProjectHUDAux {\n vec3 posModel;\n vec3 posView;\n vec3 vnormal;\n\n float distanceToCamera;\n float absCosAngle;\n };\n "],["\n struct ProjectHUDAux {\n vec3 posModel;\n vec3 posView;\n vec3 vnormal;\n\n float distanceToCamera;\n float absCosAngle;\n };\n "])))),o.vertex.code.add(r.glsl(s||(s=n.__makeTemplateObject(["\n float applyHUDViewDependentPolygonOffset(float pointGroundDistance, float absCosAngle, inout vec3 posView) {\n float pointGroundSign = sign(pointGroundDistance);\n\n if (pointGroundSign == 0.0) {\n pointGroundSign = cameraGroundRelative;\n }\n\n // cameraGroundRelative is -1 if camera is below ground, 1 if above ground\n // groundRelative is 1 if both camera and symbol are on the same side of the ground, -1 otherwise\n float groundRelative = cameraGroundRelative * pointGroundSign;\n\n // view angle dependent part of polygon offset emulation\n // we take the absolute value because the sign that is dropped is\n // instead introduced using the ground-relative position of the symbol and the camera\n if (polygonOffset > .0) {\n float cosAlpha = clamp(absCosAngle, 0.01, 1.0);\n\n float tanAlpha = sqrt(1.0 - cosAlpha * cosAlpha) / cosAlpha;\n float factor = (1.0 - tanAlpha / viewport[2]);\n\n // same side of the terrain\n if (groundRelative > 0.0) {\n posView *= factor;\n }\n // opposite sides of the terrain\n else {\n posView /= factor;\n }\n }\n\n return groundRelative;\n }\n "],["\n float applyHUDViewDependentPolygonOffset(float pointGroundDistance, float absCosAngle, inout vec3 posView) {\n float pointGroundSign = sign(pointGroundDistance);\n\n if (pointGroundSign == 0.0) {\n pointGroundSign = cameraGroundRelative;\n }\n\n // cameraGroundRelative is -1 if camera is below ground, 1 if above ground\n // groundRelative is 1 if both camera and symbol are on the same side of the ground, -1 otherwise\n float groundRelative = cameraGroundRelative * pointGroundSign;\n\n // view angle dependent part of polygon offset emulation\n // we take the absolute value because the sign that is dropped is\n // instead introduced using the ground-relative position of the symbol and the camera\n if (polygonOffset > .0) {\n float cosAlpha = clamp(absCosAngle, 0.01, 1.0);\n\n float tanAlpha = sqrt(1.0 - cosAlpha * cosAlpha) / cosAlpha;\n float factor = (1.0 - tanAlpha / viewport[2]);\n\n // same side of the terrain\n if (groundRelative > 0.0) {\n posView *= factor;\n }\n // opposite sides of the terrain\n else {\n posView /= factor;\n }\n }\n\n return groundRelative;\n }\n "])))),o.vertex.code.add(r.glsl(l||(l=n.__makeTemplateObject(["\n void applyHUDVerticalGroundOffset(vec3 normalModel, inout vec3 posModel, inout vec3 posView) {\n float distanceToCamera = length(posView);\n\n // Compute offset in world units for a half pixel shift\n float pixelOffset = distanceToCamera * perDistancePixelRatio * 0.5;\n\n // Apply offset along normal in the direction away from the ground surface\n vec3 modelOffset = normalModel * cameraGroundRelative * pixelOffset;\n\n // Apply the same offset also on the view space position\n vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;\n\n posModel += modelOffset;\n posView += viewOffset;\n }\n "],["\n void applyHUDVerticalGroundOffset(vec3 normalModel, inout vec3 posModel, inout vec3 posView) {\n float distanceToCamera = length(posView);\n\n // Compute offset in world units for a half pixel shift\n float pixelOffset = distanceToCamera * perDistancePixelRatio * 0.5;\n\n // Apply offset along normal in the direction away from the ground surface\n vec3 modelOffset = normalModel * cameraGroundRelative * pixelOffset;\n\n // Apply the same offset also on the view space position\n vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;\n\n posModel += modelOffset;\n posView += viewOffset;\n }\n "])))),o.vertex.code.add(r.glsl(p||(p=n.__makeTemplateObject(["\n vec4 projectPositionHUD(out ProjectHUDAux aux) {\n // centerOffset is in view space and is used to implement world size offsetting\n // of labels with respect to objects. It also pulls the label towards the viewer\n // so that the label is visible in front of the object.\n vec3 centerOffset = auxpos1.xyz;\n\n // The pointGroundDistance is the distance of the geometry to the ground and is\n // negative if the point is below the ground, or positive if the point is above\n // ground.\n float pointGroundDistance = auxpos1.w;\n\n aux.posModel = position;\n aux.posView = (view * vec4(aux.posModel, 1.0)).xyz;\n aux.vnormal = normal;\n\n applyHUDVerticalGroundOffset(aux.vnormal, aux.posModel, aux.posView);\n\n // Screen sized offset in world space, used for example for line callouts\n // Note: keep this implementation in sync with the CPU implementation, see\n // - MaterialUtil.verticalOffsetAtDistance\n // - HUDMaterial.applyVerticalOffsetTransformation\n\n aux.distanceToCamera = length(aux.posView);\n\n vec3 viewDirObjSpace = normalize(camPos - aux.posModel);\n float cosAngle = dot(aux.vnormal, viewDirObjSpace);\n\n aux.absCosAngle = abs(cosAngle);\n\n ","\n\n ","\n\n ","\n\n float groundRelative = applyHUDViewDependentPolygonOffset(pointGroundDistance, aux.absCosAngle, aux.posView);\n\n ","\n\n vec4 posProj = proj * vec4(aux.posView, 1.0);\n\n ","\n\n ","\n\n // constant part of polygon offset emulation\n posProj.z -= groundRelative * polygonOffset * posProj.w;\n return posProj;\n }\n "],["\n vec4 projectPositionHUD(out ProjectHUDAux aux) {\n // centerOffset is in view space and is used to implement world size offsetting\n // of labels with respect to objects. It also pulls the label towards the viewer\n // so that the label is visible in front of the object.\n vec3 centerOffset = auxpos1.xyz;\n\n // The pointGroundDistance is the distance of the geometry to the ground and is\n // negative if the point is below the ground, or positive if the point is above\n // ground.\n float pointGroundDistance = auxpos1.w;\n\n aux.posModel = position;\n aux.posView = (view * vec4(aux.posModel, 1.0)).xyz;\n aux.vnormal = normal;\n\n applyHUDVerticalGroundOffset(aux.vnormal, aux.posModel, aux.posView);\n\n // Screen sized offset in world space, used for example for line callouts\n // Note: keep this implementation in sync with the CPU implementation, see\n // - MaterialUtil.verticalOffsetAtDistance\n // - HUDMaterial.applyVerticalOffsetTransformation\n\n aux.distanceToCamera = length(aux.posView);\n\n vec3 viewDirObjSpace = normalize(camPos - aux.posModel);\n float cosAngle = dot(aux.vnormal, viewDirObjSpace);\n\n aux.absCosAngle = abs(cosAngle);\n\n ","\n\n ","\n\n ","\n\n float groundRelative = applyHUDViewDependentPolygonOffset(pointGroundDistance, aux.absCosAngle, aux.posView);\n\n ","\n\n vec4 posProj = proj * vec4(aux.posView, 1.0);\n\n ","\n\n ","\n\n // constant part of polygon offset emulation\n posProj.z -= groundRelative * polygonOffset * posProj.w;\n return posProj;\n }\n "])),t.screenSizePerspectiveEnabled&&(t.verticalOffsetEnabled||1===t.screenCenterOffsetUnitsEnabled)?"vec4 perspectiveFactor = screenSizePerspectiveScaleFactor(aux.absCosAngle, aux.distanceToCamera, screenSizePerspectiveAlignment);":"",t.verticalOffsetEnabled?t.screenSizePerspectiveEnabled?"float verticalOffsetScreenHeight = applyScreenSizePerspectiveScaleFactorFloat(verticalOffset.x, perspectiveFactor);":"float verticalOffsetScreenHeight = verticalOffset.x;":"",t.verticalOffsetEnabled?r.glsl(c||(c=n.__makeTemplateObject(["\n float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * aux.distanceToCamera, verticalOffset.z, verticalOffset.w);\n vec3 modelOffset = aux.vnormal * worldOffset;\n aux.posModel += modelOffset;\n vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;\n aux.posView += viewOffset;\n // Since we elevate the object, we need to take that into account\n // in the distance to ground\n pointGroundDistance += worldOffset;"],["\n float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * aux.distanceToCamera, verticalOffset.z, verticalOffset.w);\n vec3 modelOffset = aux.vnormal * worldOffset;\n aux.posModel += modelOffset;\n vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;\n aux.posView += viewOffset;\n // Since we elevate the object, we need to take that into account\n // in the distance to ground\n pointGroundDistance += worldOffset;"]))):"",1!==t.screenCenterOffsetUnitsEnabled?r.glsl(u||(u=n.__makeTemplateObject(["\n // Apply x/y in view space, but z in screen space (i.e. along posView direction)\n aux.posView += vec3(centerOffset.x, centerOffset.y, 0.0);\n\n // Same material all have same z != 0.0 condition so should not lead to\n // branch fragmentation and will save a normalization if it's not needed\n if (centerOffset.z != 0.0) {\n aux.posView -= normalize(aux.posView) * centerOffset.z;\n }\n "],["\n // Apply x/y in view space, but z in screen space (i.e. along posView direction)\n aux.posView += vec3(centerOffset.x, centerOffset.y, 0.0);\n\n // Same material all have same z != 0.0 condition so should not lead to\n // branch fragmentation and will save a normalization if it's not needed\n if (centerOffset.z != 0.0) {\n aux.posView -= normalize(aux.posView) * centerOffset.z;\n }\n "]))):"",1===t.screenCenterOffsetUnitsEnabled?t.screenSizePerspectiveEnabled?"float centerOffsetY = applyScreenSizePerspectiveScaleFactorFloat(centerOffset.y, perspectiveFactor);":"float centerOffsetY = centerOffset.y;":"",1===t.screenCenterOffsetUnitsEnabled?"posProj.xy += vec2(centerOffset.x, centerOffsetY) * pixelRatio * 2.0 / viewport.zw * posProj.w;":"")),o.vertex.code.add(r.glsl(d||(d=n.__makeTemplateObject(["\n bool testVisibilityHUD(vec4 posProj) {\n // For occlusion testing, use the nearest pixel center to avoid\n // subpixel filtering messing up the color we use to test for\n vec4 posProjCenter = alignToPixelCenter(posProj, viewport.zw);\n\n vec4 occlusionPixel = texture2D(hudVisibilityTexture, .5 + .5 * posProjCenter.xy / posProjCenter.w);\n\n // the red pixel here indicates that the occlusion pixel passed the depth test against solid geometry and was written\n // the green pixel stores transparency of transparent geometry (1.0 -> fully transparent)\n // note that we also check against green == 0.0, i.e. transparent geometry that has opaque parts\n\n // thus we render visible pixels that are occluded by semi-transparent (but not fully transparent!) geometry here\n if (uRenderTransparentlyOccludedHUD > 0.5) {\n // multiplying by uRenderTransparentlyOccludedHUD allows us to ignore the second condition if\n // uRenderTransparentlyOccludedHUD = 0.75\n return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g * uRenderTransparentlyOccludedHUD < 1.0;\n }\n\n // and visible pixels that are not occluded by semi-transparent geometry here\n return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g == 1.0;\n }\n "],["\n bool testVisibilityHUD(vec4 posProj) {\n // For occlusion testing, use the nearest pixel center to avoid\n // subpixel filtering messing up the color we use to test for\n vec4 posProjCenter = alignToPixelCenter(posProj, viewport.zw);\n\n vec4 occlusionPixel = texture2D(hudVisibilityTexture, .5 + .5 * posProjCenter.xy / posProjCenter.w);\n\n // the red pixel here indicates that the occlusion pixel passed the depth test against solid geometry and was written\n // the green pixel stores transparency of transparent geometry (1.0 -> fully transparent)\n // note that we also check against green == 0.0, i.e. transparent geometry that has opaque parts\n\n // thus we render visible pixels that are occluded by semi-transparent (but not fully transparent!) geometry here\n if (uRenderTransparentlyOccludedHUD > 0.5) {\n // multiplying by uRenderTransparentlyOccludedHUD allows us to ignore the second condition if\n // uRenderTransparentlyOccludedHUD = 0.75\n return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g * uRenderTransparentlyOccludedHUD < 1.0;\n }\n\n // and visible pixels that are not occluded by semi-transparent geometry here\n return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g == 1.0;\n }\n "]))))}var a,s,l,c,u,p,d;Object.defineProperty(t,"__esModule",{value:!0}),t.HUD=o,function(e){!function(e){e[e.OCCLUDED=0]="OCCLUDED",e[e.NOTOCCLUDED=1]="NOTOCCLUDED",e[e.BOTH=2]="BOTH",e[e.COUNT=3]="COUNT"}(e.TransparentRenderStyle||(e.TransparentRenderStyle={})),e.bindUniforms=function(t,n){t.setUniform1f("uRenderTransparentlyOccludedHUD",n.renderTransparentlyOccludedHUD===e.TransparentRenderStyle.OCCLUDED?1:n.renderTransparentlyOccludedHUD===e.TransparentRenderStyle.NOTOCCLUDED?0:.75)},e.bindVisibilityTexture=function(e,t,n){t.setUniform1i("hudVisibilityTexture",1),e.bindTexture(n.hudVisibilityTexture,1),e.setActiveTexture(0)}}(o=t.HUD||(t.HUD={}))}).apply(null,i))||(e.exports=r)},uZGf:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("0LE5"),n("Rdxj"),n("2B1V"),n("tUyH"),n("FNtW"),n("CIy2"),n("LZD4"),n("s6rJ"),n("s6rJ"),n("ZeO9"),n("fQ2U")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h){Object.defineProperty(t,"__esModule",{value:!0});var f=o.newLayout().vec3f(l.VertexAttrConstants.POSITION).vec3f(l.VertexAttrConstants.NORMAL),v=function(e){function t(t,n){var i=e.call(this,n)||this;return i.supportsEdges=!0,i.techniqueConfig=new h.ShadedColorMaterialTechniqueConfiguration,i.params=p.copyParameters(t,m),i}return n.__extends(t,e),t.prototype.setParameterValues=function(e){u.updateParameters(this.params,e)&&this.parametersChanged()},t.prototype.getParameters=function(){return this.params},t.prototype.getTechniqueConfig=function(e){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.params.cullFace,this.techniqueConfig.slicePlaneEnabled=this.params.slicePlaneEnabled,this.techniqueConfig.transparent=this.params.transparent,this.techniqueConfig.writeDepth=this.params.writeDepth,this.techniqueConfig},t.prototype.getPassParameters=function(){return this.params},t.prototype.intersect=function(e,t,n,i,r,o,a){p.intersectTriangleGeometry(e,t,i,r,o,void 0,a)},t.prototype.getGLMaterial=function(e){return 0===e.output||4===e.output?new g(e):void 0},t.prototype.createBufferWriter=function(){return new c.DefaultBufferWriter(f)},t.prototype.createRenderer=function(e,t){return new d(e,t,this)},t}(s.Material);t.ShadedColorMaterial=v;var g=function(e){function t(t){var n=e.call(this,t)||this;return n.updateParameters(),n}return n.__extends(t,e),t.prototype.updateParameters=function(){this.technique=this.techniqueRep.acquireAndReleaseExisting(h.ShadedColorMaterialTechnique,this.material.getTechniqueConfig(this.output),this.technique)},t.prototype.beginSlot=function(e){if(4===this.output)return 3===e;var t=3;return this.technique.configuration.transparent&&(t=this.technique.configuration.writeDepth?5:8),e===t},t.prototype.bind=function(e,t){e.bindProgram(this.technique.program),this.technique.bindPass(e,this.material.getPassParameters(),t)},t}(a.GLMaterial),m={color:[1,1,1,1],shadingTint:[0,0,0,.25],shadingDirection:i.vec3.normalize(r.vec3f64.create(),[.5,-.5,-.5]),transparent:!1,writeDepth:!0,slicePlaneEnabled:!1,cullFace:0}}).apply(null,i))||(e.exports=r)},"ub+M":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("jZlN"),n("pcDC"),n("BcWh"),n("LxLY"),n("Vx27"),n("RYqx"),n("DtIM"),n("X5J5"),n("owRV"),n("5uSI"),n("R4nD"),n("T95R"),n("wT+E"),n("X7Ps")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g){Object.defineProperty(t,"__esModule",{value:!0});var m=function(e){function t(t){var n=e.call(this,t)||this;return n.drawOperation=null,n._createGraphic=null,n._outlineVisualElement=null,n._verticesVisualElement=null,n._stagedVerticesVisualElement=null,n.hasZ=!0,n.defaultZ=0,n.elevationInfo=null,n.snapToScene=!1,n.mode="hybrid",n.geometryType=null,n.type="draw-3d",n}return n.__extends(t,e),t.prototype.initialize=function(){var e=this,t=a.unwrapOr(this.elevationInfo,{mode:this.hasZ?"absolute-height":"on-the-ground",offset:0});this._internalGraphicsLayer=new l({elevationInfo:t}),this.view.map.layers.add(this._internalGraphicsLayer),this.drawOperation=new p.DrawOperation({view:this.view,manipulators:this.manipulators,geometryType:y(this.geometryType),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snappingEnabled:this.snapToScene,snappingDrawSurface:new d.SceneDrawSurface(this.view,t,[this._internalGraphicsLayer]),hasM:!1,elevationInfo:t}),this.drawOperation.on("vertex-add",(function(t){return e.onVertexAdd(t)})),this.drawOperation.on("vertex-remove",(function(t){return e.onVertexRemove(t)})),this.drawOperation.on("vertex-update",(function(t){return e.onVertexUpdate(t)})),this.drawOperation.on("cursor-update",(function(t){return e.onCursorUpdate(t)})),this.drawOperation.on("complete",(function(t){return e.onComplete(t)}))},t.prototype.destroy=function(){this.drawOperation.destroy(),this.drawOperation=null,this._destroyAllVisualisations(),this.view.map.remove(this._internalGraphicsLayer),this._set("view",null)},t.prototype.onInputEvent=function(e){this.drawOperation.onInputEvent(e)},t.prototype._getCreateGeometry=function(e,t){if(void 0===t&&(t=!1),null==this.drawOperation)return null;var n=a.isSome(e)?e:this.drawOperation.hasStagedVertex?this.drawOperation.numVertices-1:null,i=this.drawOperation.vertices;if(0===i.length)return null;var r=this.drawOperation.spatialReference,o=i,s=o.slice(),l=[];a.isSome(n)&&(s.splice(n,1),l.push(o[n]));var c={regularVertices:null,stagedVertices:null,full:null,outline:null},u="3d"===this.view.type&&"global"===this.view.viewingMode;switch(this.geometryType){case"point":c.regularVertices=s,c.stagedVertices=l,c.full=this.drawOperation.coordinateHelper.createPointFromArray(i[0]);break;case"polyline":c.regularVertices=s,c.stagedVertices=l,o.length>1&&(c.full=v.createPolyline([o],r,u));break;case"polygon":c.regularVertices=s,c.stagedVertices=l,o.length>2&&(c.full=v.createPolygon([o],r,u,!0));break;case"circle":if(o.length>0){var p=v.createViewAlignedCoordinateSystem(this.view,i[0]);if(1===o.length&&t){var d=o[0],h=p.makeMapPoint(d[0]+_*this.view.resolution,d[1]);c.full=v.createCircle([d,h],p,!0)}else 2===o.length&&(c.full=this.forceUniformSize?v.createCircle(i,p,this.centered):v.createEllipse(i,p,this.centered))}break;case"rectangle":o.length>0&&(p=v.createViewAlignedCoordinateSystem(this.view,i[0]),1===o.length&&t?(h=p.makeMapPoint((d=o[0])[0]+_*this.view.resolution,d[1]),c.full=v.createSquare([d,h],p,!0)):2===o.length&&(c.full=this.forceUniformSize?v.createSquare(i,p,this.centered):v.createRectangle(i,p,this.centered)));break;default:return null}switch(this.geometryType){case"point":break;case"polyline":o.length>1&&(c.outline=v.createPolyline([o],r,u));break;case"polygon":if(o.length>1){var f=[o[o.length-1]];o.forEach((function(e){f.push(e)})),c.outline=v.createPolyline([f],r,u)}break;case"circle":case"rectangle":a.isSome(c.full)&&"polygon"===c.full.type&&(c.outline=v.createPolyline(c.full.rings,r,u))}return c},t.prototype._destroyAllVisualisations=function(){this._destroyCreateGraphic(),this._destroyOutlineVisualElement(),this._destroyVerticesVisualElement(),this._destroyStagedVerticesVisualElement()},t.prototype._destroyCreateGraphic=function(){a.isSome(this._createGraphic)&&(this._internalGraphicsLayer.remove(this._createGraphic),this._createGraphic.destroy(),this._createGraphic=null)},t.prototype._destroyOutlineVisualElement=function(){a.isSome(this._outlineVisualElement)&&(this._outlineVisualElement.destroy(),this._outlineVisualElement=null)},t.prototype._destroyVerticesVisualElement=function(){a.isSome(this._verticesVisualElement)&&(this._verticesVisualElement.destroy(),this._verticesVisualElement=null)},t.prototype._destroyStagedVerticesVisualElement=function(){a.isSome(this._stagedVerticesVisualElement)&&(this._stagedVerticesVisualElement.destroy(),this._stagedVerticesVisualElement=null)},t.prototype._updateCreateGraphic=function(e){void 0===e&&(e=null);var t=this._getCreateGeometry(e);if(a.isNone(t))this._destroyAllVisualisations();else{var n=this._internalGraphicsLayer.elevationInfo,r="on-the-ground"===c.getEffectiveElevationMode(this.hasZ,n);a.isSome(t.outline)?a.isNone(this._outlineVisualElement)?(this._outlineVisualElement=new h.OutlineVisualElement({view:this.view,geometry:t.outline,elevationInfo:a.unwrap(n),isDraped:r,attached:!1}),u.settings.visualElements.lineGraphics.outline.apply(this._outlineVisualElement),u.settings.visualElements.lineGraphics.shadowStyle.apply(this._outlineVisualElement),this._outlineVisualElement.attached=!0,this._outlineVisualElement.laserlineEnabled=!0):this._outlineVisualElement.geometry=t.outline:this._destroyOutlineVisualElement(),a.isSome(t.regularVertices)?a.isNone(this._verticesVisualElement)?(this._verticesVisualElement=new f.VerticesVisualElement({view:this.view,spatialReference:this.view.spatialReference,vertices:t.regularVertices,elevationInfo:a.unwrap(this._internalGraphicsLayer.elevationInfo),attached:!1}),this._verticesVisualElement.attached=!0):this._verticesVisualElement.vertices=t.regularVertices:this._destroyVerticesVisualElement(),a.isSome(t.stagedVertices)?a.isNone(this._stagedVerticesVisualElement)?(this._stagedVerticesVisualElement=new f.VerticesVisualElement({view:this.view,spatialReference:this.view.spatialReference,vertices:t.stagedVertices,elevationInfo:a.unwrap(this._internalGraphicsLayer.elevationInfo),attached:!1}),this._stagedVerticesVisualElement.color=u.settings.colorToVec4(u.settings.reshapeManipulators.selected.color),this._stagedVerticesVisualElement.attached=!0):this._stagedVerticesVisualElement.vertices=t.stagedVertices:this._destroyStagedVerticesVisualElement(),a.isSome(t.full)?a.isNone(this._createGraphic)?(this._createGraphic=new i({geometry:t.full,symbol:this.createGraphicSymbol}),this._internalGraphicsLayer.add(this._createGraphic),this.view.maskOccludee(this._createGraphic)):this._createGraphic.geometry=t.full:this._destroyCreateGraphic()}},Object.defineProperty(t.prototype,"createGraphic",{get:function(){return this._createGraphic},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{set:function(e){this.drawOperation.interactive=e,this._set("enabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"centered",{set:function(e){this._set("centered",e),this._updateCreateGraphic()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forceUniformSize",{set:function(e){this._set("forceUniformSize",e),this._updateCreateGraphic()},enumerable:!0,configurable:!0}),t.prototype.reset=function(){},Object.defineProperty(t.prototype,"canRedo",{get:function(){return this.drawOperation.canRedo},enumerable:!0,configurable:!0}),t.prototype.redo=function(){this.drawOperation.redo()},Object.defineProperty(t.prototype,"canUndo",{get:function(){return this.drawOperation.canUndo},enumerable:!0,configurable:!0}),t.prototype.undo=function(){this.drawOperation.undo()},t.prototype.completeCreateOperation=function(){this.drawOperation.complete()},t.prototype.activate=function(){},t.prototype.deactivate=function(){this.drawOperation.isCompleted||this.emit("complete",{graphic:null,type:"complete"})},t.prototype.getVertexCoords=function(){return this.drawOperation.vertices},t.prototype.onVertexAdd=function(e){this._updateCreateGraphic(),this.emit("vertex-add",e)},t.prototype.onVertexRemove=function(e){this._updateCreateGraphic(),this.emit("vertex-remove",e)},t.prototype.onVertexUpdate=function(e){this._updateCreateGraphic(),this.emit("vertex-update",e)},t.prototype.onCursorUpdate=function(e){this._updateCreateGraphic(1===e.vertices.length?e.vertices[0].vertexIndex:null),this.emit("cursor-update",e)},t.prototype.onComplete=function(e){this._updateCreateGraphic();var t=null;if(this.drawOperation.isCompleted){var n=this._getCreateGeometry(null,!0);a.isSome(n)&&(t=new i({geometry:n.full,symbol:this.createGraphicSymbol}))}this.emit("complete",{graphic:t,type:"complete"})},n.__decorate([s.property({constructOnly:!0,nonNullable:!0})],t.prototype,"view",void 0),n.__decorate([s.property()],t.prototype,"createGraphicSymbol",void 0),n.__decorate([s.property()],t.prototype,"createGraphic",null),n.__decorate([s.property({value:!0})],t.prototype,"enabled",null),n.__decorate([s.property({value:!0})],t.prototype,"centered",null),n.__decorate([s.property({value:!0})],t.prototype,"forceUniformSize",null),n.__decorate([s.property({constructOnly:!0})],t.prototype,"hasZ",void 0),n.__decorate([s.property({nonNullable:!0})],t.prototype,"defaultZ",void 0),n.__decorate([s.property({constructOnly:!0})],t.prototype,"elevationInfo",void 0),n.__decorate([s.property()],t.prototype,"snapToScene",void 0),n.__decorate([s.property({constructOnly:!0})],t.prototype,"mode",void 0),n.__decorate([s.property({constructOnly:!0})],t.prototype,"geometryType",void 0),n.__decorate([s.property({readOnly:!0})],t.prototype,"type",void 0),n.__decorate([s.subclass("esri.views.3d.interactive.editingTools.draw3D.DrawTool")],t)}(o.EventedMixin(g.InteractiveToolBase));function y(e){switch(e){case"point":case"polyline":case"polygon":return e;case"circle":case"rectangle":return"segment";default:return r.neverReached(e),null}}t.DrawGraphicTool=m;var _=48}).apply(null,i))||(e.exports=r)},uinn:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("XwIv"),n("xoE+"),n("LxLY"),n("8MXS"),n("0LE5"),n("Rdxj"),n("WRgd"),n("lRq4"),n("DtIM"),n("Kvb2"),n("X5J5"),n("MCHn"),n("PXiz"),n("i10q"),n("/9Lg"),n("fOZq"),n("/NuL"),n("mmEe")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_){function b(e){return r.isSome(e.geometry)&&"point"===e.geometry.type}Object.defineProperty(t,"__esModule",{value:!0}),t.createVisualElements=function(e){var t=e.view,s=new y.GraphicState({graphic:e.graphic}),w=[],O=function(e,t,i){var a=e.graphic,s=new v.PointVisualElement({view:e.view,geometry:b(a)?a.geometry:null,elevationInfo:u.getGraphicEffectiveElevationInfo(a),attached:!1});return function(e,t,i,a){(function(e,t,i,o){var a=e.view,s=e.graphic,l=null,u=function(){r.isSome(l)&&(l.remove(),l=null),i.isDraped&&b(s)&&(l=function(e,t,n){_.pointToVector(t,x,e.elevationProvider.spatialReference);var i=x[0],r=x[1];return e.elevationProvider.on("elevation-change",(function(e){c.containsXY(e.extent,i,r)&&n()}))}(a,s.geometry,(function(){t.geometry=s.geometry}))),t.geometry=b(s)?s.geometry:null};o.push(i.on("changed",u),n.refHandle((function(){return l}))),u()})(e,t,i,a),d.settings.visualElements.pointGraphics.outline.apply(t),a.push(o.init(i,"displaying",(function(){return t.attached=i.displaying})))}(e,s,t,i),i.push(n.destroyHandle(s)),s}(e,s,w);return function(e,t,r,o){var s=e.view,c=e.graphic,v=new f.LineVisualElement({view:s,infinite:d.settings.visualElements.zVerticalLine.infiniteType,attached:!1});d.settings.visualElements.zVerticalLine.apply(v);var y=new h.LaserlineVisualElement({view:s,intersectsLineInfinite:!0,attached:!1});d.settings.visualElements.pointGraphics.shadowStyle.apply(y);var w=i.deg2rad(d.settings.visualElements.heightPlaneAngleCutoff),O=new h.LaserlineVisualElement({view:s,attached:!1,angleCutoff:w});d.settings.visualElements.heightPlane.apply(O);var P=u.getGraphicEffectiveElevationInfo(e.graphic),M=m.ElevationContext.fromElevationInfo(P),C="on-the-ground"===P.mode||!P.offset&&"absolute-height"!==P.mode,D=new p.ManipulatorState,R=1,E=1,A=function(){D.update(e);var n=C&&(t.isDraped||!b(c)||!c.geometry.hasZ),i=!0;if(!n&&b(c)){var r=c.geometry,u=g.evaluateElevationAlignmentAtPoint(c.geometry,s.elevationProvider,M,s.renderCoordsHelper);a.vec3.set(x,r.x,r.y,u),_.vectorToVector(x,r.spatialReference,x,s.renderCoordsHelper.spatialReference),v.worldDownAtLocation=x,y.intersectsWorldUpAtLocation=x}else i=!1;var p=2&D.grabbingState?d.settings.visualElements.laserlineAlphaMultiplier:1;p!==R&&(R=p,d.settings.visualElements.heightPlane.apply(O,p));var h=l.empty(S);!n&&t.displaying&&o.calculateMapBounds(h)&&_.vectorToVector(l.getMin(h,x),s.spatialReference,x,s.renderCoordsHelper.spatialReference)?(O.heightManifoldTarget=x,O.attached=!0):O.attached=!1;var f=4&D.grabbingState?d.settings.visualElements.laserlineAlphaMultiplier:1;f!==E&&(E=f,d.settings.visualElements.pointGraphics.shadowStyle.apply(y,f));var m=i&&t.displaying&&!n;y.attached=m,v.attached=m};r.push(t.watch(["displaying","isDraped"],A),t.on("changed",A)),e.forEachManipulator((function(e){r.push(e.events.on("grab-changed",A))})),r.push(n.destroyHandle(y)),r.push(n.destroyHandle(v)),r.push(n.destroyHandle(O)),A()}(e,s,w,O),w.push(t.trackGraphicState(s)),{visualElement:O,remove:function(){n.handlesGroup(w).remove()}}};var x=s.vec3f64.create(),S=l.create()}).apply(null,i))||(e.exports=r)},"v+nG":function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("LxLY"),n("1m5D"),n("Rdxj"),n("WRgd"),n("ZPQp"),n("ZcgO"),n("/9Lg"),n("/9Lg"),n("BwdQ"),n("mmEe"),n("ZJC8")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d){Object.defineProperty(t,"__esModule",{value:!0});var h=r.vec3f64.create();t.createStageObjectForHUD=function(e,t,r,a,s,l,u,f,v,g,m){var y=r?r.length:0,_=e.clippingExtent;if(p.pointToVector(t,h,e.elevationProvider.spatialReference),n.isSome(_)&&!o.containsPoint(_,h))return null;p.pointToVector(t,h,e.renderCoordsHelper.spatialReference);for(var b=e.localOriginFactory.getOrigin(h),x=new d({castShadow:!1,metadata:{layerUid:v,graphicUid:g,usesVerticalDistanceToGround:!0},idHint:f}),S=0;S<y;S++)x.addGeometry(r[S],a[S],s?s[S]:i.mat4f64.IDENTITY,l,b,m);return{object:x,sampledElevation:c.applyElevationAlignmentForHUD(x,t,e.elevationProvider,e.renderCoordsHelper,u)}},t.extendPointGraphicElevationContext=function(e,t,n){var i=e.elevationContext,r=n.spatialReference;p.pointToVector(t,h,r),i.centerPointInElevationSR=s.makeDehydratedPoint(h[0],h[1],t.hasZ?h[2]:0,r)},t.placePointOnGeometry=function(e){switch(e.type){case"point":return e;case"polygon":case"extent":return u.computeCentroid(e);case"polyline":var t=e.paths[0];if(!t||0===t.length)return null;var n=a.getPointOnPath(t,a.getPathLength(t)/2);return s.makeDehydratedPoint(n[0],n[1],n[2],e.spatialReference);case"mesh":return e.extent.center}return null},t.geometryToRenderInfo=function(e,t,n,i,r){var o=new Float64Array(3*e.length),a=new Float64Array(o.length);e.forEach((function(e,t){o[3*t+0]=e[0],o[3*t+1]=e[1],o[3*t+2]=e.length>2?e[2]:0}));var s=l.applyPerVertexElevationAlignment(o,t,0,a,0,o,0,o.length/3,n,i,r);return{numVertices:e.length,position:o,mapPosition:a,projectionSuccess:null!=s,sampledElevation:s}}}).apply(null,i))||(e.exports=r)},vA3N:function(e,t,n){var i,r;i=[n.dj.c(e.i),t],void 0===(r=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getElevationAtPoint=function(e,t,n){return e.getElevation(t.x,t.y,t.z||0,t.spatialReference,n)}}).apply(null,i))||(e.exports=r)},vJh7:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("qysZ")],void 0===(r=(function(e,t,n){function i(e,t,n){var i=t[0],r=t[1],o=t[2],a=t[3],s=n[0],l=n[1],c=n[2],u=n[3];return e[0]=i*s+o*l,e[1]=r*s+a*l,e[2]=i*c+o*u,e[3]=r*c+a*u,e}function r(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}Object.defineProperty(t,"__esModule",{value:!0}),t.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},t.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e},t.set=function(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=i,e[3]=r,e},t.transpose=function(e,t){if(e===t){var n=t[1];e[1]=t[2],e[2]=n}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e},t.invert=function(e,t){var n=t[0],i=t[1],r=t[2],o=t[3],a=n*o-r*i;return a?(e[0]=o*(a=1/a),e[1]=-i*a,e[2]=-r*a,e[3]=n*a,e):null},t.adjoint=function(e,t){var n=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=n,e},t.determinant=function(e){return e[0]*e[3]-e[2]*e[1]},t.multiply=i,t.rotate=function(e,t,n){var i=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(n),l=Math.cos(n);return e[0]=i*l+o*s,e[1]=r*l+a*s,e[2]=i*-s+o*l,e[3]=r*-s+a*l,e},t.scale=function(e,t,n){var i=t[1],r=t[2],o=t[3],a=n[0],s=n[1];return e[0]=t[0]*a,e[1]=i*a,e[2]=r*s,e[3]=o*s,e},t.fromRotation=function(e,t){var n=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=n,e[2]=-n,e[3]=i,e},t.fromScaling=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e},t.str=function(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},t.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2))},t.LDU=function(e,t,n,i){return e[2]=i[2]/i[0],n[0]=i[0],n[1]=i[1],n[3]=i[3]-e[2]*n[1],[e,t,n]},t.add=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e},t.subtract=r,t.exactEquals=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},t.equals=function(e,t){var i=e[0],r=e[1],o=e[2],a=e[3],s=t[0],l=t[1],c=t[2],u=t[3];return Math.abs(i-s)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(r-l)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-c)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(a-u)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(u))},t.multiplyScalar=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e},t.multiplyScalarAndAdd=function(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e[2]=t[2]+n[2]*i,e[3]=t[3]+n[3]*i,e},t.mul=i,t.sub=r}).apply(null,i))||(e.exports=r)},woUR:function(e,t){},xFEL:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("xoE+"),n("LxLY"),n("jBNx"),n("YX1r"),n("51bw"),n("FXVB"),n("1m5D"),n("W9tT"),n("DIqE"),n("0LE5"),n("Rdxj"),n("qvwY"),n("lRq4"),n("2B1V"),n("+nCE"),n("9FJH"),n("FNtW"),n("+wMf"),n("CIy2"),n("ILj8"),n("s6rJ"),n("ZeO9"),n("PwS/"),n("VQEQ"),n("pqGg")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x,S,w,O,P,M,C){Object.defineProperty(t,"__esModule",{value:!0});var D=function(e){function t(t,n){var i=e.call(this,n)||this;return i.techniqueConfig=new C.HUDMaterialTechniqueConfiguration,i.params=w.copyParameters(t,J),i}return n.__extends(t,e),t.prototype.setParameterValues=function(e){for(var t in e)"textureId"===t&&x.assert(!!this.params.textureId,"Can only change texture of material that already has a texture"),this.params[t]=e[t];this.parametersChanged()},t.prototype.getParameters=function(){return this.params},t.prototype.getTechniqueConfig=function(e){return this.techniqueConfig.output=e,this.techniqueConfig.slicePlaneEnabled=this.params.slicePlaneEnabled,this.techniqueConfig.verticalOffset=!!this.params.verticalOffset,this.techniqueConfig.screenSizePerspective=!!this.params.screenSizePerspective,this.techniqueConfig.screenCenterOffsetUnitsEnabled="screen"===this.params.centerOffsetUnits?1:0,this.techniqueConfig.polygonOffsetEnabled=this.params.polygonOffset,this.techniqueConfig.occlusionTestEnabled=this.params.occlusionTest,this.techniqueConfig.sdf=this.params.textureIsSignedDistanceField,this.techniqueConfig.vvSize=!!this.params.vvSizeEnabled,this.techniqueConfig.vvColor=!!this.params.vvColorEnabled,0===e&&(this.techniqueConfig.debugDrawBorder=!!this.params.debugDrawBorder),4===e&&(this.techniqueConfig.binaryHighlightOcclusion=this.params.binaryHighlightOcclusion),this.techniqueConfig.depthEnabled=this.params.depthEnabled,this.techniqueConfig},t.prototype.intersect=function(e,t,n,i,r,o,a,s,l){l?this.intersectDrapedHudGeometry(e,o,a,s):this.intersectHudGeometry(e,t,n,i,a,s)},t.prototype.intersectDrapedHudGeometry=function(e,t,n,i){var r=e.getAttribute(x.VertexAttrConstants.POSITION),o=e.getAttribute(x.VertexAttrConstants.SIZE),a=this.params,s=M.calculateAnchorPosForRendering(a),l=1,c=1;if(i){var u=i(W);l=u[0],c=u[5]}l*=e.pixelRatio,c*=e.pixelRatio;for(var p=Z*e.pixelRatio,d=0;d<r.data.length/r.size;d++){var h=d*r.size,f=r.data[h],v=r.data[h+1],g=d*o.size;X[0]=o.data[g]*l,X[1]=o.data[g+1]*c;var m=void 0;a.textureIsSignedDistanceField&&(m=a.outlineSize*e.pixelRatio/2),T(t,f,v,X,p,m,a,s)&&n()}},t.prototype.intersectHudGeometry=function(e,t,n,i,r,o){if(i.options.selectionMode&&i.options.hud&&!P.isInstanceHidden(t)){var s,c,u,p,f,v,g,m,y,_,S,w,O,C=e.data,D=this.params,R=1,E=1;if(a.mat3.fromMat4(N,n),o){var A=o(W);R=A[0],E=A[5],c=(s=N)[0],u=s[1],p=s[2],f=s[3],v=s[4],g=s[5],m=s[6],y=s[7],_=s[8],S=1/Math.sqrt(c*c+u*u+p*p),w=1/Math.sqrt(f*f+v*v+g*g),O=1/Math.sqrt(m*m+y*y+_*_),s[0]=c*S,s[1]=u*S,s[2]=p*S,s[3]=f*w,s[4]=v*w,s[5]=g*w,s[6]=m*O,s[7]=y*O,s[8]=_*O}var j=C.getVertexAttr()[x.VertexAttrConstants.POSITION],G=C.getVertexAttr()[x.VertexAttrConstants.SIZE],F=C.getVertexAttr()[x.VertexAttrConstants.NORMAL],Z=C.getVertexAttr()[x.VertexAttrConstants.AUXPOS1];x.assert(j.size>=3);var Y=i.point,J=i.camera,Q=M.calculateAnchorPosForRendering(D);R*=J.pixelRatio,E*=J.pixelRatio;for(var K="screen"===this.params.centerOffsetUnits,$=0;$<j.data.length/j.size;$++){var ee=$*j.size;d.vec3.set(V,j.data[ee],j.data[ee+1],j.data[ee+2]),d.vec3.transformMat4(V,V,n);var te=$*G.size;X[0]=G.data[te]*R,X[1]=G.data[te+1]*E,d.vec3.transformMat4(V,V,J.viewMatrix);var ne=$*Z.size;if(d.vec3.set(q,Z.data[ne+0],Z.data[ne+1],Z.data[ne+2]),!K&&(V[0]+=q[0],V[1]+=q[1],0!==q[2])){var ie=q[2];d.vec3.normalize(q,V),d.vec3.subtract(V,V,d.vec3.scale(q,q,ie))}var re=$*F.size;if(d.vec3.set(L,F.data[re],F.data[re+1],F.data[re+2]),this.normalAndViewAngle(L,N,J,B),this.applyVerticalOffsetTransformationView(V,B,J,I),J.applyProjection(V,z),z[0]>-1){var oe=Math.floor(z[0])+this.params.screenOffset[0],ae=Math.floor(z[1])+this.params.screenOffset[1];K&&(oe+=q[0],0!==q[1]&&(ae+=b.applyScaleFactor(q[1],I.factorAlignment))),b.applyPrecomputedScaleFactor(X,I.factor,X);var se=void 0;if(D.textureIsSignedDistanceField&&(se=D.outlineSize*J.pixelRatio/2),T(Y,oe,ae,X,k*J.pixelRatio,se,D,Q)){var le=i.ray;d.vec3.transformMat4(U,V,l.mat4.invert(H,J.viewMatrix)),z[0]=Y[0],z[1]=Y[1],J.unprojectPoint(z,V);var ce=h.vec3f64.create();d.vec3.copy(ce,le.direction);var ue=1/d.vec3.length(ce);d.vec3.scale(ce,ce,ue),r(d.vec3.distance(le.origin,V)*ue,ce,-1,1,!0,U)}}}}},t.prototype.computeAttachmentOrigin=function(e,t){var n=e.data,i="getVertexAttr"in n?n.getVertexAttr():"vertexAttr"in n?n.vertexAttr:null;if(!i)return null;var r=x.VertexAttrConstants.POSITION,o=i[r],a="getIndices"in n?n.getIndices(r):"indices"in n?n.indices[r]:null;return m.computeAttachmentOriginPoints(o,a,t)},t.prototype.createBufferWriter=function(){return new K(this)},t.prototype.createRenderer=function(e,t){return new O(e,t,this)},t.prototype.normalAndViewAngle=function(e,t,n,i){return f.isMat4(t)&&(t=a.mat3.fromMat4(F,t)),d.vec3.transformMat3(i.normal,e,t),d.vec3.transformMat4(i.normal,i.normal,n.viewInverseTransposeMatrix),i.cosAngle=d.vec3.dot(G,Y),i},t.prototype.updateScaleInfo=function(e,t,n){var i=this.params;i.screenSizePerspective?b.precomputeScaleFactor(n,t,i.screenSizePerspective,e.factor):(e.factor.scale=1,e.factor.factor=0,e.factor.minPixelSize=0,e.factor.paddingPixels=0),i.screenSizePerspectiveAlignment?b.precomputeScaleFactor(n,t,i.screenSizePerspectiveAlignment,e.factorAlignment):(e.factorAlignment.factor=e.factor.factor,e.factorAlignment.scale=e.factor.scale,e.factorAlignment.minPixelSize=e.factor.minPixelSize,e.factorAlignment.paddingPixels=e.factor.paddingPixels)},t.prototype.applyShaderOffsetsView=function(e,t,n,i,r,o,a){var s=this.normalAndViewAngle(t,n,r,B);return this.applyVerticalGroundOffsetView(e,s,r,a),this.applyVerticalOffsetTransformationView(a,s,r,o),this.applyPolygonOffsetView(a,s,i[3],r,a),this.applyCenterOffsetView(a,i,a),a},t.prototype.applyShaderOffsetsNDC=function(e,t,n,i,o){return this.applyCenterOffsetNDC(e,t,n,i),r.isSome(o)&&d.vec3.copy(o,i),this.applyPolygonOffsetNDC(i,t,n,i),i},t.prototype.applyPolygonOffsetView=function(e,t,n,r,o){var a=r.aboveGround?1:-1,s=i.sign(n);0===s&&(s=a);var l=a*s;if(this.params.shaderPolygonOffset<=0)return d.vec3.copy(o,e);var c=i.clamp(Math.abs(t.cosAngle),.01,1),u=1-Math.sqrt(1-c*c)/c/r.viewport[2];return d.vec3.scale(o,e,l>0?u:1/u),o},t.prototype.applyVerticalGroundOffsetView=function(e,t,n,i){var r=d.vec3.length(e),o=n.aboveGround?1:-1,a=.5*n.computeRenderPixelSizeAtDist(r),s=d.vec3.scale(V,t.normal,o*a);return d.vec3.add(i,e,s),i},t.prototype.applyVerticalOffsetTransformationView=function(e,t,n,i){var r=this.params;if(!r.verticalOffset||!r.verticalOffset.screenLength){if(r.screenSizePerspective||r.screenSizePerspectiveAlignment){var o=d.vec3.length(e);this.updateScaleInfo(i,o,t.cosAngle)}else i.factor.scale=1,i.factorAlignment.scale=1;return e}var a=d.vec3.length(e),s=w.verticalOffsetAtDistance(n,a,r.verticalOffset,t.cosAngle,r.screenSizePerspectiveAlignment||r.screenSizePerspective);return this.updateScaleInfo(i,a,t.cosAngle),d.vec3.scale(t.normal,t.normal,s),d.vec3.add(e,e,t.normal)},t.prototype.applyCenterOffsetView=function(e,t,n){var i="screen"!==this.params.centerOffsetUnits;return n!==e&&d.vec3.copy(n,e),i&&(n[0]+=t[0],n[1]+=t[1],t[2]&&(d.vec3.normalize(L,n),d.vec3.add(n,n,d.vec3.scale(L,L,t[2])))),n},t.prototype.applyCenterOffsetNDC=function(e,t,n,i){var r="screen"!==this.params.centerOffsetUnits;return i!==e&&d.vec3.copy(i,e),r||(i[0]+=t[0]/n.fullWidth*2,i[1]+=t[1]/n.fullHeight*2),i},t.prototype.applyPolygonOffsetNDC=function(e,t,n,r){var o=this.params.shaderPolygonOffset;if(e!==r&&d.vec3.copy(r,e),o){var a=n.aboveGround?1:-1,s=a*i.sign(t[3]);r[2]-=(s||a)*o}return r},t.prototype.getGLMaterial=function(e){return 0===e.output?new E(e):4===e.output?new A(e):void 0},t.prototype.calculateRelativeScreenBounds=function(e,t,n){return void 0===n&&(n=v.create()),function(e,t,n,i){void 0===i&&(i=j),u.vec2.copy(i,e.anchorPos),i[0]*=-t[0],i[1]*=-t[1],i[0]+=e.screenOffset[0]*n,i[1]+=e.screenOffset[1]*n}(this.params,e,t,n),n[2]=n[0]+e[0],n[3]=n[1]+e[1],n},t.shouldRenderVisibilityDuringRenderPass=function(e){return 0===e||4},t}(_.Material);t.default=D;var R=function(e){function t(t){var i=e.call(this,n.__assign(n.__assign({},t),t.material.getParameters()))||this;return i.updateParameters(),i}return n.__extends(t,e),t.prototype.beginSlot=function(e){return e===(this.params.drawInSecondSlot?19:18)},t.prototype.updateParameters=function(){this.params=w.copyParameters(this.material.getParameters()),this.updateTexture(this.params.textureId),this.selectProgram()},t.prototype.selectProgram=function(){this.technique=this.techniqueRep.acquireAndReleaseExisting(C.HUDMaterialTechnique,this.material.getTechniqueConfig(this.output),this.technique)},t.prototype.bind=function(e,t){e.bindProgram(this.technique.program),this.bindTexture(e,this.technique.program),this.bindTextureScale(e,this.technique.program),this.technique.bindPass(e,this.params,t)},t}(y),E=function(e){function t(t){var i=e.call(this,n.__assign(n.__assign({},t),{output:0}))||this;return i.isOcclusionSlot=!1,i}return n.__extends(t,e),t.prototype.beginSlot=function(e){var t=this.params.drawInSecondSlot?19:18;return this.params.occlusionTest?(this.isOcclusionSlot=12===e,12===e||e===t):(this.isOcclusionSlot=!1,e===t)},t.prototype.getTechnique=function(){return this.isOcclusionSlot?this.occlusionTechnique:this.technique},t.prototype.selectProgram=function(){this.technique=this.techniqueRep.acquireAndReleaseExisting(C.HUDMaterialTechnique,this.material.getTechniqueConfig(this.output),this.technique),this.occlusionTechnique=this.techniqueRep.acquireAndReleaseExisting(C.HUDMaterialTechnique,this.material.getTechniqueConfig(6),this.occlusionTechnique)},t.prototype.bind=function(e,t){var n=this.getTechnique();e.bindProgram(n.program),this.isOcclusionSlot||(this.bindTexture(e,n.program),this.bindTextureScale(e,n.program)),n.bindPass(e,this.params,t)},t}(R),A=function(e){function t(t){return e.call(this,n.__assign(n.__assign({},t),{output:4}))||this}return n.__extends(t,e),t}(R);function T(e,t,n,i,r,o,a,s){var l=t-r-(s[0]>0?i[0]*s[0]:0),c=l+i[0]+2*r,u=n-r-(s[1]>0?i[1]*s[1]:0),p=u+i[1]+2*r;if(a.textureIsSignedDistanceField){var d=a.distanceFieldBoundingBox;l+=i[0]*d[0],u+=i[1]*d[1],c-=i[0]*(1-d[2]),p-=i[1]*(1-d[3]),l-=o,c+=o,u-=o,p+=o}return e[0]>l&&e[0]<c&&e[1]>u&&e[1]<p}var I={factor:{scale:0,factor:0,minPixelSize:0,paddingPixels:0},factorAlignment:{scale:0,factor:0,minPixelSize:0,paddingPixels:0}},j=p.vec2f64.create(),V=h.vec3f64.create(),L=h.vec3f64.create(),z=o.createRenderScreenPointArray3(),G=h.vec3f64.create(),U=h.vec3f64.create(),N=s.mat3f64.create(),F=s.mat3f64.create(),H=c.mat4f64.create(),q=h.vec3f64.create(),B={normal:G,cosAngle:0},W=c.mat4f64.create(),k=1,Z=2,X=[0,0],Y=h.vec3f64.fromValues(0,0,1),J={texCoordScale:[1,1],occlusionTest:!0,binaryHighlightOcclusion:!0,drawInSecondSlot:!1,color:[1,1,1,1],outlineColor:[1,1,1,1],outlineSize:0,textureIsSignedDistanceField:!1,distanceFieldBoundingBox:null,vvSizeEnabled:!1,vvSizeMinSize:[1,1,1],vvSizeMaxSize:[100,100,100],vvSizeOffset:[0,0,0],vvSizeFactor:[1,1,1],vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],screenOffset:[0,0],verticalOffset:null,screenSizePerspective:null,screenSizePerspectiveAlignment:null,slicePlaneEnabled:!1,anchorPos:p.vec2f64.fromValues(.5,.5),shaderPolygonOffset:1e-5,polygonOffset:!1,textureId:null,centerOffsetUnits:"world",depthEnabled:!0,debugDrawBorder:!1},Q=g.newLayout().vec3f(x.VertexAttrConstants.POSITION).vec3f(x.VertexAttrConstants.NORMAL).vec2f(x.VertexAttrConstants.UV0).vec4u8(x.VertexAttrConstants.COLOR).vec2f(x.VertexAttrConstants.SIZE).vec4f(x.VertexAttrConstants.AUXPOS1).vec4f(x.VertexAttrConstants.AUXPOS2),K=function(){function e(e){this.material=e,this.vertexBufferLayout=Q}return e.prototype.allocate=function(e){return this.vertexBufferLayout.createBuffer(e)},e.prototype.elementCount=function(e){return 6*e.indices[x.VertexAttrConstants.POSITION].length},e.prototype.write=function(e,t,n,i){S.writePosition(t.indices[x.VertexAttrConstants.POSITION],t.vertexAttr[x.VertexAttrConstants.POSITION].data,e.transformation,n.position,i,6),S.writeNormal(t.indices[x.VertexAttrConstants.NORMAL],t.vertexAttr[x.VertexAttrConstants.NORMAL].data,e.invTranspTransformation,n.normal,i,6);var r=t.vertexAttr[x.VertexAttrConstants.UV0].data,o=void 0,a=void 0,s=void 0,l=void 0;if(null==r||r.length<4){var c=this.material.getParameters();o=0,a=0,s=c.texCoordScale[0],l=c.texCoordScale[1]}else o=r[0],a=r[1],s=r[2],l=r[3];s=Math.min(1.99999,s+1),l=Math.min(1.99999,l+1);for(var u=t.indices[x.VertexAttrConstants.POSITION].length,p=n.uv0,d=i,h=0;h<u;++h)p.set(d,0,o),p.set(d,1,a),p.set(d+=1,0,s),p.set(d,1,a),p.set(d+=1,0,s),p.set(d,1,l),p.set(d+=1,0,s),p.set(d,1,l),p.set(d+=1,0,o),p.set(d,1,l),p.set(d+=1,0,o),p.set(d,1,a),d+=1;S.writeColor(t.indices[x.VertexAttrConstants.COLOR],t.vertexAttr[x.VertexAttrConstants.COLOR].data,4,n.color,i,6);var f=t.indices[x.VertexAttrConstants.SIZE],v=t.vertexAttr[x.VertexAttrConstants.SIZE].data,g=f.length,m=n.size;for(d=i,h=0;h<g;++h)for(var y=v[2*f[h]],_=v[2*f[h]+1],b=0;b<6;++b)m.set(d,0,y),m.set(d,1,_),d+=1;t.indices[x.VertexAttrConstants.AUXPOS1]&&t.vertexAttr[x.VertexAttrConstants.AUXPOS1]&&S.writeBufferVec4(t.indices[x.VertexAttrConstants.AUXPOS1],t.vertexAttr[x.VertexAttrConstants.AUXPOS1].data,n.auxpos1,i,6),t.indices[x.VertexAttrConstants.AUXPOS2]&&t.vertexAttr[x.VertexAttrConstants.AUXPOS2]&&S.writeBufferVec4(t.indices[x.VertexAttrConstants.AUXPOS2],t.vertexAttr[x.VertexAttrConstants.AUXPOS2].data,n.auxpos2,i,6)},e}()}).apply(null,i))||(e.exports=r)},y68M:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("LxLY"),n("qMld")],void 0===(r=(function(e,t,n,i,r){Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){this.technique=e,this.refCount=0,this.refZeroFrame=0},a=function(){function e(e){this._context=e,this._perConstructorInstances=new Map,this._frameCounter=0,this._keepAliveFrameCount=1200}return Object.defineProperty(e.prototype,"viewingMode",{get:function(){return this._context.viewingMode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"constructionContext",{get:function(){return this._context},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._perConstructorInstances.forEach((function(e){return e.forEach((function(e){return e.technique.dispose()}))})),this._perConstructorInstances.clear()},e.prototype.acquire=function(e,t){var n=t.key,i=this._perConstructorInstances.get(e);i||(i=new Map,this._perConstructorInstances.set(e,i));var r=i.get(n);return void 0===r&&(r=new o(new e(this._context,t)),i.set(n,r)),++r.refCount,r.technique},e.prototype.acquireAndReleaseExisting=function(e,t,n){return i.isNone(n)?this.acquire(e,t):t.key===n.key&&n instanceof e?n:(this.release(n),this.acquire(e,t))},e.prototype.release=function(e){var t=this._perConstructorInstances.get(e.constructor).get(e.key);t.refCount-=1,0===t.refCount&&(t.refZeroFrame=this._frameCounter)},e.prototype.frameUpdate=function(){var e=this;this._frameCounter++,this._perConstructorInstances.forEach((function(t,n){t.forEach((function(n,i){0===n.refCount&&n.refZeroFrame+e._keepAliveFrameCount<e._frameCounter&&(n.technique.dispose(),t.delete(i))})),0===t.size&&e._perConstructorInstances.delete(n)}))},e.prototype.getProgramsUsingUniform=function(e){return this._context.commonUniformStore.getPrograms(e)},e.prototype.hotReload=function(){return n.__awaiter(this,void 0,void 0,(function(){var e,t=this;return n.__generator(this,(function(i){switch(i.label){case 0:return e=new Array,this._perConstructorInstances.forEach((function(i,r){e.push(function(e,i){return n.__awaiter(t,void 0,void 0,(function(){var t,r=this;return n.__generator(this,(function(n){switch(n.label){case 0:return(t=i.shader)?[4,t.reload()]:[3,2];case 1:n.sent(),e.forEach((function(e){e.technique.reload(r._context)})),n.label=2;case 2:return[2]}}))}))}(i,r))})),[4,r.all(e)];case 1:return i.sent(),[2]}}))}))},e}();t.ShaderTechniqueRepository=a}).apply(null,i))||(e.exports=r)},yVFQ:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("qsST"),n("ZcgO"),n("sCbS")],void 0===(r=(function(e,t,n,i,r,o){Object.defineProperty(t,"__esModule",{value:!0});var a=i.getLogger("esri.views.3d.layers.graphics.featureExpressionInfoUtils");function s(e){return null!=e.cachedResult}function l(e){return"0"===e?0:null}t.clone=function(e){return{cachedResult:e.cachedResult,arcade:e.arcade?{func:e.arcade.func,context:e.arcade.modules.arcadeUtils.createExecContext(null,{sr:e.arcade.context.spatialReference}),modules:e.arcade.modules}:null}},t.createContextWithoutExpressionSupport=function(e){var t=e&&e.expression;if("string"==typeof t){var n=l(t);if(null!=n)return{cachedResult:n}}return null},t.createContext=function(e,t,i){return n.__awaiter(this,void 0,void 0,(function(){var r,a,s,c,u;return n.__generator(this,(function(n){switch(n.label){case 0:return"string"!=typeof(r=e&&e.expression)?[2,null]:null!=(a=l(r))?[2,{cachedResult:a}]:[4,o.loadArcade()];case 1:return s=n.sent(),u=(c=s.arcadeUtils).createSyntaxTree(r),c.dependsOnView(u)?(null!=i&&i.error("Expressions containing '$view' are not supported on ElevationInfo"),[2,{cachedResult:0}]):[2,{arcade:{func:c.createFunction(u),context:c.createExecContext(null,{sr:t}),modules:s}}]}}))}))},t.createFeature=function(e,t,n){return e.arcadeUtils.createFeature(t.attributes,t.geometry,n)},t.setContextFeature=function(e,t){if(null!=e&&!s(e)){if(!t||!e.arcade)return void a.errorOncePerTick("Arcade support required but not provided");t._geometry&&(t._geometry=r.hydrateGeometry(t._geometry)),e.arcade.modules.arcadeUtils.updateExecContext(e.arcade.context,t)}},t.execute=function(e){if(null!=e){if(s(e))return e.cachedResult;var t=e.arcade,n=e.arcade.modules.arcadeUtils.executeFunction(t.func,t.context);return"number"!=typeof n&&(e.cachedResult=0,n=0),n}return 0},t.extractExpressionInfo=function(e,t){void 0===t&&(t=!1);var n=e&&e.featureExpressionInfo;return t||"0"===(n&&n.expression)||(n=null),n},t.zeroContext={cachedResult:0}}).apply(null,i))||(e.exports=r)},yjgM:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("zOht"),n("QDcU"),n("eIBl"),n("LxLY"),n("FXVB"),n("1m5D"),n("0LE5"),n("Rdxj"),n("DtIM"),n("woUR"),n("B3XD"),n("X5J5"),n("Fe95"),n("48/q"),n("dtql"),n("TIRl"),n("JjCO"),n("ys4y"),n("4ziW"),n("o5p5"),n("bz+r")],void 0===(r=(function(e,t,n,i,r,o,a,s,l,c,u,p,d,h,f,v,g,m,y,_,b,x,S){Object.defineProperty(t,"__esModule",{value:!0});var w=function(e){function t(t){var n=e.call(this)||this;return n._handles=new r,n._snapToScene=new m.SnapToScene,n._discMaterial=n._createMaterial(),n._discMaterialTransparent=n._createMaterial(.5),n._scale=1,n._radius=f.DISC_RADIUS,n._view=t.view,n._tool=t.tool,null!=t.snapToScene&&(n.snapToScene=t.snapToScene),null!=t.radius&&(n._radius=t.radius),n._createManipulator(),n.forEachManipulator((function(e){return n._tool.manipulators.add(e)})),n}return n.__extends(t,e),t.prototype.destroy=function(){var e=this;this._handles.destroy(),this.forEachManipulator((function(t){e._tool.manipulators.remove(t),t.destroy()})),this._tool=null,this._view=null,this._manipulator=null},t.prototype.forEachManipulator=function(e){e(this._manipulator,1)},Object.defineProperty(t.prototype,"displayScale",{get:function(){return this._scale},set:function(e){this._scale=e,this._updateManipulatorTransform()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"snapToScene",{get:function(){return this._snapToScene.enabled},set:function(e){this._snapToScene.enabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this._radius},set:function(e){e!==this._radius&&(this._radius=e,this._updateManipulator())},enumerable:!0,configurable:!0}),t.prototype.createGraphicDragPipeline=function(e,t){var n=this,i=e.graphic,r=u.getGraphicEffectiveElevationInfo(i),a=o.unwrap(i.geometry).spatialReference;return g.createGraphicMoveDragPipeline(e,t,(function(e){return n.createDragPipeline(e,r,a)}))},t.prototype.createDragPipeline=function(e,t,n){var i=this,r=this._view;return S.createManipulatorDragEventPipeline(this._manipulator,(function(o,a,s,l){var c=a.next(S.dragAtLocation(r,o.elevationAlignedLocation)).next(d.screenToMapXYAtLocation(r,o.elevationAlignedLocation,t,n)).next(i._snapToScene.createDragEventPipelineStep(r,t),i._snapToScene.next).next(S.addScreenDelta());e(o,c,s,l)}))},t.prototype._updateManipulatorTransform=function(){var e=a.mat4.fromScaling(y.sm4d.get(),l.vec3.set(y.sv3d.get(),this.displayScale,this.displayScale,this.displayScale));this._manipulator.modelTransform=e},t.prototype._createManipulator=function(){this._manipulator=new p.Manipulator3D({view:this._view,worldSized:!1,autoScaleRenderObjects:!1,focusMultiplier:1,touchMultiplier:1,collisionType:{type:"disc",direction:c.vec3f64.fromValues(0,0,1)},worldOriented:!0}),this._updateManipulator()},t.prototype._updateManipulator=function(){var e=new _(b.createCylinderGeometry(f.DISC_HEIGHT,1,f.GEOMETRY_SEGMENTS,c.vec3f64.fromValues(0,0,1),c.vec3f64.fromValues(0,0,0)),"graphic-transform-disc"),t=a.mat4.fromScaling(s.mat4f64.create(),c.vec3f64.fromValues(this._radius,this._radius,this._radius));this._manipulator.renderObjects=[{geometry:e,material:this._discMaterial,transform:t,stateMask:2},{geometry:e,material:this._discMaterialTransparent,transform:t,stateMask:1}],this._manipulator.radius=f.DISC_COLLISION_RADIUS*(this._radius/f.DISC_RADIUS)},t.prototype._createMaterial=function(e){void 0===e&&(e=1);var t=i.toUnitRGBA(h.colors.main);t[3]*=e;var n=new x({color:t,transparent:1!==e,cullFace:2},"move-xy-disc");return n.renderOccluded=2,n},Object.defineProperty(t.prototype,"test",{get:function(){return{discManipulator:this._manipulator}},enumerable:!0,configurable:!0}),t}(v.Manipulation);t.MoveXYDiscManipulation=w}).apply(null,i))||(e.exports=r)},z4cv:function(e,t,n){var i,r;i=[n.dj.c(e.i),t],void 0===(r=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.create=function(){return[1,0,0,1]},t.clone=function(e){return[e[0],e[1],e[2],e[3]]},t.fromValues=function(e,t,n,i){return[e,t,n,i]},t.createView=function(e,t){return new Float64Array(e,t,4)}}).apply(null,i))||(e.exports=r)},znI2:function(e,t,n){var i,r;i=[n.dj.c(e.i),t,n("CIy2")],void 0===(r=(function(e,t,n){function i(e){return n.getFirstObjectValue(e.data.indices).length>=1}Object.defineProperty(t,"__esModule",{value:!0}),t.splitRenderGeometryChangeSetByMaterial=function(e){for(var t=new Map,n=null,r=null,o=function(e){if(e===n)return r;var i=t.get(e);return i||t.set(e,i={toAdd:[],numToAdd:-1,toRemove:[],numToRemove:-1,toUpdate:[],numToUpdate:-1}),n=e,r=i,i},a=0;a<e.numToAdd;a++)i(s=e.toAdd[a])&&o(s.material).toAdd.push(s);for(a=0;a<e.numToRemove;a++){var s;i(s=e.toRemove[a])&&o(s.material).toRemove.push(s)}for(a=0;a<e.numToUpdate;a++){var l=e.toUpdate[a];i(l.renderGeometry)&&o(l.renderGeometry.material).toUpdate.push(l)}return t}}).apply(null,i))||(e.exports=r)}}]);