-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
28 lines (26 loc) · 675 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>leaflet</title>
<script src="data:application/javascript;base64,KGZ1bmN0aW9uKCkgewogIC8vIElmIHdpbmRvdy5IVE1MV2lkZ2V0cyBpcyBhbHJlYWR5IGRlZmluZWQsIHRoZW4gdXNlIGl0OyBvdGhlcndpc2UgY3JlYXRlIGEKICAvLyBuZXcgb2JqZWN0LiBUaGlzIGFsbG93cyBwcmVjZWRpbmcgY29kZSB0byBzZXQgb3B0aW9ucyB0aGF0IGFmZmVjdCB0aGUKICAvLyBpbml0aWFsaXphdGlvbiBwcm9jZXNzICh0aG91Z2ggbm9uZSBjdXJyZW50bHkgZXhpc3QpLgogIHdpbmRvdy5IVE1MV2lkZ2V0cyA9IHdpbmRvdy5IVE1MV2lkZ2V0cyB8fCB7fTsKCiAgLy8gU2VlIGlmIHdlJ3JlIHJ1bm5pbmcgaW4gYSB2aWV3ZXIgcGFuZS4gSWYgbm90LCB3ZSdyZSBpbiBhIHdlYiBicm93c2VyLgogIHZhciB2aWV3ZXJNb2RlID0gd2luZG93LkhUTUxXaWRnZXRzLnZpZXdlck1vZGUgPQogICAgICAvXGJ2aWV3ZXJfcGFuZT0xXGIvLnRlc3Qod2luZG93LmxvY2F0aW9uKTsKCiAgLy8gU2VlIGlmIHdlJ3JlIHJ1bm5pbmcgaW4gU2hpbnkgbW9kZS4gSWYgbm90LCBpdCdzIGEgc3RhdGljIGRvY3VtZW50LgogIC8vIE5vdGUgdGhhdCBzdGF0aWMgd2lkZ2V0cyBjYW4gYXBwZWFyIGluIGJvdGggU2hpbnkgYW5kIHN0YXRpYyBtb2RlcywgYnV0CiAgLy8gb2J2aW91c2x5LCBTaGlueSB3aWRnZXRzIGNhbiBvbmx5IGFwcGVhciBpbiBTaGlueSBh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Igd2F5IHRvIGtlZXAgdGhlIHNpemUvcG9zaXRpb24gb2YgdGhlIGVycm9yIGluIHN5bmMgd2l0aAogICAgICAgICAgLy8gdGhlIHBhcmVudCBlbGVtZW50IGFzIHRoZSB3aW5kb3cgaXMgcmVzaXplZCBvciB3aGF0ZXZlci4KICAgICAgICAgIHZhciBpbnRJZCA9IHNldEludGVydmFsKGZ1bmN0aW9uKCkgewogICAgICAgICAgICBpZiAoIWVycm9yRGl2WzBdLnBhcmVudEVsZW1lbnQpIHsKICAgICAgICAgICAgICBjbGVhckludGVydmFsKGludElkKTsKICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXJyb3JEaXYKICAgICAgICAgICAgICAuY3NzKCJ0b3AiLCBlbC5vZmZzZXRUb3ApCiAgICAgICAgICAgICAgLmNzcygibGVmdCIsIGVsLm9mZnNldExlZnQpCiAgICAgICAgICAgICAgLmNzcygibWF4V2lkdGgiLCBlbC5vZmZzZXRXaWR0aCkKICAgICAgICAgICAgICAuY3NzKCJoZWlnaHQiLCBlbC5vZmZzZXRIZWlnaHQpOwogICAgICAgICAgfSwgNTAwKTsKICAgICAgICB9CiAgICAgIH0KICAgIH0sCiAgICBjbGVhckVycm9yOiBmdW5jdGlvbihlbCkgewogICAgICB2YXIgJGVsID0gJChlbCk7CiAgICAgIHZhciBkaXNwbGF5ID0gJGVsLmRhdGEoInJlc3RvcmUtZGlzcGxheS1tb2RlIik7CiAgICAgICRlbC5kYXRhKCJyZXN0b3JlLWRpc3BsYXktbW9kZSIsIG51bGwpOwoKICAgICAgaWYgKGRpc3BsYXkgPT09ICJpbmxpbmUiIHx8IGRpc3BsYXkgPT09ICJpbmxpbmUtYmxvY2siKSB7CiAgICAgICAgaWYgKGRpc3BsYXkpCiAgICAgICAgICAkZWwuY3NzKCJkaXNwbGF5IiwgZGlzcGxheSk7CiAgICAgICAgJChlbC5uZXh0U2libGluZykuZmlsdGVyKCIuaHRtbHdpZGdldHMtZ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T25OdWxsVmFsdWUpIHsKICAgICAgICAgIGlmIChkYXRhLnggPT09IG51bGwpIHsKICAgICAgICAgICAgZWwuc3R5bGUudmlzaWJpbGl0eSA9ICJoaWRkZW4iOwogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBlbC5zdHlsZS52aXNpYmlsaXR5ID0gImluaGVyaXQiOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoIWVsZW1lbnREYXRhKGVsLCAiaW5pdGlhbGl6ZWQiKSkgewogICAgICAgICAgaW5pdFNpemluZyhlbCk7CgogICAgICAgICAgZWxlbWVudERhdGEoZWwsICJpbml0aWFsaXplZCIsIHRydWUpOwogICAgICAgICAgaWYgKGJpbmRpbmdEZWYuaW5pdGlhbGl6ZSkgewogICAgICAgICAgICB2YXIgcmVzdWx0ID0gYmluZGluZ0RlZi5pbml0aWFsaXplKGVsLCBlbC5vZmZzZXRXaWR0aCwKICAgICAgICAgICAgICBlbC5vZmZzZXRIZWlnaHQpOwogICAgICAgICAgICBlbGVtZW50RGF0YShlbCwgImluaXRfcmVzdWx0IiwgcmVzdWx0KTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgYmluZGluZ0RlZi5yZW5kZXJWYWx1ZShlbCwgZGF0YS54LCBlbGVtZW50RGF0YShlbCwgImluaXRfcmVzdWx0IikpOwogICAgICAgIGV2YWxBbmRSdW4oZGF0YS5qc0hvb2tzLnJlbmRlciwgZWxlbWVudERhdGEoZWwsICJpbml0X3Jlc3VsdCIpLCBbZWwsIGRhdGEueF0pOwogICAgICB9OwoKICAgICAgLy8gT25seSBvdmVycmlkZSByZXNpemUgaWYgYmluZGluZ0RlZiBpbXBsZW1lbnRzIGl0CiAgICAgIGlmIChiaW5kaW5nRGVmLnJlc2l6ZSkgewogICAgICAgIHNoaW55QmluZGluZy5yZXNpemUgPSBmdW5jdGlvbihlbCwgd2lkdGgsIGhlaWdodCkgewogICAgICAgICAgLy8gU2h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EhlaWdodCgpIDogZWwub2Zmc2V0SGVpZ2h0CiAgICAgICAgICB9OwogICAgICAgICAgdmFyIHJlc2l6ZUhhbmRsZXIgPSBmdW5jdGlvbihlKSB7CiAgICAgICAgICAgIHZhciBzaXplID0gewogICAgICAgICAgICAgIHc6IHNpemVPYmogPyBzaXplT2JqLmdldFdpZHRoKCkgOiBlbC5vZmZzZXRXaWR0aCwKICAgICAgICAgICAgICBoOiBzaXplT2JqID8gc2l6ZU9iai5nZXRIZWlnaHQoKSA6IGVsLm9mZnNldEhlaWdodAogICAgICAgICAgICB9OwogICAgICAgICAgICBpZiAoc2l6ZS53ID09PSAwICYmIHNpemUuaCA9PT0gMCkKICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGlmIChzaXplLncgPT09IGxhc3RTaXplLncgJiYgc2l6ZS5oID09PSBsYXN0U2l6ZS5oKQogICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgbGFzdFNpemUgPSBzaXplOwogICAgICAgICAgICBiaW5kaW5nLnJlc2l6ZShlbCwgc2l6ZS53LCBzaXplLmgsIGluaXRSZXN1bHQpOwogICAgICAgICAgfTsKCiAgICAgICAgICBvbih3aW5kb3csICJyZXNpemUiLCByZXNpemVIYW5kbGVyKTsKCiAgICAgICAgICAvLyBUaGlzIGlzIG5lZWRlZCBmb3IgY2FzZXMgd2hlcmUgd2UncmUgcnVubmluZyBpbiBhIFNoaW55CiAgICAgICAgICAvLyBhcHAsIGJ1dCB0aGUgd2lkZ2V0IGl0c2VsZiBpcyBub3QgYSBTaGlueSBvdXRwdXQsIGJ1dAogICAgICAgICAgLy8gcmF0aGVyIGEgc2ltcGxlIHN0YXRpYyB3aWRnZXQuIE9uZSBleGFtcGxlIG9mIHRoaXMgaXMKICAgICAgICAgIC8vIGFuIHJtYXJrZG93biBkb2N1bWVudCB0aGF0IGhhcyBydW50aW1lOnNoaW55IGFuZCB3aWRnZXQKICAgICAgICAgIC8vIHRoYXQgaXNuJ3QgaW4gYSByZW5kZXIgZnVuY3Rpb24uIFNoaW55IG9ubHkga25vd3MgdG8KICAgICAgICAgIC8vIGNhbGwgcmVzaXplIGhhbmRsZXJzIGZvciBTaGlueSBvdXRwdXRzLCBub3QgZm9yIHN0YXRpYwogICAgICAgICAgLy8gd2lkZ2V0cywgc28gd2UgZG8gaXQgb3Vyc2VsdmVzLgogICAgICAgICAgaWYgKHdpbmRvdy5qUXVlcnkpIHsKICAgICAgICAgICAgd2luZG93LmpRdWVyeShkb2N1bWVudCkub24oCiAgICAgICAgICAgICAgInNob3duLmh0bWx3aWRnZXRzIHNob3duLmJzLnRhYi5odG1sd2lkZ2V0cyBzaG93bi5icy5jb2xsYXBzZS5odG1sd2lkZ2V0cyIsCiAgICAgICAgICAgICAgcmVzaXplSGFuZGxlcgogICAgICAgICAgICApOwogICAgICAgICAgICB3aW5kb3cualF1ZXJ5KGRvY3VtZW50KS5vbigKICAgICAgICAgICAgICAiaGlkZGVuLmh0bWx3aWRnZXRzIGhpZGRlbi5icy50YWIuaHRtbHdpZGdldHMgaGlkZGVuLmJzLmNvbGxhcHNlLmh0bWx3aWRnZXRzIiwKICAgICAgICAgICAgICByZXNpemVIYW5kbGVyCiAgICAgICAgICAgICk7CiAgICAgICAgICB9CgogICAgICAgICAgLy8gVGhpcyBpcyBuZWVkZWQgZm9yIHRoZSBzcGVjaWZpYyBjYXNlIG9mIGlvc2xpZGVzLCB3aGljaAogICAgICAgICAgLy8gZmxpcHMgc2xpZGVzIGJldHdlZW4gZGlzcGxheTpub25lIGFuZCBkaXNwbGF5OmJsb2NrLgogICAgICAgICAgLy8gSWRlYWxseSB3ZSB3b3VsZCBub3QgaGF2ZSB0byBoYXZlIGlvc2xpZGUtc3BlY2lmaWMgY29kZQogICAgICAgICAgLy8gaGVyZSwgYnV0IHJhdGhlciBoYXZlIGlvc2xpZGVzIHJhaXNlIGEgZ2VuZXJpYyBldmVudCwKICAgICAgICAgIC8vIGJ1dCB0aGUgcm1hcmtkb3duIHBhY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ZSh4KTsKICAgICAgfSwKICAgICAgcmVzaXplOiBmdW5jdGlvbihlbCwgd2lkdGgsIGhlaWdodCwgaW5zdGFuY2UpIHsKICAgICAgICByZXR1cm4gaW5zdGFuY2UucmVzaXplKHdpZHRoLCBoZWlnaHQpOwogICAgICB9CiAgICB9OwoKICAgIGlmIChkZWZuLmZpbmQpCiAgICAgIHJlc3VsdC5maW5kID0gZGVmbi5maW5kOwogICAgaWYgKGRlZm4ucmVuZGVyRXJyb3IpCiAgICAgIHJlc3VsdC5yZW5kZXJFcnJvciA9IGRlZm4ucmVuZGVyRXJyb3I7CiAgICBpZiAoZGVmbi5jbGVhckVycm9yKQogICAgICByZXN1bHQuY2xlYXJFcnJvciA9IGRlZm4uY2xlYXJFcnJvcjsKCiAgICByZXR1cm4gcmVzdWx0OwogIH0KfSkoKTsKCg=="></script>
<script src="data:application/javascript;base64,LyohIGpRdWVyeSB2MS4xMi40IHwgKGMpIGpRdWVyeSBGb3VuZGF0aW9uIHwganF1ZXJ5Lm9yZy9saWNlbnNlICovCiFmdW5jdGlvbihhLGIpeyJvYmplY3QiPT10eXBlb2YgbW9kdWxlJiYib2JqZWN0Ij09dHlwZW9mIG1vZHVsZS5leHBvcnRzP21vZHVsZS5leHBvcnRzPWEuZG9jdW1lbnQ/YihhLCEwKTpmdW5jdGlvbihhKXtpZighYS5kb2N1bWVudCl0aHJvdyBuZXcgRXJyb3IoImpRdWVyeSByZXF1aXJlcyBhIHdpbmRvdyB3aXRoIGEgZG9jdW1lbnQiKTtyZXR1cm4gYihhKX06YihhKX0oInVuZGVmaW5lZCIhPXR5cGVvZiB3aW5kb3c/d2luZG93OnRoaXMsZnVuY3Rpb24oYSxiKXt2YXIgYz1bXSxkPWEuZG9jdW1lbnQsZT1jLnNsaWNlLGY9Yy5jb25jYXQsZz1jLnB1c2gsaD1jLmluZGV4T2YsaT17fSxqPWkudG9TdHJpbmcsaz1pLmhhc093blByb3BlcnR5LGw9e30sbT0iMS4xMi40IixuPWZ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Dpane%20%3E%20svg%2C%2Eleaflet%2Dpane%20%3E%20canvas%2C%2Eleaflet%2Dzoom%2Dbox%2C%2Eleaflet%2Dimage%2Dlayer%2C%2Eleaflet%2Dlayer%20%7Bposition%3A%20absolute%3Bleft%3A%200%3Btop%3A%200%3B%7D%2Eleaflet%2Dcontainer%20%7Boverflow%3A%20hidden%3B%7D%2Eleaflet%2Dtile%2C%2Eleaflet%2Dmarker%2Dicon%2C%2Eleaflet%2Dmarker%2Dshadow%20%7B%2Dwebkit%2Duser%2Dselect%3A%20none%3B%2Dmoz%2Duser%2Dselect%3A%20none%3Buser%2Dselect%3A%20none%3B%2Dwebkit%2Duser%2Ddrag%3A%20none%3B%7D%2Eleaflet%2Dsafari%20%2Eleaflet%2Dtile%20%7Bimage%2Drendering%3A%20%2Dwebkit%2Doptimize%2Dcontrast%3B%7D%2Eleaflet%2Dsafari%20%2Eleaflet%2Dtile%2Dcontainer%20%7Bwidth%3A%201600px%3Bheight%3A%201600px%3B%2Dwebkit%2Dtransform%2Dorigin%3A%200%200%3B%7D%2Eleaflet%2Dmarker%2Dicon%2C%2Eleaflet%2Dmarker%2Dshadow%20%7Bdisplay%3A%20block%3B%7D%2Eleaflet%2Dcontainer%20%2Eleaflet%2Doverlay%2Dpane%20svg%2C%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dmarker%2Dpane%20img%2C%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dshadow%2Dpane%20img%2C%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dtile%2Dpane%20img%2C%2Eleaflet%2Dcontainer%20img%2Eleaflet%2Dimage%2Dlayer%20%7Bmax%2Dwidth%3A%20none%20%21important%3Bmax%2Dheight%3A%20none%20%21important%3B%7D%2Eleaflet%2Dcontainer%2Eleaflet%2Dtouch%2Dzoom%20%7B%2Dms%2Dtouch%2Daction%3A%20pan%2Dx%20pan%2Dy%3Btouch%2Daction%3A%20pan%2Dx%20pan%2Dy%3B%7D%2Eleaflet%2Dcontainer%2Eleaflet%2Dtouch%2Ddrag%20%7B%2Dms%2Dtouch%2Daction%3A%20pinch%2Dzoom%3Btouch%2Daction%3A%20none%3Btouch%2Daction%3A%20pinch%2Dzoom%3B%7D%2Eleaflet%2Dcontainer%2Eleaflet%2Dtouch%2Ddrag%2Eleaflet%2Dtouch%2Dzoom%20%7B%2Dms%2Dtouch%2Daction%3A%20none%3Btouch%2Daction%3A%20none%3B%7D%2Eleaflet%2Dcontainer%20%7B%2Dwebkit%2Dtap%2Dhighlight%2Dcolor%3A%20transparent%3B%7D%2Eleaflet%2Dcontainer%20a%20%7B%2Dwebkit%2Dtap%2Dhighlight%2Dcolor%3A%20rgba%2851%2C%20181%2C%20229%2C%200%2E4%29%3B%7D%2Eleaflet%2Dtile%20%7Bfilter%3A%20inherit%3Bvisibility%3A%20hidden%3B%7D%2Eleaflet%2Dtile%2Dloaded%20%7Bvisibility%3A%20inherit%3B%7D%2Eleaflet%2Dzoom%2Dbox%20%7Bwidth%3A%200%3Bheight%3A%200%3B%2Dmoz%2Dbox%2Dsizing%3A%20border%2Dbox%3Bbox%2Dsizing%3A%20border%2Dbox%3Bz%2Dindex%3A%20800%3B%7D%2Eleaflet%2Doverlay%2Dpane%20svg%20%7B%2Dmoz%2Duser%2Dselect%3A%20none%3B%7D%2Eleaflet%2Dpane%20%7B%20z%2Dindex%3A%20400%3B%20%7D%2Eleaflet%2Dtile%2Dpane%20%7B%20z%2Dindex%3A%20200%3B%20%7D%2Eleaflet%2Doverlay%2Dpane%20%7B%20z%2Dindex%3A%20400%3B%20%7D%2Eleaflet%2Dshadow%2Dpane%20%7B%20z%2Dindex%3A%20500%3B%20%7D%2Eleaflet%2Dmarker%2Dpane%20%7B%20z%2Dindex%3A%20600%3B%20%7D%2Eleaflet%2Dtooltip%2Dpane%20%7B%20z%2Dindex%3A%20650%3B%20%7D%2Eleaflet%2Dpopup%2Dpane%20%7B%20z%2Dindex%3A%20700%3B%20%7D%2Eleaflet%2Dmap%2Dpane%20canvas%20%7B%20z%2Dindex%3A%20100%3B%20%7D%2Eleaflet%2Dmap%2Dpane%20svg%20%7B%20z%2Dindex%3A%20200%3B%20%7D%2Eleaflet%2Dvml%2Dshape%20%7Bwidth%3A%201px%3Bheight%3A%201px%3B%7D%2Elvml%20%7Bbehavior%3A%20url%28%23default%23VML%29%3Bdisplay%3A%20inline%2Dblock%3Bposition%3A%20absolute%3B%7D%2Eleaflet%2Dcontrol%20%7Bposition%3A%20relative%3Bz%2Dindex%3A%20800%3Bpointer%2Devents%3A%20visiblePainted%3B%20pointer%2Devents%3A%20auto%3B%7D%2Eleaflet%2Dtop%2C%2Eleaflet%2Dbottom%20%7Bposition%3A%20absolute%3Bz%2Dindex%3A%201000%3Bpointer%2Devents%3A%20none%3B%7D%2Eleaflet%2Dtop%20%7Btop%3A%200%3B%7D%2Eleaflet%2Dright%20%7Bright%3A%200%3B%7D%2Eleaflet%2Dbottom%20%7Bbottom%3A%200%3B%7D%2Eleaflet%2Dleft%20%7Bleft%3A%200%3B%7D%2Eleaflet%2Dcontrol%20%7Bfloat%3A%20left%3Bclear%3A%20both%3B%7D%2Eleaflet%2Dright%20%2Eleaflet%2Dcontrol%20%7Bfloat%3A%20right%3B%7D%2Eleaflet%2Dtop%20%2Eleaflet%2Dcontrol%20%7Bmargin%2Dtop%3A%2010px%3B%7D%2Eleaflet%2Dbottom%20%2Eleaflet%2Dcontrol%20%7Bmargin%2Dbottom%3A%2010px%3B%7D%2Eleaflet%2Dleft%20%2Eleaflet%2Dcontrol%20%7Bmargin%2Dleft%3A%2010px%3B%7D%2Eleaflet%2Dright%20%2Eleaflet%2Dcontrol%20%7Bmargin%2Dright%3A%2010px%3B%7D%2Eleaflet%2Dfade%2Danim%20%2Eleaflet%2Dtile%20%7Bwill%2Dchange%3A%20opacity%3B%7D%2Eleaflet%2Dfade%2Danim%20%2Eleaflet%2Dpopup%20%7Bopacity%3A%200%3B%2Dwebkit%2Dtransition%3A%20opacity%200%2E2s%20linear%3B%2Dmoz%2Dtransition%3A%20opacity%200%2E2s%20linear%3B%2Do%2Dtransition%3A%20opacity%200%2E2s%20linear%3Btransition%3A%20opacity%200%2E2s%20linear%3B%7D%2Eleaflet%2Dfade%2Danim%20%2Eleaflet%2Dmap%2Dpane%20%2Eleaflet%2Dpopup%20%7Bopacity%3A%201%3B%7D%2Eleaflet%2Dzoom%2Danimated%20%7B%2Dwebkit%2Dtransform%2Dorigin%3A%200%200%3B%2Dms%2Dtransform%2Dorigin%3A%200%200%3Btransform%2Dorigin%3A%200%200%3B%7D%2Eleaflet%2Dzoom%2Danim%20%2Eleaflet%2Dzoom%2Danimated%20%7Bwill%2Dchange%3A%20transform%3B%7D%2Eleaflet%2Dzoom%2Danim%20%2Eleaflet%2Dzoom%2Danimated%20%7B%2Dwebkit%2Dtransition%3A%20%2Dwebkit%2Dtransform%200%2E25s%20cubic%2Dbezier%280%2C0%2C0%2E25%2C1%29%3B%2Dmoz%2Dtransition%3A%20%2Dmoz%2Dtransform%200%2E25s%20cubic%2Dbezier%280%2C0%2C0%2E25%2C1%29%3B%2Do%2Dtransition%3A%20%2Do%2Dtransform%200%2E25s%20cubic%2Dbezier%280%2C0%2C0%2E25%2C1%29%3Btransition%3A%20transform%200%2E25s%20cubic%2Dbezier%280%2C0%2C0%2E25%2C1%29%3B%7D%2Eleaflet%2Dzoom%2Danim%20%2Eleaflet%2Dtile%2C%2Eleaflet%2Dpan%2Danim%20%2Eleaflet%2Dtile%20%7B%2Dwebkit%2Dtransition%3A%20none%3B%2Dmoz%2Dtransition%3A%20none%3B%2Do%2Dtransition%3A%20none%3Btransition%3A%20none%3B%7D%2Eleaflet%2Dzoom%2Danim%20%2Eleaflet%2Dzoom%2Dhide%20%7Bvisibility%3A%20hidden%3B%7D%2Eleaflet%2Dinteractive%20%7Bcursor%3A%20pointer%3B%7D%2Eleaflet%2Dgrab%20%7Bcursor%3A%20%2Dwebkit%2Dgrab%3Bcursor%3A%20%2Dmoz%2Dgrab%3B%7D%2Eleaflet%2Dcrosshair%2C%2Eleaflet%2Dcrosshair%20%2Eleaflet%2Dinteractive%20%7Bcursor%3A%20crosshair%3B%7D%2Eleaflet%2Dpopup%2Dpane%2C%2Eleaflet%2Dcontrol%20%7Bcursor%3A%20auto%3B%7D%2Eleaflet%2Ddragging%20%2Eleaflet%2Dgrab%2C%2Eleaflet%2Ddragging%20%2Eleaflet%2Dgrab%20%2Eleaflet%2Dinteractive%2C%2Eleaflet%2Ddragging%20%2Eleaflet%2Dmarker%2Ddraggable%20%7Bcursor%3A%20move%3Bcursor%3A%20%2Dwebkit%2Dgrabbing%3Bcursor%3A%20%2Dmoz%2Dgrabbing%3B%7D%2Eleaflet%2Dmarker%2Dicon%2C%2Eleaflet%2Dmarker%2Dshadow%2C%2Eleaflet%2Dimage%2Dlayer%2C%2Eleaflet%2Dpane%20%3E%20svg%20path%2C%2Eleaflet%2Dtile%2Dcontainer%20%7Bpointer%2Devents%3A%20none%3B%7D%2Eleaflet%2Dmarker%2Dicon%2Eleaflet%2Dinteractive%2C%2Eleaflet%2Dimage%2Dlayer%2Eleaflet%2Dinteractive%2C%2Eleaflet%2Dpane%20%3E%20svg%20path%2Eleaflet%2Dinteractive%20%7Bpointer%2Devents%3A%20visiblePainted%3B%20pointer%2Devents%3A%20auto%3B%7D%2Eleaflet%2Dcontainer%20%7Bbackground%3A%20%23ddd%3Boutline%3A%200%3B%7D%2Eleaflet%2Dcontainer%20a%20%7Bcolor%3A%20%230078A8%3B%7D%2Eleaflet%2Dcontainer%20a%2Eleaflet%2Dactive%20%7Boutline%3A%202px%20solid%20orange%3B%7D%2Eleaflet%2Dzoom%2Dbox%20%7Bborder%3A%202px%20dotted%20%2338f%3Bbackground%3A%20rgba%28255%2C255%2C255%2C0%2E5%29%3B%7D%2Eleaflet%2Dcontainer%20%7Bfont%3A%2012px%2F1%2E5%20%22Helvetica%20Neue%22%2C%20Arial%2C%20Helvetica%2C%20sans%2Dserif%3B%7D%2Eleaflet%2Dbar%20%7Bbox%2Dshadow%3A%200%201px%205px%20rgba%280%2C0%2C0%2C0%2E65%29%3Bborder%2Dradius%3A%204px%3B%7D%2Eleaflet%2Dbar%20a%2C%2Eleaflet%2Dbar%20a%3Ahover%20%7Bbackground%2Dcolor%3A%20%23fff%3Bborder%2Dbottom%3A%201px%20solid%20%23ccc%3Bwidth%3A%2026px%3Bheight%3A%2026px%3Bline%2Dheight%3A%2026px%3Bdisplay%3A%20block%3Btext%2Dalign%3A%20center%3Btext%2Ddecoration%3A%20none%3Bcolor%3A%20black%3B%7D%2Eleaflet%2Dbar%20a%2C%2Eleaflet%2Dcontrol%2Dlayers%2Dtoggle%20%7Bbackground%2Dposition%3A%2050%25%2050%25%3Bbackground%2Drepeat%3A%20no%2Drepeat%3Bdisplay%3A%20block%3B%7D%2Eleaflet%2Dbar%20a%3Ahover%20%7Bbackground%2Dcolor%3A%20%23f4f4f4%3B%7D%2Eleaflet%2Dbar%20a%3Afirst%2Dchild%20%7Bborder%2Dtop%2Dleft%2Dradius%3A%204px%3Bborder%2Dtop%2Dright%2Dradius%3A%204px%3B%7D%2Eleaflet%2Dbar%20a%3Alast%2Dchild%20%7Bborder%2Dbottom%2Dleft%2Dradius%3A%204px%3Bborder%2Dbottom%2Dright%2Dradius%3A%204px%3Bborder%2Dbottom%3A%20none%3B%7D%2Eleaflet%2Dbar%20a%2Eleaflet%2Ddisabled%20%7Bcursor%3A%20default%3Bbackground%2Dcolor%3A%20%23f4f4f4%3Bcolor%3A%20%23bbb%3B%7D%2Eleaflet%2Dtouch%20%2Eleaflet%2Dbar%20a%20%7Bwidth%3A%2030px%3Bheight%3A%2030px%3Bline%2Dheight%3A%2030px%3B%7D%2Eleaflet%2Dtouch%20%2Eleaflet%2Dbar%20a%3Afirst%2Dchild%20%7Bborder%2Dtop%2Dleft%2Dradius%3A%202px%3Bborder%2Dtop%2Dright%2Dradius%3A%202px%3B%7D%2Eleaflet%2Dtouch%20%2Eleaflet%2Dbar%20a%3Alast%2Dchild%20%7Bborder%2Dbottom%2Dleft%2Dradius%3A%202px%3Bborder%2Dbottom%2Dright%2Dradius%3A%202px%3B%7D%2Eleaflet%2Dcontrol%2Dzoom%2Din%2C%2Eleaflet%2Dcontrol%2Dzoom%2Dout%20%7Bfont%3A%20bold%2018px%20%27Lucida%20Console%27%2C%20Monaco%2C%20monospace%3Btext%2Dindent%3A%201px%3B%7D%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dzoom%2Din%2C%20%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dzoom%2Dout%20%7Bfont%2Dsize%3A%2022px%3B%7D%2Eleaflet%2Dcontrol%2Dlayers%20%7Bbox%2Dshadow%3A%200%201px%205px%20rgba%280%2C0%2C0%2C0%2E4%29%3Bbackground%3A%20%23fff%3Bborder%2Dradius%3A%205px%3B%7D%2Eleaflet%2Dcontrol%2Dlayers%2Dtoggle%20%7Bbackground%2Dimage%3A%20url%28data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc%2BqTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6%2Fee%2FXeCQ4D3ykPtL5tHno4n0d%2Fh3%2BxfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi%2FIOB0v7rVC7q45Q3Gr5K6jt%2B3Gl5nCoDD4MtO%2Bj96Wu8atmhGqcNGHObuf8OM%2Fx3AMx38%2B4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp%2BPfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a%2FPG2yutpS%2FVol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6%2FJ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ILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo%2FUEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc%2F0PstHHcfEdQ%2BUAAAAASUVORK5CYII%3D%29%3Bbackground%2Dsize%3A%2026px%2026px%3B%7D%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dlayers%2Dtoggle%20%7Bwidth%3A%2044px%3Bheight%3A%2044px%3B%7D%2Eleaflet%2Dcontrol%2Dlayers%20%2Eleaflet%2Dcontrol%2Dlayers%2Dlist%2C%2Eleaflet%2Dcontrol%2Dlayers%2Dexpanded%20%2Eleaflet%2Dcontrol%2Dlayers%2Dtoggle%20%7Bdisplay%3A%20none%3B%7D%2Eleaflet%2Dcontrol%2Dlayers%2Dexpanded%20%2Eleaflet%2Dcontrol%2Dlayers%2Dlist%20%7Bdisplay%3A%20block%3Bposition%3A%20relative%3B%7D%2Eleaflet%2Dcontrol%2Dlayers%2Dexpanded%20%7Bpadding%3A%206px%2010px%206px%206px%3Bcolor%3A%20%23333%3Bbackground%3A%20%23fff%3B%7D%2Eleaflet%2Dcontrol%2Dlayers%2Dscrollbar%20%7Boverflow%2Dy%3A%20scroll%3Boverflow%2Dx%3A%20hidden%3Bpadding%2Dright%3A%205px%3B%7D%2Eleaflet%2Dcontrol%2Dlayers%2Dselector%20%7Bmargin%2Dtop%3A%202px%3Bposition%3A%20relative%3Btop%3A%201px%3B%7D%2Eleaflet%2Dcontrol%2Dlayers%20label%20%7Bdisplay%3A%20block%3B%7D%2Eleaflet%2Dcontrol%2Dlayers%2Dseparator%20%7Bheight%3A%200%3Bborder%2Dtop%3A%201px%20solid%20%23ddd%3Bmargin%3A%205px%20%2D10px%205px%20%2D6px%3B%7D%2Eleaflet%2Ddefault%2Dicon%2Dpath%20%7Bbackground%2Dimage%3A%20url%28data%3Aimage%2Fpng%3Bbase64%2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A%20rgba%28255%2C%20255%2C%20255%2C%200%2E7%29%3Bmargin%3A%200%3B%7D%2Eleaflet%2Dcontrol%2Dattribution%2C%2Eleaflet%2Dcontrol%2Dscale%2Dline%20%7Bpadding%3A%200%205px%3Bcolor%3A%20%23333%3B%7D%2Eleaflet%2Dcontrol%2Dattribution%20a%20%7Btext%2Ddecoration%3A%20none%3B%7D%2Eleaflet%2Dcontrol%2Dattribution%20a%3Ahover%20%7Btext%2Ddecoration%3A%20underline%3B%7D%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dcontrol%2Dattribution%2C%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dcontrol%2Dscale%20%7Bfont%2Dsize%3A%2011px%3B%7D%2Eleaflet%2Dleft%20%2Eleaflet%2Dcontrol%2Dscale%20%7Bmargin%2Dleft%3A%205px%3B%7D%2Eleaflet%2Dbottom%20%2Eleaflet%2Dcontrol%2Dscale%20%7Bmargin%2Dbottom%3A%205px%3B%7D%2Eleaflet%2Dcontrol%2Dscale%2Dline%20%7Bborder%3A%202px%20solid%20%23777%3Bborder%2Dtop%3A%20none%3Bline%2Dheight%3A%201%2E1%3Bpadding%3A%202px%205px%201px%3Bfont%2Dsize%3A%2011px%3Bwhite%2Dspace%3A%20nowrap%3Boverflow%3A%20hidden%3B%2Dmoz%2Dbox%2Dsizing%3A%20border%2Dbox%3Bbox%2Dsizing%3A%20border%2Dbox%3Bbackground%3A%20%23fff%3Bbackground%3A%20rgba%28255%2C%20255%2C%20255%2C%200%2E5%29%3B%7D%2Eleaflet%2Dcontrol%2Dscale%2Dline%3Anot%28%3Afirst%2Dchild%29%20%7Bborder%2Dtop%3A%202px%20solid%20%23777%3Bborder%2Dbottom%3A%20none%3Bmargin%2Dtop%3A%20%2D2px%3B%7D%2Eleaflet%2Dcontrol%2Dscale%2Dline%3Anot%28%3Afirst%2Dchild%29%3Anot%28%3Alast%2Dchild%29%20%7Bborder%2Dbottom%3A%202px%20solid%20%23777%3B%7D%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dattribution%2C%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dlayers%2C%2Eleaflet%2Dtouch%20%2Eleaflet%2Dbar%20%7Bbox%2Dshadow%3A%20none%3B%7D%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dlayers%2C%2Eleaflet%2Dtouch%20%2Eleaflet%2Dbar%20%7Bborder%3A%202px%20solid%20rgba%280%2C0%2C0%2C0%2E2%29%3Bbackground%2Dclip%3A%20padding%2Dbox%3B%7D%2Eleaflet%2Dpopup%20%7Bposition%3A%20absolute%3Btext%2Dalign%3A%20center%3Bmargin%2Dbottom%3A%2020px%3B%7D%2Eleaflet%2Dpopup%2Dcontent%2Dwrapper%20%7Bpadding%3A%201px%3Btext%2Dalign%3A%20left%3Bborder%2Dradius%3A%2012px%3B%7D%2Eleaflet%2Dpopup%2Dcontent%20%7Bmargin%3A%2013px%2019px%3Bline%2Dheight%3A%201%2E4%3B%7D%2Eleaflet%2Dpopup%2Dcontent%20p%20%7Bmargin%3A%2018px%200%3B%7D%2Eleaflet%2Dpopup%2Dtip%2Dcontainer%20%7Bwidth%3A%2040px%3Bheight%3A%2020px%3Bposition%3A%20absolute%3Bleft%3A%2050%25%3Bmargin%2Dleft%3A%20%2D20px%3Boverflow%3A%20hidden%3Bpointer%2Devents%3A%20none%3B%7D%2Eleaflet%2Dpopup%2Dtip%20%7Bwidth%3A%2017px%3Bheight%3A%2017px%3Bpadding%3A%201px%3Bmargin%3A%20%2D10px%20auto%200%3B%2Dwebkit%2Dtransform%3A%20rotate%2845deg%29%3B%2Dmoz%2Dtransform%3A%20rotate%2845deg%29%3B%2Dms%2Dtransform%3A%20rotate%2845deg%29%3B%2Do%2Dtransform%3A%20rotate%2845deg%29%3Btransform%3A%20rotate%2845deg%29%3B%7D%2Eleaflet%2Dpopup%2Dcontent%2Dwrapper%2C%2Eleaflet%2Dpopup%2Dtip%20%7Bbackground%3A%20white%3Bcolor%3A%20%23333%3Bbox%2Dshadow%3A%200%203px%2014px%20rgba%280%2C0%2C0%2C0%2E4%29%3B%7D%2Eleaflet%2Dcontainer%20a%2Eleaflet%2Dpopup%2Dclose%2Dbutton%20%7Bposition%3A%20absolute%3Btop%3A%200%3Bright%3A%200%3Bpadding%3A%204px%204px%200%200%3Bborder%3A%20none%3Btext%2Dalign%3A%20center%3Bwidth%3A%2018px%3Bheight%3A%2014px%3Bfont%3A%2016px%2F14px%20Tahoma%2C%20Verdana%2C%20sans%2Dserif%3Bcolor%3A%20%23c3c3c3%3Btext%2Ddecoration%3A%20none%3Bfont%2Dweight%3A%20bold%3Bbackground%3A%20transparent%3B%7D%2Eleaflet%2Dcontainer%20a%2Eleaflet%2Dpopup%2Dclose%2Dbutton%3Ahover%20%7Bcolor%3A%20%23999%3B%7D%2Eleaflet%2Dpopup%2Dscrolled%20%7Boverflow%3A%20auto%3Bborder%2Dbottom%3A%201px%20solid%20%23ddd%3Bborder%2Dtop%3A%201px%20solid%20%23ddd%3B%7D%2Eleaflet%2Doldie%20%2Eleaflet%2Dpopup%2Dcontent%2Dwrapper%20%7Bzoom%3A%201%3B%7D%2Eleaflet%2Doldie%20%2Eleaflet%2Dpopup%2Dtip%20%7Bwidth%3A%2024px%3Bmargin%3A%200%20auto%3B%2Dms%2Dfilter%3A%20%22progid%3ADXImageTransform%2EMicrosoft%2EMatrix%28M11%3D0%2E70710678%2C%20M12%3D0%2E70710678%2C%20M21%3D%2D0%2E70710678%2C%20M22%3D0%2E70710678%29%22%3Bfilter%3A%20progid%3ADXImageTransform%2EMicrosoft%2EMatrix%28M11%3D0%2E70710678%2C%20M12%3D0%2E70710678%2C%20M21%3D%2D0%2E70710678%2C%20M22%3D0%2E70710678%29%3B%7D%2Eleaflet%2Doldie%20%2Eleaflet%2Dpopup%2Dtip%2Dcontainer%20%7Bmargin%2Dtop%3A%20%2D1px%3B%7D%2Eleaflet%2Doldie%20%2Eleaflet%2Dcontrol%2Dzoom%2C%2Eleaflet%2Doldie%20%2Eleaflet%2Dcontrol%2Dlayers%2C%2Eleaflet%2Doldie%20%2Eleaflet%2Dpopup%2Dcontent%2Dwrapper%2C%2Eleaflet%2Doldie%20%2Eleaflet%2Dpopup%2Dtip%20%7Bborder%3A%201px%20solid%20%23999%3B%7D%2Eleaflet%2Ddiv%2Dicon%20%7Bbackground%3A%20%23fff%3Bborder%3A%201px%20solid%20%23666%3B%7D%2Eleaflet%2Dtooltip%20%7Bposition%3A%20absolute%3Bpadding%3A%206px%3Bbackground%2Dcolor%3A%20%23fff%3Bborder%3A%201px%20solid%20%23fff%3Bborder%2Dradius%3A%203px%3Bcolor%3A%20%23222%3Bwhite%2Dspace%3A%20nowrap%3B%2Dwebkit%2Duser%2Dselect%3A%20none%3B%2Dmoz%2Duser%2Dselect%3A%20none%3B%2Dms%2Duser%2Dselect%3A%20none%3Buser%2Dselect%3A%20none%3Bpointer%2Devents%3A%20none%3Bbox%2Dshadow%3A%200%201px%203px%20rgba%280%2C0%2C0%2C0%2E4%29%3B%7D%2Eleaflet%2Dtooltip%2Eleaflet%2Dclickable%20%7Bcursor%3A%20pointer%3Bpointer%2Devents%3A%20auto%3B%7D%2Eleaflet%2Dtooltip%2Dtop%3Abefore%2C%2Eleaflet%2Dtooltip%2Dbottom%3Abefore%2C%2Eleaflet%2Dtooltip%2Dleft%3Abefore%2C%2Eleaflet%2Dtooltip%2Dright%3Abefore%20%7Bposition%3A%20absolute%3Bpointer%2Devents%3A%20none%3Bborder%3A%206px%20solid%20transparent%3Bbackground%3A%20transparent%3Bcontent%3A%20%22%22%3B%7D%2Eleaflet%2Dtooltip%2Dbottom%20%7Bmargin%2Dtop%3A%206px%3B%7D%2Eleaflet%2Dtooltip%2Dtop%20%7Bmargin%2Dtop%3A%20%2D6px%3B%7D%2Eleaflet%2Dtooltip%2Dbottom%3Abefore%2C%2Eleaflet%2Dtooltip%2Dtop%3Abefore%20%7Bleft%3A%2050%25%3Bmargin%2Dleft%3A%20%2D6px%3B%7D%2Eleaflet%2Dtooltip%2Dtop%3Abefore%20%7Bbottom%3A%200%3Bmargin%2Dbottom%3A%20%2D12px%3Bborder%2Dtop%2Dcolor%3A%20%23fff%3B%7D%2Eleaflet%2Dtooltip%2Dbottom%3Abefore%20%7Btop%3A%200%3Bmargin%2Dtop%3A%20%2D12px%3Bmargin%2Dleft%3A%20%2D6px%3Bborder%2Dbottom%2Dcolor%3A%20%23fff%3B%7D%2Eleaflet%2Dtooltip%2Dleft%20%7Bmargin%2Dleft%3A%20%2D6px%3B%7D%2Eleaflet%2Dtooltip%2Dright%20%7Bmargin%2Dleft%3A%206px%3B%7D%2Eleaflet%2Dtooltip%2Dleft%3Abefore%2C%2Eleaflet%2Dtooltip%2Dright%3Abefore%20%7Btop%3A%2050%25%3Bmargin%2Dtop%3A%20%2D6px%3B%7D%2Eleaflet%2Dtooltip%2Dleft%3Abefore%20%7Bright%3A%200%3Bmargin%2Dright%3A%20%2D12px%3Bborder%2Dleft%2Dcolor%3A%20%23fff%3B%7D%2Eleaflet%2Dtooltip%2Dright%3Abefore%20%7Bleft%3A%200%3Bmargin%2Dleft%3A%20%2D12px%3Bborder%2Dright%2Dcolor%3A%20%23fff%3B%7D" rel="stylesheet" />
<script src="data:application/javascript;base64,LyogQHByZXNlcnZlCiAqIExlYWZsZXQgMS4zLjErRGV0YWNoZWQ6IGJhNmY5N2ZmZjg2NDdlNzI0ZTRkZmU2NmQyZWQ3ZGExMWY5MDg5ODkuYmE2Zjk3ZiwgYSBKUyBsaWJyYXJ5IGZvciBpbnRlcmFjdGl2ZSBtYXBzLiBodHRwczovL2xlYWZsZXRqcy5jb20KICogKGMpIDIwMTAtMjAxNyBWbGFkaW1pciBBZ2Fmb25raW4sIChjKSAyMDEwLTIwMTEgQ2xvdWRNYWRlCiAqLwohZnVuY3Rpb24odCxpKXsib2JqZWN0Ij09dHlwZW9mIGV4cG9ydHMmJiJ1bmRlZmluZWQiIT10eXBlb2YgbW9kdWxlP2koZXhwb3J0cyk6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PUp0LHQuUmVuZGVyZXI9bW4sdC5DYW52YXM9Zm4sdC5jYW52YXM9WHQsdC5QYXRoPUplLHQuQ2lyY2xlTWFya2VyPSRlLHQuY2lyY2xlTWFya2VyPWZ1bmN0aW9uKHQsaSl7cmV0dXJuIG5ldyAkZSh0LGkpfSx0LkNpcmNsZT1RZSx0LmNpcmNsZT1mdW5jdGlvbih0LGksZSl7cmV0dXJuIG5ldyBRZSh0LGksZSl9LHQuUG9seWxpbmU9dG4sdC5wb2x5bGluZT1mdW5jdGlvbih0LGkpe3JldHVybiBuZXcgdG4odCxpKX0sdC5Qb2x5Z29uPWVuLHQucG9seWdvbj1mdW5jdGlvbih0LGkpe3JldHVybiBuZXcgZW4odCxpKX0sdC5SZWN0YW5nbGU9d24sdC5yZWN0YW5nbGU9ZnVuY3Rpb24odCxpKXtyZXR1cm4gbmV3IHduKHQsaSl9LHQuTWFwPUxlLHQubWFwPWZ1bmN0aW9uKHQsaSl7cmV0dXJuIG5ldyBMZSh0LGkpfX0pOw=="></script>
<link href="data:text/css,%0Aimg%2Eleaflet%2Dtile%20%7B%0Apadding%3A%200%3B%0Amargin%3A%200%3B%0Aborder%2Dradius%3A%200%3B%0Aborder%3A%20none%3B%0A%7D%0A%2Einfo%20%7B%0Apadding%3A%206px%208px%3B%0Afont%3A%2014px%2F16px%20Arial%2C%20Helvetica%2C%20sans%2Dserif%3B%0Abackground%3A%20white%3B%0Abackground%3A%20rgba%28255%2C255%2C255%2C0%2E8%29%3B%0Abox%2Dshadow%3A%200%200%2015px%20rgba%280%2C0%2C0%2C0%2E2%29%3B%0Aborder%2Dradius%3A%205px%3B%0A%7D%0A%2Elegend%20%7B%0Aline%2Dheight%3A%2018px%3B%0Acolor%3A%20%23555%3B%0A%7D%0A%2Elegend%20svg%20text%20%7B%0Afill%3A%20%23555%3B%0A%7D%0A%2Elegend%20svg%20line%20%7B%0Astroke%3A%20%23555%3B%0A%7D%0A%2Elegend%20i%20%7B%0Awidth%3A%2018px%3B%0Aheight%3A%2018px%3B%0Amargin%2Dright%3A%204px%3B%0Aopacity%3A%200%2E7%3B%0Adisplay%3A%20inline%2Dblock%3B%0Avertical%2Dalign%3A%20top%3B%0A%0Azoom%3A%201%3B%0A%2Adisplay%3A%20inline%3B%0A%7D%0A" rel="stylesheet" />
<script src="data:application/javascript;base64,IWZ1bmN0aW9uKHQscyl7Im9iamVjdCI9PXR5cGVvZiBleHBvcnRzJiYidW5kZWZpbmVkIiE9dHlwZW9mIG1vZHVsZT9tb2R1bGUuZXhwb3J0cz1zKCk6ImZ1bmN0aW9uIj09dHlwZW9mIGRlZmluZSYmZGVmaW5lLmFtZD9kZWZpbmUocyk6dC5wcm9qND1zKCl9KHRoaXMsZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7ZnVuY3Rpb24gayh0LHMpe2lmKHRbc10pcmV0dXJuIHRbc107Zm9yKHZhciBpLGE9T2JqZWN0LmtleXModCksaD1zLnRvTG93ZXJDYXNlKCkucmVwbGFjZShILCIiKSxlPS0xOysrZTxhLmxlbmd0aDspaWYoKGk9YVtlXSkudG9Mb3dlckNhc2UoKS5yZXBsYWNlKEgsIiIpPT09aClyZXR1cm4gdFtpXX1mdW5jdGlvbiBlKHQpe2lmKCJzdHJpbmciIT10eXBlb2YgdCl0aHJvdyBuZXcgRXJyb3IoIm5vdCBhIHN0cmluZyIpO3RoaXMudGV4dD10LnRyaW0oKSx0aGlzLmxldmVsPTAsdGhpcy5wbGFjZT0wLHRoaXMucm9vdD1udWxsLHRoaXMuc3RhY2s9W10sdGhpcy5jdXJyZW50T2JqZWN0PW51bGwsdGhpcy5zdGF0ZT1LfWZ1bmN0aW9uIGgodCxzLGkpe0FycmF5LmlzQXJyYXkocykmJihpLnVuc2hpZnQocykscz1udWxsKTt2YXIgYT1zP3t9OnQsaD1pLnJlZHVjZShmdW5jdGlvbih0LHMpe3JldHVybiBuKHMsdCksdH0sYSk7cyYmKHRbc109aCl9ZnVuY3Rpb24gbih0LHMpe2lmKEFycm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nZlcnNpb249IjIuNi4yIiwoJHQ9YSkuUHJvai5wcm9qZWN0aW9ucy5hZGQoc3MpLCR0LlByb2oucHJvamVjdGlvbnMuYWRkKGlzKSwkdC5Qcm9qLnByb2plY3Rpb25zLmFkZChhcyksJHQuUHJvai5wcm9qZWN0aW9ucy5hZGQoZXMpLCR0LlByb2oucHJvamVjdGlvbnMuYWRkKG5zKSwkdC5Qcm9qLnByb2plY3Rpb25zLmFkZChycyksJHQuUHJvai5wcm9qZWN0aW9ucy5hZGQob3MpLCR0LlByb2oucHJvamVjdGlvbnMuYWRkKGxzKSwkdC5Qcm9qLnByb2plY3Rpb25zLmFkZChNcyksJHQuUHJvai5wcm9qZWN0aW9ucy5hZGQoY3MpLCR0LlByb2oucHJvamVjdGlvbnMuYWRkKHVzKSwkdC5Qcm9qLnByb2plY3Rpb25zLmFkZChmcyksJHQuUHJvai5wcm9qZWN0aW9ucy5hZGQobXMpLCR0LlByb2oucHJvamVjdGlvbnMuYWRkKHBzKSwkdC5Qcm9qLnByb2plY3Rpb25zLmFkZChkcyksJHQuUHJvai5wcm9qZWN0aW9ucy5hZGQoeXMpLCR0LlByb2oucHJvamVjdGlvbnMuYWRkKF9zKSwkdC5Qcm9qLnByb2plY3Rpb25zLmFkZCh4cyksJHQuUHJvai5wcm9qZWN0aW9ucy5hZGQoZ3MpLCR0LlByb2oucHJvamVjdGlvbnMuYWRkKGJzKSwkdC5Qcm9qLnByb2plY3Rpb25zLmFkZCh2cyksJHQuUHJvai5wcm9qZWN0aW9ucy5hZGQod3MpLCR0LlByb2oucHJvamVjdGlvbnMuYWRkKENzKSwkdC5Qcm9qLnByb2plY3Rpb25zLmFkZChQcyksJHQuUHJvai5wcm9qZWN0aW9ucy5hZGQoenMpLCR0LlByb2oucHJvamVjdGlvbnMuYWRkKEJzKSwkdC5Qcm9qLnByb2plY3Rpb25zLmFkZChVcyksYX0pOw=="></script>
<script src="data:application/javascript;base64,KGZ1bmN0aW9uIChmYWN0b3J5KSB7D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b3BMZWZ0ID0gbmV3VG9wTGVmdC5hZGQodGhpcy5fbWFwLl9nZXRNYXBQYW5lUG9zKCkpOw0KDQoJCQlyZXR1cm4gdGhpcy5fdHJhbnNmb3JtKHBvaW50LCB6b29tKS5fc3VidHJhY3QodG9wTGVmdCk7DQoJCX0sDQoNCgkJX3RyYW5zZm9ybTogZnVuY3Rpb24gKHBvaW50LCB6b29tKSB7DQoJCQl2YXIgY3JzID0gdGhpcy5fbWFwLm9wdGlvbnMuY3JzOw0KCQkJdmFyIHRyYW5zZm9ybWF0aW9uID0gY3JzLnRyYW5zZm9ybWF0aW9uOw0KCQkJdmFyIHNjYWxlID0gY3JzLnNjYWxlKHpvb20pOw0KDQoJCQlyZXR1cm4gdHJhbnNmb3JtYXRpb24udHJhbnNmb3JtKHBvaW50LCBzY2FsZSk7DQoJCX0NCgl9KTsNCg0KCUwuUHJvai5pbWFnZU92ZXJsYXkgPSBmdW5jdGlvbiAodXJsLCBib3VuZHMsIG9wdGlvbnMpIHsNCgkJcmV0dXJuIG5ldyBMLlByb2ouSW1hZ2VPdmVybGF5KHVybCwgYm91bmRzLCBvcHRpb25zKTsNCgl9Ow0KDQoJcmV0dXJuIEwuUHJvajsNCn0pKTsNCg=="></script>
<link href="data:text/css,%2Eleaflet%2Dtooltip%2Eleaflet%2Dtooltip%2Dtext%2Donly%2C%0A%2Eleaflet%2Dtooltip%2Eleaflet%2Dtooltip%2Dtext%2Donly%3Abefore%2C%0A%2Eleaflet%2Dtooltip%2Eleaflet%2Dtooltip%2Dtext%2Donly%3Aafter%20%7B%0Abackground%3A%20none%3B%0Aborder%3A%20none%3B%0Abox%2Dshadow%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Eleaflet%2Dtooltip%2Dtext%2Donly%2Eleaflet%2Dtooltip%2Dleft%20%7B%0Amargin%2Dleft%3A%205px%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Eleaflet%2Dtooltip%2Dtext%2Donly%2Eleaflet%2Dtooltip%2Dright%20%7B%0Amargin%2Dleft%3A%20%2D5px%3B%0A%7D%0A%2Eleaflet%2Dtooltip%3Aafter%20%7B%0Aborder%2Dright%3A%206px%20solid%20transparent%3B%0A%0A%7D%0A%2Eleaflet%2Dpopup%2Dpane%20%2Eleaflet%2Dpopup%2Dtip%2Dcontainer%20%7B%0A%0Apointer%2Devents%3A%20all%3B%0A%0Acursor%3A%20pointer%3B%0A%7D%0A%0A%2Eleaflet%2Dmap%2Dpane%20%7B%0Az%2Dindex%3A%20auto%3B%0A%7D%0A%0A%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dright%2Dpane%20img%2C%0A%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dleft%2Dpane%20img%20%7B%0Amax%2Dwidth%3A%20none%20%21important%3B%0Amax%2Dheight%3A%20none%20%21important%3B%0A%7D%0A" rel="stylesheet" />
<script src="data:application/javascript;base64,KGZ1bmN0aW9uKCl7ZnVuY3Rpb24gcihlLG4sdCl7ZnVuY3Rpb24gbyhpLGYpe2lmKCFuW2ldKXtpZighZVtpXSl7dmFyIGM9ImZ1bmN0aW9uIj09dHlwZW9mIHJlcXVpcmUmJnJlcXVpcmU7aWYoIWYmJmMpcmV0dXJuIGMoaSwhMCk7aWYodSlyZXR1cm4gdShpLCEwKTt2YXIgYT1uZXcgRXJyb3IoIkNhbm5vdCBmaW5kIG1vZHVsZSAnIitpKyInIik7dGhyb3cgYS5jb2RlPSJNT0RVTEVfTk9UX0ZPVU5EIixhfXZhciBwPW5baV09e2V4cG9ydHM6e319O2VbaV1bMF0uY2FsbChwLmV4cG9ydHMsZnVuY3Rpb24ocil7dmFyIG49ZVtpXVsxXVtyXTtyZXR1cm4gbyhufHxyKX0scCxwLmV4cG9ydHMscixlLG4sdCl9cmV0dXJuIG5baV0uZXhwb3J0c31mb3IodmFyIHU9ImZ1bmN0aW9uIj09dHlwZW9mIHJlcXVpcmUmJnJlcXVpcmUsaT0wO2k8dC5sZW5ndGg7aSsrKW8odFtpXS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RdKTsKICAgICAgICB9CgogICAgICAgIHRoaXMuX2NvbnRyb2xzQnlJZFtpZF0gPSBjb250cm9sOwogICAgICB9IGVsc2UgewogICAgICAgIHRoaXMuX2NvbnRyb2xzTm9JZC5wdXNoKGNvbnRyb2wpOwogICAgICB9CgogICAgICB0aGlzLl9tYXAuYWRkQ29udHJvbChjb250cm9sKTsKICAgIH0KICB9LCB7CiAgICBrZXk6ICJnZXQiLAogICAgdmFsdWU6IGZ1bmN0aW9uIGdldChpZCkgewogICAgICB2YXIgY29udHJvbCA9IG51bGw7CgogICAgICBpZiAodGhpcy5fY29udHJvbHNCeUlkW2lkXSkgewogICAgICAgIGNvbnRyb2wgPSB0aGlzLl9jb250cm9sc0J5SWRbaWRdOwogICAgICB9CgogICAgICByZXR1cm4gY29udHJvbDsKICAgIH0KICB9LCB7CiAgICBrZXk6ICJyZW1vdmUiLAogICAgdmFsdWU6IGZ1bmN0aW9uIHJlbW92ZShpZCkgewogICAgICBpZiAodGhpcy5fY29udHJvbHNCeUlkW2lkXSkgewogICAgICAgIHZhciBjb250cm9sID0gdGhpcy5fY29udHJvbHNCeUlkW2lkXTsKCiAgICAgICAgdGhpcy5fbWFwLnJlbW92ZUNvbnRyb2woY29udHJvbCk7CgogICAgICAgIGRlbGV0ZSB0aGlzLl9jb250cm9sc0J5SWRbaWRdOwogICAgICB9CiAgICB9CiAgfSwgewogICAga2V5OiAiY2xlYXIiLAogICAgdmFsdWU6IGZ1bmN0aW9uIGNsZWFyKCkgewogICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX2NvbnRyb2xzTm9JZC5sZW5ndGg7IGkrKykgewogICAgICAgIHZhciBjb250cm9sID0gdGhpcy5fY29udHJvbHNOb0lkW2ldOwoKICAgICAgICB0aGlzLl9tYXAucmVtb3ZlQ29udHJvbChjb250cm9sKTsKICAgICAgfQoKICAgICAgdGhpcy5fY29udHJvbHNOb0lkID0gW107CgogICAgICBmb3IgKHZhciBrZXkgaW4gdGhpcy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Z2V0KTsKICAgICAgICAgIH0pLm9uKCJsYXllcmFkZCBsYXllcnJlbW92ZSIsIGZ1bmN0aW9uIChlKSB7CiAgICAgICAgICAgIC8vIElmIHRoZSBsYXllciB0aGF0J3MgY29taW5nIG9yIGdvaW5nIGlzIGEgZ3JvdXAgd2UgY3JlYXRlZCwgdGVsbAogICAgICAgICAgICAvLyB0aGUgc2VydmVyLgogICAgICAgICAgICBpZiAobWFwLmxheWVyTWFuYWdlci5nZXRHcm91cE5hbWVGcm9tTGF5ZXJHcm91cChlLmxheWVyKSkgewogICAgICAgICAgICAgIC8vIEJ1dCB0byBhdm9pZCBjaGF0dGluZXNzLCBjb2FsZXNjZSBldmVudHMKICAgICAgICAgICAgICBpZiAoZ3JvdXBUaW1lcklkKSB7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQoZ3JvdXBUaW1lcklkKTsKICAgICAgICAgICAgICAgIGdyb3VwVGltZXJJZCA9IG51bGw7CiAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICBncm91cFRpbWVySWQgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIGdyb3VwVGltZXJJZCA9IG51bGw7CgogICAgICAgICAgICAgICAgX3NoaW55MlsiZGVmYXVsdCJdLm9uSW5wdXRDaGFuZ2UobWFwLmlkICsgIl9ncm91cHMiLCBtYXAubGF5ZXJNYW5hZ2VyLmdldFZpc2libGVHcm91cHMoKSk7CiAgICAgICAgICAgICAgfSwgMTAwKTsKICAgICAgICAgICAgfQogICAgICAgICAgfSk7CiAgICAgICAgfQoKICAgICAgICB0aGlzLmRvUmVuZGVyVmFsdWUoZGF0YSwgbWFwKTsKICAgICAgfSwKICAgICAgZG9SZW5kZXJWYWx1ZTogZnVuY3Rpb24gZG9SZW5kZXJWYWx1ZShkYXRhLCBtYXApIHsKICAgICAgICAvLyBMZWFmbGV0IGRvZXMgbm90IGJlaGF2ZSB3ZWxsIHdoZW4geW91IHNldCB1cCBhI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F5ZXJNYW5hZ2VyMlsiZGVmYXVsdCJdKG1hcCk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIG1hcC5jb250cm9scy5jbGVhcigpOwogICAgICAgICAgbWFwLmxheWVyTWFuYWdlci5jbGVhcigpOwogICAgICAgIH0KCiAgICAgICAgdmFyIGV4cGxpY2l0VmlldyA9IGZhbHNlOwoKICAgICAgICBpZiAoZGF0YS5zZXRWaWV3KSB7CiAgICAgICAgICBleHBsaWNpdFZpZXcgPSB0cnVlOwogICAgICAgICAgbWFwLnNldFZpZXcuYXBwbHkobWFwLCBkYXRhLnNldFZpZXcpOwogICAgICAgIH0KCiAgICAgICAgaWYgKGRhdGEuZml0Qm91bmRzKSB7CiAgICAgICAgICBleHBsaWNpdFZpZXcgPSB0cnVlOwogICAgICAgICAgbWV0aG9kcy5maXRCb3VuZHMuYXBwbHkobWFwLCBkYXRhLmZpdEJvdW5kcyk7CiAgICAgICAgfQoKICAgICAgICBpZiAoZGF0YS5mbHlUbykgewogICAgICAgICAgaWYgKCFleHBsaWNpdFZpZXcgJiYgIW1hcC5sZWFmbGV0ci5oYXNSZW5kZXJlZCkgewogICAgICAgICAgICAvLyBtdXN0IGJlIGRvbmUgdG8gZ2l2ZSBhIGluaXRpYWwgc3RhcnRpbmcgcG9pbnQKICAgICAgICAgICAgbWFwLmZpdFdvcmxkKCk7CiAgICAgICAgICB9CgogICAgICAgICAgZXhwbGljaXRWaWV3ID0gdHJ1ZTsKICAgICAgICAgIG1hcC5mbHlUby5hcHBseShtYXAsIGRhdGEuZmx5VG8pOwogICAgICAgIH0KCiAgICAgICAgaWYgKGRhdGEuZmx5VG9Cb3VuZHMpIHsKICAgICAgICAgIGlmICghZXhwbGljaXRWaWV3ICYmICFtYXAubGVhZmxldHIuaGFzUmVuZGVyZWQpIHsKICAgICAgICAgICAgLy8gbXVzdCBiZSBkb25lIHRvIGdpdmUgYSBpbml0aWFsIHN0YXJ0aW5nIHBvaW50CiAgICAgICAgICAgIG1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ogICAgICAgIGlmICghY3RnKSB7CiAgICAgICAgICBjdGcgPSB0aGlzLl9ieUNyb3NzdGFsa0dyb3VwW2N0R3JvdXBdID0ge307CiAgICAgICAgICB2YXIgY3Jvc3N0YWxrID0gZ2xvYmFsLmNyb3NzdGFsazsKCiAgICAgICAgICB2YXIgaGFuZGxlRmlsdGVyID0gZnVuY3Rpb24gaGFuZGxlRmlsdGVyKGUpIHsKICAgICAgICAgICAgaWYgKCFlLnZhbHVlKSB7CiAgICAgICAgICAgICAgdmFyIGdyb3VwS2V5cyA9IE9iamVjdC5rZXlzKGN0Zyk7CgogICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZ3JvdXBLZXlzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICB2YXIga2V5ID0gZ3JvdXBLZXlzW2ldOwogICAgICAgICAgICAgICAgdmFyIF9sYXllckluZm8gPSBfdGhpcy5fYnlTdGFtcFtjdGdba2V5XV07CgogICAgICAgICAgICAgICAgX3RoaXMuX3NldFZpc2liaWxpdHkoX2xheWVySW5mbywgdHJ1ZSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIHZhciBzZWxlY3RlZEtleXMgPSB7fTsKCiAgICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAwOyBfaSA8IGUudmFsdWUubGVuZ3RoOyBfaSsrKSB7CiAgICAgICAgICAgICAgICBzZWxlY3RlZEtleXNbZS52YWx1ZVtfaV1dID0gdHJ1ZTsKICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgIHZhciBfZ3JvdXBLZXlzID0gT2JqZWN0LmtleXMoY3RnKTsKCiAgICAgICAgICAgICAgZm9yICh2YXIgX2kyID0gMDsgX2kyIDwgX2dyb3VwS2V5cy5sZW5ndGg7IF9pMisrKSB7CiAgICAgICAgICAgICAgICB2YXIgX2tleSA9IF9ncm91cEtleXNbX2kyXTsKICAgICAgICAgICAgICAgIHZhciBfbGF5ZXJJbmZvMiA9IF90aGlzLl9ieVN0YW1wW2N0Z1tfa2V5XV07CgogICAgICAgICAgICAgICAgX3RoaXMuX3NldFZpc2liaWxpdHkoX2xheWVySW5mbzIsIHNlbGVjdGVkS2V5c1tfZ3JvdXBLZXlzW19pMl1dKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH07CgogICAgICAgICAgdmFyIGZpbHRlckhhbmRsZSA9IG5ldyBjcm9zc3RhbGsuRmlsdGVySGFuZGxlKGN0R3JvdXApOwogICAgICAgICAgZmlsdGVySGFuZGxlLm9uKCJjaGFuZ2UiLCBoYW5kbGVGaWx0ZXIpOwoKICAgICAgICAgIHZhciBoYW5kbGVTZWxlY3Rpb24gPSBmdW5jdGlvbiBoYW5kbGVTZWxlY3Rpb24oZSkgewogICAgICAgICAgICBpZiAoIWUudmFsdWUgfHwgIWUudmFsdWUubGVuZ3RoKSB7CiAgICAgICAgICAgICAgdmFyIGdyb3VwS2V5cyA9IE9iamVjdC5rZXlzKGN0Zyk7CgogICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZ3JvdXBLZXlzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICB2YXIga2V5ID0gZ3JvdXBLZXlzW2ldOwogICAgICAgICAgICAgICAgdmFyIF9sYXllckluZm8zID0gX3RoaXMuX2J5U3RhbXBbY3RnW2tleV1dOwoKICAgICAgICAgICAgICAgIF90aGlzLl9zZXRPcGFjaXR5KF9sYXllckluZm8zLCAxLjApOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICB2YXIgc2VsZWN0ZWRLZXlzID0ge307CgogICAgICAgICAgICAgIGZvciAodmFyIF9pMyA9IDA7IF9pMyA8IGUudmFsdWUubGVuZ3RoOyBfaTMrKykgewogICAgICAgICAgICAgICAgc2VsZWN0ZWRLZXlzW2UudmFsdWVbX2kzXV0gPSB0cnVlOwogICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgdmFyIF9ncm91cEtleXMyID0gT2JqZWN0LmtleXMoY3RnKTsKCiAgICAgICAgICAgICAgZm9yICh2YXIgX2k0ID0gMDsgX2k0IDwgX2dyb3VwS2V5czIubGVuZ3RoOyBfaTQrKykgewogICAgICAgICAgICAgICAgdmFyIF9rZXkyID0gX2dyb3VwS2V5czJbX2k0XTsKICAgICAgICAgICAgICAgIHZhciBfbGF5ZXJJbmZvNCA9IF90aGlzLl9ieVN0YW1wW2N0Z1tfa2V5Ml1dOwoKICAgICAgICAgICAgICAgIF90aGlzLl9zZXRPcGFjaXR5KF9sYXllckluZm80LCBzZWxlY3RlZEtleXNbX2dyb3VwS2V5czJbX2k0XV0gPyAxLjAgOiAwLjIpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfTsKCiAgICAgICAgICB2YXIgc2VsSGFuZGxlID0gbmV3IGNyb3NzdGFsay5TZWxlY3Rpb25IYW5kbGUoY3RHcm91cCk7CiAgICAgICAgICBzZWxIYW5kbGUub24oImNoYW5nZSIsIGhhbmRsZVNlbGVjdGlvbik7CiAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgaGFuZGxlRmlsdGVyKHsKICAgICAgICAgICAgICB2YWx1ZTogZmlsdGVySGFuZGxlLmZpbHRlcmVkS2V5cwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgaGFuZGxlU2VsZWN0aW9uKHsKICAgICAgICAgICAgICB2YWx1ZTogc2VsSGFuZGxlLnZhbHVlCiAgICAgICAgICAgIH0pOwogICAgICAgICAgfSwgMTAwKTsKICAgICAgICB9CgogICAgICAgIGlmICghY3RnW2N0S2V5XSkgY3RnW2N0S2V5XSA9IFtdOwogICAgICAgIGN0Z1tjdEtleV0ucHVzaChzdGFtcCk7CiAgICAgIH0gLy8gQWRkIHRvIGNvbnRhaW5lcgoKCiAgICAgIGlmICghbGF5ZXJJbmZvLmhpZGRlbikgY29udGF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VE9ETzogVXNlIHBpeGVsIGNvbnRhaW5tZW50LCBub3QgbGF0L2xuZyBjb250YWlubWVudAogICAgICAgICAgICAgIGlmIChib3VuZHMuY29udGFpbnMobGF5ZXJJbmZvLmxheWVyLmdldExhdExuZygpKSkgewogICAgICAgICAgICAgICAgLy8gLi4uYWRkIHRoZSBrZXkgdG8gdGhlIHNlbGVjdGlvbi4KICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5wdXNoKGN0S2V5KTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgICAgIG5ldyBnbG9iYWwuY3Jvc3N0YWxrLlNlbGVjdGlvbkhhbmRsZShjdEdyb3VwTmFtZSkuc2V0KHNlbGVjdGlvbiwgZXh0cmFJbmZvKTsKICAgICAgfSk7CiAgICB9CiAgfSwgewogICAga2V5OiAidW5icnVzaCIsCiAgICB2YWx1ZTogZnVuY3Rpb24gdW5icnVzaChleHRyYUluZm8pIHsKICAgICAgT2JqZWN0LmtleXModGhpcy5fYnlDcm9zc3RhbGtHcm91cCkuZm9yRWFjaChmdW5jdGlvbiAoY3RHcm91cE5hbWUpIHsKICAgICAgICBuZXcgZ2xvYmFsLmNyb3NzdGFsay5TZWxlY3Rpb25IYW5kbGUoY3RHcm91cE5hbWUpLmNsZWFyKGV4dHJhSW5mbyk7CiAgICAgIH0pOwogICAgfQogIH0sIHsKICAgIGtleTogIl9zZXRWaXNpYmlsaXR5IiwKICAgIHZhbHVlOiBmdW5jdGlvbiBfc2V0VmlzaWJpbGl0eShsYXllckluZm8sIHZpc2libGUpIHsKICAgICAgaWYgKGxheWVySW5mby5oaWRkZW4gXiB2aXNpYmxlKSB7CiAgICAgICAgcmV0dXJuOwogICAgICB9IGVsc2UgaWYgKHZpc2libGUpIHsKICAgICAgICBsYXllckluZm8uY29udGFpbmVyLmFkZExheWVyKGxheWVySW5mby5sYXllcik7CiAgICAgICAgbGF5ZXJJbmZvLmhpZGRlbi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9CgogICAgICB2YXIgbGF5ZXJJbmZvID0gdGhpcy5fYnlTdGFtcFtzdGFtcF07CgogICAgICBpZiAoIWxheWVySW5mbykgewogICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgfQoKICAgICAgbGF5ZXJJbmZvLmNvbnRhaW5lci5yZW1vdmVMYXllcihzdGFtcCk7CgogICAgICBpZiAodHlwZW9mIGxheWVySW5mby5ncm91cCA9PT0gInN0cmluZyIpIHsKICAgICAgICBkZWxldGUgdGhpcy5fYnlHcm91cFtsYXllckluZm8uZ3JvdXBdW3N0YW1wXTsKICAgICAgfQoKICAgICAgaWYgKHR5cGVvZiBsYXllckluZm8ubGF5ZXJJZCA9PT0gInN0cmluZyIpIHsKICAgICAgICBkZWxldGUgdGhpcy5fYnlMYXllcklkW3RoaXMuX2xheWVySWRLZXkobGF5ZXJJbmZvLmNhdGVnb3J5LCBsYXllckluZm8ubGF5ZXJJZCldOwogICAgICB9CgogICAgICBkZWxldGUgdGhpcy5fYnlDYXRlZ29yeVtsYXllckluZm8uY2F0ZWdvcnldW3N0YW1wXTsKICAgICAgZGVsZXRlIHRoaXMuX2J5U3RhbXBbc3RhbXBdOwoKICAgICAgaWYgKGxheWVySW5mby5jdEdyb3VwKSB7CiAgICAgICAgdmFyIGN0R3JvdXAgPSB0aGlzLl9ieUNyb3NzdGFsa0dyb3VwW2xheWVySW5mby5jdEdyb3VwXTsKICAgICAgICB2YXIgbGF5ZXJzRm9yS2V5ID0gY3RHcm91cFtsYXllckluZm8uY3RLZXldOwogICAgICAgIHZhciBpZHggPSBsYXllcnNGb3JLZXkgPyBsYXllcnNGb3JLZXkuaW5kZXhPZihzdGFtcCkgOiAtMTsKCiAgICAgICAgaWYgKGlkeCA+PSAwKSB7CiAgICAgICAgICBpZiAobGF5ZXJzRm9yS2V5Lmxlbmd0aCA9PT0gMSkgewogICAgICAgICAgICBkZWxldGUgY3RHcm91cFtsYXllckluZm8uY3RLZXldOwogICAgICAgICAgfSBlbHNlIHsKICA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CB0aGlzR3JvdXAsIGRmLmdldChpLCAiY3RHcm91cCIsIHRydWUpLCBkZi5nZXQoaSwgImN0S2V5IiwgdHJ1ZSkpOwogICAgICAgICAgfQoKICAgICAgICAgIHZhciBwb3B1cCA9IGRmLmdldChpLCAicG9wdXAiKTsKICAgICAgICAgIHZhciBwb3B1cE9wdGlvbnMgPSBkZi5nZXQoaSwgInBvcHVwT3B0aW9ucyIpOwoKICAgICAgICAgIGlmIChwb3B1cCAhPT0gbnVsbCkgewogICAgICAgICAgICBpZiAocG9wdXBPcHRpb25zICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgbWFya2VyLmJpbmRQb3B1cChwb3B1cCwgcG9wdXBPcHRpb25zKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBtYXJrZXIuYmluZFBvcHVwKHBvcHVwKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQoKICAgICAgICAgIHZhciBsYWJlbCA9IGRmLmdldChpLCAibGFiZWwiKTsKICAgICAgICAgIHZhciBsYWJlbE9wdGlvbnMgPSBkZi5nZXQoaSwgImxhYmVsT3B0aW9ucyIpOwoKICAgICAgICAgIGlmIChsYWJlbCAhPT0gbnVsbCkgewogICAgICAgICAgICBpZiAobGFiZWxPcHRpb25zICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgaWYgKGxhYmVsT3B0aW9ucy5wZXJtYW5lbnQpIHsKICAgICAgICAgICAgICAgIG1hcmtlci5iaW5kVG9vbHRpcChsYWJlbCwgbGFiZWxPcHRpb25zKS5vcGVuVG9vbHRpcCgpOwogICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBtYXJrZXIuYmluZFRvb2x0aXAobGFiZWwsIGxhYmVsT3B0aW9ucyk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIG1hcmtlci5iaW5kVG9vbHRpcChsYWJlbCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KCiAg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GYuZ2V0KGksICJjdEdyb3VwIiwgdHJ1ZSksIGRmLmdldChpLCAiY3RLZXkiLCB0cnVlKSk7CgogICAgICAgIGlmIChsYXllci5iaW5kUG9wdXApIHsKICAgICAgICAgIHZhciBwb3B1cCA9IGRmLmdldChpLCAicG9wdXAiKTsKICAgICAgICAgIHZhciBwb3B1cE9wdGlvbnMgPSBkZi5nZXQoaSwgInBvcHVwT3B0aW9ucyIpOwoKICAgICAgICAgIGlmIChwb3B1cCAhPT0gbnVsbCkgewogICAgICAgICAgICBpZiAocG9wdXBPcHRpb25zICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgbGF5ZXIuYmluZFBvcHVwKHBvcHVwLCBwb3B1cE9wdGlvbnMpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIGxheWVyLmJpbmRQb3B1cChwb3B1cCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGlmIChsYXllci5iaW5kVG9vbHRpcCkgewogICAgICAgICAgdmFyIGxhYmVsID0gZGYuZ2V0KGksICJsYWJlbCIpOwogICAgICAgICAgdmFyIGxhYmVsT3B0aW9ucyA9IGRmLmdldChpLCAibGFiZWxPcHRpb25zIik7CgogICAgICAgICAgaWYgKGxhYmVsICE9PSBudWxsKSB7CiAgICAgICAgICAgIGlmIChsYWJlbE9wdGlvbnMgIT09IG51bGwpIHsKICAgICAgICAgICAgICBsYXllci5iaW5kVG9vbHRpcChsYWJlbCwgbGFiZWxPcHRpb25zKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBsYXllci5iaW5kVG9vbHRpcChsYWJlbCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGxheWVyLm9uKCJjbGljayIsIG1vdXNlSGFuZGxlcih0aGlzLmlkLCB0aGlzSWQsIHRoaXNHcm91cCwgY2F0ZWdvcnkgKyAiX2NsaWNrIiksIHRoaXMpOwogICAgICAgIGxheWVyLm9uKCJtb3VzZW92ZXIiLCBtb3VzZUhhbmRsZXIodGhpcy5pZCwgdGhpc0lkLCB0aGlzR3JvdXAsIGNhdGVnb3J5ICsgIl9tb3VzZW92ZXIiKSwgdGhpcyk7CiAgICAgICAgbGF5ZXIub24oIm1vdXNlb3V0IiwgbW91c2VIYW5kbGVyKHRoaXMuaWQsIHRoaXNJZCwgdGhpc0dyb3VwLCBjYXRlZ29yeSArICJfbW91c2VvdXQiKSwgdGhpcyk7CiAgICAgICAgdmFyIGhpZ2hsaWdodFN0eWxlID0gZGYuZ2V0KGksICJoaWdobGlnaHRPcHRpb25zIik7CgogICAgICAgIGlmICghX2pxdWVyeTJbImRlZmF1bHQiXS5pc0VtcHR5T2JqZWN0KGhpZ2hsaWdodFN0eWxlKSkgewogICAgICAgICAgdmFyIGRlZmF1bHRTdHlsZSA9IHt9OwoKICAgICAgICAgIF9qcXVlcnkyWyJkZWZhdWx0Il0uZWFjaChoaWdobGlnaHRTdHlsZSwgZnVuY3Rpb24gKGssIHYpIHsKICAgICAgICAgICAgaWYgKGsgIT0gImJyaW5nVG9Gcm9udCIgJiYgayAhPSAic2VuZFRvQmFjayIpIHsKICAgICAgICAgICAgICBpZiAoZGYuZ2V0KGksIGspKSB7CiAgICAgICAgICAgICAgICBkZWZhdWx0U3R5bGVba10gPSBkZi5nZXQoaSwgayk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9KTsKCiAgICAgICAgICBsYXllci5vbigibW91c2VvdmVyIiwgZnVuY3Rpb24gKGUpIHsKICAgICAgICAgICAgdGhpcy5zZXRTdHlsZShoaWdobGlnaHRTdHlsZSk7CgogICAgICAgICAgICBpZiAoaGlnaGxpZ2h0U3R5bGUuYnJpbmdUb0Zyb250KSB7CiAgICAgICAgICAgICAgdGhpcy5icmluZ1RvRnJvbnQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgfSk7CiAgICAgICAgICBsYXllci5vbigibW91c2VvdXQiLCBmdW5j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hlbiAqMjU2IHRvIGNvbnZlcnQKICAgICAgICAgICAgLy8gdG8gcmVsIHBpeGVsIGNvb3JkcwogICAgICAgICAgICAodG9wTGVmdC54IC0gdGlsZVBvaW50LngpICogMjU2LCAodG9wTGVmdC55IC0gdGlsZVBvaW50LnkpICogMjU2LCAvLyBBbHdheXMgZHJhdyB0aGUgd2hvbGUgdGhpbmcgYW5kIGxldCBjYW52YXMgY2xpcDsgc28gd2UgY2FuIGp1c3QKICAgICAgICAgICAgLy8gY29udmVydCBmcm9tIHNpemUgaW4gdGlsZSBjb29yZHMgc3RyYWlnaHQgdG8gcGl4ZWxzCiAgICAgICAgICAgIGV4dGVudC54ICogMjU2LCBleHRlbnQueSAqIDI1Nik7CiAgICAgICAgICB9KTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgLy8gVXNlIG1hbnVhbCBuZWFyZXN0LW5laWdoYm9yIGludGVycG9sYXRpb24KICAgICAgICAgIC8vIENhbGN1bGF0ZSB0aGUgc291cmNlIGltYWdlIHBpeGVsIGNvb3JkaW5hdGVzIHRoYXQgY29ycmVzcG9uZCB3aXRoCiAgICAgICAgICAvLyB0aGUgdG9wLWxlZnQgYW5kIGJvdHRvbS1yaWdodCBvZiB0aGlzIHRpbGUuIChJZiB0aGUgc291cmNlIGltYWdlCiAgICAgICAgICAvLyBvbmx5IHBhcnRpYWxseSBvdmVybGFwcyB0aGUgdGlsZSwgd2UgdXNlIG1heC9taW4gdG8gbGltaXQgdGhlCiAgICAgICAgICAvLyBzb3VyY2VTdGFydC9FbmQgdG8gb25seSByZWZsZWN0IHRoZSBvdmVybGFwcGluZyBwb3J0aW9uLikKICAgICAgICAgIHZhciBzb3VyY2VTdGFydCA9IHsKICAgICAgICAgICAgeDogTWF0aC5tYXgoMCwgTWF0aC5mbG9vcigodGlsZVBvaW50LnggLSB0b3BMZWZ0LngpICogaW1nUmVzLngpKSwKICAgICAgICAgICAgeTogTWF0aC5tYXgoMCwgTWF0aC5mbG9vcigodGlsZVBvaW50LnkgLSB0b3BMZWZ0LnkpICogaW1nUmVzLnkpKQogICAgICAgICAgfTsKICAgICAgICAgIHZhciBzb3VyY2VFbmQgPSB7CiAgICAgICAgICAgIHg6IE1hdGgubWluKHcsIE1hdGguY2VpbCgodGlsZVBvaW50LnggKyAxIC0gdG9wTGVmdC54KSAqIGltZ1Jlcy54KSksCiAgICAgICAgICAgIHk6IE1hdGgubWluKGgsIE1hdGguY2VpbCgodGlsZVBvaW50LnkgKyAxIC0gdG9wTGVmdC55KSAqIGltZ1Jlcy55KSkKICAgICAgICAgIH07IC8vIFRoZSBzaXplLCBpbiBkZXN0IHBpeGVscywgdGhhdCBlYWNoIHNvdXJjZSBwaXhlbCBzaG91bGQgb2NjdXB5LgogICAgICAgICAgLy8gVGhpcyBtaWdodCBiZSBncmVhdGVyIG9yIGxlc3MgdGhhbiAxIChlLmcuIGlmIHggYW5kIHkgcmVzb2x1dGlvbgogICAgICAgICAgLy8gYXJlIHZlcnkgZGlmZmVyZW50KS4KCiAgICAgICAgICB2YXIgcGl4ZWxTaXplID0gewogICAgICAgICAgICB4OiAyNTYgLyBpbWdSZXMueCwKICAgICAgICAgICAgeTogMjU2IC8gaW1nUmVzLnkKICAgICAgICAgIH07IC8vIEZvciBlYWNoIHBpeGVsIGluIHRoZSBzb3VyY2UgaW1hZ2UgdGhhdCBvdmVybGFwcyB0aGUgdGlsZS4uLgoKICAgICAgICAgIGZvciAodmFyIHJvdyA9IHNvdXJjZVN0YXJ0Lnk7IHJvdyA8IHNvdXJjZUVuZC55OyByb3crKykgewogICAgICAgICAgICBmb3IgKHZhciBjb2wgPSBzb3VyY2VTdGFydC54OyBjb2wgPCBzb3VyY2VFbmQueDsgY29sKyspIHsKICAgICAgICAgICAgICAvLyAuLi5leHRyYWN0IHRoZSBwaXhlbCBkYXRhLi4uCiAgICAgICAgICAgICAgdmFyIGkgPSAocm93ICogdyArIGNvbCkgKiA0OwogICAgICAgICAgICAgIHZhciByID0gaW1nRGF0YVtpX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3RhbGsuU2VsZWN0aW9uSGFuZGxlKGN0R3JvdXApOwogICAgICAgICAgc2VsZWN0aW9uSGFuZGxlLm9uKCJjaGFuZ2UiLCBmdW5jdGlvbiAoZSkgewogICAgICAgICAgICBpZiAoZS5zZW5kZXIgIT09IHNlbGVjdGlvbkhhbmRsZSkgewogICAgICAgICAgICAgIGlmIChfdGhpczguX2xvY2F0aW9uRmlsdGVyKSB7CiAgICAgICAgICAgICAgICBfdGhpczguX2xvY2F0aW9uRmlsdGVyLmRpc2FibGUoKTsKCiAgICAgICAgICAgICAgICBidG4uc3RhdGUoInNlbGVjdC1pbmFjdGl2ZSIpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfSk7CgogICAgICAgICAgdmFyIGhhbmRsZXIgPSBmdW5jdGlvbiBoYW5kbGVyKGUpIHsKICAgICAgICAgICAgX3RoaXM4LmxheWVyTWFuYWdlci5icnVzaChfdGhpczguX2xvY2F0aW9uRmlsdGVyLmdldEJvdW5kcygpLCB7CiAgICAgICAgICAgICAgc2VuZGVyOiBzZWxlY3Rpb25IYW5kbGUKICAgICAgICAgICAgfSk7CiAgICAgICAgICB9OwoKICAgICAgICAgIF90aGlzOC5fbG9jYXRpb25GaWx0ZXIub24oImVuYWJsZWQiLCBoYW5kbGVyKTsKCiAgICAgICAgICBfdGhpczguX2xvY2F0aW9uRmlsdGVyLm9uKCJjaGFuZ2UiLCBoYW5kbGVyKTsKCiAgICAgICAgICBfdGhpczguX2xvY2F0aW9uRmlsdGVyLm9uKCJkaXNhYmxlZCIsIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgc2VsZWN0aW9uSGFuZGxlLmNsb3NlKCk7CiAgICAgICAgICAgIF90aGlzOC5fbG9jYXRpb25GaWx0ZXIgPSBudWxsOwogICAgICAgICAgfSk7CiAgICAgICAgfQoKICAgICAgICBfdGhpczguX2xvY2F0aW9uRmlsdGVyLmFkZFRvKG1hcCk7CiAgICAgIH0KICAgIH0sIHsKIC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gPSBmdW5jdGlvbiAocHJvdmlkZXIsIG9wdGlvbnMpIHsNCgkJcmV0dXJuIG5ldyBMLlRpbGVMYXllci5Qcm92aWRlcihwcm92aWRlciwgb3B0aW9ucyk7DQoJfTsNCg0KCXJldHVybiBMOw0KfSkpOw0K"></script>
<script src="data:application/javascript;base64,TGVhZmxldFdpZGdldC5tZXRob2RzLmFkZFByb3ZpZGVyVGlsZXMgPSBmdW5jdGlvbihwcm92aWRlciwgbGF5ZXJJZCwgZ3JvdXAsIG9wdGlvbnMpIHsKICB0aGlzLmxheWVyTWFuYWdlci5hZGRMYXllcihMLnRpbGVMYXllci5wcm92aWRlcihwcm92aWRlciwgb3B0aW9ucyksICJ0aWxlIiwgbGF5ZXJJZCwgZ3JvdXApOwp9Owo="></script>
</head>
<body style="background-color: white;">
<div id="htmlwidget_container">
<div id="htmlwidget-130d7262d430cbfe098d" class="leaflet html-widget" style="width:100%;height:400px;">
</div>
</div>
<script type="application/json" data-for="htmlwidget-130d7262d430cbfe098d">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"calls":[{"method":"addTiles","args":["https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,null,{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"© <a href=\"https://openstreetmap.org\">OpenStreetMap<\/a> contributors, <a href=\"https://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA<\/a>"}]},{"method":"addCircleMarkers","args":[[28.5728,28.5814,28.5729,28.5657,28.5703,28.5676,28.5651,28.5668,28.568,28.5651,28.5639,28.5734,28.5747,28.5812,28.5879,28.57,28.5733,28.5805,28.5842,28.6093,28.5904,28.5725,28.5699,28.5574,28.5618,28.5596,28.5675,28.5628,28.5674,28.5915,28.5623,28.5857,28.5624,28.5705,28.5608,28.6158,28.5815,28.573,28.5646,28.6008,28.5658,28.5775,28.5879,28.5954,28.5854,28.5658,28.5997,28.5757,28.5822,28.5799,28.5896,28.5623,28.5766,28.5811,28.5684,28.5809,28.5729,28.5765,28.5721,28.592,28.562,28.577,28.5858,28.5904,28.5844,28.5663,28.5704,28.5746,28.5652,28.5636,28.5654,28.566,28.5735,28.5616,28.6022,28.5665,28.5676,28.5752,28.5673,28.5707,28.576,28.5741,28.5627,28.5726,28.564,28.5653,28.5682,28.5844,28.5668,28.5618,28.562,28.5747,28.5791,28.5673,28.5854,28.5795,28.5646,28.5618,28.577,28.575,28.5908,28.5737,28.5675,28.5636,28.5782,28.5602,28.5616,28.5679,28.5623,28.5679,28.5794,28.5649,28.564,28.5666,28.5951,28.5754,28.5769,28.5759,28.5922,28.5923,28.5595,28.5868,28.5654,28.57,28.5727,28.5709,28.5855,28.5828,28.5717,28.559,28.5891,28.5826,28.5713,28.5672,28.5674,28.5857,28.5843,28.5659,28.5623,28.5808,28.576,28.5656,28.5704,28.5871,28.5772,28.5751,28.5774,28.5918,28.5719,28.5745,28.5856,28.5762,28.582,28.5603,28.5791,28.5875,28.5696,28.5685,28.5872,28.5839,28.5976,28.5735,28.581,28.5753,28.5817,28.5761,28.5824,28.5786,28.6168,28.5651,28.5629,28.5473,28.5554,28.5582,28.5625,28.5649,28.5661,28.5622,28.5544,28.5608,28.5633,28.5583,28.5603,28.5645,28.5622,28.5653,28.5548,28.559,28.5623,28.5505,28.5633,28.561,28.561,28.5605,28.5608,28.5636,28.5516,28.561,28.5631,28.561,28.5584,28.5535,28.5627,28.5665,28.5628,28.5493,28.5587,28.5582,28.5532,28.5545,28.5604,28.5573,28.5606,28.5597,28.5605,28.5655,28.5596,28.5584,28.5599,28.562,28.5498,28.5592,28.5635,28.5509,28.5682,28.5575,28.5561,28.5576,28.5583,28.5493,28.5579,28.5668,28.5564,28.5628,28.5628,28.5465,28.5639,28.5617,28.5464,28.5592,28.5598,28.5595,28.5603,28.5554,28.558,28.5579,28.5609,28.5596,28.5667,28.552,28.5602,28.5538,28.5587,28.5576,28.5538,28.5577,28.5608,28.5602,28.5582,28.5609,28.5621,28.5637,28.5598,28.5649,28.5619,28.5605,28.5567,28.5633,28.5658,28.5611,28.5593,28.5562,28.5615,28.558,28.5595,28.5537,28.5623,28.5627,28.5547,28.5611,28.5605,28.5562,28.5607,28.548,28.562,28.5587,28.5525,28.5563,28.5625,28.5612,28.5562,28.5529,28.555,28.5569,28.5576,28.5646,28.5602,28.5543,28.5601,28.561,28.5598,28.5592,28.5611,28.56,28.5593,28.5598,28.5616,28.5679,28.5632,28.5609,28.548,28.5552,28.5615,28.559,28.5564,28.5611,28.5555,28.5559,28.5625,28.5639,28.5571,28.5509,28.5568,28.5616,28.551,28.5587,28.5583,28.5685,28.5679,28.5611,28.5621,28.6148],[-17.8345,-17.84,-17.8458,-17.8286,-17.8379,-17.8349,-17.8339,-17.8339,-17.8324,-17.8238,-17.8195,-17.8133,-17.8088,-17.8347,-17.8184,-17.8169,-17.8243,-17.8238,-17.8177,-17.8193,-17.8358,-17.8214,-17.8359,-17.8199,-17.8089,-17.8243,-17.8153,-17.7949,-17.8164,-17.8049,-17.8248,-17.8228,-17.8145,-17.8333,-17.8263,-17.7912,-17.8289,-17.8234,-17.7842,-17.8179,-17.8284,-17.8194,-17.8175,-17.8322,-17.8065,-17.8255,-17.8089,-17.8103,-17.8244,-17.8188,-17.8077,-17.8023,-17.8209,-17.8205,-17.8238,-17.8204,-17.8234,-17.8348,-17.8072,-17.8357,-17.8254,-17.8053,-17.8074,-17.8003,-17.781,-17.831,-17.8338,-17.7923,-17.7929,-17.8291,-17.8255,-17.8146,-17.8137,-17.8224,-17.8252,-17.8342,-17.8351,-17.817,-17.8303,-17.8396,-17.8301,-17.8259,-17.8267,-17.8373,-17.8239,-17.8092,-17.8183,-17.8243,-17.8314,-17.8212,-17.8236,-17.8359,-17.8176,-17.8357,-17.8099,-17.8202,-17.8273,-17.8273,-17.8224,-17.8338,-17.8135,-17.8213,-17.8039,-17.8251,-17.8062,-17.826,-17.8248,-17.8236,-17.8161,-17.8305,-17.8054,-17.8221,-17.828,-17.8142,-17.7898,-17.816,-17.8241,-17.8309,-17.8145,-17.8184,-17.8111,-17.8245,-17.826,-17.8259,-17.8391,-17.8133,-17.8192,-17.8212,-17.8061,-17.8214,-17.811,-17.8117,-17.8223,-17.8315,-17.8114,-17.8006,-17.8175,-17.8296,-17.8283,-17.816,-17.8228,-17.8322,-17.8295,-17.8131,-17.8496,-17.8192,-17.826,-17.8245,-17.8242,-17.8228,-17.8256,-17.8203,-17.8182,-17.8118,-17.8362,-17.8286,-17.834,-17.837,-17.7969,-17.8229,-17.8039,-17.8458,-17.83,-17.844,-17.8323,-17.7924,-17.8236,-17.8284,-17.8083,-17.829,-17.8261,-17.8251,-17.8447,-17.8355,-17.8346,-17.8485,-17.8416,-17.8343,-17.8358,-17.8378,-17.8349,-17.8471,-17.8374,-17.8417,-17.8384,-17.8366,-17.8422,-17.8377,-17.8459,-17.8282,-17.8453,-17.8327,-17.8324,-17.8384,-17.8306,-17.8329,-17.8417,-17.8428,-17.8324,-17.8311,-17.8341,-17.8379,-17.8362,-17.8391,-17.8333,-17.8523,-17.8351,-17.8341,-17.8379,-17.8382,-17.844,-17.8389,-17.8389,-17.8479,-17.8399,-17.8358,-17.843,-17.8489,-17.8389,-17.8329,-17.8677,-17.8382,-17.8327,-17.8348,-17.8479,-17.8285,-17.8351,-17.8366,-17.8359,-17.8448,-17.824,-17.8434,-17.839,-17.836,-17.8368,-17.8378,-17.8359,-17.8297,-17.8453,-17.832,-17.8321,-17.8342,-17.8387,-17.8451,-17.8263,-17.8439,-17.833,-17.8375,-17.8451,-17.8378,-17.8423,-17.8262,-17.8383,-17.8475,-17.833,-17.8358,-17.8349,-17.8366,-17.842,-17.8389,-17.8624,-17.8512,-17.8409,-17.8362,-17.8319,-17.8394,-17.8386,-17.8355,-17.8441,-17.8359,-17.8357,-17.8315,-17.8344,-17.8527,-17.8323,-17.8362,-17.8436,-17.8477,-17.8394,-17.8365,-17.8286,-17.834,-17.837,-17.8419,-17.8359,-17.8487,-17.8516,-17.8402,-17.8309,-17.8391,-17.8426,-17.8289,-17.8298,-17.8349,-17.8391,-17.8414,-17.8315,-17.8302,-17.8346,-17.8296,-17.836,-17.8376,-17.8447,-17.8307,-17.8419,-17.8406,-17.8349,-17.8581,-17.8351,-17.8328,-17.84,-17.8384,-17.8398,-17.8347,-17.8358,-17.8351,-17.8341,-17.8385,-17.8344,-17.842,-17.8332,-17.821,-17.8417,-17.8377,-17.8325,-17.8336,-17.8362,-17.8476,-17.8423,-17.8423,-17.853,-17.901],10,null,null,{"interactive":true,"className":"","stroke":false,"color":["#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#CC4C02","#FED98E","#FE9929","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FE9929","#FE9929","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FE9929","#FE9929","#FE9929","#FE9929","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#CC4C02","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FE9929","#FE9929","#FE9929","#FED98E","#FE9929","#FED98E","#FE9929","#FE9929","#FED98E","#CC4C02","#FE9929","#CC4C02","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#FE9929","#FED98E","#CC4C02","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FFFFD4","#FED98E","#FED98E","#CC4C02","#FED98E","#CC4C02","#FE9929","#FFFFD4","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FE9929","#FE9929","#FED98E","#FE9929","#FE9929","#FE9929","#FED98E","#FE9929","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#FE9929","#FED98E","#FE9929","#FE9929","#FED98E","#FED98E","#FE9929","#FE9929","#FE9929","#FED98E","#FE9929","#FE9929","#FE9929","#FE9929","#FE9929","#FE9929","#FE9929","#FE9929","#FED98E","#FE9929","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FFFFD4","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E"],"weight":5,"opacity":0.5,"fill":true,"fillColor":["#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#CC4C02","#FED98E","#FE9929","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FE9929","#FE9929","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FE9929","#FE9929","#FE9929","#FE9929","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#CC4C02","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FE9929","#FE9929","#FE9929","#FED98E","#FE9929","#FED98E","#FE9929","#FE9929","#FED98E","#CC4C02","#FE9929","#CC4C02","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#FE9929","#FED98E","#CC4C02","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FFFFD4","#FED98E","#FED98E","#CC4C02","#FED98E","#CC4C02","#FE9929","#FFFFD4","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FE9929","#FE9929","#FED98E","#FE9929","#FE9929","#FE9929","#FED98E","#FE9929","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#FE9929","#FED98E","#FE9929","#FE9929","#FED98E","#FED98E","#FE9929","#FE9929","#FE9929","#FED98E","#FE9929","#FE9929","#FE9929","#FE9929","#FE9929","#FE9929","#FE9929","#FE9929","#FED98E","#FE9929","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FFFFD4","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FE9929","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E","#FED98E"],"fillOpacity":0.8},null,null,[3.6,3.6,3.6,4.2,3.6,3.8,3.8,3.8,4.8,3.7,5,3.6,4.3,3.7,3.6,4.8,3.8,3.7,3.7,4.7,4.8,4.4,4.3,3.9,3.6,4.8,3.8,3.6,4.3,4,4.2,4.6,3.6,3.6,4.6,4.3,3.6,5.1,3.9,3.7,3.6,4.3,4.6,4.8,4.7,4.7,3.7,4.2,3.8,4.4,4.7,3.8,5,4.3,5,4.4,4.8,3.5,3.8,3.8,3.7,4.5,4.6,3.7,4.5,3.6,5,4.8,4,3,3.6,3.6,4.6,3.7,2.9,3.6,3.6,5,3.4,5,4.1,2.8,3.5,3.7,3.6,3.9,3.3,4.2,3.6,3.5,3.4,3.5,4.8,3.5,4.6,4.2,3.6,4,4.8,4.2,3.4,4.9,3.6,3.5,4.2,3.7,3.4,3.7,3.2,3.6,3.6,3.7,3.9,3.9,4.9,4.3,3.8,3.9,3.7,3.9,3.7,4.2,4.4,3.8,4.3,3.6,4.8,4.5,3.3,3.8,4.3,4.1,4.6,3.6,4,4.3,4.5,4.3,4.6,4.1,4.5,4,3.8,4.5,4.2,4.4,3.9,3.6,3.8,4.1,4.3,4.1,3.7,3.8,3.9,3.6,3.6,3.6,3.8,4.2,3.6,3.9,3.8,3.6,3.8,4.3,3.7,3.6,3.9,3.7,3.7,3.7,4,3.9,4.2,3.9,3.8,3.6,3.8,3.4,3.6,3.6,4,3.6,3.9,3.9,3.6,4.2,3.6,3.7,3.6,3.6,3.8,3.5,3.6,3.7,3.9,3.7,3.9,3.4,3.8,4.3,4,3.6,3.6,4,3.6,3.7,4.4,3.8,3.5,3.4,3.9,3.3,3.6,3.7,3.6,3.6,3.7,3.6,3.5,3.6,3.6,3.8,3.6,3.4,3.1,4.5,3.5,3.9,3.6,3.6,3.8,3.7,3.6,3.7,3.6,3.6,4.5,3.6,4,3.8,3.4,3.5,3.4,3.6,3.6,3.4,3.6,3.7,3.4,3.5,3.7,4.1,3.6,4,3.6,3.9,3.6,3.3,3.2,3.7,3,3.5,3.6,3.7,3.5,3.4,3.6,3.6,3.6,3.6,3.6,3.9,3.8,4,3.2,3.8,3.5,3.9,3.8,3.9,3.6,3.4,3.6,3.9,3.9,4,3.6,3.6,2.5,3.8,3.5,3.6,3.6,3.6,3.9,3.9,3.7,3.9,3.6,3.7,3.7,3.7,3.6,3.8,3.7,3.9,3.6,3.6,3.6,4,4,3.6,3.6,3.7,3.7,3.6,3.6,4,3.6,3.8,3.6,3.7,3.9,3.7,3.6,3.6,3.7,3.6,3.6,3.8],null,["Date: 2021-12-10<br/>Magnitude: 3.6<br/>Depth: 10","Date: 2021-12-08<br/>Magnitude: 3.6<br/>Depth: 37.4","Date: 2021-12-07<br/>Magnitude: 3.6<br/>Depth: 12.4","Date: 2021-12-02<br/>Magnitude: 4.2<br/>Depth: 11.3","Date: 2021-12-01<br/>Magnitude: 3.6<br/>Depth: 9.6","Date: 2021-12-01<br/>Magnitude: 3.8<br/>Depth: 10.9","Date: 2021-12-01<br/>Magnitude: 3.8<br/>Depth: 12","Date: 2021-11-30<br/>Magnitude: 3.8<br/>Depth: 10.6","Date: 2021-11-30<br/>Magnitude: 4.8<br/>Depth: 36.9","Date: 2021-11-29<br/>Magnitude: 3.7<br/>Depth: 11.4","Date: 2021-11-29<br/>Magnitude: 5<br/>Depth: 34.8","Date: 2021-11-28<br/>Magnitude: 3.6<br/>Depth: 34.2","Date: 2021-11-28<br/>Magnitude: 4.3<br/>Depth: 32.6","Date: 2021-11-28<br/>Magnitude: 3.7<br/>Depth: 34.1","Date: 2021-11-27<br/>Magnitude: 3.6<br/>Depth: 36.1","Date: 2021-11-25<br/>Magnitude: 4.8<br/>Depth: 35","Date: 2021-11-24<br/>Magnitude: 3.8<br/>Depth: 35.3","Date: 2021-11-23<br/>Magnitude: 3.7<br/>Depth: 35","Date: 2021-11-23<br/>Magnitude: 3.7<br/>Depth: 36.4","Date: 2021-11-23<br/>Magnitude: 4.7<br/>Depth: 38","Date: 2021-11-23<br/>Magnitude: 4.8<br/>Depth: 38.9","Date: 2021-11-23<br/>Magnitude: 4.4<br/>Depth: 34.4","Date: 2021-11-22<br/>Magnitude: 4.3<br/>Depth: 38.3","Date: 2021-11-22<br/>Magnitude: 3.9<br/>Depth: 35.8","Date: 2021-11-22<br/>Magnitude: 3.6<br/>Depth: 35.7","Date: 2021-11-22<br/>Magnitude: 4.8<br/>Depth: 36.4","Date: 2021-11-22<br/>Magnitude: 3.8<br/>Depth: 35.9","Date: 2021-11-22<br/>Magnitude: 3.6<br/>Depth: 33.2","Date: 2021-11-22<br/>Magnitude: 4.3<br/>Depth: 34.2","Date: 2021-11-21<br/>Magnitude: 4<br/>Depth: 38.3","Date: 2021-11-20<br/>Magnitude: 4.2<br/>Depth: 34.8","Date: 2021-11-20<br/>Magnitude: 4.6<br/>Depth: 36.5","Date: 2021-11-20<br/>Magnitude: 3.6<br/>Depth: 33.2","Date: 2021-11-20<br/>Magnitude: 3.6<br/>Depth: 10.2","Date: 2021-11-20<br/>Magnitude: 4.6<br/>Depth: 36.6","Date: 2021-11-19<br/>Magnitude: 4.3<br/>Depth: 32.1","Date: 2021-11-19<br/>Magnitude: 3.6<br/>Depth: 39.6","Date: 2021-11-19<br/>Magnitude: 5.1<br/>Depth: 36","Date: 2021-11-18<br/>Magnitude: 3.9<br/>Depth: 31.2","Date: 2021-11-18<br/>Magnitude: 3.7<br/>Depth: 40.4","Date: 2021-11-18<br/>Magnitude: 3.6<br/>Depth: 11.3","Date: 2021-11-17<br/>Magnitude: 4.3<br/>Depth: 40.6","Date: 2021-11-17<br/>Magnitude: 4.6<br/>Depth: 38.9","Date: 2021-11-17<br/>Magnitude: 4.8<br/>Depth: 35.4","Date: 2021-11-17<br/>Magnitude: 4.7<br/>Depth: 36.5","Date: 2021-11-17<br/>Magnitude: 4.7<br/>Depth: 35.4","Date: 2021-11-16<br/>Magnitude: 3.7<br/>Depth: 38.6","Date: 2021-11-16<br/>Magnitude: 4.2<br/>Depth: 36","Date: 2021-11-16<br/>Magnitude: 3.8<br/>Depth: 37.6","Date: 2021-11-15<br/>Magnitude: 4.4<br/>Depth: 37.6","Date: 2021-11-14<br/>Magnitude: 4.7<br/>Depth: 37","Date: 2021-11-14<br/>Magnitude: 3.8<br/>Depth: 37.2","Date: 2021-11-13<br/>Magnitude: 5<br/>Depth: 38.3","Date: 2021-11-12<br/>Magnitude: 4.3<br/>Depth: 37.7","Date: 2021-11-11<br/>Magnitude: 5<br/>Depth: 35.9","Date: 2021-11-10<br/>Magnitude: 4.4<br/>Depth: 36.3","Date: 2021-11-10<br/>Magnitude: 4.8<br/>Depth: 34.5","Date: 2021-11-10<br/>Magnitude: 3.5<br/>Depth: 33.4","Date: 2021-11-10<br/>Magnitude: 3.8<br/>Depth: 33.8","Date: 2021-11-09<br/>Magnitude: 3.8<br/>Depth: 38.4","Date: 2021-11-09<br/>Magnitude: 3.7<br/>Depth: 13.1","Date: 2021-11-07<br/>Magnitude: 4.5<br/>Depth: 37.5","Date: 2021-11-07<br/>Magnitude: 4.6<br/>Depth: 37.3","Date: 2021-11-06<br/>Magnitude: 3.7<br/>Depth: 37.3","Date: 2021-11-04<br/>Magnitude: 4.5<br/>Depth: 35","Date: 2021-11-03<br/>Magnitude: 3.6<br/>Depth: 11.6","Date: 2021-11-03<br/>Magnitude: 5<br/>Depth: 34.6","Date: 2021-11-03<br/>Magnitude: 4.8<br/>Depth: 35.6","Date: 2021-11-03<br/>Magnitude: 4<br/>Depth: 35.9","Date: 2021-11-02<br/>Magnitude: 3<br/>Depth: 11.4","Date: 2021-11-02<br/>Magnitude: 3.6<br/>Depth: 12.1","Date: 2021-11-02<br/>Magnitude: 3.6<br/>Depth: 35.1","Date: 2021-11-01<br/>Magnitude: 4.6<br/>Depth: 36","Date: 2021-11-01<br/>Magnitude: 3.7<br/>Depth: 10.9","Date: 2021-11-01<br/>Magnitude: 2.9<br/>Depth: 34.9","Date: 2021-11-01<br/>Magnitude: 3.6<br/>Depth: 12.4","Date: 2021-11-01<br/>Magnitude: 3.6<br/>Depth: 11.3","Date: 2021-10-31<br/>Magnitude: 5<br/>Depth: 37.8","Date: 2021-10-31<br/>Magnitude: 3.4<br/>Depth: 10","Date: 2021-10-30<br/>Magnitude: 5<br/>Depth: 34.7","Date: 2021-10-30<br/>Magnitude: 4.1<br/>Depth: 36.9","Date: 2021-10-29<br/>Magnitude: 2.8<br/>Depth: 11.3","Date: 2021-10-29<br/>Magnitude: 3.5<br/>Depth: 11.3","Date: 2021-10-29<br/>Magnitude: 3.7<br/>Depth: 9.8","Date: 2021-10-29<br/>Magnitude: 3.6<br/>Depth: 11.1","Date: 2021-10-28<br/>Magnitude: 3.9<br/>Depth: 11.2","Date: 2021-10-28<br/>Magnitude: 3.3<br/>Depth: 11.3","Date: 2021-10-28<br/>Magnitude: 4.2<br/>Depth: 38.1","Date: 2021-10-28<br/>Magnitude: 3.6<br/>Depth: 11.6","Date: 2021-10-28<br/>Magnitude: 3.5<br/>Depth: 12.1","Date: 2021-10-27<br/>Magnitude: 3.4<br/>Depth: 10","Date: 2021-10-27<br/>Magnitude: 3.5<br/>Depth: 36","Date: 2021-10-27<br/>Magnitude: 4.8<br/>Depth: 37.2","Date: 2021-10-27<br/>Magnitude: 3.5<br/>Depth: 10.7","Date: 2021-10-27<br/>Magnitude: 4.6<br/>Depth: 37.5","Date: 2021-10-27<br/>Magnitude: 4.2<br/>Depth: 36.9","Date: 2021-10-27<br/>Magnitude: 3.6<br/>Depth: 11","Date: 2021-10-27<br/>Magnitude: 4<br/>Depth: 12.6","Date: 2021-10-26<br/>Magnitude: 4.8<br/>Depth: 34.8","Date: 2021-10-26<br/>Magnitude: 4.2<br/>Depth: 35.7","Date: 2021-10-26<br/>Magnitude: 3.4<br/>Depth: 34.6","Date: 2021-10-26<br/>Magnitude: 4.9<br/>Depth: 34.2","Date: 2021-10-26<br/>Magnitude: 3.6<br/>Depth: 31.6","Date: 2021-10-26<br/>Magnitude: 3.5<br/>Depth: 13.1","Date: 2021-10-26<br/>Magnitude: 4.2<br/>Depth: 35.6","Date: 2021-10-26<br/>Magnitude: 3.7<br/>Depth: 12.5","Date: 2021-10-25<br/>Magnitude: 3.4<br/>Depth: 11.4","Date: 2021-10-25<br/>Magnitude: 3.7<br/>Depth: 12.4","Date: 2021-10-25<br/>Magnitude: 3.2<br/>Depth: 10.8","Date: 2021-10-24<br/>Magnitude: 3.6<br/>Depth: 11.4","Date: 2021-10-24<br/>Magnitude: 3.6<br/>Depth: 35.9","Date: 2021-10-24<br/>Magnitude: 3.7<br/>Depth: 10.6","Date: 2021-10-24<br/>Magnitude: 3.9<br/>Depth: 11.1","Date: 2021-10-24<br/>Magnitude: 3.9<br/>Depth: 35.8","Date: 2021-10-23<br/>Magnitude: 4.9<br/>Depth: 38.1","Date: 2021-10-23<br/>Magnitude: 4.3<br/>Depth: 36.4","Date: 2021-10-23<br/>Magnitude: 3.8<br/>Depth: 36.5","Date: 2021-10-23<br/>Magnitude: 3.9<br/>Depth: 35.3","Date: 2021-10-22<br/>Magnitude: 3.7<br/>Depth: 36.2","Date: 2021-10-22<br/>Magnitude: 3.9<br/>Depth: 37.4","Date: 2021-10-22<br/>Magnitude: 3.7<br/>Depth: 11.8","Date: 2021-10-22<br/>Magnitude: 4.2<br/>Depth: 37.8","Date: 2021-10-21<br/>Magnitude: 4.4<br/>Depth: 32.9","Date: 2021-10-21<br/>Magnitude: 3.8<br/>Depth: 10.5","Date: 2021-10-21<br/>Magnitude: 4.3<br/>Depth: 37.1","Date: 2021-10-20<br/>Magnitude: 3.6<br/>Depth: 11.2","Date: 2021-10-19<br/>Magnitude: 4.8<br/>Depth: 38.7","Date: 2021-10-19<br/>Magnitude: 4.5<br/>Depth: 35.8","Date: 2021-10-19<br/>Magnitude: 3.3<br/>Depth: 33.2","Date: 2021-10-18<br/>Magnitude: 3.8<br/>Depth: 12.6","Date: 2021-10-18<br/>Magnitude: 4.3<br/>Depth: 37","Date: 2021-10-18<br/>Magnitude: 4.1<br/>Depth: 37.7","Date: 2021-10-17<br/>Magnitude: 4.6<br/>Depth: 35.8","Date: 2021-10-17<br/>Magnitude: 3.6<br/>Depth: 35.6","Date: 2021-10-17<br/>Magnitude: 4<br/>Depth: 35.2","Date: 2021-10-17<br/>Magnitude: 4.3<br/>Depth: 35.3","Date: 2021-10-16<br/>Magnitude: 4.5<br/>Depth: 34.4","Date: 2021-10-16<br/>Magnitude: 4.3<br/>Depth: 36.7","Date: 2021-10-16<br/>Magnitude: 4.6<br/>Depth: 37","Date: 2021-10-15<br/>Magnitude: 4.1<br/>Depth: 37.2","Date: 2021-10-15<br/>Magnitude: 4.5<br/>Depth: 35.8","Date: 2021-10-15<br/>Magnitude: 4<br/>Depth: 35","Date: 2021-10-14<br/>Magnitude: 3.8<br/>Depth: 36.6","Date: 2021-10-14<br/>Magnitude: 4.5<br/>Depth: 37.4","Date: 2021-10-14<br/>Magnitude: 4.2<br/>Depth: 37.3","Date: 2021-10-13<br/>Magnitude: 4.4<br/>Depth: 35.7","Date: 2021-10-13<br/>Magnitude: 3.9<br/>Depth: 37.4","Date: 2021-10-12<br/>Magnitude: 3.6<br/>Depth: 37.8","Date: 2021-10-12<br/>Magnitude: 3.8<br/>Depth: 38.1","Date: 2021-10-12<br/>Magnitude: 4.1<br/>Depth: 37.2","Date: 2021-10-10<br/>Magnitude: 4.3<br/>Depth: 38.1","Date: 2021-10-10<br/>Magnitude: 4.1<br/>Depth: 36.6","Date: 2021-10-10<br/>Magnitude: 3.7<br/>Depth: 37.1","Date: 2021-10-10<br/>Magnitude: 3.8<br/>Depth: 33.8","Date: 2021-10-09<br/>Magnitude: 3.9<br/>Depth: 35.6","Date: 2021-10-09<br/>Magnitude: 3.6<br/>Depth: 38","Date: 2021-10-09<br/>Magnitude: 3.6<br/>Depth: 13.4","Date: 2021-10-09<br/>Magnitude: 3.6<br/>Depth: 12.4","Date: 2021-10-09<br/>Magnitude: 3.8<br/>Depth: 30.8","Date: 2021-10-08<br/>Magnitude: 4.2<br/>Depth: 38.4","Date: 2021-10-08<br/>Magnitude: 3.6<br/>Depth: 37.7","Date: 2021-10-08<br/>Magnitude: 3.9<br/>Depth: 12.3","Date: 2021-10-08<br/>Magnitude: 3.8<br/>Depth: 37.7","Date: 2021-10-07<br/>Magnitude: 3.6<br/>Depth: 10.5","Date: 2021-10-07<br/>Magnitude: 3.8<br/>Depth: 36.6","Date: 2021-10-07<br/>Magnitude: 4.3<br/>Depth: 34.8","Date: 2021-10-06<br/>Magnitude: 3.7<br/>Depth: 36.5","Date: 2021-10-05<br/>Magnitude: 3.6<br/>Depth: 37.3","Date: 2021-10-05<br/>Magnitude: 3.9<br/>Depth: 37.6","Date: 2021-10-04<br/>Magnitude: 3.7<br/>Depth: 10.5","Date: 2021-10-03<br/>Magnitude: 3.7<br/>Depth: 12","Date: 2021-12-10<br/>Magnitude: 3.7<br/>Depth: 16.6","Date: 2021-12-07<br/>Magnitude: 4<br/>Depth: 13.9","Date: 2021-12-05<br/>Magnitude: 3.9<br/>Depth: 14.1","Date: 2021-12-02<br/>Magnitude: 4.2<br/>Depth: 11","Date: 2021-12-01<br/>Magnitude: 3.9<br/>Depth: 10.2","Date: 2021-12-01<br/>Magnitude: 3.8<br/>Depth: 10.8","Date: 2021-12-01<br/>Magnitude: 3.6<br/>Depth: 10.9","Date: 2021-12-01<br/>Magnitude: 3.8<br/>Depth: 12.2","Date: 2021-12-01<br/>Magnitude: 3.4<br/>Depth: 11","Date: 2021-12-01<br/>Magnitude: 3.6<br/>Depth: 11.3","Date: 2021-12-01<br/>Magnitude: 3.6<br/>Depth: 12.7","Date: 2021-12-01<br/>Magnitude: 4<br/>Depth: 11.2","Date: 2021-11-30<br/>Magnitude: 3.6<br/>Depth: 10.4","Date: 2021-11-30<br/>Magnitude: 3.9<br/>Depth: 10.1","Date: 2021-11-30<br/>Magnitude: 3.9<br/>Depth: 11","Date: 2021-11-30<br/>Magnitude: 3.6<br/>Depth: 10.6","Date: 2021-11-30<br/>Magnitude: 4.2<br/>Depth: 12.9","Date: 2021-11-30<br/>Magnitude: 3.6<br/>Depth: 11.1","Date: 2021-11-30<br/>Magnitude: 3.7<br/>Depth: 14","Date: 2021-11-30<br/>Magnitude: 3.6<br/>Depth: 11.9","Date: 2021-11-30<br/>Magnitude: 3.6<br/>Depth: 13","Date: 2021-11-30<br/>Magnitude: 3.8<br/>Depth: 12.1","Date: 2021-11-29<br/>Magnitude: 3.5<br/>Depth: 11.3","Date: 2021-11-29<br/>Magnitude: 3.6<br/>Depth: 11.1","Date: 2021-11-29<br/>Magnitude: 3.7<br/>Depth: 12.5","Date: 2021-11-25<br/>Magnitude: 3.9<br/>Depth: 14.2","Date: 2021-11-25<br/>Magnitude: 3.7<br/>Depth: 33.6","Date: 2021-11-25<br/>Magnitude: 3.9<br/>Depth: 11.2","Date: 2021-11-24<br/>Magnitude: 3.4<br/>Depth: 12.8","Date: 2021-11-22<br/>Magnitude: 3.8<br/>Depth: 37.4","Date: 2021-11-21<br/>Magnitude: 4.3<br/>Depth: 35.7","Date: 2021-11-20<br/>Magnitude: 4<br/>Depth: 10.3","Date: 2021-11-19<br/>Magnitude: 3.6<br/>Depth: 9","Date: 2021-11-19<br/>Magnitude: 3.6<br/>Depth: 12.2","Date: 2021-11-19<br/>Magnitude: 4<br/>Depth: 34.4","Date: 2021-11-18<br/>Magnitude: 3.6<br/>Depth: 13.1","Date: 2021-11-18<br/>Magnitude: 3.7<br/>Depth: 33.1","Date: 2021-11-18<br/>Magnitude: 4.4<br/>Depth: 34.1","Date: 2021-11-18<br/>Magnitude: 3.8<br/>Depth: 10.9","Date: 2021-11-17<br/>Magnitude: 3.5<br/>Depth: 10.1","Date: 2021-11-17<br/>Magnitude: 3.4<br/>Depth: 12.5","Date: 2021-11-17<br/>Magnitude: 3.9<br/>Depth: 12.1","Date: 2021-11-17<br/>Magnitude: 3.3<br/>Depth: 11.3","Date: 2021-11-17<br/>Magnitude: 3.6<br/>Depth: 10.7","Date: 2021-11-17<br/>Magnitude: 3.7<br/>Depth: 11","Date: 2021-11-17<br/>Magnitude: 3.6<br/>Depth: 10.5","Date: 2021-11-17<br/>Magnitude: 3.6<br/>Depth: 10.7","Date: 2021-11-17<br/>Magnitude: 3.7<br/>Depth: 10.9","Date: 2021-11-17<br/>Magnitude: 3.6<br/>Depth: 11.4","Date: 2021-11-17<br/>Magnitude: 3.5<br/>Depth: 33.6","Date: 2021-11-17<br/>Magnitude: 3.6<br/>Depth: 11.4","Date: 2021-11-17<br/>Magnitude: 3.6<br/>Depth: 9.9","Date: 2021-11-17<br/>Magnitude: 3.8<br/>Depth: 14.6","Date: 2021-11-17<br/>Magnitude: 3.6<br/>Depth: 36.5","Date: 2021-11-16<br/>Magnitude: 3.4<br/>Depth: 13","Date: 2021-11-16<br/>Magnitude: 3.1<br/>Depth: 12.8","Date: 2021-11-14<br/>Magnitude: 4.5<br/>Depth: 37.1","Date: 2021-11-11<br/>Magnitude: 3.5<br/>Depth: 13.1","Date: 2021-11-10<br/>Magnitude: 3.9<br/>Depth: 13.6","Date: 2021-11-10<br/>Magnitude: 3.6<br/>Depth: 32.7","Date: 2021-11-10<br/>Magnitude: 3.6<br/>Depth: 33.6","Date: 2021-11-10<br/>Magnitude: 3.8<br/>Depth: 10.4","Date: 2021-11-10<br/>Magnitude: 3.7<br/>Depth: 13.5","Date: 2021-11-09<br/>Magnitude: 3.6<br/>Depth: 12.8","Date: 2021-11-08<br/>Magnitude: 3.7<br/>Depth: 14.2","Date: 2021-11-08<br/>Magnitude: 3.6<br/>Depth: 11.1","Date: 2021-11-07<br/>Magnitude: 3.6<br/>Depth: 12.8","Date: 2021-11-06<br/>Magnitude: 4.5<br/>Depth: 35.6","Date: 2021-11-06<br/>Magnitude: 3.6<br/>Depth: 12.2","Date: 2021-11-06<br/>Magnitude: 4<br/>Depth: 11.4","Date: 2021-11-05<br/>Magnitude: 3.8<br/>Depth: 12.4","Date: 2021-11-04<br/>Magnitude: 3.4<br/>Depth: 13.6","Date: 2021-11-04<br/>Magnitude: 3.5<br/>Depth: 15","Date: 2021-11-04<br/>Magnitude: 3.4<br/>Depth: 11.2","Date: 2021-11-04<br/>Magnitude: 3.6<br/>Depth: 10.8","Date: 2021-11-04<br/>Magnitude: 3.6<br/>Depth: 10.5","Date: 2021-11-04<br/>Magnitude: 3.4<br/>Depth: 12.3","Date: 2021-11-03<br/>Magnitude: 3.6<br/>Depth: 10.8","Date: 2021-11-03<br/>Magnitude: 3.7<br/>Depth: 14.2","Date: 2021-11-02<br/>Magnitude: 3.4<br/>Depth: 10.7","Date: 2021-11-02<br/>Magnitude: 3.5<br/>Depth: 12.7","Date: 2021-11-02<br/>Magnitude: 3.7<br/>Depth: 12.5","Date: 2021-11-02<br/>Magnitude: 4.1<br/>Depth: 12.5","Date: 2021-11-02<br/>Magnitude: 3.6<br/>Depth: 13.9","Date: 2021-11-01<br/>Magnitude: 4<br/>Depth: 10.3","Date: 2021-11-01<br/>Magnitude: 3.6<br/>Depth: 10.7","Date: 2021-11-01<br/>Magnitude: 3.9<br/>Depth: 10.6","Date: 2021-11-01<br/>Magnitude: 3.6<br/>Depth: 11.4","Date: 2021-10-31<br/>Magnitude: 3.3<br/>Depth: 12.9","Date: 2021-10-31<br/>Magnitude: 3.2<br/>Depth: 11.1","Date: 2021-10-30<br/>Magnitude: 3.7<br/>Depth: 9.8","Date: 2021-10-30<br/>Magnitude: 3<br/>Depth: 9.8","Date: 2021-10-29<br/>Magnitude: 3.5<br/>Depth: 11.6","Date: 2021-10-29<br/>Magnitude: 3.6<br/>Depth: 12.7","Date: 2021-10-28<br/>Magnitude: 3.7<br/>Depth: 13.3","Date: 2021-10-28<br/>Magnitude: 3.5<br/>Depth: 13.1","Date: 2021-10-28<br/>Magnitude: 3.4<br/>Depth: 13.6","Date: 2021-10-28<br/>Magnitude: 3.6<br/>Depth: 11.6","Date: 2021-10-28<br/>Magnitude: 3.6<br/>Depth: 13.9","Date: 2021-10-28<br/>Magnitude: 3.6<br/>Depth: 10.2","Date: 2021-10-28<br/>Magnitude: 3.6<br/>Depth: 12.8","Date: 2021-10-27<br/>Magnitude: 3.6<br/>Depth: 11.2","Date: 2021-10-27<br/>Magnitude: 3.9<br/>Depth: 13","Date: 2021-10-27<br/>Magnitude: 3.8<br/>Depth: 13.7","Date: 2021-10-27<br/>Magnitude: 4<br/>Depth: 12.2","Date: 2021-10-27<br/>Magnitude: 3.2<br/>Depth: 10.3","Date: 2021-10-27<br/>Magnitude: 3.8<br/>Depth: 13.5","Date: 2021-10-27<br/>Magnitude: 3.5<br/>Depth: 14.2","Date: 2021-10-27<br/>Magnitude: 3.9<br/>Depth: 10.6","Date: 2021-10-27<br/>Magnitude: 3.8<br/>Depth: 10.7","Date: 2021-10-26<br/>Magnitude: 3.9<br/>Depth: 12.7","Date: 2021-10-26<br/>Magnitude: 3.6<br/>Depth: 10.1","Date: 2021-10-25<br/>Magnitude: 3.4<br/>Depth: 12.6","Date: 2021-10-25<br/>Magnitude: 3.6<br/>Depth: 13","Date: 2021-10-24<br/>Magnitude: 3.9<br/>Depth: 11.3","Date: 2021-10-24<br/>Magnitude: 3.9<br/>Depth: 11","Date: 2021-10-24<br/>Magnitude: 4<br/>Depth: 10.3","Date: 2021-10-24<br/>Magnitude: 3.6<br/>Depth: 10.2","Date: 2021-10-24<br/>Magnitude: 3.6<br/>Depth: 11.4","Date: 2021-10-24<br/>Magnitude: 2.5<br/>Depth: 10.4","Date: 2021-10-24<br/>Magnitude: 3.8<br/>Depth: 13.9","Date: 2021-10-24<br/>Magnitude: 3.5<br/>Depth: 10.4","Date: 2021-10-24<br/>Magnitude: 3.6<br/>Depth: 13","Date: 2021-10-24<br/>Magnitude: 3.6<br/>Depth: 9.6","Date: 2021-10-23<br/>Magnitude: 3.6<br/>Depth: 11.2","Date: 2021-10-23<br/>Magnitude: 3.9<br/>Depth: 11.1","Date: 2021-10-23<br/>Magnitude: 3.9<br/>Depth: 13.4","Date: 2021-10-23<br/>Magnitude: 3.7<br/>Depth: 11.6","Date: 2021-10-23<br/>Magnitude: 3.9<br/>Depth: 11.4","Date: 2021-10-22<br/>Magnitude: 3.6<br/>Depth: 11.3","Date: 2021-10-22<br/>Magnitude: 3.7<br/>Depth: 10.6","Date: 2021-10-22<br/>Magnitude: 3.7<br/>Depth: 12","Date: 2021-10-22<br/>Magnitude: 3.7<br/>Depth: 12.6","Date: 2021-10-22<br/>Magnitude: 3.6<br/>Depth: 13.9","Date: 2021-10-21<br/>Magnitude: 3.8<br/>Depth: 11.6","Date: 2021-10-21<br/>Magnitude: 3.7<br/>Depth: 13.6","Date: 2021-10-19<br/>Magnitude: 3.9<br/>Depth: 37.5","Date: 2021-10-18<br/>Magnitude: 3.6<br/>Depth: 36.8","Date: 2021-10-17<br/>Magnitude: 3.6<br/>Depth: 12.3","Date: 2021-10-16<br/>Magnitude: 3.6<br/>Depth: 35.3","Date: 2021-10-15<br/>Magnitude: 4<br/>Depth: 12.9","Date: 2021-10-15<br/>Magnitude: 4<br/>Depth: 13.3","Date: 2021-10-14<br/>Magnitude: 3.6<br/>Depth: 10.5","Date: 2021-10-13<br/>Magnitude: 3.6<br/>Depth: 13.3","Date: 2021-10-12<br/>Magnitude: 3.7<br/>Depth: 12.7","Date: 2021-10-12<br/>Magnitude: 3.7<br/>Depth: 13.3","Date: 2021-10-11<br/>Magnitude: 3.6<br/>Depth: 13.2","Date: 2021-10-11<br/>Magnitude: 3.6<br/>Depth: 13.7","Date: 2021-10-10<br/>Magnitude: 4<br/>Depth: 37.5","Date: 2021-10-09<br/>Magnitude: 3.6<br/>Depth: 11.3","Date: 2021-10-09<br/>Magnitude: 3.8<br/>Depth: 35.9","Date: 2021-10-09<br/>Magnitude: 3.6<br/>Depth: 13.2","Date: 2021-10-06<br/>Magnitude: 3.7<br/>Depth: 11.4","Date: 2021-10-06<br/>Magnitude: 3.9<br/>Depth: 13.2","Date: 2021-10-06<br/>Magnitude: 3.7<br/>Depth: 12.1","Date: 2021-10-06<br/>Magnitude: 3.6<br/>Depth: 36.9","Date: 2021-10-05<br/>Magnitude: 3.6<br/>Depth: 11.6","Date: 2021-10-04<br/>Magnitude: 3.7<br/>Depth: 10.5","Date: 2021-10-02<br/>Magnitude: 3.6<br/>Depth: 11.3","Date: 2021-10-01<br/>Magnitude: 3.6<br/>Depth: 10.4","Date: 2021-09-20<br/>Magnitude: 3.8<br/>Depth: 0.3"],{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"13px","textOnly":false,"style":{"font-weight":"normal","padding":"3px 8px"},"className":"","sticky":true},null]},{"method":"addProviderTiles","args":["Esri.WorldImagery",null,null,{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addLegend","args":[{"colors":["#FFFFD4","#FED98E","#FE9929","#CC4C02"],"labels":["2 – 3","3 – 4","4 – 5","5 – 6"],"na_color":null,"na_label":"NA","opacity":0.9,"position":"bottomleft","type":"bin","title":"Magnitude","extra":null,"layerId":null,"className":"info legend","group":null}]}],"limits":{"lat":[28.5464,28.6168],"lng":[-17.901,-17.781]}},"evals":[],"jsHooks":[]}</script>
<script type="application/htmlwidget-sizing" data-for="htmlwidget-130d7262d430cbfe098d">{"viewer":{"width":"100%","height":400,"padding":0,"fill":true},"browser":{"width":"100%","height":400,"padding":0,"fill":true}}</script>
</body>
</html>