google.maps.__gjsload__('poly', function(_){var IW=function(a,b){return b?_.Rn(b,a.T.get("projection")):null},JW=function(a,b){return b?_.Sn(b,a.T.get("projection"),void 0):null},KW=function(a){for(a=a.toString(16);2>a.length;)a="0"+a;return a},nba=function(a){var b=a.length;!b||a[0]==a[b-2]&&a[1]==a[b-1]||(a.push(a[0]),a.push(a[1]))},LW=function(a,b){for(var c=0,d=a.length;c<d;c+=2){var e=new _.I(a[c],a[c+1],!0);e=_.Rn(e,b);a[c]=e.Ca;a[c+1]=e.Da}},MW=function(a,b,c){var d=a.path;a=a.i;for(var e=[],f=a?[]:null,g=d[0]==d[d.length-2]&&d[1]==
d[d.length-1],h=0,k=d.length-2;h<k;h+=2){var l=d[h],m=d[h+1],q=d[h+2],t=d[h+3];if(a){var u=a[h/2];var v=a[h/2+1]}switch(b){case 0:var x=l>=c;var w=q>=c;break;case 1:x=l<=c;w=q<=c;break;case 2:x=m>=c;w=t>=c;break;case 3:x=m<=c,w=t<=c}!h&&x&&(e.push(l,m),a&&f.push(u));if(x!=w){switch(b){case 0:case 1:var E=(c-l)/(q-l);e.push(c,m+E*(t-m));break;case 2:case 3:E=(c-m)/(t-m),e.push(l+E*(q-l),c)}a&&f.push(u+E*(v-u))}w&&(e.push(q,t),a&&f.push(v))}g&&e.length&&(e[0]!=e[e.length-2]||e[1]!=e[e.length-1])&&(e.push(e[0],
e[1]),a&&f.push(a[a.length-1]));return{path:e,i:f}},oba=function(a,b){a=MW(a,0,b.Ma);a=MW(a,1,b.Qa);a=MW(a,2,b.Ja);return MW(a,3,b.Pa)},pba=function(a,b,c){for(var d=0,e=0,f=c.length;e<f;++e)d+=_.XF(a,b,c[e]);return!!(d&1)},qba=function(a,b,c,d){for(var e=null,f=c*c,g=0,h=d.length;g<h;++g){var k=a,l=b,m=c,q=d[g],t=q.length;if(!t||0>=m)var u=null;else{var v=0,x=m*m*1.01,w=[0,0];var E=q[v++]-k;var J=q[v++]-l;u=(E<-m?1:0)|(E>m?2:0)|(J<-m?4:0)|(J>m?8:0);var N=E*E+J*J;!u&&N<=x&&(x=N,w[0]=E,w[1]=J);for(;v<
t;){var R=E;var pa=J;var ra=u;E=q[v++]-k;J=q[v++]-l;u=(E<-m?1:0)|(E>m?2:0)|(J<-m?4:0)|(J>m?8:0);if(!(ra&u)){N=E*E+J*J;!u&&N<=x&&(x=N,w[0]=E,w[1]=J);ra=E-R;var gb=J-pa,Od=ra*ra+gb*gb;if(!(1E-12>Od)){var zd=E*ra+J*gb;0>zd||zd>Od||(N-=zd*zd/Od,N<=x&&(x=N,Od=1-zd/Od,w[0]=R+ra*Od,w[1]=pa+gb*Od))}}}w[0]+=k;w[1]+=l;w[2]=x;u=x<=m*m?w:null}u&&u[2]<=f&&(f=u[2],e=u)}return e},rba=function(a){var b=new _.aL(["mousemove","mouseup","mousewheel"]);_.bz(b,["panes","pixelBounds"],a);return b},NW=function(a){var b=
rba(a);_.L.addListener(b,"mousemove",_.ff);_.L.addListener(b,"mouseup",_.ff);_.L.addListener(b,"mousewheel",function(c){var d=a.get("mouseEventTarget");d&&(d=[d,"mousewheel"].concat(_.mb(arguments,0)),_.L.trigger.apply(null,d))});return b},OW=_.n(),QW=function(a){var b=["px","%"];if(!a||!_.fe(b))return null;if("0"==a)return{value:0,i:b[0]};for(var c=0,d=b.length;c<d;++c){var e=b[c],f=(PW[e]=PW[e]||new RegExp("^(\\d+(?:\\.\\d+)?)"+e+"$")).exec(a);if(f)return{value:parseFloat(f[1]),i:e}}return null},
RW=function(a,b,c){var d=_.Sn(new _.cg(c.x,c.y),a);a=_.Sn(new _.cg(c.x+b,c.y+b),a);return Math.min(Math.abs(d.lat()-a.lat()),Math.abs(d.lng()-a.lng()))},SW=function(a){this.y=this.x=0;this.z=a},UW=function(a){var b=Math.sqrt(TW(a,a));1E-12>b||(a.x/=b,a.y/=b,a.z/=b)},TW=function(a,b){return a.x*b.x+a.y*b.y+a.z*b.z},VW=function(a,b,c){c.x=a.y*b.z-a.z*b.y;c.y=a.z*b.x-a.x*b.z;c.z=a.x*b.y-a.y*b.x},WW=function(a,b){var c=_.Oc(a[0]);a=_.Oc(a[1]);var d=Math.cos(c);b.x=Math.cos(a)*d;b.y=Math.sin(a)*d;b.z=
Math.sin(c)},XW=function(a,b){var c=Math.atan2(a.y,a.x);b[0]=_.Pc(Math.atan2(a.z,Math.sqrt(a.x*a.x+a.y*a.y)));b[1]=_.Pc(c)},sba=function(a,b,c){c.x=a.x+b.x;c.y=a.y+b.y;c.z=a.z+b.z;UW(c)},YW=function(){var a=new _.cj({clickable:!1,fillOpacity:0});a.bindTo("map",this);a.bindTo("strokeColor",this);a.bindTo("strokeOpacity",this);a.bindTo("strokeWeight",this);var b=["center","freeVertexPosition","freeVertexIsCenter"],c=new _.$z(b,"return",tba);_.bz(c,b,this);a.bindTo("center",c,"return");b=["center","radius",
"planetRadius","freeVertexPosition","freeVertexIsCenter"];c=new _.$z(b,"return",(0,_.y)(this.j,this));_.bz(c,b,this);a.bindTo("radius",c,"return");this.i=_.bL();this.i.bindTo("zIndex",this);a.bindTo("zIndex",this.i,"ghostZIndex")},tba=function(a,b,c){return c&&b||a},$W=function(a,b,c,d,e,f,g){var h=this;a=_.Ro("div",a);a.style.display="none";var k=9+2*(1+c);_.Th(a,new _.P(k,k));f.construct(a,c,9,1,g?.5:1);f=new _.JF(a,!0);f.bindTo("containerPixelBounds",h,"mapPixelBounds");f.bindTo("panningEnabled",
h);f.set("draggableCursor",d);f.bindTo("position",this);f.bindTo("deltaClientPosition",this);this.i=a;this.H=b;this.$=c;this.ha=e;this.o=f;this.j=!1;var l;this.Ga=[_.L.addListener(f,"dragstart",function(){b.set("draggableCursor",d);b.set("active",!0)}),_.L.addListener(f,"dragend",function(){b.set("active",!1);l&&(_.B(l,_.L.removeListener),l=null)}),_.L.forward(f,"panbynow",h),_.L.forward(f,"dragstart",h),_.L.forward(f,"dragend",h)];this.T=_.gq(a,{Ib:function(m){_.wp(m);_.L.trigger(h,"mousedown",m.Ta)},
zd:function(m){_.xp(m);_.L.trigger(h,"mousemove",m.Ta)},Xb:function(m){_.xp(m);_.L.trigger(h,"mousemove",m.Ta)},Nb:function(m){_.yp(m);_.L.trigger(h,"mouseup",m.Ta)},onClick:function(m){var q=m.event;m=m.Od;_.zp(q);3==q.button?m||_.L.trigger(h,"rightclick",q.Ta):m?_.L.trigger(h,"dblclick",q.Ta):_.L.trigger(h,"click",q.Ta)}});this.W=new _.Pt(a,a,{We:function(m){h.j=!1;ZW(h);_.hf(m);_.jf(m);_.L.trigger(h,"mouseout",m)},Xe:function(m){h.j=!0;ZW(h);_.hf(m);_.jf(m);_.L.trigger(h,"mouseover",m)}})},ZW=
function(a){if(a.j){var b=_.nL(a.get("color"));if(b){b.o=Math.floor((b.o+255)/2);b.j=Math.floor((b.j+255)/2);b.i=Math.floor((b.i+255)/2);var c=["#",KW(b.o),KW(b.j),KW(b.i)].join("")}}a.i.firstChild.style.backgroundColor=c||"white"},bX=function(a,b,c,d,e,f,g,h){function k(){l.W||_.L.trigger(l,"toolbar",{i:!1})}this.Ra=a;this.ma=b;this.ha=c;this.H=_.Ro("div",e,_.Yk);this.W=d;this.La=f;this.i=g;this.o=h;this.j=[];a.forEach((0,_.y)(this.$,this));var l=this;this.ua=[_.L.addListener(a,"insert_at",function(m){l.$(a.getAt(m),
m);aX(l,m+1);k()}),_.L.addListener(a,"remove_at",function(m){var q=l.j[m];l.j.splice(m,1);l.va(q);aX(l,m);k()}),_.L.addListener(a,"set_at",function(m){l.j[m].j.set("latLngPosition",a.getAt(m));k()})]},cX=function(a,b,c){if((b=b.j.ha)&&a.i){a=a.i.__gm.get("projectionController");var d=a.fromLatLngToDivPixel(c);b=b(d);if(b=a.fromDivPixelToLatLng(b))return b}return c},dX=function(a,b){if(b&&a.o){if(2==a.W)return{clientX:a.o.clientX,clientY:b.clientY};if(1==a.W)return{clientX:b.clientX,clientY:a.o.clientY}}return b},
eX=function(a,b,c){var d=b.index,e=b.j.get("position");b=(b=b.j.get("latLngPosition"))&&a.i?_.Rn(b,a.i.get("projection")):null;_.L.trigger(a,c,d,e,b)},aX=function(a,b){for(var c=a.j.length;b<c;++b)a.j[b].index=b},fX=function(a,b,c){this.T=a;this.W=b;this.o=null;this.j=!1;this.i=new _.mg;this.H=!1;this.$=c;_.L.bind(this.i,"set_at",this,this.lo)},wba=function(a){var b=a.get("panes");if(!b)return null;b=new bX(a.i,uba,vba,!1,b.overlayMouseTarget,a.W,a.get("map"),a.$);b.bindTo("projection",a);b.bindTo("zoom",
a);b.bindTo("projectionCenterQ",a);b.bindTo("panningEnabled",a);b.bindTo("mapPixelBounds",a);b.bindTo("color",a);b.bindTo("zIndex",a);b.bindTo("offset",a);var c=a.T;c.bindTo("freeVertexPosition",b);var d,e;_.L.addListener(b,"dragstart",function(f){d=a.get("center");e=a.get("radius");c.set("freeVertexIsCenter",0==f);c.set("map",a.get("map"))});_.L.addListener(b,"dragend",function(f,g,h){c.set("map",null);_.L.trigger(a,"toolbar",{i:!0,j:h,action:function(){a.set("center",d);a.set("radius",e)}})});_.L.forward(b,
"dragstart",a);_.L.forward(b,"dragend",a);_.L.forward(b,"panbynow",a);return b},gX=function(a){var b=a.o;b&&(b.unbindAll(),b.release(),_.L.clearInstanceListeners(b),a.o=null)},hX=_.n(),yba=function(a,b,c,d){function e(){a.get("editable")?xba(a,b,c,d):(iX(a),_.L.trigger(a,"toolbar",{i:!1}))}a.editable_changed=e;e()},xba=function(a,b,c,d){if(!a.j){var e=new _.fL(a,!0);a.T=e;var f=new YW;f.bindTo("strokeColor",e);f.bindTo("strokeOpacity",e,"ghostStrokeOpacity");f.bindTo("strokeWeight",e);f.bindTo("center",
a);f.bindTo("radius",a);f.bindTo("planetRadius",c);f.bindTo("zIndex",a);a.H=f;var g=b.__gm;a.i=NW(g);var h=_.SF(g,a),k=_.Go()?9:0,l=new hX;d=new fX(f,function(m,q,t){return new $W(m,a.i,k,q,h,l,t)},d);d.set("map",b);d.bindTo("center",a);d.bindTo("radius",a);d.bindTo("planetRadius",c);d.bindTo("panes",g);d.bindTo("projection",b);d.bindTo("zoom",g);d.bindTo("projectionCenterQ",g);d.bindTo("panningEnabled",b,"draggable");d.bindTo("mapPixelBounds",g,"pixelBounds");d.bindTo("offset",g);d.bindTo("color",
e,"strokeColor");d.bindTo("zIndex",a);a.j=d;_.L.forward(d,"panbynow",g);_.L.forward(d,"toolbar",a)}},iX=function(a){var b=a.j;b&&(b.unbindAll(),b.set("map",null),_.L.clearInstanceListeners(b),delete a.j,a.i.unbindAll(),a.i.release(),delete a.i,a.H.unbindAll(),delete a.H,a.T.release(),delete a.T)},jX=function(a,b,c,d,e){this.H=a;this.Sa=c;a=a.get("center");b=c.fromDivPixelToLatLng(b);this.o=d(a,b);this.i=_.iy(b,a);this.T=e},zba=function(a,b){-180==a&&180!=b&&(a=180);-180==b&&180!=a&&(b=180);this.i=
a;this.j=b},kX=function(a){return a.isEmpty()?0:a.i>a.j?360-(a.i-a.j):a.j-a.i},lX=function(a,b){var c=b-a;return 0<=c?c:b+180-(a-180)},Aba=function(a,b,c){var d=250;d=void 0===d?250:d;var e=Array(d),f=_.Oc(a.lat()),g=_.Oc(a.lng()),h=Math.cos(b),k=Math.sin(b),l=Math.cos(f);f=Math.sin(f);if(1E-6<l)for(a=0;a<d;++a){b=a/d*Math.PI*4;b+=Math.sin(b+Math.PI);var m=b/2,q=f*h+l*k*Math.cos(m);b=Math.asin(q);m=g+Math.atan2(Math.sin(m)*k*l,h-f*q);q=-Math.PI;var t=Math.PI-q;m=((m-q)%t+t)%t+q;e[a]=c(_.Pc(b),_.Pc(m))}else for(g=
_.Pc(b),g=0<a.lat()?a.lat()-g:a.lat()+g,h=0;h<d;++h)e[h]=c(g,360*h/d);return e},nX=function(a){var b=this,c=this,d=new _.ej;this.j=d;d.Je=a;d.tf=!0;d.bindTo("capturing",c);d.bindTo("cursor",c);d.bindTo("map",c);d.bindTo("strokeColor",c);d.bindTo("strokeOpacity",c);d.bindTo("strokeWeight",c);d.bindTo("strokePosition",c);d.bindTo("fillColor",c);d.bindTo("fillOpacity",c);d.bindTo("clickable",c);d.bindTo("zIndex",c);d.bindTo("suppressUndo",c);var e=this.i=[];_.B(mX,function(f){e.push(_.L.forward(d,f,
c))});e.push(_.L.forward(c,"toolbar",d));this.Na=new _.yi(function(){var f=b.j;if(f){var g=b.get("radius"),h=b.get("center");_.oe(g)&&h?(g/=b.get("planetRadius"),f.setPaths(Bba(h,g))):f.setPaths([])}},0)},Bba=function(a,b){var c=[Aba(a,b,function(d,e){return new _.I(d,e)})];_.Oc(a.lat())-b<-Math.PI/2&&(a=[new _.I(-90,-200,!0),new _.I(90,-200,!0),new _.I(90,-100,!0),new _.I(90,0,!0),new _.I(90,100,!0),new _.I(90,200,!0),new _.I(-90,200,!0),new _.I(-90,100,!0),new _.I(-90,0,!0),new _.I(-90,-100,!0),
new _.I(-90,-200,!0)],c.push(a));return c},oX=function(a,b,c,d,e,f){this.H=a;this.Sa=c;this.W=e;this.ma=f;var g=Cba(this);b=c.fromDivPixelToLatLng(b);this.$=_.iy(g,b);this.ha=d(g,b);var h=this.T=[];a.get("latLngs").forEach(function(k){var l=[];k.forEach(function(m){l.push({heading:d(g,m),distance:_.iy(m,g)})});h.push(l)});this.i=g;this.o=b.lng()-g.lng()},Cba=function(a){a=a.H.get("latLngs");var b=new SW(0),c=new SW(0);a.forEach(function(d){d.forEach(function(e){WW([e.lat(),e.lng()],c);b.x+=c.x;b.y+=
c.y;b.z+=c.z})});UW(b);a=[0,0];XW(b,a);a[0]=_.ie(a[0],-89,89);return new _.I(a[0],a[1])},pX=function(a,b,c){this.o=a;this.Sa=c;this.i=c.fromDivPixelToLatLng(b);var d=this.H=[];a.get("latLngs").forEach(function(e){d.push(_.mb(e.getArray(),0))})},qX=function(a,b,c){this.i=null;this.$=a;this.H=b;var d=this;this.j=new _.nz(c.j,{Be:function(e){e&&d.set("position",new _.O(e.wa,e.Aa))},ye:_.n()},null,c);c.yc(this.j);this.Ga=null;this.o=new _.zF(function(e,f){_.L.trigger(d,"panbynow",e,f)});a=new _.$z(["waitingForQuiver",
"dragging"],"active",function(e,f){return e||f});a.bindTo("dragging",this,null,!0);a.bindTo("waitingForQuiver",this,null,!0);this.bindTo("active",a,null,!0)},rX=function(a,b){var c=a.get("position");c=a.Sa.fromDivPixelToLatLng(c);c=new _.xn(c);a.i&&_.L.trigger(a.i,b,c)},sX=function(a,b){function c(){var e=a.get("gestureHandling");null!=e?b.set("panningEnabled","none"!=e):b.set("panningEnabled",a.get("draggable"))}var d=a.__gm;_.L.addListener(a,"gesturehandling_changed",c);_.L.addListener(a,"draggable_changed",
c);b.bindTo("panes",d);b.bindTo("projectionController",d);b.bindTo("containerPixelBounds",d,"pixelBounds");d.nb=_.L.forward(b,"panbynow",d)},tX=function(a,b){function c(){var d=a.getMap();a.getDraggable()&&(_.Dj(d,"Od"),_.Yo("Od","-p",a))}a.draggable_changed=c;c();a.ji=[_.L.addListener(a,"mouseover",function(d){null==d.vertex&&null==d.edge&&b.set("poly",a)}),_.L.addListener(a,"click",function(d){null==d.vertex&&null==d.edge&&a.getDraggable()&&_.Yo("Od","-i",a)}),_.L.addListener(a,"mouseout",function(d){null!=
d.vertex||null!=d.edge||d.ub&&_.Km(d.ub)||b.set("poly",null)})]},Eba=function(a){var b=this;this.j=a;this.i=a.__gm;this.H=this.o=null;this.i.i.then(function(c){c=c.rb;b.H=c;Dba(b,c)});this.i.W.i=function(c){return uX(b,c)};this.i.W.onRemove=function(c){if(b.H){var d=c.Vh;d.unbindAll();d.set("map",null);d.release();delete c.Vh;c.listeners&&_.B(c.listeners,_.L.removeListener);delete c.listeners;delete c.editable_changed;iX(c);_.Zo("Oc","-p",c)}}},Dba=function(a,b){_.K("geometry").then(function(c){a.o=
new qX(function(d,e,f){return new jX(d,e,f,c.computeHeading,c.computeOffsetOrigin)},a.j,b);sX(a.j,a.o);a.i.W.forEach(function(d){return uX(a,d)})})},uX=function(a,b){if(a.o&&a.H){var c=b.W=new _.$z(["baseMapType"],"planetRadius",_.Xi);c.bindTo("baseMapType",a.i);var d=b.Vh=new nX(b);d.set("map",a.j);d.bindTo("radius",b);d.bindTo("center",b);d.bindTo("capturing",b);d.bindTo("clickable",b);d.bindTo("cursor",b);d.bindTo("fillColor",b);d.bindTo("fillOpacity",b);d.bindTo("strokeColor",b);d.bindTo("strokeOpacity",
b);d.bindTo("strokeWeight",b);d.bindTo("strokePosition",b);d.bindTo("zIndex",b);d.bindTo("suppressUndo",b);d.bindTo("planetRadius",c);b.listeners=[];_.B(mX,function(e){b.listeners.push(_.L.forward(d,e,b))});b.listeners.push(_.L.forward(b,"toolbar",d));tX(b,a.o);yba(b,a.j,c,a.H);_.Dj(a.j,"Oc");_.Yo("Oc","-p",b);_.L.addListener(b,"click",function(){_.Yo("Oc","-i",b)})}},Fba=function(a,b,c,d){a.capturing_changed=function(){if(a.get("capturing"))if(0==a.get("clickable")){var e=a.i=new OW;e.bindTo("draggableCursor",
a,"cursor");e.set("active",!0);b.bindTo("cursor",e);d.register(e)}else d.i=c,d.j=a;else a.i?(_.gy(d.H,a.i),a.i.unbindAll(),b.unbind("cursor"),b.set("cursor",""),delete a.i):d.i==c&&d.j==a&&(d.i=null,d.j=null)}},AX=function(a,b,c){var d=this;this.W=a;this.H=b;this.T=c;this.j={};this.i={};this.o=0;this.$=function(e){vX(d,this,e)};a.i=function(e){var f=d.get("projection");f=e.Qf={style:wX(d.T,e),geometry:xX(e,f)};yX(d,e);e.changed=d.$;_.og(d.H,f)};a.onRemove=function(e){var f=e.Qf;delete e.Qf;d.H.remove(f);
delete e.changed;zX(e);e=_.Bf(e);delete d.j[e];delete d.i[e]}},vX=function(a,b,c){var d=_.Bf(b);c in Gba&&(a.i[d]=b,zX(b));c in Hba&&(a.j[d]=b);BX(a)},BX=function(a){a.o||(a.o=_.rn(function(){a.o=0;var b=a.j;a.j={};var c=a.i;a.i={};for(var d in b){var e=b[d],f=e.Qf;f.style=wX(a.T,e);f.hh&&!c[d]&&f.hh()}b=a.H;var g=a.get("projection");for(d in c)e=c[d],f=e.Qf,b.remove(f),f.geometry=xX(e,g),_.og(b,f),yX(a,e)}))},yX=function(a,b){function c(){vX(e,b,"latLngs")}var d=b.get("latLngs");if(d){var e=a,f=
_.Bf(b);a=d.getArray();for(var g=0,h=a.length;g<h;++g){var k=a[g];CX(k);k.j.nc[f]=k.H.nc[f]=k.o.nc[f]=c}CX(d);d.H.nc[f]=d.o.nc[f]=function(l,m){DX(m,f);c()};d.j.nc[f]=c}},zX=function(a){var b=a.get("latLngs");if(b){a=_.Bf(a);DX(b,a);b=b.getArray();for(var c=0,d=b.length;c<d;++c)DX(b[c],a)}},CX=function(a){a.j||(a.j=function(b){_.ge(a.j.nc,function(c,d){d(b)})},a.j.nc={});a.H||(a.H=function(b,c){_.ge(a.H.nc,function(d,e){e(b,c)})},a.H.nc={});a.o||(a.o=function(b,c){_.ge(a.o.nc,function(d,e){e(b,c)})},
a.o.nc={})},DX=function(a,b){a.j&&delete a.j.nc[b];a.H&&delete a.H.nc[b];a.o&&delete a.o.nc[b]},GX=function(a){var b=this.j=_.Ro("div");_.So(b,-202);_.Ez(b,"pointer");_.Az(b);this.i=_.UE(Iba,b,_.Yk,EX);_.L.bind(this,"toolbar",this,this.fm);var c=this;this.T=new _.nz(a.j,{Be:function(d){d&&(d=new _.O(d.wa,d.Aa),_.Qo(c.j,new _.O(d.x+FX.x,d.y+FX.y)))},ye:_.n()},null,a);a.yc(this.T);_.gq(b,{Ib:function(d){_.wp(d);c.Uf(Jba)},zd:function(d){_.xp(d)},Xb:function(d){_.xp(d)},Nb:function(d){_.yp(d)},onClick:function(d){d=
d.event;_.zp(d);d=d.Ta;_.hf(d);_.jf(d);c.H();c.je()},Kd:{yd:function(d,e){e.Ta.noDrag=!0},re:_.n(),Qd:_.n()}});new _.Pt(b,b,{We:(0,_.y)(this.Uf,this,_.Yk),Xe:(0,_.y)(this.Uf,this,Kba)})},HX=function(a){a.o&&_.L.clearListeners(a.o,"suppressundo_changed")},Lba=function(a,b,c){a.Uf(_.Yk);a.H=b;HX(a);a.o=c;_.Bz(a.j);_.L.addListener(c,"suppressundo_changed",function(){c.get("suppressUndo")&&a.je()})},IX=function(a){var b=this;this.i=a;_.L.addListener(a,"set_at",function(c){_.L.trigger(b,"set_at",c);var d=
a.getLength();0==c&&1<d&&_.L.trigger(b,"set_at",d)});_.L.addListener(a,"insert_at",function(c){_.L.trigger(b,"insert_at",c);var d=a.getLength();2==d?_.L.trigger(b,"insert_at",2):0==c&&1<d&&_.L.trigger(b,"set_at",d)});_.L.addListener(a,"remove_at",function(c){_.L.trigger(b,"remove_at",c);var d=a.getLength();1==d?_.L.trigger(b,"remove_at",1):0==c&&1<d&&_.L.trigger(b,"set_at",d)})},JX=function(a,b,c){this.j=a;this.o=b;this.i=c;this.Ga=[_.L.bind(a,"set_at",this,this.Wm),_.L.bind(a,"insert_at",this,this.Qi),
_.L.bind(a,"remove_at",this,this.Sm)];b=0;for(a=a.getLength();b<a;++b)this.Qi(b)},LX=function(a,b,c){var d=a.get("projection");if(d){var e=a.j,f=e.getAt(c),g=a.o,h=a.get("geodesic");0<c&&g.setAt(c-1,KX(e.getAt(c-1),f,h,d,a.i));c<e.getLength()-1&&(a=KX(f,e.getAt(c+1),h,d,a.i),b?g.insertAt(c,a):g.setAt(c,a))}},KX=function(a,b,c,d,e){c?d=e(a,b,.5):(180<Math.abs(a.lng()-b.lng())&&(a=new _.I(a.lat(),_.je(a.lng(),b.lng()-180,b.lng()+180),!0)),a=d.fromLatLngToPoint(a),b=d.fromLatLngToPoint(b),d=d.fromPointToLatLng(new _.O((a.x+
b.x)/2,(a.y+b.y)/2)));return d},MX=function(a,b,c,d,e){_.xn.call(this,a,b);void 0!==c&&(this.path=c);void 0!==d&&(this.vertex=d);void 0!==e&&(this.edge=e)},NX=function(a,b,c,d,e){this.H=a;this.T=b;this.ha=c;this.$=d;this.j=[];this.i=[];this.W=[];this.ma=e},PX=function(a,b,c){var d=OX(a,b,c,!1),e=a.H,f;_.L.addListener(d,"dragstart",function(g){f=b.getAt(g);var h=b.getArray(),k=a.T,l=h.length;if(2>l)e.set("anchors",[]);else{var m=h[k&&0==g?l-1:g-1];g=h[k&&g==l-1?0:g+1];h=[];m&&h.push(m);g&&h.push(g);
e.set("anchors",h)}e.bindTo("freeVertexPosition",d);e.set("map",a.get("map"))});_.L.addListener(d,"dragend",function(g,h,k){e.set("map",null);_.L.trigger(a,"toolbar",{i:!0,j:k,action:function(){b.setAt(g,f)}})});return d},QX=function(a,b,c){var d=new _.mg,e=a.T?new IX(b):b,f=new JX(e,d,a.$);f.bindTo("geodesic",a);f.bindTo("projection",a);var g=OX(a,d,c,!0);g.T=f;var h=a.H;_.L.addListener(g,"dragstart",function(k){k=[e.getAt(k),e.getAt(k+1)];h.set("anchors",k);h.bindTo("freeVertexPosition",g);h.set("map",
a.get("map"))});_.L.addListener(g,"dragend",function(k,l,m){b.insertAt(k+1,d.getAt(k));h.set("map",null);_.L.trigger(a,"toolbar",{i:!0,j:m,action:function(){b.removeAt(k+1)}})});return g},OX=function(a,b,c,d){var e=new bX(b,["pointer"],[0],d,c,a.ha,a.get("map"),a.ma);e.bindTo("projection",a);e.bindTo("zoom",a);e.bindTo("projectionCenterQ",a);e.bindTo("panningEnabled",a);e.bindTo("mapPixelBounds",a);e.bindTo("color",a);e.bindTo("zIndex",a);e.bindTo("offset",a);_.L.forward(e,"dragstart",a);_.L.forward(e,
"dragend",a);_.L.forward(e,"panbynow",a);_.L.forward(e,"toolbar",a);_.B(mX,function(f){_.L.addListener(e,f,function(g){var h=b.getAt(g);if(a.T)for(var k=d?a.i:a.j,l=0;l<k.length;++l)if(k[l]==e){var m=l;break}_.L.trigger(a,f,new MX(h,void 0,m,d?void 0:g,d?g:void 0))})});return e},RX=function(a){var b=(0,_.y)(a.o,a);_.B(a.j,b);_.B(a.i,b);a.j.length=0;a.i.length=0;_.B(a.W,_.L.removeListener);a.W.length=0},TX=function(a,b,c){function d(){g[u++]=v.latLng[0];g[u++]=v.latLng[1];f&&(h[m++]=v.distance);k=
v}var e=a.path,f=a.i;if(!e.length)return a;var g=Array(e.length),h=f?Array(f.length):null;a=[];var k=SX();g[0]=k.latLng[0]=e[0];g[1]=k.latLng[1]=e[1];f&&(h[0]=k.distance=f[0]);k.depth=0;WW(k.latLng,k.xe);for(var l=1,m=1,q=[],t=2,u=2;t<e.length||q.length;){if(q.length)var v=q.pop();else v=SX(),v.depth=0,v.latLng[0]=e[t++],v.latLng[1]=e[t++],f&&(v.distance=f[l++]),WW(v.latLng,v.xe);if(12<=Math.max(k.depth,v.depth))d();else{var x=new _.ug;x.Ma=Math.min(k.latLng[0],v.latLng[0]);x.Qa=Math.max(k.latLng[0],
v.latLng[0]);x.Ja=Math.min(k.latLng[1],v.latLng[1]);x.Pa=Math.max(k.latLng[1],v.latLng[1]);if(_.cz(b,x)){var w=SX();sba(k.xe,v.xe,w.xe);XW(w.xe,w.latLng);w.depth=Math.max(k.depth,v.depth)+1;f&&(w.distance=(k.distance+v.distance)/2);var E=x.Ja-1E-6,J=x.Pa+1E-6;x=w.latLng;x[1]=Mba(E,J,x[1]);Nba(k.latLng,v.latLng,a);Math.max(Math.abs(w.latLng[0]-a[0]),Math.abs(w.latLng[1]-a[1]))<=c?d():(q.push(v),q.push(w))}else d()}}return{path:g,i:h}},Nba=function(a,b,c){c[0]=(a[0]+b[0])/2;c[1]=(a[1]+b[1])/2},Mba=
function(a,b,c){for(;c<a;)c+=360;for(;c>b;)c-=360;return c},SX=function(){return{latLng:[0,0],xe:new SW(0)}},Oba=function(a){return function(b,c){if("px"==b.i)b=b.value/a;else{var d=_.fe(c);b=d?b.value/100*c[d-1]:0}return b}},Pba=function(a,b,c,d){--b;if(!(0>b)){var e=a.length,f=0;for(d(0);f<b;){var g=1<<e,h=e?a[e-1][f/g]:0,k=f+g;k>=b&&(k=b);e&&c(f,k,h)?--e:(d(k),f=k,f&g||++e)}}},Qba=function(a,b){return function(c,d){if(0==c)return!0;c=a[c];d=a[d];for(var e=0,f;f=b[e];++e){var g=f.offset;if(f=f.repeat){if(Math.floor((c-
g)/f)!=Math.floor((d-g)/f))return!0}else if(c<g&&g<=d)return!0}return!1}},Rba=function(a,b,c,d){var e=a.Ma,f=a.Ja,g=a.Qa,h=a.Pa;return function(k,l,m){var q=d[2*k],t=d[2*k+1];k=d[2*l];l=d[2*l+1];var u=Math.min(t,l)-m,v=Math.max(q,k)+m,x=Math.max(t,l)+m;Math.min(q,k)-m<=g&&e<=v&&u<=h&&f<=x?m>b?m=!0:(u=c.fromLatLngToPoint(new _.I(q,t,!0)),v=c.fromLatLngToPoint(new _.I(k,l,!0)),u=c.fromPointToLatLng(new _.O((u.x+v.x)/2,(u.y+v.y)/2),!0),t=(t+l)/2,q=(q+k)/2-u.lat(),k=t-u.lng(),m=Math.sqrt(q*q+k*k)+m>b):
m=!1;return m}},Sba=function(a,b,c){return function(d,e,f){var g=d.path,h=d.i,k=Rba(a,b,c,g);d=k;if(h){var l=Qba(h,f);d=function(t,u,v){return k(t,u,v)||l(t,u)}}var m=[],q=h?[]:null;Pba(e,g.length/2,d,function(t){m.push(g[2*t],g[2*t+1]);h&&q.push(h[t])});return{path:m,i:q}}},Tba=function(a,b,c,d){var e=a.i;if(!e)return null;a=a.path;for(var f=[],g=0,h=a.length-2;g<h;){var k=a[g],l=a[g+1],m=e[g/2],q=m-b;g+=2;var t=a[g],u=a[g+1];if(!(UX(k,l,d)&UX(t,u,d))){for(;_.ke(k,t)&&_.ke(l,u)&&g<h;)g+=2,t=a[g],
u=a[g+1];var v=e[g/2]-b,x=Math.atan2(t-k,l-u);0==m&&(q-=1E-9);if(c)for(m=Math.floor(v/c)*c;m>q;){var w=(m-q)/(v-q);f.push(k+(t-k)*w,l+(u-l)*w,x);m-=c}else 0>q&&0<=v&&(q=(0-q)/(v-q),f.push(k+(t-k)*q,l+(u-l)*q,x))}}return f},UX=function(a,b,c){var d=0;_.ke(a,-16,.001)&&(d|=1);_.ke(a,c.wa+16,.001)&&(d|=2);_.ke(b,-16,.001)&&(d|=4);_.ke(b,c.Aa+16,.001)&&(d|=8);return d},VX=function(a,b,c,d){this.j=d;this.ha=b;var e=this.ma=1<<b;b=_.my(this.j,{Ea:a.x,Fa:a.y,Ka:b},16/d.size.wa);b=_.wg(b.min.Ca,b.min.Da,
b.max.Ca,b.max.Da);this.$=c;var f=b;d=new _.cg(f.Ma,f.Ja);f=new _.cg(f.Qa,f.Pa);b=_.Sn(d,c,!0);var g=_.Sn(f,c,!0);f=Math.min(b.lat(),g.lat());d=Math.max(b.lat(),g.lat());var h=Math.min(b.lng(),g.lng());g=Math.max(b.lng(),g.lng());b=(h+g)/2;var k=_.je(b,-180,180);h+=k-b;g+=k-b;b=_.wg(f,h,d,g);f=new _.I(f,h,!0);h=new _.I(d,g,!0);d=_.Rn(f,c);d=new _.O(d.Ca,d.Da);f=_.Rn(h,c);f=new _.ug([d,new _.O(f.Ca,f.Da)]);this.i=b;this.H=f;this.T=a;a=.5/e;b=this.H;this.W=Math.min(RW(c,a,new _.O(b.Ma,b.Ja)),RW(c,a,
new _.O(b.Qa,b.Pa)));this.ua=Sba(this.i,this.W,c);this.o=Oba(e)},Vba=function(a,b,c,d){for(var e=[],f=[],g=0,h=d.length;g<h;++g)f.push([]);g=0;for(h=b.length;g<h;++g){var k=b[g],l=k.j,m=Uba(a,d,l.i);l=k.i?a.ua(l,k.i,m):{path:_.mb(l.path,0),i:l.i};if(l.path.length){c&&(l=TX(l,a.i,a.W));LW(l.path,a.$);l=oba(l,a.H);var q=l.path;k=a.j.size;if(q.length){e.push(q);for(var t=0;t<q.length;t+=2){var u=_.en(a.j,new _.cg(q[t],q[t+1]),a.ha,_.na());q[t]=(u.Ea-a.T.x)*k.wa;q[t+1]=(u.Fa-a.T.y)*k.Aa}for(t=0;q=m[t];++t)(q=
Tba(l,q.offset,q.repeat,k))&&(f[t]=f[t].concat(q))}}}return{paths:e,$f:f}},Uba=function(a,b,c){var d=[];if(c)for(var e=0,f;f=b[e];++e)d.push({offset:a.o(f.offset,c),repeat:a.o(f.repeat,c)});return d},WX=function(a,b,c,d,e){this.H=b;this.$=c;this.W=new _.PF(a.j,d,e);this.T=e;this.i=null;this.Sc=!1},Wba=function(a){return _.le(a,function(b){return _.le(b,function(c){return Math.round(c)})})},Yba=function(a,b,c,d,e){function f(){a.get("editable")?(Xba(a,b,d,e),_.Dj(b,"Oe"),_.Yo("Oe","-p",a)):(_.L.trigger(c,
"toolbar",{i:!1,poly:a}),XX(a))}a.editable_changed=f;f();a.Eh=_.L.addListener(a,"toolbar",function(g){g.poly=a;_.L.trigger(c,"toolbar",g)})},Xba=function(a,b,c,d){if(!a.H){var e=new _.fL(a,a.bc);a.T=e;var f=new _.cL;f.bindTo("strokeColor",e);f.bindTo("strokeOpacity",e,"ghostStrokeOpacity");f.bindTo("strokeWeight",e);f.bindTo("geodesic",a);f.bindTo("zIndex",a);a.jd=f;var g=b.__gm;a.j=NW(g);var h=_.SF(g,a),k=_.Go()?9:0,l=new hX,m=new NX(f,a.bc,function(q,t,u){return new $W(q,a.j,k,t,h,l,u)},c,d);m.set("map",
b);m.bindTo("paths",a,"latLngs");m.bindTo("panes",g);m.bindTo("projection",b);m.bindTo("zoom",g);m.bindTo("projectionCenterQ",g);m.bindTo("panningEnabled",b,"draggable");m.bindTo("mapPixelBounds",g,"pixelBounds");m.bindTo("offset",g);m.bindTo("color",e,"strokeColor");m.bindTo("zIndex",a);m.bindTo("geodesic",a);m.bindTo("suppressGhostControlPoints",a);a.H=m;_.L.addListener(a,"click",function(){a.get("editable")&&_.Yo("Oe","-i",a)});_.L.forward(m,"panbynow",g);_.L.forward(m,"toolbar",a);_.B(mX,function(q){_.L.forward(m,
q,a)})}},XX=function(a){var b=a.H;b&&(b.unbindAll(),b.set("map",null),_.L.clearInstanceListeners(b),delete a.H,a.j.unbindAll(),a.j.release(),delete a.j,a.jd.unbindAll(),delete a.jd,a.T.release(),delete a.T)},YX=function(a,b,c){this.o=Math.min(2,_.uo());this.T=b;this.j=a;this.i=c||_.ul},Zba=function(a,b,c,d,e){this.i=c.size;this.$=d;this.T=b;this.j=ZX(a,this.i,e);_.Qo(this.j,_.Yk);this.W=$X(this.j,e);this.ha=ZX(a,this.i,e);this.ma=$X(this.ha,e);this.Ba=new _.fG(this.W);this.ua=new _.fG(this.ma);this.o=
{};this.H=0},ZX=function(a,b,c){a=a.createElement("canvas");a.width=b.wa*c;a.height=b.Aa*c;a.style.width=_.Q(b.wa);a.style.height=_.Q(b.Aa);_.To(a);return a},$X=function(a,b){a=a.context=a.getContext("2d");a.scale(b,b);a.lineCap=a.lineJoin="round";return a},bY=function(a){a.H||(a.H=_.rn(function(){a.H=0;var b=$ba(a);if(b.length){a.j.parentNode||a.T.appendChild(a.j);var c=a.W,d=a.ma;c.clearRect(0,0,a.i.wa,a.i.Aa);for(var e=null,f=0;f<b.length;++f){var g=b[f],h=g.i,k=h.j;_.ke(1,k)?(a.$(c,g.paths,h.strokeColor,
h.strokeOpacity,h.strokeWeight,h.strokePosition,h.fillColor,h.fillOpacity),aY(g.$f,h.i,c,a.Ba,1)):(d.clearRect(0,0,a.i.wa,a.i.Aa),a.$(d,g.paths,h.strokeColor,h.strokeOpacity/k,h.strokeWeight,h.strokePosition),aY(g.$f,h.i,d,a.ua,k),c.globalAlpha=k,c.drawImage(a.ha,0,0,a.i.wa,a.i.Aa));!e&&g.yb&&g.yb.Ad&&(e=g.yb.Ad)}e&&e()}else a.j.parentNode&&a.T.removeChild(a.j)}))},aY=function(a,b,c,d,e){for(var f=0,g=a.length;f<g;++f){var h=b[f],k=c,l=d,m=a[f],q=h.Sf,t=h.scale,u=h.rotation,v=h.nn,x=h.strokeColor,
w=h.strokeOpacity/e,E=h.strokeWeight,J=h.fillColor;h=h.fillOpacity/e;k.beginPath();for(var N=0,R=m.length;N<R;N+=3)l.Qb(q,m[N],m[N+1],u+(v?m[N+2]:0),t);h&&(k.fillStyle=J,k.globalAlpha=h,k.fill());E&&(k.lineWidth=E,k.strokeStyle=x,k.globalAlpha=w,k.stroke())}},$ba=function(a){var b=[];a=a.o;for(var c in a)b.push(a[c]);b.sort(function(d,e){return d.zIndex-e.zIndex});return b},aca=function(a,b,c){function d(k,l){k.beginPath();for(var m=0,q;q=l[m];++m)if(q.length){k.moveTo(Math.round(q[0]),Math.round(q[1]));
for(var t=2,u=q.length;t<u;)k.lineTo(Math.round(q[t++]),Math.round(q[t++]))}}var e=c.size,f=a.createElement("canvas");f.width=b*e.wa;f.height=b*e.Aa;var g=f.getContext("2d");g.lineCap=g.lineJoin="round";g.scale(b,b);var h=[function(k,l,m,q,t){k.lineWidth=t;k.strokeStyle=m;k.globalAlpha=q;k.stroke()},function(k,l,m,q,t){k.lineWidth=2*t;k.strokeStyle=m;k.globalAlpha=q;k.save();k.clip();k.stroke();k.restore()},function(k,l,m,q,t){g.lineWidth=2*t;g.strokeStyle=m;g.globalCompositeOperation="source-over";
g.clearRect(0,0,e.wa,e.Aa);d(g,l);g.stroke();g.globalCompositeOperation="destination-out";g.fill();k.globalAlpha=q;k.drawImage(f,0,0,e.wa,e.Aa)}];return function(k,l,m,q,t,u,v,x){d(k,l);x&&(k.fillStyle=v,k.globalAlpha=x,k.fill());if(t)h[u](k,l,m,q,t)}},cY=function(a,b){this.o=a;this.j=b;this.i=null},bca=function(a,b,c,d){var e=this;this.j=b;this.i=d;a.i=function(g){dY(e,g)};a.onRemove=function(g){delete g.hh;e.j.remove(g.bounds);g=g.geometry;var h=g.tb;for(q in h){var k=h[q],l=k.yb,m=l.lh;delete m.o[_.Bf(k)];
bY(m);delete l.tb[_.Bf(k)]}g.tb={};var q=g.i;_.Zo(q.bc?"Op":"Ol","-v",q)};c.i=function(g){eY(e,g)};c.onRemove=function(g){e.i.remove(g.bounds);var h=g.tb,k;for(k in h){var l=h[k],m=l.j;delete m.tb[_.Bf(l)];l=m.i;_.Zo(l.bc?"Op":"Ol","-v",l)}g.tb={}};a=a.j;for(var f in a)dY(e,a[f]);c=c.j;for(f in c)eY(e,c[f])},dY=function(a,b){b.hh=function(){var f=b.geometry.tb,g;for(g in f){var h=f[g];h.i=b.style;h.zIndex=b.style.zIndex;bY(h.yb.lh)}};var c=b.geometry,d=c.bounds;d.poly=b;b.bounds=d;_.UF(a.j,d);a=a.i.search(d);
d=0;for(var e=a.length;d<e;++d)fY(b,a[d].Ge||null);0<a.length&&(c=c.i,_.Yo(c.bc?"Op":"Ol","-v",c))},eY=function(a,b){var c=b.bounds;c.Ge=b;_.UF(a.i,c);a=a.j.search(b.bounds);if(0==a.length)b.Ad&&_.Tf((0,_.y)(b.Ad,b));else{c=0;for(var d=a.length;c<d;++c)fY(a[c].poly||null,b),_.Yo(a[c].poly.geometry.i.bc?"Op":"Ol","-v",a[c].poly.geometry.i)}},fY=function(a,b){var c=a.geometry,d=Vba(b.Un,c.o,c.geodesic,c.j);if(d.paths.length){var e={};e.paths=d.paths;e.$f=d.$f;e.i=a.style;e.zIndex=a.style.zIndex;e.yb=
b;e.j=c;a=_.Bf(e);c.tb[a]=e;b.tb[a]=e;b=b.lh;b.o[_.Bf(e)]=e;bY(b)}else b.Ad&&_.Tf((0,_.y)(b.Ad,b))},cca=function(a){return _.le(a,function(b){var c={},d=b.path;if(50<=d.length){for(var e=[],f=d.length-2,g,h=2;h<f;h<<=1){for(var k=d[0],l=d[1],m=Math.ceil(f/(2*h)),q=Array(m),t=0,u=0,v=d.length-1-h;t<v;){t+=h;var x=d[t],w=d[t+1];t+=h;t>d.length-2&&(t=d.length-2);var E=d[t],J=d[t+1],N=x-k,R=w-l;k=E-k;var pa=J-l,ra=N*k+R*pa;l=k*k+pa*pa;ra>=l?(x=E-x,w=J-w,w=x*x+w*w):0>=ra?w=N*N+R*R:(w=N*pa-R*k,w*=w,w/=
l+1E-16);w=Math.sqrt(w);g&&(w+=Math.max(g[2*u],g[2*u+1]||0));q[u++]=w;k=E;l=J}u<m&&(q[u]=g?g[2*u]:0);g=q;e.push(q)}c.i=e}c.j=b;b=f=Infinity;e=g=-Infinity;h=0;for(m=d.length;h<m;)q=d[h++],b=Math.min(b,q),e=Math.max(e,q),q=d[h++],f=Math.min(f,q),g=Math.max(g,q);d=new _.ug;d.Ma=b;d.Qa=e;d.Ja=f;d.Pa=g;c.bounds=d;return c})},fca=function(a,b,c,d){return _.le(a,function(e){var f=e.path;e=e.i;var g=null;if(b){g=c?dca(f):eca(f,d);for(var h={0:0},k=0,l=[0],m=1,q=e.length;m<q;++m){var t=e[m];t in h?k=h[t]:
(k+=g(m-1),h[t]=k);l.push(k)}g=l}return{path:f,i:g}})},eca=function(a,b){var c=_.mb(a,0);LW(c,b);return function(d){d*=2;var e=c[d]-c[d+2];d=c[d+1]-c[d+3];return Math.sqrt(e*e+d*d)}},dca=function(a){return function(b){b*=2;var c=new _.I(a[b],a[b+1]);b=new _.I(a[b+2],a[b+3]);return _.iy(c,b,1)}},ica=function(a){a.length&&(a=gY(a,gca),a=gY(a,hca));return a},gY=function(a,b){var c=[],d=new SW(0),e=new SW(0),f=new SW(0),g=Array(a.length);g[0]=a[0];g[1]=a[1];WW(a,d);for(var h=2,k=2;h<a.length;){c[0]=a[h];
c[1]=a[h+1];WW(c,f);b(d,f,e)&&(XW(e,c),g[k++]=c[0],g[k++]=c[1]);g[k++]=a[h++];g[k++]=a[h++];var l=d;d=f;f=l}return g},gca=function(a,b,c){if(0<a.z==0<b.z)return!1;VW(a,b,hY);VW(hY,iY,c);c.z=0;if(1E-12>TW(c,c))return!1;0>TW(c,a)+TW(c,b)&&(c.x=-c.x,c.y=-c.y);return!0},hca=function(a,b,c){VW(a,b,hY);VW(iY,hY,jY);VW(hY,jY,c);if(1E-12>TW(c,c)||0<TW(a,jY)==0<TW(b,jY))return!1;0>TW(c,a)+TW(c,b)&&(c.x=-c.x,c.y=-c.y,c.z=-c.z);return!0},kca=function(a,b,c){if(!b)return null;var d=[];b.forEach(function(e){d.push(jca(e))});
a&&_.B(d,nba);if(c)for(a=0,b=d.length;a<b;++a)d[a]=ica(d[a]);return d},lca=function(a){return _.le(a,function(b){if(b.length){var c=b[1];for(var d=[0],e=1,f=1;e<b.length/2;++e,++f){var g=b[2*e+1];if(180<Math.abs(c-g)){var h=g<c?1:-1,k=b[2*e-2],l=b[2*e];b.splice(2*e,0,l,g+360*h,l,g+450*h,90,g+450*h,90,c-450*h,k,c-450*h,k,c-360*h);d.push(f,f,f,f,f,f-1);e+=6}d.push(f);c=g}c=d}else c=[];return{path:b,i:c}})},jca=function(a){a=a.i;for(var b=a.length,c=Array(2*b),d=0,e=0;d<b;++d){var f=a[d];c[e++]=f.lat();
c[e++]=f.lng()}return c},mca=_.n(),xX=function(a,b){var c={},d=a.get("icons"),e=!a.bc&&!!_.fe(d),f=!0;c.j=[];e&&_.B(d,function(k){var l=QW(k.offset)||nca;k=QW(k.repeat)||oca;c.j.push({offset:l,repeat:k});f=f&&(0==l.value||"%"==l.i)&&(0==k.value||"%"==k.i)});d=c.geodesic=a.get("geodesic");var g=kca(a.bc,a.get("latLngs"),d);g=lca(g);var h=d&&f;d&&e&&!h&&(g=pca(g));g=fca(g,e,h,b);b=c.o=cca(g);if(1==b.length)e=b[0].bounds;else for(e=new _.ug,d=0,g=b.length;d<g;++d)_.jy(e,b[d].bounds);c.bounds=e;c.i=a;
c.tb={};return c},pca=function(a){return _.le(a,function(b){return TX(b,_.$k,.1)})},qca=function(){var a=_.qG();this.j=_.eL;this.i=_.dL;this.o=a},wX=function(a,b){function c(l){return _.me(b.get(l),f[l])}var d={},e=d.bc=b.bc,f=e?a.i:a.j;d.strokeColor=c("strokeColor");d.strokeOpacity=c("strokeOpacity");d.strokeWeight=c("strokeWeight");d.clickable=c("clickable");e?(d.strokePosition=c("strokePosition"),d.fillColor=c("fillColor"),d.fillOpacity=c("fillOpacity")):d.strokePosition=a.i.strokePosition;var g=
b.get("zIndex")||0;d.zIndex=1E3*g+_.Ta(b)%1E3;d.strokeWeight=Math.min(d.strokeWeight,0==d.strokePosition?32:16);d.o=b.get("hitStrokeWeight")||rca(d.strokeWeight,d.strokePosition);d.i=[];d.j=1;if(!e){e=b.get("icons")||[];var h=a.o,k=0;_.B(e,function(l){var m=h(l.icon||{},d.strokeColor,d.strokeOpacity,d.strokeWeight);m.nn=!l.fixedRotation;d.i.push(m);k=Math.max(k,m.strokeOpacity);k=Math.max(k,m.fillOpacity)});_.ke(0,k)||(_.ke(0,d.strokeOpacity)||_.ke(0,d.strokeWeight))&&1==d.i.length||(d.j=Math.max(k,
d.strokeOpacity));_.fe(e)&&(a=b.get("map"),_.Dj(a,"Os"),_.Yo("Os","-p",b))}return d},rca=function(a,b){switch(b){case 1:return 0;case 2:return 2*a;default:return a}},tca=function(a){var b=this;this.j=a;this.i=a.__gm;var c=new _.ng;(new AX(this.i.H,c,new qca,new mca)).bindTo("projection",a);var d=_.wg(-100,-200,100,200),e=new _.TF(d);d=new _.TF(d);this.ma=new _.ng;new bca(c,e,this.ma,d);var f=_.Lo(a.getDiv()),g=void 0,h=null;this.ha=new _.zg(null,void 0);_.RF(a,this.ha,"overlayLayer",30);this.W=this.T=
this.H=this.$=this.o=null;this.i.i.then(function(k){b.W=k.rb;sca(b,k.rb);k.Xd.kb(function(l){if(l&&g!=l.Wa){h&&h.unbindAll();g=l.Wa;var m=new cY(g,f);h=new YX(b.ma,function(q){for(var t=[],u=0;u<arguments.length;++u)t[u-0]=arguments[u];return m.H.apply(m,_.Ba(t))},g);h.bindTo("projection",a);b.ha.set(h.Pb())}})});_.L.addListener(this.i.H,"insert",function(k){return kY(b,k)});_.L.addListener(this.i.H,"remove",function(k){if(b.H&&b.W){_.B(k.ji||[],_.L.removeListener);delete k.draggable_changed;delete k.ji;
_.Zo("Od","-p",k);var l=b.H;delete k.editable_changed;XX(k);_.L.trigger(l,"toolbar",{i:!1,poly:k});k.Eh&&(_.L.removeListener(k.Eh),delete k.Eh);_.Zo("Oe","-p",k);k.set("capturing",!1);delete k.capturing_changed;k.tf||(k.bc?_.Zo("Op","-p",k):(_.Zo("Ol","-p",k),l=k.get("icons"),_.fe(l)&&_.Zo("Os","-p",k)))}})},sca=function(a,b){a.T=new WX(a.ma,a.i,function(c){return a.j.getProjection().fromPointToLatLng(c)},b.j,a.ha);a.i.o.register(a.T);a.H=uca(a,b);_.K("geometry").then(function(c){a.o=c;a.$=new qX(function(d,
e,f){return d.get("geodesic")?new oX(d,e,f,a.o.computeHeading,a.o.computeOffset,a.o.computeOffsetOrigin):new pX(d,e,f)},a.j,b);sX(a.j,a.$);a.i.H.forEach(function(d){return kY(a,d)})})},uca=function(a,b){b=new GX(b);b.bindTo("panes",a.i);b.bindTo("projection",a.j);b.bindTo("zoom",a.i);b.bindTo("projectionCenterQ",a.i);b.bindTo("offset",a.i);_.L.bind(a.j,"click",b,b.je);return b},kY=function(a,b){if(a.$&&a.H&&a.T&&a.o&&a.W){tX(b,a.$);Yba(b,a.j,a.H,a.o.interpolate,a.W);Fba(b,a.i,a.T,a.i.o);if(!b.tf){var c=
b.bc?"Op":"Ol";_.Dj(a.j,c);_.Yo(c,"-p",b)}_.L.addListener(b,"click",function(){b.bc?b.tf||_.Yo("Op","-i",b):_.Yo("Ol","-i",b)})}},lY=function(a,b,c){if(!a||!b||!c)return null;var d=c.lat(),e=c.lng();c=b&1?d:a.Za.i;var f=b&2?e:a.Va.i;d=b&4?d:a.Za.j;var g=b&8?e:a.Va.j;if(c>d){var h=c;c=d;d=h}b&10&&!a.Va.contains(e)&&(h=_.uf(e,a.Va.i),a=_.uf(a.Va.j,e),b&2?h>a:a>h)&&(h=f,f=g,g=h);return _.yf(c,f,d,g)},mY=function(){var a=new _.gj({clickable:!1,fillOpacity:0});a.bindTo("map",this);a.bindTo("strokeColor",
this);a.bindTo("strokeOpacity",this);a.bindTo("strokeWeight",this);var b=new _.$z(["bounds","freeControlPoint","freeVertexPosition"],"return",lY);b.bindTo("bounds",this);b.bindTo("freeControlPoint",this);b.bindTo("freeVertexPosition",this);a.bindTo("bounds",b,"return");this.i=_.bL();this.i.bindTo("zIndex",this);a.bindTo("zIndex",this.i,"ghostZIndex")},nY=function(a,b,c){this.W=a;this.$=b;this.o=this.T=null;this.i=new _.mg;_.L.bind(this.i,"set_at",this,this.jo);this.H=new _.mg;_.L.bind(this.H,"set_at",
this,this.ko);this.j=!1;this.ha=c},qY=function(a,b,c){var d=c?new bX(a.i,vca,wca,!1,b.overlayMouseTarget,a.$,a.get("map"),a.ha):new bX(a.H,xca,yca,!0,b.overlayMouseTarget,a.$,a.get("map"),a.ha);d.bindTo("projection",a);d.bindTo("zoom",a);d.bindTo("projectionCenterQ",a);d.bindTo("panningEnabled",a);d.bindTo("mapPixelBounds",a);d.bindTo("color",a);d.bindTo("zIndex",a);d.bindTo("offset",a);var e=a.W,f=c?oY:pY,g;_.L.addListener(d,"dragstart",function(h){g=a.get("bounds");e.bindTo("freeVertexPosition",
d);e.set("freeControlPoint",f[h]);e.set("map",a.get("map"))});_.L.addListener(d,"dragend",function(h,k,l){e.set("map",null);_.L.trigger(a,"toolbar",{i:!0,j:l,action:function(){a.set("bounds",g)}})});_.L.forward(d,"dragstart",a);_.L.forward(d,"dragend",a);_.L.forward(d,"panbynow",a);return d},rY=function(a){a&&(a.unbindAll(),a.release(),_.L.clearInstanceListeners(a))},sY=function(a,b,c){a.j||(a.j=!0,b=lY(a.get("bounds"),b,c),a.set("bounds",b),a.j=!1)},Aca=function(a,b,c){function d(){a.get("editable")?
zca(a,b,c):(tY(a),_.L.trigger(a,"toolbar",{i:!1}))}a.editable_changed=d;d()},zca=function(a,b,c){if(!a.o){var d=new _.fL(a,!0);a.H=d;var e=new mY;e.bindTo("strokeColor",d);e.bindTo("strokeOpacity",d,"ghostStrokeOpacity");e.bindTo("strokeWeight",d);e.bindTo("bounds",a);e.bindTo("zIndex",a);a.T=e;var f=b.__gm;a.i=NW(f);var g=_.SF(f,a),h=_.Go()?9:0,k=new hX;c=new nY(e,function(l,m,q){return new $W(l,a.i,h,m,g,k,q)},c);c.set("map",b);c.bindTo("bounds",a);c.bindTo("panes",f);c.bindTo("projection",b);c.bindTo("zoom",
f);c.bindTo("projectionCenterQ",f);c.bindTo("panningEnabled",b,"draggable");c.bindTo("mapPixelBounds",f,"pixelBounds");c.bindTo("offset",f);c.bindTo("color",d,"strokeColor");c.bindTo("zIndex",a);c.bindTo("suppressGhostControlPoints",a);a.o=c;_.L.forward(c,"panbynow",f);_.L.forward(c,"toolbar",a)}},tY=function(a){var b=a.o;b&&(b.unbindAll(),b.set("map",null),_.L.clearInstanceListeners(b),delete a.o,a.i.unbindAll(),a.i.release(),delete a.i,a.T.unbindAll(),delete a.T,a.H.release(),delete a.H)},uY=function(a,
b,c){this.T=a;this.Sa=c;a=a.get("bounds");this.H=IW(c,a.getSouthWest());this.o=IW(c,a.getNorthEast());this.i=IW(c,c.fromDivPixelToLatLng(b))},vY=function(a){var b=this,c=this.i=new _.ej;c.Je=a;c.tf=!0;c.bindTo("capturing",b);c.bindTo("cursor",b);c.bindTo("map",b);c.bindTo("strokeColor",b);c.bindTo("strokeOpacity",b);c.bindTo("strokeWeight",b);c.bindTo("strokePosition",b);c.bindTo("fillColor",b);c.bindTo("fillOpacity",b);c.bindTo("clickable",b);c.bindTo("zIndex",b);c.bindTo("suppressUndo",b);var d=
this.j=[];_.B(mX,function(e){d.push(_.L.forward(c,e,b))});d.push(_.L.forward(b,"toolbar",c))},Cca=function(a){var b=this;this.i=a;this.j=a.__gm;this.o=this.H=null;this.j.i.then(function(c){c=c.rb;b.o=c;Bca(b,c)});this.j.$.i=function(c){return wY(b,c)};this.j.$.onRemove=function(c){if(b.o){var d=c.Zi;d.unbindAll();d.set("map",null);d.release();delete c.Zi;c.listeners&&_.B(c.listeners,_.L.removeListener);delete c.listeners;delete c.editable_changed;tY(c);_.Zo("Or","-p",c)}}},Bca=function(a,b){a.H=new qX(function(c,
d,e){return new uY(c,d,e)},a.i,b);sX(a.i,a.H);a.j.$.forEach(function(c){return wY(a,c)})},wY=function(a,b){if(a.H&&a.o){var c=b.Zi=new vY(b);c.set("map",a.i);c.bindTo("bounds",b);c.bindTo("capturing",b);c.bindTo("cursor",b);c.bindTo("clickable",b);c.bindTo("fillColor",b);c.bindTo("fillOpacity",b);c.bindTo("strokeColor",b);c.bindTo("strokeOpacity",b);c.bindTo("strokeWeight",b);c.bindTo("strokePosition",b);c.bindTo("suppressUndo",b);c.bindTo("zIndex",b);var d=b.listeners=[];_.B(mX,function(e){d.push(_.L.forward(c,
e,b))});d.push(_.L.forward(b,"toolbar",c));tX(b,a.H);Aca(b,a.i,a.o);_.Dj(a.i,"Or");_.Yo("Or","-p",b);_.L.addListener(b,"click",function(){_.Yo("Or","-i",b)})}},xY=_.n(),mX="click dblclick mousedown mousemove mouseout mouseover mouseup rightclick".split(" ");_.A(OW,_.M);OW.prototype.j=function(a){return"dragstart"!=a&&"drag"!=a&&"dragend"!=a};OW.prototype.o=function(){return this.get("active")?this:null};
OW.prototype.handleEvent=function(a,b,c){if("mouseout"==a)this.set("cursor","");else if("mouseover"==a){var d=this.get("draggableCursor");d&&this.set("cursor",d)}_.L.trigger(c,a,new _.xn(b.latLng,b.ub))};OW.prototype.zIndex=Infinity;var PW={};SW.prototype.equals=function(a){return this.x==a.x&&this.y==a.y&&this.z==a.z};_.A(YW,_.M);YW.prototype.j=function(a,b,c,d,e){return!e&&d&&a?_.iy(d,a,c):b};_.A($W,_.M);$W.prototype.release=function(){_.Tc(this.i);_.B(this.Ga,_.L.removeListener);this.Ga.length=0;this.T.remove();this.W.remove();this.o.unbindAll();this.o.release();this.H.set("active",!1)};$W.prototype.position_changed=function(){var a=this.get("position");if(a){this.i.style.display="block";var b=5+this.$;_.Qo(this.i,new _.O(a.x-b,a.y-b))}else this.i.style.display="none"};$W.prototype.color_changed=function(){var a=this.get("color");this.i.firstChild.style.borderColor=a;ZW(this)};_.A(bX,_.M);bX.prototype.release=function(){_.B(this.ua,_.L.removeListener);this.ua.length=0;_.B(this.j,(0,_.y)(this.va,this));this.j.length=0;_.L.clearInstanceListeners(this.H);_.Tc(this.H)};bX.prototype.zIndex_changed=function(){var a=this.get("zIndex")||0;this.W&&--a;_.So(this.H,a)};
bX.prototype.$=function(a,b){var c=this,d={};d.index=b;c.j.splice(b,0,d);d.W=c.ha[b%c.ha.length];var e=this.La(c.H,c.ma[b%c.ma.length],c.W);e.bindTo("color",c);e.bindTo("panningEnabled",c);e.bindTo("mapPixelBounds",c);d.j=e;var f=[_.L.forward(e,"panbynow",c)];b=a&&this.i?_.Rn(a,this.i.getProjection()):null;e.set("latLngPosition",a);d.T=!0;d.o=null;d.H=null;a=new _.nz(this.o.j,{Be:function(g){g?e.set("position",new _.O(g.wa,g.Aa)):e.set("position",null)},ye:_.n()},b,this.o,function(){if(c.i){var g=
d.i.getPosition();g&&(g=_.Sn(g,c.i.getProjection()),d.T=!1,d.j.set("latLngPosition",g),d.T=!0)}});this.o.yc(a);d.i=a;f.push(_.L.addListener(e,"latlngposition_changed",function(){if(d.T&&c.i){var g=d.j.get("latLngPosition");g?d.i.setPosition(_.Rn(g,c.i.get("projection"))):d.i.setPosition(null)}}));f.push(_.L.addListener(e,"dragstart",function(){d.o=_.oz(d.i);d.o&&_.pz(d.i,d.o)}));f.push(_.L.addListener(e,"dragend",function(){var g=d.i.getPosition();if(g&&c.i&&(g=_.Sn(g,c.i.get("projection")),g=cX(c,
d,g))&&(g=_.Rn(g,c.i.get("projection")),g=_.oz(d.i,g),g=dX(d,g))&&(g=d.i.getPosition(g))){var h=_.Sn(g,c.i.get("projection"));d.T=!1;d.j.set("latLngPosition",h);d.T=!0;d.i.setPosition(g)}d.o=null;d.H=null}));f.push(_.L.addListener(e,"deltaclientposition_changed",function(){var g=d.j.get("deltaClientPosition");if(g&&(d.o||d.H)&&c.i){var h=d.H||d.o;d.H={clientX:h.clientX+g.clientX,clientY:h.clientY+g.clientY};g=c.o.Tc(d.H);g=_.Sn(g,c.i.get("projection"));h=d.H;var k=cX(c,d,g);k&&!k.equals(g)&&(g=_.Rn(k,
c.i.get("projection")),h=_.oz(d.i,g));(h=dX(d,h))&&_.pz(d.i,h)}}));f.push(_.L.addListener(e,"dragstart",function(){c.bindTo("freeVertexPosition",e,"latLngPosition");eX(c,d,"dragstart")}));f.push(_.L.addListener(e,"dragend",function(){c.Ra.setAt(d.index,e.get("latLngPosition"));eX(c,d,"dragend")}));_.B(mX,function(g){f.push(_.L.addListener(e,g,function(){eX(c,d,g)}))});d.listeners=f};
bX.prototype.va=function(a){a.j.unbindAll();a.j.release();a.i&&this.o.he(a.i);_.B(a.listeners,_.L.removeListener);a.listeners.length=0};_.A(fX,_.M);var uba=["pointer","row-resize","row-resize","col-resize","col-resize"],vba=[0,2,2,1,1];_.r=fX.prototype;_.r.map_changed=function(){this.get("map")||(this.T.set("map",null),gX(this),_.L.clearInstanceListeners(this.i))};_.r.panes_changed=function(){gX(this);this.o=wba(this)};
_.r.qh=function(){var a=this.i,b=this.get("center"),c=this.get("radius");if(b&&_.oe(c)){this.H=!0;var d=this.get("planetRadius"),e=_.Pc(c/d);var f=_.Oc(b.lat());if(d=c/d){c=Math.cos(d);d=Math.sin(d);var g=Math.sin(f);f=Math.atan2(Math.sin(Math.acos((1-c)/d*Math.tan(f)))*d*Math.cos(f),c-g*g)}else f=0;f=_.Pc(f);a.setAt(0,b);c=b.lat()+e;90>c?a.setAt(1,new _.I(c,b.lng())):a.setAt(1,null);e=b.lat()-e;-90<e?a.setAt(2,new _.I(e,b.lng())):a.setAt(2,null);180>=f?(e=b.lng()+f,f=b.lng()-f,a.setAt(3,new _.I(b.lat(),
e)),a.setAt(4,new _.I(b.lat(),f))):(a.setAt(3,null),a.setAt(4,null));this.H=!1;this.j||_.L.trigger(this,"toolbar",{i:!1})}else a.clear()};_.r.center_changed=fX.prototype.qh;_.r.radius_changed=fX.prototype.qh;_.r.planetRadius_changed=fX.prototype.qh;
_.r.lo=function(a){if(!this.H){var b=this.i.getAt(a);if(0==a)_.Yy(this,function(){this.j=!0;this.set("center",b);this.j=!1},0);else{var c=_.iy(this.get("center"),b,this.get("planetRadius"));_.Yy(this,function(){this.j=!0;this.set("radius",c);this.j=!1},0)}}};hX.prototype.construct=function(a,b,c,d,e){a=_.Ro("div",a,new _.O(b,b),new _.P(c,c));a.style.borderWidth=_.Q(d);a.style.borderStyle="solid";a.style.borderRadius=_.Q(Math.ceil(c/2+d));_.Fz(a,e)};var yY=new _.I(90,0),zY=new _.I(-90,0);jX.prototype.j=function(a){a=this.Sa.fromDivPixelToLatLng(a);var b=this.T(a,this.i,this.o);b||(b=Math.abs(_.iy(a,yY)-this.i)<Math.abs(_.iy(a,zY)-this.i)?yY:zY);this.H.set("center",b)};_.r=zba.prototype;_.r.isEmpty=function(){return 360==this.i-this.j};_.r.intersects=function(a){var b=this.i,c=this.j;return this.isEmpty()||a.isEmpty()?!1:this.i>this.j?a.i>a.j||a.i<=this.j||a.j>=b:a.i>a.j?a.i<=c||a.j>=b:a.i<=c&&a.j>=b};_.r.contains=function(a){-180==a&&(a=180);var b=this.i,c=this.j;return this.i>this.j?(a>=b||a<=c)&&!this.isEmpty():a>=b&&a<=c};_.r.extend=function(a){this.contains(a)||(this.isEmpty()?this.i=this.j=a:lX(a,this.i)<lX(this.j,a)?this.i=a:this.j=a)};
_.r.scale=function(a){if(this.isEmpty())return this;var b=kX(this);a*=b;360<a?(this.i=-180,this.j=180):(b=.5*(a-b),this.i-=b,this.j+=b,this.i=((this.i- -180)%360+360)%360+-180,this.j=((this.j- -180)%360+360)%360+-180);return this};_.r.equals=function(a){return 1E-9>=Math.abs(a.i-this.i)%360+Math.abs(kX(a)-kX(this))};_.r.center=function(){var a=(this.i+this.j)/2;this.i>this.j&&(a=((a+180- -180)%360+360)%360+-180);return a};_.A(nX,_.M);nX.prototype.center_changed=function(){_.zi(this.Na)};nX.prototype.radius_changed=function(){_.zi(this.Na)};nX.prototype.planetRadius_changed=function(){_.zi(this.Na)};nX.prototype.release=function(){for(var a=this.i,b=0,c=a.length;b<c;++b)_.L.removeListener(a[b]);this.i=null;this.j.unbindAll();this.j=null};oX.prototype.j=function(a){var b=this;a=b.Sa.fromDivPixelToLatLng(a);var c=this.ma(a,this.$,this.ha);c?89<Math.abs(c.lat())&&(c=new _.I(_.ie(c.lat(),-89,89),c.lng())):c=new _.I(this.i.lat(),a.lng()-this.o);b.H.get("latLngs").forEach(function(d,e){for(var f=0,g=d.getLength();f<g;++f){var h=b.W(c,b.T[e][f].distance,b.T[e][f].heading);d.setAt(f,h)}});this.i=c;this.o=a.lng()-c.lng()};pX.prototype.j=function(a){var b=this.o.get("latLngs"),c=this.Sa;a=c.fromDivPixelToLatLng(a);a=IW(c,a);var d=IW(c,this.i),e=new _.cg(d.Ca-a.Ca,d.Da-a.Da);_.B(this.H,function(f,g){var h=b.getAt(g);_.B(f,function(k,l){k=IW(c,k);h.setAt(l,JW(c,new _.cg(k.Ca-e.Ca,k.Da-e.Da)))})})};_.A(qX,_.M);qX.prototype.release=function(){this.o.release();this.Ga&&_.B(this.Ga,_.L.removeListener);this.Ga=null};var AY=new _.P(30,30),Dca=new _.O(AY.width/2,AY.height/2);_.r=qX.prototype;
_.r.Vf=function(){if(!this.get("active")){var a=this.get("panes"),b=this.get("projectionController"),c=this.get("poly");if(a!=this.T||b!=this.Sa||c!=this.i)if(this.T=a,this.Sa=b,this.i=c,this.Ga&&_.B(this.Ga,_.L.removeListener),this.Ga=null,this.T&&this.Sa&&this.i){this.Ga=[_.L.bind(this.i,"mousedown",this,this.Qm),_.L.bind(this.i,"mouseup",this,this.Rm),_.L.bind(this.i,"movestart",this,this.dm),_.L.bind(this.i,"move",this,this.em),_.L.bind(this.i,"moveend",this,this.bm)];var d=this;this.Ga.push(_.L.addListener(this.i,
"editable_changed",function(){if(d.get("storeEditable")){var e=d.i.get("editable");d.W=e;d.set("storeEditable",!1);d.i.set("editable",!1);d.set("storeEditable",!0)}}));this.bindTo("draggable",this.i)}else this.unbind("draggable"),this.set("draggable",!1)}};_.r.active_changed=qX.prototype.Vf;_.r.panes_changed=qX.prototype.Vf;_.r.poly_changed=qX.prototype.Vf;_.r.projectionController_changed=qX.prototype.Vf;
_.r.dm=function(a){!this.get("draggable")||!this.i||a.ub&&_.Km(a.ub)||(a.stop(),!this.get("dragging")&&a.latLng&&(this.set("position",this.Sa.fromLatLngToDivPixel(a.latLng)),a=_.Rn(a.latLng,this.H.getProjection()),(a=_.oz(this.j,a))&&_.pz(this.j,a),a=this.get("position"),this.set("dragging",!0),this.set("waitingForQuiver",!1),this.ha=this.$(this.i,a,this.Sa),rX(this,"dragstart"),this.W=this.i.get("editable"),this.i.set("editable",!1),this.set("storeEditable",!0)))};
_.r.em=function(a){this.get("dragging")&&a.latLng&&(a=_.Rn(a.latLng,this.H.getProjection()),(a=_.oz(this.j,a))&&_.pz(this.j,a))};_.r.bm=function(){if(this.get("dragging")){var a=this.j.getPosition();if(a){var b=_.Sn(a,this.H.getProjection());b=this.Sa.fromLatLngToDivPixel(b);this.set("position",b);this.j.setPosition(a)}this.set("storeEditable",!1);this.i.set("editable",this.W);rX(this,"dragend");this.set("dragging",!1)}};
_.r.position_changed=function(){var a=this.get("position");a?_.BF(this.o,_.IF(a,AY,Dca)):_.BF(this.o,null);this.get("dragging")&&(this.ha.j(a),rX(this,"drag"))};_.r.wj=function(){_.EF(this.o,0!=this.get("panningEnabled")&&this.get("dragging"))};_.r.dragging_changed=qX.prototype.wj;_.r.panningEnabled_changed=qX.prototype.wj;_.r.containerPixelBounds_changed=function(){_.DF(this.o,this.get("containerPixelBounds"))};_.r.Qm=function(){this.get("dragging")||this.set("waitingForQuiver",!0)};
_.r.Rm=function(){this.set("waitingForQuiver",!1)};_.A(AX,_.M);AX.prototype.projection_changed=function(){var a=this;a.W.forEach(function(b){if(b.get("icons")){var c=_.Bf(b);a.i[c]=b;zX(b)}});BX(a)};var Gba={latLngs:1,geodesic:1,icons:1},Hba={strokeColor:1,strokeOpacity:1,strokePosition:1,strokeWeight:1,fillColor:1,fillOpacity:1,hitStrokeWeight:1,zIndex:1,clickable:1,icons:1};_.A(GX,_.M);_.r=GX.prototype;_.r.panes_changed=function(){var a=this.j,b=this.get("panes");b?b.floatPane.appendChild(a):a.parentNode&&_.Tc(a)};_.r.je=function(){_.Az(this.j);this.H=null;HX(this);this.o=null};_.r.changed=GX.prototype.je;_.r.fm=function(a){a.i&&a.poly?a.poly.get("suppressUndo")?this.je():(a.j&&this.T.setPosition(a.j),Lba(this,a.action,a.poly)):a.poly==this.o&&this.je()};_.r.Uf=function(a){_.VE(this.i,EX,a)};
var Iba=_.qp("undo_poly"),EX=new _.P(30,27),Kba=new _.O(30,0),Jba=new _.O(60,0),FX=new _.O(10,-11);IX.prototype.getLength=function(){var a=this.i.getLength();1<a&&++a;return a};IX.prototype.getAt=function(a){this.i.getLength()==a&&1<a&&(a=0);return this.i.getAt(a)};_.A(JX,_.M);_.r=JX.prototype;_.r.release=function(){_.B(this.Ga,_.L.removeListener)};_.r.mn=function(){var a=this.get("projection"),b=this.o;if(a)for(var c=this.j,d=c.getLength(),e=this.get("geodesic"),f=0;f<d-1;++f)b.setAt(f,KX(c.getAt(f),c.getAt(f+1),e,a,this.i));else b.clear()};_.r.geodesic_changed=JX.prototype.projection_changed=JX.prototype.mn;_.r.Wm=function(a){LX(this,!1,a)};_.r.Qi=function(a){LX(this,!0,a)};
_.r.Sm=function(a){var b=this.get("projection");if(b){var c=this.j,d=this.o,e=this.get("geodesic");a<c.getLength()?(0<a&&d.setAt(a-1,KX(c.getAt(a-1),c.getAt(a),e,b,this.i)),d.removeAt(a)):0<a&&d.removeAt(a-1)}};_.A(MX,_.xn);_.A(NX,_.M);NX.prototype.map_changed=function(){this.get("map")||(this.H.set("map",null),RX(this))};
NX.prototype.panes_changed=NX.prototype.paths_changed=NX.prototype.suppressGhostControlPoints_changed=function(){var a=this;RX(a);var b=a.get("paths"),c=a.get("panes");if(b&&c){var d=c.overlayMouseTarget;b.forEach(function(f){a.j.push(PX(a,f,d));a.get("suppressGhostControlPoints")||a.i.push(QX(a,f,d))});var e=function(){_.L.trigger(a,"toolbar",{i:!1})};e();c=a.W;c.push(_.L.addListener(b,"insert_at",function(f){var g=a.get("suppressGhostControlPoints"),h=b.getAt(f);a.j.splice(f,0,PX(a,h,d));g||a.i.splice(f,
0,QX(a,h,d));e()}));c.push(_.L.addListener(b,"remove_at",function(f){var g=a.get("suppressGhostControlPoints");a.o(a.j[f]);a.j.splice(f,1);g||(a.o(a.i[f]),a.i.splice(f,1));e()}));c.push(_.L.addListener(b,"set_at",function(f){var g=a.get("suppressGhostControlPoints");a.o(a.j[f]);var h=b.getAt(f);a.j[f]=PX(a,h,d);g||(a.o(a.i[f]),a.i[f]=QX(a,h,d));e()}))}};NX.prototype.o=function(a){a.unbindAll();a.release();_.L.clearInstanceListeners(a);a.T&&(a.T.release(),a.T.unbindAll())};VX.prototype.getBounds=_.qa("i");WX.prototype.j=function(a,b){if("dragstart"!=a&&"drag"!=a&&"dragend"!=a)return!0;a=(a=(b.Je||b).get("map"))&&0!=a.get("draggable")&&"none"!=a.get("gestureHandling");return!!this.i||!a};var Eca=new _.O(.5,.5);
WX.prototype.o=function(a,b){var c=this.T.get();if(!c)return null;c=c.Wa.size;var d=_.QF(this.W,a.ab,Eca);if(!d)return null;var e=new _.O(d.$d.Ea*c.wa,d.$d.Fa*c.Aa),f=new _.O(d.He.Ea*c.wa,d.He.Fa*c.Aa),g=[],h=d.yb.tb;for(k in h)g.push(h[k]);g.reverse();g.sort(function(x,w){return w.zIndex-x.zIndex||0});var k=null;h=b?15:0;for(var l=0,m=g.length;l<m;++l){var q=g[l],t=q.i;if(t.clickable){var u=q.j.i,v=t.o/2+h;q=Wba(q.paths);if(v=qba(e.x,e.y,v,q)){k=u;b=this.T.get();b=_.dn(b&&b.Wa,{Ea:(v[0]+f.x)/c.wa,
Fa:(v[1]+f.y)/c.Aa,Ka:d.He.Ka});a.ab=new _.O(b.Ca,b.Da);a.latLng=this.$(a.ab);break}if(t.bc&&!b&&pba(e.x,e.y,q)){k=u;break}}}return k};
WX.prototype.handleEvent=function(a,b,c){!this.i||"mousedown"!=a&&"dragstart"!=a&&"drag"!=a||(this.Sc=!0);this.i&&!this.Sc&&(b.ab=this.i.ab,b.latLng=this.i.latLng);var d=c.Je||c;!this.i&&"mousedown"==a&&d.get("draggable")&&(this.i=b,c.set("capturing",!0));d=c;if(this.i){if(this.Sc&&"dragend"==a||!this.Sc&&"mouseup"==a)this.Sc=!1,this.i=null,c.set("capturing",!1);"dragstart"!=a&&"drag"!=a&&"dragend"!=a||!c.Je||(d=c.Je);"dragstart"==a&&(a="movestart");"drag"==a&&(a="move");"dragend"==a&&(a="moveend")}else{if("dragstart"==
a||"dragend"==a)return;"drag"==a&&(a="mousemove")}"mouseout"==a?this.H.set("cursor",""):"mousemove"==a&&(c=c.get&&c.get("cursor"),void 0===c&&(c="pointer"),this.H.set("cursor",c));_.L.trigger(d,a,new MX(b.latLng,b.ub))};WX.prototype.zIndex=30;_.Ea(YX,_.nj);YX.prototype.Pb=function(){return{Wa:this.i,Wb:2,Zb:this.H.bind(this)}};
YX.prototype.H=function(a,b){var c=this;b=void 0===b?{}:b;var d=document.createElement("div"),e=this.i.size;d.style.width=e.wa+"px";d.style.height=e.Aa+"px";var f=new _.O(a.Ea,a.Fa);e=this.get("projection");var g=new VX(f,a.Ka,e,this.i),h=g.getBounds(),k=this.T(this.o,d),l=!1,m;return{Eb:function(){return d},sc:function(){return l},loaded:new Promise(function(q){m={bounds:h,Xa:f,Oa:d,lh:k,tb:{},Ad:function(){l=!0;q()},Un:g,zoom:a.Ka};_.og(c.j,m)}),release:function(){_.No(d,"");c.j.remove(m);b.Mb&&
b.Mb()}}};cY.prototype.H=function(a,b){this.i=this.i||aca(this.j,a,this.o);return new Zba(this.j,b,this.o,this.i,a)};var iY=new SW(1),hY=new SW(0),jY=new SW(0);var nca={value:100,i:"%"},oca={value:0,i:"px"};_.A(mY,_.M);_.A(nY,_.M);var oY=[12,6,9,3],pY=[1,2,4,8],vca=["ne-resize","nw-resize","se-resize","sw-resize"],xca=["row-resize","col-resize"],wca=[0],yca=[2,1];_.r=nY.prototype;_.r.map_changed=function(){this.get("map")||(this.W.set("map",null),rY(this.T),this.get("suppressGhostControlPoints")||rY(this.o),_.L.clearInstanceListeners(this.i))};
_.r.panes_changed=nY.prototype.suppressGhostControlPoints_changed=function(){rY(this.T);rY(this.o);this.o=null;var a=this.get("panes");a&&(this.T=qY(this,a,!0),this.get("suppressGhostControlPoints")||(this.o=qY(this,a,!1)))};
_.r.bounds_changed=function(){var a=this.i,b=this.H,c=this.get("bounds");if(c){this.j=!0;a.setAt(0,c.getNorthEast());a.setAt(1,_.Nm(c));a.setAt(2,_.Mm(c));a.setAt(3,c.getSouthWest());a=c.Za.center();var d=c.Va.center();b.setAt(0,new _.I(c.Za.i,d));b.setAt(1,new _.I(a,c.Va.i));b.setAt(2,new _.I(c.Za.j,d));b.setAt(3,new _.I(a,c.Va.j));this.j=!1;_.L.trigger(this,"toolbar",{i:!1})}else a.clear(),b.clear()};_.r.jo=function(a){sY(this,oY[a],this.i.getAt(a))};_.r.ko=function(a){sY(this,pY[a],this.H.getAt(a))};uY.prototype.j=function(a){var b=this.Sa;a=b.fromDivPixelToLatLng(a);b=IW(b,a);a=new _.cg(this.o.Ca-this.i.Ca+b.Ca,this.o.Da-this.i.Da+b.Da);b=new _.xf(JW(this.Sa,new _.cg(this.H.Ca-this.i.Ca+b.Ca,this.H.Da-this.i.Da+b.Da)),JW(this.Sa,a));this.T.set("bounds",b)};_.A(vY,_.M);vY.prototype.bounds_changed=function(){var a=this.i;if(a){var b=this.get("bounds");if(b){var c=b.getSouthWest(),d=b.getNorthEast();b=b.getCenter();a.setPaths([new _.I(d.lat(),d.lng()),new _.I(d.lat(),b.lng()),new _.I(d.lat(),c.lng()),new _.I(c.lat(),c.lng()),new _.I(c.lat(),b.lng()),new _.I(c.lat(),d.lng())])}else a.setPaths([])}};vY.prototype.release=function(){for(var a=this.j,b=0,c=a.length;b<c;++b)_.L.removeListener(a[b]);delete this.j;this.i.unbindAll();delete this.i};xY.prototype.i=function(a){var b=0!=a.getVisible()?a.getMap():null;a.o!=b&&(a.o&&a.o.__gm.W.remove(a),b&&(b.__gm.W.i||new Eba(b),_.og(b.__gm.W,a)),a.o=b)};xY.prototype.j=function(a){var b=0!=a.getVisible()?a.getMap():null;a.o!=b&&(a.o&&a.o.__gm.H.remove(a),b&&(b.__gm.H.i||new tca(b),_.og(b.__gm.H,a)),a.o=b)};xY.prototype.o=function(a){var b=0!=a.getVisible()?a.getMap():null;a.j!=b&&(a.j&&a.j.__gm.$.remove(a),b&&(b.__gm.$.i||new Cca(b),_.og(b.__gm.$,a)),a.j=b)};_.ef("poly",new xY);});
