@syncfusion/ej2-maps 20.2.36 → 20.2.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +6 -6
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +6 -6
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/maps/maps.js +1 -1
- package/src/maps/user-interaction/zoom.js +5 -5
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-maps.min.js
|
|
3
|
-
* version : 20.2.
|
|
3
|
+
* version : 20.2.38
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
8
|
* applicable laws.
|
|
9
9
|
*/
|
|
10
|
-
this.ej=this.ej||{},this.ej.maps=function(e,t,i,o,a){"use strict";function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function l(e){e.element.style.height=t.isNullOrUndefined(e.height)?"auto":e.height,e.element.style.width=t.isNullOrUndefined(e.width)?"auto":e.width;var i=e.element.clientWidth,o=e.element.clientHeight,a=n(e.element.style.width,i),l=n(e.element.style.height,o);new et(0,0);return"0px"===e.width||"0%"===e.width||"0%"===e.height||"0px"===e.height?new et(0,0):new et(n(e.width,i)||i||a||600,n(e.height,o)||o||l||(e.isDevice?Math.min(window.innerWidth,window.innerHeight):450))}function r(e){e.renderer=new i.SvgRenderer(e.element.id),e.availableSize=l(e),e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height}),"0px"!==e.width&&"0%"!==e.width&&"0%"!==e.height&&"0px"!==e.height||(e.svgObject.setAttribute("height","0"),e.svgObject.setAttribute("width","0"))}function s(e,t,i){var o=i.getBoundingClientRect(),a=i.ownerDocument.defaultView.pageXOffset,n=i.ownerDocument.defaultView.pageYOffset,l=i.ownerDocument.documentElement.clientTop,r=i.ownerDocument.documentElement.clientLeft,s=o.left+a-r,d=o.top+n-l;return new mt(e-s,t-d)}function d(e){return e*(Math.PI/180)}function p(e){return e*(180/Math.PI)}function h(e,i,o,a,n){var l,r,s,h,c,f,b=new et(n.mapAreaRect.width,n.mapAreaRect.height),S=n.baseMapBounds.longitude,x=n.baseMapBounds.latitude,O=d(e),M=d(i),_=n.projectionType,L=n.isTileMap?256*Math.pow(2,1):t.isNullOrUndefined(o)?Math.min(b.width,b.height):Math.min(b.width,b.height)*o;if("Normal"===a.geometryType)l=t.isNullOrUndefined(o)?i:Math.abs((i-S.min)*o),r=t.isNullOrUndefined(o)?e:Math.abs((x.max-e)*o);else if("Geographic"===a.geometryType){switch(_){case"Mercator":var C=new tt(L/2,L/2);l=C.x+i*(L/360);var w=v(Math.sin(d(e)),-.9999,.9999);r=C.y+.5*Math.log((1+w)/(1-w))*(-L/(2*Math.PI));break;case"Winkel3":c=((s=g(M,O)).x+M/(Math.PI/2))/2,h=(s.y+O)/2;break;case"Miller":c=M,h=1.25*Math.log(Math.tan(Math.PI/4+.4*O));break;case"Eckert3":c=2/(f=Math.sqrt(Math.PI*(4+Math.PI)))*M*(1+Math.sqrt(1-4*O*O/(Math.PI*Math.PI))),h=4/f*O;break;case"AitOff":c=(s=g(M,O)).x,h=s.y;break;case"Eckert5":c=M*(1+Math.cos(O))/Math.sqrt(2+Math.PI),h=2*O/Math.sqrt(2+Math.PI);break;case"Equirectangular":c=M,h=O;break;case"Eckert6":f=(1+Math.PI/2)*Math.sin(O);for(var P=1/0,I=0;I<10&&Math.abs(P)>1e-6;I++)O-=P=(O+Math.sin(O)-f)/(1+Math.cos(O));f=Math.sqrt(2+Math.PI),c=M*(1+Math.cos(O))/f,h=2*O/f}l="Mercator"===_?l:y(m(n,p(c)),3),r="Mercator"===_?r:-y(u(n,p(h)),3)}return new tt(l,r)}function c(e,t,i,o){var a=256*Math.pow(2,t),n=(e.x+180)/360,l=Math.sin(e.y*Math.PI/180),r=.5-Math.log((1+l)/(1-l))/(4*Math.PI),s=e.x,d=e.y;return o&&(s=n*a+.5+i.x,d=r*a+.5+i.y),{x:s,y:d}}function m(e,i){var o=e.baseMapBounds.longitude,a=t.isNullOrUndefined(e.baseSize)?e.mapAreaRect.width:e.mapAreaRect.width+Math.abs(e.baseSize.width-e.mapAreaRect.width)/2;return Math.round(a*(i-o.min)/(o.max-o.min)*100)/100}function u(e,t){var i=e.baseMapBounds.latitude;return Math.round(e.mapAreaRect.height*(t-i.min)/(i.max-i.min)*100)/100}function g(e,t){var i=Math.cos(t),o=f(b(i*Math.cos(e/=2)));return new tt(2*i*Math.sin(e)*o,Math.sin(t)*o)}function y(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function f(e){return e/Math.sin(e)}function b(e){return Math.acos(e)}function v(e,i,o){return t.isNullOrUndefined(i)||(e=Math.max(e,i)),t.isNullOrUndefined(o)||(e=Math.min(e,o)),e}function S(e,i,o,a){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:o}}).dispatchEvent(new MouseEvent(a?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function x(e,i){var o=document.getElementById("mapsmeasuretext");return null===o&&(o=t.createElement("text",{id:"mapsmeasuretext"}),document.body.appendChild(o)),o.innerHTML=e,o.style.position="absolute","number"==typeof i.size?o.style.fontSize=i.size+"px":o.style.fontSize=i.size,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.fontFamily=i.fontFamily,o.style.visibility="hidden",o.style.top="-100",o.style.left="0",o.style.whiteSpace="nowrap",o.style.lineHeight="normal",new et(o.clientWidth,o.clientHeight)}function O(e,t,o,a,n){void 0===n&&(n=!1);var l,r,s={id:e.id,x:e.x,y:e.y,fill:o,"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine},d="string"==typeof e.text||"number"==typeof e.text?e.text:n?e.text[e.text.length-1]:e.text[0],p=new i.SvgRenderer(""),h=p.createText(s,d);if(h.style["user-select"]="none",h.style["font-family"]=t.fontFamily,h.style["font-size"]=t.size,h.style["font-weight"]=t.fontWeight,h.style["font-color"]=t.color,h.style["-moz-user-select"]="none",h.style["-webkit-touch-callout"]="none",h.style["-webkit-user-select"]="none",h.style["-khtml-user-select"]="none",h.style["-ms-user-select"]="none",h.style["-o-user-select"]="none","string"!=typeof e.text&&e.text.length>1)for(var c=1,m=e.text.length;c<m;c++)r=x(e.text[c],t).height,l=p.createTSpan({x:e.x,id:e.id,y:e.y+(n?-c*r:c*r)},n?e.text[e.text.length-(c+1)]:e.text[c]),h.appendChild(l);return a.appendChild(h),h}function M(e,i,o,a,n){for(var l=t.createElement("div",{id:i,styles:"position: absolute;pointer-events: auto;"}),r=e.length;r>0;)l.appendChild(e[0]),r--;for(var s=l.innerHTML,d=Object.keys(o),p=0;p<d.length;p++)"object"==typeof o[d[p]]?s=L(s,"",o,n):"latitude"!==d[p].toLowerCase()&&"longitude"!==d[p].toLowerCase()&&(s=s.replace(new RegExp("{{:"+d[p]+"}}","g"),o[d[p].toString()]));return l.innerHTML=s,l}function _(e,t){return t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e}function L(e,t,i,o){for(var a=""===e?t:e,n=""===e?a.split("${"):a.split("{{:"),l=0;l<n.length;l++)if(n[l].indexOf("}}")>-1&&n[l].indexOf(".")>-1||n[l].indexOf("}")>-1&&n[l].search(".")>-1)for(var r=""===e?n[l].split("}"):n[l].split("}}"),s=0;s<r.length;s++)if(r[s].indexOf(".")>-1){var d=P(i,r[s]).toString();a=""===e?a.split("${"+r[s]+"}").join(_(d,o)):a.replace(new RegExp("{{:"+r[s]+"}}","g"),d)}return a}function C(e,i,o,a,n){for(var l=(t.isNullOrUndefined(e.childElementCount)?e[0]:e).outerHTML,r=Object.keys(o),s=0;s<r.length;s++)l=l.replace(new RegExp("{{:"+r[s]+"}}","g"),o[r[s].toString()]);return t.createElement("div",{id:i,innerHTML:l,styles:"position: absolute"})}function w(e,i,o,a,n,l,r){var s,d,p,h,c=n.size,m=n.borderColor,u=parseFloat(n.borderWidth),g=parseFloat(n.borderOpacity),y=n.fill,f=n.dashArray,b={color:m,width:u,opacity:g},v=n.opacity,S=new nt(a,y,u,m,v,g,f,"");if(c.width="string"==typeof c.width?parseInt(c.width,10):c.width,c.height="string"==typeof c.height?parseInt(c.height,10):c.height,"Circle"===e){var x=(c.width+c.height)/4,O=new st(a,y,b,v,o.x,o.y,x,f);s=r.renderer.drawCircle(O)}else"Rectangle"===e?(d=o.x-c.width/2,p=o.y-c.height/2,h=new rt(a,y,b,v,new ut(d,p,c.width,c.height),null,null,"",f),s=r.renderer.drawRectangle(h)):"Image"===e?(d=o.x-c.width/2,p=o.y-c.height,t.merge(S,{href:i,height:c.height,width:c.width,x:d,y:p}),s=r.renderer.drawImage(S)):s=G(r,e,S,c,o,l);return s}function P(e,i){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i)){var o=i.replace(/\[/g,".").replace(/\]/g,"").split(".");if(1===o.length)e=e[o[0]];else for(var a=0;a<o.length&&!t.isNullOrUndefined(e);a++)e=e[o[a]]}return e}function I(e,i){var o=t.isNullOrUndefined(e.colorValuePath)?i[e.colorValuePath]:e.colorValuePath.indexOf(".")>-1?P(i,e.colorValuePath).toString():i[e.colorValuePath];return e.fill=t.isNullOrUndefined(e.colorValuePath)||t.isNullOrUndefined(o)?e.fill:e.colorValuePath.indexOf(".")>-1?P(i,e.colorValuePath).toString():i[e.colorValuePath],e}function T(e,i){if(t.isNullOrUndefined(e.shapeValuePath)||t.isNullOrUndefined(i[e.shapeValuePath])){var o=t.isNullOrUndefined(e.shapeValuePath)?e.shape:e.shapeValuePath.indexOf(".")>-1?P(i,e.shapeValuePath).toString():e.shape;e.shape=""!==o.toString()?o:e.shape;var a=t.isNullOrUndefined(e.imageUrlValuePath)?e.imageUrl:e.imageUrlValuePath.indexOf(".")>-1?P(i,e.imageUrlValuePath).toString():t.isNullOrUndefined(i[e.imageUrlValuePath])?e.imageUrl:i[e.imageUrlValuePath];e.imageUrl=a}else{var n=e.shapeValuePath.indexOf(".")>-1?P(i,e.shapeValuePath).toString():i[e.shapeValuePath];e.shape=""!==n.toString()?n:e.shape,"Image"===i[e.shapeValuePath]&&(e.imageUrl=t.isNullOrUndefined(e.imageUrlValuePath)?e.imageUrl:e.imageUrlValuePath.indexOf(".")>-1?P(i,e.imageUrlValuePath).toString():t.isNullOrUndefined(i[e.imageUrlValuePath])?e.imageUrl:i[e.imageUrlValuePath])}return e}function N(e,i,o,a,n,l,r,s){var d,p,m,u,g,y,f,b=[],v=[],S=0,x=0,M=e.markerClusterSettings.labelStyle,_=0,L=[],C=e.markerClusterSettings,I=o.renderer.createGroup({id:o.element.id+"_LayerIndex_"+a+"_markerCluster"}),T={cancel:!1,name:ii,fill:C.fill,height:C.height,width:C.width,imageUrl:C.imageUrl,shape:C.shape,data:void 0,maps:o,cluster:C,border:C.border};o.trigger("markerClusterRendering",T,function(C){for(W=0;W<i.childElementCount;W++)if(L=[],"hidden"!==i.childNodes[W].style.visibility){if(f=i.childNodes[W],d=f.getBoundingClientRect(),L.push(W),!t.isNullOrUndefined(d)){for(q=W+1;q<i.childElementCount;q++)"hidden"!==i.childNodes[q].style.visibility&&(f=i.childNodes[q],p=f.getBoundingClientRect(),t.isNullOrUndefined(p)||d.left>p.right||d.right<p.left||d.top>p.bottom||d.bottom<p.top||(b.push(p),i.childNodes[q].style.visibility="hidden",L.push(q)));if(S=d.left+d.width/2,x=d.top+d.height,b.length>0){L=L.filter(function(e,t,i){return i.indexOf(e)===t});var N=o.element.getBoundingClientRect();S-=N.left,x-=o.availableSize.height<=N.height?N.top:N.bottom-N.top;var k=o.isTileMap?new Object:he(o,e,!1),F=o.isTileMap?{x:0,y:0}:0!==o.translatePoint.x?o.translatePoint:k.location,E=parseInt(i.childNodes[W].id.split("_dataIndex_")[1].split("_")[0],10),A=parseInt(i.childNodes[W].id.split("_MarkerIndex_")[1].split("_")[0],10),z=e.markerSettings[A],B=z.dataSource[E],j=void 0,U=t.isNullOrUndefined(z.longitudeValuePath)?t.isNullOrUndefined(B.longitude)?t.isNullOrUndefined(B.Latitude)?0:parseFloat(B.Latitude):parseFloat(B.longitude):Number(P(B,z.longitudeValuePath)),R=t.isNullOrUndefined(z.latitudeValuePath)?t.isNullOrUndefined(B.latitude)?t.isNullOrUndefined(B.Latitude)?0:parseFloat(B.Latitude):parseFloat(B.latitude):Number(P(B,z.latitudeValuePath));o.isTileMap?o.isTileMap&&!o.zoomSettings.enable&&(j=c(new tt(U,R),o.tileZoomLevel,o.tileTranslatePoint,!0)):j=h(R,U,o.mapLayerPanel.calculateFactor(e),e,o),i.childNodes[W].style.visibility="hidden";var D=e.markerClusterSettings;T.cancel?((y={size:new et(D.width,D.height),fill:D.fill,borderColor:D.border.color,borderWidth:D.border.width,opacity:D.opacity,dashArray:D.dashArray}).fill=D.fill,y.size.width=D.width,y.size.height=D.height,y.imageUrl=D.imageUrl,y.shape=D.shape,y.borderColor=D.border.color,y.borderWidth=D.border.width,y.borderOpacity=t.isNullOrUndefined(D.border.opacity)?D.opacity:D.border.opacity):((y={size:new et(D.width,D.height),fill:D.fill,borderColor:D.border.color,borderWidth:D.border.width,opacity:D.opacity,dashArray:D.dashArray}).fill=T.fill,y.size.width=T.width,y.size.height=T.height,y.imageUrl=T.imageUrl,y.shape=T.shape,y.borderColor=T.border.color,y.borderWidth=T.border.width,y.borderOpacity=t.isNullOrUndefined(T.border.opacity)?D.opacity:T.border.opacity),S=o.isTileMap?S:i.id.indexOf("_Markers_Group")>-1?S:(j.x+F.x+T.width)*o.mapScaleValue,x=o.isTileMap?x:i.id.indexOf("_Markers_Group")>-1?x:(j.y+F.y+T.height/2)*o.mapScaleValue,o.isTileMap&&!o.zoomSettings.enable&&(S=j.x,x=j.y);var Z=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+A+"_dataIndex_"+E+"_cluster_"+_,V=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+A+"_dataIndex_"+E+"_cluster_"+_+"_datalabel_"+_;_++;var H="Image"===y.shape?y.size.height/2:0,G=w(y.shape,y.imageUrl,{x:0,y:H},Z,y,n,o);G.setAttribute("transform","translate( "+S+" "+x+" )"),"Balloon"===T.shape?G.children[0].innerHTML=L.toString():G.innerHTML=L.toString(),m=new at(V,0,3.75,"middle",(b.length+1).toString(),"",""),(u=O(m,M,M.color,n)).setAttribute("transform","translate( "+S+" "+x+" )"),I.appendChild(u),I.appendChild(G)}}b=[]}l.appendChild(I),o.svgObject.appendChild(l),o.element.appendChild(o.svgObject);for(var W=0;W<I.childElementCount;W++)if("hidden"!==I.childNodes[W].style.visibility&&(f=I.childNodes[W],d=f.getBoundingClientRect(),!(t.isNullOrUndefined(d)||f.id.indexOf("_datalabel_")>-1))){for(var q=W+1;q<I.childElementCount;q++)"hidden"!==I.childNodes[q].style.visibility&&(g=I.childNodes[q],p=g.getBoundingClientRect(),t.isNullOrUndefined(p)||g.id.indexOf("_datalabel_")>-1||d.left>p.right||d.right<p.left||d.top>p.bottom||d.bottom<p.top||(v.push(g),v.push(I.childNodes[q-1]),I.childNodes[q].style.visibility="hidden",I.childNodes[q-1].style.visibility="hidden",L.push(q)));if(v.length>0){f=I.childNodes[W];for(var X=0;X<v.length;X++)"g"===f.tagName?f.childNodes[0].textContent=f.childNodes[0].textContent+","+v[X].textContent:f.textContent=f.textContent+","+v[X].textContent,I.childNodes[W-1].textContent=(+I.childNodes[W-1].textContent+ +v[X+1].textContent).toString(),X++}v=[]}for(;0<I.childNodes.length;)n.insertBefore(I.childNodes[0],n.firstChild);r?l.appendChild(n):(ue(o.element.id+"_Secondary_Element").appendChild(n),l.appendChild(n));var Y=document.getElementById(o.element.id+"_LayerIndex_0_markerCluster");t.isNullOrUndefined(Y)||Y.remove(),s&&document.getElementById(o.element.id+"_Layer_Collections").appendChild(l)})}function k(e,t,i){var o=e[0].layerIndex,a=e[0].targetClusterIndex,n=e[0].markerIndex,l=e[0].dataIndex,r=t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+n,s=r+"_dataIndex_"+l+"_cluster_"+a,d=be(s),p=be(s+"_datalabel_"+a);d.setAttribute("visibility","visible"),p.setAttribute("visibility","visible");for(var h=e[0].data.length,c=0;c<h;c++)be(r+"_dataIndex_"+e[0].data[c].index).style.visibility="hidden";de(t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+n+"_markerClusterConnectorLine")}function F(e,t,i,o){var a=e[0].layerIndex,n=e[0].markerIndex,l=e[0].targetClusterIndex,r=e[0].dataIndex,s=o?be:i.querySelector.bind(i),d=o?"":"#",p=t.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+n,h=p+"_dataIndex_"+r+"_cluster_"+l,c=s(d+""+h),m=s(d+""+h+"_datalabel_"+l);c.setAttribute("visibility","hidden"),m.setAttribute("visibility","hidden");var u=t.layers[a].markerSettings[n],g=s(d+""+p+"_dataIndex_"+r),y=g.parentElement.id.indexOf("Template_Group")>-1?g.getBoundingClientRect().height:u.height,f=g.parentElement.id.indexOf("Template_Group")>-1?g.getBoundingClientRect().width:u.width,b=+c.getAttribute("transform").split("translate(")[1].trim().split(" ")[0],v=+c.getAttribute("transform").split("translate(")[1].trim().split(" ")[1].split(")")[0].trim(),S=f+5,x=6.28*S,O=0,M=Math.round(x/f);O+=M;for(var _=e[0].data.length,L=Math.round(y/x*100),C=(L=_<M?100/_:L)/100*360,w=_<M?45:0,P=1,I="M "+b+" "+v+" ",T="",N=0;N<_;N++){if(O===N||Math.round(w)>=360){for(w=0,x=6.28*(S=(f+5)*++P),M=Math.round(x/y),L=Math.round(y/x*100);L*M<100;)M++;C=L/100*360,O+=M}var k=b+S*Math.sin(2*Math.PI*w/360),F=v+S*Math.cos(2*Math.PI*w/360);T+=I+"L "+k+" "+F+" ",(g=s(d+""+p+"_dataIndex_"+e[0].data[N].index)).parentElement.id.indexOf("Template_Group")>-1?(g.style.transform="",g.style.left=t.isTileMap?k-f/2+"px":k-f/2-10+"px",g.style.top=t.isTileMap?F-y/2+"px":F-y/2-10+"px",g.setAttribute("transform","translate( "+k+" "+F+")")):g.setAttribute("transform","translate( "+k+" "+F+")"),g.style.visibility="visible",w+=C}var E=t.layers[a].markerClusterSettings.connectorLineSettings,A={d:T,id:t.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+n+"_dataIndex_"+r+"_markerClusterConnectorLine",stroke:E.color,"fill-opacity":E.opacity,"stroke-opacity":E.opacity,"stroke-width":E.width};i=o?s(t.element.id+"_Markers_Group"):i;var z=t.renderer.createGroup({id:t.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+n+"_markerClusterConnectorLine"});z.appendChild(t.renderer.drawPath(A)),i.insertBefore(z,i.querySelector("#"+p+"_dataIndex_0"))}function E(e,i,o,a,n,l,r,s,d,p,h){var c={size:new et(e.width,e.height),fill:e.fill,borderColor:e.border.color,borderWidth:e.border.width,opacity:i.opacity,dashArray:i.dashArray,borderOpacity:t.isNullOrUndefined(e.border.opacity)?i.opacity:e.border.opacity},m=w(e.shape,e.imageUrl,{x:0,y:0},r,c,h,p),u=(p.isTileMap?n.x:(n.x+l.x)*d)+s.x,g=(p.isTileMap?n.y:(n.y+l.y)*d)+s.y;m.setAttribute("transform","translate( "+u+" "+g+" )"),z(p.selectedMarkerElementId,p.markerSelectionClass,m,"MarkerselectionMapStyle"),h.appendChild(m);var y=o.length-1===a?"marker":null,f=new tt(u,g);return i.animationDuration>0&&Pe(m,i.animationDelay,i.animationDuration,f,p,y),h}function A(e,t,i,o,a,n,l,r,s,d,p){if((t=fe(e.template,p))&&t(o,p,e.template,p.element.id+"_MarkerTemplate"+a,!1).length){for(var h=M(t(o,p,e.template,p.element.id+"_MarkerTemplate"+a,!1),i,o,a,p),c=0;c<h.children.length;c++)h.children[c].style.pointerEvents="none";if(h.style.left=(p.isTileMap?l.x:(l.x+r.x)*s)+d.x-p.mapAreaRect.x+"px",h.style.top=(p.isTileMap?l.y:(l.y+r.y)*s)+d.y-p.mapAreaRect.y+"px",n.appendChild(h),"GoogleStaticMap"===p.layers[p.baseLayerIndex].layerType){var m=ue(p.element.id+"_StaticGoogleMap").getBoundingClientRect(),u=h.getBoundingClientRect();(m.x>u.x||m.x+640<u.x+u.width)&&(m.y>u.y||m.y+m.height<u.y+u.height)&&(h.style.display="none")}}return n}function z(e,i,o,a){if(e)for(var n=0;n<e.length;n++)o.getAttribute("id")===e[n]&&(0!==n&&"g"!==o.tagName||(t.isNullOrUndefined(i)||t.isNullOrUndefined(i.id)||document.body.appendChild(i),o.id.indexOf("_MarkerIndex_")>-1&&o.childElementCount>0&&o.children[0].setAttribute("class",a)),o.setAttribute("class",a))}function B(e,i,o,a,n,l,r){if(!be(e)){var s=t.createElement("style",{id:e,innerHTML:"."+i+"{fill:"+o+";opacity:"+a+";stroke-width:"+l+";stroke:"+n+";}"});r.shapeSelectionClass=s,document.body.appendChild(s)}}function j(e,t){return t&&t.appendChild(e),e}function U(e,t,i){return j(e.renderer.drawCircle(t),i)}function R(e,t,i){return j(e.renderer.drawRectangle(t),i)}function D(e,t,i){return j(e.renderer.drawPath(t),i)}function Z(e,t,i){return j(e.renderer.drawPolygon(t),i)}function V(e,t,i){return j(e.renderer.drawPolyline(t),i)}function H(e,t,i){return j(e.renderer.drawLine(t),i)}function G(e,t,i,o,a,n){var l;switch(t){case"Balloon":l=K(e,i,o,a,"Marker",n);break;case"Cross":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2)+" M "+(a.x-o.width/2)+" "+a.y+" L "+(a.x+o.width/2)+" "+a.y;break;case"Diamond":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+(a.x+o.width/2)+" "+a.y+" L "+a.x+" "+(a.y+o.height/2)+" L "+(a.x-o.width/2)+" "+a.y+" Z";break;case"Star":i.d="M "+(a.x+o.width/3)+" "+(a.y-o.height/2)+" L "+(a.x-o.width/2)+" "+(a.y+o.height/6)+" L "+(a.x+o.width/2)+" "+(a.y+o.height/6)+" L "+(a.x-o.width/3)+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2)+" L "+(a.x+o.width/3)+" "+(a.y-o.height/2)+" Z";break;case"Triangle":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+(a.x+o.width/2)+" "+(a.y+o.height/2)+" L "+(a.x-o.width/2)+" "+(a.y+o.height/2)+" Z";break;case"HorizontalLine":i.d=" M "+(a.x-o.width/2)+" "+a.y+" L "+(a.x+o.width/2)+" "+a.y;break;case"VerticalLine":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2);break;case"InvertedTriangle":i.d="M "+(a.x-o.width/2)+" "+(a.y-o.height/2)+" L "+(a.x+o.width/2)+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2)+" Z";break;case"Pentagon":for(var r=void 0,s=void 0,d=0;d<5;d++)r=o.width/2*Math.cos(Math.PI/180*(72*d)),s=o.height/2*Math.sin(Math.PI/180*(72*d)),i.d+=(0===d?"M ":"L ")+(a.x+r)+" "+(a.y+s);i.d+=" Z"}return"Cross"!==t&&"HorizontalLine"!==t&&"VerticalLine"!==t||(i.stroke="transparent"===i.stroke?i.fill:i.stroke),"Balloon"===t?l:e.renderer.drawPath(i)}function W(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+o.y+" L "+o.x+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+o.y+" Z",j(e.renderer.drawPath(t),a)}function q(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y+i.height/2)+" Z",j(e.renderer.drawPath(t),a)}function X(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2)+" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,j(e.renderer.drawPath(t),a)}function Y(e,t,i,o,a){return t.d=" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,j(e.renderer.drawPath(t),a)}function J(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2),j(e.renderer.drawPath(t),a)}function Q(e,t,i,o,a){return t.d="M "+(o.x+i.width/3)+" "+(o.y-i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y+i.height/6)+" L "+(o.x+i.width/2)+" "+(o.y+i.height/6)+" L "+(o.x-i.width/3)+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2)+" L "+(o.x+i.width/3)+" "+(o.y-i.height/2)+" Z",j(e.renderer.drawPath(t),a)}function K(e,t,i,o,a,n){var l,r=i.width,s=i.height;o.x-=r/2,o.y-=s,t.d="M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S17.8,16,15,16z";var d=e.renderer.drawPath(t),p=i.width/30,h=i.height/30;if(d.setAttribute("transform","translate("+o.x+", "+o.y+") scale("+p+", "+h+")"),"Marker"===a){var c=e.renderer.createGroup({id:t.id});j(d,c),l=j(c,n)}else l=d;return l}function $(e,t,i,o){for(var a=e.renderer.createPattern(t,"pattern"),n=0,l=i;n<l.length;n++)j(l[n],a);return j(a,o)}function ee(e,t){for(var i,o=[],a=0,n=e;a<n.length;a++){var l=n[a];i={};for(var r=0,s=t;r<s.length;r++){var d=s[r];l[d]&&(i[d]=l[d])}o.push(i)}return o}function te(e,i,o,a,n){if(!t.isNullOrUndefined(i))for(var l=0;l<e.length;l++){var r=o.indexOf(".")>-1?P(e[l],o):e[l][o],s=ie(r,a,i);if((!t.isNullOrUndefined(r)&&isNaN(i[s])?r.toLowerCase():r)===(!t.isNullOrUndefined(i[s])&&isNaN(i[s])?i[s].toLowerCase():i[s]))return l}return null}function ie(e,i,o){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(o)&&!t.isNullOrUndefined(i))for(var a="[object Array]"===Object.prototype.toString.call(i)?i:[i],n=0;n<a.length;n++)if((t.isNullOrUndefined(e)?e:e.toLowerCase())===(!t.isNullOrUndefined(o[a[n]])&&isNaN(o[a[n]])?o[a[n]].toLowerCase():o[a[n]]))return a[n];return null}function oe(e,t,i){for(var o=[],a=0;a<e.length;a++){var n=e[a];t<=n.y&&i>=n.y&&o.push(n)}return o}function ae(e,t,i,o,a){var n=(t-e)/100*(100/(a-o)*(i-o))+e;return a===o&&(n=(t-e)/100+e),n}function ne(e,t,i){if(!e.length)return null;for(var o,a,n,l,r=e.length,s=0,d=0,p=0,h=0;h<=r-1;h++)o=e[h].x,a="Mercator"===t||"Normal"===i?e[h].y:-e[h].y,h===r-1?(n=e[0].x,l="Mercator"===t||"Normal"===i?e[0].y:-e[0].y):(n=e[h+1].x,l="Mercator"===t||"Normal"===i?e[h+1].y:-e[h+1].y),s+=Math.abs(o*l-n*a),d+=Math.abs((o+n)*(o*l-n*a)),p+=Math.abs((a+l)*(o*l-n*a));d*=1/(4*(s*=.5)),p*=1/(4*s);for(var c={x:0,y:0},m={x:0,y:0},u={x:0,y:0},g={x:0,y:0},y={x:0,y:0},f={x:0,y:0},b={x:0,y:0},v={x:0,y:0},S=0,h=0;h<=r-1;h++){var x=e[h];x.y="Mercator"===t||"Normal"===i?x.y:-x.y,x.y>p?x.x<d&&d-x.x<d-y.x?y={x:x.x,y:x.y}:x.x>d&&(0===f.x||x.x-d<f.x-d)&&(f={x:x.x,y:x.y}):x.x<d&&d-x.x<d-b.x?b={x:x.x,y:x.y}:x.x>d&&(0===v.x||x.x-d<v.x-d)&&(v={x:x.x,y:x.y}),S=f.y-v.y+(f.y-v.y)/4,x.x>d?x.y<p&&p-x.y<p-c.y?c={x:x.x,y:x.y}:x.y>p&&(0===m.y||x.y-p<m.y-p)&&(m={x:x.x,y:x.y}):x.y<p&&p-x.y<p-u.y?u={x:x.x,y:x.y}:x.y>p&&(0===g.y||x.y-p<g.y-p)&&(g={x:x.x,y:x.y})}return{x:d,y:p,rightMin:c,rightMax:m,leftMin:u,leftMax:g,points:e,topMax:v,topMin:b,bottomMax:f,bottomMin:y,height:S}}function le(e){var i=!1;return"[object Array]"===Object.prototype.toString.call(e)&&Array.prototype.forEach.call(e,function(e,o){t.isNullOrUndefined(e.geometry)||"Path"!==e.geometry.type||(i=!0)}),i}function re(e,t,i){var o=t,a=x(t,i).width;if(a>e)for(var n=t.length-1;n>=0;--n)if(o=t.substring(0,n)+"...",(a=x(o,i).width)<=e||o.length<4)return o.length<4&&(o=" "),o;return o}function se(e,t,i,o){var a;switch(t){case"Near":a=e.x;break;case"Center":a="title"===o?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":a="title"===o?e.width-e.y-i.width:e.x+e.width-i.width}var n="title"===o?e.y+i.height/2:e.y+e.height/2+i.height/2;return new tt(a,n)}function de(e){var i=document.getElementById(e);return i?t.remove(i):null}function pe(e,t){var i=h(e.minLatOfGivenLocation,e.minLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),o=h(e.maxLatOfGivenLocation,e.maxLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),a=(i.x+o.x)/2,n=(i.y+o.y)/2;return new tt(a,n)}function he(e,i,o){var a,n=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!t.isNullOrUndefined(e.centerLatOfGivenLocation)&&!t.isNullOrUndefined(e.centerLongOfGivenLocation)&&e.zoomNotApplied;t.isNullOrUndefined(e.mapScaleValue)&&(e.mapScaleValue=n),e.zoomSettings.shouldZoomInitially&&e.zoomSettings.enable&&(e.mapScaleValue=a=n=(e.zoomSettings.shouldZoomInitially||e.enablePersistence)&&1===e.scale?e.scale:t.isNullOrUndefined(e.markerZoomFactor)?1:e.markerZoomFactor,e.mapScaleValue===e.markerZoomFactor||e.enablePersistence||(e.mapScaleValue=n=e.markerZoomFactor),t.isNullOrUndefined(e.markerCenterLatitude)||t.isNullOrUndefined(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=a=n=e.scaleOfGivenLocation);var p=t.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.min,c=t.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.max,m=o?1:e.mapScaleValue;t.isNullOrUndefined(e.currentShapeDataLength)&&(e.currentShapeDataLength=t.isNullOrUndefined(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length);var u,g,y=e.totalRect&&e.legendSettings.visible?e.totalRect:e.mapAreaRect,f=e.availableSize;if(!t.isNullOrUndefined(p)&&!t.isNullOrUndefined(c)){var b=Math.abs(c.x-p.x),v=Math.abs(p.y-c.y),S=o?1:1===e.markerZoomFactor?e.mapScaleValue:n;if(l=e.zoomSettings.shouldZoomInitially&&e.markerZoomedState&&!e.zoomPersistence?e.markerZoomCenterPoint:e.centerPosition,!t.isNullOrUndefined(s)&&!t.isNullOrUndefined(r)||d){var x=((b+Math.abs(e.mapAreaRect.width-b))/2+e.mapAreaRect.x)/S,O=((v+Math.abs(e.mapAreaRect.height-v))/2+e.mapAreaRect.y)/S,M=d?pe(e,i):h(r,s,e.mapLayerPanel.calculateFactor(i),i,e);t.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType?(u=-M.x+x,g=-M.y+O,a=m):(1!==Math.floor(e.scale)&&e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-M.x+x,g=-M.y+O):e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-M.x+x,g=-M.y+O,a=m):(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y),a=e.mapScaleValue)}else if(t.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType){0!==v&&0!==b&&v!==b||(b=y.width/2,v=y.height),b*=a=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),v*=a;var _=0!==p.x&&"layers"===e.translateType?f.width-y.width:0;u=y.x+(-p.x+(y.width/2-b/2))-_,g=y.y+(-p.y+(y.height/2-v/2)),e.previousTranslate=new tt(u,g)}else if(e.zoomSettings.shouldZoomInitially||1!==e.markerZoomFactor||1!==e.mapScaleValue)if(a=e.mapScaleValue<1?e.mapScaleValue+1:e.mapScaleValue,e.mapScaleValue=e.zoomSettings.enable&&1!==e.mapScaleValue?e.mapScaleValue:1,e.currentShapeDataLength!==(t.isNullOrUndefined(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length)&&"SubLayer"!==i.type){var L=parseFloat(Math.min(y.height/v,y.width/b).toFixed(2));v*=L,b*=L,g=y.y+(-p.y+(y.height/2-v/2)),a=L,u=y.x+(-p.x+(y.width/2-b/2))}else if(e.availableSize.height!==e.heightBeforeRefresh||e.widthBeforeRefresh!==e.availableSize.width){var C=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),w=b;w*=C;var P=v;P*=C;var I=y.x+(-p.x+(y.width/2-w/2)),T=y.y+(-p.y+(y.height/2-P/2)),N=(e.translatePoint.x-e.previousTranslate.x)/e.widthBeforeRefresh,k=(e.translatePoint.y-e.previousTranslate.y)/e.heightBeforeRefresh;u=I+N*e.availableSize.width,g=T+k*e.availableSize.height,e.previousTranslate=new tt(I,T),e.zoomTranslatePoint.x=u,e.zoomTranslatePoint.y=g}else t.isNullOrUndefined(e.previousProjection)||!(1===e.mapScaleValue||e.mapScaleValue<=1.05)||e.zoomModule.isDragZoom?(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y,a=e.scale):(b*=a=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),u=y.x+(-p.x+(y.width/2-b/2)),v*=a,g=y.y+(-p.y+(y.height/2-v/2)));else v*=a=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),b*=a,g=y.y+(-p.y+(y.height/2-v/2)),u=y.x+(-p.x+(y.width/2-b/2));t.isNullOrUndefined(e.translatePoint)||(u=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:u,g=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:g)}return a=e.enablePersistence?e.mapScaleValue>=1?e.mapScaleValue:1:a,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:a,location:new tt(u,g)}}function ce(e,i,o){var a,n=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!t.isNullOrUndefined(e.centerLongOfGivenLocation)&&!t.isNullOrUndefined(e.centerLatOfGivenLocation)&&e.zoomNotApplied;t.isNullOrUndefined(e.previousCenterLatitude)&&t.isNullOrUndefined(e.previousCenterLongitude)?(e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.previousCenterLatitude!==e.centerPosition.latitude&&e.previousCenterLongitude!==e.centerPosition.longitude?(e.centerPositionChanged=!0,e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.centerPositionChanged=!1,(t.isNullOrUndefined(e.mapScaleValue)||n>e.mapScaleValue)&&(e.isReset&&1===e.mapScaleValue?e.mapScaleValue=e.mapScaleValue:e.mapScaleValue=n),e.mapScaleValue=1!==e.zoomSettings.zoomFactor&&e.zoomSettings.zoomFactor===e.mapScaleValue?e.zoomSettings.zoomFactor:e.zoomSettings.zoomFactor===e.mapScaleValue||e.centerPositionChanged?e.zoomSettings.zoomFactor:e.mapScaleValue,e.zoomSettings.shouldZoomInitially&&(e.mapScaleValue=n=a=(e.enablePersistence||e.zoomSettings.shouldZoomInitially)&&1===e.scale?e.scale:t.isNullOrUndefined(e.markerZoomFactor)?e.mapScaleValue:e.markerZoomFactor,n=e.mapScaleValue,t.isNullOrUndefined(e.markerCenterLatitude)||t.isNullOrUndefined(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=a=n=e.scaleOfGivenLocation);var p,c,m=o?1:e.mapScaleValue,u=e.mapAreaRect,g=e.baseMapRectBounds.min,y=e.baseMapRectBounds.max,f=o?1:e.mapScaleValue,b=Math.abs(y.x-g.x),v=Math.abs(g.y-y.y);if(!t.isNullOrUndefined(s)&&!t.isNullOrUndefined(r)||d){var S=(v+Math.abs(e.mapAreaRect.height-v))/2/f,x=(b+Math.abs(e.mapAreaRect.width-b))/2/f,O=d?pe(e,i):h(r,s,e.mapLayerPanel.calculateFactor(i),i,e);t.isNullOrUndefined(e.zoomTranslatePoint)&&t.isNullOrUndefined(e.previousProjection)||e.zoomNotApplied?(p=-O.x+x+e.mapAreaRect.x/m,c=-O.y+S+e.mapAreaRect.y/m):e.previousProjection!==e.projectionType?(p=-O.x+x,c=-O.y+S):(p=e.zoomTranslatePoint.x,c=e.zoomTranslatePoint.y,n=m),t.isNullOrUndefined(e.translatePoint)||(c=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:c,p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:p),a=0!==n?n:1}else{var M=0===e.zoomSettings.zoomFactor?1:e.zoomSettings.zoomFactor,_=e.zoomSettings.maxZoom;a=M=M>_?_:M;var L=0===e.mapScaleValue?1:e.mapScaleValue>_?_:e.mapScaleValue,x=u.x+(-g.x+(u.width/2-b/2)),S=u.y+(-g.y+(u.height/2-v/2));if(!t.isNullOrUndefined(e.zoomTranslatePoint)||!t.isNullOrUndefined(e.previousProjection))if(e.previousProjection!==e.projectionType){var C=[],w={x:x,y:S};C.push(w);for(var P=1;P<_;P++)w={x:C[P-1].x-(u.width/P-u.width/(P+1))/2,y:C[P-1].y-(u.height/P-u.height/(P+1))/2},C.push(w);x=C[M-1].x,S=C[M-1].y}else x=e.zoomTranslatePoint.x,S=e.zoomTranslatePoint.y,M!==L&&(a=L);t.isNullOrUndefined(e.translatePoint)||(p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:x,c=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:S)}return a=e.enablePersistence?0===e.mapScaleValue?1:e.mapScaleValue:a,{scale:o?1:a,location:new tt(p,c)}}function me(e){e.tileZoomScale=e.tileZoomLevel=Math.floor(e.availableSize.height/512)+1;var t="GoogleStaticMap"!==e.layers[e.baseLayerIndex].layerType?20:0,i=256*Math.pow(2,e.tileZoomLevel);e.tileTranslatePoint.x=e.availableSize.width/2-i/2,e.tileTranslatePoint.y=e.availableSize.height/2-i/2+t,e.previousTileWidth=e.availableSize.width,e.previousTileHeight=e.availableSize.height}function ue(e){return document.getElementById(e)}function ge(e){var i=document.getElementById(e);return t.isNullOrUndefined(i)?null:i.getClientRects()[0]}function ye(e,t){return e.formatFunction=e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator}),e.formatFunction(t)}function fe(e,i){var o=null;try{document.querySelectorAll(e).length?o=t.compile(document.querySelector(e).innerHTML.trim()):(i.isVue||i.isVue3)&&(o=t.compile(e))}catch(i){o=t.compile(e)}return o}function be(e){return document.getElementById(e)}function ve(e,t){var i,o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),a=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),n=t.layersCollection[o],l=n.layerData[a].property;return n.dataSource&&(i=n.dataSource[te(n.dataSource,l,n.shapeDataPath,n.shapePropertyPath,n)]),{shapeData:l,data:i}}function Se(e,i,o,a){var n=ve(e,o),l={color:i.border.color,opacity:i.border.opacity,width:i.border.width},r=i.enableMultiSelect?{cancel:!1,name:a,fill:i.fill,opacity:i.opacity,border:l,shapeData:n.shapeData,data:n.data,target:e,maps:o,shapeDataCollection:o.shapeSelectionItem}:{cancel:!1,name:a,fill:i.fill,opacity:i.opacity,border:l,shapeData:n.shapeData,data:n.data,target:e,maps:o};return o.trigger(a,r,function(e){r.border.opacity=t.isNullOrUndefined(r.border.opacity)?r.opacity:r.border.opacity}),r}function xe(e){return document.getElementsByClassName(e)}function Oe(e,t){var i=null;return document.getElementById(t)&&(i=document.getElementById(t).querySelector("#"+e)),i}function Me(e,t,i,o){for(var a,n=o.layers[e].shapeData.features,l=0;l<n.length;l++)if(n[l].properties.name===t){a=o.element.id+"_LayerIndex_"+e+"_shapeIndex_"+l+"_dataIndex_undefined";break}return be(a)}function _e(e,i,o){return t.createElement("style",{id:e,innerHTML:"."+i+"{fill:"+o.fill+";fill-opacity:"+o.opacity.toString()+";stroke-opacity:"+o.border.opacity.toString()+";stroke-width:"+o.border.width.toString()+";stroke:"+o.border.color+";}"})}function Le(e,i,o){var a=be(e);t.isNullOrUndefined(a)||(a.innerHTML="."+i+"{fill:"+o.fill+";fill-opacity:"+o.opacity.toString()+";stroke-width:"+o.border.width.toString()+";stroke-opacity:"+o.border.opacity.toString()+";stroke:"+o.border.color+"}")}function Ce(e,i,o,a,n){var l={color:e.border.color,width:e.border.width/i.scale,opacity:e.border.opacity},r={opacity:e.opacity,fill:e.fill,border:l,name:si,target:o.id,cancel:!1,shapeData:a,data:n,maps:i};i.trigger("itemSelection",r,function(o){r.border.opacity=t.isNullOrUndefined(e.border.opacity)?e.opacity:e.border.opacity,i.shapeSelectionItem.push(r.shapeData),be("ShapeselectionMap")?Le("ShapeselectionMap","ShapeselectionMapStyle",r):document.body.appendChild(_e("ShapeselectionMap","ShapeselectionMapStyle",r))})}function we(e){e.removeAttribute("class")}function Pe(e,i,o,a,n,l,r){void 0===r&&(r=0);var s=a.x,d=a.y,p=0,h=e.getAttribute("transform")||"";new t.Animation({}).animate(e,{duration:o,delay:i,progress:function(i){if(i.timeStamp>i.delay){if(n.isTileMap&&0===p){var o=document.querySelector(".GroupElement");t.isNullOrUndefined(o)||(o.style.display="block")}p=(i.timeStamp-i.delay)/i.duration,e.setAttribute("transform","translate( "+(s-r*p)+" "+(d-r*p)+" ) scale("+p+")")}},end:function(t){if(e.setAttribute("transform",h),l){var i={cancel:!1,name:ri,element:l,maps:n};n.trigger(ri,i)}}})}function Ie(e){de(e)}function Te(e,i,o,a,n,l,r,d,p){var h=s(o,a,d);t.isNullOrUndefined(h)||(o=h.x,a=h.y);for(var c=document.getElementById(r),m=x(e,{fontFamily:"Segoe UI",size:"8px",fontStyle:"Normal",fontWeight:"Regular"}).width,u=e.split(" "),g=u[0].length,y=1;y<u.length;y++)g<u[y].length&&(g=u[y].length);c||(c=t.createElement("div",{id:r,styles:'background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;font-size:12px; font-family: "Segoe UI"; text-align:center'})),o<n-m?o=o:o>n-m&&o<n-8*g?m=n-o:o>=n-8*g&&(o>m?o-=m:(m=o,o=0));var f=i.split("px");Ne(c,e,o,a,f,m,n,d),c.clientHeight+2*parseInt(f[0],10)>l&&(m=o,o=0),Ne(c,e,o,a,f,m,n,d),p&&setTimeout(Ie,5e3,r)}function Ne(e,t,i,o,a,n,l,r){e.innerHTML=t,e.style.top=-1!==e.id.indexOf("_Legend")?(parseInt(a[0],10)+o).toString()+"px":(2*parseInt(a[0],10)).toString()+"px",e.style.left=i.toString()+"px",e.style.width=n.toString()+"px",e.style.maxWidth=l.toString()+"px",e.style.wordWrap="break-word",r.appendChild(e)}function ke(e,i,o,a,n){var l=be(e),r="top:"+o.toString()+"px;left:"+a.toString()+"px;color: #000000; background:#FFFFFF;z-index: 2;position:absolute;border:1px solid #707070;font-size:"+n+";border-radius:2px;";l?(l.setAttribute("innerHTML"," "+i+" "),l.setAttribute("styles",r)):(l=t.createElement("div",{id:e,innerHTML:" "+i+" ",styles:r}),document.body.appendChild(l))}function Fe(e,t,o,a,n){var l=new i.SvgRenderer(""),r=Ee(e,o,t,n,a);return l["draw"+r.functionName](r.renderOption)}function Ee(e,i,o,a,n){var l,r="Path",s=i.width,d=i.height,p=e.x,h=e.y,c=e.x+-s/2,m=e.y+-d/2;switch(a.stroke="HorizontalLine"===o||"VerticalLine"===o||"Cross"===o?a.fill:a.stroke,a["stroke-width"]=0!==a["stroke-width"]||"HorizontalLine"!==o&&"VerticalLine"!==o&&"Cross"!==o?a["stroke-width"]:1,o){case"Circle":case"Bubble":r="Ellipse",t.merge(a,{rx:s/2,ry:d/2,cx:p,cy:h});break;case"VerticalLine":l="M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),t.merge(a,{d:l});break;case"HorizontalLine":l="M "+p+" "+h+" L "+(p+s/2)+" "+h,t.merge(a,{d:l});break;case"Diamond":l="M "+c+" "+h+" L "+p+" "+(h+-d/2)+" L "+(p+s/2)+" "+h+" L "+p+" "+(h+d/2)+" L "+c+" "+h+" z",t.merge(a,{d:l});break;case"Rectangle":l="M "+c+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+d/2)+" L "+c+" "+(h+d/2)+" L "+c+" "+(h+-d/2)+" z",t.merge(a,{d:l});break;case"Triangle":l="M "+c+" "+(h+d/2)+" L "+p+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+d/2)+" L "+c+" "+(h+d/2)+" z",t.merge(a,{d:l});break;case"InvertedTriangle":l="M "+(p+s/2)+" "+(h-d/2)+" L "+p+" "+(h+d/2)+" L "+(p-s/2)+" "+(h-d/2)+" L "+(p+s/2)+" "+(h-d/2)+" z",t.merge(a,{d:l});break;case"Pentagon":for(var u=void 0,g=void 0,y=0;y<=5;y++)u=s/2*Math.cos(Math.PI/180*(72*y)),g=s/2*Math.sin(Math.PI/180*(72*y)),l=0===y?"M "+(p+u)+" "+(h+g)+" ":l.concat("L "+(p+u)+" "+(h+g)+" ");l=l.concat("Z"),t.merge(a,{d:l});break;case"Star":l="M "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" L "+(e.x-i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x+i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x-i.width/3)+" "+(e.y-i.height/2)+" L "+e.x+" "+(e.y+i.height/2)+" L "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" Z",t.merge(a,{d:l});break;case"Cross":l="M "+c+" "+h+" L "+(p+s/2)+" "+h+" M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),t.merge(a,{d:l});break;case"Image":r="Image",t.merge(a,{href:n,height:d,width:s,x:c,y:m})}return{renderOption:a,functionName:r}}function Ae(e,t){t.appendChild(e);var i=e.offsetWidth,o=e.offsetHeight;return t.removeChild(e),new et(i,o)}function ze(e,i,o,a){for(var n,l=0;l<e.childElementCount;l++)if((n=e.childNodes[l]).id.indexOf("_NavigationGroup")>-1)Be(n,i,o,a);else{var r=void 0,s=0,d=a.layersCollection[i].shapeSettings.borderWidthValuePath,p=a.layersCollection[i].shapeSettings.border.width,h=a.layersCollection[i].shapeSettings.circleRadius;r=a.layersCollection[i].shapeSettings.borderWidthValuePath&&null!==(s=te(a.layersCollection[i].dataSource,a.layersCollection[i].layerData[l].property,a.layersCollection[i].shapeDataPath,a.layersCollection[i].shapePropertyPath,a.layersCollection[i]))&&a.layersCollection[i].dataSource[s][d]?a.layersCollection[i].dataSource[s][d]:t.isNullOrUndefined(p)?0:p,n.setAttribute("stroke-width",(r/o).toString()),(e.id.indexOf("_Point")>-1||e.id.indexOf("_MultiPoint")>-1)&&n.setAttribute("r",(h/o).toString())}}function Be(e,t,i,o){for(var a,n=0;n<e.childElementCount;n++)if("path"===(a=e.childNodes[n]).tagName){var l=o.layersCollection[t].navigationLineSettings[parseFloat(a.id.split("_NavigationIndex_")[1].split("_")[0])].width;a.setAttribute("stroke-width",(l/i).toString())}}function je(e){for(var t=[],i=e.touches,o=0;o<i.length;o++)t.push({pageX:i[o].pageX,pageY:i[o].pageY});return t}function Ue(e,t){var i=Re(e[0],e[1]);return Re(t[0],t[1])/i}function Re(e,t){var i=e.pageX-t.pageX,o=e.pageY-t.pageY;return Math.sqrt(i*i+o*o)}function De(e,t){var i=t.element.getBoundingClientRect(),o=i.top+document.defaultView.pageXOffset,a=i.left+document.defaultView.pageYOffset;return Array.prototype.slice.call(e).map(function(e){return{x:e.pageX-a,y:e.pageY-o}})}function Ze(e){return{x:e.map(function(e){return e.x}).reduce(Ve)/e.length,y:e.map(function(e){return e.y}).reduce(Ve)/e.length}}function Ve(e,t){return e+t}function He(e,t,i,o,a,n,l){var r=0,s=l.previousPoint,d=l.previousScale,p=a-d,h=new mt(0,0),c=1;if(a===d)return void e.setAttribute("transform","scale( "+a+" ) translate( "+o.x+" "+o.y+" )");var m=function(e,t){return e.x===t.x?null:(t.y-e.y)/(t.x-e.x)}(s,o),u=function(e,t){return null===t?e.x:e.y-t*e.x}(s,m),g=o.x-s.x,y=o.y-s.y;Ge(e,t,i,function(e){e.timeStamp>e.delay&&(r=(e.timeStamp-e.delay)/e.duration,c=d+r*p,h.x=s.x+r*g/(c/a),h.y=null==m?s.y+r*y:m*h.x+u,e.element.setAttribute("transform","scale( "+c+" ) translate( "+h.x+" "+h.y+" )"),l.translatePoint=h,l.scale=c,l.zoomModule.processTemplate(o.x,o.y,c,l))},function(){l.translatePoint=o,l.scale=a,e.setAttribute("transform","scale( "+a+" ) translate( "+o.x+" "+o.y+" )"),l.zoomModule.processTemplate(o.x,o.y,a,l)})}function Ge(e,t,i,o,a){var n,l=this,r=null,s=function(t){r||(r=t);var d=t-r;d<i?(o.call(l,{element:e,delay:0,timeStamp:d,duration:i}),window.requestAnimationFrame(s)):(window.cancelAnimationFrame(n),a.call(l,{element:e}),e.setAttribute("style","visibility:visible"))};n=window.requestAnimationFrame(s)}function We(e,t,i,o){var a=0,n=e.getAttribute("transform").split(" ");2===n.length&&(n[2]=n[1].split(")")[0],n[1]=n[0].split("(")[1]);var l=new mt(parseInt(n[1],10),parseInt(n[2],10)),r=o.x-l.x,s=o.y-l.y,d=new mt(0,0);Ge(e,t,i,function(e){e.timeStamp>e.delay&&(a=(e.timeStamp-e.delay)/e.duration,d.x=l.x+a*r,d.y=l.y+a*s,e.element.setAttribute("transform","translate( "+d.x+" "+d.y+" )"))},function(){e.setAttribute("transform","translate( "+o.x+" "+o.y+" )")})}function qe(e,i){var o=t.isNullOrUndefined(i.shouldZoomPreviousFactor)?null:i.shouldZoomPreviousFactor,a=t.isNullOrUndefined(i.shouldZoomCurrentFactor)?null:i.shouldZoomCurrentFactor;t.isNullOrUndefined(a)?!t.isNullOrUndefined(o)&&t.isNullOrUndefined(a)&&i.shouldZoomPreviousFactor!==e?i.shouldZoomCurrentFactor=e:i.shouldZoomPreviousFactor=e:(i.shouldZoomCurrentFactor=null,i.shouldZoomPreviousFactor=null)}function Xe(e,t,i,o,a,n,l){var r,s,d=l.zoomSettings.maxZoom,p=Math.sin(t*Math.PI/180),c=Math.log((1+p)/(1-p))/2,m=Math.max(Math.min(c,Math.PI),-Math.PI)/2,u=Math.sin(e*Math.PI/180),g=Math.log((1+u)/(1-u))/2,y=Math.max(Math.min(g,Math.PI),-Math.PI)/2;if(l.zoomNotApplied&&!l.isTileMap){var f=Math.abs((l.baseMapBounds.latitude.max-l.baseMapBounds.latitude.min)/(t-e)),b=Math.abs((l.baseMapBounds.longitude.max-l.baseMapBounds.longitude.min)/(o-i));s=Math.min(f,b);h(e,i,1,l.layersCollection[0],l),h(t,o,1,l.layersCollection[0],l)}var v=(m-y)/Math.PI,S=o-i,x=(S<0?S+360:S)/360,O=Math.log(n/256/v)/Math.LN2,M=Math.log(a/256/x)/Math.LN2,_=l.zoomNotApplied&&!l.isTileMap?s:Math.min(O,M);return r=Math.min(_,d),r=l.isTileMap||!l.zoomNotApplied?Math.floor(r):r,l.isTileMap||qe(r,l),r}function Ye(e){var i,o=t.isNullOrUndefined(e.result)?e.actual:e.result;return t.isNullOrUndefined(o.length)?t.isNullOrUndefined(o.Items)||(i=o.Items):i=o,i}function Je(e){var t;switch(e.toLowerCase()){case"tailwind":t=["#0369A1","#14B8A6","#15803D","#334155","#5A61F6","#65A30D","#8B5CF6","#9333EA","#F59E0B","#F97316"];break;case"tailwinddark":t=["#10B981","#22D3EE","#2DD4BF","#4ADE80","#8B5CF6","#E879F9","#F472B6","#F87171","#F97316","#FCD34D"];break;case"bootstrap5":t=["#262E0B","#668E1F","#AF6E10","#862C0B","#1F2D50","#64680B","#311508","#4C4C81","#0C7DA0","#862C0B"];break;case"bootstrap5dark":t=["#5ECB9B","#A860F1","#EBA844","#557EF7","#E9599B","#BFC529","#3BC6CF","#7A68EC","#74B706","#EA6266"];break;case"fluent":t=["#614570","#4C6FB1","#CC6952","#3F579A","#4EA09B","#6E7A89","#D4515C","#E6AF5D","#639751","#9D4D69"];break;case"fluentdark":t=["#8AB113","#2A72D5","#43B786","#584EC6","#E85F9C","#6E7A89","#EA6266","#EBA844","#26BC7A","#BC4870"];break;default:t=["#B5E485","#7BC1E8","#DF819C","#EC9B79","#78D0D3","#D6D572","#9178E3","#A1E5B4","#87A4B4","#E4C16C"]}return t}function Qe(e){var t,i;switch(e.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:i,areaBackgroundColor:i,titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#DADADA",legendTextColor:"#DADADA",dataLabelFontColor:"#DADADA",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",zoomFillColor:"#FFFFFF",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6"};break;case"highcontrast":t={backgroundColor:"#000000",areaBackgroundColor:"#000000",titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#000000",tooltipFontColor:"#000000",tooltipFillColor:"#ffffff",zoomFillColor:"#FFFFFF",fontFamily:"Roboto, Noto, Sans-serif",labelFontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6"};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#5B6269",fontFamily:"HelveticaNeue-Medium",titleFontSize:"16px",legendFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"HelveticaNeue-Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6"};break;case"tailwind":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#374151",subTitleFontColor:"#374151",legendTitleFontColor:"#374151",legendTextColor:"#6B7280",dataLabelFontColor:"#505967",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#111827",zoomFillColor:"#6b7280",fontFamily:"Inter",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#374151",shapeFill:"#E5E7EB"};break;case"tailwinddark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#D1D5DB",subTitleFontColor:"#D1D5DB",legendTitleFontColor:"#D1D5DB",legendTextColor:"#D1D5DB",dataLabelFontColor:"#D1D5DB",tooltipFontColor:"#1F2937",tooltipFillColor:"#F9FAFB",zoomFillColor:"#D1D5DB",fontFamily:"Inter",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#F3F4F6",shapeFill:"#374151"};break;case"bootstrap5":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#212529",zoomFillColor:"#6C757D",fontFamily:"Helvetica Neue",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Helvetica Neue",titleFontWeight:"normal",zoomSelectionColor:"#343A40",shapeFill:"#E9ECEF"};break;case"bootstrap5dark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#212529",tooltipFillColor:"#E9ECEF",zoomFillColor:"#B5BABE",fontFamily:"Helvetica Neue",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Helvetica Neue",titleFontWeight:"normal",zoomSelectionColor:"#DEE2E6",shapeFill:"#495057"};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",subTitleFontColor:"#201F1E",legendTitleFontColor:"#201F1E",legendTextColor:"#201F1E",dataLabelFontColor:"#201F1E",tooltipFontColor:"#323130",tooltipFillColor:"#FFFFFF",zoomFillColor:"#A19F9D",fontFamily:"Segoe UI",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#323130",shapeFill:"#F3F2F1"};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",subTitleFontColor:"#F3F2F1",legendTitleFontColor:"#F3F2F1",legendTextColor:"#F3F2F1",dataLabelFontColor:"#F3F2F1",tooltipFontColor:"#F3F2F1",tooltipFillColor:"#252423",zoomFillColor:"#484644",fontFamily:"Segoe UI",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#F3F2F1",shapeFill:"#252423"};break;default:t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#424242",titleFontSize:"14px",subTitleFontColor:"#424242",legendTitleFontColor:"#757575",legendTextColor:"#757575",dataLabelFontColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#737373",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6"}}return t}var Ke,$e=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),et=function(){function e(e,t){this.width=e,this.height=t}return e}(),tt=function(){function e(e,t){this.x=e,this.y=t}return e}(),it=function(){function e(e,t){this.min=e,this.max=t}return e}(),ot=function(){function e(e,t){this.latitude=new it(e.min,e.max),this.longitude=new it(t.min,t.max)}return e}(),at=function(){function e(e,t,i,o,a,n,l){void 0===n&&(n=""),this.transform="",this.baseLine="auto",this.id=e,this.text=a,this.transform=n,this.anchor=o,this.x=t,this.y=i,this.baseLine=l}return e}(),nt=function(){function e(e,t,i,o,a,n,l,r){this.id=e,this["fill-opacity"]=a,this["stroke-opacity"]=n,this.fill=t,this.stroke=o,this["stroke-width"]=i,this["stroke-dasharray"]=l,this.d=r}return e}(),lt=function(){function e(e,t,i){this.r=e,this.g=t,this.b=i}return e}(),rt=function(e){function t(t,i,o,a,n,l,r,s,d){var p=e.call(this,t,i,o.width,o.color,a,o.opacity)||this;return p.y=n.y,p.x=n.x,p.height=n.height,p.width=n.width,p.rx=l||0,p.ry=r||0,p.transform=s||"",p["stroke-dasharray"]=d,p["fill-opacity"]=a,p["stroke-opacity"]=o.opacity,p}return $e(t,e),t}(nt),st=function(e){function t(t,i,o,a,n,l,r,s){var d=e.call(this,t,i,o.width,o.color,a,o.opacity,s)||this;return d.cy=l,d.cx=n,d.r=r,d["stroke-dasharray"]=s,d["fill-opacity"]=a,d["stroke-opacity"]=o.opacity,d}return $e(t,e),t}(nt),dt=function(e){function t(t,i,o,a,n,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,a,n,l,r,s)||this;return d.points=i,d}return $e(t,e),t}(nt),pt=function(e){function t(t,i,o,a,n,l,r,s){return void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s=""),e.call(this,t,i,o,a,n,l,r,s)||this}return $e(t,e),t}(dt),ht=function(e){function t(t,i,o,a,n,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,a,n,l,r,s)||this;return d.x1=i.x1,d.y1=i.y1,d.x2=i.x2,d.y2=i.y2,d}return $e(t,e),t}(nt),ct=function(){function e(e,t,i,o){this.x1=e,this.y1=t,this.x2=i,this.y2=o}return e}(),mt=function(){function e(e,t){this.x=e,this.y=t}return e}(),ut=function(){function e(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}return e}(),gt=function(){function e(e,t,i,o,a,n,l,r,s){void 0===n&&(n="userSpaceOnUse"),void 0===l&&(l="userSpaceOnUse"),void 0===r&&(r=""),void 0===s&&(s=""),this.id=e,this.x=t,this.y=i,this.width=o,this.height=a,this.patternUnits=n,this.patternContentUnits=l,this.patternTransform=r,this.href=s}return e}(),yt=function(){function e(e,t,i,o,a){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=o,this.sendData=a}return e}();!function(e){e.mapsTitleFont={size:"14px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:null,fontStyle:"Regular",fontFamily:null},e.legendTitleFont={size:"12px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:null},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(Ke||(Ke={}));var ft;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Semibold",color:"#424242",fontStyle:"Semibold",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Regular",color:"#424242",fontStyle:"Regular",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#757575",fontStyle:"Regular",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#757575",fontStyle:"Medium",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"}}(ft||(ft={}));var bt;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Semibold",color:"#424242",fontStyle:"Semibold",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Regular",color:"#424242",fontStyle:"Regular",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#757575",fontStyle:"Regular",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#757575",fontStyle:"Medium",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"}}(bt||(bt={}));var vt;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#000000",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto, Noto, Sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(vt||(vt={}));var St;!function(e){e.mapsTitleFont={fontFamily:"Roboto, Noto, Sans-serif",fontWeight:"Medium",size:"14px",fontStyle:"Medium",color:"#FFFFFF"},e.mapsSubTitleFont={size:"13px",color:"#FFFFFF",fontWeight:"Medium",fontFamily:"Roboto, Noto, Sans-serif",fontStyle:"Medium"},e.tooltipLabelFont={size:"12px",color:"#282727",fontWeight:"Regular",fontFamily:"Roboto",fontStyle:"Regular"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto, Noto, Sans-serif"},e.legendLabelFont={size:"13px",fontFamily:"Roboto, Noto, Sans-serif",fontWeight:"Medium",color:"#DADADA",fontStyle:"Medium"}}(St||(St={}));var xt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Ot=function(e,t,i,o){var a,n=arguments.length,l=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(l=(n<3?a(l):n>3?a(t,i,l):a(t,i))||l);return n>3&&l&&Object.defineProperty(t,i,l),l},Mt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("")],i.prototype,"content",void 0),Ot([t.Property("0px")],i.prototype,"x",void 0),Ot([t.Property("0px")],i.prototype,"y",void 0),Ot([t.Property("None")],i.prototype,"verticalAlignment",void 0),Ot([t.Property("None")],i.prototype,"horizontalAlignment",void 0),Ot([t.Property("-1")],i.prototype,"zIndex",void 0),i}(t.ChildProperty),_t=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("Start")],i.prototype,"position",void 0),Ot([t.Property("false")],i.prototype,"showArrow",void 0),Ot([t.Property(2)],i.prototype,"size",void 0),Ot([t.Property("black")],i.prototype,"color",void 0),Ot([t.Property(0)],i.prototype,"offSet",void 0),i}(t.ChildProperty),Lt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("12px")],i.prototype,"size",void 0),Ot([t.Property(null)],i.prototype,"color",void 0),Ot([t.Property("Roboto, Noto, Sans-serif")],i.prototype,"fontFamily",void 0),Ot([t.Property("Medium")],i.prototype,"fontWeight",void 0),Ot([t.Property("Medium")],i.prototype,"fontStyle",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Ct=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("")],i.prototype,"color",void 0),Ot([t.Property(0)],i.prototype,"width",void 0),Ot([t.Property(null)],i.prototype,"opacity",void 0),i}(t.ChildProperty),wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"latitude",void 0),Ot([t.Property(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),Pt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Property("")],i.prototype,"template",void 0),Ot([t.Property("")],i.prototype,"fill",void 0),Ot([t.Complex({color:"transparent",width:1},Ct)],i.prototype,"border",void 0),Ot([t.Complex(Ke.tooltipLabelFont,Lt)],i.prototype,"textStyle",void 0),Ot([t.Property(null)],i.prototype,"format",void 0),Ot([t.Property(null)],i.prototype,"valuePath",void 0),i}(t.ChildProperty),It=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(10)],i.prototype,"left",void 0),Ot([t.Property(10)],i.prototype,"right",void 0),Ot([t.Property(10)],i.prototype,"top",void 0),Ot([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),Tt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("#000000")],i.prototype,"color",void 0),Ot([t.Property(1)],i.prototype,"width",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Nt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"allowClustering",void 0),Ot([t.Complex({color:"transparent",width:1},Ct)],i.prototype,"border",void 0),Ot([t.Property("#D2691E")],i.prototype,"fill",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property("Rectangle")],i.prototype,"shape",void 0),Ot([t.Property(12)],i.prototype,"width",void 0),Ot([t.Property(12)],i.prototype,"height",void 0),Ot([t.Property(new tt(0,0))],i.prototype,"offset",void 0),Ot([t.Property("")],i.prototype,"imageUrl",void 0),Ot([t.Property("")],i.prototype,"dashArray",void 0),Ot([t.Complex({},Lt)],i.prototype,"labelStyle",void 0),Ot([t.Property(!1)],i.prototype,"allowClusterExpand",void 0),Ot([t.Complex({},Tt)],i.prototype,"connectorLineSettings",void 0),i}(t.ChildProperty),kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xt(t,e),t}(t.ChildProperty),Ft=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"from",void 0),Ot([t.Property(null)],i.prototype,"to",void 0),Ot([t.Property(null)],i.prototype,"value",void 0),Ot([t.Property(null)],i.prototype,"color",void 0),Ot([t.Property(null)],i.prototype,"minOpacity",void 0),Ot([t.Property(null)],i.prototype,"maxOpacity",void 0),Ot([t.Property(null)],i.prototype,"label",void 0),Ot([t.Property(!0)],i.prototype,"showLegend",void 0),i}(t.ChildProperty),Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"latitude",void 0),Ot([t.Property(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),At=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"shapePath",void 0),Ot([t.Property(null)],i.prototype,"shapeValue",void 0),i}(t.ChildProperty),zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"enable",void 0),Ot([t.Property(null)],i.prototype,"fill",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property(!1)],i.prototype,"enableMultiSelect",void 0),Ot([t.Complex({color:"transparent",width:0},Ct)],i.prototype,"border",void 0),i}(t.ChildProperty),Bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"fill",void 0),Ot([t.Property(!1)],i.prototype,"enable",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Complex({color:"transparent",width:0},Ct)],i.prototype,"border",void 0),i}(t.ChildProperty),jt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Property(1)],i.prototype,"width",void 0),Ot([t.Property(null)],i.prototype,"longitude",void 0),Ot([t.Property(null)],i.prototype,"latitude",void 0),Ot([t.Property("")],i.prototype,"dashArray",void 0),Ot([t.Property("black")],i.prototype,"color",void 0),Ot([t.Property(0)],i.prototype,"angle",void 0),Ot([t.Complex({showArrow:!1,position:"Start",size:5,color:"black"},_t)],i.prototype,"arrowSettings",void 0),Ot([t.Complex({},zt)],i.prototype,"selectionSettings",void 0),Ot([t.Complex({},Bt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),Ut=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Complex({},Ct)],i.prototype,"border",void 0),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Property([])],i.prototype,"dataSource",void 0),Ot([t.Property()],i.prototype,"query",void 0),Ot([t.Property(1e3)],i.prototype,"animationDuration",void 0),Ot([t.Property(0)],i.prototype,"animationDelay",void 0),Ot([t.Property("")],i.prototype,"fill",void 0),Ot([t.Property(10)],i.prototype,"minRadius",void 0),Ot([t.Property(20)],i.prototype,"maxRadius",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property(null)],i.prototype,"valuePath",void 0),Ot([t.Property("Circle")],i.prototype,"bubbleType",void 0),Ot([t.Property(null)],i.prototype,"colorValuePath",void 0),Ot([t.Collection([],Ft)],i.prototype,"colorMapping",void 0),Ot([t.Complex({},Pt)],i.prototype,"tooltipSettings",void 0),Ot([t.Complex({},zt)],i.prototype,"selectionSettings",void 0),Ot([t.Complex({},Bt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),Rt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("")],i.prototype,"text",void 0),Ot([t.Property("")],i.prototype,"description",void 0),i}(t.ChildProperty),Dt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Complex({size:null,fontWeight:null,fontFamily:null},Lt)],i.prototype,"textStyle",void 0),Ot([t.Property("Center")],i.prototype,"alignment",void 0),i}(Rt),Zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Complex({size:null,fontWeight:null,fontFamily:null},Lt)],i.prototype,"textStyle",void 0),Ot([t.Property("Center")],i.prototype,"alignment",void 0),Ot([t.Complex({},Dt)],i.prototype,"subtitleSettings",void 0),i}(Rt),Vt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"enable",void 0),Ot([t.Property(!0)],i.prototype,"enablePanning",void 0),Ot([t.Property(!0)],i.prototype,"enableSelectionZooming",void 0),Ot([t.Property("Horizontal")],i.prototype,"toolBarOrientation",void 0),Ot([t.Property(null)],i.prototype,"color",void 0),Ot([t.Property(null)],i.prototype,"highlightColor",void 0),Ot([t.Property(null)],i.prototype,"selectionColor",void 0),Ot([t.Property("Far")],i.prototype,"horizontalAlignment",void 0),Ot([t.Property("Near")],i.prototype,"verticalAlignment",void 0),Ot([t.Property(["ZoomIn","ZoomOut","Reset"])],i.prototype,"toolbars",void 0),Ot([t.Property(!0)],i.prototype,"mouseWheelZoom",void 0),Ot([t.Property(!1)],i.prototype,"doubleClickZoom",void 0),Ot([t.Property(!1)],i.prototype,"pinchZooming",void 0),Ot([t.Property(!1)],i.prototype,"zoomOnClick",void 0),Ot([t.Property(1)],i.prototype,"zoomFactor",void 0),Ot([t.Property(10)],i.prototype,"maxZoom",void 0),Ot([t.Property(1)],i.prototype,"minZoom",void 0),Ot([t.Property(!1)],i.prototype,"shouldZoomInitially",void 0),Ot([t.Property(!0)],i.prototype,"resetToInitial",void 0),i}(t.ChildProperty),Ht=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"enable",void 0),Ot([t.Property(!0)],i.prototype,"applyShapeSettings",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property("")],i.prototype,"fill",void 0),Ot([t.Complex({color:"",width:0},Ct)],i.prototype,"border",void 0),i}(t.ChildProperty),Gt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"useMarkerShape",void 0),Ot([t.Property(!1)],i.prototype,"toggleVisibility",void 0),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Property("transparent")],i.prototype,"background",void 0),Ot([t.Property("Layers")],i.prototype,"type",void 0),Ot([t.Property(!1)],i.prototype,"invertedPointer",void 0),Ot([t.Property("After")],i.prototype,"labelPosition",void 0),Ot([t.Property("None")],i.prototype,"labelDisplayMode",void 0),Ot([t.Property("Circle")],i.prototype,"shape",void 0),Ot([t.Property("")],i.prototype,"width",void 0),Ot([t.Property("")],i.prototype,"height",void 0),Ot([t.Complex({fontFamily:null},Lt)],i.prototype,"textStyle",void 0),Ot([t.Property(15)],i.prototype,"shapeWidth",void 0),Ot([t.Property(15)],i.prototype,"shapeHeight",void 0),Ot([t.Property(10)],i.prototype,"shapePadding",void 0),Ot([t.Complex({color:"#000000",width:0},Ct)],i.prototype,"border",void 0),Ot([t.Complex({color:"#000000",width:0},Ct)],i.prototype,"shapeBorder",void 0),Ot([t.Complex({},Rt)],i.prototype,"title",void 0),Ot([t.Complex({size:Ke.legendTitleFont.size,color:Ke.legendTitleFont.color,fontStyle:Ke.legendTitleFont.fontStyle,fontWeight:Ke.legendTitleFont.fontWeight,fontFamily:null},Lt)],i.prototype,"titleStyle",void 0),Ot([t.Property("Bottom")],i.prototype,"position",void 0),Ot([t.Property("Center")],i.prototype,"alignment",void 0),Ot([t.Property("None")],i.prototype,"orientation",void 0),Ot([t.Property({x:0,y:0})],i.prototype,"location",void 0),Ot([t.Property(null)],i.prototype,"fill",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property("Default")],i.prototype,"mode",void 0),Ot([t.Property(null)],i.prototype,"showLegendPath",void 0),Ot([t.Property(null)],i.prototype,"valuePath",void 0),Ot([t.Property(!1)],i.prototype,"removeDuplicateLegend",void 0),Ot([t.Complex({},Ht)],i.prototype,"toggleLegendSettings",void 0),i}(t.ChildProperty),Wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Complex({width:0,color:"transparent"},Ct)],i.prototype,"border",void 0),Ot([t.Property("black")],i.prototype,"fill",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property(5)],i.prototype,"rx",void 0),Ot([t.Property(5)],i.prototype,"ry",void 0),Ot([t.Complex({},Lt)],i.prototype,"textStyle",void 0),Ot([t.Property("")],i.prototype,"labelPath",void 0),Ot([t.Property("None")],i.prototype,"smartLabelMode",void 0),Ot([t.Property("None")],i.prototype,"intersectionAction",void 0),Ot([t.Property("")],i.prototype,"template",void 0),i}(t.ChildProperty),qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"fill",void 0),Ot([t.Property([])],i.prototype,"palette",void 0),Ot([t.Property(5)],i.prototype,"circleRadius",void 0),Ot([t.Complex({width:null,color:"#000000"},Ct)],i.prototype,"border",void 0),Ot([t.Property("")],i.prototype,"dashArray",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property(null)],i.prototype,"colorValuePath",void 0),Ot([t.Property(null)],i.prototype,"borderColorValuePath",void 0),Ot([t.Property(null)],i.prototype,"borderWidthValuePath",void 0),Ot([t.Property(null)],i.prototype,"valuePath",void 0),Ot([t.Collection([],Ft)],i.prototype,"colorMapping",void 0),Ot([t.Property(!1)],i.prototype,"autofill",void 0),i}(t.ChildProperty),Xt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Complex({color:"transparent",width:1},Ct)],i.prototype,"border",void 0),Ot([t.Property(null)],i.prototype,"dashArray",void 0),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Property("#FF471A")],i.prototype,"fill",void 0),Ot([t.Property(10)],i.prototype,"height",void 0),Ot([t.Property(10)],i.prototype,"width",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property(null)],i.prototype,"colorValuePath",void 0),Ot([t.Property(null)],i.prototype,"shapeValuePath",void 0),Ot([t.Property(null)],i.prototype,"imageUrlValuePath",void 0),Ot([t.Property("Balloon")],i.prototype,"shape",void 0),Ot([t.Property("")],i.prototype,"legendText",void 0),Ot([t.Property(new tt(0,0))],i.prototype,"offset",void 0),Ot([t.Property("")],i.prototype,"imageUrl",void 0),Ot([t.Property(null)],i.prototype,"template",void 0),Ot([t.Property([])],i.prototype,"dataSource",void 0),Ot([t.Property()],i.prototype,"query",void 0),Ot([t.Complex({},Pt)],i.prototype,"tooltipSettings",void 0),Ot([t.Property(1e3)],i.prototype,"animationDuration",void 0),Ot([t.Property(0)],i.prototype,"animationDelay",void 0),Ot([t.Complex({},zt)],i.prototype,"selectionSettings",void 0),Ot([t.Complex({},Bt)],i.prototype,"highlightSettings",void 0),Ot([t.Property(null)],i.prototype,"latitudeValuePath",void 0),Ot([t.Property(null)],i.prototype,"longitudeValuePath",void 0),Ot([t.Collection([],Et)],i.prototype,"initialMarkerSelection",void 0),i}(t.ChildProperty),Yt=function(e){function t(t,i,o,a){return e.call(this,t,i,o,a)||this}return xt(t,e),t}(Xt),Jt=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isBaseLayer=!1,t}return xt(i,e),Ot([t.Property(null)],i.prototype,"shapeData",void 0),Ot([t.Property()],i.prototype,"query",void 0),Ot([t.Complex({},qt)],i.prototype,"shapeSettings",void 0),Ot([t.Property([])],i.prototype,"dataSource",void 0),Ot([t.Property("Layer")],i.prototype,"type",void 0),Ot([t.Property("Geographic")],i.prototype,"geometryType",void 0),Ot([t.Property("Aerial")],i.prototype,"bingMapType",void 0),Ot([t.Property("RoadMap")],i.prototype,"staticMapType",void 0),Ot([t.Property("")],i.prototype,"key",void 0),Ot([t.Property("Geometry")],i.prototype,"layerType",void 0),Ot([t.Property("")],i.prototype,"urlTemplate",void 0),Ot([t.Property(!0)],i.prototype,"visible",void 0),Ot([t.Property("name")],i.prototype,"shapeDataPath",void 0),Ot([t.Property("name")],i.prototype,"shapePropertyPath",void 0),Ot([t.Property(0)],i.prototype,"animationDuration",void 0),Ot([t.Collection([],Yt)],i.prototype,"markerSettings",void 0),Ot([t.Complex({},Nt)],i.prototype,"markerClusterSettings",void 0),Ot([t.Complex({},Wt)],i.prototype,"dataLabelSettings",void 0),Ot([t.Collection([],Ut)],i.prototype,"bubbleSettings",void 0),Ot([t.Collection([],jt)],i.prototype,"navigationLineSettings",void 0),Ot([t.Complex({},Pt)],i.prototype,"tooltipSettings",void 0),Ot([t.Complex({},zt)],i.prototype,"selectionSettings",void 0),Ot([t.Complex({},Bt)],i.prototype,"highlightSettings",void 0),Ot([t.Complex({},Ht)],i.prototype,"toggleLegendSettings",void 0),Ot([t.Collection([],At)],i.prototype,"initialShapeSelection",void 0),i}(t.ChildProperty),Qt=function(){function e(e,t,i,o,a,n,l){void 0===i&&(i=256),void 0===o&&(o=256),void 0===a&&(a=0),void 0===n&&(n=0),void 0===l&&(l=null),this.x=e,this.y=t,this.top=a,this.left=n,this.height=i,this.width=o,this.src=l}return e}(),Kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"background",void 0),Ot([t.Complex({color:"transparent",width:1},Ct)],i.prototype,"border",void 0),i}(t.ChildProperty),$t=function(){function e(e){this.maps=e,this.trackElements=[],this.sameMarkerData=[]}return e.prototype.markerRender=function(e,i,o,a){var n=this,l=0,r=0,s=0;this.maps.translateType="marker";var d=this.maps.layersCollection[i];this.markerSVGObject=this.maps.renderer.createGroup({id:this.maps.element.id+"_Markers_Group",class:"GroupElement",style:"pointer-events: auto;"});var p=t.createElement("div",{id:this.maps.element.id+"_LayerIndex_"+i+"_Markers_Template_Group",className:this.maps.element.id+"_template",styles:"overflow: hidden; position: absolute;pointer-events: none;top:"+this.maps.mapAreaRect.y+"px;left:"+this.maps.mapAreaRect.x+"px;height:"+this.maps.mapAreaRect.height+"px;width:"+this.maps.mapAreaRect.width+"px;"});d.markerSettings.map(function(m,u){var g=m.dataSource;Array.prototype.forEach.call(g,function(y,f){n.maps.markerNullCount=u>0&&0===f?0:n.maps.markerNullCount;var b={cancel:!1,name:ti,fill:m.fill,height:m.height,width:m.width,imageUrl:m.imageUrl,shape:m.shape,template:m.template,data:y,maps:n.maps,marker:m,border:m.border,colorValuePath:m.colorValuePath,shapeValuePath:m.shapeValuePath,imageUrlValuePath:m.imageUrlValuePath};n.maps.trigger("markerRendering",b,function(v){b=I(b,y),b=T(b,y);var S=t.isNullOrUndefined(m.longitudeValuePath)?t.isNullOrUndefined(y.longitude)?t.isNullOrUndefined(y.Longitude)?null:parseFloat(y.Longitude):parseFloat(y.longitude):Number(P(y,m.longitudeValuePath)),x=t.isNullOrUndefined(m.latitudeValuePath)?t.isNullOrUndefined(y.latitude)?t.isNullOrUndefined(y.Latitude)?null:parseFloat(y.Latitude):parseFloat(y.latitude):Number(P(y,m.latitudeValuePath)),O=m.offset;if(!b.cancel&&m.visible&&!t.isNullOrUndefined(S)&&!t.isNullOrUndefined(x)){var M=n.maps.element.id+"_LayerIndex_"+i+"_MarkerIndex_"+u+"_dataIndex_"+f,_=n.maps.isTileMap?c(new mt(S,x),o,n.maps.tileTranslatePoint,!0):h(x,S,o,d,n.maps),L=0!==d.animationDuration||t.isNullOrUndefined(n.maps.zoomModule),C=n.maps.isTileMap?"SubLayer"===d.type&&t.isNullOrUndefined(n.maps.zoomModule)?_=c(new mt(S,x),n.maps.tileZoomLevel,n.maps.tileTranslatePoint,!0):new Object:!t.isNullOrUndefined(n.maps.zoomModule)&&n.maps.zoomSettings.zoomFactor>1?ce(n.maps,d,L):he(n.maps,d,L),w="AddMarker"===a?n.maps.scale:C.scale,k="AddMarker"===a?n.maps.translatePoint:C.location;!b.template||isNaN(_.x)||isNaN(_.y)?b.template||isNaN(_.x)||isNaN(_.y)||(l++,E(b,m,g,f,_,k,M,O,w,n.maps,n.markerSVGObject)):(s++,A(b,void 0,M,y,u,p,_,k,w,O,n.maps),n.maps.renderReactTemplates())}r+=isNaN(x)||isNaN(S)?1:0,s+=b.cancel?1:0,l+=b.cancel?1:0,n.maps.markerNullCount=t.isNullOrUndefined(S)||t.isNullOrUndefined(x)?n.maps.markerNullCount+1:n.maps.markerNullCount;var F=g.length-n.maps.markerNullCount;n.markerSVGObject.childElementCount===F-s-r&&"Template"!==a&&(e.appendChild(n.markerSVGObject),d.markerClusterSettings.allowClustering&&(n.maps.svgObject.appendChild(n.markerSVGObject),n.maps.element.appendChild(n.maps.svgObject),("OSM"===d.layerType||-1!==d.urlTemplate.indexOf("openstreetmap")&&t.isNullOrUndefined(d.shapeData))&&n.maps.zoomSettings.enable?e.appendChild(n.markerSVGObject):N(d,n.markerSVGObject,n.maps,i,n.markerSVGObject,e,!0,!1),n.maps.renderReactTemplates())),p.childElementCount===F-l-r&&ue(n.maps.element.id+"_Secondary_Element")&&(ue(n.maps.element.id+"_Secondary_Element").appendChild(p),n.maps.checkInitialRender&&d.markerClusterSettings.allowClustering&&(N(d,p,n.maps,i,n.markerSVGObject,e,!1,!1),n.maps.renderReactTemplates()))})})})},e.prototype.calculateIndividualLayerMarkerZoomLevel=function(e,t,i){var o,a,n=Math.abs(this.maps.baseMapBounds.latitude.max-this.maps.baseMapBounds.latitude.min),l=Math.abs(this.maps.baseMapBounds.longitude.max-this.maps.baseMapBounds.longitude.min);o=(o=Math.floor(Math.log(t/n)))>i?i:o,a=(a=Math.floor(Math.log(e/l)))>i?i:a;var r=Math.min(o,a),s=Math.min(r,i-1);return this.maps.isTileMap||qe(s,this.maps),s},e.prototype.calculateZoomCenterPositionAndFactor=function(e){if(this.maps.zoomSettings.shouldZoomInitially&&this.maps.markerModule){var i,o,a,n,l=void 0,r=void 0,s=void 0,d=this.maps.zoomSettings.maxZoom,p=this.maps.mapAreaRect.width,h=this.maps.mapAreaRect.height;if(this.maps.markerZoomedState=this.maps.markerZoomedState?this.maps.markerZoomedState:t.isNullOrUndefined(this.maps.markerZoomFactor)?!this.maps.markerZoomedState:this.maps.markerZoomFactor>1?this.maps.markerZoomedState:!this.maps.markerZoomedState,this.maps.defaultState=this.maps.markerZoomedState?!this.maps.markerZoomedState:this.maps.defaultState,Array.prototype.forEach.call(e,function(e,l){0!==e.markerSettings.length&&Array.prototype.forEach.call(e.markerSettings,function(e,l){var r=e.dataSource;Array.prototype.forEach.call(r,function(e,l){var r=t.isNullOrUndefined(e.latitude)?t.isNullOrUndefined(e.Latitude)?null:parseFloat(e.Latitude):parseFloat(e.latitude),s=t.isNullOrUndefined(e.longitude)?t.isNullOrUndefined(e.Longitude)?null:parseFloat(e.Longitude):parseFloat(e.longitude);i=t.isNullOrUndefined(i)&&0===l?s:i,o=t.isNullOrUndefined(o)&&0===l?r:o,a=t.isNullOrUndefined(a)&&0===l?r:a,n=t.isNullOrUndefined(n)&&0===l?s:n,i>s&&(i=s),a>r&&(a=r),n<s&&(n=s),o<r&&(o=r)})})}),!(t.isNullOrUndefined(a)||t.isNullOrUndefined(i)||t.isNullOrUndefined(n)||t.isNullOrUndefined(o))){r=(a+o)/2,s=(i+n)/2,this.maps.markerCenterLatitude=r,this.maps.markerCenterLongitude=s,(t.isNullOrUndefined(this.maps.markerZoomCenterPoint)||this.maps.markerZoomedState)&&(this.maps.markerZoomCenterPoint={latitude:r,longitude:s});var c=void 0;this.maps.isTileMap||0===this.maps.baseMapRectBounds.min.x?(l=Xe(a,o,i,n,p,h,this.maps),this.maps.isTileMap?c=t.isNullOrUndefined(this.maps.markerZoomFactor)?l:t.isNullOrUndefined(this.maps.mapScaleValue)?l:this.maps.mapScaleValue>1&&1!==this.maps.markerZoomFactor?this.maps.mapScaleValue:l:(c=t.isNullOrUndefined(this.maps.mapScaleValue)?l:1!==Math.floor(this.maps.scale)&&this.maps.mapScaleValue!==l&&t.isNullOrUndefined(this.maps.shouldZoomCurrentFactor)?this.maps.mapScaleValue:l)!==this.maps.mapScaleValue||1!==this.maps.markerZoomFactor&&1!==this.maps.mapScaleValue||this.maps.enablePersistence||(c=l)):(l=this.calculateIndividualLayerMarkerZoomLevel(p,h,d),c=t.isNullOrUndefined(this.maps.mapScaleValue)?l:this.maps.mapScaleValue!==l?this.maps.mapScaleValue:l),this.maps.markerZoomFactor=c}}else this.maps.markerZoomedState=!1,this.maps.markerZoomFactor>1&&(this.maps.markerCenterLatitude=null,this.maps.markerCenterLongitude=null,this.maps.markerZoomFactor=1,this.maps.enablePersistence||(this.maps.mapScaleValue=1)),this.maps.isTileMap&&!this.maps.enablePersistence&&this.maps.mapScaleValue<=1&&(this.maps.tileZoomLevel=0===this.maps.mapScaleValue?1:this.maps.mapScaleValue,1===this.maps.mapScaleValue&&1===this.maps.markerZoomFactor&&(this.maps.tileTranslatePoint.x=0,this.maps.tileTranslatePoint.y=0))},e.prototype.markerClick=function(e){var i=e.target.id;if(!(-1===i.indexOf("_LayerIndex_")||i.indexOf("_cluster_")>0)){var o=this.getMarker(i);if(!t.isNullOrUndefined(o)){var a={cancel:!1,name:oi,data:o.data,maps:this.maps,marker:o.marker,target:i,x:e.clientX,y:e.clientY,latitude:o.data.latitude||o.data.Latitude,longitude:o.data.longitude||o.data.Longitude,value:o.data.name};this.maps.trigger(oi,a)}}},e.prototype.markerClusterClick=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")&&-1!==i.indexOf("_cluster_")){var o=this.getMarker(i);if(!t.isNullOrUndefined(o)){o.clusterCollection.length>0&&this.maps.markerClusterExpand&&(be(this.maps.element.id+"_mapsTooltip")&&this.maps.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&de(this.maps.element.id+"_mapsTooltip"),this.sameMarkerData.length>0&&!this.maps.markerClusterExpandCheck?(this.maps.markerClusterExpandCheck=!0,k(this.sameMarkerData,this.maps,this.markerSVGObject)):(this.sameMarkerData=o.clusterCollection,this.maps.markerClusterExpandCheck=!1,F(this.sameMarkerData,this.maps,this.markerSVGObject,!0)));var a={cancel:!1,name:ai,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY,latitude:o.data.latitude||o.data.Latitude,longitude:o.data.longitude||o.data.Longitude,markerClusterCollection:o.markCollection};this.maps.trigger(ai,a)}}},e.prototype.getMarker=function(e){var t,i,o=e.split("_LayerIndex_"),a=parseInt(o[1].split("_")[0],10),n=this.maps.layers[a],l=[],r=[];if(this.maps.markerClusterExpand=n.markerClusterSettings.allowClusterExpand,e.indexOf("_MarkerIndex_")>-1){var s=parseInt(o[1].split("_MarkerIndex_")[1].split("_")[0],10),d=parseInt(o[1].split("_dataIndex_")[1].split("_")[0],10);if(i=n.markerSettings[s],!isNaN(s)){t=i.dataSource[d];var p=[];if(!i.template&&e.indexOf("_cluster_")>-1&&this.maps.layers[a].markerClusterSettings.allowClusterExpand&&Array.prototype.forEach.call(i.dataSource,function(e,i){e.latitude===t.latitude&&e.longitude===t.longitude&&p.push({data:t,index:i})}),e.indexOf("_cluster_")>-1){var h=document.getElementById(e.indexOf("_datalabel_")>-1?e.split("_datalabel_")[0]:e),c="Balloon"===n.markerClusterSettings.shape?h.children[0].innerHTML.split(",").map(Number):h.innerHTML.split(",").map(Number);p=[];for(var m=0,u=c;m<u.length;m++){var g=u[m];p.push({data:i.dataSource[g],index:g}),l.push(i.dataSource[g])}!1,r.push({data:p,layerIndex:a,markerIndex:s,dataIndex:d,targetClusterIndex:+(e.split("_cluster_")[1].indexOf("_datalabel_")>-1?e.split("_cluster_")[1].split("_datalabel_")[0]:e.split("_cluster_")[1]),isClusterSame:!1})}return{marker:i,data:t,clusterCollection:r,markCollection:l}}}return null},e.prototype.markerMove=function(e){var i=e.target.id;if(!(-1===i.indexOf("_LayerIndex_")||i.indexOf("_cluster_")>0)){var o=this.getMarker(i);if(!t.isNullOrUndefined(o)){var a={cancel:!1,name:ni,data:o.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(ni,a)}}},e.prototype.markerClusterMouseMove=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")&&-1!==i.indexOf("_cluster_")){var o=this.getMarker(i);if(this.maps.markerClusterExpand&&e.target.setAttribute("style","cursor: pointer"),!t.isNullOrUndefined(o)){var a={cancel:!1,name:li,data:o.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(li,a)}}},e.prototype.getModuleName=function(){return"Marker"},e.prototype.destroy=function(e){},e}(),ei="click",ti="markerRendering",ii="markerClusterRendering",oi="markerClick",ai="markerClusterClick",ni="markerMouseMove",li="markerClusterMouseMove",ri="animationComplete",si="itemSelection",di=function(){function e(e){this.maps=e}return e.prototype.getBingMap=function(e,i,o,a,n,l){for(var r="",s=Math.min(this.maps.tileZoomLevel,parseInt(this.maxZoom,10));s>0;s--){var d=0,p=1<<s-1;0!=(e.x&p)&&d++,0!=(e.y&p)&&(d+=2),r=r+""+d}if(t.isNullOrUndefined(l))return"";var h=l[Math.min(parseInt(r.substr(r.length-1,1),10),l.length)];return n=n.replace("{quadkey}",r).replace("{subdomain}",h),n+="&mkt="+a+"&ur=IN&Key="+i},e}(),pi=function(){function e(e){this.maps=e}return e.prototype.getShapeColorMapping=function(e,i,o){var a=e.colorValuePath?e.colorValuePath:e.valuePath,n=t.isNullOrUndefined(a)?i[a]:a.indexOf(".")>-1?P(i,a):i[a],l=Number(n),r=this.getColorByValue(e.colorMapping,l,n);return t.isNullOrUndefined(r)?o:r},e.prototype.getColorByValue=function(e,i,o){if(isNaN(i)&&t.isNullOrUndefined(o))return null;for(var a,n="",l=0,r=e;l<r.length;l++){var s=r[l];(!t.isNullOrUndefined(s.from)&&!t.isNullOrUndefined(s.to)&&i>=s.from&&i<=s.to||s.value===o)&&(n="[object Array]"===Object.prototype.toString.call(s.color)?t.isNullOrUndefined(s.value)?this.getColor(s,i):s.color[0]:s.color),(i>=s.from&&i<=s.to||s.value===o)&&!t.isNullOrUndefined(s.minOpacity)&&!t.isNullOrUndefined(s.maxOpacity)&&n&&(a=this.deSaturationColor(s,n,i,o)),(""===n||t.isNullOrUndefined(n))&&t.isNullOrUndefined(s.from)&&t.isNullOrUndefined(s.to)&&t.isNullOrUndefined(s.minOpacity)&&t.isNullOrUndefined(s.maxOpacity)&&t.isNullOrUndefined(s.value)&&(n="[object Array]"===Object.prototype.toString.call(s.color)?s.color[0]:s.color)}return{fill:n||(e.length?null:o),opacity:a}},e.prototype.deSaturationColor=function(e,t,i,o){var a=1;return(i>=e.from&&i<=e.to||e.value===o)&&(a=(isNaN(i)?e.from/(e.to-e.from):(i-e.from)/(e.to-e.from))*(e.maxOpacity-e.minOpacity)+e.minOpacity),a},e.prototype.rgbToHex=function(e,t,i){return"#"+this.componentToHex(e)+this.componentToHex(t)+this.componentToHex(i)},e.prototype.componentToHex=function(e){var t=e.toString(16);return 1===t.length?"0"+t:t},e.prototype.getColor=function(e,t){var i,o="";return Number(t)===e.from?o=e.color[0]:Number(t)===e.to?o=e.color[e.color.length-1]:(i=this.getGradientColor(Number(t),e),o=this.rgbToHex(i.r,i.g,i.b)),o},e.prototype.getGradientColor=function(e,t){var i=t.from,o=t.to,a=0,n=o-i;a=(e-i)/n;var l,r;if(t.color.length<=2)l="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),r="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);else{l="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),r="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);for(var s=n/(t.color.length-1),d=t.color.length-1,p=[],h={},c=1;c<d;c++)h={b:i+c*s,color:t.color[c]},p.push(h);for(var m=0;m<p.length;m++)i<=e&&e<=p[m].b&&0===m?(r="#"===p[m].color.charAt(0)?p[m].color:this._colorNameToHex(p[m].color),a=e<p[m].b?1-Math.abs((e-p[m].b)/s):(e-p[m].b)/s):p[m].b<=e&&e<=o&&m===p.length-1&&(l="#"===p[m].color.charAt(0)?p[m].color:this._colorNameToHex(p[m].color),a=e<p[m].b?1-Math.abs((e-p[m].b)/s):(e-p[m].b)/s),m!==p.length-1&&m<p.length&&p[m].b<=e&&e<=p[m+1].b&&(l="#"===p[m].color.charAt(0)?p[m].color:this._colorNameToHex(p[m].color),r="#"===p[m+1].color.charAt(0)?p[m+1].color:this._colorNameToHex(p[m+1].color),a=Math.abs(e-p[m+1].b)/s)}return this.getPercentageColor(a,l,r)},e.prototype.getPercentageColor=function(e,t,i){var o=i.split("#")[1],a=t.split("#")[1],n=this.getPercentage(e,parseInt(a.substr(0,2),16),parseInt(o.substr(0,2),16)),l=this.getPercentage(e,parseInt(a.substr(2,2),16),parseInt(o.substr(2,2),16)),r=this.getPercentage(e,parseInt(a.substr(4,2),16),parseInt(o.substr(4,2),16));return new lt(n,l,r)},e.prototype.getPercentage=function(e,t,i){var o=i-t;return Math.round(t+o*e)},e.prototype._colorNameToHex=function(e){var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",orchid:"#da70d6",papayawhip:"#ffefd5",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"[object Array]"===Object.prototype.toString.call(e)?e:void 0!==t[e.toLowerCase()]?t[e.toLowerCase()]:e},e}(),hi=function(){function e(e){this.isMapCoordinates=!0,this.horizontalPan=!1,this.horizontalPanXCount=0,this.mapObject=e,this.ajaxModule=new t.Ajax,this.ajaxResponse=[]}return e.prototype.measureLayerPanel=function(){var e=this,i=this.mapObject.layersCollection,o=this.mapObject.mapAreaRect,a=ue(this.mapObject.element.id+"_Secondary_Element");if(this.mapObject.isTileMap&&a){this.tileSvgObject=this.mapObject.renderer.createSvg({id:this.mapObject.element.id+"_Tile_SVG",width:o.width,height:o.height});var n=t.createElement("div",{id:this.mapObject.element.id+"_Tile_SVG_Parent",styles:"position: absolute; height: "+o.height+"px; width: "+o.width+"px;"});n.appendChild(this.tileSvgObject),a.appendChild(n)}if(this.layerGroup=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_Layer_Collections","clip-path":"url(#"+this.mapObject.element.id+"_MapArea_ClipRect)"}),"GoogleStaticMap"===this.mapObject.layers[this.mapObject.baseLayerIndex].layerType){this.clipRectElement=this.mapObject.renderer.drawClipPath(new rt(this.mapObject.element.id+"_MapArea_ClipRect","transparent",{width:1,color:"Gray"},1,{x:(o.width-640)/2,y:0,width:640,height:o.height}))}else this.clipRectElement=this.mapObject.renderer.drawClipPath(new rt(this.mapObject.element.id+"_MapArea_ClipRect","transparent",{width:1,color:"Gray"},1,{x:this.mapObject.isTileMap?0:o.x,y:this.mapObject.isTileMap?0:o.y,width:o.width,height:o.height}));this.layerGroup.appendChild(this.clipRectElement),this.mapObject.baseMapBounds=null,this.mapObject.baseMapRectBounds=null,this.mapObject.baseSize=null,Array.prototype.forEach.call(i,function(t,i){e.currentLayer=t,e.processLayers(t,i)}),t.isNullOrUndefined(this.mapObject.legendModule)||"Float"!==this.mapObject.legendSettings.position||(this.mapObject.isTileMap?this.layerGroup.appendChild(this.mapObject.legendModule.legendGroup):this.mapObject.svgObject.appendChild(this.mapObject.legendModule.legendGroup))},e.prototype.renderTileLayer=function(e,i,o,a){e.currentFactor=e.calculateFactor(i),e.mapObject.defaultState=!(1!==e.mapObject.zoomSettings.zoomFactor&&!t.isNullOrUndefined(e.mapObject.tileZoomLevel)&&1!==e.mapObject.tileZoomLevel),t.isNullOrUndefined(e.mapObject.previousCenterLatitude)&&t.isNullOrUndefined(e.mapObject.previousCenterLongitude)?(e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.previousCenterLatitude!==e.mapObject.centerPosition.latitude&&e.mapObject.previousCenterLongitude!==e.mapObject.centerPosition.longitude?(e.mapObject.centerPositionChanged=!0,e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.centerPositionChanged=!1;var n=new tt(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude),l=n;this.mapObject.isTileMap&&e.mapObject.markerModule&&e.mapObject.zoomSettings.enable&&(e.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection),t.isNullOrUndefined(this.mapObject.markerCenterLatitude)||t.isNullOrUndefined(this.mapObject.markerCenterLongitude)||(l=new tt(e.mapObject.markerCenterLongitude,e.mapObject.markerCenterLatitude))),n=!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.centerPosition.longitude&&e.mapObject.centerPosition.latitude&&!e.mapObject.zoomPersistence&&e.mapObject.defaultState?new tt(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude):e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.markerZoomedState&&!e.mapObject.zoomPersistence&&!t.isNullOrUndefined(e.mapObject.markerZoomCenterPoint)?new tt(e.mapObject.markerZoomCenterPoint.longitude,e.mapObject.markerZoomCenterPoint.latitude):{x:null,y:null};var r=e.mapObject.zoomSettings.shouldZoomInitially?t.isNullOrUndefined(e.mapObject.markerZoomFactor)?1:e.mapObject.markerZoomFactor:e.mapObject.zoomSettings.zoomFactor;if(r=e.mapObject.enablePersistence?t.isNullOrUndefined(e.mapObject.mapScaleValue)?t.isNullOrUndefined(e.mapObject.markerZoomFactor)?e.mapObject.zoomSettings.zoomFactor:e.mapObject.markerZoomFactor:e.mapObject.mapScaleValue:r,r=e.mapObject.zoomSettings.enable?r:e.mapObject.zoomSettings.zoomFactor,r=r>0?r:1,e.mapObject.defaultState=1===r,!e.mapObject.markerZoomedState&&e.mapObject.zoomSettings.shouldZoomInitially&&1===e.mapObject.zoomSettings.zoomFactor&&(e.mapObject.defaultState=!0),t.isNullOrUndefined(e.mapObject.tileZoomLevel))e.mapObject.tileZoomLevel=r,e.mapObject.previousZoomFactor=r;else if(this.mapObject.isReset&&1===e.mapObject.tileZoomLevel&&!e.mapObject.zoomSettings.shouldZoomInitially){var s=e.mapObject.tileZoomLevel;e.mapObject.tileZoomLevel=s}else 1!==e.mapObject.zoomSettings.zoomFactor||e.mapObject.zoomSettings.shouldZoomInitially?(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=e.mapObject.defaultState&&e.mapObject.zoomSettings.enable?e.mapObject.tileZoomLevel:e.mapObject.zoomSettings.shouldZoomInitially||e.mapObject.centerPositionChanged?r:e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor?e.mapObject.zoomSettings.zoomFactor:e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=1===r&&0===e.mapObject.zoomSettings.zoomFactor?r:e.mapObject.tileZoomLevel,!t.isNullOrUndefined(e.mapObject.tileTranslatePoint)&&(e.mapObject.markerZoomFactor!==e.mapObject.mapScaleValue||t.isNullOrUndefined(e.mapObject.markerZoomFactor)&&t.isNullOrUndefined(e.mapObject.mapScaleValue))&&(e.mapObject.zoomSettings.zoomFactor<=1||e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor)&&(e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0)):e.mapObject.defaultState&&(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=r,e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0);if(r<=1&&!t.isNullOrUndefined(e.mapObject.height)&&!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.tileZoomLevel===e.mapObject.tileZoomScale&&this.mapObject.initialCheck&&me(this.mapObject),t.isNullOrUndefined(e.mapObject.centerLatOfGivenLocation)||t.isNullOrUndefined(e.mapObject.centerLongOfGivenLocation)||!e.mapObject.zoomNotApplied||(l.y=e.mapObject.centerLatOfGivenLocation,l.x=e.mapObject.centerLongOfGivenLocation,e.mapObject.tileZoomLevel=e.mapObject.mapScaleValue=e.mapObject.scaleOfGivenLocation),e.mapObject.tileTranslatePoint=e.panTileMap(e.mapObject.availableSize.width,e.mapObject.availableSize.height,l),this.mapObject.zoomSettings.resetToInitial&&this.mapObject.initialCheck&&!t.isNullOrUndefined(e.mapObject.height)&&this.mapObject.availableSize.height>512){this.mapObject.applyZoomReset=!0,this.mapObject.initialZoomLevel=Math.floor(this.mapObject.availableSize.height/512);var d="GoogleStaticMap"!==this.mapObject.layers[this.mapObject.baseLayerIndex].layerType?20:0,p=256*Math.pow(2,this.mapObject.initialZoomLevel);this.mapObject.initialTileTranslate.x=this.mapObject.availableSize.width/2-p/2,this.mapObject.initialTileTranslate.y=this.mapObject.availableSize.height/2-p/2+d}e.generateTiles(e.mapObject.tileZoomLevel,e.mapObject.tileTranslatePoint,null,a),t.isNullOrUndefined(e.mapObject.previousZoomFactor)||e.mapObject.previousZoomFactor===e.mapObject.zoomSettings.zoomFactor||(e.mapObject.previousZoomFactor=e.mapObject.zoomSettings.zoomFactor),e.mapObject.navigationLineModule&&e.layerObject.appendChild(e.mapObject.navigationLineModule.renderNavigation(e.currentLayer,e.mapObject.tileZoomLevel,o)),e.mapObject.markerModule&&e.mapObject.markerModule.markerRender(e.layerObject,o,e.mapObject.tileZoomLevel,null),e.translateLayerElements(e.layerObject,o),e.layerGroup.appendChild(e.layerObject)},e.prototype.processLayers=function(e,i){var o=this;if(this.layerObject=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+i}),!this.mapObject.enablePersistence){var a=this.mapObject.getModuleName()+this.mapObject.element.id;if(-1===navigator.userAgent.indexOf("Edge")){var n=void 0;try{n=window.localStorage}catch(e){n=null}!t.isNullOrUndefined(n)&&window.localStorage.getItem(a)&&window.localStorage.removeItem(a)}}var l={cancel:!1,name:"layerRendering",index:i,layer:e,maps:this.mapObject,visible:e.visible};this.mapObject.trigger("layerRendering",l,function(a){if(!l.cancel&&l.visible)if("OSM"===e.layerType&&(e.urlTemplate="https://a.tile.openstreetmap.org/level/tileX/tileY.png"),"Google"===e.layerType&&(e.urlTemplate="https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level"),"Geometry"!==e.layerType||t.isNullOrUndefined(e.shapeData)&&!t.isNullOrUndefined(e.urlTemplate)&&""!==e.urlTemplate){if("Bing"!==e.layerType||o.bing)if(!t.isNullOrUndefined(e.urlTemplate)&&e.urlTemplate.indexOf("quadkey")>-1){var n=new di(o.mapObject);o.bingMapCalculation(e,i,o,n)}else o.renderTileLayer(o,e,i);else if(e.key&&e.key.length>1){var r=o,s=new di(o.mapObject),d="https://dev.virtualearth.net/REST/V1/Imagery/Metadata/"+("AerialWithLabel"===e.bingMapType?"AerialWithLabelsOnDemand":e.bingMapType),p=new t.Ajax({url:d+"?output=json&include=ImageryProviders&urischeme=https&key="+e.key});p.onSuccess=function(t){var a=JSON.parse(t).resourceSets[0].resources[0],n=a.imageUrl,l=a.imageUrlSubdomains,d=a.zoomMax;document.getElementById(r.mapObject.element.id+"_Markers_Group");null!==n&&void 0!==n&&n!==s.imageUrl&&(s.imageUrl=n),null!==l&&void 0!==l&&l!==s.subDomains&&(s.subDomains=l),null!==d&&void 0!==d&&d!==s.maxZoom&&(s.maxZoom=d),r.mapObject.bingMap=s,r.renderTileLayer(r,e,i,s),o.mapObject.arrangeTemplate(),o.mapObject.zoomModule&&o.mapObject.previousScale!==o.mapObject.scale&&o.mapObject.zoomModule.applyTransform(!0)},p.send()}}else if(!(t.isNullOrUndefined(e.shapeData)||t.isNullOrUndefined(e.shapeData.geometries)&&t.isNullOrUndefined(e.shapeData.features))){var h=!t.isNullOrUndefined(e.shapeData.geometries)&&e.shapeData.geometries.length>0?e.shapeData.geometries:e.shapeData.features;e.layerData=[];var c=e.shapeData.bbox;!t.isNullOrUndefined(c)&&e.isBaseLayer?o.mapObject.baseMapBounds=new ot({min:c[0][1],max:c[1][1]},{min:c[0][0],max:c[1][0]}):t.isNullOrUndefined(o.mapObject.baseMapBounds)&&!le(h)&&o.calculateRectBounds(h),o.calculatePathCollection(i,h)}}),this.mapObject.isTileMap?this.tileSvgObject&&(this.tileSvgObject.appendChild(this.layerGroup),this.mapObject.baseMapBounds=null):this.mapObject.svgObject.appendChild(this.layerGroup)},e.prototype.bingMapCalculation=function(e,t,i,o){o.imageUrl=e.urlTemplate,o.subDomains=["t0","t1","t2","t3"],o.maxZoom="21",i.mapObject.bingMap=o,i.renderTileLayer(i,e,t,o),this.mapObject.arrangeTemplate(),this.mapObject.zoomModule&&this.mapObject.previousScale!==this.mapObject.scale&&this.mapObject.zoomModule.applyTransform(!0)},e.prototype.bubbleCalculation=function(e,i){if(null!=e.dataSource&&null!=e)for(var o=e.dataSource,a=0;a<o.length;a++){var n=t.isNullOrUndefined(e.valuePath)?parseFloat(e.dataSource[a][e.valuePath]):e.valuePath.indexOf(".")>-1?Number(P(e.dataSource[a],e.valuePath)):parseFloat(e.dataSource[a][e.valuePath]);0!==a?n>i.max?i.max=n:n<i.min&&(i.min=n):i.max=i.min=n}},e.prototype.calculatePathCollection=function(e,i){var o=this;this.groupElements=[],le(i)||(this.currentFactor=this.calculateFactor(this.currentLayer)),this.rectBounds=null;var a=this.currentLayer.shapeSettings;this.currentLayer.bubbleSettings;Array.prototype.forEach.call(i,function(e,i){if(!t.isNullOrUndefined(e.geometry)||!t.isNullOrUndefined(e.coordinates)){var a=t.isNullOrUndefined(e.geometry)?e.type:e.geometry.type,n=t.isNullOrUndefined(e.geometry)?e.coordinates:e.geometry.coordinates,l=e.geometry,r=e.properties;o.generatePoints(a,n,l,r)}}),this.currentLayer.rectBounds=this.rectBounds,t.isNullOrUndefined(this.mapObject.baseMapRectBounds)&&this.currentLayer.isBaseLayer&&(this.mapObject.baseMapRectBounds=this.rectBounds);var n=a.palette.length>1?a.palette:Je(this.mapObject.theme),l=t.createElement("div",{id:this.mapObject.element.id+"_LayerIndex_"+e+"_Label_Template_Group",className:this.mapObject.element.id+"_template",styles:"pointer-events: none; overflow: hidden; position: absolute;top:"+this.mapObject.mapAreaRect.y+"px;left:"+this.mapObject.mapAreaRect.x+"px;height:"+this.mapObject.mapAreaRect.height+"px;width:"+this.mapObject.mapAreaRect.width+"px;"});if(0!==this.currentLayer.layerData.length)for(var r=this,s=0;s<this.currentLayer.layerData.length;s++)!function(s){var d,p,h,c=void 0,m={color:a.border.color,width:a.border.width,opacity:a.border.opacity},u=r.currentLayer.layerData[s],g="",y=a.autofill?n[s%n.length]:a.fill||r.mapObject.themeStyle.shapeFill;null===a.colorValuePath||t.isNullOrUndefined(u.property)||(null!==(c=te(r.currentLayer.dataSource,u.property,r.currentLayer.shapeDataPath,r.currentLayer.shapePropertyPath,r.currentLayer))&&0===a.colorMapping.length?y=r.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?P(r.currentLayer.dataSource[c],a.colorValuePath):r.currentLayer.dataSource[c][a.colorValuePath]:u.property[a.colorValuePath]&&0===r.currentLayer.dataSource.length&&0===a.colorMapping.length&&(y=r.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?P(u.property,a.colorValuePath):u.property[a.colorValuePath]),y=t.isNullOrUndefined(y)?a.fill||r.mapObject.themeStyle.shapeFill:y);var f=r.mapObject.element.id+"_LayerIndex_"+e+"_shapeIndex_"+s+"_dataIndex_"+c,b=r.getShapeColorMapping(r.currentLayer,u.property,y);if(y="[object Object]"!==Object.prototype.toString.call(b)||t.isNullOrUndefined(b.fill)?y:b.fill,r.currentLayer.shapeSettings.borderColorValuePath||r.currentLayer.shapeSettings.borderWidthValuePath){r.currentLayer.shapeSettings.borderColorValuePath,r.currentLayer.shapeSettings.borderWidthValuePath;null!==(c=te(r.currentLayer.dataSource,u.property,r.currentLayer.shapeDataPath,r.currentLayer.shapePropertyPath,r.currentLayer))&&(r.currentLayer.dataSource[c][a.borderColorValuePath]&&(m.color=r.currentLayer.dataSource[c][a.borderColorValuePath]),r.currentLayer.dataSource[c][a.borderWidthValuePath]&&(m.width=r.currentLayer.dataSource[c][a.borderWidthValuePath]))}var v="[object Object]"!==Object.prototype.toString.call(b)||t.isNullOrUndefined(b.opacity)?a.opacity:b.opacity,S={cancel:!1,name:"shapeRendering",index:s,data:r.currentLayer.dataSource?r.currentLayer.dataSource[c]:null,maps:r.mapObject,shape:a,fill:y,border:{width:m.width,color:m.color,opacity:m.opacity}},x=function(r){var c=t.isNullOrUndefined(u._isMultiPolygon)?t.isNullOrUndefined(u.type)?u[0].type:u.type:"MultiPolygon";if(c="Polygon"===c||"MultiPolygon"===c?"Polygon":c,r.cancel?(r.fill=y,r.border.color=a.border.color,r.border.width=a.border.width,o.mapObject.layers[e].shapeSettings.border=a.border):(r.fill="#A6A6A6"===r.fill?r.shape.fill||o.mapObject.themeStyle.shapeFill:r.fill,r.border.color="#000000"===r.border.color?r.shape.border.color:r.border.color,r.border.width=0===r.border.width?r.shape.border.width:r.border.width,t.isNullOrUndefined(a.borderColorValuePath)&&(o.mapObject.layers[e].shapeSettings.border.color=r.border.color),t.isNullOrUndefined(a.borderWidthValuePath)&&(o.mapObject.layers[e].shapeSettings.border.width=r.border.width)),r.border.opacity=t.isNullOrUndefined(r.border.opacity)?v:r.border.opacity,o.groupElements.length<1)h=o.mapObject.renderer.createGroup({id:o.mapObject.element.id+"_LayerIndex_"+e+"_"+c+"_Group",transform:""}),o.groupElements.push(h);else for(var m=0;m<o.groupElements.length;m++){var b=o.groupElements[m];if(b.id.indexOf(c)>-1){h=b;break}if(m>=o.groupElements.length-1){h=o.mapObject.renderer.createGroup({id:o.mapObject.element.id+"_LayerIndex_"+e+"_"+c+"_Group"}),o.groupElements.push(h);break}}var S;switch(c){case"Polygon":u._isMultiPolygon?g=o.generateMultiPolygonPath(u):(g+="M"+u[0].point.x+" "+u[0].point.y,u.map(function(e){g+=" L "+e.point.x+" "+e.point.y})),(g+=" z ").length>3&&(d=new nt(f,r.fill,r.border.width,r.border.color,v,r.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d));break;case"LineString":u.map(function(e,t){g+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "}),g.length>3&&(d=new nt(f,"transparent",t.isNullOrUndefined(r.border.width)?1:r.border.width,t.isNullOrUndefined(r.fill)?r.border.color:r.fill,v,r.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d));break;case"MultiLineString":u.map(function(e){e.map(function(e,t){g+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "})}),g.length>3&&(d=new nt(f,"transparent",t.isNullOrUndefined(r.border.width)?1:r.border.width,t.isNullOrUndefined(r.fill)?r.border.color:r.fill,v,r.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d));break;case"Point":var x=u.point,O="SubLayer"!==o.mapObject.layers[e].type?a.circleRadius:a.circleRadius/(o.mapObject.isTileMap?o.mapObject.scale:o.currentFactor);p=new st(f,r.fill,r.border,v,x.x,x.y,O,a.dashArray),S=o.mapObject.renderer.drawCircle(p);break;case"MultiPoint":u.map(function(t,i){var n=t.point,l="SubLayer"!==o.mapObject.layers[e].type?a.circleRadius:a.circleRadius/(o.mapObject.isTileMap?o.mapObject.scale:o.currentFactor);p=new st(f+"_multiLine_"+i,r.fill,r.border,v,n.x,n.y,l,a.dashArray),S=o.mapObject.renderer.drawCircle(p),o.pathAttributeCalculate(h,S,c,u,s)});break;case"Path":g=u.point,d=new nt(f,r.fill,r.border.width,r.border.color,v,r.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d)}t.isNullOrUndefined(S)||"MultiPoint"===c||o.pathAttributeCalculate(h,S,c,u,s),s===o.currentLayer.layerData.length-1&&o.layerFeatures(e,n,i,l)};x.bind(r),r.mapObject.trigger("shapeRendering",S,x)}(s);else this.layerFeatures(e,n,i,l)},e.prototype.pathAttributeCalculate=function(e,i,o,a,n){for(var l,r="[object Array]"===Object.prototype.toString.call(this.currentLayer.shapePropertyPath)?this.currentLayer.shapePropertyPath:[this.currentLayer.shapePropertyPath],s=0;s<r.length;s++)if(!t.isNullOrUndefined(a.property)){l=r[s];break}if(i.setAttribute("aria-label",t.isNullOrUndefined(a.property)?"":a.property[l]),i.setAttribute("tabindex",(this.mapObject.tabIndex+n+3).toString()),"LineString"!==o&&"MultiLineString"!==o||i.setAttribute("style","outline:none"),z(this.mapObject.selectedElementId,this.mapObject.shapeSelectionClass,i,"ShapeselectionMapStyle"),this.mapObject.toggledShapeElementId)for(s=0;s<this.mapObject.toggledShapeElementId.length;s++){var d=this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings?this.currentLayer.shapeSettings:this.mapObject.legendSettings.toggleLegendSettings;this.mapObject.toggledShapeElementId[s]===i.id&&(i.setAttribute("fill",d.fill),i.setAttribute("stroke",d.border.color),i.setAttribute("fill-opacity",d.opacity.toString()),i.setAttribute("stroke-opacity",(t.isNullOrUndefined(d.border.opacity)?d.opacity:d.border.opacity).toString()),i.setAttribute("stroke-width",d.border.width.toString()))}e.appendChild(i)},e.prototype.layerFeatures=function(e,t,i,o){var a,n=this;if(this.currentLayer.bubbleSettings.length&&this.mapObject.bubbleModule)for(var l,r=this.currentLayer.bubbleSettings.length,s=this,d=0;d<r;d++)!function(i){l=s.currentLayer.bubbleSettings[i],a=s.mapObject.renderer.createGroup({id:s.mapObject.element.id+"_LayerIndex_"+e+"_bubble_Group_"+i});var o={min:0,max:0};s.bubbleCalculation(l,o),l.dataSource.map(function(r,s){n.renderBubble(n.currentLayer,r,t[s%t.length],o,i,s,a,e,l)}),s.groupElements.push(a)}(d);this.mapObject.markerModule&&!this.mapObject.isTileMap&&this.mapObject.zoomSettings.enable&&this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);var p=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+e+"_dataLableIndex_Group",style:"pointer-events: none;"});if(this.mapObject.dataLabelModule&&this.currentLayer.dataLabelSettings.visible){var h=[];i.map(function(t,i){n.renderLabel(n.currentLayer,e,t,p,i,o,h)}),this.groupElements.push(p)}this.mapObject.navigationLineModule&&this.groupElements.push(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer,this.currentFactor,e)),this.groupElements.map(function(e){n.layerObject.appendChild(e)}),this.mapObject.markerModule&&this.mapObject.markerModule.markerRender(this.layerObject,e,this.mapObject.isTileMap?Math.floor(this.currentFactor):this.currentFactor,null),this.translateLayerElements(this.layerObject,e),this.layerGroup.appendChild(this.layerObject)},e.prototype.renderLabel=function(e,t,i,o,a,n,l){this.mapObject.dataLabelModule.renderLabel(e,t,i,e.layerData,o,n,a,l)},e.prototype.generateMultiPolygonPath=function(e){for(var t="",i=0;i<e.length;i++)t+="M"+e[i][0].point.x+" "+e[i][0].point.y,e[i].map(function(e){t+=" L "+e.point.x+" "+e.point.y});return t},e.prototype.renderBubble=function(e,i,o,a,n,l,r,s,d){if(t.isNullOrUndefined(this.mapObject.bubbleModule)||!d.visible)return null;o=d.fill?d.fill:o,this.mapObject.bubbleModule.id=this.mapObject.element.id+"_LayerIndex_"+s+"_BubbleIndex_"+n+"_dataIndex_"+l,this.mapObject.bubbleModule.renderBubble(d,i,o,a,n,l,s,e,r,this.mapObject.bubbleModule.id)},e.prototype.getShapeColorMapping=function(e,i,o){if(o=o||e.shapeSettings.fill,0===e.shapeSettings.colorMapping.length&&t.isNullOrUndefined(e.dataSource))return o;var a=te(e.dataSource,i,e.shapeDataPath,e.shapePropertyPath,e),n=new pi(this.mapObject);return t.isNullOrUndefined(e.dataSource[a])?o:n.getShapeColorMapping(e.shapeSettings,e.dataSource[a],o)},e.prototype.generatePoints=function(e,i,o,a){var n,l,r=this,s=[];switch(e.toLowerCase()){case"polygon":(s=this.calculatePolygonBox(i[0],o,a)).length>0&&(s.property=a,s.type=e,s._isMultiPolygon=!1,this.currentLayer.layerData.push(s));break;case"multipolygon":for(var d=[],p=0;p<i.length;p++)(s=this.calculatePolygonBox(i[p][0],o,a)).length>0&&d.push(s);d.property=a,d.type=e,d._isMultiPolygon=!0,this.currentLayer.layerData.push(d);break;case"linestring":var c=t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width;i.map(function(e,t){n=e[1],l=e[0];var i=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(i,c),s.push({point:i,lat:n,lng:l})}),s.property=a,s.type=e,this.currentLayer.layerData.push(s);break;case"multilinestring":var m=t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width,u=[];i.map(function(e){s=[],e.map(function(e){n=e[1],l=e[0];var t=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,m),s.push({point:t,lat:n,lng:l})}),u.push(s)}),u.property=a,u.type=e,this.currentLayer.layerData.push(u);break;case"point":var g=(t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius;n=i[1],l=i[0];var y=h(n,l,this.currentFactor,this.currentLayer,this.mapObject);this.calculateBox(y,g),this.currentLayer.layerData.push({point:y,type:e,lat:n,lng:l,property:a});break;case"multipoint":var f=(t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius;s=[],i.map(function(e){n=e[1],l=e[0];var t=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,f),s.push({point:t,lat:n,lng:l})}),s.property=a,s.type=e,this.currentLayer.layerData.push(s);break;case"path":this.currentLayer.layerData.push({point:o.d,type:e,property:a})}},e.prototype.calculateBox=function(e,i){t.isNullOrUndefined(this.rectBounds)?this.rectBounds={min:{x:e.x-i,y:e.y-i},max:{x:e.x+i,y:e.y+i}}:(this.rectBounds.min.x=Math.min(this.rectBounds.min.x,e.x-i),this.rectBounds.min.y=Math.min(this.rectBounds.min.y,e.y-i),this.rectBounds.max.x=Math.max(this.rectBounds.max.x,e.x+i),this.rectBounds.max.y=Math.max(this.rectBounds.max.y,e.y+i))},e.prototype.calculateFactor=function(e){var t,i,o,a=1,n=this.mapObject.baseMapBounds,l=new et(this.mapObject.mapAreaRect.width,this.mapObject.mapAreaRect.height-5);if(n){var r=h(n.latitude.min,n.longitude.min,null,e,this.mapObject),s=h(n.latitude.max,n.longitude.max,null,e,this.mapObject);i=s.y-r.y,o=s.x-r.x,0!==i&&0!==o||(o=l.width/2,i=l.height)}else i=o=500;return t=i<l.height?parseFloat(Math.abs(100*Number(l.height/Number(i.toString()+"e+1"))).toString().split(".")[0])/10:l.height/i,a=o<l.width?parseFloat(Math.abs(100*Number(l.width/Number(o.toString()+"e+1"))).toString().split(".")[0])/10:l.width/o,Math.min(a,t)},e.prototype.translateLayerElements=function(e,i){var o;if(this.mapObject.translateType="layer",t.isNullOrUndefined(this.mapObject.baseMapRectBounds)){if(this.mapObject.isTileMap&&!t.isNullOrUndefined(this.mapObject.scale))for(var a=0;a<e.childElementCount;a++)if(!((o=e.childNodes[a]).id.indexOf("_Markers_Group")>-1||o.id.indexOf("_bubble_Group")>-1||o.id.indexOf("_dataLableIndex_Group")>-1||o.id.indexOf("_line_Group")>-1)){h="scale( "+this.mapObject.scale+" ) translate( "+this.mapObject.translatePoint.x+" "+this.mapObject.translatePoint.y+" ) ";o.setAttribute("transform",h)}}else{var n=this.currentLayer.animationDuration,l=0!==n||t.isNullOrUndefined(this.mapObject.zoomModule);this.mapObject.baseTranslatePoint=this.mapObject.zoomTranslatePoint;var r=void 0;r=this.mapObject.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(this.mapObject.zoomModule)?ce(this.mapObject,this.currentLayer,l):he(this.mapObject,this.currentLayer,l);var s=this.mapObject.previousScale=r.scale,d=this.mapObject.previousPoint=r.location;this.mapObject.baseTranslatePoint=this.mapObject.translatePoint=d,this.mapObject.baseScale=this.mapObject.scale=s;for(var p=0;p<e.childElementCount;p++)if(!((o=e.childNodes[p]).id.indexOf("_Markers_Group")>-1||o.id.indexOf("_bubble_Group")>-1||o.id.indexOf("_dataLableIndex_Group")>-1)){var h="scale( "+s+" ) translate( "+d.x+" "+d.y+" ) ";o.setAttribute("transform",h),n>0&&!t.isNullOrUndefined(this.mapObject.zoomModule)&&(r=this.mapObject.zoomSettings.zoomFactor>1?ce(this.mapObject,this.currentLayer):he(this.mapObject,this.currentLayer),this.mapObject.scale=r.scale,this.mapObject.zoomTranslatePoint=this.mapObject.translatePoint=r.location)}}},e.prototype.calculateRectBounds=function(e){var i=this;Array.prototype.forEach.call(e,function(e,o){if(!t.isNullOrUndefined(e.geometry)||!t.isNullOrUndefined(e.coordinates)){var a=t.isNullOrUndefined(e.geometry)?e.type:e.geometry.type,n=t.isNullOrUndefined(e.geometry)?e.coordinates:e.geometry.coordinates;switch(a.toLowerCase()){case"polygon":i.calculateRectBox(n[0]);break;case"multipolygon":n.map(function(e,t){i.calculateRectBox(e[0])});break;case"multilinestring":n.map(function(e,t){e.map(function(e,t){i.calculateRectBox(e,"multilinestring",0===t)})});break;case"linestring":n.map(function(e,t){i.calculateRectBox(e,"linestring",0===t)});break;case"point":i.calculateRectBox(n,"point");break;case"multipoint":n.map(function(e,t){i.calculateRectBox(e,"multipoint",0===t)})}}})},e.prototype.calculatePolygonBox=function(e,i,o){var a=this,n=[],l=this.mapObject.baseMapBounds;return e.map(function(e,i){var o=e[1],r=e[0];if(r>=l.longitude.min&&r<=l.longitude.max&&o>=l.latitude.min&&o<=l.latitude.max){var s=h(o,r,a.currentFactor,a.currentLayer,a.mapObject);t.isNullOrUndefined(a.rectBounds)?a.rectBounds={min:{x:s.x,y:s.y},max:{x:s.x,y:s.y}}:(a.rectBounds.min.x=Math.min(a.rectBounds.min.x,s.x),a.rectBounds.min.y=Math.min(a.rectBounds.min.y,s.y),a.rectBounds.max.x=Math.max(a.rectBounds.max.x,s.x),a.rectBounds.max.y=Math.max(a.rectBounds.max.y,s.y)),n.push({point:s,lat:o,lng:r})}}),n},e.prototype.calculateRectBox=function(e,i,o){var a=this;"linestring"!==i&&"multilinestring"!==i&&"point"!==i&&"multipoint"!==i?Array.prototype.forEach.call(e,function(e){t.isNullOrUndefined(a.mapObject.baseMapBounds)?a.mapObject.baseMapBounds=new ot({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(a.mapObject.baseMapBounds.latitude.min=Math.min(a.mapObject.baseMapBounds.latitude.min,e[1]),a.mapObject.baseMapBounds.latitude.max=Math.max(a.mapObject.baseMapBounds.latitude.max,e[1]),a.mapObject.baseMapBounds.longitude.min=Math.min(a.mapObject.baseMapBounds.longitude.min,e[0]),a.mapObject.baseMapBounds.longitude.max=Math.max(a.mapObject.baseMapBounds.longitude.max,e[0]))}):(o||"point"===i)&&t.isNullOrUndefined(this.mapObject.baseMapBounds)?this.mapObject.baseMapBounds=new ot({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(this.mapObject.baseMapBounds.latitude.min=Math.min(this.mapObject.baseMapBounds.latitude.min,e[1]),this.mapObject.baseMapBounds.latitude.max=Math.max(this.mapObject.baseMapBounds.latitude.max,e[1]),this.mapObject.baseMapBounds.longitude.min=Math.min(this.mapObject.baseMapBounds.longitude.min,e[0]),this.mapObject.baseMapBounds.longitude.max=Math.max(this.mapObject.baseMapBounds.longitude.max,e[0]))},e.prototype.generateTiles=function(e,i,o,a,n){var l=this.mapObject.locale,r=this.mapObject.availableSize;this.tiles=[];var s,d;s=d=Math.pow(2,e);var p=0,h=0;i.x+256*s<r.width&&(p=i.x>0?Math.ceil(i.x/256):0,h=i.x+256*s<r.width?Math.ceil((r.width-(i.x+256*s))/256):0),s+=p+h,"Pan"===o?(s=this.horizontalPanXCount>=s?this.horizontalPanXCount:s,this.horizontalPan=!1):(this.horizontalPanXCount=s,this.horizontalPan=!0);var c=this.mapObject.layers[this.mapObject.baseLayerIndex];this.urlTemplate=c.urlTemplate;var m=Math.min(d,(-i.y+r.height)/256+1),u=Math.min(s,(-i.x+r.width+256*h)/256+1),g=-(i.x+256*p+256)/256,y=-(i.y+256)/256;a=a||this.bing||this.mapObject.bingMap;for(var f=Math.round(g);f<Math.round(u);f++)for(var b=Math.round(y);b<Math.round(m);b++){var v=256*f+i.x,S=256*b+i.y;if(v>-256&&v<=r.width&&S>-256&&S<r.height&&b>=0){var x=f;f<0&&(x=x%d+d);var O=new Qt(x%d,b);if(O.left=v,O.top=S,"Bing"===c.layerType||a&&!t.isNullOrUndefined(c.urlTemplate)&&""!==c.urlTemplate){var M=c.key;O.src=a.getBingMap(O,M,c.bingMapType,l,a.imageUrl,a.subDomains)}else O.src=this.urlTemplate.replace("level",e.toString()).replace("tileX",O.x.toString()).replace("tileY",O.y.toString());this.tiles.push(O)}}t.isNullOrUndefined(o)||(o.indexOf("wheel")>1?(this.animateToZoomX=this.mapObject.availableSize.width/2-n.x-10,this.animateToZoomY=-n.y):(this.animateToZoomX=-10,this.animateToZoomY=10-(this.mapObject.availableSize.height/2+11.5)));for(var _=t.extend([],this.tiles,[],!0),L=0,C=this.mapObject.layers;L<C.length;L++){var w=C[L];if("SubLayer"===w.type&&w.visible&&("Geometry"!==w.layerType&&"GoogleStaticMap"!==w.layerType||"Geometry"===w.layerType&&t.isNullOrUndefined(w.shapeData)&&!t.isNullOrUndefined(w.urlTemplate)&&""!==w.urlTemplate))for(var P=0,I=_;P<I.length;P++){var T=I[P],N=t.extend({},T,{},!0);"Bing"===w.layerType?(a=new di(this.mapObject),N.src=a.getBingMap(N,w.key,w.bingMapType,l,a.imageUrl,a.subDomains)):N.src=w.urlTemplate.replace("level",e.toString()).replace("tileX",T.x.toString()).replace("tileY",T.y.toString()),this.tiles.push(N)}}(this.mapObject.previousScale!==this.mapObject.scale||this.mapObject.isReset)&&this.arrangeTiles(o,this.animateToZoomX,this.animateToZoomY)},e.prototype.arrangeTiles=function(e,i,o){var a,n=this,l=document.getElementById(this.mapObject.element.id+"_tile_parent"),r=document.getElementById(this.mapObject.element.id+"_tiles");t.isNullOrUndefined(e)||"Pan"===e?a=0:(this.tileAnimation(e,i,o),a=this.mapObject.layersCollection[0].animationDuration),"GoogleStaticMap"===this.mapObject.layers[this.mapObject.baseLayerIndex].layerType?this.renderGoogleMap(this.mapObject.layers[0].key,this.mapObject.staticMapZoom):setTimeout(function(){l&&(l.style.zIndex="1"),r&&(r.style.zIndex="0");var i;!document.getElementById(n.mapObject.element.id+"_animated_tiles")&&l?(i=t.createElement("div",{id:n.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):"Pan"!==e&&r&&l?(r.appendChild(l.children[0]),t.isNullOrUndefined(document.getElementById(n.mapObject.element.id+"_animated_tiles"))||(document.getElementById(n.mapObject.element.id+"_animated_tiles").id=n.mapObject.element.id+"_animated_tiles_old"),i=t.createElement("div",{id:n.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):i=l?l.children[0]:null;for(var o=0,a=0,s=n.tiles;a<s.length;a++)!function(a){var l=t.createElement("img");l.setAttribute("height","256px"),l.setAttribute("width","256px"),l.setAttribute("src",a.src);var r=n.mapObject.element.id;l.onload=function(){document.getElementById(r+"_tile_"+o)&&"Pan"===e&&de(r+"_tile_"+o);var s=t.createElement("div",{id:r+"_tile_"+o});s.style.position="absolute",s.style.left=a.left+"px",s.style.top=a.top+"px",s.style.height=a.height+"px",s.style.width=a.width+"px",s.appendChild(l),i&&i.appendChild(s),++o===n.tiles.length&&document.getElementById(n.mapObject.element.id+"_animated_tiles_old")&&de(n.mapObject.element.id+"_animated_tiles_old")}}(s[a])},a)},e.prototype.tileAnimation=function(e,i,o){var a=document.getElementById(this.mapObject.element.id+"_tile_parent"),n=document.getElementById(this.mapObject.element.id+"_animated_tiles"),l=document.getElementById(this.mapObject.element.id+"_tiles"),r="2";if(0===e.indexOf("ZoomOut")||"Reset"===e){for(l.style.zIndex="1",a.style.zIndex="0";l.childElementCount>=1;)l.removeChild(l.children[0]);i=0,o=document.getElementById(this.mapObject.element.id+"_tile_parent").getClientRects()[0].height/4,r=0===e.indexOf("ZoomOut")?"0.5":"0.2"}t.isNullOrUndefined(n)||(n.style.transition=this.mapObject.layersCollection[0].animationDuration+"ms",n.style.transform="translate("+i+"px, "+o+"px) scale("+r+")")},e.prototype.renderGoogleMap=function(e,i){var o=this.mapObject;i=this.mapObject.tileZoomLevel;var a=256*Math.pow(2,i),n=o.mapAreaRect.width/2-a/2,l=o.mapAreaRect.height/2-a/2,r=0,s=0,d=c(new tt(null,null),i,{x:n,y:l},this.isMapCoordinates);o.zoomModule&&o.zoomSettings.enable&&(r=o.zoomModule.mouseDownLatLong.x-o.zoomModule.mouseMoveLatLong.x,s=o.zoomModule.mouseDownLatLong.y-o.zoomModule.mouseMoveLatLong.y);var p=o.pointToLatLong(d.x-r,d.y-s);o.centerPosition.latitude=p.latitude,o.centerPosition.longitude=p.longitude;var h,m;h=t.isNullOrUndefined(parseInt(o.width,10))?parseInt(o.width,10)-22:Math.round(o.mapAreaRect.width),m=t.isNullOrUndefined(parseInt(o.height,10))?parseInt(o.height,10)-22:Math.round(o.mapAreaRect.height);var u,g=h>640?(h-640)/2:0,y=m>640?(m-640)/2:0,f=o.layers[o.layers.length-1].staticMapType.toString().toLowerCase(),b="https://maps.googleapis.com/maps/api/staticmap?size="+h+"x"+m+"&zoom="+i+"¢er="+(u=o.centerPosition.latitude&&o.centerPosition.longitude?o.centerPosition.latitude.toString()+","+o.centerPosition.longitude.toString():"0,0")+"&maptype="+f+"&key="+e;document.getElementById(this.mapObject.element.id+"_tile_parent").innerHTML='<div id="'+this.mapObject.element.id+'_StaticGoogleMap"style="position:absolute; left:'+g+"px; top:"+y+'px"><img src="'+b+'"></div>'},e.prototype.panTileMap=function(e,i,o){this.mapObject.tileZoomLevel<=this.mapObject.tileZoomScale&&this.mapObject.initialCheck&&(this.mapObject.tileZoomLevel=this.mapObject.tileZoomScale);var a,n,l=this.mapObject.tileZoomLevel,r="GoogleStaticMap"!==this.mapObject.layers[this.mapObject.layers.length-1].layerType?20:0,s=256*Math.pow(2,l),d=c(o,l,{x:a=e/2-s/2,y:n=i/2-s/2},this.isMapCoordinates);if(r=this.mapObject.zoomNotApplied?0:r,a-=d.x-e/2,n=n-(d.y-i/2)+r,this.mapObject.scale=Math.pow(2,l-1),(t.isNullOrUndefined(this.mapObject.tileTranslatePoint)||0===this.mapObject.tileTranslatePoint.y&&0===this.mapObject.tileTranslatePoint.x||t.isNullOrUndefined(this.mapObject.previousTileWidth)||t.isNullOrUndefined(this.mapObject.previousTileHeight))&&(this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i),!t.isNullOrUndefined(this.mapObject.tileTranslatePoint)&&t.isNullOrUndefined(o.x)&&(1===this.mapObject.zoomSettings.zoomFactor||this.mapObject.zoomSettings.zoomFactor!==l||!this.mapObject.defaultState)&&(e!==this.mapObject.previousTileWidth||i!==this.mapObject.previousTileHeight)){var p=a-(this.mapObject.previousTileWidth/2-s/2),h=n-(this.mapObject.previousTileHeight/2-s/2+r);this.mapObject.tileTranslatePoint.x=this.mapObject.tileTranslatePoint.x+p,this.mapObject.tileTranslatePoint.y=this.mapObject.tileTranslatePoint.y+h}return t.isNullOrUndefined(this.mapObject.tileTranslatePoint)||this.mapObject.zoomNotApplied||(0===this.mapObject.tileTranslatePoint.x||this.mapObject.tileTranslatePoint.x===a||this.mapObject.centerPositionChanged||(a=this.mapObject.tileTranslatePoint.x),0===this.mapObject.tileTranslatePoint.y||this.mapObject.tileTranslatePoint.y===n||this.mapObject.centerPositionChanged||(n=this.mapObject.tileTranslatePoint.y)),this.mapObject.translatePoint=new tt((a-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale,(n-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale),this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i,new tt(a,n)},e}(),ci=function(){function e(e){this.map=e}return e.prototype.renderAnnotationElements=function(){var e=this,i=this.map.element.id+"_Secondary_Element",o=t.createElement("div",{id:this.map.element.id+"_Annotations_Group"});o.style.position="absolute",o.style.top="0px",o.style.left="0px",this.map.annotations.map(function(t,i){null!==t.content&&e.createAnnotationTemplate(o,t,i)}),o.childElementCount>0&&!t.isNullOrUndefined(ue(i))&&ue(i).appendChild(o),this.map.renderReactTemplates()},e.prototype.createAnnotationTemplate=function(e,i,o){var a,n,l,r,s=this,d=this.map,p=d.availableSize,h=(d.element.id,t.createElement("div",{id:d.element.id+"_Annotation_"+o,styles:"position: absolute; z-index:"+i.zIndex+";"})),c={cancel:!1,name:"annotationRendering",content:i.content,annotation:i};this.map.trigger("annotationRendering",c,function(e){if(!c.cancel)if((l=fe(c.content,s.map))&&l(s.map,s.map,c.content,s.map.element.id+"_ContentTemplate_"+o).length)for(var i=(r=Array.prototype.slice.call(l(s.map,s.map,c.content,s.map.element.id+"_ContentTemplate_"+o))).length,a=0;a<i;a++)h.appendChild(r[a]);else h.appendChild(t.createElement("div",{innerHTML:c.content}))});var m=Ae(h.cloneNode(!0),d.element),u=d.element.getBoundingClientRect(),g=d.svgObject.getBoundingClientRect();a=Math.abs(g.left-u.left),n=Math.abs(g.top-u.top);var y=i.x.indexOf("%")>-1?p.width/100*parseFloat(i.x):parseFloat(i.x),f=i.y.indexOf("%")>-1?p.height/100*parseFloat(i.y):parseFloat(i.y);switch(a="None"===i.horizontalAlignment?a+y:a,n="None"===i.verticalAlignment?n+f:n,i.verticalAlignment){case"Near":n+=f;break;case"Center":n=n+f+(g.height/2-m.height/2);break;case"Far":n=n+g.height+f-m.height}switch(i.horizontalAlignment){case"Near":a+=y;break;case"Center":a=a+y+(g.width/2-m.width/2);break;case"Far":a=a+g.width+y-m.width}h.style.left=a+"px",h.style.top=n+"px",e.appendChild(h)},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),mi=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ui=function(e,t,i,o){var a,n=arguments.length,l=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(l=(n<3?a(l):n>3?a(t,i,l):a(t,i))||l);return n>3&&l&&Object.defineProperty(t,i,l),l},gi=function(e){function a(i,o){var a=e.call(this,i,o)||this;return a.isTileMap=!1,a.isResize=!1,a.isReset=!1,a.baseSize=new et(0,0),a.translatePoint=new tt(0,0),a.baseTranslatePoint=new tt(0,0),a.zoomTranslatePoint=new tt(0,0),a.markerZoomedState=!0,a.zoomPersistence=!1,a.defaultState=!0,a.centerPositionChanged=!1,a.isTileMapSubLayer=!1,a.markerNullCount=0,a.tileTranslatePoint=new tt(0,0),a.baseTileTranslatePoint=new tt(0,0),a.isDevice=!1,a.staticMapZoom=a.zoomSettings.enable?a.zoomSettings.zoomFactor:0,a.zoomNotApplied=!1,a.dataLabelShape=[],a.zoomShapeCollection=[],a.zoomLabelPositions=[],a.mouseDownEvent={x:null,y:null},a.mouseClickEvent={x:null,y:null},a.selectedElementId=[],a.selectedMarkerElementId=[],a.selectedBubbleElementId=[],a.selectedNavigationElementId=[],a.selectedLegendElementId=[],a.legendSelectionCollection=[],a.shapeSelections=!0,a.legendSelection=!0,a.toggledLegendId=[],a.toggledShapeElementId=[],a.checkInitialRender=!0,a.initialTileTranslate=new tt(0,0),a.initialCheck=!0,a.applyZoomReset=!1,a.markerClusterExpandCheck=!1,a.markerClusterExpand=!1,a.shapeSelectionItem=[],t.setValue("mergePersistData",a.mergePersistMapsData,a),a}return mi(a,e),Object.defineProperty(a.prototype,"isShapeSelected",{get:function(){return this.mapSelect},enumerable:!0,configurable:!0}),a.prototype.mergePersistMapsData=function(){var e,i;try{i=window.localStorage}catch(e){i=null}if(t.isNullOrUndefined(i)||(e=window.localStorage.getItem(this.getModuleName()+this.element.id)),!t.isNullOrUndefined(e)&&""!==e){var o=JSON.parse(e),a=Object.keys(o);this.isProtectedOnChange=!0;for(var n=0,l=a;n<l.length;n++){var r=l[n];"object"!=typeof this[r]||t.isNullOrUndefined(this[r])?this[r]=o[r]:t.extend(this[r],o[r])}this.isProtectedOnChange=!1}},a.prototype.getLocalizedLabel=function(e){return this.localeObject.getConstant(e)},a.prototype.preRender=function(){this.isDevice=t.Browser.isDevice,this.initPrivateVariable(),this.allowServerDataBinding=!1,this.unWireEVents(),this.wireEVents(),this.setCulture()},a.prototype.renderElements=function(){this.trigger("load",{maps:this}),this.createSVG(),this.findBaseAndSubLayers(),this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=Qe(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),this.renderArea(),this.processRequestJsonData(),this.renderComplete()},a.prototype.render=function(){this.renderElements()},a.prototype.processRequestJsonData=function(){var e=this,i=this.layersCollection.length-1;this.serverProcess={request:0,response:0};var a,n;Array.prototype.forEach.call(this.layersCollection,function(l,r){if(l.shapeData instanceof o.DataManager?(e.serverProcess.request++,n=l.shapeData,a=l.query instanceof o.Query?l.query:new o.Query,(s=n.executeQuery(a)).then(function(t){e.processResponseJsonData("DataManager",t,l,"ShapeData")})):(l.shapeData instanceof yt||l.shapeData)&&(t.isNullOrUndefined(l.shapeData.dataOptions)||e.processAjaxRequest(l,l.shapeData,"ShapeData")),l.dataSource instanceof o.DataManager){e.serverProcess.request++,n=l.dataSource,a=l.query instanceof o.Query?l.query:new o.Query;var s=n.executeQuery(a);s.then(function(e){l.dataSource=Ye(e)})}if(l.markerSettings.length>0)for(d=0;d<l.markerSettings.length;d++)!function(t){l.markerSettings[t].dataSource instanceof o.DataManager&&(e.serverProcess.request++,n=l.markerSettings[t].dataSource,a=l.markerSettings[t].query instanceof o.Query?l.markerSettings[t].query:new o.Query,n.executeQuery(a).then(function(e){l.markerSettings[t].dataSource=Ye(e)}))}(d);if(l.bubbleSettings.length>0)for(var d=0;d<l.bubbleSettings.length;d++)!function(t){l.bubbleSettings[t].dataSource instanceof o.DataManager&&(e.serverProcess.request++,n=l.bubbleSettings[t].dataSource,a=l.bubbleSettings[t].query instanceof o.Query?l.bubbleSettings[t].query:new o.Query,n.executeQuery(a).then(function(e){l.bubbleSettings[t].dataSource=Ye(e)}))}(d);(l.dataSource instanceof yt||!t.isNullOrUndefined(l.dataSource.dataOptions))&&e.processAjaxRequest(l,l.dataSource,"DataSource"),e.serverProcess.request===e.serverProcess.response&&i===r&&e.processResponseJsonData(null)})},a.prototype.processAjaxRequest=function(e,i,o){var a=this;this.serverProcess.request++;var n=new t.Ajax(i.dataOptions,i.type,i.async,i.contentType);n.onSuccess=function(t){a.processResponseJsonData("Ajax",t,e,o)},n.send(i.sendData)},a.prototype.processResponseJsonData=function(e,i,o,a){if(this.serverProcess.response++,e&&("ShapeData"===a?o.shapeData="DataManager"===e?Ye(i):JSON.parse(i):o.dataSource="DataManager"===e?Ye(i):JSON.parse("["+i+"]")[0]),t.isNullOrUndefined(e)||this.serverProcess.request!==this.serverProcess.response)t.isNullOrUndefined(e)&&this.renderMap();else{var n=this.layersCollection;this.layersCollection=[];for(var l=0;l<n.length;l++)n[l].isBaseLayer&&this.layersCollection.push(n[l]);for(var r=0;r<n.length;r++)n[r].isBaseLayer||this.layersCollection.push(n[r]);this.renderMap()}},a.prototype.renderMap=function(){this.legendModule&&this.legendSettings.visible&&this.legendModule.renderLegend(),this.createTile(),this.zoomSettings.enable&&this.zoomModule&&this.zoomModule.createZoomingToolbars(),t.isNullOrUndefined(this.dataLabelModule)||(this.dataLabelModule.dataLabelCollections=[],this.dataLabelShape=[]),this.mapLayerPanel.measureLayerPanel(),this.element.appendChild(this.svgObject);for(var e=this.getExtraPosition(),i=0;i<this.layers.length;i++){if(0!==e.x||0!==e.y){var o=document.getElementById(this.element.id+"_LayerIndex_"+i+"_Markers_Template_Group");t.isNullOrUndefined(o)||(o.style.top=this.mapAreaRect.y+e.y+"px",o.style.left=this.mapAreaRect.x+e.x+"px")}if(this.layers[i].selectionSettings&&this.layers[i].selectionSettings.enable&&this.layers[i].initialShapeSelection.length>0&&this.checkInitialRender){var a=this.layers[i].selectionSettings.enableMultiSelect;this.layers[i].selectionSettings.enableMultiSelect=a||!0;for(var n=this.layers[i].initialShapeSelection,l=0;l<this.layers[i].initialShapeSelection.length;l++)this.shapeSelection(i,n[l].shapePath,n[l].shapeValue,!0);this.layers[i].selectionSettings.enableMultiSelect=a,i===this.layers.length-1&&(this.checkInitialRender=!1)}if(!this.isResize)for(var r=0;r<this.layers[i].markerSettings.length;r++)if(this.layers[i].markerSettings[r].selectionSettings&&this.layers[i].markerSettings[r].selectionSettings.enable&&this.layers[i].markerSettings[r].initialMarkerSelection.length>0)for(var s=this.layers[i].markerSettings[r].initialMarkerSelection,l=0;l<s.length;l++)this.markerInitialSelection(i,r,this.layers[i].markerSettings[r],s[l].latitude,s[l].longitude)}if(!t.isNullOrUndefined(document.getElementById(this.element.id+"_tile_parent"))){var d,p=this.svgObject.getBoundingClientRect(),h=document.getElementById(this.element.id),c=document.getElementById(this.element.id+"_tile_parent"),m=document.getElementById(this.element.id+"_tiles"),u=c.getBoundingClientRect(),g=void 0,y=void 0;y=parseFloat(c.style.left)+h.offsetLeft;var f=x(this.titleSettings.text,this.titleSettings.textStyle),b=x(this.titleSettings.subtitleSettings.text,this.titleSettings.subtitleSettings.textStyle);this.isTileMap&&this.isTileMapSubLayer&&"Bottom"===this.legendSettings.position&&this.legendSettings.visible?"Default"!==this.legendSettings.mode?d=0!==f.width&&0!==f.height?parseFloat(c.style.top)+h.offsetTop+b.height/2-this.legendModule.legendBorderRect.height/2:parseFloat(c.style.top)+h.offsetTop-this.mapAreaRect.y:(y=this.legendModule.legendBorderRect.x,d=0!==f.width&&0!==f.height?parseFloat(c.style.top)+h.offsetTop+b.height/2-this.legendModule.legendBorderRect.y:parseFloat(c.style.top)+h.offsetTop+b.height/2):(g=p.bottom-u.bottom-h.offsetTop,d=parseFloat(c.style.top)+h.offsetTop),d=g<=11?d:t.isNullOrUndefined(this.legendModule)||"Bottom"!==this.legendSettings.position?2*d:this.mapAreaRect.y,y=g<=11?y:t.isNullOrUndefined(this.legendModule)?2*y:y,c.style.top=d+"px",c.style.left=y+"px",m.style.top=d+"px",m.style.left=y+"px",!t.isNullOrUndefined(this.legendModule)&&this.legendModule.totalPages.length>0&&(c.style.height=m.style.height=this.legendModule.legendTotalRect.height+"px",c.style.width=m.style.width=this.legendModule.legendTotalRect.width+"px")}this.arrangeTemplate(),this.annotationsModule&&"0px"!==this.width&&"0px"!==this.height&&"0%"!==this.width&&"0%"!==this.height&&this.annotationsModule.renderAnnotationElements(),this.element.style.outline="none";for(i=0;i<document.getElementsByTagName("path").length-1;i++)document.getElementsByTagName("path")[i].id.indexOf("shapeIndex")>-1&&(document.getElementsByTagName("path")[i].style.outline="none");this.zoomingChange(),this.trigger("loaded",{maps:this,isResized:this.isResize}),this.isResize=!1},a.prototype.markerSelection=function(e,t,i,o){var a={color:e.border.color,width:e.border.width/t.scale,opacity:e.border.opacity},n={opacity:e.opacity,fill:e.fill,border:a,target:i.id,cancel:!1,data:o,maps:t};be("MarkerselectionMap")?Le("MarkerselectionMap","MarkerselectionMapStyle",n):document.body.appendChild(_e("MarkerselectionMap","MarkerselectionMapStyle",n)),(0===this.selectedMarkerElementId.length||e.enableMultiSelect)&&("g"===i.tagName?(i.children[0].setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.children[0].id)):(i.setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.id)))},a.prototype.markerInitialSelection=function(e,t,i,o,a){var n=i.selectionSettings;if(n.enable)for(var l=0;l<i.dataSource.length;l++){var r=i.dataSource[l];if(r.latitude===o&&r.longitude===a){var s=this.element.id+"_LayerIndex_"+e+"_MarkerIndex_"+t+"_dataIndex_"+l;this.markerSelection(n,this,be(s),r)}}},a.prototype.renderArea=function(){var e=this.mapsArea.border.width,i=this.mapsArea.background;if(e>0||i||this.themeStyle.areaBackgroundColor){var o={opacity:t.isNullOrUndefined(this.mapsArea.border.opacity)?1:this.mapsArea.border.opacity,color:this.mapsArea.border.color,width:this.mapsArea.border.width},a=new rt(this.element.id+"_MapAreaBorder",i||this.themeStyle.areaBackgroundColor,o,1,this.mapAreaRect);this.svgObject.appendChild(this.renderer.drawRectangle(a))}},a.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"Maps Element"),this.element.setAttribute("tabindex",this.tabIndex.toString())},a.prototype.zoomingChange=function(){var e,i;if(ue(this.element.id+"_Layer_Collections")&&this.zoomModule&&(this.zoomModule.layerCollectionEle=ue(this.element.id+"_Layer_Collections")),this.isTileMap&&ue(this.element.id+"_Tile_SVG")&&ue(this.element.id+"_tile_parent")){var o=ue(this.element.id+"_tile_parent"),a=ue(this.element.id+"_Tile_SVG"),n=ue(this.element.id+"_Tile_SVG_Parent"),l=o.getBoundingClientRect(),r=a.getBoundingClientRect();e=l.left-r.left,i=l.top-r.top,n.style.left=e+"px",n.style.top=i+"px",!t.isNullOrUndefined(this.legendModule)&&this.legendModule.totalPages.length>0&&(o.style.width=a.style.width=this.legendModule.legendTotalRect.width.toString(),o.style.height=a.style.height=this.legendModule.legendTotalRect.height.toString(),n.style.width=this.legendModule.legendTotalRect.width+"px",n.style.height=this.legendModule.legendTotalRect.height+"px");var s=document.getElementsByClassName("template");if(!t.isNullOrUndefined(s)&&s.length>0)for(h=0;h<s.length;h++){var d=s[h];d.style.left=e+"px",d.style.top=i+"px"}}if(this.zoomSettings.zoomFactor>=0){this.zoomModule&&this.zoomModule.toolBarGroup&&this.zoomSettings.enable&&this.zoomModule.alignToolBar();var p=document.getElementById(this.element.id+"_Layer_Collections");if(!t.isNullOrUndefined(p)&&p.childElementCount>0)for(var h=0;h<p.childNodes.length;h++){var c=p.childNodes[h];if("g"===c.tagName&&-1==c.id.indexOf("_Legend_Group"))for(var m=parseFloat(c.id.split("_LayerIndex_")[1].split("_")[0]),u=0;u<c.childNodes.length;u++){var g=c.childNodes[u];g.id.indexOf("_Markers_Group")>-1||g.id.indexOf("_bubble_Group")>-1||g.id.indexOf("_dataLableIndex_Group")>-1||ze(g,m,this.scale,this)}}this.zoomModule&&this.previousScale!==this.scale&&this.zoomModule.applyTransform(!0)}},a.prototype.createSecondaryElement=function(){if(t.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))){var e=t.createElement("div",{id:this.element.id+"_Secondary_Element",styles:"position: absolute;z-index:2;"});this.element.appendChild(e)}},a.prototype.arrangeTemplate=function(){document.getElementById(this.element.id+"_Legend_Border")&&(document.getElementById(this.element.id+"_Legend_Border").style.pointerEvents="none");var e=document.getElementsByClassName(this.element.id+"_template");if(!t.isNullOrUndefined(e)&&e.length>0&&ue(this.element.id+"_Layer_Collections")&&!this.isTileMap)for(var i=0;i<e.length;i++){var o=0,a=0,n=e[i];if(!t.isNullOrUndefined(n)&&n.childElementCount>0){var l=ue(this.element.id+"_Layer_Collections").getBoundingClientRect(),r=ue(n.id).getBoundingClientRect();-1===n.id.indexOf("Marker")&&(o=this.isTileMap?0:l.left<r.left?-Math.abs(r.left-l.left):Math.abs(r.left-l.left),a=this.isTileMap?0:l.top<r.top?-Math.abs(r.top-l.top):Math.abs(r.top-l.top));for(var s=0;s<n.childElementCount;s++){var d=n.childNodes[s];if(-1!==d.id.indexOf("Marker")){var p=ue(d.id).getBoundingClientRect();d.style.left=parseFloat(d.style.left)-(this.isTileMap?0:p.width/2)+"px",d.style.top=parseFloat(d.style.top)-(this.isTileMap?0:p.height/2)+"px"}else d.style.left=parseFloat(d.style.left)+o+"px",d.style.top=parseFloat(d.style.top)+a+"px",d.style.transform="translate(-50%, -50%)"}}}},a.prototype.createTile=function(){var e=this.layersCollection[0];if(e.isBaseLayer&&("OSM"===e.layerType||"Bing"===e.layerType||"GoogleStaticMap"===e.layerType||"Google"===e.layerType||!t.isNullOrUndefined(e.urlTemplate)&&""!==e.urlTemplate)){de(this.element.id+"_tile_parent"),de(this.element.id+"_tiles"),de("animated_tiles");var i=t.createElement("div",{id:this.element.id+"_tile_parent",styles:"position: absolute; left: "+this.mapAreaRect.x+"px; right: "+this.margin.right+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;"}),o=t.createElement("div",{id:this.element.id+"_tiles",styles:"position: absolute; left: "+this.mapAreaRect.x+"px; right: "+this.margin.right+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;"});this.element.appendChild(i),this.element.appendChild(o)}},a.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-maps").length;this.element.id="maps_control_"+e}this.renderer=new i.SvgRenderer(this.element.id),this.mapLayerPanel=new hi(this)},a.prototype.findBaseAndSubLayers=function(){var e=this,i=this.baseLayerIndex,o=[],a=[];this.layersCollection=[],Array.prototype.forEach.call(this.layers,function(e){"Layer"===e.type?o.push(e):a.push(e)});for(var n=0;n<o.length;n++){var l=o[n];if(l.visible&&i===n){l.isBaseLayer=!0,this.isTileMap=!("Geometry"===l.layerType&&!t.isNullOrUndefined(l.shapeData)),this.layersCollection.push(l);break}if(n===o.length-1){this.layersCollection.push(o[0]);break}}a.map(function(t,i){t.visible&&e.layersCollection.push(t)})},a.prototype.renderBorder=function(){var e=this.border.width,i=this.svgObject.querySelector("#"+this.element.id+"_MapBorder");if((e>0||this.background||this.themeStyle.backgroundColor)&&t.isNullOrUndefined(i)){var o={opacity:t.isNullOrUndefined(this.border.opacity)?1:this.border.opacity,color:this.border.color,width:this.border.width},a=new rt(this.element.id+"_MapBorder",this.background||this.themeStyle.backgroundColor,o,1,new ut(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e));this.svgObject.appendChild(this.renderer.drawRectangle(a))}else i.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},a.prototype.renderTitle=function(e,i,o,a){var n,l={size:e.textStyle.size,color:e.textStyle.color,fontFamily:e.textStyle.fontFamily,fontWeight:e.textStyle.fontWeight,fontStyle:e.textStyle.fontStyle,opacity:e.textStyle.opacity},r=Math.abs(this.margin.left+this.margin.right-this.availableSize.width);if(l.fontFamily=t.isNullOrUndefined(l.fontFamily)?this.themeStyle.fontFamily:l.fontFamily,l.fontWeight=l.fontWeight||this.themeStyle.titleFontWeight,l.size="title"===i?l.size||this.themeStyle.titleFontSize:l.size||Ke.mapsSubTitleFont.size,e.text){t.isNullOrUndefined(a)&&(a=this.renderer.createGroup({id:this.element.id+"_Title_Group"}));var s=re(r,e.text,l),d=x(s,l),p=se(t.isNullOrUndefined(o)?new ut(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):o,e.alignment,d,i),h=new at(this.element.id+"_Map_"+i,p.x,p.y,"start",s),c=new ut(p.x,p.y,d.width,d.height);O(h,l,l.color||("title"===i?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),a).setAttribute("aria-label",this.description||e.text),("title"===i&&!e.subtitleSettings.text||"subtitle"===i)&&(n=Math.abs(c.y+this.margin.bottom-this.availableSize.height),this.mapAreaRect=new ut(this.margin.left,c.y+10,r,n-10)),"subtitle"!==i&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",c,a):this.svgObject.appendChild(a)}else n=Math.abs(this.margin.top+this.margin.bottom-this.availableSize.height),this.mapAreaRect=new ut(this.margin.left,this.margin.top,r,n)},a.prototype.createSVG=function(){this.removeSvg(),r(this)},a.prototype.removeSvg=function(){if(de(this.element.id+"_Secondary_Element"),de(this.element.id+"_tile_parent"),de(this.element.id+"_tiles"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}this.clearTemplate()},a.prototype.wireEVents=function(){t.EventHandler.add(this.element,"click",this.mapsOnClick,this),t.EventHandler.add(this.element,"dblclick",this.mapsOnDoubleClick,this),t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.mouseDownOnMap,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnMap,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEndOnMap,this),t.EventHandler.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap,this),t.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.mapsOnResize.bind(this))},a.prototype.unWireEVents=function(){t.EventHandler.remove(this.element,"click",this.mapsOnClick),t.EventHandler.remove(this.element,"dblclick",this.mapsOnDoubleClick),t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.mouseDownOnMap),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnMap),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEndOnMap),t.EventHandler.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.mapsOnResize)},a.prototype.mouseLeaveOnMap=function(e){document.getElementsByClassName("highlightMapStyle").length>0&&this.legendModule&&(this.legendModule.removeShapeHighlightCollection(),we(document.getElementsByClassName("highlightMapStyle")[0]))},a.prototype.keyUpHandler=function(e){var t=e.target.id;"Tab"===e.code&&t.indexOf("_LayerIndex_")>-1&&t.indexOf("shapeIndex")>-1?this.keyboardHighlightSelection(t,e.type):-1===t.indexOf("_LayerIndex_")&&-1===t.indexOf("shapeIndex")&&xe("highlightMapStyle").length>0&&(we(xe("highlightMapStyle")[0]),this.legendSettings.visible&&this.legendModule&&this.legendModule.removeShapeHighlightCollection())},a.prototype.keyboardHighlightSelection=function(e,i){var o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),a=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),n=this.layers[o].shapeData.features.length>a?this.layers[o].shapeData.features[a].properties:null,l=parseInt(e.split("_dataIndex_")[1].split("_")[0],10),r=t.isNullOrUndefined(l)?null:this.layers[o].dataSource[l];this.layers[o].selectionSettings.enable&&"keydown"===i&&this.selectionModule?(this.selectionModule.selectionsettings=this.layers[o].selectionSettings,this.selectionModule.selectionType="Shape",this.selectionModule.selectElement(event.target,o,r,n)):this.highlightModule&&this.layers[o].highlightSettings.enable&&"keyup"===i&&!event.target.classList.contains("ShapeselectionMapStyle")&&(this.highlightModule.highlightSettings=this.layers[o].highlightSettings,this.highlightModule.handleHighlight(event.target,o,r,n))},a.prototype.keyDownHandler=function(e){var t=this.zoomModule;if("+"!==e.key&&"Equal"!==e.code||!t)if("-"!==e.key&&"Minus"!==e.code||!t)if(82===e.keyCode&&t)t.performZoomingByToolBar("reset");else if("ArrowUp"!==e.code&&"ArrowDown"!==e.code||!t)if("ArrowLeft"!==e.code&&"ArrowRight"!==e.code||!t){if("Enter"===e.code){var i=e.target.id;if(e.preventDefault(),this.legendModule&&(i.indexOf("_Left_Page_Rect")>-1||i.indexOf("_Right_Page_Rect")>-1)){this.mapAreaRect=this.legendModule.initialMapAreaRect,this.legendModule.currentPage=i.indexOf("_Left_Page_")>-1?this.legendModule.currentPage-1:this.legendModule.currentPage+1,this.legendModule.legendGroup=this.renderer.createGroup({id:this.element.id+"_Legend_Group"}),this.legendModule.drawLegendItem(this.legendModule.currentPage);var o=document.getElementById(this.element.id+"_Paging_Text").textContent.split("/").map(Number);i.indexOf("_Left_Page_Rect")>-1?(1!==o[0]&&e.target.focus(),e.target.style.outlineColor=o[0]-1!==o[1]?"":"transparent"):i.indexOf("_Right_Page_Rect")>-1&&(o[0]!==o[1]&&e.target.focus(),e.target.style.outlineColor=o[0]!==o[1]+1?"":"transparent"),Oe(this.element.id+"_Legend_Border",this.element.id)&&(Oe(this.element.id+"_Legend_Border",this.element.id).style.pointerEvents="none")}i.indexOf("shapeIndex")>-1&&this.keyboardHighlightSelection(i,e.type)}}else e.preventDefault(),t.mouseDownLatLong.y=0,t.mouseMoveLatLong.x=this.mapAreaRect.width/7,t.panning("None","ArrowLeft"===e.code?-t.mouseMoveLatLong.x:t.mouseMoveLatLong.x,t.mouseDownLatLong.y,e),t.mouseDownLatLong.x=t.mouseMoveLatLong.x;else e.preventDefault(),t.mouseDownLatLong.x=0,t.mouseMoveLatLong.y=this.mapAreaRect.height/7,t.panning("None",t.mouseDownLatLong.x,"ArrowUp"===e.code?-t.mouseMoveLatLong.y:t.mouseMoveLatLong.y,e),t.mouseDownLatLong.y=t.mouseMoveLatLong.y;else t.performZoomingByToolBar("zoomout");else t.performZoomingByToolBar("zoomin")},a.prototype.SelectedElement=function(e){var t=!1;return"ShapeselectionMapStyle"===e.getAttribute("class")&&(t=!0),t},a.prototype.mapsOnClick=function(e){var i=this,o=e.target,a=o.id,n=null,l=null;if(this.mouseClickEvent={x:e.x,y:e.y},-1===o.id.indexOf("_ToolBar")){var r=this.getClickLocation(a,e.pageX,e.pageY,o,e.layerX,e.layerY);t.isNullOrUndefined(r)||(n=r.latitude,l=r.longitude);var s={cancel:!1,name:ei,target:a,x:e.clientX,y:e.clientY,latitude:n,longitude:l,isShapeSelected:this.SelectedElement(o)};this.trigger("click",s,function(t){o.id.indexOf("shapeIndex")>-1&&(i.mergeCluster(),be(i.element.id+"_mapsTooltip")&&i.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&de(i.element.id+"_mapsTooltip")),i.markerModule&&i.markerModule.markerClusterClick(e),s.cancel||i.notify(ei,o),s.cancel||-1===o.id.indexOf("shapeIndex")||i.triggerShapeSelection(o)})}},a.prototype.triggerShapeSelection=function(e){var i=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),o=Se(e.id,this.layers[i].selectionSettings,this,"shapeSelected");o.cancel||!this.selectionModule||t.isNullOrUndefined(this.shapeSelected)?o.cancel&&this.selectionModule&&t.isNullOrUndefined(o.data)&&(we(e),this.selectionModule.removedSelectionList(e)):Le(this.selectionModule.selectionType+"selectionMap",this.selectionModule.selectionType+"selectionMapStyle",o)},a.prototype.getClickLocation=function(e,t,i,o,a,n){var l,r=0;if(-1===e.indexOf("_LayerIndex_")||this.isTileMap||parseInt(this.mouseDownEvent.x)!==parseInt(this.mouseClickEvent.x)||parseInt(this.mouseDownEvent.y)!==parseInt(this.mouseClickEvent.y))this.isTileMap&&parseInt(this.mouseDownEvent.x)===parseInt(this.mouseClickEvent.x)&&parseInt(this.mouseDownEvent.y)===parseInt(this.mouseClickEvent.y)&&(l=this.getTileGeoLocation(a,n));else if(r=parseFloat(e.split("_LayerIndex_")[1].split("_")[0]),"Normal"===this.layers[r].geometryType)if(e.indexOf("_shapeIndex_")>-1){var d=s(t,i,o.parentElement),p=Math.abs(-this.baseMapBounds.longitude.min*this.mapLayerPanel.currentFactor),h=Math.abs(this.baseMapBounds.latitude.max*this.mapLayerPanel.currentFactor);l={latitude:Math.abs(this.baseMapBounds.latitude.max-d.y/this.mapLayerPanel.currentFactor),longitude:Math.abs(d.x/this.mapLayerPanel.currentFactor+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&p>d.x&&(l.longitude=-l.longitude),this.baseMapBounds.latitude.min<0&&h>d.y&&(l.latitude=-l.latitude)}else if(e.indexOf("_MarkerIndex_")>-1&&this.markerModule){var c=parseInt(e.split("_MarkerIndex_")[1].split("_")[0],10),m=parseInt(e.split("_dataIndex_")[1].split("_")[0],10);if(isNaN(c)||isNaN(m))l={latitude:null,longitude:null};else{var u=this.layers[r].markerSettings[c].dataSource[m];l={latitude:u.latitude,longitude:u.longitude}}}else l={latitude:null,longitude:null};else l=this.getGeoLocation(r,a,n);return l},a.prototype.mouseEndOnMap=function(e){var i,o,a,n=e.target,l=n.id,r=null,s=null;this.element.getBoundingClientRect(),e.target;if(-1!==e.type.indexOf("touch")?(this.isTouch=!0,i=(a=e).changedTouches[0].pageX,o=a.changedTouches[0].pageY,a.target,this.mouseClickEvent={x:i,y:o}):(this.isTouch="touch"===e.pointerType,i=e.pageX,o=e.pageY,e.target),this.isTouch){if(-1===n.id.indexOf("_ToolBar")){var d=this.getClickLocation(l,i,o,n,i,o);t.isNullOrUndefined(d)||(r=d.latitude,s=d.longitude);var p={cancel:!1,name:ei,target:l,x:e.clientX,y:e.clientY,latitude:r,longitude:s,isShapeSelected:this.SelectedElement(n)};this.trigger("click",p,function(e){})}this.titleTooltip(e,i,o,!0),t.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)}return this.notify(t.Browser.touchEndEvent,e),e.cancelable&&e.preventDefault(),!1},a.prototype.mouseDownOnMap=function(e){this.mouseDownEvent={x:e.x,y:e.y},-1!==e.type.indexOf("touch")&&e.changedTouches&&(this.mouseDownEvent={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY});this.element.getBoundingClientRect();var i=e.target;if(-1===i.id.indexOf("_ToolBar")){var o=this.markerModule;(i.id.indexOf("shapeIndex")>-1||i.id.indexOf("Tile")>-1)&&(this.mergeCluster(),i.id.indexOf("shapeIndex")>-1&&this.triggerShapeSelection(i)),o&&(o.markerClick(e),o.markerClusterClick(e)),this.bubbleModule&&this.bubbleModule.bubbleClick(e)}this.notify(t.Browser.touchStartEvent,e)},a.prototype.mergeCluster=function(){this.markerModule&&this.markerModule.sameMarkerData.length>0&&(!this.zoomModule||this.zoomModule.isSingleClick)&&(k(this.markerModule.sameMarkerData,this,be(this.element.id+"_Markers_Group")),this.markerModule.sameMarkerData=[])},a.prototype.mapsOnDoubleClick=function(e){this.notify("dblclick",e);var t,i=e.target,o=i.id,a=0,n=null,l=null;if(-1===i.id.indexOf("_ToolBar")){-1===i.id.indexOf("_LayerIndex_")||this.isTileMap||this.mouseDownEvent.x!==e.clientX||this.mouseDownEvent.y!==e.clientY?this.isTileMap&&this.mouseDownEvent.x===e.clientX&&this.mouseDownEvent.y===e.clientY&&(n=(t=this.getTileGeoLocation(e.layerX,e.layerY)).latitude,l=t.longitude):(a=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),n=(t=this.getGeoLocation(a,e.layerX,e.layerY)).latitude,l=t.longitude);var r={cancel:!1,name:"doubleClick",x:e.clientX,y:e.clientY,target:o,latitude:n,longitude:l,isShapeSelected:null};this.trigger("doubleClick",r)}},a.prototype.mouseMoveOnMap=function(e){"touchmove"===e.type?e.target:e.target,this.markerModule&&(this.markerModule.markerMove(e),this.markerModule.markerClusterMouseMove(e)),this.bubbleModule&&this.bubbleModule.bubbleMove(e),this.onMouseMove(e),this.notify(t.Browser.touchMoveEvent,e)},a.prototype.onMouseMove=function(e){e.target;return this.isTouch||(this.titleTooltip(e,e.pageX,e.pageY),t.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)),!1},a.prototype.legendTooltip=function(e,t,i,o){var a,n,l=e.target.id,r=this.legendModule.currentPage,s=e.target.id.split("_Index_")[1];r=this.legendModule.totalPages.length<=this.legendModule.currentPage?this.legendModule.totalPages.length-1:this.legendModule.currentPage<0?0:this.legendModule.currentPage;for(var d=0!==this.legendModule.totalPages.length?this.legendModule.totalPages[r].Collection.length:this.legendModule.totalPages.length,p=0;p<d;p++)a=(n=this.legendModule.totalPages[r].Collection[p]).DisplayText,l=e.target.id,s=e.target.id.split("_Index_")[1],l===this.element.id+"_Legend_Text_Index_"+s&&e.target.textContent.indexOf("...")>-1&&n.idIndex===parseInt(s,10)&&Te(a,this.legendSettings.textStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Legend_Text_Tooltip",be(this.element.id+"_Secondary_Element"),o);l!==this.element.id+"_Legend_Text_Index_"+s&&de(this.element.id+"_EJ2_Legend_Text_Tooltip")},a.prototype.titleTooltip=function(e,t,i,o){var a=e.target.id;a===this.element.id+"_LegendTitle"&&e.target.textContent.indexOf("...")>-1?Te(this.legendSettings.title.text,this.legendSettings.titleStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_LegendTitle_Tooltip",be(this.element.id+"_Secondary_Element"),o):de(this.element.id+"_EJ2_LegendTitle_Tooltip"),a===this.element.id+"_Map_title"&&e.target.textContent.indexOf("...")>-1?Te(this.titleSettings.text,this.titleSettings.textStyle.size||this.themeStyle.titleFontSize,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Title_Tooltip",be(this.element.id+"_Secondary_Element"),o):de(this.element.id+"_EJ2_Title_Tooltip")},a.prototype.mapsOnResize=function(e){var i=this;this.isResize=this.isReset=!0;var o={cancel:!1,name:"resize",previousSize:this.availableSize,currentSize:l(this),maps:this};return this.trigger("resize",o),o.cancel||(this.resizeTo&&clearTimeout(this.resizeTo),!t.isNullOrUndefined(this.element)&&this.element.classList.contains("e-maps")&&(this.resizeTo=setTimeout(function(){i.unWireEVents(),i.createSVG(),i.refreshing=!0,i.wireEVents(),i.render(),i.refreshing=!1},500))),!1},a.prototype.zoomByPosition=function(e,i){var o,a=this.mapLayerPanel.calculateFactor(this.layersCollection[0]),n=this.mapAreaRect;if(!this.isTileMap&&this.zoomModule)if(t.isNullOrUndefined(e))o={x:n.width/2,y:n.height/2},this.zoomModule.performZooming(o,i,i>this.scale?"ZoomIn":"ZoomOut");else{o=h(e.latitude,e.longitude,a,this.layersCollection[0],this);var l=document.getElementById(this.element.id+"_Layer_Collections").getBoundingClientRect(),r=this.svgObject.getBoundingClientRect(),s=Math.abs(l.left-r.left)/this.scale,d=Math.abs(l.top-r.top)/this.scale,p=this.translatePoint.x+s,c=this.translatePoint.y+d;this.scale=i,this.translatePoint.x=((l.left<r.left?p:0)+n.width/2-o.x*i)/i,this.translatePoint.y=((l.top<r.top?c:0)+n.height/2-o.y*i)/i,this.zoomModule.applyTransform()}else this.zoomModule&&(this.tileZoomLevel=i,this.tileTranslatePoint=this.mapLayerPanel.panTileMap(this.availableSize.width,this.availableSize.height,{x:e.longitude,y:e.latitude}),this.mapLayerPanel.generateTiles(i,this.tileTranslatePoint,null,new di(this)))},a.prototype.panByDirection=function(e,t){var i=0,o=0;switch(e){case"Left":i=-this.mapAreaRect.width/7;break;case"Right":i=this.mapAreaRect.width/7;break;case"Top":o=-this.mapAreaRect.height/7;break;case"Bottom":o=this.mapAreaRect.height/7}this.zoomModule&&this.zoomModule.panning(e,i,o,t)},a.prototype.addLayer=function(e){this.layers.push(new Jt(this.layers[0],"layers",e)),this.refresh()},a.prototype.removeLayer=function(e){this.layers.splice(e,1),this.refresh()},a.prototype.addMarker=function(e,t){var i=document.getElementById(this.element.id+"_LayerIndex_"+e);if(t.length>0&&i){for(var o=0,a=t;o<a.length;o++){var n=a[o];this.layersCollection[e].markerSettings.push(new Yt(this,"markerSettings",n))}new $t(this).markerRender(i,e,this.mapLayerPanel.currentFactor,"AddMarker"),this.arrangeTemplate()}},a.prototype.shapeSelection=function(e,i,o,a){var n,l,r=Array.isArray(i)?i:Array(i);t.isNullOrUndefined(a)&&(a=!0);var s=this.layers[e].selectionSettings;if(!s.enableMultiSelect&&this.legendSelection&&a&&this.removeShapeSelection(),"SubLayer"===this.layers[e].type)for(y=0;y<this.layersCollection.length;y++)if(this.layersCollection[y].shapeData===this.layers[e].shapeData){l=y;break}if(s.enable)for(var d=void 0,p=void 0,h=void 0,c=void 0,m=void 0,u=void 0,g=this.layers[e].shapeData.features,y=0;y<g.length;y++)for(var f=0;f<r.length;f++){var b=void 0;if((!t.isNullOrUndefined(g[y].properties[r[f]])&&isNaN(g[y].properties[r[f]])?g[y].properties[r[f]].toLowerCase():g[y].properties[r[f]])===(t.isNullOrUndefined(o)?o:o.toLowerCase())){t.isNullOrUndefined(this.layers[e].shapeSettings.colorValuePath)||(b=te(this.layers[e].dataSource,g[y].properties,this.layers[e].shapeDataPath,this.layers[e].shapePropertyPath,this.layers[e]));var v=this.layers[e];if(this.baseLayerIndex>=0&&v.isBaseLayer?c=0:"SubLayer"===this.layers[e].type&&(c=l),d=this.element.id+"_LayerIndex_"+c+"_shapeIndex_"+y+"_dataIndex_"+b,n=be(d),t.isNullOrUndefined(b)&&t.isNullOrUndefined(n)&&(n=be(d=this.element.id+"_LayerIndex_"+e+"_shapeIndex_"+y+"_dataIndex_null")),h=parseInt(n.id.split("_shapeIndex_")[1].split("_")[0],10),m=this.layers[e].shapeData.features.length>h?this.layers[e].shapeData.features[h].properties:null,p=parseInt(n.id.split("_dataIndex_")[1].split("_")[0],10),u=t.isNullOrUndefined(p)?null:this.layers[e].dataSource[p],a){if(Ce(s,this,n,m,u),this.shapeSelectionClass=be("ShapeselectionMap"),this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&this.legendModule.shapeHighLightAndSelection(n,u,s,"selection",e),(S=!this.legendSettings.visible||this.legendModule.shapeToggled)&&(n.setAttribute("class","ShapeselectionMapStyle"),-1===this.selectedElementId.indexOf(n.getAttribute("id"))&&this.selectedElementId.push(n.getAttribute("id")),!s.enableMultiSelect))return}else{this.legendSelection=!s.enableMultiSelect&&!this.legendSelection||this.legendSelection,this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&"ShapeselectionMapStyle"===n.getAttribute("class")&&this.legendModule.shapeHighLightAndSelection(n,u,s,"selection",e);var S=!this.legendSettings.visible||this.legendModule.shapeToggled;if(S){we(n);var x=this.selectedElementId.indexOf(n.getAttribute("id"));-1!==x&&(this.selectedElementId.splice(x,1),!s.enableMultiSelect&&this.legendSelection&&this.selectedElementId.length>0&&this.removeShapeSelection())}}}}},a.prototype.zoomToCoordinates=function(e,i,o,a){var n,l,r,s,d=!1;(t.isNullOrUndefined(o)&&t.isNullOrUndefined(a)||t.isNullOrUndefined(e)&&t.isNullOrUndefined(i))&&(e=t.isNullOrUndefined(e)?0:e,i=t.isNullOrUndefined(e)?0:i,o=t.isNullOrUndefined(o)?e:o,a=t.isNullOrUndefined(a)?i:a,d=!0),e>o&&(e=(n=[o,e])[0],o=n[1]),i>a&&(i=(l=[a,i])[0],a=l[1]),d?(r=e+o,s=i+a):(r=(e+o)/2,s=(i+a)/2),this.centerLatOfGivenLocation=r,this.centerLongOfGivenLocation=s,this.minLatOfGivenLocation=e,this.minLongOfGivenLocation=i,this.maxLatOfGivenLocation=o,this.maxLongOfGivenLocation=a,this.zoomNotApplied=!0,this.scaleOfGivenLocation=Xe(e,o,i,a,this.mapAreaRect.width,this.mapAreaRect.height,this);var p={cancel:!1,name:"zoom",type:"zoomIn",maps:this,tileTranslatePoint:{},translatePoint:{},tileZoomLevel:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{},scale:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{previous:this.scale,current:this.scaleOfGivenLocation}};this.trigger("zoom",p),this.refresh()},a.prototype.removeShapeSelection=function(){for(var e=this.selectedElementId.length,t=0;t<e;t++)we(ue(this.selectedElementId[0])),this.selectedElementId.splice(0,1);if(this.legendSettings.visible)for(var i=this.legendSelectionCollection.length,t=0;t<i;t++)we(ue(this.legendSelectionCollection[t].legendElement.id)),this.selectedLegendElementId.splice(0,1);this.shapeSelectionItem=[],this.legendSelectionCollection=[]},a.prototype.setCulture=function(){this.intl=new t.Internationalization,this.setLocaleConstants(),this.localeObject=new t.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},a.prototype.setLocaleConstants=function(){this.defaultLocalConstants={ZoomIn:"Zoom in",Zoom:"Zoom",ZoomOut:"Zoom out",Pan:"Pan",Reset:"Reset"}},a.prototype.destroy=function(){this.unWireEVents(),this.shapeSelectionItem=[],this.toggledShapeElementId=[],this.toggledLegendId=[],this.legendSelectionCollection=[],this.selectedLegendElementId=[],this.selectedNavigationElementId=[],this.selectedBubbleElementId=[],this.selectedMarkerElementId=[],this.selectedElementId=[],this.dataLabelShape=[],this.zoomShapeCollection=[],this.zoomLabelPositions=[],this.mouseDownEvent={x:null,y:null},this.mouseClickEvent={x:null,y:null},document.getElementById("mapsmeasuretext")&&document.getElementById("mapsmeasuretext").remove(),this.removeSvg(),e.prototype.destroy.call(this)},a.prototype.getModuleName=function(){return"maps"},a.prototype.getPersistData=function(){var e=["translatePoint","zoomSettings","mapScaleValue","tileTranslatePoint","baseTranslatePoint","scale","zoomPersistence","defaultState","markerZoomedState","initialCheck","initialZoomLevel","initialTileTranslate","applyZoomReset","markerZoomFactor"];return this.addOnPersist(e)},a.prototype.onPropertyChanged=function(i,o){var a=!1,n=!1,l=!1;if(i.layers){var r=Object.keys(i.layers).length;document.getElementById(this.element.id+"_LayerIndex_"+(r-1))}for(var s=0,d=Object.keys(i);s<d.length;s++){var p=d[s];switch(p){case"background":this.renderBorder();break;case"height":case"width":case"layers":case"projectionType":case"centerPosition":case"legendSettings":case"baseLayerIndex":if("layers"===p)for(var h=Object.keys(i.layers).length,c=0;c<h;c++)if(!t.isNullOrUndefined(i.layers[c]))for(var m=0,u=Object.keys(i.layers[c]);m<u.length;m++){var g=u[m];"layerType"===g&&"Geometry"!==i.layers[c].layerType||t.isNullOrUndefined(this.layers[c].shapeData)&&!t.isNullOrUndefined(this.layers[c].urlTemplate)&&""!==this.layers[c].urlTemplate?this.isReset=!0:"markerSettings"===g?n=!0:"staticMapType"===g&&(l=!0)}a=!0;break;case"zoomSettings":t.isNullOrUndefined(o.zoomSettings)||(i.zoomSettings.zoomFactor!==o.zoomSettings.zoomFactor?a=!1:i.zoomSettings.shouldZoomInitially!==o.zoomSettings.shouldZoomInitially?(this.zoomSettings.zoomFactor=1,a=!0):i.zoomSettings.enable!==o.zoomSettings.enable?(this.zoomSettings.zoomFactor=1,a=!0):a=!0);break;case"locale":case"currencyCode":e.prototype.refresh.call(this)}}a&&(i.layers&&n?(de(this.element.id+"_Markers_Group"),this.isTileMap?this.mapLayerPanel.renderTileLayer(this.mapLayerPanel,this.layers.currentFactor,this.layers.length-1):this.render()):i.layers&&l?this.mapLayerPanel.renderGoogleMap(this.layers[this.layers.length-1].key,this.staticMapZoom):(this.createSVG(),this.renderElements()))},a.prototype.requiredModules=function(){var e=[],t=this.findVisibleLayers(this.layers),i=!1;return this.annotations.map(function(e,t){i=null!=e.content}),this.isBubbleVisible()&&e.push({member:"Bubble",args:[this]}),t.highlight&&e.push({member:"Highlight",args:[this]}),t.selection&&e.push({member:"Selection",args:[this]}),this.legendSettings.visible&&e.push({member:"Legend",args:[this]}),(this.zoomSettings.enable||this.zoomSettings.zoomFactor>this.zoomSettings.minZoom)&&e.push({member:"Zoom",args:[this]}),this.isMarkersVisible()&&e.push({member:"Marker",args:[this]}),this.isDataLabelVisible()&&e.push({member:"DataLabel",args:[this]}),this.isNavigationVisible()&&e.push({member:"NavigationLine",args:[this]}),t.tooltip&&e.push({member:"MapsTooltip",args:[this]}),i&&e.push({member:"Annotations",args:[this,ci]}),this.allowPrint&&e.push({member:"Print",args:[this]}),this.allowImageExport&&e.push({member:"ImageExport",args:[this]}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this]}),e},a.prototype.isMarkersVisible=function(){var e=!1;return Array.prototype.forEach.call(this.layers,function(t,i){for(var o=0;o<t.markerSettings.length;o++)if(t.markerSettings[o].visible){e=!0;break}}),e},a.prototype.isDataLabelVisible=function(){for(var e=!1,t=0;t<this.layers.length;t++)if(this.layers[t].dataLabelSettings.visible){e=!0;break}return e},a.prototype.isNavigationVisible=function(){var e=!1;return Array.prototype.forEach.call(this.layers,function(t,i){for(var o=0;o<t.navigationLineSettings.length;o++)if(t.navigationLineSettings[o].visible){e=!0;break}}),e},a.prototype.getExtraPosition=function(){var e=0,i=0,o=be(this.element.id+"_svg");if(!t.isNullOrUndefined(o)){var a=o.getClientRects(),n=be(this.element.id+"_Secondary_Element").getClientRects();if(0!==a.length&&0!==n.length){var l=a[0],r=n[0];e=l.top-r.top,i=l.left-r.left}}return new tt(i,e)},a.prototype.isBubbleVisible=function(){for(var e=!1,t=0,i=this.layers;t<i.length;t++){var o=i[t];if(this.getBubbleVisible(o)){e=!0;break}}return e},a.prototype.getBubbleVisible=function(e){for(var t=!1,i=0,o=e.bubbleSettings;i<o.length;i++)if(o[i].visible){t=!0;break}return t},a.prototype.print=function(e){this.allowPrint&&this.printModule&&this.printModule.print(e)},a.prototype.export=function(e,i,o,a){var n=this;return t.isNullOrUndefined(a)&&(a=!0),"PDF"!==e&&this.allowImageExport&&this.imageExportModule?new Promise(function(t,o){t(n.imageExportModule.export(e,i,a))}):this.allowPdfExport&&this.pdfExportModule?new Promise(function(t,l){t(n.pdfExportModule.export(e,i,a,o))}):null},a.prototype.getBingUrlTemplate=function(e){return new Promise(function(i,o){var a=new t.Ajax({url:e});a.onSuccess=function(e){var t=JSON.parse(e).resourceSets[0].resources[0];i(t.imageUrl)},a.send()})},a.prototype.findVisibleLayers=function(e,t,i,o,a,n){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),void 0===n&&(n=!1);for(var l,r,s,d=0,p=e;d<p.length;d++){var h=p[d];if(t=h.visible||t,h.visible){l=h.bubbleSettings,r=h.markerSettings;for(var c=0,m=s=h.navigationLineSettings;c<m.length;c++){var u=m[c];u.visible&&(a=u.highlightSettings.enable||a,n=u.selectionSettings.enable||n)}for(var g=0,y=r;g<y.length;g++){var f=y[g];if(f.visible&&(o=f.tooltipSettings.visible||o,a=f.selectionSettings.enable||a,n=f.highlightSettings.enable||n),o)break}for(var b=0,v=l;b<v.length;b++){var S=v[b];if(S.visible&&(o=S.tooltipSettings.visible||o,a=S.selectionSettings.enable||a,n=S.highlightSettings.enable||n),o)break}o=h.tooltipSettings.visible||o,a=h.selectionSettings.enable||a,n=h.highlightSettings.enable||n}if(t&&i&&o)break}return{layer:t,bubble:i,tooltip:o,selection:a,highlight:n}},a.prototype.getGeoLocation=function(e,t,i){var o=document.getElementById(this.element.id),a=t-o.offsetLeft,n=i-o.offsetTop,l=he(this,this.layersCollection[e],!1).location,r=l.x*this.scale,s=l.y*this.scale,d=Math.min(this.mapAreaRect.height,this.mapAreaRect.width)*this.mapLayerPanel.currentFactor*this.scale,p=this.clip(a-r,0,d-1)/d-.5,h=.5-this.clip(n-s,0,d-1)/d;return{latitude:90-360*Math.atan(Math.exp(2*-h*Math.PI))/Math.PI,longitude:360*p}},a.prototype.clip=function(e,t,i){return Math.min(Math.max(e,t),i)},a.prototype.getTileGeoLocation=function(e,t){var i=document.getElementById(this.element.id),o=document.getElementById(this.element.id+"_tile_parent"),a=this.pointToLatLong(e+this.mapAreaRect.x-(o.offsetLeft-i.offsetLeft),t+this.mapAreaRect.y-(o.offsetTop-i.offsetTop));return{latitude:a.latitude,longitude:a.longitude}},a.prototype.pointToLatLong=function(e,t){var i="GoogleStaticMap"===this.layers[this.layers.length-1].layerType?0:10;t=this.zoomSettings.enable?t+i:t;var o=256*Math.pow(2,this.tileZoomLevel),a=this.clip(e-this.translatePoint.x*this.scale,0,o-1)/o-.5,n=.5-this.clip(t-this.translatePoint.y*this.scale,0,o-1)/o;return{latitude:90-360*Math.atan(Math.exp(2*-n*Math.PI))/Math.PI,longitude:360*a}},ui([t.Property(null)],a.prototype,"background",void 0),ui([t.Property(!1)],a.prototype,"useGroupingSeparator",void 0),ui([t.Property(null)],a.prototype,"format",void 0),ui([t.Property(null)],a.prototype,"width",void 0),ui([t.Property(null)],a.prototype,"height",void 0),ui([t.Property("MouseMove")],a.prototype,"tooltipDisplayMode",void 0),ui([t.Property(!1)],a.prototype,"allowPrint",void 0),ui([t.Property(!1)],a.prototype,"allowImageExport",void 0),ui([t.Property(!1)],a.prototype,"allowPdfExport",void 0),ui([t.Complex({},Zt)],a.prototype,"titleSettings",void 0),ui([t.Complex({},Vt)],a.prototype,"zoomSettings",void 0),ui([t.Complex({},Gt)],a.prototype,"legendSettings",void 0),ui([t.Collection([],Jt)],a.prototype,"layers",void 0),ui([t.Collection([],Mt)],a.prototype,"annotations",void 0),ui([t.Complex({},It)],a.prototype,"margin",void 0),ui([t.Complex({color:"#DDDDDD",width:0},Ct)],a.prototype,"border",void 0),ui([t.Property("Material")],a.prototype,"theme",void 0),ui([t.Property("Mercator")],a.prototype,"projectionType",void 0),ui([t.Property(0)],a.prototype,"baseLayerIndex",void 0),ui([t.Property(null)],a.prototype,"description",void 0),ui([t.Property(1)],a.prototype,"tabIndex",void 0),ui([t.Complex({latitude:null,longitude:null},wt)],a.prototype,"centerPosition",void 0),ui([t.Complex({},Kt)],a.prototype,"mapsArea",void 0),ui([t.Event()],a.prototype,"load",void 0),ui([t.Event()],a.prototype,"beforePrint",void 0),ui([t.Event()],a.prototype,"loaded",void 0),ui([t.Event()],a.prototype,"click",void 0),ui([t.Event()],a.prototype,"doubleClick",void 0),ui([t.Event()],a.prototype,"rightClick",void 0),ui([t.Event()],a.prototype,"resize",void 0),ui([t.Event()],a.prototype,"tooltipRender",void 0),ui([t.Event()],a.prototype,"legendRendering",void 0),ui([t.Event()],a.prototype,"tooltipRenderComplete",void 0),ui([t.Event()],a.prototype,"shapeSelected",void 0),ui([t.Event()],a.prototype,"itemSelection",void 0),ui([t.Event()],a.prototype,"itemHighlight",void 0),ui([t.Event()],a.prototype,"shapeHighlight",void 0),ui([t.Event()],a.prototype,"layerRendering",void 0),ui([t.Event()],a.prototype,"shapeRendering",void 0),ui([t.Event()],a.prototype,"markerRendering",void 0),ui([t.Event()],a.prototype,"markerClusterRendering",void 0),ui([t.Event()],a.prototype,"markerClick",void 0),ui([t.Event()],a.prototype,"markerClusterClick",void 0),ui([t.Event()],a.prototype,"markerClusterMouseMove",void 0),ui([t.Event()],a.prototype,"markerMouseMove",void 0),ui([t.Event()],a.prototype,"dataLabelRendering",void 0),ui([t.Event()],a.prototype,"bubbleRendering",void 0),ui([t.Event()],a.prototype,"bubbleClick",void 0),ui([t.Event()],a.prototype,"bubbleMouseMove",void 0),ui([t.Event()],a.prototype,"animationComplete",void 0),ui([t.Event()],a.prototype,"annotationRendering",void 0),ui([t.Event()],a.prototype,"zoom",void 0),ui([t.Event()],a.prototype,"pan",void 0),a=ui([t.NotifyPropertyChanges],a)}(t.Component),yi=function(){function e(e){this.id="",this.maps=e,this.bubbleCollection=[]}return e.prototype.renderBubble=function(e,i,o,a,n,l,r,s,d,p){var h,c,m=this,u=s.layerData,g=e.colorValuePath,y=t.isNullOrUndefined(g)?i[g]:g.indexOf(".")>-1?P(i,e.colorValuePath):i[g],f=t.isNullOrUndefined(g)?Number(i[g]):g.indexOf(".")>-1?Number(P(i,e.colorValuePath)):Number(i[g]),b=t.isNullOrUndefined(e.valuePath)?Number(i[e.valuePath]):e.valuePath.indexOf(".")>-1?Number(P(i,e.valuePath)):Number(i[e.valuePath]);if(isNaN(b)&&isNaN(f)&&t.isNullOrUndefined(y))return null;var v=ae(e.minRadius,e.maxRadius,b,a.min,a.max),S=new pi(this.maps).getColorByValue(e.colorMapping,f,y);c="[object Object]"!==Object.prototype.toString.call(S)||t.isNullOrUndefined(S.fill)?o:S.fill,h="[object Object]"!==Object.prototype.toString.call(S)||t.isNullOrUndefined(S.opacity)?e.opacity:S.opacity;var x=[[]];this.maps.translateType="bubble";for(var O=0,M=0,_=0,L=0,C=u.length;L<C;L++){var w=u[L];w=w.property;var I=ie(i[s.shapeDataPath],s.shapePropertyPath,w);if((!t.isNullOrUndefined(i[s.shapeDataPath])&&isNaN(i[s.shapeDataPath])?i[s.shapeDataPath].toLowerCase():i[s.shapeDataPath])===(!t.isNullOrUndefined(w[I])&&isNaN(w[I])?w[I].toLowerCase():w[I])&&"LineString"!==u[L].type&&"MultiLineString"!==u[L].type&&"Point"!==u[L].type&&"MultiPoint"!==u[L].type)if(u[L]._isMultiPolygon)for(var T=u[L],N=0;N<T.length;N++)x.push(this.getPoints(T[N],[])),M<(_=x[x.length-1].length)&&(M=_,O=x.length-1);else x.push(this.getPoints(u[L],[])),M<(_=x[x.length-1].length)&&(M=_,O=x.length-1)}var k,F,E=this.maps.projectionType,A={color:e.border.color,opacity:e.border.opacity,width:e.border.width},B=ne(x[O],E,s.geometryType);if(e.visible){if(t.isNullOrUndefined(B)){var j=x.length-1;if(!x[j].x||!x[j].y)return;F={cancel:!1,name:"bubbleRendering",border:A,cx:x[j].x,cy:x[j].y,data:i,fill:c,maps:this.maps,radius:v}}else k="Mercator"===this.maps.projectionType?B.y:-B.y,F={cancel:!1,name:"bubbleRendering",border:A,cx:B.x,cy:k,data:i,fill:c,maps:this.maps,radius:v};this.maps.trigger("bubbleRendering",F,function(i){if(!F.cancel){var o;if(F.border.opacity=t.isNullOrUndefined(F.border.opacity)?h:F.border.opacity,"Circle"===e.bubbleType){var a=new st(p,F.fill,F.border,h,0,0,F.radius,null);o=U(m.maps,a,d)}else{var c="Mercator"===m.maps.projectionType?F.cy-v:F.cy+v,u=new rt(p,F.fill,F.border,h,new ut(0,0,2*v,2*v),2,2);F.cx-=v,F.cy=c,o=R(m.maps,u,d)}z(m.maps.selectedBubbleElementId,m.maps.bubbleSelectionClass,o,"BubbleselectionMapStyle"),m.bubbleCollection.push({LayerIndex:r,BubbleIndex:n,DataIndex:l,element:o,center:{x:F.cx,y:F.cy}});var g,y=0!==s.animationDuration||t.isNullOrUndefined(m.maps.zoomModule);g=m.maps.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(m.maps.zoomModule)?ce(m.maps,s,y):he(m.maps,s,y);var f=e.dataSource,b=g.scale,S=g.location,x=new mt(m.maps.isTileMap?F.cx:(F.cx+S.x)*b,m.maps.isTileMap?F.cy:(F.cy+S.y)*b);o.setAttribute("transform","translate( "+x.x+" "+x.y+" )");var O=f.length-1===l?"bubble":null;"Square"===e.bubbleType?(x.x+=v,x.y+=v*("Mercator"===m.maps.projectionType?1:-1)):v=0,e.animationDuration>0&&Pe(o,e.animationDelay,e.animationDuration,x,m.maps,O,v)}})}},e.prototype.getPoints=function(e,i){return t.isNullOrUndefined(e.map)?i=e.point:e.map(function(e,t){i.push(new tt(e.point.x,e.point.y))}),i},e.prototype.bubbleClick=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")){var o=this.getbubble(i);if(!t.isNullOrUndefined(o)){var a={cancel:!1,name:"bubbleClick",data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger("bubbleClick",a)}}},e.prototype.getbubble=function(e){var t=e.split("_LayerIndex_"),i=parseInt(t[1].split("_")[0],10),o=this.maps.layers[i];if(e.indexOf("_BubbleIndex_")>-1){var a=parseInt(t[1].split("_BubbleIndex_")[1],10),n=parseInt(t[1].split("_BubbleIndex_")[1].split("_dataIndex_")[1],10);if(!isNaN(a))return o.bubbleSettings[a].dataSource[n]}return null},e.prototype.bubbleMove=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")){var o=this.getbubble(i);if(!t.isNullOrUndefined(o)){var a={cancel:!1,name:"bubbleMouseMove",data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger("bubbleMouseMove",a)}}},e.prototype.getModuleName=function(){return"Bubble"},e.prototype.destroy=function(e){},e}(),fi=function(){function e(e){this.value={rightWidth:0,leftWidth:0,heightTop:0,heightBottom:0},this.maps=e,this.dataLabelCollections=[]}return e.prototype.getDataLabel=function(e,i,o,a){for(var n,l,r=0;r<e.length;r++){var s=e[r],d=!t.isNullOrUndefined(s[a])&&isNaN(s[a])?s[a].toLowerCase():s[a];if(o=t.isNullOrUndefined(o)?o:o.toString(),l=t.isNullOrUndefined(o)?o:o.toLowerCase(),d===l){n=s;break}}return n},e.prototype.renderLabel=function(e,i,o,a,n,l,r,s){var d,p,h,c,m,u,g,y,f=this,b=e.dataLabelSettings,v=e.dataLabelSettings.textStyle,S=e.dataLabelSettings,M=e.dataLabelSettings.labelPath,_=[[]],L=0,w=0,P=o,I="",T=0,N=!1,k=o.properties,F=this.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_LabelIndex_"+r,E=new tt(0,0),A=a[r];v.fontFamily="material"!==this.maps.theme.toLowerCase()?this.maps.themeStyle.labelFontFamily:v.fontFamily,o=A.property;var z,B,j="[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)?e.shapePropertyPath:[e.shapePropertyPath],U=0!==e.animationDuration||t.isNullOrUndefined(this.maps.zoomModule),R=this.maps.isTileMap?new Object:this.maps.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(this.maps.zoomModule)?ce(this.maps,e,U):he(this.maps,e,U),D=this.maps.isTileMap?this.maps.scale:R.scale,Z=this.maps.isTileMap?this.maps.translatePoint:R.location,V=this.maps.zoomTranslatePoint,H=t.isNullOrUndefined(this.maps.scale)?1:Math.floor(this.maps.scale),G=this.maps.zoomSettings.enable?!t.isNullOrUndefined(this.maps.zoomShapeCollection)&&this.maps.zoomShapeCollection.length>0:this.maps.zoomSettings.enable;this.maps.translateType="labels";for(q=0;q<j.length&&!(k[j[q]]&&(z=j[q],c=this.getDataLabel(e.dataSource,e.shapeDataPath,P.properties[z],e.shapeDataPath)));q++);if(c=this.getDataLabel(e.dataSource,e.shapeDataPath,P.properties[z],e.shapeDataPath),!t.isNullOrUndefined(A.property))if(_=[[]],a[r]._isMultiPolygon||"Point"===a[r].type||"MultiPoint"===a[r].type){if("Point"!==a[r].type&&"MultiPoint"!==a[r].type)for(var W=a[r],q=0;q<W.length;q++)_.push(this.getPoint(W[q],[])),w<(T=_[_.length-1].length)&&(w=T,L=_.length-1)}else _.push(this.getPoint(a[r],[])),w<(T=_[_.length-1].length)&&(w=T,L=_.length-1);if(I=t.isNullOrUndefined(c)?P.properties[M]:t.isNullOrUndefined(c[M])?c[e.shapeDataPath]:c[M].toString(),"[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)&&t.isNullOrUndefined(I)&&0===e.dataSource.length)for(var X=0;X<e.shapePropertyPath.length;X++)if(P.properties[e.shapePropertyPath[X]]){I=P.properties[e.shapePropertyPath[X]];break}t.isNullOrUndefined(I)&&""!==e.dataLabelSettings.template&&0===e.dataSource.length&&(I=P.properties[e.shapePropertyPath]);var Y=I,J=this.maps.projectionType,Q=u=ne(_[L],J,e.geometryType);if(!t.isNullOrUndefined(I)&&!t.isNullOrUndefined(u)){if(G&&H>1&&!this.maps.zoomNotApplied&&""===b.template){if(i>0)for(var K=0;K<this.maps.zoomLabelPositions.length;K++)if(this.maps.zoomLabelPositions[K].dataLabelText===I){m=r,r=K,N=!0;break}g=u.x,y=u.y,u.x=(u.x+V.x)*D,u.y=(u.y+V.y)*D}u.y="Mercator"===this.maps.projectionType||"Normal"===e.geometryType?u.y:-u.y,t.isNullOrUndefined(this.maps.format)||isNaN(parseFloat(I))||this.maps.useGroupingSeparator&&(I=ye(this.maps,parseFloat(I)),t.isNullOrUndefined(c)||(c[M]=I));var $={name:"dataLabelRendering",maps:this.maps,cancel:!1,border:{color:b.border.color,width:b.border.width,opacity:b.border.opacity},datalabel:b,fill:b.fill,template:b.template,text:I};this.maps.trigger("dataLabelRendering",$,function(o){if(!$.cancel){var a=[],b=G&&H>1&&!f.maps.zoomNotApplied&&f.maps.zoomShapeCollection.length>r?f.maps.zoomShapeCollection[r].width:(u.rightMax.x-u.leftMax.x)*D;t.isNullOrUndefined(f.maps.dataLabelShape)||(B=Q.rightMax.x-Q.leftMax.x,f.maps.dataLabelShape.push(B)),$.text===I||$.cancel||(I=$.text);var M=x(I,v),w=I,T=M,k=u.y-M.height/4,A=u.y+M.height/4,z=(u.y+Z.y)*D-M.height/4,j=(u.y+Z.y)*D+M.height/4;if((a=oe(_[L],k,A)).length>5&&"MultiPolygon"!==P.geometry.type&&"MultiPolygon"!==P.type){var U=ne(a,J,e.geometryType);G&&H>1&&!f.maps.zoomNotApplied&&""===$.template&&(U.x=(f.maps.zoomLabelPositions[r].location.x+V.x)*D,U.y=(f.maps.zoomLabelPositions[r].location.y+V.y)*D),g=U.x,u.x=U.x,b=G&&H>1&&!f.maps.zoomNotApplied&&f.maps.zoomShapeCollection.length>r?f.maps.zoomShapeCollection[r].width:(U.rightMax.x-U.leftMax.x)*D}var R=(u.x+Z.x)*D+M.width/2,W=(u.x+Z.x)*D-M.width/2;f.value[r]={rightWidth:R,leftWidth:W,heightTop:z,heightBottom:j};var q;if(""!==$.template){var X=(d=fe($.template,f.maps))?d(t.isNullOrUndefined(c)?P.properties:c,f.maps,$.template,f.maps.element.id+"_LabelTemplate",!1):document.createElement("div");X.innerHTML=d?"":$.template,(q=C(X,F,t.isNullOrUndefined(c)?P.properties:c,r,f.maps)).style.left=Math.abs(f.maps.baseMapRectBounds.min.x-u.x)*D+"px",q.style.top=Math.abs(f.maps.baseMapRectBounds.min.y-u.y)*D+"px",l.appendChild(q)}else{if("Trim"===S.smartLabelMode&&(T=x(w=re(b,"number"==typeof I?I.toString():I,v),v),p=new at(F,E.x,E.y,"middle",w,"","")),"None"===S.smartLabelMode&&(p=new at(F,E.x,E.y,"middle",I,"","")),"Hide"===S.smartLabelMode&&(I=b>=M.width?I:"",p=new at(F,E.x,E.y,"middle",I,"","")),I=p.text,"Hide"===S.intersectionAction){for(var K=0;K<s.length;K++)if(!t.isNullOrUndefined(s[K])&&!(f.value[r].leftWidth>s[K].rightWidth||f.value[r].rightWidth<s[K].leftWidth||f.value[r].heightTop>s[K].heightBottom||f.value[r].heightBottom<s[K].heightTop)){I="";break}s.push(f.value[r]),p=new at(F,E.x,E.y,"middle",I,"","")}if("Trim"===S.intersectionAction){for(var ee=0;ee<s.length;ee++)if(!t.isNullOrUndefined(s[ee]))if(s[ee].rightWidth<f.value[r].leftWidth||s[ee].leftWidth>f.value[r].rightWidth||s[ee].heightBottom<f.value[r].heightTop||s[ee].heightTop>f.value[r].heightBottom)w=I,0;else{if(f.value[r].leftWidth>s[ee].leftWidth){w=re((b=s[ee].rightWidth-f.value[r].leftWidth)-(f.value[r].rightWidth-f.value[r].leftWidth),I,v);break}if(f.value[r].leftWidth<s[ee].leftWidth){b=f.value[r].rightWidth-s[ee].leftWidth,w=re(Math.abs(b-(f.value[r].rightWidth-f.value[r].leftWidth)),I,v);break}}T=x(w,v),s.push(f.value[r]),p=new at(F,E.x,E.y,"middle",w,"","")}if("None"===S.intersectionAction&&(p=new at(F,E.x,E.y,"middle",I,"","")),w.length>1){var te=$.border;if(te.width>1){var ie=$.fill,ae=S.opacity,le=S.rx,se=S.ry,de=void 0,pe=void 0;G&&H>1&&!f.maps.zoomNotApplied?(de=u.x-M.width/2,pe=u.y-M.height/2-5):(de=(u.x+Z.x)*D-M.width/2,pe=(u.y+Z.y)*D-M.height/2),te.opacity=t.isNullOrUndefined(te.opacity)?ae:te.opacity;var he=new rt(f.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_rectIndex_"+r,ie,te,ae,new ut(de,pe,M.width,M.height),le,se),ce=f.maps.renderer.drawRectangle(he);n.appendChild(ce)}}h=O(p,v,v.color||f.maps.themeStyle.dataLabelFontColor,n),G&&H>1&&!f.maps.zoomNotApplied?(h.setAttribute("transform","translate( "+u.x+" "+u.y+" )"),u.x=g,u.y=y):h.setAttribute("transform","translate( "+(u.x+Z.x)*D+" "+((u.y+Z.y)*D+T.height/4)+" )"),n.appendChild(h)}f.dataLabelCollections.push({location:{x:u.x,y:u.y},element:t.isNullOrUndefined(q)?h:q,layerIndex:i,shapeIndex:N?m:r,labelIndex:N?m:r,dataLabelText:Y}),l.childElementCount>0&&!f.maps.element.contains(l)&&(document.getElementById(f.maps.element.id+"_Secondary_Element").appendChild(l),f.maps.renderReactTemplates())}})}},e.prototype.getPoint=function(e,t){return"MultiLineString"===e.type?e.map(function(e){e.map(function(e){t.push(new tt(e.point.x,e.point.y))})}):e.map(function(e,i){t.push(new tt(e.point.x,e.point.y))}),t},e.prototype.getModuleName=function(){return"DataLabel"},e.prototype.destroy=function(e){},e}(),bi=function(){function e(e){this.maps=e}return e.prototype.renderNavigation=function(e,i,o){for(var a,n,l,r,s,d,p,m,u,g,y,f,b,v,S,x,O,M,_,L,C,w=e.navigationLineSettings,P=[],I=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+o+"_line_Group"}),T=0;T<w.length;T++){if(l=w[T].properties.latitude,n=w[T].properties.longitude,r=w[T].properties.visible,s=w[T].angle,d=w[T].width||1,p=w[T].color,m=w[T].properties.dashArray,v=w[T].properties.arrowSettings,y=!t.isNullOrUndefined(v)&&v.properties.showArrow,n.length===l.length&&r)for(var N=0;N<n.length;N++){var k=this.maps.isTileMap?c(new tt(n[N],l[N]),i,this.maps.tileTranslatePoint,!0):h(l[N],n[N],i,e,this.maps);P.push(k)}L=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+o+"_NavigationGroup"+T});for(var F=0;F<P.length-1;F++){s=1<(s=-1>s?-1:s)?1:s;var E=this.maps.element.id+"_LayerIndex_"+o+"_NavigationIndex_"+T+"_Line"+F,A=this.convertRadius(P[F],P[F+1]);if(s<=1&&s>0&&(g=0,P[F].x>P[F+1].x&&(g=1)),s>=-1&&s<0&&(g=1,P[F].x>P[F+1].x&&(g=0)),P[F].x!==P[F+1].x){if(y){f=v.properties.color,b=v.properties.size,_=void 0===v.properties.offSet?0:v.properties.offSet;var B=Math.round(b/2);x="Start"===(S=v.properties.position)?"url(#triangle"+T+")":null,O="End"===S?"url(#triangle"+T+")":null,0!==M&&0===s&&(M="Start"===S?_:-_),M=t.isNullOrUndefined(M)?0:M;var j=this.maps.element.id+"_triangle",U=this.maps.renderer.createDefs();U.innerHTML+='<marker id="triangle'+T+'"></marker>';var R=U.querySelector("#triangle"+T);R.setAttribute("markerWidth",b.toString()),R.setAttribute("markerHeight",b.toString()),R.setAttribute("refX",(B-M).toString()),R.setAttribute("refY",B.toString()),R.setAttribute("orient","auto"),u=new nt(j,f,d,p,1,1,m,"M 0,0 L 0,"+b+" L "+B+", "+B+" Z"),a=this.maps.renderer.drawPath(u),R.appendChild(a),U.appendChild(R),L.appendChild(U)}if(s=Math.abs(s),C=0===s?"M "+P[F].x+","+P[F].y+"L "+P[F+1].x+","+P[F+1].y+" ":"M "+P[F].x+","+P[F].y+" A "+(A/2+(1-s)*A/(10*s))+" "+(A/2+(1-s)*A/(10*s))+" 0,0,"+g+" , "+P[F+1].x+","+P[F+1].y+" ",u=new nt(E,"none",d,p,1,1,m,C),a=this.maps.renderer.drawPath(u),!t.isNullOrUndefined(S))"Start"===S?a.setAttribute("marker-start",x):a.setAttribute("marker-end",O);z(this.maps.selectedNavigationElementId,this.maps.navigationSelectionClass,a,"navigationlineselectionMapStyle"),L.appendChild(a),I.appendChild(L)}}P=[]}return I},e.prototype.convertRadius=function(e,t){var i=t.x-e.x,o=t.y-e.y;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))},e.prototype.getModuleName=function(){return"NavigationLine"},e.prototype.destroy=function(e){},e}(),vi=function(){function e(e){this.legendBorderRect=new ut(0,0,0,0),this.initialMapAreaRect=new ut(0,0,0,0),this.legendTotalRect=new ut(0,0,0,0),this.totalPages=[],this.page=0,this.currentPage=0,this.legendItemRect=new ut(0,0,0,0),this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.shapePreviousColor=[],this.selectedNonLegendShapes=[],this.shapeToggled=!0,this.legendElement=null,this.maps=e,this.addEventListener()}return e.prototype.renderLegend=function(){this.legendRenderingCollections=[],this.legendCollection=[],this.totalPages=[],this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.maps.renderer.createDefs(),this.maps.svgObject.appendChild(this.defsElement),this.initialMapAreaRect=this.maps.mapAreaRect,this.calculateLegendBounds(),this.drawLegend()},e.prototype.calculateLegendBounds=function(){var e=this,i=this.maps,o=i.legendSettings;this.legendCollection=[];var a=i.mapAreaRect.y;if(this.legendRenderingCollections=[],Array.prototype.forEach.call(i.layersCollection,function(i,a){if(!t.isNullOrUndefined(i.shapeData)){var n=i.shapeData.features,l=i.shapeDataPath,r=i.shapePropertyPath,s=i.dataSource,d=void 0,p=void 0;if("Layers"===o.type&&i.visible)d=i.shapeSettings.colorValuePath,p=i.shapeSettings.colorMapping,e.getLegends(a,n,p,s,l,d,r);else if("Bubbles"===o.type)for(var h=0,c=i.bubbleSettings;h<c.length;h++){var m=c[h];m.visible&&(d=m.colorValuePath,p=m.colorMapping,s=m.dataSource,e.getLegends(a,n,p,s,l,d,r))}}"Markers"===o.type&&e.getMarkersLegendCollections(a,i.markerSettings)}),this.legendCollection.length>0)for(R=0;R<this.legendCollection.length;R++){var n={name:"legendRendering",cancel:!1,fill:(H=this.legendCollection[R]).fill,shape:o.shape,shapeBorder:o.shapeBorder,text:"number"==typeof H.text?H.text.toString():H.text};i.trigger("legendRendering",n),H.fill=n.fill,H.shape=n.shape,H.shapeBorder=n.shapeBorder,H.text=n.text,n.cancel&&(this.legendCollection.splice(R,1),R--)}var l=i.legendSettings.title.text,r=i.legendSettings.titleStyle;if(this.legendCollection.length>0){var s,d,p=o.mode,h=0,c=0,m=0,u=0,g=o.shapePadding,y=o.shapeHeight,f=o.shapeWidth,b=[],v=[],S=o.position,O=o.labelDisplayMode,M="None"===o.orientation?"Top"===S||"Bottom"===S?"Horizontal":"Vertical":o.orientation,_=o.width.length>1?o.width.indexOf("%")>-1?i.availableSize.width/100*parseInt(o.width,10):parseInt(o.width,10):null,L=o.height.length>1?o.height.indexOf("%")>-1?i.availableSize.height/100*parseInt(o.height,10):parseInt(o.height,10):null,C=0,w=0,P=x(l,r);if("Interactive"===p){var I=o.textStyle,T=this.legendCollection.length,N="Horizontal"===M?t.isNullOrUndefined(_)?i.mapAreaRect.width/T:_/T:t.isNullOrUndefined(_)?25:_,k="Horizontal"===M?t.isNullOrUndefined(L)?25:L:t.isNullOrUndefined(L)?i.mapAreaRect.height/T:L/T;C=0,w=P.height+10;for(var F=o.labelPosition,E=0,A=0,z=0,B=0,j=0,U=0,R=0;R<this.legendCollection.length;R++){C="Horizontal"===M?C+N:C,w="Horizontal"===M?w:w+k;var D=this.legendCollection[R].text,Z=new et(0,0);"None"===O?Z=x(D,I):"Trim"===O?Z=x(D=re("Horizontal"===M?N:k,D,I),I):D="",j=Math.max(j,Z.height),U=Math.max(U,Z.width),Z.width>0&&Z.height>0&&("Horizontal"===M?(E=C+N/2,A="After"===F?w+k+Z.height/2+10:w-10):(E="After"===F?C-Z.width/2-10:C+N+Z.width/2+10,A=w+k/2+Z.height/4)),0===R?(z="Horizontal"===M?C:"After"===F?E-Z.width/2:C,B="Horizontal"===M?"After"===F?w:A-Z.height/2:w,1===this.legendCollection.length&&(_="Horizontal"===M?Math.abs(C+N-z):N+U+10,L="Horizontal"===M?k+j/2+10:Math.abs(w+k-B))):R===this.legendCollection.length-1&&(_="Horizontal"===M?Math.abs(C+N-z):N+U+10,L="Horizontal"===M?k+j/2+10:Math.abs(w+k-B)),this.legendRenderingCollections.push({fill:this.legendCollection[R].fill,x:C,y:w,width:N,height:k,text:D,textX:E,textY:A,textWidth:Z.width,textHeight:Z.height,shapeBorder:this.legendCollection[R].shapeBorder})}1===this.legendCollection.length&&(L=k,_=N),this.legendItemRect={x:z,y:B,width:_,height:L}}else{_=t.isNullOrUndefined(_)?i.mapAreaRect.width:_,L=t.isNullOrUndefined(L)?i.mapAreaRect.height:L;var V=0;this.page=0;for(R=0;R<this.legendCollection.length;R++){var H=this.legendCollection[R];t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]});var G=x(H.text,o.textStyle);if(this.textMaxWidth=Math.max(this.textMaxWidth,G.width),0===R)C=h=10+f/2,w=c=a+P.height+(y>G.height?y/2:G.height/4);else{var W=G.height>y?G.height:y;if("Horizontal"===M){var q=v[V-1].x+v[V-1].width+10+f;if(q+g+G.width>_){var X=(v[V-1].y>b[V-1].y+y/2?v[V-1].y:b[V-1].y+y/2)+a;X+W>L?(this.getPageChanged(),V=0,b=[],v=[],h=C,c=w):(h=b[0].x,c=X+W/2)}else h=q-f/2,c=b[V-1].y}else{var Y=v[V-1].y>b[V-1].y+y/2?v[V-1].y:b[V-1].y+y/2;if(Y+a+W>L){var J=v[V-1].x+this.textMaxWidth+10;J+g+G.width>_?(h=C,c=w,v=[],b=[],this.getPageChanged(),V=0):(h=J+f/2,c=b[0].y)}else{h=b[V-1].x,c=Y+10+y/2}}}m=h+f/2+g,u=c+G.height/4,b.push({x:h,y:c}),v.push({x:m,y:u,width:G.width,height:G.height/2}),this.totalPages[this.page].Collection.push({DisplayText:H.text,ImageSrc:H.imageSrc,Shape:{x:h,y:c},Text:{x:m,y:u},Fill:H.fill,legendShape:H.shape,shapeBorder:H.shapeBorder,idIndex:R,Rect:{x:b[V].x-f/2,y:b[V].y-y/2<u-G.height?b[V].y-y/2:u-G.height,width:Math.abs(b[V].x-f/2-(m+G.width)),height:y>G.height?y:G.height}}),V++}var Q=this.totalPages[0].Collection;Array.prototype.forEach.call(Q,function(t,i){var o=new ut(t.Rect.x,t.Rect.y,t.Rect.width,t.Rect.height);0===i&&(s=o.x,d=o.y),e.widthIncrement=Math.max(e.widthIncrement,Math.abs(s-(o.x+o.width))),e.heightIncrement=Math.max(e.heightIncrement,Math.abs(d-(o.y+o.height)))}),_=this.widthIncrement<_?this.widthIncrement:_,L=this.heightIncrement<L?this.heightIncrement:L,this.legendItemRect={x:Q[0].Rect.x,y:Q[0].Rect.y,width:_,height:L}}}},e.prototype.getLegends=function(e,t,i,o,a,n,l){this.getRangeLegendCollection(e,t,i,o,a,n,l),this.getEqualLegendCollection(e,t,i,o,a,n,l),this.getDataLegendCollection(e,t,i,o,a,n,l)},e.prototype.getPageChanged=function(){this.page++,t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},e.prototype.legendTextTrim=function(e,t,i,o){var a=t,n=x(t,i).width,l=o-n;if(o>e)for(var r=t.length-1;r>=0;--r)if(l+(n=x(a=t.substring(0,r)+"...",i).width)<=e||a.length<4)return a.length<4&&(a=" "),a;return a},e.prototype.drawLegend=function(){var e,i=this.maps,o=i.legendSettings,a=i.renderer,n={size:o.textStyle.size,color:o.textStyle.color,fontFamily:o.textStyle.fontFamily,fontWeight:o.textStyle.fontWeight,fontStyle:o.textStyle.fontStyle,opacity:o.textStyle.opacity};if(this.legendGroup=a.createGroup({id:i.element.id+"_Legend_Group"}),"Interactive"===o.mode)for(var l=0;l<this.legendRenderingCollections.length;l++){var r=i.element.id+"_Legend_Index_"+l,s=i.element.id+"_Legend_Index_"+l+"_Text",d=this.legendRenderingCollections[l],p=new ut(d.x,d.y,d.width,d.height);0===l&&this.renderLegendBorder();var h=new tt(d.textX,d.textY);n.color=null!==n.color?n.color:this.maps.themeStyle.legendTextColor;var c=new rt(r,d.fill,d.shapeBorder,o.opacity,p);e=new at(s,h.x,h.y,"middle",d.text,"",""),n.fontFamily=t.isNullOrUndefined(n.fontFamily)?this.maps.themeStyle.fontFamily:n.fontFamily,n.size=i.themeStyle.legendFontSize||n.size,O(e,n,n.color,this.legendGroup),this.legendGroup.appendChild(a.drawRectangle(c)),this.legendToggle()}else this.drawLegendItem(this.currentPage)},e.prototype.drawLegendItem=function(e){var i,o=this.maps,a=o.legendSettings,n=new et(a.shapeWidth,a.shapeHeight),l=o.renderer,r=a.shape;if(e>=0&&e<this.totalPages.length){Oe(this.legendGroup.id,this.maps.element.id)&&t.remove(Oe(this.legendGroup.id,this.maps.element.id));for(var s=0;s<this.totalPages[e].Collection.length;s++){var d=this.totalPages[e].Collection[s],p=d.shapeBorder,h=l.createGroup({id:o.element.id+"_Legend_Index_"+d.idIndex}),c=d.DisplayText,m=("Markers"===a.type?t.isNullOrUndefined(d.ImageSrc)&&a.shape:d.legendShape,"HorizontalLine"===a.shape||"VerticalLine"===a.shape||"Cross"===a.shape?t.isNullOrUndefined(a.fill)?"#000000":a.fill:p.color),u=("HorizontalLine"===a.shape||"VerticalLine"===a.shape||"Cross"===a.shape)&&0===p.width?1:p.width,g=o.element.id+"_Legend_Shape_Index_"+d.idIndex,y=o.element.id+"_Legend_Text_Index_"+d.idIndex,f=new tt(d.Shape.x,d.Shape.y-4),b=new tt(d.Text.x,d.Text.y-4),v=(t.isNullOrUndefined(d.ImageSrc)?a.shape:d.ImageSrc,new nt(g,d.Fill,u,m,a.opacity,t.isNullOrUndefined(p.opacity)?a.opacity:p.opacity,"")),S={fontFamily:a.textStyle.fontFamily,fontStyle:a.textStyle.fontStyle,fontWeight:a.textStyle.fontWeight,size:a.textStyle.size,color:a.textStyle.color,opacity:a.textStyle.opacity};if(S.color=null!==S.color?S.color:this.maps.themeStyle.legendTextColor,S.fontFamily=t.isNullOrUndefined(S.fontFamily)?this.maps.themeStyle.fontFamily:S.fontFamily,S.size=o.themeStyle.legendFontSize||S.size,0===s&&this.renderLegendBorder(),"Markers"===a.type&&a.useMarkerShape){var M=this.legendCollection[d.idIndex].data[0],_=o.layers[M.layerIndex].markerSettings[M.markerIndex];r=t.isNullOrUndefined(_.dataSource[M.dataIndex][_.shapeValuePath])||""===_.dataSource[M.dataIndex][_.shapeValuePath]?_.shape:_.dataSource[M.dataIndex][_.shapeValuePath]}"Balloon"===r?h.appendChild(K(o,v,n,{x:f.x,y:f.y+5},"Legend")):h.appendChild(Fe(f,r,n,d.ImageSrc,v));var L=d.Rect.x+d.Rect.width;if(L>this.legendBorderRect.width&&(c=this.legendTextTrim(this.legendBorderRect.width,c,S,L)),i=new at(y,b.x,b.y,"start",c,"",""),O(i,S,S.color,h),this.legendGroup.appendChild(h),s===this.totalPages[e].Collection.length-1){var C=void 0;if(0!==this.page){var w=e+1+"/"+this.totalPages.length,P=a.textStyle,I=x(w,P),T=this.legendItemRect.x+this.legendItemRect.width-I.width-20-20+2,N=this.legendItemRect.x+this.legendItemRect.width,k=N-10-I.width/2-5-4,F=this.legendItemRect.y+this.legendItemRect.height+2.5+10;C=l.createGroup({id:o.element.id+"_Legend_Paging_Group"});var E=l.createGroup({id:o.element.id+"_Legend_Left_Paging_Group"}),A=l.createGroup({id:o.element.id+"_Legend_Right_Paging_Group"}),z=" M "+N+" "+F+" L "+(N-10)+" "+(F-5)+" L "+(N-10)+" "+(F+5)+" z ",B=" M "+T+" "+F+" L "+(T+10)+" "+(F-5)+" L "+(T+10)+" "+(F+5)+" z ",j=new nt(o.element.id+"_Left_Page","#a6a6a6",0,"#a6a6a6",e+1===1?.5:1,1,"",B);E.appendChild(l.drawPath(j));var U=new rt(o.element.id+"_Left_Page_Rect","transparent",{},1,new ut(T-5,F-10,20,20),null,null,"",""),R=l.drawRectangle(U);R.setAttribute("tabindex",(e+1===1?-1:o.tabIndex+1).toString()),E.appendChild(R),this.wireEvents(E);var D=new nt(o.element.id+"_Right_Page","#a6a6a6",0,"#a6a6a6",e+1===this.totalPages.length?.5:1,1,"",z);A.appendChild(l.drawPath(D));var Z=new rt(o.element.id+"_Right_Page_Rect","transparent",{},1,new ut(N-10-5,F-10,20,20),null,null,"","");(R=l.drawRectangle(Z)).setAttribute("tabindex",(e+1===this.totalPages.length?-1:o.tabIndex+2).toString()),A.appendChild(R),this.wireEvents(A),C.appendChild(E),C.appendChild(A);var V={id:o.element.id+"_Paging_Text",x:k,y:F+I.height/4,fill:"#a6a6a6","font-size":"14px","font-style":P.fontStyle,"font-family":P.fontFamily,"font-weight":P.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":""},H=l.createText(V,w);H.setAttribute("style","user-select: none;"),C.appendChild(H),this.legendGroup.appendChild(C)}this.legendToggle()}}}},e.prototype.legendHighLightAndSelection=function(e,i){var o,a,n,l,r,s="Default"===this.maps.legendSettings.mode?document.getElementById(e.id.replace("Shape","Text")):document.getElementById(e.id+"_Text"),d=this.maps.legendModule.legendCollection,p=!t.isNullOrUndefined(d[0].data[0].layerIndex)&&this.maps.layers[d[0].data[0].layerIndex].selectionSettings.enableMultiSelect,h=0,c=!0,m=parseFloat(e.id.charAt(e.id.length-1));this.updateLegendElement();var u=this.maps.toggledLegendId.indexOf(m);if(this.maps.legendSettings.toggleLegendSettings.enable&&"highlight"===i&&-1!==u){var g=this.getIndexofLegend(this.legendHighlightCollection,e);return-1!==g&&this.legendHighlightCollection.splice(g,1),this.removeLegendHighlightCollection(),null}if("selection"===i){if(this.shapeHighlightCollection=[],this.maps.shapeSelections||p||(this.removeAllSelections(),this.maps.shapeSelections=!0),this.maps.legendSelectionCollection.length>0&&(p||this.maps.shapeSelections))for(f=0;f<this.maps.legendSelectionCollection.length;f++){if(e===this.maps.legendSelectionCollection[f].legendElement){this.maps.legendSelectionCollection[f].legendElement=e,c=!1,this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[f].legendElement),this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(m),1),this.maps.legendSelectionCollection.splice(f,1),this.maps.legendSelection=!(this.maps.legendSelectionCollection.length>0);break}if(!p)if(this.maps.legendSelectionCollection.length>1){for(var y=0;y<this.maps.legendSelectionCollection.length;y++)this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[y].legendElement);this.maps.legendSelectionCollection=[]}else this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[f].legendElement),this.maps.legendSelectionCollection.splice(f,1)}}else{if(this.maps.legendSelectionCollection.length>0)for(var f=0;f<this.maps.legendSelectionCollection.length;f++){if((e.id.indexOf("_Legend_Shape")>-1||e.id.indexOf("_Legend_Index"))&&e===this.maps.legendSelectionCollection[f].legendElement){c=!1;break}this.removeLegendHighlightCollection()}this.removeLegendHighlightCollection()}if(c)for(var b=0;b<d.length;b++){var v="Interactive"===this.maps.legendSettings.mode?parseFloat(e.id.split("_Legend_Index_")[1]):parseFloat(e.id.split("_Legend_Shape_Index_")[1]);if(s.textContent===d[b].text&&d[b].data.length>0&&v===b){var S=this.maps.layers[d[b].data[0].layerIndex],x=void 0,O=void 0,M=void 0;if(t.isNullOrUndefined(S)||(x="selection"===i?S.selectionSettings.enable:S.highlightSettings.enable,O=void 0,O="selection"===i?S.selectionSettings:S.highlightSettings,M=d[b].data),x)for(var _=0;_<M.length;_++){var L=void 0;if(o=M[_].shapeIndex,a=M[_].layerIndex,n=M[_].dataIndex,l=M[_].pointIndex,null!==(L=-1===l?document.getElementById(this.maps.element.id+"_LayerIndex_"+a+"_shapeIndex_"+o+"_dataIndex_"+n):document.getElementById(this.maps.element.id+"_LayerIndex_"+a+"_shapeIndex_"+o+"_dataIndex_"+n+"_multiLine_"+l))){var C=!0;if(null!==this.maps.legendSelectionCollection)for(var w=0;w<this.maps.legendSelectionCollection.length;w++)if(this.maps.legendSelectionCollection[w].legendElement===e){C=!1;break}if("highlight"===i&&C){0===_&&(this.legendHighlightCollection=[],this.pushCollection(e,this.legendHighlightCollection,d[b],S.shapeSettings)),r=this.legendHighlightCollection.length;var P=this.legendHighlightCollection[r-1].legendOldFill;this.legendHighlightCollection[r-1].MapShapeCollection.Elements.push(L);var I=this.legendHighlightCollection[r-1].MapShapeCollection.Elements.length-1,T=L.getAttribute("fill");this.legendHighlightCollection[r-1].shapeOldFillColor.push(T);var N=this.legendHighlightCollection[r-1].shapeOldFillColor[I];this.shapePreviousColor=this.legendHighlightCollection[r-1].shapeOldFillColor,this.setColor(L,t.isNullOrUndefined(O.fill)?N:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"highlight"),this.setColor(e,t.isNullOrUndefined(O.fill)?P:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"highlight")}else if("selection"===i){this.legendHighlightCollection=[],this.maps.legendSelectionClass=O,0===_&&(this.pushCollection(e,this.maps.legendSelectionCollection,d[b],S.shapeSettings),p?this.maps.selectedLegendElementId.push(b):0===this.maps.selectedLegendElementId.length?this.maps.selectedLegendElementId.push(b):(this.maps.selectedLegendElementId=[],this.maps.selectedLegendElementId.push(b))),h=this.maps.legendSelectionCollection.length;var k=this.maps.legendSelectionCollection[h-1].legendOldFill;this.maps.legendSelectionCollection[h-1].MapShapeCollection.Elements.push(L),this.maps.legendSelectionCollection[h-1].shapeOldFillColor=this.shapePreviousColor,this.setColor(e,t.isNullOrUndefined(O.fill)?k:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"selection"),this.setColor(L,t.isNullOrUndefined(O.fill)?k:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"selection"),-1===this.maps.selectedElementId.indexOf(L.getAttribute("id"))&&this.maps.selectedElementId.push(L.getAttribute("id")),_===M.length-1&&(this.maps.legendSelection=!1,this.removeLegend(this.maps.legendSelectionCollection))}}}}}},e.prototype.setColor=function(e,t,i,o,a,n){var l=e.parentElement.id.indexOf("LineString")>-1;"selection"===n?(B(l?"LineselectionMap":"ShapeselectionMap",l?"LineselectionMapStyle":"ShapeselectionMapStyle",l?"transparent":t,i,l?t:o,a,this.maps),e.setAttribute("class",l?"LineselectionMapStyle":"ShapeselectionMapStyle")):(e.setAttribute("fill",l?"transparent":t),e.setAttribute("fill-opacity",i),e.setAttribute("stroke",l?t:o),e.setAttribute("stroke-width",(Number(a)/this.maps.scale).toString()))},e.prototype.pushCollection=function(e,t,i,o){t.push({legendElement:e,legendOldFill:i.fill,legendOldOpacity:i.opacity,legendOldBorderColor:i.borderColor,legendOldBorderWidth:i.borderWidth,shapeOpacity:o.opacity,shapeOldBorderColor:o.border.color,shapeOldBorderWidth:o.border.width});var a=t.length;t[a-1].MapShapeCollection={Elements:[]},t[a-1].shapeOldFillColor=[]},e.prototype.removeLegend=function(e){for(var t=0;t<e.length;t++){var i=e[t];this.setColor(i.legendElement,i.legendOldFill,i.legendOldOpacity,i.legendOldBorderColor,i.legendOldBorderWidth,"highlight");for(var o=i.MapShapeCollection.Elements.length,a=0;a<o;a++){var n=-1!==i.legendOldFill.indexOf("url")?i.shapeOldFillColor[a]:i.legendOldFill;this.setColor(i.MapShapeCollection.Elements[a],n,i.shapeOpacity,i.shapeOldBorderColor,i.shapeOldBorderWidth,"highlight")}}},e.prototype.removeLegendHighlightCollection=function(){this.legendHighlightCollection.length>0&&(this.removeLegend(this.legendHighlightCollection),this.legendHighlightCollection=[])},e.prototype.removeLegendSelectionCollection=function(e){if(this.maps.legendSelectionCollection.length>0){we(e);for(var t=this.shapesOfLegend(e),i=t.length,o=0;o<i;o++){var a=be(t[o]);if("ShapeselectionMapStyle"===a.getAttribute("class")||"LineselectionMapStyle"===a.getAttribute("class")){we(a);var n=this.maps.selectedElementId.indexOf(a.id);-1!==n&&this.maps.selectedElementId.splice(n,1)}}}},e.prototype.removeShapeHighlightCollection=function(){if(this.shapeHighlightCollection.length>0)for(var e=0;e<this.shapeHighlightCollection.length;e++){for(var t=this.shapeHighlightCollection[e],i=!0,o=0;o<this.maps.legendSelectionCollection.length;o++)this.maps.legendSelectionCollection[o].legendElement===t.legendElement&&(i=!1);i&&this.setColor(t.legendElement,t.legendOldFill,t.legendOldOpacity,t.legendOldBorderColor,t.legendOldBorderWidth,"highlight")}},e.prototype.shapeHighLightAndSelection=function(e,i,o,a,n){if(void 0!==i){this.updateLegendElement(),this.shapeToggled=!0;var l=this.maps.legendModule.legendCollection,r=this.legendIndexOnShape(i,n),s=this.shapeDataOnLegend(e),d=this.maps.toggledLegendId.indexOf(r.actualIndex);if(this.maps.legendSettings.toggleLegendSettings.enable&&-1!==d){this.shapeToggled=!1,this.legendHighlightCollection=[];var p=this.getIndexofLegend(this.shapeHighlightCollection,s.LegendEle);return-1!==p&&this.shapeHighlightCollection.splice(p,1),this.removeShapeHighlightCollection(),null}if(void 0===r.currentIndex&&void 0===r.actualIndex)return this.removeShapeHighlightCollection(),null;if(void 0!==r.currentIndex||"selection"!==a||this.maps.layers[n].selectionSettings.enableMultiSelect||"ShapeselectionMapStyle"===e.getAttribute("class")||(this.maps.legendSelection=!1),"selection"!==a||this.maps.layers[n].selectionSettings.enableMultiSelect||this.maps.legendSelection||(this.removeAllSelections(),this.maps.legendSelection=!0),void 0===r.currentIndex){if("selection"===a&&void 0!==r.actualIndex){for(var h=0,c=0;c<s.Elements.length;c++)"ShapeselectionMapStyle"===s.Elements[c].getAttribute("class")&&h++;var m=this.maps.selectedLegendElementId.indexOf(r.actualIndex);-1===m?(this.maps.selectedLegendElementId.push(r.actualIndex),this.maps.legendSelectionClass=o):h<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))&&(this.maps.layers[n].selectionSettings.enableMultiSelect?h<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))&&this.maps.selectedLegendElementId.splice(m,1):this.maps.selectedLegendElementId.splice(m,1))}return this.removeShapeHighlightCollection(),null}var u=l[r.actualIndex].text,g=void 0,y=void 0;"Default"===this.maps.legendSettings.mode?void 0!==r.currentIndex&&(g=document.getElementById(this.maps.element.id+"_Legend_Text_Index_"+r.actualIndex).textContent,y=document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+r.actualIndex)):(g=document.getElementById(this.maps.element.id+"_Legend_Index_"+r.actualIndex+"_Text").textContent,y=document.getElementById(this.maps.element.id+"_Legend_Index_"+r.actualIndex)),this.oldShapeElement=s.LegendEle;var f=this.maps.legendSelectionCollection.length;if(u===g){var b=!0;if(this.maps.legendSelectionCollection)for(c=0;c<this.maps.legendSelectionCollection.length;c++)if(this.maps.legendSelectionCollection[c].legendElement===s.LegendEle){b=!1;break}if("highlight"===a&&b){(void 0===(v=this.isTargetSelected(s,this.shapeHighlightCollection))||v&&!v.IsSelected)&&this.pushCollection(y,this.shapeHighlightCollection,l[r.actualIndex],this.maps.layers[n].shapeSettings);for(S=0;S<this.shapeHighlightCollection.length;S++)s.LegendEle.id===this.shapeHighlightCollection[S].legendElement.id&&(this.shapeHighlightCollection[S].legendElement=s.LegendEle);if(f>0)for(S=0;S<f;S++){if(s.LegendEle===this.maps.legendSelectionCollection[S].legendElement){this.maps.legendSelectionCollection[S].legendElement=s.LegendEle,this.removeShapeHighlightCollection();break}S===f-1&&(this.removeShapeHighlightCollection(),this.setColor(y,t.isNullOrUndefined(o.fill)?y.getAttribute("fill"):o.fill,o.opacity.toString(),o.border.color,o.border.width.toString(),"highlight"))}else this.removeShapeHighlightCollection(),this.setColor(y,t.isNullOrUndefined(o.fill)?y.getAttribute("fill"):o.fill,o.opacity.toString(),o.border.color,o.border.width.toString(),"highlight")}else if("selection"===a){var v=this.isTargetSelected(s,this.maps.legendSelectionCollection);if(f>0)for(var S=0;S<this.maps.legendSelectionCollection.length;)if(s.LegendEle===this.maps.legendSelectionCollection[S].legendElement||o.enableMultiSelect)S++;else{var x=this.maps.legendSelectionCollection[S],O=this.maps.selectedLegendElementId.indexOf(r.actualIndex);this.maps.selectedLegendElementId.splice(O,1),this.maps.legendSelectionCollection.splice(S,1),we(x.legendElement),this.maps.shapeSelections=!0,S=0}if(v&&v.IsSelected&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))){var x=this.maps.legendSelectionCollection[v.SelectionIndex],M=0;if(o.enableMultiSelect)for(c=0;c<s.Elements.length;c++)e.getAttribute("class")===s.Elements[c].getAttribute("class")&&M++;M<=1&&(o.enableMultiSelect||this.maps.legendSelection)&&(this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(r.actualIndex),1),t.isNullOrUndefined(s.LegendEle)||we(s.LegendEle),this.maps.legendSelectionCollection.splice(v.SelectionIndex,1),this.maps.shapeSelections=!0)}else{void 0!==v&&(!v||v.IsSelected)||t.isNullOrUndefined(y)||-1===(L=this.getIndexofLegend(this.maps.legendSelectionCollection,y))&&this.pushCollection(y,this.maps.legendSelectionCollection,l[r.actualIndex],this.maps.layers[n].shapeSettings);for(var _=!0,c=0;c<this.maps.selectedLegendElementId.length;c++)r.actualIndex===this.maps.selectedLegendElementId[c]&&(_=!1);if(_&&this.maps.selectedLegendElementId.push(r.actualIndex),this.maps.legendSelectionClass=o,this.removeLegend(this.shapeHighlightCollection),!t.isNullOrUndefined(y)){this.setColor(y,t.isNullOrUndefined(o.fill)?y.getAttribute("fill"):o.fill,o.opacity.toString(),o.border.color,o.border.width.toString(),"selection");var L=this.getIndexofLegend(this.maps.legendSelectionCollection,y);this.maps.legendSelectionCollection[L].MapShapeCollection.Elements.push(e)}this.maps.shapeSelections=!1}}else document.getElementsByClassName("highlightMapStyle").length>0&&(this.removeShapeHighlightCollection(),we(document.getElementsByClassName("highlightMapStyle")[0]))}}else this.removeShapeHighlightCollection()},e.prototype.isTargetSelected=function(e,i){for(var o,a=0;a<i.length;a++)t.isNullOrUndefined(e.LegendEle.getAttribute("id"))||e.LegendEle.getAttribute("id")!==i[a].legendElement.getAttribute("id")||(o={IsSelected:!0,SelectionIndex:a});return o},e.prototype.updateLegendElement=function(){for(var e=0;e<this.maps.legendSelectionCollection.length;e++)document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id)&&(this.maps.legendSelectionCollection[e].legendElement=document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id))},e.prototype.getIndexofLegend=function(e,t){return e.map(function(e){return e.legendElement}).indexOf(t)},e.prototype.removeAllSelections=function(){for(var e=0;e<this.maps.selectedElementId.length;e++)we(o=document.getElementById(this.maps.selectedElementId[e]));for(var i=0;i<this.maps.selectedLegendElementId.length;i++){var o=("Interactive"===this.maps.legendSettings.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_")+this.maps.selectedLegendElementId[i],a=document.getElementById(o);t.isNullOrUndefined(a)||we(document.getElementById(o))}this.maps.legendSelectionCollection=[],this.maps.selectedLegendElementId=[],this.maps.selectedElementId=[]},e.prototype.legendIndexOnShape=function(e,i){var o,a,n,l=e[this.maps.layers[i].shapeDataPath],r=this.maps.legendSettings.mode,s=this.maps.legendModule.legendCollection;"Default"!==r||t.isNullOrUndefined(this.maps.legendModule.totalPages)||(n=this.maps.legendModule.totalPages[this.maps.legendModule.currentPage].Collection);for(var d="Default"===r?n.length:1,p=0;p<s.length;p++){for(var h=s[p].data,c=0;c<d;c++)if("Default"!==r||s[p].text===n[c].DisplayText)for(m=0;m<h.length;m++)l===h[m].name&&(o=c);for(var m=0;m<h.length;m++)l===h[m].name&&(a=p)}return{currentIndex:o,actualIndex:a}},e.prototype.shapeDataOnLegend=function(e){for(var i,o,a,n,l=this.maps.legendModule.legendCollection,r=this.maps.legendSettings,s=0;s<l.length;s++){for(var d=l[s].data,p=!1,h=[],c={Elements:[]},m=0;m<d.length;m++){var u=void 0;i=d[m].shapeIndex,o=d[m].layerIndex,a=d[m].dataIndex,e===(u=-1===(n=d[m].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a+"_multiLine_"+n))&&(p=!0),h.push(u)}if(p)return t.isNullOrUndefined(c.LegendEle)&&(c.LegendEle="Default"===r.mode?document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+s):document.getElementById(this.maps.element.id+"_Legend_Index_"+s)),c.Elements=h,c}return null},e.prototype.shapesOfLegend=function(e){for(var i,o,a,n,l=parseFloat(e.id.charAt(e.id.length-1)),r=this.maps.legendModule.legendCollection[l].data,s=[],d=0;d<r.length;d++){var p=void 0;i=r[d].shapeIndex,o=r[d].layerIndex,a=r[d].dataIndex,p=-1===(n=r[d].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a+"_multiLine_"+n),t.isNullOrUndefined(p)||s.push(p.id)}return s},e.prototype.legendToggle=function(){var e=this.maps,i=e.legendSettings;if(this.maps.selectedLegendElementId)for(s=0;s<this.maps.selectedLegendElementId.length;s++){var o="Interactive"===i.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_",a=e.svgObject.querySelector("#"+o+this.maps.selectedLegendElementId[s]);if(!t.isNullOrUndefined(a)){var n=t.isNullOrUndefined(this.maps.legendSelectionClass.fill)?a.getAttribute("fill"):this.maps.legendSelectionClass.fill;this.setColor(a,n,this.maps.legendSelectionClass.opacity.toString(),this.maps.legendSelectionClass.border.color,this.maps.legendSelectionClass.border.width.toString(),"selection");for(var l=0;l<this.maps.legendSelectionCollection.length;l++)this.maps.legendSelectionCollection[l].legendElement.id===a.id&&(this.maps.legendSelectionCollection[l].legendElement=a);if(-1===this.getIndexofLegend(this.maps.legendSelectionCollection,a)){var r=this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[s]].data[s].layerIndex;this.pushCollection(a,this.maps.legendSelectionCollection,this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[s]],this.maps.layers[r].shapeSettings)}}}if(this.maps.toggledLegendId)for(var s=0;s<this.maps.toggledLegendId.length;s++){var d="Interactive"===i.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[s]+"_Text":"#"+this.maps.element.id+"_Legend_Text_Index_"+this.maps.toggledLegendId[s],p=e.svgObject.querySelector(d);t.isNullOrUndefined(p)||p.setAttribute("fill","#E5E5E5");var h="Interactive"===i.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[s]:"#"+this.maps.element.id+"_Legend_Shape_Index_"+this.maps.toggledLegendId[s],c=e.svgObject.querySelector(h);t.isNullOrUndefined(c)||c.setAttribute("fill","#E5E5E5")}},e.prototype.renderLegendBorder=function(){var e=this.maps,i=e.legendSettings,o=i.title.text,a={fontFamily:i.titleStyle.fontFamily,fontStyle:i.titleStyle.fontStyle,fontWeight:i.titleStyle.fontWeight,size:i.titleStyle.size,color:i.titleStyle.color,opacity:i.titleStyle.opacity},n=re(this.legendItemRect.width+20,o,a),l=x(n,a);this.legendBorderRect=new ut(this.legendItemRect.x-10,this.legendItemRect.y-10-l.height,this.legendItemRect.width+20,this.legendItemRect.height+20+l.height+("Interactive"===i.mode?0:0!==this.page?10:0));var r={color:i.border.color,width:i.border.width,opacity:i.border.opacity};r.opacity=t.isNullOrUndefined(r.opacity)?1:r.opacity;var s=new rt(e.element.id+"_Legend_Border",i.background,r,1,this.legendBorderRect,null,null,"","");this.legendGroup.appendChild(e.renderer.drawRectangle(s)),this.getLegendAlignment(e,this.legendBorderRect.width,this.legendBorderRect.height,i),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),"Float"!==i.position&&e.svgObject.appendChild(this.legendGroup),o&&(a.color=null!==a.color?a.color:this.maps.themeStyle.legendTitleFontColor,a.fontFamily=t.isNullOrUndefined(a.fontFamily)?this.maps.themeStyle.fontFamily:a.fontFamily,O(new at(e.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-l.height/2-5,"middle",n,""),a,a.color,this.legendGroup))},e.prototype.changeNextPage=function(e){this.currentPage=e.target.id.indexOf("_Left_Page_")>-1?this.currentPage-1:this.currentPage+1,this.legendGroup=this.maps.renderer.createGroup({id:this.maps.element.id+"_Legend_Group"}),this.maps.mapAreaRect=this.initialMapAreaRect,this.drawLegendItem(this.currentPage),t.isNullOrUndefined(this.maps.legendModule)||"Float"!==this.maps.legendSettings.position||(this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.legendModule.legendGroup):this.maps.svgObject.appendChild(this.maps.legendModule.legendGroup)),Oe(this.maps.element.id+"_Legend_Border",this.maps.element.id)&&(Oe(this.maps.element.id+"_Legend_Border",this.maps.element.id).style.pointerEvents="none")},e.prototype.getLegendAlignment=function(e,i,o,a){var n,l,r,s=(r=t.extend({},e.mapAreaRect,r,!0)).x,d=r.y,p=r.height,h=r.width,c=e.availableSize.width,m=e.availableSize.height,u=t.isNullOrUndefined(a.location.x)?0:a.location.x,g=t.isNullOrUndefined(a.location.y)?0:a.location.y;if("Float"===a.position)this.translate=e.isTileMap?new tt(u,g+2.5):new tt(u+e.mapAreaRect.x,g+e.mapAreaRect.y),this.legendTotalRect=e.mapAreaRect;else{switch(a.position){case"Top":case"Bottom":r.height="Top"===a.position?p-o:p-o-20,n=c/2-i/2,l="Top"===a.position?d:d+r.height,r.y="Top"===a.position?d+o+(e.isTileMap?5:10):d-5;break;case"Left":case"Right":r.width=h-i-e.mapAreaRect.x,n="Left"===a.position?s+5:s+r.width+10,l=m/2-o/2,r.x="Left"===a.position?s+i+10:s}switch(a.alignment){case"Near":"Top"===a.position||"Bottom"===a.position?n=r.x-("Interactive"===a.mode?10:0):l=r.y-(a.height&&a.width||"Interactive"!==a.mode?0:e.mapAreaRect.x);break;case"Far":"Top"===a.position||"Bottom"===a.position?n=c-i-("Interactive"===a.mode?0:10):l=m-o-("Default"===a.mode?10:0)}(a.height||a.width)&&"Interactive"!==a.mode?this.legendTotalRect=e.mapAreaRect=e.totalRect=r:(e.totalRect=null,(a.height||a.width)&&"Interactive"===a.mode&&(e.totalRect=r),this.legendTotalRect=e.mapAreaRect=r),"Left"===a.position&&(e.mapAreaRect.width=r.width),this.translate=new tt(n,l)}},e.prototype.getMarkersLegendCollections=function(e,i){var o=this;Array.prototype.forEach.call(i,function(i,a){var n,l=i.dataSource,r=i.legendText;Array.prototype.forEach.call(l,function(l,s){var d=!!t.isNullOrUndefined(l[o.maps.legendSettings.showLegendPath])||l[o.maps.legendSettings.showLegendPath];if(i.visible&&d&&!t.isNullOrUndefined(l.latitude)&&!t.isNullOrUndefined(l.longitude)){if(i.template){var p=(n=fe(i.template,o.maps))(o.maps);(t.isNullOrUndefined(p.childElementCount)?p[0]:p).querySelector("img").src}var h=t.isNullOrUndefined(l[r])?"":l[r],c=t.isNullOrUndefined(i.colorValuePath)?i.fill:l[i.colorValuePath],m=[];o.maps.legendSettings.removeDuplicateLegend?(m.push(o.getMarkerLegendData(e,h,c)),o.getOverallLegendItemsCollection(h,c,m,d)):(m.push({layerIndex:e,markerIndex:a,dataIndex:s,value:c,name:h,shape:t.isNullOrUndefined(i.shapeValuePath)||t.isNullOrUndefined(l[i.shapeValuePath])||""===l[i.shapeValuePath]?o.maps.legendSettings.useMarkerShape?i.shape:o.maps.legendSettings.shape:l[i.shapeValuePath]}),o.getOverallLegendItemsCollection(h,c,m,d))}})})},e.prototype.getMarkerLegendData=function(e,i,o){var a=this,n=[];return this.maps.layers[e].markerSettings.map(function(l,r){var s=l.dataSource;Array.prototype.forEach.call(s,function(l,s){var d=a.maps.layers[e].markerSettings[r];i!==l[d.legendText]&&""!==i||o!==l[d.colorValuePath]||n.push({layerIndex:e,markerIndex:r,dataIndex:s,value:o,name:i,shape:t.isNullOrUndefined(d.shapeValuePath)?d.shape:l[d.shapeValuePath]})})}),n},e.prototype.getRangeLegendCollection=function(e,i,o,a,n,l,r){for(var s,d=this,p=0,h=this.maps.legendSettings.fill,c=[],m=this,u=0,g=o;u<g.length;u++)!function(o){if(!t.isNullOrUndefined(o.from)&&!t.isNullOrUndefined(o.to)){s=t.isNullOrUndefined(o.label)?o.from+" - "+o.to:o.label,c=[];var u=!1;Array.prototype.forEach.call(a,function(t,a){var s=l.indexOf(".")>-1?Number(P(t,l)):parseFloat(t[l]);s>=o.from&&s<=o.to&&(u=!0,c.push(d.getLegendData(e,a,t,n,i,r,s)))}),u||c.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var g=t.isNullOrUndefined(h)?"[object Array]"===Object.prototype.toString.call(o.color)?t.isNullOrUndefined(o.value)?m.legendGradientColor(o,p):o.color[0]:o.color:h;p++,m.getOverallLegendItemsCollection(s,g,c,o.showLegend)}}(g[u])},e.prototype.getOverallLegendItemsCollection=function(e,t,i,o){var a=[],n=this.maps.legendSettings;if(i.length>0&&o){for(s=0;s<i.length;s++){var l=i[s];if(l.length>0)for(var r=0;r<l.length;r++)a.push(l[r]);else a.push(i[s]);a._isVisible=!0}if(!!this.maps.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollection,e,t))for(var s=0;s<this.legendCollection.length;s++)this.legendCollection[s].text===e&&this.legendCollection[s].fill===t&&this.legendCollection[s].data.push(a[0]);else this.legendCollection.push({text:e,fill:t,data:a,opacity:n.opacity,borderColor:n.shapeBorder.color,borderWidth:n.shapeBorder.width})}},e.prototype.removeDuplicates=function(e,t,i){for(var o=!1,a=0;a<e.length;a++)if((e[a].text===t||""===e[a].text)&&e[a].fill===i){o=!0;break}return o},e.prototype.getEqualLegendCollection=function(e,i,o,a,n,l,r){for(var s,d=this,p=this.maps.legendSettings.fill,h=[],c=[],m=[],u=[],g=this,y=0,f=o;y<f.length;y++)!function(y){if(t.isNullOrUndefined(y.value)){if(t.isNullOrUndefined(y.minOpacity)&&t.isNullOrUndefined(y.maxOpacity)&&t.isNullOrUndefined(y.value)&&t.isNullOrUndefined(y.from)&&t.isNullOrUndefined(y.to)&&!t.isNullOrUndefined(y.color)){if(Array.prototype.forEach.call(a,function(t,o){for(var a=l.indexOf(".")>-1?P(t,l):t[l],s=0;s<m.length;s++)a===m[s]&&u.push(d.getLegendData(e,o,t,n,i,r,a))}),0===m.length){var f=!1;Array.prototype.forEach.call(a,function(a,s){f=!1;for(var p=a[l],h=0;h<o.length;h++)t.isNullOrUndefined(p)||isNaN(p)?f||(f=!1):p>=o[h].from&&p<=o[h].to&&(f=!0);f||u.push(d.getLegendData(e,s,a,n,i,r,p))})}s=t.isNullOrUndefined(y.label)?"Others":y.label;var b="[object Array]"===Object.prototype.toString.call(y.color)?y.color[0]:y.color;g.getOverallLegendItemsCollection(s,b,u,y.showLegend)}}else{s=t.isNullOrUndefined(y.label)?y.value:y.label,c=[];var v=!1;Array.prototype.forEach.call(a,function(t,o){var a=l.indexOf(".")>-1?P(t,l):t[l];a===y.value?(v=!0,-1===h.indexOf(a)&&h.push(a),c.push(d.getLegendData(e,o,t,n,i,r,a))):-1===m.indexOf(a)&&m.push(a)});for(var S=0;S<h.length;S++)for(var x=0;x<m.length;x++)if(h[S]===m[x]){var O=m.indexOf(h[S]);m.splice(O,1)}v||c.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var M=t.isNullOrUndefined(p)?"[object Array]"===Object.prototype.toString.call(y.color)?y.color[0]:y.color:p;g.getOverallLegendItemsCollection(s,M,c,y.showLegend)}}(f[y])},e.prototype.getDataLegendCollection=function(e,i,o,a,n,l,r){var s,d=this,p=this.maps.legendSettings.fill,h=this.maps.legendSettings.valuePath;t.isNullOrUndefined(l)||t.isNullOrUndefined(a)||Array.prototype.forEach.call(a,function(a,c){var m=!!t.isNullOrUndefined(d.maps.legendSettings.showLegendPath)||!t.isNullOrUndefined(a[d.maps.legendSettings.showLegendPath])&&a[d.maps.legendSettings.showLegendPath],u=l.indexOf(".")>-1?P(a,l):a[l],g=[],y=t.isNullOrUndefined(p)?u:p;t.isNullOrUndefined(u)||0!==o.length||(s=t.isNullOrUndefined(a[h])?n.indexOf(".")>-1?P(a,n):a[n]:h.indexOf(".")>-1?P(a,h):a[h],g.push(d.getLegendData(e,c,a,n,i,r,u))),d.getOverallLegendItemsCollection(s,y,g,m)})},e.prototype.interactiveHandler=function(e){var i=e.target,o=this.maps.legendSettings,a=this.maps.element.id+"_Interactive_Legend",n="Layers"===o.type?"_shapeIndex_":"Markers"===o.type?"_MarkerIndex_":"_BubbleIndex_";if(i.id.indexOf(n)>1){var l=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),r=parseFloat(i.id.split(/_dataIndex_/i)[1].split("_")[0]),s=void 0,d=void 0,p=void 0;t.isNullOrUndefined(Oe(a,this.maps.element.id))||t.remove(Oe(a,this.maps.element.id));var h=this.maps.layersCollection[l],c="Layers"===o.type?h.visible:"Markers"===o.type?h.markerSettings[parseFloat(i.id.split("_MarkerIndex_")[1].split("_")[0])].visible:this.maps.getBubbleVisible(this.maps.layersCollection[l]);if(o.visible&&this.legendRenderingCollections.length>0&&"Interactive"===o.mode&&c)for(var m=this.maps.svgObject.getBoundingClientRect(),u=0;u<this.legendCollection.length;u++){var g=this.legendCollection[u],y=Oe(this.maps.element.id+"_Legend_Index_"+u,this.maps.element.id),f=y.getBoundingClientRect(),b=new ut(Math.abs(f.left-m.left),Math.abs(f.top-m.top),f.width,f.height);if(s=y.getAttribute("fill"),d=o.shapeBorder.color,p=o.shapeBorder.width,!t.isNullOrUndefined(g.data))for(var v=g.data,S=0;S<v.length;S++)if(r===v[S].dataIndex&&l===v[S].layerIndex){this.renderInteractivePointer(o,s,d,a,p,b);break}}}else t.isNullOrUndefined(Oe(a,this.maps.element.id))||t.remove(Oe(a,this.maps.element.id))},e.prototype.renderInteractivePointer=function(e,t,i,o,a,n){var l,r,s,d="None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation;n.y="Float"===e.position&&this.maps.isTileMap?n.y-this.maps.mapAreaRect.y:n.y,l="Horizontal"===d?e.invertedPointer?" M "+(r=n.x+n.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height)+" L "+(r-10)+" "+(s+10)+" L "+(r+10)+" "+(s+10)+" Z ":" M "+(r=n.x+n.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y)+" L "+(r-10)+" "+(s-10)+" L "+(r+10)+" "+(s-10)+" Z ":e.invertedPointer?" M "+(r=n.x-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height/2)+" L "+(r-10)+" "+(s-10)+" L "+(r-10)+" "+(s+10)+" z ":" M "+(r=n.x+n.width-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height/2)+" L "+(r+10)+" "+(s-10)+" L "+(r+10)+" "+(s+10)+" z ";var p=new nt(o,t,a,i,1,1,"",l);"Float"===e.position&&this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.renderer.drawPath(p)):this.maps.svgObject.appendChild(this.maps.renderer.drawPath(p))},e.prototype.wireEvents=function(e){t.EventHandler.add(e,t.Browser.touchStartEvent,this.changeNextPage,this)},e.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(t.Browser.touchMoveEvent,this.interactiveHandler,this),this.maps.on(t.Browser.touchEndEvent,this.interactiveHandler,this),this.maps.on(ei,this.legendClick,this))},e.prototype.markerToggleSelection=function(e,i,o,a){e.setAttribute("fill",this.legendCollection[a].fill),e.setAttribute("stroke",this.maps.layers[i].markerSettings[o].border.color),e.setAttribute("fill-opacity",this.maps.layers[i].markerSettings[o].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[i].markerSettings[o].border.width.toString()),e.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[i].markerSettings[o].border.opacity)?this.maps.layers[i].markerSettings[o].opacity:this.maps.layers[i].markerSettings[o].border.opacity).toString())},e.prototype.bubbleToggleSelection=function(e,i,o,a){e.setAttribute("fill",this.legendCollection[a].fill),e.setAttribute("stroke",this.maps.layers[i].bubbleSettings[o].border.color),e.setAttribute("fill-opacity",this.maps.layers[i].bubbleSettings[o].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[i].bubbleSettings[o].border.width.toString()),e.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[i].bubbleSettings[o].border.opacity)?this.maps.layers[i].bubbleSettings[o].opacity:this.maps.layers[i].bubbleSettings[o].border.opacity).toString())},e.prototype.legendClick=function(e){var i,o=this.maps.legendSettings.toggleLegendSettings.fill,a=this.maps.legendSettings.toggleLegendSettings.opacity,n=this.maps.legendSettings.toggleLegendSettings.border.color,l=this.maps.legendSettings.toggleLegendSettings.border.width,r=t.isNullOrUndefined(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings.opacity:this.maps.legendSettings.toggleLegendSettings.border.opacity;if(e.parentNode.id.indexOf(this.maps.element.id+"_Legend_Index_")>-1){var s=void 0,d=parseFloat(e.parentElement.id.substr((this.maps.element.id+"_Legend_Index_").length)),p=(y=this.legendCollection[d].data)._isVisible,h=void 0;if(this.maps.legendSettings.toggleLegendSettings.enable&&("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type))for(S=0;S<this.maps.layers.length;S++)for(f=0;f<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[S].bubbleSettings.length:this.maps.layers[S].markerSettings.length);f++){for(x=0;x<y.length;x++)h=this.legendCollection[d].data[x],s="Bubbles"===this.maps.legendSettings.type?Oe(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_BubbleIndex_"+f+"_dataIndex_"+h.dataIndex,this.maps.element.id):Oe(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_MarkerIndex_"+h.markerIndex+"_dataIndex_"+h.dataIndex,this.maps.element.id),t.isNullOrUndefined(h.shape)||"Balloon"!==h.shape||(s=s.children[0]),p&&null!==s?(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(s.setAttribute("fill",this.maps.layers[S].shapeSettings.fill),s.setAttribute("stroke",this.maps.layers[S].shapeSettings.border.color),s.setAttribute("fill-opacity",this.maps.layers[S].shapeSettings.opacity.toString()),s.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.width)?0:this.maps.layers[S].shapeSettings.border.width).toString()),s.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.opacity)?this.maps.layers[S].shapeSettings.opacity:this.maps.layers[S].shapeSettings.border.opacity).toString())):(s.setAttribute("fill",o),s.setAttribute("fill-opacity",a.toString()),s.setAttribute("stroke",n),s.setAttribute("stroke-width",l.toString()),s.setAttribute("stroke-opacity",r.toString())),null!==e&&((i=Oe(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id)).setAttribute("fill","#E5E5E5"),"HorizontalLine"!==this.maps.legendSettings.shape&&"VerticalLine"!==this.maps.legendSettings.shape&&"Cross"!==this.maps.legendSettings.shape||i.setAttribute("stroke","#E5E5E5"),Oe(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id).setAttribute("fill","#E5E5E5"))):("Markers"===this.maps.legendSettings.type?this.markerToggleSelection(s,S,f,d):this.bubbleToggleSelection(s,S,f,d),null!==e&&((i=Oe(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id)).setAttribute("fill",this.legendCollection[d].fill),"HorizontalLine"!==this.maps.legendSettings.shape&&"VerticalLine"!==this.maps.legendSettings.shape&&"Cross"!==this.maps.legendSettings.shape||i.setAttribute("stroke",this.legendCollection[d].fill),Oe(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id).setAttribute("fill","#757575")));y._isVisible=!p}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var c=void 0;this.removeCollections(e,d);var m=this.maps.toggledLegendId.indexOf(d);-1!==m&&(p=!1);for(f=0;f<this.maps.layers.length;f++)for(x=0;x<y.length;x++)if(h=this.legendCollection[d].data[x],null!==(c=Oe(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_shapeIndex_"+h.shapeIndex+"_dataIndex_"+h.dataIndex,this.maps.element.id))){O=this.maps.toggledShapeElementId.indexOf(c.id);p?(0===x&&this.maps.toggledLegendId.push(d),-1===O&&this.maps.toggledShapeElementId.push(c.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(c.setAttribute("fill",this.maps.layers[f].shapeSettings.fill),c.setAttribute("fill-opacity",this.maps.layers[f].shapeSettings.opacity.toString()),c.setAttribute("stroke",this.maps.layers[f].shapeSettings.border.color),c.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[f].shapeSettings.border.width)?0:this.maps.layers[f].shapeSettings.border.width).toString()),c.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[f].shapeSettings.border.opacity)?this.maps.layers[f].shapeSettings.opacity:this.maps.layers[f].shapeSettings.border.opacity).toString())):(c.setAttribute("fill",o),c.setAttribute("fill-opacity",a.toString()),c.setAttribute("stroke",n),c.setAttribute("stroke-width",l.toString()),c.setAttribute("stroke-opacity",r.toString())),null!==e&&(Oe(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id).setAttribute("fill","#E5E5E5"),(i=Oe(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id)).setAttribute("fill","#E5E5E5"))):(-1!==m&&0===x&&this.maps.toggledLegendId.splice(m,1),-1!==O&&this.maps.toggledShapeElementId.splice(O,1),c.setAttribute("fill",this.legendCollection[d].fill),c.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[f].shapeSettings.border.opacity)?this.maps.layers[f].shapeSettings.opacity:this.maps.layers[f].shapeSettings.border.opacity).toString()),c.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[f].shapeSettings.border.width)?0:this.maps.layers[f].shapeSettings.border.width).toString()),c.setAttribute("fill-opacity",this.maps.layers[f].shapeSettings.opacity.toString()),c.setAttribute("stroke",this.maps.layers[f].shapeSettings.border.color),null!==e&&(Oe(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id).setAttribute("fill","#757575"),(i=Oe(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id)).setAttribute("fill",this.legendCollection[d].fill)))}y._isVisible=!p}}else if(!t.isNullOrUndefined(e.id)&&(e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")>-1||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_Text")){var u=void 0,d=parseFloat(e.id.split(this.maps.element.id+"_Legend_Index_")[1]),g=void 0,y=this.legendCollection[d].data,p=y._isVisible;if(("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type)&&this.maps.legendSettings.toggleLegendSettings.enable)for(S=0;S<this.maps.layers.length;S++)for(var f=0;f<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[S].bubbleSettings.length:this.maps.layers[S].markerSettings.length);f++){for(x=0;x<y.length;x++)g=this.legendCollection[d].data[x],u="Bubbles"===this.maps.legendSettings.type?Oe(this.maps.element.id+"_LayerIndex_"+g.layerIndex+"_BubbleIndex_"+f+"_dataIndex_"+g.dataIndex,this.maps.element.id):Oe(this.maps.element.id+"_LayerIndex_"+g.layerIndex+"_MarkerIndex_"+f+"_dataIndex_"+g.dataIndex,this.maps.element.id),t.isNullOrUndefined(g.shape)||"Balloon"!==g.shape||(u=u.children[0]),p&&null!==u?(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(u.setAttribute("fill",this.maps.layers[S].shapeSettings.fill),u.setAttribute("stroke",this.maps.layers[S].shapeSettings.border.color),u.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.width)?0:this.maps.layers[S].shapeSettings.border.width).toString()),u.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.opacity)?this.maps.layers[S].shapeSettings.opacity:this.maps.layers[S].shapeSettings.border.opacity).toString()),u.setAttribute("fill-opacity",this.maps.layers[S].shapeSettings.opacity.toString())):(u.setAttribute("fill",o),u.setAttribute("fill-opacity",a.toString()),u.setAttribute("stroke",n),u.setAttribute("stroke-width",l.toString()),u.setAttribute("stroke-opacity",r.toString())),null!==e&&(Oe(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id).setAttribute("fill","#E5E5E5"),(i=Oe(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id)).setAttribute("fill","#E5E5E5"))):("Markers"===this.maps.legendSettings.type?this.markerToggleSelection(u,S,f,d):this.bubbleToggleSelection(u,S,f,d),null!==e&&((i=Oe(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id)).setAttribute("fill",this.legendCollection[d].fill),Oe(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id).setAttribute("fill","#757575")));y._isVisible=!p}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var b=void 0;this.removeCollections(e,d);var v=this.maps.toggledLegendId.indexOf(d);-1!==v&&(p=!1);for(var S=0;S<this.maps.layers.length;S++)for(var x=0;x<y.length;x++)if(g=this.legendCollection[d].data[x],null!==(b=Oe(this.maps.element.id+"_LayerIndex_"+g.layerIndex+"_shapeIndex_"+g.shapeIndex+"_dataIndex_"+g.dataIndex,this.maps.element.id))){var O=this.maps.toggledShapeElementId.indexOf(b.id);p?(0===x&&this.maps.toggledLegendId.push(d),-1===O&&this.maps.toggledShapeElementId.push(b.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(b.setAttribute("fill",this.maps.layers[0].shapeSettings.fill),b.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color),b.setAttribute("fill-opacity",this.maps.layers[S].shapeSettings.opacity.toString()),b.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.width)?0:this.maps.layers[S].shapeSettings.border.width).toString()),b.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.opacity)?this.maps.layers[S].shapeSettings.opacity:this.maps.layers[S].shapeSettings.border.opacity).toString())):(b.setAttribute("fill",o),b.setAttribute("fill-opacity",a.toString()),b.setAttribute("stroke",n),b.setAttribute("stroke-width",l.toString()),b.setAttribute("stroke-opacity",r.toString())),null!==e&&((i=Oe(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id)).setAttribute("fill","#E5E5E5"),Oe(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id).setAttribute("fill","#E5E5E5"))):(-1!==v&&0===x&&this.maps.toggledLegendId.splice(v,1),-1!==O&&this.maps.toggledShapeElementId.splice(O,1),b.setAttribute("fill-opacity",this.maps.layers[S].shapeSettings.opacity.toString()),b.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.width)?0:this.maps.layers[S].shapeSettings.border.width).toString()),b.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color),b.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.opacity)?this.maps.layers[S].shapeSettings.opacity:this.maps.layers[S].shapeSettings.border.opacity).toString()),b.setAttribute("fill",this.legendCollection[d].fill),null!==e&&(Oe(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id).setAttribute("fill","#757575"),(i=Oe(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id)).setAttribute("fill",this.legendCollection[d].fill)))}y._isVisible=!p}}},e.prototype.removeCollections=function(e,t){this.removeLegendSelectionCollection(e);var i=this.getIndexofLegend(this.maps.legendSelectionCollection,e);-1!==i&&this.maps.legendSelectionCollection.splice(i,1),-1!==this.getIndexofLegend(this.legendHighlightCollection,e)&&this.legendHighlightCollection.splice(i,1);var o=this.getIndexofLegend(this.shapeHighlightCollection,e);-1!==o&&this.shapeHighlightCollection.splice(o,1);var a=this.maps.selectedLegendElementId.indexOf(t);-1!==a&&this.maps.selectedLegendElementId.splice(a,1)},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(t.Browser.touchMoveEvent,this.interactiveHandler),this.maps.off(t.Browser.touchEndEvent,this.interactiveHandler),this.maps.off(ei,this.legendClick))},e.prototype.getLegendData=function(e,i,o,a,n,l,r){var s=[];if("[object Array]"===Object.prototype.toString.call(n))for(var d=0;d<n.length;d++){var p=n[d],h=a.indexOf(".")>-1?P(o,a):o[a],c=ie(o[a],l,p.properties),m=t.isNullOrUndefined(h)?h:h.toLowerCase();if((!t.isNullOrUndefined(p.properties[c])&&isNaN(p.properties[c])?p.properties[c].toLowerCase():p.properties[c])===m)if("MultiPoint"!=p.geometry.type)s.push({layerIndex:e,shapeIndex:d,dataIndex:i,name:o[a],value:r,pointIndex:-1});else for(var u=0;u<p.geometry.coordinates.length;u++)s.push({layerIndex:e,shapeIndex:d,dataIndex:i,name:o[a],value:r,pointIndex:u})}return s},e.prototype.legendGradientColor=function(e,i){var o,a="http://www.w3.org/2000/svg";if(!t.isNullOrUndefined(e.color)&&"object"==typeof e.color){var n=document.createElementNS(a,"linearGradient"),l=this.maps.legendSettings.position,r="Top"===l||"Bottom"===l?"100":"0",s="Top"===l||"Bottom"===l?"0":"100";n.setAttribute("id","linear_"+i+"_"+this.maps.element.id),n.setAttribute("x1","0%"),n.setAttribute("y1","0%"),n.setAttribute("x2",r+"%"),n.setAttribute("y2",s+"%");for(var d=0;d<e.color.length;d++){var p=100/(e.color.length-1),h=document.createElementNS(a,"stop");h.setAttribute("offset",d*p+"%"),h.setAttribute("stop-color",e.color[d]),h.setAttribute("stop-opacity",1..toString()),n.appendChild(h)}this.legendLinearGradient=n;var c="url(#linear_"+i+"_"+this.maps.element.id+")";this.defsElement.appendChild(n),o=c}return o},e.prototype.getModuleName=function(){return"Legend"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),Si=function(){function e(e){this.maps=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(t.Browser.touchMoveEvent,this.mouseMove,this),this.maps.on(t.Browser.touchStartEvent,this.mouseMove,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(t.Browser.touchMoveEvent,this.mouseMove),this.maps.off(t.Browser.touchStartEvent,this.mouseMove))},e.prototype.addHighlight=function(e,t,i){var o=Me(e,t,i,this.maps);i?this.mapHighlight(o,null,null):we(o)},e.prototype.mouseMove=function(e){var i,o=e.target,a="touch"===e.pointerType||"2"===e.pointerType||e.type.indexOf("touch")>-1;if((-1!==o.id.indexOf("LayerIndex")||o.id.indexOf("NavigationIndex")>-1)&&"ShapeselectionMapStyle"!==o.getAttribute("class")&&!a&&"MarkerselectionMapStyle"!==o.getAttribute("class")&&"BubbleselectionMapStyle"!==o.getAttribute("class")&&"navigationlineselectionMapStyle"!==o.getAttribute("class")&&"LineselectionMapStyle"!==o.getAttribute("class")){i=parseInt(o.id.split("_LayerIndex_")[1].split("_")[0],10);var n=void 0,l=void 0,r=void 0,s=void 0;if(o.id.indexOf("shapeIndex")>-1)r=parseInt(o.id.split("_shapeIndex_")[1].split("_")[0],10),n=this.maps.layers[i].shapeData.features&&!t.isNullOrUndefined(this.maps.layersCollection[i].layerData[r])?this.maps.layersCollection[i].layerData[r].property:null,s=parseInt(o.id.split("_dataIndex_")[1].split("_")[0],10),l=t.isNullOrUndefined(s)?null:this.maps.layers[i].dataSource[s],this.highlightSettings=this.maps.layers[i].highlightSettings;else if(o.id.indexOf("BubbleIndex")>-1){var d=parseInt(o.id.split("_BubbleIndex_")[1].split("_")[0],10);s=parseInt(o.id.split("_dataIndex_")[1].split("_")[0],10),l=this.maps.layers[i].bubbleSettings[d].dataSource[s],this.highlightSettings=this.maps.layers[i].bubbleSettings[d].highlightSettings}else if(o.id.indexOf("MarkerIndex")>-1){var p=parseInt(o.id.split("_MarkerIndex_")[1].split("_")[0],10);s=parseInt(o.id.split("_dataIndex_")[1].split("_")[0],10),l=this.maps.layers[i].markerSettings[p].dataSource[s],this.highlightSettings=this.maps.layers[i].markerSettings[p].highlightSettings}else{c=parseInt(o.id.split("_NavigationIndex_")[1].split("_")[0],10);i=parseInt(o.id.split("_LayerIndex_")[1].split("_")[0],10),n=null,l={latitude:this.maps.layers[i].navigationLineSettings[c].latitude,longitude:this.maps.layers[i].navigationLineSettings[c].longitude},this.highlightSettings=this.maps.layers[i].navigationLineSettings[c].highlightSettings}if(this.highlightSettings.enable)this.handleHighlight(o,i,l,n);else{var h=document.getElementsByClassName("highlightMapStyle")[0];if(!t.isNullOrUndefined(h)&&(we(h),h.id.indexOf("NavigationIndex")>-1)){var c=parseInt(h.id.split("_NavigationIndex_")[1].split("_")[0],10),m=parseInt(h.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);h.setAttribute("stroke-width",this.maps.layers[m].navigationLineSettings[c].width.toString()),h.setAttribute("stroke",this.maps.layers[m].navigationLineSettings[c].color)}}}else if(xe("highlightMapStyle").length>0){if((o=xe("highlightMapStyle")[0]).id.indexOf("NavigationIndex")>-1){c=parseInt(o.id.split("_NavigationIndex_")[1].split("_")[0],10);i=parseInt(o.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),o.setAttribute("stroke-width",this.maps.layers[i].navigationLineSettings[c].width.toString()),o.setAttribute("stroke",this.maps.layers[i].navigationLineSettings[c].color)}we(o),this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeShapeHighlightCollection()}else(-1!==o.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")||-1!==o.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule&&this.maps.legendSettings.visible&&-1===o.id.indexOf("_Text")?this.maps.legendModule.legendHighLightAndSelection(o,"highlight"):this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeLegendHighlightCollection()},e.prototype.handleHighlight=function(e,t,i,o){this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule&&"Layers"===this.maps.legendSettings.type&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.highlightSettings,"highlight",t),(!(e.id.indexOf("shapeIndex")>-1&&this.maps.legendSettings.visible&&this.maps.legendModule)||this.maps.legendModule.shapeToggled)&&this.mapHighlight(e,o,i)},e.prototype.mapHighlight=function(e,i,o){var a=this,n=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),l=!1;if(e.id.indexOf("MarkerIndex")>-1){var r=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10);l=this.maps.layers[n].markerSettings[r].highlightSettings.enable}var s={color:-1===e.parentElement.id.indexOf("LineString")?this.highlightSettings.border.color:this.highlightSettings.fill||this.highlightSettings.border.color,width:-1===e.parentElement.id.indexOf("LineString")?this.highlightSettings.border.width/(l?1:this.maps.scale):this.highlightSettings.border.width/this.maps.scale,opacity:this.highlightSettings.border.opacity},d={opacity:this.highlightSettings.opacity,fill:-1===e.parentElement.id.indexOf("LineString")?-1===e.id.indexOf("NavigationIndex")?t.isNullOrUndefined(this.highlightSettings.fill)?e.getAttribute("fill"):this.highlightSettings.fill:"none":"transparent",border:s,name:"itemHighlight",target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};this.maps.trigger("itemHighlight",d,function(){d.border.opacity=t.isNullOrUndefined(a.highlightSettings.border.opacity)?a.highlightSettings.opacity:a.highlightSettings.border.opacity,a.highlightMap(e,d)})},e.prototype.highlightMap=function(e,t){if("highlightMapStyle"!==e.getAttribute("class")){if(xe("highlightMapStyle").length>0){var i=xe("highlightMapStyle")[0];if(we(i),i.id.indexOf("NavigationIndex")>-1){var o=parseInt(i.id.split("_NavigationIndex_")[1].split("_")[0],10),a=parseInt(i.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);i.setAttribute("stroke-width",this.maps.layers[a].navigationLineSettings[o].width.toString()),i.setAttribute("stroke",this.maps.layers[a].navigationLineSettings[o].color)}}be("highlightMap")?Le("highlightMap","highlightMapStyle",t):document.body.appendChild(_e("highlightMap","highlightMapStyle",t)),e.setAttribute("class","highlightMapStyle")}},e.prototype.getModuleName=function(){return"Highlight"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),xi=function(){function e(e){this.maps=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(ei,this.mouseClick,this),this.maps.on(t.Browser.touchEndEvent,this.mouseClick,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(ei,this.mouseClick),this.maps.off(t.Browser.touchEndEvent,this.mouseClick))},e.prototype.mouseClick=function(e){if(!t.isNullOrUndefined(e.type)&&-1!==e.type.indexOf("touch")&&t.isNullOrUndefined(e.id)&&(e=e.target),!t.isNullOrUndefined(e.id)&&(e.id.indexOf("LayerIndex")>-1||e.id.indexOf("NavigationIndex")>-1)){var i=void 0,o=void 0,a=void 0,n=void 0,l=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10);if(e.id.indexOf("shapeIndex")>-1)a=parseInt(e.id.split("_shapeIndex_")[1].split("_")[0],10),i=!t.isNullOrUndefined(this.maps.layers[l].shapeData.features)&&this.maps.layers[l].shapeData.features.length>a?this.maps.layers[l].shapeData.features[a].properties:!t.isNullOrUndefined(this.maps.layers[l].shapeData.geometries)&&this.maps.layers[l].shapeData.geometries.length>a?this.maps.layers[l].shapeData.geometries[a].properties:null,n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=t.isNullOrUndefined(n)?null:this.maps.layers[l].dataSource[n],this.selectionsettings=this.maps.layers[l].selectionSettings,this.selectionType="Shape";else if(e.id.indexOf("BubbleIndex")>-1){var r=parseInt(e.id.split("_BubbleIndex_")[1].split("_")[0],10);n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[l].bubbleSettings[r].dataSource[n],this.selectionsettings=this.maps.layers[l].bubbleSettings[r].selectionSettings,this.selectionType="Bubble"}else if(e.id.indexOf("MarkerIndex")>-1){var s=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10);n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[l].markerSettings[s].dataSource[n],this.selectionsettings=this.maps.layers[l].markerSettings[s].selectionSettings,this.selectionType="Marker"}else{var d=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10);i=null,o={latitude:this.maps.layers[l].navigationLineSettings[d].latitude,longitude:this.maps.layers[l].navigationLineSettings[d].longitude},this.selectionsettings=this.maps.layers[l].navigationLineSettings[d].selectionSettings,this.selectionType="navigationline"}this.selectionsettings.enable&&this.selectElement(e,l,o,i)}else this.maps.legendSettings.visible&&!this.maps.legendSettings.toggleLegendSettings.enable&&this.maps.legendModule&&!t.isNullOrUndefined(e.id)&&-1===e.id.indexOf("_Text")&&(e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")>-1||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule.legendHighLightAndSelection(e,"selection")},e.prototype.selectElement=function(e,t,i,o){this.maps.mapSelect=!!e,this.maps.legendModule&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.selectionsettings,"selection",t),(!(e.id.indexOf("shapeIndex")>-1&&this.maps.legendSettings.visible&&this.maps.legendModule)||this.maps.legendModule.shapeToggled)&&this.selectMap(e,o,i)},e.prototype.addSelection=function(e,t,i){var o=Me(e,t,i,this.maps);i?this.selectMap(o,null,null):we(o)},e.prototype.selectMap=function(e,i,o){var a=this,n=(parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),e.parentElement.id.indexOf("LineString")>-1),l=(this.selectionsettings,{color:n?this.selectionsettings.fill||this.selectionsettings.border.color:this.selectionsettings.border.color,width:n?this.selectionsettings.border.width/this.maps.scale:this.selectionsettings.border.width/("Marker"===this.selectionType?1:this.maps.scale),opacity:this.selectionsettings.border.opacity}),r={opacity:this.selectionsettings.opacity,fill:n?"transparent":"navigationline"!==this.selectionType?this.selectionsettings.fill:"none",border:l,name:si,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};this.maps.trigger("itemSelection",r,function(i){if(r.border.opacity=t.isNullOrUndefined(a.selectionsettings.border.opacity)?a.selectionsettings.opacity:a.selectionsettings.border.opacity,!r.cancel)if(e.getAttribute("class")===a.selectionType+"selectionMapStyle"||"LineselectionMapStyle"===e.getAttribute("class")){we(e),a.removedSelectionList(e);for(var o=0;o<a.maps.shapeSelectionItem.length;o++)if(a.maps.shapeSelectionItem[o]===r.shapeData){a.maps.shapeSelectionItem.splice(o,1);break}if(e.id.indexOf("NavigationIndex")>-1){var l=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10),s=parseInt(e.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);e.setAttribute("stroke-width",a.maps.layers[s].navigationLineSettings[l].width.toString()),e.setAttribute("stroke",a.maps.layers[s].navigationLineSettings[l].color)}}else{var d=ue(a.maps.element.id+"_Layer_Collections");if(!a.selectionsettings.enableMultiSelect&&(d.getElementsByClassName(a.selectionType+"selectionMapStyle").length>0||d.getElementsByClassName("LineselectionMapStyle").length>0)){for(var p=d.getElementsByClassName(a.selectionType+"selectionMapStyle").length,h=void 0,c=0;c<p;c++)we(h=d.getElementsByClassName(a.selectionType+"selectionMapStyle")[0]),a.removedSelectionList(h);if(d.getElementsByClassName("LineselectionMapStyle").length>0){p=d.getElementsByClassName("LineselectionMapStyle").length;for(c=0;c<p;c++)we(h=d.getElementsByClassName("LineselectionMapStyle")[0]),a.removedSelectionList(h)}if("Shape"===a.selectionType){a.maps.shapeSelectionItem=[];for(var m=a.maps.selectedElementId.length,u=0;u<m;u++){we(h=d.getElementsByClassName(a.selectionType+"selectionMapStyle")[0]);var g=a.maps.selectedElementId.indexOf(h.getAttribute("id"));a.maps.selectedElementId.splice(g,1)}}if(h.id.indexOf("NavigationIndex")>-1){var l=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10),y=parseInt(e.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);h.setAttribute("stroke-width",a.maps.layers[y].navigationLineSettings[l].width.toString()),h.setAttribute("stroke",a.maps.layers[y].navigationLineSettings[l].color)}}n?(be("LineselectionMap")?Le("LineselectionMap","LineselectionMapStyle",r):document.body.appendChild(_e("LineselectionMap","LineselectionMapStyle",r)),e.setAttribute("class","LineselectionMapStyle")):(be(a.selectionType+"selectionMap")?Le(a.selectionType+"selectionMap",a.selectionType+"selectionMapStyle",r):document.body.appendChild(_e(a.selectionType+"selectionMap",a.selectionType+"selectionMapStyle",r)),e.setAttribute("class",a.selectionType+"selectionMapStyle")),"ShapeselectionMapStyle"===e.getAttribute("class")&&(a.maps.shapeSelectionClass=be(a.selectionType+"selectionMap"),a.maps.selectedElementId.push(e.getAttribute("id")),a.maps.shapeSelectionItem.push(r.shapeData)),"MarkerselectionMapStyle"===e.getAttribute("class")&&(a.maps.markerSelectionClass=be(a.selectionType+"selectionMap"),a.maps.selectedMarkerElementId.push(e.getAttribute("id"))),"BubbleselectionMapStyle"===e.getAttribute("class")&&(a.maps.bubbleSelectionClass=be(a.selectionType+"selectionMap"),a.maps.selectedBubbleElementId.push(e.getAttribute("id"))),"navigationlineselectionMapStyle"===e.getAttribute("class")&&(a.maps.navigationSelectionClass=be(a.selectionType+"selectionMap"),a.maps.selectedNavigationElementId.push(e.getAttribute("id")))}})},e.prototype.removedSelectionList=function(e){"Shape"===this.selectionType&&this.maps.selectedElementId.splice(this.maps.selectedElementId.indexOf(e.getAttribute("id")),1),"Bubble"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1),"Marker"===this.selectionType&&this.maps.selectedMarkerElementId.splice(this.maps.selectedMarkerElementId.indexOf(e.getAttribute("id")),1),"navigationline"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1)},e.prototype.getModuleName=function(){return"Selection"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),Oi=function(){function e(e){this.maps=e,this.tooltipId=this.maps.element.id+"_mapsTooltip",this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,a,n,l,r,d,p=this;-1!==e.type.indexOf("touch")?(this.isTouch=!0,o=(l=e).changedTouches[0].pageX,a=l.changedTouches[0].pageY,n=l.target):(this.isTouch="touch"===e.pointerType,o=e.pageX,a=e.pageY,n=e.target);var h,c,m,u="",g=n.id,y=[],f=g.indexOf("_LayerIndex_")>-1&&parseFloat(g.split("_LayerIndex_")[1].split("_")[0]),b=this.maps.layersCollection[f],v=[],S=s(o,a,this.maps.svgObject);if(this.tooltipTargetID=g,g.indexOf("_shapeIndex_")>-1||g.indexOf("_MarkerIndex_")>-1||g.indexOf("_BubbleIndex_")>-1){if(g.indexOf("_shapeIndex_")>-1){h=b.tooltipSettings;var x=parseInt(g.split("_shapeIndex_")[1].split("_")[0],10);if(t.isNullOrUndefined(b.layerData)||t.isNullOrUndefined(b.layerData[x]))return;var O=b.layerData[x].property,M=!1,L="[object Array]"===Object.prototype.toString.call(b.shapePropertyPath)?b.shapePropertyPath:[b.shapePropertyPath];if(!t.isNullOrUndefined(L)){for(var C=0;C<L.length;C++)for(var w=0;w<b.dataSource.length;w++){var I=b.dataSource[w],T=b.shapeDataPath.indexOf(".")>-1?P(I,b.shapeDataPath):I[b.shapeDataPath];if((!t.isNullOrUndefined(T)&&isNaN(I[b.shapeDataPath])?T.toLowerCase():T)===(!t.isNullOrUndefined(O[L[C]])&&isNaN(O[L[C]])?O[L[C]].toLowerCase():O[L[C]])){M=!0,f=w,C=L.length;break}}if(f=M?f:null,!t.isNullOrUndefined(b.dataSource[f])){y=JSON.parse(JSON.stringify(b.dataSource[f]));for(m in O)y.hasOwnProperty(m)||(y[m]=O[m])}}if(h.visible&&(!t.isNullOrUndefined(f)&&!isNaN(f)||!t.isNullOrUndefined(O)))if(b.tooltipSettings.format)u=this.formatter(b.tooltipSettings.format,y);else{var N=ie(b.shapeDataPath,b.shapePropertyPath,O);u=t.isNullOrUndefined(b.dataSource)||t.isNullOrUndefined(f)?O[N]:_(h.valuePath.indexOf(".")>-1?P(b.dataSource[f],h.valuePath):b.dataSource[f][h.valuePath],this.maps),t.isNullOrUndefined(u)&&(u=h.valuePath.indexOf(".")>-1?P(O,h.valuePath):O[h.valuePath])}}else if(g.indexOf("_MarkerIndex_")>-1){var k=parseInt(g.split("_MarkerIndex_")[1].split("_")[0],10),F=parseInt(g.split("_MarkerIndex_")[1].split("_")[2],10),E=b.markerSettings[k];h=E.tooltipSettings,y=E.dataSource[F],h.visible&&!isNaN(k)&&(u=E.tooltipSettings.format?this.formatter(E.tooltipSettings.format,E.dataSource[F]):E.template&&!E.tooltipSettings.valuePath?E.template.split(">")[1].split("<")[0]:_(E.tooltipSettings.valuePath.indexOf(".")>-1?P(E.dataSource[F],E.tooltipSettings.valuePath):E.dataSource[F][E.tooltipSettings.valuePath],this.maps))}else if(g.indexOf("_BubbleIndex_")>-1){var A=parseInt(g.split("_BubbleIndex_")[1].split("_")[0],10),F=parseInt(g.split("_BubbleIndex_")[1].split("_")[2],10),z=b.bubbleSettings[A];h=z.tooltipSettings,y=z.dataSource[F],h.visible&&!isNaN(F)&&(u=z.tooltipSettings.format?this.formatter(z.tooltipSettings.format,z.dataSource[F]):_(z.tooltipSettings.valuePath.indexOf(".")>-1?P(z.dataSource[F],z.tooltipSettings.valuePath):z.dataSource[F][z.tooltipSettings.valuePath],this.maps))}document.getElementById(this.tooltipId)?c=document.getElementById(this.tooltipId):(c=t.createElement("div",{id:this.maps.element.id+"_mapsTooltip",className:"EJ2-maps-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.maps.element.id+"_Secondary_Element").appendChild(c)),null!==h.template&&1===Object.keys("object"==typeof h.template?h.template:{}).length&&(h.template=h.template[Object.keys(h.template)[0]]);var B={location:S,text:v,data:y=this.setTooltipContent(h,y),textStyle:{color:h.textStyle.color,fontFamily:h.textStyle.fontFamily,fontStyle:h.textStyle.fontStyle,fontWeight:h.textStyle.fontWeight,opacity:h.textStyle.opacity,size:h.textStyle.size},template:h.template};r={cancel:!1,name:"tooltipRender",options:B,fill:h.fill,maps:this.maps,element:n,eventArgs:e},this.maps.trigger("tooltipRender",r,function(e){if(r.cancel||!h.visible||t.isNullOrUndefined(u)||-1!==g.indexOf("_cluster_")||-1!==g.indexOf("_dataLabel_"))p.clearTooltip();else if(p.maps.isProtectedOnChange=!0,r.options.textStyle.color=r.options.textStyle.color||p.maps.themeStyle.tooltipFontColor,r.options.textStyle.fontFamily=r.options.textStyle.fontFamily||p.maps.themeStyle.fontFamily,r.options.textStyle.opacity=r.options.textStyle.opacity||p.maps.themeStyle.tooltipTextOpacity,r.cancel?p.svgTooltip=new i.Tooltip({enable:!0,header:"",data:h.data,template:h.template,content:[u.toString()],shapes:[],location:h.location,palette:[void 0],areaBounds:p.maps.mapAreaRect,textStyle:h.textStyle,availableSize:p.maps.availableSize,fill:h.fill||p.maps.themeStyle.tooltipFillColor}):p.svgTooltip=new i.Tooltip({enable:!0,header:"",data:r.options.data,template:r.options.template,content:[u.toString()],shapes:[],location:r.options.location,palette:[void 0],areaBounds:p.maps.mapAreaRect,textStyle:r.options.textStyle,availableSize:p.maps.availableSize,fill:r.fill||p.maps.themeStyle.tooltipFillColor}),(p.maps.isVue||p.maps.isVue3)&&(p.svgTooltip.controlInstance=p.maps),p.svgTooltip.opacity=p.maps.themeStyle.tooltipFillOpacity||p.svgTooltip.opacity,p.svgTooltip.appendTo(c),p.maps.renderReactTemplates(),null!==(d=document.getElementById(p.maps.element.id+"_mapsTooltip"))&&-1!==d.innerHTML.indexOf("href")&&-1!==d.innerHTML.indexOf("</a>")){var o=d.getAttribute("style");o=o.replace("pointer-events: none;","position-events:all;"),d.setAttribute("style",o)}}),this.svgTooltip&&this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:B,element:this.svgTooltip.element}),this.svgTooltip?this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:B,element:this.svgTooltip.element}):this.clearTooltip()}else null!==(d=document.getElementById(this.maps.element.id+"_mapsTooltip"))&&-1!==d.innerHTML.indexOf("href")&&-1!==d.innerHTML.indexOf("</a>")?this.maps.notify(ei,this):this.clearTooltip()},e.prototype.setTooltipContent=function(e,i){var o=t.extend({},i,null,!0);return this.maps.format&&!isNaN(Number(o[e.valuePath]))?o[e.valuePath]=ye(this.maps,Number(o[e.valuePath])):o=Object.keys(o).length?o:void 0,o},e.prototype.formatter=function(e,t){void 0===t&&(t={});for(var i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];e="object"==typeof t[a]?L("",e,t,this.maps):e.split("${"+a+"}").join(_(t[a],this.maps))}return e},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),"MouseMove"===this.maps.tooltipDisplayMode&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3))},e.prototype.removeTooltip=function(){var e=!1;return document.getElementsByClassName("EJ2-maps-Tooltip").length>0&&(t.remove(document.getElementsByClassName("EJ2-maps-Tooltip")[0]),e=!0),e},e.prototype.clearTooltip=function(){this.removeTooltip()&&this.maps.clearTemplate()},e.prototype.addEventListener=function(){this.maps.isDestroyed||("DoubleClick"===this.maps.tooltipDisplayMode?this.maps.on("dblclick",this.renderTooltip,this):"Click"===this.maps.tooltipDisplayMode?this.maps.on(t.Browser.touchEndEvent,this.mouseUpHandler,this):this.maps.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.maps.element.addEventListener("contextmenu",this.removeTooltip),this.maps.on(t.Browser.touchCancelEvent,this.removeTooltip,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||("DoubleClick"===this.maps.tooltipDisplayMode?this.maps.off("dblclick",this.removeTooltip):"Click"===this.maps.tooltipDisplayMode?this.maps.off(t.Browser.touchEndEvent,this.mouseUpHandler):this.maps.off(t.Browser.touchMoveEvent,this.renderTooltip),this.maps.off(t.Browser.touchCancelEvent,this.removeTooltip))},e.prototype.getModuleName=function(){return"MapsTooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),Mi=function(){function e(e){this.isPanning=!1,this.mouseEnter=!1,this.isTouch=!1,this.rectZoomingStart=!1,this.pinchRect=new ut(0,0,0,0),this.browserName=t.Browser.info.name,this.isPointer=t.Browser.isPointer,this.handled=!1,this.pinchFactor=1,this.startTouches=[],this.intersect=[],this.mouseDownLatLong={x:0,y:0},this.mouseMoveLatLong={x:0,y:0},this.isSingleClick=!1,this.maps=e,this.wheelEvent="mozilla"===this.browserName?this.isPointer?"mousewheel":"DOMMouseScroll":"mousewheel",this.cancelEvent=this.isPointer?"pointerleave":"mouseleave",this.selectionColor=this.maps.zoomSettings.selectionColor,this.fillColor=this.maps.zoomSettings.color,this.addEventListener(),this.groupElements=[]}return e.prototype.performZooming=function(e,t,i){var o=this,a=this.maps;a.previousProjection=a.projectionType,a.defaultState=!1,a.initialCheck=!1,a.markerZoomedState=!1,a.zoomPersistence=a.enablePersistence;var n=a.tileZoomLevel,l=a.previousScale=a.scale,r=a.zoomSettings.maxZoom,s=a.zoomSettings.minZoom;t=s>t&&"ZoomIn"===i?s+1:t;var d=a.tileTranslatePoint;if(a.isTileMap||!("ZoomIn"===i?t>=s&&t<=r:t>=s)&&!a.isReset){if(a.isTileMap&&t>=s&&t<=r)if(this.getTileTranslatePosition(n,t,e,i),a.tileZoomLevel=t,a.zoomSettings.zoomFactor=t,a.scale=Math.pow(2,t-1),"ZoomOut"===i&&a.zoomSettings.resetToInitial&&a.applyZoomReset&&t<=a.initialZoomLevel&&(a.initialCheck=!0,a.zoomPersistence=!1,a.tileTranslatePoint.x=a.initialTileTranslate.x,a.tileTranslatePoint.y=a.initialTileTranslate.y,t=a.tileZoomLevel=a.mapScaleValue=a.initialZoomLevel,a.scale=Math.pow(2,t-1)),a.translatePoint.y=(a.tileTranslatePoint.y-.01*a.mapScaleValue)/a.scale,a.translatePoint.x=(a.tileTranslatePoint.x-.01*a.mapScaleValue)/a.scale,this.triggerZoomEvent(d,n,i))a.translatePoint=a.tileTranslatePoint=new tt(0,0),a.scale=a.previousScale,a.tileZoomLevel=n,a.zoomSettings.zoomFactor=a.previousScale;else{document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),this.markerLineAnimation(a),a.mapLayerPanel.generateTiles(t,a.tileTranslatePoint,i+"wheel",null,e);document.getElementById(this.maps.element.id+"_tiles");var p=this.maps.layersCollection[0].animationDuration;setTimeout(function(){o.applyTransform(),document.getElementById(o.maps.element.id+"_LayerIndex_1")&&(document.getElementById(o.maps.element.id+"_LayerIndex_1").style.display="block")},p)}}else{var h=a.mapAreaRect,c=a.baseMapRectBounds.min,m=a.baseMapRectBounds.max,u=Math.abs(c.x-m.x),g=Math.abs(c.y-m.y),y=void 0,f=void 0;if(t<1.2&&"Eckert5"!==a.projectionType)0!==u&&0!==g&&u!==g||(u=h.width/2,g=h.height),t=parseFloat(Math.min(h.width/u,h.height/g).toFixed(2)),a.translatePoint=this.calculateInitalZoomTranslatePoint(t,u,g,h,c,a);else{var b=a.translatePoint;y=b.x-(h.width/l-h.width/t)/(h.width/e.x),f=b.y-(h.height/l-h.height/t)/(h.height/e.y);var v=Math.abs(a.baseMapRectBounds.max.y-a.baseMapRectBounds.min.y)*t;y=v<a.mapAreaRect.height?h.x+(-c.x+(h.width/2-u/2)):y,f=v<a.mapAreaRect.height?h.y+(-c.y+(h.height/2-g/2)):f,a.translatePoint=new tt(y,f)}a.scale=t,this.triggerZoomEvent(d,n,i)?(a.translatePoint=a.previousPoint,a.scale=a.mapScaleValue=a.previousScale):this.applyTransform()}this.maps.zoomNotApplied=!1},e.prototype.calculateInitalZoomTranslatePoint=function(e,t,i,o,a,n){t*=e,i*=e;var l=0!==a.x&&"layers"===n.translateType?n.availableSize.width-o.width:0,r=o.x+(-a.x+(o.width/2-t/2))-l,s=o.y+(-a.y+(o.height/2-i/2));return new tt(r,s)},e.prototype.triggerZoomEvent=function(e,t,i){var o,a=this.maps;return o=a.isTileMap?{cancel:!1,name:"zoom",type:i,maps:a,tileTranslatePoint:{previous:e,current:a.tileTranslatePoint},translatePoint:{previous:a.previousPoint,current:a.translatePoint},tileZoomLevel:{previous:t,current:a.tileZoomLevel},scale:{previous:a.previousScale,current:a.scale}}:{cancel:!1,name:"zoom",type:i,maps:a,tileTranslatePoint:{},translatePoint:{previous:a.previousPoint,current:a.translatePoint},tileZoomLevel:{},scale:{previous:a.previousScale,current:a.scale}},a.trigger("zoom",o),o.cancel},e.prototype.getTileTranslatePosition=function(e,t,i,o){var a=this.maps,n="ZoomOut"===o?10:"Reset"===o&&t>1?0:10,l=a.availableSize,r=256*Math.pow(2,e),s=256*Math.pow(2,t),d=(i.x-a.tileTranslatePoint.x)/r*100,p=(i.y-a.tileTranslatePoint.y)/r*100;a.tileTranslatePoint.x=1===t?l.width/2-256:i.x-d*s/100,a.tileTranslatePoint.y=1===t?l.height/2-256+2*n:i.y-p*s/100},e.prototype.performRectZooming=function(){this.isDragZoom=!0;var e=this.maps,t=e.availableSize;e.previousProjection=e.projectionType;var i,o=e.tileZoomLevel,a=e.tileTranslatePoint,n=this.zoomingRect,l=e.zoomSettings.maxZoom,r=e.zoomSettings.minZoom;if(n.height>0&&n.width>0){var s=this.zoomingRect.x+this.zoomingRect.width/2,d=this.zoomingRect.y+this.zoomingRect.height/2,p=void 0;if(e.isTileMap)p=(p=o+Math.round(o+(t.width/n.width+t.height/n.height)/2))>=r&&p<=l?p:l,e.zoomSettings.zoomFactor=p,this.getTileTranslatePosition(o,p,{x:s,y:d}),e.tileZoomLevel=p,e.translatePoint.x=(e.tileTranslatePoint.x-.5*Math.pow(2,p))/Math.pow(2,p),e.translatePoint.y=(e.tileTranslatePoint.y-.5*Math.pow(2,p))/Math.pow(2,p),e.scale=Math.pow(2,p),(i=this.triggerZoomEvent(a,o,""))?(e.translatePoint=e.tileTranslatePoint=new tt(0,0),e.scale=e.tileZoomLevel=e.zoomSettings.zoomFactor=o):e.mapLayerPanel.generateTiles(p,e.tileTranslatePoint);else{var h=e.previousScale=e.scale;p=h+Math.round((t.width/n.width+t.height/n.height)/2);var c=e.previousPoint=e.translatePoint,m=c.x-(t.width/h-t.width/p)/(t.width/s),u=c.y-(t.height/h-t.height/p)/(t.height/d);e.translatePoint=new tt(m,u),e.scale=p,(i=this.triggerZoomEvent(a,o,""))&&(e.translatePoint=e.previousPoint,e.scale=e.previousScale)}i||(e.mapScaleValue=p,this.applyTransform(!0),this.maps.zoomNotApplied=!1,this.zoomingRect=null)}},e.prototype.setInteraction=function(e){this.lastScale=1,this.interaction=e},e.prototype.updateInteraction=function(){2===this.fingers?this.setInteraction("zoom"):this.setInteraction(null)},e.prototype.performPinchZooming=function(e){var t=this.maps,i=t.tileZoomLevel,o=t.mapAreaRect;t.previousScale=t.scale,t.previousPoint=t.translatePoint;var a=t.tileTranslatePoint,n=Ue(this.touchStartList,this.touchMoveList),l=Ze(De(this.touchMoveList,this.maps)),r=n/this.lastScale;this.lastScale=n,this.pinchFactor*=r,this.pinchFactor=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.pinchFactor,this.maps.zoomSettings.minZoom));var s,d=this.pinchFactor;if(t.isTileMap){var p=d;this.getTileTranslatePosition(i,p,{x:l.x,y:l.y}),t.tileZoomLevel=p,t.translatePoint.x=(t.tileTranslatePoint.x-.5*Math.pow(2,p))/Math.pow(2,p),t.translatePoint.y=(t.tileTranslatePoint.y-.5*Math.pow(2,p))/Math.pow(2,p),t.scale=Math.pow(2,p),(s=this.triggerZoomEvent(a,i,""))?(t.translatePoint=t.tileTranslatePoint=new tt(0,0),t.scale=t.previousScale,t.tileZoomLevel=i,t.zoomSettings.zoomFactor=t.previousScale):t.mapLayerPanel.generateTiles(p,t.tileTranslatePoint)}else{var h=t.baseMapRectBounds.min,c=t.baseMapRectBounds.max,m=Math.abs(h.y-c.y),u=Math.abs(h.x-c.x),g=t.translatePoint,y=void 0,f=void 0;if(d<1.2&&"Eckert5"!==t.projectionType)0!==u&&0!==m&&u!==m||(u=o.width/2,m=o.height),d=parseFloat(Math.min(o.width/u,o.height/m).toFixed(2)),t.translatePoint=this.calculateInitalZoomTranslatePoint(d,u,m,o,h,t);else{var b=Math.abs(t.baseMapRectBounds.max.y-t.baseMapRectBounds.min.y)*d;y=g.x-(o.width/t.scale-o.width/d)/(o.width/l.x),f=g.y-(o.height/t.scale-o.height/d)/(o.height/l.y),y=b<t.mapAreaRect.height?o.x+(-h.x+(o.width/2-u/2)):y,f=b<t.mapAreaRect.height?o.y+(-h.y+(o.height/2-m/2)):f,t.translatePoint=new tt(y,f)}t.scale=d,(s=this.triggerZoomEvent(a,i,""))&&(t.translatePoint=t.previousPoint,t.scale=t.previousScale)}s||this.applyTransform()},e.prototype.drawZoomRectangle=function(){var e=this.maps,t=this.mouseDownPoints,i=this.mouseMovePoints,o={width:1,color:"#009900"},a=Math.abs(i.x-t.x),n=Math.abs(i.y-t.y),l=i.x>t.x?t.x:t.x-a,r=i.y>t.y?t.y:t.y-n;ue(e.element.id).getBoundingClientRect();if(l>e.mapAreaRect.x&&l<e.mapAreaRect.x+e.mapAreaRect.width&&r>e.mapAreaRect.y&&r<e.mapAreaRect.y+e.mapAreaRect.height){this.zoomingRect=new ut(l,r,a,n);var s=e.renderer.createSvg({id:e.element.id+"_Selection_Rect_Zooming",width:e.availableSize.width,height:e.availableSize.height}),d=new rt(e.element.id+"_ZoomRect","#d3d3d3",o,.5,this.zoomingRect,0,0,"","3");s.appendChild(e.renderer.drawRectangle(d)),ue(e.element.id+"_Secondary_Element").appendChild(s)}},e.prototype.animateTransform=function(e,t,i,o,a){var n=this.currentLayer.animationDuration;if(!t||0===n||this.maps.isTileMap)return void e.setAttribute("transform","scale("+a+") translate( "+i+" "+o+" )");this.maps.isTileMap||He(e,0,n,new mt(i,o),a,this.maps.mapAreaRect,this.maps)},e.prototype.applyTransform=function(e){var i;this.templateCount=0;var o,a=this.maps.scale,n=this.maps.translatePoint.x,l=this.maps.translatePoint.y;if(this.maps.zoomShapeCollection=[],document.getElementById(this.maps.element.id+"_mapsTooltip")&&de(this.maps.element.id+"_mapsTooltip"),this.layerCollectionEle){for(var r=0;r<this.layerCollectionEle.childElementCount;r++){var s=this.layerCollectionEle.childNodes[r];if("g"===s.tagName){this.templateCount++,this.index=s.id.indexOf("_LayerIndex_")>-1&&parseFloat(s.id.split("_LayerIndex_")[1].split("_")[0]),this.currentLayer=this.maps.layersCollection[this.index];for(var d=this.maps.mapLayerPanel.calculateFactor(this.currentLayer),p=0;p<s.childElementCount;p++){var h=s.childNodes[p];if(h.id.indexOf("_Markers_Group")>-1||h.id.indexOf("_bubble_Group")>-1||h.id.indexOf("_dataLableIndex_Group")>-1){if(h.id.indexOf("_Markers_Group")>-1){this.isPanning||this.markerTranslates(h.childNodes[0],d,n,l,a,"Marker",s,e),h=s.childNodes[p];var c=void 0;if(!t.isNullOrUndefined(h)&&-1!==h.id.indexOf("Markers")){for(_=0;_<h.childElementCount;_++){this.markerTranslate(h.childNodes[_],d,n,l,a,"Marker",e);parseInt(h.childNodes[_].id.split("_LayerIndex_")[1].split("_")[0],10);var m=parseInt(h.childNodes[_].id.split("_dataIndex_")[1].split("_")[0],10),u=parseInt(h.childNodes[_].id.split("_MarkerIndex_")[1].split("_")[0],10);c=this.currentLayer.markerSettings[u].animationDuration>0;for(var g=this.currentLayer.markerSettings[u].dataSource[m],y=0;y<this.currentLayer.markerSettings[u].initialMarkerSelection.length;y++)this.currentLayer.markerSettings[u].initialMarkerSelection[y].latitude!==g.latitude&&this.currentLayer.markerSettings[u].initialMarkerSelection[y].longitude!==g.longitude||this.maps.markerSelection(this.currentLayer.markerSettings[u].selectionSettings,this.maps,h.children[_],this.currentLayer.markerSettings[u].dataSource[m]);if((this.currentLayer.animationDuration>0||this.maps.layersCollection[0].animationDuration>0&&"SubLayer"===this.currentLayer.type)&&!this.isPanning)if(this.maps.isTileMap){var f=document.querySelector(".GroupElement");f&&!document.querySelector(".ClusterGroupElement")&&c&&(f.style.display="none")}else o="visibility:hidden",h.setAttribute("style",o)}if(this.isPanning&&this.maps.markerModule.sameMarkerData.length>0?F(this.maps.markerModule.sameMarkerData,this.maps,h,!0):this.maps.markerModule.sameMarkerData.length>0&&(this.maps.markerModule.sameMarkerData=[],document.getElementById(this.maps.element.id+"_mapsTooltip")&&de(this.maps.element.id+"_mapsTooltip")),document.getElementById(this.maps.element.id+"_mapsTooltip")&&this.maps.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&!this.isPanning){var b=this.maps.mapsTooltipModule,v=h.querySelector("#"+b.tooltipTargetID);if(!t.isNullOrUndefined(v))if("hidden"===v.style.visibility)de(this.maps.element.id+"_mapsTooltip");else{var S=parseFloat(v.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[1]),O=parseFloat(v.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[2]);this.maps.isTileMap&&(S+=+be(this.maps.element.id+"_tile_parent").style.left.split("px")[0],O+=+be(this.maps.element.id+"_tile_parent").style.top.split("px")[0]),b.svgTooltip.location.x=S,b.svgTooltip.location.y=O,b.svgTooltip.enableAnimation=!1}}}}else if(h.id.indexOf("_bubble_Group")>-1)for(var M=void 0,_=0;_<h.childElementCount;_++){(M=h.childNodes[_]).getAttribute("transform");i=parseFloat(M.id.split("_LayerIndex_")[1].split("_")[0]);for(var L=parseFloat(M.id.split("_BubbleIndex_")[1].split("_")[0]),m=parseFloat(M.id.split("_BubbleIndex_")[1].split("_")[2]),C=0;C<this.maps.bubbleModule.bubbleCollection.length;C++){var w=this.maps.bubbleModule.bubbleCollection[C];if(w.LayerIndex===i&&w.BubbleIndex===L&&w.DataIndex===m){var P=(w.center.x+n)*a,I=(w.center.y+l)*a,T=this.currentLayer.animationDuration;e&&0!==T?We(M,0,T,new mt(P,I)):M.setAttribute("transform","translate( "+P+" "+I+" )");break}}}else if(h.id.indexOf("_dataLableIndex_Group")>-1){this.intersect=[],this.maps.zoomLabelPositions=[],this.maps.zoomLabelPositions=this.maps.dataLabelModule.dataLabelCollections;for(_=0;_<h.childElementCount;_++)if(h.childNodes[_].id.indexOf("_LabelIndex_")>-1){var N=parseFloat(h.childNodes[_].id.split("_LabelIndex_")[1].split("_")[0]);this.zoomshapewidth=h.childNodes[_].getBoundingClientRect(),this.maps.zoomShapeCollection.push(this.zoomshapewidth),this.dataLabelTranslate(h.childNodes[_],d,n,l,a,"DataLabel",e);var k=this.maps.layers[this.index].dataLabelSettings.border;if(_>0&&k.width>1&&h.childNodes[_-1].id.indexOf("_rectIndex_")>-1){var E=(this.maps.zoomLabelPositions[N].location.x+n)*a,A=(this.maps.zoomLabelPositions[N].location.y+l)*a,z=x(h.childNodes[_].innerHTML,this.maps.layers[this.index].dataLabelSettings.textStyle),B=h.childNodes[_-1],j=E-z.width/2,U=A-z.height/2-5;B.setAttribute("x",j),B.setAttribute("y",U)}}}}else this.maps.isTileMap&&h.id.indexOf("_line_Group")>-1?(h.remove(),s.children.length>0&&s.children[0]?s.insertBefore(this.maps.navigationLineModule.renderNavigation(this.currentLayer,this.maps.tileZoomLevel,this.index),s.children[0]):s.appendChild(this.maps.navigationLineModule.renderNavigation(this.currentLayer,this.maps.tileZoomLevel,this.index))):-1==h.id.indexOf("Legend")&&(ze(h,this.index,a,this.maps),this.maps.zoomTranslatePoint=this.maps.translatePoint,this.animateTransform(h,e,n,l,a))}}this.maps.arrangeTemplate()}t.isNullOrUndefined(this.currentLayer)||e&&0!==this.currentLayer.animationDuration&&!this.maps.isTileMap||this.processTemplate(n,l,a,this.maps)}},e.prototype.markerTranslates=function(e,i,o,a,n,l,r,s){var d=this;void 0===s&&(s=!1);var p=0,m=0,u=0,g=parseInt((e||r).id.split("_LayerIndex_")[1].split("_")[0],10),y=this.maps.renderer.createGroup({id:this.maps.element.id+"_Markers_Group",class:"GroupElement",style:"pointer-events: auto;"});document.getElementById(y.id)&&de(y.id);var f=this.maps.mapAreaRect,b=t.createElement("div",{id:this.maps.element.id+"_LayerIndex_"+g+"_Markers_Template_Group",className:"template",styles:"overflow: hidden; position: absolute;pointer-events: none;top:"+f.y+"px;left:"+f.x+"px;height:"+f.height+"px;width:"+f.width+"px;"});document.getElementById(b.id)&&de(b.id);var v=this.maps.layersCollection[g];v.markerSettings.map(function(e,s){var f=e.dataSource;Array.prototype.forEach.call(f,function(S,x){d.maps.markerNullCount=s>=0&&0===x?0:d.maps.markerNullCount;var O={template:e.template,data:S,maps:d.maps,marker:e,cancel:!1,name:ti,fill:e.fill,colorValuePath:e.colorValuePath,shapeValuePath:e.shapeValuePath,height:e.height,width:e.width,imageUrl:e.imageUrl,imageUrlValuePath:e.imageUrlValuePath,shape:e.shape,border:e.border};O=T(O,S),O=I(O,S),d.maps.trigger("markerRendering",O,function(M){e.shapeValuePath!==O.shapeValuePath&&(O=T(O,S)),e.colorValuePath!==O.colorValuePath&&(O=I(O,S));var _=t.isNullOrUndefined(e.latitudeValuePath)?t.isNullOrUndefined(S.latitude)?t.isNullOrUndefined(S.Latitude)?null:S.Latitude:parseFloat(S.latitude):Number(P(S,e.latitudeValuePath)),L=t.isNullOrUndefined(e.longitudeValuePath)?t.isNullOrUndefined(S.longitude)?t.isNullOrUndefined(S.Longitude)?null:S.Longitude:parseFloat(S.longitude):Number(P(S,e.longitudeValuePath)),C=e.offset;if(!O.cancel&&e.visible&&!t.isNullOrUndefined(L)&&!t.isNullOrUndefined(_)){var w=d.maps.element.id+"_LayerIndex_"+g+"_MarkerIndex_"+s+"_dataIndex_"+x,k=d.maps.isTileMap?c(new mt(L,_),d.maps.tileZoomLevel,d.maps.tileTranslatePoint,!0):h(_,L,i,v,d.maps),F=(0!==v.animationDuration||t.isNullOrUndefined(d.maps.zoomModule),{x:o,y:a});!O.template||isNaN(k.x)||isNaN(k.y)?O.template||isNaN(k.x)||isNaN(k.y)||(m++,E(O,e,f,x,k,F,w,C,n,d.maps,y)):(u++,A(O,void 0,w,S,s,b,k,F,n,C,d.maps))}p+=isNaN(_)||isNaN(L)?1:0,u+=O.cancel?1:0,m+=O.cancel?1:0,d.maps.markerNullCount=t.isNullOrUndefined(_)||t.isNullOrUndefined(L)?d.maps.markerNullCount+1:d.maps.markerNullCount;var z=f.length-d.maps.markerNullCount;y.childElementCount===z-u-p&&"Template"!==l&&(r.appendChild(y),v.markerClusterSettings.allowClustering&&(d.maps.svgObject.appendChild(y),d.maps.element.appendChild(d.maps.svgObject),N(v,y,d.maps,g,y,r,!0,!0))),b.childElementCount===z-m-p&&ue(d.maps.element.id+"_Secondary_Element")&&(ue(d.maps.element.id+"_Secondary_Element").appendChild(b),n>=1&&v.markerClusterSettings.allowClustering&&N(v,b,d.maps,g,y,r,!1,!0))})})})},e.prototype.processTemplate=function(e,i,o,a){for(var n=0;n<this.templateCount;n++){var l=a.mapLayerPanel.calculateFactor(this.currentLayer),r=ue(a.element.id+"_LayerIndex_"+n+"_Markers_Template_Group"),s=ue(a.element.id+"_LayerIndex_"+n+"_Label_Template_Group");if(!t.isNullOrUndefined(r)&&r.childElementCount>0)for(d=0;d<r.childElementCount;d++)this.markerTranslate(r.childNodes[d],l,e,i,o,"Template");if(!t.isNullOrUndefined(s)&&s.childElementCount>0)for(var d=0;d<s.childElementCount;d++)this.dataLabelTranslate(s.childNodes[d],l,e,i,o,"Template")}},e.prototype.dataLabelTranslate=function(e,i,o,a,n,l,r){void 0===r&&(r=!1);var s,d,p,h,c,m=this.maps.dataLabelModule.dataLabelCollections,u=(e.getBoundingClientRect(),this.maps.layers[this.index].dataLabelSettings.textStyle),g=(this.maps.layers[this.index].dataLabelSettings.labelPath,parseFloat(e.id.split("_LayerIndex_")[1].split("_")[0])),y=parseFloat(e.id.split("_shapeIndex_")[1].split("_")[0]);e.id.indexOf("_LabelIndex_")>-1&&(c=parseFloat(e.id.split("_LabelIndex_")[1].split("_")[0]));for(var f=this.currentLayer.animationDuration,b=0;b<m.length;b++){var v=m[b];if(v.layerIndex===g&&v.shapeIndex===y&&v.labelIndex===c){var S=v.location.x,O=v.location.y;if("Template"===l){var M=ue(this.maps.element.id+"_Layer_Collections");S=Math.abs(this.maps.baseMapRectBounds.min.x-S)*n,O=Math.abs(this.maps.baseMapRectBounds.min.y-O)*n;var _=e.getBoundingClientRect(),L=M.getBoundingClientRect(),C=e.parentElement.getBoundingClientRect(),w=S+(L.left-C.left)-_.width/2,P=O+(L.top-C.top)-_.height/2;e.style.left=w+"px",e.style.top=P+"px"}else{S=(S+o)*n;var I=(O=(O+a)*n)-(h=x(p=v.dataLabelText,u)).height/4,T=O+h.height/4,N={rightWidth:S+h.width/2,leftWidth:S-h.width/2,heightTop:I,heightBottom:T};if(r&&0!==f||e.setAttribute("transform","translate( "+S+" "+O+" )"),"Hide"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(n>1?(s=this.zoomshapewidth.width>=h.width?p:"",e.innerHTML=s):(s=this.maps.dataLabelShape[b]>=h.width?p:"",e.innerHTML=s)),"Trim"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(n>1?(s=re(this.zoomshapewidth.width,p,u),e.innerHTML=s):(s=re(this.maps.dataLabelShape[b],p,u),e.innerHTML=s)),"Hide"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var k=0;k<this.intersect.length;k++)if(!t.isNullOrUndefined(this.intersect[k])){if(!(N.leftWidth>this.intersect[k].rightWidth||N.rightWidth<this.intersect[k].leftWidth||N.heightTop>this.intersect[k].heightBottom||N.heightBottom<this.intersect[k].heightTop)){s="",e.innerHTML=s;break}s=t.isNullOrUndefined(s)?p:s,e.innerHTML=s}this.intersect.push(N)}if("Trim"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var F=0;F<this.intersect.length;F++)if(!t.isNullOrUndefined(this.intersect[F]))if(N.rightWidth<this.intersect[F].leftWidth||N.leftWidth>this.intersect[F].rightWidth||N.heightBottom<this.intersect[F].heightTop||N.heightTop>this.intersect[F].heightBottom)d=t.isNullOrUndefined(s)?p:s,n>1&&(d=re(this.zoomshapewidth.width,d,u)),e.innerHTML=d;else{if(N.leftWidth>this.intersect[F].leftWidth){d=re(A=(E=this.intersect[F].rightWidth-N.leftWidth)-(N.rightWidth-N.leftWidth),s=t.isNullOrUndefined(s)?p:s,u),e.innerHTML=d;break}if(N.leftWidth<this.intersect[F].leftWidth){var E=N.rightWidth-this.intersect[F].leftWidth,A=Math.abs(E-(N.rightWidth-N.leftWidth));d=re(A,s=t.isNullOrUndefined(s)?p:s,u),e.innerHTML=d;break}}this.intersect.push(N),t.isNullOrUndefined(d)&&(d=re(this.zoomshapewidth.width,p,u),e.innerHTML=d)}else We(e,0,f,new mt(S,O))}}}},e.prototype.markerTranslate=function(e,i,o,a,n,l,r){void 0===r&&(r=!1);var s=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),d=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),p=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),m=this.maps.layersCollection[s],u=m.markerSettings[d];if(!t.isNullOrUndefined(u)&&!t.isNullOrUndefined(u.dataSource)&&!t.isNullOrUndefined(u.dataSource[p])){var g=t.isNullOrUndefined(u.longitudeValuePath)?t.isNullOrUndefined(u.dataSource[p].longitude)?t.isNullOrUndefined(u.dataSource[p].Latitude)?0:parseFloat(u.dataSource[p].Latitude):parseFloat(u.dataSource[p].longitude):Number(P(u.dataSource[p],u.longitudeValuePath)),y=t.isNullOrUndefined(u.latitudeValuePath)?t.isNullOrUndefined(u.dataSource[p].latitude)?t.isNullOrUndefined(u.dataSource[p].Latitude)?0:parseFloat(u.dataSource[p].Latitude):parseFloat(u.dataSource[p].latitude):Number(P(u.dataSource[p],u.latitudeValuePath)),f=this.currentLayer.animationDuration,b=this.maps.isTileMap?c(new tt(g,y),this.maps.tileZoomLevel,this.maps.tileTranslatePoint,!0):h(y,g,i,m,this.maps);if(this.maps.isTileMap)if("Template"===l){var v=e.getBoundingClientRect();if(e.style.left=b.x-v.width/2+u.offset.x+"px",e.style.top=b.y-v.height/2+u.offset.y+"px","GoogleStaticMap"===this.maps.layers[this.maps.baseLayerIndex].layerType){var S=ue(this.maps.element.id+"_StaticGoogleMap").getBoundingClientRect();"none"!==e.style.display&&((S.x>v.x||S.x+640<v.x+v.width)&&(S.y>v.y||S.y+S.height<v.y+v.height)?e.style.display="none":(S.x>v.x||S.x+640<v.x+v.width)&&(e.style.display="none"))}}else b.x+=u.offset.x,b.y+=u.offset.y,e.setAttribute("transform","translate( "+b.x+" "+b.y+" )");else if("Template"===l)if(f>0){b.x=Math.abs(this.maps.baseMapRectBounds.min.x-b.x)*n,b.y=Math.abs(this.maps.baseMapRectBounds.min.y-b.y)*n;var x=ue(this.maps.element.id+"_Layer_Collections").getBoundingClientRect(),O=e.parentElement.getBoundingClientRect();e.style.left=b.x+(x.left-O.left)+u.offset.x+"px",e.style.top=b.y+(x.top-O.top)+u.offset.y+"px",e.style.transform="translate(-50%, -50%)"}else{O=e.getBoundingClientRect();e.style.left=(b.x+o)*n+u.offset.x-this.maps.mapAreaRect.x-O.width/2+"px",e.style.top=(b.y+a)*n+u.offset.y-this.maps.mapAreaRect.y-O.height/2+"px"}else b.x=(b.x+o)*n+u.offset.x,b.y=(b.y+a)*n+u.offset.y,r&&0!==f?We(e,0,f,b):e.setAttribute("transform","translate( "+b.x+" "+b.y+" )")}},e.prototype.markerLineAnimation=function(e){if(e.isTileMap)for(var i=0;i<e.layersCollection.length;i++){var o=ue(this.maps.element.id+"_LayerIndex_"+i+"_Markers_Template_Group"),a=ue(this.maps.element.id+"_LayerIndex_"+i+"_line_Group");t.isNullOrUndefined(o)||(o.style.visibility="hidden"),t.isNullOrUndefined(a)||(a.style.visibility="hidden")}},e.prototype.panning=function(e,i,o,a){var n,l=this.maps,r=this.mouseDownPoints,s=this.mouseMovePoints,d=l.scale;l.markerZoomedState=!1,l.zoomPersistence=l.enablePersistence,l.defaultState=!1,l.initialCheck=!1;var p,h,c=l.translatePoint,m=l.tileTranslatePoint;if(i=t.isNullOrUndefined(i)?r.x-s.x:i,o=t.isNullOrUndefined(o)?r.y-s.y:o,this.maps.mergeCluster(),l.isTileMap){if(this.maps.tileZoomLevel>1){p=l.tileTranslatePoint.x-i,h=l.tileTranslatePoint.y-o,this.distanceX=p-l.tileTranslatePoint.x,this.distanceY=h-l.tileTranslatePoint.y,l.tileTranslatePoint.x=p,l.tileTranslatePoint.y=h,(l.tileTranslatePoint.y>-10&&o<0||l.tileTranslatePoint.y<-256*(Math.pow(2,this.maps.tileZoomLevel)-2)&&o>0)&&(l.tileTranslatePoint.x=p+i,l.tileTranslatePoint.y=h+o),l.translatePoint.x=(l.tileTranslatePoint.x-i)/l.scale,l.translatePoint.y=(l.tileTranslatePoint.y-o)/l.scale;var u=this.maps.getTileGeoLocation(a.layerX,a.layerY);n={cancel:!1,name:"pan",maps:l,tileTranslatePoint:{previous:m,current:l.tileTranslatePoint},translatePoint:{previous:c,current:l.translatePoint},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:u.latitude,longitude:u.longitude},l.trigger("pan",n),l.mapLayerPanel.generateTiles(l.tileZoomLevel,l.tileTranslatePoint,"Pan"),this.applyTransform()}}else{var g=document.getElementById(l.element.id+"_Legend_Group"),y=t.isNullOrUndefined(g)?0:g.getClientRects()[0].height;p=c.x-i/d,h=c.y-o/d;var f=ue(l.element.id+"_Layer_Collections").getBoundingClientRect(),b=ue(l.element.id+"_svg").getBoundingClientRect(),v=i<0?f.left<=b.left+l.mapAreaRect.x:f.left+f.width+l.mapAreaRect.x>=b.width,S=o<0?f.top<=b.top+l.mapAreaRect.y:f.top+f.height+y+l.margin.top>=b.top+b.height,x=this.maps.getGeoLocation(this.maps.layersCollection.length-1,a.layerX,a.layerY);n={cancel:!1,name:"pan",maps:l,tileTranslatePoint:{},translatePoint:{previous:c,current:new tt(p,h)},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:x.latitude,longitude:x.longitude},l.trigger("pan",n),n.cancel||(v&&S?(l.translatePoint=new tt(p,h),this.applyTransform()):v?(l.translatePoint=new tt(p,l.translatePoint.y),this.applyTransform()):S&&(l.translatePoint=new tt(l.translatePoint.x,h),this.applyTransform())),this.maps.zoomNotApplied=!1}l.zoomTranslatePoint=l.translatePoint,this.mouseDownPoints=this.mouseMovePoints,this.maps.zoomNotApplied=!1,this.isSingleClick=!1},e.prototype.toAlignSublayer=function(){this.maps.translatePoint.x=t.isNullOrUndefined(this.distanceX)?this.maps.translatePoint.x:this.maps.translatePoint.x-this.distanceX/this.maps.scale,this.maps.translatePoint.y=t.isNullOrUndefined(this.distanceY)?this.maps.translatePoint.y:this.maps.translatePoint.y-this.distanceY/this.maps.scale,this.applyTransform(!1)},e.prototype.toolBarZooming=function(e,t){var i=this,o=this.maps;o.initialCheck=!1,o.defaultState="Reset"===t&&1===e&&!(o.zoomSettings.resetToInitial&&o.applyZoomReset)||"ZoomOut"===t&&1===e;var a=o.tileZoomLevel,n=o.previousScale=o.scale;o.markerZoomedState=!1,o.zoomPersistence=o.enablePersistence,o.mapScaleValue=e;var l=o.zoomSettings.maxZoom,r=o.zoomSettings.minZoom,s=o.mapAreaRect,d=o.previousPoint=o.translatePoint,p=o.tileTranslatePoint;if(o.previousProjection=o.projectionType,e="ZoomOut"===t&&1===Math.round(e)?1:e,e="Reset"===t?1:0===Math.round(e)?1:e,e=r>e&&"ZoomIn"===t?r+1:e,!o.isTileMap&&("ZoomIn"===t?e>=r&&e<=l:e>=r||o.isReset)){var h=o.baseMapRectBounds.min,c=o.baseMapRectBounds.max,m=Math.abs(c.x-h.x),u=Math.abs(h.y-c.y),g=void 0,y=void 0;if(e<1.2&&"Eckert5"!==o.projectionType)0!==u&&0!==m&&u!==m||(m=s.width/2,u=s.height),e=parseFloat(Math.min(s.width/m,s.height/u).toFixed(2)),o.translatePoint=this.calculateInitalZoomTranslatePoint(e,m,u,s,h,o);else{g=d.x-(s.width/n-s.width/e)/2,y=d.y-(s.height/n-s.height/e)/2;var f=Math.abs(o.baseMapRectBounds.max.y-o.baseMapRectBounds.min.y)*e;g=f<o.mapAreaRect.height?s.x+(-h.x+(s.width/2-m/2)):g,y=f<o.mapAreaRect.height?s.y+(-h.y+(s.height/2-u/2)):y,o.translatePoint=new tt(g,y)}o.zoomTranslatePoint=o.translatePoint,o.scale=e,this.triggerZoomEvent(p,a,t)?(o.translatePoint=o.zoomTranslatePoint=o.previousPoint,o.scale=o.previousScale):this.applyTransform(!0)}else if(o.isTileMap&&(e>=r&&e<=l||o.isReset)){var b=a<r&&!o.isReset?r:e;if(o.scale=Math.pow(2,b-1),o.tileZoomLevel=b,o.previousScale!==o.scale||o.isReset){o.zoomSettings.zoomFactor=e;var v={x:o.availableSize.width/2,y:o.availableSize.height/2};if(this.getTileTranslatePosition(a,b,v,t),(o.zoomSettings.resetToInitial&&o.applyZoomReset&&"Reset"===t||"ZoomOut"===t&&o.zoomSettings.resetToInitial&&o.applyZoomReset&&b<=o.initialZoomLevel)&&(o.initialCheck=!0,o.zoomPersistence=!1,o.tileTranslatePoint.x=o.initialTileTranslate.x,o.tileTranslatePoint.y=o.initialTileTranslate.y,b=o.tileZoomLevel=o.mapScaleValue=o.initialZoomLevel),this.triggerZoomEvent(p,a,t))o.translatePoint=o.tileTranslatePoint=new tt(0,0),o.scale=o.previousScale,o.tileZoomLevel=a,o.zoomSettings.zoomFactor=o.previousScale;else{o.translatePoint.y=(o.tileTranslatePoint.y-.01*o.mapScaleValue)/o.scale,o.translatePoint.x=(o.tileTranslatePoint.x-.01*o.mapScaleValue)/o.scale,document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),this.markerLineAnimation(o),o.mapLayerPanel.generateTiles(b,o.tileTranslatePoint,t);document.getElementById(this.maps.element.id+"_tiles");var S=this.maps.layersCollection[0].animationDuration;setTimeout(function(){i.applyTransform(!0),document.getElementById(i.maps.element.id+"_LayerIndex_1")&&(document.getElementById(i.maps.element.id+"_LayerIndex_1").style.display="block")},S)}}this.maps.zoomNotApplied=!1}},e.prototype.createZoomingToolbars=function(){var e=this.maps;this.toolBarGroup=e.renderer.createGroup({id:e.element.id+"_Zooming_KitCollection",opacity:"fluentdark"===e.theme.toLowerCase()?.6:.3});var t=15,i=15,o=e.zoomSettings.toolBarOrientation,a=e.zoomSettings.toolbars,n='<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';n+='<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>',n+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var l=e.zoomSettings.toolbars.length,r="Horizontal"===e.zoomSettings.toolBarOrientation?16*l+20*l:32,s="Horizontal"===e.zoomSettings.toolBarOrientation?32:16*l+20*l;this.toolBarGroup.appendChild(e.renderer.drawRectangle(new rt(e.element.id+"_Zooming_Rect","transparent",{color:"transparent",width:1},1,new ut(0,0,r,s),0,0)));var d=e.renderer.createDefs();d.innerHTML=n,this.toolBarGroup.appendChild(d);var p=e.renderer.drawRectangle(new rt(e.element.id+"_Zooming_Rect","transparent",{color:"transparent",width:1},.1,new ut(0,0,r,s),0,0));p.setAttribute("filter","url(#chart_shadow)"),this.toolBarGroup.appendChild(p);for(var h=0;h<a.length;h++){var c=a[h];this.currentToolbarEle=e.renderer.createGroup({id:e.element.id+"_Zooming_ToolBar_"+c+"_Group",transform:"translate( "+t+" "+i+" ) "}),this.currentToolbarEle.setAttribute("class","e-maps-toolbar");var m="transparent",u="";switch(this.selectionColor=this.maps.zoomSettings.selectionColor||this.maps.themeStyle.zoomSelectionColor,c.toLowerCase()){case"zoom":var g=void 0,y=void 0;u="M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,",u+="5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571",u+="L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,",this.maps.zoomSettings.enablePanning&&!this.maps.zoomSettings.enableSelectionZooming?(g=m,y=this.maps.themeStyle.zoomFillColor):this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(g=m,y=this.maps.themeStyle.zoomFillColor):this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming?(g=this.selectionColor,y=this.selectionColor):(g=m,y=this.maps.themeStyle.zoomFillColor),this.currentToolbarEle.appendChild(e.renderer.drawPath(new nt(e.element.id+"_Zooming_ToolBar_"+c,g,1,y,1,1,null,u+"4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"))),this.zoomElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomin":u="M 8, 0 L 8, 16 M 0, 8 L 16, 8",this.currentToolbarEle.appendChild(e.renderer.drawPath(new nt(e.element.id+"_Zooming_ToolBar_"+c+"_Path",m,3,this.maps.themeStyle.zoomFillColor,1,1,null,u))),this.zoomInElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomout":u="M 0, 8 L 16, 8",this.currentToolbarEle.appendChild(e.renderer.drawPath(new nt(e.element.id+"_Zooming_ToolBar_"+c,m,3,this.maps.themeStyle.zoomFillColor,1,1,null,u))),this.zoomOutElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"pan":var f=void 0;u="M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,",u+="11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z",this.maps.zoomSettings.enablePanning&&this.maps.zoomModule.isDragZoom?f="#737373":this.maps.zoomSettings.enablePanning?f=this.selectionColor:(f="#737373",this.currentToolbarEle.setAttribute("class","")),this.currentToolbarEle.appendChild(e.renderer.drawPath(new nt(e.element.id+"_Zooming_ToolBar_"+c,f,1,f,1,1,null,u))),this.panColor=f,this.panElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"reset":u="M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,",u+="1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,",u+="13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,",this.currentToolbarEle.appendChild(e.renderer.drawPath(new nt(e.element.id+"_Zooming_ToolBar_"+c,this.fillColor,null,this.maps.themeStyle.zoomFillColor,1,1,null,u+"3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z"))),this.wireEvents(this.currentToolbarEle,this.performToolBarAction)}this.currentToolbarEle.appendChild(e.renderer.drawCircle(new st(e.element.id+"_Zooming_ToolBar_"+c+"_Rect",m,{color:this.maps.themeStyle.zoomFillColor,width:1},1,8,8,16,""))),t="Horizontal"===o?t+36:t,i="Horizontal"===o?i:i+36,this.toolBarGroup.appendChild(this.currentToolbarEle)}},e.prototype.performToolBarAction=function(e){var t=e.target;e.stopImmediatePropagation();var i="touch"===e.pointerType||"2"===e.pointerType||e.type.indexOf("touch")>-1,o=t.id.split("_Zooming_ToolBar_")[1].split("_")[0];i?(this.handled=!0,this.performZoomingByToolBar(o)):"mousedown"!==e.type&&"pointerdown"!==e.type||this.handled?this.handled=!1:(this.handled=!1,this.performZoomingByToolBar(o))},e.prototype.performZoomingByToolBar=function(e){var t=this.maps;switch(t.isReset=!1,e.toLowerCase()){case"zoom":this.panColor=this.fillColor,this.zoomColor=this.selectionColor,this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.fillColor);break;case"pan":this.maps.zoomSettings.enablePanning?this.panColor=this.selectionColor:this.panColor="#737373",this.zoomColor=this.fillColor,this.maps.zoomSettings.enablePanning?(this.applySelection(this.zoomElements,this.fillColor),this.applySelection(this.panElements,this.panColor)):(this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.panColor));break;case"zoomin":t.staticMapZoom=t.tileZoomLevel,t.staticMapZoom>0&&t.staticMapZoom<22&&(t.staticMapZoom+=1),this.toolBarZooming((t.isTileMap?t.tileZoomLevel:t.scale)+1,"ZoomIn");break;case"zoomout":t.staticMapZoom=t.tileZoomLevel,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.toolBarZooming((t.isTileMap?t.tileZoomLevel:t.scale)-1,"ZoomOut");break;case"reset":t.staticMapZoom=t.zoomSettings.enable?t.zoomSettings.zoomFactor:0,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.toolBarZooming(1,"Reset"),this.maps.zoomSettings.enablePanning?(this.applySelection(this.zoomElements,this.fillColor),this.applySelection(this.panElements,this.selectionColor)):(this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,"#737373"))}this.panningStyle(e.toLowerCase())},e.prototype.panningStyle=function(e){var t=ue(this.maps.element.id+"_svg");"pan"===e||this.isPanning?t.setAttribute("class","e-maps-panning"):t.setAttribute("class","")},e.prototype.applySelection=function(e,t){if(e)for(var i,o=0;o<e.childElementCount;o++)"circle"!==(i=e.childNodes[o]).tagName&&(i.setAttribute("fill",t),i.setAttribute("stroke",t))},e.prototype.showTooltip=function(e){var t=e.target.id.split("_Zooming_ToolBar_")[1].split("_")[0];this.isTouch||ke("EJ2_Map_Toolbar_Tip",this.maps.getLocalizedLabel(t),e.pageY+10,e.pageX+10,"10px")},e.prototype.removeTooltip=function(){ue("EJ2_Map_Toolbar_Tip")&&t.remove(ue("EJ2_Map_Toolbar_Tip"))},e.prototype.alignToolBar=function(){var e=this.maps,i=t.createElement("div",{id:e.element.id+"_ToolBar",styles:"position:absolute;z-index:2"}),o=e.renderer.createSvg({id:e.element.id+"_Zooming_ToolBar",width:10,height:10});o.appendChild(this.toolBarGroup),i.appendChild(o),ue(e.element.id+"_Secondary_Element")&&ue(e.element.id+"_Secondary_Element").appendChild(i);var a=this.toolBarGroup.getBoundingClientRect();o.setAttribute("height",(a.height+5).toString()),o.setAttribute("width",(a.width+5).toString());var n=t.isNullOrUndefined(e.totalRect)?e.mapAreaRect:e.totalRect,l=0,r=0;switch(e.zoomSettings.verticalAlignment){case"Near":r=n.y;break;case"Center":r=n.height/2-a.height/2;break;case"Far":r=n.height-a.height-10}switch(e.zoomSettings.horizontalAlignment){case"Near":l=n.x;break;case"Center":l=n.width/2-a.width/2;break;case"Far":l=t.isNullOrUndefined(e.legendModule)||"Left"!==e.legendSettings.position?n.width-a.width-10:n.width+n.x-a.width-10}var s=e.getExtraPosition();i.style.left=l+s.x+"px",i.style.top=r+s.y+"px";var d=this.maps.zoomSettings.highlightColor||this.maps.themeStyle.zoomSelectionColor,p=" .e-maps-toolbar:hover > circle { stroke:"+d+"; } .e-maps-toolbar:hover > path { fill: "+d+" ; stroke: "+d+"; }.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } .e-maps-popup-close { display: block; opacity: 0; }",h=document.createElement("style");h.appendChild(document.createTextNode(p)),i.appendChild(h)},e.prototype.wireEvents=function(e,i){t.EventHandler.add(e,t.Browser.touchStartEvent,i,this),t.EventHandler.add(e,"mouseover",this.showTooltip,this),t.EventHandler.add(e,"mouseout",this.removeTooltip,this)},e.prototype.mapMouseWheel=function(e){if(this.maps.zoomSettings.enable&&this.maps.zoomSettings.mouseWheelZoom){var t=this.maps;t.availableSize;t.markerZoomedState=!1,t.zoomPersistence=t.enablePersistence;var i=this.getMousePosition(e.pageX,e.pageY),o=t.tileZoomLevel,a=t.scale,n=t.isTileMap?o:a;if(i.x>t.mapAreaRect.x&&i.x<t.mapAreaRect.x+t.mapAreaRect.width&&i.y>t.mapAreaRect.y&&i.y<t.mapAreaRect.y+t.mapAreaRect.height){e.preventDefault();var l="mozilla"!==this.browserName||this.isPointer?e.wheelDelta/120>0?"ZoomIn":"ZoomOut":-e.detail/3>0?"ZoomIn":"ZoomOut";"ZoomIn"===l?(t.mapScaleValue=n+1,t.staticMapZoom=t.tileZoomLevel,t.staticMapZoom>0&&t.staticMapZoom<22&&(t.staticMapZoom+=1),this.performZooming(i,n+1,l)):(t.mapScaleValue=n-1,t.isReset=t.mapScaleValue<1,t.staticMapZoom=t.tileZoomLevel,1===t.mapScaleValue&&(t.markerCenterLatitude=null,t.markerCenterLongitude=null),t.staticMapZoom>1&&t.staticMapZoom<22&&(t.staticMapZoom-=1),this.performZooming(i,n-1,l))}}},e.prototype.doubleClick=function(e){var t=e.pageX,i=e.pageY;e.target;if(this.maps.zoomSettings.enable&&this.maps.zoomSettings.doubleClickZoom&&!(e.target.id.indexOf("_Zooming_")>-1)){var o=this.getMousePosition(t,i),a=this.maps,n=(a.availableSize,a.tileZoomLevel),l=a.scale;a.mapScaleValue=a.mapScaleValue+1;var r=a.isTileMap?n:l;o.x>a.mapAreaRect.x&&o.x<a.mapAreaRect.x+a.mapAreaRect.width&&o.y>a.mapAreaRect.y&&o.y<a.mapAreaRect.y+a.mapAreaRect.height&&this.performZooming(o,r+1,"ZoomIn")}},e.prototype.mouseDownHandler=function(e){var t,i,o=null;e.target;"touchstart"===e.type?(this.isTouch=!0,o=e.touches,e.target,t=o[0].clientX,i=o[0].clientY):(t=e.pageX,i=e.pageY,e.target),this.maps.zoomSettings.enablePanning?this.isPanning=this.panColor===this.selectionColor?this.maps.zoomSettings.enablePanning:this.zoomColor!==this.selectionColor:this.isPanning=this.panColor!==this.selectionColor?this.maps.zoomSettings.enablePanning:this.zoomColor===this.selectionColor,this.mouseDownLatLong={x:t,y:i},this.rectZoomingStart=!this.isPanning&&this.maps.zoomSettings.enable,this.mouseDownPoints=this.getMousePosition(t,i),this.isTouch&&(this.firstMove=!0,this.pinchFactor=this.maps.scale,this.fingers=o.length),this.isSingleClick=!0},e.prototype.mouseMoveHandler=function(e){var i,o,a,n=this.maps,l=null,r=this.maps.zoomSettings;"touchmove"===e.type?(this.isTouch=!0,a=e.target,i=(l=e.touches)[0].clientX,o=l[0].clientY):(i=e.pageX,o=e.pageY,a=e.target),ue(n.element.id+"_Zooming_KitCollection")&&(a.id.indexOf("_Zooming_")>-1?(ue(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"),document.getElementById(n.element.id+"_Zooming_ToolBar_Pan_Group")&&(this.maps.zoomSettings.enablePanning||(a.id.indexOf("_Zooming_ToolBar")>-1||a.id.indexOf("_Zooming_Rect")>-1)&&(ue(n.element.id+"_Zooming_ToolBar_Pan_Rect").setAttribute("opacity","fluentdark"===n.theme.toLowerCase()?"0.6":"0.3"),ue(n.element.id+"_Zooming_ToolBar_Pan").setAttribute("opacity","fluentdark"===n.theme.toLowerCase()?"0.6":"0.3")))):(ue(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","fluentdark"===n.theme.toLowerCase()?"0.6":"0.3"),!this.maps.zoomSettings.enablePanning&&document.getElementById(n.element.id+"_Zooming_ToolBar_Pan_Group")&&(ue(n.element.id+"_Zooming_ToolBar_Pan_Rect").setAttribute("opacity","1"),ue(n.element.id+"_Zooming_ToolBar_Pan").setAttribute("opacity","1")))),this.isTouch&&this.maps.zoomSettings.pinchZooming&&(this.firstMove&&2===l.length?(this.rectZoomingStart=!1,this.updateInteraction(),this.touchStartList=je(e)):2===l.length&&2===this.touchStartList.length&&(this.touchMoveList=je(e),e.preventDefault(),this.rectZoomingStart=!1,this.performPinchZooming(e)),this.firstMove=!1),this.mouseMovePoints=this.getMousePosition(i,o);e.target.id,e.target;r.enable&&this.isPanning&&(t.Browser.isDevice&&l.length>=1||!t.Browser.isDevice)&&(e.preventDefault(),this.maps.element.style.cursor="pointer",this.mouseMoveLatLong={x:i,y:o},this.mouseDownLatLong.x!==this.mouseMoveLatLong.x&&this.mouseDownLatLong.y!==this.mouseMoveLatLong.y&&(this.maps.zoomSettings.enablePanning&&this.panning("None",null,null,e),this.mouseDownLatLong.x=i,this.mouseDownLatLong.y=o)),(this.isTouch?1===l.length&&this.rectZoomingStart:this.rectZoomingStart)&&(e.preventDefault(),this.maps.zoomSettings.enableSelectionZooming&&this.drawZoomRectangle())},e.prototype.mouseUpHandler=function(e){this.maps;this.rectZoomingStart=!1,this.isPanning=!1,this.isSingleClick=!!this.isSingleClick,this.isTouch=!1,this.touchStartList=[],this.touchMoveList=[],this.lastScale=1,this.maps.element.style.cursor="auto",t.isNullOrUndefined(this.distanceX)&&t.isNullOrUndefined(this.distanceY)||t.isNullOrUndefined(this.currentLayer)||"SubLayer"!==this.currentLayer.type||(this.toAlignSublayer(),this.distanceX=this.distanceY=null);var i=ue(this.maps.element.id+"_Selection_Rect_Zooming");i&&this.maps.zoomSettings.enable&&this.maps.zoomSettings.enableSelectionZooming&&(t.remove(i),this.performRectZooming()),this.mouseMoveLatLong={x:0,y:0},this.mouseDownLatLong={x:0,y:0}},e.prototype.mouseCancelHandler=function(e){this.isPanning=!1,this.isTouch=!1,this.rectZoomingStart=!1;var i=ue(this.maps.element.id+"_Selection_Rect_Zooming");i&&this.maps.zoomSettings.enable&&(t.remove(i),this.performRectZooming())},e.prototype.click=function(e){var t=this.maps;if(t.markerModule&&t.markerModule.sameMarkerData.length>0||e.target.id.indexOf("MarkerIndex")>-1&&-1===e.target.id.indexOf("cluster"))return null;if(this.isSingleClick&&t.zoomSettings.zoomOnClick&&!(e.target.id.indexOf("_Zooming_")>-1)&&!t.zoomSettings.doubleClickZoom&&this.zoomColor!==this.selectionColor){var i=e.pageX,o=e.pageY,a=this.getMousePosition(i,o),n=t.tileZoomLevel,l=t.scale;t.mapScaleValue=t.mapScaleValue+1;var r=t.isTileMap?n:l;a.x>t.mapAreaRect.x&&a.x<t.mapAreaRect.x+t.mapAreaRect.width&&a.y>t.mapAreaRect.y&&a.y<t.mapAreaRect.y+t.mapAreaRect.height&&this.performZooming(a,r+1,"ZoomIn")}},e.prototype.getMousePosition=function(e,t){var i=this.maps,o=i.element.getBoundingClientRect(),a=i.element.ownerDocument.defaultView.pageXOffset,n=i.element.ownerDocument.defaultView.pageYOffset,l=i.element.ownerDocument.documentElement.clientTop,r=i.element.ownerDocument.documentElement.clientLeft,s=o.left+a-r,d=o.top+n-l;return new tt(Math.abs(e-s),Math.abs(t-d))},e.prototype.addEventListener=function(){this.maps.isDestroyed||(t.EventHandler.add(this.maps.element,this.wheelEvent,this.mapMouseWheel,this),t.EventHandler.add(this.maps.element,"click",this.click,this),t.EventHandler.add(this.maps.element,"dblclick",this.doubleClick,this),this.maps.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.maps.on(t.Browser.touchStartEvent,this.mouseDownHandler,this),this.maps.on(t.Browser.touchEndEvent,this.mouseUpHandler,this),t.EventHandler.add(this.maps.element,this.cancelEvent,this.mouseCancelHandler,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(t.EventHandler.remove(this.maps.element,this.wheelEvent,this.mapMouseWheel),t.EventHandler.remove(this.maps.element,"click",this.click),t.EventHandler.remove(this.maps.element,"dblclick",this.doubleClick),this.maps.off(t.Browser.touchMoveEvent,this.mouseMoveHandler),this.maps.off(t.Browser.touchStartEvent,this.mouseDownHandler),this.maps.off(t.Browser.touchEndEvent,this.mouseUpHandler),this.maps.off(this.cancelEvent,this.mouseCancelHandler))},e.prototype.getModuleName=function(){return"Zoom"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),_i=function(){function e(e){this.control=e}return e.prototype.print=function(e){var i=this;this.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWindow.moveTo(0,0),this.printWindow.resizeTo(screen.availWidth,screen.availHeight);var o={cancel:!1,htmlContent:this.getHTMLContent(e),name:"beforePrint"};this.control.trigger("beforePrint",o,function(e){o.cancel||t.print(o.htmlContent,i.printWindow)})},e.prototype.getHTMLContent=function(e){ge(this.control.element.id);var i=t.createElement("div"),o=this.control.element.cloneNode(!0);if(this.control.isTileMap)for(var a=0;a<o.childElementCount;a++)if(o.children[a].id===this.control.element.id+"_tile_parent"){o.children[a].style.removeProperty("height"),o.children[a].style.removeProperty("width"),o.children[a].style.removeProperty("top"),o.children[a].style.removeProperty("left"),o.children[a].style.removeProperty("right"),o.children[a].style.removeProperty("overflow");var n=document.getElementById(this.control.element.id+"_Tile_SVG_Parent");o.children[a].children[0].style.overflow="hidden",o.children[a].children[0].style.position="absolute",o.children[a].children[0].style.height=n.style.height,o.children[a].children[0].style.width=n.style.width,o.children[a].children[0].style.left=n.style.left,o.children[a].children[0].style.top=n.style.top;break}return e?e instanceof Array?Array.prototype.forEach.call(e,function(e){i.appendChild(be(e).cloneNode(!0))}):e instanceof Element?i.appendChild(e.cloneNode(!0)):i.appendChild(be(e).cloneNode(!0)):i.appendChild(o),i},e.prototype.getModuleName=function(){return"Print"},e.prototype.destroy=function(e){},e}(),Li=function(){function e(e){this.control=e}return e.prototype.export=function(e,i,o){var a=this;return new Promise(function(n,l){var r,s,d=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:a.control.availableSize.width.toString(),height:a.control.availableSize.height.toString()}}),p=!(t.Browser.userAgent.toString().indexOf("HeadlessChrome")>-1),h=(document.getElementById(a.control.element.id+"_ToolBar"),document.getElementById(a.control.element.id+"_Tile_SVG_Parent")),c=ue(a.control.element.id+"_svg").cloneNode(!0);a.control.isTileMap?(s=ue(a.control.element.id+"_Tile_SVG").cloneNode(!0),r='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+c.outerHTML+s.outerHTML+"</svg>"):r='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+a.control.svgObject.outerHTML+"</svg>";var m=window.URL.createObjectURL(new Blob("SVG"===e?[r]:[(new XMLSerializer).serializeToString(c)],{type:"image/svg+xml"}));if("SVG"===e)o?S(i,e,m,p):n(null);else{var u=new Image,g=d.getContext("2d");if(a.control.isTileMap)for(var y=document.getElementById(a.control.element.id+"_MapAreaBorder"),f=parseFloat(y.getAttribute("y")),b=parseFloat(y.getAttribute("x")),v=new XMLHttpRequest,x=a.control.mapLayerPanel.tiles.length,O=0;O<=x+1;O++)!function(l){var r=document.getElementById(a.control.element.id+"_tile_"+(l-1)),c=new Image;c.crossOrigin="Anonymous",g.fillStyle=a.control.background?a.control.background:"#FFFFFF",g.fillRect(0,0,a.control.availableSize.width,a.control.availableSize.height),g.font=a.control.titleSettings.textStyle.size+" Arial";var u=document.getElementById(a.control.element.id+"_Map_title");t.isNullOrUndefined(u)||(g.fillStyle=u.getAttribute("fill"),g.fillText(a.control.titleSettings.text,parseFloat(u.getAttribute("x")),parseFloat(u.getAttribute("y")))),c.onload=function(){if(0===l||l===x+1)0===l?(g.setTransform(1,0,0,1,0,0),g.rect(0,f,parseFloat(h.style.width),parseFloat(h.style.height)),g.clip()):g.setTransform(1,0,0,1,b,f);else{document.getElementById(a.control.element.id+"_tile_parent");g.setTransform(1,0,0,1,parseFloat(r.style.left)+b,parseFloat(r.style.top)+f)}if(g.drawImage(c,0,0),l===x+1){localStorage.setItem("local-canvasImage",d.toDataURL("image/png"));var t=localStorage.getItem("local-canvasImage");o?(S(i,e,t,p),localStorage.removeItem("local-canvasImage")):"PNG"===e?n(t):"JPEG"===e&&n(d.toDataURL("image/jpeg"))}},0===l||l===x+1?0===l?c.src=m:setTimeout(function(){c.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(s)],{type:"image/svg+xml"}))},300):(v.open("GET",r.children[0].getAttribute("src"),!0),v.send(),c.src=r.children[0].getAttribute("src"))}(O);else u.onload=function(){g.drawImage(u,0,0),window.URL.revokeObjectURL(m),o?S(i,e,d.toDataURL("image/png").replace("image/png","image/octet-stream"),p):"PNG"===e?n(d.toDataURL("image/png")):"JPEG"===e&&n(d.toDataURL("image/jpeg"))},u.src=m}})},e.prototype.getModuleName=function(){return"ImageExport"},e.prototype.destroy=function(e){},e}(),Ci=function(){function e(e){this.control=e}return e.prototype.export=function(e,i,o,n){var l=this;return new Promise(function(r,s){var d=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:l.control.availableSize.width.toString(),height:l.control.availableSize.height.toString()}});n=t.isNullOrUndefined(n)?a.PdfPageOrientation.Landscape:n;var p=document.getElementById(l.control.element.id+"_Tile_SVG_Parent"),h=l.control.svgObject.cloneNode(!0),c=h.childNodes[0].getAttribute("fill");"Tailwind"!==l.control.theme&&"TailwindDark"!==l.control.theme&&"Bootstrap5"!==l.control.theme&&"Bootstrap5Dark"!==l.control.theme&&"Fluent"!==l.control.theme&&"FluentDark"!==l.control.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c||h.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)");var m=window.URL.createObjectURL(new Blob("SVG"===e?[void 0]:[(new XMLSerializer).serializeToString(h)],{type:"image/svg+xml"})),u=new a.PdfDocument,g=new Image,y=d.getContext("2d");if(l.control.isTileMap)for(var f=document.getElementById(l.control.element.id+"_MapAreaBorder"),b=parseFloat(f.getAttribute("y")),v=parseFloat(f.getAttribute("x")),S=new XMLHttpRequest,x=l.control.mapLayerPanel.tiles.length,O=0;O<=x+1;O++)!function(s){var h=document.getElementById(l.control.element.id+"_tile_"+(s-1)),c=new Image;c.crossOrigin="Anonymous",y.fillStyle=l.control.background?l.control.background:"#FFFFFF",y.fillRect(0,0,l.control.availableSize.width,l.control.availableSize.height),y.font=l.control.titleSettings.textStyle.size+" Arial";var g=document.getElementById(l.control.element.id+"_Map_title");t.isNullOrUndefined(g)||(y.fillStyle=g.getAttribute("fill"),y.fillText(l.control.titleSettings.text,parseFloat(g.getAttribute("x")),parseFloat(g.getAttribute("y")))),c.onload=function(){if(0===s||s===x+1)0===s?(y.setTransform(1,0,0,1,0,0),y.rect(0,b,parseFloat(p.style.width),parseFloat(p.style.height)),y.clip()):y.setTransform(1,0,0,1,v,b);else{document.getElementById(l.control.element.id+"_tile_parent");y.setTransform(1,0,0,1,parseFloat(h.style.left)+v,parseFloat(h.style.top)+b)}if(y.drawImage(c,0,0),s===x+1&&"PDF"===e){localStorage.setItem("saved-image-example",d.toDataURL("image/jpeg"));var t=localStorage.getItem("saved-image-example");u.pageSettings.orientation=n,t=t.slice(t.indexOf(",")+1),u.pages.add().graphics.drawImage(new a.PdfBitmap(t),0,0,l.control.availableSize.width-60,l.control.availableSize.height),o?(u.save(i+".pdf"),u.destroy()):r(null)}},0===s||s===x+1?0===s?c.src=m:setTimeout(function(){var e=document.getElementById(l.control.element.id+"_Tile_SVG");c.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(e)],{type:"image/svg+xml"}))},300):(S.open("GET",h.children[0].getAttribute("src"),!0),S.send(),c.src=h.children[0].getAttribute("src"))}(O);else g.onload=function(){if(y.drawImage(g,0,0),window.URL.revokeObjectURL(m),"PDF"===e){var t=d.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");u.pageSettings.orientation=n,t=t.slice(t.indexOf(",")+1),u.pages.add().graphics.drawImage(new a.PdfBitmap(t),0,0,l.control.availableSize.width-60,l.control.availableSize.height),o?(u.save(i+".pdf"),u.destroy()):r(null)}},g.src=m})},e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.destroy=function(e){},e}();return gi.Inject(yi,vi,$t,Si,xi,Oi,Mi,fi,bi,ci,_i,Ci,Li),e.Maps=gi,e.load="load",e.loaded="loaded",e.click=ei,e.rightClick="rightClick",e.doubleClick="doubleClick",e.resize="resize",e.tooltipRender="tooltipRender",e.shapeSelected="shapeSelected",e.shapeHighlight="shapeHighlight",e.mousemove="mousemove",e.mouseup="mouseup",e.mousedown="mousedown",e.layerRendering="layerRendering",e.shapeRendering="shapeRendering",e.markerRendering=ti,e.markerClusterRendering=ii,e.markerClick=oi,e.markerClusterClick=ai,e.markerMouseMove=ni,e.markerClusterMouseMove=li,e.dataLabelRendering="dataLabelRendering",e.bubbleRendering="bubbleRendering",e.bubbleClick="bubbleClick",e.bubbleMouseMove="bubbleMouseMove",e.animationComplete=ri,e.legendRendering="legendRendering",e.annotationRendering="annotationRendering",e.itemSelection=si,e.itemHighlight="itemHighlight",e.beforePrint="beforePrint",e.zoomIn="zoomIn",e.zoomOut="zoomOut",e.pan="pan",e.Annotation=Mt,e.Arrow=_t,e.Font=Lt,e.Border=Ct,e.CenterPosition=wt,e.TooltipSettings=Pt,e.Margin=It,e.ConnectorLineSettings=Tt,e.MarkerClusterSettings=Nt,e.MarkerClusterData=kt,e.ColorMappingSettings=Ft,e.InitialMarkerSelectionSettings=Et,e.InitialShapeSelectionSettings=At,e.SelectionSettings=zt,e.HighlightSettings=Bt,e.NavigationLineSettings=jt,e.BubbleSettings=Ut,e.CommonTitleSettings=Rt,e.SubTitleSettings=Dt,e.TitleSettings=Zt,e.ZoomSettings=Vt,e.ToggleLegendSettings=Ht,e.LegendSettings=Gt,e.DataLabelSettings=Wt,e.ShapeSettings=qt,e.MarkerBase=Xt,e.MarkerSettings=Yt,e.LayerSettings=Jt,e.Tile=Qt,e.MapsAreaSettings=Kt,e.Size=et,e.stringToNumber=n,e.calculateSize=l,e.createSvg=r,e.getMousePosition=s,e.degreesToRadians=d,e.radiansToDegrees=p,e.convertGeoToPoint=h,e.convertTileLatLongToPoint=c,e.xToCoordinate=m,e.yToCoordinate=u,e.aitoff=g,e.roundTo=y,e.sinci=f,e.acos=b,e.calculateBound=v,e.triggerDownload=S,e.Point=tt,e.MinMax=it,e.GeoLocation=ot,e.measureText=x,e.TextOption=at,e.PathOption=nt,e.ColorValue=lt,e.RectOption=rt,e.CircleOption=st,e.PolygonOption=dt,e.PolylineOption=pt,e.LineOption=ht,e.Line=ct,e.MapLocation=mt,e.Rect=ut,e.PatternOptions=gt,e.renderTextElement=O,e.convertElement=M,e.formatValue=_,e.convertStringToValue=L,e.convertElementFromLabel=C,e.drawSymbols=w,e.getValueFromObject=P,e.markerColorChoose=I,e.markerShapeChoose=T,e.clusterTemplate=N,e.mergeSeparateCluster=k,e.clusterSeparate=F,e.marker=E,e.markerTemplate=A,e.maintainSelection=z,e.maintainStyleClass=B,e.appendShape=j,e.drawCircle=U,e.drawRectangle=R,e.drawPath=D,e.drawPolygon=Z,e.drawPolyline=V,e.drawLine=H,e.calculateShapes=G,e.drawDiamond=W,e.drawTriangle=q,e.drawCross=X,e.drawHorizontalLine=Y,e.drawVerticalLine=J,e.drawStar=Q,e.drawBalloon=K,e.drawPattern=$,e.getFieldData=ee,e.checkShapeDataFields=te,e.checkPropertyPath=ie,e.filter=oe,e.getRatioOfBubble=ae,e.findMidPointOfPolygon=ne,e.isCustomPath=le,e.textTrim=re,e.findPosition=se,e.removeElement=de,e.calculateCenterFromPixel=pe,e.getTranslate=he,e.getZoomTranslate=ce,e.fixInitialScaleForTile=me,e.getElementByID=ue,e.getClientElement=ge,e.Internalize=ye,e.getTemplateFunction=fe,e.getElement=be,e.getShapeData=ve,e.triggerShapeEvent=Se,e.getElementsByClassName=xe,e.querySelector=Oe,e.getTargetElement=Me,e.createStyle=_e,e.customizeStyle=Le,e.triggerItemSelectionEvent=Ce,e.removeClass=we,e.elementAnimate=Pe,e.timeout=Ie,e.showTooltip=Te,e.wordWrap=Ne,e.createTooltip=ke,e.drawSymbol=Fe,e.renderLegendShape=Ee,e.getElementOffset=Ae,e.changeBorderWidth=ze,e.changeNavaigationLineWidth=Be,e.targetTouches=je,e.calculateScale=Ue,e.getDistance=Re,e.getTouches=De,e.getTouchCenter=Ze,e.sum=Ve,e.zoomAnimate=He,e.animate=Ge,e.MapAjax=yt,e.smoothTranslate=We,e.compareZoomFactor=qe,e.calculateZoomLevel=Xe,e.processResult=Ye,e.LayerPanel=hi,e.Bubble=yi,e.BingMap=di,e.Marker=$t,e.ColorMapping=pi,e.DataLabel=fi,e.NavigationLine=bi,e.Legend=vi,e.Highlight=Si,e.Selection=xi,e.MapsTooltip=Oi,e.Zoom=Mi,e.Annotations=ci,e.Print=_i,e.ImageExport=Li,e.PdfExport=Ci,e}({},ej.base,ej.svgbase,ej.data,ej.pdfexport),this.ejs=ej;
|
|
10
|
+
this.ej=this.ej||{},this.ej.maps=function(e,t,i,a,o){"use strict";function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function l(e){e.element.style.height=t.isNullOrUndefined(e.height)?"auto":e.height,e.element.style.width=t.isNullOrUndefined(e.width)?"auto":e.width;var i=e.element.clientWidth,a=e.element.clientHeight,o=n(e.element.style.width,i),l=n(e.element.style.height,a);new et(0,0);return"0px"===e.width||"0%"===e.width||"0%"===e.height||"0px"===e.height?new et(0,0):new et(n(e.width,i)||i||o||600,n(e.height,a)||a||l||(e.isDevice?Math.min(window.innerWidth,window.innerHeight):450))}function r(e){e.renderer=new i.SvgRenderer(e.element.id),e.availableSize=l(e),e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height}),"0px"!==e.width&&"0%"!==e.width&&"0%"!==e.height&&"0px"!==e.height||(e.svgObject.setAttribute("height","0"),e.svgObject.setAttribute("width","0"))}function s(e,t,i){var a=i.getBoundingClientRect(),o=i.ownerDocument.defaultView.pageXOffset,n=i.ownerDocument.defaultView.pageYOffset,l=i.ownerDocument.documentElement.clientTop,r=i.ownerDocument.documentElement.clientLeft,s=a.left+o-r,d=a.top+n-l;return new mt(e-s,t-d)}function d(e){return e*(Math.PI/180)}function p(e){return e*(180/Math.PI)}function h(e,i,a,o,n){var l,r,s,h,c,f,b=new et(n.mapAreaRect.width,n.mapAreaRect.height),S=n.baseMapBounds.longitude,x=n.baseMapBounds.latitude,O=d(e),M=d(i),_=n.projectionType,L=n.isTileMap?256*Math.pow(2,1):t.isNullOrUndefined(a)?Math.min(b.width,b.height):Math.min(b.width,b.height)*a;if("Normal"===o.geometryType)l=t.isNullOrUndefined(a)?i:Math.abs((i-S.min)*a),r=t.isNullOrUndefined(a)?e:Math.abs((x.max-e)*a);else if("Geographic"===o.geometryType){switch(_){case"Mercator":var C=new tt(L/2,L/2);l=C.x+i*(L/360);var w=v(Math.sin(d(e)),-.9999,.9999);r=C.y+.5*Math.log((1+w)/(1-w))*(-L/(2*Math.PI));break;case"Winkel3":c=((s=g(M,O)).x+M/(Math.PI/2))/2,h=(s.y+O)/2;break;case"Miller":c=M,h=1.25*Math.log(Math.tan(Math.PI/4+.4*O));break;case"Eckert3":c=2/(f=Math.sqrt(Math.PI*(4+Math.PI)))*M*(1+Math.sqrt(1-4*O*O/(Math.PI*Math.PI))),h=4/f*O;break;case"AitOff":c=(s=g(M,O)).x,h=s.y;break;case"Eckert5":c=M*(1+Math.cos(O))/Math.sqrt(2+Math.PI),h=2*O/Math.sqrt(2+Math.PI);break;case"Equirectangular":c=M,h=O;break;case"Eckert6":f=(1+Math.PI/2)*Math.sin(O);for(var P=1/0,I=0;I<10&&Math.abs(P)>1e-6;I++)O-=P=(O+Math.sin(O)-f)/(1+Math.cos(O));f=Math.sqrt(2+Math.PI),c=M*(1+Math.cos(O))/f,h=2*O/f}l="Mercator"===_?l:y(m(n,p(c)),3),r="Mercator"===_?r:-y(u(n,p(h)),3)}return new tt(l,r)}function c(e,t,i,a){var o=256*Math.pow(2,t),n=(e.x+180)/360,l=Math.sin(e.y*Math.PI/180),r=.5-Math.log((1+l)/(1-l))/(4*Math.PI),s=e.x,d=e.y;return a&&(s=n*o+.5+i.x,d=r*o+.5+i.y),{x:s,y:d}}function m(e,i){var a=e.baseMapBounds.longitude,o=t.isNullOrUndefined(e.baseSize)?e.mapAreaRect.width:e.mapAreaRect.width+Math.abs(e.baseSize.width-e.mapAreaRect.width)/2;return Math.round(o*(i-a.min)/(a.max-a.min)*100)/100}function u(e,t){var i=e.baseMapBounds.latitude;return Math.round(e.mapAreaRect.height*(t-i.min)/(i.max-i.min)*100)/100}function g(e,t){var i=Math.cos(t),a=f(b(i*Math.cos(e/=2)));return new tt(2*i*Math.sin(e)*a,Math.sin(t)*a)}function y(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function f(e){return e/Math.sin(e)}function b(e){return Math.acos(e)}function v(e,i,a){return t.isNullOrUndefined(i)||(e=Math.max(e,i)),t.isNullOrUndefined(a)||(e=Math.min(e,a)),e}function S(e,i,a,o){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:a}}).dispatchEvent(new MouseEvent(o?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function x(e,i){var a=document.getElementById("mapsmeasuretext");return null===a&&(a=t.createElement("text",{id:"mapsmeasuretext"}),document.body.appendChild(a)),a.innerHTML=e,a.style.position="absolute","number"==typeof i.size?a.style.fontSize=i.size+"px":a.style.fontSize=i.size,a.style.fontWeight=i.fontWeight,a.style.fontStyle=i.fontStyle,a.style.fontFamily=i.fontFamily,a.style.visibility="hidden",a.style.top="-100",a.style.left="0",a.style.whiteSpace="nowrap",a.style.lineHeight="normal",new et(a.clientWidth,a.clientHeight)}function O(e,t,a,o,n){void 0===n&&(n=!1);var l,r,s={id:e.id,x:e.x,y:e.y,fill:a,"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine},d="string"==typeof e.text||"number"==typeof e.text?e.text:n?e.text[e.text.length-1]:e.text[0],p=new i.SvgRenderer(""),h=p.createText(s,d);if(h.style["user-select"]="none",h.style["font-family"]=t.fontFamily,h.style["font-size"]=t.size,h.style["font-weight"]=t.fontWeight,h.style["font-color"]=t.color,h.style["-moz-user-select"]="none",h.style["-webkit-touch-callout"]="none",h.style["-webkit-user-select"]="none",h.style["-khtml-user-select"]="none",h.style["-ms-user-select"]="none",h.style["-o-user-select"]="none","string"!=typeof e.text&&e.text.length>1)for(var c=1,m=e.text.length;c<m;c++)r=x(e.text[c],t).height,l=p.createTSpan({x:e.x,id:e.id,y:e.y+(n?-c*r:c*r)},n?e.text[e.text.length-(c+1)]:e.text[c]),h.appendChild(l);return o.appendChild(h),h}function M(e,i,a,o,n){for(var l=t.createElement("div",{id:i,styles:"position: absolute;pointer-events: auto;"}),r=e.length;r>0;)l.appendChild(e[0]),r--;for(var s=l.innerHTML,d=Object.keys(a),p=0;p<d.length;p++)"object"==typeof a[d[p]]?s=L(s,"",a,n):"latitude"!==d[p].toLowerCase()&&"longitude"!==d[p].toLowerCase()&&(s=s.replace(new RegExp("{{:"+d[p]+"}}","g"),a[d[p].toString()]));return l.innerHTML=s,l}function _(e,t){return t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e}function L(e,t,i,a){for(var o=""===e?t:e,n=""===e?o.split("${"):o.split("{{:"),l=0;l<n.length;l++)if(n[l].indexOf("}}")>-1&&n[l].indexOf(".")>-1||n[l].indexOf("}")>-1&&n[l].search(".")>-1)for(var r=""===e?n[l].split("}"):n[l].split("}}"),s=0;s<r.length;s++)if(r[s].indexOf(".")>-1){var d=P(i,r[s]).toString();o=""===e?o.split("${"+r[s]+"}").join(_(d,a)):o.replace(new RegExp("{{:"+r[s]+"}}","g"),d)}return o}function C(e,i,a,o,n){for(var l=(t.isNullOrUndefined(e.childElementCount)?e[0]:e).outerHTML,r=Object.keys(a),s=0;s<r.length;s++)l=l.replace(new RegExp("{{:"+r[s]+"}}","g"),a[r[s].toString()]);return t.createElement("div",{id:i,innerHTML:l,styles:"position: absolute"})}function w(e,i,a,o,n,l,r){var s,d,p,h,c=n.size,m=n.borderColor,u=parseFloat(n.borderWidth),g=parseFloat(n.borderOpacity),y=n.fill,f=n.dashArray,b={color:m,width:u,opacity:g},v=n.opacity,S=new nt(o,y,u,m,v,g,f,"");if(c.width="string"==typeof c.width?parseInt(c.width,10):c.width,c.height="string"==typeof c.height?parseInt(c.height,10):c.height,"Circle"===e){var x=(c.width+c.height)/4,O=new st(o,y,b,v,a.x,a.y,x,f);s=r.renderer.drawCircle(O)}else"Rectangle"===e?(d=a.x-c.width/2,p=a.y-c.height/2,h=new rt(o,y,b,v,new ut(d,p,c.width,c.height),null,null,"",f),s=r.renderer.drawRectangle(h)):"Image"===e?(d=a.x-c.width/2,p=a.y-c.height,t.merge(S,{href:i,height:c.height,width:c.width,x:d,y:p}),s=r.renderer.drawImage(S)):s=G(r,e,S,c,a,l);return s}function P(e,i){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i)){var a=i.replace(/\[/g,".").replace(/\]/g,"").split(".");if(1===a.length)e=e[a[0]];else for(var o=0;o<a.length&&!t.isNullOrUndefined(e);o++)e=e[a[o]]}return e}function I(e,i){var a=t.isNullOrUndefined(e.colorValuePath)?i[e.colorValuePath]:e.colorValuePath.indexOf(".")>-1?P(i,e.colorValuePath).toString():i[e.colorValuePath];return e.fill=t.isNullOrUndefined(e.colorValuePath)||t.isNullOrUndefined(a)?e.fill:e.colorValuePath.indexOf(".")>-1?P(i,e.colorValuePath).toString():i[e.colorValuePath],e}function T(e,i){if(t.isNullOrUndefined(e.shapeValuePath)||t.isNullOrUndefined(i[e.shapeValuePath])){var a=t.isNullOrUndefined(e.shapeValuePath)?e.shape:e.shapeValuePath.indexOf(".")>-1?P(i,e.shapeValuePath).toString():e.shape;e.shape=""!==a.toString()?a:e.shape;var o=t.isNullOrUndefined(e.imageUrlValuePath)?e.imageUrl:e.imageUrlValuePath.indexOf(".")>-1?P(i,e.imageUrlValuePath).toString():t.isNullOrUndefined(i[e.imageUrlValuePath])?e.imageUrl:i[e.imageUrlValuePath];e.imageUrl=o}else{var n=e.shapeValuePath.indexOf(".")>-1?P(i,e.shapeValuePath).toString():i[e.shapeValuePath];e.shape=""!==n.toString()?n:e.shape,"Image"===i[e.shapeValuePath]&&(e.imageUrl=t.isNullOrUndefined(e.imageUrlValuePath)?e.imageUrl:e.imageUrlValuePath.indexOf(".")>-1?P(i,e.imageUrlValuePath).toString():t.isNullOrUndefined(i[e.imageUrlValuePath])?e.imageUrl:i[e.imageUrlValuePath])}return e}function N(e,i,a,o,n,l,r,s){var d,p,m,u,g,y,f,b=[],v=[],S=0,x=0,M=e.markerClusterSettings.labelStyle,_=0,L=[],C=e.markerClusterSettings,I=a.renderer.createGroup({id:a.element.id+"_LayerIndex_"+o+"_markerCluster"}),T={cancel:!1,name:ii,fill:C.fill,height:C.height,width:C.width,imageUrl:C.imageUrl,shape:C.shape,data:void 0,maps:a,cluster:C,border:C.border};a.trigger("markerClusterRendering",T,function(C){for(W=0;W<i.childElementCount;W++)if(L=[],"hidden"!==i.childNodes[W].style.visibility){if(f=i.childNodes[W],d=f.getBoundingClientRect(),L.push(W),!t.isNullOrUndefined(d)){for(q=W+1;q<i.childElementCount;q++)"hidden"!==i.childNodes[q].style.visibility&&(f=i.childNodes[q],p=f.getBoundingClientRect(),t.isNullOrUndefined(p)||d.left>p.right||d.right<p.left||d.top>p.bottom||d.bottom<p.top||(b.push(p),i.childNodes[q].style.visibility="hidden",L.push(q)));if(S=d.left+d.width/2,x=d.top+d.height,b.length>0){L=L.filter(function(e,t,i){return i.indexOf(e)===t});var N=a.element.getBoundingClientRect();S-=N.left,x-=a.availableSize.height<=N.height?N.top:N.bottom-N.top;var k=a.isTileMap?new Object:he(a,e,!1),F=a.isTileMap?{x:0,y:0}:0!==a.translatePoint.x?a.translatePoint:k.location,E=parseInt(i.childNodes[W].id.split("_dataIndex_")[1].split("_")[0],10),A=parseInt(i.childNodes[W].id.split("_MarkerIndex_")[1].split("_")[0],10),z=e.markerSettings[A],B=z.dataSource[E],j=void 0,U=t.isNullOrUndefined(z.longitudeValuePath)?t.isNullOrUndefined(B.longitude)?t.isNullOrUndefined(B.Latitude)?0:parseFloat(B.Latitude):parseFloat(B.longitude):Number(P(B,z.longitudeValuePath)),R=t.isNullOrUndefined(z.latitudeValuePath)?t.isNullOrUndefined(B.latitude)?t.isNullOrUndefined(B.Latitude)?0:parseFloat(B.Latitude):parseFloat(B.latitude):Number(P(B,z.latitudeValuePath));a.isTileMap?a.isTileMap&&!a.zoomSettings.enable&&(j=c(new tt(U,R),a.tileZoomLevel,a.tileTranslatePoint,!0)):j=h(R,U,a.mapLayerPanel.calculateFactor(e),e,a),i.childNodes[W].style.visibility="hidden";var D=e.markerClusterSettings;T.cancel?((y={size:new et(D.width,D.height),fill:D.fill,borderColor:D.border.color,borderWidth:D.border.width,opacity:D.opacity,dashArray:D.dashArray}).fill=D.fill,y.size.width=D.width,y.size.height=D.height,y.imageUrl=D.imageUrl,y.shape=D.shape,y.borderColor=D.border.color,y.borderWidth=D.border.width,y.borderOpacity=t.isNullOrUndefined(D.border.opacity)?D.opacity:D.border.opacity):((y={size:new et(D.width,D.height),fill:D.fill,borderColor:D.border.color,borderWidth:D.border.width,opacity:D.opacity,dashArray:D.dashArray}).fill=T.fill,y.size.width=T.width,y.size.height=T.height,y.imageUrl=T.imageUrl,y.shape=T.shape,y.borderColor=T.border.color,y.borderWidth=T.border.width,y.borderOpacity=t.isNullOrUndefined(T.border.opacity)?D.opacity:T.border.opacity),S=a.isTileMap?S:i.id.indexOf("_Markers_Group")>-1?S:(j.x+F.x+T.width)*a.mapScaleValue,x=a.isTileMap?x:i.id.indexOf("_Markers_Group")>-1?x:(j.y+F.y+T.height/2)*a.mapScaleValue,a.isTileMap&&!a.zoomSettings.enable&&(S=j.x,x=j.y);var Z=a.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+A+"_dataIndex_"+E+"_cluster_"+_,V=a.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+A+"_dataIndex_"+E+"_cluster_"+_+"_datalabel_"+_;_++;var H="Image"===y.shape?y.size.height/2:0,G=w(y.shape,y.imageUrl,{x:0,y:H},Z,y,n,a);G.setAttribute("transform","translate( "+S+" "+x+" )"),"Balloon"===T.shape?G.children[0].innerHTML=L.toString():G.innerHTML=L.toString(),m=new ot(V,0,3.75,"middle",(b.length+1).toString(),"",""),(u=O(m,M,M.color,n)).setAttribute("transform","translate( "+S+" "+x+" )"),I.appendChild(u),I.appendChild(G)}}b=[]}l.appendChild(I),a.svgObject.appendChild(l),a.element.appendChild(a.svgObject);for(var W=0;W<I.childElementCount;W++)if("hidden"!==I.childNodes[W].style.visibility&&(f=I.childNodes[W],d=f.getBoundingClientRect(),!(t.isNullOrUndefined(d)||f.id.indexOf("_datalabel_")>-1))){for(var q=W+1;q<I.childElementCount;q++)"hidden"!==I.childNodes[q].style.visibility&&(g=I.childNodes[q],p=g.getBoundingClientRect(),t.isNullOrUndefined(p)||g.id.indexOf("_datalabel_")>-1||d.left>p.right||d.right<p.left||d.top>p.bottom||d.bottom<p.top||(v.push(g),v.push(I.childNodes[q-1]),I.childNodes[q].style.visibility="hidden",I.childNodes[q-1].style.visibility="hidden",L.push(q)));if(v.length>0){f=I.childNodes[W];for(var X=0;X<v.length;X++)"g"===f.tagName?f.childNodes[0].textContent=f.childNodes[0].textContent+","+v[X].textContent:f.textContent=f.textContent+","+v[X].textContent,I.childNodes[W-1].textContent=(+I.childNodes[W-1].textContent+ +v[X+1].textContent).toString(),X++}v=[]}for(;0<I.childNodes.length;)n.insertBefore(I.childNodes[0],n.firstChild);r?l.appendChild(n):(ue(a.element.id+"_Secondary_Element").appendChild(n),l.appendChild(n));var Y=document.getElementById(a.element.id+"_LayerIndex_0_markerCluster");t.isNullOrUndefined(Y)||Y.remove(),s&&document.getElementById(a.element.id+"_Layer_Collections").appendChild(l)})}function k(e,t,i){var a=e[0].layerIndex,o=e[0].targetClusterIndex,n=e[0].markerIndex,l=e[0].dataIndex,r=t.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+n,s=r+"_dataIndex_"+l+"_cluster_"+o,d=be(s),p=be(s+"_datalabel_"+o);d.setAttribute("visibility","visible"),p.setAttribute("visibility","visible");for(var h=e[0].data.length,c=0;c<h;c++)be(r+"_dataIndex_"+e[0].data[c].index).style.visibility="hidden";de(t.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+n+"_markerClusterConnectorLine")}function F(e,t,i,a){var o=e[0].layerIndex,n=e[0].markerIndex,l=e[0].targetClusterIndex,r=e[0].dataIndex,s=a?be:i.querySelector.bind(i),d=a?"":"#",p=t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+n,h=p+"_dataIndex_"+r+"_cluster_"+l,c=s(d+""+h),m=s(d+""+h+"_datalabel_"+l);c.setAttribute("visibility","hidden"),m.setAttribute("visibility","hidden");var u=t.layers[o].markerSettings[n],g=s(d+""+p+"_dataIndex_"+r),y=g.parentElement.id.indexOf("Template_Group")>-1?g.getBoundingClientRect().height:u.height,f=g.parentElement.id.indexOf("Template_Group")>-1?g.getBoundingClientRect().width:u.width,b=+c.getAttribute("transform").split("translate(")[1].trim().split(" ")[0],v=+c.getAttribute("transform").split("translate(")[1].trim().split(" ")[1].split(")")[0].trim(),S=f+5,x=6.28*S,O=0,M=Math.round(x/f);O+=M;for(var _=e[0].data.length,L=Math.round(y/x*100),C=(L=_<M?100/_:L)/100*360,w=_<M?45:0,P=1,I="M "+b+" "+v+" ",T="",N=0;N<_;N++){if(O===N||Math.round(w)>=360){for(w=0,x=6.28*(S=(f+5)*++P),M=Math.round(x/y),L=Math.round(y/x*100);L*M<100;)M++;C=L/100*360,O+=M}var k=b+S*Math.sin(2*Math.PI*w/360),F=v+S*Math.cos(2*Math.PI*w/360);T+=I+"L "+k+" "+F+" ",(g=s(d+""+p+"_dataIndex_"+e[0].data[N].index)).parentElement.id.indexOf("Template_Group")>-1?(g.style.transform="",g.style.left=t.isTileMap?k-f/2+"px":k-f/2-10+"px",g.style.top=t.isTileMap?F-y/2+"px":F-y/2-10+"px",g.setAttribute("transform","translate( "+k+" "+F+")")):g.setAttribute("transform","translate( "+k+" "+F+")"),g.style.visibility="visible",w+=C}var E=t.layers[o].markerClusterSettings.connectorLineSettings,A={d:T,id:t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+n+"_dataIndex_"+r+"_markerClusterConnectorLine",stroke:E.color,"fill-opacity":E.opacity,"stroke-opacity":E.opacity,"stroke-width":E.width};i=a?s(t.element.id+"_Markers_Group"):i;var z=t.renderer.createGroup({id:t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+n+"_markerClusterConnectorLine"});z.appendChild(t.renderer.drawPath(A)),i.insertBefore(z,i.querySelector("#"+p+"_dataIndex_0"))}function E(e,i,a,o,n,l,r,s,d,p,h){var c={size:new et(e.width,e.height),fill:e.fill,borderColor:e.border.color,borderWidth:e.border.width,opacity:i.opacity,dashArray:i.dashArray,borderOpacity:t.isNullOrUndefined(e.border.opacity)?i.opacity:e.border.opacity},m=w(e.shape,e.imageUrl,{x:0,y:0},r,c,h,p),u=(p.isTileMap?n.x:(n.x+l.x)*d)+s.x,g=(p.isTileMap?n.y:(n.y+l.y)*d)+s.y;m.setAttribute("transform","translate( "+u+" "+g+" )"),z(p.selectedMarkerElementId,p.markerSelectionClass,m,"MarkerselectionMapStyle"),h.appendChild(m);var y=a.length-1===o?"marker":null,f=new tt(u,g);return i.animationDuration>0&&Pe(m,i.animationDelay,i.animationDuration,f,p,y),h}function A(e,t,i,a,o,n,l,r,s,d,p){if((t=fe(e.template,p))&&t(a,p,e.template,p.element.id+"_MarkerTemplate"+o,!1).length){for(var h=M(t(a,p,e.template,p.element.id+"_MarkerTemplate"+o,!1),i,a,o,p),c=0;c<h.children.length;c++)h.children[c].style.pointerEvents="none";if(h.style.left=(p.isTileMap?l.x:(l.x+r.x)*s)+d.x-p.mapAreaRect.x+"px",h.style.top=(p.isTileMap?l.y:(l.y+r.y)*s)+d.y-p.mapAreaRect.y+"px",n.appendChild(h),"GoogleStaticMap"===p.layers[p.baseLayerIndex].layerType){var m=ue(p.element.id+"_StaticGoogleMap").getBoundingClientRect(),u=h.getBoundingClientRect();(m.x>u.x||m.x+640<u.x+u.width)&&(m.y>u.y||m.y+m.height<u.y+u.height)&&(h.style.display="none")}}return n}function z(e,i,a,o){if(e)for(var n=0;n<e.length;n++)a.getAttribute("id")===e[n]&&(0!==n&&"g"!==a.tagName||(t.isNullOrUndefined(i)||t.isNullOrUndefined(i.id)||document.body.appendChild(i),a.id.indexOf("_MarkerIndex_")>-1&&a.childElementCount>0&&a.children[0].setAttribute("class",o)),a.setAttribute("class",o))}function B(e,i,a,o,n,l,r){if(!be(e)){var s=t.createElement("style",{id:e,innerHTML:"."+i+"{fill:"+a+";opacity:"+o+";stroke-width:"+l+";stroke:"+n+";}"});r.shapeSelectionClass=s,document.body.appendChild(s)}}function j(e,t){return t&&t.appendChild(e),e}function U(e,t,i){return j(e.renderer.drawCircle(t),i)}function R(e,t,i){return j(e.renderer.drawRectangle(t),i)}function D(e,t,i){return j(e.renderer.drawPath(t),i)}function Z(e,t,i){return j(e.renderer.drawPolygon(t),i)}function V(e,t,i){return j(e.renderer.drawPolyline(t),i)}function H(e,t,i){return j(e.renderer.drawLine(t),i)}function G(e,t,i,a,o,n){var l;switch(t){case"Balloon":l=K(e,i,a,o,"Marker",n);break;case"Cross":i.d="M "+o.x+" "+(o.y-a.height/2)+" L "+o.x+" "+(o.y+a.height/2)+" M "+(o.x-a.width/2)+" "+o.y+" L "+(o.x+a.width/2)+" "+o.y;break;case"Diamond":i.d="M "+o.x+" "+(o.y-a.height/2)+" L "+(o.x+a.width/2)+" "+o.y+" L "+o.x+" "+(o.y+a.height/2)+" L "+(o.x-a.width/2)+" "+o.y+" Z";break;case"Star":i.d="M "+(o.x+a.width/3)+" "+(o.y-a.height/2)+" L "+(o.x-a.width/2)+" "+(o.y+a.height/6)+" L "+(o.x+a.width/2)+" "+(o.y+a.height/6)+" L "+(o.x-a.width/3)+" "+(o.y-a.height/2)+" L "+o.x+" "+(o.y+a.height/2)+" L "+(o.x+a.width/3)+" "+(o.y-a.height/2)+" Z";break;case"Triangle":i.d="M "+o.x+" "+(o.y-a.height/2)+" L "+(o.x+a.width/2)+" "+(o.y+a.height/2)+" L "+(o.x-a.width/2)+" "+(o.y+a.height/2)+" Z";break;case"HorizontalLine":i.d=" M "+(o.x-a.width/2)+" "+o.y+" L "+(o.x+a.width/2)+" "+o.y;break;case"VerticalLine":i.d="M "+o.x+" "+(o.y-a.height/2)+" L "+o.x+" "+(o.y+a.height/2);break;case"InvertedTriangle":i.d="M "+(o.x-a.width/2)+" "+(o.y-a.height/2)+" L "+(o.x+a.width/2)+" "+(o.y-a.height/2)+" L "+o.x+" "+(o.y+a.height/2)+" Z";break;case"Pentagon":for(var r=void 0,s=void 0,d=0;d<5;d++)r=a.width/2*Math.cos(Math.PI/180*(72*d)),s=a.height/2*Math.sin(Math.PI/180*(72*d)),i.d+=(0===d?"M ":"L ")+(o.x+r)+" "+(o.y+s);i.d+=" Z"}return"Cross"!==t&&"HorizontalLine"!==t&&"VerticalLine"!==t||(i.stroke="transparent"===i.stroke?i.fill:i.stroke),"Balloon"===t?l:e.renderer.drawPath(i)}function W(e,t,i,a,o){return t.d="M "+a.x+" "+(a.y-i.height/2)+" L "+(a.x+i.width/2)+" "+a.y+" L "+a.x+" "+(a.y+i.height/2)+" L "+(a.x-i.width/2)+" "+a.y+" Z",j(e.renderer.drawPath(t),o)}function q(e,t,i,a,o){return t.d="M "+a.x+" "+(a.y-i.height/2)+" L "+(a.x+i.width/2)+" "+(a.y+i.height/2)+" L "+(a.x-i.width/2)+" "+(a.y+i.height/2)+" Z",j(e.renderer.drawPath(t),o)}function X(e,t,i,a,o){return t.d="M "+a.x+" "+(a.y-i.height/2)+" L "+a.x+" "+(a.y+i.height/2)+" M "+(a.x-i.width/2)+" "+a.y+" L "+(a.x+i.width/2)+" "+a.y,j(e.renderer.drawPath(t),o)}function Y(e,t,i,a,o){return t.d=" M "+(a.x-i.width/2)+" "+a.y+" L "+(a.x+i.width/2)+" "+a.y,j(e.renderer.drawPath(t),o)}function J(e,t,i,a,o){return t.d="M "+a.x+" "+(a.y-i.height/2)+" L "+a.x+" "+(a.y+i.height/2),j(e.renderer.drawPath(t),o)}function Q(e,t,i,a,o){return t.d="M "+(a.x+i.width/3)+" "+(a.y-i.height/2)+" L "+(a.x-i.width/2)+" "+(a.y+i.height/6)+" L "+(a.x+i.width/2)+" "+(a.y+i.height/6)+" L "+(a.x-i.width/3)+" "+(a.y-i.height/2)+" L "+a.x+" "+(a.y+i.height/2)+" L "+(a.x+i.width/3)+" "+(a.y-i.height/2)+" Z",j(e.renderer.drawPath(t),o)}function K(e,t,i,a,o,n){var l,r=i.width,s=i.height;a.x-=r/2,a.y-=s,t.d="M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S17.8,16,15,16z";var d=e.renderer.drawPath(t),p=i.width/30,h=i.height/30;if(d.setAttribute("transform","translate("+a.x+", "+a.y+") scale("+p+", "+h+")"),"Marker"===o){var c=e.renderer.createGroup({id:t.id});j(d,c),l=j(c,n)}else l=d;return l}function $(e,t,i,a){for(var o=e.renderer.createPattern(t,"pattern"),n=0,l=i;n<l.length;n++)j(l[n],o);return j(o,a)}function ee(e,t){for(var i,a=[],o=0,n=e;o<n.length;o++){var l=n[o];i={};for(var r=0,s=t;r<s.length;r++){var d=s[r];l[d]&&(i[d]=l[d])}a.push(i)}return a}function te(e,i,a,o,n){if(!t.isNullOrUndefined(i))for(var l=0;l<e.length;l++){var r=a.indexOf(".")>-1?P(e[l],a):e[l][a],s=ie(r,o,i);if((!t.isNullOrUndefined(r)&&isNaN(i[s])?r.toLowerCase():r)===(!t.isNullOrUndefined(i[s])&&isNaN(i[s])?i[s].toLowerCase():i[s]))return l}return null}function ie(e,i,a){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(a)&&!t.isNullOrUndefined(i))for(var o="[object Array]"===Object.prototype.toString.call(i)?i:[i],n=0;n<o.length;n++)if((t.isNullOrUndefined(e)?e:e.toLowerCase())===(!t.isNullOrUndefined(a[o[n]])&&isNaN(a[o[n]])?a[o[n]].toLowerCase():a[o[n]]))return o[n];return null}function ae(e,t,i){for(var a=[],o=0;o<e.length;o++){var n=e[o];t<=n.y&&i>=n.y&&a.push(n)}return a}function oe(e,t,i,a,o){var n=(t-e)/100*(100/(o-a)*(i-a))+e;return o===a&&(n=(t-e)/100+e),n}function ne(e,t,i){if(!e.length)return null;for(var a,o,n,l,r=e.length,s=0,d=0,p=0,h=0;h<=r-1;h++)a=e[h].x,o="Mercator"===t||"Normal"===i?e[h].y:-e[h].y,h===r-1?(n=e[0].x,l="Mercator"===t||"Normal"===i?e[0].y:-e[0].y):(n=e[h+1].x,l="Mercator"===t||"Normal"===i?e[h+1].y:-e[h+1].y),s+=Math.abs(a*l-n*o),d+=Math.abs((a+n)*(a*l-n*o)),p+=Math.abs((o+l)*(a*l-n*o));d*=1/(4*(s*=.5)),p*=1/(4*s);for(var c={x:0,y:0},m={x:0,y:0},u={x:0,y:0},g={x:0,y:0},y={x:0,y:0},f={x:0,y:0},b={x:0,y:0},v={x:0,y:0},S=0,h=0;h<=r-1;h++){var x=e[h];x.y="Mercator"===t||"Normal"===i?x.y:-x.y,x.y>p?x.x<d&&d-x.x<d-y.x?y={x:x.x,y:x.y}:x.x>d&&(0===f.x||x.x-d<f.x-d)&&(f={x:x.x,y:x.y}):x.x<d&&d-x.x<d-b.x?b={x:x.x,y:x.y}:x.x>d&&(0===v.x||x.x-d<v.x-d)&&(v={x:x.x,y:x.y}),S=f.y-v.y+(f.y-v.y)/4,x.x>d?x.y<p&&p-x.y<p-c.y?c={x:x.x,y:x.y}:x.y>p&&(0===m.y||x.y-p<m.y-p)&&(m={x:x.x,y:x.y}):x.y<p&&p-x.y<p-u.y?u={x:x.x,y:x.y}:x.y>p&&(0===g.y||x.y-p<g.y-p)&&(g={x:x.x,y:x.y})}return{x:d,y:p,rightMin:c,rightMax:m,leftMin:u,leftMax:g,points:e,topMax:v,topMin:b,bottomMax:f,bottomMin:y,height:S}}function le(e){var i=!1;return"[object Array]"===Object.prototype.toString.call(e)&&Array.prototype.forEach.call(e,function(e,a){t.isNullOrUndefined(e.geometry)||"Path"!==e.geometry.type||(i=!0)}),i}function re(e,t,i){var a=t,o=x(t,i).width;if(o>e)for(var n=t.length-1;n>=0;--n)if(a=t.substring(0,n)+"...",(o=x(a,i).width)<=e||a.length<4)return a.length<4&&(a=" "),a;return a}function se(e,t,i,a){var o;switch(t){case"Near":o=e.x;break;case"Center":o="title"===a?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":o="title"===a?e.width-e.y-i.width:e.x+e.width-i.width}var n="title"===a?e.y+i.height/2:e.y+e.height/2+i.height/2;return new tt(o,n)}function de(e){var i=document.getElementById(e);return i?t.remove(i):null}function pe(e,t){var i=h(e.minLatOfGivenLocation,e.minLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),a=h(e.maxLatOfGivenLocation,e.maxLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),o=(i.x+a.x)/2,n=(i.y+a.y)/2;return new tt(o,n)}function he(e,i,a){var o,n=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!t.isNullOrUndefined(e.centerLatOfGivenLocation)&&!t.isNullOrUndefined(e.centerLongOfGivenLocation)&&e.zoomNotApplied;t.isNullOrUndefined(e.mapScaleValue)&&(e.mapScaleValue=n),e.zoomSettings.shouldZoomInitially&&e.zoomSettings.enable&&(e.mapScaleValue=o=n=(e.zoomSettings.shouldZoomInitially||e.enablePersistence)&&1===e.scale?e.scale:t.isNullOrUndefined(e.markerZoomFactor)?1:e.markerZoomFactor,e.mapScaleValue===e.markerZoomFactor||e.enablePersistence||(e.mapScaleValue=n=e.markerZoomFactor),t.isNullOrUndefined(e.markerCenterLatitude)||t.isNullOrUndefined(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=o=n=e.scaleOfGivenLocation);var p=t.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.min,c=t.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.max,m=a?1:e.mapScaleValue;t.isNullOrUndefined(e.currentShapeDataLength)&&(e.currentShapeDataLength=t.isNullOrUndefined(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length);var u,g,y=e.totalRect&&e.legendSettings.visible?e.totalRect:e.mapAreaRect,f=e.availableSize;if(!t.isNullOrUndefined(p)&&!t.isNullOrUndefined(c)){var b=Math.abs(c.x-p.x),v=Math.abs(p.y-c.y),S=a?1:1===e.markerZoomFactor?e.mapScaleValue:n;if(l=e.zoomSettings.shouldZoomInitially&&e.markerZoomedState&&!e.zoomPersistence?e.markerZoomCenterPoint:e.centerPosition,!t.isNullOrUndefined(s)&&!t.isNullOrUndefined(r)||d){var x=((b+Math.abs(e.mapAreaRect.width-b))/2+e.mapAreaRect.x)/S,O=((v+Math.abs(e.mapAreaRect.height-v))/2+e.mapAreaRect.y)/S,M=d?pe(e,i):h(r,s,e.mapLayerPanel.calculateFactor(i),i,e);t.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType?(u=-M.x+x,g=-M.y+O,o=m):(1!==Math.floor(e.scale)&&e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-M.x+x,g=-M.y+O):e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-M.x+x,g=-M.y+O,o=m):(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y),o=e.mapScaleValue)}else if(t.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType){0!==v&&0!==b&&v!==b||(b=y.width/2,v=y.height),b*=o=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),v*=o;var _=0!==p.x&&"layers"===e.translateType?f.width-y.width:0;u=y.x+(-p.x+(y.width/2-b/2))-_,g=y.y+(-p.y+(y.height/2-v/2)),e.previousTranslate=new tt(u,g)}else if(e.zoomSettings.shouldZoomInitially||1!==e.markerZoomFactor||1!==e.mapScaleValue)if(o=e.mapScaleValue<1?e.mapScaleValue+1:e.mapScaleValue,e.mapScaleValue=e.zoomSettings.enable&&1!==e.mapScaleValue?e.mapScaleValue:1,e.currentShapeDataLength!==(t.isNullOrUndefined(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length)&&"SubLayer"!==i.type){var L=parseFloat(Math.min(y.height/v,y.width/b).toFixed(2));v*=L,b*=L,g=y.y+(-p.y+(y.height/2-v/2)),o=L,u=y.x+(-p.x+(y.width/2-b/2))}else if(e.availableSize.height!==e.heightBeforeRefresh||e.widthBeforeRefresh!==e.availableSize.width){var C=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),w=b;w*=C;var P=v;P*=C;var I=y.x+(-p.x+(y.width/2-w/2)),T=y.y+(-p.y+(y.height/2-P/2)),N=(e.translatePoint.x-e.previousTranslate.x)/e.widthBeforeRefresh,k=(e.translatePoint.y-e.previousTranslate.y)/e.heightBeforeRefresh;u=I+N*e.availableSize.width,g=T+k*e.availableSize.height,e.previousTranslate=new tt(I,T),e.zoomTranslatePoint.x=u,e.zoomTranslatePoint.y=g}else t.isNullOrUndefined(e.previousProjection)||!(1===e.mapScaleValue||e.mapScaleValue<=1.05)||e.zoomModule.isDragZoom?(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y,o=e.scale):(b*=o=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),u=y.x+(-p.x+(y.width/2-b/2)),v*=o,g=y.y+(-p.y+(y.height/2-v/2)));else v*=o=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),b*=o,g=y.y+(-p.y+(y.height/2-v/2)),u=y.x+(-p.x+(y.width/2-b/2));t.isNullOrUndefined(e.translatePoint)||(u=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:u,g=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:g)}return o=e.enablePersistence?e.mapScaleValue>=1?e.mapScaleValue:1:o,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:o,location:new tt(u,g)}}function ce(e,i,a){var o,n=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!t.isNullOrUndefined(e.centerLongOfGivenLocation)&&!t.isNullOrUndefined(e.centerLatOfGivenLocation)&&e.zoomNotApplied;t.isNullOrUndefined(e.previousCenterLatitude)&&t.isNullOrUndefined(e.previousCenterLongitude)?(e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.previousCenterLatitude!==e.centerPosition.latitude&&e.previousCenterLongitude!==e.centerPosition.longitude?(e.centerPositionChanged=!0,e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.centerPositionChanged=!1,(t.isNullOrUndefined(e.mapScaleValue)||n>e.mapScaleValue)&&(e.isReset&&1===e.mapScaleValue?e.mapScaleValue=e.mapScaleValue:e.mapScaleValue=n),e.mapScaleValue=1!==e.zoomSettings.zoomFactor&&e.zoomSettings.zoomFactor===e.mapScaleValue?e.zoomSettings.zoomFactor:e.zoomSettings.zoomFactor===e.mapScaleValue||e.centerPositionChanged?e.zoomSettings.zoomFactor:e.mapScaleValue,e.zoomSettings.shouldZoomInitially&&(e.mapScaleValue=n=o=(e.enablePersistence||e.zoomSettings.shouldZoomInitially)&&1===e.scale?e.scale:t.isNullOrUndefined(e.markerZoomFactor)?e.mapScaleValue:e.markerZoomFactor,n=e.mapScaleValue,t.isNullOrUndefined(e.markerCenterLatitude)||t.isNullOrUndefined(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=o=n=e.scaleOfGivenLocation);var p,c,m=a?1:e.mapScaleValue,u=e.mapAreaRect,g=e.baseMapRectBounds.min,y=e.baseMapRectBounds.max,f=a?1:e.mapScaleValue,b=Math.abs(y.x-g.x),v=Math.abs(g.y-y.y);if(!t.isNullOrUndefined(s)&&!t.isNullOrUndefined(r)||d){var S=(v+Math.abs(e.mapAreaRect.height-v))/2/f,x=(b+Math.abs(e.mapAreaRect.width-b))/2/f,O=d?pe(e,i):h(r,s,e.mapLayerPanel.calculateFactor(i),i,e);t.isNullOrUndefined(e.zoomTranslatePoint)&&t.isNullOrUndefined(e.previousProjection)||e.zoomNotApplied?(p=-O.x+x+e.mapAreaRect.x/m,c=-O.y+S+e.mapAreaRect.y/m):e.previousProjection!==e.projectionType?(p=-O.x+x,c=-O.y+S):(p=e.zoomTranslatePoint.x,c=e.zoomTranslatePoint.y,n=m),t.isNullOrUndefined(e.translatePoint)||(c=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:c,p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:p),o=0!==n?n:1}else{var M=0===e.zoomSettings.zoomFactor?1:e.zoomSettings.zoomFactor,_=e.zoomSettings.maxZoom;o=M=M>_?_:M;var L=0===e.mapScaleValue?1:e.mapScaleValue>_?_:e.mapScaleValue,x=u.x+(-g.x+(u.width/2-b/2)),S=u.y+(-g.y+(u.height/2-v/2));if(!t.isNullOrUndefined(e.zoomTranslatePoint)||!t.isNullOrUndefined(e.previousProjection))if(e.previousProjection!==e.projectionType){var C=[],w={x:x,y:S};C.push(w);for(var P=1;P<_;P++)w={x:C[P-1].x-(u.width/P-u.width/(P+1))/2,y:C[P-1].y-(u.height/P-u.height/(P+1))/2},C.push(w);x=C[M-1].x,S=C[M-1].y}else x=e.zoomTranslatePoint.x,S=e.zoomTranslatePoint.y,M!==L&&(o=L);t.isNullOrUndefined(e.translatePoint)||(p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:x,c=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:S)}return o=e.enablePersistence?0===e.mapScaleValue?1:e.mapScaleValue:o,{scale:a?1:o,location:new tt(p,c)}}function me(e){e.tileZoomScale=e.tileZoomLevel=Math.floor(e.availableSize.height/512)+1;var t="GoogleStaticMap"!==e.layers[e.baseLayerIndex].layerType?20:0,i=256*Math.pow(2,e.tileZoomLevel);e.tileTranslatePoint.x=e.availableSize.width/2-i/2,e.tileTranslatePoint.y=e.availableSize.height/2-i/2+t,e.previousTileWidth=e.availableSize.width,e.previousTileHeight=e.availableSize.height}function ue(e){return document.getElementById(e)}function ge(e){var i=document.getElementById(e);return t.isNullOrUndefined(i)?null:i.getClientRects()[0]}function ye(e,t){return e.formatFunction=e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator}),e.formatFunction(t)}function fe(e,i){var a=null;try{document.querySelectorAll(e).length?a=t.compile(document.querySelector(e).innerHTML.trim()):(i.isVue||i.isVue3)&&(a=t.compile(e))}catch(i){a=t.compile(e)}return a}function be(e){return document.getElementById(e)}function ve(e,t){var i,a=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),o=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),n=t.layersCollection[a],l=n.layerData[o].property;return n.dataSource&&(i=n.dataSource[te(n.dataSource,l,n.shapeDataPath,n.shapePropertyPath,n)]),{shapeData:l,data:i}}function Se(e,i,a,o){var n=ve(e,a),l={color:i.border.color,opacity:i.border.opacity,width:i.border.width},r=i.enableMultiSelect?{cancel:!1,name:o,fill:i.fill,opacity:i.opacity,border:l,shapeData:n.shapeData,data:n.data,target:e,maps:a,shapeDataCollection:a.shapeSelectionItem}:{cancel:!1,name:o,fill:i.fill,opacity:i.opacity,border:l,shapeData:n.shapeData,data:n.data,target:e,maps:a};return a.trigger(o,r,function(e){r.border.opacity=t.isNullOrUndefined(r.border.opacity)?r.opacity:r.border.opacity}),r}function xe(e){return document.getElementsByClassName(e)}function Oe(e,t){var i=null;return document.getElementById(t)&&(i=document.getElementById(t).querySelector("#"+e)),i}function Me(e,t,i,a){for(var o,n=a.layers[e].shapeData.features,l=0;l<n.length;l++)if(n[l].properties.name===t){o=a.element.id+"_LayerIndex_"+e+"_shapeIndex_"+l+"_dataIndex_undefined";break}return be(o)}function _e(e,i,a){return t.createElement("style",{id:e,innerHTML:"."+i+"{fill:"+a.fill+";fill-opacity:"+a.opacity.toString()+";stroke-opacity:"+a.border.opacity.toString()+";stroke-width:"+a.border.width.toString()+";stroke:"+a.border.color+";}"})}function Le(e,i,a){var o=be(e);t.isNullOrUndefined(o)||(o.innerHTML="."+i+"{fill:"+a.fill+";fill-opacity:"+a.opacity.toString()+";stroke-width:"+a.border.width.toString()+";stroke-opacity:"+a.border.opacity.toString()+";stroke:"+a.border.color+"}")}function Ce(e,i,a,o,n){var l={color:e.border.color,width:e.border.width/i.scale,opacity:e.border.opacity},r={opacity:e.opacity,fill:e.fill,border:l,name:si,target:a.id,cancel:!1,shapeData:o,data:n,maps:i};i.trigger("itemSelection",r,function(a){r.border.opacity=t.isNullOrUndefined(e.border.opacity)?e.opacity:e.border.opacity,i.shapeSelectionItem.push(r.shapeData),be("ShapeselectionMap")?Le("ShapeselectionMap","ShapeselectionMapStyle",r):document.body.appendChild(_e("ShapeselectionMap","ShapeselectionMapStyle",r))})}function we(e){e.removeAttribute("class")}function Pe(e,i,a,o,n,l,r){void 0===r&&(r=0);var s=o.x,d=o.y,p=0,h=e.getAttribute("transform")||"";new t.Animation({}).animate(e,{duration:a,delay:i,progress:function(i){if(i.timeStamp>i.delay){if(n.isTileMap&&0===p){var a=document.querySelector(".GroupElement");t.isNullOrUndefined(a)||(a.style.display="block")}p=(i.timeStamp-i.delay)/i.duration,e.setAttribute("transform","translate( "+(s-r*p)+" "+(d-r*p)+" ) scale("+p+")")}},end:function(t){if(e.setAttribute("transform",h),l){var i={cancel:!1,name:ri,element:l,maps:n};n.trigger(ri,i)}}})}function Ie(e){de(e)}function Te(e,i,a,o,n,l,r,d,p){var h=s(a,o,d);t.isNullOrUndefined(h)||(a=h.x,o=h.y);for(var c=document.getElementById(r),m=x(e,{fontFamily:"Segoe UI",size:"8px",fontStyle:"Normal",fontWeight:"Regular"}).width,u=e.split(" "),g=u[0].length,y=1;y<u.length;y++)g<u[y].length&&(g=u[y].length);c||(c=t.createElement("div",{id:r,styles:'background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;font-size:12px; font-family: "Segoe UI"; text-align:center'})),a<n-m?a=a:a>n-m&&a<n-8*g?m=n-a:a>=n-8*g&&(a>m?a-=m:(m=a,a=0));var f=i.split("px");Ne(c,e,a,o,f,m,n,d),c.clientHeight+2*parseInt(f[0],10)>l&&(m=a,a=0),Ne(c,e,a,o,f,m,n,d),p&&setTimeout(Ie,5e3,r)}function Ne(e,t,i,a,o,n,l,r){e.innerHTML=t,e.style.top=-1!==e.id.indexOf("_Legend")?(parseInt(o[0],10)+a).toString()+"px":(2*parseInt(o[0],10)).toString()+"px",e.style.left=i.toString()+"px",e.style.width=n.toString()+"px",e.style.maxWidth=l.toString()+"px",e.style.wordWrap="break-word",r.appendChild(e)}function ke(e,i,a,o,n){var l=be(e),r="top:"+a.toString()+"px;left:"+o.toString()+"px;color: #000000; background:#FFFFFF;z-index: 2;position:absolute;border:1px solid #707070;font-size:"+n+";border-radius:2px;";l?(l.setAttribute("innerHTML"," "+i+" "),l.setAttribute("styles",r)):(l=t.createElement("div",{id:e,innerHTML:" "+i+" ",styles:r}),document.body.appendChild(l))}function Fe(e,t,a,o,n){var l=new i.SvgRenderer(""),r=Ee(e,a,t,n,o);return l["draw"+r.functionName](r.renderOption)}function Ee(e,i,a,o,n){var l,r="Path",s=i.width,d=i.height,p=e.x,h=e.y,c=e.x+-s/2,m=e.y+-d/2;switch(o.stroke="HorizontalLine"===a||"VerticalLine"===a||"Cross"===a?o.fill:o.stroke,o["stroke-width"]=0!==o["stroke-width"]||"HorizontalLine"!==a&&"VerticalLine"!==a&&"Cross"!==a?o["stroke-width"]:1,a){case"Circle":case"Bubble":r="Ellipse",t.merge(o,{rx:s/2,ry:d/2,cx:p,cy:h});break;case"VerticalLine":l="M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),t.merge(o,{d:l});break;case"HorizontalLine":l="M "+p+" "+h+" L "+(p+s/2)+" "+h,t.merge(o,{d:l});break;case"Diamond":l="M "+c+" "+h+" L "+p+" "+(h+-d/2)+" L "+(p+s/2)+" "+h+" L "+p+" "+(h+d/2)+" L "+c+" "+h+" z",t.merge(o,{d:l});break;case"Rectangle":l="M "+c+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+d/2)+" L "+c+" "+(h+d/2)+" L "+c+" "+(h+-d/2)+" z",t.merge(o,{d:l});break;case"Triangle":l="M "+c+" "+(h+d/2)+" L "+p+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+d/2)+" L "+c+" "+(h+d/2)+" z",t.merge(o,{d:l});break;case"InvertedTriangle":l="M "+(p+s/2)+" "+(h-d/2)+" L "+p+" "+(h+d/2)+" L "+(p-s/2)+" "+(h-d/2)+" L "+(p+s/2)+" "+(h-d/2)+" z",t.merge(o,{d:l});break;case"Pentagon":for(var u=void 0,g=void 0,y=0;y<=5;y++)u=s/2*Math.cos(Math.PI/180*(72*y)),g=s/2*Math.sin(Math.PI/180*(72*y)),l=0===y?"M "+(p+u)+" "+(h+g)+" ":l.concat("L "+(p+u)+" "+(h+g)+" ");l=l.concat("Z"),t.merge(o,{d:l});break;case"Star":l="M "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" L "+(e.x-i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x+i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x-i.width/3)+" "+(e.y-i.height/2)+" L "+e.x+" "+(e.y+i.height/2)+" L "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" Z",t.merge(o,{d:l});break;case"Cross":l="M "+c+" "+h+" L "+(p+s/2)+" "+h+" M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),t.merge(o,{d:l});break;case"Image":r="Image",t.merge(o,{href:n,height:d,width:s,x:c,y:m})}return{renderOption:o,functionName:r}}function Ae(e,t){t.appendChild(e);var i=e.offsetWidth,a=e.offsetHeight;return t.removeChild(e),new et(i,a)}function ze(e,i,a,o){for(var n,l=0;l<e.childElementCount;l++)if((n=e.childNodes[l]).id.indexOf("_NavigationGroup")>-1)Be(n,i,a,o);else{var r=void 0,s=0,d=o.layersCollection[i].shapeSettings.borderWidthValuePath,p=o.layersCollection[i].shapeSettings.border.width,h=o.layersCollection[i].shapeSettings.circleRadius;r=o.layersCollection[i].shapeSettings.borderWidthValuePath&&null!==(s=te(o.layersCollection[i].dataSource,o.layersCollection[i].layerData[l].property,o.layersCollection[i].shapeDataPath,o.layersCollection[i].shapePropertyPath,o.layersCollection[i]))&&o.layersCollection[i].dataSource[s][d]?o.layersCollection[i].dataSource[s][d]:t.isNullOrUndefined(p)?0:p,n.setAttribute("stroke-width",(r/a).toString()),(e.id.indexOf("_Point")>-1||e.id.indexOf("_MultiPoint")>-1)&&n.setAttribute("r",(h/a).toString())}}function Be(e,t,i,a){for(var o,n=0;n<e.childElementCount;n++)if("path"===(o=e.childNodes[n]).tagName){var l=a.layersCollection[t].navigationLineSettings[parseFloat(o.id.split("_NavigationIndex_")[1].split("_")[0])].width;o.setAttribute("stroke-width",(l/i).toString())}}function je(e){for(var t=[],i=e.touches,a=0;a<i.length;a++)t.push({pageX:i[a].pageX,pageY:i[a].pageY});return t}function Ue(e,t){var i=Re(e[0],e[1]);return Re(t[0],t[1])/i}function Re(e,t){var i=e.pageX-t.pageX,a=e.pageY-t.pageY;return Math.sqrt(i*i+a*a)}function De(e,t){var i=t.element.getBoundingClientRect(),a=i.top+document.defaultView.pageXOffset,o=i.left+document.defaultView.pageYOffset;return Array.prototype.slice.call(e).map(function(e){return{x:e.pageX-o,y:e.pageY-a}})}function Ze(e){return{x:e.map(function(e){return e.x}).reduce(Ve)/e.length,y:e.map(function(e){return e.y}).reduce(Ve)/e.length}}function Ve(e,t){return e+t}function He(e,t,i,a,o,n,l){var r=0,s=l.previousPoint,d=l.previousScale,p=o-d,h=new mt(0,0),c=1;if(o===d)return void e.setAttribute("transform","scale( "+o+" ) translate( "+a.x+" "+a.y+" )");var m=function(e,t){return e.x===t.x?null:(t.y-e.y)/(t.x-e.x)}(s,a),u=function(e,t){return null===t?e.x:e.y-t*e.x}(s,m),g=a.x-s.x,y=a.y-s.y;Ge(e,t,i,function(e){e.timeStamp>e.delay&&(r=(e.timeStamp-e.delay)/e.duration,c=d+r*p,h.x=s.x+r*g/(c/o),h.y=null==m?s.y+r*y:m*h.x+u,e.element.setAttribute("transform","scale( "+c+" ) translate( "+h.x+" "+h.y+" )"),l.translatePoint=h,l.scale=c,l.zoomModule.processTemplate(a.x,a.y,c,l))},function(){l.translatePoint=a,l.scale=o,e.setAttribute("transform","scale( "+o+" ) translate( "+a.x+" "+a.y+" )"),l.zoomModule.processTemplate(a.x,a.y,o,l)})}function Ge(e,t,i,a,o){var n,l=this,r=null,s=function(t){r||(r=t);var d=t-r;d<i?(a.call(l,{element:e,delay:0,timeStamp:d,duration:i}),window.requestAnimationFrame(s)):(window.cancelAnimationFrame(n),o.call(l,{element:e}),e.setAttribute("style","visibility:visible"))};n=window.requestAnimationFrame(s)}function We(e,t,i,a){var o=0,n=e.getAttribute("transform").split(" ");2===n.length&&(n[2]=n[1].split(")")[0],n[1]=n[0].split("(")[1]);var l=new mt(parseInt(n[1],10),parseInt(n[2],10)),r=a.x-l.x,s=a.y-l.y,d=new mt(0,0);Ge(e,t,i,function(e){e.timeStamp>e.delay&&(o=(e.timeStamp-e.delay)/e.duration,d.x=l.x+o*r,d.y=l.y+o*s,e.element.setAttribute("transform","translate( "+d.x+" "+d.y+" )"))},function(){e.setAttribute("transform","translate( "+a.x+" "+a.y+" )")})}function qe(e,i){var a=t.isNullOrUndefined(i.shouldZoomPreviousFactor)?null:i.shouldZoomPreviousFactor,o=t.isNullOrUndefined(i.shouldZoomCurrentFactor)?null:i.shouldZoomCurrentFactor;t.isNullOrUndefined(o)?!t.isNullOrUndefined(a)&&t.isNullOrUndefined(o)&&i.shouldZoomPreviousFactor!==e?i.shouldZoomCurrentFactor=e:i.shouldZoomPreviousFactor=e:(i.shouldZoomCurrentFactor=null,i.shouldZoomPreviousFactor=null)}function Xe(e,t,i,a,o,n,l){var r,s,d=l.zoomSettings.maxZoom,p=Math.sin(t*Math.PI/180),c=Math.log((1+p)/(1-p))/2,m=Math.max(Math.min(c,Math.PI),-Math.PI)/2,u=Math.sin(e*Math.PI/180),g=Math.log((1+u)/(1-u))/2,y=Math.max(Math.min(g,Math.PI),-Math.PI)/2;if(l.zoomNotApplied&&!l.isTileMap){var f=Math.abs((l.baseMapBounds.latitude.max-l.baseMapBounds.latitude.min)/(t-e)),b=Math.abs((l.baseMapBounds.longitude.max-l.baseMapBounds.longitude.min)/(a-i));s=Math.min(f,b);h(e,i,1,l.layersCollection[0],l),h(t,a,1,l.layersCollection[0],l)}var v=(m-y)/Math.PI,S=a-i,x=(S<0?S+360:S)/360,O=Math.log(n/256/v)/Math.LN2,M=Math.log(o/256/x)/Math.LN2,_=l.zoomNotApplied&&!l.isTileMap?s:Math.min(O,M);return r=Math.min(_,d),r=l.isTileMap||!l.zoomNotApplied?Math.floor(r):r,l.isTileMap||qe(r,l),r}function Ye(e){var i,a=t.isNullOrUndefined(e.result)?e.actual:e.result;return t.isNullOrUndefined(a.length)?t.isNullOrUndefined(a.Items)||(i=a.Items):i=a,i}function Je(e){var t;switch(e.toLowerCase()){case"tailwind":t=["#0369A1","#14B8A6","#15803D","#334155","#5A61F6","#65A30D","#8B5CF6","#9333EA","#F59E0B","#F97316"];break;case"tailwinddark":t=["#10B981","#22D3EE","#2DD4BF","#4ADE80","#8B5CF6","#E879F9","#F472B6","#F87171","#F97316","#FCD34D"];break;case"bootstrap5":t=["#262E0B","#668E1F","#AF6E10","#862C0B","#1F2D50","#64680B","#311508","#4C4C81","#0C7DA0","#862C0B"];break;case"bootstrap5dark":t=["#5ECB9B","#A860F1","#EBA844","#557EF7","#E9599B","#BFC529","#3BC6CF","#7A68EC","#74B706","#EA6266"];break;case"fluent":t=["#614570","#4C6FB1","#CC6952","#3F579A","#4EA09B","#6E7A89","#D4515C","#E6AF5D","#639751","#9D4D69"];break;case"fluentdark":t=["#8AB113","#2A72D5","#43B786","#584EC6","#E85F9C","#6E7A89","#EA6266","#EBA844","#26BC7A","#BC4870"];break;default:t=["#B5E485","#7BC1E8","#DF819C","#EC9B79","#78D0D3","#D6D572","#9178E3","#A1E5B4","#87A4B4","#E4C16C"]}return t}function Qe(e){var t,i;switch(e.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:i,areaBackgroundColor:i,titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#DADADA",legendTextColor:"#DADADA",dataLabelFontColor:"#DADADA",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",zoomFillColor:"#FFFFFF",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6"};break;case"highcontrast":t={backgroundColor:"#000000",areaBackgroundColor:"#000000",titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#000000",tooltipFontColor:"#000000",tooltipFillColor:"#ffffff",zoomFillColor:"#FFFFFF",fontFamily:"Roboto, Noto, Sans-serif",labelFontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6"};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#5B6269",fontFamily:"HelveticaNeue-Medium",titleFontSize:"16px",legendFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"HelveticaNeue-Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6"};break;case"tailwind":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#374151",subTitleFontColor:"#374151",legendTitleFontColor:"#374151",legendTextColor:"#6B7280",dataLabelFontColor:"#505967",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#111827",zoomFillColor:"#6b7280",fontFamily:"Inter",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#374151",shapeFill:"#E5E7EB"};break;case"tailwinddark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#D1D5DB",subTitleFontColor:"#D1D5DB",legendTitleFontColor:"#D1D5DB",legendTextColor:"#D1D5DB",dataLabelFontColor:"#D1D5DB",tooltipFontColor:"#1F2937",tooltipFillColor:"#F9FAFB",zoomFillColor:"#D1D5DB",fontFamily:"Inter",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#F3F4F6",shapeFill:"#374151"};break;case"bootstrap5":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#212529",zoomFillColor:"#6C757D",fontFamily:"Helvetica Neue",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Helvetica Neue",titleFontWeight:"normal",zoomSelectionColor:"#343A40",shapeFill:"#E9ECEF"};break;case"bootstrap5dark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#212529",tooltipFillColor:"#E9ECEF",zoomFillColor:"#B5BABE",fontFamily:"Helvetica Neue",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Helvetica Neue",titleFontWeight:"normal",zoomSelectionColor:"#DEE2E6",shapeFill:"#495057"};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",subTitleFontColor:"#201F1E",legendTitleFontColor:"#201F1E",legendTextColor:"#201F1E",dataLabelFontColor:"#201F1E",tooltipFontColor:"#323130",tooltipFillColor:"#FFFFFF",zoomFillColor:"#A19F9D",fontFamily:"Segoe UI",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#323130",shapeFill:"#F3F2F1"};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",subTitleFontColor:"#F3F2F1",legendTitleFontColor:"#F3F2F1",legendTextColor:"#F3F2F1",dataLabelFontColor:"#F3F2F1",tooltipFontColor:"#F3F2F1",tooltipFillColor:"#252423",zoomFillColor:"#484644",fontFamily:"Segoe UI",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#F3F2F1",shapeFill:"#252423"};break;default:t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#424242",titleFontSize:"14px",subTitleFontColor:"#424242",legendTitleFontColor:"#757575",legendTextColor:"#757575",dataLabelFontColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#737373",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6"}}return t}var Ke,$e=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function a(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}(),et=function(){function e(e,t){this.width=e,this.height=t}return e}(),tt=function(){function e(e,t){this.x=e,this.y=t}return e}(),it=function(){function e(e,t){this.min=e,this.max=t}return e}(),at=function(){function e(e,t){this.latitude=new it(e.min,e.max),this.longitude=new it(t.min,t.max)}return e}(),ot=function(){function e(e,t,i,a,o,n,l){void 0===n&&(n=""),this.transform="",this.baseLine="auto",this.id=e,this.text=o,this.transform=n,this.anchor=a,this.x=t,this.y=i,this.baseLine=l}return e}(),nt=function(){function e(e,t,i,a,o,n,l,r){this.id=e,this["fill-opacity"]=o,this["stroke-opacity"]=n,this.fill=t,this.stroke=a,this["stroke-width"]=i,this["stroke-dasharray"]=l,this.d=r}return e}(),lt=function(){function e(e,t,i){this.r=e,this.g=t,this.b=i}return e}(),rt=function(e){function t(t,i,a,o,n,l,r,s,d){var p=e.call(this,t,i,a.width,a.color,o,a.opacity)||this;return p.y=n.y,p.x=n.x,p.height=n.height,p.width=n.width,p.rx=l||0,p.ry=r||0,p.transform=s||"",p["stroke-dasharray"]=d,p["fill-opacity"]=o,p["stroke-opacity"]=a.opacity,p}return $e(t,e),t}(nt),st=function(e){function t(t,i,a,o,n,l,r,s){var d=e.call(this,t,i,a.width,a.color,o,a.opacity,s)||this;return d.cy=l,d.cx=n,d.r=r,d["stroke-dasharray"]=s,d["fill-opacity"]=o,d["stroke-opacity"]=a.opacity,d}return $e(t,e),t}(nt),dt=function(e){function t(t,i,a,o,n,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,a,o,n,l,r,s)||this;return d.points=i,d}return $e(t,e),t}(nt),pt=function(e){function t(t,i,a,o,n,l,r,s){return void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s=""),e.call(this,t,i,a,o,n,l,r,s)||this}return $e(t,e),t}(dt),ht=function(e){function t(t,i,a,o,n,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,a,o,n,l,r,s)||this;return d.x1=i.x1,d.y1=i.y1,d.x2=i.x2,d.y2=i.y2,d}return $e(t,e),t}(nt),ct=function(){function e(e,t,i,a){this.x1=e,this.y1=t,this.x2=i,this.y2=a}return e}(),mt=function(){function e(e,t){this.x=e,this.y=t}return e}(),ut=function(){function e(e,t,i,a){this.x=e,this.y=t,this.width=i,this.height=a}return e}(),gt=function(){function e(e,t,i,a,o,n,l,r,s){void 0===n&&(n="userSpaceOnUse"),void 0===l&&(l="userSpaceOnUse"),void 0===r&&(r=""),void 0===s&&(s=""),this.id=e,this.x=t,this.y=i,this.width=a,this.height=o,this.patternUnits=n,this.patternContentUnits=l,this.patternTransform=r,this.href=s}return e}(),yt=function(){function e(e,t,i,a,o){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=a,this.sendData=o}return e}();!function(e){e.mapsTitleFont={size:"14px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:null,fontStyle:"Regular",fontFamily:null},e.legendTitleFont={size:"12px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:null},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(Ke||(Ke={}));var ft;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Semibold",color:"#424242",fontStyle:"Semibold",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Regular",color:"#424242",fontStyle:"Regular",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#757575",fontStyle:"Regular",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#757575",fontStyle:"Medium",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"}}(ft||(ft={}));var bt;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Semibold",color:"#424242",fontStyle:"Semibold",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Regular",color:"#424242",fontStyle:"Regular",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#757575",fontStyle:"Regular",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#757575",fontStyle:"Medium",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"}}(bt||(bt={}));var vt;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#000000",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto, Noto, Sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(vt||(vt={}));var St;!function(e){e.mapsTitleFont={fontFamily:"Roboto, Noto, Sans-serif",fontWeight:"Medium",size:"14px",fontStyle:"Medium",color:"#FFFFFF"},e.mapsSubTitleFont={size:"13px",color:"#FFFFFF",fontWeight:"Medium",fontFamily:"Roboto, Noto, Sans-serif",fontStyle:"Medium"},e.tooltipLabelFont={size:"12px",color:"#282727",fontWeight:"Regular",fontFamily:"Roboto",fontStyle:"Regular"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto, Noto, Sans-serif"},e.legendLabelFont={size:"13px",fontFamily:"Roboto, Noto, Sans-serif",fontWeight:"Medium",color:"#DADADA",fontStyle:"Medium"}}(St||(St={}));var xt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function a(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}(),Ot=function(e,t,i,a){var o,n=arguments.length,l=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,a);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(l=(n<3?o(l):n>3?o(t,i,l):o(t,i))||l);return n>3&&l&&Object.defineProperty(t,i,l),l},Mt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("")],i.prototype,"content",void 0),Ot([t.Property("0px")],i.prototype,"x",void 0),Ot([t.Property("0px")],i.prototype,"y",void 0),Ot([t.Property("None")],i.prototype,"verticalAlignment",void 0),Ot([t.Property("None")],i.prototype,"horizontalAlignment",void 0),Ot([t.Property("-1")],i.prototype,"zIndex",void 0),i}(t.ChildProperty),_t=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("Start")],i.prototype,"position",void 0),Ot([t.Property("false")],i.prototype,"showArrow",void 0),Ot([t.Property(2)],i.prototype,"size",void 0),Ot([t.Property("black")],i.prototype,"color",void 0),Ot([t.Property(0)],i.prototype,"offSet",void 0),i}(t.ChildProperty),Lt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("12px")],i.prototype,"size",void 0),Ot([t.Property(null)],i.prototype,"color",void 0),Ot([t.Property("Roboto, Noto, Sans-serif")],i.prototype,"fontFamily",void 0),Ot([t.Property("Medium")],i.prototype,"fontWeight",void 0),Ot([t.Property("Medium")],i.prototype,"fontStyle",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Ct=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("")],i.prototype,"color",void 0),Ot([t.Property(0)],i.prototype,"width",void 0),Ot([t.Property(null)],i.prototype,"opacity",void 0),i}(t.ChildProperty),wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"latitude",void 0),Ot([t.Property(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),Pt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Property("")],i.prototype,"template",void 0),Ot([t.Property("")],i.prototype,"fill",void 0),Ot([t.Complex({color:"transparent",width:1},Ct)],i.prototype,"border",void 0),Ot([t.Complex(Ke.tooltipLabelFont,Lt)],i.prototype,"textStyle",void 0),Ot([t.Property(null)],i.prototype,"format",void 0),Ot([t.Property(null)],i.prototype,"valuePath",void 0),i}(t.ChildProperty),It=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(10)],i.prototype,"left",void 0),Ot([t.Property(10)],i.prototype,"right",void 0),Ot([t.Property(10)],i.prototype,"top",void 0),Ot([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),Tt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("#000000")],i.prototype,"color",void 0),Ot([t.Property(1)],i.prototype,"width",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Nt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"allowClustering",void 0),Ot([t.Complex({color:"transparent",width:1},Ct)],i.prototype,"border",void 0),Ot([t.Property("#D2691E")],i.prototype,"fill",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property("Rectangle")],i.prototype,"shape",void 0),Ot([t.Property(12)],i.prototype,"width",void 0),Ot([t.Property(12)],i.prototype,"height",void 0),Ot([t.Property(new tt(0,0))],i.prototype,"offset",void 0),Ot([t.Property("")],i.prototype,"imageUrl",void 0),Ot([t.Property("")],i.prototype,"dashArray",void 0),Ot([t.Complex({},Lt)],i.prototype,"labelStyle",void 0),Ot([t.Property(!1)],i.prototype,"allowClusterExpand",void 0),Ot([t.Complex({},Tt)],i.prototype,"connectorLineSettings",void 0),i}(t.ChildProperty),kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xt(t,e),t}(t.ChildProperty),Ft=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"from",void 0),Ot([t.Property(null)],i.prototype,"to",void 0),Ot([t.Property(null)],i.prototype,"value",void 0),Ot([t.Property(null)],i.prototype,"color",void 0),Ot([t.Property(null)],i.prototype,"minOpacity",void 0),Ot([t.Property(null)],i.prototype,"maxOpacity",void 0),Ot([t.Property(null)],i.prototype,"label",void 0),Ot([t.Property(!0)],i.prototype,"showLegend",void 0),i}(t.ChildProperty),Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"latitude",void 0),Ot([t.Property(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),At=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"shapePath",void 0),Ot([t.Property(null)],i.prototype,"shapeValue",void 0),i}(t.ChildProperty),zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"enable",void 0),Ot([t.Property(null)],i.prototype,"fill",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property(!1)],i.prototype,"enableMultiSelect",void 0),Ot([t.Complex({color:"transparent",width:0},Ct)],i.prototype,"border",void 0),i}(t.ChildProperty),Bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"fill",void 0),Ot([t.Property(!1)],i.prototype,"enable",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Complex({color:"transparent",width:0},Ct)],i.prototype,"border",void 0),i}(t.ChildProperty),jt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Property(1)],i.prototype,"width",void 0),Ot([t.Property(null)],i.prototype,"longitude",void 0),Ot([t.Property(null)],i.prototype,"latitude",void 0),Ot([t.Property("")],i.prototype,"dashArray",void 0),Ot([t.Property("black")],i.prototype,"color",void 0),Ot([t.Property(0)],i.prototype,"angle",void 0),Ot([t.Complex({showArrow:!1,position:"Start",size:5,color:"black"},_t)],i.prototype,"arrowSettings",void 0),Ot([t.Complex({},zt)],i.prototype,"selectionSettings",void 0),Ot([t.Complex({},Bt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),Ut=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Complex({},Ct)],i.prototype,"border",void 0),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Property([])],i.prototype,"dataSource",void 0),Ot([t.Property()],i.prototype,"query",void 0),Ot([t.Property(1e3)],i.prototype,"animationDuration",void 0),Ot([t.Property(0)],i.prototype,"animationDelay",void 0),Ot([t.Property("")],i.prototype,"fill",void 0),Ot([t.Property(10)],i.prototype,"minRadius",void 0),Ot([t.Property(20)],i.prototype,"maxRadius",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property(null)],i.prototype,"valuePath",void 0),Ot([t.Property("Circle")],i.prototype,"bubbleType",void 0),Ot([t.Property(null)],i.prototype,"colorValuePath",void 0),Ot([t.Collection([],Ft)],i.prototype,"colorMapping",void 0),Ot([t.Complex({},Pt)],i.prototype,"tooltipSettings",void 0),Ot([t.Complex({},zt)],i.prototype,"selectionSettings",void 0),Ot([t.Complex({},Bt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),Rt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property("")],i.prototype,"text",void 0),Ot([t.Property("")],i.prototype,"description",void 0),i}(t.ChildProperty),Dt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Complex({size:null,fontWeight:null,fontFamily:null},Lt)],i.prototype,"textStyle",void 0),Ot([t.Property("Center")],i.prototype,"alignment",void 0),i}(Rt),Zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Complex({size:null,fontWeight:null,fontFamily:null},Lt)],i.prototype,"textStyle",void 0),Ot([t.Property("Center")],i.prototype,"alignment",void 0),Ot([t.Complex({},Dt)],i.prototype,"subtitleSettings",void 0),i}(Rt),Vt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"enable",void 0),Ot([t.Property(!0)],i.prototype,"enablePanning",void 0),Ot([t.Property(!0)],i.prototype,"enableSelectionZooming",void 0),Ot([t.Property("Horizontal")],i.prototype,"toolBarOrientation",void 0),Ot([t.Property(null)],i.prototype,"color",void 0),Ot([t.Property(null)],i.prototype,"highlightColor",void 0),Ot([t.Property(null)],i.prototype,"selectionColor",void 0),Ot([t.Property("Far")],i.prototype,"horizontalAlignment",void 0),Ot([t.Property("Near")],i.prototype,"verticalAlignment",void 0),Ot([t.Property(["ZoomIn","ZoomOut","Reset"])],i.prototype,"toolbars",void 0),Ot([t.Property(!0)],i.prototype,"mouseWheelZoom",void 0),Ot([t.Property(!1)],i.prototype,"doubleClickZoom",void 0),Ot([t.Property(!1)],i.prototype,"pinchZooming",void 0),Ot([t.Property(!1)],i.prototype,"zoomOnClick",void 0),Ot([t.Property(1)],i.prototype,"zoomFactor",void 0),Ot([t.Property(10)],i.prototype,"maxZoom",void 0),Ot([t.Property(1)],i.prototype,"minZoom",void 0),Ot([t.Property(!1)],i.prototype,"shouldZoomInitially",void 0),Ot([t.Property(!0)],i.prototype,"resetToInitial",void 0),i}(t.ChildProperty),Ht=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"enable",void 0),Ot([t.Property(!0)],i.prototype,"applyShapeSettings",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property("")],i.prototype,"fill",void 0),Ot([t.Complex({color:"",width:0},Ct)],i.prototype,"border",void 0),i}(t.ChildProperty),Gt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"useMarkerShape",void 0),Ot([t.Property(!1)],i.prototype,"toggleVisibility",void 0),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Property("transparent")],i.prototype,"background",void 0),Ot([t.Property("Layers")],i.prototype,"type",void 0),Ot([t.Property(!1)],i.prototype,"invertedPointer",void 0),Ot([t.Property("After")],i.prototype,"labelPosition",void 0),Ot([t.Property("None")],i.prototype,"labelDisplayMode",void 0),Ot([t.Property("Circle")],i.prototype,"shape",void 0),Ot([t.Property("")],i.prototype,"width",void 0),Ot([t.Property("")],i.prototype,"height",void 0),Ot([t.Complex({fontFamily:null},Lt)],i.prototype,"textStyle",void 0),Ot([t.Property(15)],i.prototype,"shapeWidth",void 0),Ot([t.Property(15)],i.prototype,"shapeHeight",void 0),Ot([t.Property(10)],i.prototype,"shapePadding",void 0),Ot([t.Complex({color:"#000000",width:0},Ct)],i.prototype,"border",void 0),Ot([t.Complex({color:"#000000",width:0},Ct)],i.prototype,"shapeBorder",void 0),Ot([t.Complex({},Rt)],i.prototype,"title",void 0),Ot([t.Complex({size:Ke.legendTitleFont.size,color:Ke.legendTitleFont.color,fontStyle:Ke.legendTitleFont.fontStyle,fontWeight:Ke.legendTitleFont.fontWeight,fontFamily:null},Lt)],i.prototype,"titleStyle",void 0),Ot([t.Property("Bottom")],i.prototype,"position",void 0),Ot([t.Property("Center")],i.prototype,"alignment",void 0),Ot([t.Property("None")],i.prototype,"orientation",void 0),Ot([t.Property({x:0,y:0})],i.prototype,"location",void 0),Ot([t.Property(null)],i.prototype,"fill",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property("Default")],i.prototype,"mode",void 0),Ot([t.Property(null)],i.prototype,"showLegendPath",void 0),Ot([t.Property(null)],i.prototype,"valuePath",void 0),Ot([t.Property(!1)],i.prototype,"removeDuplicateLegend",void 0),Ot([t.Complex({},Ht)],i.prototype,"toggleLegendSettings",void 0),i}(t.ChildProperty),Wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Complex({width:0,color:"transparent"},Ct)],i.prototype,"border",void 0),Ot([t.Property("black")],i.prototype,"fill",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property(5)],i.prototype,"rx",void 0),Ot([t.Property(5)],i.prototype,"ry",void 0),Ot([t.Complex({},Lt)],i.prototype,"textStyle",void 0),Ot([t.Property("")],i.prototype,"labelPath",void 0),Ot([t.Property("None")],i.prototype,"smartLabelMode",void 0),Ot([t.Property("None")],i.prototype,"intersectionAction",void 0),Ot([t.Property("")],i.prototype,"template",void 0),i}(t.ChildProperty),qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"fill",void 0),Ot([t.Property([])],i.prototype,"palette",void 0),Ot([t.Property(5)],i.prototype,"circleRadius",void 0),Ot([t.Complex({width:null,color:"#000000"},Ct)],i.prototype,"border",void 0),Ot([t.Property("")],i.prototype,"dashArray",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property(null)],i.prototype,"colorValuePath",void 0),Ot([t.Property(null)],i.prototype,"borderColorValuePath",void 0),Ot([t.Property(null)],i.prototype,"borderWidthValuePath",void 0),Ot([t.Property(null)],i.prototype,"valuePath",void 0),Ot([t.Collection([],Ft)],i.prototype,"colorMapping",void 0),Ot([t.Property(!1)],i.prototype,"autofill",void 0),i}(t.ChildProperty),Xt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Complex({color:"transparent",width:1},Ct)],i.prototype,"border",void 0),Ot([t.Property(null)],i.prototype,"dashArray",void 0),Ot([t.Property(!1)],i.prototype,"visible",void 0),Ot([t.Property("#FF471A")],i.prototype,"fill",void 0),Ot([t.Property(10)],i.prototype,"height",void 0),Ot([t.Property(10)],i.prototype,"width",void 0),Ot([t.Property(1)],i.prototype,"opacity",void 0),Ot([t.Property(null)],i.prototype,"colorValuePath",void 0),Ot([t.Property(null)],i.prototype,"shapeValuePath",void 0),Ot([t.Property(null)],i.prototype,"imageUrlValuePath",void 0),Ot([t.Property("Balloon")],i.prototype,"shape",void 0),Ot([t.Property("")],i.prototype,"legendText",void 0),Ot([t.Property(new tt(0,0))],i.prototype,"offset",void 0),Ot([t.Property("")],i.prototype,"imageUrl",void 0),Ot([t.Property(null)],i.prototype,"template",void 0),Ot([t.Property([])],i.prototype,"dataSource",void 0),Ot([t.Property()],i.prototype,"query",void 0),Ot([t.Complex({},Pt)],i.prototype,"tooltipSettings",void 0),Ot([t.Property(1e3)],i.prototype,"animationDuration",void 0),Ot([t.Property(0)],i.prototype,"animationDelay",void 0),Ot([t.Complex({},zt)],i.prototype,"selectionSettings",void 0),Ot([t.Complex({},Bt)],i.prototype,"highlightSettings",void 0),Ot([t.Property(null)],i.prototype,"latitudeValuePath",void 0),Ot([t.Property(null)],i.prototype,"longitudeValuePath",void 0),Ot([t.Collection([],Et)],i.prototype,"initialMarkerSelection",void 0),i}(t.ChildProperty),Yt=function(e){function t(t,i,a,o){return e.call(this,t,i,a,o)||this}return xt(t,e),t}(Xt),Jt=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isBaseLayer=!1,t}return xt(i,e),Ot([t.Property(null)],i.prototype,"shapeData",void 0),Ot([t.Property()],i.prototype,"query",void 0),Ot([t.Complex({},qt)],i.prototype,"shapeSettings",void 0),Ot([t.Property([])],i.prototype,"dataSource",void 0),Ot([t.Property("Layer")],i.prototype,"type",void 0),Ot([t.Property("Geographic")],i.prototype,"geometryType",void 0),Ot([t.Property("Aerial")],i.prototype,"bingMapType",void 0),Ot([t.Property("RoadMap")],i.prototype,"staticMapType",void 0),Ot([t.Property("")],i.prototype,"key",void 0),Ot([t.Property("Geometry")],i.prototype,"layerType",void 0),Ot([t.Property("")],i.prototype,"urlTemplate",void 0),Ot([t.Property(!0)],i.prototype,"visible",void 0),Ot([t.Property("name")],i.prototype,"shapeDataPath",void 0),Ot([t.Property("name")],i.prototype,"shapePropertyPath",void 0),Ot([t.Property(0)],i.prototype,"animationDuration",void 0),Ot([t.Collection([],Yt)],i.prototype,"markerSettings",void 0),Ot([t.Complex({},Nt)],i.prototype,"markerClusterSettings",void 0),Ot([t.Complex({},Wt)],i.prototype,"dataLabelSettings",void 0),Ot([t.Collection([],Ut)],i.prototype,"bubbleSettings",void 0),Ot([t.Collection([],jt)],i.prototype,"navigationLineSettings",void 0),Ot([t.Complex({},Pt)],i.prototype,"tooltipSettings",void 0),Ot([t.Complex({},zt)],i.prototype,"selectionSettings",void 0),Ot([t.Complex({},Bt)],i.prototype,"highlightSettings",void 0),Ot([t.Complex({},Ht)],i.prototype,"toggleLegendSettings",void 0),Ot([t.Collection([],At)],i.prototype,"initialShapeSelection",void 0),i}(t.ChildProperty),Qt=function(){function e(e,t,i,a,o,n,l){void 0===i&&(i=256),void 0===a&&(a=256),void 0===o&&(o=0),void 0===n&&(n=0),void 0===l&&(l=null),this.x=e,this.y=t,this.top=o,this.left=n,this.height=i,this.width=a,this.src=l}return e}(),Kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Ot([t.Property(null)],i.prototype,"background",void 0),Ot([t.Complex({color:"transparent",width:1},Ct)],i.prototype,"border",void 0),i}(t.ChildProperty),$t=function(){function e(e){this.maps=e,this.trackElements=[],this.sameMarkerData=[]}return e.prototype.markerRender=function(e,i,a,o){var n=this,l=0,r=0,s=0;this.maps.translateType="marker";var d=this.maps.layersCollection[i];this.markerSVGObject=this.maps.renderer.createGroup({id:this.maps.element.id+"_Markers_Group",class:"GroupElement",style:"pointer-events: auto;"});var p=t.createElement("div",{id:this.maps.element.id+"_LayerIndex_"+i+"_Markers_Template_Group",className:this.maps.element.id+"_template",styles:"overflow: hidden; position: absolute;pointer-events: none;top:"+this.maps.mapAreaRect.y+"px;left:"+this.maps.mapAreaRect.x+"px;height:"+this.maps.mapAreaRect.height+"px;width:"+this.maps.mapAreaRect.width+"px;"});d.markerSettings.map(function(m,u){var g=m.dataSource;Array.prototype.forEach.call(g,function(y,f){n.maps.markerNullCount=u>0&&0===f?0:n.maps.markerNullCount;var b={cancel:!1,name:ti,fill:m.fill,height:m.height,width:m.width,imageUrl:m.imageUrl,shape:m.shape,template:m.template,data:y,maps:n.maps,marker:m,border:m.border,colorValuePath:m.colorValuePath,shapeValuePath:m.shapeValuePath,imageUrlValuePath:m.imageUrlValuePath};n.maps.trigger("markerRendering",b,function(v){b=I(b,y),b=T(b,y);var S=t.isNullOrUndefined(m.longitudeValuePath)?t.isNullOrUndefined(y.longitude)?t.isNullOrUndefined(y.Longitude)?null:parseFloat(y.Longitude):parseFloat(y.longitude):Number(P(y,m.longitudeValuePath)),x=t.isNullOrUndefined(m.latitudeValuePath)?t.isNullOrUndefined(y.latitude)?t.isNullOrUndefined(y.Latitude)?null:parseFloat(y.Latitude):parseFloat(y.latitude):Number(P(y,m.latitudeValuePath)),O=m.offset;if(!b.cancel&&m.visible&&!t.isNullOrUndefined(S)&&!t.isNullOrUndefined(x)){var M=n.maps.element.id+"_LayerIndex_"+i+"_MarkerIndex_"+u+"_dataIndex_"+f,_=n.maps.isTileMap?c(new mt(S,x),a,n.maps.tileTranslatePoint,!0):h(x,S,a,d,n.maps),L=0!==d.animationDuration||t.isNullOrUndefined(n.maps.zoomModule),C=n.maps.isTileMap?"SubLayer"===d.type&&t.isNullOrUndefined(n.maps.zoomModule)?_=c(new mt(S,x),n.maps.tileZoomLevel,n.maps.tileTranslatePoint,!0):new Object:!t.isNullOrUndefined(n.maps.zoomModule)&&n.maps.zoomSettings.zoomFactor>1?ce(n.maps,d,L):he(n.maps,d,L),w="AddMarker"===o?n.maps.scale:C.scale,k="AddMarker"===o?n.maps.translatePoint:C.location;!b.template||isNaN(_.x)||isNaN(_.y)?b.template||isNaN(_.x)||isNaN(_.y)||(l++,E(b,m,g,f,_,k,M,O,w,n.maps,n.markerSVGObject)):(s++,A(b,void 0,M,y,u,p,_,k,w,O,n.maps),n.maps.renderReactTemplates())}r+=isNaN(x)||isNaN(S)?1:0,s+=b.cancel?1:0,l+=b.cancel?1:0,n.maps.markerNullCount=t.isNullOrUndefined(S)||t.isNullOrUndefined(x)?n.maps.markerNullCount+1:n.maps.markerNullCount;var F=g.length-n.maps.markerNullCount;n.markerSVGObject.childElementCount===F-s-r&&"Template"!==o&&(e.appendChild(n.markerSVGObject),d.markerClusterSettings.allowClustering&&(n.maps.svgObject.appendChild(n.markerSVGObject),n.maps.element.appendChild(n.maps.svgObject),("OSM"===d.layerType||-1!==d.urlTemplate.indexOf("openstreetmap")&&t.isNullOrUndefined(d.shapeData))&&n.maps.zoomSettings.enable?e.appendChild(n.markerSVGObject):N(d,n.markerSVGObject,n.maps,i,n.markerSVGObject,e,!0,!1),n.maps.renderReactTemplates())),p.childElementCount===F-l-r&&ue(n.maps.element.id+"_Secondary_Element")&&(ue(n.maps.element.id+"_Secondary_Element").appendChild(p),n.maps.checkInitialRender&&d.markerClusterSettings.allowClustering&&(N(d,p,n.maps,i,n.markerSVGObject,e,!1,!1),n.maps.renderReactTemplates()))})})})},e.prototype.calculateIndividualLayerMarkerZoomLevel=function(e,t,i){var a,o,n=Math.abs(this.maps.baseMapBounds.latitude.max-this.maps.baseMapBounds.latitude.min),l=Math.abs(this.maps.baseMapBounds.longitude.max-this.maps.baseMapBounds.longitude.min);a=(a=Math.floor(Math.log(t/n)))>i?i:a,o=(o=Math.floor(Math.log(e/l)))>i?i:o;var r=Math.min(a,o),s=Math.min(r,i-1);return this.maps.isTileMap||qe(s,this.maps),s},e.prototype.calculateZoomCenterPositionAndFactor=function(e){if(this.maps.zoomSettings.shouldZoomInitially&&this.maps.markerModule){var i,a,o,n,l=void 0,r=void 0,s=void 0,d=this.maps.zoomSettings.maxZoom,p=this.maps.mapAreaRect.width,h=this.maps.mapAreaRect.height;if(this.maps.markerZoomedState=this.maps.markerZoomedState?this.maps.markerZoomedState:t.isNullOrUndefined(this.maps.markerZoomFactor)?!this.maps.markerZoomedState:this.maps.markerZoomFactor>1?this.maps.markerZoomedState:!this.maps.markerZoomedState,this.maps.defaultState=this.maps.markerZoomedState?!this.maps.markerZoomedState:this.maps.defaultState,Array.prototype.forEach.call(e,function(e,l){0!==e.markerSettings.length&&Array.prototype.forEach.call(e.markerSettings,function(e,l){var r=e.dataSource;Array.prototype.forEach.call(r,function(e,l){var r=t.isNullOrUndefined(e.latitude)?t.isNullOrUndefined(e.Latitude)?null:parseFloat(e.Latitude):parseFloat(e.latitude),s=t.isNullOrUndefined(e.longitude)?t.isNullOrUndefined(e.Longitude)?null:parseFloat(e.Longitude):parseFloat(e.longitude);i=t.isNullOrUndefined(i)&&0===l?s:i,a=t.isNullOrUndefined(a)&&0===l?r:a,o=t.isNullOrUndefined(o)&&0===l?r:o,n=t.isNullOrUndefined(n)&&0===l?s:n,i>s&&(i=s),o>r&&(o=r),n<s&&(n=s),a<r&&(a=r)})})}),!(t.isNullOrUndefined(o)||t.isNullOrUndefined(i)||t.isNullOrUndefined(n)||t.isNullOrUndefined(a))){r=(o+a)/2,s=(i+n)/2,this.maps.markerCenterLatitude=r,this.maps.markerCenterLongitude=s,(t.isNullOrUndefined(this.maps.markerZoomCenterPoint)||this.maps.markerZoomedState)&&(this.maps.markerZoomCenterPoint={latitude:r,longitude:s});var c=void 0;this.maps.isTileMap||0===this.maps.baseMapRectBounds.min.x?(l=Xe(o,a,i,n,p,h,this.maps),this.maps.isTileMap?c=t.isNullOrUndefined(this.maps.markerZoomFactor)?l:t.isNullOrUndefined(this.maps.mapScaleValue)?l:this.maps.mapScaleValue>1&&1!==this.maps.markerZoomFactor?this.maps.mapScaleValue:l:(c=t.isNullOrUndefined(this.maps.mapScaleValue)?l:1!==Math.floor(this.maps.scale)&&this.maps.mapScaleValue!==l&&t.isNullOrUndefined(this.maps.shouldZoomCurrentFactor)?this.maps.mapScaleValue:l)!==this.maps.mapScaleValue||1!==this.maps.markerZoomFactor&&1!==this.maps.mapScaleValue||this.maps.enablePersistence||(c=l)):(l=this.calculateIndividualLayerMarkerZoomLevel(p,h,d),c=t.isNullOrUndefined(this.maps.mapScaleValue)?l:this.maps.mapScaleValue!==l?this.maps.mapScaleValue:l),this.maps.markerZoomFactor=c}}else this.maps.markerZoomedState=!1,this.maps.markerZoomFactor>1&&(this.maps.markerCenterLatitude=null,this.maps.markerCenterLongitude=null,this.maps.markerZoomFactor=1,this.maps.enablePersistence||(this.maps.mapScaleValue=1)),this.maps.isTileMap&&!this.maps.enablePersistence&&this.maps.mapScaleValue<=1&&(this.maps.tileZoomLevel=0===this.maps.mapScaleValue?1:this.maps.mapScaleValue,1===this.maps.mapScaleValue&&1===this.maps.markerZoomFactor&&(this.maps.tileTranslatePoint.x=0,this.maps.tileTranslatePoint.y=0))},e.prototype.markerClick=function(e){var i=e.target.id;if(!(-1===i.indexOf("_LayerIndex_")||i.indexOf("_cluster_")>0)){var a=this.getMarker(i);if(!t.isNullOrUndefined(a)){var o={cancel:!1,name:ai,data:a.data,maps:this.maps,marker:a.marker,target:i,x:e.clientX,y:e.clientY,latitude:a.data.latitude||a.data.Latitude,longitude:a.data.longitude||a.data.Longitude,value:a.data.name};this.maps.trigger(ai,o)}}},e.prototype.markerClusterClick=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")&&-1!==i.indexOf("_cluster_")){var a=this.getMarker(i);if(!t.isNullOrUndefined(a)){a.clusterCollection.length>0&&this.maps.markerClusterExpand&&(be(this.maps.element.id+"_mapsTooltip")&&this.maps.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&de(this.maps.element.id+"_mapsTooltip"),this.sameMarkerData.length>0&&!this.maps.markerClusterExpandCheck?(this.maps.markerClusterExpandCheck=!0,k(this.sameMarkerData,this.maps,this.markerSVGObject)):(this.sameMarkerData=a.clusterCollection,this.maps.markerClusterExpandCheck=!1,F(this.sameMarkerData,this.maps,this.markerSVGObject,!0)));var o={cancel:!1,name:oi,data:a,maps:this.maps,target:i,x:e.clientX,y:e.clientY,latitude:a.data.latitude||a.data.Latitude,longitude:a.data.longitude||a.data.Longitude,markerClusterCollection:a.markCollection};this.maps.trigger(oi,o)}}},e.prototype.getMarker=function(e){var t,i,a=e.split("_LayerIndex_"),o=parseInt(a[1].split("_")[0],10),n=this.maps.layers[o],l=[],r=[];if(this.maps.markerClusterExpand=n.markerClusterSettings.allowClusterExpand,e.indexOf("_MarkerIndex_")>-1){var s=parseInt(a[1].split("_MarkerIndex_")[1].split("_")[0],10),d=parseInt(a[1].split("_dataIndex_")[1].split("_")[0],10);if(i=n.markerSettings[s],!isNaN(s)){t=i.dataSource[d];var p=[];if(!i.template&&e.indexOf("_cluster_")>-1&&this.maps.layers[o].markerClusterSettings.allowClusterExpand&&Array.prototype.forEach.call(i.dataSource,function(e,i){e.latitude===t.latitude&&e.longitude===t.longitude&&p.push({data:t,index:i})}),e.indexOf("_cluster_")>-1){var h=document.getElementById(e.indexOf("_datalabel_")>-1?e.split("_datalabel_")[0]:e),c="Balloon"===n.markerClusterSettings.shape?h.children[0].innerHTML.split(",").map(Number):h.innerHTML.split(",").map(Number);p=[];for(var m=0,u=c;m<u.length;m++){var g=u[m];p.push({data:i.dataSource[g],index:g}),l.push(i.dataSource[g])}!1,r.push({data:p,layerIndex:o,markerIndex:s,dataIndex:d,targetClusterIndex:+(e.split("_cluster_")[1].indexOf("_datalabel_")>-1?e.split("_cluster_")[1].split("_datalabel_")[0]:e.split("_cluster_")[1]),isClusterSame:!1})}return{marker:i,data:t,clusterCollection:r,markCollection:l}}}return null},e.prototype.markerMove=function(e){var i=e.target.id;if(!(-1===i.indexOf("_LayerIndex_")||i.indexOf("_cluster_")>0)){var a=this.getMarker(i);if(!t.isNullOrUndefined(a)){var o={cancel:!1,name:ni,data:a.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(ni,o)}}},e.prototype.markerClusterMouseMove=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")&&-1!==i.indexOf("_cluster_")){var a=this.getMarker(i);if(this.maps.markerClusterExpand&&e.target.setAttribute("style","cursor: pointer"),!t.isNullOrUndefined(a)){var o={cancel:!1,name:li,data:a.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(li,o)}}},e.prototype.getModuleName=function(){return"Marker"},e.prototype.destroy=function(e){},e}(),ei="click",ti="markerRendering",ii="markerClusterRendering",ai="markerClick",oi="markerClusterClick",ni="markerMouseMove",li="markerClusterMouseMove",ri="animationComplete",si="itemSelection",di=function(){function e(e){this.maps=e}return e.prototype.getBingMap=function(e,i,a,o,n,l){for(var r="",s=Math.min(this.maps.tileZoomLevel,parseInt(this.maxZoom,10));s>0;s--){var d=0,p=1<<s-1;0!=(e.x&p)&&d++,0!=(e.y&p)&&(d+=2),r=r+""+d}if(t.isNullOrUndefined(l))return"";var h=l[Math.min(parseInt(r.substr(r.length-1,1),10),l.length)];return n=n.replace("{quadkey}",r).replace("{subdomain}",h),n+="&mkt="+o+"&ur=IN&Key="+i},e}(),pi=function(){function e(e){this.maps=e}return e.prototype.getShapeColorMapping=function(e,i,a){var o=e.colorValuePath?e.colorValuePath:e.valuePath,n=t.isNullOrUndefined(o)?i[o]:o.indexOf(".")>-1?P(i,o):i[o],l=Number(n),r=this.getColorByValue(e.colorMapping,l,n);return t.isNullOrUndefined(r)?a:r},e.prototype.getColorByValue=function(e,i,a){if(isNaN(i)&&t.isNullOrUndefined(a))return null;for(var o,n="",l=0,r=e;l<r.length;l++){var s=r[l];(!t.isNullOrUndefined(s.from)&&!t.isNullOrUndefined(s.to)&&i>=s.from&&i<=s.to||s.value===a)&&(n="[object Array]"===Object.prototype.toString.call(s.color)?t.isNullOrUndefined(s.value)?this.getColor(s,i):s.color[0]:s.color),(i>=s.from&&i<=s.to||s.value===a)&&!t.isNullOrUndefined(s.minOpacity)&&!t.isNullOrUndefined(s.maxOpacity)&&n&&(o=this.deSaturationColor(s,n,i,a)),(""===n||t.isNullOrUndefined(n))&&t.isNullOrUndefined(s.from)&&t.isNullOrUndefined(s.to)&&t.isNullOrUndefined(s.minOpacity)&&t.isNullOrUndefined(s.maxOpacity)&&t.isNullOrUndefined(s.value)&&(n="[object Array]"===Object.prototype.toString.call(s.color)?s.color[0]:s.color)}return{fill:n||(e.length?null:a),opacity:o}},e.prototype.deSaturationColor=function(e,t,i,a){var o=1;return(i>=e.from&&i<=e.to||e.value===a)&&(o=(isNaN(i)?e.from/(e.to-e.from):(i-e.from)/(e.to-e.from))*(e.maxOpacity-e.minOpacity)+e.minOpacity),o},e.prototype.rgbToHex=function(e,t,i){return"#"+this.componentToHex(e)+this.componentToHex(t)+this.componentToHex(i)},e.prototype.componentToHex=function(e){var t=e.toString(16);return 1===t.length?"0"+t:t},e.prototype.getColor=function(e,t){var i,a="";return Number(t)===e.from?a=e.color[0]:Number(t)===e.to?a=e.color[e.color.length-1]:(i=this.getGradientColor(Number(t),e),a=this.rgbToHex(i.r,i.g,i.b)),a},e.prototype.getGradientColor=function(e,t){var i=t.from,a=t.to,o=0,n=a-i;o=(e-i)/n;var l,r;if(t.color.length<=2)l="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),r="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);else{l="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),r="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);for(var s=n/(t.color.length-1),d=t.color.length-1,p=[],h={},c=1;c<d;c++)h={b:i+c*s,color:t.color[c]},p.push(h);for(var m=0;m<p.length;m++)i<=e&&e<=p[m].b&&0===m?(r="#"===p[m].color.charAt(0)?p[m].color:this._colorNameToHex(p[m].color),o=e<p[m].b?1-Math.abs((e-p[m].b)/s):(e-p[m].b)/s):p[m].b<=e&&e<=a&&m===p.length-1&&(l="#"===p[m].color.charAt(0)?p[m].color:this._colorNameToHex(p[m].color),o=e<p[m].b?1-Math.abs((e-p[m].b)/s):(e-p[m].b)/s),m!==p.length-1&&m<p.length&&p[m].b<=e&&e<=p[m+1].b&&(l="#"===p[m].color.charAt(0)?p[m].color:this._colorNameToHex(p[m].color),r="#"===p[m+1].color.charAt(0)?p[m+1].color:this._colorNameToHex(p[m+1].color),o=Math.abs(e-p[m+1].b)/s)}return this.getPercentageColor(o,l,r)},e.prototype.getPercentageColor=function(e,t,i){var a=i.split("#")[1],o=t.split("#")[1],n=this.getPercentage(e,parseInt(o.substr(0,2),16),parseInt(a.substr(0,2),16)),l=this.getPercentage(e,parseInt(o.substr(2,2),16),parseInt(a.substr(2,2),16)),r=this.getPercentage(e,parseInt(o.substr(4,2),16),parseInt(a.substr(4,2),16));return new lt(n,l,r)},e.prototype.getPercentage=function(e,t,i){var a=i-t;return Math.round(t+a*e)},e.prototype._colorNameToHex=function(e){var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",orchid:"#da70d6",papayawhip:"#ffefd5",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"[object Array]"===Object.prototype.toString.call(e)?e:void 0!==t[e.toLowerCase()]?t[e.toLowerCase()]:e},e}(),hi=function(){function e(e){this.isMapCoordinates=!0,this.horizontalPan=!1,this.horizontalPanXCount=0,this.mapObject=e,this.ajaxModule=new t.Ajax,this.ajaxResponse=[]}return e.prototype.measureLayerPanel=function(){var e=this,i=this.mapObject.layersCollection,a=this.mapObject.mapAreaRect,o=ue(this.mapObject.element.id+"_Secondary_Element");if(this.mapObject.isTileMap&&o){this.tileSvgObject=this.mapObject.renderer.createSvg({id:this.mapObject.element.id+"_Tile_SVG",width:a.width,height:a.height});var n=t.createElement("div",{id:this.mapObject.element.id+"_Tile_SVG_Parent",styles:"position: absolute; height: "+a.height+"px; width: "+a.width+"px;"});n.appendChild(this.tileSvgObject),o.appendChild(n)}if(this.layerGroup=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_Layer_Collections","clip-path":"url(#"+this.mapObject.element.id+"_MapArea_ClipRect)"}),"GoogleStaticMap"===this.mapObject.layers[this.mapObject.baseLayerIndex].layerType){this.clipRectElement=this.mapObject.renderer.drawClipPath(new rt(this.mapObject.element.id+"_MapArea_ClipRect","transparent",{width:1,color:"Gray"},1,{x:(a.width-640)/2,y:0,width:640,height:a.height}))}else this.clipRectElement=this.mapObject.renderer.drawClipPath(new rt(this.mapObject.element.id+"_MapArea_ClipRect","transparent",{width:1,color:"Gray"},1,{x:this.mapObject.isTileMap?0:a.x,y:this.mapObject.isTileMap?0:a.y,width:a.width,height:a.height}));this.layerGroup.appendChild(this.clipRectElement),this.mapObject.baseMapBounds=null,this.mapObject.baseMapRectBounds=null,this.mapObject.baseSize=null,Array.prototype.forEach.call(i,function(t,i){e.currentLayer=t,e.processLayers(t,i)}),t.isNullOrUndefined(this.mapObject.legendModule)||"Float"!==this.mapObject.legendSettings.position||(this.mapObject.isTileMap?this.layerGroup.appendChild(this.mapObject.legendModule.legendGroup):this.mapObject.svgObject.appendChild(this.mapObject.legendModule.legendGroup))},e.prototype.renderTileLayer=function(e,i,a,o){e.currentFactor=e.calculateFactor(i),e.mapObject.defaultState=!(1!==e.mapObject.zoomSettings.zoomFactor&&!t.isNullOrUndefined(e.mapObject.tileZoomLevel)&&1!==e.mapObject.tileZoomLevel),t.isNullOrUndefined(e.mapObject.previousCenterLatitude)&&t.isNullOrUndefined(e.mapObject.previousCenterLongitude)?(e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.previousCenterLatitude!==e.mapObject.centerPosition.latitude&&e.mapObject.previousCenterLongitude!==e.mapObject.centerPosition.longitude?(e.mapObject.centerPositionChanged=!0,e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.centerPositionChanged=!1;var n=new tt(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude),l=n;this.mapObject.isTileMap&&e.mapObject.markerModule&&e.mapObject.zoomSettings.enable&&(e.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection),t.isNullOrUndefined(this.mapObject.markerCenterLatitude)||t.isNullOrUndefined(this.mapObject.markerCenterLongitude)||(l=new tt(e.mapObject.markerCenterLongitude,e.mapObject.markerCenterLatitude))),n=!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.centerPosition.longitude&&e.mapObject.centerPosition.latitude&&!e.mapObject.zoomPersistence&&e.mapObject.defaultState?new tt(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude):e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.markerZoomedState&&!e.mapObject.zoomPersistence&&!t.isNullOrUndefined(e.mapObject.markerZoomCenterPoint)?new tt(e.mapObject.markerZoomCenterPoint.longitude,e.mapObject.markerZoomCenterPoint.latitude):{x:null,y:null};var r=e.mapObject.zoomSettings.shouldZoomInitially?t.isNullOrUndefined(e.mapObject.markerZoomFactor)?1:e.mapObject.markerZoomFactor:e.mapObject.zoomSettings.zoomFactor;if(r=e.mapObject.enablePersistence?t.isNullOrUndefined(e.mapObject.mapScaleValue)?t.isNullOrUndefined(e.mapObject.markerZoomFactor)?e.mapObject.zoomSettings.zoomFactor:e.mapObject.markerZoomFactor:e.mapObject.mapScaleValue:r,r=e.mapObject.zoomSettings.enable?r:e.mapObject.zoomSettings.zoomFactor,r=r>0?r:1,e.mapObject.defaultState=1===r,!e.mapObject.markerZoomedState&&e.mapObject.zoomSettings.shouldZoomInitially&&1===e.mapObject.zoomSettings.zoomFactor&&(e.mapObject.defaultState=!0),t.isNullOrUndefined(e.mapObject.tileZoomLevel))e.mapObject.tileZoomLevel=r,e.mapObject.previousZoomFactor=r;else if(this.mapObject.isReset&&1===e.mapObject.tileZoomLevel&&!e.mapObject.zoomSettings.shouldZoomInitially){var s=e.mapObject.tileZoomLevel;e.mapObject.tileZoomLevel=s}else 1!==e.mapObject.zoomSettings.zoomFactor||e.mapObject.zoomSettings.shouldZoomInitially?(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=e.mapObject.defaultState&&e.mapObject.zoomSettings.enable?e.mapObject.tileZoomLevel:e.mapObject.zoomSettings.shouldZoomInitially||e.mapObject.centerPositionChanged?r:e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor?e.mapObject.zoomSettings.zoomFactor:e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=1===r&&0===e.mapObject.zoomSettings.zoomFactor?r:e.mapObject.tileZoomLevel,!t.isNullOrUndefined(e.mapObject.tileTranslatePoint)&&(e.mapObject.markerZoomFactor!==e.mapObject.mapScaleValue||t.isNullOrUndefined(e.mapObject.markerZoomFactor)&&t.isNullOrUndefined(e.mapObject.mapScaleValue))&&(e.mapObject.zoomSettings.zoomFactor<=1||e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor)&&(e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0)):e.mapObject.defaultState&&(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=r,e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0);if(r<=1&&!t.isNullOrUndefined(e.mapObject.height)&&!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.tileZoomLevel===e.mapObject.tileZoomScale&&this.mapObject.initialCheck&&me(this.mapObject),t.isNullOrUndefined(e.mapObject.centerLatOfGivenLocation)||t.isNullOrUndefined(e.mapObject.centerLongOfGivenLocation)||!e.mapObject.zoomNotApplied||(l.y=e.mapObject.centerLatOfGivenLocation,l.x=e.mapObject.centerLongOfGivenLocation,e.mapObject.tileZoomLevel=e.mapObject.mapScaleValue=e.mapObject.scaleOfGivenLocation),e.mapObject.tileTranslatePoint=e.panTileMap(e.mapObject.availableSize.width,e.mapObject.availableSize.height,l),this.mapObject.zoomSettings.resetToInitial&&this.mapObject.initialCheck&&!t.isNullOrUndefined(e.mapObject.height)&&this.mapObject.availableSize.height>512){this.mapObject.applyZoomReset=!0,this.mapObject.initialZoomLevel=Math.floor(this.mapObject.availableSize.height/512);var d="GoogleStaticMap"!==this.mapObject.layers[this.mapObject.baseLayerIndex].layerType?20:0,p=256*Math.pow(2,this.mapObject.initialZoomLevel);this.mapObject.initialTileTranslate.x=this.mapObject.availableSize.width/2-p/2,this.mapObject.initialTileTranslate.y=this.mapObject.availableSize.height/2-p/2+d}e.generateTiles(e.mapObject.tileZoomLevel,e.mapObject.tileTranslatePoint,null,o),t.isNullOrUndefined(e.mapObject.previousZoomFactor)||e.mapObject.previousZoomFactor===e.mapObject.zoomSettings.zoomFactor||(e.mapObject.previousZoomFactor=e.mapObject.zoomSettings.zoomFactor),e.mapObject.navigationLineModule&&e.layerObject.appendChild(e.mapObject.navigationLineModule.renderNavigation(e.currentLayer,e.mapObject.tileZoomLevel,a)),e.mapObject.markerModule&&e.mapObject.markerModule.markerRender(e.layerObject,a,e.mapObject.tileZoomLevel,null),e.translateLayerElements(e.layerObject,a),e.layerGroup.appendChild(e.layerObject)},e.prototype.processLayers=function(e,i){var a=this;if(this.layerObject=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+i}),!this.mapObject.enablePersistence){var o=this.mapObject.getModuleName()+this.mapObject.element.id;if(-1===navigator.userAgent.indexOf("Edge")){var n=void 0;try{n=window.localStorage}catch(e){n=null}!t.isNullOrUndefined(n)&&window.localStorage.getItem(o)&&window.localStorage.removeItem(o)}}var l={cancel:!1,name:"layerRendering",index:i,layer:e,maps:this.mapObject,visible:e.visible};this.mapObject.trigger("layerRendering",l,function(o){if(!l.cancel&&l.visible)if("OSM"===e.layerType&&(e.urlTemplate="https://a.tile.openstreetmap.org/level/tileX/tileY.png"),"Google"===e.layerType&&(e.urlTemplate="https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level"),"Geometry"!==e.layerType||t.isNullOrUndefined(e.shapeData)&&!t.isNullOrUndefined(e.urlTemplate)&&""!==e.urlTemplate){if("Bing"!==e.layerType||a.bing)if(!t.isNullOrUndefined(e.urlTemplate)&&e.urlTemplate.indexOf("quadkey")>-1){var n=new di(a.mapObject);a.bingMapCalculation(e,i,a,n)}else a.renderTileLayer(a,e,i);else if(e.key&&e.key.length>1){var r=a,s=new di(a.mapObject),d="https://dev.virtualearth.net/REST/V1/Imagery/Metadata/"+("AerialWithLabel"===e.bingMapType?"AerialWithLabelsOnDemand":e.bingMapType),p=new t.Ajax({url:d+"?output=json&include=ImageryProviders&urischeme=https&key="+e.key});p.onSuccess=function(t){var o=JSON.parse(t).resourceSets[0].resources[0],n=o.imageUrl,l=o.imageUrlSubdomains,d=o.zoomMax;document.getElementById(r.mapObject.element.id+"_Markers_Group");null!==n&&void 0!==n&&n!==s.imageUrl&&(s.imageUrl=n),null!==l&&void 0!==l&&l!==s.subDomains&&(s.subDomains=l),null!==d&&void 0!==d&&d!==s.maxZoom&&(s.maxZoom=d),r.mapObject.bingMap=s,r.renderTileLayer(r,e,i,s),a.mapObject.arrangeTemplate(),a.mapObject.zoomModule&&a.mapObject.previousScale!==a.mapObject.scale&&a.mapObject.zoomModule.applyTransform(!0)},p.send()}}else if(!(t.isNullOrUndefined(e.shapeData)||t.isNullOrUndefined(e.shapeData.geometries)&&t.isNullOrUndefined(e.shapeData.features))){var h=!t.isNullOrUndefined(e.shapeData.geometries)&&e.shapeData.geometries.length>0?e.shapeData.geometries:e.shapeData.features;e.layerData=[];var c=e.shapeData.bbox;!t.isNullOrUndefined(c)&&e.isBaseLayer?a.mapObject.baseMapBounds=new at({min:c[0][1],max:c[1][1]},{min:c[0][0],max:c[1][0]}):t.isNullOrUndefined(a.mapObject.baseMapBounds)&&!le(h)&&a.calculateRectBounds(h),a.calculatePathCollection(i,h)}}),this.mapObject.isTileMap?this.tileSvgObject&&(this.tileSvgObject.appendChild(this.layerGroup),this.mapObject.baseMapBounds=null):this.mapObject.svgObject.appendChild(this.layerGroup)},e.prototype.bingMapCalculation=function(e,t,i,a){a.imageUrl=e.urlTemplate,a.subDomains=["t0","t1","t2","t3"],a.maxZoom="21",i.mapObject.bingMap=a,i.renderTileLayer(i,e,t,a),this.mapObject.arrangeTemplate(),this.mapObject.zoomModule&&this.mapObject.previousScale!==this.mapObject.scale&&this.mapObject.zoomModule.applyTransform(!0)},e.prototype.bubbleCalculation=function(e,i){if(null!=e.dataSource&&null!=e)for(var a=e.dataSource,o=0;o<a.length;o++){var n=t.isNullOrUndefined(e.valuePath)?parseFloat(e.dataSource[o][e.valuePath]):e.valuePath.indexOf(".")>-1?Number(P(e.dataSource[o],e.valuePath)):parseFloat(e.dataSource[o][e.valuePath]);0!==o?n>i.max?i.max=n:n<i.min&&(i.min=n):i.max=i.min=n}},e.prototype.calculatePathCollection=function(e,i){var a=this;this.groupElements=[],le(i)||(this.currentFactor=this.calculateFactor(this.currentLayer)),this.rectBounds=null;var o=this.currentLayer.shapeSettings;this.currentLayer.bubbleSettings;Array.prototype.forEach.call(i,function(e,i){if(!t.isNullOrUndefined(e.geometry)||!t.isNullOrUndefined(e.coordinates)){var o=t.isNullOrUndefined(e.geometry)?e.type:e.geometry.type,n=t.isNullOrUndefined(e.geometry)?e.coordinates:e.geometry.coordinates,l=e.geometry,r=e.properties;a.generatePoints(o,n,l,r)}}),this.currentLayer.rectBounds=this.rectBounds,t.isNullOrUndefined(this.mapObject.baseMapRectBounds)&&this.currentLayer.isBaseLayer&&(this.mapObject.baseMapRectBounds=this.rectBounds);var n=o.palette.length>1?o.palette:Je(this.mapObject.theme),l=t.createElement("div",{id:this.mapObject.element.id+"_LayerIndex_"+e+"_Label_Template_Group",className:this.mapObject.element.id+"_template",styles:"pointer-events: none; overflow: hidden; position: absolute;top:"+this.mapObject.mapAreaRect.y+"px;left:"+this.mapObject.mapAreaRect.x+"px;height:"+this.mapObject.mapAreaRect.height+"px;width:"+this.mapObject.mapAreaRect.width+"px;"});if(0!==this.currentLayer.layerData.length)for(var r=this,s=0;s<this.currentLayer.layerData.length;s++)!function(s){var d,p,h,c=void 0,m={color:o.border.color,width:o.border.width,opacity:o.border.opacity},u=r.currentLayer.layerData[s],g="",y=o.autofill?n[s%n.length]:o.fill||r.mapObject.themeStyle.shapeFill;null===o.colorValuePath||t.isNullOrUndefined(u.property)||(null!==(c=te(r.currentLayer.dataSource,u.property,r.currentLayer.shapeDataPath,r.currentLayer.shapePropertyPath,r.currentLayer))&&0===o.colorMapping.length?y=r.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?P(r.currentLayer.dataSource[c],o.colorValuePath):r.currentLayer.dataSource[c][o.colorValuePath]:u.property[o.colorValuePath]&&0===r.currentLayer.dataSource.length&&0===o.colorMapping.length&&(y=r.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?P(u.property,o.colorValuePath):u.property[o.colorValuePath]),y=t.isNullOrUndefined(y)?o.fill||r.mapObject.themeStyle.shapeFill:y);var f=r.mapObject.element.id+"_LayerIndex_"+e+"_shapeIndex_"+s+"_dataIndex_"+c,b=r.getShapeColorMapping(r.currentLayer,u.property,y);if(y="[object Object]"!==Object.prototype.toString.call(b)||t.isNullOrUndefined(b.fill)?y:b.fill,r.currentLayer.shapeSettings.borderColorValuePath||r.currentLayer.shapeSettings.borderWidthValuePath){r.currentLayer.shapeSettings.borderColorValuePath,r.currentLayer.shapeSettings.borderWidthValuePath;null!==(c=te(r.currentLayer.dataSource,u.property,r.currentLayer.shapeDataPath,r.currentLayer.shapePropertyPath,r.currentLayer))&&(r.currentLayer.dataSource[c][o.borderColorValuePath]&&(m.color=r.currentLayer.dataSource[c][o.borderColorValuePath]),r.currentLayer.dataSource[c][o.borderWidthValuePath]&&(m.width=r.currentLayer.dataSource[c][o.borderWidthValuePath]))}var v="[object Object]"!==Object.prototype.toString.call(b)||t.isNullOrUndefined(b.opacity)?o.opacity:b.opacity,S={cancel:!1,name:"shapeRendering",index:s,data:r.currentLayer.dataSource?r.currentLayer.dataSource[c]:null,maps:r.mapObject,shape:o,fill:y,border:{width:m.width,color:m.color,opacity:m.opacity}},x=function(r){var c=t.isNullOrUndefined(u._isMultiPolygon)?t.isNullOrUndefined(u.type)?u[0].type:u.type:"MultiPolygon";if(c="Polygon"===c||"MultiPolygon"===c?"Polygon":c,r.cancel?(r.fill=y,r.border.color=o.border.color,r.border.width=o.border.width,a.mapObject.layers[e].shapeSettings.border=o.border):(r.fill="#A6A6A6"===r.fill?r.shape.fill||a.mapObject.themeStyle.shapeFill:r.fill,r.border.color="#000000"===r.border.color?r.shape.border.color:r.border.color,r.border.width=0===r.border.width?r.shape.border.width:r.border.width,t.isNullOrUndefined(o.borderColorValuePath)&&(a.mapObject.layers[e].shapeSettings.border.color=r.border.color),t.isNullOrUndefined(o.borderWidthValuePath)&&(a.mapObject.layers[e].shapeSettings.border.width=r.border.width)),r.border.opacity=t.isNullOrUndefined(r.border.opacity)?v:r.border.opacity,a.groupElements.length<1)h=a.mapObject.renderer.createGroup({id:a.mapObject.element.id+"_LayerIndex_"+e+"_"+c+"_Group",transform:""}),a.groupElements.push(h);else for(var m=0;m<a.groupElements.length;m++){var b=a.groupElements[m];if(b.id.indexOf(c)>-1){h=b;break}if(m>=a.groupElements.length-1){h=a.mapObject.renderer.createGroup({id:a.mapObject.element.id+"_LayerIndex_"+e+"_"+c+"_Group"}),a.groupElements.push(h);break}}var S;switch(c){case"Polygon":u._isMultiPolygon?g=a.generateMultiPolygonPath(u):(g+="M"+u[0].point.x+" "+u[0].point.y,u.map(function(e){g+=" L "+e.point.x+" "+e.point.y})),(g+=" z ").length>3&&(d=new nt(f,r.fill,r.border.width,r.border.color,v,r.border.opacity,o.dashArray,g),S=a.mapObject.renderer.drawPath(d));break;case"LineString":u.map(function(e,t){g+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "}),g.length>3&&(d=new nt(f,"transparent",t.isNullOrUndefined(r.border.width)?1:r.border.width,t.isNullOrUndefined(r.fill)?r.border.color:r.fill,v,r.border.opacity,o.dashArray,g),S=a.mapObject.renderer.drawPath(d));break;case"MultiLineString":u.map(function(e){e.map(function(e,t){g+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "})}),g.length>3&&(d=new nt(f,"transparent",t.isNullOrUndefined(r.border.width)?1:r.border.width,t.isNullOrUndefined(r.fill)?r.border.color:r.fill,v,r.border.opacity,o.dashArray,g),S=a.mapObject.renderer.drawPath(d));break;case"Point":var x=u.point,O="SubLayer"!==a.mapObject.layers[e].type?o.circleRadius:o.circleRadius/(a.mapObject.isTileMap?a.mapObject.scale:a.currentFactor);p=new st(f,r.fill,r.border,v,x.x,x.y,O,o.dashArray),S=a.mapObject.renderer.drawCircle(p);break;case"MultiPoint":u.map(function(t,i){var n=t.point,l="SubLayer"!==a.mapObject.layers[e].type?o.circleRadius:o.circleRadius/(a.mapObject.isTileMap?a.mapObject.scale:a.currentFactor);p=new st(f+"_multiLine_"+i,r.fill,r.border,v,n.x,n.y,l,o.dashArray),S=a.mapObject.renderer.drawCircle(p),a.pathAttributeCalculate(h,S,c,u,s)});break;case"Path":g=u.point,d=new nt(f,r.fill,r.border.width,r.border.color,v,r.border.opacity,o.dashArray,g),S=a.mapObject.renderer.drawPath(d)}t.isNullOrUndefined(S)||"MultiPoint"===c||a.pathAttributeCalculate(h,S,c,u,s),s===a.currentLayer.layerData.length-1&&a.layerFeatures(e,n,i,l)};x.bind(r),r.mapObject.trigger("shapeRendering",S,x)}(s);else this.layerFeatures(e,n,i,l)},e.prototype.pathAttributeCalculate=function(e,i,a,o,n){for(var l,r="[object Array]"===Object.prototype.toString.call(this.currentLayer.shapePropertyPath)?this.currentLayer.shapePropertyPath:[this.currentLayer.shapePropertyPath],s=0;s<r.length;s++)if(!t.isNullOrUndefined(o.property)){l=r[s];break}if(i.setAttribute("aria-label",t.isNullOrUndefined(o.property)?"":o.property[l]),i.setAttribute("tabindex",(this.mapObject.tabIndex+n+3).toString()),"LineString"!==a&&"MultiLineString"!==a||i.setAttribute("style","outline:none"),z(this.mapObject.selectedElementId,this.mapObject.shapeSelectionClass,i,"ShapeselectionMapStyle"),this.mapObject.toggledShapeElementId)for(s=0;s<this.mapObject.toggledShapeElementId.length;s++){var d=this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings?this.currentLayer.shapeSettings:this.mapObject.legendSettings.toggleLegendSettings;this.mapObject.toggledShapeElementId[s]===i.id&&(i.setAttribute("fill",d.fill),i.setAttribute("stroke",d.border.color),i.setAttribute("fill-opacity",d.opacity.toString()),i.setAttribute("stroke-opacity",(t.isNullOrUndefined(d.border.opacity)?d.opacity:d.border.opacity).toString()),i.setAttribute("stroke-width",d.border.width.toString()))}e.appendChild(i)},e.prototype.layerFeatures=function(e,t,i,a){var o,n=this;if(this.currentLayer.bubbleSettings.length&&this.mapObject.bubbleModule)for(var l,r=this.currentLayer.bubbleSettings.length,s=this,d=0;d<r;d++)!function(i){l=s.currentLayer.bubbleSettings[i],o=s.mapObject.renderer.createGroup({id:s.mapObject.element.id+"_LayerIndex_"+e+"_bubble_Group_"+i});var a={min:0,max:0};s.bubbleCalculation(l,a),l.dataSource.map(function(r,s){n.renderBubble(n.currentLayer,r,t[s%t.length],a,i,s,o,e,l)}),s.groupElements.push(o)}(d);this.mapObject.markerModule&&!this.mapObject.isTileMap&&this.mapObject.zoomSettings.enable&&this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);var p=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+e+"_dataLableIndex_Group",style:"pointer-events: none;"});if(this.mapObject.dataLabelModule&&this.currentLayer.dataLabelSettings.visible){var h=[];i.map(function(t,i){n.renderLabel(n.currentLayer,e,t,p,i,a,h)}),this.groupElements.push(p)}this.mapObject.navigationLineModule&&this.groupElements.push(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer,this.currentFactor,e)),this.groupElements.map(function(e){n.layerObject.appendChild(e)}),this.mapObject.markerModule&&this.mapObject.markerModule.markerRender(this.layerObject,e,this.mapObject.isTileMap?Math.floor(this.currentFactor):this.currentFactor,null),this.translateLayerElements(this.layerObject,e),this.layerGroup.appendChild(this.layerObject)},e.prototype.renderLabel=function(e,t,i,a,o,n,l){this.mapObject.dataLabelModule.renderLabel(e,t,i,e.layerData,a,n,o,l)},e.prototype.generateMultiPolygonPath=function(e){for(var t="",i=0;i<e.length;i++)t+="M"+e[i][0].point.x+" "+e[i][0].point.y,e[i].map(function(e){t+=" L "+e.point.x+" "+e.point.y});return t},e.prototype.renderBubble=function(e,i,a,o,n,l,r,s,d){if(t.isNullOrUndefined(this.mapObject.bubbleModule)||!d.visible)return null;a=d.fill?d.fill:a,this.mapObject.bubbleModule.id=this.mapObject.element.id+"_LayerIndex_"+s+"_BubbleIndex_"+n+"_dataIndex_"+l,this.mapObject.bubbleModule.renderBubble(d,i,a,o,n,l,s,e,r,this.mapObject.bubbleModule.id)},e.prototype.getShapeColorMapping=function(e,i,a){if(a=a||e.shapeSettings.fill,0===e.shapeSettings.colorMapping.length&&t.isNullOrUndefined(e.dataSource))return a;var o=te(e.dataSource,i,e.shapeDataPath,e.shapePropertyPath,e),n=new pi(this.mapObject);return t.isNullOrUndefined(e.dataSource[o])?a:n.getShapeColorMapping(e.shapeSettings,e.dataSource[o],a)},e.prototype.generatePoints=function(e,i,a,o){var n,l,r=this,s=[];switch(e.toLowerCase()){case"polygon":(s=this.calculatePolygonBox(i[0],a,o)).length>0&&(s.property=o,s.type=e,s._isMultiPolygon=!1,this.currentLayer.layerData.push(s));break;case"multipolygon":for(var d=[],p=0;p<i.length;p++)(s=this.calculatePolygonBox(i[p][0],a,o)).length>0&&d.push(s);d.property=o,d.type=e,d._isMultiPolygon=!0,this.currentLayer.layerData.push(d);break;case"linestring":var c=t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width;i.map(function(e,t){n=e[1],l=e[0];var i=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(i,c),s.push({point:i,lat:n,lng:l})}),s.property=o,s.type=e,this.currentLayer.layerData.push(s);break;case"multilinestring":var m=t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width,u=[];i.map(function(e){s=[],e.map(function(e){n=e[1],l=e[0];var t=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,m),s.push({point:t,lat:n,lng:l})}),u.push(s)}),u.property=o,u.type=e,this.currentLayer.layerData.push(u);break;case"point":var g=(t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius;n=i[1],l=i[0];var y=h(n,l,this.currentFactor,this.currentLayer,this.mapObject);this.calculateBox(y,g),this.currentLayer.layerData.push({point:y,type:e,lat:n,lng:l,property:o});break;case"multipoint":var f=(t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius;s=[],i.map(function(e){n=e[1],l=e[0];var t=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,f),s.push({point:t,lat:n,lng:l})}),s.property=o,s.type=e,this.currentLayer.layerData.push(s);break;case"path":this.currentLayer.layerData.push({point:a.d,type:e,property:o})}},e.prototype.calculateBox=function(e,i){t.isNullOrUndefined(this.rectBounds)?this.rectBounds={min:{x:e.x-i,y:e.y-i},max:{x:e.x+i,y:e.y+i}}:(this.rectBounds.min.x=Math.min(this.rectBounds.min.x,e.x-i),this.rectBounds.min.y=Math.min(this.rectBounds.min.y,e.y-i),this.rectBounds.max.x=Math.max(this.rectBounds.max.x,e.x+i),this.rectBounds.max.y=Math.max(this.rectBounds.max.y,e.y+i))},e.prototype.calculateFactor=function(e){var t,i,a,o=1,n=this.mapObject.baseMapBounds,l=new et(this.mapObject.mapAreaRect.width,this.mapObject.mapAreaRect.height-5);if(n){var r=h(n.latitude.min,n.longitude.min,null,e,this.mapObject),s=h(n.latitude.max,n.longitude.max,null,e,this.mapObject);i=s.y-r.y,a=s.x-r.x,0!==i&&0!==a||(a=l.width/2,i=l.height)}else i=a=500;return t=i<l.height?parseFloat(Math.abs(100*Number(l.height/Number(i.toString()+"e+1"))).toString().split(".")[0])/10:l.height/i,o=a<l.width?parseFloat(Math.abs(100*Number(l.width/Number(a.toString()+"e+1"))).toString().split(".")[0])/10:l.width/a,Math.min(o,t)},e.prototype.translateLayerElements=function(e,i){var a;if(this.mapObject.translateType="layer",t.isNullOrUndefined(this.mapObject.baseMapRectBounds)){if(this.mapObject.isTileMap&&!t.isNullOrUndefined(this.mapObject.scale))for(var o=0;o<e.childElementCount;o++)if(!((a=e.childNodes[o]).id.indexOf("_Markers_Group")>-1||a.id.indexOf("_bubble_Group")>-1||a.id.indexOf("_dataLableIndex_Group")>-1||a.id.indexOf("_line_Group")>-1)){h="scale( "+this.mapObject.scale+" ) translate( "+this.mapObject.translatePoint.x+" "+this.mapObject.translatePoint.y+" ) ";a.setAttribute("transform",h)}}else{var n=this.currentLayer.animationDuration,l=0!==n||t.isNullOrUndefined(this.mapObject.zoomModule);this.mapObject.baseTranslatePoint=this.mapObject.zoomTranslatePoint;var r=void 0;r=this.mapObject.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(this.mapObject.zoomModule)?ce(this.mapObject,this.currentLayer,l):he(this.mapObject,this.currentLayer,l);var s=this.mapObject.previousScale=r.scale,d=this.mapObject.previousPoint=r.location;this.mapObject.baseTranslatePoint=this.mapObject.translatePoint=d,this.mapObject.baseScale=this.mapObject.scale=s;for(var p=0;p<e.childElementCount;p++)if(!((a=e.childNodes[p]).id.indexOf("_Markers_Group")>-1||a.id.indexOf("_bubble_Group")>-1||a.id.indexOf("_dataLableIndex_Group")>-1)){var h="scale( "+s+" ) translate( "+d.x+" "+d.y+" ) ";a.setAttribute("transform",h),n>0&&!t.isNullOrUndefined(this.mapObject.zoomModule)&&(r=this.mapObject.zoomSettings.zoomFactor>1?ce(this.mapObject,this.currentLayer):he(this.mapObject,this.currentLayer),this.mapObject.scale=r.scale,this.mapObject.zoomTranslatePoint=this.mapObject.translatePoint=r.location)}}},e.prototype.calculateRectBounds=function(e){var i=this;Array.prototype.forEach.call(e,function(e,a){if(!t.isNullOrUndefined(e.geometry)||!t.isNullOrUndefined(e.coordinates)){var o=t.isNullOrUndefined(e.geometry)?e.type:e.geometry.type,n=t.isNullOrUndefined(e.geometry)?e.coordinates:e.geometry.coordinates;switch(o.toLowerCase()){case"polygon":i.calculateRectBox(n[0]);break;case"multipolygon":n.map(function(e,t){i.calculateRectBox(e[0])});break;case"multilinestring":n.map(function(e,t){e.map(function(e,t){i.calculateRectBox(e,"multilinestring",0===t)})});break;case"linestring":n.map(function(e,t){i.calculateRectBox(e,"linestring",0===t)});break;case"point":i.calculateRectBox(n,"point");break;case"multipoint":n.map(function(e,t){i.calculateRectBox(e,"multipoint",0===t)})}}})},e.prototype.calculatePolygonBox=function(e,i,a){var o=this,n=[],l=this.mapObject.baseMapBounds;return e.map(function(e,i){var a=e[1],r=e[0];if(r>=l.longitude.min&&r<=l.longitude.max&&a>=l.latitude.min&&a<=l.latitude.max){var s=h(a,r,o.currentFactor,o.currentLayer,o.mapObject);t.isNullOrUndefined(o.rectBounds)?o.rectBounds={min:{x:s.x,y:s.y},max:{x:s.x,y:s.y}}:(o.rectBounds.min.x=Math.min(o.rectBounds.min.x,s.x),o.rectBounds.min.y=Math.min(o.rectBounds.min.y,s.y),o.rectBounds.max.x=Math.max(o.rectBounds.max.x,s.x),o.rectBounds.max.y=Math.max(o.rectBounds.max.y,s.y)),n.push({point:s,lat:a,lng:r})}}),n},e.prototype.calculateRectBox=function(e,i,a){var o=this;"linestring"!==i&&"multilinestring"!==i&&"point"!==i&&"multipoint"!==i?Array.prototype.forEach.call(e,function(e){t.isNullOrUndefined(o.mapObject.baseMapBounds)?o.mapObject.baseMapBounds=new at({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(o.mapObject.baseMapBounds.latitude.min=Math.min(o.mapObject.baseMapBounds.latitude.min,e[1]),o.mapObject.baseMapBounds.latitude.max=Math.max(o.mapObject.baseMapBounds.latitude.max,e[1]),o.mapObject.baseMapBounds.longitude.min=Math.min(o.mapObject.baseMapBounds.longitude.min,e[0]),o.mapObject.baseMapBounds.longitude.max=Math.max(o.mapObject.baseMapBounds.longitude.max,e[0]))}):(a||"point"===i)&&t.isNullOrUndefined(this.mapObject.baseMapBounds)?this.mapObject.baseMapBounds=new at({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(this.mapObject.baseMapBounds.latitude.min=Math.min(this.mapObject.baseMapBounds.latitude.min,e[1]),this.mapObject.baseMapBounds.latitude.max=Math.max(this.mapObject.baseMapBounds.latitude.max,e[1]),this.mapObject.baseMapBounds.longitude.min=Math.min(this.mapObject.baseMapBounds.longitude.min,e[0]),this.mapObject.baseMapBounds.longitude.max=Math.max(this.mapObject.baseMapBounds.longitude.max,e[0]))},e.prototype.generateTiles=function(e,i,a,o,n){var l=this.mapObject.locale,r=this.mapObject.availableSize;this.tiles=[];var s,d;s=d=Math.pow(2,e);var p=0,h=0;i.x+256*s<r.width&&(p=i.x>0?Math.ceil(i.x/256):0,h=i.x+256*s<r.width?Math.ceil((r.width-(i.x+256*s))/256):0),s+=p+h,"Pan"===a?(s=this.horizontalPanXCount>=s?this.horizontalPanXCount:s,this.horizontalPan=!1):(this.horizontalPanXCount=s,this.horizontalPan=!0);var c=this.mapObject.layers[this.mapObject.baseLayerIndex];this.urlTemplate=c.urlTemplate;var m=Math.min(d,(-i.y+r.height)/256+1),u=Math.min(s,(-i.x+r.width+256*h)/256+1),g=-(i.x+256*p+256)/256,y=-(i.y+256)/256;o=o||this.bing||this.mapObject.bingMap;for(var f=Math.round(g);f<Math.round(u);f++)for(var b=Math.round(y);b<Math.round(m);b++){var v=256*f+i.x,S=256*b+i.y;if(v>-256&&v<=r.width&&S>-256&&S<r.height&&b>=0){var x=f;f<0&&(x=x%d+d);var O=new Qt(x%d,b);if(O.left=v,O.top=S,"Bing"===c.layerType||o&&!t.isNullOrUndefined(c.urlTemplate)&&""!==c.urlTemplate){var M=c.key;O.src=o.getBingMap(O,M,c.bingMapType,l,o.imageUrl,o.subDomains)}else O.src=this.urlTemplate.replace("level",e.toString()).replace("tileX",O.x.toString()).replace("tileY",O.y.toString());this.tiles.push(O)}}t.isNullOrUndefined(a)||(a.indexOf("wheel")>1?(this.animateToZoomX=this.mapObject.availableSize.width/2-n.x-10,this.animateToZoomY=-n.y):(this.animateToZoomX=-10,this.animateToZoomY=10-(this.mapObject.availableSize.height/2+11.5)));for(var _=t.extend([],this.tiles,[],!0),L=0,C=this.mapObject.layers;L<C.length;L++){var w=C[L];if("SubLayer"===w.type&&w.visible&&("Geometry"!==w.layerType&&"GoogleStaticMap"!==w.layerType||"Geometry"===w.layerType&&t.isNullOrUndefined(w.shapeData)&&!t.isNullOrUndefined(w.urlTemplate)&&""!==w.urlTemplate))for(var P=0,I=_;P<I.length;P++){var T=I[P],N=t.extend({},T,{},!0);"Bing"===w.layerType?(o=new di(this.mapObject),N.src=o.getBingMap(N,w.key,w.bingMapType,l,o.imageUrl,o.subDomains)):N.src=w.urlTemplate.replace("level",e.toString()).replace("tileX",T.x.toString()).replace("tileY",T.y.toString()),this.tiles.push(N)}}(this.mapObject.previousScale!==this.mapObject.scale||this.mapObject.isReset)&&this.arrangeTiles(a,this.animateToZoomX,this.animateToZoomY)},e.prototype.arrangeTiles=function(e,i,a){var o,n=this,l=document.getElementById(this.mapObject.element.id+"_tile_parent"),r=document.getElementById(this.mapObject.element.id+"_tiles");t.isNullOrUndefined(e)||"Pan"===e?o=0:(this.tileAnimation(e,i,a),o=this.mapObject.layersCollection[0].animationDuration),"GoogleStaticMap"===this.mapObject.layers[this.mapObject.baseLayerIndex].layerType?this.renderGoogleMap(this.mapObject.layers[0].key,this.mapObject.staticMapZoom):setTimeout(function(){l&&(l.style.zIndex="1"),r&&(r.style.zIndex="0");var i;!document.getElementById(n.mapObject.element.id+"_animated_tiles")&&l?(i=t.createElement("div",{id:n.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):"Pan"!==e&&r&&l?(r.appendChild(l.children[0]),t.isNullOrUndefined(document.getElementById(n.mapObject.element.id+"_animated_tiles"))||(document.getElementById(n.mapObject.element.id+"_animated_tiles").id=n.mapObject.element.id+"_animated_tiles_old"),i=t.createElement("div",{id:n.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):i=l?l.children[0]:null;for(var a=0,o=0,s=n.tiles;o<s.length;o++)!function(o){var l=t.createElement("img");l.setAttribute("height","256px"),l.setAttribute("width","256px"),l.setAttribute("src",o.src);var r=n.mapObject.element.id;l.onload=function(){document.getElementById(r+"_tile_"+a)&&"Pan"===e&&de(r+"_tile_"+a);var s=t.createElement("div",{id:r+"_tile_"+a});s.style.position="absolute",s.style.left=o.left+"px",s.style.top=o.top+"px",s.style.height=o.height+"px",s.style.width=o.width+"px",s.appendChild(l),i&&i.appendChild(s),++a===n.tiles.length&&document.getElementById(n.mapObject.element.id+"_animated_tiles_old")&&de(n.mapObject.element.id+"_animated_tiles_old")}}(s[o])},o)},e.prototype.tileAnimation=function(e,i,a){var o=document.getElementById(this.mapObject.element.id+"_tile_parent"),n=document.getElementById(this.mapObject.element.id+"_animated_tiles"),l=document.getElementById(this.mapObject.element.id+"_tiles"),r="2";if(0===e.indexOf("ZoomOut")||"Reset"===e){for(l.style.zIndex="1",o.style.zIndex="0";l.childElementCount>=1;)l.removeChild(l.children[0]);i=0,a=document.getElementById(this.mapObject.element.id+"_tile_parent").getClientRects()[0].height/4,r=0===e.indexOf("ZoomOut")?"0.5":"0.2"}t.isNullOrUndefined(n)||(n.style.transition=this.mapObject.layersCollection[0].animationDuration+"ms",n.style.transform="translate("+i+"px, "+a+"px) scale("+r+")")},e.prototype.renderGoogleMap=function(e,i){var a=this.mapObject;i=this.mapObject.tileZoomLevel;var o=256*Math.pow(2,i),n=a.mapAreaRect.width/2-o/2,l=a.mapAreaRect.height/2-o/2,r=0,s=0,d=c(new tt(null,null),i,{x:n,y:l},this.isMapCoordinates);a.zoomModule&&a.zoomSettings.enable&&(r=a.zoomModule.mouseDownLatLong.x-a.zoomModule.mouseMoveLatLong.x,s=a.zoomModule.mouseDownLatLong.y-a.zoomModule.mouseMoveLatLong.y);var p=a.pointToLatLong(d.x-r,d.y-s);a.centerPosition.latitude=p.latitude,a.centerPosition.longitude=p.longitude;var h,m;h=t.isNullOrUndefined(parseInt(a.width,10))?parseInt(a.width,10)-22:Math.round(a.mapAreaRect.width),m=t.isNullOrUndefined(parseInt(a.height,10))?parseInt(a.height,10)-22:Math.round(a.mapAreaRect.height);var u,g=h>640?(h-640)/2:0,y=m>640?(m-640)/2:0,f=a.layers[a.layers.length-1].staticMapType.toString().toLowerCase(),b="https://maps.googleapis.com/maps/api/staticmap?size="+h+"x"+m+"&zoom="+i+"¢er="+(u=a.centerPosition.latitude&&a.centerPosition.longitude?a.centerPosition.latitude.toString()+","+a.centerPosition.longitude.toString():"0,0")+"&maptype="+f+"&key="+e;document.getElementById(this.mapObject.element.id+"_tile_parent").innerHTML='<div id="'+this.mapObject.element.id+'_StaticGoogleMap"style="position:absolute; left:'+g+"px; top:"+y+'px"><img src="'+b+'"></div>'},e.prototype.panTileMap=function(e,i,a){this.mapObject.tileZoomLevel<=this.mapObject.tileZoomScale&&this.mapObject.initialCheck&&(this.mapObject.tileZoomLevel=this.mapObject.tileZoomScale);var o,n,l=this.mapObject.tileZoomLevel,r="GoogleStaticMap"!==this.mapObject.layers[this.mapObject.layers.length-1].layerType?20:0,s=256*Math.pow(2,l),d=c(a,l,{x:o=e/2-s/2,y:n=i/2-s/2},this.isMapCoordinates);if(r=this.mapObject.zoomNotApplied?0:r,o-=d.x-e/2,n=n-(d.y-i/2)+r,this.mapObject.scale=Math.pow(2,l-1),(t.isNullOrUndefined(this.mapObject.tileTranslatePoint)||0===this.mapObject.tileTranslatePoint.y&&0===this.mapObject.tileTranslatePoint.x||t.isNullOrUndefined(this.mapObject.previousTileWidth)||t.isNullOrUndefined(this.mapObject.previousTileHeight))&&(this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i),!t.isNullOrUndefined(this.mapObject.tileTranslatePoint)&&t.isNullOrUndefined(a.x)&&(1===this.mapObject.zoomSettings.zoomFactor||this.mapObject.zoomSettings.zoomFactor!==l||!this.mapObject.defaultState)&&(e!==this.mapObject.previousTileWidth||i!==this.mapObject.previousTileHeight)){var p=o-(this.mapObject.previousTileWidth/2-s/2),h=n-(this.mapObject.previousTileHeight/2-s/2+r);this.mapObject.tileTranslatePoint.x=this.mapObject.tileTranslatePoint.x+p,this.mapObject.tileTranslatePoint.y=this.mapObject.tileTranslatePoint.y+h}return t.isNullOrUndefined(this.mapObject.tileTranslatePoint)||this.mapObject.zoomNotApplied||(0===this.mapObject.tileTranslatePoint.x||this.mapObject.tileTranslatePoint.x===o||this.mapObject.centerPositionChanged||(o=this.mapObject.tileTranslatePoint.x),0===this.mapObject.tileTranslatePoint.y||this.mapObject.tileTranslatePoint.y===n||this.mapObject.centerPositionChanged||(n=this.mapObject.tileTranslatePoint.y)),this.mapObject.translatePoint=new tt((o-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale,(n-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale),this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i,new tt(o,n)},e}(),ci=function(){function e(e){this.map=e}return e.prototype.renderAnnotationElements=function(){var e=this,i=this.map.element.id+"_Secondary_Element",a=t.createElement("div",{id:this.map.element.id+"_Annotations_Group"});a.style.position="absolute",a.style.top="0px",a.style.left="0px",this.map.annotations.map(function(t,i){null!==t.content&&e.createAnnotationTemplate(a,t,i)}),a.childElementCount>0&&!t.isNullOrUndefined(ue(i))&&ue(i).appendChild(a),this.map.renderReactTemplates()},e.prototype.createAnnotationTemplate=function(e,i,a){var o,n,l,r,s=this,d=this.map,p=d.availableSize,h=(d.element.id,t.createElement("div",{id:d.element.id+"_Annotation_"+a,styles:"position: absolute; z-index:"+i.zIndex+";"})),c={cancel:!1,name:"annotationRendering",content:i.content,annotation:i};this.map.trigger("annotationRendering",c,function(e){if(!c.cancel)if((l=fe(c.content,s.map))&&l(s.map,s.map,c.content,s.map.element.id+"_ContentTemplate_"+a).length)for(var i=(r=Array.prototype.slice.call(l(s.map,s.map,c.content,s.map.element.id+"_ContentTemplate_"+a))).length,o=0;o<i;o++)h.appendChild(r[o]);else h.appendChild(t.createElement("div",{innerHTML:c.content}))});var m=Ae(h.cloneNode(!0),d.element),u=d.element.getBoundingClientRect(),g=d.svgObject.getBoundingClientRect();o=Math.abs(g.left-u.left),n=Math.abs(g.top-u.top);var y=i.x.indexOf("%")>-1?p.width/100*parseFloat(i.x):parseFloat(i.x),f=i.y.indexOf("%")>-1?p.height/100*parseFloat(i.y):parseFloat(i.y);switch(o="None"===i.horizontalAlignment?o+y:o,n="None"===i.verticalAlignment?n+f:n,i.verticalAlignment){case"Near":n+=f;break;case"Center":n=n+f+(g.height/2-m.height/2);break;case"Far":n=n+g.height+f-m.height}switch(i.horizontalAlignment){case"Near":o+=y;break;case"Center":o=o+y+(g.width/2-m.width/2);break;case"Far":o=o+g.width+y-m.width}h.style.left=o+"px",h.style.top=n+"px",e.appendChild(h)},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),mi=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function a(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}(),ui=function(e,t,i,a){var o,n=arguments.length,l=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,a);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(l=(n<3?o(l):n>3?o(t,i,l):o(t,i))||l);return n>3&&l&&Object.defineProperty(t,i,l),l},gi=function(e){function o(i,a){var o=e.call(this,i,a)||this;return o.isTileMap=!1,o.isResize=!1,o.isReset=!1,o.baseSize=new et(0,0),o.translatePoint=new tt(0,0),o.baseTranslatePoint=new tt(0,0),o.zoomTranslatePoint=new tt(0,0),o.markerZoomedState=!0,o.zoomPersistence=!1,o.defaultState=!0,o.centerPositionChanged=!1,o.isTileMapSubLayer=!1,o.markerNullCount=0,o.tileTranslatePoint=new tt(0,0),o.baseTileTranslatePoint=new tt(0,0),o.isDevice=!1,o.staticMapZoom=o.zoomSettings.enable?o.zoomSettings.zoomFactor:0,o.zoomNotApplied=!1,o.dataLabelShape=[],o.zoomShapeCollection=[],o.zoomLabelPositions=[],o.mouseDownEvent={x:null,y:null},o.mouseClickEvent={x:null,y:null},o.selectedElementId=[],o.selectedMarkerElementId=[],o.selectedBubbleElementId=[],o.selectedNavigationElementId=[],o.selectedLegendElementId=[],o.legendSelectionCollection=[],o.shapeSelections=!0,o.legendSelection=!0,o.toggledLegendId=[],o.toggledShapeElementId=[],o.checkInitialRender=!0,o.initialTileTranslate=new tt(0,0),o.initialCheck=!0,o.applyZoomReset=!1,o.markerClusterExpandCheck=!1,o.markerClusterExpand=!1,o.shapeSelectionItem=[],t.setValue("mergePersistData",o.mergePersistMapsData,o),o}return mi(o,e),Object.defineProperty(o.prototype,"isShapeSelected",{get:function(){return this.mapSelect},enumerable:!0,configurable:!0}),o.prototype.mergePersistMapsData=function(){var e,i;try{i=window.localStorage}catch(e){i=null}if(t.isNullOrUndefined(i)||(e=window.localStorage.getItem(this.getModuleName()+this.element.id)),!t.isNullOrUndefined(e)&&""!==e){var a=JSON.parse(e),o=Object.keys(a);this.isProtectedOnChange=!0;for(var n=0,l=o;n<l.length;n++){var r=l[n];"object"!=typeof this[r]||t.isNullOrUndefined(this[r])?this[r]=a[r]:t.extend(this[r],a[r])}this.isProtectedOnChange=!1}},o.prototype.getLocalizedLabel=function(e){return this.localeObject.getConstant(e)},o.prototype.preRender=function(){this.isDevice=t.Browser.isDevice,this.initPrivateVariable(),this.allowServerDataBinding=!1,this.unWireEVents(),this.wireEVents(),this.setCulture()},o.prototype.renderElements=function(){this.trigger("load",{maps:this}),this.createSVG(),this.findBaseAndSubLayers(),this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=Qe(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),this.renderArea(),this.processRequestJsonData(),this.renderComplete()},o.prototype.render=function(){this.renderElements()},o.prototype.processRequestJsonData=function(){var e=this,i=this.layersCollection.length-1;this.serverProcess={request:0,response:0};var o,n;Array.prototype.forEach.call(this.layersCollection,function(l,r){if(l.shapeData instanceof a.DataManager?(e.serverProcess.request++,n=l.shapeData,o=l.query instanceof a.Query?l.query:new a.Query,(s=n.executeQuery(o)).then(function(t){e.processResponseJsonData("DataManager",t,l,"ShapeData")})):(l.shapeData instanceof yt||l.shapeData)&&(t.isNullOrUndefined(l.shapeData.dataOptions)||e.processAjaxRequest(l,l.shapeData,"ShapeData")),l.dataSource instanceof a.DataManager){e.serverProcess.request++,n=l.dataSource,o=l.query instanceof a.Query?l.query:new a.Query;var s=n.executeQuery(o);s.then(function(e){l.dataSource=Ye(e)})}if(l.markerSettings.length>0)for(d=0;d<l.markerSettings.length;d++)!function(t){l.markerSettings[t].dataSource instanceof a.DataManager&&(e.serverProcess.request++,n=l.markerSettings[t].dataSource,o=l.markerSettings[t].query instanceof a.Query?l.markerSettings[t].query:new a.Query,n.executeQuery(o).then(function(e){l.markerSettings[t].dataSource=Ye(e)}))}(d);if(l.bubbleSettings.length>0)for(var d=0;d<l.bubbleSettings.length;d++)!function(t){l.bubbleSettings[t].dataSource instanceof a.DataManager&&(e.serverProcess.request++,n=l.bubbleSettings[t].dataSource,o=l.bubbleSettings[t].query instanceof a.Query?l.bubbleSettings[t].query:new a.Query,n.executeQuery(o).then(function(e){l.bubbleSettings[t].dataSource=Ye(e)}))}(d);(l.dataSource instanceof yt||!t.isNullOrUndefined(l.dataSource.dataOptions))&&e.processAjaxRequest(l,l.dataSource,"DataSource"),e.serverProcess.request===e.serverProcess.response&&i===r&&e.processResponseJsonData(null)})},o.prototype.processAjaxRequest=function(e,i,a){var o=this;this.serverProcess.request++;var n=new t.Ajax(i.dataOptions,i.type,i.async,i.contentType);n.onSuccess=function(t){o.processResponseJsonData("Ajax",t,e,a)},n.send(i.sendData)},o.prototype.processResponseJsonData=function(e,i,a,o){if(this.serverProcess.response++,e&&("ShapeData"===o?a.shapeData="DataManager"===e?Ye(i):JSON.parse(i):a.dataSource="DataManager"===e?Ye(i):JSON.parse("["+i+"]")[0]),t.isNullOrUndefined(e)||this.serverProcess.request!==this.serverProcess.response)t.isNullOrUndefined(e)&&this.renderMap();else{var n=this.layersCollection;this.layersCollection=[];for(var l=0;l<n.length;l++)n[l].isBaseLayer&&this.layersCollection.push(n[l]);for(var r=0;r<n.length;r++)n[r].isBaseLayer||this.layersCollection.push(n[r]);this.renderMap()}},o.prototype.renderMap=function(){this.legendModule&&this.legendSettings.visible&&this.legendModule.renderLegend(),this.createTile(),this.zoomSettings.enable&&this.zoomModule&&this.zoomModule.createZoomingToolbars(),t.isNullOrUndefined(this.dataLabelModule)||(this.dataLabelModule.dataLabelCollections=[],this.dataLabelShape=[]),this.mapLayerPanel.measureLayerPanel(),this.element.appendChild(this.svgObject);for(var e=this.getExtraPosition(),i=0;i<this.layers.length;i++){if(0!==e.x||0!==e.y){var a=document.getElementById(this.element.id+"_LayerIndex_"+i+"_Markers_Template_Group");t.isNullOrUndefined(a)||(a.style.top=this.mapAreaRect.y+e.y+"px",a.style.left=this.mapAreaRect.x+e.x+"px")}if(this.layers[i].selectionSettings&&this.layers[i].selectionSettings.enable&&this.layers[i].initialShapeSelection.length>0&&this.checkInitialRender){var o=this.layers[i].selectionSettings.enableMultiSelect;this.layers[i].selectionSettings.enableMultiSelect=o||!0;for(var n=this.layers[i].initialShapeSelection,l=0;l<this.layers[i].initialShapeSelection.length;l++)this.shapeSelection(i,n[l].shapePath,n[l].shapeValue,!0);this.layers[i].selectionSettings.enableMultiSelect=o,i===this.layers.length-1&&(this.checkInitialRender=!1)}if(!this.isResize)for(var r=0;r<this.layers[i].markerSettings.length;r++)if(this.layers[i].markerSettings[r].selectionSettings&&this.layers[i].markerSettings[r].selectionSettings.enable&&this.layers[i].markerSettings[r].initialMarkerSelection.length>0)for(var s=this.layers[i].markerSettings[r].initialMarkerSelection,l=0;l<s.length;l++)this.markerInitialSelection(i,r,this.layers[i].markerSettings[r],s[l].latitude,s[l].longitude)}if(!t.isNullOrUndefined(document.getElementById(this.element.id+"_tile_parent"))){var d,p=this.svgObject.getBoundingClientRect(),h=document.getElementById(this.element.id),c=document.getElementById(this.element.id+"_tile_parent"),m=document.getElementById(this.element.id+"_tiles"),u=c.getBoundingClientRect(),g=void 0,y=void 0;y=parseFloat(c.style.left)+h.offsetLeft;var f=x(this.titleSettings.text,this.titleSettings.textStyle),b=x(this.titleSettings.subtitleSettings.text,this.titleSettings.subtitleSettings.textStyle);this.isTileMap&&this.isTileMapSubLayer&&"Bottom"===this.legendSettings.position&&this.legendSettings.visible?"Default"!==this.legendSettings.mode?d=0!==f.width&&0!==f.height?parseFloat(c.style.top)+h.offsetTop+b.height/2-this.legendModule.legendBorderRect.height/2:parseFloat(c.style.top)+h.offsetTop-this.mapAreaRect.y:(y=this.legendModule.legendBorderRect.x,d=0!==f.width&&0!==f.height?parseFloat(c.style.top)+h.offsetTop+b.height/2-this.legendModule.legendBorderRect.y:parseFloat(c.style.top)+h.offsetTop+b.height/2):(g=p.bottom-u.bottom-h.offsetTop,d=parseFloat(c.style.top)+h.offsetTop),d=g<=11?d:t.isNullOrUndefined(this.legendModule)||"Bottom"!==this.legendSettings.position?2*d:this.mapAreaRect.y,y=g<=11?y:t.isNullOrUndefined(this.legendModule)?2*y:y,c.style.top=d+"px",c.style.left=y+"px",m.style.top=d+"px",m.style.left=y+"px",!t.isNullOrUndefined(this.legendModule)&&this.legendModule.totalPages.length>0&&(c.style.height=m.style.height=this.legendModule.legendTotalRect.height+"px",c.style.width=m.style.width=this.legendModule.legendTotalRect.width+"px")}this.arrangeTemplate(),this.annotationsModule&&"0px"!==this.width&&"0px"!==this.height&&"0%"!==this.width&&"0%"!==this.height&&this.annotationsModule.renderAnnotationElements(),this.element.style.outline="none";for(i=0;i<document.getElementsByTagName("path").length-1;i++)document.getElementsByTagName("path")[i].id.indexOf("shapeIndex")>-1&&(document.getElementsByTagName("path")[i].style.outline="none");this.zoomingChange(),this.trigger("loaded",{maps:this,isResized:this.isResize}),this.isResize=!1},o.prototype.markerSelection=function(e,t,i,a){var o={color:e.border.color,width:e.border.width/t.scale,opacity:e.border.opacity},n={opacity:e.opacity,fill:e.fill,border:o,target:i.id,cancel:!1,data:a,maps:t};be("MarkerselectionMap")?Le("MarkerselectionMap","MarkerselectionMapStyle",n):document.body.appendChild(_e("MarkerselectionMap","MarkerselectionMapStyle",n)),(0===this.selectedMarkerElementId.length||e.enableMultiSelect)&&("g"===i.tagName?(i.children[0].setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.children[0].id)):(i.setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.id)))},o.prototype.markerInitialSelection=function(e,t,i,a,o){var n=i.selectionSettings;if(n.enable)for(var l=0;l<i.dataSource.length;l++){var r=i.dataSource[l];if(r.latitude===a&&r.longitude===o){var s=this.element.id+"_LayerIndex_"+e+"_MarkerIndex_"+t+"_dataIndex_"+l;this.markerSelection(n,this,be(s),r)}}},o.prototype.renderArea=function(){var e=this.mapsArea.border.width,i=this.mapsArea.background;if(e>0||i||this.themeStyle.areaBackgroundColor){var a={opacity:t.isNullOrUndefined(this.mapsArea.border.opacity)?1:this.mapsArea.border.opacity,color:this.mapsArea.border.color,width:this.mapsArea.border.width},o=new rt(this.element.id+"_MapAreaBorder",i||this.themeStyle.areaBackgroundColor,a,1,this.mapAreaRect);this.svgObject.appendChild(this.renderer.drawRectangle(o))}},o.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"Maps Element"),this.element.setAttribute("tabindex",this.tabIndex.toString())},o.prototype.zoomingChange=function(){var e,i;if(ue(this.element.id+"_Layer_Collections")&&this.zoomModule&&(this.zoomModule.layerCollectionEle=ue(this.element.id+"_Layer_Collections")),this.isTileMap&&ue(this.element.id+"_Tile_SVG")&&ue(this.element.id+"_tile_parent")){var a=ue(this.element.id+"_tile_parent"),o=ue(this.element.id+"_Tile_SVG"),n=ue(this.element.id+"_Tile_SVG_Parent"),l=a.getBoundingClientRect(),r=o.getBoundingClientRect();e=l.left-r.left,i=l.top-r.top,n.style.left=e+"px",n.style.top=i+"px",!t.isNullOrUndefined(this.legendModule)&&this.legendModule.totalPages.length>0&&(a.style.width=o.style.width=this.legendModule.legendTotalRect.width.toString(),a.style.height=o.style.height=this.legendModule.legendTotalRect.height.toString(),n.style.width=this.legendModule.legendTotalRect.width+"px",n.style.height=this.legendModule.legendTotalRect.height+"px");var s=document.getElementsByClassName("template");if(!t.isNullOrUndefined(s)&&s.length>0)for(h=0;h<s.length;h++){var d=s[h];d.style.left=e+"px",d.style.top=i+"px"}}if(this.zoomSettings.zoomFactor>=0){this.zoomModule&&this.zoomModule.toolBarGroup&&this.zoomSettings.enable&&this.zoomModule.alignToolBar();var p=document.getElementById(this.element.id+"_Layer_Collections");if(!t.isNullOrUndefined(p)&&p.childElementCount>0)for(var h=0;h<p.childNodes.length;h++){var c=p.childNodes[h];if("g"===c.tagName&&-1==c.id.indexOf("_Legend_Group"))for(var m=parseFloat(c.id.split("_LayerIndex_")[1].split("_")[0]),u=0;u<c.childNodes.length;u++){var g=c.childNodes[u];g.id.indexOf("_Markers_Group")>-1||g.id.indexOf("_bubble_Group")>-1||g.id.indexOf("_dataLableIndex_Group")>-1||ze(g,m,this.scale,this)}}this.zoomModule&&this.previousScale!==this.scale&&this.zoomModule.applyTransform(!0)}},o.prototype.createSecondaryElement=function(){if(t.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))){var e=t.createElement("div",{id:this.element.id+"_Secondary_Element",styles:"position: absolute;z-index:2;"});this.element.appendChild(e)}},o.prototype.arrangeTemplate=function(){document.getElementById(this.element.id+"_Legend_Border")&&(document.getElementById(this.element.id+"_Legend_Border").style.pointerEvents="none");var e=document.getElementsByClassName(this.element.id+"_template");if(!t.isNullOrUndefined(e)&&e.length>0&&ue(this.element.id+"_Layer_Collections")&&!this.isTileMap)for(var i=0;i<e.length;i++){var a=0,o=0,n=e[i];if(!t.isNullOrUndefined(n)&&n.childElementCount>0){var l=ue(this.element.id+"_Layer_Collections").getBoundingClientRect(),r=ue(n.id).getBoundingClientRect();-1===n.id.indexOf("Marker")&&(a=this.isTileMap?0:l.left<r.left?-Math.abs(r.left-l.left):Math.abs(r.left-l.left),o=this.isTileMap?0:l.top<r.top?-Math.abs(r.top-l.top):Math.abs(r.top-l.top));for(var s=0;s<n.childElementCount;s++){var d=n.childNodes[s];if(-1!==d.id.indexOf("Marker")){var p=ue(d.id).getBoundingClientRect();d.style.left=parseFloat(d.style.left)-(this.isTileMap?0:p.width/2)+"px",d.style.top=parseFloat(d.style.top)-(this.isTileMap?0:p.height/2)+"px"}else d.style.left=parseFloat(d.style.left)+a+"px",d.style.top=parseFloat(d.style.top)+o+"px",d.style.transform="translate(-50%, -50%)"}}}},o.prototype.createTile=function(){var e=this.layersCollection[0];if(e.isBaseLayer&&("OSM"===e.layerType||"Bing"===e.layerType||"GoogleStaticMap"===e.layerType||"Google"===e.layerType||!t.isNullOrUndefined(e.urlTemplate)&&""!==e.urlTemplate)){de(this.element.id+"_tile_parent"),de(this.element.id+"_tiles"),de("animated_tiles");var i=t.createElement("div",{id:this.element.id+"_tile_parent",styles:"position: absolute; left: "+this.mapAreaRect.x+"px; right: "+this.margin.right+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;"}),a=t.createElement("div",{id:this.element.id+"_tiles",styles:"position: absolute; left: "+this.mapAreaRect.x+"px; right: "+this.margin.right+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;"});this.element.appendChild(i),this.element.appendChild(a)}},o.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-maps").length;this.element.id="maps_control_"+e}this.renderer=new i.SvgRenderer(this.element.id),this.mapLayerPanel=new hi(this)},o.prototype.findBaseAndSubLayers=function(){var e=this,i=this.baseLayerIndex,a=[],o=[];this.layersCollection=[],Array.prototype.forEach.call(this.layers,function(e){"Layer"===e.type?a.push(e):o.push(e)});for(var n=0;n<a.length;n++){var l=a[n];if(l.visible&&i===n){l.isBaseLayer=!0,this.isTileMap=!("Geometry"===l.layerType&&!t.isNullOrUndefined(l.shapeData)),this.layersCollection.push(l);break}if(n===a.length-1){this.layersCollection.push(a[0]);break}}o.map(function(t,i){t.visible&&e.layersCollection.push(t)})},o.prototype.renderBorder=function(){var e=this.border.width,i=this.svgObject.querySelector("#"+this.element.id+"_MapBorder");if((e>0||this.background||this.themeStyle.backgroundColor)&&t.isNullOrUndefined(i)){var a={opacity:t.isNullOrUndefined(this.border.opacity)?1:this.border.opacity,color:this.border.color,width:this.border.width},o=new rt(this.element.id+"_MapBorder",this.background||this.themeStyle.backgroundColor,a,1,new ut(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e));this.svgObject.appendChild(this.renderer.drawRectangle(o))}else i.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},o.prototype.renderTitle=function(e,i,a,o){var n,l={size:e.textStyle.size,color:e.textStyle.color,fontFamily:e.textStyle.fontFamily,fontWeight:e.textStyle.fontWeight,fontStyle:e.textStyle.fontStyle,opacity:e.textStyle.opacity},r=Math.abs(this.margin.left+this.margin.right-this.availableSize.width);if(l.fontFamily=t.isNullOrUndefined(l.fontFamily)?this.themeStyle.fontFamily:l.fontFamily,l.fontWeight=l.fontWeight||this.themeStyle.titleFontWeight,l.size="title"===i?l.size||this.themeStyle.titleFontSize:l.size||Ke.mapsSubTitleFont.size,e.text){t.isNullOrUndefined(o)&&(o=this.renderer.createGroup({id:this.element.id+"_Title_Group"}));var s=re(r,e.text,l),d=x(s,l),p=se(t.isNullOrUndefined(a)?new ut(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):a,e.alignment,d,i),h=new ot(this.element.id+"_Map_"+i,p.x,p.y,"start",s),c=new ut(p.x,p.y,d.width,d.height);O(h,l,l.color||("title"===i?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),o).setAttribute("aria-label",this.description||e.text),("title"===i&&!e.subtitleSettings.text||"subtitle"===i)&&(n=Math.abs(c.y+this.margin.bottom-this.availableSize.height),this.mapAreaRect=new ut(this.margin.left,c.y+10,r,n-10)),"subtitle"!==i&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",c,o):this.svgObject.appendChild(o)}else n=Math.abs(this.margin.top+this.margin.bottom-this.availableSize.height),this.mapAreaRect=new ut(this.margin.left,this.margin.top,r,n)},o.prototype.createSVG=function(){this.removeSvg(),r(this)},o.prototype.removeSvg=function(){if(de(this.element.id+"_Secondary_Element"),de(this.element.id+"_tile_parent"),de(this.element.id+"_tiles"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}this.clearTemplate()},o.prototype.wireEVents=function(){t.EventHandler.add(this.element,"click",this.mapsOnClick,this),t.EventHandler.add(this.element,"dblclick",this.mapsOnDoubleClick,this),t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.mouseDownOnMap,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnMap,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEndOnMap,this),t.EventHandler.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap,this),t.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.mapsOnResize.bind(this))},o.prototype.unWireEVents=function(){t.EventHandler.remove(this.element,"click",this.mapsOnClick),t.EventHandler.remove(this.element,"dblclick",this.mapsOnDoubleClick),t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.mouseDownOnMap),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnMap),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEndOnMap),t.EventHandler.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.mapsOnResize)},o.prototype.mouseLeaveOnMap=function(e){document.getElementsByClassName("highlightMapStyle").length>0&&this.legendModule&&(this.legendModule.removeShapeHighlightCollection(),we(document.getElementsByClassName("highlightMapStyle")[0]))},o.prototype.keyUpHandler=function(e){var t=e.target.id;"Tab"===e.code&&t.indexOf("_LayerIndex_")>-1&&t.indexOf("shapeIndex")>-1?this.keyboardHighlightSelection(t,e.type):-1===t.indexOf("_LayerIndex_")&&-1===t.indexOf("shapeIndex")&&xe("highlightMapStyle").length>0&&(we(xe("highlightMapStyle")[0]),this.legendSettings.visible&&this.legendModule&&this.legendModule.removeShapeHighlightCollection())},o.prototype.keyboardHighlightSelection=function(e,i){var a=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),o=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),n=this.layers[a].shapeData.features.length>o?this.layers[a].shapeData.features[o].properties:null,l=parseInt(e.split("_dataIndex_")[1].split("_")[0],10),r=t.isNullOrUndefined(l)?null:this.layers[a].dataSource[l];this.layers[a].selectionSettings.enable&&"keydown"===i&&this.selectionModule?(this.selectionModule.selectionsettings=this.layers[a].selectionSettings,this.selectionModule.selectionType="Shape",this.selectionModule.selectElement(event.target,a,r,n)):this.highlightModule&&this.layers[a].highlightSettings.enable&&"keyup"===i&&!event.target.classList.contains("ShapeselectionMapStyle")&&(this.highlightModule.highlightSettings=this.layers[a].highlightSettings,this.highlightModule.handleHighlight(event.target,a,r,n))},o.prototype.keyDownHandler=function(e){var t=this.zoomModule;if("+"!==e.key&&"Equal"!==e.code||!t)if("-"!==e.key&&"Minus"!==e.code||!t)if(82===e.keyCode&&t)t.performZoomingByToolBar("reset");else if("ArrowUp"!==e.code&&"ArrowDown"!==e.code||!t)if("ArrowLeft"!==e.code&&"ArrowRight"!==e.code||!t){if("Enter"===e.code){var i=e.target.id;if(e.preventDefault(),this.legendModule&&(i.indexOf("_Left_Page_Rect")>-1||i.indexOf("_Right_Page_Rect")>-1)){this.mapAreaRect=this.legendModule.initialMapAreaRect,this.legendModule.currentPage=i.indexOf("_Left_Page_")>-1?this.legendModule.currentPage-1:this.legendModule.currentPage+1,this.legendModule.legendGroup=this.renderer.createGroup({id:this.element.id+"_Legend_Group"}),this.legendModule.drawLegendItem(this.legendModule.currentPage);var a=document.getElementById(this.element.id+"_Paging_Text").textContent.split("/").map(Number);i.indexOf("_Left_Page_Rect")>-1?(1!==a[0]&&e.target.focus(),e.target.style.outlineColor=a[0]-1!==a[1]?"":"transparent"):i.indexOf("_Right_Page_Rect")>-1&&(a[0]!==a[1]&&e.target.focus(),e.target.style.outlineColor=a[0]!==a[1]+1?"":"transparent"),Oe(this.element.id+"_Legend_Border",this.element.id)&&(Oe(this.element.id+"_Legend_Border",this.element.id).style.pointerEvents="none")}i.indexOf("shapeIndex")>-1&&this.keyboardHighlightSelection(i,e.type)}}else e.preventDefault(),t.mouseDownLatLong.y=0,t.mouseMoveLatLong.x=this.mapAreaRect.width/7,t.panning("None","ArrowLeft"===e.code?-t.mouseMoveLatLong.x:t.mouseMoveLatLong.x,t.mouseDownLatLong.y,e),t.mouseDownLatLong.x=t.mouseMoveLatLong.x;else e.preventDefault(),t.mouseDownLatLong.x=0,t.mouseMoveLatLong.y=this.mapAreaRect.height/7,t.panning("None",t.mouseDownLatLong.x,"ArrowUp"===e.code?-t.mouseMoveLatLong.y:t.mouseMoveLatLong.y,e),t.mouseDownLatLong.y=t.mouseMoveLatLong.y;else t.performZoomingByToolBar("zoomout");else t.performZoomingByToolBar("zoomin")},o.prototype.SelectedElement=function(e){var t=!1;return"ShapeselectionMapStyle"===e.getAttribute("class")&&(t=!0),t},o.prototype.mapsOnClick=function(e){var i=this,a=e.target,o=a.id,n=null,l=null;if(this.mouseClickEvent={x:e.x,y:e.y},-1===a.id.indexOf("_ToolBar")){var r=this.getClickLocation(o,e.pageX,e.pageY,a,e.layerX,e.layerY);t.isNullOrUndefined(r)||(n=r.latitude,l=r.longitude);var s={cancel:!1,name:ei,target:o,x:e.clientX,y:e.clientY,latitude:n,longitude:l,isShapeSelected:this.SelectedElement(a)};this.trigger("click",s,function(t){a.id.indexOf("shapeIndex")>-1&&(i.mergeCluster(),be(i.element.id+"_mapsTooltip")&&i.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&de(i.element.id+"_mapsTooltip")),i.markerModule&&i.markerModule.markerClusterClick(e),s.cancel||i.notify(ei,a),s.cancel||-1===a.id.indexOf("shapeIndex")||i.triggerShapeSelection(a)})}},o.prototype.triggerShapeSelection=function(e){var i=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),a=Se(e.id,this.layers[i].selectionSettings,this,"shapeSelected");a.cancel||!this.selectionModule||t.isNullOrUndefined(this.shapeSelected)?a.cancel&&this.selectionModule&&t.isNullOrUndefined(a.data)&&(we(e),this.selectionModule.removedSelectionList(e)):Le(this.selectionModule.selectionType+"selectionMap",this.selectionModule.selectionType+"selectionMapStyle",a)},o.prototype.getClickLocation=function(e,t,i,a,o,n){var l,r=0;if(-1===e.indexOf("_LayerIndex_")||this.isTileMap||parseInt(this.mouseDownEvent.x)!==parseInt(this.mouseClickEvent.x)||parseInt(this.mouseDownEvent.y)!==parseInt(this.mouseClickEvent.y))this.isTileMap&&parseInt(this.mouseDownEvent.x)===parseInt(this.mouseClickEvent.x)&&parseInt(this.mouseDownEvent.y)===parseInt(this.mouseClickEvent.y)&&(l=this.getTileGeoLocation(o,n));else if(r=parseFloat(e.split("_LayerIndex_")[1].split("_")[0]),"Normal"===this.layers[r].geometryType)if(e.indexOf("_shapeIndex_")>-1){var d=s(t,i,a.parentElement),p=Math.abs(-this.baseMapBounds.longitude.min*this.mapLayerPanel.currentFactor),h=Math.abs(this.baseMapBounds.latitude.max*this.mapLayerPanel.currentFactor);l={latitude:Math.abs(this.baseMapBounds.latitude.max-d.y/this.mapLayerPanel.currentFactor),longitude:Math.abs(d.x/this.mapLayerPanel.currentFactor+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&p>d.x&&(l.longitude=-l.longitude),this.baseMapBounds.latitude.min<0&&h>d.y&&(l.latitude=-l.latitude)}else if(e.indexOf("_MarkerIndex_")>-1&&this.markerModule){var c=parseInt(e.split("_MarkerIndex_")[1].split("_")[0],10),m=parseInt(e.split("_dataIndex_")[1].split("_")[0],10);if(isNaN(c)||isNaN(m))l={latitude:null,longitude:null};else{var u=this.layers[r].markerSettings[c].dataSource[m];l={latitude:u.latitude,longitude:u.longitude}}}else l={latitude:null,longitude:null};else l=this.getGeoLocation(r,o,n);return l},o.prototype.mouseEndOnMap=function(e){var i,a,o,n=e.target,l=n.id,r=null,s=null;this.element.getBoundingClientRect(),e.target;if(-1!==e.type.indexOf("touch")?(this.isTouch=!0,i=(o=e).changedTouches[0].pageX,a=o.changedTouches[0].pageY,o.target,this.mouseClickEvent={x:i,y:a}):(this.isTouch="touch"===e.pointerType,i=e.pageX,a=e.pageY,e.target),this.isTouch){if(-1===n.id.indexOf("_ToolBar")){var d=this.getClickLocation(l,i,a,n,i,a);t.isNullOrUndefined(d)||(r=d.latitude,s=d.longitude);var p={cancel:!1,name:ei,target:l,x:e.clientX,y:e.clientY,latitude:r,longitude:s,isShapeSelected:this.SelectedElement(n)};this.trigger("click",p,function(e){})}this.titleTooltip(e,i,a,!0),t.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)}return this.notify(t.Browser.touchEndEvent,e),e.cancelable&&!this.isTouch&&e.preventDefault(),!1},o.prototype.mouseDownOnMap=function(e){this.mouseDownEvent={x:e.x,y:e.y},-1!==e.type.indexOf("touch")&&e.changedTouches&&(this.mouseDownEvent={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY});this.element.getBoundingClientRect();var i=e.target;if(-1===i.id.indexOf("_ToolBar")){var a=this.markerModule;(i.id.indexOf("shapeIndex")>-1||i.id.indexOf("Tile")>-1)&&(this.mergeCluster(),i.id.indexOf("shapeIndex")>-1&&this.triggerShapeSelection(i)),a&&(a.markerClick(e),a.markerClusterClick(e)),this.bubbleModule&&this.bubbleModule.bubbleClick(e)}this.notify(t.Browser.touchStartEvent,e)},o.prototype.mergeCluster=function(){this.markerModule&&this.markerModule.sameMarkerData.length>0&&(!this.zoomModule||this.zoomModule.isSingleClick)&&(k(this.markerModule.sameMarkerData,this,be(this.element.id+"_Markers_Group")),this.markerModule.sameMarkerData=[])},o.prototype.mapsOnDoubleClick=function(e){this.notify("dblclick",e);var t,i=e.target,a=i.id,o=0,n=null,l=null;if(-1===i.id.indexOf("_ToolBar")){-1===i.id.indexOf("_LayerIndex_")||this.isTileMap||this.mouseDownEvent.x!==e.clientX||this.mouseDownEvent.y!==e.clientY?this.isTileMap&&this.mouseDownEvent.x===e.clientX&&this.mouseDownEvent.y===e.clientY&&(n=(t=this.getTileGeoLocation(e.layerX,e.layerY)).latitude,l=t.longitude):(o=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),n=(t=this.getGeoLocation(o,e.layerX,e.layerY)).latitude,l=t.longitude);var r={cancel:!1,name:"doubleClick",x:e.clientX,y:e.clientY,target:a,latitude:n,longitude:l,isShapeSelected:null};this.trigger("doubleClick",r)}},o.prototype.mouseMoveOnMap=function(e){"touchmove"===e.type?e.target:e.target,this.markerModule&&(this.markerModule.markerMove(e),this.markerModule.markerClusterMouseMove(e)),this.bubbleModule&&this.bubbleModule.bubbleMove(e),this.onMouseMove(e),this.notify(t.Browser.touchMoveEvent,e)},o.prototype.onMouseMove=function(e){e.target;return this.isTouch||(this.titleTooltip(e,e.pageX,e.pageY),t.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)),!1},o.prototype.legendTooltip=function(e,t,i,a){var o,n,l=e.target.id,r=this.legendModule.currentPage,s=e.target.id.split("_Index_")[1];r=this.legendModule.totalPages.length<=this.legendModule.currentPage?this.legendModule.totalPages.length-1:this.legendModule.currentPage<0?0:this.legendModule.currentPage;for(var d=0!==this.legendModule.totalPages.length?this.legendModule.totalPages[r].Collection.length:this.legendModule.totalPages.length,p=0;p<d;p++)o=(n=this.legendModule.totalPages[r].Collection[p]).DisplayText,l=e.target.id,s=e.target.id.split("_Index_")[1],l===this.element.id+"_Legend_Text_Index_"+s&&e.target.textContent.indexOf("...")>-1&&n.idIndex===parseInt(s,10)&&Te(o,this.legendSettings.textStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Legend_Text_Tooltip",be(this.element.id+"_Secondary_Element"),a);l!==this.element.id+"_Legend_Text_Index_"+s&&de(this.element.id+"_EJ2_Legend_Text_Tooltip")},o.prototype.titleTooltip=function(e,t,i,a){var o=e.target.id;o===this.element.id+"_LegendTitle"&&e.target.textContent.indexOf("...")>-1?Te(this.legendSettings.title.text,this.legendSettings.titleStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_LegendTitle_Tooltip",be(this.element.id+"_Secondary_Element"),a):de(this.element.id+"_EJ2_LegendTitle_Tooltip"),o===this.element.id+"_Map_title"&&e.target.textContent.indexOf("...")>-1?Te(this.titleSettings.text,this.titleSettings.textStyle.size||this.themeStyle.titleFontSize,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Title_Tooltip",be(this.element.id+"_Secondary_Element"),a):de(this.element.id+"_EJ2_Title_Tooltip")},o.prototype.mapsOnResize=function(e){var i=this;this.isResize=this.isReset=!0;var a={cancel:!1,name:"resize",previousSize:this.availableSize,currentSize:l(this),maps:this};return this.trigger("resize",a),a.cancel||(this.resizeTo&&clearTimeout(this.resizeTo),!t.isNullOrUndefined(this.element)&&this.element.classList.contains("e-maps")&&(this.resizeTo=setTimeout(function(){i.unWireEVents(),i.createSVG(),i.refreshing=!0,i.wireEVents(),i.render(),i.refreshing=!1},500))),!1},o.prototype.zoomByPosition=function(e,i){var a,o=this.mapLayerPanel.calculateFactor(this.layersCollection[0]),n=this.mapAreaRect;if(!this.isTileMap&&this.zoomModule)if(t.isNullOrUndefined(e))a={x:n.width/2,y:n.height/2},this.zoomModule.performZooming(a,i,i>this.scale?"ZoomIn":"ZoomOut");else{a=h(e.latitude,e.longitude,o,this.layersCollection[0],this);var l=document.getElementById(this.element.id+"_Layer_Collections").getBoundingClientRect(),r=this.svgObject.getBoundingClientRect(),s=Math.abs(l.left-r.left)/this.scale,d=Math.abs(l.top-r.top)/this.scale,p=this.translatePoint.x+s,c=this.translatePoint.y+d;this.scale=i,this.translatePoint.x=((l.left<r.left?p:0)+n.width/2-a.x*i)/i,this.translatePoint.y=((l.top<r.top?c:0)+n.height/2-a.y*i)/i,this.zoomModule.applyTransform()}else this.zoomModule&&(this.tileZoomLevel=i,this.tileTranslatePoint=this.mapLayerPanel.panTileMap(this.availableSize.width,this.availableSize.height,{x:e.longitude,y:e.latitude}),this.mapLayerPanel.generateTiles(i,this.tileTranslatePoint,null,new di(this)))},o.prototype.panByDirection=function(e,t){var i=0,a=0;switch(e){case"Left":i=-this.mapAreaRect.width/7;break;case"Right":i=this.mapAreaRect.width/7;break;case"Top":a=-this.mapAreaRect.height/7;break;case"Bottom":a=this.mapAreaRect.height/7}this.zoomModule&&this.zoomModule.panning(e,i,a,t)},o.prototype.addLayer=function(e){this.layers.push(new Jt(this.layers[0],"layers",e)),this.refresh()},o.prototype.removeLayer=function(e){this.layers.splice(e,1),this.refresh()},o.prototype.addMarker=function(e,t){var i=document.getElementById(this.element.id+"_LayerIndex_"+e);if(t.length>0&&i){for(var a=0,o=t;a<o.length;a++){var n=o[a];this.layersCollection[e].markerSettings.push(new Yt(this,"markerSettings",n))}new $t(this).markerRender(i,e,this.mapLayerPanel.currentFactor,"AddMarker"),this.arrangeTemplate()}},o.prototype.shapeSelection=function(e,i,a,o){var n,l,r=Array.isArray(i)?i:Array(i);t.isNullOrUndefined(o)&&(o=!0);var s=this.layers[e].selectionSettings;if(!s.enableMultiSelect&&this.legendSelection&&o&&this.removeShapeSelection(),"SubLayer"===this.layers[e].type)for(y=0;y<this.layersCollection.length;y++)if(this.layersCollection[y].shapeData===this.layers[e].shapeData){l=y;break}if(s.enable)for(var d=void 0,p=void 0,h=void 0,c=void 0,m=void 0,u=void 0,g=this.layers[e].shapeData.features,y=0;y<g.length;y++)for(var f=0;f<r.length;f++){var b=void 0;if((!t.isNullOrUndefined(g[y].properties[r[f]])&&isNaN(g[y].properties[r[f]])?g[y].properties[r[f]].toLowerCase():g[y].properties[r[f]])===(t.isNullOrUndefined(a)?a:a.toLowerCase())){t.isNullOrUndefined(this.layers[e].shapeSettings.colorValuePath)||(b=te(this.layers[e].dataSource,g[y].properties,this.layers[e].shapeDataPath,this.layers[e].shapePropertyPath,this.layers[e]));var v=this.layers[e];if(this.baseLayerIndex>=0&&v.isBaseLayer?c=0:"SubLayer"===this.layers[e].type&&(c=l),d=this.element.id+"_LayerIndex_"+c+"_shapeIndex_"+y+"_dataIndex_"+b,n=be(d),t.isNullOrUndefined(b)&&t.isNullOrUndefined(n)&&(n=be(d=this.element.id+"_LayerIndex_"+e+"_shapeIndex_"+y+"_dataIndex_null")),h=parseInt(n.id.split("_shapeIndex_")[1].split("_")[0],10),m=this.layers[e].shapeData.features.length>h?this.layers[e].shapeData.features[h].properties:null,p=parseInt(n.id.split("_dataIndex_")[1].split("_")[0],10),u=t.isNullOrUndefined(p)?null:this.layers[e].dataSource[p],o){if(Ce(s,this,n,m,u),this.shapeSelectionClass=be("ShapeselectionMap"),this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&this.legendModule.shapeHighLightAndSelection(n,u,s,"selection",e),(S=!this.legendSettings.visible||this.legendModule.shapeToggled)&&(n.setAttribute("class","ShapeselectionMapStyle"),-1===this.selectedElementId.indexOf(n.getAttribute("id"))&&this.selectedElementId.push(n.getAttribute("id")),!s.enableMultiSelect))return}else{this.legendSelection=!s.enableMultiSelect&&!this.legendSelection||this.legendSelection,this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&"ShapeselectionMapStyle"===n.getAttribute("class")&&this.legendModule.shapeHighLightAndSelection(n,u,s,"selection",e);var S=!this.legendSettings.visible||this.legendModule.shapeToggled;if(S){we(n);var x=this.selectedElementId.indexOf(n.getAttribute("id"));-1!==x&&(this.selectedElementId.splice(x,1),!s.enableMultiSelect&&this.legendSelection&&this.selectedElementId.length>0&&this.removeShapeSelection())}}}}},o.prototype.zoomToCoordinates=function(e,i,a,o){var n,l,r,s,d=!1;(t.isNullOrUndefined(a)&&t.isNullOrUndefined(o)||t.isNullOrUndefined(e)&&t.isNullOrUndefined(i))&&(e=t.isNullOrUndefined(e)?0:e,i=t.isNullOrUndefined(e)?0:i,a=t.isNullOrUndefined(a)?e:a,o=t.isNullOrUndefined(o)?i:o,d=!0),e>a&&(e=(n=[a,e])[0],a=n[1]),i>o&&(i=(l=[o,i])[0],o=l[1]),d?(r=e+a,s=i+o):(r=(e+a)/2,s=(i+o)/2),this.centerLatOfGivenLocation=r,this.centerLongOfGivenLocation=s,this.minLatOfGivenLocation=e,this.minLongOfGivenLocation=i,this.maxLatOfGivenLocation=a,this.maxLongOfGivenLocation=o,this.zoomNotApplied=!0,this.scaleOfGivenLocation=Xe(e,a,i,o,this.mapAreaRect.width,this.mapAreaRect.height,this);var p={cancel:!1,name:"zoom",type:"zoomIn",maps:this,tileTranslatePoint:{},translatePoint:{},tileZoomLevel:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{},scale:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{previous:this.scale,current:this.scaleOfGivenLocation}};this.trigger("zoom",p),this.refresh()},o.prototype.removeShapeSelection=function(){for(var e=this.selectedElementId.length,t=0;t<e;t++)we(ue(this.selectedElementId[0])),this.selectedElementId.splice(0,1);if(this.legendSettings.visible)for(var i=this.legendSelectionCollection.length,t=0;t<i;t++)we(ue(this.legendSelectionCollection[t].legendElement.id)),this.selectedLegendElementId.splice(0,1);this.shapeSelectionItem=[],this.legendSelectionCollection=[]},o.prototype.setCulture=function(){this.intl=new t.Internationalization,this.setLocaleConstants(),this.localeObject=new t.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},o.prototype.setLocaleConstants=function(){this.defaultLocalConstants={ZoomIn:"Zoom in",Zoom:"Zoom",ZoomOut:"Zoom out",Pan:"Pan",Reset:"Reset"}},o.prototype.destroy=function(){this.unWireEVents(),this.shapeSelectionItem=[],this.toggledShapeElementId=[],this.toggledLegendId=[],this.legendSelectionCollection=[],this.selectedLegendElementId=[],this.selectedNavigationElementId=[],this.selectedBubbleElementId=[],this.selectedMarkerElementId=[],this.selectedElementId=[],this.dataLabelShape=[],this.zoomShapeCollection=[],this.zoomLabelPositions=[],this.mouseDownEvent={x:null,y:null},this.mouseClickEvent={x:null,y:null},document.getElementById("mapsmeasuretext")&&document.getElementById("mapsmeasuretext").remove(),this.removeSvg(),e.prototype.destroy.call(this)},o.prototype.getModuleName=function(){return"maps"},o.prototype.getPersistData=function(){var e=["translatePoint","zoomSettings","mapScaleValue","tileTranslatePoint","baseTranslatePoint","scale","zoomPersistence","defaultState","markerZoomedState","initialCheck","initialZoomLevel","initialTileTranslate","applyZoomReset","markerZoomFactor"];return this.addOnPersist(e)},o.prototype.onPropertyChanged=function(i,a){var o=!1,n=!1,l=!1;if(i.layers){var r=Object.keys(i.layers).length;document.getElementById(this.element.id+"_LayerIndex_"+(r-1))}for(var s=0,d=Object.keys(i);s<d.length;s++){var p=d[s];switch(p){case"background":this.renderBorder();break;case"height":case"width":case"layers":case"projectionType":case"centerPosition":case"legendSettings":case"baseLayerIndex":if("layers"===p)for(var h=Object.keys(i.layers).length,c=0;c<h;c++)if(!t.isNullOrUndefined(i.layers[c]))for(var m=0,u=Object.keys(i.layers[c]);m<u.length;m++){var g=u[m];"layerType"===g&&"Geometry"!==i.layers[c].layerType||t.isNullOrUndefined(this.layers[c].shapeData)&&!t.isNullOrUndefined(this.layers[c].urlTemplate)&&""!==this.layers[c].urlTemplate?this.isReset=!0:"markerSettings"===g?n=!0:"staticMapType"===g&&(l=!0)}o=!0;break;case"zoomSettings":t.isNullOrUndefined(a.zoomSettings)||(i.zoomSettings.zoomFactor!==a.zoomSettings.zoomFactor?o=!1:i.zoomSettings.shouldZoomInitially!==a.zoomSettings.shouldZoomInitially?(this.zoomSettings.zoomFactor=1,o=!0):i.zoomSettings.enable!==a.zoomSettings.enable?(this.zoomSettings.zoomFactor=1,o=!0):o=!0);break;case"locale":case"currencyCode":e.prototype.refresh.call(this)}}o&&(i.layers&&n?(de(this.element.id+"_Markers_Group"),this.isTileMap?this.mapLayerPanel.renderTileLayer(this.mapLayerPanel,this.layers.currentFactor,this.layers.length-1):this.render()):i.layers&&l?this.mapLayerPanel.renderGoogleMap(this.layers[this.layers.length-1].key,this.staticMapZoom):(this.createSVG(),this.renderElements()))},o.prototype.requiredModules=function(){var e=[],t=this.findVisibleLayers(this.layers),i=!1;return this.annotations.map(function(e,t){i=null!=e.content}),this.isBubbleVisible()&&e.push({member:"Bubble",args:[this]}),t.highlight&&e.push({member:"Highlight",args:[this]}),t.selection&&e.push({member:"Selection",args:[this]}),this.legendSettings.visible&&e.push({member:"Legend",args:[this]}),(this.zoomSettings.enable||this.zoomSettings.zoomFactor>this.zoomSettings.minZoom)&&e.push({member:"Zoom",args:[this]}),this.isMarkersVisible()&&e.push({member:"Marker",args:[this]}),this.isDataLabelVisible()&&e.push({member:"DataLabel",args:[this]}),this.isNavigationVisible()&&e.push({member:"NavigationLine",args:[this]}),t.tooltip&&e.push({member:"MapsTooltip",args:[this]}),i&&e.push({member:"Annotations",args:[this,ci]}),this.allowPrint&&e.push({member:"Print",args:[this]}),this.allowImageExport&&e.push({member:"ImageExport",args:[this]}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this]}),e},o.prototype.isMarkersVisible=function(){var e=!1;return Array.prototype.forEach.call(this.layers,function(t,i){for(var a=0;a<t.markerSettings.length;a++)if(t.markerSettings[a].visible){e=!0;break}}),e},o.prototype.isDataLabelVisible=function(){for(var e=!1,t=0;t<this.layers.length;t++)if(this.layers[t].dataLabelSettings.visible){e=!0;break}return e},o.prototype.isNavigationVisible=function(){var e=!1;return Array.prototype.forEach.call(this.layers,function(t,i){for(var a=0;a<t.navigationLineSettings.length;a++)if(t.navigationLineSettings[a].visible){e=!0;break}}),e},o.prototype.getExtraPosition=function(){var e=0,i=0,a=be(this.element.id+"_svg");if(!t.isNullOrUndefined(a)){var o=a.getClientRects(),n=be(this.element.id+"_Secondary_Element").getClientRects();if(0!==o.length&&0!==n.length){var l=o[0],r=n[0];e=l.top-r.top,i=l.left-r.left}}return new tt(i,e)},o.prototype.isBubbleVisible=function(){for(var e=!1,t=0,i=this.layers;t<i.length;t++){var a=i[t];if(this.getBubbleVisible(a)){e=!0;break}}return e},o.prototype.getBubbleVisible=function(e){for(var t=!1,i=0,a=e.bubbleSettings;i<a.length;i++)if(a[i].visible){t=!0;break}return t},o.prototype.print=function(e){this.allowPrint&&this.printModule&&this.printModule.print(e)},o.prototype.export=function(e,i,a,o){var n=this;return t.isNullOrUndefined(o)&&(o=!0),"PDF"!==e&&this.allowImageExport&&this.imageExportModule?new Promise(function(t,a){t(n.imageExportModule.export(e,i,o))}):this.allowPdfExport&&this.pdfExportModule?new Promise(function(t,l){t(n.pdfExportModule.export(e,i,o,a))}):null},o.prototype.getBingUrlTemplate=function(e){return new Promise(function(i,a){var o=new t.Ajax({url:e});o.onSuccess=function(e){var t=JSON.parse(e).resourceSets[0].resources[0];i(t.imageUrl)},o.send()})},o.prototype.findVisibleLayers=function(e,t,i,a,o,n){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===a&&(a=!1),void 0===o&&(o=!1),void 0===n&&(n=!1);for(var l,r,s,d=0,p=e;d<p.length;d++){var h=p[d];if(t=h.visible||t,h.visible){l=h.bubbleSettings,r=h.markerSettings;for(var c=0,m=s=h.navigationLineSettings;c<m.length;c++){var u=m[c];u.visible&&(o=u.highlightSettings.enable||o,n=u.selectionSettings.enable||n)}for(var g=0,y=r;g<y.length;g++){var f=y[g];if(f.visible&&(a=f.tooltipSettings.visible||a,o=f.selectionSettings.enable||o,n=f.highlightSettings.enable||n),a)break}for(var b=0,v=l;b<v.length;b++){var S=v[b];if(S.visible&&(a=S.tooltipSettings.visible||a,o=S.selectionSettings.enable||o,n=S.highlightSettings.enable||n),a)break}a=h.tooltipSettings.visible||a,o=h.selectionSettings.enable||o,n=h.highlightSettings.enable||n}if(t&&i&&a)break}return{layer:t,bubble:i,tooltip:a,selection:o,highlight:n}},o.prototype.getGeoLocation=function(e,t,i){var a=document.getElementById(this.element.id),o=t-a.offsetLeft,n=i-a.offsetTop,l=he(this,this.layersCollection[e],!1).location,r=l.x*this.scale,s=l.y*this.scale,d=Math.min(this.mapAreaRect.height,this.mapAreaRect.width)*this.mapLayerPanel.currentFactor*this.scale,p=this.clip(o-r,0,d-1)/d-.5,h=.5-this.clip(n-s,0,d-1)/d;return{latitude:90-360*Math.atan(Math.exp(2*-h*Math.PI))/Math.PI,longitude:360*p}},o.prototype.clip=function(e,t,i){return Math.min(Math.max(e,t),i)},o.prototype.getTileGeoLocation=function(e,t){var i=document.getElementById(this.element.id),a=document.getElementById(this.element.id+"_tile_parent"),o=this.pointToLatLong(e+this.mapAreaRect.x-(a.offsetLeft-i.offsetLeft),t+this.mapAreaRect.y-(a.offsetTop-i.offsetTop));return{latitude:o.latitude,longitude:o.longitude}},o.prototype.pointToLatLong=function(e,t){var i="GoogleStaticMap"===this.layers[this.layers.length-1].layerType?0:10;t=this.zoomSettings.enable?t+i:t;var a=256*Math.pow(2,this.tileZoomLevel),o=this.clip(e-this.translatePoint.x*this.scale,0,a-1)/a-.5,n=.5-this.clip(t-this.translatePoint.y*this.scale,0,a-1)/a;return{latitude:90-360*Math.atan(Math.exp(2*-n*Math.PI))/Math.PI,longitude:360*o}},ui([t.Property(null)],o.prototype,"background",void 0),ui([t.Property(!1)],o.prototype,"useGroupingSeparator",void 0),ui([t.Property(null)],o.prototype,"format",void 0),ui([t.Property(null)],o.prototype,"width",void 0),ui([t.Property(null)],o.prototype,"height",void 0),ui([t.Property("MouseMove")],o.prototype,"tooltipDisplayMode",void 0),ui([t.Property(!1)],o.prototype,"allowPrint",void 0),ui([t.Property(!1)],o.prototype,"allowImageExport",void 0),ui([t.Property(!1)],o.prototype,"allowPdfExport",void 0),ui([t.Complex({},Zt)],o.prototype,"titleSettings",void 0),ui([t.Complex({},Vt)],o.prototype,"zoomSettings",void 0),ui([t.Complex({},Gt)],o.prototype,"legendSettings",void 0),ui([t.Collection([],Jt)],o.prototype,"layers",void 0),ui([t.Collection([],Mt)],o.prototype,"annotations",void 0),ui([t.Complex({},It)],o.prototype,"margin",void 0),ui([t.Complex({color:"#DDDDDD",width:0},Ct)],o.prototype,"border",void 0),ui([t.Property("Material")],o.prototype,"theme",void 0),ui([t.Property("Mercator")],o.prototype,"projectionType",void 0),ui([t.Property(0)],o.prototype,"baseLayerIndex",void 0),ui([t.Property(null)],o.prototype,"description",void 0),ui([t.Property(1)],o.prototype,"tabIndex",void 0),ui([t.Complex({latitude:null,longitude:null},wt)],o.prototype,"centerPosition",void 0),ui([t.Complex({},Kt)],o.prototype,"mapsArea",void 0),ui([t.Event()],o.prototype,"load",void 0),ui([t.Event()],o.prototype,"beforePrint",void 0),ui([t.Event()],o.prototype,"loaded",void 0),ui([t.Event()],o.prototype,"click",void 0),ui([t.Event()],o.prototype,"doubleClick",void 0),ui([t.Event()],o.prototype,"rightClick",void 0),ui([t.Event()],o.prototype,"resize",void 0),ui([t.Event()],o.prototype,"tooltipRender",void 0),ui([t.Event()],o.prototype,"legendRendering",void 0),ui([t.Event()],o.prototype,"tooltipRenderComplete",void 0),ui([t.Event()],o.prototype,"shapeSelected",void 0),ui([t.Event()],o.prototype,"itemSelection",void 0),ui([t.Event()],o.prototype,"itemHighlight",void 0),ui([t.Event()],o.prototype,"shapeHighlight",void 0),ui([t.Event()],o.prototype,"layerRendering",void 0),ui([t.Event()],o.prototype,"shapeRendering",void 0),ui([t.Event()],o.prototype,"markerRendering",void 0),ui([t.Event()],o.prototype,"markerClusterRendering",void 0),ui([t.Event()],o.prototype,"markerClick",void 0),ui([t.Event()],o.prototype,"markerClusterClick",void 0),ui([t.Event()],o.prototype,"markerClusterMouseMove",void 0),ui([t.Event()],o.prototype,"markerMouseMove",void 0),ui([t.Event()],o.prototype,"dataLabelRendering",void 0),ui([t.Event()],o.prototype,"bubbleRendering",void 0),ui([t.Event()],o.prototype,"bubbleClick",void 0),ui([t.Event()],o.prototype,"bubbleMouseMove",void 0),ui([t.Event()],o.prototype,"animationComplete",void 0),ui([t.Event()],o.prototype,"annotationRendering",void 0),ui([t.Event()],o.prototype,"zoom",void 0),ui([t.Event()],o.prototype,"pan",void 0),o=ui([t.NotifyPropertyChanges],o)}(t.Component),yi=function(){function e(e){this.id="",this.maps=e,this.bubbleCollection=[]}return e.prototype.renderBubble=function(e,i,a,o,n,l,r,s,d,p){var h,c,m=this,u=s.layerData,g=e.colorValuePath,y=t.isNullOrUndefined(g)?i[g]:g.indexOf(".")>-1?P(i,e.colorValuePath):i[g],f=t.isNullOrUndefined(g)?Number(i[g]):g.indexOf(".")>-1?Number(P(i,e.colorValuePath)):Number(i[g]),b=t.isNullOrUndefined(e.valuePath)?Number(i[e.valuePath]):e.valuePath.indexOf(".")>-1?Number(P(i,e.valuePath)):Number(i[e.valuePath]);if(isNaN(b)&&isNaN(f)&&t.isNullOrUndefined(y))return null;var v=oe(e.minRadius,e.maxRadius,b,o.min,o.max),S=new pi(this.maps).getColorByValue(e.colorMapping,f,y);c="[object Object]"!==Object.prototype.toString.call(S)||t.isNullOrUndefined(S.fill)?a:S.fill,h="[object Object]"!==Object.prototype.toString.call(S)||t.isNullOrUndefined(S.opacity)?e.opacity:S.opacity;var x=[[]];this.maps.translateType="bubble";for(var O=0,M=0,_=0,L=0,C=u.length;L<C;L++){var w=u[L];w=w.property;var I=ie(i[s.shapeDataPath],s.shapePropertyPath,w);if((!t.isNullOrUndefined(i[s.shapeDataPath])&&isNaN(i[s.shapeDataPath])?i[s.shapeDataPath].toLowerCase():i[s.shapeDataPath])===(!t.isNullOrUndefined(w[I])&&isNaN(w[I])?w[I].toLowerCase():w[I])&&"LineString"!==u[L].type&&"MultiLineString"!==u[L].type&&"Point"!==u[L].type&&"MultiPoint"!==u[L].type)if(u[L]._isMultiPolygon)for(var T=u[L],N=0;N<T.length;N++)x.push(this.getPoints(T[N],[])),M<(_=x[x.length-1].length)&&(M=_,O=x.length-1);else x.push(this.getPoints(u[L],[])),M<(_=x[x.length-1].length)&&(M=_,O=x.length-1)}var k,F,E=this.maps.projectionType,A={color:e.border.color,opacity:e.border.opacity,width:e.border.width},B=ne(x[O],E,s.geometryType);if(e.visible){if(t.isNullOrUndefined(B)){var j=x.length-1;if(!x[j].x||!x[j].y)return;F={cancel:!1,name:"bubbleRendering",border:A,cx:x[j].x,cy:x[j].y,data:i,fill:c,maps:this.maps,radius:v}}else k="Mercator"===this.maps.projectionType?B.y:-B.y,F={cancel:!1,name:"bubbleRendering",border:A,cx:B.x,cy:k,data:i,fill:c,maps:this.maps,radius:v};this.maps.trigger("bubbleRendering",F,function(i){if(!F.cancel){var a;if(F.border.opacity=t.isNullOrUndefined(F.border.opacity)?h:F.border.opacity,"Circle"===e.bubbleType){var o=new st(p,F.fill,F.border,h,0,0,F.radius,null);a=U(m.maps,o,d)}else{var c="Mercator"===m.maps.projectionType?F.cy-v:F.cy+v,u=new rt(p,F.fill,F.border,h,new ut(0,0,2*v,2*v),2,2);F.cx-=v,F.cy=c,a=R(m.maps,u,d)}z(m.maps.selectedBubbleElementId,m.maps.bubbleSelectionClass,a,"BubbleselectionMapStyle"),m.bubbleCollection.push({LayerIndex:r,BubbleIndex:n,DataIndex:l,element:a,center:{x:F.cx,y:F.cy}});var g,y=0!==s.animationDuration||t.isNullOrUndefined(m.maps.zoomModule);g=m.maps.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(m.maps.zoomModule)?ce(m.maps,s,y):he(m.maps,s,y);var f=e.dataSource,b=g.scale,S=g.location,x=new mt(m.maps.isTileMap?F.cx:(F.cx+S.x)*b,m.maps.isTileMap?F.cy:(F.cy+S.y)*b);a.setAttribute("transform","translate( "+x.x+" "+x.y+" )");var O=f.length-1===l?"bubble":null;"Square"===e.bubbleType?(x.x+=v,x.y+=v*("Mercator"===m.maps.projectionType?1:-1)):v=0,e.animationDuration>0&&Pe(a,e.animationDelay,e.animationDuration,x,m.maps,O,v)}})}},e.prototype.getPoints=function(e,i){return t.isNullOrUndefined(e.map)?i=e.point:e.map(function(e,t){i.push(new tt(e.point.x,e.point.y))}),i},e.prototype.bubbleClick=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")){var a=this.getbubble(i);if(!t.isNullOrUndefined(a)){var o={cancel:!1,name:"bubbleClick",data:a,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger("bubbleClick",o)}}},e.prototype.getbubble=function(e){var t=e.split("_LayerIndex_"),i=parseInt(t[1].split("_")[0],10),a=this.maps.layers[i];if(e.indexOf("_BubbleIndex_")>-1){var o=parseInt(t[1].split("_BubbleIndex_")[1],10),n=parseInt(t[1].split("_BubbleIndex_")[1].split("_dataIndex_")[1],10);if(!isNaN(o))return a.bubbleSettings[o].dataSource[n]}return null},e.prototype.bubbleMove=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")){var a=this.getbubble(i);if(!t.isNullOrUndefined(a)){var o={cancel:!1,name:"bubbleMouseMove",data:a,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger("bubbleMouseMove",o)}}},e.prototype.getModuleName=function(){return"Bubble"},e.prototype.destroy=function(e){},e}(),fi=function(){function e(e){this.value={rightWidth:0,leftWidth:0,heightTop:0,heightBottom:0},this.maps=e,this.dataLabelCollections=[]}return e.prototype.getDataLabel=function(e,i,a,o){for(var n,l,r=0;r<e.length;r++){var s=e[r],d=!t.isNullOrUndefined(s[o])&&isNaN(s[o])?s[o].toLowerCase():s[o];if(a=t.isNullOrUndefined(a)?a:a.toString(),l=t.isNullOrUndefined(a)?a:a.toLowerCase(),d===l){n=s;break}}return n},e.prototype.renderLabel=function(e,i,a,o,n,l,r,s){var d,p,h,c,m,u,g,y,f=this,b=e.dataLabelSettings,v=e.dataLabelSettings.textStyle,S=e.dataLabelSettings,M=e.dataLabelSettings.labelPath,_=[[]],L=0,w=0,P=a,I="",T=0,N=!1,k=a.properties,F=this.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_LabelIndex_"+r,E=new tt(0,0),A=o[r];v.fontFamily="material"!==this.maps.theme.toLowerCase()?this.maps.themeStyle.labelFontFamily:v.fontFamily,a=A.property;var z,B,j="[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)?e.shapePropertyPath:[e.shapePropertyPath],U=0!==e.animationDuration||t.isNullOrUndefined(this.maps.zoomModule),R=this.maps.isTileMap?new Object:this.maps.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(this.maps.zoomModule)?ce(this.maps,e,U):he(this.maps,e,U),D=this.maps.isTileMap?this.maps.scale:R.scale,Z=this.maps.isTileMap?this.maps.translatePoint:R.location,V=this.maps.zoomTranslatePoint,H=t.isNullOrUndefined(this.maps.scale)?1:Math.floor(this.maps.scale),G=this.maps.zoomSettings.enable?!t.isNullOrUndefined(this.maps.zoomShapeCollection)&&this.maps.zoomShapeCollection.length>0:this.maps.zoomSettings.enable;this.maps.translateType="labels";for(q=0;q<j.length&&!(k[j[q]]&&(z=j[q],c=this.getDataLabel(e.dataSource,e.shapeDataPath,P.properties[z],e.shapeDataPath)));q++);if(c=this.getDataLabel(e.dataSource,e.shapeDataPath,P.properties[z],e.shapeDataPath),!t.isNullOrUndefined(A.property))if(_=[[]],o[r]._isMultiPolygon||"Point"===o[r].type||"MultiPoint"===o[r].type){if("Point"!==o[r].type&&"MultiPoint"!==o[r].type)for(var W=o[r],q=0;q<W.length;q++)_.push(this.getPoint(W[q],[])),w<(T=_[_.length-1].length)&&(w=T,L=_.length-1)}else _.push(this.getPoint(o[r],[])),w<(T=_[_.length-1].length)&&(w=T,L=_.length-1);if(I=t.isNullOrUndefined(c)?P.properties[M]:t.isNullOrUndefined(c[M])?c[e.shapeDataPath]:c[M].toString(),"[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)&&t.isNullOrUndefined(I)&&0===e.dataSource.length)for(var X=0;X<e.shapePropertyPath.length;X++)if(P.properties[e.shapePropertyPath[X]]){I=P.properties[e.shapePropertyPath[X]];break}t.isNullOrUndefined(I)&&""!==e.dataLabelSettings.template&&0===e.dataSource.length&&(I=P.properties[e.shapePropertyPath]);var Y=I,J=this.maps.projectionType,Q=u=ne(_[L],J,e.geometryType);if(!t.isNullOrUndefined(I)&&!t.isNullOrUndefined(u)){if(G&&H>1&&!this.maps.zoomNotApplied&&""===b.template){if(i>0)for(var K=0;K<this.maps.zoomLabelPositions.length;K++)if(this.maps.zoomLabelPositions[K].dataLabelText===I){m=r,r=K,N=!0;break}g=u.x,y=u.y,u.x=(u.x+V.x)*D,u.y=(u.y+V.y)*D}u.y="Mercator"===this.maps.projectionType||"Normal"===e.geometryType?u.y:-u.y,t.isNullOrUndefined(this.maps.format)||isNaN(parseFloat(I))||this.maps.useGroupingSeparator&&(I=ye(this.maps,parseFloat(I)),t.isNullOrUndefined(c)||(c[M]=I));var $={name:"dataLabelRendering",maps:this.maps,cancel:!1,border:{color:b.border.color,width:b.border.width,opacity:b.border.opacity},datalabel:b,fill:b.fill,template:b.template,text:I};this.maps.trigger("dataLabelRendering",$,function(a){if(!$.cancel){var o=[],b=G&&H>1&&!f.maps.zoomNotApplied&&f.maps.zoomShapeCollection.length>r?f.maps.zoomShapeCollection[r].width:(u.rightMax.x-u.leftMax.x)*D;t.isNullOrUndefined(f.maps.dataLabelShape)||(B=Q.rightMax.x-Q.leftMax.x,f.maps.dataLabelShape.push(B)),$.text===I||$.cancel||(I=$.text);var M=x(I,v),w=I,T=M,k=u.y-M.height/4,A=u.y+M.height/4,z=(u.y+Z.y)*D-M.height/4,j=(u.y+Z.y)*D+M.height/4;if((o=ae(_[L],k,A)).length>5&&"MultiPolygon"!==P.geometry.type&&"MultiPolygon"!==P.type){var U=ne(o,J,e.geometryType);G&&H>1&&!f.maps.zoomNotApplied&&""===$.template&&(U.x=(f.maps.zoomLabelPositions[r].location.x+V.x)*D,U.y=(f.maps.zoomLabelPositions[r].location.y+V.y)*D),g=U.x,u.x=U.x,b=G&&H>1&&!f.maps.zoomNotApplied&&f.maps.zoomShapeCollection.length>r?f.maps.zoomShapeCollection[r].width:(U.rightMax.x-U.leftMax.x)*D}var R=(u.x+Z.x)*D+M.width/2,W=(u.x+Z.x)*D-M.width/2;f.value[r]={rightWidth:R,leftWidth:W,heightTop:z,heightBottom:j};var q;if(""!==$.template){var X=(d=fe($.template,f.maps))?d(t.isNullOrUndefined(c)?P.properties:c,f.maps,$.template,f.maps.element.id+"_LabelTemplate",!1):document.createElement("div");X.innerHTML=d?"":$.template,(q=C(X,F,t.isNullOrUndefined(c)?P.properties:c,r,f.maps)).style.left=Math.abs(f.maps.baseMapRectBounds.min.x-u.x)*D+"px",q.style.top=Math.abs(f.maps.baseMapRectBounds.min.y-u.y)*D+"px",l.appendChild(q)}else{if("Trim"===S.smartLabelMode&&(T=x(w=re(b,"number"==typeof I?I.toString():I,v),v),p=new ot(F,E.x,E.y,"middle",w,"","")),"None"===S.smartLabelMode&&(p=new ot(F,E.x,E.y,"middle",I,"","")),"Hide"===S.smartLabelMode&&(I=b>=M.width?I:"",p=new ot(F,E.x,E.y,"middle",I,"","")),I=p.text,"Hide"===S.intersectionAction){for(var K=0;K<s.length;K++)if(!t.isNullOrUndefined(s[K])&&!(f.value[r].leftWidth>s[K].rightWidth||f.value[r].rightWidth<s[K].leftWidth||f.value[r].heightTop>s[K].heightBottom||f.value[r].heightBottom<s[K].heightTop)){I="";break}s.push(f.value[r]),p=new ot(F,E.x,E.y,"middle",I,"","")}if("Trim"===S.intersectionAction){for(var ee=0;ee<s.length;ee++)if(!t.isNullOrUndefined(s[ee]))if(s[ee].rightWidth<f.value[r].leftWidth||s[ee].leftWidth>f.value[r].rightWidth||s[ee].heightBottom<f.value[r].heightTop||s[ee].heightTop>f.value[r].heightBottom)w=I,0;else{if(f.value[r].leftWidth>s[ee].leftWidth){w=re((b=s[ee].rightWidth-f.value[r].leftWidth)-(f.value[r].rightWidth-f.value[r].leftWidth),I,v);break}if(f.value[r].leftWidth<s[ee].leftWidth){b=f.value[r].rightWidth-s[ee].leftWidth,w=re(Math.abs(b-(f.value[r].rightWidth-f.value[r].leftWidth)),I,v);break}}T=x(w,v),s.push(f.value[r]),p=new ot(F,E.x,E.y,"middle",w,"","")}if("None"===S.intersectionAction&&(p=new ot(F,E.x,E.y,"middle",I,"","")),w.length>1){var te=$.border;if(te.width>1){var ie=$.fill,oe=S.opacity,le=S.rx,se=S.ry,de=void 0,pe=void 0;G&&H>1&&!f.maps.zoomNotApplied?(de=u.x-M.width/2,pe=u.y-M.height/2-5):(de=(u.x+Z.x)*D-M.width/2,pe=(u.y+Z.y)*D-M.height/2),te.opacity=t.isNullOrUndefined(te.opacity)?oe:te.opacity;var he=new rt(f.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_rectIndex_"+r,ie,te,oe,new ut(de,pe,M.width,M.height),le,se),ce=f.maps.renderer.drawRectangle(he);n.appendChild(ce)}}h=O(p,v,v.color||f.maps.themeStyle.dataLabelFontColor,n),G&&H>1&&!f.maps.zoomNotApplied?(h.setAttribute("transform","translate( "+u.x+" "+u.y+" )"),u.x=g,u.y=y):h.setAttribute("transform","translate( "+(u.x+Z.x)*D+" "+((u.y+Z.y)*D+T.height/4)+" )"),n.appendChild(h)}f.dataLabelCollections.push({location:{x:u.x,y:u.y},element:t.isNullOrUndefined(q)?h:q,layerIndex:i,shapeIndex:N?m:r,labelIndex:N?m:r,dataLabelText:Y}),l.childElementCount>0&&!f.maps.element.contains(l)&&(document.getElementById(f.maps.element.id+"_Secondary_Element").appendChild(l),f.maps.renderReactTemplates())}})}},e.prototype.getPoint=function(e,t){return"MultiLineString"===e.type?e.map(function(e){e.map(function(e){t.push(new tt(e.point.x,e.point.y))})}):e.map(function(e,i){t.push(new tt(e.point.x,e.point.y))}),t},e.prototype.getModuleName=function(){return"DataLabel"},e.prototype.destroy=function(e){},e}(),bi=function(){function e(e){this.maps=e}return e.prototype.renderNavigation=function(e,i,a){for(var o,n,l,r,s,d,p,m,u,g,y,f,b,v,S,x,O,M,_,L,C,w=e.navigationLineSettings,P=[],I=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+a+"_line_Group"}),T=0;T<w.length;T++){if(l=w[T].properties.latitude,n=w[T].properties.longitude,r=w[T].properties.visible,s=w[T].angle,d=w[T].width||1,p=w[T].color,m=w[T].properties.dashArray,v=w[T].properties.arrowSettings,y=!t.isNullOrUndefined(v)&&v.properties.showArrow,n.length===l.length&&r)for(var N=0;N<n.length;N++){var k=this.maps.isTileMap?c(new tt(n[N],l[N]),i,this.maps.tileTranslatePoint,!0):h(l[N],n[N],i,e,this.maps);P.push(k)}L=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+a+"_NavigationGroup"+T});for(var F=0;F<P.length-1;F++){s=1<(s=-1>s?-1:s)?1:s;var E=this.maps.element.id+"_LayerIndex_"+a+"_NavigationIndex_"+T+"_Line"+F,A=this.convertRadius(P[F],P[F+1]);if(s<=1&&s>0&&(g=0,P[F].x>P[F+1].x&&(g=1)),s>=-1&&s<0&&(g=1,P[F].x>P[F+1].x&&(g=0)),P[F].x!==P[F+1].x){if(y){f=v.properties.color,b=v.properties.size,_=void 0===v.properties.offSet?0:v.properties.offSet;var B=Math.round(b/2);x="Start"===(S=v.properties.position)?"url(#triangle"+T+")":null,O="End"===S?"url(#triangle"+T+")":null,0!==M&&0===s&&(M="Start"===S?_:-_),M=t.isNullOrUndefined(M)?0:M;var j=this.maps.element.id+"_triangle",U=this.maps.renderer.createDefs();U.innerHTML+='<marker id="triangle'+T+'"></marker>';var R=U.querySelector("#triangle"+T);R.setAttribute("markerWidth",b.toString()),R.setAttribute("markerHeight",b.toString()),R.setAttribute("refX",(B-M).toString()),R.setAttribute("refY",B.toString()),R.setAttribute("orient","auto"),u=new nt(j,f,d,p,1,1,m,"M 0,0 L 0,"+b+" L "+B+", "+B+" Z"),o=this.maps.renderer.drawPath(u),R.appendChild(o),U.appendChild(R),L.appendChild(U)}if(s=Math.abs(s),C=0===s?"M "+P[F].x+","+P[F].y+"L "+P[F+1].x+","+P[F+1].y+" ":"M "+P[F].x+","+P[F].y+" A "+(A/2+(1-s)*A/(10*s))+" "+(A/2+(1-s)*A/(10*s))+" 0,0,"+g+" , "+P[F+1].x+","+P[F+1].y+" ",u=new nt(E,"none",d,p,1,1,m,C),o=this.maps.renderer.drawPath(u),!t.isNullOrUndefined(S))"Start"===S?o.setAttribute("marker-start",x):o.setAttribute("marker-end",O);z(this.maps.selectedNavigationElementId,this.maps.navigationSelectionClass,o,"navigationlineselectionMapStyle"),L.appendChild(o),I.appendChild(L)}}P=[]}return I},e.prototype.convertRadius=function(e,t){var i=t.x-e.x,a=t.y-e.y;return Math.sqrt(Math.pow(i,2)+Math.pow(a,2))},e.prototype.getModuleName=function(){return"NavigationLine"},e.prototype.destroy=function(e){},e}(),vi=function(){function e(e){this.legendBorderRect=new ut(0,0,0,0),this.initialMapAreaRect=new ut(0,0,0,0),this.legendTotalRect=new ut(0,0,0,0),this.totalPages=[],this.page=0,this.currentPage=0,this.legendItemRect=new ut(0,0,0,0),this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.shapePreviousColor=[],this.selectedNonLegendShapes=[],this.shapeToggled=!0,this.legendElement=null,this.maps=e,this.addEventListener()}return e.prototype.renderLegend=function(){this.legendRenderingCollections=[],this.legendCollection=[],this.totalPages=[],this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.maps.renderer.createDefs(),this.maps.svgObject.appendChild(this.defsElement),this.initialMapAreaRect=this.maps.mapAreaRect,this.calculateLegendBounds(),this.drawLegend()},e.prototype.calculateLegendBounds=function(){var e=this,i=this.maps,a=i.legendSettings;this.legendCollection=[];var o=i.mapAreaRect.y;if(this.legendRenderingCollections=[],Array.prototype.forEach.call(i.layersCollection,function(i,o){if(!t.isNullOrUndefined(i.shapeData)){var n=i.shapeData.features,l=i.shapeDataPath,r=i.shapePropertyPath,s=i.dataSource,d=void 0,p=void 0;if("Layers"===a.type&&i.visible)d=i.shapeSettings.colorValuePath,p=i.shapeSettings.colorMapping,e.getLegends(o,n,p,s,l,d,r);else if("Bubbles"===a.type)for(var h=0,c=i.bubbleSettings;h<c.length;h++){var m=c[h];m.visible&&(d=m.colorValuePath,p=m.colorMapping,s=m.dataSource,e.getLegends(o,n,p,s,l,d,r))}}"Markers"===a.type&&e.getMarkersLegendCollections(o,i.markerSettings)}),this.legendCollection.length>0)for(R=0;R<this.legendCollection.length;R++){var n={name:"legendRendering",cancel:!1,fill:(H=this.legendCollection[R]).fill,shape:a.shape,shapeBorder:a.shapeBorder,text:"number"==typeof H.text?H.text.toString():H.text};i.trigger("legendRendering",n),H.fill=n.fill,H.shape=n.shape,H.shapeBorder=n.shapeBorder,H.text=n.text,n.cancel&&(this.legendCollection.splice(R,1),R--)}var l=i.legendSettings.title.text,r=i.legendSettings.titleStyle;if(this.legendCollection.length>0){var s,d,p=a.mode,h=0,c=0,m=0,u=0,g=a.shapePadding,y=a.shapeHeight,f=a.shapeWidth,b=[],v=[],S=a.position,O=a.labelDisplayMode,M="None"===a.orientation?"Top"===S||"Bottom"===S?"Horizontal":"Vertical":a.orientation,_=a.width.length>1?a.width.indexOf("%")>-1?i.availableSize.width/100*parseInt(a.width,10):parseInt(a.width,10):null,L=a.height.length>1?a.height.indexOf("%")>-1?i.availableSize.height/100*parseInt(a.height,10):parseInt(a.height,10):null,C=0,w=0,P=x(l,r);if("Interactive"===p){var I=a.textStyle,T=this.legendCollection.length,N="Horizontal"===M?t.isNullOrUndefined(_)?i.mapAreaRect.width/T:_/T:t.isNullOrUndefined(_)?25:_,k="Horizontal"===M?t.isNullOrUndefined(L)?25:L:t.isNullOrUndefined(L)?i.mapAreaRect.height/T:L/T;C=0,w=P.height+10;for(var F=a.labelPosition,E=0,A=0,z=0,B=0,j=0,U=0,R=0;R<this.legendCollection.length;R++){C="Horizontal"===M?C+N:C,w="Horizontal"===M?w:w+k;var D=this.legendCollection[R].text,Z=new et(0,0);"None"===O?Z=x(D,I):"Trim"===O?Z=x(D=re("Horizontal"===M?N:k,D,I),I):D="",j=Math.max(j,Z.height),U=Math.max(U,Z.width),Z.width>0&&Z.height>0&&("Horizontal"===M?(E=C+N/2,A="After"===F?w+k+Z.height/2+10:w-10):(E="After"===F?C-Z.width/2-10:C+N+Z.width/2+10,A=w+k/2+Z.height/4)),0===R?(z="Horizontal"===M?C:"After"===F?E-Z.width/2:C,B="Horizontal"===M?"After"===F?w:A-Z.height/2:w,1===this.legendCollection.length&&(_="Horizontal"===M?Math.abs(C+N-z):N+U+10,L="Horizontal"===M?k+j/2+10:Math.abs(w+k-B))):R===this.legendCollection.length-1&&(_="Horizontal"===M?Math.abs(C+N-z):N+U+10,L="Horizontal"===M?k+j/2+10:Math.abs(w+k-B)),this.legendRenderingCollections.push({fill:this.legendCollection[R].fill,x:C,y:w,width:N,height:k,text:D,textX:E,textY:A,textWidth:Z.width,textHeight:Z.height,shapeBorder:this.legendCollection[R].shapeBorder})}1===this.legendCollection.length&&(L=k,_=N),this.legendItemRect={x:z,y:B,width:_,height:L}}else{_=t.isNullOrUndefined(_)?i.mapAreaRect.width:_,L=t.isNullOrUndefined(L)?i.mapAreaRect.height:L;var V=0;this.page=0;for(R=0;R<this.legendCollection.length;R++){var H=this.legendCollection[R];t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]});var G=x(H.text,a.textStyle);if(this.textMaxWidth=Math.max(this.textMaxWidth,G.width),0===R)C=h=10+f/2,w=c=o+P.height+(y>G.height?y/2:G.height/4);else{var W=G.height>y?G.height:y;if("Horizontal"===M){var q=v[V-1].x+v[V-1].width+10+f;if(q+g+G.width>_){var X=(v[V-1].y>b[V-1].y+y/2?v[V-1].y:b[V-1].y+y/2)+o;X+W>L?(this.getPageChanged(),V=0,b=[],v=[],h=C,c=w):(h=b[0].x,c=X+W/2)}else h=q-f/2,c=b[V-1].y}else{var Y=v[V-1].y>b[V-1].y+y/2?v[V-1].y:b[V-1].y+y/2;if(Y+o+W>L){var J=v[V-1].x+this.textMaxWidth+10;J+g+G.width>_?(h=C,c=w,v=[],b=[],this.getPageChanged(),V=0):(h=J+f/2,c=b[0].y)}else{h=b[V-1].x,c=Y+10+y/2}}}m=h+f/2+g,u=c+G.height/4,b.push({x:h,y:c}),v.push({x:m,y:u,width:G.width,height:G.height/2}),this.totalPages[this.page].Collection.push({DisplayText:H.text,ImageSrc:H.imageSrc,Shape:{x:h,y:c},Text:{x:m,y:u},Fill:H.fill,legendShape:H.shape,shapeBorder:H.shapeBorder,idIndex:R,Rect:{x:b[V].x-f/2,y:b[V].y-y/2<u-G.height?b[V].y-y/2:u-G.height,width:Math.abs(b[V].x-f/2-(m+G.width)),height:y>G.height?y:G.height}}),V++}var Q=this.totalPages[0].Collection;Array.prototype.forEach.call(Q,function(t,i){var a=new ut(t.Rect.x,t.Rect.y,t.Rect.width,t.Rect.height);0===i&&(s=a.x,d=a.y),e.widthIncrement=Math.max(e.widthIncrement,Math.abs(s-(a.x+a.width))),e.heightIncrement=Math.max(e.heightIncrement,Math.abs(d-(a.y+a.height)))}),_=this.widthIncrement<_?this.widthIncrement:_,L=this.heightIncrement<L?this.heightIncrement:L,this.legendItemRect={x:Q[0].Rect.x,y:Q[0].Rect.y,width:_,height:L}}}},e.prototype.getLegends=function(e,t,i,a,o,n,l){this.getRangeLegendCollection(e,t,i,a,o,n,l),this.getEqualLegendCollection(e,t,i,a,o,n,l),this.getDataLegendCollection(e,t,i,a,o,n,l)},e.prototype.getPageChanged=function(){this.page++,t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},e.prototype.legendTextTrim=function(e,t,i,a){var o=t,n=x(t,i).width,l=a-n;if(a>e)for(var r=t.length-1;r>=0;--r)if(l+(n=x(o=t.substring(0,r)+"...",i).width)<=e||o.length<4)return o.length<4&&(o=" "),o;return o},e.prototype.drawLegend=function(){var e,i=this.maps,a=i.legendSettings,o=i.renderer,n={size:a.textStyle.size,color:a.textStyle.color,fontFamily:a.textStyle.fontFamily,fontWeight:a.textStyle.fontWeight,fontStyle:a.textStyle.fontStyle,opacity:a.textStyle.opacity};if(this.legendGroup=o.createGroup({id:i.element.id+"_Legend_Group"}),"Interactive"===a.mode)for(var l=0;l<this.legendRenderingCollections.length;l++){var r=i.element.id+"_Legend_Index_"+l,s=i.element.id+"_Legend_Index_"+l+"_Text",d=this.legendRenderingCollections[l],p=new ut(d.x,d.y,d.width,d.height);0===l&&this.renderLegendBorder();var h=new tt(d.textX,d.textY);n.color=null!==n.color?n.color:this.maps.themeStyle.legendTextColor;var c=new rt(r,d.fill,d.shapeBorder,a.opacity,p);e=new ot(s,h.x,h.y,"middle",d.text,"",""),n.fontFamily=t.isNullOrUndefined(n.fontFamily)?this.maps.themeStyle.fontFamily:n.fontFamily,n.size=i.themeStyle.legendFontSize||n.size,O(e,n,n.color,this.legendGroup),this.legendGroup.appendChild(o.drawRectangle(c)),this.legendToggle()}else this.drawLegendItem(this.currentPage)},e.prototype.drawLegendItem=function(e){var i,a=this.maps,o=a.legendSettings,n=new et(o.shapeWidth,o.shapeHeight),l=a.renderer,r=o.shape;if(e>=0&&e<this.totalPages.length){Oe(this.legendGroup.id,this.maps.element.id)&&t.remove(Oe(this.legendGroup.id,this.maps.element.id));for(var s=0;s<this.totalPages[e].Collection.length;s++){var d=this.totalPages[e].Collection[s],p=d.shapeBorder,h=l.createGroup({id:a.element.id+"_Legend_Index_"+d.idIndex}),c=d.DisplayText,m=("Markers"===o.type?t.isNullOrUndefined(d.ImageSrc)&&o.shape:d.legendShape,"HorizontalLine"===o.shape||"VerticalLine"===o.shape||"Cross"===o.shape?t.isNullOrUndefined(o.fill)?"#000000":o.fill:p.color),u=("HorizontalLine"===o.shape||"VerticalLine"===o.shape||"Cross"===o.shape)&&0===p.width?1:p.width,g=a.element.id+"_Legend_Shape_Index_"+d.idIndex,y=a.element.id+"_Legend_Text_Index_"+d.idIndex,f=new tt(d.Shape.x,d.Shape.y-4),b=new tt(d.Text.x,d.Text.y-4),v=(t.isNullOrUndefined(d.ImageSrc)?o.shape:d.ImageSrc,new nt(g,d.Fill,u,m,o.opacity,t.isNullOrUndefined(p.opacity)?o.opacity:p.opacity,"")),S={fontFamily:o.textStyle.fontFamily,fontStyle:o.textStyle.fontStyle,fontWeight:o.textStyle.fontWeight,size:o.textStyle.size,color:o.textStyle.color,opacity:o.textStyle.opacity};if(S.color=null!==S.color?S.color:this.maps.themeStyle.legendTextColor,S.fontFamily=t.isNullOrUndefined(S.fontFamily)?this.maps.themeStyle.fontFamily:S.fontFamily,S.size=a.themeStyle.legendFontSize||S.size,0===s&&this.renderLegendBorder(),"Markers"===o.type&&o.useMarkerShape){var M=this.legendCollection[d.idIndex].data[0],_=a.layers[M.layerIndex].markerSettings[M.markerIndex];r=t.isNullOrUndefined(_.dataSource[M.dataIndex][_.shapeValuePath])||""===_.dataSource[M.dataIndex][_.shapeValuePath]?_.shape:_.dataSource[M.dataIndex][_.shapeValuePath]}"Balloon"===r?h.appendChild(K(a,v,n,{x:f.x,y:f.y+5},"Legend")):h.appendChild(Fe(f,r,n,d.ImageSrc,v));var L=d.Rect.x+d.Rect.width;if(L>this.legendBorderRect.width&&(c=this.legendTextTrim(this.legendBorderRect.width,c,S,L)),i=new ot(y,b.x,b.y,"start",c,"",""),O(i,S,S.color,h),this.legendGroup.appendChild(h),s===this.totalPages[e].Collection.length-1){var C=void 0;if(0!==this.page){var w=e+1+"/"+this.totalPages.length,P=o.textStyle,I=x(w,P),T=this.legendItemRect.x+this.legendItemRect.width-I.width-20-20+2,N=this.legendItemRect.x+this.legendItemRect.width,k=N-10-I.width/2-5-4,F=this.legendItemRect.y+this.legendItemRect.height+2.5+10;C=l.createGroup({id:a.element.id+"_Legend_Paging_Group"});var E=l.createGroup({id:a.element.id+"_Legend_Left_Paging_Group"}),A=l.createGroup({id:a.element.id+"_Legend_Right_Paging_Group"}),z=" M "+N+" "+F+" L "+(N-10)+" "+(F-5)+" L "+(N-10)+" "+(F+5)+" z ",B=" M "+T+" "+F+" L "+(T+10)+" "+(F-5)+" L "+(T+10)+" "+(F+5)+" z ",j=new nt(a.element.id+"_Left_Page","#a6a6a6",0,"#a6a6a6",e+1===1?.5:1,1,"",B);E.appendChild(l.drawPath(j));var U=new rt(a.element.id+"_Left_Page_Rect","transparent",{},1,new ut(T-5,F-10,20,20),null,null,"",""),R=l.drawRectangle(U);R.setAttribute("tabindex",(e+1===1?-1:a.tabIndex+1).toString()),E.appendChild(R),this.wireEvents(E);var D=new nt(a.element.id+"_Right_Page","#a6a6a6",0,"#a6a6a6",e+1===this.totalPages.length?.5:1,1,"",z);A.appendChild(l.drawPath(D));var Z=new rt(a.element.id+"_Right_Page_Rect","transparent",{},1,new ut(N-10-5,F-10,20,20),null,null,"","");(R=l.drawRectangle(Z)).setAttribute("tabindex",(e+1===this.totalPages.length?-1:a.tabIndex+2).toString()),A.appendChild(R),this.wireEvents(A),C.appendChild(E),C.appendChild(A);var V={id:a.element.id+"_Paging_Text",x:k,y:F+I.height/4,fill:"#a6a6a6","font-size":"14px","font-style":P.fontStyle,"font-family":P.fontFamily,"font-weight":P.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":""},H=l.createText(V,w);H.setAttribute("style","user-select: none;"),C.appendChild(H),this.legendGroup.appendChild(C)}this.legendToggle()}}}},e.prototype.legendHighLightAndSelection=function(e,i){var a,o,n,l,r,s="Default"===this.maps.legendSettings.mode?document.getElementById(e.id.replace("Shape","Text")):document.getElementById(e.id+"_Text"),d=this.maps.legendModule.legendCollection,p=!t.isNullOrUndefined(d[0].data[0].layerIndex)&&this.maps.layers[d[0].data[0].layerIndex].selectionSettings.enableMultiSelect,h=0,c=!0,m=parseFloat(e.id.charAt(e.id.length-1));this.updateLegendElement();var u=this.maps.toggledLegendId.indexOf(m);if(this.maps.legendSettings.toggleLegendSettings.enable&&"highlight"===i&&-1!==u){var g=this.getIndexofLegend(this.legendHighlightCollection,e);return-1!==g&&this.legendHighlightCollection.splice(g,1),this.removeLegendHighlightCollection(),null}if("selection"===i){if(this.shapeHighlightCollection=[],this.maps.shapeSelections||p||(this.removeAllSelections(),this.maps.shapeSelections=!0),this.maps.legendSelectionCollection.length>0&&(p||this.maps.shapeSelections))for(f=0;f<this.maps.legendSelectionCollection.length;f++){if(e===this.maps.legendSelectionCollection[f].legendElement){this.maps.legendSelectionCollection[f].legendElement=e,c=!1,this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[f].legendElement),this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(m),1),this.maps.legendSelectionCollection.splice(f,1),this.maps.legendSelection=!(this.maps.legendSelectionCollection.length>0);break}if(!p)if(this.maps.legendSelectionCollection.length>1){for(var y=0;y<this.maps.legendSelectionCollection.length;y++)this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[y].legendElement);this.maps.legendSelectionCollection=[]}else this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[f].legendElement),this.maps.legendSelectionCollection.splice(f,1)}}else{if(this.maps.legendSelectionCollection.length>0)for(var f=0;f<this.maps.legendSelectionCollection.length;f++){if((e.id.indexOf("_Legend_Shape")>-1||e.id.indexOf("_Legend_Index"))&&e===this.maps.legendSelectionCollection[f].legendElement){c=!1;break}this.removeLegendHighlightCollection()}this.removeLegendHighlightCollection()}if(c)for(var b=0;b<d.length;b++){var v="Interactive"===this.maps.legendSettings.mode?parseFloat(e.id.split("_Legend_Index_")[1]):parseFloat(e.id.split("_Legend_Shape_Index_")[1]);if(s.textContent===d[b].text&&d[b].data.length>0&&v===b){var S=this.maps.layers[d[b].data[0].layerIndex],x=void 0,O=void 0,M=void 0;if(t.isNullOrUndefined(S)||(x="selection"===i?S.selectionSettings.enable:S.highlightSettings.enable,O=void 0,O="selection"===i?S.selectionSettings:S.highlightSettings,M=d[b].data),x)for(var _=0;_<M.length;_++){var L=void 0;if(a=M[_].shapeIndex,o=M[_].layerIndex,n=M[_].dataIndex,l=M[_].pointIndex,null!==(L=-1===l?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+a+"_dataIndex_"+n):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+a+"_dataIndex_"+n+"_multiLine_"+l))){var C=!0;if(null!==this.maps.legendSelectionCollection)for(var w=0;w<this.maps.legendSelectionCollection.length;w++)if(this.maps.legendSelectionCollection[w].legendElement===e){C=!1;break}if("highlight"===i&&C){0===_&&(this.legendHighlightCollection=[],this.pushCollection(e,this.legendHighlightCollection,d[b],S.shapeSettings)),r=this.legendHighlightCollection.length;var P=this.legendHighlightCollection[r-1].legendOldFill;this.legendHighlightCollection[r-1].MapShapeCollection.Elements.push(L);var I=this.legendHighlightCollection[r-1].MapShapeCollection.Elements.length-1,T=L.getAttribute("fill");this.legendHighlightCollection[r-1].shapeOldFillColor.push(T);var N=this.legendHighlightCollection[r-1].shapeOldFillColor[I];this.shapePreviousColor=this.legendHighlightCollection[r-1].shapeOldFillColor,this.setColor(L,t.isNullOrUndefined(O.fill)?N:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"highlight"),this.setColor(e,t.isNullOrUndefined(O.fill)?P:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"highlight")}else if("selection"===i){this.legendHighlightCollection=[],this.maps.legendSelectionClass=O,0===_&&(this.pushCollection(e,this.maps.legendSelectionCollection,d[b],S.shapeSettings),p?this.maps.selectedLegendElementId.push(b):0===this.maps.selectedLegendElementId.length?this.maps.selectedLegendElementId.push(b):(this.maps.selectedLegendElementId=[],this.maps.selectedLegendElementId.push(b))),h=this.maps.legendSelectionCollection.length;var k=this.maps.legendSelectionCollection[h-1].legendOldFill;this.maps.legendSelectionCollection[h-1].MapShapeCollection.Elements.push(L),this.maps.legendSelectionCollection[h-1].shapeOldFillColor=this.shapePreviousColor,this.setColor(e,t.isNullOrUndefined(O.fill)?k:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"selection"),this.setColor(L,t.isNullOrUndefined(O.fill)?k:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"selection"),-1===this.maps.selectedElementId.indexOf(L.getAttribute("id"))&&this.maps.selectedElementId.push(L.getAttribute("id")),_===M.length-1&&(this.maps.legendSelection=!1,this.removeLegend(this.maps.legendSelectionCollection))}}}}}},e.prototype.setColor=function(e,t,i,a,o,n){var l=e.parentElement.id.indexOf("LineString")>-1;"selection"===n?(B(l?"LineselectionMap":"ShapeselectionMap",l?"LineselectionMapStyle":"ShapeselectionMapStyle",l?"transparent":t,i,l?t:a,o,this.maps),e.setAttribute("class",l?"LineselectionMapStyle":"ShapeselectionMapStyle")):(e.setAttribute("fill",l?"transparent":t),e.setAttribute("fill-opacity",i),e.setAttribute("stroke",l?t:a),e.setAttribute("stroke-width",(Number(o)/this.maps.scale).toString()))},e.prototype.pushCollection=function(e,t,i,a){t.push({legendElement:e,legendOldFill:i.fill,legendOldOpacity:i.opacity,legendOldBorderColor:i.borderColor,legendOldBorderWidth:i.borderWidth,shapeOpacity:a.opacity,shapeOldBorderColor:a.border.color,shapeOldBorderWidth:a.border.width});var o=t.length;t[o-1].MapShapeCollection={Elements:[]},t[o-1].shapeOldFillColor=[]},e.prototype.removeLegend=function(e){for(var t=0;t<e.length;t++){var i=e[t];this.setColor(i.legendElement,i.legendOldFill,i.legendOldOpacity,i.legendOldBorderColor,i.legendOldBorderWidth,"highlight");for(var a=i.MapShapeCollection.Elements.length,o=0;o<a;o++){var n=-1!==i.legendOldFill.indexOf("url")?i.shapeOldFillColor[o]:i.legendOldFill;this.setColor(i.MapShapeCollection.Elements[o],n,i.shapeOpacity,i.shapeOldBorderColor,i.shapeOldBorderWidth,"highlight")}}},e.prototype.removeLegendHighlightCollection=function(){this.legendHighlightCollection.length>0&&(this.removeLegend(this.legendHighlightCollection),this.legendHighlightCollection=[])},e.prototype.removeLegendSelectionCollection=function(e){if(this.maps.legendSelectionCollection.length>0){we(e);for(var t=this.shapesOfLegend(e),i=t.length,a=0;a<i;a++){var o=be(t[a]);if("ShapeselectionMapStyle"===o.getAttribute("class")||"LineselectionMapStyle"===o.getAttribute("class")){we(o);var n=this.maps.selectedElementId.indexOf(o.id);-1!==n&&this.maps.selectedElementId.splice(n,1)}}}},e.prototype.removeShapeHighlightCollection=function(){if(this.shapeHighlightCollection.length>0)for(var e=0;e<this.shapeHighlightCollection.length;e++){for(var t=this.shapeHighlightCollection[e],i=!0,a=0;a<this.maps.legendSelectionCollection.length;a++)this.maps.legendSelectionCollection[a].legendElement===t.legendElement&&(i=!1);i&&this.setColor(t.legendElement,t.legendOldFill,t.legendOldOpacity,t.legendOldBorderColor,t.legendOldBorderWidth,"highlight")}},e.prototype.shapeHighLightAndSelection=function(e,i,a,o,n){if(void 0!==i){this.updateLegendElement(),this.shapeToggled=!0;var l=this.maps.legendModule.legendCollection,r=this.legendIndexOnShape(i,n),s=this.shapeDataOnLegend(e),d=this.maps.toggledLegendId.indexOf(r.actualIndex);if(this.maps.legendSettings.toggleLegendSettings.enable&&-1!==d){this.shapeToggled=!1,this.legendHighlightCollection=[];var p=this.getIndexofLegend(this.shapeHighlightCollection,s.LegendEle);return-1!==p&&this.shapeHighlightCollection.splice(p,1),this.removeShapeHighlightCollection(),null}if(void 0===r.currentIndex&&void 0===r.actualIndex)return this.removeShapeHighlightCollection(),null;if(void 0!==r.currentIndex||"selection"!==o||this.maps.layers[n].selectionSettings.enableMultiSelect||"ShapeselectionMapStyle"===e.getAttribute("class")||(this.maps.legendSelection=!1),"selection"!==o||this.maps.layers[n].selectionSettings.enableMultiSelect||this.maps.legendSelection||(this.removeAllSelections(),this.maps.legendSelection=!0),void 0===r.currentIndex){if("selection"===o&&void 0!==r.actualIndex){for(var h=0,c=0;c<s.Elements.length;c++)"ShapeselectionMapStyle"===s.Elements[c].getAttribute("class")&&h++;var m=this.maps.selectedLegendElementId.indexOf(r.actualIndex);-1===m?(this.maps.selectedLegendElementId.push(r.actualIndex),this.maps.legendSelectionClass=a):h<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))&&(this.maps.layers[n].selectionSettings.enableMultiSelect?h<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))&&this.maps.selectedLegendElementId.splice(m,1):this.maps.selectedLegendElementId.splice(m,1))}return this.removeShapeHighlightCollection(),null}var u=l[r.actualIndex].text,g=void 0,y=void 0;"Default"===this.maps.legendSettings.mode?void 0!==r.currentIndex&&(g=document.getElementById(this.maps.element.id+"_Legend_Text_Index_"+r.actualIndex).textContent,y=document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+r.actualIndex)):(g=document.getElementById(this.maps.element.id+"_Legend_Index_"+r.actualIndex+"_Text").textContent,y=document.getElementById(this.maps.element.id+"_Legend_Index_"+r.actualIndex)),this.oldShapeElement=s.LegendEle;var f=this.maps.legendSelectionCollection.length;if(u===g){var b=!0;if(this.maps.legendSelectionCollection)for(c=0;c<this.maps.legendSelectionCollection.length;c++)if(this.maps.legendSelectionCollection[c].legendElement===s.LegendEle){b=!1;break}if("highlight"===o&&b){(void 0===(v=this.isTargetSelected(s,this.shapeHighlightCollection))||v&&!v.IsSelected)&&this.pushCollection(y,this.shapeHighlightCollection,l[r.actualIndex],this.maps.layers[n].shapeSettings);for(S=0;S<this.shapeHighlightCollection.length;S++)s.LegendEle.id===this.shapeHighlightCollection[S].legendElement.id&&(this.shapeHighlightCollection[S].legendElement=s.LegendEle);if(f>0)for(S=0;S<f;S++){if(s.LegendEle===this.maps.legendSelectionCollection[S].legendElement){this.maps.legendSelectionCollection[S].legendElement=s.LegendEle,this.removeShapeHighlightCollection();break}S===f-1&&(this.removeShapeHighlightCollection(),this.setColor(y,t.isNullOrUndefined(a.fill)?y.getAttribute("fill"):a.fill,a.opacity.toString(),a.border.color,a.border.width.toString(),"highlight"))}else this.removeShapeHighlightCollection(),this.setColor(y,t.isNullOrUndefined(a.fill)?y.getAttribute("fill"):a.fill,a.opacity.toString(),a.border.color,a.border.width.toString(),"highlight")}else if("selection"===o){var v=this.isTargetSelected(s,this.maps.legendSelectionCollection);if(f>0)for(var S=0;S<this.maps.legendSelectionCollection.length;)if(s.LegendEle===this.maps.legendSelectionCollection[S].legendElement||a.enableMultiSelect)S++;else{var x=this.maps.legendSelectionCollection[S],O=this.maps.selectedLegendElementId.indexOf(r.actualIndex);this.maps.selectedLegendElementId.splice(O,1),this.maps.legendSelectionCollection.splice(S,1),we(x.legendElement),this.maps.shapeSelections=!0,S=0}if(v&&v.IsSelected&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))){var x=this.maps.legendSelectionCollection[v.SelectionIndex],M=0;if(a.enableMultiSelect)for(c=0;c<s.Elements.length;c++)e.getAttribute("class")===s.Elements[c].getAttribute("class")&&M++;M<=1&&(a.enableMultiSelect||this.maps.legendSelection)&&(this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(r.actualIndex),1),t.isNullOrUndefined(s.LegendEle)||we(s.LegendEle),this.maps.legendSelectionCollection.splice(v.SelectionIndex,1),this.maps.shapeSelections=!0)}else{void 0!==v&&(!v||v.IsSelected)||t.isNullOrUndefined(y)||-1===(L=this.getIndexofLegend(this.maps.legendSelectionCollection,y))&&this.pushCollection(y,this.maps.legendSelectionCollection,l[r.actualIndex],this.maps.layers[n].shapeSettings);for(var _=!0,c=0;c<this.maps.selectedLegendElementId.length;c++)r.actualIndex===this.maps.selectedLegendElementId[c]&&(_=!1);if(_&&this.maps.selectedLegendElementId.push(r.actualIndex),this.maps.legendSelectionClass=a,this.removeLegend(this.shapeHighlightCollection),!t.isNullOrUndefined(y)){this.setColor(y,t.isNullOrUndefined(a.fill)?y.getAttribute("fill"):a.fill,a.opacity.toString(),a.border.color,a.border.width.toString(),"selection");var L=this.getIndexofLegend(this.maps.legendSelectionCollection,y);this.maps.legendSelectionCollection[L].MapShapeCollection.Elements.push(e)}this.maps.shapeSelections=!1}}else document.getElementsByClassName("highlightMapStyle").length>0&&(this.removeShapeHighlightCollection(),we(document.getElementsByClassName("highlightMapStyle")[0]))}}else this.removeShapeHighlightCollection()},e.prototype.isTargetSelected=function(e,i){for(var a,o=0;o<i.length;o++)t.isNullOrUndefined(e.LegendEle.getAttribute("id"))||e.LegendEle.getAttribute("id")!==i[o].legendElement.getAttribute("id")||(a={IsSelected:!0,SelectionIndex:o});return a},e.prototype.updateLegendElement=function(){for(var e=0;e<this.maps.legendSelectionCollection.length;e++)document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id)&&(this.maps.legendSelectionCollection[e].legendElement=document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id))},e.prototype.getIndexofLegend=function(e,t){return e.map(function(e){return e.legendElement}).indexOf(t)},e.prototype.removeAllSelections=function(){for(var e=0;e<this.maps.selectedElementId.length;e++)we(a=document.getElementById(this.maps.selectedElementId[e]));for(var i=0;i<this.maps.selectedLegendElementId.length;i++){var a=("Interactive"===this.maps.legendSettings.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_")+this.maps.selectedLegendElementId[i],o=document.getElementById(a);t.isNullOrUndefined(o)||we(document.getElementById(a))}this.maps.legendSelectionCollection=[],this.maps.selectedLegendElementId=[],this.maps.selectedElementId=[]},e.prototype.legendIndexOnShape=function(e,i){var a,o,n,l=e[this.maps.layers[i].shapeDataPath],r=this.maps.legendSettings.mode,s=this.maps.legendModule.legendCollection;"Default"!==r||t.isNullOrUndefined(this.maps.legendModule.totalPages)||(n=this.maps.legendModule.totalPages[this.maps.legendModule.currentPage].Collection);for(var d="Default"===r?n.length:1,p=0;p<s.length;p++){for(var h=s[p].data,c=0;c<d;c++)if("Default"!==r||s[p].text===n[c].DisplayText)for(m=0;m<h.length;m++)l===h[m].name&&(a=c);for(var m=0;m<h.length;m++)l===h[m].name&&(o=p)}return{currentIndex:a,actualIndex:o}},e.prototype.shapeDataOnLegend=function(e){for(var i,a,o,n,l=this.maps.legendModule.legendCollection,r=this.maps.legendSettings,s=0;s<l.length;s++){for(var d=l[s].data,p=!1,h=[],c={Elements:[]},m=0;m<d.length;m++){var u=void 0;i=d[m].shapeIndex,a=d[m].layerIndex,o=d[m].dataIndex,e===(u=-1===(n=d[m].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+a+"_shapeIndex_"+i+"_dataIndex_"+o):document.getElementById(this.maps.element.id+"_LayerIndex_"+a+"_shapeIndex_"+i+"_dataIndex_"+o+"_multiLine_"+n))&&(p=!0),h.push(u)}if(p)return t.isNullOrUndefined(c.LegendEle)&&(c.LegendEle="Default"===r.mode?document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+s):document.getElementById(this.maps.element.id+"_Legend_Index_"+s)),c.Elements=h,c}return null},e.prototype.shapesOfLegend=function(e){for(var i,a,o,n,l=parseFloat(e.id.charAt(e.id.length-1)),r=this.maps.legendModule.legendCollection[l].data,s=[],d=0;d<r.length;d++){var p=void 0;i=r[d].shapeIndex,a=r[d].layerIndex,o=r[d].dataIndex,p=-1===(n=r[d].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+a+"_shapeIndex_"+i+"_dataIndex_"+o):document.getElementById(this.maps.element.id+"_LayerIndex_"+a+"_shapeIndex_"+i+"_dataIndex_"+o+"_multiLine_"+n),t.isNullOrUndefined(p)||s.push(p.id)}return s},e.prototype.legendToggle=function(){var e=this.maps,i=e.legendSettings;if(this.maps.selectedLegendElementId)for(s=0;s<this.maps.selectedLegendElementId.length;s++){var a="Interactive"===i.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_",o=e.svgObject.querySelector("#"+a+this.maps.selectedLegendElementId[s]);if(!t.isNullOrUndefined(o)){var n=t.isNullOrUndefined(this.maps.legendSelectionClass.fill)?o.getAttribute("fill"):this.maps.legendSelectionClass.fill;this.setColor(o,n,this.maps.legendSelectionClass.opacity.toString(),this.maps.legendSelectionClass.border.color,this.maps.legendSelectionClass.border.width.toString(),"selection");for(var l=0;l<this.maps.legendSelectionCollection.length;l++)this.maps.legendSelectionCollection[l].legendElement.id===o.id&&(this.maps.legendSelectionCollection[l].legendElement=o);if(-1===this.getIndexofLegend(this.maps.legendSelectionCollection,o)){var r=this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[s]].data[s].layerIndex;this.pushCollection(o,this.maps.legendSelectionCollection,this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[s]],this.maps.layers[r].shapeSettings)}}}if(this.maps.toggledLegendId)for(var s=0;s<this.maps.toggledLegendId.length;s++){var d="Interactive"===i.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[s]+"_Text":"#"+this.maps.element.id+"_Legend_Text_Index_"+this.maps.toggledLegendId[s],p=e.svgObject.querySelector(d);t.isNullOrUndefined(p)||p.setAttribute("fill","#E5E5E5");var h="Interactive"===i.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[s]:"#"+this.maps.element.id+"_Legend_Shape_Index_"+this.maps.toggledLegendId[s],c=e.svgObject.querySelector(h);t.isNullOrUndefined(c)||c.setAttribute("fill","#E5E5E5")}},e.prototype.renderLegendBorder=function(){var e=this.maps,i=e.legendSettings,a=i.title.text,o={fontFamily:i.titleStyle.fontFamily,fontStyle:i.titleStyle.fontStyle,fontWeight:i.titleStyle.fontWeight,size:i.titleStyle.size,color:i.titleStyle.color,opacity:i.titleStyle.opacity},n=re(this.legendItemRect.width+20,a,o),l=x(n,o);this.legendBorderRect=new ut(this.legendItemRect.x-10,this.legendItemRect.y-10-l.height,this.legendItemRect.width+20,this.legendItemRect.height+20+l.height+("Interactive"===i.mode?0:0!==this.page?10:0));var r={color:i.border.color,width:i.border.width,opacity:i.border.opacity};r.opacity=t.isNullOrUndefined(r.opacity)?1:r.opacity;var s=new rt(e.element.id+"_Legend_Border",i.background,r,1,this.legendBorderRect,null,null,"","");this.legendGroup.appendChild(e.renderer.drawRectangle(s)),this.getLegendAlignment(e,this.legendBorderRect.width,this.legendBorderRect.height,i),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),"Float"!==i.position&&e.svgObject.appendChild(this.legendGroup),a&&(o.color=null!==o.color?o.color:this.maps.themeStyle.legendTitleFontColor,o.fontFamily=t.isNullOrUndefined(o.fontFamily)?this.maps.themeStyle.fontFamily:o.fontFamily,O(new ot(e.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-l.height/2-5,"middle",n,""),o,o.color,this.legendGroup))},e.prototype.changeNextPage=function(e){this.currentPage=e.target.id.indexOf("_Left_Page_")>-1?this.currentPage-1:this.currentPage+1,this.legendGroup=this.maps.renderer.createGroup({id:this.maps.element.id+"_Legend_Group"}),this.maps.mapAreaRect=this.initialMapAreaRect,this.drawLegendItem(this.currentPage),t.isNullOrUndefined(this.maps.legendModule)||"Float"!==this.maps.legendSettings.position||(this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.legendModule.legendGroup):this.maps.svgObject.appendChild(this.maps.legendModule.legendGroup)),Oe(this.maps.element.id+"_Legend_Border",this.maps.element.id)&&(Oe(this.maps.element.id+"_Legend_Border",this.maps.element.id).style.pointerEvents="none")},e.prototype.getLegendAlignment=function(e,i,a,o){var n,l,r,s=(r=t.extend({},e.mapAreaRect,r,!0)).x,d=r.y,p=r.height,h=r.width,c=e.availableSize.width,m=e.availableSize.height,u=t.isNullOrUndefined(o.location.x)?0:o.location.x,g=t.isNullOrUndefined(o.location.y)?0:o.location.y;if("Float"===o.position)this.translate=e.isTileMap?new tt(u,g+2.5):new tt(u+e.mapAreaRect.x,g+e.mapAreaRect.y),this.legendTotalRect=e.mapAreaRect;else{switch(o.position){case"Top":case"Bottom":r.height="Top"===o.position?p-a:p-a-20,n=c/2-i/2,l="Top"===o.position?d:d+r.height,r.y="Top"===o.position?d+a+(e.isTileMap?5:10):d-5;break;case"Left":case"Right":r.width=h-i-e.mapAreaRect.x,n="Left"===o.position?s+5:s+r.width+10,l=m/2-a/2,r.x="Left"===o.position?s+i+10:s}switch(o.alignment){case"Near":"Top"===o.position||"Bottom"===o.position?n=r.x-("Interactive"===o.mode?10:0):l=r.y-(o.height&&o.width||"Interactive"!==o.mode?0:e.mapAreaRect.x);break;case"Far":"Top"===o.position||"Bottom"===o.position?n=c-i-("Interactive"===o.mode?0:10):l=m-a-("Default"===o.mode?10:0)}(o.height||o.width)&&"Interactive"!==o.mode?this.legendTotalRect=e.mapAreaRect=e.totalRect=r:(e.totalRect=null,(o.height||o.width)&&"Interactive"===o.mode&&(e.totalRect=r),this.legendTotalRect=e.mapAreaRect=r),"Left"===o.position&&(e.mapAreaRect.width=r.width),this.translate=new tt(n,l)}},e.prototype.getMarkersLegendCollections=function(e,i){var a=this;Array.prototype.forEach.call(i,function(i,o){var n,l=i.dataSource,r=i.legendText;Array.prototype.forEach.call(l,function(l,s){var d=!!t.isNullOrUndefined(l[a.maps.legendSettings.showLegendPath])||l[a.maps.legendSettings.showLegendPath];if(i.visible&&d&&!t.isNullOrUndefined(l.latitude)&&!t.isNullOrUndefined(l.longitude)){if(i.template){var p=(n=fe(i.template,a.maps))(a.maps);(t.isNullOrUndefined(p.childElementCount)?p[0]:p).querySelector("img").src}var h=t.isNullOrUndefined(l[r])?"":l[r],c=t.isNullOrUndefined(i.colorValuePath)?i.fill:l[i.colorValuePath],m=[];a.maps.legendSettings.removeDuplicateLegend?(m.push(a.getMarkerLegendData(e,h,c)),a.getOverallLegendItemsCollection(h,c,m,d)):(m.push({layerIndex:e,markerIndex:o,dataIndex:s,value:c,name:h,shape:t.isNullOrUndefined(i.shapeValuePath)||t.isNullOrUndefined(l[i.shapeValuePath])||""===l[i.shapeValuePath]?a.maps.legendSettings.useMarkerShape?i.shape:a.maps.legendSettings.shape:l[i.shapeValuePath]}),a.getOverallLegendItemsCollection(h,c,m,d))}})})},e.prototype.getMarkerLegendData=function(e,i,a){var o=this,n=[];return this.maps.layers[e].markerSettings.map(function(l,r){var s=l.dataSource;Array.prototype.forEach.call(s,function(l,s){var d=o.maps.layers[e].markerSettings[r];i!==l[d.legendText]&&""!==i||a!==l[d.colorValuePath]||n.push({layerIndex:e,markerIndex:r,dataIndex:s,value:a,name:i,shape:t.isNullOrUndefined(d.shapeValuePath)?d.shape:l[d.shapeValuePath]})})}),n},e.prototype.getRangeLegendCollection=function(e,i,a,o,n,l,r){for(var s,d=this,p=0,h=this.maps.legendSettings.fill,c=[],m=this,u=0,g=a;u<g.length;u++)!function(a){if(!t.isNullOrUndefined(a.from)&&!t.isNullOrUndefined(a.to)){s=t.isNullOrUndefined(a.label)?a.from+" - "+a.to:a.label,c=[];var u=!1;Array.prototype.forEach.call(o,function(t,o){var s=l.indexOf(".")>-1?Number(P(t,l)):parseFloat(t[l]);s>=a.from&&s<=a.to&&(u=!0,c.push(d.getLegendData(e,o,t,n,i,r,s)))}),u||c.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var g=t.isNullOrUndefined(h)?"[object Array]"===Object.prototype.toString.call(a.color)?t.isNullOrUndefined(a.value)?m.legendGradientColor(a,p):a.color[0]:a.color:h;p++,m.getOverallLegendItemsCollection(s,g,c,a.showLegend)}}(g[u])},e.prototype.getOverallLegendItemsCollection=function(e,t,i,a){var o=[],n=this.maps.legendSettings;if(i.length>0&&a){for(s=0;s<i.length;s++){var l=i[s];if(l.length>0)for(var r=0;r<l.length;r++)o.push(l[r]);else o.push(i[s]);o._isVisible=!0}if(!!this.maps.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollection,e,t))for(var s=0;s<this.legendCollection.length;s++)this.legendCollection[s].text===e&&this.legendCollection[s].fill===t&&this.legendCollection[s].data.push(o[0]);else this.legendCollection.push({text:e,fill:t,data:o,opacity:n.opacity,borderColor:n.shapeBorder.color,borderWidth:n.shapeBorder.width})}},e.prototype.removeDuplicates=function(e,t,i){for(var a=!1,o=0;o<e.length;o++)if((e[o].text===t||""===e[o].text)&&e[o].fill===i){a=!0;break}return a},e.prototype.getEqualLegendCollection=function(e,i,a,o,n,l,r){for(var s,d=this,p=this.maps.legendSettings.fill,h=[],c=[],m=[],u=[],g=this,y=0,f=a;y<f.length;y++)!function(y){if(t.isNullOrUndefined(y.value)){if(t.isNullOrUndefined(y.minOpacity)&&t.isNullOrUndefined(y.maxOpacity)&&t.isNullOrUndefined(y.value)&&t.isNullOrUndefined(y.from)&&t.isNullOrUndefined(y.to)&&!t.isNullOrUndefined(y.color)){if(Array.prototype.forEach.call(o,function(t,a){for(var o=l.indexOf(".")>-1?P(t,l):t[l],s=0;s<m.length;s++)o===m[s]&&u.push(d.getLegendData(e,a,t,n,i,r,o))}),0===m.length){var f=!1;Array.prototype.forEach.call(o,function(o,s){f=!1;for(var p=o[l],h=0;h<a.length;h++)t.isNullOrUndefined(p)||isNaN(p)?f||(f=!1):p>=a[h].from&&p<=a[h].to&&(f=!0);f||u.push(d.getLegendData(e,s,o,n,i,r,p))})}s=t.isNullOrUndefined(y.label)?"Others":y.label;var b="[object Array]"===Object.prototype.toString.call(y.color)?y.color[0]:y.color;g.getOverallLegendItemsCollection(s,b,u,y.showLegend)}}else{s=t.isNullOrUndefined(y.label)?y.value:y.label,c=[];var v=!1;Array.prototype.forEach.call(o,function(t,a){var o=l.indexOf(".")>-1?P(t,l):t[l];o===y.value?(v=!0,-1===h.indexOf(o)&&h.push(o),c.push(d.getLegendData(e,a,t,n,i,r,o))):-1===m.indexOf(o)&&m.push(o)});for(var S=0;S<h.length;S++)for(var x=0;x<m.length;x++)if(h[S]===m[x]){var O=m.indexOf(h[S]);m.splice(O,1)}v||c.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var M=t.isNullOrUndefined(p)?"[object Array]"===Object.prototype.toString.call(y.color)?y.color[0]:y.color:p;g.getOverallLegendItemsCollection(s,M,c,y.showLegend)}}(f[y])},e.prototype.getDataLegendCollection=function(e,i,a,o,n,l,r){var s,d=this,p=this.maps.legendSettings.fill,h=this.maps.legendSettings.valuePath;t.isNullOrUndefined(l)||t.isNullOrUndefined(o)||Array.prototype.forEach.call(o,function(o,c){var m=!!t.isNullOrUndefined(d.maps.legendSettings.showLegendPath)||!t.isNullOrUndefined(o[d.maps.legendSettings.showLegendPath])&&o[d.maps.legendSettings.showLegendPath],u=l.indexOf(".")>-1?P(o,l):o[l],g=[],y=t.isNullOrUndefined(p)?u:p;t.isNullOrUndefined(u)||0!==a.length||(s=t.isNullOrUndefined(o[h])?n.indexOf(".")>-1?P(o,n):o[n]:h.indexOf(".")>-1?P(o,h):o[h],g.push(d.getLegendData(e,c,o,n,i,r,u))),d.getOverallLegendItemsCollection(s,y,g,m)})},e.prototype.interactiveHandler=function(e){var i=e.target,a=this.maps.legendSettings,o=this.maps.element.id+"_Interactive_Legend",n="Layers"===a.type?"_shapeIndex_":"Markers"===a.type?"_MarkerIndex_":"_BubbleIndex_";if(i.id.indexOf(n)>1){var l=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),r=parseFloat(i.id.split(/_dataIndex_/i)[1].split("_")[0]),s=void 0,d=void 0,p=void 0;t.isNullOrUndefined(Oe(o,this.maps.element.id))||t.remove(Oe(o,this.maps.element.id));var h=this.maps.layersCollection[l],c="Layers"===a.type?h.visible:"Markers"===a.type?h.markerSettings[parseFloat(i.id.split("_MarkerIndex_")[1].split("_")[0])].visible:this.maps.getBubbleVisible(this.maps.layersCollection[l]);if(a.visible&&this.legendRenderingCollections.length>0&&"Interactive"===a.mode&&c)for(var m=this.maps.svgObject.getBoundingClientRect(),u=0;u<this.legendCollection.length;u++){var g=this.legendCollection[u],y=Oe(this.maps.element.id+"_Legend_Index_"+u,this.maps.element.id),f=y.getBoundingClientRect(),b=new ut(Math.abs(f.left-m.left),Math.abs(f.top-m.top),f.width,f.height);if(s=y.getAttribute("fill"),d=a.shapeBorder.color,p=a.shapeBorder.width,!t.isNullOrUndefined(g.data))for(var v=g.data,S=0;S<v.length;S++)if(r===v[S].dataIndex&&l===v[S].layerIndex){this.renderInteractivePointer(a,s,d,o,p,b);break}}}else t.isNullOrUndefined(Oe(o,this.maps.element.id))||t.remove(Oe(o,this.maps.element.id))},e.prototype.renderInteractivePointer=function(e,t,i,a,o,n){var l,r,s,d="None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation;n.y="Float"===e.position&&this.maps.isTileMap?n.y-this.maps.mapAreaRect.y:n.y,l="Horizontal"===d?e.invertedPointer?" M "+(r=n.x+n.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height)+" L "+(r-10)+" "+(s+10)+" L "+(r+10)+" "+(s+10)+" Z ":" M "+(r=n.x+n.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y)+" L "+(r-10)+" "+(s-10)+" L "+(r+10)+" "+(s-10)+" Z ":e.invertedPointer?" M "+(r=n.x-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height/2)+" L "+(r-10)+" "+(s-10)+" L "+(r-10)+" "+(s+10)+" z ":" M "+(r=n.x+n.width-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height/2)+" L "+(r+10)+" "+(s-10)+" L "+(r+10)+" "+(s+10)+" z ";var p=new nt(a,t,o,i,1,1,"",l);"Float"===e.position&&this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.renderer.drawPath(p)):this.maps.svgObject.appendChild(this.maps.renderer.drawPath(p))},e.prototype.wireEvents=function(e){t.EventHandler.add(e,t.Browser.touchStartEvent,this.changeNextPage,this)},e.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(t.Browser.touchMoveEvent,this.interactiveHandler,this),this.maps.on(t.Browser.touchEndEvent,this.interactiveHandler,this),this.maps.on(ei,this.legendClick,this))},e.prototype.markerToggleSelection=function(e,i,a,o){e.setAttribute("fill",this.legendCollection[o].fill),e.setAttribute("stroke",this.maps.layers[i].markerSettings[a].border.color),e.setAttribute("fill-opacity",this.maps.layers[i].markerSettings[a].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[i].markerSettings[a].border.width.toString()),e.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[i].markerSettings[a].border.opacity)?this.maps.layers[i].markerSettings[a].opacity:this.maps.layers[i].markerSettings[a].border.opacity).toString())},e.prototype.bubbleToggleSelection=function(e,i,a,o){e.setAttribute("fill",this.legendCollection[o].fill),e.setAttribute("stroke",this.maps.layers[i].bubbleSettings[a].border.color),e.setAttribute("fill-opacity",this.maps.layers[i].bubbleSettings[a].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[i].bubbleSettings[a].border.width.toString()),e.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[i].bubbleSettings[a].border.opacity)?this.maps.layers[i].bubbleSettings[a].opacity:this.maps.layers[i].bubbleSettings[a].border.opacity).toString())},e.prototype.legendClick=function(e){var i,a=this.maps.legendSettings.toggleLegendSettings.fill,o=this.maps.legendSettings.toggleLegendSettings.opacity,n=this.maps.legendSettings.toggleLegendSettings.border.color,l=this.maps.legendSettings.toggleLegendSettings.border.width,r=t.isNullOrUndefined(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings.opacity:this.maps.legendSettings.toggleLegendSettings.border.opacity;if(e.parentNode.id.indexOf(this.maps.element.id+"_Legend_Index_")>-1){var s=void 0,d=parseFloat(e.parentElement.id.substr((this.maps.element.id+"_Legend_Index_").length)),p=(y=this.legendCollection[d].data)._isVisible,h=void 0;if(this.maps.legendSettings.toggleLegendSettings.enable&&("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type))for(S=0;S<this.maps.layers.length;S++)for(f=0;f<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[S].bubbleSettings.length:this.maps.layers[S].markerSettings.length);f++){for(x=0;x<y.length;x++)h=this.legendCollection[d].data[x],s="Bubbles"===this.maps.legendSettings.type?Oe(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_BubbleIndex_"+f+"_dataIndex_"+h.dataIndex,this.maps.element.id):Oe(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_MarkerIndex_"+h.markerIndex+"_dataIndex_"+h.dataIndex,this.maps.element.id),t.isNullOrUndefined(h.shape)||"Balloon"!==h.shape||(s=s.children[0]),p&&null!==s?(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(s.setAttribute("fill",this.maps.layers[S].shapeSettings.fill),s.setAttribute("stroke",this.maps.layers[S].shapeSettings.border.color),s.setAttribute("fill-opacity",this.maps.layers[S].shapeSettings.opacity.toString()),s.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.width)?0:this.maps.layers[S].shapeSettings.border.width).toString()),s.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.opacity)?this.maps.layers[S].shapeSettings.opacity:this.maps.layers[S].shapeSettings.border.opacity).toString())):(s.setAttribute("fill",a),s.setAttribute("fill-opacity",o.toString()),s.setAttribute("stroke",n),s.setAttribute("stroke-width",l.toString()),s.setAttribute("stroke-opacity",r.toString())),null!==e&&((i=Oe(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id)).setAttribute("fill","#E5E5E5"),"HorizontalLine"!==this.maps.legendSettings.shape&&"VerticalLine"!==this.maps.legendSettings.shape&&"Cross"!==this.maps.legendSettings.shape||i.setAttribute("stroke","#E5E5E5"),Oe(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id).setAttribute("fill","#E5E5E5"))):("Markers"===this.maps.legendSettings.type?this.markerToggleSelection(s,S,f,d):this.bubbleToggleSelection(s,S,f,d),null!==e&&((i=Oe(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id)).setAttribute("fill",this.legendCollection[d].fill),"HorizontalLine"!==this.maps.legendSettings.shape&&"VerticalLine"!==this.maps.legendSettings.shape&&"Cross"!==this.maps.legendSettings.shape||i.setAttribute("stroke",this.legendCollection[d].fill),Oe(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id).setAttribute("fill","#757575")));y._isVisible=!p}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var c=void 0;this.removeCollections(e,d);var m=this.maps.toggledLegendId.indexOf(d);-1!==m&&(p=!1);for(f=0;f<this.maps.layers.length;f++)for(x=0;x<y.length;x++)if(h=this.legendCollection[d].data[x],null!==(c=Oe(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_shapeIndex_"+h.shapeIndex+"_dataIndex_"+h.dataIndex,this.maps.element.id))){O=this.maps.toggledShapeElementId.indexOf(c.id);p?(0===x&&this.maps.toggledLegendId.push(d),-1===O&&this.maps.toggledShapeElementId.push(c.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(c.setAttribute("fill",this.maps.layers[f].shapeSettings.fill),c.setAttribute("fill-opacity",this.maps.layers[f].shapeSettings.opacity.toString()),c.setAttribute("stroke",this.maps.layers[f].shapeSettings.border.color),c.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[f].shapeSettings.border.width)?0:this.maps.layers[f].shapeSettings.border.width).toString()),c.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[f].shapeSettings.border.opacity)?this.maps.layers[f].shapeSettings.opacity:this.maps.layers[f].shapeSettings.border.opacity).toString())):(c.setAttribute("fill",a),c.setAttribute("fill-opacity",o.toString()),c.setAttribute("stroke",n),c.setAttribute("stroke-width",l.toString()),c.setAttribute("stroke-opacity",r.toString())),null!==e&&(Oe(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id).setAttribute("fill","#E5E5E5"),(i=Oe(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id)).setAttribute("fill","#E5E5E5"))):(-1!==m&&0===x&&this.maps.toggledLegendId.splice(m,1),-1!==O&&this.maps.toggledShapeElementId.splice(O,1),c.setAttribute("fill",this.legendCollection[d].fill),c.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[f].shapeSettings.border.opacity)?this.maps.layers[f].shapeSettings.opacity:this.maps.layers[f].shapeSettings.border.opacity).toString()),c.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[f].shapeSettings.border.width)?0:this.maps.layers[f].shapeSettings.border.width).toString()),c.setAttribute("fill-opacity",this.maps.layers[f].shapeSettings.opacity.toString()),c.setAttribute("stroke",this.maps.layers[f].shapeSettings.border.color),null!==e&&(Oe(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id).setAttribute("fill","#757575"),(i=Oe(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id)).setAttribute("fill",this.legendCollection[d].fill)))}y._isVisible=!p}}else if(!t.isNullOrUndefined(e.id)&&(e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")>-1||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_Text")){var u=void 0,d=parseFloat(e.id.split(this.maps.element.id+"_Legend_Index_")[1]),g=void 0,y=this.legendCollection[d].data,p=y._isVisible;if(("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type)&&this.maps.legendSettings.toggleLegendSettings.enable)for(S=0;S<this.maps.layers.length;S++)for(var f=0;f<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[S].bubbleSettings.length:this.maps.layers[S].markerSettings.length);f++){for(x=0;x<y.length;x++)g=this.legendCollection[d].data[x],u="Bubbles"===this.maps.legendSettings.type?Oe(this.maps.element.id+"_LayerIndex_"+g.layerIndex+"_BubbleIndex_"+f+"_dataIndex_"+g.dataIndex,this.maps.element.id):Oe(this.maps.element.id+"_LayerIndex_"+g.layerIndex+"_MarkerIndex_"+f+"_dataIndex_"+g.dataIndex,this.maps.element.id),t.isNullOrUndefined(g.shape)||"Balloon"!==g.shape||(u=u.children[0]),p&&null!==u?(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(u.setAttribute("fill",this.maps.layers[S].shapeSettings.fill),u.setAttribute("stroke",this.maps.layers[S].shapeSettings.border.color),u.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.width)?0:this.maps.layers[S].shapeSettings.border.width).toString()),u.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.opacity)?this.maps.layers[S].shapeSettings.opacity:this.maps.layers[S].shapeSettings.border.opacity).toString()),u.setAttribute("fill-opacity",this.maps.layers[S].shapeSettings.opacity.toString())):(u.setAttribute("fill",a),u.setAttribute("fill-opacity",o.toString()),u.setAttribute("stroke",n),u.setAttribute("stroke-width",l.toString()),u.setAttribute("stroke-opacity",r.toString())),null!==e&&(Oe(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id).setAttribute("fill","#E5E5E5"),(i=Oe(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id)).setAttribute("fill","#E5E5E5"))):("Markers"===this.maps.legendSettings.type?this.markerToggleSelection(u,S,f,d):this.bubbleToggleSelection(u,S,f,d),null!==e&&((i=Oe(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id)).setAttribute("fill",this.legendCollection[d].fill),Oe(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id).setAttribute("fill","#757575")));y._isVisible=!p}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var b=void 0;this.removeCollections(e,d);var v=this.maps.toggledLegendId.indexOf(d);-1!==v&&(p=!1);for(var S=0;S<this.maps.layers.length;S++)for(var x=0;x<y.length;x++)if(g=this.legendCollection[d].data[x],null!==(b=Oe(this.maps.element.id+"_LayerIndex_"+g.layerIndex+"_shapeIndex_"+g.shapeIndex+"_dataIndex_"+g.dataIndex,this.maps.element.id))){var O=this.maps.toggledShapeElementId.indexOf(b.id);p?(0===x&&this.maps.toggledLegendId.push(d),-1===O&&this.maps.toggledShapeElementId.push(b.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(b.setAttribute("fill",this.maps.layers[0].shapeSettings.fill),b.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color),b.setAttribute("fill-opacity",this.maps.layers[S].shapeSettings.opacity.toString()),b.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.width)?0:this.maps.layers[S].shapeSettings.border.width).toString()),b.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.opacity)?this.maps.layers[S].shapeSettings.opacity:this.maps.layers[S].shapeSettings.border.opacity).toString())):(b.setAttribute("fill",a),b.setAttribute("fill-opacity",o.toString()),b.setAttribute("stroke",n),b.setAttribute("stroke-width",l.toString()),b.setAttribute("stroke-opacity",r.toString())),null!==e&&((i=Oe(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id)).setAttribute("fill","#E5E5E5"),Oe(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id).setAttribute("fill","#E5E5E5"))):(-1!==v&&0===x&&this.maps.toggledLegendId.splice(v,1),-1!==O&&this.maps.toggledShapeElementId.splice(O,1),b.setAttribute("fill-opacity",this.maps.layers[S].shapeSettings.opacity.toString()),b.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.width)?0:this.maps.layers[S].shapeSettings.border.width).toString()),b.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color),b.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[S].shapeSettings.border.opacity)?this.maps.layers[S].shapeSettings.opacity:this.maps.layers[S].shapeSettings.border.opacity).toString()),b.setAttribute("fill",this.legendCollection[d].fill),null!==e&&(Oe(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id).setAttribute("fill","#757575"),(i=Oe(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id)).setAttribute("fill",this.legendCollection[d].fill)))}y._isVisible=!p}}},e.prototype.removeCollections=function(e,t){this.removeLegendSelectionCollection(e);var i=this.getIndexofLegend(this.maps.legendSelectionCollection,e);-1!==i&&this.maps.legendSelectionCollection.splice(i,1),-1!==this.getIndexofLegend(this.legendHighlightCollection,e)&&this.legendHighlightCollection.splice(i,1);var a=this.getIndexofLegend(this.shapeHighlightCollection,e);-1!==a&&this.shapeHighlightCollection.splice(a,1);var o=this.maps.selectedLegendElementId.indexOf(t);-1!==o&&this.maps.selectedLegendElementId.splice(o,1)},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(t.Browser.touchMoveEvent,this.interactiveHandler),this.maps.off(t.Browser.touchEndEvent,this.interactiveHandler),this.maps.off(ei,this.legendClick))},e.prototype.getLegendData=function(e,i,a,o,n,l,r){var s=[];if("[object Array]"===Object.prototype.toString.call(n))for(var d=0;d<n.length;d++){var p=n[d],h=o.indexOf(".")>-1?P(a,o):a[o],c=ie(a[o],l,p.properties),m=t.isNullOrUndefined(h)?h:h.toLowerCase();if((!t.isNullOrUndefined(p.properties[c])&&isNaN(p.properties[c])?p.properties[c].toLowerCase():p.properties[c])===m)if("MultiPoint"!=p.geometry.type)s.push({layerIndex:e,shapeIndex:d,dataIndex:i,name:a[o],value:r,pointIndex:-1});else for(var u=0;u<p.geometry.coordinates.length;u++)s.push({layerIndex:e,shapeIndex:d,dataIndex:i,name:a[o],value:r,pointIndex:u})}return s},e.prototype.legendGradientColor=function(e,i){var a,o="http://www.w3.org/2000/svg";if(!t.isNullOrUndefined(e.color)&&"object"==typeof e.color){var n=document.createElementNS(o,"linearGradient"),l=this.maps.legendSettings.position,r="Top"===l||"Bottom"===l?"100":"0",s="Top"===l||"Bottom"===l?"0":"100";n.setAttribute("id","linear_"+i+"_"+this.maps.element.id),n.setAttribute("x1","0%"),n.setAttribute("y1","0%"),n.setAttribute("x2",r+"%"),n.setAttribute("y2",s+"%");for(var d=0;d<e.color.length;d++){var p=100/(e.color.length-1),h=document.createElementNS(o,"stop");h.setAttribute("offset",d*p+"%"),h.setAttribute("stop-color",e.color[d]),h.setAttribute("stop-opacity",1..toString()),n.appendChild(h)}this.legendLinearGradient=n;var c="url(#linear_"+i+"_"+this.maps.element.id+")";this.defsElement.appendChild(n),a=c}return a},e.prototype.getModuleName=function(){return"Legend"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),Si=function(){function e(e){this.maps=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(t.Browser.touchMoveEvent,this.mouseMove,this),this.maps.on(t.Browser.touchStartEvent,this.mouseMove,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(t.Browser.touchMoveEvent,this.mouseMove),this.maps.off(t.Browser.touchStartEvent,this.mouseMove))},e.prototype.addHighlight=function(e,t,i){var a=Me(e,t,i,this.maps);i?this.mapHighlight(a,null,null):we(a)},e.prototype.mouseMove=function(e){var i,a=e.target,o="touch"===e.pointerType||"2"===e.pointerType||e.type.indexOf("touch")>-1;if((-1!==a.id.indexOf("LayerIndex")||a.id.indexOf("NavigationIndex")>-1)&&"ShapeselectionMapStyle"!==a.getAttribute("class")&&!o&&"MarkerselectionMapStyle"!==a.getAttribute("class")&&"BubbleselectionMapStyle"!==a.getAttribute("class")&&"navigationlineselectionMapStyle"!==a.getAttribute("class")&&"LineselectionMapStyle"!==a.getAttribute("class")){i=parseInt(a.id.split("_LayerIndex_")[1].split("_")[0],10);var n=void 0,l=void 0,r=void 0,s=void 0;if(a.id.indexOf("shapeIndex")>-1)r=parseInt(a.id.split("_shapeIndex_")[1].split("_")[0],10),n=this.maps.layers[i].shapeData.features&&!t.isNullOrUndefined(this.maps.layersCollection[i].layerData[r])?this.maps.layersCollection[i].layerData[r].property:null,s=parseInt(a.id.split("_dataIndex_")[1].split("_")[0],10),l=t.isNullOrUndefined(s)?null:this.maps.layers[i].dataSource[s],this.highlightSettings=this.maps.layers[i].highlightSettings;else if(a.id.indexOf("BubbleIndex")>-1){var d=parseInt(a.id.split("_BubbleIndex_")[1].split("_")[0],10);s=parseInt(a.id.split("_dataIndex_")[1].split("_")[0],10),l=this.maps.layers[i].bubbleSettings[d].dataSource[s],this.highlightSettings=this.maps.layers[i].bubbleSettings[d].highlightSettings}else if(a.id.indexOf("MarkerIndex")>-1){var p=parseInt(a.id.split("_MarkerIndex_")[1].split("_")[0],10);s=parseInt(a.id.split("_dataIndex_")[1].split("_")[0],10),l=this.maps.layers[i].markerSettings[p].dataSource[s],this.highlightSettings=this.maps.layers[i].markerSettings[p].highlightSettings}else{c=parseInt(a.id.split("_NavigationIndex_")[1].split("_")[0],10);i=parseInt(a.id.split("_LayerIndex_")[1].split("_")[0],10),n=null,l={latitude:this.maps.layers[i].navigationLineSettings[c].latitude,longitude:this.maps.layers[i].navigationLineSettings[c].longitude},this.highlightSettings=this.maps.layers[i].navigationLineSettings[c].highlightSettings}if(this.highlightSettings.enable)this.handleHighlight(a,i,l,n);else{var h=document.getElementsByClassName("highlightMapStyle")[0];if(!t.isNullOrUndefined(h)&&(we(h),h.id.indexOf("NavigationIndex")>-1)){var c=parseInt(h.id.split("_NavigationIndex_")[1].split("_")[0],10),m=parseInt(h.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);h.setAttribute("stroke-width",this.maps.layers[m].navigationLineSettings[c].width.toString()),h.setAttribute("stroke",this.maps.layers[m].navigationLineSettings[c].color)}}}else if(xe("highlightMapStyle").length>0){if((a=xe("highlightMapStyle")[0]).id.indexOf("NavigationIndex")>-1){c=parseInt(a.id.split("_NavigationIndex_")[1].split("_")[0],10);i=parseInt(a.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),a.setAttribute("stroke-width",this.maps.layers[i].navigationLineSettings[c].width.toString()),a.setAttribute("stroke",this.maps.layers[i].navigationLineSettings[c].color)}we(a),this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeShapeHighlightCollection()}else(-1!==a.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")||-1!==a.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule&&this.maps.legendSettings.visible&&-1===a.id.indexOf("_Text")?this.maps.legendModule.legendHighLightAndSelection(a,"highlight"):this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeLegendHighlightCollection()},e.prototype.handleHighlight=function(e,t,i,a){this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule&&"Layers"===this.maps.legendSettings.type&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.highlightSettings,"highlight",t),(!(e.id.indexOf("shapeIndex")>-1&&this.maps.legendSettings.visible&&this.maps.legendModule)||this.maps.legendModule.shapeToggled)&&this.mapHighlight(e,a,i)},e.prototype.mapHighlight=function(e,i,a){var o=this,n=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),l=!1;if(e.id.indexOf("MarkerIndex")>-1){var r=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10);l=this.maps.layers[n].markerSettings[r].highlightSettings.enable}var s={color:-1===e.parentElement.id.indexOf("LineString")?this.highlightSettings.border.color:this.highlightSettings.fill||this.highlightSettings.border.color,width:-1===e.parentElement.id.indexOf("LineString")?this.highlightSettings.border.width/(l?1:this.maps.scale):this.highlightSettings.border.width/this.maps.scale,opacity:this.highlightSettings.border.opacity},d={opacity:this.highlightSettings.opacity,fill:-1===e.parentElement.id.indexOf("LineString")?-1===e.id.indexOf("NavigationIndex")?t.isNullOrUndefined(this.highlightSettings.fill)?e.getAttribute("fill"):this.highlightSettings.fill:"none":"transparent",border:s,name:"itemHighlight",target:e.id,cancel:!1,shapeData:i,data:a,maps:this.maps};this.maps.trigger("itemHighlight",d,function(){d.border.opacity=t.isNullOrUndefined(o.highlightSettings.border.opacity)?o.highlightSettings.opacity:o.highlightSettings.border.opacity,o.highlightMap(e,d)})},e.prototype.highlightMap=function(e,t){if("highlightMapStyle"!==e.getAttribute("class")){if(xe("highlightMapStyle").length>0){var i=xe("highlightMapStyle")[0];if(we(i),i.id.indexOf("NavigationIndex")>-1){var a=parseInt(i.id.split("_NavigationIndex_")[1].split("_")[0],10),o=parseInt(i.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);i.setAttribute("stroke-width",this.maps.layers[o].navigationLineSettings[a].width.toString()),i.setAttribute("stroke",this.maps.layers[o].navigationLineSettings[a].color)}}be("highlightMap")?Le("highlightMap","highlightMapStyle",t):document.body.appendChild(_e("highlightMap","highlightMapStyle",t)),e.setAttribute("class","highlightMapStyle")}},e.prototype.getModuleName=function(){return"Highlight"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),xi=function(){function e(e){this.maps=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(ei,this.mouseClick,this),this.maps.on(t.Browser.touchEndEvent,this.mouseClick,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(ei,this.mouseClick),this.maps.off(t.Browser.touchEndEvent,this.mouseClick))},e.prototype.mouseClick=function(e){if(!t.isNullOrUndefined(e.type)&&-1!==e.type.indexOf("touch")&&t.isNullOrUndefined(e.id)&&(e=e.target),!t.isNullOrUndefined(e.id)&&(e.id.indexOf("LayerIndex")>-1||e.id.indexOf("NavigationIndex")>-1)){var i=void 0,a=void 0,o=void 0,n=void 0,l=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10);if(e.id.indexOf("shapeIndex")>-1)o=parseInt(e.id.split("_shapeIndex_")[1].split("_")[0],10),i=!t.isNullOrUndefined(this.maps.layers[l].shapeData.features)&&this.maps.layers[l].shapeData.features.length>o?this.maps.layers[l].shapeData.features[o].properties:!t.isNullOrUndefined(this.maps.layers[l].shapeData.geometries)&&this.maps.layers[l].shapeData.geometries.length>o?this.maps.layers[l].shapeData.geometries[o].properties:null,n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),a=t.isNullOrUndefined(n)?null:this.maps.layers[l].dataSource[n],this.selectionsettings=this.maps.layers[l].selectionSettings,this.selectionType="Shape";else if(e.id.indexOf("BubbleIndex")>-1){var r=parseInt(e.id.split("_BubbleIndex_")[1].split("_")[0],10);n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),a=this.maps.layers[l].bubbleSettings[r].dataSource[n],this.selectionsettings=this.maps.layers[l].bubbleSettings[r].selectionSettings,this.selectionType="Bubble"}else if(e.id.indexOf("MarkerIndex")>-1){var s=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10);n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),a=this.maps.layers[l].markerSettings[s].dataSource[n],this.selectionsettings=this.maps.layers[l].markerSettings[s].selectionSettings,this.selectionType="Marker"}else{var d=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10);i=null,a={latitude:this.maps.layers[l].navigationLineSettings[d].latitude,longitude:this.maps.layers[l].navigationLineSettings[d].longitude},this.selectionsettings=this.maps.layers[l].navigationLineSettings[d].selectionSettings,this.selectionType="navigationline"}this.selectionsettings.enable&&this.selectElement(e,l,a,i)}else this.maps.legendSettings.visible&&!this.maps.legendSettings.toggleLegendSettings.enable&&this.maps.legendModule&&!t.isNullOrUndefined(e.id)&&-1===e.id.indexOf("_Text")&&(e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")>-1||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule.legendHighLightAndSelection(e,"selection")},e.prototype.selectElement=function(e,t,i,a){this.maps.mapSelect=!!e,this.maps.legendModule&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.selectionsettings,"selection",t),(!(e.id.indexOf("shapeIndex")>-1&&this.maps.legendSettings.visible&&this.maps.legendModule)||this.maps.legendModule.shapeToggled)&&this.selectMap(e,a,i)},e.prototype.addSelection=function(e,t,i){var a=Me(e,t,i,this.maps);i?this.selectMap(a,null,null):we(a)},e.prototype.selectMap=function(e,i,a){var o=this,n=(parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),e.parentElement.id.indexOf("LineString")>-1),l=(this.selectionsettings,{color:n?this.selectionsettings.fill||this.selectionsettings.border.color:this.selectionsettings.border.color,width:n?this.selectionsettings.border.width/this.maps.scale:this.selectionsettings.border.width/("Marker"===this.selectionType?1:this.maps.scale),opacity:this.selectionsettings.border.opacity}),r={opacity:this.selectionsettings.opacity,fill:n?"transparent":"navigationline"!==this.selectionType?this.selectionsettings.fill:"none",border:l,name:si,target:e.id,cancel:!1,shapeData:i,data:a,maps:this.maps};this.maps.trigger("itemSelection",r,function(i){if(r.border.opacity=t.isNullOrUndefined(o.selectionsettings.border.opacity)?o.selectionsettings.opacity:o.selectionsettings.border.opacity,!r.cancel)if(e.getAttribute("class")===o.selectionType+"selectionMapStyle"||"LineselectionMapStyle"===e.getAttribute("class")){we(e),o.removedSelectionList(e);for(var a=0;a<o.maps.shapeSelectionItem.length;a++)if(o.maps.shapeSelectionItem[a]===r.shapeData){o.maps.shapeSelectionItem.splice(a,1);break}if(e.id.indexOf("NavigationIndex")>-1){var l=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10),s=parseInt(e.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);e.setAttribute("stroke-width",o.maps.layers[s].navigationLineSettings[l].width.toString()),e.setAttribute("stroke",o.maps.layers[s].navigationLineSettings[l].color)}}else{var d=ue(o.maps.element.id+"_Layer_Collections");if(!o.selectionsettings.enableMultiSelect&&(d.getElementsByClassName(o.selectionType+"selectionMapStyle").length>0||d.getElementsByClassName("LineselectionMapStyle").length>0)){for(var p=d.getElementsByClassName(o.selectionType+"selectionMapStyle").length,h=void 0,c=0;c<p;c++)we(h=d.getElementsByClassName(o.selectionType+"selectionMapStyle")[0]),o.removedSelectionList(h);if(d.getElementsByClassName("LineselectionMapStyle").length>0){p=d.getElementsByClassName("LineselectionMapStyle").length;for(c=0;c<p;c++)we(h=d.getElementsByClassName("LineselectionMapStyle")[0]),o.removedSelectionList(h)}if("Shape"===o.selectionType){o.maps.shapeSelectionItem=[];for(var m=o.maps.selectedElementId.length,u=0;u<m;u++){we(h=d.getElementsByClassName(o.selectionType+"selectionMapStyle")[0]);var g=o.maps.selectedElementId.indexOf(h.getAttribute("id"));o.maps.selectedElementId.splice(g,1)}}if(h.id.indexOf("NavigationIndex")>-1){var l=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10),y=parseInt(e.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);h.setAttribute("stroke-width",o.maps.layers[y].navigationLineSettings[l].width.toString()),h.setAttribute("stroke",o.maps.layers[y].navigationLineSettings[l].color)}}n?(be("LineselectionMap")?Le("LineselectionMap","LineselectionMapStyle",r):document.body.appendChild(_e("LineselectionMap","LineselectionMapStyle",r)),e.setAttribute("class","LineselectionMapStyle")):(be(o.selectionType+"selectionMap")?Le(o.selectionType+"selectionMap",o.selectionType+"selectionMapStyle",r):document.body.appendChild(_e(o.selectionType+"selectionMap",o.selectionType+"selectionMapStyle",r)),e.setAttribute("class",o.selectionType+"selectionMapStyle")),"ShapeselectionMapStyle"===e.getAttribute("class")&&(o.maps.shapeSelectionClass=be(o.selectionType+"selectionMap"),o.maps.selectedElementId.push(e.getAttribute("id")),o.maps.shapeSelectionItem.push(r.shapeData)),"MarkerselectionMapStyle"===e.getAttribute("class")&&(o.maps.markerSelectionClass=be(o.selectionType+"selectionMap"),o.maps.selectedMarkerElementId.push(e.getAttribute("id"))),"BubbleselectionMapStyle"===e.getAttribute("class")&&(o.maps.bubbleSelectionClass=be(o.selectionType+"selectionMap"),o.maps.selectedBubbleElementId.push(e.getAttribute("id"))),"navigationlineselectionMapStyle"===e.getAttribute("class")&&(o.maps.navigationSelectionClass=be(o.selectionType+"selectionMap"),o.maps.selectedNavigationElementId.push(e.getAttribute("id")))}})},e.prototype.removedSelectionList=function(e){"Shape"===this.selectionType&&this.maps.selectedElementId.splice(this.maps.selectedElementId.indexOf(e.getAttribute("id")),1),"Bubble"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1),"Marker"===this.selectionType&&this.maps.selectedMarkerElementId.splice(this.maps.selectedMarkerElementId.indexOf(e.getAttribute("id")),1),"navigationline"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1)},e.prototype.getModuleName=function(){return"Selection"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),Oi=function(){function e(e){this.maps=e,this.tooltipId=this.maps.element.id+"_mapsTooltip",this.addEventListener()}return e.prototype.renderTooltip=function(e){var a,o,n,l,r,d,p=this;-1!==e.type.indexOf("touch")?(this.isTouch=!0,a=(l=e).changedTouches[0].pageX,o=l.changedTouches[0].pageY,n=l.target):(this.isTouch="touch"===e.pointerType,a=e.pageX,o=e.pageY,n=e.target);var h,c,m,u="",g=n.id,y=[],f=g.indexOf("_LayerIndex_")>-1&&parseFloat(g.split("_LayerIndex_")[1].split("_")[0]),b=this.maps.layersCollection[f],v=[],S=s(a,o,this.maps.svgObject);if(this.tooltipTargetID=g,g.indexOf("_shapeIndex_")>-1||g.indexOf("_MarkerIndex_")>-1||g.indexOf("_BubbleIndex_")>-1){if(g.indexOf("_shapeIndex_")>-1){h=b.tooltipSettings;var x=parseInt(g.split("_shapeIndex_")[1].split("_")[0],10);if(t.isNullOrUndefined(b.layerData)||t.isNullOrUndefined(b.layerData[x]))return;var O=b.layerData[x].property,M=!1,L="[object Array]"===Object.prototype.toString.call(b.shapePropertyPath)?b.shapePropertyPath:[b.shapePropertyPath];if(!t.isNullOrUndefined(L)){for(var C=0;C<L.length;C++)for(var w=0;w<b.dataSource.length;w++){var I=b.dataSource[w],T=b.shapeDataPath.indexOf(".")>-1?P(I,b.shapeDataPath):I[b.shapeDataPath];if((!t.isNullOrUndefined(T)&&isNaN(I[b.shapeDataPath])?T.toLowerCase():T)===(!t.isNullOrUndefined(O[L[C]])&&isNaN(O[L[C]])?O[L[C]].toLowerCase():O[L[C]])){M=!0,f=w,C=L.length;break}}if(f=M?f:null,!t.isNullOrUndefined(b.dataSource[f])){y=JSON.parse(JSON.stringify(b.dataSource[f]));for(m in O)y.hasOwnProperty(m)||(y[m]=O[m])}}if(h.visible&&(!t.isNullOrUndefined(f)&&!isNaN(f)||!t.isNullOrUndefined(O)))if(b.tooltipSettings.format)u=this.formatter(b.tooltipSettings.format,y);else{var N=ie(b.shapeDataPath,b.shapePropertyPath,O);u=t.isNullOrUndefined(b.dataSource)||t.isNullOrUndefined(f)?O[N]:_(h.valuePath.indexOf(".")>-1?P(b.dataSource[f],h.valuePath):b.dataSource[f][h.valuePath],this.maps),t.isNullOrUndefined(u)&&(u=h.valuePath.indexOf(".")>-1?P(O,h.valuePath):O[h.valuePath])}}else if(g.indexOf("_MarkerIndex_")>-1){var k=parseInt(g.split("_MarkerIndex_")[1].split("_")[0],10),F=parseInt(g.split("_MarkerIndex_")[1].split("_")[2],10),E=b.markerSettings[k];h=E.tooltipSettings,y=E.dataSource[F],h.visible&&!isNaN(k)&&(u=E.tooltipSettings.format?this.formatter(E.tooltipSettings.format,E.dataSource[F]):E.template&&!E.tooltipSettings.valuePath?E.template.split(">")[1].split("<")[0]:_(E.tooltipSettings.valuePath.indexOf(".")>-1?P(E.dataSource[F],E.tooltipSettings.valuePath):E.dataSource[F][E.tooltipSettings.valuePath],this.maps))}else if(g.indexOf("_BubbleIndex_")>-1){var A=parseInt(g.split("_BubbleIndex_")[1].split("_")[0],10),F=parseInt(g.split("_BubbleIndex_")[1].split("_")[2],10),z=b.bubbleSettings[A];h=z.tooltipSettings,y=z.dataSource[F],h.visible&&!isNaN(F)&&(u=z.tooltipSettings.format?this.formatter(z.tooltipSettings.format,z.dataSource[F]):_(z.tooltipSettings.valuePath.indexOf(".")>-1?P(z.dataSource[F],z.tooltipSettings.valuePath):z.dataSource[F][z.tooltipSettings.valuePath],this.maps))}document.getElementById(this.tooltipId)?c=document.getElementById(this.tooltipId):(c=t.createElement("div",{id:this.maps.element.id+"_mapsTooltip",className:"EJ2-maps-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.maps.element.id+"_Secondary_Element").appendChild(c)),null!==h.template&&1===Object.keys("object"==typeof h.template?h.template:{}).length&&(h.template=h.template[Object.keys(h.template)[0]]);var B={location:S,text:v,data:y=this.setTooltipContent(h,y),textStyle:{color:h.textStyle.color,fontFamily:h.textStyle.fontFamily,fontStyle:h.textStyle.fontStyle,fontWeight:h.textStyle.fontWeight,opacity:h.textStyle.opacity,size:h.textStyle.size},template:h.template};r={cancel:!1,name:"tooltipRender",options:B,fill:h.fill,maps:this.maps,element:n,eventArgs:e},this.maps.trigger("tooltipRender",r,function(e){if(r.cancel||!h.visible||t.isNullOrUndefined(u)||-1!==g.indexOf("_cluster_")||-1!==g.indexOf("_dataLabel_"))p.clearTooltip();else if(p.maps.isProtectedOnChange=!0,r.options.textStyle.color=r.options.textStyle.color||p.maps.themeStyle.tooltipFontColor,r.options.textStyle.fontFamily=r.options.textStyle.fontFamily||p.maps.themeStyle.fontFamily,r.options.textStyle.opacity=r.options.textStyle.opacity||p.maps.themeStyle.tooltipTextOpacity,r.cancel?p.svgTooltip=new i.Tooltip({enable:!0,header:"",data:h.data,template:h.template,content:[u.toString()],shapes:[],location:h.location,palette:[void 0],areaBounds:p.maps.mapAreaRect,textStyle:h.textStyle,availableSize:p.maps.availableSize,fill:h.fill||p.maps.themeStyle.tooltipFillColor}):p.svgTooltip=new i.Tooltip({enable:!0,header:"",data:r.options.data,template:r.options.template,content:[u.toString()],shapes:[],location:r.options.location,palette:[void 0],areaBounds:p.maps.mapAreaRect,textStyle:r.options.textStyle,availableSize:p.maps.availableSize,fill:r.fill||p.maps.themeStyle.tooltipFillColor}),(p.maps.isVue||p.maps.isVue3)&&(p.svgTooltip.controlInstance=p.maps),p.svgTooltip.opacity=p.maps.themeStyle.tooltipFillOpacity||p.svgTooltip.opacity,p.svgTooltip.appendTo(c),p.maps.renderReactTemplates(),null!==(d=document.getElementById(p.maps.element.id+"_mapsTooltip"))&&-1!==d.innerHTML.indexOf("href")&&-1!==d.innerHTML.indexOf("</a>")){var a=d.getAttribute("style");a=a.replace("pointer-events: none;","position-events:all;"),d.setAttribute("style",a)}}),this.svgTooltip&&this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:B,element:this.svgTooltip.element}),this.svgTooltip?this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:B,element:this.svgTooltip.element}):this.clearTooltip()}else null!==(d=document.getElementById(this.maps.element.id+"_mapsTooltip"))&&-1!==d.innerHTML.indexOf("href")&&-1!==d.innerHTML.indexOf("</a>")?this.maps.notify(ei,this):this.clearTooltip()},e.prototype.setTooltipContent=function(e,i){var a=t.extend({},i,null,!0);return this.maps.format&&!isNaN(Number(a[e.valuePath]))?a[e.valuePath]=ye(this.maps,Number(a[e.valuePath])):a=Object.keys(a).length?a:void 0,a},e.prototype.formatter=function(e,t){void 0===t&&(t={});for(var i=0,a=Object.keys(t);i<a.length;i++){var o=a[i];e="object"==typeof t[o]?L("",e,t,this.maps):e.split("${"+o+"}").join(_(t[o],this.maps))}return e},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),"MouseMove"===this.maps.tooltipDisplayMode&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3))},e.prototype.removeTooltip=function(){var e=!1;return document.getElementsByClassName("EJ2-maps-Tooltip").length>0&&(t.remove(document.getElementsByClassName("EJ2-maps-Tooltip")[0]),e=!0),e},e.prototype.clearTooltip=function(){this.removeTooltip()&&this.maps.clearTemplate()},e.prototype.addEventListener=function(){this.maps.isDestroyed||("DoubleClick"===this.maps.tooltipDisplayMode?this.maps.on("dblclick",this.renderTooltip,this):"Click"===this.maps.tooltipDisplayMode?this.maps.on(t.Browser.touchEndEvent,this.mouseUpHandler,this):this.maps.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.maps.element.addEventListener("contextmenu",this.removeTooltip),this.maps.on(t.Browser.touchCancelEvent,this.removeTooltip,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||("DoubleClick"===this.maps.tooltipDisplayMode?this.maps.off("dblclick",this.removeTooltip):"Click"===this.maps.tooltipDisplayMode?this.maps.off(t.Browser.touchEndEvent,this.mouseUpHandler):this.maps.off(t.Browser.touchMoveEvent,this.renderTooltip),this.maps.off(t.Browser.touchCancelEvent,this.removeTooltip))},e.prototype.getModuleName=function(){return"MapsTooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),Mi=function(){function e(e){this.isPanning=!1,this.mouseEnter=!1,this.isTouch=!1,this.rectZoomingStart=!1,this.pinchRect=new ut(0,0,0,0),this.browserName=t.Browser.info.name,this.isPointer=t.Browser.isPointer,this.handled=!1,this.pinchFactor=1,this.startTouches=[],this.intersect=[],this.mouseDownLatLong={x:0,y:0},this.mouseMoveLatLong={x:0,y:0},this.isSingleClick=!1,this.maps=e,this.wheelEvent="mozilla"===this.browserName?this.isPointer?"mousewheel":"DOMMouseScroll":"mousewheel",this.cancelEvent=this.isPointer?"pointerleave":"mouseleave",this.selectionColor=this.maps.zoomSettings.selectionColor,this.fillColor=this.maps.zoomSettings.color,this.addEventListener(),this.groupElements=[]}return e.prototype.performZooming=function(e,t,i){var a=this,o=this.maps;o.previousProjection=o.projectionType,o.defaultState=!1,o.initialCheck=!1,o.markerZoomedState=!1,o.zoomPersistence=o.enablePersistence;var n=o.tileZoomLevel,l=o.previousScale=o.scale,r=o.zoomSettings.maxZoom,s=o.zoomSettings.minZoom;t=s>t&&"ZoomIn"===i?s+1:t;var d=o.tileTranslatePoint;if(o.isTileMap||!("ZoomIn"===i?t>=s&&t<=r:t>=s)&&!o.isReset){if(o.isTileMap&&t>=s&&t<=r)if(this.getTileTranslatePosition(n,t,e,i),o.tileZoomLevel=t,o.zoomSettings.zoomFactor=t,o.scale=Math.pow(2,t-1),"ZoomOut"===i&&o.zoomSettings.resetToInitial&&o.applyZoomReset&&t<=o.initialZoomLevel&&(o.initialCheck=!0,o.zoomPersistence=!1,o.tileTranslatePoint.x=o.initialTileTranslate.x,o.tileTranslatePoint.y=o.initialTileTranslate.y,t=o.tileZoomLevel=o.mapScaleValue=o.initialZoomLevel,o.scale=Math.pow(2,t-1)),o.translatePoint.y=(o.tileTranslatePoint.y-.01*o.mapScaleValue)/o.scale,o.translatePoint.x=(o.tileTranslatePoint.x-.01*o.mapScaleValue)/o.scale,this.triggerZoomEvent(d,n,i))o.translatePoint=o.tileTranslatePoint=new tt(0,0),o.scale=o.previousScale,o.tileZoomLevel=n,o.zoomSettings.zoomFactor=o.previousScale;else{document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),this.markerLineAnimation(o),o.mapLayerPanel.generateTiles(t,o.tileTranslatePoint,i+"wheel",null,e);document.getElementById(this.maps.element.id+"_tiles");var p=this.maps.layersCollection[0].animationDuration;setTimeout(function(){a.applyTransform(),document.getElementById(a.maps.element.id+"_LayerIndex_1")&&(document.getElementById(a.maps.element.id+"_LayerIndex_1").style.display="block")},p)}}else{var h=o.mapAreaRect,c=o.baseMapRectBounds.min,m=o.baseMapRectBounds.max,u=Math.abs(c.x-m.x),g=Math.abs(c.y-m.y),y=void 0,f=void 0;if(t<1.2&&"Eckert5"!==o.projectionType)0!==u&&0!==g&&u!==g||(u=h.width/2,g=h.height),t=parseFloat(Math.min(h.width/u,h.height/g).toFixed(2)),o.translatePoint=this.calculateInitalZoomTranslatePoint(t,u,g,h,c,o);else{var b=o.translatePoint;y=b.x-(h.width/l-h.width/t)/(h.width/e.x),f=b.y-(h.height/l-h.height/t)/(h.height/e.y);var v=Math.abs(o.baseMapRectBounds.max.y-o.baseMapRectBounds.min.y)*t;y=v<o.mapAreaRect.height?h.x+(-c.x+(h.width/2-u/2)):y,f=v<o.mapAreaRect.height?h.y+(-c.y+(h.height/2-g/2)):f,o.translatePoint=new tt(y,f)}o.scale=t,this.triggerZoomEvent(d,n,i)?(o.translatePoint=o.previousPoint,o.scale=o.mapScaleValue=o.previousScale):this.applyTransform()}this.maps.zoomNotApplied=!1},e.prototype.calculateInitalZoomTranslatePoint=function(e,t,i,a,o,n){t*=e,i*=e;var l=0!==o.x&&"layers"===n.translateType?n.availableSize.width-a.width:0,r=a.x+(-o.x+(a.width/2-t/2))-l,s=a.y+(-o.y+(a.height/2-i/2));return new tt(r,s)},e.prototype.triggerZoomEvent=function(e,t,i){var a,o=this.maps;return a=o.isTileMap?{cancel:!1,name:"zoom",type:i,maps:o,tileTranslatePoint:{previous:e,current:o.tileTranslatePoint},translatePoint:{previous:o.previousPoint,current:o.translatePoint},tileZoomLevel:{previous:t,current:o.tileZoomLevel},scale:{previous:o.previousScale,current:o.scale}}:{cancel:!1,name:"zoom",type:i,maps:o,tileTranslatePoint:{},translatePoint:{previous:o.previousPoint,current:o.translatePoint},tileZoomLevel:{},scale:{previous:o.previousScale,current:o.scale}},o.trigger("zoom",a),a.cancel},e.prototype.getTileTranslatePosition=function(e,t,i,a){var o=this.maps,n="ZoomOut"===a?10:"Reset"===a&&t>1?0:10,l=o.availableSize,r=256*Math.pow(2,e),s=256*Math.pow(2,t),d=(i.x-o.tileTranslatePoint.x)/r*100,p=(i.y-o.tileTranslatePoint.y)/r*100;o.tileTranslatePoint.x=1===t?l.width/2-256:i.x-d*s/100,o.tileTranslatePoint.y=1===t?l.height/2-256+2*n:i.y-p*s/100},e.prototype.performRectZooming=function(){this.isDragZoom=!0;var e=this.maps,t=e.availableSize;e.previousProjection=e.projectionType;var i,a=e.tileZoomLevel,o=e.tileTranslatePoint,n=this.zoomingRect,l=e.zoomSettings.maxZoom,r=e.zoomSettings.minZoom;if(n.height>0&&n.width>0){var s=this.zoomingRect.x+this.zoomingRect.width/2,d=this.zoomingRect.y+this.zoomingRect.height/2,p=void 0;if(e.isTileMap)p=(p=a+Math.round(a+(t.width/n.width+t.height/n.height)/2))>=r&&p<=l?p:l,e.zoomSettings.zoomFactor=p,this.getTileTranslatePosition(a,p,{x:s,y:d}),e.tileZoomLevel=p,e.translatePoint.x=(e.tileTranslatePoint.x-.5*Math.pow(2,p))/Math.pow(2,p),e.translatePoint.y=(e.tileTranslatePoint.y-.5*Math.pow(2,p))/Math.pow(2,p),e.scale=Math.pow(2,p),(i=this.triggerZoomEvent(o,a,""))?(e.translatePoint=e.tileTranslatePoint=new tt(0,0),e.scale=e.tileZoomLevel=e.zoomSettings.zoomFactor=a):e.mapLayerPanel.generateTiles(p,e.tileTranslatePoint);else{var h=e.previousScale=e.scale;p=h+Math.round((t.width/n.width+t.height/n.height)/2);var c=e.previousPoint=e.translatePoint,m=c.x-(t.width/h-t.width/p)/(t.width/s),u=c.y-(t.height/h-t.height/p)/(t.height/d);e.translatePoint=new tt(m,u),e.scale=p,(i=this.triggerZoomEvent(o,a,""))&&(e.translatePoint=e.previousPoint,e.scale=e.previousScale)}i||(e.mapScaleValue=p,this.applyTransform(!0),this.maps.zoomNotApplied=!1,this.zoomingRect=null)}},e.prototype.setInteraction=function(e){this.lastScale=1,this.interaction=e},e.prototype.updateInteraction=function(){2===this.fingers?this.setInteraction("zoom"):this.setInteraction(null)},e.prototype.performPinchZooming=function(e){var t=this.maps,i=t.tileZoomLevel,a=t.mapAreaRect;t.previousScale=t.scale,t.previousPoint=t.translatePoint;var o=t.tileTranslatePoint,n=Ue(this.touchStartList,this.touchMoveList),l=Ze(De(this.touchMoveList,this.maps)),r=n/this.lastScale;this.lastScale=n,this.pinchFactor*=r,this.pinchFactor=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.pinchFactor,this.maps.zoomSettings.minZoom));var s,d=this.pinchFactor;if(t.isTileMap){var p=d;this.getTileTranslatePosition(i,p,{x:l.x,y:l.y}),t.tileZoomLevel=p,t.translatePoint.x=(t.tileTranslatePoint.x-.5*Math.pow(2,p))/Math.pow(2,p),t.translatePoint.y=(t.tileTranslatePoint.y-.5*Math.pow(2,p))/Math.pow(2,p),t.scale=Math.pow(2,p),(s=this.triggerZoomEvent(o,i,""))?(t.translatePoint=t.tileTranslatePoint=new tt(0,0),t.scale=t.previousScale,t.tileZoomLevel=i,t.zoomSettings.zoomFactor=t.previousScale):t.mapLayerPanel.generateTiles(p,t.tileTranslatePoint)}else{var h=t.baseMapRectBounds.min,c=t.baseMapRectBounds.max,m=Math.abs(h.y-c.y),u=Math.abs(h.x-c.x),g=t.translatePoint,y=void 0,f=void 0;if(d<1.2&&"Eckert5"!==t.projectionType)0!==u&&0!==m&&u!==m||(u=a.width/2,m=a.height),d=parseFloat(Math.min(a.width/u,a.height/m).toFixed(2)),t.translatePoint=this.calculateInitalZoomTranslatePoint(d,u,m,a,h,t);else{var b=Math.abs(t.baseMapRectBounds.max.y-t.baseMapRectBounds.min.y)*d;y=g.x-(a.width/t.scale-a.width/d)/(a.width/l.x),f=g.y-(a.height/t.scale-a.height/d)/(a.height/l.y),y=b<t.mapAreaRect.height?a.x+(-h.x+(a.width/2-u/2)):y,f=b<t.mapAreaRect.height?a.y+(-h.y+(a.height/2-m/2)):f,t.translatePoint=new tt(y,f)}t.scale=d,(s=this.triggerZoomEvent(o,i,""))&&(t.translatePoint=t.previousPoint,t.scale=t.previousScale)}s||this.applyTransform()},e.prototype.drawZoomRectangle=function(){var e=this.maps,t=this.mouseDownPoints,i=this.mouseMovePoints,a={width:1,color:"#009900"},o=Math.abs(i.x-t.x),n=Math.abs(i.y-t.y),l=i.x>t.x?t.x:t.x-o,r=i.y>t.y?t.y:t.y-n;ue(e.element.id).getBoundingClientRect();if(l>e.mapAreaRect.x&&l<e.mapAreaRect.x+e.mapAreaRect.width&&r>e.mapAreaRect.y&&r<e.mapAreaRect.y+e.mapAreaRect.height){this.zoomingRect=new ut(l,r,o,n);var s=e.renderer.createSvg({id:e.element.id+"_Selection_Rect_Zooming",width:e.availableSize.width,height:e.availableSize.height}),d=new rt(e.element.id+"_ZoomRect","#d3d3d3",a,.5,this.zoomingRect,0,0,"","3");s.appendChild(e.renderer.drawRectangle(d)),ue(e.element.id+"_Secondary_Element").appendChild(s)}},e.prototype.animateTransform=function(e,t,i,a,o){var n=this.currentLayer.animationDuration;if(!t||0===n||this.maps.isTileMap)return void e.setAttribute("transform","scale("+o+") translate( "+i+" "+a+" )");this.maps.isTileMap||He(e,0,n,new mt(i,a),o,this.maps.mapAreaRect,this.maps)},e.prototype.applyTransform=function(e){var i;this.templateCount=0;var a,o=this.maps.scale,n=this.maps.translatePoint.x,l=this.maps.translatePoint.y;if(this.maps.zoomShapeCollection=[],document.getElementById(this.maps.element.id+"_mapsTooltip")&&de(this.maps.element.id+"_mapsTooltip"),this.layerCollectionEle){for(var r=0;r<this.layerCollectionEle.childElementCount;r++){var s=this.layerCollectionEle.childNodes[r];if("g"===s.tagName){this.templateCount++,this.index=s.id.indexOf("_LayerIndex_")>-1&&parseFloat(s.id.split("_LayerIndex_")[1].split("_")[0]),this.currentLayer=this.maps.layersCollection[this.index];for(var d=this.maps.mapLayerPanel.calculateFactor(this.currentLayer),p=0;p<s.childElementCount;p++){var h=s.childNodes[p];if(h.id.indexOf("_Markers_Group")>-1||h.id.indexOf("_bubble_Group")>-1||h.id.indexOf("_dataLableIndex_Group")>-1){if(h.id.indexOf("_Markers_Group")>-1){this.isPanning||this.markerTranslates(h.childNodes[0],d,n,l,o,"Marker",s,e),h=s.childNodes[p];var c=void 0;if(!t.isNullOrUndefined(h)&&-1!==h.id.indexOf("Markers")){for(_=0;_<h.childElementCount;_++){this.markerTranslate(h.childNodes[_],d,n,l,o,"Marker",e);parseInt(h.childNodes[_].id.split("_LayerIndex_")[1].split("_")[0],10);var m=parseInt(h.childNodes[_].id.split("_dataIndex_")[1].split("_")[0],10),u=parseInt(h.childNodes[_].id.split("_MarkerIndex_")[1].split("_")[0],10);c=this.currentLayer.markerSettings[u].animationDuration>0;for(var g=this.currentLayer.markerSettings[u].dataSource[m],y=0;y<this.currentLayer.markerSettings[u].initialMarkerSelection.length;y++)this.currentLayer.markerSettings[u].initialMarkerSelection[y].latitude!==g.latitude&&this.currentLayer.markerSettings[u].initialMarkerSelection[y].longitude!==g.longitude||this.maps.markerSelection(this.currentLayer.markerSettings[u].selectionSettings,this.maps,h.children[_],this.currentLayer.markerSettings[u].dataSource[m]);if((this.currentLayer.animationDuration>0||this.maps.layersCollection[0].animationDuration>0&&"SubLayer"===this.currentLayer.type)&&!this.isPanning)if(this.maps.isTileMap){var f=document.querySelector(".GroupElement");f&&!document.querySelector(".ClusterGroupElement")&&c&&(f.style.display="none")}else a="visibility:hidden",h.setAttribute("style",a)}if(this.isPanning&&this.maps.markerModule.sameMarkerData.length>0?F(this.maps.markerModule.sameMarkerData,this.maps,h,!0):this.maps.markerModule.sameMarkerData.length>0&&(this.maps.markerModule.sameMarkerData=[],document.getElementById(this.maps.element.id+"_mapsTooltip")&&de(this.maps.element.id+"_mapsTooltip")),document.getElementById(this.maps.element.id+"_mapsTooltip")&&this.maps.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&!this.isPanning){var b=this.maps.mapsTooltipModule,v=h.querySelector("#"+b.tooltipTargetID);if(!t.isNullOrUndefined(v))if("hidden"===v.style.visibility)de(this.maps.element.id+"_mapsTooltip");else{var S=parseFloat(v.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[1]),O=parseFloat(v.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[2]);this.maps.isTileMap&&(S+=+be(this.maps.element.id+"_tile_parent").style.left.split("px")[0],O+=+be(this.maps.element.id+"_tile_parent").style.top.split("px")[0]),b.svgTooltip.location.x=S,b.svgTooltip.location.y=O,b.svgTooltip.enableAnimation=!1}}}}else if(h.id.indexOf("_bubble_Group")>-1)for(var M=void 0,_=0;_<h.childElementCount;_++){(M=h.childNodes[_]).getAttribute("transform");i=parseFloat(M.id.split("_LayerIndex_")[1].split("_")[0]);for(var L=parseFloat(M.id.split("_BubbleIndex_")[1].split("_")[0]),m=parseFloat(M.id.split("_BubbleIndex_")[1].split("_")[2]),C=0;C<this.maps.bubbleModule.bubbleCollection.length;C++){var w=this.maps.bubbleModule.bubbleCollection[C];if(w.LayerIndex===i&&w.BubbleIndex===L&&w.DataIndex===m){var P=(w.center.x+n)*o,I=(w.center.y+l)*o,T=this.currentLayer.animationDuration;e&&0!==T?We(M,0,T,new mt(P,I)):M.setAttribute("transform","translate( "+P+" "+I+" )");break}}}else if(h.id.indexOf("_dataLableIndex_Group")>-1){this.intersect=[],this.maps.zoomLabelPositions=[],this.maps.zoomLabelPositions=this.maps.dataLabelModule.dataLabelCollections;for(_=0;_<h.childElementCount;_++)if(h.childNodes[_].id.indexOf("_LabelIndex_")>-1){var N=parseFloat(h.childNodes[_].id.split("_LabelIndex_")[1].split("_")[0]);this.zoomshapewidth=h.childNodes[_].getBoundingClientRect(),this.maps.zoomShapeCollection.push(this.zoomshapewidth),this.dataLabelTranslate(h.childNodes[_],d,n,l,o,"DataLabel",e);var k=this.maps.layers[this.index].dataLabelSettings.border;if(_>0&&k.width>1&&h.childNodes[_-1].id.indexOf("_rectIndex_")>-1){var E=(this.maps.zoomLabelPositions[N].location.x+n)*o,A=(this.maps.zoomLabelPositions[N].location.y+l)*o,z=x(h.childNodes[_].innerHTML,this.maps.layers[this.index].dataLabelSettings.textStyle),B=h.childNodes[_-1],j=E-z.width/2,U=A-z.height/2-5;B.setAttribute("x",j),B.setAttribute("y",U)}}}}else this.maps.isTileMap&&h.id.indexOf("_line_Group")>-1?(h.remove(),s.children.length>0&&s.children[0]?s.insertBefore(this.maps.navigationLineModule.renderNavigation(this.currentLayer,this.maps.tileZoomLevel,this.index),s.children[0]):s.appendChild(this.maps.navigationLineModule.renderNavigation(this.currentLayer,this.maps.tileZoomLevel,this.index))):-1==h.id.indexOf("Legend")&&(ze(h,this.index,o,this.maps),this.maps.zoomTranslatePoint=this.maps.translatePoint,this.animateTransform(h,e,n,l,o))}}this.maps.arrangeTemplate()}t.isNullOrUndefined(this.currentLayer)||e&&0!==this.currentLayer.animationDuration&&!this.maps.isTileMap||this.processTemplate(n,l,o,this.maps)}},e.prototype.markerTranslates=function(e,i,a,o,n,l,r,s){var d=this;void 0===s&&(s=!1);var p=0,m=0,u=0,g=parseInt((e||r).id.split("_LayerIndex_")[1].split("_")[0],10),y=this.maps.renderer.createGroup({id:this.maps.element.id+"_Markers_Group",class:"GroupElement",style:"pointer-events: auto;"});document.getElementById(y.id)&&de(y.id);var f=this.maps.mapAreaRect,b=t.createElement("div",{id:this.maps.element.id+"_LayerIndex_"+g+"_Markers_Template_Group",className:"template",styles:"overflow: hidden; position: absolute;pointer-events: none;top:"+f.y+"px;left:"+f.x+"px;height:"+f.height+"px;width:"+f.width+"px;"});document.getElementById(b.id)&&de(b.id);var v=this.maps.layersCollection[g];v.markerSettings.map(function(e,s){var f=e.dataSource;Array.prototype.forEach.call(f,function(S,x){d.maps.markerNullCount=s>=0&&0===x?0:d.maps.markerNullCount;var O={template:e.template,data:S,maps:d.maps,marker:e,cancel:!1,name:ti,fill:e.fill,colorValuePath:e.colorValuePath,shapeValuePath:e.shapeValuePath,height:e.height,width:e.width,imageUrl:e.imageUrl,imageUrlValuePath:e.imageUrlValuePath,shape:e.shape,border:e.border};O=T(O,S),O=I(O,S),d.maps.trigger("markerRendering",O,function(M){e.shapeValuePath!==O.shapeValuePath&&(O=T(O,S)),e.colorValuePath!==O.colorValuePath&&(O=I(O,S));var _=t.isNullOrUndefined(e.latitudeValuePath)?t.isNullOrUndefined(S.latitude)?t.isNullOrUndefined(S.Latitude)?null:S.Latitude:parseFloat(S.latitude):Number(P(S,e.latitudeValuePath)),L=t.isNullOrUndefined(e.longitudeValuePath)?t.isNullOrUndefined(S.longitude)?t.isNullOrUndefined(S.Longitude)?null:S.Longitude:parseFloat(S.longitude):Number(P(S,e.longitudeValuePath)),C=e.offset;if(!O.cancel&&e.visible&&!t.isNullOrUndefined(L)&&!t.isNullOrUndefined(_)){var w=d.maps.element.id+"_LayerIndex_"+g+"_MarkerIndex_"+s+"_dataIndex_"+x,k=d.maps.isTileMap?c(new mt(L,_),d.maps.tileZoomLevel,d.maps.tileTranslatePoint,!0):h(_,L,i,v,d.maps),F=(0!==v.animationDuration||t.isNullOrUndefined(d.maps.zoomModule),{x:a,y:o});!O.template||isNaN(k.x)||isNaN(k.y)?O.template||isNaN(k.x)||isNaN(k.y)||(m++,E(O,e,f,x,k,F,w,C,n,d.maps,y)):(u++,A(O,void 0,w,S,s,b,k,F,n,C,d.maps))}p+=isNaN(_)||isNaN(L)?1:0,u+=O.cancel?1:0,m+=O.cancel?1:0,d.maps.markerNullCount=t.isNullOrUndefined(_)||t.isNullOrUndefined(L)?d.maps.markerNullCount+1:d.maps.markerNullCount;var z=f.length-d.maps.markerNullCount;y.childElementCount===z-u-p&&"Template"!==l&&(r.appendChild(y),v.markerClusterSettings.allowClustering&&(d.maps.svgObject.appendChild(y),d.maps.element.appendChild(d.maps.svgObject),N(v,y,d.maps,g,y,r,!0,!0))),b.childElementCount===z-m-p&&ue(d.maps.element.id+"_Secondary_Element")&&(ue(d.maps.element.id+"_Secondary_Element").appendChild(b),n>=1&&v.markerClusterSettings.allowClustering&&N(v,b,d.maps,g,y,r,!1,!0))})})})},e.prototype.processTemplate=function(e,i,a,o){for(var n=0;n<this.templateCount;n++){var l=o.mapLayerPanel.calculateFactor(this.currentLayer),r=ue(o.element.id+"_LayerIndex_"+n+"_Markers_Template_Group"),s=ue(o.element.id+"_LayerIndex_"+n+"_Label_Template_Group");if(!t.isNullOrUndefined(r)&&r.childElementCount>0)for(d=0;d<r.childElementCount;d++)this.markerTranslate(r.childNodes[d],l,e,i,a,"Template");if(!t.isNullOrUndefined(s)&&s.childElementCount>0)for(var d=0;d<s.childElementCount;d++)this.dataLabelTranslate(s.childNodes[d],l,e,i,a,"Template")}},e.prototype.dataLabelTranslate=function(e,i,a,o,n,l,r){void 0===r&&(r=!1);var s,d,p,h,c,m=this.maps.dataLabelModule.dataLabelCollections,u=(e.getBoundingClientRect(),this.maps.layers[this.index].dataLabelSettings.textStyle),g=(this.maps.layers[this.index].dataLabelSettings.labelPath,parseFloat(e.id.split("_LayerIndex_")[1].split("_")[0])),y=parseFloat(e.id.split("_shapeIndex_")[1].split("_")[0]);e.id.indexOf("_LabelIndex_")>-1&&(c=parseFloat(e.id.split("_LabelIndex_")[1].split("_")[0]));for(var f=this.currentLayer.animationDuration,b=0;b<m.length;b++){var v=m[b];if(v.layerIndex===g&&v.shapeIndex===y&&v.labelIndex===c){var S=v.location.x,O=v.location.y;if("Template"===l){var M=ue(this.maps.element.id+"_Layer_Collections");S=Math.abs(this.maps.baseMapRectBounds.min.x-S)*n,O=Math.abs(this.maps.baseMapRectBounds.min.y-O)*n;var _=e.getBoundingClientRect(),L=M.getBoundingClientRect(),C=e.parentElement.getBoundingClientRect(),w=S+(L.left-C.left)-_.width/2,P=O+(L.top-C.top)-_.height/2;e.style.left=w+"px",e.style.top=P+"px"}else{S=(S+a)*n;var I=(O=(O+o)*n)-(h=x(p=v.dataLabelText,u)).height/4,T=O+h.height/4,N={rightWidth:S+h.width/2,leftWidth:S-h.width/2,heightTop:I,heightBottom:T};if(r&&0!==f||e.setAttribute("transform","translate( "+S+" "+O+" )"),"Hide"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(n>1?(s=this.maps.dataLabelShape[b]*n>=h.width?p:"",e.innerHTML=s):(s=this.maps.dataLabelShape[b]>=h.width?p:"",e.innerHTML=s)),"Trim"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(n>1?(s=re(this.maps.dataLabelShape[b]*n,p,u),e.innerHTML=s):(s=re(this.maps.dataLabelShape[b],p,u),e.innerHTML=s)),"Hide"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var k=0;k<this.intersect.length;k++)if(!t.isNullOrUndefined(this.intersect[k])){if(!(N.leftWidth>this.intersect[k].rightWidth||N.rightWidth<this.intersect[k].leftWidth||N.heightTop>this.intersect[k].heightBottom||N.heightBottom<this.intersect[k].heightTop)){s="",e.innerHTML=s;break}s=t.isNullOrUndefined(s)?p:s,e.innerHTML=s}this.intersect.push(N)}if("Trim"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var F=0;F<this.intersect.length;F++)if(!t.isNullOrUndefined(this.intersect[F]))if(N.rightWidth<this.intersect[F].leftWidth||N.leftWidth>this.intersect[F].rightWidth||N.heightBottom<this.intersect[F].heightTop||N.heightTop>this.intersect[F].heightBottom)d=t.isNullOrUndefined(s)?p:s,n>1&&(d=re(this.maps.dataLabelShape[b]*n,d,u)),e.innerHTML=d;else{if(N.leftWidth>this.intersect[F].leftWidth){d=re(A=(E=this.intersect[F].rightWidth-N.leftWidth)-(N.rightWidth-N.leftWidth),s=t.isNullOrUndefined(s)?p:s,u),e.innerHTML=d;break}if(N.leftWidth<this.intersect[F].leftWidth){var E=N.rightWidth-this.intersect[F].leftWidth,A=Math.abs(E-(N.rightWidth-N.leftWidth));d=re(A,s=t.isNullOrUndefined(s)?p:s,u),e.innerHTML=d;break}}this.intersect.push(N),t.isNullOrUndefined(d)&&(d=re(this.maps.dataLabelShape[b]*n,p,u),e.innerHTML=d)}(r||f>0)&&We(e,0,f,new mt(S,O))}}}},e.prototype.markerTranslate=function(e,i,a,o,n,l,r){void 0===r&&(r=!1);var s=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),d=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),p=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),m=this.maps.layersCollection[s],u=m.markerSettings[d];if(!t.isNullOrUndefined(u)&&!t.isNullOrUndefined(u.dataSource)&&!t.isNullOrUndefined(u.dataSource[p])){var g=t.isNullOrUndefined(u.longitudeValuePath)?t.isNullOrUndefined(u.dataSource[p].longitude)?t.isNullOrUndefined(u.dataSource[p].Latitude)?0:parseFloat(u.dataSource[p].Latitude):parseFloat(u.dataSource[p].longitude):Number(P(u.dataSource[p],u.longitudeValuePath)),y=t.isNullOrUndefined(u.latitudeValuePath)?t.isNullOrUndefined(u.dataSource[p].latitude)?t.isNullOrUndefined(u.dataSource[p].Latitude)?0:parseFloat(u.dataSource[p].Latitude):parseFloat(u.dataSource[p].latitude):Number(P(u.dataSource[p],u.latitudeValuePath)),f=this.currentLayer.animationDuration,b=this.maps.isTileMap?c(new tt(g,y),this.maps.tileZoomLevel,this.maps.tileTranslatePoint,!0):h(y,g,i,m,this.maps);if(this.maps.isTileMap)if("Template"===l){var v=e.getBoundingClientRect();if(e.style.left=b.x-v.width/2+u.offset.x+"px",e.style.top=b.y-v.height/2+u.offset.y+"px","GoogleStaticMap"===this.maps.layers[this.maps.baseLayerIndex].layerType){var S=ue(this.maps.element.id+"_StaticGoogleMap").getBoundingClientRect();"none"!==e.style.display&&((S.x>v.x||S.x+640<v.x+v.width)&&(S.y>v.y||S.y+S.height<v.y+v.height)?e.style.display="none":(S.x>v.x||S.x+640<v.x+v.width)&&(e.style.display="none"))}}else b.x+=u.offset.x,b.y+=u.offset.y,e.setAttribute("transform","translate( "+b.x+" "+b.y+" )");else if("Template"===l)if(f>0){b.x=Math.abs(this.maps.baseMapRectBounds.min.x-b.x)*n,b.y=Math.abs(this.maps.baseMapRectBounds.min.y-b.y)*n;var x=ue(this.maps.element.id+"_Layer_Collections").getBoundingClientRect(),O=e.parentElement.getBoundingClientRect();e.style.left=b.x+(x.left-O.left)+u.offset.x+"px",e.style.top=b.y+(x.top-O.top)+u.offset.y+"px",e.style.transform="translate(-50%, -50%)"}else{O=e.getBoundingClientRect();e.style.left=(b.x+a)*n+u.offset.x-this.maps.mapAreaRect.x-O.width/2+"px",e.style.top=(b.y+o)*n+u.offset.y-this.maps.mapAreaRect.y-O.height/2+"px"}else b.x=(b.x+a)*n+u.offset.x,b.y=(b.y+o)*n+u.offset.y,r&&0!==f?We(e,0,f,b):e.setAttribute("transform","translate( "+b.x+" "+b.y+" )")}},e.prototype.markerLineAnimation=function(e){if(e.isTileMap)for(var i=0;i<e.layersCollection.length;i++){var a=ue(this.maps.element.id+"_LayerIndex_"+i+"_Markers_Template_Group"),o=ue(this.maps.element.id+"_LayerIndex_"+i+"_line_Group");t.isNullOrUndefined(a)||(a.style.visibility="hidden"),t.isNullOrUndefined(o)||(o.style.visibility="hidden")}},e.prototype.panning=function(e,i,a,o){var n,l=this.maps,r=this.mouseDownPoints,s=this.mouseMovePoints,d=l.scale;l.markerZoomedState=!1,l.zoomPersistence=l.enablePersistence,l.defaultState=!1,l.initialCheck=!1;var p,h,c=l.translatePoint,m=l.tileTranslatePoint;if(i=t.isNullOrUndefined(i)?r.x-s.x:i,a=t.isNullOrUndefined(a)?r.y-s.y:a,this.maps.mergeCluster(),l.isTileMap){if(this.maps.tileZoomLevel>1){p=l.tileTranslatePoint.x-i,h=l.tileTranslatePoint.y-a,this.distanceX=p-l.tileTranslatePoint.x,this.distanceY=h-l.tileTranslatePoint.y,l.tileTranslatePoint.x=p,l.tileTranslatePoint.y=h,(l.tileTranslatePoint.y>-10&&a<0||l.tileTranslatePoint.y<-256*(Math.pow(2,this.maps.tileZoomLevel)-2)&&a>0)&&(l.tileTranslatePoint.x=p+i,l.tileTranslatePoint.y=h+a),l.translatePoint.x=(l.tileTranslatePoint.x-i)/l.scale,l.translatePoint.y=(l.tileTranslatePoint.y-a)/l.scale;var u=this.maps.getTileGeoLocation(o.layerX,o.layerY);n={cancel:!1,name:"pan",maps:l,tileTranslatePoint:{previous:m,current:l.tileTranslatePoint},translatePoint:{previous:c,current:l.translatePoint},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:u.latitude,longitude:u.longitude},l.trigger("pan",n),l.mapLayerPanel.generateTiles(l.tileZoomLevel,l.tileTranslatePoint,"Pan"),this.applyTransform()}}else{var g=document.getElementById(l.element.id+"_Legend_Group"),y=t.isNullOrUndefined(g)?0:g.getClientRects()[0].height;p=c.x-i/d,h=c.y-a/d;var f=ue(l.element.id+"_Layer_Collections").getBoundingClientRect(),b=ue(l.element.id+"_svg").getBoundingClientRect(),v=i<0?f.left<=b.left+l.mapAreaRect.x:f.left+f.width+l.mapAreaRect.x>=b.width,S=a<0?f.top<=b.top+l.mapAreaRect.y:f.top+f.height+y+l.margin.top>=b.top+b.height,x=this.maps.getGeoLocation(this.maps.layersCollection.length-1,o.layerX,o.layerY);n={cancel:!1,name:"pan",maps:l,tileTranslatePoint:{},translatePoint:{previous:c,current:new tt(p,h)},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:x.latitude,longitude:x.longitude},l.trigger("pan",n),n.cancel||(v&&S?(l.translatePoint=new tt(p,h),this.applyTransform()):v?(l.translatePoint=new tt(p,l.translatePoint.y),this.applyTransform()):S&&(l.translatePoint=new tt(l.translatePoint.x,h),this.applyTransform())),this.maps.zoomNotApplied=!1}l.zoomTranslatePoint=l.translatePoint,this.mouseDownPoints=this.mouseMovePoints,this.maps.zoomNotApplied=!1,this.isSingleClick=!1},e.prototype.toAlignSublayer=function(){this.maps.translatePoint.x=t.isNullOrUndefined(this.distanceX)?this.maps.translatePoint.x:this.maps.translatePoint.x-this.distanceX/this.maps.scale,this.maps.translatePoint.y=t.isNullOrUndefined(this.distanceY)?this.maps.translatePoint.y:this.maps.translatePoint.y-this.distanceY/this.maps.scale,this.applyTransform(!1)},e.prototype.toolBarZooming=function(e,t){var i=this,a=this.maps;a.initialCheck=!1,a.defaultState="Reset"===t&&1===e&&!(a.zoomSettings.resetToInitial&&a.applyZoomReset)||"ZoomOut"===t&&1===e;var o=a.tileZoomLevel,n=a.previousScale=a.scale;a.markerZoomedState=!1,a.zoomPersistence=a.enablePersistence,a.mapScaleValue=e;var l=a.zoomSettings.maxZoom,r=a.zoomSettings.minZoom,s=a.mapAreaRect,d=a.previousPoint=a.translatePoint,p=a.tileTranslatePoint;if(a.previousProjection=a.projectionType,e="ZoomOut"===t&&1===Math.round(e)?1:e,e="Reset"===t?1:0===Math.round(e)?1:e,e=r>e&&"ZoomIn"===t?r+1:e,!a.isTileMap&&("ZoomIn"===t?e>=r&&e<=l:e>=r||a.isReset)){var h=a.baseMapRectBounds.min,c=a.baseMapRectBounds.max,m=Math.abs(c.x-h.x),u=Math.abs(h.y-c.y),g=void 0,y=void 0;if(e<1.2&&"Eckert5"!==a.projectionType)0!==u&&0!==m&&u!==m||(m=s.width/2,u=s.height),e=parseFloat(Math.min(s.width/m,s.height/u).toFixed(2)),a.translatePoint=this.calculateInitalZoomTranslatePoint(e,m,u,s,h,a);else{g=d.x-(s.width/n-s.width/e)/2,y=d.y-(s.height/n-s.height/e)/2;var f=Math.abs(a.baseMapRectBounds.max.y-a.baseMapRectBounds.min.y)*e;g=f<a.mapAreaRect.height?s.x+(-h.x+(s.width/2-m/2)):g,y=f<a.mapAreaRect.height?s.y+(-h.y+(s.height/2-u/2)):y,a.translatePoint=new tt(g,y)}a.zoomTranslatePoint=a.translatePoint,a.scale=e,this.triggerZoomEvent(p,o,t)?(a.translatePoint=a.zoomTranslatePoint=a.previousPoint,a.scale=a.previousScale):this.applyTransform(!0)}else if(a.isTileMap&&(e>=r&&e<=l||a.isReset)){var b=o<r&&!a.isReset?r:e;if(a.scale=Math.pow(2,b-1),a.tileZoomLevel=b,a.previousScale!==a.scale||a.isReset){a.zoomSettings.zoomFactor=e;var v={x:a.availableSize.width/2,y:a.availableSize.height/2};if(this.getTileTranslatePosition(o,b,v,t),(a.zoomSettings.resetToInitial&&a.applyZoomReset&&"Reset"===t||"ZoomOut"===t&&a.zoomSettings.resetToInitial&&a.applyZoomReset&&b<=a.initialZoomLevel)&&(a.initialCheck=!0,a.zoomPersistence=!1,a.tileTranslatePoint.x=a.initialTileTranslate.x,a.tileTranslatePoint.y=a.initialTileTranslate.y,b=a.tileZoomLevel=a.mapScaleValue=a.initialZoomLevel),this.triggerZoomEvent(p,o,t))a.translatePoint=a.tileTranslatePoint=new tt(0,0),a.scale=a.previousScale,a.tileZoomLevel=o,a.zoomSettings.zoomFactor=a.previousScale;else{a.translatePoint.y=(a.tileTranslatePoint.y-.01*a.mapScaleValue)/a.scale,a.translatePoint.x=(a.tileTranslatePoint.x-.01*a.mapScaleValue)/a.scale,document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),this.markerLineAnimation(a),a.mapLayerPanel.generateTiles(b,a.tileTranslatePoint,t);document.getElementById(this.maps.element.id+"_tiles");var S=this.maps.layersCollection[0].animationDuration;setTimeout(function(){i.applyTransform(!0),document.getElementById(i.maps.element.id+"_LayerIndex_1")&&(document.getElementById(i.maps.element.id+"_LayerIndex_1").style.display="block")},S)}}this.maps.zoomNotApplied=!1}},e.prototype.createZoomingToolbars=function(){var e=this.maps;this.toolBarGroup=e.renderer.createGroup({id:e.element.id+"_Zooming_KitCollection",opacity:"fluentdark"===e.theme.toLowerCase()?.6:.3});var t=15,i=15,a=e.zoomSettings.toolBarOrientation,o=e.zoomSettings.toolbars,n='<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';n+='<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>',n+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var l=e.zoomSettings.toolbars.length,r="Horizontal"===e.zoomSettings.toolBarOrientation?16*l+20*l:32,s="Horizontal"===e.zoomSettings.toolBarOrientation?32:16*l+20*l;this.toolBarGroup.appendChild(e.renderer.drawRectangle(new rt(e.element.id+"_Zooming_Rect","transparent",{color:"transparent",width:1},1,new ut(0,0,r,s),0,0)));var d=e.renderer.createDefs();d.innerHTML=n,this.toolBarGroup.appendChild(d);var p=e.renderer.drawRectangle(new rt(e.element.id+"_Zooming_Rect","transparent",{color:"transparent",width:1},.1,new ut(0,0,r,s),0,0));p.setAttribute("filter","url(#chart_shadow)"),this.toolBarGroup.appendChild(p);for(var h=0;h<o.length;h++){var c=o[h];this.currentToolbarEle=e.renderer.createGroup({id:e.element.id+"_Zooming_ToolBar_"+c+"_Group",transform:"translate( "+t+" "+i+" ) "}),this.currentToolbarEle.setAttribute("class","e-maps-toolbar");var m="transparent",u="";switch(this.selectionColor=this.maps.zoomSettings.selectionColor||this.maps.themeStyle.zoomSelectionColor,c.toLowerCase()){case"zoom":var g=void 0,y=void 0;u="M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,",u+="5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571",u+="L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,",this.maps.zoomSettings.enablePanning&&!this.maps.zoomSettings.enableSelectionZooming?(g=m,y=this.maps.themeStyle.zoomFillColor):this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(g=m,y=this.maps.themeStyle.zoomFillColor):this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming?(g=this.selectionColor,y=this.selectionColor):(g=m,y=this.maps.themeStyle.zoomFillColor),this.currentToolbarEle.appendChild(e.renderer.drawPath(new nt(e.element.id+"_Zooming_ToolBar_"+c,g,1,y,1,1,null,u+"4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"))),this.zoomElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomin":u="M 8, 0 L 8, 16 M 0, 8 L 16, 8",this.currentToolbarEle.appendChild(e.renderer.drawPath(new nt(e.element.id+"_Zooming_ToolBar_"+c+"_Path",m,3,this.maps.themeStyle.zoomFillColor,1,1,null,u))),this.zoomInElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomout":u="M 0, 8 L 16, 8",this.currentToolbarEle.appendChild(e.renderer.drawPath(new nt(e.element.id+"_Zooming_ToolBar_"+c,m,3,this.maps.themeStyle.zoomFillColor,1,1,null,u))),this.zoomOutElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"pan":var f=void 0;u="M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,",u+="11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z",this.maps.zoomSettings.enablePanning&&this.maps.zoomModule.isDragZoom?f="#737373":this.maps.zoomSettings.enablePanning?f=this.selectionColor:(f="#737373",this.currentToolbarEle.setAttribute("class","")),this.currentToolbarEle.appendChild(e.renderer.drawPath(new nt(e.element.id+"_Zooming_ToolBar_"+c,f,1,f,1,1,null,u))),this.panColor=f,this.panElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"reset":u="M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,",u+="1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,",u+="13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,",this.currentToolbarEle.appendChild(e.renderer.drawPath(new nt(e.element.id+"_Zooming_ToolBar_"+c,this.fillColor,null,this.maps.themeStyle.zoomFillColor,1,1,null,u+"3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z"))),this.wireEvents(this.currentToolbarEle,this.performToolBarAction)}this.currentToolbarEle.appendChild(e.renderer.drawCircle(new st(e.element.id+"_Zooming_ToolBar_"+c+"_Rect",m,{color:this.maps.themeStyle.zoomFillColor,width:1},1,8,8,16,""))),t="Horizontal"===a?t+36:t,i="Horizontal"===a?i:i+36,this.toolBarGroup.appendChild(this.currentToolbarEle)}},e.prototype.performToolBarAction=function(e){var t=e.target;e.stopImmediatePropagation();var i="touch"===e.pointerType||"2"===e.pointerType||e.type.indexOf("touch")>-1,a=t.id.split("_Zooming_ToolBar_")[1].split("_")[0];i?(this.handled=!0,this.performZoomingByToolBar(a)):"mousedown"!==e.type&&"pointerdown"!==e.type||this.handled?this.handled=!1:(this.handled=!1,this.performZoomingByToolBar(a))},e.prototype.performZoomingByToolBar=function(e){var t=this.maps;switch(t.isReset=!1,e.toLowerCase()){case"zoom":this.panColor=this.fillColor,this.zoomColor=this.selectionColor,this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.fillColor);break;case"pan":this.maps.zoomSettings.enablePanning?this.panColor=this.selectionColor:this.panColor="#737373",this.zoomColor=this.fillColor,this.maps.zoomSettings.enablePanning?(this.applySelection(this.zoomElements,this.fillColor),this.applySelection(this.panElements,this.panColor)):(this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.panColor));break;case"zoomin":t.staticMapZoom=t.tileZoomLevel,t.staticMapZoom>0&&t.staticMapZoom<22&&(t.staticMapZoom+=1),this.toolBarZooming((t.isTileMap?t.tileZoomLevel:t.scale)+1,"ZoomIn");break;case"zoomout":t.staticMapZoom=t.tileZoomLevel,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.toolBarZooming((t.isTileMap?t.tileZoomLevel:t.scale)-1,"ZoomOut");break;case"reset":t.staticMapZoom=t.zoomSettings.enable?t.zoomSettings.zoomFactor:0,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.toolBarZooming(1,"Reset"),this.maps.zoomSettings.enablePanning?(this.applySelection(this.zoomElements,this.fillColor),this.applySelection(this.panElements,this.selectionColor)):(this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,"#737373"))}this.panningStyle(e.toLowerCase())},e.prototype.panningStyle=function(e){var t=ue(this.maps.element.id+"_svg");"pan"===e||this.isPanning?t.setAttribute("class","e-maps-panning"):t.setAttribute("class","")},e.prototype.applySelection=function(e,t){if(e)for(var i,a=0;a<e.childElementCount;a++)"circle"!==(i=e.childNodes[a]).tagName&&(i.setAttribute("fill",t),i.setAttribute("stroke",t))},e.prototype.showTooltip=function(e){var t=e.target.id.split("_Zooming_ToolBar_")[1].split("_")[0];this.isTouch||ke("EJ2_Map_Toolbar_Tip",this.maps.getLocalizedLabel(t),e.pageY+10,e.pageX+10,"10px")},e.prototype.removeTooltip=function(){ue("EJ2_Map_Toolbar_Tip")&&t.remove(ue("EJ2_Map_Toolbar_Tip"))},e.prototype.alignToolBar=function(){var e=this.maps,i=t.createElement("div",{id:e.element.id+"_ToolBar",styles:"position:absolute;z-index:2"}),a=e.renderer.createSvg({id:e.element.id+"_Zooming_ToolBar",width:10,height:10});a.appendChild(this.toolBarGroup),i.appendChild(a),ue(e.element.id+"_Secondary_Element")&&ue(e.element.id+"_Secondary_Element").appendChild(i);var o=this.toolBarGroup.getBoundingClientRect();a.setAttribute("height",(o.height+5).toString()),a.setAttribute("width",(o.width+5).toString());var n=t.isNullOrUndefined(e.totalRect)?e.mapAreaRect:e.totalRect,l=0,r=0;switch(e.zoomSettings.verticalAlignment){case"Near":r=n.y;break;case"Center":r=n.height/2-o.height/2;break;case"Far":r=n.height-o.height-10}switch(e.zoomSettings.horizontalAlignment){case"Near":l=n.x;break;case"Center":l=n.width/2-o.width/2;break;case"Far":l=t.isNullOrUndefined(e.legendModule)||"Left"!==e.legendSettings.position?n.width-o.width-10:n.width+n.x-o.width-10}var s=e.getExtraPosition();i.style.left=l+s.x+"px",i.style.top=r+s.y+"px";var d=this.maps.zoomSettings.highlightColor||this.maps.themeStyle.zoomSelectionColor,p=" .e-maps-toolbar:hover > circle { stroke:"+d+"; } .e-maps-toolbar:hover > path { fill: "+d+" ; stroke: "+d+"; }.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } .e-maps-popup-close { display: block; opacity: 0; }",h=document.createElement("style");h.appendChild(document.createTextNode(p)),i.appendChild(h)},e.prototype.wireEvents=function(e,i){t.EventHandler.add(e,t.Browser.touchStartEvent,i,this),t.EventHandler.add(e,"mouseover",this.showTooltip,this),t.EventHandler.add(e,"mouseout",this.removeTooltip,this)},e.prototype.mapMouseWheel=function(e){if(this.maps.zoomSettings.enable&&this.maps.zoomSettings.mouseWheelZoom){var t=this.maps;t.availableSize;t.markerZoomedState=!1,t.zoomPersistence=t.enablePersistence;var i=this.getMousePosition(e.pageX,e.pageY),a=t.tileZoomLevel,o=t.scale,n=t.isTileMap?a:o;if(i.x>t.mapAreaRect.x&&i.x<t.mapAreaRect.x+t.mapAreaRect.width&&i.y>t.mapAreaRect.y&&i.y<t.mapAreaRect.y+t.mapAreaRect.height){e.preventDefault();var l="mozilla"!==this.browserName||this.isPointer?e.wheelDelta/120>0?"ZoomIn":"ZoomOut":-e.detail/3>0?"ZoomIn":"ZoomOut";"ZoomIn"===l?(t.mapScaleValue=n+1,t.staticMapZoom=t.tileZoomLevel,t.staticMapZoom>0&&t.staticMapZoom<22&&(t.staticMapZoom+=1),this.performZooming(i,n+1,l)):(t.mapScaleValue=n-1,t.isReset=t.mapScaleValue<1,t.staticMapZoom=t.tileZoomLevel,1===t.mapScaleValue&&(t.markerCenterLatitude=null,t.markerCenterLongitude=null),t.staticMapZoom>1&&t.staticMapZoom<22&&(t.staticMapZoom-=1),this.performZooming(i,n-1,l))}}},e.prototype.doubleClick=function(e){var t=e.pageX,i=e.pageY;e.target;if(this.maps.zoomSettings.enable&&this.maps.zoomSettings.doubleClickZoom&&!(e.target.id.indexOf("_Zooming_")>-1)){var a=this.getMousePosition(t,i),o=this.maps,n=(o.availableSize,o.tileZoomLevel),l=o.scale;o.mapScaleValue=o.mapScaleValue+1;var r=o.isTileMap?n:l;a.x>o.mapAreaRect.x&&a.x<o.mapAreaRect.x+o.mapAreaRect.width&&a.y>o.mapAreaRect.y&&a.y<o.mapAreaRect.y+o.mapAreaRect.height&&this.performZooming(a,r+1,"ZoomIn")}},e.prototype.mouseDownHandler=function(e){var t,i,a=null;e.target;"touchstart"===e.type?(this.isTouch=!0,a=e.touches,e.target,t=a[0].clientX,i=a[0].clientY):(t=e.pageX,i=e.pageY,e.target),this.maps.zoomSettings.enablePanning?this.isPanning=this.panColor===this.selectionColor?this.maps.zoomSettings.enablePanning:this.zoomColor!==this.selectionColor:this.isPanning=this.panColor!==this.selectionColor?this.maps.zoomSettings.enablePanning:this.zoomColor===this.selectionColor,this.mouseDownLatLong={x:t,y:i},this.rectZoomingStart=!this.isPanning&&this.maps.zoomSettings.enable,this.mouseDownPoints=this.getMousePosition(t,i),this.isTouch&&(this.firstMove=!0,this.pinchFactor=this.maps.scale,this.fingers=a.length),this.isSingleClick=!0},e.prototype.mouseMoveHandler=function(e){var i,a,o,n=this.maps,l=null,r=this.maps.zoomSettings;"touchmove"===e.type?(this.isTouch=!0,o=e.target,i=(l=e.touches)[0].clientX,a=l[0].clientY):(i=e.pageX,a=e.pageY,o=e.target),ue(n.element.id+"_Zooming_KitCollection")&&(o.id.indexOf("_Zooming_")>-1?(ue(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"),document.getElementById(n.element.id+"_Zooming_ToolBar_Pan_Group")&&(this.maps.zoomSettings.enablePanning||(o.id.indexOf("_Zooming_ToolBar")>-1||o.id.indexOf("_Zooming_Rect")>-1)&&(ue(n.element.id+"_Zooming_ToolBar_Pan_Rect").setAttribute("opacity","fluentdark"===n.theme.toLowerCase()?"0.6":"0.3"),ue(n.element.id+"_Zooming_ToolBar_Pan").setAttribute("opacity","fluentdark"===n.theme.toLowerCase()?"0.6":"0.3")))):(ue(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","fluentdark"===n.theme.toLowerCase()?"0.6":"0.3"),!this.maps.zoomSettings.enablePanning&&document.getElementById(n.element.id+"_Zooming_ToolBar_Pan_Group")&&(ue(n.element.id+"_Zooming_ToolBar_Pan_Rect").setAttribute("opacity","1"),ue(n.element.id+"_Zooming_ToolBar_Pan").setAttribute("opacity","1")))),this.isTouch&&this.maps.zoomSettings.pinchZooming&&(this.firstMove&&2===l.length?(this.rectZoomingStart=!1,this.updateInteraction(),this.touchStartList=je(e)):2===l.length&&2===this.touchStartList.length&&(this.touchMoveList=je(e),e.preventDefault(),this.rectZoomingStart=!1,this.performPinchZooming(e)),this.firstMove=!1),this.mouseMovePoints=this.getMousePosition(i,a);e.target.id,e.target;r.enable&&this.isPanning&&(t.Browser.isDevice&&l.length>=1||!t.Browser.isDevice)&&(e.preventDefault(),this.maps.element.style.cursor="pointer",this.mouseMoveLatLong={x:i,y:a},this.mouseDownLatLong.x!==this.mouseMoveLatLong.x&&this.mouseDownLatLong.y!==this.mouseMoveLatLong.y&&(this.maps.zoomSettings.enablePanning&&this.panning("None",null,null,e),this.mouseDownLatLong.x=i,this.mouseDownLatLong.y=a)),(this.isTouch?1===l.length&&this.rectZoomingStart:this.rectZoomingStart)&&(e.preventDefault(),this.maps.zoomSettings.enableSelectionZooming&&this.drawZoomRectangle())},e.prototype.mouseUpHandler=function(e){this.maps;this.rectZoomingStart=!1,this.isPanning=!1,this.isSingleClick=!!this.isSingleClick,this.isTouch=!1,this.touchStartList=[],this.touchMoveList=[],this.lastScale=1,this.maps.element.style.cursor="auto",t.isNullOrUndefined(this.distanceX)&&t.isNullOrUndefined(this.distanceY)||t.isNullOrUndefined(this.currentLayer)||"SubLayer"!==this.currentLayer.type||(this.toAlignSublayer(),this.distanceX=this.distanceY=null);var i=ue(this.maps.element.id+"_Selection_Rect_Zooming");i&&this.maps.zoomSettings.enable&&this.maps.zoomSettings.enableSelectionZooming&&(t.remove(i),this.performRectZooming()),this.mouseMoveLatLong={x:0,y:0},this.mouseDownLatLong={x:0,y:0}},e.prototype.mouseCancelHandler=function(e){this.isPanning=!1,this.isTouch=!1,this.rectZoomingStart=!1;var i=ue(this.maps.element.id+"_Selection_Rect_Zooming");i&&this.maps.zoomSettings.enable&&(t.remove(i),this.performRectZooming())},e.prototype.click=function(e){var t=this.maps;if(t.markerModule&&t.markerModule.sameMarkerData.length>0||e.target.id.indexOf("MarkerIndex")>-1&&-1===e.target.id.indexOf("cluster"))return null;if(this.isSingleClick&&t.zoomSettings.zoomOnClick&&!(e.target.id.indexOf("_Zooming_")>-1)&&!t.zoomSettings.doubleClickZoom&&this.zoomColor!==this.selectionColor){var i=e.pageX,a=e.pageY,o=this.getMousePosition(i,a),n=t.tileZoomLevel,l=t.scale;t.mapScaleValue=t.mapScaleValue+1;var r=t.isTileMap?n:l;o.x>t.mapAreaRect.x&&o.x<t.mapAreaRect.x+t.mapAreaRect.width&&o.y>t.mapAreaRect.y&&o.y<t.mapAreaRect.y+t.mapAreaRect.height&&this.performZooming(o,r+1,"ZoomIn")}},e.prototype.getMousePosition=function(e,t){var i=this.maps,a=i.element.getBoundingClientRect(),o=i.element.ownerDocument.defaultView.pageXOffset,n=i.element.ownerDocument.defaultView.pageYOffset,l=i.element.ownerDocument.documentElement.clientTop,r=i.element.ownerDocument.documentElement.clientLeft,s=a.left+o-r,d=a.top+n-l;return new tt(Math.abs(e-s),Math.abs(t-d))},e.prototype.addEventListener=function(){this.maps.isDestroyed||(t.EventHandler.add(this.maps.element,this.wheelEvent,this.mapMouseWheel,this),t.EventHandler.add(this.maps.element,"click",this.click,this),t.EventHandler.add(this.maps.element,"dblclick",this.doubleClick,this),this.maps.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.maps.on(t.Browser.touchStartEvent,this.mouseDownHandler,this),this.maps.on(t.Browser.touchEndEvent,this.mouseUpHandler,this),t.EventHandler.add(this.maps.element,this.cancelEvent,this.mouseCancelHandler,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(t.EventHandler.remove(this.maps.element,this.wheelEvent,this.mapMouseWheel),t.EventHandler.remove(this.maps.element,"click",this.click),t.EventHandler.remove(this.maps.element,"dblclick",this.doubleClick),this.maps.off(t.Browser.touchMoveEvent,this.mouseMoveHandler),this.maps.off(t.Browser.touchStartEvent,this.mouseDownHandler),this.maps.off(t.Browser.touchEndEvent,this.mouseUpHandler),this.maps.off(this.cancelEvent,this.mouseCancelHandler))},e.prototype.getModuleName=function(){return"Zoom"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),_i=function(){function e(e){this.control=e}return e.prototype.print=function(e){var i=this;this.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWindow.moveTo(0,0),this.printWindow.resizeTo(screen.availWidth,screen.availHeight);var a={cancel:!1,htmlContent:this.getHTMLContent(e),name:"beforePrint"};this.control.trigger("beforePrint",a,function(e){a.cancel||t.print(a.htmlContent,i.printWindow)})},e.prototype.getHTMLContent=function(e){ge(this.control.element.id);var i=t.createElement("div"),a=this.control.element.cloneNode(!0);if(this.control.isTileMap)for(var o=0;o<a.childElementCount;o++)if(a.children[o].id===this.control.element.id+"_tile_parent"){a.children[o].style.removeProperty("height"),a.children[o].style.removeProperty("width"),a.children[o].style.removeProperty("top"),a.children[o].style.removeProperty("left"),a.children[o].style.removeProperty("right"),a.children[o].style.removeProperty("overflow");var n=document.getElementById(this.control.element.id+"_Tile_SVG_Parent");a.children[o].children[0].style.overflow="hidden",a.children[o].children[0].style.position="absolute",a.children[o].children[0].style.height=n.style.height,a.children[o].children[0].style.width=n.style.width,a.children[o].children[0].style.left=n.style.left,a.children[o].children[0].style.top=n.style.top;break}return e?e instanceof Array?Array.prototype.forEach.call(e,function(e){i.appendChild(be(e).cloneNode(!0))}):e instanceof Element?i.appendChild(e.cloneNode(!0)):i.appendChild(be(e).cloneNode(!0)):i.appendChild(a),i},e.prototype.getModuleName=function(){return"Print"},e.prototype.destroy=function(e){},e}(),Li=function(){function e(e){this.control=e}return e.prototype.export=function(e,i,a){var o=this;return new Promise(function(n,l){var r,s,d=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:o.control.availableSize.width.toString(),height:o.control.availableSize.height.toString()}}),p=!(t.Browser.userAgent.toString().indexOf("HeadlessChrome")>-1),h=(document.getElementById(o.control.element.id+"_ToolBar"),document.getElementById(o.control.element.id+"_Tile_SVG_Parent")),c=ue(o.control.element.id+"_svg").cloneNode(!0);o.control.isTileMap?(s=ue(o.control.element.id+"_Tile_SVG").cloneNode(!0),r='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+c.outerHTML+s.outerHTML+"</svg>"):r='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+o.control.svgObject.outerHTML+"</svg>";var m=window.URL.createObjectURL(new Blob("SVG"===e?[r]:[(new XMLSerializer).serializeToString(c)],{type:"image/svg+xml"}));if("SVG"===e)a?S(i,e,m,p):n(null);else{var u=new Image,g=d.getContext("2d");if(o.control.isTileMap)for(var y=document.getElementById(o.control.element.id+"_MapAreaBorder"),f=parseFloat(y.getAttribute("y")),b=parseFloat(y.getAttribute("x")),v=new XMLHttpRequest,x=o.control.mapLayerPanel.tiles.length,O=0;O<=x+1;O++)!function(l){var r=document.getElementById(o.control.element.id+"_tile_"+(l-1)),c=new Image;c.crossOrigin="Anonymous",g.fillStyle=o.control.background?o.control.background:"#FFFFFF",g.fillRect(0,0,o.control.availableSize.width,o.control.availableSize.height),g.font=o.control.titleSettings.textStyle.size+" Arial";var u=document.getElementById(o.control.element.id+"_Map_title");t.isNullOrUndefined(u)||(g.fillStyle=u.getAttribute("fill"),g.fillText(o.control.titleSettings.text,parseFloat(u.getAttribute("x")),parseFloat(u.getAttribute("y")))),c.onload=function(){if(0===l||l===x+1)0===l?(g.setTransform(1,0,0,1,0,0),g.rect(0,f,parseFloat(h.style.width),parseFloat(h.style.height)),g.clip()):g.setTransform(1,0,0,1,b,f);else{document.getElementById(o.control.element.id+"_tile_parent");g.setTransform(1,0,0,1,parseFloat(r.style.left)+b,parseFloat(r.style.top)+f)}if(g.drawImage(c,0,0),l===x+1){localStorage.setItem("local-canvasImage",d.toDataURL("image/png"));var t=localStorage.getItem("local-canvasImage");a?(S(i,e,t,p),localStorage.removeItem("local-canvasImage")):"PNG"===e?n(t):"JPEG"===e&&n(d.toDataURL("image/jpeg"))}},0===l||l===x+1?0===l?c.src=m:setTimeout(function(){c.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(s)],{type:"image/svg+xml"}))},300):(v.open("GET",r.children[0].getAttribute("src"),!0),v.send(),c.src=r.children[0].getAttribute("src"))}(O);else u.onload=function(){g.drawImage(u,0,0),window.URL.revokeObjectURL(m),a?S(i,e,d.toDataURL("image/png").replace("image/png","image/octet-stream"),p):"PNG"===e?n(d.toDataURL("image/png")):"JPEG"===e&&n(d.toDataURL("image/jpeg"))},u.src=m}})},e.prototype.getModuleName=function(){return"ImageExport"},e.prototype.destroy=function(e){},e}(),Ci=function(){function e(e){this.control=e}return e.prototype.export=function(e,i,a,n){var l=this;return new Promise(function(r,s){var d=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:l.control.availableSize.width.toString(),height:l.control.availableSize.height.toString()}});n=t.isNullOrUndefined(n)?o.PdfPageOrientation.Landscape:n;var p=document.getElementById(l.control.element.id+"_Tile_SVG_Parent"),h=l.control.svgObject.cloneNode(!0),c=h.childNodes[0].getAttribute("fill");"Tailwind"!==l.control.theme&&"TailwindDark"!==l.control.theme&&"Bootstrap5"!==l.control.theme&&"Bootstrap5Dark"!==l.control.theme&&"Fluent"!==l.control.theme&&"FluentDark"!==l.control.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c||h.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)");var m=window.URL.createObjectURL(new Blob("SVG"===e?[void 0]:[(new XMLSerializer).serializeToString(h)],{type:"image/svg+xml"})),u=new o.PdfDocument,g=new Image,y=d.getContext("2d");if(l.control.isTileMap)for(var f=document.getElementById(l.control.element.id+"_MapAreaBorder"),b=parseFloat(f.getAttribute("y")),v=parseFloat(f.getAttribute("x")),S=new XMLHttpRequest,x=l.control.mapLayerPanel.tiles.length,O=0;O<=x+1;O++)!function(s){var h=document.getElementById(l.control.element.id+"_tile_"+(s-1)),c=new Image;c.crossOrigin="Anonymous",y.fillStyle=l.control.background?l.control.background:"#FFFFFF",y.fillRect(0,0,l.control.availableSize.width,l.control.availableSize.height),y.font=l.control.titleSettings.textStyle.size+" Arial";var g=document.getElementById(l.control.element.id+"_Map_title");t.isNullOrUndefined(g)||(y.fillStyle=g.getAttribute("fill"),y.fillText(l.control.titleSettings.text,parseFloat(g.getAttribute("x")),parseFloat(g.getAttribute("y")))),c.onload=function(){if(0===s||s===x+1)0===s?(y.setTransform(1,0,0,1,0,0),y.rect(0,b,parseFloat(p.style.width),parseFloat(p.style.height)),y.clip()):y.setTransform(1,0,0,1,v,b);else{document.getElementById(l.control.element.id+"_tile_parent");y.setTransform(1,0,0,1,parseFloat(h.style.left)+v,parseFloat(h.style.top)+b)}if(y.drawImage(c,0,0),s===x+1&&"PDF"===e){localStorage.setItem("saved-image-example",d.toDataURL("image/jpeg"));var t=localStorage.getItem("saved-image-example");u.pageSettings.orientation=n,t=t.slice(t.indexOf(",")+1),u.pages.add().graphics.drawImage(new o.PdfBitmap(t),0,0,l.control.availableSize.width-60,l.control.availableSize.height),a?(u.save(i+".pdf"),u.destroy()):r(null)}},0===s||s===x+1?0===s?c.src=m:setTimeout(function(){var e=document.getElementById(l.control.element.id+"_Tile_SVG");c.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(e)],{type:"image/svg+xml"}))},300):(S.open("GET",h.children[0].getAttribute("src"),!0),S.send(),c.src=h.children[0].getAttribute("src"))}(O);else g.onload=function(){if(y.drawImage(g,0,0),window.URL.revokeObjectURL(m),"PDF"===e){var t=d.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");u.pageSettings.orientation=n,t=t.slice(t.indexOf(",")+1),u.pages.add().graphics.drawImage(new o.PdfBitmap(t),0,0,l.control.availableSize.width-60,l.control.availableSize.height),a?(u.save(i+".pdf"),u.destroy()):r(null)}},g.src=m})},e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.destroy=function(e){},e}();return gi.Inject(yi,vi,$t,Si,xi,Oi,Mi,fi,bi,ci,_i,Ci,Li),e.Maps=gi,e.load="load",e.loaded="loaded",e.click=ei,e.rightClick="rightClick",e.doubleClick="doubleClick",e.resize="resize",e.tooltipRender="tooltipRender",e.shapeSelected="shapeSelected",e.shapeHighlight="shapeHighlight",e.mousemove="mousemove",e.mouseup="mouseup",e.mousedown="mousedown",e.layerRendering="layerRendering",e.shapeRendering="shapeRendering",e.markerRendering=ti,e.markerClusterRendering=ii,e.markerClick=ai,e.markerClusterClick=oi,e.markerMouseMove=ni,e.markerClusterMouseMove=li,e.dataLabelRendering="dataLabelRendering",e.bubbleRendering="bubbleRendering",e.bubbleClick="bubbleClick",e.bubbleMouseMove="bubbleMouseMove",e.animationComplete=ri,e.legendRendering="legendRendering",e.annotationRendering="annotationRendering",e.itemSelection=si,e.itemHighlight="itemHighlight",e.beforePrint="beforePrint",e.zoomIn="zoomIn",e.zoomOut="zoomOut",e.pan="pan",e.Annotation=Mt,e.Arrow=_t,e.Font=Lt,e.Border=Ct,e.CenterPosition=wt,e.TooltipSettings=Pt,e.Margin=It,e.ConnectorLineSettings=Tt,e.MarkerClusterSettings=Nt,e.MarkerClusterData=kt,e.ColorMappingSettings=Ft,e.InitialMarkerSelectionSettings=Et,e.InitialShapeSelectionSettings=At,e.SelectionSettings=zt,e.HighlightSettings=Bt,e.NavigationLineSettings=jt,e.BubbleSettings=Ut,e.CommonTitleSettings=Rt,e.SubTitleSettings=Dt,e.TitleSettings=Zt,e.ZoomSettings=Vt,e.ToggleLegendSettings=Ht,e.LegendSettings=Gt,e.DataLabelSettings=Wt,e.ShapeSettings=qt,e.MarkerBase=Xt,e.MarkerSettings=Yt,e.LayerSettings=Jt,e.Tile=Qt,e.MapsAreaSettings=Kt,e.Size=et,e.stringToNumber=n,e.calculateSize=l,e.createSvg=r,e.getMousePosition=s,e.degreesToRadians=d,e.radiansToDegrees=p,e.convertGeoToPoint=h,e.convertTileLatLongToPoint=c,e.xToCoordinate=m,e.yToCoordinate=u,e.aitoff=g,e.roundTo=y,e.sinci=f,e.acos=b,e.calculateBound=v,e.triggerDownload=S,e.Point=tt,e.MinMax=it,e.GeoLocation=at,e.measureText=x,e.TextOption=ot,e.PathOption=nt,e.ColorValue=lt,e.RectOption=rt,e.CircleOption=st,e.PolygonOption=dt,e.PolylineOption=pt,e.LineOption=ht,e.Line=ct,e.MapLocation=mt,e.Rect=ut,e.PatternOptions=gt,e.renderTextElement=O,e.convertElement=M,e.formatValue=_,e.convertStringToValue=L,e.convertElementFromLabel=C,e.drawSymbols=w,e.getValueFromObject=P,e.markerColorChoose=I,e.markerShapeChoose=T,e.clusterTemplate=N,e.mergeSeparateCluster=k,e.clusterSeparate=F,e.marker=E,e.markerTemplate=A,e.maintainSelection=z,e.maintainStyleClass=B,e.appendShape=j,e.drawCircle=U,e.drawRectangle=R,e.drawPath=D,e.drawPolygon=Z,e.drawPolyline=V,e.drawLine=H,e.calculateShapes=G,e.drawDiamond=W,e.drawTriangle=q,e.drawCross=X,e.drawHorizontalLine=Y,e.drawVerticalLine=J,e.drawStar=Q,e.drawBalloon=K,e.drawPattern=$,e.getFieldData=ee,e.checkShapeDataFields=te,e.checkPropertyPath=ie,e.filter=ae,e.getRatioOfBubble=oe,e.findMidPointOfPolygon=ne,e.isCustomPath=le,e.textTrim=re,e.findPosition=se,e.removeElement=de,e.calculateCenterFromPixel=pe,e.getTranslate=he,e.getZoomTranslate=ce,e.fixInitialScaleForTile=me,e.getElementByID=ue,e.getClientElement=ge,e.Internalize=ye,e.getTemplateFunction=fe,e.getElement=be,e.getShapeData=ve,e.triggerShapeEvent=Se,e.getElementsByClassName=xe,e.querySelector=Oe,e.getTargetElement=Me,e.createStyle=_e,e.customizeStyle=Le,e.triggerItemSelectionEvent=Ce,e.removeClass=we,e.elementAnimate=Pe,e.timeout=Ie,e.showTooltip=Te,e.wordWrap=Ne,e.createTooltip=ke,e.drawSymbol=Fe,e.renderLegendShape=Ee,e.getElementOffset=Ae,e.changeBorderWidth=ze,e.changeNavaigationLineWidth=Be,e.targetTouches=je,e.calculateScale=Ue,e.getDistance=Re,e.getTouches=De,e.getTouchCenter=Ze,e.sum=Ve,e.zoomAnimate=He,e.animate=Ge,e.MapAjax=yt,e.smoothTranslate=We,e.compareZoomFactor=qe,e.calculateZoomLevel=Xe,e.processResult=Ye,e.LayerPanel=hi,e.Bubble=yi,e.BingMap=di,e.Marker=$t,e.ColorMapping=pi,e.DataLabel=fi,e.NavigationLine=bi,e.Legend=vi,e.Highlight=Si,e.Selection=xi,e.MapsTooltip=Oi,e.Zoom=Mi,e.Annotations=ci,e.Print=_i,e.ImageExport=Li,e.PdfExport=Ci,e}({},ej.base,ej.svgbase,ej.data,ej.pdfexport),this.ejs=ej;
|
|
11
11
|
//# sourceMappingURL=ej2-maps.min.js.map
|