/*! * mantle - NAVER Maps API v3.9.1 - 2025-05-30 13:46:45 * * Copyright(c) 2025, NAVER corp, Team mantle */ !function(t,e){function i(){return t.XMLHttpRequest?new t.XMLHttpRequest:null}var n=t.document,o={},s=null;!function(){var t=function(){};t.prototype={constructor:t,__export:function(){return o}},s=new t}(),s.onJSContentLoaded=null,s.jsContentLoaded=!1;var r=null,a=/map-latest\.js\b/,h=/openapi\/maps3(\.max)?\.js\b/;!function(){for(var t=n.getElementsByTagName("script"),e="",i=t.length-1;i>=0;i--){var o=t[i].src;if(a.test(o)||h.test(o)){e=o;break}}if(t=null,e=(e||"").split("?")[1]){e=e.split("&");for(var s=e.length-1;s>=0;s--)0===e[s].indexOf("language=")&&(r=e[s].replace("language=","").toLowerCase())}}(),rt=function(){throw new Error("invalid access")};var l=function(e){if(!it){nt++;var i=[[108,111,99,97,108,104,111,115,116],[49,50,55,46,48,46,48,46,49],[110,97,118,101,114,46,99,111,109],[109,111,100,111,111,46,97,116],[108,105,110,101,40,45,41,63,40,40,97,108,112,104,97,41,124,40,98,101,116,97,41,124,40,114,99,41,41,63,92,46,109,101],[110,97,118,101,114,99,111,114,112,46,99,111,109],[110,97,118,101,114,104,97,110,100,115,46,99,111,109],[108,105,110,101,99,111,114,112,46,99,111,109],[110,104,110,99,111,114,112,46,99,111,109],[110,104,110,110,101,120,116,46,111,114,103],[110,104,110,115,121,115,116,101,109,46,99,111,109],[115,112,97,99,101,99,108,111,117,100,46,107,114],[103,114,97,102,111,108,105,111,46,99,111,109],[99,111,110,110,101,99,116,46,111,114,46,107,114],[110,102,114,97,46,105,111],[119,104,97,108,101,115,112,97,99,101,46,105,111],[110,97,118,101,114,108,97,98,115,46,99,111,109],[110,98,112,45,99,111,114,112,46,99,111,109],[110,97,118,101,114,105,110,115,46,99,111,109],[110,116,115,45,99,111,114,112,46,99,111,109],[115,110,111,119,99,111,114,112,46,99,111,109],[110,105,116,115,45,99,111,114,112,46,99,111,109],[99,112,97,114,116,110,101,114,115,45,99,111,114,112,46,99,111,109],[105,110,45,99,111,109,109,115,46,99,111,46,107,114],[103,119,101,98,115,99,111,114,112,46,99,111,109],[115,101,97,114,99,104,115,111,108,117,116,105,111,110,115,46,99,111,46,107,114],[110,97,118,101,114,102,111,117,110,100,97,116,105,111,110,46,111,114,103],[116,101,99,104,45,115,116,97,114,116,117,112,46,107,114],[100,101,118,105,101,119,46,107,114],[110,97,118,101,114,122,45,99,111,114,112,46,99,111,109],[108,105,102,101,105,115,99,111,109,105,99,46,99,111,109],[107,114,101,97,109,99,111,114,112,46,99,111,109],[107,114,101,97,109,112,97,121,99,111,114,112,46,99,111,109],[109,117,110,112,105,97,99,111,114,112,46,99,111,109],[109,117,110,112,105,97,46,99,111,109],[97,114,116,105,99,108,101,46,109,101],[115,116,117,100,105,111,108,105,99,111,46,99,111,109],[110,115,98,99,46,99,111,46,107,114],[98,97,110,100,46,117,115],[99,115,115,107,56,120,51,56,57,49],[49,48,46,49,55,55,46,49,54,49,46,49,52,55]],n=!1;!function(t,e){if(t){e=e||P;for(var i=0,o=t.length;i-1,A=(t.devicePixelRatio||1)>1?2:1,k=C?"https://ssl.pstatic.net/static":"http://static.naver.net",D=k+"/maps/mantle/"+A+"x",z=D+"/dot.gif",R=z,B='Helvetica,AppleSDGothicNeo-Light,nanumgothic,NanumGothic,"\ub098\ub214\uace0\ub515",Dotum,"\ub3cb\uc6c0",sans-serif',N="margin:0;padding:0;border:solid 0 transparent;display:block;box-sizing:content-box !important;",V="position:absolute;top:0;left:0;z-index:0;"+N,Z=V+"width:0;height:0;overflow:visible;",F="max-width:none !important;max-height:none !important;min-width:0 !important;min-height:0 !important;",U="-webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-drag: none;",j="-webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;",Y=1,X={mousedown:!0,mouseup:!0,mousemove:!0,touchstart:!0,touchmove:!0,touchend:!0,dblclick:!0,doubletap:!0,longtap:!0},G={image:1,circle:2,path:3,closedPath:4,html:5},W={coords:[11,0,9,0,6,1,4,2,2,4,0,8,0,12,1,14,2,16,5,19,5,20,6,23,8,26,9,30,9,34,13,34,13,30,14,26,16,23,17,20,17,19,20,16,21,14,22,12,22,12,22,8,20,4,18,2,16,1,13,0],type:"poly"},K=1,H="Point",q="LineString",J="Polygon",Q="MultiLineString",$="GeometryCollection",tt="Feature",et="FeatureCollection",it=!1,nt=0,ot=[],st=null,rt=function(){t.navermap_authFailure&&"function"==typeof t.navermap_authFailure&&t.navermap_authFailure()},at=function(){if(0!==ot.length){for(var e=0,i=ot.length;e1,lt=ht?"@2x":"",ct={},ut=["basic","terrain","satellite"],pt={basic:"normal",terrain:"terrain",satellite:"satellite",dbasic:"dark"},dt={BACKGROUND:"bg",BACKGROUND_DETAIL:"ol",POI_KOREAN:"lko",POI_ENGLISH:"len",POI_CHINESE:"lzh",POI_JAPANESE:"lja",BYCYCLE:"br",PANORAMA:"ps",CADASTRAL:"lp",HIKING_TRAIL:"ar",CTT:"ctt",SUBWAY:"sw",TRANSIT:"ts",BUS_STATION:"bs",INDOOR:"ib"},gt=function(t){var e=t?C?"https://map.pstatic.net/nrb/styles/":"http://nrb.map.naver.net/styles/":C?"https://nrbe.pstatic.net/styles/":"http://nrbe.map.naver.net/styles/",i=[e+"basic"+lt+".json?fmt=png",e+"terrain"+lt+".json?fmt=png",e+"satellite"+lt+".json?fmt=png"];return t&&i.push(e+"dbasic"+lt+".json?fmt=png"),i};ut.push("dbasic");var ft=["bg","ol","sw","bs","ts","ps","pr","br","ar","rtrl","rtrd","rtrg","lp","ctt","cctv","lko","len","lzh","lja","ib"],_t=ft,mt=_t.indexOf("bs"),yt=_t.indexOf("sw"),vt=_t.indexOf("ts"),Tt={TRY_AGAIN_CONTROL:["init \uc774\ubca4\ud2b8 \uc774\ud6c4 Control\uc744 \uc0dd\uc131\ud574 \uc8fc\uc138\uc694.","\u25a0 Web Dynamic Map \ub9f5 \ud0c0\uc77c \uad6c\ubc84\uc804\uc5d0\uc11c \uc2e0\ubc84\uc804\uc73c\ub85c \uc804\ud658\ud558\uae30(https://navermaps.github.io/maps.js.ncp/docs/tutorial-StyleMap-1.html)"],TRY_AGAIN_LAYER:["init \uc774\ubca4\ud2b8 \uc774\ud6c4 Layer\ub97c \uc0dd\uc131\ud574 \uc8fc\uc138\uc694.","\u25a0 Web Dynamic Map \ub9f5 \ud0c0\uc77c \uad6c\ubc84\uc804\uc5d0\uc11c \uc2e0\ubc84\uc804\uc73c\ub85c \uc804\ud658\ud558\uae30(https://navermaps.github.io/maps.js.ncp/docs/tutorial-StyleMap-1.html)"],TEMPORARY_ERROR:["\uc77c\uc2dc\uc801\uc778 \uc11c\ube44\uc2a4 \uc624\ub958\uc785\ub2c8\ub2e4. \uc7a0\uc2dc \ud6c4 \ub2e4\uc2dc \uc2dc\ub3c4\ud574 \uc8fc\uc138\uc694.","Naver Cloud Platform \ubb38\uc758\ud558\uae30 > (https://www.ncloud.com/support/question)"],ANDROID_ERROR_GUIDE:["\uc548\ub4dc\ub85c\uc774\ub4dc 9 \uc774\uc0c1\uc5d0\uc11c\ub294 HTTP \ud3c9\ubb38 \ud1b5\uc2e0\uc774 \uae30\ubcf8\uc801\uc73c\ub85c \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.","\uc571\uc5d0\uc11c \ub124\ud2b8\uc6cc\ud06c \ubcf4\uc548 \uad6c\uc131 (https://developer.android.com/training/articles/security-config) \uc744 \ud1b5\ud574 *.map.naver.com, *.map.naver.net \uc5d0 \ub300\ud55c \ud3c9\ubb38 \ud1b5\uc2e0\uc744 \ud5c8\uc6a9\ud574 \uc8fc\uc138\uc694."]},xt={DEFAULT_TWO_LINE:["font-family:helvetica,dotum; font-size:14px;color:green;","font-family:helvetica,dotum; font-size:14px;"]},bt={NORMAL:"normal",TERRAIN:"terrain",SATELLITE:"satellite",HYBRID:"hybrid",DARK:"dark"};o.TILE_TYPES=ut,o.GET_STYLE_MAP_METADATA_URLS=gt,o.SSL=C,o.IS_IN_HOUSE=!0;var Mt=t.console||{info:function(t){},log:function(t){},warn:function(t){},error:function(t){}},Et={noop:function(){},isDefined:function(t){return t!==e},isNumber:function(t){return"number"==typeof t},isFloat:function(t){return Number(t)===t&&t%1!=0},isString:function(t){return"string"==typeof t},isFunction:function(t){return"function"==typeof t},isNull:function(t){return null===t},isElement:function(t){return!(!t||1!=t.nodeType)},hasValue:function(t){return Et.isDefined(t)&&null!==t&&""!==t},isArray:function(){return Array.isArray?function(t){return Array.isArray(t)}:function(t){return t&&t instanceof Array&&t.constructor===Array}}(),isEmptyObject:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},nearRange:function(t,e,i){return Math.max(Math.min(t,i),e)},forEach:function(t,e){if(!t||!e)return t;if(Et.isArray(t))for(var i=0,n=t.length;i=e&&t.height>=i}(t,c,u)&&!(d>n);)d++,c*=2,u*=2;return d--,d=o.nearRange(d,s,n),{zoom:d,center:i.fromPointToCoord(p),centerPoint:p}},o.nearestPointOnLine=function(t,e,i){var n={x:i.x-e.x,y:i.y-e.y},s={x:t.x-e.x,y:t.y-e.y},r=n.x*n.x+n.y*n.y,a=s.x*n.x+s.y*n.y,h=Math.min(1,Math.max(0,a/r));return new o.Point(e.x+n.x*h,e.y+n.y*h)},o.calcAnchorPosition=function(t,e){if(e instanceof Ct)return e;if(o.isFunction(e))return e(t.width,t.height);var i=t.width,n=t.height,s=i/2,r=n/2,a=null;switch(e){case f.CENTER:a=Ct(s,r);break;case f.TOP_LEFT:case f.LEFT_TOP:a=Ct();break;case f.TOP_CENTER:a=Ct(s,0);break;case f.TOP_RIGHT:case f.RIGHT_TOP:a=Ct(i,0);break;case f.LEFT_CENTER:a=Ct(0,r);break;case f.LEFT_BOTTOM:case f.BOTTOM_LEFT:a=Ct(0,n);break;case f.RIGHT_CENTER:a=Ct(i,r);break;case f.RIGHT_BOTTOM:case f.BOTTOM_RIGHT:a=Ct(i,n);break;case f.BOTTOM_CENTER:a=Ct(s,n);break;default:a=Ct(s,n)}return a},o.round=Math.round,o.floor=Math.floor,o.ceil=Math.ceil,o.trbl=function(t){return t=wt({top:0,right:0,bottom:0,left:0},t),t.top=parseFloat(t.top),t.right=parseFloat(t.right),t.bottom=parseFloat(t.bottom),t.left=parseFloat(t.left),t},o.trbl_isZero=function(t){return 0===t.top&&0===t.right&&0===t.bottom&&0===t.left},o.trbl_abs=function(t){return t.top=Math.abs(t.top),t.right=Math.abs(t.right),t.bottom=Math.abs(t.bottom),t.left=Math.abs(t.left),t},o.getLiteralType=function(t){var e={Point:["x","y"],LatLng:["lat","lng"],PointBounds:["minX","minY","maxX","maxY"],LatLngBounds:["west","south","east","north"]};if(o.isArray(t))return 2===t.length?o.Point:4===t.length?o.PointBounds:3===t.length?o.Point:null;for(var i in e)if(e.hasOwnProperty(i)&&o.isObjectLiteral(t,e[i]))return o[i];return null},o.isObjectLiteral=function(t,e){if(!t||"object"!=typeof t)return!1;for(var i=!0,n=0,o=e.length;n-1&&(e[3]="edge"),t.indexOf("naver(")>-1&&(e[3]="naver"),e):(e=/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(t))?e:(e=/(msie) ([\w.]+)/.exec(t))?e:(e=/(mozilla)(?:.*? rv:([\w.]+))?/.exec(t))?(i=/rv:([\w.]+)/.exec(t),e[2]=i&&i[1]?i[1]:"",t.indexOf("trident")>-1&&(e[1]="msie"),t.indexOf("googlebot")>-1&&(e[3]="googlebot"),e):[]}(e),s={},r="",a=!1,h=!1,l=["ipad","ipod","iphone"],c=["android","nokia","webos","opera mini","blackberry"].concat(l),u=0;u-1){a=c[u],r=c[u];break}for(u=0;u1&&(a="iOS",r="ipad"),h=/naver\(inapp; search;/.test(e)||/naver\(inapp; map;/.test(e),s[i[1]]=!0,s.version=parseFloat(i[2]),s.msie){var p=/trident\/([\w.]+)/.exec(e);p&&p[1]&&(s.trident=parseFloat(p[1])),(n.documentMode&&n.documentMode<=8||s.version<=8)&&(s.csszoom=!0)}if(i[3]&&(s[i[3]]=!0),"android"!==a||s.chrome||s.naver||!s.webkit||(s.android=!0),o.Agent={browser:s,devicePixelRatio:t.devicePixelRatio||1,mobile:a,device:r,naverApp:h},"android"===a){var d=e.match(/android\s([0-9\.]*)/);d&&d[1]&&(o.Agent.version=d[1])}var g=!1,f=!1,_=!1;if(a){if("iOS"===a)f=!0;else if("android"===a){var m=parseFloat(o.Agent.version);m>=4.1&&(f=!0,m<4.2&&(g=!0))}}else f=!0,s.chrome?(_=!0,f=!1):s.msie&&s.version<10?f=!1:s.safari&&5.1===s.version&&(f=!1);!a&&("ontouchstart"in t||navigator.maxTouchPoints)&&(o.Agent.touchablePC=!0),o.Agent.usingGPU=f,o.Agent.restrictiveGPU=g,o.Agent.poorGPU=_}();var Lt=o.Agent;Et.Agent=Lt,function(){Lt.mobile?(c=["touchstart","touchend","click"],u=c.concat(["touchmove"]),p=c,GROUND_DOMEVENTS=c,S=8):(c=["click","mousedown","mouseup","contextmenu"],u=c.concat(["mousemove","mouseout","mouseover"]),p=Lt.browser.safari&&5.1===Lt.browser.version?c.concat(["mouseover","mouseout"]):c.concat(["mouseenter","mouseleave"]),GROUND_DOMEVENTS=c,S=5,Lt.touchablePC&&(S=8,u=u.concat("touchstart"),p=p.concat("touchstart")))}(),function(){var t=o.Agent.browser.msie||o.Agent.browser.edge,e="font-family:helvetica,dotum;";o.console={header:t?" NAVER Maps JavaScript API v3 \n\n":"%c NAVER Maps JavaScript API v3 %c\n\n",multiMessageHeader:t?" NAVER Maps JavaScript API v3 \n\n":"%c NAVER Maps JavaScript API v3 \n\n",headerStyle:t?"":e+"font-size:16px;background: #2db400; color: white; display: block;",msgStyle:t?"":e+"font-size:14px;background: #fff; color: #334231; display: inline;",once:function(){var e={};return function(i,n){if(!e[i])try{var s=wt({header:o.console.headerStyle,msg:o.console.msgStyle},n||{});t&&(s.header="",s.msg=""),Mt.info(o.console.header+i,s.header,s.msg),e[i]=1}catch(t){}}}(),info:function(e,i){try{var n=wt({header:o.console.headerStyle,msg:o.console.msgStyle},i||{});t&&(n.header="",n.msg=""),Mt.info(o.console.header+e,n.header,n.msg)}catch(t){}},log:function(e,i){if(e){var n=o.isArray(i),s=o.isArray(e),r=s?"":e,a=s?e.length:1,h=i||o.console.msgStyle,l=n?h:[h],c=n?o.console.msgStyle:h,u=s?o.console.multiMessageHeader:o.console.header;try{s&&o.forEach(e,function(t){r+="%c"+t+"\n",n||l.push(c)}),l.length>a&&(l.length=a);if(l.lengthl.length;)l.push(c);if(l.unshift(o.console.headerStyle),r=u+r,t){var p=r.split("%c");return void Mt.log(p.join(""))}Mt.log.apply(Mt,[r].concat(l))}catch(t){Mt.log(s?e.join(" "):e)}}}}}();var Ot=function(t,e,i,n){var o=function(){},s=[],r={},a={};e&&(o.prototype=e.prototype,a=new o),Et.isArray(i)?(s=i,r=n):r=i||{};for(var h=0,l=s.length;h-1&&t.splice(i,1),0===t.length&&this._stop(),i>-1?e:null},_run:function(){e||(this._fProcess||(this._fProcess=Pt(this._process,this)),e=o.requestAnimationFrame(this._fProcess))},_process:function(){var i,n=t.length;if(n>0){for(n-=1;n>=0;n--)(i=t[n])&&i();e=o.requestAnimationFrame(this._fProcess)}else e=null,this._stop()},_stop:function(){!e||t.length>0||(o.cancelAnimationFrame(e),e=null,t.length=0,t=[])}}}(),o.Transition=function(t){this.relations=[],this.options=wt({start:St,progress:St,complete:St,stop:St,step:0,duration:0,easing:o.easing.linear},t)},o.Transition.prototype={constructor:o.Transition,isRunning:function(){return this._animLoop!==e},_getEasing:function(t){return o.isFunction(t)?t:o.easing[t]},run:function(t,e,i){i=i||{};var n=this.options,s=this._getEasing(i.easing||n.easing),r=i.duration||n.duration,a=o.now(),h=n.step,l=i.infinity||!1,c=a,u={from:t,to:e,easing:s,progress:{}},p=this;this.stop(),n.start(),Bt.trigger(p,"start"),this._animLoop=function(){var i=o.now(),d=i-a,g=d/r;if(!(i-c=r?u.progress=e:o.forEach(t,function(t,i){u.progress[i]=s(g,t,e[i]-t)}),u.factor=g,d-1&&this.relations.splice(e,1),Bt.removeListener(t)},clearListeners:function(){for(var t=0,e=this.relations.length;t=this.minY()&&i<=this.maxY();return r&&(r=e>=n&&e<=s),r},hasBounds:function(t){t=o.box(t,It);var e=t.getMin(),i=t.getMax();return!(!this.hasPoint(e)||!this.hasPoint(i))},intersects:function(t){t=o.box(t,It);var e=this.minX(),i=this.maxX(),n=t.minX(),s=t.maxX();return this.minY()<=t.maxY()&&this.maxY()>=t.minY()&&e<=s&&i>=n},getCenter:function(){var t=this.minX()+Math.abs(this.maxX()-this.minX())/2,e=this.minY()+Math.abs(this.maxY()-this.minY())/2;return Ct(t,e)},equals:function(t){return t=o.box(t,It),this.getMin().equals(t.getMin())&&this.getMax().equals(t.getMax())},getMin:function(){return this._min},getMax:function(){return this._max},minX:function(){return this._min.x},minY:function(){return this._min.y},maxX:function(){return this._max.x},maxY:function(){return this._max.y},extend:function(t){t=o.box(t,Ct);var e,i,n=this._min,s=this._max;return e=t,i=t,n.x=Math.min(e.x,n.x),n.y=Math.min(e.y,n.y),s.x=Math.max(i.x,s.x),s.y=Math.max(i.y,s.y),this},union:function(t){t=o.box(t,It);var e=Math.min(this.minY(),t.minY()),i=Math.max(this.maxY(),t.maxY()),n=Math.min(this.minX(),t.minX()),s=Math.max(this.maxX(),t.maxX());return new It(Ct(n,e),Ct(s,i))},toArray:function(){return[this.getMin().toArray(),this.getMax().toArray()]}},o.PointBounds.bounds=function(){if(arguments.length<2)return null;for(var t=[],e=0,i=arguments.length;e=this.minY()&&i<=this.maxY();return r&&(r=n<=s?e>=n&&e<=s:e>=s&&e<=n),r},hasLatLng:function(t){return t=o.box(t,At),this.hasPoint(t)},intersects:function(t){t=o.box(t,kt);var e=this.minX(),i=this.maxX(),n=i=t.minY()&&e<=a&&n>=s},getCenter:function(){var t=this.minY()+Math.abs(this.maxY()-this.minY())/2,e=this.minX()+Math.abs((this.minX()>this.maxX()?360:0)+this.maxX()-this.minX())/2;return o.LatLng(t,e)},equals:function(t){return t=o.box(t,kt),this.getMin().equals(t.getMin())&&this.getMax().equals(t.getMax())},getSW:function(){return this.getMin()},getNE:function(){return this.getMax()},minX:function(){return this._sw.lng()},minY:function(){return this._sw.lat()},maxX:function(){return this._ne.lng()},maxY:function(){return this._ne.lat()},south:function(){return this.minY()},west:function(){return this.minX()},north:function(){return this.maxY()},east:function(){return this.maxX()},extend:function(t){t=o.box(t,At);var e,i,n=this._sw,s=this._ne;return e=t,i=t,n._lat=this._min.y=Math.min(e.y,n.y),n._lng=this._min.x=Math.min(e.x,n.x),s._lat=this._max.y=Math.max(i.y,s.y),s._lng=this._max.x=Math.max(i.x,s.x),n.isEmpty()&&(this._sw=this._min=s.clone()),this},union:function(t){t=o.box(t,kt);var e,i,n=Math.min(this.minY(),t.minY()),s=Math.max(this.maxY(),t.maxY()),r=function(t,e){var i=Math.abs(e.maxX()-t.minX());return t.minX()>0&&e.maxX()<0&&(i+=360),i};return r(this,t)=o?t.appendChild(e):t.insertBefore(e,n[i])},removeAt:function(t,e){var i=t.childNodes,n=i[e];i.length;n&&this.removeElement(n)},calculateSize:function(t,e){var i,s=zt.SIZE_ELEMENT,r=o.Size();return s||(s=zt.createElement("div","position:absolute;margin:0;padding:0;border:0 none;top:-100000px;left:-100000px;"),zt.SIZE_ELEMENT=s),e?e.appendChild(s):n.body.appendChild(s),i=t.cloneNode(!0),i.style.position="relative",s.innerHTML="",s.appendChild(i),r=zt.getSize(s),r.width=Math.ceil(r.width),r.height=Math.ceil(r.height),s.innerHTML="",zt.removeElement(s),r},visible:function(t,e){var i=t.style;return"boolean"==typeof e&&(i.display=e?"":"none"),"none"!==i.display},toggle:function(t){return zt.visible(t,!zt.visible(t))},setZIndex:function(t,e){t.style.zIndex=e||0},getCSS:function(){if(n.defaultView&&n.defaultView.getComputedStyle)return function(e,i){return t.getComputedStyle?n.defaultView.getComputedStyle(e,null).getPropertyValue(i.replace(/([A-Z])/g,"-$1").toLowerCase())||e.style[i]:e.style[i]};if(g.currentStyle){var e=function(t){return"float"==t?"styleFloat":t},i=function(t,e){return t.currentStyle?t.currentStyle[e]||t.style[e]:t.style[e]};return Lt.browser.msie?function(t,n){return i(t,e(n))}:i}}(),getCSSValue:function(t,e){return parseFloat(zt.getCSS(t,e))||0},contains:function(){return g.compareDocumentPosition?function(t,e){return!!(16&t.compareDocumentPosition(e))}:g.contains?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e.parentNode;return i===n||!!(n&&1===n.nodeType&&i.contains&&i.contains(n))}:function(t,e){for(;e=e.parentNode;)if(e===t)return!0;return!1}}(),setBackgroundSize:function(t,e){t.style[zt.vendorPrefix+"BackgroundSize"]=e,t.style.backgroundSize=e}};var zt=o.DOM;!function(){var i=g,o=i.style,s={},r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},a={input:null,form:null,img:null,div:null},h=function(t){var e=r[t]||"div";return a[e]||(a[e]=n.createElement(e)),a[e]};zt.isSupportedStyle=function(t){return o[t]!==e},zt.isSupportedEvent=function(i){if(s[i]===e){var n=h(i),o="on"+i,r=o in n||o in t;r||(n.setAttribute(o,"return;"),r="function"==typeof n[o]),s[i]=r}return s[i]}}(),o.DOMEvent=function(){function i(t){t.target||(t.target=t.srcElement||n),3===t.target.nodeType&&(t.target=t.target.parentNode)}function s(t){o.hasValue(t.which)||(t.which=o.hasValue(t.charCode)?t.charCode:t.keyCode)}function r(t){if(!o.hasValue(t.pageX)||o.hasValue(t.clientX)){var e=t.target.ownerDoucment||n,i=e.documentElement,s=e.body;t.pageX=t.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)}return t}function a(t){r(t),l(t),c(t)}function h(t){var e=t.touches||[],i=t.changedTouches||[],n=0,o=0;for(n=0,o=e.length;n1&&i.add(parseFloat(e[4]),parseFloat(e[5])),i.add(zt.getRawOffset(t)),i}}else zt.transform=function(t,e,i,n,o){o=o||Ct(0,0);var s=-(o.x*e-o.x),r=-(o.y*e-o.y);Lt.browser.msie?(i*=e,n*=e):(s/=e,r/=e),s+=i,r+=n,t.style.zoom=e,t.style.left=s+"px",t.style.top=r+"px"},zt.setScale=function(t,e,i){zt.transform(t,e,0,0,i)},zt.translate=function(t,e){zt.setOffset(t,e)},zt.getTranslate=function(t){return zt.getRawOffset(t)};var a=zt.css3Styles.transform,h=o.Agent.usingGPU&&a;zt.backfaceVisibility=function(){var t=zt.css3Styles.backfaceVisibility;return t&&!Lt.mobile?function(e,i){e.style[t]=i}:St}(),zt.forceGPU=function(){return h?function(t){t.style[a]="translateZ(0)"}:St}(),zt.clearGPU=function(){return h?function(t){t.style[a]="none"}:St}(),zt.createDummyForRestrictiveGPU=function(){var t=zt.createElement("div","color:transparent;width:0;height:0;overflow:visible;");return zt.setText(t," "),t},zt.willChange=function(){var t=zt.css3Styles.willChange;return t?function(e,i){e.style[t]=i||"auto"}:St}()}(),wt(zt,{setSize:function(t,e,i){var n=e instanceof Dt?e.clone():Dt(e,i);n.round(),t.style.width=n.width+"px",t.style.height=n.height+"px"},_getSize:function(){var t={position:"absolute",visibility:"hidden",display:"block"};return function(e,i){var n=0,s=0,r=0,a=0,h={};if("getBoundingClientRect"in g){var l;try{l=e.getBoundingClientRect()}catch(t){}l&&"width"in l?(r=l.width,a=l.height):(r=e.offsetWidth,a=e.offsetHeight)}else try{r=e.offsetWidth,a=e.offsetHeight}catch(t){}if(0===r&&0===a){var c=e.style;o.forEach(t,function(t,e){h[e]=c[e],c[e]=t}),n=zt.getCSSValue(e,"width"),s=zt.getCSSValue(e,"height"),o.forEach(t,function(t,e){c[e]=h[e],h[e]=null})}else n=r,s=a;switch(i){case 1:return n;case 2:return s;default:return o.Size(n,s)}}}(),getSize:function(t){return zt._getSize(t)},getWidth:function(t){return zt._getSize(t,1)},getHeight:function(t){return zt._getSize(t,2)},getSizeWithMargin:function(t){var e=zt.getSize(t),i=t.style;return e.width=o.toNumber(i.marginLeft)+e.width+o.toNumber(i.marginRight),e.height=o.toNumber(i.marginTop)+e.height+o.toNumber(i.marginBottom),e},getRawSize:function(t){var e=t.style,i=o.toNumber(e.width),n=o.toNumber(e.height);return o.Size(i,n)},getOffset:function(){if("getBoundingClientRect"in g){var t="CSS1Compat"===n.compatMode;return function(e){var i,n,o,s=e&&e.ownerDocument,r=s.window||s.defaultView||s.parentWindow,a=s.body,h=s.documentElement;try{i=e.getBoundingClientRect()}catch(t){}if(zt.contains(h,e)){var l=h.clientTop||a.clientTop||0,c=h.clientLeft||a.clientLeft||0,u=r.pageYOffset||t&&h.scrollTop||a.scrollTop,p=r.pageXOffset||t&&h.scrollLeft||a.scrollLeft;n=i.top+u-l,o=i.left+p-c}else i?(o=i.left,n=i.top):(o=0,n=0);return Ct(o,n)}}return Lt.browser.webkit?function(t){for(var e=t,i=e.offsetParent,n=0,o=0;e=e.parentNode;)e.offsetParent&&(n-=e.scrollLeft,o-=e.scrollTop),e==i&&(n+=t.offsetLeft+e.clientLeft,o+=t.offsetTop+e.clientTop,e.offsetParent||(n+=e.offsetLeft,o+=e.offsetTop),i=e.offsetParent,t=e);return Ct(n,o)}:function(t){var e=0,i=0,o=t.ownerDocument||t.document||n;if(o.getBoxObjectFor){var s=o.getBoxObjectFor(t),r=o.getBoxObjectFor(o.documentElement||o.body);e=s.screenX-r.screenX,i=s.screenY-r.screenY}else{var a;for(a=t;a;a=a.offsetParent)e+=a.offsetLeft,i+=a.offsetTop;for(a=t.parentNode;a&&"BODY"!=a.tagName;a=a.parentNode)"TR"==a.tagName&&(i+=2),e-=a.scrollLeft,i-=a.scrollTop}return Ct(e,i)}}(),getRawOffset:function(t){var e=t.style,i=o.toNumber(e.left),n=o.toNumber(e.top);return Ct(i,n)},setOffset:function(t,e,i){var n=e instanceof Ct?e.clone():Ct(e,i);n.round(),t.style.left=n.x+"px",t.style.top=n.y+"px"},setOffsetWithAnchor:function(t,e,i){e=e||Ct(0,0),i=i||Ct(0,0);var n=e.x-i.x,o=e.y-i.y;zt.setOffset(t,n,o)},getScrollOffset:function(){var t=g,e=n.body,i=(t&&t.scrollLeft||e&&e.scrollLeft||0)-(t&&t.clientLeft||e&&e.clientLeft||0),o=(t&&t.scrollTop||e&&e.scrollTop||0)-(t&&t.clientTop||e&&e.clientTop||0);return Ct(i,o)},disableSelection:function(){for(var t,e=["ms","webkit","Khtml","Moz"],i=0,n=e.length;i=1)return i.filter=s.replace(r,"").replace(a,""),void(""===s&&i.removeAttribute&&i.removeAttribute("filter"));i.filter=r.test(s)?s.replace(r,n):s+" "+n}}(),getOpacity:function(){return zt.isSupportedStyle("opacity")?function(t){var e=parseFloat(t.style.opacity);return isNaN(e)?1:e}:function(t){try{if(t&&t.filters&&t.filters.alpha){var i=t.filters.alpha.opacity;return(i!==e?i:100)/100}if(t&&t.style&&t.style.filter){return/opacity=([^)]*)/.test(t.style.filter||"")?parseFloat(RegExp.$1)/100:1}return 1}catch(t){return 1}}}()}),zt.Image=function(t){var e=this;e.DEFAULT_OPTIONS={contextmenu:null,disableSelection:!1,onload:St,onerror:St,opacity:null},t=wt({},e.DEFAULT_OPTIONS,t),e._fLoad=t.onload||St,e._fError=t.onerror||St,e._img=zt.createElement("img",N+F+j+U),e._img.setAttribute("draggable",!1),e._img.setAttribute("unselectable","on"),t.disableSelection&&zt.disableSelection(e._img),o.forEach(t,function(t,i){var n="set"+o.capitalize(i);o.isFunction(e[n])&&e[n](t)})},zt.Image.prototype={constructor:zt.Image,setHandler:function(t){var e=wt({onload:this._fLoad,onerror:this._fError},t);this._fLoad=e.onload||St,this._fError=e.onerror||St},setOpacity:function(t){this._opacity=t,zt.setOpacity(this._img,t)},setPosition:function(t){this._img.style.position=t},setUrl:function(t,e,i){var n=this._img;return t&&(t===n.src?(this._fLoad&&this._fLoad(n),e&&e(n)):(n.style.width="",n.style.height="",n.removeAttribute("width"),n.removeAttribute("height"),this._setUrl(n,t,e,i))),this},setSize:function(t){var e=this._img;zt.setSize(e,t),e.setAttribute("width",t.width),e.setAttribute("height",t.height)},setAlt:function(t){this._img.setAttribute("alt",t)},setContextmenu:function(t){this._img.contextmenu=t},getElement:function(){return this._img},_setUrl:function(){var e,i=Lt.browser.msie,n=Lt.browser.version,o=i&&n>6&&n<9;return e=o?function(e,i,n,o){function s(){e.onload=e.onerror=null,r._fLoad(e),n&&n(e)}var r=this;e.onload=function(){t.setTimeout(s,1)},e.onerror=function(){e.onload=e.onerror=null,r._fError(e),o&&o(e)},e.galleryImg="no",e.src=i}:function(t,e,i,n){var o=this;t.onload=function(){t.onload=t.onerror=null,o._fLoad(t),i&&i(t)},t.onerror=function(){t.onload=t.onerror=null,o._fError(t),n&&n(t)},t.src=e},i=n=null,o=null,e}()},function(){var t=Lt.browser.csszoom?"innerText":"textContent",e=function(t,e,i){if(!o.isDefined(i))return t[e];t[e]=i},i=function(i,n){i.nodeType;switch(i.nodeType){case 1:case 9:case 11:return e(i,t,n);case 3:case 4:return e(i,"nodeValue",n);default:return""}};zt.setText=i,zt.getText=i}(),function(){function e(t){var e=t.getAttribute("data-ntranid");return e||(e="NTran-"+ ++r,t.setAttribute("data-ntranid",e)),e}function i(t){var i=e(t),n=a[i];return n||(n={timer:null,props:null},a[i]=n),n}function n(t){t.complete&&(Bt.removeDOMListener(t.complete),t.complete=null)}function s(t,e){e&&o.forEach(e,function(e,i){"opacity"===i?zt.setOpacity(t,e):(-1===i.indexOf("tran")&&"number"==typeof e&&(e+="px"),t.style[i]=e)})}var r=0,a={},h=zt.css3Styles.transition,l="transitionend";if(h){var c=["transitionend","webkitTransitionEnd","oTransitionEnd"];o.forEach(c,function(t){return zt.isSupportedEvent(t.toLowerCase())?(l=t,!0):zt.isSupportedEvent(t)?(l=t,!0):void 0})}zt.animate=function(e,r,a){var c=i(e);a=wt({duration:0,delay:0,easing:"linear"},a),this.stop(e,{});var u=[];if(o.forEach(r,function(t,e){u.push(e)}),c.props=wt({},r),h)c.complete=Bt.addDOMListener(e,l,function(){c.props=null,e.style[h]="none","function"==typeof a.complete&&a.complete(),n(c)}),c.timer=t.setTimeout(function(){c.timer=null;var t=a.easing;t.indexOf("Cubic")>-1&&(t="easeOutCubic"===t?"ease-out":"ease-in"),e.style[h]=[u.join(","),a.duration+"ms",t,a.delay+"ms"].join(" "),s(e,r)},100);else{var p,d=a.easing;p="function"==typeof d?d:o.easing[d||"linear"];for(var g={},f=0,_=u.length;f<_;f++)key=u[f],"opacity"===key?g[key]=zt.getOpacity(e):g[key]=parseFloat(zt.getCSS(e,key));var m=o.now();c.animLoop=function(){var t=o.now()-m,i=t/a.duration,n={};o.forEach(r,function(t,e){n[e]=p(i,g[e],t-g[e])}),t1){for(var h=[],l=0,c=a.length;l1)for(var u=0,p=a.length;u1){for(var a=[],h=0,l=r.length;h1)for(var i=1,n=arguments.length;io-1){for(var s=o;s=s&&(t=s),h.length>0)for(var l=t+i-1,c=h.length;l>=t;l--)Bt.trigger(this,"remove_at",l,h[--c]);if(n.length>0){var u=(n.length,t);for(r=0,a=n.length;r=0;t--)this.removeAt(t)},forEach:function(t){for(var e=0,i=this.getLength();e=Math.max(t.x,e.x)||l.y<=Math.min(t.y,e.y)||l.y<=Math.min(t.y,e.y))&&(l.x<=Math.min(i.x,n.x)||l.x>=Math.max(i.x,n.x)||l.y<=Math.min(i.y,n.y)||l.y<=Math.min(i.y,n.y))?null:l},e=function(e){for(var i=e.length,n=[],o=0;o3?.4:1),s=n*o;ei&&(t=Math.max(e*(1-s),i)),this.set("scale",t),t===i&&this.stopZooming()}},stopZooming:function(){this.isZooming()&&(o.TransitionQueue.removeJob(this._fProgress),this._tranId=null,this._delta=null,this._dstScale=null,this.set("scale",1),this.set("containerTopLeft_px",this.get("containerTopLeft")),this.set("transformOrigin_px",Ct(0,0)),Bt.trigger(this,"zoomend",this))},zoomingWithScale:function(t,e){var i=this.getContainerTopLeft();this._isPinching||(this.set("transformOrigin_px",e),this.set("containerTopLeft_px",i),this._isPinching=!0,Bt.trigger(this,"zoomstart",this)),this.set("scale",t)},stopZoomingWithScale:function(){this._isPinching&&(this.set("scale",1),this.set("containerTopLeft_px",this.get("containerTopLeft")),this.set("transformOrigin_px",Ct(0,0)),this._isPinching=!1,Bt.trigger(this,"zoomend",this))},_getScaleBy:function(t){return 0===t?0:Math.pow(2,t)},getContainerTopLeft:function(){return this.isZooming()?this.get("containerTopLeft_px"):this.get("containerTopLeft")},startPanning:function(){this.isZooming()&&this.stopZooming()},isZooming:function(){return null!==this._tranId}}),function(){o.ZoomScaleChecker={getFittableMinZoom:function(t){t=o.isDefined(t)?t:this.get("zoom");var e=Math.max(this.getMinZoom(),t);return e!==t&&e},getFittableMaxZoom:function(t){t=o.isDefined(t)?t:this.get("zoom");var e=Math.min(this.getMaxZoom(),t);return e!==t&&e},isValidZoom:function(t){return!(this.get("userMinZoom")>t||this.get("mapTypeMinZoom")>t)&&!(this.get("userMaxZoom")=n?n:Math.round(e)},getValidDeltaZoom:function(t){var e=this.get("zoom"),i=e+t,n=this.getMinZoom(),o=this.getMaxZoom();return io&&(t+=o-i),t},getFittableScale:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();this._minScale=Math.pow(2,e-1),this._maxScale=Math.pow(2,i-1);var n,o=this.get("zoom"),s=Math.pow(2,o-1)*t,r=t;return s>this._maxScale?(n=i-o,r=Math.pow(2,n)):s-1},_onCheckFocus:function(t){t=Rt.fix(t);var e=t.target,i=t.target,n=this.getElement();for(this._focused=!1;e&&"BODY"!==e.tagName&&"HTML"!==e.tagName;){if(e===n&&!this._isFocusable(i)){this._focused=!0;break}e=e.parentNode}this._focused&&n.focus({preventScroll:!0})},_onKeyTransition:function(t){var e=t.progress,i=(this._keyInfo,this._getXFactor()),n=this._getYFactor(),o=e.weight,s=Ct(i*o,n*o);Bt.trigger(this,"keytransition",s)},_onKeyTranEnd:function(t){Bt.trigger(this,"keytransitionend")},_onKeyDown:function(t){if(this._setMetaKeys(t),this._focused&&(t=Rt.fix(t),Bt.trigger(this,"keydown",t),this.get("keyboardShortcuts")&&!this._isFocusable(t.target))){var e=t.which,i=this._keyInfo,n=this._keyTran;this._isDirKey(e)&&(i[e]=!0,n.isRunning()||n.run({weight:1},{weight:70},{infinity:!0}),Rt.preventDefault(t))}},_onKeyUp:function(t){if(this._setMetaKeys(t),this._focused&&(t=Rt.fix(t),Bt.trigger(this,"keyup",t),this.get("keyboardShortcuts"))){var e=t.which,i=this._keyInfo,n=this._keyTran;this._isDirKey(e)&&(i[e]=!1,!n.isRunning()||i[38]||i[40]||i[37]||i[39]||n.stop())}}},o.MouseRecognizer={listenMouse:function(){function t(t,e,n){ return Bt.addDOMListener(t,e,n||i._getTrigger(e))}var e=this.getTarget(),i=this;i._dragListeners=[],i._dragStart=!1,i._panEl=e.setCapture?e:n,i._mouseListeners=[t(e,"mousedown",Pt(i._onDown,i)),t(e,"mousemove",Pt(i._onMove,i)),t(e,"mouseup",Pt(i._onUp,i)),t(e,"mousewheel",Pt(i._onWheel,i)),t(e,"contextmenu",Pt(i._onContextMenu,i)),t(e,"mouseenter",Pt(i._onEnter,i)),t(e,"mouseleave",Pt(i._onLeave,i))],!1===Lt.mobile&&i._mouseListeners.push(t(e,"click",Pt(i._onClick,i)))},unlistenMouse:function(){Bt.removeDOMListener(this._mouseListeners),Bt.removeDOMListener(this._dragListeners),this._dragStart=!1,this._panEl=null},_onEnter:function(t){t=Rt.fix(t),t.preventDefault(),Bt.trigger(this,"mouseover",t)},_onLeave:function(t){t=Rt.fix(t),t.preventDefault(),Bt.trigger(this,"mouseout",t)},_onClick:function(t){t=Rt.fix(t),this._triggerSingleClick(t)},_triggerSingleClick:function(t,e){var i=o.now(),n={x:t.pageX,y:t.pageY},s=this.__ct__?i-this.__ct__:1e4,r=this.__cp__?o.Math.distance(this.__cp__,n):1e4;if(s<250&&r<=S)this.__ct__=null,this.__cp__=null,this._triggerDblClick(t);else{if(e)return;this.__ct__=i,this.__cp__=n,this._triggerClick(t)}},_isMapEvent:function(t){for(var e=this.__ie_dtarget__||t.target,i=this.getTarget(),n=!0;e&&e!==i;){if(!1===e.__clickable){n=!0;break}if(e.__clickable||e===this.panes.floatPane||o.getIndexOfElement(b,e.tagName)>-1){n=!1;break}e=e.parentNode}return n},_triggerClick:function(t){if(this._dragStart)return void(this._dragStart=!1);this._isMapEvent(t)&&(t.preventDefault&&t.preventDefault(),Bt.trigger(this,"click",t))},_triggerDblClick:function(t){this._isMapEvent(t)&&Bt.trigger(this,"dblclick",t)},_onDown:function(e){if(!Rt.isTouchStarted()&&(e=Rt.fix(e),Lt.mobile&&e.preventDefault(),this.__dp__={x:e.pageX,y:e.pageY},this.__ie_dtarget__=Lt.browser.msie&&Lt.browser.version>8&&e.target,Rt.startTouch(e),Bt.trigger(this,"mousedown",e),this.get("draggable"))){var i=this._panEl;this._dragEndTimer&&(t.clearTimeout(this._dragEndTimer),this._dragEndTimer=null,delete this._dragEndTimer),this._dragListeners.length&&(this._initDrag(),this._dragStart=!1),i.setCapture&&i.setCapture(),this._eventButton=e.button,Bt.trigger(this,"dragready",e),this._dragListeners=[Bt.addDOMListener(i,"mousemove",Pt(this._onDrag,this)),Bt.addDOMListener(i,"mouseup",Pt(this._onDragEnd,this)),Bt.addDOMListener(i,"dragstart",Pt(this._resetDrag,this))]}},_initDrag:function(){this._dragListeners.length&&(this._panEl.releaseCapture&&this._panEl.releaseCapture(),Bt.removeDOMListener(this._dragListeners),this._dragListeners.length=0,this._dragListeners=[],this._eventButton=null)},_onDrag:function(t){this._dragListeners.length&&!Rt.isTouchStarted()&&(t=Rt.fix(t),t.preventDefault(),this.__dp__&&o.Math.distance(this.__dp__,{x:t.pageX,y:t.pageY})<=5||(this.__dp__=null,this._dragStart||(this._dragStart=!0),Bt.trigger(this,"drag",t)))},_onDragEnd:function(e){Rt.endTouch(),e=Rt.fix(e),e.preventDefault(),this._dragStart&&Bt.trigger(this,"dragend",e),this._initDrag();var i=this;i._dragEndTimer=t.setTimeout(function(){i._dragStart=!1},0)},_onMove:function(t){Rt.isTouchStarted()||(t=Rt.fix(t),Bt.trigger(this,"mousemove",t))},_onUp:function(t){Rt.endTouch(),t=Rt.fix(t),Bt.trigger(this,"mouseup",t),this._isMapEvent(t)&&t.which===Rt.MOUSE_RBUTTON&&!this._dragStart&&Bt.trigger(this,"rightclick",t),Lt.browser.msie&&8===Lt.browser.version&&this._triggerSingleClick(t,!0),this.__ie_dtarget__=null},_onWheel:function(t){return t=Rt.fix(t),Bt.trigger(this,"mousewheel",t),!1},_onContextMenu:function(t){t=Rt.fix(t),t.preventDefault()},_resetDrag:function(t){this._isMapEvent(t)||-1===o.getIndexOfElement(["A","IMG"],t.target.tagName)||(this._initDrag(),this._dragStart=!1)}};o.TouchRecognizer={listenTouch:function(){function t(t,e,i,n){return Bt.addDOMListener(t,e,i,n||{passive:!1})}var e=this.getTarget();this._clearTouches(),this._swipeListeners=[],this._swipeEl=e.setCapture?e:n,this._touchListeners=[t(e,"touchstart",Pt(this._onTouchStart,this),{passive:!0}),t(e,"touchmove",Pt(this._onTouchMove,this)),t(e,"touchend",Pt(this._onTouchEnd,this))]},unlistenTouch:function(){Bt.removeDOMListener(this._touchListeners),Bt.removeDOMListener(this._swipeListeners),this._swipeStart=!1,this._swipeEl=null},_clearTouches:function(){this._swipeStart=!1,this._startTouches=null,this._moveTouches=null,this._endTouches=null,this._pinching=!1,this._startDistance=null,this._tilting=!1,this._startVec=null,delete this._startVec},_isValidParent:function(t){for(var e=this.getTarget();t;){if(t===e)return!0;t=t.parentElement}return!1},_getTouches:function(t){for(var e=t.touches||[],i=[],n=0,o=e.length;n1&&this._clearDoubleTap(),e.length){case 1:this._oneFingerStart(t);break;case 2:this._twoFingerStart(t)}},_onTouchMove:function(t){if(Rt.isTouchStarted()){t=Rt.fix(t);var e=this._getTouches(t),i=this._startTouches;switch(this._moveTouches=e,Bt.trigger(this,"touchmove",t),e.length>1&&this._clearDoubleTap(),i&&i.length){case 1:this._oneFingerMove(t);break;case 2:this._twoFingerMove(t)}}},_onTouchEnd:function(t){Rt.endTouch(),t=Rt.fix(t);var e=this._startTouches,i=this._endTouches||[].concat(this._moveTouches||e||[]),n=t.changedTouches;if(this._endTouches=i,Bt.trigger(this,"touchend",t),i){switch(e&&e.length){case 1:this._oneFingerEnd(t);break;case 2:this._twoFingerEnd(t)}if(n&&n.length>0)for(var o=0,s=n.length;o1)return void this._clearSwipe();Bt.trigger(this,"drag",t)}},_onSwipeEnd:function(t){Rt.endTouch(),t=Rt.fix(t),this._swipeStart&&Bt.trigger(this,"dragend",t),this._clearSwipe()},_getCenter:function(t){function e(t,e){var i=Math.min.apply(Math,t),n=Math.max.apply(Math,t),o=Math.min.apply(Math,e),s=Math.max.apply(Math,e);return Ct((i+n)/2,(o+s)/2)}var i,n=0,o=t.length,s=[],r=[],a=[],h=[];for(n=0;n=2&&(i=[Ct(e[0].pageX,e[0].pageY),Ct(e[1].pageX,e[1].pageY)]),i},_isTiltGesture:function(t){var e=t.scale,i=Math.abs(1-e),n=i<=.009,o=Math.abs(t.rotation)<2,s=!this._pinching&&n&&o;return(!s||1!==e)&&s},_processTilt:function(t,e){var i=t.originalEvent,n=this._getTwoTouches(i),s=wt({scale:t.scale,center:Ct(t.pageX,t.pageY),pageX:t.pageX,pageY:t.pageY,originalEvent:i},e);if(!this._tilting){Math.abs(o.Math.getHorizontalDegrees(n[0],n[1]))<15&&(this._tilting=!0,Bt.trigger(this,"tiltstart",s))}this._tilting&&Bt.trigger(this,"tilt",s)},_processPinch:function(t,e){var i=wt({scale:t.scale,center:Ct(t.pageX,t.pageY),pageX:t.pageX,pageY:t.pageY,rotation:t.rotation,originalEvent:t.originalEvent},e);this._pinching||(this._pinching=!0,Bt.trigger(this,"pinchstart",i)),Bt.trigger(this,"pinch",i)},_pinchStart:function(t){var e=this._getTwoTouches(t.originalEvent);this._tilting=!1,this._startVec=o.Math.getVector(e[0],e[1]),this._pinching=!1,this._startDistance=null},_pinchChange:function(t){if(2===t.originalEvent.touches.length){var e=this._getTwoTouches(t.originalEvent),i=o.Math.getVector(e[0],e[1]);this._startVec&&(t.rotation=o.Math.getDegrees(i,this._startVec)),this.get("pinchZoom")&&!this._tilting&&1!==t.scale&&this._processPinch(t)}},_pinchEnd:function(t){this._tilting&&Bt.trigger(this,"tiltend",t),this._startVec=null,delete this._startVec,this._tilting=!1,this._clearPinchTimer(),this.get("pinchZoom")&&(this._startDistance=null,Bt.trigger(this,"pinchend",t))},_clearDoubleTap:function(){t.clearTimeout(this._dbltapTimer),this._dbltapTimer=null,this._prevTouch=null},_isOverSwipeThreshold:function(t){if(!this._prevTouch)return!1;var e=Ct(this._prevTouch.pageX,this._prevTouch.pageY),i=Ct(t.pageX,t.pageY);return o.Math.distance(e,i)>=15},_tapClick:function(t){var e=this._startTouches,i=this._moveTouches,n=e?e[0]:null,o=i?i[0]:null,s=n&&1===e.length,r=!o||this._getDistance([o,n])<=15;s&&r&&(n=Ct(n.pageX,n.pageY),this._triggerClick&&this._triggerClick({type:"click",pageX:n.x,pageY:n.y,target:t.target}))},_twofingerTap:function(){var t=this._startTouches,e=this._getCenter(t),i=e.pageXY;e.clientXY;Bt.trigger(this,"twofingertap",{pageX:i.x,pageY:i.y})},_doubleTap:function(e){var i=this._startTouches[0];Ct(i.pageX,i.pageY);if(this._isMapEvent(e))if(this._prevTouch)if(this._prevTouch&&this._isOverSwipeThreshold(i))this._clearDoubleTap();else{this._clearDoubleTap();var n=this,s=o.now(),r=Bt.addListener(this,"touchend",function(){Bt.removeListener(r),n._clearDoubleTap(),o.now()-s>250||Bt.trigger(n,"doubletap",{pageX:i.pageX,pageY:i.pageY,target:e.target})})}else this._dbltapTimer=t.setTimeout(Pt(this._clearDoubleTap,this),500)},_longTap:function(e){var i=this;this._clearLongTap(),this._longTapTimer=t.setTimeout(function(){i._clearTouches(),i._clearSwipe(),Bt.trigger(i,"longtap",e)},1e3)},_clearLongTap:function(){t.clearTimeout(this._longTapTimer),this._longTapTimer=null},_oneFingerStart:function(t){var e=this._startTouches[0];this._clearPinch(),this._clearSwipe(),this._readySwipe(t),this._longTap(t),this._doubleTap(t),this._prevTouch=e},_twoFingerStart:function(t){if(this._clearLongTap(),this._clearDoubleTap(),this._clearSwipe(),this._startDistance=null,this._twoTouchAngle=null,t.touches&&t.touches.length>=2){var e=this._getTwoTouches(t);this._twoTouchAngle=Math.abs(o.Math.getHorizontalDegrees(e[0],e[1]))}this._pinchStart(this._refineGesture(t))},_oneFingerMove:function(t){var e=this._moveTouches[0];this._swipeStart&&this._isOverSwipeThreshold(e)&&(this._clearLongTap(),this._clearDoubleTap())},_twoFingerMove:function(e){this.get("pinchZoom")&&e.preventDefault();var i=this._refineGesture(e);if(e.touches&&e.touches.length>=2){var n=this._getTwoTouches(e);this._twoTouchAngle=Math.abs(o.Math.getHorizontalDegrees(n[0],n[1]))}this._pinchChange(i),this._clearPinchTimer(),this._pinchEndCallback=Pt(this._pinchEnd,this,i),this._pinchTimer=t.setTimeout(this._pinchEndCallback,500)},_oneFingerEnd:function(t){this._clearLongTap(),this._tapClick(t)},_twoFingerEnd:function(t){if(!this._pinching&&!this._tilting){var e=this._twoTouchAngle;null!==e&&e<15&&this._twofingerTap()}(this._pinching||this._tilting)&&this._pinchEnd(t),this._twoTouchAngle=null}},o.MapUpdater={update:function(t,e,i,n,s){var r={},a=this.get("zoom"),h=this.get("centerPoint"),l=this.get("mapSystemProjection"),c=(this.get("projection"),this.get("maxBounds")),u=o.hasValue(i);if(u&&(i=o.nearRange(Math.round(i),this.get("userMinZoom"),this.get("userMaxZoom"))),c){if(t&&!c.hasPoint(t))return;if(e&&!t&&!c.hasPoint(l.fromPointToCoord(e)))return}if(!t&&e?(r.center=l.fromPointToCoord(e),r.centerPoint=e):t&&!e?(e=l.fromCoordToPoint(t),r.center=t,r.centerPoint=e):t&&e&&(r.center=t,r.centerPoint=e),u&&!n&&a!==i&&(n=Ct(0,0)),o.hasValue(n))this.get("containerTopLeft").equals(n)||(r.containerTopLeft=n);else{n=this.get("containerTopLeft").clone();var p=r.centerPoint,d=l.scaleUp(h.x-p.x,a),g=l.scaleUp(h.y-p.y,a);n.add(d,g),r.containerTopLeft=n}if(u&&(r.zoom=i),u||o.hasValue(r.centerPoint)||o.hasValue(r.containerTopLeft)){i=u?i:a,e=e||this.get("centerPoint");var f=this.get("size"),_=l.scaleDown(f.width,i)/2,m=l.scaleDown(f.height,i)/2,y=e.clone(),v=this.get("tileSize");this.get("repeatX")&&((y.x<0||y.x>v.width)&&(y.x=y.x%v.width,y.x<0&&(y.x=v.width+y.x)),r.centerPoint&&(r.centerPoint=y.clone())),r.projectionTopLeft=y.clone().sub(_,m),r.projectionBottomRight=y.clone().add(_,m)}this._fireEvents(r,s)},_fireEvents:function(t,e){var i,n=["projectionTopLeft","containerTopLeft","center","centerPoint","zoom"];t.centerPoint&&o.isDefined(t.zoom)&&this.set("bounds",this.calcBoundsBy(t.centerPoint,t.zoom),!0);for(var s=0;sp&&(p=n),s1e3?e=0:e++};this.set("tileIndexArray",t),this._getTileChanges=function(){return e||0},Bt.addListener(t,"insert_at",i)},refreshTiles:function(t){t&&this.set("instantTiling",!0),Bt.trigger(this,"refresh",t)},projection_changed:function(){var t=this.getCenter();if(t){var e=this.get("mapSystemProjection").fromCoordToPoint(t);this.set("isTilingSystemChanged",!0),this.set("centerPoint",e),this.setProjBounds(this.getSize(),e,this.getZoom())}},maxBounds_changed:function(t){var e=this.getCenter();if(e&&t&&!t.hasPoint(e))return this.setCenter(t.getCenter())}}),o.MapAction=function(t){var e=this;e._mapView=null,e._mapModel=null,e._zoomEffector=null,this._asyncEventsModel=null,e._trans={},e._listeningEvents={},Bt.addListener(e,"__BEGIN_DISPATCH__",Pt(e._onBeginDispatch,e)),Bt.addListener(e,"__STOP_DISPATCH__",Pt(e._onStopDispatch,e)),e.bindTo(["draggable","scrollWheel","disableDoubleClickZoom","disableKineticPan","keyboardShortcuts","disableDoubleTapZoom","disableTwoFingerTapZoom","zoomOrigin"],t),e._map=t.map,!zt.isSupportedCSS3Style("transform")||Lt.browser.msie&&Lt.browser.version<10||e.bindTo("overlayZoomEffect",t)},Ot(o.MapAction,o.KVO,{setMapModel:function(t){this.bindTo(["mapSystemProjection","centerPoint","maxBounds","scale","containerTopLeft","zoom","center","tilt","rotation","projection","bounds","padding","paddingOffset","size","tileTransition","instantTiling","mapTypeMinZoom","mapTypeMaxZoom","tileSize","repeatX"],t),this._mapModel=t;var e=new o.AsyncEventsModel(t);Bt.forward(e,"zoomstart",this),Bt.forward(e,"zoomend",this),this._asyncEventsModel=e,this.forwardZooming(),this.forwardIdle()},overlayZoomEffect_changed:function(t){var e=o.hasValue(t);if(this.setValues({ef_overlay:e,ef_overlaylayer:!1,ef_overlayimage:!1,ef_floatpane:!1}),e)if("all"===t)this.setValues({ef_overlaylayer:!0,ef_overlayimage:!0,ef_floatpane:!0});else{var i=t.split(",");o.forEach(i,function(t){this.set("ef_"+t.toLowerCase().trim(),!0)}.bind(this))}},repeatX_changed:function(){this.triggerIdle()},forwardZooming:function(){var t=this,e=t._asyncEventsModel;t.clearZooming(),t._zforwards=Bt.forward(e,"zoomstart",t,"zooming")},forwardIdle:function(){var t=this,e=t._asyncEventsModel;t.clearIdle(),t._iforwards=Bt.forward(e,"zoomend",t,"idle")},clearZooming:function(){Bt.removeListener(this._zforwards),this._zforwards=null},clearIdle:function(){Bt.removeListener(this._iforwards),this._iforwards=null},triggerIdle:function(){this._map.isReady&&2!==this._map.get("renderMode")&&Bt.trigger(this,"idle",this._asyncEventsModel)},setMapView:function(t){this.bindTo(["zoomPane","tilePane","shiftKey","ctrlKey","metaKey","altKey"],t),this._mapView=t,this.listenView(t)},initZoomEffector:function(){var t=new o.ZoomEffector(this._mapView,this);this.bindTo("tileszooming",t),Bt.forward(t,"scale",this),Bt.forward(t,"clearpaneposition",this),this._zoomEffector=t},clearOverlayPanePosition:function(){this._zoomEffector.clearOverlayPanePosition()},panBy:function(t,e){if(!t.equals(Ct(0,0))){var i,n=this.get("mapSystemProjection"),o=this.get("centerPoint").clone(),s=this.get("maxBounds"),r=this.get("scale")||1,a=this.get("containerTopLeft").clone();t=t.clone().round(),a.sub(t),t.div(r,r),n.scaleDown(t,this.get("zoom")),o.add(t),i=n.fromPointToCoord(o),this._asyncEventsModel.startPanning(t),s&&!s.hasPoint(i)||(a.round(),e&&(this.set("containerTopLeft",a),this._mapModel.set("center",i,e)),this._mapModel.update(null,o,null,a,e))}},_getPageXYPointBy:function(t){if(t){if(t.pos){var e=t.pos();return Ct(e.pageX,e.pageY)}return"pageX"in t&&"pageY"in t?Ct(t.pageX,t.pageY):void 0}},fromEventToPointerEvent:function(t){return this._getPointerEvent(t)},_getPointerEvent:function(t,e){var i=this._getPageXYPointBy(t);if(i){var n={type:e||t.type||"",originalEvent:t,domEvent:t};if(n.type){if(0===n.type.indexOf("key"))return n.keyboardEvent=t,n}else n.type=null,delete n.type;var s=this.get("mapSystemProjection"),r=this.get("projection"),a=this._mapView.getMapOffset(),h=i.clone().sub(a).sub(this.get("containerTopLeft")),l=s.fromOffsetToPoint(h),c=s.fromPointToCoord(l);return n.pointerEvent=t,n.offset=h,n.point=l,r!==o.EmptyProjection&&(n.coord=c),r.fromPointToLatLng&&(n.latlng=c),this.get("repeatX")&&(n.point=s.fromCoordToPoint(c)),n}},_triggerTap:function(t){var e={type:"tap",target:t.pointerEvent.target,pageX:t.pointerEvent.pageX,pageY:t.pointerEvent.pageY},i={domEvent:e,pointerEvent:e,offset:t.offset,point:t.point,coord:t.coord};t.latlng&&(i.latlng=t.latlng),Bt.trigger(this,"tap",i)},_isMapEvent:function(t,e){return!(X[e]&&!this._mapView._isMapEvent(t))},handleEvent:function(t,e){var i=!t;if(e=e||t.type,t&&this._listeningEvents[e]&&this._isMapEvent(t,e)&&(i=!0),i){var n=[this,e],o=null;t&&(o=this._getPointerEvent(t,e),n.push(o)),o&&Lt.mobile&&"click"===e&&this._triggerTap(o),Bt.trigger.apply(Bt,n)}},zoomBy:function(e,i,n){i=this._eventOrigin_px||i,e=Math.round(e);var o=this._asyncEventsModel,s=this._mapModel.getValidDeltaZoom(e),r=this.get("zoom"),a=r+s,h=this.get("mapSystemProjection"),l=this;if(!this._mapModel.isValidZoom(a)||r===a)return!1;this.stopTransition(),this.stopKineticPan();var c=this.get("size"),u=o.getContainerTopLeft(),p=this.get("centerPoint").clone(),d=i.clone(),g=this.get("maxBounds"),f=g&&this._getBufferedBounds(g,3);if(f&&!f.hasPoint(h.fromOffsetToCoord(i)))p=this.get("centerPoint").clone(),i=this._mapModel.getCenterPixel();else{d.sub(c.width/2,c.height/2),d.add(u.x,u.y);var _=d.clone();h.scaleDown(d,r),h.scaleDown(_,a),p.add(d),p.sub(_)}return n&&(o.isZooming()||(this._eventOrigin_px=i.clone(),Bt.removeListener(l._zbl),this._zbl=Bt.addListener(this,"idle",function(){t.setTimeout(function(){Bt.removeListener(l._zbl),l._eventOrigin_px=null,l._zbl=null},100)})),o.startZooming(s,i,u)),this._mapModel.update(null,p,a),!0},zoomingBy:function(t,e,i){switch(t){case"start":this._onStartZoomingBy();break;case"change":this._onChangeZoomingBy(e,i);break;case"end":this._onEndZoomingBy()}},_onStartZoomingBy:function(){var t=this.get("scale");this._startScale=t-1,this._trans.pinch&&(this._trans.pinch.stop(),this._trans.pinch=null,delete this._trans.pinch)},_onChangeZoomingBy:function(t,e){e&&!this._scaleEventOrigin&&(e=this._getZoomOriginByPoint(e),this._scaleEventOrigin=e);var i,n=this._getZoomOrigin()||this._scaleEventOrigin||this._mapModel.getCenterPixel();t<1?(t-=1,i=this._startScale+1+t):i=this._startScale+t,1!==(i=this._mapModel.getFittableScale(i))&&(this._prevPinch&&(i<.1&&(i=.1),i>16&&(i=16)), this._asyncEventsModel.zoomingWithScale(i,n))},_onEndZoomingBy:function(){function t(t,e){h.zoomingWithScale(t,e||a)}function e(){c._scaleEventOrigin=null,delete c._scaleEventOrigin,h.stopZoomingWithScale()}function i(t){c._trans.pinch&&(c._trans.pinch.stop(),c._trans.pinch=null,delete c._trans.pinch);var e=new o.Transition(wt({duration:100},t));c.stopTransition(),e.run({scale:s},{scale:n}),c._trans.pinch=e}var n,s=this.get("scale"),r=this.get("zoom"),a=this._getZoomOrigin()||this._scaleEventOrigin||this._mapModel.getCenterPixel(),h=this._asyncEventsModel,l=0,c=this;if(s&&a){if(1===s)return e();var u=Math.pow(2,r),p=u*s,d=Math.floor(Math.log(p)/Math.log(2));l=d-r,0===l&&s>1&&(l=1),n=Math.pow(2,l),s>1&&s>n&&(l+=1,n=Math.pow(2,l));var g,f=!1;0===l?(g=function(){f||(c._mapModel.update(null,c.get("centerPoint"),r),e(),f=!0)},i({progress:function(e){t(e.progress.scale)},complete:g,stop:g})):n!==s?(g=function(){f||(c.zoomBy(l,a,!1),e(),f=!0)},i({progress:function(e){t(e.progress.scale)},complete:g,stop:g})):(this.zoomBy(l,a,!1),e())}},isZooming:function(){return!!this._asyncEventsModel&&this._asyncEventsModel.isZooming()},changeScale:function(t){this._asyncEventsModel&&(this._startScale=0,this._onChangeZoomingBy(t),this._onEndZoomingBy())},isTranRunning:function(t){var e=this._trans;if(t){var i=e[t]||null;return!!i&&i.isRunning()}var n=!1;for(var o in e)if(e.hasOwnProperty(o)&&e[o]&&e[o].isRunning()){n=!0;break}return n},stopTransition:function(){o.forEach(this._trans,function(t){t&&t.stop()})},stopEasing:function(){this.stopTransition(),this.stopKineticPan()},__isFar:function(t){var e=this.get("mapSystemProjection"),i=e.fromPointToOffset(this.get("centerPoint")),n=e.fromCoordToOffset(t).sub(i),o=this.get("size").clone().mul(5,5);return n.x=Math.abs(n.x),n.y=Math.abs(n.y),n.x>o.width||n.y>o.height},panTo:function(t,e){if(!this.get("center").equals(t)){var i=this.get("mapSystemProjection"),n=this._trans.panto,s=i.fromPointToOffset(this.get("centerPoint")),r=i.fromCoordToOffset(t),a=this;if(this.stopTransition(),this.__isFar(t))return this._mapModel.setCenter(t),e.complete&&e.complete(),void a.triggerIdle();Bt.trigger(this,"panning"),n||(n=new o.Transition({easing:"easeOutCubic"}),this._trans.panto=n);var h=s.clone().round();n.clearListeners(),n.addListener({progress:function(t){var i=Ct(t.progress.x,t.progress.y);i.sub(h).round(),a.set("instantTiling",!0),a.panBy(i),h.add(i),e.progress&&e.progress(t)},complete:function(){a._mapModel.setCenter(t),a.set("instantTiling",!1),e.complete&&e.complete(),a.triggerIdle()}}),n.run({x:s.x,y:s.y},{x:r.x,y:r.y},e||{})}},panToBounds:function(t,e,i){var n=this._mapModel.getFitZoomAndCenter(t);if(i){var o=this._mapModel.calcBoundsBy(n.centerPoint,n.zoom),s=this._mapModel.getBoundsWithMargin(t,i,n.zoom);for(n.center=s.getCenter(),n.centerPoint=this.get("mapSystemProjection").fromCoordToPoint(n.center);!1===o.hasBounds(s)&&(n.zoom-=1,o=this._mapModel.calcBoundsBy(n.centerPoint,n.zoom),!(n.zoom<=this.get("mapTypeMinZoom")||o.hasBounds(s))););}this.morph(n.center,n.zoom,e)},morph:function(t,i,n){n=n||{};var s,r=this.get("zoom"),a={duration:500,easing:"easeOutCubic"};if(o.hasValue(i)&&(i=this._mapModel.getValidZoom(i-r)),s=i-r,i===e||0===s)return this.panTo(t,wt(a,n));var h=this.get("mapSystemProjection"),l=Math.pow(2,s)-1,c=this.get("centerPoint").clone(),u=h.fromCoordToPoint(t),p=c.sub(u).div(l,l),d=u.clone().sub(p),g=h.fromPointToOffset(d);l<1&&(a.easing="eastInCubic"),this.zoomBy(s,g,wt(a,n))},kineticPan:function(t,e){if(!t||!e)return this.stopKineticPan();var i=this._trans.kinetic;if(i){var n=Ct(t.x-e.x,t.y-e.y),s=parseInt(Math.sqrt(n.x*n.x+n.y*n.y),10),r=o.nearRange(12*s,500,800),a=e.clone(),h=this;n.mul(5,5),n.x=o.nearRange(n.x,-500,500),n.y=o.nearRange(n.y,-500,500),a.sub(n),this.stopKineticPan(),this.stopTransition(),i.addListener({progress:function(t){var i=Ct(t.progress.x,t.progress.y);h.panBy(e.clone().sub(i)),e=i.clone()},complete:function(){h.triggerIdle()}}),i.run({x:e.x,y:e.y},{x:a.x,y:a.y},{duration:r})}},stopKineticPan:function(){var t=this._trans.kinetic;t&&(t.isRunning()&&(t.stop(),this.triggerIdle()),t.clearListeners())},disableKineticPan_changed:function(t){this.stopKineticPan(),!1===t?this._trans.kinetic||(this._trans.kinetic=new o.Transition({easing:"easeOutCubic"})):this._trans.kinetic&&(this._trans.kinetic=null,delete this._trans.kinetic)},setZoom:function(t,e){t=Math.round(t);var i=this.get("zoom"),n=this._mapModel.getValidDeltaZoom(t-i);if((t=i+n)===i||!this._mapModel.isValidZoom(t))return!1;if(e){var o=this._getZoomOrigin()||this._eventOrigin_px;o||(o=this._mapModel.getCenterPixel(),this._eventOrigin_px=o);var s=this;Bt.once(s,"zoomend",function(){s._eventOrigin_px=null,delete s._eventOrigin_px}),this.zoomBy(n,o,e)}else{this.set("instantTiling",!0);var r=this._getZoomOrigin()||this._mapModel.getCenterPixel();this.zoomBy(n,r,!1)}return!0},mapTypeMinZoom_changed:function(){if(this._mapModel){var t=this._mapModel.getFittableMinZoom();!1!==t&&this.setZoom(t,!0)}},mapTypeMaxZoom_changed:function(){if(this._mapModel){var t=this._mapModel.getFittableMaxZoom();!1!==t&&this.setZoom(t,!0)}},_onBeginDispatch:function(t){this._listeningEvents[t]=!0,(Lt.mobile&&"tap"===t||"click"===t)&&(this._listeningEvents.tap=!0,this._listeningEvents.click=!0)},_onStopDispatch:function(t){this._listeningEvents[t]=null,delete this._listeningEvents[t],(Lt.mobile&&"tap"===t||"click"===t)&&(this._listeningEvents.tap=null,delete this._listeningEvents.tap,this._listeningEvents.click=null,delete this._listeningEvents.click)},listenView:function(t){var e=this,i=Pt(e.handleEvent,e),n=function(n,o){return Bt.addListener(t,n,o?Pt(o,e):i)};t.listen(),e._viewListeners=[n("click",e._onClick),n("rightclick",e._onRightClick),n("mousedown",e._onDown),n("mousemove"),n("mouseup",e._onUp),n("dblclick",e._onDblClick),n("mouseover",e._onOver),n("mouseout",e._onOut),n("dragready",e._onDragReady),n("drag",e._onDrag),n("dragend",e._onDragEnd),n("mousewheel",e._onWheel),n("keydown"),n("keytransition",e._onKeyTransition),n("keytransitionend",e._onKeyTransitionEnd),n("keyup"),n("touchstart"),n("touchmove"),n("touchend"),n("pinchstart",e._onPinchStart),n("pinch",e._onPinch),n("pinchend",e._onPinchEnd),n("twofingertap",e._onTwoFingerTap),n("doubletap",e._onDoubleTap),n("longtap",e._onLongTap),n("tiltstart",e._onTiltStart),n("tilt",e._onTilt),n("tiltend",e._onTiltEnd)]},unlistenView:function(){Bt.removeListener(this._viewListeners)},_onDown:function(t){this._mapView.toggleHand("closed"),this.handleEvent(t,"mousedown")},_onUp:function(t){this._mapView.toggleHand("open"),this.handleEvent(t,"mouseup")},_onClick:function(t){this.handleEvent(t,"click")},_onRightClick:function(t){this.handleEvent(t,"rightclick")},_initDrag:function(){this._down=null,this._curPoint=null,this._prevPoint=null,this._isMapDragging=null},_firePanning:function(t,e){var i=Ct(0,0),n=this._curPoint?this._curPoint:this._startPoint;i.x=n.x-t.x,i.y=n.y-t.y,this._curPoint=t,this.panBy(i,e)},_onDragReady:function(t){if(t.which!==Rt.MOUSE_RBUTTON&&!this._prevPinch&&!this.isTranRunning("pinch")){this.kineticPan(null);var e=t.pos();this._down&&this._initDrag(),this._startPoint=Ct(e.pageX,e.pageY),this._prevPoint=[this._startPoint],this._down=!0}},_onDrag:function(t){if(this._down){var e=t.pos(),i=Ct(e.pageX,e.pageY);if(!this._isMapDragging){if(o.Math.distance(this._startPoint,i)<4)return;this._isMapDragging=!0,this.handleEvent(t,"dragstart")}2===this._prevPoint.length&&this._prevPoint.shift(),this._prevPoint.push(this._curPoint),this._firePanning(i,!!Lt.mobile),this.handleEvent(t,"drag")}},_onDragEnd:function(t){if(this._down){var e,i,n=t.pos(),o=Ct(n.pageX,n.pageY);0===t.type.indexOf("touch")&&0===o.x&&0===o.y?(o=this._prevPoint.pop()||this._startPoint,e=this._prevPoint.pop()||this._startPoint):e=this._prevPoint.pop(),i=e?e.clone().sub(o):Ct(0,0),this._isMapDragging&&(-1===t.type.indexOf("touch")&&this._mapView.toggleHand("open"),this.get("disableKineticPan")||0===i.x&&0===i.y?(this._firePanning(o,!!Lt.mobile),Lt.mobile&&this._mapModel.update(null,this.get("centerPoint"),null),this.handleEvent(t,"dragend"),this.triggerIdle()):(this.handleEvent(t,"dragend"),this.kineticPan(e.clone(),o.clone()))),this._initDrag()}},_getZoomOriginByPoint:function(t){var e=t.clone(),i=this._mapView.getContainerDivOffset(),n=zt.getOffset(this._mapView.getElement());return e.sub(i).sub(n),e},_getZoomOriginByOption:function(){var t=this.get("zoomOrigin");return t&&this.get("bounds").hasPoint(t)?this.get("mapSystemProjection").fromCoordToOffset(t):null},_getZoomOrigin:function(t){return this._getZoomOriginByOption()||(t?this._getZoomOriginByPoint(Ct(t.pageX,t.pageY)):null)},_onDblClick:function(t){if(this.handleEvent(t,"dblclick"),!this.get("disableDoubleClickZoom")){var e=this._getZoomOrigin(t);this.zoomBy(1,e,!0)}},_onOver:function(t){if(this._isMapDragging)return void(this._overMap||(this._overMap=!0,this.handleEvent(t,"mouseover")));this._overMap=!0,this.handleEvent(t,"mouseover")},_onOut:function(t){this._overMap=!1,this.handleEvent(t,"mouseout")},_onWheel:function(t){if(this.handleEvent(t,"mousewheel"),!this.get("scrollWheel")||Rt.isTouchStarted())return!1;t.stop();var e=o.now(),i=null!==this._wheelTime&&e-this._wheelTime<100,n="wheelDeltaY"in t?t.wheelDeltaY:"wheelDelta"in t?t.wheelDelta:null,s=null!==n&&Math.abs(n)<=6;if(!i&&!s){this._wheelTime=e;var r=Rt.getWheelDelta(t).deltaY>0?1:-1,a=this._getZoomOrigin(t);this.zoomBy(r,a,!0)}},_onKeyTransition:function(t){this.panBy(t)},_onKeyTransitionEnd:function(){this.triggerIdle()},_onPinchStart:function(t){this._prevPinch=t.center,this.zoomingBy("start"),this.handleEvent(t,"pinchstart")},_onPinch:function(t){this._prevPinch&&(this.zoomingBy("change",t.scale,t.center),this.handleEvent(t,"pinch"),this._prevPinch=t.center)},_onPinchEnd:function(t){this._prevPinch&&(this.zoomingBy("end"),this.handleEvent(t,"pinchend"),this._prevPinch=null)},_onTiltStart:function(t){this._tiltCenter=t.center.clone(),this.handleEvent(t,"tiltstart")},_onTilt:function(t){this._tiltCenter&&t.center&&(this._tiltCenter=t.center.clone(),this.handleEvent(t,"tilt"))},_onTiltEnd:function(t){this._tiltCenter=null,delete this._tiltCenter,this.handleEvent(t,"tiltend")},_onTap:function(t){this.handleEvent(t,"tap")},_onTwoFingerTap:function(t){if(this.handleEvent(t,"twofingertap"),!this.get("disableTwoFingerTapZoom")){var e=this._getZoomOrigin(t);this.zoomBy(-1,e,!0)}},_onDoubleTap:function(t){if(this.handleEvent(t,"doubletap"),!this.get("disableDoubleTapZoom")){var e=this._getZoomOrigin(t);this.zoomBy(1,e,!0)}},_onLongTap:function(t){this.handleEvent(t,"longtap")},containerTopLeft_changed:function(t){this._zoomEffector&&!0!==this.get("tileszooming")&&zt.translate(this._mapView.get("containerDiv"),t.clone().round())},destroy:function(){this.trigger("willDestroy",this),this.unlistenView(),this.unbindAll(),Bt.clearInstanceListeners(this)},reset:function(){this._eventOrigin_px=null},_getBufferedBounds:function(t,e){var i=t.minX(),n=t.minY(),o=t.maxX(),s=t.maxY();return kt(At(n-e,i-e),At(s+e,o+e))}}),o.TileIndexArray=function(t){this._halfSize=o.Size(0,0),this._forwards=[],this.set("startXIndex",0),this.set("startYIndex",0),this.set("startX_px",0),this.set("startY_px",0),this.set("indexes",new o.KVOArray),this._forwardEvents(this.get("indexes")),this.bindTo(["mapSystemProjection","centerPoint","__linearCenterPoint","containerTopLeft","size","tileSize","isTilingSystemChanged","zoom","scale","tileSpare","padding"],t),this._size=this.get("size"),this._zoom=this.get("zoom"),this._inited=!0,this.build()},Ot(o.TileIndexArray,o.KVO,{BASE_FOR_EXTRA_TILE:.5,_tileSize:null,_baseForExtraTile_px:null,_oldRange:null,_forwardEvents:function(t){this._clearEvents(),this._forwards=[Bt.forward(t,"insert_at",this),Bt.forward(t,"set_at",this),Bt.forward(t,"remove_at",this)]},_clearEvents:function(){Bt.removeListener(this._forwards),this._forwards.length=0,this._forwards=[]},getRotatedIndexes:function(){for(var t=[],e=this.get("indexes").getLength(),i=0,n=[];i0?a.x>o/2&&(a.x=-1*(o-a.x)):-a.x>o/2&&(a.x=1*(o+a.x)),a.y>0?a.y>s/2&&(a.y=-1*(s-a.y)):-a.y>s/2&&(a.y=1*(s+a.y)),r.sub(a),t.startX_px=r.x,t.startY_px=r.y,this._basePx.x=r.x,this._basePx.y=r.y,t)}},_removeHiddenTiles:function(t,e){if(!(t.getLength()<=0)){var i,n;for(n=e.length-1;n>=0;n--)i=e[n].tileIndex,t.getAt(i)&&t.removeAt(i)}},_addShowingTiles:function(t,e){for(var i,n=0,o=e.length;ne.endXIndex,a=t.startYIndex;a<=t.endYIndex;a++){var h=ae.endYIndex;r||h?(i=(s-t.startXIndex)*o+(a-t.startYIndex),n.push({tileIndex:i,xIndex:s,yIndex:a})):r||a!==e.startYIndex||(a=e.endYIndex)}return n},_isCoveredByDst:function(t,e){return t.startXIndex>=e.startXIndex&&t.startYIndex>=e.startYIndex&&t.endXIndex<=e.endXIndex&&t.endYIndex<=e.endYIndex},getIndexesRange:function(t,e){var i=this.get("mapSystemProjection"),n=this.get("containerTopLeft").clone().round(),s=(this.get("scale"),o.round(this.get("tileSpare"))),r=this._tileSize,a=r.width,h=r.height,l=this._halfSize.width,c=this._halfSize.height,u=o.floor(i.scaleUp(t.x,e)),p=o.floor(i.scaleUp(t.y,e)),d=o.floor(u/a),g=o.floor(p/h),f=l,_=l,m=c,y=c;2*l%2==1&&(f-=.5,_+=.5),2*c%2==1&&(m-=.5,y+=.5);var v=this._getCenterGap(u,"width"),T=this._getCenterGap(p,"height"),x=Math.round(f-v),b=Math.round(_-(a-v)),M=Math.round(m-T),E=Math.round(y-(h-T)),S=Math.max(o.round(s/2),0),P=Math.max(s-S,0),w=this._getEdgeIndex(d,x,-1,"width"),L=this._getEdgeIndex(g,M,-1,"height"),O=this._getEdgeIndex(d,b,1,"width"),C=this._getEdgeIndex(g,E,1,"height"),I={centerXIndex:d,centerYIndex:g,startXIndex:w,startYIndex:L,endXIndex:O,endYIndex:C,cx_px:u,cy_px:p};return 0!==S&&(I.startXIndex-=S,I.startYIndex-=S),0!==P&&(I.endXIndex+=S,I.endYIndex+=S),I.startX_px=o.round((I.startXIndex-d)*a+x-n.x),I.startY_px=o.round((I.startYIndex-g)*h+M-n.y),I},_getCenterGap:function(t,e){return t%=this._tileSize[e],t<0&&(t+=this._tileSize[e]),t},_getEdgeIndex:function(t,e,i,n){var o=this._divideAndCeil(e,this._tileSize[n]),s=this._needsExtraTile(e,o,n),r=s?1:0;return Math.round(t+o*i+r*i)},_divideAndCeil:function(t,e){return t<0?0:Math.ceil(t/e)},_needsExtraTile:function(t,e,i){return e*this._tileSize[i]-t<("width"===i?this._baseForExtraTile_px.x:this._baseForExtraTile_px.y)},forEach:function(t){this.get("indexes").forEach(t)},getAt:function(t){return this.get("indexes").getAt(t)},getLength:function(){return this.get("indexes").getLength()},getArray:function(){return this.get("indexes").getArray()},getRange:function(){return this._oldRange},getTileCount:function(){return{x:Math.abs(this.get("endXIndex")-this.get("startXIndex")),y:Math.abs(this.get("endYIndex")-this.get("startYIndex"))}}}),o.TileIndexPane=function(t,e){this._paneName=t||o.guid(),this._options=wt({overlayMap:!0},e),this._pool=new o.TilePool,this.set("paneElement",zt.createElement("div",Z)),this.set("tileopacity",1),this._options.overlayMap&&this.set("spareElement",zt.createElement("div",Z))},Ot(o.TileIndexPane,o.KVO,{setMap:function(t){var e=!this._options.overlayMap;if(null===t)this._unlistenSwap(),this._unlistenTile(),this._removeAllTiles(),this.unbindAll(),this.get("view").removeTilePane(this),e?this.get("view").removePane(this._paneName):(zt.removeElement(this.getElement()),zt.removeElement(this.getSpareElement())),this.set("model",null),this.set("action",null),this.set("view",null),this._tileIndexArray=null;else{var i=t.getMapModel(),n=t.getMapView(),o=t.getMapAction();if(2===i.get("renderMode"))return;n.addTilePane(this);var s=i.get("tileIndexArray");this.set("model",i),this.set("action",o),this.set("view",n),this.bindTo(["tileTransition","instantTiling","zoom","tileSize","padding"],i),this.bindTo(["tilePane","zoomPane"],n),this.bindTo("tileszooming",o),this.bindTo(["startXIndex","startYIndex","startX_px","startY_px"],s),this._tileIndexArray=s,this._listenSwap(n),this._initTiles(),e?n.addPane(this._paneName,this.getElement()):zt.addElement(this.getElement(),this.get("tilePane"))}},setMapTypeRegistry:function(t){this._mapTypes=t,this.bindTo("selectedMapType",t)},tileSize_changed:function(){},_initTiles:function(){this._pool.init(),this._listenTile(this._tileIndexArray),this._addAllTiles(this._tileIndexArray)},_listenTile:function(t){this._unlistenTile(),this._relationArray=[Bt.addListener(t,"insert_at",Pt(this._addTileAt,this)),Bt.addListener(t,"remove_at",Pt(this._removeTileAt,this)),Bt.addListener(t,"resized",Pt(this._rearrangeTiles,this)),Bt.addListener(this.get("model"),"refresh",Pt(this.refresh,this))]},_listenSwap:function(t){this._swapRelation=[Bt.addListener(t,"before_tilepane_swap",Pt(this._beforeTilePaneSwap,this)),Bt.addListener(t,"tilepane_swapped",Pt(this._onTilePaneSwapped,this))]},_unlistenTile:function(){Bt.removeListener(this._relationArray),this._relationArray=null},_unlistenSwap:function(){Bt.removeListener(this._swapRelation),Bt.removeListener(this._tsL),this._swapRelation=null,this._tsL=null},_getTile:function(t,e,i){var n=this.get("selectedMapType"),s=null;if(!n)return null;var r=this.get("tileopacity");return s=n.getTile(t,e,i),s instanceof o.Tile||(s=new o.Tile(s,{tileIndex:{xIndex:t,yIndex:e},size:this.get("tileSize")})),s.setOpacity(r),s.getTileIndex()||s.setTileIndex({xIndex:t,yIndex:e}),s.addListener("loaded",Pt(this._onLoadTile,this)),s},_getTileOffset:function(t,e){"number"!=typeof t&&"string"!=typeof t&&(e=t.y||t.yIndex||0,t=t.x||t.xIndex||0);var i=this.get("tileSize"),n=(t-this.get("startXIndex"))*i.width+this.get("startX_px"),o=(e-this.get("startYIndex"))*i.height+this.get("startY_px");return Ct(n,o)},_addTileAt:function(t,e){var i=e.xIndex,n=e.yIndex,o=this._getTile(i,n,this.get("zoom")),s=this._getTileOffset(i,n);this._pool.add(o),o.load({offset:s,pane:this.get("paneElement"),transition:this.get("tileTransition")&&!this.get("instantTiling")})},_addAllTiles:function(){var t=this,e=t._tileIndexArray,i=e.getRotatedIndexes();t._pool.clearState(),o.forEach(i,function(i){var n=e.getAt(i);t._addTileAt(i,n)})},_rearrangeTiles:function(){var t=this;this._pool.forEach(function(e){var i=e.getTileIndex(),n=t._getTileOffset(i);e.setOffset(n)})},_removeTileAt:function(t,e){this._pool.remove(e)},_removeAllTiles:function(){this._pool.removeAll()},refresh:function(t){t&&this.set("instantTiling",!0);var e=this.get("selectedMapType");e&&this._pool.reset(e,this.get("zoom"),{transition:!t})},_onLoadTile:function(t){var e=t.getTileIndex();this._pool.markAt(e,!0),this._pool.getLoadedCount()===(this._tileIndexArray&&this._tileIndexArray.getLength())&&Bt.trigger(this,"tilesloaded")},getMinZoom:function(){var t=this.get("selectedMapType");return t?t.minZoom:0},getMaxZoom:function(){var t=this.get("selectedMapType");return t?t.maxZoom:0},getElement:function(){return this.get("paneElement")},getSpareElement:function(){return this.get("spareElement")||null},selectedMapType_changed:function(t){if(this.get("model")){var e=this._mapTypes,i=e.get(e.getPreviousTypeId()),n=!i||!1,o=i?i.constructor:null;n||(n=o!==t.constructor,o===Object&&(n=!0)),n?(this._pool.clearState(),this._removeAllTiles(),this._addAllTiles()):this.refresh(!0),this.get("zoomPane").style.display="none"}},_swapPane:function(){var t,e=this.getSpareElement();e&&(e.parentNode||this.get("tilePane").appendChild(e),t=this.get("paneElement"),e.innerHTML="",this.set("paneElement",e),this.set("spareElement",t))},_beforeTilePaneSwap:function(){this._unlistenTile()},_onTilePaneSwapped:function(){var t=this,e=t._pool,i=t._options.overlayMap;i&&(t._swapPane(),e.swap()),Bt.removeListener(t._tsL),t._tsL=Bt.once(t.get("action"),"zoomend",function(){i||e.removeAll(),t._initTiles(),t._tsL=null,delete t._tsL})},getSwapped:function(){return this._pool.getSwapped()},setOpacity:function(t){var e=Math.min(Math.max(t,0),1)||(0===t?0:1);this.set("tileopacity",e)},getOpacity:function(){var t=this.get("tileopacity");return t===e?1:t},tileopacity_changed:function(t){this._pool.forEach(function(e){e.setOpacity(t)})},tileszooming_changed:function(t){t&&this.get("tileTransition")&&!this.get("instantTiling")&&this._pool.forEach(function(t){t.cancelFadeIn()})}}),o.ZoomEffector=function(t,e){var i=this;i.csszoom=Lt.browser.csszoom,i._topLeft=null,i._curTopLeft=null,i._origin=null,i._containerDiv=t.get("containerDiv"),i._zoomPane=t.get("zoomPane"),i._tilePane=t.get("tilePane"),i._panes=t.get("panes"),i._overlayPane=t.get("overlayPane"),i.listen(e),i.set("tileszooming",!1),i._working=!1,i._view=t},Ot(o.ZoomEffector,o.KVO,{listen:function(t){Bt.addListener(t,"tilesloaded",Pt(this._onTilesloaded,this)),Bt.addListener(t,"zoomstart",Pt(this._onZoomStart,this)),Bt.addListener(t,"zoomend",Pt(this._onZoomEnd,this)),this.bindTo("tileSize",t),this.bindTo("ef_overlay",t),this.bindTo("ef_overlaylayer",t),this.bindTo("ef_overlayimage",t),this.bindTo("ef_floatpane",t)},_onTilesloaded:function(){if(this._working){this.clearPanePosition(),this._zoomPane.style.display="none",this._tilePane.style.display="",this._working=!1;var t=this.get("ef_overlay");t&&this._showPane(t)}},_onZoomStart:function(t){!1===this.get("tileszooming")&&(zt.willChange(this._tilePane,"transform"),zt.backfaceVisibility(this._tilePane,"hidden"),this._hidePane(this.get("ef_overlay")),this.set("tileszooming",!0)),this.start(t)},_onZoomEnd:function(){if(!1!==this.get("tileszooming")){this.set("tileszooming",!1),this.finish();var t=this.get("ef_overlay");t||this._showPane(t),zt.backfaceVisibility(this._zoomPane,"visible"),zt.willChange(this._zoomPane,"auto")}},_hidePane:function(t){var e=this;o.forEach(this._panes,function(i,n){t?e.get("ef_"+n.toLowerCase())||zt.visible(i,!1):zt.visible(i,!1)})},_showPane:function(t){var e=this;o.forEach(this._panes,function(i,n){t?e.get("ef_"+n.toLowerCase())||zt.visible(i,!0):zt.visible(i,!0)})},clearOverlayPanePosition:function(){if(this.get("ef_overlay")){var t=this._overlayPane;zt.transform(t,1,0,0,{x:0,y:0}),zt.setOffset(t,0,0)}},isZooming:function(){return this.get("tileszooming")},clearPanePosition:function(){var t=this._zoomPane,e=this._tilePane;zt.transform(t,1,0,0,{x:0,y:0}),zt.transform(e,1,0,0,{x:0,y:0}),zt.setOffset(t,0,0),zt.setOffset(e,0,0),this.clearOverlayPanePosition();var i=this._tiles;i&&(o.forEach(i,function(t){t.setOffset(t.offsetSnapShot)}),this._tiles.length=0,this._tiles=[]),Bt.trigger(this,"clearpaneposition")},_swap:function(){var t=this._view;t.swapTilePane(),this._tilePane=t.get("tilePane"),this._zoomPane=t.get("zoomPane"),this._zoomPane.style.display="",this._tilePane.style.display="none",this._working=!0},start:function(t){this._topLeft=t.get("containerTopLeft_px"),this._origin=t.get("transformOrigin_px"),this._curTopLeft=this._topLeft.clone(),this._swap(),this.csszoom&&this._prepareIEZoom(),this.bindTo("scale",t),this.bindTo("transformOrigin_px",t),this.bindTo("containerTopLeft_px",t)},_prepareIEZoom:function(){var t=[];this._view.getTilePanes().forEach(function(e){var i=e.getSwapped();o.forEach(i,function(e){e.offsetSnapShot=e.getOffset().clone(),t.push(e)})}),this._tiles=t},scale_changed:function(t){1!==t&&(this._curTopLeft=this._topLeft.clone(),this._curScale=t,this._scaleZoomPane(t))},_scaleZoomPane:function(t){var e=this._zoomPane,i=this._overlayPane,n=this._origin.clone()||Ct(0,0);if(this.csszoom){var s=this._tiles,r=n.clone().mul(t,t).sub(n).mul(-1,-1),a=this.get("tileSize").clone().mul(t,t).ceil();zt.setOffset(e,r),o.forEach(s,function(e){var i=e.offsetSnapShot.clone().mul(t,t).ceil();e.setSize(a),e.setOffset(i)})}else zt.setScale(e,t,n,!0),this.get("ef_overlay")&&zt.setScale(i,t,n,!0);Bt.trigger(this,"scale",t)},transformOrigin_px_changed:function(t){this._origin=t},containerTopLeft_px_changed:function(t){this._topLeft=t},_teardown:function(){zt.transform(this._containerDiv,1,0,0,{x:0,y:0});var t=this._curTopLeft,e=this._zoomPane,i=this._overlayPane,n=this._curScale;zt.isSupportedCSS3Style("transform")||(Lt.browser.msie||t.div(n,n),t.add(zt.getRawOffset(e))),zt.setOffset(e,t),this.get("ef_overlay")&&zt.setOffset(i,t),this._tilePane.style.display=""},finish:function(){this.unbind(["scale","transformOrigin_px","containerTopLeft_px"]),this._teardown(),this._topLeft=null,this._origin=null,this._curTopLeft=null,this._curScale=1},tileszooming_changed:function(t){t&&this.clearPanePosition()}});var Vt=function(){};Vt.prototype={constructor:Vt,fromCoordToPoint:function(t){var e,i;return t instanceof At?(e=t.lng(),i=t.lat()):(e=t.x,i=t.y),Ct(e,i)},fromPointToCoord:function(t){var e=t.x,i=t.y;return Ct(e,i)}},o.EmptyProjection=new Vt,function(){var t=o.Math.fromRadiansToDegrees,e=o.Math.fromDegreesToRadians,i=1/(4*Math.PI),n=-1/(2*Math.PI),s=function(){};Ot(s,Vt,{name:"EPSG:3857",fromCoordToPoint:function(t){return this.fromLatLngToPoint(t)},fromLatLngToPoint:function(t){var n,o,s=t.y,r=t.x;return t instanceof At&&(s=t.lat(),r=t.lng()),n=r*(1/360)+.5,s>=85.051128?o=0:s<=-85.051128?o=1:(o=Math.sin(e(s)),o=.5-Math.log((1+o)/(1-o))*i),Ct(n,o)},fromPointToCoord:function(t){return this.fromPointToLatLng(t)},fromPointToLatLng:function(e){var i=e.x,s=e.y;return i=360*(i-.5),s=2*Math.atan(Math.exp((s-.5)/n)),s=t(s-Math.PI/2),o.LatLng(parseFloat(s.toFixed(7)),parseFloat(i.toFixed(7)))},fromCoordToLatLng:function(t){return t.clone()},fromLatLngToCoord:function(t){return t.clone()},getDistance:function(t,e){var i=o.Math.radianPerDegree,n=t.y,s=e.y,r=t.x,a=e.x,h=(s-n)*i,l=(a-r)*i,c=Math.sin(h/2)*Math.sin(h/2)+Math.cos(n*i)*Math.cos(s*i)*Math.sin(l/2)*Math.sin(l/2);return 2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c))*6378137},getDestinationCoord:function(t,e,i){return new At(t.y,t.x).destinationPoint(e,i)}}),o.EPSG3857Projection=s,o.EPSG3857=new s}(),o.MapSystemProjection=function(t){this.bindTo(["projection","zoom","tileSize","mapTypeMinZoom","projectionTopLeft","containerTopLeft","repeatX"],t)},Ot(o.MapSystemProjection,o.KVO,{factor:function(t){var e=this.get("projection").minZoom||0;return Math.pow(2,t-e)},scaleUp:function(t,e){var i=this.factor(e);return t instanceof Ct||t instanceof Dt?t.mul(i,i):t*i},scaleDown:function(t,e){var i=this.factor(e);return t instanceof Ct||t instanceof Dt?t.div(i,i):t/i},fromCoordToPoint:function(t){var e=this.get("projection"),i=this.get("tileSize"),n=e.fromCoordToPoint(t);return e!==o.EmptyProjection&&n.mul(i.width,i.height),this._interpolate(n)},fromPointToCoord:function(t){var e=this.get("projection"),i=this.get("tileSize"),n=t.clone();return e!==o.EmptyProjection&&n.div(i.width,i.height),e.fromPointToCoord(n)},fromCoordToOffset:function(t){var e=this.fromCoordToPoint(t);return this.fromPointToOffset(e)},fromPointToOffset:function(t){var e=(this.get("tileSize"),t.clone());return e.sub(this.get("projectionTopLeft")),this.scaleUp(e,this.get("zoom")),e.sub(this.get("containerTopLeft")),e},fromOffsetToCoord:function(t){var e=this.fromOffsetToPoint(t);return this.fromPointToCoord(e)},fromOffsetToPoint:function(t){var e=t.clone();return e.add(this.get("containerTopLeft")),this.scaleDown(e,this.get("zoom")),e.add(this.get("projectionTopLeft")),this._interpolate(e)},fromCoordToPixelPoint:function(t){var e=this.get("zoom"),i=this.fromCoordToPoint(t),n=i.clone();return this.scaleUp(n,e),n},getDistance:function(t,e){var i=this.get("projection");return i.getDistance?i.getDistance(t,e):0},getDestinationCoord:function(t,e,i){var n=this.get("projection");return n.getDestinationCoord?n.getDestinationCoord(t,e,i):null},getProjectionName:function(){return this.get("projection").name||"unknown"},_interpolate:function(t){var e=t.clone(),i=this.get("tileSize"),n=i.width,o=i.height,s=this.get("tileExtra")||0,r=n+n*s,a=o+o*s;return this.get("repeatX")?(e.x>r?e.x=e.x%r:e.x<0&&(e.x=r+e.x%r),e.y>a?e.y=e.y%a:e.y<0&&(e.y=a+e.y%a)):(e.x=Math.min(Math.max(e.x,0),r),e.y=Math.min(Math.max(e.y,0),r)),e}}),function(){function t(t,e,i,n,o){return t*o-e*Math.sin(2*o)+i*Math.sin(4*o)-n*Math.sin(6*o)}function e(t){return t<0?-1:1}function i(t){return Math.abs(t)=6)return!1;if(Math.abs(c)<1.5707963267948966){var d=Math.sin(c),g=Math.cos(c),f=Math.tan(c),_=h.ep2*Math.pow(g,2),m=Math.pow(_,2),y=Math.pow(f,2),v=Math.pow(y,2);l=1-h.es*Math.pow(d,2);var T=h.a/Math.sqrt(l),x=T*(1-h.es)/l,b=r/(T*h.scaleFactor),M=Math.pow(b,2);r=i(h.lng0+b*(1-M/6*(1+2*y+_-M/20*(5-2*_+28*y-3*m+8*h.ep2+24*v)))/g),a=c-T*f*M/x*(.5-M/24*(5+3*y+10*_-4*m-9*h.ep2-M/30*(61+90*y+298*_+45*v-252*h.ep2-3*m)))}else r=h.lng0,a=1.5707963267948966*e(a);return r=n(r),a=n(a),r=parseFloat(r.toFixed(7)),a=parseFloat(a.toFixed(7)),o.LatLng(a,r)}}),o.UTMKProjection=l,o.UTMK=new l}(),function(){var t=function(){};Ot(t,o.UTMKProjection,{name:"UTMK_NAVER",fromCoordToNaver:function(t){return this.fromLatLngToNaver(t)},fromLatLngToNaver:function(t){var e=this._fromCoordToPlane("LATLNG_TO_UTMK",t);return this.fromUTMKToNaver(e)},fromUTMKToNaver:function(t){var e=parseInt(10*t.x+34e7,10),i=parseInt(10*t.y+13e7,10);return Ct(e,i)},fromNaverToPoint:function(t){var e=this.fromNaverToUTMK(t);return this.fromUTMKToPoint(e)},fromPointToNaver:function(t){var e=this.fromPointToUTMK(t);return this.fromUTMKToNaver(e)},fromNaverToUTMK:function(t){var e=parseFloat((t.x-34e7)/10),i=parseFloat((t.y-13e7)/10);return Ct(e,i)},fromNaverToCoord:function(t){return this.fromNaverToLatLng(t)},fromNaverToLatLng:function(t){var e=this.fromNaverToUTMK(t);return this.fromUTMKToCoord(e)}}),o.UTMK_NAVERProjection=t,o.UTMK_NAVER=new t}(),o.MapTypeRegistry=function(t,i){this._typeIds=[],this._typeId=null,this._prevId=null,this.setValues(t),i!==e&&this.setSelectedTypeId(i)},Ot(o.MapTypeRegistry,o.KVO,{set:function(t,e){if("selectedPaneType"!==t&&"selectedMapType"!==t){var i=this.get(t),n=o.getIndexOfElement(this._typeIds,t);o.KVO.prototype.set.apply(this,arguments),n>-1&&this._typeIds.splice(n,1),null!==e?(this._typeIds.push(t),Bt.trigger(this,"add_paneType",t,e),Bt.trigger(this,"addMapType",t,e)):i&&(Bt.trigger(this,"remove_paneType",t,i),Bt.trigger(this,"removeMapType",t,i))}},setSelectedTypeId:function(t){this._prevId=this._typeId,this._typeId=t,o.KVO.prototype.set.apply(this,["selectedMapType",this.get(t)]),o.KVO.prototype.set.apply(this,["selectedPaneType",this.get(t)])},getSelectedTypeId:function(){return this._typeId},getPreviousTypeId:function(){return this._prevId},getSelectedType:function(){return this.get("selectedMapType")},getTypeIds:function(){return this._typeIds.slice(0)}}),o.Tile=function(t,e){var i=wt({opacity:1,transition:!0,zIndex:0,duration:zt.css3Styles.transition?300:600},e||{});this._prepareDOM(),t&&this._el.appendChild(t),this.setValues(i)},Ot(o.Tile,o.KVO,{_prepareDOM:function(){var t=zt.createElement("div",V+j+U);t.setAttribute("draggable",!1),t.setAttribute("unselectable","on"),!Lt.mobile&&Lt.browser.safari&&(t.style.pointerEvents="none"),Lt.usingGPU&&Lt.restrictiveGPU&&zt.addElement(zt.createDummyForRestrictiveGPU(),t),Lt.usingGPU&&zt.forceGPU(t),this._el=t},appendTo:function(t){this._el.parentNode!==t&&zt.addElement(this._el,t)},getElement:function(){return this._el},getElements:function(){return[this._el]},show:function(){this._el&&(this._el.style.display="")},hide:function(){this._el&&(this._el.style.display="none")},fadeIn:function(){return function(t,e){var i=this._el,n=this.getDuration(),o=this.getOpacity();zt.setOpacity(i,e||0),zt.animate(i,{opacity:o},{duration:n,easing:"easeOutCubic",complete:function(){t&&t()}})}}(),cancelFadeIn:function(){zt.stop(this._el,{opacity:this.getOpacity()})},load:function(t,e){var i=wt({},t);this.getOffset()||i.offset||(i.offset=Ct(0,0)),this.setValues(i),this.show(),e&&e(),this.get("transition")?this.fadeIn(Pt(this._triggerLoaded,this)):this._triggerLoaded()},reset:function(t,e,i){t instanceof o.AbstractMapType&&!(arguments.length<2)&&this.load(i)},setBlank:function(){this.hide()},remove:function(){zt.removeElement(this._el)},destroy:function(){this.remove(),this._el=null},setDuration:function(t){t!==this.getDuration()&&this.set("duration",t)},getDuration:function(){return this.get("duration")},setOffset:function(t,e){var i=t instanceof Ct?t.clone():Ct(t,e);i!==this.getOffset()&&this.set("offset",i)},getOffset:function(){return this.get("offset")},setOpacity:function(t){t!==this.getOpacity()&&this.set("opacity",t)},getOpacity:function(){return this.get("opacity")},setZIndex:function(t){t!==this.getZIndex()&&this.set("zIndex",t)},getZIndex:function(){return this.get("zIndex")},setSize:function(t){this.getSize();this.set("size",t)},getSize:function(){return this.get("size")},setTileIndex:function(t){var e=t.xIndex,i=t.yIndex;"x"in t&&(e=t.x,i=t.y),this.set("tileIndex",{xIndex:e||0,yIndex:i||0})},disable:function(){this._triggerLoaded=St},getTileIndex:function(){return this.get("tileIndex")||null},_triggerLoaded:function(){Bt.trigger(this,"loaded",this)},offset_changed:function(t){zt.setOffset(this._el,t)},opacity_changed:function(t){zt.setOpacity(this._el,t)},zIndex_changed:function(t){this._el.style.zIndex=t},size_changed:function(t){zt.setSize(this._el,t)},pane_changed:function(t){this.appendTo(t)}}),o.ImageTile=function(t){var e=wt({urls:"",opacity:1,zIndex:0,imgonload:null,imgonerror:null},t);this._imgs=[],o.Tile.apply(this,[null,e])},Ot(o.ImageTile,o.Tile,{_prepareImage:function(){var t=this.getUrls(),e=this._imgs.length,i=t.length-e,n=this.getElement(),o=0,s=null,r=null;if(i>0)for(o=0;o0||i._triggerLoaded()});else{if(--n>0)return;i._triggerLoaded()}};this.forEachImages(function(t,i){var n=t.getElement(),o=n.src+"",r=e[i];o||(n.src=R,o=R),r===o?s():t._setUrl(n,r,s,s)})},setBlank:function(){this.forEachImages(function(t){var e=t.getElement();e.onload=null,e.onerror=null,e.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="})},disable:function(){this.forEachImages(function(t){var e=t.getElement();e.onload=null,e.onerror=null}),o.Tile.prototype.disable.apply(this)},remove:function(){this.setBlank(),o.Tile.prototype.remove.apply(this)},destroy:function(){o.Tile.prototype.destroy.apply(this),this._imgs.length=0,this._imgs=null},getImageElements:function(){var t=[];return this.forEachImages(function(e){t.push(e.getElement())}),t},urls_changed:function(t){this._imgs.length!==t.length&&this._prepareImage()},size_changed:function(t){this.forEachImages(function(e){e.setSize(t)}),zt.setSize(this._el,t)},imgonload_changed:function(t){this.forEachImages(function(e){e.setHandler({onload:t})})},imgonerror_changed:function(t){this.forEachImages(function(e){e.setHandler({onerror:t})})}}),o.CanvasTile=function(t){var e=wt({opacity:1},t);this._prepareDOM(e),o.Tile.apply(this,[null,e])},Ot(o.CanvasTile,o.Tile,{_prepareDOM:function(){o.Tile.prototype._prepareDOM.apply(this);var t=zt.createElement("canvas"),e=t.getContext("2d");this._canvas=t,this._ctx=e,this._el.appendChild(t)},getElements:function(){return[this._el,this._canvas]},reset:function(t,e,i){if(t instanceof o.AbstractMapType&&!(arguments.length<2)){var n=this,s=wt({size:t.tileSize},i);o.forEach(s,function(t,e){n.set(e,t,!0)});var r=this.getTileIndex(),a=t.getTileData(r.xIndex,r.yIndex,e);this.load(s,function(){n.set("imageData",a)})}},setBlank:function(){var t=this._ctx;if(t){var e=this.getSize();t.clearRect(0,0,e.width,e.height)}},remove:function(){this.setBlank(),o.Tile.prototype.remove.apply(this)},destroy:function(){o.Tile.prototype.destroy.apply(this),this._ctx=null,this._canvas=null},size_changed:function(t){if(t){var e=this._canvas;e.width=t.width,e.height=t.height,zt.setSize(e,t),zt.setSize(this._el,t)}},imageData_changed:function(t){t&&(this.setBlank(),this._ctx.putImageData(t,0,0))}}),o.TilePool=function(){this._tiles={},this._loadState={},this._swapped=[]},Ot(o.TilePool,o.KVO,{init:function(){this._tiles={},this._loadState={}},add:function(t,e){var i=e||t.getTileIndex(),n=this.fromIndexToKey(i);this._loadState[n]=!1,this._tiles[n]=t},remove:function(t){var e,i;t instanceof o.Tile?(e=t,i=this.fromIndexToKey(e.getTileIndex())):(i=this.fromIndexToKey(t),e=this._tiles[i]),e&&(e.destroy(),e=null,this._loadState[i]=null,delete this._loadState[i],this._tiles[i]=null,delete this._tiles[i])},removeAll:function(){var t=this;o.forEach(this._tiles,function(e){t.remove(e)}),t.init()},getAt:function(t){var e=this.fromIndexToKey(t);return this._tiles[e]},getLength:function(){var t=0;return o.forEach(this._tiles,function(){t++}),t},clearState:function(){this._loadState={}},markAt:function(t,i){i===e&&(i=!0),this._loadState[this.fromIndexToKey(t)]=i},getLoadedCount:function(){var t=0;return o.forEach(this._loadState,function(e){e&&t++}),t},swap:function(){var t=this._swapped;o.forEach(t,function(t){t.destroy(),t=null}),t.length=0,t=[],o.forEach(this._tiles,function(e){e.disable(),t.push(e),zt.clearGPU(e.getElement())}),this._tiles={},this._swapped=t},getSwapped:function(){return this._swapped},reload:function(t){this.clearState(),this.forEach(function(e){e.reload(t)})},reset:function(t,e,i){this.clearState(),this.forEach(function(n){n.reset(t,e,i)})},forEach:function(t){o.forEach(this._tiles,t)},fromIndexToKey:function(t){return"tile_"+t.xIndex+"x"+t.yIndex}}),o.AbstractMapType=function(t){this.setMapTypeOptions(t)},o.AbstractMapType.prototype={constructor:o.AbstractMapType,setMapTypeOptions:function(t){var i=this,n=t.tileSize||Dt(256,256);n=o.isNumber(n)?Dt(n,n):o.box(n,Dt),i.tileSize=n,i.minZoom=(o.isDefined(t.minZoom)?t.minZoom:t.maxZoom)||0,i.maxZoom=t.maxZoom||0,i.name=t.name||"unknown",i.projection=t.projection||o.EmptyProjection,i.repeatX=t.repeatX||!1,i.provider=t.provider||e,i.vendor=t.vendor||e,i.darktheme=t.darktheme||!1,i.uid=t.uid,i.uid||(Y++,i.uid="unknown:unknown-"+Y),i._options=t},getMapTypeOptions:function(){return this._options},_getTileCount:function(t){return Math.pow(2,t-(this.projection.minZoom||0))},getMinZoom:function(){return this.minZoom},getMaxZoom:function(){return this.maxZoom},getName:function(){return this.name}},o.ImageMapType=function(t){o.AbstractMapType.apply(this,arguments)},Ot(o.ImageMapType,o.AbstractMapType,{setMapTypeOptions:function(t){if("function"!=typeof t.getTileUrl&&!t.tileSet)throw new Error("'getTileUrl' or 'tileSet' options is required.");o.AbstractMapType.prototype.setMapTypeOptions.apply(this,arguments);var e=this;t.tileSet?e.tileSet=o.isString(t.tileSet)?[t.tileSet]:t.tileSet:(o.isArray(e.tileSet)&&(e.tileSet.length=0),e.tileSet=[]),e._imgOptions=e._getImageOptions()},getTileUrls:function(t,e,i){var n,s=this._options,r=s.tileExtra||0,a=this._getTileCount(i)+r;return this.repeatX&&(t%=a)<0&&(t+=a),!this.repeatX&&(t<0||t>=a)||e<0||e>=a?n=s.TRANSPARENT_URL||R:s.getTileUrl?n=s.getTileUrl(t,e,i):s.tileSet&&(n=this._getUrlFromTileSet({x:t,y:e,z:i})),null===n?[]:o.isString(n)?[n]:n},getTile:function(t,e,i){var n=this.getImageOptions()||{},s=this.getOptions()||{},r=s.tileDuration;return new o.ImageTile({tileIndex:{xIndex:t,yIndex:e},urls:this.getTileUrls(t,e,i),size:this.tileSize,imgonload:n.onload||null,imgonerror:n.onerror||null,duration:r})},getOptions:function(){return this._options},_getUrlFromTileSet:function(t){var e=this.tileSet||[],i=this.getMapTypeOptions(),n=e.length||0,s=0,r=[];if(e.length){s=parseInt((t.x+t.y)%n,10);var a=e[s];if(o.isArray(a))o.forEach(a,function(e){r.push(Zt(e,t,i))});else{var h=a;r.push(Zt(h,t,i))}}else r.push(this._options.TRANSPARENT_URL||R);return r},getImageOptions:function(){return this._imgOptions},_getImageOptions:function(){var t=this._options;return{tileSize:this.tileSize,onload:function(e){t&&t.onload&&t.onload(e)},onerror:function(e){t&&t.onerror&&t.onerror(e)},position:t.position||"absolute",disableSelection:!0,alt:""}}});var Zt=function(t,e,i){return t.replace(/\{(-?)(\w+)\}/g,function(t,n,o){return("x"===o||"y"===o||"z"===o)&&o in e?"-"===n?"z"===o?i.maxZoom-e[o]:Math.pow(2,e.z-i.minZoom)-1-e[o]:e[o]:o in i?i[o]:t})};o.CanvasMapType=function(t){o.AbstractMapType.apply(this,arguments)},Ot(o.CanvasMapType,o.AbstractMapType,{setMapTypeOptions:function(t){if("function"!=typeof t.getTileData)throw new Error("'getTileData' option is required.");o.AbstractMapType.prototype.setMapTypeOptions.apply(this,arguments)},getTileData:function(t,e,i){var n,o=this._getTileCount(i),s=this._options;return this.repeatX&&(t%=o)<0&&(t+=o),!this.repeatX&&(t<0||t>=o)||e<0||e>=o?n=null:s.getTileData&&(n=s.getTileData(t,e,i)),n},getTile:function(t,e,i){var n=this.getTileData(t,e,i),s=this.getOptions()||{},r=s.tileDuration;return new o.CanvasTile({tileIndex:{xIndex:t,yIndex:e},size:this.tileSize,imageData:n,duration:r})},getOptions:function(){return this._options}});var Ft=["enus","zhcn","jajp"],Ut=function(t){var e=this;o.forEach(t,function(t,i){e[i]=t}),e.vendor="\xa9 NAVER Corp.",e._langSuffix=e._getLanguageSuffix(),e.uid||(Y++,e.uid="naver:unknown-"+Y),o.console.once("[DEPRECATED]\nThe NaverImagePaneTypeOptions is deprecated.\nnaver.maps.NaverMapTypeOptions \uc740 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\nnaver.maps.NaverStyleMapTypeOptions \uc744 \uc0ac\uc6a9\ud574 \uc8fc\uc138\uc694.")};Ut.prototype={constructor:Ut,name:"",version:d.onetile,tileSize:new o.Size(256,256),minZoom:-1,maxZoom:14,projection:o.UTMK_NAVER,serverCount:4,timeStamp:"0",imgFormat:0,hd:A>1,prefix:"",postfix:"",overview:!0,darktheme:!1,language:"ko-KR",_getLanguageSuffix:function(){var t=(this.language||"").toLowerCase().replace("-","")||"kokr";return"kokr"===t||-1===o.getIndexOfElement(Ft,t)?"":"_"+t},getTileUrl:function(t,e,i){if(!this.overview&&i<1)return R;var n,s;i<1?(n=Math.pow(2,i+1)-1,s=n):(n=3*Math.pow(2,i-1),s=n-1),e=Math.pow(2,i+1)-1-e;var r=this.version,a=this.timeStamp,h=this.imgFormat,l=this.overlayType,c=0,u=0;if(o.isArray(h)||(h=[h]),o.isArray(l)||(l=[l]),h.length=0&&t<=n&&e>=0&&e<=s){var p=[];for(c=0,u=l.length;c=0&&e=0||h&&i.indexOf(t)>=0||c.push(t)}),jt.sortOverlay(c.join("."))},_getRtsVersionQuery:function(){var t="",e=null,i=null,n=this;return(e=n.map.layers.traffic)?(i=e.registry.traffic.getOptions(),t=i&&i.timeStamp?i.timeStamp:"",""!==t?"rtsVersion="+t:""):(t="0"===n.timeStamp?"":n.timeStamp,""===t?"":"rtsVersion="+t)},_getFormat:function(t){return t=parseInt(t,10),1===t?"jpg":"png"},_appendQuery:function(t,e){return e&&""!==e?t+e:""},_getQuery:function(t,e){return t&&""!==t?"?mt="+t+this._appendQuery("&",e):this._appendQuery("?",e)},onerror:function(t){t.src=R}},function(){var t=function(){for(var t=[],e=0,n=arguments.length;e-1&&this._layerNames.splice(n,1),null!==e?(this._layerNames.push(t),Bt.trigger(this,"addLayer",e)):i&&Bt.trigger(this,"removeLayer",t)},getLayerNames:function(){return this._layerNames.slice(0)}}),o.StreetLayer=function(t){var e=wt({zIndex:10,overlayMap:!0,smartSymbol:!0,forceOverlayToMapType:!0},t);o.Layer.apply(this,["street",jt.getStreetLayer(),e])},Ot(o.StreetLayer,o.Layer),o.TrafficLayer=function(t){var e=wt({zIndex:2,overlayMap:!0,interval:3e5,forceOverlayToMapType:!0},t);o.Layer.apply(this,["traffic",jt.getTrafficLayer(),e])},Ot(o.TrafficLayer,o.Layer,{_addToMap:function(t){var e=this ;e._rtsVersionLoader||(e._rtsVersionLoader=new te),e._rtsVersionLoader.start({mapOrLayer:e,interval:this.options.interval,imageMapType:this.registry.get(this.name),callback:function(){o.Layer.prototype._addToMap.apply(e,[t])}})},_destroy:function(){this._rtsVersionLoader&&(this._rtsVersionLoader.stop(),this._rtsVersionLoader=null),o.Layer.prototype._destroy.apply(this)},refreshRTSVersion:function(){if(this._rtsVersionLoader){var t=this,e=t.getRTSVersion();this._rtsVersionLoader.loadRTSVersion(function(i){i&&i.version!==e&&t.refresh(!0)})}},startAutoRefresh:function(){this._rtsVersionLoader&&this._rtsVersionLoader.startAutoRefresh()},endAutoRefresh:function(){this._rtsVersionLoader&&this._rtsVersionLoader.endAutoRefresh()},getRTSVersion:function(){return this._rtsVersionLoader?this._rtsVersionLoader.getRTSVersion():0}}),o.MapOptions=function(t,e){e=e||{},this.map=t,R=e.blankTileImage||z;var i=[bt.SATELLITE,bt.HYBRID,bt.DARK],n=i.indexOf(e&&e.mapTypeId)>-1;if(wt(this,{gl:!1,background:n?"#111213":"#f8f9fa",tileSpare:0,pixelRatio:A,center:At(37.5666103,126.9783882),bounds:null,tilt:0,rotation:0,maxBounds:null,padding:o.trbl(),overlayZoomEffect:null,tileTransition:!0,tileDuration:null,baseTileOpacity:1,disableKineticPan:!0,zoomOrigin:null,size:null,zoom:16,minZoom:null,maxZoom:null,mapTypes:null,mapTypeId:"normal",resizeOrigin:f.CENTER,draggable:!0,disableDoubleClickZoom:!1,disableDoubleTapZoom:!1,disableTwoFingerTapZoom:!1,keyboardShortcuts:!0,scrollWheel:!0,pinchZoom:!0,scaleControl:!0,scaleControlOptions:{position:f.BOTTOM_RIGHT},logoControl:!0,logoControlOptions:{position:f.BOTTOM_RIGHT},mapDataControl:!0,mapDataControlOptions:{position:f.BOTTOM_LEFT},mapTypeControl:!1,mapTypeControlOptions:{position:f.TOP_RIGHT},zoomControl:!1,zoomControlOptions:{position:f.TOP_LEFT},compassControl:!1,compassControlOptions:{position:f.TOP_LEFT}}),e.logoControl=e.logoControl||!1,"mapTypes"in e||(e.mapTypes=jt.getMapTypes({map:t,tileDuration:e.tileDuration})),e.center){if(!(e.center instanceof o.Point)){var s=e.mapTypes.get(e.mapTypeId||this.mapTypeId).projection;["UTMK","UTMK_NAVER","EPSG:3857"].indexOf(s.name)>-1?e.center=o.box(e.center,At):e.center=o.box(e.center)}}else e.center=this.center;!e.zoomOrigin||e.zoomOrigin instanceof o.Point||(e.zoomOrigin=o.box(e.zoomOrigin)),!e.bounds||e.bounds instanceof o.PointBounds||(e.bounds=o.box(e.bounds)),!e.maxBounds||e.maxBounds instanceof o.PointBounds||(e.maxBounds=o.box(e.maxBounds)),!e.size||e.size instanceof o.Size||(e.size=o.box(e.size,o.Size)),e.padding&&(e.padding=o.trbl(e.padding)),!o.glSupported()&&e.zoom&&o.isFloat(e.zoom)&&(o.console.once("\uc2e4\uc218\ud615 \uc90c \ub808\ubca8\uc744 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\uc90c \ub808\ubca8\uc744 \uc815\uc218\ub85c \uc124\uc815\ud574 \uc8fc\uc138\uc694. \uc2e4\uc218\ud615 \uc90c \ub808\ubca8 \uc124\uc815 \uc2dc \uac15\uc81c\ub85c \ubc18\uc62c\ub9bc \ucc98\ub9ac\ud569\ub2c8\ub2e4.\n"),e.zoom=Math.round(e.zoom)),this.setValues(e),this.set("__optionsOrder",o.keys(wt(e,{scaleControl:this.scaleControl,logoControl:this.logoControl,mapDataControl:this.mapDataControl,mapTypeControl:this.mapTypeControl,zoomControl:this.zoomControl,compassControl:this.compassControl}))),this.get("tileTransition")&&Lt.browser.csszoom&&this.set("tileTransition",!1)},Ot(o.MapOptions,o.KVO,{setRefinedOption:function(t,e){"size"===t?e=o.box(e,Dt):"center"===t||"zoomOrigin"===t||"bounds"===t?e=o.box(e):"maxBounds"===t?e=this.limitMaxBounds(e):"minZoom"===t?e=this.limitMinZoom(e):"logoControl"===t&&(e=e||!1),this.set(t,e)},updateSilently:function(t,e){var i=this.get(t);i instanceof Ct||i instanceof It||i instanceof Dt?!1===i.equals(e)&&this.set(t,e,!0):"object"!=typeof i?i!==e&&this.set(t,e,!0):this.set(t,e,!0)},isDefaultMapType:function(){this.map;return!1},limitMaxBounds:function(t){if(!this.isDefaultMapType())return t;t=o.box(t);var e=o.LatLngBounds({lng:124.2694863,lat:32.122953},{lng:131.969556,lat:38.6152377});return e.hasBounds(t)?t:e},limitMinZoom:function(t){if(!this.isDefaultMapType())return t;return t>6?t:6},minZoom_changed:function(){this.set("minZoom",this.limitMinZoom(this.get("minZoom")),!0)},maxBounds_changed:function(){this.set("maxBounds",this.limitMaxBounds(this.get("maxBounds")),!0)},destroy:function(){for(var t=this.get("mapTypes"),e=t.getTypeIds(),i=0,n=e.length;ie.get("zoom")&&e.setZoom(i,!0)}),Bt.addListener(t,"maxZoom_changed",function(i){t.set("userMaxZoom",i),i-1&&o.Map.__instances.splice(r,1)},_mapType_changed:function(t){this._rtsVersionLoader&&this._rtsVersionLoader.stop();var e=this.getOptions(),i=this.get("projection");if(t&&i){t.projection&&(e.maxBounds=e.limitMaxBounds(e.maxBounds));var n=this._mapModel,s=n.get("tileSize")||Dt(256,256),r=t.projection||o.EmptyProjection,a=t.tileSize||Dt(256,256);this._isTilingSystemChanged=i!==r||!1===s.equals(a),t.map=this;var h,l=t.getMapTypeOptions?t.getMapTypeOptions():null;l&&(l.map=this,h=l.overlayType,this.getProjection().set("tileExtra",l.tileExtra||0)),this.mapTypeId=this.getMapTypeId(),n.set("instantTiling",!0),n.set("mapTypeId",this.getMapTypeId()),this._adjustZoomLimit(t);var c=t.repeatX||!1,u=n.get("repeatX")!==c;this._isTilingSystemChanged&&this.refresh(!0),u&&this._mapModel.set("repeatX",c,this._isTilingSystemChanged),this._rtsVersionLoader&&h&&-1!==h.indexOf("ctt")&&this._rtsVersionLoader.start({mapOrLayer:this,imageMapType:t})}},_size_changed:function(t){this._resizeListener||this._mapView.setSize(t),this._sizeChanged=!0},_checkRedrawRequired:function(){var t=this._mapModel,e=t.get("containerTopLeft"),i=t.get("repeatX");if(this.__WILL_REDRAW)return this.__WILL_REDRAW=!1,this._triggerRedraw();(this._sizeChanged||this._isTilingSystemChanged||0===e.x&&0===e.y||i&&(!i||this._pointShifted))&&this._triggerRedraw()},__onIdle:function(){var t=this._mapOptions;if(t.updateSilently("center",this.getCenter()),t.updateSilently("zoom",this.getZoom()),t.updateSilently("bounds",this.getBounds()),t.updateSilently("size",this.getSize()),t.updateSilently("tilt",this.getTilt()),t.updateSilently("rotation",this.getRotation()),this._checkRedrawRequired(),this.__RESERVED_MOVE&&!this._mapAction.isZooming()){var e=this.__RESERVED_MOVE,i=e[0],n=e[1];this.__RESERVED_MOVE=null,delete this.__RESERVED_MOVE,this.__WILL_REDRAW=!0,this._mapAction.reset(),this[i].apply(this,n)}},_getPointerEvent:function(){var t=this.getProjection(),e=this.getCenter();if(t&&e){var i=this.getPrimitiveProjection(),n=t.fromCoordToOffset(e),o=t.fromOffsetToPoint(n),s={coord:e.clone(),point:o,offset:n,pointerEvent:null,domEvent:null};return i.fromPointToLatLng&&(s.latlng=e.clone()),s}},_getDefaultEventParameters:function(t){for(var e=!1,i=[],n=0,o=M.length;n-1?this._onMapTypeChanged(t.getSelectedType()):this._lazyMapTypeId=e,this._style=this.get("style"),this._adjustUI()},_prepareButton:function(t){var e=this.get("mapTypeIds")||t.getTypeIds(),i="position:relative;z-index:1;padding:0;margin:0;list-style:none;display:block;height:30px;box-sizing:content-box !important;",n=zt.createElement("ul",i),s=zt.createElement("ul",i.replace("position:relative","position:absolute")+"left:0;width:100%;");n.style.borderRight="solid 1px #444",s.style.top="34px",s.style.display="none",this._mapTypeWrap=n,this._subMapTypeWrap=s,this._mapTypeScheme={};var r=Pt(this._addMapTypeButton,this);o.forEach(e,function(e){var i=t.get(e);i.uid.split(":").length<3&&r(e,i)}),o.forEach(e,function(e){var i=t.get(e);i.uid.split(":").length>=3&&r(e,i)}),this._element.appendChild(n),this._element.appendChild(s),this._domListeners=[Bt.addDOMListener(n,"mousedown",Pt(this._onDownButton,this)),Bt.addDOMListener(n,"mouseover",Pt(this._onOverButton,this)),Bt.addDOMListener(n,"mouseout",Pt(this._onOutButton,this)),Bt.addDOMListener(s,"mousedown",Pt(this._onDownCheckbox,this)),Bt.addDOMListener(s,"mouseover",Pt(this._onOverCheckbox,this)),Bt.addDOMListener(s,"mouseout",Pt(this._onOutCheckbox,this))]},_updateSubMapTypeStyle:function(t){var e=o.keys(t),i=e.length;0!==i&&(1===i?t[e[0]].listElement.style.border="solid 1px #444":o.forEach(e,function(e,n){var o=t[e].listElement;o.style.borderBottom=n0&&(o.style.borderTop="solid 1px #ddd")}))},_addMapTypeButton:function(t,e){var i="position:relative;z-index:1;float:left;display:block;margin:0;padding:0;list-style:none;border:solid 1px #444;box-sizing:content-box !important;",n=N+"height:26px;line-height:26px;border:solid 1px #fff;background-color:#fff;text-decoration:none;color:#000;font-size:13px;letter-spacing:-1px;font-family:"+B,o="{{name}}",s=["",'',"{{name}}",""].join(""),r=this._mapTypeScheme,a=e.name||(e.getName?e.getName():t),h=this._getParentMapTypeId(e),l=null,c=null;if(h&&h!==t){h=this._getParentMapTypeId(e),l=zt.createElement("li",i.replace("float:left;",""));var u=s.replace(/\{\{name\}\}/g,a);"naver:satellite:hybrid"===e.uid&&(u=u.replace("-unchecked","-checked")),l.innerHTML=u,l.style.display="none",c=l.getElementsByTagName("a")[0],c.style.position="relative",c.style.paddingLeft="25px",c.__mapTypeId=t,c.onclick=Pt(this._preventLink,this),r[h]||(r[h]={element:null,listElement:null,uid:null,subs:{}}),r[h].subs[t]={element:c,listElement:l},this._updateSubMapTypeStyle(r[h].subs),this._subMapTypeWrap.appendChild(l)}else l=zt.createElement("li",i),l.style.borderRight="0 none",l.innerHTML=o.replace("{{name}}",a),c=l.getElementsByTagName("a")[0],c.style.padding="0 7px",c.__mapTypeId=t,c.onclick=Pt(this._preventLink,this),r[t]?(r[t].element=c,r[t].uid=e.uid):r[t]={element:c,listElement:l,uid:e.uid,subs:{}},this._mapTypeWrap.appendChild(l)},_removeMapTypeButton:function(t,e){var i=this._getParentMapTypeId(e),n=this._mapTypeScheme[i||t];if(i===t){zt.removeElement(n.element.parentNode),n.element=null;var o=!1;if(n.subs)for(var s in n.subs)if(n.subs.hasOwnProperty(s)&&n.subs[s]){o=!0;break}o||(n.uid=null)}else zt.removeElement(n.subs[t].listElement),n.subs[t]=null,delete n.subs[t],this._updateSubMapTypeStyle(n.subs)},_getParentMapTypeId:function(t){var e=this._mapTypeScheme,i=t.uid,n=i.split(":"),o=n[0]+":"+n[1],s=null;for(var r in e)if(e.hasOwnProperty(r)&&e[r].uid===o){s=r;break}return s},_getButtonElement:function(t){if("A"===t.tagName&&t.__mapTypeId)return t;for(;t&&"A"!==t.tagName&&"DIV"!==t.tagName;)t=t.parentNode;return t&&t.__mapTypeId?t:null},_hideCheckbox:function(e){function i(){for(var t=0,e=s.length;t-1)return s=e,!0}),this.setMapTypeId(s)}},_onOverButton:function(e){var i=Rt.fix(e),n=this._getButtonElement(i.target);if(n){var o=this._registry.getSelectedType(),s=this._getParentMapTypeId(o)||this._registry.getSelectedTypeId(),r=this._registry.get(n.__mapTypeId),a=this._getParentMapTypeId(r)||n.__mapTypeId;this._mapTypeScheme[a];s===a&&(t.clearTimeout(this._hoverTimer),this._showCheckboxOf(a))}},_onOutButton:function(t){this._hideCheckbox(this._getHideTime())},_onDownCheckbox:function(t){var e=Rt.fix(t),i=this._getButtonElement(e.target);if(i){var n=this._registry.getSelectedTypeId(),o=i.__mapTypeId;n===o&&(o=this._getParentMapTypeId(this._registry.get(o))),this.setMapTypeId(o)}},_onOverCheckbox:function(e){t.clearTimeout(this._hoverTimer)},_onOutCheckbox:function(t){this._hideCheckbox(this._getHideTime())},_prepareDropdown:function(t){var e=this.get("mapTypeIds")||t.getTypeIds(),i=t.getSelectedType(),n="\uc9c0\ub3c4 \uc720\ud615 \ubcc0\uacbd";i&&(n=i.name||(i.getName?i.getName():t.getSelectedTypeId()));var s=zt.createElement("div",N+"position:relative;z-index:0;"),r=zt.createElement("ul","position:absolute;z-index:1;top:29px;left:0;padding:0;margin:0;list-style:none;display:none;width:100%;border-top:solid 1px #444;border-bottom:solid 1px #444;box-sizing:content-box !important;"),a=zt.createElement("a","text-decoration:none;color:#000;font-size:13px;letter-spacing:-1px;display:block;padding:0 21px 0 9px;text-align:left;background-color:#fff;border:solid 1px #444;height:28px;line-height:28px;min-width:69px !important;box-sizing:content-box !important;font-family:"+B);a.innerHTML=""+n+'\ud3bc\uce58\uae30',a.href="#",a.title="\uc9c0\ub3c4 \uc720\ud615 \ubcc0\uacbd",a.onclick=Pt(this._preventLink,this),s.appendChild(a),this._mapTypeNameWrap=a.getElementsByTagName("span")[0],this._dropDownArrow=a.getElementsByTagName("img")[0],this._mapTypeListWrap=r,this._mapTypeScheme={};var h=Pt(this._addMapTypeList,this);o.forEach(e,function(e){h(e,t.get(e))}),this._element.appendChild(s),this._element.appendChild(r),this._domListeners=[Bt.addDOMListener(a,"mousedown",Pt(this._onToggleList,this)),Bt.addDOMListener(r,"mousedown",Pt(this._onDownListItem,this)),Bt.addDOMListener(r,"mouseover",Pt(this._onOverListItem,this)),Bt.addDOMListener(r,"mouseout",Pt(this._onOutListItem,this))]},_addMapTypeList:function(t,e){var i=N+"height:28px;line-height:28px;background-color:#fff;text-decoration:none;color:#666;font-size:13px;letter-spacing:-1px;padding:0 9px;font-family:"+B,n="{{name}}",o=this._mapTypeScheme,s=e.name||(e.getName?e.getName():t),r=zt.createElement("li","display:block;margin:0;padding:0;list-style:none;background-color:#fff;border:solid 1px #444;box-sizing:content-box !important;");r.innerHTML=n.replace("{{name}}",s),r.style.borderTop="0 none",r.style.borderBottom="0 none";var a=r.getElementsByTagName("a")[0];a.__mapTypeId=t,a.onclick=Pt(this._preventLink,this),o[t]={element:a,uid:e.uid,listElement:r},this._mapTypeListWrap.appendChild(r)},_removeMapTypeList:function(t,e){var i=this._mapTypeScheme[t];zt.removeElement(i.listElement),i=null,this._mapTypeScheme[t]=null,delete this._mapTypeScheme[t]},_toggleList:function(t){var e="-down",i="-up";t||(e="-up",i="-down"),zt.visible(this._mapTypeListWrap,t),this._dropDownArrow.src=this._dropDownArrow.src.replace(e,i)},_onToggleList:function(){this._toggleList(!1===zt.visible(this._mapTypeListWrap))},_onDownListItem:function(t){var e=Rt.fix(t),i=this._getButtonElement(e.target);if(i){var n=i.__mapTypeId;this.setMapTypeId(n),this._toggleList(!1)}},_onOverListItem:function(t){var e=Rt.fix(t),i=this._getButtonElement(e.target);i&&(i.style.backgroundColor="#f6f6f6")},_onOutListItem:function(t){var e=Rt.fix(t),i=this._getButtonElement(e.target);i&&i.__mapTypeId!==this._registry.getSelectedTypeId()&&(i.style.backgroundColor="#fff")},_preventLink:function(t){Rt.fix(t).preventDefault()},setMapTypeId:function(t){t!==this._registry.getSelectedTypeId()&&this._registry.setSelectedTypeId(t)},mapTypeIds_changed:function(t){var e=this;if(e._registry){var i=e._registry,n=t||i.getTypeIds();e._clearMapType(),e._lazyMapTypeId=i.getSelectedTypeId(),o.forEach(n,function(t){var n=i.get(t);e._onAddMapType(t,n)})}},_removeDOMEvents:function(){o.forEach(this._domListeners,function(t){Bt.removeDOMListener(t)}),this._domListeners.length=0},style_changed:function(t){this._element&&(this._style!==t&&(this._removeDOMEvents(),Rt.endTouch(),this._prepareDOM(this._registry)),this._style=t)},_getHideTime:function(){return Math.max(parseInt(this.getOptions("hideTime"),10),150)}});var Yt=[["\ubd80\ub3d9\uc0b0",17],["\uac70\ub9ac",15],["\uc74d,\uba74,\ub3d9",13],["\uc2dc,\uad70,\uad6c",10],["\uc2dc,\ub3c4",7],["\uad6d\uac00",5]];o.ZoomControl=function(t){this.DEFAULT_OPTIONS={position:f.TOP_LEFT,style:_.LARGE,legendDisabled:!1},this.__LEGEND_SCHEME__=Yt,this.SCALER_GAP=10,this._domListeners=[],this.set("legendAllowed",!0),o.CustomControl.apply(this,[t])},Ot(o.ZoomControl,o.CustomControl,{_beforeSetMap:function(t){if(t){if(t instanceof naver.maps.Map&&!t.isReady)return;this._prepareDOM(),this._bindDOMEvent()}else this._unbindDOMEvent(),this._destroyDOM()},_afterSetMap:function(t){if(t){if(t instanceof naver.maps.Map&&!t.isReady)return;var e=t.getMapModel();this.bindTo("minZoom",e,"userMinZoom"),this.bindTo("maxZoom",e,"userMaxZoom"),this.bindTo("mapTypeMinZoom",e),this.bindTo("mapTypeMaxZoom",e),this.bindTo("zoom",t),this.bindTo("mapType",t),this._adjustLegend()}else this.unbind("minZoom"),this.unbind("maxZoom"),this.unbind("mapTypeMinZoom"),this.unbind("mapTypeMaxZoom"),this.unbind("zoom"),this.unbind("mapType",t)},_addControl:function(t,e){o.CustomControl.prototype._addControl.apply(this,arguments),this._adjustLegend(e)},_prepareDOM:function(){var t=function(t,e,i){var n=zt.createElement(t,e);return i&&(n.innerHTML=i),n},e=function(t,e){for(var i=0,n=e.length;i'.replace(/{{(\w+)}}/g,function(t,e){return o[e]})},n="position:relative;z-index:2;width:28px;height:22px;cursor:pointer;display:block;overflow:hidden;box-sizing:content-box !important;",o="position:absolute;top:7px;bottom:7px;left:12px;width:4px;height:100%;display:block;",s=t("div","position:relative;z-index:0;width:28px;margin:10px;border:solid 1px #444;box-sizing:content-box !important;"),r=t("a",n+"border-bottom:solid 1px #cacdd1;",i("in-large-normal.png",28,22,"\uc9c0\ub3c4 \ud655\ub300")),a=t("div","position:relative;width:28px;height:118px;overflow:hidden;margin:0;padding:7px 0;background-color:#fff;cursor:pointer;box-sizing:content-box !important;"),h=t("div",o+"background-color:#2F87EC;"),l=t("div",o+"background-color:#CACDD1;"),c=t("a","position:absolute;left:4px;width:18px;height:10px;top:27px;border:solid 1px #444;cursor:move;display:block;overflow:hidden;box-sizing:content-box !important;",i("handle.png",18,10,"\uc9c0\ub3c4 \ud655\ub300/\ucd95\uc18c \uc2ac\ub77c\uc774\ub354")),u=t("a",n+"border-top:solid 1px #cacdd1;",i("out-large-normal.png",28,22,"\uc9c0\ub3c4 \ucd95\uc18c")),p=t("div","position:absolute;top:22px;width:44px;height:0;overflow:visible;display:none;"),d=t("div","display:block;margin:0;padding:0;");zt.disableSelection(s),r.href="#",u.href="#",c.href="#",e(a,[h,l,c]),e(s,[r,a,u]),p.appendChild(d),s.appendChild(p),this._doms={wrap:s,zoomIn:r,zoomOut:u,zoomInImg:r.getElementsByTagName("img")[0],zoomOutImg:u.getElementsByTagName("img")[0],scaler:a,scalerOn:h,scalerOff:l,slider:c,legend:p,legendInner:d},this.style_changed(this.get("style")||_.LARGE),this._element.appendChild(s),this._drawLegend()},_createLegendItem:function(t,e){var i=this.SCALER_GAP,n=this.get("maxZoom")||21,o=zt.createElement("div","position:absolute;top:0;left:0;z-index:0;margin:0;padding:0;border:solid 0 transparent;display:block;box-sizing:content-box !important;width:44px;height:17px;overflow:hidden;"),s=t||"",r=e||1,a=(n-21)*i+3,h=zt.createElement("img",V+F+"width:44px;height:17px;"),l=zt.createElement("span",N+"font-family:"+B+";position:relative;z-index:2;line-height:17px;color:#fff;font-size:11px;padding:0 4px 0 0;text-align:center;letter-spacing:-1px;");return h.src=D+"/zoom-legend-left-normal.png",h.alt="",l.innerHTML=s,o.appendChild(h),o.appendChild(l),o.style.top=a+i*(21-r)+"px",{zoom:r,element:o,imgEl:h,textEl:l}},_drawLegend:function(){var t=this._doms.legendInner,e=[],i=Pt(this._createLegendItem,this);t.innerHTML='

\uc9c0\ub3c4 \ucee8\ud2b8\ub864\ub7ec \ubc94\ub840

',o.forEach(this.__LEGEND_SCHEME__,function(n,o){var s=n[0],r=n[1],a=i(s,r);0===o&&(a.imgEl.src=a.imgEl.src.replace("-normal","-on")),a.zoom=r,e.push(a),t.appendChild(a.element)}),this.__legends__=e,this._adjustLegend()},_bindDOMEvent:function(){var t=(this.get("map"),this._doms),e=t.zoomIn,i=t.zoomOut,n=t.scaler,o=t.slider,s=Bt.addDOMListener,r=function(t){Rt.stop(t)};this._domListeners=[s(e,"click",r),s(i,"click",r),s(e,"mousedown",Pt(this._onClickZoomIn,this)),s(i,"mousedown",Pt(this._onClickZoomOut,this)),s(n,"mouseover",Pt(this._onMouseOver,this)),s(n,"mouseout",Pt(this._onMouseOut,this)),s(n,"mousedown",Pt(this._onMouseDownScaler,this)),s(o,"mousedown",Pt(this._onMouseDownSlider,this)),s(o,"click",r)]},_unbindDOMEvent:function(){Bt.removeDOMListener(this._domListeners),this._domListeners.length=0,this._domListeners=[]},_onClickZoomIn:function(t){Rt.stop(t);var e=this.getMap(),i=e.getZoom()+1;e.setZoom(i,!0)},_onClickZoomOut:function(t){Rt.stop(t);var e=this.getMap(),i=e.getZoom()-1;e.setZoom(i,!0)},_onMouseOver:function(){!this.get("legendDisabled")&&this.get("legendAllowed")&&(this._doms.legend.style.display="")},_onMouseOut:function(){!this.get("legendDisabled")&&this.get("legendAllowed")&&(this._doms.legend.style.display="none")},_onMouseDownScaler:function(t){t=Rt.fix(t),t.stop();var e,i=t.target||t.srcElement,n=t.pos(),o=this._doms.scaler,s=n.pageY-zt.getOffset(o).y;if(i!==this._doms.slider){e=Math.floor(s/this.SCALER_GAP);var r=this.getMap(),a=r.getZoom(),h=this.get("maxZoom")-e;h!==a&&r.setZoom(h,!0)}},_onMouseDownSlider:function(t){t=Rt.fix(t),t.stop();var e=this,i=this._doms.scaler,o=this.getMap(),s=[Bt.addDOMListener(n,"mousemove",function(t){t=Rt.fix(t),t.stop();var n,s=t.target||t.srcElement,r=t.pos(),a=r.pageY-zt.getOffset(i).y;s!==i&&s.parentNode!==i||(n=Math.floor((a+2)/e.SCALER_GAP),o.setZoom(e.get("maxZoom")-n,!0))}),Bt.addDOMListener(n,"mouseup",function(t){Bt.removeDOMListener(s),s=null})]},zoom_changed:function(t){var i,n=this.get("maxZoom");if(n!==e&&(i=n-t),!(t===e||n===e||i<0)){var o=this._doms,s=(this.getMap(),this.get("minZoom")),r=this.SCALER_GAP,a=i*r+4,h=o.zoomIn,l=o.zoomOut,c=o.zoomInImg,u=o.zoomOutImg;t===s?(l.style.cursor="default",c.src=c.src.replace("-dimmed","-normal"),u.src=u.src.replace("-normal","-dimmed")):t===n?(h.style.cursor="default",c.src=c.src.replace("-normal","-dimmed"),u.src=u.src.replace("-dimmed","-normal")):(h.style.cursor="pointer",l.style.cursor="pointer",c.src=c.src.replace("-dimmed","-normal"),u.src=u.src.replace("-dimmed","-normal")),o.slider.style.top=a+"px",o.scalerOff.style.height=a+"px"}},minZoom_changed:function(){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},maxZoom_changed:function(){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},mapTypeMinZoom_changed:function(t){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},mapTypeMaxZoom_changed:function(t){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},mapType_changed:function(t){var e=!t||"\xa9 NAVER Corp."!==t.vendor||t.projection!==o.EPSG3857;this.get("legendAllowed")===e&&this.set("legendAllowed",!e)},legendAllowed_changed:function(t){this._doms&&!t&&this.get("legendDisabled")&&zt.visible(this._doms.legend,!1)},style_changed:function(t){var e=this._doms;if(e&&e.wrap){var i=e.scaler,n=e.zoomIn,o=e.zoomInImg,s=e.zoomOut,r=e.zoomOutImg,a=22,h="block",l="solid 1px #cacdd1",c="-small",u="-large";t===_.SMALL&&(h="none",l="0 none",a=28,c="-large",u="-small"),i.style.display=h,n.style.height=a+"px",n.style.borderBottom=l,o.style.height=a+"px",o.height=a,o.src=o.src.replace(c,u),s.style.height=a+"px",r.style.height=a+"px",r.height=a,r.src=r.src.replace(c,u)}},_setScalerHeight:function(){var t=this.get("minZoom"),i=this.get("maxZoom"),n=this.get("mapTypeMaxZoom"),o=119;i!==e&&t!==e&&n!==e&&(o=(i-t)*this.SCALER_GAP+6,this._doms.scaler.style.height=o+"px",this._doms.scalerOn.style.height=o+"px",this._adjustLegend())},_adjustLegend:function(t){var e=this.getMap();if(!(!e||e.isCustomMapType&&e.isCustomMapType())){var i=t||this.get("position"),n=this.get("minZoom"),s=this.get("maxZoom");o.forEach(this.__legends__,function(t){var e=t.zoom,i=t.element;i.style.visibility=e>s||e',this._logoImg=i.getElementsByTagName("img")[0],i},mapType_changed:function(t){t&&(t.darktheme?this._logoImg.src=this._logoImg.src.replace("-normal-new.png","-dark-new.png"):this._logoImg.src=this._logoImg.src.replace("-dark-new.png","-normal-new.png"))}}),o.MapDataControl=function(t){this.DEFAULT_OPTIONS={position:f.BOTTOM_RIGHT},this.POPUP_PADDING=15,this._providers={},o.CustomControl.apply(this,arguments)},Ot(o.MapDataControl,o.CustomControl,{_afterSetMap:function(t){t?(this.bindTo("mapType",t),this.bindTo("size",t),this._listeners=[Bt.addListener(t,"addLayer",Pt(this._onAddLayer,this)),Bt.addListener(t,"removeLayer",Pt(this._onRemoveLayer,this)),Bt.addListener(t,"idle",Pt(this._onIdle,this))],t.getElement().appendChild(this._popupEl),this._syncToLayers(t.layers)):(this.unbind("mapType"),this.unbind("size"),Bt.removeListener(this._listeners),this._popupEl.parentElement.removeChild(this._popupEl))},_onIdle:function(){o.forEach(this._providers,function(t,e){t.checkValid()})},_createElement:function(){var t=this,e=function(){var t=zt.createElement("div","margin:0;padding:0 0 2px 10px;height:19px;line-height:19px;color:#444;font-family:"+B+";font-size:11px;clear:both;white-space:nowrap;pointer-events:none;");return t.className="map_copyright",t}();return t._viewMoreAnchor=function(){var e=zt.createElement("a","font-family:"+B+";font-size:11px;line-height: 19px;margin:0 0 0 5px;padding:0;color:#444;float:left;pointer-events:auto;text-decoration:underline;display:none;");return e.setAttribute("href","#"),zt.setText(e,"\ub354\ubcf4\uae30"),Bt.addDOMListener(e,"click",function(e){Rt.preventDefault(e),t._toggleViewMoreEl()}),e}(),t._popupEl=function(){var e=zt.createElement("div","border:1px solid #292930;background:#fff;padding:"+t.POPUP_PADDING+"px;color:#333;position:absolute;font-size:11px;max-width:350px !important;line-height:1.5;max-height:300px !important;clear:both;display:none"),i=zt.createElement("h5","font-size: 12px;margin-top: 0px;margin-bottom: 10px;"),n=zt.createElement("a","position:absolute;top:8px;right:8px;width:14px;height:14px;font-size:14px;line-height:14px;display:block;overflow:hidden;color:#444;text-decoration:none;font-weight:bold;text-align:center;"),o=zt.createElement("div");return zt.setText(i,"\uc9c0\ub3c4 \ub370\uc774\ud130"),n.setAttribute("href","#"),zt.setText(n,"x"),Bt.addDOMListener(n,"click",function(t){Rt.stop(t),zt.visible(e,!1)}),e.appendChild(i),e.appendChild(n),e.appendChild(o),e}(),e.appendChild(this._viewMoreAnchor),e},size_changed:function(t){this._layout(t),this._updatePopupSize()},mapType_changed:function(t){if(this.getMap()){var e=this._providers.basemap;e?e.setMapType(this.get("mapType")):this._providers.basemap=new o.MapDataProvider(this),this._adjColor(t),this._layout()}},_adjColor:function(t){var e=t,i="#444";e.darktheme&&(i="#fff"),this._element.style.color=i,this._viewMoreAnchor.style.color=i,o.forEach(this._providers,function(t,e){t.setColor(i)})},_syncToLayers:function(t){var e=this,i=t.getLayerNames();o.forEach(this._providers,function(t,n){if("basemap"!==n){var s=o.getIndexOfElement(i,n);s<0?e._removeProvider(n):i.splice(s,1)}}),o.forEach(i,function(i){e._addProvider(t.get(i))}),this._layout()},_addProvider:function(t){var e=t.get("name");this._providers[e]||(this._providers[e]=new o.MapDataProvider(this,t.getLayerType()))},_removeProvider:function(t){this._providers[t]&&(this._providers[t].setMapType(null),this._providers[t]=null,delete this._providers[t])},_onAddLayer:function(t){this._addProvider(t),this._layout()},_onRemoveLayer:function(t){this._removeProvider(t)},_layout:function(){var t=this.getMap().getSize(),e=t.width<300;zt.visible(this._viewMoreAnchor,e),o.forEach(this._providers,function(t,i){t.setVisible(!e)})},_toggleViewMoreEl:function(){zt.toggle(this._popupEl),this._updatePopupSize()},_updatePopupSize:function(){if(zt.visible(this._popupEl)){var t=this.getMap().getSize(),e=4*this.POPUP_PADDING;this._popupEl.style.width=o.round(t.width-e)+"px";var i=zt.getSize(this._popupEl),n=t.height/2-i.height/2,s=t.width/2-i.width/2;zt.setOffset(this._popupEl,Ct(o.round(s),o.round(n)))}},getElement:function(){return this._element},getPopupElement:function(){return this._popupEl}}),o.MapDataProvider=function(t,e){this._isBasemap=!1,this._items=[],this._control=t,e||(this._isBasemap=!0,e=t.get("mapType")),this._createElement(),this.setMapType(e)},Ot(o.MapDataProvider,o.KVO,{_createElement:function(){var t=this._control.getElement();this._isBasemap&&(this._vendorElement=zt.createElement("div","float:left"),t.insertBefore(this._vendorElement,t.firstChild)),this._element=zt.createElement("div","float:left"),t.appendChild(this._element)},setMapType:function(t){this.set("mapType",t)},setVisible:function(t){zt.visible(this._element,t)},setColor:function(t){o.forEach(this._items,function(e){e.el.style.color=t}),this._vendorElement&&(this._vendorElement.firstChild.style.color=t)},mapType_changed:function(t){t?(this._isBasemap&&this._removeItemElements(),this._create(t),this.checkValid()):this._destroy()},_create:function(t){var e=t,i=n.createDocumentFragment(),s=n.createDocumentFragment(),r=this._control.getPopupElement().getElementsByTagName("div")[0];if(o.forEach(e.provider,Pt(function(t,e){var n=this._createItemElements(t),r=t.bounds&&[];if(t.bounds){!o.getLiteralType(t.bounds)&&t.bounds.length?o.forEach(t.bounds,function(t){r.push(o.box(t))}):r=[o.box(t.bounds)]}this._items.push({el:n[0],cloneEl:n[1],bounds:r,exclude:t.exclude}),i.appendChild(n[0]),s.appendChild(n[1])},this)),this._isBasemap){var a=this._createItemElements({title:t.vendor||""});this._items.push({el:a[0],cloneEl:a[1]}),this._vendorElement.appendChild(a[0]),s.insertBefore(a[1],s.firstChild),r.insertBefore(s,r.firstChild)}else r.appendChild(s);this._element.appendChild(i)},_createItemElements:function(t){var e,i;return t.link?(e=zt.createElement("a","pointer-events:auto;white-space:pre;"),e.setAttribute("target","_blank"),e.setAttribute("href",t.link)):e=zt.createElement("span","white-space:pre;"),Lt.browser.msie&&(e.style.opacity="0.99"),i=e.cloneNode(),i.style.color="#444",i.style.float="left",zt.setText(e,t.title),zt.setText(i,t.title),[e,i]},_removeItemElements:function(){o.forEach(this._items,function(t){zt.removeElement(t.el),zt.removeElement(t.cloneEl),t=null}),this._items.length=0,this._items=[]},checkValid:function(){var t=this._control.getMap().getBounds();o.forEach(this._items,function(e){var i=!1;e.bounds&&(o.forEach(e.bounds,function(n){var o=null;o=n instanceof kt?It.bounds(n.getSW(),n.getNE()):n,i=e.exclude?!o.hasBounds(t):o.intersects(t)}),zt.visible(e.el,i),zt.visible(e.cloneEl,i))})},_destroy:function(){this._removeItemElements(),zt.removeElement(this._element),this._isBasemap&&zt.removeElement(this._vendorElement),this._items=null,delete this._items}}),o.ScaleControl=function(t){this._IMG_SCALE=[D+"/new-scale-normal-l.png",D+"/new-scale-normal-b.png",D+"/new-scale-normal-r.png"],this._SCALE_SIZE=50,this._MAX_SCALE_SIZE=100,this._textEl=null,this._textShadowCss="-1px 0 rgba(255, 255, 255, 0.8), 0 1px rgba(255, 255, 255, 0.8), 1px 0 rgba(255, 255, 255, 0.8), 0 -1px rgba(255, 255, 255, 0.8)",this.DEFAULT_OPTIONS={position:f.BOTTOM_RIGHT},o.CustomControl.apply(this,arguments)},Ot(o.ScaleControl,o.CustomControl,{getScaleText:function(){var t=this._textEl;return t?t.innerHTML:""},_afterSetMap:function(t){if(t){var e=t.getMapModel();this.bindTo(["mapTypeMinZoom","mapTypeMaxZoom","mapSystemProjection","projection","tileSize"],e),this.bindTo(["zoom","center","mapType"],t)}else this.unbind(["mapTypeMinZoom","mapTypeMaxZoom","projection","tileSize","zoom","center","mapType"])},zoom_changed:function(){this._update()},center_changed:function(){this.get("map");this.get("projection").pointPerMeter||this._update()},projection_changed:function(){this.get("mapSystemProjection")&&(this._calcPointPerMeter(),this._update())},tileSize_changed:function(){this.get("mapSystemProjection")&&(this._calcPointPerMeter(),this._update())},mapType_changed:function(t){if(t){var e="#222225",i=this._textShadowCss,n="-dark-",s="-normal-";t.darktheme&&(e="#fff",i=i.replace(/rgba\(255, 255, 255, 0\.8/g,"rgba(48, 48, 51, 0.8"),n="-normal-",s="-dark-"),this._textEl.style.color=e;try{this._textEl.style.textShadow=i}catch(t){}o.forEach(this._barEls,function(t){t.src=t.src.replace(n,s)})}},_calcPointPerMeter:function(t,e){var i=t||this.get("projection"),n=e||this.get("tileSize");if(i&&n){if(!i.name||i.name.indexOf("EPSG:3857")>-1||!i.pointPerMeter)return void(this._pointPerMeter=null);var o=n.width,s=256/o;this._pointPerMeter=i.pointPerMeter*s}},_update:function(){var t,e=this.get("map"),i=e.getZoom(),n=this.get("projection"),s=this.getElement(),r=this._barEls[1],a=parseInt(s.style.width,10),h=52,l=h-6;if(o.useGL()&&(i+=1),"UTMK_NAVER"===n.name||"UTMK"===n.name){a!==h&&(s.style.width=h+"px",r.style.width=l+"px");var c=this._calcMeterPerPixel(i);t=this._SCALE_SIZE*c}else{var u=this._calcMeterPerPixel(i,this._MAX_SCALE_SIZE);t=this._getRoundNum(u),h=Math.round(this._MAX_SCALE_SIZE*(t/u)),l=h-6,s.style.width=h+"px",r.style.width=l+"px",r.width=l}t=this._addUnitToDistance(t),zt.setText(this._textEl,t)},_addUnitToDistance:function(t){return t=t>1e3?o.round(t/100)/10+"km":o.round(10*t)/10+"m"},_calcMeterPerPixel:function(t,e){var i=this.get("map"),n=this.get("projection"),s=this.get("mapSystemProjection"),r=0;if(this._pointPerMeter)r=this._pointPerMeter/s.scaleUp(1,t);else{var a=i.getCenterPoint(),h=s.scaleUp(a.clone(),t),l=s.scaleDown(new o.Point(h.x+e,h.y),t),c=s.fromPointToCoord(a),u=s.fromPointToCoord(l);r=n.getDistance?n.getDistance(c,u):0}return r},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i},_createElement:function(){var t="position:absolute;left:0;bottom:0;z-index:2;display:block;width:3px;height:8px;overflow:hidden;margin:0;padding:0;border:0 none;"+F,e="text-shadow:"+this._textShadowCss+";",i=this._IMG_SCALE,n=zt.createElement("div","position:relative;width:52px;height:14px;margin:0 12px 6px 2px;overflow:hidden;");n.innerHTML=["",'','',''].join(""),this._textEl=n.getElementsByTagName("span")[0];var o=n.getElementsByTagName("img");return this._barEls=[o[1],o[0],o[2]],n}}),o.DrawingUtil={getDrawingType:function(){if(!this._drawingType){var t="NONE";this.isSupportedSVG()?t="SVG":this.isSupportedVML()&&(t="VML"),this._drawingType=t}return this._drawingType},isSupportedSVG:function(){return n.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")},isSupportedVML:function(){if(this.__isSupportedVML===e){var t=n.createElement("div");t.innerHTML='';var i=t.firstChild;i.style.behavior="url(#default#VML)",this.__isSupportedVML=!i||"object"==typeof i.adj}return this.__isSupportedVML},isSupportedCanvas:function(){if(this.__isSupportedCanvas===e){var t=n.createElement("canvas");this.__isSupportedCanvas=!(!t.getContext||!t.getContext("2d"))}return this.__isSupportedCanvas},getBounds:function(t){var e,i,n,o=t.length,s=1/0,r=1/0,a=-1/0,h=-1/0;for(e=0;eh&&(s=r,h=a);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var o,s=e.x,r=e.y,a=i.x-s,h=i.y-r,l=a*a+h*h;return l>0&&(o=((t.x-s)*a+(t.y-r)*h)/l,o>1?(s=i.x,r=i.y):o>0&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new L.Point(s,r)}},o.shapes={},o.shapes.Shape=function(t){this.options=wt({},this.options,t),this.element=this._initShape(),this._updateShape(),this._updateStyle()},o.shapes.Shape.prototype={constructor:o.shapes.Shape,setOptions:function(t){this.options=wt(this.options,t),this.isShapeChanged(t)&&this._updateShape(),this.isStyleChanged(t)&&this._updateStyle()},_initShape:function(){return null},_updateShape:St,_updateStyle:function(){var t=this.getElement(),e=this.options;zt.setZIndex(t,e.zIndex),zt.visible(t,e.visible)},_calcBounds:function(t,e,i,n,s){return 0===t&&0===e&&0===i&&0===n?{x:0,y:0,w:0,h:0}:{x:o.round(t-s),y:o.round(e-s),w:o.round(i+2*s),h:o.round(n+2*s)}},getElement:function(){return this.element},getShapeElement:function(){return this._shapeElement||this.element||null}},function(){if(o.shapes.CommonShape={isStyleChanged:function(t){return t.strokeColor!==e||t.strokeOpacity!==e||t.strokeWeight!==e||t.strokeStyle!==e||t.strokeLineCap!==e||t.strokeLineJoin!==e||t.fillColor!==e||t.fillOpacity!==e||t.visible!==e||t.zIndex!==e},toPathString:function(t){var e=[];if(0===t.length)return"";e.push("M");for(var i=0,n=t.length;i1?r:0),i&&l>1&&(h%2==0?s=Math.max(1,s-r):s*=2),n[h]=s;n=n.join(",")}return n=n||this.DASH_STYLE.solid,"0"===n?null:n},_getLineCap:function(t){var e=(t||"").toLowerCase(),i=["flat","butt","round","square"];return o.getIndexOfElement(i,e)>-1?("flat"===e&&(e="butt"),e):null},_getLineJoin:function(t){var e=(t||"").toLowerCase(),i=["miter","round","bevel"];return o.getIndexOfElement(i,e)>-1?e:null},_setOutlineWeight:function(t){this.__outlineWeight=t,this._updateStyle()}}))}(),function(){o.DrawingUtil.isSupportedSVG()&&(o.shapes.CircleSVG=function(t){o.shapes.ShapeSVG.call(this,t)},Ot(o.shapes.CircleSVG,o.shapes.ShapeSVG,[o.shapes.CommonShape.circle],{setCenter:function(t){this.options.center=t,this._updateShape(),this._setBounds()},setRadius:function(t){this.options.radius=t,this._updateShape(),this._setBounds()},_updateShape:function(){var t=this.options,e=t.radius,i=t.center.x-e,n=t.center.y-e;this._shapeElement.setAttribute("d",["M",i,n+e,"A",e,e,0,1,0,i,n+e-1,"Z"].join(" "))},_calcBoundsFromOptions:function(){var t=this.options,e=t.radius,i=t.center.x-e,n=t.center.y-e,o=2*e,s=o,r=t.strokeWeight;return this._calcBounds(i,n,o,s,r)}}),"SVG"===o.DrawingUtil.getDrawingType()&&(o.shapes.Circle=o.shapes.CircleSVG))}(),function(){o.DrawingUtil.isSupportedSVG()&&(o.shapes.ClosedPathSVG=function(t){o.shapes.ShapeSVG.call(this,t),this._shapeElement.setAttribute("stroke-linejoin","round")},Ot(o.shapes.ClosedPathSVG,o.shapes.ShapeSVG,[o.shapes.CommonShape.closedPath],{setPath:function(t,e,i,n){var o=this.options;o.paths=t,o.minBoundPoint=e,o.maxBoundPoint=i,this._updateShape(n),this._setBounds()},_updateShape:function(t){for(var e,i=[],n=this.options.paths,s=0,r=n.length;s9&&this._forceRender()},_setIconShape:function(t,e,i){if(t){var n,o,s=t.childNodes[0],r=10,a=[0,0,r,r],h=[[Ct(r,r),Ct(0,5),Ct(r,0)],[Ct(0,0),Ct(r,5),Ct(0,r)]],l=[["M",0,5,"A",5,5,0,1,0,0,4.99],[Ct(0,5),Ct(5,r),Ct(r,5),Ct(5,0)]],c=5;switch(e){case T.OPEN_ARROW:var u=0===i?-1:1;n=h[i],n[0].x=n[0].y+=u,n[1].x-=2*u,n[2].x+=u,n[2].y-=u,c=n[1].x-2*u,o=this.toPathString(n);break;case T.BLOCK_ARROW:n=h[i],o=this.toPathString(n)+" Z";break;case T.CIRCLE:n=l[0],o=n.join(" ")+" Z";break;case T.DIAMOND:n=l[1],o=this.toPathString(n)+" Z"}s.setAttribute("d",o),t.setAttribute("viewBox",a.join(" ")),t.setAttribute("refX",c),t.setAttribute("refY",5)}},_setIconSize:function(){var t=function(t,e,i){t&&(i?t.setAttribute("markerUnits","userSpaceOnUse"):(t.setAttribute("markerUnits","strokeWidth"),i=e===T.OPEN_ARROW?5:3),t.setAttribute("markerWidth",i),t.setAttribute("markerHeight",i))};t(this._startIcon,this.options.startIcon,this.options.startIconSize),t(this._endIcon,this.options.endIcon,this.options.endIconSize)},_updateIconsStyle:function(){var t=this.options.strokeColor,e=function(e,i){var n="";e&&(n=i<2?"fill:none; stroke-width:2px; stroke-linecap:round; stroke:"+t+";":"fill:"+t+"; stroke:none;",e.childNodes[0].setAttribute("style",n))};e(this._startIcon,this.options.startIcon),e(this._endIcon,this.options.endIcon)},_addMarker:function(t){var e=o.guid(),i=this._makeSVGTag("marker"),n=this._makeSVGTag("path"),s=0===t?"marker-start":"marker-end";return i.setAttribute("id",e),i.setAttribute("orient","auto"),i.appendChild(n),this._defsElement.appendChild(i),this._shapeElement.setAttribute(s,"url(#"+e+")"),i},_removeMarker:function(t,e){var i=0===e?"marker-start":"marker-end";this._shapeElement.removeAttribute(i),this._defsElement.removeChild(t)},setPath:function(t,e,i,n){var o=this.options;o.path=t,o.minBoundPoint=e,o.maxBoundPoint=i,this._updateShape(n),this._setBounds()},_updateShape:function(t){var e=o.LineUtil.simplify(this.options.path,t),i=this.toPathString(e);i||(i="M 0 0"),this._shapeElement.setAttribute("d",i),this._defsElement&&o.Agent.browser.msie&&o.Agent.browser.version>9&&this._forceRender()},_forceRender:function(){var t=this.getElement();t&&t.parentNode&&t.parentNode.insertBefore(t,t)},_calcBoundsFromOptions:function(){var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,s=Math.abs(i.x-n),r=Math.abs(i.y-o),a=t.strokeWeight;return this._calcBounds(n,o,s,r,a)}}),"SVG"===o.DrawingUtil.getDrawingType()&&(o.shapes.Path=o.shapes.PathSVG)}}(),function(){o.DrawingUtil.isSupportedSVG()&&(o.shapes.RectangleSVG=function(t){o.shapes.ShapeSVG.call(this,t)},Ot(o.shapes.RectangleSVG,o.shapes.ShapeSVG,[o.shapes.CommonShape.rectangle],{setBounds:function(t,e){var i=this.options;i.minBoundPoint=t,i.maxBoundPoint=e,this._updateShape(),this._setBounds()},_updateShape:function(){var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,s=Math.abs(i.x-n),r=Math.abs(i.y-o);this._shapeElement.setAttribute("d",["M",n,o,"L",n+s,o,n+s,o+r,n,o+r,"Z"].join(" "))},_calcBoundsFromOptions:function(){var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,s=Math.abs(i.x-n),r=Math.abs(i.y-o),a=t.strokeWeight;return this._calcBounds(n,o,s,r,a)}}),"SVG"===o.DrawingUtil.getDrawingType()&&(o.shapes.Rectangle=o.shapes.RectangleSVG))}(),function(){o.DrawingUtil.isSupportedSVG()&&(o.shapes.EllipseSVG=function(t){o.shapes.ShapeSVG.call(this,t)},Ot(o.shapes.EllipseSVG,o.shapes.RectangleSVG,{_updateShape:function(){var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,s=Math.abs(i.x-n)/2,r=Math.abs(i.y-o)/2;this._shapeElement.setAttribute("d",["M",n,o+r,"A",s,r,0,1,0,n,o+r-1,"Z"].join(" "))}}),"SVG"===o.DrawingUtil.getDrawingType()&&(o.shapes.Ellipse=o.shapes.EllipseSVG))}(),function(){if(o.DrawingUtil.isSupportedVML()){try{n.namespaces.add("v","urn:schemas-microsoft-com:vml");var t=n.createElement("style"),e=n.getElementsByTagName("head")[0];e.insertBefore(t,e.firstChild.firstChild);var i=t.styleSheet,s="behavior: url(#default#VML);";i.addRule("v\\:shape",s),i.addRule("v\\:path",s),i.addRule("v\\:fill",s),i.addRule("v\\:stroke",s)}catch(t){}o.shapes.ShapeVML=function(t){o.shapes.Shape.call(this,t)},Ot(o.shapes.ShapeVML,o.shapes.Shape,{setOptions:function(t){this.options=wt(this.options,t),this._updateShape()},_initShape:function(){var t=zt.createElement("v:shape","position:absolute;width:1px;height:1px;margin:0;padding:0;border:0;"),e=zt.createElement("v:path"),i=zt.createElement("v:fill"),n=zt.createElement("v:stroke");t.setAttribute("coordorigin","0 0"),t.setAttribute("coordsize","1 1"),i.setAttribute("on",!1),n.setAttribute("on",!1),t.appendChild(e),t.appendChild(i),t.appendChild(n),this._shapeElement=t,this._pathElement=e,this._fillElement=i,this._strokeElement=n;var o=zt.createElement("div","position:absolute;overflow:visible;margin:0;padding:0;border:0;top:0;left:0;");return o.appendChild(t),o},_updateShape:function(){},_updateStyle:function(){var t=this.options;if(!o.isEmptyObject(t)){var e=this._strokeElement,i=this._fillElement;if("none"==t.strokeColor)e.on=!1;else{e.on=!0,e.color=t.strokeColor||"transparent",e.weight=t.strokeWeight+"px",e.opacity=t.strokeOpacity;var n=this._getLineCap(t.strokeLineCap),s=this._getLineJoin(t.strokeLineJoin),r=this._getDashStyle(t.strokeStyle);n&&(e.endcap=n),s&&(e.joinstyle=s),r&&(e.dashstyle=r)}"none"==t.fillColor?i.on=!1:(i.on=!0,i.color=t.fillColor||"transparent",i.opacity=t.fillOpacity),o.shapes.Shape.prototype._updateStyle.call(this)}},_getDashStyle:function(t){if(!t)return null;return o.isArray(t)?t.join(" "):t},_getLineCap:function(t){var e=(t||"").toLowerCase(),i=["flat","butt","square","round"];return o.getIndexOfElement(i,e)>-1?("butt"===e&&(e="flat"),e):null},_getLineJoin:function(t){var e=(t||"").toLowerCase(),i=["miter","round","bevel"];return o.getIndexOfElement(i,e)>-1?e:null}})}}(),function(){o.DrawingUtil.isSupportedVML()&&(o.shapes.CircleVML=function(t){o.shapes.ShapeVML.call(this,t)},Ot(o.shapes.CircleVML,o.shapes.ShapeVML,[o.shapes.CommonShape.circle],{setCenter:function(t){this.options.center=t,this._updateShape()},setRadius:function(t){this.options.radius=t,this._updateShape()},_updateShape:function(){this._updateStyle();var t=this.options,e=t.radius,i=2*e,n=t.center.x-e,o=t.center.y-e;this._pathElement.v=["AR",n,o,n+i,o+i,"0 0 0 0 X E"].join(" ")}}),"VML"===o.DrawingUtil.getDrawingType()&&(o.shapes.Circle=o.shapes.CircleVML))}(),function(){o.DrawingUtil.isSupportedVML()&&(o.shapes.ClosedPathVML=function(t){o.shapes.ShapeVML.call(this,t)},Ot(o.shapes.ClosedPathVML,o.shapes.ShapeVML,[o.shapes.CommonShape.closedPath],{setPath:function(t,e,i,n){var o=this.options;o.paths=t,o.minBoundPoint=e,o.maxBoundPoint=i,this._updateShape(n)},_updateShape:function(t){this._updateStyle();for(var e,i=[],n=this.options.paths,s=0,r=n.length;s1||!Lt.touchablePC&&!Lt.mobile&&1!==t.domEvent.which)){this.animation&&this.stopTransition(),this._dListener=[Bt.addDOMListener(g,this.EVENT_NAME.move,Pt(this._onMouseMove,this),{passive:!1}),Bt.addDOMListener(g,this.EVENT_NAME.up,Pt(this._onMouseUp,this))],Lt.touchablePC&&(this._dListener.push(Bt.addDOMListener(g,"touchmove",Pt(this._onMouseMove,this),{passive:!1})),this._dListener.push(Bt.addDOMListener(g,"touchend",Pt(this._onMouseUp,this))));var e=t.pointerEvent.pos(),i=t.point,n=Ct(e.pageX,e.pageY),o=zt.getOffset(this._wrapper);this._deltaMouseToMarker=n.sub(o),this._startMousePoint=i,this._startPageXY=n,this._dragReady=!0}},_onMouseMove:function(t){if(this._dragReady){t=Rt.fix(t),Rt.preventDefault(t);var e=t.pos(),i=Ct(e.pageX,e.pageY);if(this._isMoved(i)){var n=this._getDraggablePointerEvent(t),o=i.sub(this.getMapOffset()).sub(this._deltaMouseToMarker);this._dragStarted||(this._prevCursor=this.cursor,this.set("cursor","url('"+D+"/closedhand.cur'), default"),Bt.trigger(this,"dragstart",n),this._detachToMarkerPane(),this._dragStarted=!0),zt.setOffset(this._wrapper,o),this._detectDirection(o),this._prevCoord=n.coord,Bt.trigger(this,"drag",n)}}},_onMouseUp:function(t){if(this._dragReady){t=Rt.fix(t),Rt.stopPropagation(t), Bt.removeDOMListener(this._dListener),this._panningTran.isRunning()&&this._panningTran.stop();var e=this._getDraggablePointerEvent(t),i=e.coord,n=this.getMap();this._dragStarted?(this._dragStarted=null,n.getBounds().hasPoint(i)||n.setCenter(i),this._attachToMarkerPane(),this.set("position",i),this.set("cursor",this._prevCursor),this._prevCoord=i,this._prevCursor=null,this._dragReady=null,Bt.trigger(this,"dragend",e)):this.draw()}},_detachToMarkerPane:function(){zt.addElement(this._wrapper,this.getMap().getElement())},_attachToMarkerPane:function(){zt.addElement(this._wrapper,this.getPanes().overlayImage)},_detectDirection:function(t){var e=this._keyInfo,i=this._panningTran,n=i.isRunning(),o=this.get("mapSize"),s=this.THRESHOLD,r=t.x,a=t.y,h=r>=o.width-s,l=r<=0+s,c=a>=o.height-s,u=a<=0+s;e[39]=h,e[37]=l,e[40]=c,e[38]=u,!n&&(h||l||c||u)&&i.run({weight:1},{weight:40},{infinity:!0}),!n||h||l||c||u||i.stop()},_getXFactor:function(){var t=0,e=this._keyInfo;return e[37]&&(t-=1),e[39]&&(t+=1),t},_getYFactor:function(){var t=0,e=this._keyInfo;return e[38]&&(t-=1),e[40]&&(t+=1),t},_onPanningTransition:function(t){var e=t.progress,i=this._getXFactor(),n=this._getYFactor(),o=e.weight,s=Ct(i*o,n*o);this.getMap().panBy(s)},_isMoved:function(t){return o.Math.distance(this._startPageXY,t)>=5},_getDraggablePointerEvent:function(t){var e=t.pos(),i=Ct(e.pageX,e.pageY),n=this._calcNewMarkerCoordinates(i),o=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t;return{offset:n.offset,point:n.point,coord:n.coord,pointerEvent:o,domEvent:o,originalEvent:o,overlay:this}},_calcNewMarkerCoordinates:function(t){var e=this.getProjection(),i=t.sub(this.getMapOffset()).sub(this.get("containerTopLeft")),n=e.fromOffsetToPoint(i),o=this.getPosition(),s=e.fromCoordToPoint(o),r=n.sub(this._startMousePoint),a=s.add(r);return{offset:e.fromPointToOffset(a),point:a,coord:e.fromPointToCoord(a)}}},o.Marker=function(t){this.OVERLAY_TYPE="Marker",this.DEFAULT_OPTIONS={icon:null,shape:null,cursor:"pointer",clickable:!0,draggable:!1,position:null,map:null,title:"",visible:!0,zIndex:null,simplifyLevel:1,animation:null},this._wrapper=this._createWrapper(),this.set("_nmarker_id","nmarker-"+o.guid()),this.setOptions(wt({},this.DEFAULT_OPTIONS,t))},Ot(o.Marker,o.OverlayView,[o.MarkerAnimation,o.MarkerDraggble],{setOptions:function(t){var e=this;if("string"==typeof t){var i=t,n=arguments[1],s="set"+o.capitalize(i);if("shadow"===t)return void o.console.once("[DEPRECATED] The 'shadow' option of naver.maps.Marker is DEPRECATED.\nnaver.maps.Marker\uc758 'shadow' \uc635\uc158\uc740 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.");e[s]?e[s](n):e.set(i,n)}else o.forEach(t,function(t,i){"map"!==i&&e.setOptions(i,t)}),t.map&&this.setMap(t.map)},setShadow:function(){o.console.info("[DEPRECATED] The 'setShadow' method is DEPRECATED.\n'setShadow' \uba54\uc11c\ub4dc\ub294 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.")},getShadow:function(){o.console.info("[DEPRECATED] The 'getShadow' method is DEPRECATED.\n'getShadow' \uba54\uc11c\ub4dc\ub294 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.")},getOptions:function(t){var e=this,i={};return t?this.get(t):(o.forEach(this.DEFAULT_OPTIONS,function(t,n){i[n]=e.get(n)}),i)},setPosition:function(t){this.set("position",o.box(t)),this._updateGL()},setIcon:function(t){this.set("icon",t)},getDrawingRect:function(){var t=this._icon.size,e=this._icon.anchor,i=this._toPixelPoint(this.position);if(!t)return It.bounds(i.clone(),i.clone());var n=new Ct(i.x-e.x,i.y-e.y),o=new Ct(i.x+t.width-e.x,i.y+t.height-e.y);return It.bounds(n,o)},toGeometry:function(){return{type:H,coordinates:o.DataUtil.toPoint(this.getPosition()),mantle_properties:this._getMantleProperties()}},getWrapElement:function(){return this._wrapper},getElement:function(){return this._wrapper},_toPixelPoint:function(t){return this.getProjection().fromCoordToPixelPoint(t)},getAnchor:function(){if(this._icon)return this._icon.anchor},getSize:function(){if(this._icon)return this._icon.size},onAdd:function(){var t=this._getPaneName(),e=this.getPanes()[t],i=this.getMap().getMapAction();e.appendChild(this._wrapper),this._addWrapListener(this._wrapper),this._addListener(this.eventTarget),this.bindTo("ef_overlayImage",i),this._onAddGL()},onRemove:function(){this.unbind("ef_overlayImage"),this._removeListener(),this._removeWrapListener(this._wrapper),zt.removeElement(this._wrapper),this.stopTransition(),this._onRemoveGL()},_zIndex_changed:function(t){(0===t||t)&&zt.setZIndex(this._wrapper,t)},_visible_changed:function(t){zt.visible(this._wrapper,!!t)},_position_changed:function(){this.draw()},_title_changed:function(t){this._wrapper.title=t},_clickable_changed:function(t){this.eventTarget&&(this._wrapper.__clickable=!!t,this.eventTarget.__clickable=!!t,this._icon.getElement().__clickable=!!t,this.set("cursor",this.cursor))},_cursor_changed:function(t){if(this.eventTarget){var e=this._getCursorState(t||"pointer"),i=this._icon.getElement();this._icon.isSymbol?(this._wrapper.style.cursor="inherit",this.eventTarget.style.cursor=e,i.style.cursor=e):(this._wrapper.style.cursor="inherit",i.style.cursor="inherit",this.eventTarget.style.cursor=e)}},_draggable_changed:function(t){this._updateDraggable(t)},_shape_changed:function(t){this.updateShape(t)},_equalsIgnoreKey:function(t,i,n){for(var o in t)if(t.hasOwnProperty(o)){if(o===n)continue;var s=t[o],r=i?i[o]:e;if(s&&s.equals){if(!1===s.equals(r))return!1}else if(!1===Et.equals(s,r))return!1}return!0},_icon_changed:function(t){var e=o.boxToIcon(t);if(!o.equals(e,this._beforeBoxedIcon)){if(this._icon&&this._icon.type===G.image&&!o.equals(e.origin,this._beforeBoxedIcon.origin)&&this._equalsIgnoreKey(e,this._beforeBoxedIcon,"origin")){var i=e.origin?e.origin.clone().mul(-1,-1):o.Point(0,0);return zt.setOffset(this._icon.getElement(),i),void(this._beforeBoxedIcon=e)}this._icon&&this._icon.type===G[e.type]||(this._icon&&(this._removeFromWrapper(this._icon.getElement()),this._icon.destroy()),this._icon=new(o[o.capitalize(e.type)+"Icon"])),this._beforeBoxedIcon=e,this._icon.update(e,o.bind(this._icon_loaded,this))}},_icon_loaded:function(){this._icon.type===G.html?this._wrapper.style.overflow="visible":(zt.setSize(this._wrapper,this._icon.size),this._wrapper.style.overflow="hidden"),this._transformOriginX=this._icon.anchor.x/this._icon.size.width*100,this._transformOriginY=this._icon.anchor.y/this._icon.size.height*100,this.draw(),this._addToWrapper(this._icon.getElement()),this.updateShape(this.shape),this._updateGL(),Bt.trigger(this,"icon_loaded",this)},draw:function(){if(this.map&&this.position&&this._icon.anchor&&!this._dragStarted){var t=this.getProjection(),e=this.position,i=t.fromCoordToOffset(e);i&&i instanceof Ct&&i.round(),this.stopTransition(),this.animation?this.startTransition(this._wrapper,i,this._icon.anchor,this.animation):zt.setOffsetWithAnchor(this._wrapper,i,this._icon.anchor),this.get("ef_overlayimage")&&zt.transform(this._wrapper,1,0,0,{x:0,y:0})}},scale:function(t){this.getMap()&&this.get("ef_overlayimage")&&this._transformOriginX&&this._transformOriginY&&zt.setScaleByPercent(this._wrapper,1/t,{x:this._transformOriginX,y:this._transformOriginY},!0)},updateShape:function(t){this._icon.getElement()&&(this.icon||this.shape||(t=W),t?(this._updateMaskTarget(),this._updateMask(t),this._updateAccessibility(),this._setEventTarget(this._mask.childNodes[0])):(this._removeMaskTarget(),this._removeMask(),this._icon.isSymbol?this._setEventTarget(this._icon.getShapeElement()):this._setEventTarget(this._icon.getElement())))},_updateMaskTarget:function(){this._dummImg||(this._dummImg=this._createDummImg()),this._addToWrapper(this._dummImg),zt.setSize(this._dummImg,this._icon.size),this._dummImg.useMap="#"+this._nmarker_id},_updateMask:function(t){this._mask||(this._mask=this._createShapeMap(t),this._addToWrapper(this._mask));var e=this._mask.getElementsByTagName("area")[0];e.shape=t.type,e.coords=t.coords},_updateAccessibility:function(){this._mask.getElementsByTagName("area")[0].alt="\ub9c8\ucee4\uc758 \uacbd\uc704\ub3c4\ub294 "+o.DataUtil.toPoint(this.getPosition())+" \uc785\ub2c8\ub2e4."},_removeMaskTarget:function(){this._removeFromWrapper(this._dummImg),this._dummImg=null},_removeMask:function(){this._mask&&(this._removeFromWrapper(this._mask),delete this._mask)},_addToWrapper:function(t){this._wrapper&&this._wrapper.appendChild(t)},_removeFromWrapper:function(t){if(this._wrapper)try{this._wrapper.removeChild(t)}catch(t){}},_setEventTarget:function(t){this.eventTarget!==t&&(this.eventTarget=t,this.set("clickable",this.clickable),this._removeListener(),this._addListener(this.eventTarget),this._updateDraggable(this.draggable))},_updateDraggable:function(t){t?this._enableDrag():this._disableDrag()},_getCursorState:function(t){return t=t||this.cursor,this.clickable?t||"pointer":"inherit"},_createWrapper:function(){var t=["position:absolute;","overflow:hidden;","box-sizing:content-box !important"].join("");return zt.createElement("div",t)},_createDummImg:function(){var t=zt.createElement("img","position:absolute;border:0;left:0px;top:0px;"+F);return zt.disableSelection(t),t.src=z,t.alt="",t},_createShapeMap:function(t){var e=zt.createElement("map"),i=zt.createElement("area","display: block"),n=this;return e.name=this._nmarker_id,i.href="#",i.onclick=function(t){return Rt.preventDefault(t),!1},(Lt.browser.msie||Lt.browser.edge)&&(i.onmouseover=function(t){if(!n.__hover){n._getListener("mouseenter")(t)}n._dummImg.style.cursor=n._getCursorState()},i.onmouseout=function(t){n._getListener("mouseleave")(t),n._dummImg.style.cursor=""}),e.appendChild(i),e},_addListener:function(t){if(t&&(this.clickable||this.draggable))for(var e,i=0,n=p.length;i=13,r="ipad"===Lt.device&&Lt.naverApp,a=s||r;return e=o.Agent.mobile?function(t,e){var n,s,r;switch(t){case"click":n=i._getSingleClickType(e);break;case"touchstart":a&&(i.__ct__=o.now());break;case"touchend":a&&(r=i.__ct__?o.now()-i.__ct__:250,s=r<250&&i._getSingleClickType(e))}return[n||t,s]}:function(t,e){var s,r=t,a=i._dragStarted;switch(t){case"mouseenter":case"mouseover":if(a||i.__hover)return;i.__hover=!0;break;case"mouseleave":case"mouseout":if(a||!i.__hover)return;i.__hover=null;break;case"mousedown":i.__dp__={x:e.pageX,y:e.pageY};break;case"click":if(a)return;r=o.Math.distance(i.__dp__,{x:e.pageX,y:e.pageY})<4?i._getSingleClickType(e):null;break;case"mouseup":n&&(s=i._getSingleClickType(e,n))}return[void 0,r,s]},function(n){if(i.map&&i.clickable){var s=Rt.fix(n),r=i._getPointerEvent(s),a=e(t,s);o.forEach(a,function(t){t&&Bt.trigger(i,E[t]||t,r)})}}},_getPointerEvent:function(t){if(!t)return this._fromCoordToPointerEvent(this.getPosition());var e=t.pos(),i=Ct(e.pageX,e.pageY),n=this.getProjection(),o=this.get("containerTopLeft"),s=this.getMapOffset(),r=Ct(i.x-s.x,i.y-s.y).sub(o),a=n.fromOffsetToPoint(r),h={offset:r,point:a,coord:n.fromPointToCoord(a),pointerEvent:t,domEvent:t,originalEvent:t,overlay:this};return this.get("tileRepeatX")&&(h.point=n.fromCoordToPoint(h.coord)),h},_getPaneName:function(){return this.get("pane")||"overlayImage"},_updateGL:St,_onAddGL:St,_onRemoveGL:St}),o.forEach(["position","icon","shape","cursor","clickable","draggable","title","visible","zIndex","animation"],function(t){var e=o.capitalize(t),i="set"+e,n="get"+e;o.Marker.prototype[i]||(o.Marker.prototype[i]=function(){this.get(t)!==arguments[0]&&this.set(t,arguments[0])}),o.Marker.prototype[n]||(o.Marker.prototype[n]=function(){return this.get(t)})}),o.InfoWindow=function(t){this.DEFAULT_OPTIONS={position:null,zIndex:0,maxWidth:0,pixelOffset:Ct(0,0),backgroundColor:"#fff",borderColor:"#333333",borderWidth:1,disableAutoPan:!1,disableAnchor:!1,anchorSkew:!1,anchorSize:Dt(20,24),anchorColor:"#ffffff",autoPanPadding:Ct(20,20)},this._iconAnchor=Ct(0,0),this._boundary={x:0,y:0,w:0,h:0},this._disabled=!1,this._drawRequired=!1,this._resizeRequired=!1,this._prepareDOM(),this.setOptions(wt({},this.DEFAULT_OPTIONS,t),!0)},Ot(o.InfoWindow,o.OverlayView,{_prepareDOM:function(){var t=function(t){return zt.createElement("div",t)},e=N+"width:0;height:0;position:absolute;border:solid 0 transparent;pointer-events:none;",i=t(V+"cursor:default;"),n=t("margin:0;padding:0;border:solid 0 transparent;display:inline-block;box-sizing:content-box !important;"),o=t(e),s=t(e);zt.isSupportedCSS3Style("transform")&&(o.style[zt.css3Styles.transformOrigin]="right bottom",s.style[zt.css3Styles.transformOrigin]="right bottom"),i.appendChild(n),i.appendChild(o),i.appendChild(s),this.wrapper=i,this.contentWrap=n,this.anchorBack=o,this.anchorFore=s},_calculateSize:function(){var t=this.getPanes(),e=this.getContentElement(),i=this.get("maxWidth")||0,n=Dt(60,30);if(t){var o=t.floatPane;if(e&&(n=zt.calculateSize(e,o)),i>0&&n.width>i){var s=e.cloneNode(!0);s.style.width=i+"px",n=zt.calculateSize(s,o),zt.removeElement(s),s=null}}this.set("contentSize",n)},getElement:function(t){if(!t&&!this.element)return null;var e=this.element||t.getMapView().getInfoWindowElement();return this.element=e,e},getWrapElement:function(){return this.wrapper},getContentElement:function(){return this.contentElement},setOptions:function(t){var e=this,i=function(t,i){"position"===t&&(i=o.box(i)),"anchorSize"===t&&(i=o.box(i,o.Size)),"pixelOffset"===t&&(i=o.box(i,o.Point)),e.set(t,i)};if("string"==typeof t){var n=t,s=arguments[1];i(n,s)}else o.forEach(t,function(t,e){i(e,t)});this._disabled=!1,this._resizeRequired?this.resize():this._drawRequired&&this.draw(),this._resizeRequired=!1,this._drawRequired=!1},getOptions:function(t){var i=this,n={};return t!==e?this.get(t):(o.forEach(i.DEFAULT_OPTIONS,function(t,e){n[e]=i.get(e)}),n)},open:function(t,e){if(!t)throw new Error("unassigned map");if(e){var i=e.getPosition?e.getPosition().clone():o.box(e);this._iconAnchor=e.getAnchor&&e.getAnchor()?e.getAnchor().clone():Ct(0,0),this.set("position",i,!0)}if(!this.get("position"))throw new Error("position or anchor should be assigned.");this.getContent()||this.setContent(""),this.setMap(t),!1===this.get("disableAutoPan")&&this._panToVisible()},close:function(){this.setMap(null)},_panToVisible:function(){if(this.getMap()){var t=this.getMap();if(!t.getMapAction().isTranRunning()){var e=t.getMapModel(),i=this.getProjection(),n=i.fromCoordToOffset(t.getCenter()),o=t.getSize(),s=this._boundary,r=e.get("containerTopLeft"),a=Ct(0,0),h={left:r.x+s.x,top:r.y+s.y,right:r.x+s.x+s.w,bottom:r.y+s.y+s.h},l={left:h.left<0,top:h.top<0,right:h.right>o.width,bottom:h.bottom>o.height},c=this.get("autoPanPadding");l.left&&!l.right?a.x+=h.left-c.x:!l.left&&l.right&&(a.x+=h.right-o.width+c.x),l.top&&!l.bottom?a.y+=h.top-c.y:!l.top&&l.bottom&&(a.y+=h.bottom-o.height+c.y),0===a.x&&0===a.y||(a.y>0&&(a.y+=this._iconAnchor.y),n.add(a),t.panTo(i.fromOffsetToCoord(n),{duration:200}))}}},setContent:function(t){this.set("content",t)},getContent:function(){return this.get("content")},setPosition:function(t){if(!t)throw new Error("Property 'position' is required.");this.set("position",o.box(t))},getPosition:function(){return this.get("position")},setZIndex:function(t){t=parseInt(t||0,10),this.set("zIndex",t)},getZIndex:function(){return this.get("zIndex")},onAdd:function(){if(this.getMap()){var t=this.getMap(),e=this.getPanes().floatPane,i=this.getElement(t);i.style.zIndex=o.toNumber(this.get("zIndex")),t.closeInfoWindow(),t.getMapModel().set("infowindow",this),e.appendChild(i),this._calculateSize();var n=this.getPosition();Bt.trigger(this,"open",this._fromCoordToPointerEvent(n))}},draw:function(){if(this.getMap()){if(this._disabled)return void(this._drawRequired=!0);var t=this.getElement(),e=this.wrapper;e.parentNode!==t&&(t.innerHTML="",t.appendChild(e));var i=this.getBoundary();zt.setOffset(t,i.x,i.y),this.get("ef_floatpane")&&zt.transform(t,1,0,0,{x:0,y:0})}},scale:function(t){if(this.get("ef_floatpane")){var e=this.getElement(),i=this.getBoundary();zt.setScale(e,1/t,{x:i.w/2,y:i.h},!0)}},resize:function(){if(this.getMap()){if(this._disabled)return void(this._resizeRequired=!0);this._calculateSize(),this.draw()}},getBoundary:function(){var t=this.getProjection(),e=this.get("position"),i=t.fromCoordToOffset(e).clone().round(),n=this.get("contentSize"),o=2*this.get("borderWidth"),s=this.get("pixelOffset"),r=this._iconAnchor,a=this.get("disableAnchor")?0:this.get("anchorSize").height,h=Ct((n.width+o)/2,n.height+o+a),l=i.clone().sub(h.sub(s.x,s.y-r.y));return this._boundary={x:l.x,y:l.y,w:n.width+o,h:i.y-r.y-l.y,anchor:r},this._boundary},onRemove:function(){if(this.getMap()){this.getMap().getMapModel().set("infowindow",null),zt.removeElement(this.element),zt.removeElement(this.wrapper),Bt.trigger(this,"close",this._fromCoordToPointerEvent(this.getPosition()))}},_changeContent:function(t){var e=this.contentWrap,i=t||this.contentElement;this._calculateSize(),e.innerHTML="",i&&e.appendChild(i),this.draw()},_content_changed:function(t){var e=null;if("string"==typeof t){var i=zt.createElement("div");i.innerHTML=t;for(var n=i.childNodes,o=n.length,s=0,r=o;s0&&this._shape.setPath(t.path,t.minBoundPoint,t.maxBoundPoint,this.get("simplifyLevel"))},_project:function(t){var e=this.getProjection(),i=[],n=1/0,o=1/0,s=-1/0,r=-1/0;return t.forEach(function(t){var a=e.fromCoordToOffset(t).round();n=Math.min(a.x,n),o=Math.min(a.y,o),s=Math.max(a.x,s),r=Math.max(a.y,r),i.push(a)}),1===i.length&&i.push(i[0].clone()),{path:i,minBoundPoint:Ct(n,o),maxBoundPoint:Ct(s,r)}},_simplifyLevel_changed:function(){this.getMap()&&this._draw()},_path_changed:function(){},toGeometry:function(){return{type:q,coordinates:o.DataUtil.fromPointArrayToCoordinates(this.getPath()),mantle_properties:this._getMantleProperties()}}}),o.Polygon=function(t){this.DEFAULT_OPTIONS={map:null,paths:[],strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,visible:!0,strokeLineCap:"butt",strokeLineJoin:"miter",clickable:!1,simplifyLevel:1,zIndex:0},this.OVERLAY_TYPE="Polygon",this.PROPERTIES_NAME=["paths","map"],o.AbstractShapeOverlay.call(this,t)},Ot(o.Polygon,o.AbstractShapeOverlay,{_isPath:function(t){var e="array";if(!o.isArray(t)&&(e="kvoArray",t.constructor!==o.KVOArray))throw e=null,new Error("path must be Array or naver.maps.KVOArray");return e},setPaths:function(t){var e=this._isPath(t),i="kvoArray"===e?t:new o.KVOArray;this._unbindPaths(),"array"===e&&t.length>0&&(t[0]instanceof Ct?i.push(new o.KVOArray(t)):o.isArray(t[0])&&(!t[0][0]||t[0][0]instanceof Ct?o.forEach(t,function(t){i.push(new o.KVOArray(t))}):"number"==typeof t[0][0]?i.push(new o.KVOArray(o.boxToPath(t))):o.forEach(t,function(t){i.push(new o.KVOArray(o.boxToPath(t)))}))),this.set("paths",i),this._bindPaths(),i.getLength()>0&&this.draw()},setPath:function(t){var e,i=this._isPath(t);e="array"===i?t[0]instanceof Ct?new o.KVOArray(t):new o.KVOArray(o.boxToPath(t)):t,this._unbindPaths(),this.getPaths().setAt(0,e),this._bindPaths(),this.draw()},_bindPaths:function(){var t=this.getPaths(),e=Pt(this.draw,this);t.forEach(function(t){Bt.addListener(t,"insert_at",e),Bt.addListener(t,"remove_at",e),Bt.addListener(t,"set_at",e)})},_unbindPaths:function(){var t=this.getPaths();t&&t.forEach(function(t){Bt.clearInstanceListeners(t)})},getPaths:function(){return this.get("paths")},getPath:function(){return this.get("paths").getAt(0)},getBounds:function(){var t,e=this.getPaths();if(!e||0===e.getLength())return null;if(!(t=this.getPath())||0===t.getLength())return null;var i=t.getAt(0),n=It(i.clone(),i.clone());if(e.forEach(function(t){t.forEach(function(t){n.extend(t)})}),i instanceof At){var o=n.getMin(),s=n.getMax() ;n=kt([o.x,o.y,s.x,s.y])}return n},_createShape:function(){return new o.shapes.ClosedPath},_draw:function(){var t=this._project(this.getPaths());t.paths.length>0&&this._shape.setPath(t.paths,t.minBoundPoint,t.maxBoundPoint,this.get("simplifyLevel"))},_project:function(t){var e=this.getProjection(),i=[],n=1/0,o=1/0,s=-1/0,r=-1/0,a=!1;return t.forEach(function(t){var h=[];t.forEach(function(i){var l=e.fromCoordToOffset(i).round();n=Math.min(l.x,n),o=Math.min(l.y,o),s=Math.max(l.x,s),r=Math.max(l.y,r),h.push(l),1===t.getLength()&&h.push(l.clone()),a=!0}),i.push(h)}),a||(i=[]),{paths:i,minBoundPoint:Ct(n,o),maxBoundPoint:Ct(s,r)}},getAreaSize:function(){var t=this.getProjection(),e=this.getPaths(),i=0;return e.forEach(function(e){var n=e.getArray();i+=o.Math.getPolygonSize(n,t)}),i},_simplifyLevel_changed:function(){this.getMap()&&this._draw()},_paths_changed:function(){},toGeometry:function(){var t=o.DataUtil.fromPolygonArrayToCoordinates([this.getPaths()])[0];return o.forEach(t,function(t){var e=t.length,i=new At(t[0]),n=new At(t[e-1]);i.equals(n)||t.push(t[0])}),{type:J,coordinates:t,mantle_properties:this._getMantleProperties()}}}),o.Rectangle=function(t){this.DEFAULT_OPTIONS={map:null,bounds:kt(At(0,0),At(0,0)),strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,visible:!0,clickable:!1,zIndex:0},this.OVERLAY_TYPE="Rectangle",this.PROPERTIES_NAME=["bounds","map"],o.AbstractShapeOverlay.call(this,t)},Ot(o.Rectangle,o.AbstractShapeOverlay,{setBounds:function(t){t=o.box(t);var e=t.getMin(),i=t.getMax();t=t instanceof kt?kt.bounds(e,i):It.bounds(e,i),this.set("bounds",t),this.draw()},getBounds:function(){return this.get("bounds")},_createShape:function(){return new o.shapes.Rectangle},_draw:function(){var t=this.get("bounds"),e=this.getProjection(),i=e.fromCoordToOffset(t.getMin()).round(),n=e.fromCoordToOffset(t.getMax()).round(),o=It.bounds(i,n);this._shape.setBounds(o.getMin(),o.getMax())},getAreaSize:function(){var t,e=this.getBounds(),i=this.getProjection(),n=e.getMin(),o=e.getMax();return t=e instanceof kt?At(e.south(),e.east()):Ct(e.maxX(),e.minY()),i.getDistance(t,n)*i.getDistance(t,o)},_bounds_changed:function(){},toGeometry:function(){return{type:"MultiPoint",coordinates:this.getBounds().toArray(),mantle_properties:this._getMantleProperties()}}}),o.Circle=function(t){this.DEFAULT_OPTIONS={map:null,center:At(0,0),radius:0,strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,visible:!0,clickable:!1,zIndex:0},this.OVERLAY_TYPE="Circle",this.PROPERTIES_NAME=["center","radius","map"],o.AbstractShapeOverlay.call(this,t)},Ot(o.Circle,o.AbstractShapeOverlay,{setCenter:function(t){this.set("center",o.box(t)),this.draw()},getCenter:function(){return this.get("center")},setRadius:function(t){this.set("radius",t),this.draw()},getRadius:function(){return this.get("radius")},getBounds:function(){var t=this.getProjection(),e=this.getCenter(),i=this.getRadius(),n=t.getDestinationCoord(e,0,i),o=t.getDestinationCoord(e,180,i),s=t.getDestinationCoord(e,90,i),r=t.getDestinationCoord(e,270,i),a=It([r.x,o.y,s.x,n.y]);return e instanceof At&&(a=kt([r.x,o.y,s.x,n.y])),a},_createShape:function(){return new o.shapes.Circle},_draw:function(){var t=this.get("center"),e=this.get("radius"),i=this.getProjection(),n=i.fromCoordToOffset(t).round(),o=i.getDestinationCoord(t,90,e),s=e;if(o){s=i.fromCoordToOffset(o).round().x-n.x}this._shape.setOptions({center:n,radius:s})},getAreaSize:function(){var t=this.getRadius();this.getProjection();return t*t*Math.PI},_center_changed:function(){},toGeometry:function(){return{type:H,coordinates:this.getCenter().toArray(),mantle_properties:this._getMantleProperties()}}}),o.Ellipse=function(t){this.DEFAULT_OPTIONS={map:null,bounds:kt(At(0,0),At(0,0)),strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,visible:!0,clickable:!1,zIndex:0},this.OVERLAY_TYPE="Ellipse",this.PROPERTIES_NAME=["bounds","map"],o.AbstractShapeOverlay.call(this,t)},Ot(o.Ellipse,o.Rectangle,{_createShape:function(){return new o.shapes.Ellipse},getAreaSize:function(){var t,e=this.getBounds(),i=this.getProjection(),n=e.getMin(),o=e.getMax();t=e instanceof kt?At(e.south(),e.east()):Ct(e.maxX(),e.minY());var s=i.getDistance(t,n)/2,r=i.getDistance(t,o)/2;return Math.PI*s*r},toGeometry:function(){this.getBounds();return{type:"MultiPoint",coordinates:this.getBounds().toArray(),mantle_properties:this._getMantleProperties()}}}),o.PatternPolyline=function(t){this.DEFAULT_OPTIONS={map:null,path:[],strokeStyle:"shortdot",strokeLineCap:"round",strokeLineJoin:"round",strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:5,outlineColor:"#000000",outlineOpacity:1,outlineWeight:2,patternIcon:null,patternInterval:0,zIndex:1},this.OVERLAY_TYPE="PatternPolyline",t=wt({},this.DEFAULT_OPTIONS||{},t),this.setOptions(t)},Ot(o.PatternPolyline,o.OverlayView,{setOptions:function(t){var i=this;if("string"==typeof t){var n=t,s=arguments[1],r={};r[n]=s,i.setValues(r)}else o.forEach(t,function(t,e){"map"!==e&&i.setOptions(e,t)}),t.map!==e&&this.setMap(t.map)},setPath:function(t){if(!o.isArray(t)&&t.constructor!==o.KVOArray)throw new Error("path must be Array or naver.maps.KVOArray");var e;e=o.isArray(t)?t[0]instanceof Ct?new o.KVOArray(t):new o.KVOArray(o.boxToPath(t)):t,this.set("path",e),this.draw()},getPath:function(){return this.get("path")},onAdd:function(){var t=this.get("map"),e=this.get("path"),i=this.get("strokeStyle"),n=this.get("strokeWeight"),s=this.get("strokeLineCap"),r=this.get("strokeLineJoin"),a=this.get("strokeColor"),h=this.get("strokeOpacity"),l=this.get("outlineColor"),c=this.get("outlineOpacity"),u=this.get("outlineWeight"),p=this.get("zIndex");this._basePolyline=new o.Polyline({map:t,path:e,strokeStyle:i,strokeWeight:n,strokeLineCap:s,strokeLineJoin:r,strokeColor:a,strokeOpacity:h,zIndex:p}),this._outPolyline=new o.Polyline({map:t,path:e,strokeStyle:i,strokeWeight:n,strokeLineCap:s,strokeLineJoin:r,strokeColor:l,strokeOpacity:c,zIndex:p-1}),this._outPolyline._shape._setOutlineWeight(u)},onRemove:function(){this._basePolyline&&(this._basePolyline.setMap(null),this._basePolyline=null),this._outPolyline&&(this._outPolyline.setMap(null),this._outPolyline=null)},draw:function(){}}),o.ConverterUtil={isXMLDoc:function(t){if(!t)return!1;var e=(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},isHexColor:function(t){return/(^[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{6}$)/i.test(t)},isAlphabet:function(t){return/^[A-Z]+$/i.test(t)},getElementsByTagName:function(t,e,i){var n=t.getElementsByTagName(e);return 0===n.length&&-1!==e.indexOf(":")&&(n=t.getElementsByTagName(e.split(":")[1])),i?[].slice.call(n):n},getOneElementByTagName:function(t,e){var i=o.ConverterUtil.getElementsByTagName(t,e,!0);return i.length>0?i[0]:null},getElementByTagNameInParent:function(t,e,i){for(var n,s=o.ConverterUtil.getElementsByTagName(t,e),r=0,a=s.length;r0&&o.forEach(s,function(i){var s=null,r=n,h=null;switch(n){case H:h="Marker",s=t(Xt.getValueByTagName(i,"coordinates"));break;case q:h="Polyline",s=e(Xt.getValueByTagName(i,"coordinates"));break;case J:h="Polygon";var l=Xt.getOneElementByTagName(i,"outerBoundaryIs"),c=Xt.getElementsByTagName(i,"innerBoundaryIs"),u=null;s=[],l&&(u=Xt.getOneElementByTagName(l,"LinearRing"),s.push(e(Xt.getValueByTagName(u,"coordinates")))),o.forEach(c,function(t){u=Xt.getOneElementByTagName(t,"LinearRing"),s.push(e(Xt.getValueByTagName(u,"coordinates")))});break;case"gx:Track":h="Polyline",r=q,s=[];var p=Xt.getElementsByTagName(i,"gx:coord",!0);o.forEach(p,function(e){s.push(t(Xt.getValueByTagName(e)," "))})}s&&s.length>0&&a.push({type:r,coordinates:s,mantle_properties:{overlayType:h}})})}),a}function a(t){var e=Xt.getValueByTagName(t,"color"),i=Xt.getElementsByTagName(t,"width"),n={o:{},m:{}};if(e){var o=Xt.parseColor(e);n.o.color=e,n.m.strokeColor=o[0],n.m.strokeOpacity=o[1]}return i&&i.length>0&&(i=Xt.getValueByTagName(i),n.o.width=i,n.m.strokeWeight=i),n}function h(t){var e=Xt.getValueByTagName(t,"color"),i=(Xt.getElementsByTagName(t,"fill"),Xt.getElementsByTagName(t,"outline"),{o:{},m:{}});if(e){var n=Xt.parseColor(e);i.o.color=e,i.m.fillColor=n[0],i.m.fillOpacity=n[1]}return i}function l(t){var e={type:et,features:[]},i=Xt.getElementsByTagName(t,"Style",!0),n=Xt.getElementsByTagName(t,"StyleMap",!0),r=Xt.getElementsByTagName(t,"Placemark",!0),l={};return o.forEach(i,function(t){var e=Xt.getAttribute(t,"id"),i="#"+e;l[i]={},i.length>1&&o.forEach(u,function(e){var n=Xt.getElementsByTagName(t,e,!0);o.forEach(n,function(t){var n=null;switch(e){case"LineStyle":n=a(t);break;case"PolyStyle":n=h(t)}l[i]=o.extend(l[i],n)})})}),o.forEach(n,function(t){var e=Xt.getAttribute(t,"id"),i="#"+e,n=Xt.getElementsByTagName(t,"Pair",!0),s={};o.forEach(n,function(t){var e=Xt.getValueByTagName(t,"key"),i=Xt.getValueByTagName(t,"styleUrl");s[e]=i}),l[i]=s}),o.forEach(r,function(t){e.features.push(s(t,l))}),e}var c=[J,q,H,"gx:Track"],u=["LineStyle","PolyStyle"],p=function(){return String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/gm,"")}}();o.KML={fromKmlToGeoJson:l}}(),o.Converter={gpx:function(t){if(!Xt.isXMLDoc(t))throw new Error("Invalid Parameter Type Error.");return o.GPX.fromGpxToGeoJson(t)},kml:function(t){if(!Xt.isXMLDoc(t))throw new Error("Invalid Parameter Type Error.");return o.KML.fromKmlToGeoJson(t)}};o.Converter;o.DataUtil={toPoint:function(t){return t?[t.x,t.y]:[]},fromPointArrayToCoordinates:function(t){var e=[];return t instanceof o.KVOArray&&(t=t.getArray()),o.forEach(t,function(t){e.push(o.DataUtil.toPoint(t))}),e},fromPointArrayListToCoordinates:function(t){var e=[];return o.forEach(t,function(t){t instanceof o.KVOArray&&(t=t.getArray()),e.push(o.DataUtil.fromPointArrayToCoordinates(t))}),e},fromPolygonArrayToCoordinates:function(t){var e=[];return t instanceof o.KVOArray&&(t=t.getArray()),o.forEach(t,function(t){t instanceof o.KVOArray&&(t=t.getArray()),e.push(o.DataUtil.fromPointArrayListToCoordinates(t))}),e},_parsePoint:function(t){return new naver.maps.Point(t)},_parseLineString:function(t){var e=[];return o.forEach(t,function(t){e.push(o.DataUtil._parsePoint(t))}),e},_parseMultiLineString:function(t){var e=[];return o.forEach(t,function(t){e.push(o.DataUtil._parseLineString(t))}),e},_parseMultiPolygon:function(t){var e=[];return o.forEach(t,function(t,i){e.push(o.DataUtil._parseMultiLineString(t))}),e}};o.DataUtil;o.DataLayer=function(){this._features=[],this._stylist=null,this._styleType=null},Ot(o.DataLayer,o.KVO,{setMap:function(t){this.set("map",t)},getMap:function(){return this.get("map")},addGeoJson:function(t,e){for(var i=this._getFeaturesFrom(t),n=0,o=i.length;n=0;r--){n=e[r],s=n.getRaw();for(var a=0,h=i.length;a-1&&(t.setDataLayer(null),this._unlistenFeature(t),e.splice(n,1),Bt.trigger(this,"removefeature",{feature:t})),i},getAllFeature:function(){return this._features},getFeatureById:function(t){var e=null;return this.forEach(function(i){if(i.getId()===t)return e=i,!0}),e},forEach:function(t){var e=this.getAllFeature();return o.forEach(e,t)},_getFeaturesFrom:function(t){var e=[],i=this;switch(t.type){case et:o.forEach(t.features,function(t){e=e.concat(i._getFeaturesFrom(t))});break;case tt:e.push(new o.Feature(t))}return e},_listenFeature:function(t){this._unlistenFeature(t);var e=t.EVENT_LIST,i=this;t.__dataLayerListeners=[],o.forEach(e,function(e){t.__dataLayerListeners.push(Bt.forward(t,e,i))}),t.__dataLayerListeners.push(Bt.forward(t,"property_changed",this))},_unlistenFeature:function(t){var e=t.__dataLayerListeners;e&&(Bt.removeListener(e),t.__overlayListeners=null,delete t.__overlayListeners)},setStyle:function(t){var e=t||null,i=null,n=this;e&&(i=o.isFunction(e)?"function":"object",o.isFunction(e)||(e=function(){return t})),this._stylelist=e,this._styleType=i,e&&this.forEach(function(t){n._setFeatureStyle(t)})},getStyle:function(){return this._stylelist?"function"!==this._styleType?this._stylelist():this._stylelist:null},overrideStyle:function(t,e){this.set("overriden_style",e),this._setFeatureStyle(t,e)},revertStyle:function(t){if(this.set("overriden_style",null),t)this._setFeatureStyle(t);else{var e=this;this.forEach(function(t){e._setFeatureStyle(t)})}},_setFeatureStyle:function(t,e){if(this._stylelist||e){var i=this._stylelist,n=e||(i?i(t):null);n&&t.setStyle(n)}},toGeoJson:function(){var t={type:et,features:[]};return this.forEach(function(e){t.features.push(e.toGeoJson())}),1===t.features.length&&(t=t.features[0]),t}}),o.Geometry=function(t){if(this._raw=t,!t.type||!t.coordinates)throw new Error("Invalid geojson!");this.set("id",o.guid()),this.set("type",t.type),this.set("coords",[]),this._parseCoordinates()},Ot(o.Geometry,o.KVO,{getRaw:function(){return this._raw},getMantleProperties:function(){return this._raw.mantle_properties},getId:function(){return this.get("id")},getType:function(){return this.get("type")},getCoords:function(){return this.get("coords")},_parseCoordinates:function(){var t=this.get("type"),e=this._raw.coordinates,i=[];switch(t){case H:i=[o.DataUtil._parsePoint(e)];break;case"MultiPoint":i=o.DataUtil._parseLineString(e);break;case q:i=[o.DataUtil._parseLineString(e)];break;case Q:i=o.DataUtil._parseMultiLineString(e);break;case J:i=[o.DataUtil._parseMultiLineString(e)];break;case"MultiPolygon":i=o.DataUtil._parseMultiPolygon(e)}this.set("coords",i)},toGeoJson:function(){var t=(this.getRaw(),this.getType()),e=this.getCoords(),i={type:t,coordinates:[]};switch(t){case H:i.coordinates=o.DataUtil.toPoint(e[0]);break;case"MultiPoint":i.coordinates=o.DataUtil.fromPointArrayToCoordinates(e);break;case q:i.coordinates=o.DataUtil.fromPointArrayToCoordinates(e[0]);break;case Q:i.coordinates=o.DataUtil.fromPointArrayListToCoordinates(e);break;case J:i.coordinates=o.DataUtil.fromPolygonArrayToCoordinates(e)[0];break;case"MultiPolygon":i.coordinates=o.DataUtil.fromPolygonArrayToCoordinates(e)}return i}}),o.Feature=function(t){this._raw=t,this.EVENT_LIST=["click","dblclick","mouseover","mouseout","mousedown","mouseup","rightclick"],this.DEFAULT_OVERLAY_STYLE={strokeColor:"#000",strokeOpacity:.8,strokeWeight:3,fillColor:"#000",fillOpacity:.3,clickable:!0},this.set("type",t.type),this.set("id",t.id||o.guid()),this._initProperties(),this._initGeometryCollection(),this._initOverlay()},Ot(o.Feature,o.KVO,{getRaw:function(){return this._raw},getId:function(){return this.get("id")},setProperty:function(t,e){var i=this._propertyList||[],n=this.getProperty(t);-1===o.getIndexOfElement(i,t)&&i.push(t),this.set("property_"+t,e),Bt.trigger(this,"property_changed",{feature:this,name:t,newValue:e,oldValue:n}),this._applyStyle()},getProperty:function(t){return this.get("property_"+t)},getBounds:function(){return this.get("bounds")||null},getGeometries:function(){return this.get("geometryCollection")},getOverlays:function(){return this._overlays},forEachOverlay:function(t){return o.forEach(this._overlays,t)},setStyle:function(t){this.forEachOverlay(function(e){var i=wt(!0,{},t||{});e instanceof naver.maps.Marker&&!i.icon&&null===e.getIcon()&&(i.icon=null,delete i.icon),e.setOptions(i)})},autoStyle:function(){var t=this.getGeometries();this.forEachOverlay(function(e){var i=e.__geometryId;i&&o.forEach(t,function(t){t.getId()===i&&e.setOptions(t.getMantleProperties())})})},setDataLayer:function(t){this.set("dataLayer",t)},_initBounds:function(){var t=this._raw.bbox,e=null;t?e=new naver.maps.PointBounds(this._raw.bbox):this.forEachOverlay(function(t){var i=null;t.getBounds?i=t.getBounds():t.getPosition&&(i=It(t.getPosition().clone(),t.getPosition().clone())),i&&(e=e?e.union(i):i.clone())}),this.set("bounds",e)},_initProperties:function(){var t=this._raw,e=t.properties,i=[],n=this;o.forEach(e,function(t,e){i.push(e),n.set("property_"+e,t)}),this._propertyList=i},_initGeometryCollection:function(){var t=this._parseGeometry(this._raw.geometry);this.set("geometryCollection",t)},_parseGeometry:function(t){var e=[],i=this;return t.type===$?o.forEach(t.geometries,function(t){e=e.concat(i._parseGeometry(t))}):e.push(new o.Geometry(t)),e},_initOverlay:function(){var t=this.get("geometryCollection"),e=this.DEFAULT_OVERLAY_STYLE,i=[],n=this;o.forEach(t,function(t){var s=t.getType(),r=t.getCoords(),a=t.getMantleProperties(),h=a?a.overlayType:null,l=a?t.getId():null;switch(s){case H:a&&"Circle"===h?i.push(new naver.maps.Circle({center:r[0],radius:a.radius,__geometryId:l})):i.push(new naver.maps.Marker({position:r[0],__geometryId:l}));break;case"MultiPoint":a&&"Marker"!==h?i.push(new naver.maps[h]({bounds:new naver.maps.PointBounds(r[0],r[1]),__geometryId:l})):o.forEach(r,function(t){i.push(new naver.maps.Marker({position:t,__geometryId:l}))});break;case q:case Q:o.forEach(r,function(t){i.push(new naver.maps.Polyline(wt({path:t,__geometryId:l},e)))});break;case J:case"MultiPolygon":var c=[];o.forEach(r,function(t){o.forEach(t,function(t){c.push(t)})}),i.push(new naver.maps.Polygon(wt({paths:c,_raw:n.getRaw(),__geometryId:l},e)))}}),this._initFeatureEvent(i),this._overlays=i},_initFeatureEvent:function(t){var e=this,i=function(t,i){return Bt.addListener(t,i,function(t){var n=t||{};n.feature=e,Bt.trigger(e,i,n)})},n=e.EVENT_LIST,s=[];o.forEach(t,function(t){o.forEach(n,function(e){s.push(i(t,e))})}),e._listeners=s},_applyStyle:function(){var t=this.get("dataLayer");if(t){var e=t.getStyle(),i=null,n=t.get("overriden_style");e&&(i=o.isFunction(e)?e(this):e),i&&this.setStyle(i),n&&this.setStyle(n)}},dataLayer_changed:function(t){t?(this._applyStyle(),this.bindTo("map",t)):(this.unbind("map"),this.map_changed(null))},map_changed:function(t){this.forEachOverlay(function(e){e.setMap(t)}),this._initBounds()},toGeoJson:function(){var t=this._propertyList,e=this.getRaw(),i={id:this.getId(),type:tt,properties:{},geometry:{}},n=this.getOverlays(),s=this;return o.forEach(t,function(t){var e=s.getProperty(t);o.hasValue(e)&&(i.properties[t]=e)}),e.bbox&&(i.bbox=e.bbox),e.crs&&(i.crs=e.crs),n.length>1?(i.geometry.type=$,i.geometry.geometries=[],o.forEach(n,function(t){i.geometry.geometries.push(t.toGeometry())})):i.geometry=n[0].toGeometry(),i}});var Gt=0,Wt=/(o|open)api\.map\.naver\.com\/\b/,Kt=/openapi\/maps3(\.max)?\.js\b/,Ht=/map-latest\.js\b/,qt=function(){for(var t=n.getElementsByTagName("script"),e="",i=t.length-1;i>=0;i--){if(e=t[i].src||"",Ht.test(e)){Gt=9;break}if(Kt.test(e)){Gt=Wt.test(e)?0:1;break}Gt=0,e=""}return t=null,e},Jt=function(t){var e=n.createElement("a");e.href=t;var i=e.protocol,o=e.hostname||e.host,s=e.pathname.split("/");s.pop(),s=s.join("/"),0!==s.indexOf("/")&&(s="/"+s),0!==i.indexOf("http")&&(i="https:");var r=i+"//oapi.map.naver.com/openapi/maps3-";return e=null,9!==Gt&&(r=i+"//"+o+s+"/maps3-"),r};!function(){var e=function(t,e){this._parse(t);var i=this.submodules;if(i){for(var n=[],o=0,s=i.length;o=0;i--){var n=e[i];if(0===n.indexOf("submodules=")){var o=n.replace("submodules=","");o&&(this.submodules=o.split(","))}else 0===n.indexOf("callback=")&&(this.callback=n.replace("callback=",""))}}},_sync:function(t,e){o.forEach(t,function(t){n.write('