????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/50.2b49d700139caaadef96.js |
(function(){var t={"esri/views/navigation/Momentum":"2JMt","esri/views/navigation/ZoomMomentumEstimator":"6N7s","esri/views/2d/magnifier/MagnifierView2D":"6XLe","esri/views/navigation/FilteredFiniteDifference":"E9c0","esri/views/navigation/MomentumEstimator":"F3FF","esri/views/2d/navigation/actions/Pan":"G+IK","esri/views/2d/mapViewDeps":"HOOW","esri/views/2d/navigation/MapViewNavigation":"PDtg","esri/views/2d/navigation/actions/Rotate":"UrSa","esri/views/2d/navigation/actions/Pinch":"Y6jg","esri/views/navigation/RotationMomentumEstimator":"f7cP","esri/views/navigation/PanPlanarMomentumEstimator":"kLlh","esri/views/2d/LabelManager":"kUhT","esri/views/2d/navigation/ZoomBox":"q4Xm"},e=this||window,i=e.webpackJsonp=e.webpackJsonp||[];i.registerAbsMids?i.registerAbsMids(t):(i.absMidsWaiting=i.absMidsWaiting||[]).push(t)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{"2JMt":function(t,e,i){var o,n;o=[i.dj.c(t.i),e],void 0===(n=(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e,i){this._initialVelocity=t,this._stopVelocity=e,this._friction=i,this._duration=Math.abs(Math.log(Math.abs(this._initialVelocity)/this._stopVelocity)/Math.log(1-this._friction))}return Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),t.prototype.isFinished=function(t){return t>this.duration},Object.defineProperty(t.prototype,"friction",{get:function(){return this._friction},enumerable:!0,configurable:!0}),t.prototype.value=function(t){return this.valueFromInitialVelocity(this._initialVelocity,t)},t.prototype.valueDelta=function(t,e){var i=this.value(t);return this.value(t+e)-i},t.prototype.valueFromInitialVelocity=function(t,e){e=Math.min(e,this.duration);var i=1-this.friction;return t*(Math.pow(i,e)-1)/Math.log(i)},t}();e.Momentum=i}).apply(null,o))||(t.exports=n)},"6N7s":function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("zOht"),i("2JMt"),i("F3FF")],void 0===(n=(function(t,e,i,o,n){Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(e,i,o){return t.call(this,e,i,o)||this}return i.__extends(e,t),e.prototype.value=function(e){var i=t.prototype.value.call(this,e);return Math.exp(i)},e.prototype.valueDelta=function(e,i){var o=t.prototype.value.call(this,e),n=t.prototype.value.call(this,e+i)-o;return Math.exp(n)},e}(o.Momentum);e.ZoomMomentum=a;var r=function(t){function e(e,i,o,n){return void 0===e&&(e=2.5),void 0===i&&(i=.01),void 0===o&&(o=.95),void 0===n&&(n=12),t.call(this,e,i,o,n)||this}return i.__extends(e,t),e.prototype.add=function(e,i){t.prototype.add.call(this,Math.log(e),i)},e.prototype.createMomentum=function(t,e,i){return new a(t,e,i)},e}(n.MomentumEstimator);e.ZoomMomentumEstimator=r}).apply(null,o))||(t.exports=n)},"6XLe":function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("zOht"),i("KFwS"),i("qMld"),i("DJpR"),i("YaB4")],void 0===(n=(function(t,e,i,o,n,a,r){Object.defineProperty(e,"__esModule",{value:!0});var s=r.enums.WGLDrawPhase,u=function(t){function e(){var e=t.call(this)||this;return e.visible=!1,e}return i.__extends(e,t),e.prototype.destroy=function(){this._readbackTexture&&(this._readbackTexture.dispose(),this._readbackTexture=null,this._maskTexture.dispose(),this._maskTexture=null,this._overlayTexture.dispose(),this._overlayTexture=null,this._vertexArrayObject.dispose(),this._vertexArrayObject=null,this._program.dispose(),this._program=null,this._resourcesPromise=null)},Object.defineProperty(e.prototype,"magnifier",{get:function(){return this._magnifier},set:function(t){var e=this;this._magnifier=t,this._handle&&this._handle.remove(),this._handle=t.watch("version",(function(){e.visible=t.visible,e.requestRender()})),this.visible=t.visible,this.requestRender()},enumerable:!0,configurable:!0}),e.prototype.doRender=function(t){var e=this.stage.context;if(this._resourcesPromise){if(t.drawPhase===s.MAP&&this._canRender()){this._updateResources(e);var i=this._magnifier,o=1/i.factor,n=Math.ceil(o*this.overlay.width),a=Math.ceil(o*this.overlay.height),r=t.state.size,u=t.pixelRatio,l=u*r[0],p=u*r[1],c=i.position||{x:.5*r[0],y:.5*r[1]},h=u*c.x,m=p-u*c.y,d=.5*n,v=.5*a;d>h?h=d:h>=l-d&&(h=l-d-1),v>m?m=v:m>=p-v&&(m=p-v-1);var f=h-d,_=m-v,y=this._readbackTexture;e.bindTexture(y,0),e.gl.copyTexImage2D(y.descriptor.target,0,y.descriptor.pixelFormat,f,_,n,a,0);var g=this.stage.background&&this.stage.background.color,w=g?[g.a*g.r/255,g.a*g.g/255,g.a*g.b/255,g.a]:[1,1,1,1],M=(h+i.offsetX)/l*2-1,b=(m-i.offsetY)/p*2-1,x=this.overlay.width/l*2,T=this.overlay.height/p*2,D=this._program;e.bindVAO(this._vertexArrayObject),e.bindTexture(this._overlayTexture,6),e.bindTexture(this._maskTexture,7),e.bindProgram(D),D.setUniform4fv("u_background",w),D.setUniform1i("u_readbackTexture",0),D.setUniform1i("u_overlyTexture",6),D.setUniform1i("u_maskTexture",7),D.setUniform2f("u_drawPos",M,b),D.setUniform1f("u_width",x),D.setUniform1f("u_height",T),e.setStencilTestEnabled(!1),e.drawArrays(5,0,4),e.bindVAO()}}else this._resourcesPromise=this._loadResources("esri/images/magnifier/mask.png","esri/images/magnifier/overlay.png")},e.prototype._canRender=function(){return this.mask&&this.overlay&&null!=this._magnifier},e.prototype._loadResources=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var a,r;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,n.all([o.fetchAsset(t,{responseType:"image"}),o.fetchAsset(e,{responseType:"image"})])];case 1:return a=i.sent(),r=a[1].data,this.mask=a[0].data,this.overlay=r,this.requestRender(),[2]}}))}))},e.prototype._updateResources=function(t){if(!this._readbackTexture){var e=1/this._magnifier.factor,i=Math.ceil(e*this.overlay.width),o=Math.ceil(e*this.overlay.height);this._program=r.createMagnifierProgram(t);var n=new Uint16Array([0,1,0,0,1,1,1,0]);this._vertexArrayObject=new a.VertexArrayObject(t,r.magnifier.attributes,{geometry:[{name:"a_pos",count:2,type:5123,offset:0,stride:4,normalized:!1,divisor:0}]},{geometry:a.BufferObject.createVertex(t,35044,n)}),this._overlayTexture=new a.Texture(t,{target:3553,pixelFormat:6408,internalFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9728,flipped:!0},this.overlay),this._maskTexture=new a.Texture(t,{target:3553,pixelFormat:6408,internalFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9728,flipped:!0},this.mask),this._readbackTexture=new a.Texture(t,{target:3553,pixelFormat:6408,internalFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,flipped:!1,width:i,height:o})}},e}(r.DisplayObject);e.default=u}).apply(null,o))||(t.exports=n)},E9c0:function(t,e,i){var o,n;o=[i.dj.c(t.i),e],void 0===(n=(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){this.gain=t}return t.prototype.update=function(t){if(this.hasLastValue){var e=this.computeDelta(t);this.updateDelta(e)}this.lastValue=t},t.prototype.reset=function(){this.lastValue=void 0,this.filteredDelta=void 0},Object.defineProperty(t.prototype,"hasLastValue",{get:function(){return void 0!==this.lastValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasFilteredDelta",{get:function(){return void 0!==this.filteredDelta},enumerable:!0,configurable:!0}),t.prototype.computeDelta=function(t){return t-this.lastValue},t.prototype.updateDelta=function(t){this.filteredDelta=this.hasFilteredDelta?(1-this.gain)*this.filteredDelta+this.gain*t:t},t}();e.FilteredFiniteDifference=i}).apply(null,o))||(t.exports=n)},F3FF:function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("xoE+"),i("E9c0"),i("2JMt")],void 0===(n=(function(t,e,i,o,n){Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e,i,n){void 0===t&&(t=2.5),void 0===e&&(e=.01),void 0===i&&(i=.95),void 0===n&&(n=12),this.minimumInitialVelocity=t,this.stopVelocity=e,this.friction=i,this.maxVelocity=n,this.enabled=!0,this.value=new o.FilteredFiniteDifference(.8),this.time=new o.FilteredFiniteDifference(.3)}return t.prototype.add=function(t,e){if(this.enabled){if(this.time.hasLastValue){if(this.time.computeDelta(e)<.01)return;if(this.value.hasFilteredDelta){var i=this.value.computeDelta(t);this.value.filteredDelta*i<0&&this.value.reset()}}this.time.update(e),this.value.update(t)}},t.prototype.reset=function(){this.value.reset(),this.time.reset()},t.prototype.evaluateMomentum=function(){if(!this.enabled||!this.value.hasFilteredDelta)return null;var t=this.value.filteredDelta/this.time.filteredDelta;return t=i.clamp(t,-this.maxVelocity,this.maxVelocity),Math.abs(t)<this.minimumInitialVelocity?null:this.createMomentum(t,this.stopVelocity,this.friction)},t.prototype.createMomentum=function(t,e,i){return new n.Momentum(t,e,i)},t}();e.MomentumEstimator=a}).apply(null,o))||(t.exports=n)},"G+IK":function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("zOht"),i("TMur"),i("Ebn8"),i("Gtr7"),i("jBNx"),i("Vx27"),i("0LE5"),i("Rdxj"),i("xI7m"),i("kLlh")],void 0===(n=(function(t,e,i,o,n,a,r,s,u,l,p,c){return function(t){function e(e){var i=t.call(this,e)||this;return i.animationTime=0,i.momentumEstimator=new c.PanPlanarMomentumEstimator(500,6,.92),i.momentum=null,i.tmpMomentum=l.vec3f64.create(),i.momentumFinished=!1,i.viewpoint=new n({targetGeometry:new o.Point,scale:0,rotation:0}),i.watch("momentumFinished",(function(t){t&&i.navigation.stop()})),i}return i.__extends(e,t),e.prototype.begin=function(t,e){this.navigation.begin(),this.momentumEstimator.reset(),this.addToEstimator(e),this.previousDrag=e},e.prototype.update=function(t,e){this.addToEstimator(e);var i=e.center.x,o=e.center.y,n=this.previousDrag;t.viewpoint=p.translateBy(this.viewpoint,t.viewpoint,[(i=n?n.center.x-i:-i)||0,(o=n?o-n.center.y:o)||0]),this.previousDrag=e},e.prototype.end=function(t,e){this.addToEstimator(e),this.momentum=t.navigation.momentumEnabled?this.momentumEstimator.evaluateMomentum():null,this.animationTime=0,this.momentum&&this.onAnimationUpdate(t),this.previousDrag=null,this.navigation.end()},e.prototype.addToEstimator=function(t){var e=t.center.x,i=t.center.y,o=r.createScreenPointArray(-e,i),n=l.vec3f64.fromValues(-e,i,0);this.momentumEstimator.add(o,n,.001*t.timestamp)},e.prototype.onAnimationUpdate=function(t){var e=this;this.navigation.animationManager.animateContinous(t.viewpoint,(function(i,o){e.momentumFinished=!e.momentum||e.momentum.isFinished(e.animationTime);var n=.001*o;if(!e.momentumFinished){var a=e.momentum.valueDelta(e.animationTime,n);u.vec3.scale(e.tmpMomentum,e.momentum.direction,a),t.viewpoint=p.translateBy(i,i,e.tmpMomentum)}e.animationTime+=n}))},e.prototype.stopMomentumNavigation=function(){this.momentum&&(this.momentumEstimator.reset(),this.momentum=null,this.navigation.stop())},i.__decorate([s.property()],e.prototype,"momentumFinished",void 0),i.__decorate([s.property()],e.prototype,"viewpoint",void 0),i.__decorate([s.property()],e.prototype,"navigation",void 0),i.__decorate([s.subclass("esri.views.2d.navigation.actions.Pan")],e)}(a)}).apply(null,o))||(t.exports=n)},HOOW:function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("kUhT"),i("apjU"),i("PDtg"),i("6XLe")],void 0===(n=(function(t,e,i,o,n,a){Object.defineProperty(e,"__esModule",{value:!0}),e.LabelManager=i.default,e.GraphicsView2D=o.default,e.MapViewNavigation=n.default,e.MagnifierView2D=a.default}).apply(null,o))||(t.exports=n)},PDtg:function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("zOht"),i("Ebn8"),i("Gtr7"),i("Vx27"),i("oxlp"),i("xI7m"),i("q4Xm"),i("G+IK"),i("Y6jg"),i("UrSa")],void 0===(n=(function(t,e,i,o,n,a,r,s,u,l,p,c){Object.defineProperty(e,"__esModule",{value:!0});var h=new o({targetGeometry:new r}),m=[0,0],d=function(t){function e(e){var i=t.call(this,e)||this;return i._endTimer=null,i.animationManager=null,i}return i.__extends(e,t),e.prototype.initialize=function(){this.pan=new l({navigation:this}),this.rotate=new c({navigation:this}),this.pinch=new p({navigation:this}),this.zoomBox=new u({view:this.view,navigation:this})},e.prototype.destroy=function(){this.zoomBox.destroy(),this.zoomBox=null,this.animationManager=null},e.prototype.begin=function(){this._set("interacting",!0)},e.prototype.end=function(){this._lastEventTimestamp=performance.now(),this._startTimer(250)},e.prototype.zoom=function(t,e){return void 0===e&&(e=this._getDefaultAnchor()),i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(i){return this.stop(),this.begin(),this.view.constraints.snapToZoom&&this.view.constraints.effectiveLODs?t<1?[2,this.zoomIn(e)]:[2,this.zoomOut(e)]:(this.setViewpoint(e,t,0,[0,0]),[2])}))}))},e.prototype.zoomIn=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,o;return i.__generator(this,(function(i){return o=(e=this.view).constraints.snapToNextScale(e.scale),[2,this._zoomToScale(o,t)]}))}))},e.prototype.zoomOut=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,o;return i.__generator(this,(function(i){return o=(e=this.view).constraints.snapToPreviousScale(e.scale),[2,this._zoomToScale(o,t)]}))}))},e.prototype.setViewpoint=function(t,e,i,o){this.begin(),this.view.state.viewpoint=this._scaleRotateTranslateViewpoint(this.view.viewpoint,t,e,i,o),this.end()},e.prototype.setViewpointImmediate=function(t,e,i,o){void 0===e&&(e=0),void 0===i&&(i=[0,0]),void 0===o&&(o=this._getDefaultAnchor()),this.view.state.viewpoint=this._scaleRotateTranslateViewpoint(this.view.viewpoint,o,t,e,i)},e.prototype.continousRotateClockwise=function(){var t=this.get("view.viewpoint");this.animationManager.animateContinous(t,(function(t){s.rotateBy(t,t,-1)}))},e.prototype.continousRotateCounterclockwise=function(){var t=this.get("view.viewpoint");this.animationManager.animateContinous(t,(function(t){s.rotateBy(t,t,1)}))},e.prototype.resetRotation=function(){this.view.rotation=0},e.prototype.continousPanLeft=function(){var t=this.get("view.viewpoint");this.animationManager.animateContinous(t,(function(t){s.translateBy(t,t,[-10,0])}))},e.prototype.continousPanRight=function(){var t=this.get("view.viewpoint");this.animationManager.animateContinous(t,(function(t){s.translateBy(t,t,[10,0])}))},e.prototype.continousPanUp=function(){var t=this.get("view.viewpoint");this.animationManager.animateContinous(t,(function(t){s.translateBy(t,t,[0,10])}))},e.prototype.continousPanDown=function(){var t=this.get("view.viewpoint");this.animationManager.animateContinous(t,(function(t){s.translateBy(t,t,[0,-10])}))},e.prototype.stop=function(){this.pan.stopMomentumNavigation(),this.animationManager.stop(),this.end(),null!==this._endTimer&&(clearTimeout(this._endTimer),this._endTimer=null,this._set("interacting",!1))},e.prototype._startTimer=function(t){var e=this;return null!==this._endTimer||(this._endTimer=setTimeout((function(){e._endTimer=null;var t=performance.now()-e._lastEventTimestamp;t<250?e._endTimer=e._startTimer(t):e._set("interacting",!1)}),t)),this._endTimer},e.prototype._getDefaultAnchor=function(){var t=this.view,e=t.size,i=t.padding,o=i.top,n=i.bottom;return m[0]=.5*(e[0]-i.right+i.left),m[1]=.5*(e[1]-n+o),m},e.prototype._zoomToScale=function(t,e){return void 0===e&&(e=this._getDefaultAnchor()),i.__awaiter(this,void 0,void 0,(function(){var o,n,a,r,u,l,p,c;return i.__generator(this,(function(i){return a=(o=this.view).scale,r=o.viewpoint,u=o.size,l=o.padding,p=(n=o.constraints).canZoomInTo(t),c=n.canZoomOutTo(t),t<a&&!p||t>a&&!c?[2]:[2,o.goTo(s.padAndScaleAndRotateBy(h,r,t/a,0,e,u,l),{animate:!0})]}))}))},e.prototype._scaleRotateTranslateViewpoint=function(t,e,i,o,n){var a=this.view,r=a.size,u=a.padding,l=a.constraints,p=a.viewpoint,c=a.scale*i,h=l.canZoomInTo(c),m=l.canZoomOutTo(c);return(i<1&&!h||i>1&&!m)&&(i=1),s.translateBy(p,p,n),s.padAndScaleAndRotateBy(t,p,i,o,e,r,u)},i.__decorate([a.property()],e.prototype,"animationManager",void 0),i.__decorate([a.property({type:Boolean,readOnly:!0})],e.prototype,"interacting",void 0),i.__decorate([a.property()],e.prototype,"pan",void 0),i.__decorate([a.property()],e.prototype,"pinch",void 0),i.__decorate([a.property()],e.prototype,"rotate",void 0),i.__decorate([a.property()],e.prototype,"view",void 0),i.__decorate([a.property()],e.prototype,"zoomBox",void 0),i.__decorate([a.subclass("esri.views.2d.navigation.MapViewNavigation")],e)}(n);e.default=d}).apply(null,o))||(t.exports=n)},UrSa:function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("zOht"),i("TMur"),i("Ebn8"),i("Gtr7"),i("Vx27"),i("W9tT"),i("DIqE"),i("xI7m")],void 0===(n=(function(t,e,i,o,n,a,r,s,u,l){var p=u.vec2f64.create(),c=u.vec2f64.create();return function(t){function e(e){var i=t.call(this,e)||this;return i._previousCenter=u.vec2f64.create(),i.viewpoint=new n({targetGeometry:new o.Point,scale:0,rotation:0}),i}return i.__extends(e,t),e.prototype.begin=function(t,e){this.navigation.begin(),s.vec2.set(this._previousCenter,e.center.x,e.center.y)},e.prototype.update=function(t,e){var i=t.state,o=i.size,n=i.padding;s.vec2.set(p,e.center.x,e.center.y),l.getAnchor(c,o,n),t.viewpoint=l.rotateBy(this.viewpoint,t.state.paddedViewState.viewpoint,l.angleBetween(c,this._previousCenter,p)),s.vec2.copy(this._previousCenter,p)},e.prototype.end=function(){this.navigation.end()},i.__decorate([r.property()],e.prototype,"viewpoint",void 0),i.__decorate([r.property()],e.prototype,"navigation",void 0),i.__decorate([r.subclass("esri.views.2d.actions.Rotate")],e)}(a)}).apply(null,o))||(t.exports=n)},Y6jg:function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("zOht"),i("TMur"),i("Ebn8"),i("Gtr7"),i("Vx27"),i("W9tT"),i("DIqE"),i("xI7m"),i("f7cP"),i("6N7s")],void 0===(n=(function(t,e,i,o,n,a,r,s,u,l,p,c){return function(t){function e(e){var i=t.call(this,e)||this;return i._animationTime=0,i._momentumFinished=!1,i._rotationMomentumEstimator=new p.RotationMomentumEstimator(.6,.15,.95),i._rotationDirection=1,i._zoomDirection=1,i._zoomMomentumEstimator=new c.ZoomMomentumEstimator,i._zoomOnly=null,i.zoomMomentum=null,i.rotateMomentum=null,i.viewpoint=new n({targetGeometry:new o.Point,scale:0,rotation:0}),i.watch("_momentumFinished",(function(t){t&&i.navigation.stop()})),i}return i.__extends(e,t),e.prototype.begin=function(t,e){this.navigation.begin(),this._rotationMomentumEstimator.reset(),this._zoomMomentumEstimator.reset(),this._zoomOnly=null,this._previousAngle=this._startAngle=e.angle,this._previousRadius=this._startRadius=e.radius,this._previousCenter=e.center,this._updateTimestamp=null,t.constraints.rotationEnabled&&this.addToRotateEstimator(0,e.timestamp),this.addToZoomEstimator(e,1)},e.prototype.update=function(t,e){null===this._updateTimestamp&&(this._updateTimestamp=e.timestamp);var i=e.angle,o=e.radius,n=e.center,a=Math.abs(180*(i-this._startAngle)/Math.PI),r=Math.abs(o-this._startRadius),s=this._startRadius/o;if(this._previousRadius){var u=o/this._previousRadius,l=180*(i-this._previousAngle)/Math.PI;this._rotationDirection=l>=0?1:-1,this._zoomDirection=u>=1?1:-1,t.constraints.rotationEnabled?(null===this._zoomOnly&&e.timestamp-this._updateTimestamp>200&&(this._zoomOnly=r-a>0),null===this._zoomOnly||this._zoomOnly?l=0:this.addToRotateEstimator(i-this._startAngle,e.timestamp)):l=0,this.addToZoomEstimator(e,s),this.navigation.setViewpoint([n.x,n.y],1/u,l,[this._previousCenter.x-n.x,n.y-this._previousCenter.y])}this._previousAngle=i,this._previousRadius=o,this._previousCenter=n},e.prototype.end=function(t){this.rotateMomentum=this._rotationMomentumEstimator.evaluateMomentum(),this.zoomMomentum=this._zoomMomentumEstimator.evaluateMomentum(),this._animationTime=0,(this.rotateMomentum||this.zoomMomentum)&&this.onAnimationUpdate(t),this.navigation.end()},e.prototype.addToRotateEstimator=function(t,e){this._rotationMomentumEstimator.add(t,.001*e)},e.prototype.addToZoomEstimator=function(t,e){this._zoomMomentumEstimator.add(e,.001*t.timestamp)},e.prototype.canZoomIn=function(t){var e=t.constraints.effectiveMaxScale;return 0===e||t.scale>e},e.prototype.canZoomOut=function(t){var e=t.constraints.effectiveMinScale;return 0===e||t.scale<e},e.prototype.onAnimationUpdate=function(t){var e=this;this.navigation.animationManager.animateContinous(t.viewpoint,(function(i,o){var n=!e.canZoomIn(t)&&e._zoomDirection>1||!e.canZoomOut(t)&&e._zoomDirection<1,a=!e.rotateMomentum||e.rotateMomentum.isFinished(e._animationTime),r=n||!e.zoomMomentum||e.zoomMomentum.isFinished(e._animationTime),p=.001*o;if(e._momentumFinished=a&&r,!e._momentumFinished){var c=e.rotateMomentum?Math.abs(e.rotateMomentum.valueDelta(e._animationTime,p))*e._rotationDirection*180/Math.PI:0,h=e.zoomMomentum?Math.abs(e.zoomMomentum.valueDelta(e._animationTime,p)):1,m=u.vec2f64.create(),d=u.vec2f64.create();if(e._previousCenter){s.vec2.set(m,e._previousCenter.x,e._previousCenter.y),l.getPaddingScreenTranslation(d,t.size,t.padding),s.vec2.add(m,m,d);var v=t.constraints,f=t.scale,_=f*h;h<1&&!v.canZoomInTo(_)?(h=f/v.effectiveMaxScale,e.zoomMomentum=null,e.rotateMomentum=null):h>1&&!v.canZoomOutTo(_)&&(h=f/v.effectiveMinScale,e.zoomMomentum=null,e.rotateMomentum=null),l.scaleAndRotateBy(i,t.viewpoint,h,c,m,t.size)}}e._animationTime+=p}))},e.prototype.stopMomentumNavigation=function(){(this.rotateMomentum||this.zoomMomentum)&&(this.rotateMomentum&&(this._rotationMomentumEstimator.reset(),this.rotateMomentum=null),this.zoomMomentum&&(this._zoomMomentumEstimator.reset(),this.zoomMomentum=null),this.navigation.stop())},i.__decorate([r.property()],e.prototype,"_momentumFinished",void 0),i.__decorate([r.property()],e.prototype,"viewpoint",void 0),i.__decorate([r.property()],e.prototype,"navigation",void 0),i.__decorate([r.subclass("esri.views.2d.navigation.actions.Pinch")],e)}(a)}).apply(null,o))||(t.exports=n)},f7cP:function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("zOht"),i("F3FF")],void 0===(n=(function(t,e,i,o){Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){function e(e,i,o,n){return void 0===e&&(e=3),void 0===i&&(i=.01),void 0===o&&(o=.95),void 0===n&&(n=12),t.call(this,e,i,o,n)||this}return i.__extends(e,t),e.prototype.add=function(e,i){if(this.value.hasLastValue){for(var o=this.value.lastValue,n=e-o;n>Math.PI;)n-=2*Math.PI;for(;n<-Math.PI;)n+=2*Math.PI;e=o+n}t.prototype.add.call(this,e,i)},e}(o.MomentumEstimator);e.RotationMomentumEstimator=n}).apply(null,o))||(t.exports=n)},kLlh:function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("zOht"),i("0LE5"),i("Rdxj"),i("E9c0"),i("2JMt")],void 0===(n=(function(t,e,i,o,n,a,r){Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e,i,o,n,a){var r=t.call(this,e,i,o)||this;return r.sceneVelocity=n,r.direction=a,r}return i.__extends(e,t),e.prototype.value=function(e){return t.prototype.valueFromInitialVelocity.call(this,this.sceneVelocity,e)},e}(r.Momentum);e.PanPlanarMomentum=s;var u=function(){function t(t,e,i){void 0===t&&(t=300),void 0===e&&(e=12),void 0===i&&(i=.84),this.minimumInitialVelocity=t,this.stopVelocity=e,this.friction=i,this.enabled=!0,this.time=new a.FilteredFiniteDifference(.6),this.screen=[new a.FilteredFiniteDifference(.4),new a.FilteredFiniteDifference(.4)],this.scene=[new a.FilteredFiniteDifference(.6),new a.FilteredFiniteDifference(.6),new a.FilteredFiniteDifference(.6)],this.tmpDirection=n.vec3f64.create()}return t.prototype.add=function(t,e,i){if(this.enabled){if(this.time.hasLastValue&&this.time.computeDelta(i)<.015)return;this.screen[0].update(t[0]),this.screen[1].update(t[1]),this.scene[0].update(e[0]),this.scene[1].update(e[1]),this.scene[2].update(e[2]),this.time.update(i)}},t.prototype.reset=function(){this.screen[0].reset(),this.screen[1].reset(),this.scene[0].reset(),this.scene[1].reset(),this.scene[2].reset(),this.time.reset()},t.prototype.evaluateMomentum=function(){if(!this.enabled||!this.screen[0].hasFilteredDelta)return null;var t=this.screen[0].filteredDelta,e=this.screen[1].filteredDelta,i=Math.sqrt(t*t+e*e)/this.time.filteredDelta;return Math.abs(i)<this.minimumInitialVelocity?null:this.createMomentum(i,this.stopVelocity,this.friction)},t.prototype.createMomentum=function(t,e,i){o.vec3.set(this.tmpDirection,this.scene[0].filteredDelta,this.scene[1].filteredDelta,this.scene[2].filteredDelta);var n=o.vec3.length(this.tmpDirection);return n>0&&o.vec3.scale(this.tmpDirection,this.tmpDirection,1/n),new s(t,e,i,n/this.time.filteredDelta,this.tmpDirection)},t}();e.PanPlanarMomentumEstimator=u}).apply(null,o))||(t.exports=n)},kUhT:function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("zOht"),i("Gtr7"),i("ma1f"),i("7MDj"),i("qsST"),i("rMND"),i("Vx27"),i("YaB4")],void 0===(n=(function(t,e,i,o,n,a,r,s,u,l){Object.defineProperty(e,"__esModule",{value:!0});var p=r.getLogger("esri.views.2d.layers.labels.LabelManager"),c=function(t){function e(e){var i=t.call(this,e)||this;return i._applyVisibilityPassThrottled=s.throttle(i._applyVisibilityPass,64,i),i.lastUpdateId=-1,i.updateRequested=!1,i.view=null,i}return i.__extends(e,t),e.prototype.initialize=function(){var t=this;this.collisionEngine=new l.CollisionEngine(this.view.featuresTilingScheme),this._layerViewSorter=new l.LayerViewSorter((function(e,i){t.collisionEngine.registerLayerView(e,i);var o=e.tileRenderer;o&&o.forEachTile((function(i){i.isDirty=!0,t.addTile(e,i)})),t.requestUpdate()}),(function(e){t.collisionEngine.unregisterLayerView(e),t.requestUpdate()})),this.handles.add(this.view.allLayerViews.on("change",(function(e){t._layerViewSorter.update(e)})))},e.prototype.destroy=function(){this._layerViewSorter.destroy(),this._layerViewSorter=null,this.collisionEngine=null,this._applyVisibilityPassThrottled.remove()},Object.defineProperty(e.prototype,"updating",{get:function(){return this.updateRequested},enumerable:!0,configurable:!0}),e.prototype.update=function(t){this._applyVisibilityPassThrottled(t)},e.prototype.viewChange=function(){this.requestUpdate()},e.prototype.requestUpdate=function(){this.updateRequested||(this.updateRequested=!0,this.view.requestUpdate())},e.prototype.processUpdate=function(t){this._set("updateParameters",t),this.updateRequested&&(this.updateRequested=!1,this.update(t))},e.prototype.addTile=function(t,e){this.collisionEngine.addTile(t,e)},e.prototype.removeTile=function(t,e){this.collisionEngine.removeTile(t,e)},e.prototype._applyVisibilityPass=function(t){try{var e=this.view.featuresTilingScheme.getClosestInfoForScale(t.state.scale).level;this.collisionEngine.run(t,e)}catch(t){p.error(new n("mapview-labeling","Encountered an error during label decluttering",t))}},i.__decorate([u.property()],e.prototype,"updateRequested",void 0),i.__decorate([u.property({readOnly:!0})],e.prototype,"updateParameters",void 0),i.__decorate([u.property({dependsOn:["updateRequested"]})],e.prototype,"updating",null),i.__decorate([u.property()],e.prototype,"view",void 0),i.__decorate([u.subclass("esri.views.2d.layers.labels.LabelManager")],e)}(a.HandleOwnerMixin(o));e.default=c}).apply(null,o))||(t.exports=n)},q4Xm:function(t,e,i){var o,n;o=[i.dj.c(t.i),e,i("zOht"),i("Gtr7"),i("jBNx"),i("Vx27")],void 0===(n=(function(t,e,i,o,n,a){var r="Shift";return function(t){function e(e){var i=t.call(this,e)||this;return i._container=null,i._overlay=null,i._backgroundShape=null,i._boxShape=null,i._box={x:0,y:0,width:0,height:0},i._redraw=i._redraw.bind(i),i}return i.__extends(e,t),e.prototype.destroy=function(){this.view=null},Object.defineProperty(e.prototype,"view",{set:function(t){var e=this;this._handles&&this._handles.forEach((function(t){t.remove()})),this._handles=null,this._destroyOverlay(),this._set("view",t),t&&(t.on("drag",[r],(function(t){return e._handleDrag(t,1)})),t.on("drag",[r,"Ctrl"],(function(t){return e._handleDrag(t,-1)})))},enumerable:!0,configurable:!0}),e.prototype._start=function(){this._createContainer(),this._createOverlay(),this.navigation.begin()},e.prototype._update=function(t,e,i,o){this._box.x=t,this._box.y=e,this._box.width=i,this._box.height=o,this._rafId||(this._rafId=requestAnimationFrame(this._redraw))},e.prototype._end=function(t,e,i,o,a){var r=this.view,s=r.toMap(n.createScreenPoint(t+.5*i,e+.5*o)),u=Math.max(i/r.width,o/r.height);-1===a&&(u=1/u),this._destroyOverlay(),this.navigation.end(),r.goTo({center:s,scale:r.scale*u})},e.prototype._updateBox=function(t,e,i,o){var n=this._boxShape;n.setAttributeNS(null,"x",""+t),n.setAttributeNS(null,"y",""+e),n.setAttributeNS(null,"width",""+i),n.setAttributeNS(null,"height",""+o),n.setAttributeNS(null,"class","esri-zoom-box__outline")},e.prototype._updateBackground=function(t,e,i,o){this._backgroundShape.setAttributeNS(null,"d",this._toSVGPath(t,e,i,o,this.view.width,this.view.height))},e.prototype._createContainer=function(){var t=document.createElement("div");t.className="esri-zoom-box__container",this.view.root.appendChild(t),this._container=t},e.prototype._createOverlay=function(){var t=this.view.width,e=this.view.height,i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttributeNS(null,"d","M 0 0 L "+t+" 0 L "+t+" "+e+" L 0 "+e+" Z"),i.setAttributeNS(null,"class","esri-zoom-box__overlay-background");var o=document.createElementNS("http://www.w3.org/2000/svg","rect"),n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),n.setAttributeNS(null,"class","esri-zoom-box__overlay"),n.appendChild(i),n.appendChild(o),this._container.appendChild(n),this._backgroundShape=i,this._boxShape=o,this._overlay=n},e.prototype._destroyOverlay=function(){this._container&&this._container.parentNode&&this._container.parentNode.removeChild(this._container),this._container=this._backgroundShape=this._boxShape=this._overlay=null},e.prototype._toSVGPath=function(t,e,i,o,n,a){var r=t+i,s=e+o;return"M 0 0 L "+n+" 0 L "+n+" "+a+" L 0 "+a+" ZM "+t+" "+e+" L "+t+" "+s+" L "+r+" "+s+" L "+r+" "+e+" Z"},e.prototype._handleDrag=function(t,e){var i,o,n,a,r=t.x,s=t.y,u=t.origin.x,l=t.origin.y;switch(r>u?(i=u,n=r-u):(i=r,n=u-r),s>l?(o=l,a=s-l):(o=s,a=l-s),t.action){case"start":this._start();break;case"update":this._update(i,o,n,a);break;case"end":this._end(i,o,n,a,e)}t.stopPropagation()},e.prototype._redraw=function(){if(this._rafId&&(this._rafId=null,this._overlay)){var t=this._box,e=t.x,i=t.y,o=t.width,n=t.height;this._updateBox(e,i,o,n),this._updateBackground(e,i,o,n),this._rafId=requestAnimationFrame(this._redraw)}},i.__decorate([a.property()],e.prototype,"navigation",void 0),i.__decorate([a.property()],e.prototype,"view",null),i.__decorate([a.subclass("esri.views.2d.navigation.ZoomBox")],e)}(o)}).apply(null,o))||(t.exports=n)}}]);