Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

some wax leaflet issues fixed

  • Loading branch information...
commit e0c8c6f24074b591fcd4bc9ed2e5e6d6ebfc319f 1 parent afe809d
@xavijam xavijam authored
View
2  examples/custom-popup.html
@@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>CartoDB + Leaflet | Custom infowindow</title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
- <style>body,html {width:100%; height:100%; margin:0; padding:0; overflow:hidden;} #map {height:100%;}</style>
+ <style>body,html {width:100%; height:100%; margin:0; padding:0; overflow:hidden;} #map {width:100%; height:100%;}</style>
<link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.ie.css" /><![endif]-->
<link href="../css/style.css" rel="stylesheet" type="text/css">
View
19 js/wax.leaf.js
@@ -98,10 +98,11 @@
, stopPropagation = 'stopPropagation'
, createStopPropagation = function (event) {
return function () {
- if (event[stopPropagation])
+ if (event[stopPropagation]) {
event[stopPropagation]()
- else
- event.cancelBubble = true
+ } else {
+ if (typeof event.cancelBubble !== 'unknown') { event.cancelBubble = true; }
+ }
}
}
, createStop = function (synEvent) {
@@ -3164,11 +3165,15 @@ wax.u = {
var htmlComputed = document.body.parentNode.currentStyle;
var topMargin = parseInt(htmlComputed.marginTop, 10) || 0;
var leftMargin = parseInt(htmlComputed.marginLeft, 10) || 0;
+ // return {
+ // x: e.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) -
+ // (doc && doc.clientLeft || body && body.clientLeft || 0) + leftMargin,
+ // y: e.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) -
+ // (doc && doc.clientTop || body && body.clientTop || 0) + topMargin
+ // };
return {
- x: e.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) -
- (doc && doc.clientLeft || body && body.clientLeft || 0) + leftMargin,
- y: e.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) -
- (doc && doc.clientTop || body && body.clientTop || 0) + topMargin
+ x: e.clientX,
+ y: e.clientY
};
} else if (e.touches && e.touches.length === 1) {
// Touch browsers
View
6 js/wax.leaf.min-6.2.3-touched.js
@@ -1,3 +1,3 @@
-/*6.2.3-touched*/!function(name,context,definition){if(typeof module!=="undefined"){module.exports=definition(name,context)}else{if(typeof define==="function"&&typeof define.amd==="object"){define(definition)}else{context[name]=definition(name,context)}}}("bean",this,function(name,context){var win=window,old=context[name],overOut=/over|out/,namespaceRegex=/[^\.]*(?=\..*)\.|.*/,nameRegex=/\..*/,addEvent="addEventListener",attachEvent="attachEvent",removeEvent="removeEventListener",detachEvent="detachEvent",doc=document||{},root=doc.documentElement||{},W3C_MODEL=root[addEvent],eventSupport=W3C_MODEL?addEvent:attachEvent,slice=Array.prototype.slice,mouseTypeRegex=/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,mouseWheelTypeRegex=/mouse.*(wheel|scroll)/i,textTypeRegex=/^text/i,touchTypeRegex=/^touch|^gesture/i,ONE={one:1},nativeEvents=(function(hash,events,i){for(i=0;i<events.length;i++){hash[events[i]]=1}return hash})({},("click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange error abort scroll "+(W3C_MODEL?"show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend message readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ":"")).split(" ")),customEvents=(function(){function isDescendant(parent,node){while((node=node.parentNode)!==null){if(node===parent){return true}}return false}function check(event){var related=event.relatedTarget;if(!related){return related===null}return(related!==this&&related.prefix!=="xul"&&!/document/.test(this.toString())&&!isDescendant(this,related))}return{mouseenter:{base:"mouseover",condition:check},mouseleave:{base:"mouseout",condition:check},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}})(),fixEvent=(function(){var commonProps="altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which".split(" "),mouseProps=commonProps.concat("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" ")),mouseWheelProps=mouseProps.concat("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis".split(" ")),keyProps=commonProps.concat("char charCode key keyCode keyIdentifier keyLocation".split(" ")),textProps=commonProps.concat(["data"]),touchProps=commonProps.concat("touches targetTouches changedTouches scale rotation".split(" ")),preventDefault="preventDefault",createPreventDefault=function(event){return function(){if(event[preventDefault]){event[preventDefault]()}else{event.returnValue=false}}},stopPropagation="stopPropagation",createStopPropagation=function(event){return function(){if(event[stopPropagation]){event[stopPropagation]()}else{event.cancelBubble=true}}},createStop=function(synEvent){return function(){synEvent[preventDefault]();synEvent[stopPropagation]();synEvent.stopped=true}},copyProps=function(event,result,props){var i,p;for(i=props.length;i--;){p=props[i];if(!(p in result)&&p in event){result[p]=event[p]}}};return function(event,isNative){var result={originalEvent:event,isNative:isNative};if(!event){return result}var props,type=event.type,target=event.target||event.srcElement;result[preventDefault]=createPreventDefault(event);result[stopPropagation]=createStopPropagation(event);result.stop=createStop(result);result.target=target&&target.nodeType===3?target.parentNode:target;if(isNative){if(type.indexOf("key")!==-1){props=keyProps;result.keyCode=event.which||event.keyCode}else{if(mouseTypeRegex.test(type)){props=mouseProps;result.rightClick=event.which===3||event.button===2;result.pos={x:0,y:0};if(event.pageX||event.pageY){result.clientX=event.pageX;result.clientY=event.pageY}else{if(event.clientX||event.clientY){result.clientX=event.clientX+doc.body.scrollLeft+root.scrollLeft;result.clientY=event.clientY+doc.body.scrollTop+root.scrollTop}}if(overOut.test(type)){result.relatedTarget=event.relatedTarget||event[(type==="mouseover"?"from":"to")+"Element"]}}else{if(touchTypeRegex.test(type)){props=touchProps}else{if(mouseWheelTypeRegex.test(type)){props=mouseWheelProps}else{if(textTypeRegex.test(type)){props=textProps}}}}}copyProps(event,result,props||commonProps)}return result}})(),targetElement=function(element,isNative){return !W3C_MODEL&&!isNative&&(element===doc||element===win)?root:element},RegEntry=(function(){function entry(element,type,handler,original,namespaces){this.element=element;this.type=type;this.handler=handler;this.original=original;this.namespaces=namespaces;this.custom=customEvents[type];this.isNative=nativeEvents[type]&&element[eventSupport];this.eventType=W3C_MODEL||this.isNative?type:"propertychange";this.customType=!W3C_MODEL&&!this.isNative&&type;this.target=targetElement(element,this.isNative);this.eventSupport=this.target[eventSupport]}entry.prototype={inNamespaces:function(checkNamespaces){var i,j;if(!checkNamespaces){return true}if(!this.namespaces){return false}for(i=checkNamespaces.length;i--;){for(j=this.namespaces.length;j--;){if(checkNamespaces[i]===this.namespaces[j]){return true}}}return false},matches:function(checkElement,checkOriginal,checkHandler){return this.element===checkElement&&(!checkOriginal||this.original===checkOriginal)&&(!checkHandler||this.handler===checkHandler)}};return entry})(),registry=(function(){var map={},forAll=function(element,type,original,handler,fn){if(!type||type==="*"){for(var t in map){if(t.charAt(0)==="$"){forAll(element,t.substr(1),original,handler,fn)}}}else{var i=0,l,list=map["$"+type],all=element==="*";if(!list){return}for(l=list.length;i<l;i++){if(all||list[i].matches(element,original,handler)){if(!fn(list[i],list,i,type)){return}}}}},has=function(element,type,original){var i,list=map["$"+type];if(list){for(i=list.length;i--;){if(list[i].matches(element,original,null)){return true}}}return false},get=function(element,type,original){var entries=[];forAll(element,type,original,null,function(entry){return entries.push(entry)});return entries},put=function(entry){(map["$"+entry.type]||(map["$"+entry.type]=[])).push(entry);return entry},del=function(entry){forAll(entry.element,entry.type,null,entry.handler,function(entry,list,i){list.splice(i,1);if(list.length===0){delete map["$"+entry.type]}return false})},entries=function(){var t,entries=[];for(t in map){if(t.charAt(0)==="$"){entries=entries.concat(map[t])}}return entries};return{has:has,get:get,put:put,del:del,entries:entries}})(),listener=W3C_MODEL?function(element,type,fn,add){element[add?addEvent:removeEvent](type,fn,false)}:function(element,type,fn,add,custom){if(custom&&add&&element["_on"+custom]===null){element["_on"+custom]=0}element[add?attachEvent:detachEvent]("on"+type,fn)},nativeHandler=function(element,fn,args){return function(event){event=fixEvent(event||((this.ownerDocument||this.document||this).parentWindow||win).event,true);return fn.apply(element,[event].concat(args))}},customHandler=function(element,fn,type,condition,args,isNative){return function(event){if(condition?condition.apply(this,arguments):W3C_MODEL?true:event&&event.propertyName==="_on"+type||!event){if(event){event=fixEvent(event||((this.ownerDocument||this.document||this).parentWindow||win).event,isNative)}fn.apply(element,event&&(!args||args.length===0)?arguments:slice.call(arguments,event?0:1).concat(args))}}},once=function(rm,element,type,fn,originalFn){return function(){rm(element,type,originalFn);fn.apply(this,arguments)}},removeListener=function(element,orgType,handler,namespaces){var i,l,entry,type=(orgType&&orgType.replace(nameRegex,"")),handlers=registry.get(element,type,handler);for(i=0,l=handlers.length;i<l;i++){if(handlers[i].inNamespaces(namespaces)){if((entry=handlers[i]).eventSupport){listener(entry.target,entry.eventType,entry.handler,false,entry.type)}registry.del(entry)}}},addListener=function(element,orgType,fn,originalFn,args){var entry,type=orgType.replace(nameRegex,""),namespaces=orgType.replace(namespaceRegex,"").split(".");if(registry.has(element,type,fn)){return element}if(type==="unload"){fn=once(removeListener,element,type,fn,originalFn)}if(customEvents[type]){if(customEvents[type].condition){fn=customHandler(element,fn,type,customEvents[type].condition,true)}type=customEvents[type].base||type}entry=registry.put(new RegEntry(element,type,fn,originalFn,namespaces[0]&&namespaces));entry.handler=entry.isNative?nativeHandler(element,entry.handler,args):customHandler(element,entry.handler,type,false,args,false);if(entry.eventSupport){listener(entry.target,entry.eventType,entry.handler,true,entry.customType)}},del=function(selector,fn,$){return function(e){var target,i,array=typeof selector==="string"?$(selector,this):selector;for(target=e.target;target&&target!==this;target=target.parentNode){for(i=array.length;i--;){if(array[i]===target){return fn.apply(target,arguments)}}}}},remove=function(element,typeSpec,fn){var k,m,type,namespaces,i,rm=removeListener,isString=typeSpec&&typeof typeSpec==="string";if(isString&&typeSpec.indexOf(" ")>0){typeSpec=typeSpec.split(" ");for(i=typeSpec.length;i--;){remove(element,typeSpec[i],fn)}return element}type=isString&&typeSpec.replace(nameRegex,"");if(type&&customEvents[type]){type=customEvents[type].type}if(!typeSpec||isString){if(namespaces=isString&&typeSpec.replace(namespaceRegex,"")){namespaces=namespaces.split(".")}rm(element,type,fn,namespaces)}else{if(typeof typeSpec==="function"){rm(element,null,typeSpec)}else{for(k in typeSpec){if(typeSpec.hasOwnProperty(k)){remove(element,k,typeSpec[k])}}}}return element},add=function(element,events,fn,delfn,$){var type,types,i,args,originalFn=fn,isDel=fn&&typeof fn==="string";if(events&&!fn&&typeof events==="object"){for(type in events){if(events.hasOwnProperty(type)){add.apply(this,[element,type,events[type]])}}}else{args=arguments.length>3?slice.call(arguments,3):[];types=(isDel?fn:events).split(" ");isDel&&(fn=del(events,(originalFn=delfn),$))&&(args=slice.call(args,1));this===ONE&&(fn=once(remove,element,events,fn,originalFn));for(i=types.length;i--;){addListener(element,types[i],fn,originalFn,args)}}return element},one=function(){return add.apply(ONE,arguments)},fireListener=W3C_MODEL?function(isNative,type,element){var evt=doc.createEvent(isNative?"HTMLEvents":"UIEvents");evt[isNative?"initEvent":"initUIEvent"](type,true,true,win,1);element.dispatchEvent(evt)}:function(isNative,type,element){element=targetElement(element,isNative);isNative?element.fireEvent("on"+type,doc.createEventObject()):element["_on"+type]++},fire=function(element,type,args){var i,j,l,names,handlers,types=type.split(" ");for(i=types.length;i--;){type=types[i].replace(nameRegex,"");if(names=types[i].replace(namespaceRegex,"")){names=names.split(".")}if(!names&&!args&&element[eventSupport]){fireListener(nativeEvents[type],type,element)}else{handlers=registry.get(element,type);args=[false].concat(args);for(j=0,l=handlers.length;j<l;j++){if(handlers[j].inNamespaces(names)){handlers[j].handler.apply(element,args)}}}}return element},clone=function(element,from,type){var i=0,handlers=registry.get(from,type),l=handlers.length;for(;i<l;i++){handlers[i].original&&add(element,handlers[i].type,handlers[i].original)}return element},bean={add:add,one:one,remove:remove,clone:clone,fire:fire,noConflict:function(){context[name]=old;return this}};if(win[attachEvent]){var cleanup=function(){var i,entries=registry.entries();for(i in entries){if(entries[i].type&&entries[i].type!=="unload"){remove(entries[i].element,entries[i].type)}}win[detachEvent]("onunload",cleanup);win.CollectGarbage&&win.CollectGarbage()};win[attachEvent]("onunload",cleanup)}return bean});var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10};html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0};html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128};html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0};html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0};html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0};html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=(function(html4){var lcase;if("script"==="SCRIPT".toLowerCase()){lcase=function(s){return s.toLowerCase()}}else{lcase=function(s){return s.replace(/[A-Z]/g,function(ch){return String.fromCharCode(ch.charCodeAt(0)|32)})}}var ENTITIES={lt:"<",gt:">",amp:"&",nbsp:"\240",quot:'"',apos:"'"};var WHITELISTED_SCHEMES=/^(?:https?|mailto|data)$/i;var decimalEscapeRe=/^#(\d+)$/;var hexEscapeRe=/^#x([0-9A-Fa-f]+)$/;function lookupEntity(name){name=lcase(name);if(ENTITIES.hasOwnProperty(name)){return ENTITIES[name]}var m=name.match(decimalEscapeRe);if(m){return String.fromCharCode(parseInt(m[1],10))}else{if(!!(m=name.match(hexEscapeRe))){return String.fromCharCode(parseInt(m[1],16))}}return""}function decodeOneEntity(_,name){return lookupEntity(name)}var nulRe=/\0/g;function stripNULs(s){return s.replace(nulRe,"")}var entityRe=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g;function unescapeEntities(s){return s.replace(entityRe,decodeOneEntity)}var ampRe=/&/g;var looseAmpRe=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi;var ltRe=/</g;var gtRe=/>/g;var quotRe=/\"/g;var eqRe=/\=/g;function escapeAttrib(s){return s.replace(ampRe,"&amp;").replace(ltRe,"&lt;").replace(gtRe,"&gt;").replace(quotRe,"&#34;").replace(eqRe,"&#61;")}function normalizeRCData(rcdata){return rcdata.replace(looseAmpRe,"&amp;$1").replace(ltRe,"&lt;").replace(gtRe,"&gt;")}var INSIDE_TAG_TOKEN=new RegExp("^\\s*(?:"+("(?:([a-z][a-z-]*)"+("(\\s*=\\s*"+("(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*)")+")")+"?)")+"|(/?>)|[\\s\\S][^a-z\\s>]*)","i");var OUTSIDE_TAG_TOKEN=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<!--[\\s\\S]*?-->|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i");function makeSaxParser(handler){return function parse(htmlText,param){htmlText=String(htmlText);var htmlLower=null;var inTag=false;var attribs=[];var tagName=void 0;var eflags=void 0;var openTag=void 0;if(handler.startDoc){handler.startDoc(param)}while(htmlText){var m=htmlText.match(inTag?INSIDE_TAG_TOKEN:OUTSIDE_TAG_TOKEN);htmlText=htmlText.substring(m[0].length);if(inTag){if(m[1]){var attribName=lcase(m[1]);var decodedValue;if(m[2]){var encodedValue=m[3];switch(encodedValue.charCodeAt(0)){case 34:case 39:encodedValue=encodedValue.substring(1,encodedValue.length-1);break}decodedValue=unescapeEntities(stripNULs(encodedValue))}else{decodedValue=attribName}attribs.push(attribName,decodedValue)}else{if(m[4]){if(eflags!==void 0){if(openTag){if(handler.startTag){handler.startTag(tagName,attribs,param)}}else{if(handler.endTag){handler.endTag(tagName,param)}}}if(openTag&&(eflags&(html4.eflags.CDATA|html4.eflags.RCDATA))){if(htmlLower===null){htmlLower=lcase(htmlText)}else{htmlLower=htmlLower.substring(htmlLower.length-htmlText.length)}var dataEnd=htmlLower.indexOf("</"+tagName);if(dataEnd<0){dataEnd=htmlText.length}if(dataEnd){if(eflags&html4.eflags.CDATA){if(handler.cdata){handler.cdata(htmlText.substring(0,dataEnd),param)}}else{if(handler.rcdata){handler.rcdata(normalizeRCData(htmlText.substring(0,dataEnd)),param)}}htmlText=htmlText.substring(dataEnd)}}tagName=eflags=openTag=void 0;attribs.length=0;inTag=false}}}else{if(m[1]){if(handler.pcdata){handler.pcdata(m[0],param)}}else{if(m[3]){openTag=!m[2];inTag=true;tagName=lcase(m[3]);eflags=html4.ELEMENTS.hasOwnProperty(tagName)?html4.ELEMENTS[tagName]:void 0}else{if(m[4]){if(handler.pcdata){handler.pcdata(m[4],param)}}else{if(m[5]){if(handler.pcdata){var ch=m[5];handler.pcdata(ch==="<"?"&lt;":ch===">"?"&gt;":"&amp;",param)}}}}}}}if(handler.endDoc){handler.endDoc(param)}}}function makeHtmlSanitizer(sanitizeAttributes){var stack;var ignoring;return makeSaxParser({startDoc:function(_){stack=[];ignoring=false},startTag:function(tagName,attribs,out){if(ignoring){return}if(!html4.ELEMENTS.hasOwnProperty(tagName)){return}var eflags=html4.ELEMENTS[tagName];if(eflags&html4.eflags.FOLDABLE){return}else{if(eflags&html4.eflags.UNSAFE){ignoring=!(eflags&html4.eflags.EMPTY);return}}attribs=sanitizeAttributes(tagName,attribs);if(attribs){if(!(eflags&html4.eflags.EMPTY)){stack.push(tagName)}out.push("<",tagName);for(var i=0,n=attribs.length;i<n;i+=2){var attribName=attribs[i],value=attribs[i+1];if(value!==null&&value!==void 0){out.push(" ",attribName,'="',escapeAttrib(value),'"')}}out.push(">")}},endTag:function(tagName,out){if(ignoring){ignoring=false;return}if(!html4.ELEMENTS.hasOwnProperty(tagName)){return}var eflags=html4.ELEMENTS[tagName];if(!(eflags&(html4.eflags.UNSAFE|html4.eflags.EMPTY|html4.eflags.FOLDABLE))){var index;if(eflags&html4.eflags.OPTIONAL_ENDTAG){for(index=stack.length;--index>=0;){var stackEl=stack[index];if(stackEl===tagName){break}if(!(html4.ELEMENTS[stackEl]&html4.eflags.OPTIONAL_ENDTAG)){return}}}else{for(index=stack.length;--index>=0;){if(stack[index]===tagName){break}}}if(index<0){return}for(var i=stack.length;--i>index;){var stackEl=stack[i];if(!(html4.ELEMENTS[stackEl]&html4.eflags.OPTIONAL_ENDTAG)){out.push("</",stackEl,">")}}stack.length=index;out.push("</",tagName,">")}},pcdata:function(text,out){if(!ignoring){out.push(text)}},rcdata:function(text,out){if(!ignoring){out.push(text)}},cdata:function(text,out){if(!ignoring){out.push(text)}},endDoc:function(out){for(var i=stack.length;--i>=0;){out.push("</",stack[i],">")}stack.length=0}})}var URI_SCHEME_RE=new RegExp("^(?:([^:/?#]+):)?");function sanitize(htmlText,opt_uriPolicy,opt_nmTokenPolicy){var out=[];makeHtmlSanitizer(function sanitizeAttribs(tagName,attribs){for(var i=0;i<attribs.length;i+=2){var attribName=attribs[i];var value=attribs[i+1];var atype=null,attribKey;if((attribKey=tagName+"::"+attribName,html4.ATTRIBS.hasOwnProperty(attribKey))||(attribKey="*::"+attribName,html4.ATTRIBS.hasOwnProperty(attribKey))){atype=html4.ATTRIBS[attribKey]}if(atype!==null){switch(atype){case html4.atype.NONE:break;case html4.atype.SCRIPT:case html4.atype.STYLE:value=null;break;case html4.atype.ID:case html4.atype.IDREF:case html4.atype.IDREFS:case html4.atype.GLOBAL_NAME:case html4.atype.LOCAL_NAME:case html4.atype.CLASSES:value=opt_nmTokenPolicy?opt_nmTokenPolicy(value):value;break;case html4.atype.URI:var parsedUri=(""+value).match(URI_SCHEME_RE);if(!parsedUri){value=null}else{if(!parsedUri[1]||WHITELISTED_SCHEMES.test(parsedUri[1])){value=opt_uriPolicy&&opt_uriPolicy(value)}else{value=null}}break;case html4.atype.URI_FRAGMENT:if(value&&"#"===value.charAt(0)){value=opt_nmTokenPolicy?opt_nmTokenPolicy(value):value;if(value){value="#"+value}}else{value=null}break;default:value=null;break}}else{value=null}attribs[i+1]=value}return attribs})(htmlText,out);return out.join("")}return{escapeAttrib:escapeAttrib,makeHtmlSanitizer:makeHtmlSanitizer,makeSaxParser:makeSaxParser,normalizeRCData:normalizeRCData,sanitize:sanitize,unescapeEntities:unescapeEntities}})(html4);var html_sanitize=html.sanitize;if(typeof window!=="undefined"){window.html=html;window.html_sanitize=html_sanitize}html4.ATTRIBS["*::style"]=0;html4.ELEMENTS.style=0;html4.ATTRIBS["a::target"]=0;html4.ELEMENTS.video=0;html4.ATTRIBS["video::src"]=0;html4.ATTRIBS["video::poster"]=0;html4.ATTRIBS["video::controls"]=0;html4.ELEMENTS.audio=0;html4.ATTRIBS["audio::src"]=0;html4.ATTRIBS["video::autoplay"]=0;html4.ATTRIBS["video::controls"]=0;
-var Mustache=(typeof module!=="undefined"&&module.exports)||{};(function(exports){exports.name="mustache.js";exports.version="0.5.0-dev";exports.tags=["{{","}}"];exports.parse=parse;exports.compile=compile;exports.render=render;exports.clearCache=clearCache;exports.to_html=function(template,view,partials,send){var result=render(template,view,partials);if(typeof send==="function"){send(result)}else{return result}};var _toString=Object.prototype.toString;var _isArray=Array.isArray;var _forEach=Array.prototype.forEach;var _trim=String.prototype.trim;var isArray;if(_isArray){isArray=_isArray}else{isArray=function(obj){return _toString.call(obj)==="[object Array]"}}var forEach;if(_forEach){forEach=function(obj,callback,scope){return _forEach.call(obj,callback,scope)}}else{forEach=function(obj,callback,scope){for(var i=0,len=obj.length;i<len;++i){callback.call(scope,obj[i],i,obj)}}}var spaceRe=/^\s*$/;function isWhitespace(string){return spaceRe.test(string)}var trim;if(_trim){trim=function(string){return string==null?"":_trim.call(string)}}else{var trimLeft,trimRight;if(isWhitespace("\xA0")){trimLeft=/^\s+/;trimRight=/\s+$/}else{trimLeft=/^[\s\xA0]+/;trimRight=/[\s\xA0]+$/}trim=function(string){return string==null?"":String(string).replace(trimLeft,"").replace(trimRight,"")}}var escapeMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function escapeHTML(string){return String(string).replace(/[&<>"'\/]/g,function(s){return escapeMap[s]||s})}function debug(e,template,line,file){file=file||"<template>";var lines=template.split("\n"),start=Math.max(line-3,0),end=Math.min(lines.length,line+3),context=lines.slice(start,end);var c;for(var i=0,len=context.length;i<len;++i){c=i+start+1;context[i]=(c===line?" >> ":" ")+context[i]}e.template=template;e.line=line;e.file=file;e.message=[file+":"+line,context.join("\n"),"",e.message].join("\n");return e}function lookup(name,stack,defaultValue){if(name==="."){return stack[stack.length-1]}var names=name.split(".");var lastIndex=names.length-1;var target=names[lastIndex];var value,context,i=stack.length,j,localStack;while(i){localStack=stack.slice(0);context=stack[--i];j=0;while(j<lastIndex){context=context[names[j++]];if(context==null){break}localStack.push(context)}if(context&&typeof context==="object"&&target in context){value=context[target];break}}if(typeof value==="function"){value=value.call(localStack[localStack.length-1])}if(value==null){return defaultValue}return value}function renderSection(name,stack,callback,inverted){var buffer="";var value=lookup(name,stack);if(inverted){if(value==null||value===false||(isArray(value)&&value.length===0)){buffer+=callback()}}else{if(isArray(value)){forEach(value,function(value){stack.push(value);buffer+=callback();stack.pop()})}else{if(typeof value==="object"){stack.push(value);buffer+=callback();stack.pop()}else{if(typeof value==="function"){var scope=stack[stack.length-1];var scopedRender=function(template){return render(template,scope)};buffer+=value.call(scope,callback(),scopedRender)||""}else{if(value){buffer+=callback()}}}}}return buffer}function parse(template,options){options=options||{};var tags=options.tags||exports.tags,openTag=tags[0],closeTag=tags[tags.length-1];var code=['var buffer = "";',"\nvar line = 1;","\ntry {",'\nbuffer += "'];var spaces=[],hasTag=false,nonSpace=false;var stripSpace=function(){if(hasTag&&!nonSpace&&!options.space){while(spaces.length){code.splice(spaces.pop(),1)}}else{spaces=[]}hasTag=false;nonSpace=false};var sectionStack=[],updateLine,nextOpenTag,nextCloseTag;var setTags=function(source){tags=trim(source).split(/\s+/);nextOpenTag=tags[0];nextCloseTag=tags[tags.length-1]};var includePartial=function(source){code.push('";',updateLine,'\nvar partial = partials["'+trim(source)+'"];',"\nif (partial) {","\n buffer += render(partial,stack[stack.length - 1],partials);","\n}",'\nbuffer += "')};var openSection=function(source,inverted){var name=trim(source);if(name===""){throw debug(new Error("Section name may not be empty"),template,line,options.file)}sectionStack.push({name:name,inverted:inverted});code.push('";',updateLine,'\nvar name = "'+name+'";',"\nvar callback = (function () {","\n return function () {",'\n var buffer = "";','\nbuffer += "')};var openInvertedSection=function(source){openSection(source,true)};var closeSection=function(source){var name=trim(source);var openName=sectionStack.length!=0&&sectionStack[sectionStack.length-1].name;if(!openName||name!=openName){throw debug(new Error('Section named "'+name+'" was never opened'),template,line,options.file)}var section=sectionStack.pop();code.push('";',"\n return buffer;","\n };","\n})();");if(section.inverted){code.push("\nbuffer += renderSection(name,stack,callback,true);")}else{code.push("\nbuffer += renderSection(name,stack,callback);")}code.push('\nbuffer += "')};var sendPlain=function(source){code.push('";',updateLine,'\nbuffer += lookup("'+trim(source)+'",stack,"");','\nbuffer += "')};var sendEscaped=function(source){code.push('";',updateLine,'\nbuffer += escapeHTML(lookup("'+trim(source)+'",stack,""));','\nbuffer += "')};var line=1,c,callback;for(var i=0,len=template.length;i<len;++i){if(template.slice(i,i+openTag.length)===openTag){i+=openTag.length;c=template.substr(i,1);updateLine="\nline = "+line+";";nextOpenTag=openTag;nextCloseTag=closeTag;hasTag=true;switch(c){case"!":i++;callback=null;break;case"=":i++;closeTag="="+closeTag;callback=setTags;break;case">":i++;callback=includePartial;break;case"#":i++;callback=openSection;break;case"^":i++;callback=openInvertedSection;break;case"/":i++;callback=closeSection;break;case"{":closeTag="}"+closeTag;case"&":i++;nonSpace=true;callback=sendPlain;break;default:nonSpace=true;callback=sendEscaped}var end=template.indexOf(closeTag,i);if(end===-1){throw debug(new Error('Tag "'+openTag+'" was not closed properly'),template,line,options.file)}var source=template.substring(i,end);if(callback){callback(source)}var n=0;while(~(n=source.indexOf("\n",n))){line++;n++}i=end+closeTag.length-1;openTag=nextOpenTag;closeTag=nextCloseTag}else{c=template.substr(i,1);switch(c){case'"':case"\\":nonSpace=true;code.push("\\"+c);break;case"\r":break;case"\n":spaces.push(code.length);code.push("\\n");stripSpace();line++;break;default:if(isWhitespace(c)){spaces.push(code.length)}else{nonSpace=true}code.push(c)}}}if(sectionStack.length!=0){throw debug(new Error('Section "'+sectionStack[sectionStack.length-1].name+'" was not closed properly'),template,line,options.file)}stripSpace();code.push('";',"\nreturn buffer;","\n} catch (e) { throw {error: e, line: line}; }");var body=code.join("").replace(/buffer \+= "";\n/g,"");if(options.debug){if(typeof console!="undefined"&&console.log){console.log(body)}else{if(typeof print==="function"){print(body)}}}return body}function _compile(template,options){var args="view,partials,stack,lookup,escapeHTML,renderSection,render";var body=parse(template,options);var fn=new Function(args,body);return function(view,partials){partials=partials||{};var stack=[view];try{return fn(view,partials,stack,lookup,escapeHTML,renderSection,render)}catch(e){throw debug(e.error,template,e.line,options.file)}}}var _cache={};function clearCache(){_cache={}}function compile(template,options){options=options||{};if(options.cache!==false){if(!_cache[template]){_cache[template]=_compile(template,options)}return _cache[template]}return _compile(template,options)}function render(template,view,partials){return compile(template)(view,partials)}})(Mustache);
-!function(a,b){typeof module!="undefined"?module.exports=b():typeof define=="function"&&define.amd?define(a,b):this[a]=b()}("reqwest",function(){function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}function setHeaders(a,b){var c=b.headers||{},d;c.Accept=c.Accept||defaultHeaders.accept[b.type]||defaultHeaders.accept["*"],!b.crossOrigin&&!c[requestedWith]&&(c[requestedWith]=defaultHeaders.requestedWith),c[contentType]||(c[contentType]=b.contentType||defaultHeaders.contentType);for(d in c){c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d])}}function generalCallback(a){lastValue=a}function urlappend(a,b){return a+(/\?/.test(a)?"&":"?")+b}function handleJsonp(a,b,c,d){var e=uniqid++,f=a.jsonpCallback||"callback",g=a.jsonpCallbackName||"reqwest_"+e,h=new RegExp("((^|\\?|&)"+f+")=([^&]+)"),i=d.match(h),j=doc.createElement("script"),k=0;i?i[3]==="?"?d=d.replace(h,"$1="+g):g=i[3]:d=urlappend(d,f+"="+g),win[g]=generalCallback,j.type="text/javascript",j.src=d,j.async=!0,typeof j.onreadystatechange!="undefined"&&(j.event="onclick",j.htmlFor=j.id="_reqwest_"+e),j.onload=j.onreadystatechange=function(){if(j[readyState]&&j[readyState]!=="complete"&&j[readyState]!=="loaded"||k){return !1}j.onload=j.onreadystatechange=null,j.onclick&&j.onclick(),a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(j),k=1},head.appendChild(j)}function getRequest(a,b,c){var d=(a.method||"GET").toUpperCase(),e=typeof a=="string"?a:a.url,f=a.processData!==!1&&a.data&&typeof a.data!="string"?reqwest.toQueryString(a.data):a.data||null,g;return(a.type=="jsonp"||d=="GET")&&f&&(e=urlappend(e,f),f=null),a.type=="jsonp"?handleJsonp(a,b,c,e):(g=xhr(),g.open(d,e,!0),setHeaders(g,a),g.onreadystatechange=handleReadyState(g,b,c),a.before&&a.before(g),g.send(f),g)}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function setType(a){var b=a.match(/\.(json|jsonp|html|xml)(\?|$)/);return b?b[1]:"js"}function init(o,fn){function complete(a){o.timeout&&clearTimeout(self.timeout),self.timeout=null,o.complete&&o.complete(a)}function success(resp){var r=resp.responseText;if(r){switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r}}fn(resp),o.success&&o.success(resp),complete(resp)}function error(a,b,c){o.error&&o.error(a,b,c),complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort()},o.timeout)),this.request=getRequest(o,success,error)}function reqwest(a,b){return new Reqwest(a,b)}function normalize(a){return a?a.replace(/\r?\n/g,"\r\n"):""}function serial(a,b){var c=a.name,d=a.tagName.toLowerCase(),e=function(a){a&&!a.disabled&&b(c,normalize(a.attributes.value&&a.attributes.value.specified?a.value:a.text))};if(a.disabled||!c){return}switch(d){case"input":if(!/reset|button|image|file/i.test(a.type)){var f=/checkbox/i.test(a.type),g=/radio/i.test(a.type),h=a.value;(!f&&!g||a.checked)&&b(c,normalize(f&&h===""?"on":h))}break;case"textarea":b(c,normalize(a.value));break;case"select":if(a.type.toLowerCase()==="select-one"){e(a.selectedIndex>=0?a.options[a.selectedIndex]:null)}else{for(var i=0;a.length&&i<a.length;i++){a.options[i].selected&&e(a.options[i])}}}}function eachFormElement(){var a=this,b,c,d,e=function(b,c){for(var e=0;e<c.length;e++){var f=b[byTag](c[e]);for(d=0;d<f.length;d++){serial(f[d],a)}}};for(c=0;c<arguments.length;c++){b=arguments[c],/input|select|textarea/i.test(b.tagName)&&serial(b,a),e(b,["input","select","textarea"])}}function serializeQueryString(){return reqwest.toQueryString(reqwest.serializeArray.apply(null,arguments))}function serializeHash(){var a={};return eachFormElement.apply(function(b,c){b in a?(a[b]&&!isArray(a[b])&&(a[b]=[a[b]]),a[b].push(c)):a[b]=c},arguments),a}var win=window,doc=document,twoHundo=/^20\d$/,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",requestedWith="X-Requested-With",head=doc[byTag]("head")[0],uniqid=0,lastValue,xmlHttpRequest="XMLHttpRequest",isArray=typeof Array.isArray=="function"?Array.isArray:function(a){return a instanceof Array},defaultHeaders={contentType:"application/x-www-form-urlencoded",accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"},requestedWith:xmlHttpRequest},xhr=win[xmlHttpRequest]?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};return Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serializeArray=function(){var a=[];return eachFormElement.apply(function(b,c){a.push({name:b,value:c})},arguments),a},reqwest.serialize=function(){if(arguments.length===0){return""}var a,b,c=Array.prototype.slice.call(arguments,0);return a=c.pop(),a&&a.nodeType&&c.push(a)&&(a=null),a&&(a=a.type),a=="map"?b=serializeHash:a=="array"?b=reqwest.serializeArray:b=serializeQueryString,b.apply(null,c)},reqwest.toQueryString=function(a){var b="",c,d=encodeURIComponent,e=function(a,c){b+=d(a)+"="+d(c)+"&"};if(isArray(a)){for(c=0;a&&c<a.length;c++){e(a[c].name,a[c].value)}}else{for(var f in a){if(!Object.hasOwnProperty.call(a,f)){continue}var g=a[f];if(isArray(g)){for(c=0;c<g.length;c++){e(f,g[c])}}else{e(f,a[f])}}}return b.replace(/&$/,"").replace(/%20/g,"+")},reqwest.compat=function(a,b){return a&&(a.type&&(a.method=a.type)&&delete a.type,a.dataType&&(a.type=a.dataType),a.jsonpCallback&&(a.jsonpCallbackName=a.jsonpCallback)&&delete a.jsonpCallback,a.jsonp&&(a.jsonpCallback=a.jsonp)),new Reqwest(a,b)},reqwest});wax=wax||{};wax.attribution=function(){var container,a={};function urlX(url){if(/^(https?:\/\/|data:image)/.test(url)){return url}}function idX(id){return id}a.content=function(x){if(typeof x==="undefined"){return container.innerHTML}container.innerHTML=html_sanitize(x,urlX,idX);return this};a.element=function(){return container};a.init=function(){container=document.createElement("div");container.className="wax-attribution";return this};return a.init()};wax=wax||{};wax.bwdetect=function(options,callback){var detector={},threshold=options.threshold||400,testImage="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+(+new Date()),bw=1,auto=options.auto===undefined?true:options.auto;function bwTest(){wax.bw=-1;var im=new Image();im.src=testImage;var first=true;var timeout=setTimeout(function(){if(first&&wax.bw==-1){detector.bw(0);first=false}},threshold);im.onload=function(){if(first&&wax.bw==-1){clearTimeout(timeout);detector.bw(1);first=false}}}detector.bw=function(x){if(!arguments.length){return bw}var oldBw=bw;if(wax.bwlisteners&&wax.bwlisteners.length){(function(){listeners=wax.bwlisteners;wax.bwlisteners=[];for(i=0;i<listeners;i++){listeners[i](x)}})()}wax.bw=x;if(bw!=(bw=x)){callback(x)}};detector.add=function(){if(auto){bwTest()}return this};if(wax.bw==-1){wax.bwlisteners=wax.bwlisteners||[];wax.bwlisteners.push(detector.bw)}else{if(wax.bw!==undefined){detector.bw(wax.bw)}else{detector.add()}}return detector};wax.formatter=function(x){var formatter={},f;if(x&&typeof x==="string"){try{eval("f = "+x)}catch(e){if(console){console.log(e)}}}else{if(x&&typeof x==="function"){f=x}else{f=function(){}}}function urlX(url){if(/^(https?:\/\/|data:image)/.test(url)){return url}}function idX(id){return id}formatter.format=function(options,data){try{return html_sanitize(f(options,data),urlX,idX)}catch(e){if(console){console.log(e)}}};return formatter};wax.gi=function(grid_tile,options){options=options||{};var instance={},resolution=options.resolution||4,tileSize=options.tileSize||256;function resolveCode(key){if(key>=93){key--}if(key>=35){key--}key-=32;return key}instance.grid_tile=function(){return grid_tile};instance.getKey=function(x,y){if(!(grid_tile&&grid_tile.grid)){return}if((y<0)||(x<0)){return}if((Math.floor(y)>=tileSize)||(Math.floor(x)>=tileSize)){return}return resolveCode(grid_tile.grid[Math.floor((y)/resolution)].charCodeAt(Math.floor((x)/resolution)))};instance.gridFeature=function(x,y){var key=this.getKey(x,y),keys=grid_tile.keys;if(keys&&keys[key]&&grid_tile.data[keys[key]]){return grid_tile.data[keys[key]]}};instance.tileFeature=function(x,y,tile_element){if(!grid_tile){return}var offset=wax.u.offset(tile_element);feature=this.gridFeature(x-offset.left,y-offset.top);return feature};return instance};wax.gm=function(){var resolution=4,grid_tiles={},manager={},tilejson,formatter;var gridUrl=function(url){return url.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};function templatedGridUrl(template){if(typeof template==="string"){template=[template]}return function templatedGridFinder(url){if(!url){return}var rx=new RegExp("/(\\d+)\\/(\\d+)\\/(\\d+)\\.[\\w\\._]+");var xyz=rx.exec(url);if(!xyz){return}return template[parseInt(xyz[2],10)%template.length].replace(/\{z\}/g,xyz[1]).replace(/\{x\}/g,xyz[2]).replace(/\{y\}/g,xyz[3])}}manager.formatter=function(x){if(!arguments.length){return formatter}formatter=wax.formatter(x);return manager};manager.template=function(x){if(!arguments.length){return formatter}formatter=wax.template(x);return manager};manager.gridUrl=function(x){if(!arguments.length){return gridUrl}gridUrl=typeof x==="function"?x:templatedGridUrl(x);return manager};manager.getGrid=function(url,callback){var gurl=gridUrl(url);if(!formatter||!gurl){return callback(null,null)}wax.request.get(gurl,function(err,t){if(err){return callback(err,null)}callback(null,wax.gi(t,{formatter:formatter,resolution:resolution}))});return manager};manager.tilejson=function(x){if(!arguments.length){return tilejson}if(x.template){manager.template(x.template)}else{if(x.formatter){manager.formatter(x.formatter)}}if(x.grids){manager.gridUrl(x.grids)}if(x.resolution){resolution=x.resolution}tilejson=x;return manager};return manager};wax=wax||{};wax.hash=function(options){options=options||{};function getState(){return location.hash.substring(1)}function pushState(state){var l=window.location;l.replace(l.toString().replace((l.hash||/$/),"#"+state))}var s0,hash={},lat=90-1e-8;function parseHash(s){var args=s.split("/");for(var i=0;i<args.length;i++){args[i]=Number(args[i]);if(isNaN(args[i])){return true}}if(args.length<3){return true}else{if(args.length==3){options.setCenterZoom(args)}}}function move(){var s1=options.getCenterZoom();if(s0!==s1){s0=s1;pushState(s0)}}function stateChange(state){if(state===s0){return}if(parseHash(s0=state)){move()}}var _move=wax.u.throttle(move,500);hash.add=function(){stateChange(getState());options.bindChange(_move);return this};hash.remove=function(){options.unbindChange(_move);return this};return hash.add()};wax=wax||{};wax.interaction=function(){var gm=wax.gm(),interaction={},_downLock=false,_clickTimeout=false,_d,tol=4,grid,attach,detach,parent,map,tileGrid;var defaultEvents={mousemove:onMove,touchstart:onDown,mousedown:onDown};var touchEnds={touchend:onUp,touchmove:onUp,touchcancel:touchCancel};function getTile(e){var g=grid();for(var i=0;i<g.length;i++){if((g[i][0]<e.y)&&((g[i][0]+256)>e.y)&&(g[i][1]<e.x)&&((g[i][1]+256)>e.x)){return g[i][2]}}return false}function killTimeout(){if(_clickTimeout){window.clearTimeout(_clickTimeout);_clickTimeout=null;return true}else{return false}}function onMove(e){if(_downLock){return}var pos=wax.u.eventoffset(e);interaction.screen_feature(pos,function(feature){if(feature){bean.fire(interaction,"on",{parent:parent(),data:feature,formatter:gm.formatter().format,pos:pos,e:e})}else{bean.fire(interaction,"off")}})}function onDown(e){if(killTimeout()){return}_downLock=true;_d=wax.u.eventoffset(e);if(e.type==="mousedown"){bean.add(document.body,"click",onUp);bean.add(document.body,"mouseup",onUp)}else{if(e.type==="touchstart"&&e.touches.length===1){bean.fire(interaction,"off");bean.add(parent(),touchEnds)}}}function touchCancel(){bean.remove(parent(),touchEnds);_downLock=false}function onUp(e){var evt={},pos=wax.u.eventoffset(e);_downLock=false;for(var key in e){evt[key]=e[key]}bean.remove(document.body,"mouseup",onUp);bean.remove(parent(),touchEnds);if(e.type==="touchend"){interaction.click(e,_d)}else{if(Math.round(pos.y/tol)===Math.round(_d.y/tol)&&Math.round(pos.x/tol)===Math.round(_d.x/tol)){_clickTimeout=window.setTimeout(function(){_clickTimeout=null;interaction.click(evt,pos)},300)}}return onUp}interaction.click=function(e,pos){interaction.screen_feature(pos,function(feature){if(feature){bean.fire(interaction,"on",{parent:parent(),data:feature,formatter:gm.formatter().format,pos:pos,e:e})}})};interaction.screen_feature=function(pos,callback){var tile=getTile(pos);if(!tile){callback(null)}gm.getGrid(tile.src,function(err,g){if(err||!g){return callback(null)}var feature=g.tileFeature(pos.x,pos.y,tile);callback(feature)})};interaction.attach=function(x){if(!arguments.length){return attach}attach=x;return interaction};interaction.detach=function(x){if(!arguments.length){return detach}detach=x;return interaction};interaction.map=function(x){if(!arguments.length){return map}map=x;if(attach){attach(map)}bean.add(parent(),defaultEvents);bean.add(parent(),"touchstart",onDown);return interaction};interaction.grid=function(x){if(!arguments.length){return grid}grid=x;return interaction};interaction.remove=function(x){if(detach){detach(map)}bean.remove(parent(),defaultEvents);bean.fire(interaction,"remove");return interaction};interaction.tilejson=function(x){if(!arguments.length){return gm.tilejson()}gm.tilejson(x);return interaction};interaction.formatter=function(){return gm.formatter()};interaction.on=function(ev,fn){bean.add(interaction,ev,fn);return interaction};interaction.off=function(ev,fn){bean.remove(interaction,ev,fn);return interaction};interaction.gridmanager=function(x){if(!arguments.length){return gm}gm=x;return interaction};interaction.parent=function(x){parent=x;return interaction};return interaction};var wax=wax||{};wax.legend=function(){var element,legend={},container;function urlX(url){if(/^(https?:\/\/|data:image)/.test(url)){return url}}function idX(id){return id}legend.element=function(){return container};legend.content=function(content){if(!arguments.length){return element.innerHTML}if(content){element.innerHTML=html_sanitize(content,urlX,idX);element.style.display="block"}else{element.innerHTML="";element.style.display="none"}return legend};legend.add=function(){container=document.createElement("div");container.className="wax-legends";element=container.appendChild(document.createElement("div"));element.className="wax-legend";element.style.display="none";return legend};return legend.add()};var wax=wax||{};wax.location=function(){var t={};function on(o){console.log(o);if((o.e.type==="mousemove"||!o.e.type)){return}else{var loc=o.formatter({format:"location"},o.data);if(loc){window.location.href=loc}}}t.events=function(){return{on:on}};return t};var wax=wax||{};wax.movetip={};wax.movetip=function(){var popped=false,t={},_tooltipOffset,_contextOffset,tooltip,parent;function moveTooltip(e){var eo=wax.u.eventoffset(e);if((_tooltipOffset.height+eo.y)>(_contextOffset.top+_contextOffset.height)&&(_contextOffset.height>_tooltipOffset.height)){eo.y-=_tooltipOffset.height;tooltip.className+=" flip-y"}if((_tooltipOffset.width+eo.x)>(_contextOffset.left+_contextOffset.width)){eo.x-=_tooltipOffset.width;tooltip.className+=" flip-x"}tooltip.style.left=eo.x+"px";tooltip.style.top=eo.y+"px"}function getTooltip(feature){var tooltip=document.createElement("div");tooltip.className="wax-tooltip wax-tooltip-0";tooltip.innerHTML=feature;return tooltip}function hide(){if(tooltip){tooltip.parentNode.removeChild(tooltip);tooltip=null}}function on(o){var content;if(popped){return}if((o.e.type==="mousemove"||!o.e.type)){content=o.formatter({format:"teaser"},o.data);if(!content){return}hide();parent.style.cursor="pointer";tooltip=document.body.appendChild(getTooltip(content))}else{content=o.formatter({format:"teaser"},o.data);if(!content){return}hide();var tt=document.body.appendChild(getTooltip(content));tt.className+=" wax-popup";var close=tt.appendChild(document.createElement("a"));close.href="#close";close.className="close";close.innerHTML="Close";popped=true;tooltip=tt;_tooltipOffset=wax.u.offset(tooltip);_contextOffset=wax.u.offset(parent);moveTooltip(o.e);bean.add(close,"click touchend",function closeClick(e){e.stop();hide();popped=false})}if(tooltip){_tooltipOffset=wax.u.offset(tooltip);_contextOffset=wax.u.offset(parent);moveTooltip(o.e)}}function off(){parent.style.cursor="default";if(!popped){hide()}}t.parent=function(x){if(!arguments.length){return parent}parent=x;return t};t.events=function(){return{on:on,off:off}};return t};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(url,callback){if(this.cache[url]){return callback(this.cache[url][0],this.cache[url][1])}else{this.promises[url]=this.promises[url]||[];this.promises[url].push(callback);if(this.locks[url]){return}var that=this;this.locks[url]=true;reqwest({url:url+(~url.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(data){that.locks[url]=false;that.cache[url]=[null,data];for(var i=0;i<that.promises[url].length;i++){that.promises[url][i](that.cache[url][0],that.cache[url][1])}},error:function(err){that.locks[url]=false;that.cache[url]=[err,null];for(var i=0;i<that.promises[url].length;i++){that.promises[url][i](that.cache[url][0],that.cache[url][1])}}})}}};wax.template=function(x){var template={};function urlX(url){if(/^(https?:\/\/|data:image)/.test(url)){return url}}function idX(id){return id}template.format=function(options,data){var clone={};for(var key in data){clone[key]=data[key]}if(options.format){clone["__"+options.format+"__"]=true}return html_sanitize(Mustache.to_html(x,clone),urlX,idX)};return template};if(!wax){var wax={}}wax.tilejson=function(url,callback){reqwest({url:url+(~url.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:callback,error:callback})};var wax=wax||{};wax.tooltip={};wax.tooltip=function(){var popped=false,animate=false,t={},tooltips=[],_currentContent,transitionEvent,parent;if(document.body.style["-webkit-transition"]!==undefined){transitionEvent="webkitTransitionEnd"}else{if(document.body.style.MozTransition!==undefined){transitionEvent="transitionend"}}function getTooltip(feature){var tooltip=document.createElement("div");tooltip.className="wax-tooltip wax-tooltip-0";tooltip.innerHTML=feature;return tooltip}function remove(){if(this.parentNode){this.parentNode.removeChild(this)}}function hide(){var _ct;while(_ct=tooltips.pop()){if(animate&&transitionEvent){bean.add(_ct,transitionEvent,remove);_ct.className+=" wax-fade"}else{if(_ct.parentNode){_ct.parentNode.removeChild(_ct)}}}}function on(o){var content;if(o.e.type==="mousemove"||!o.e.type){if(!popped){content=o.content||o.formatter({format:"teaser"},o.data);if(!content||content==_currentContent){return}hide();parent.style.cursor="pointer";tooltips.push(parent.appendChild(getTooltip(content)));_currentContent=content}}else{content=o.content||o.formatter({format:"full"},o.data);if(!content){if(o.e.type&&o.e.type.match(/touch/)){content=o.content||o.formatter({format:"teaser"},o.data)}if(!content){return}}hide();parent.style.cursor="pointer";var tt=parent.appendChild(getTooltip(content));tt.className+=" wax-popup";var close=tt.appendChild(document.createElement("a"));close.href="#close";close.className="close";close.innerHTML="Close";popped=true;tooltips.push(tt);bean.add(close,"touchstart mousedown",function(e){e.stop()});bean.add(close,"click touchend",function closeClick(e){e.stop();hide();popped=false})}}function off(){parent.style.cursor="default";_currentContent=null;if(!popped){hide()}}t.parent=function(x){if(!arguments.length){return parent}parent=x;return t};t.animate=function(x){if(!arguments.length){return animate}animate=x;return t};t.events=function(){return{on:on,off:off}};return t};var wax=wax||{};wax.u={offset:function(el){var width=el.offsetWidth||parseInt(el.style.width,10),height=el.offsetHeight||parseInt(el.style.height,10),doc_body=document.body,top=0,left=0;var calculateOffset=function(el){if(el===doc_body||el===document.documentElement){return}top+=el.offsetTop;left+=el.offsetLeft;var style=el.style.transform||el.style.WebkitTransform||el.style.OTransform||el.style.MozTransform||el.style.msTransform;if(style){if(match=style.match(/translate\((.+)px, (.+)px\)/)){top+=parseInt(match[2],10);left+=parseInt(match[1],10)}else{if(match=style.match(/translate3d\((.+)px, (.+)px, (.+)px\)/)){top+=parseInt(match[2],10);left+=parseInt(match[1],10)}else{if(match=style.match(/matrix3d\(([\-\d,\s]+)\)/)){var pts=match[1].split(",");top+=parseInt(pts[13],10);left+=parseInt(pts[12],10)}else{if(match=style.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/)){top+=parseInt(match[2],10);left+=parseInt(match[1],10)}}}}}};calculateOffset(el);try{while(el=el.offsetParent){calculateOffset(el)}}catch(e){}top+=doc_body.offsetTop;left+=doc_body.offsetLeft;top+=doc_body.parentNode.offsetTop;left+=doc_body.parentNode.offsetLeft;var htmlComputed=document.defaultView?window.getComputedStyle(doc_body.parentNode,null):doc_body.parentNode.currentStyle;if(doc_body.parentNode.offsetTop!==parseInt(htmlComputed.marginTop,10)&&!isNaN(parseInt(htmlComputed.marginTop,10))){top+=parseInt(htmlComputed.marginTop,10);left+=parseInt(htmlComputed.marginLeft,10)}return{top:top,left:left,height:height,width:width}},"$":function(x){return(typeof x==="string")?document.getElementById(x):x},indexOf:function(array,item){var nativeIndexOf=Array.prototype.indexOf;if(array===null){return -1}var i,l;if(nativeIndexOf&&array.indexOf===nativeIndexOf){return array.indexOf(item)}for(i=0,l=array.length;i<l;i++){if(array[i]===item){return i}}return -1},eventoffset:function(e){var posx=0;var posy=0;if(!e){e=window.event}if(e.pageX||e.pageY){return{x:e.pageX,y:e.pageY}}else{if(e.clientX||e.clientY){var doc=document.documentElement,body=document.body;var htmlComputed=document.body.parentNode.currentStyle;var topMargin=parseInt(htmlComputed.marginTop,10)||0;var leftMargin=parseInt(htmlComputed.marginLeft,10)||0;return{x:e.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0)+leftMargin,y:e.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)+topMargin}}else{if(e.touches&&e.touches.length===1){return{x:e.touches[0].pageX,y:e.touches[0].pageY}}}}},limit:function(func,wait,debounce){var timeout;return function(){var context=this,args=arguments;var throttler=function(){timeout=null;func.apply(context,args)};if(debounce){clearTimeout(timeout)}if(debounce||!timeout){timeout=setTimeout(throttler,wait)}}},throttle:function(func,wait){return this.limit(func,wait,false)}};wax=wax||{};wax.leaf=wax.leaf||{};wax.leaf.interaction=function(){var dirty=false,_grid,map;function setdirty(){dirty=true}function grid(){if(!dirty&&_grid){return _grid}else{return(_grid=(function(layers){var o=[];for(var layerId in layers){if(layers[layerId]._tiles){for(var tile in layers[layerId]._tiles){var offset=wax.u.offset(layers[layerId]._tiles[tile]);o.push([offset.top,offset.left,layers[layerId]._tiles[tile]])}}}return o})(map._layers))}}function attach(x){if(!arguments.length){return map}map=x;var l=["moveend"];for(var i=0;i<l.length;i++){map.on(l[i],setdirty)}}function detach(x){if(!arguments.length){return map}map=x;var l=["moveend"];for(var i=0;i<l.length;i++){map.off(l[i],setdirty)}}return wax.interaction().attach(attach).detach(detach).parent(function(){return map._container}).grid(grid)};wax=wax||{};wax.leaf=wax.leaf||{};wax.leaf.legend=function(map,tilejson){tilejson=tilejson||{};var l,legend={};legend.add=function(){l=wax.legend().content(tilejson.legend||"");return this};legend.content=function(x){if(x){l.content(x.legend||"")}};legend.element=function(){return l.element()};legend.appendTo=function(elem){wax.u.$(elem).appendChild(l.element());return this};return legend.add()};wax=wax||{};wax.leaf=wax.leaf||{};wax.leaf.connector=L.TileLayer.extend({initialize:function(options){options=options||{};options.minZoom=options.minzoom||0;options.maxZoom=options.maxzoom||22;options.opacity=options.opacity||1;L.TileLayer.prototype.initialize.call(this,options.tiles[0],options)}});
+/*6.2.3-touched*/!function(a,c,b){if(typeof module!=="undefined"){module.exports=b(a,c)}else{if(typeof define==="function"&&typeof define.amd==="object"){define(b)}else{c[a]=b(a,c)}}}("bean",this,function(o,R){var H=window,J=R[o],G=/over|out/,w=/[^\.]*(?=\..*)\.|.*/,E=/\..*/,n="addEventListener",h="attachEvent",a="removeEventListener",q="detachEvent",k=document||{},x=k.documentElement||{},t=x[n],y=t?n:h,r=Array.prototype.slice,c=/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,M=/mouse.*(wheel|scroll)/i,F=/^text/i,I=/^touch|^gesture/i,C={one:1},P=(function(U,T,S){for(S=0;S<T.length;S++){U[T[S]]=1}return U})({},("click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange error abort scroll "+(t?"show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend message readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ":"")).split(" ")),B=(function(){function T(U,V){while((V=V.parentNode)!==null){if(V===U){return true}}return false}function S(U){var V=U.relatedTarget;if(!V){return V===null}return(V!==this&&V.prefix!=="xul"&&!/document/.test(this.toString())&&!T(this,V))}return{mouseenter:{base:"mouseover",condition:S},mouseleave:{base:"mouseout",condition:S},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}})(),Q=(function(){var ab="altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which".split(" "),Y=ab.concat("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" ")),S=Y.concat("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis".split(" ")),V=ab.concat("char charCode key keyCode keyIdentifier keyLocation".split(" ")),U=ab.concat(["data"]),aa=ab.concat("touches targetTouches changedTouches scale rotation".split(" ")),X="preventDefault",ad=function(ae){return function(){if(ae[X]){ae[X]()}else{ae.returnValue=false}}},Z="stopPropagation",ac=function(ae){return function(){if(ae[Z]){ae[Z]()}else{if(typeof ae.cancelBubble!=="unknown"){ae.cancelBubble=true}}}},W=function(ae){return function(){ae[X]();ae[Z]();ae.stopped=true}},T=function(ah,ae,ag){var af,ai;for(af=ag.length;af--;){ai=ag[af];if(!(ai in ae)&&ai in ah){ae[ai]=ah[ai]}}};return function(ai,af){var ae={originalEvent:ai,isNative:af};if(!ai){return ae}var ah,ag=ai.type,aj=ai.target||ai.srcElement;ae[X]=ad(ai);ae[Z]=ac(ai);ae.stop=W(ae);ae.target=aj&&aj.nodeType===3?aj.parentNode:aj;if(af){if(ag.indexOf("key")!==-1){ah=V;ae.keyCode=ai.which||ai.keyCode}else{if(c.test(ag)){ah=Y;ae.rightClick=ai.which===3||ai.button===2;ae.pos={x:0,y:0};if(ai.pageX||ai.pageY){ae.clientX=ai.pageX;ae.clientY=ai.pageY}else{if(ai.clientX||ai.clientY){ae.clientX=ai.clientX+k.body.scrollLeft+x.scrollLeft;ae.clientY=ai.clientY+k.body.scrollTop+x.scrollTop}}if(G.test(ag)){ae.relatedTarget=ai.relatedTarget||ai[(ag==="mouseover"?"from":"to")+"Element"]}}else{if(I.test(ag)){ah=aa}else{if(M.test(ag)){ah=S}else{if(F.test(ag)){ah=U}}}}}T(ai,ae,ah||ab)}return ae}})(),d=function(T,S){return !t&&!S&&(T===k||T===H)?x:T},m=(function(){function S(U,W,V,T,X){this.element=U;this.type=W;this.handler=V;this.original=T;this.namespaces=X;this.custom=B[W];this.isNative=P[W]&&U[y];this.eventType=t||this.isNative?W:"propertychange";this.customType=!t&&!this.isNative&&W;this.target=d(U,this.isNative);this.eventSupport=this.target[y]}S.prototype={inNamespaces:function(V){var U,T;if(!V){return true}if(!this.namespaces){return false}for(U=V.length;U--;){for(T=this.namespaces.length;T--;){if(V[U]===this.namespaces[T]){return true}}}return false},matches:function(U,T,V){return this.element===U&&(!T||this.original===T)&&(!V||this.handler===V)}};return S})(),O=(function(){var X={},W=function(ab,ae,Z,ah,af){if(!ae||ae==="*"){for(var ai in X){if(ai.charAt(0)==="$"){W(ab,ai.substr(1),Z,ah,af)}}}else{var ac=0,aa,ad=X["$"+ae],ag=ab==="*";if(!ad){return}for(aa=ad.length;ac<aa;ac++){if(ag||ad[ac].matches(ab,Z,ah)){if(!af(ad[ac],ad,ac,ae)){return}}}}},V=function(ab,ac,aa){var Z,ad=X["$"+ac];if(ad){for(Z=ad.length;Z--;){if(ad[Z].matches(ab,aa,null)){return true}}}return false},U=function(ab,ac,aa){var Z=[];W(ab,ac,aa,null,function(ad){return Z.push(ad)});return Z},Y=function(Z){(X["$"+Z.type]||(X["$"+Z.type]=[])).push(Z);return Z},T=function(Z){W(Z.element,Z.type,null,Z.handler,function(ab,ac,aa){ac.splice(aa,1);if(ac.length===0){delete X["$"+ab.type]}return false})},S=function(){var aa,Z=[];for(aa in X){if(aa.charAt(0)==="$"){Z=Z.concat(X[aa])}}return Z};return{has:V,get:U,put:Y,del:T,entries:S}})(),K=t?function(S,U,T,V){S[V?n:a](U,T,false)}:function(S,U,T,W,V){if(V&&W&&S["_on"+V]===null){S["_on"+V]=0}S[W?h:q]("on"+U,T)},A=function(T,U,S){return function(V){V=Q(V||((this.ownerDocument||this.document||this).parentWindow||H).event,true);return U.apply(T,[V].concat(S))}},f=function(U,W,V,X,T,S){return function(Y){if(X?X.apply(this,arguments):t?true:Y&&Y.propertyName==="_on"+V||!Y){if(Y){Y=Q(Y||((this.ownerDocument||this.document||this).parentWindow||H).event,S)}W.apply(U,Y&&(!T||T.length===0)?arguments:r.call(arguments,Y?0:1).concat(T))}}},v=function(W,S,U,T,V){return function(){W(S,U,V);T.apply(this,arguments)}},b=function(W,U,aa,S){var X,V,Z,Y=(U&&U.replace(E,"")),T=O.get(W,Y,aa);for(X=0,V=T.length;X<V;X++){if(T[X].inNamespaces(S)){if((Z=T[X]).eventSupport){K(Z.target,Z.eventType,Z.handler,false,Z.type)}O.del(Z)}}},j=function(T,Z,V,Y,S){var W,U=Z.replace(E,""),X=Z.replace(w,"").split(".");if(O.has(T,U,V)){return T}if(U==="unload"){V=v(b,T,U,V,Y)}if(B[U]){if(B[U].condition){V=f(T,V,U,B[U].condition,true)}U=B[U].base||U}W=O.put(new m(T,U,V,Y,X[0]&&X));W.handler=W.isNative?A(T,W.handler,S):f(T,W.handler,U,false,S,false);if(W.eventSupport){K(W.target,W.eventType,W.handler,true,W.customType)}},p=function(S,T,U){return function(X){var W,V,Y=typeof S==="string"?U(S,this):S;for(W=X.target;W&&W!==this;W=W.parentNode){for(V=Y.length;V--;){if(Y[V]===W){return T.apply(W,arguments)}}}}},z=function(W,Z,ab){var V,U,aa,T,X,Y=b,S=Z&&typeof Z==="string";if(S&&Z.indexOf(" ")>0){Z=Z.split(" ");for(X=Z.length;X--;){z(W,Z[X],ab)}return W}aa=S&&Z.replace(E,"");if(aa&&B[aa]){aa=B[aa].type}if(!Z||S){if(T=S&&Z.replace(w,"")){T=T.split(".")}Y(W,aa,ab,T)}else{if(typeof Z==="function"){Y(W,null,Z)}else{for(V in Z){if(Z.hasOwnProperty(V)){z(W,V,Z[V])}}}}return W},g=function(U,ac,aa,S,T){var Y,W,V,X,Z=aa,ab=aa&&typeof aa==="string";if(ac&&!aa&&typeof ac==="object"){for(Y in ac){if(ac.hasOwnProperty(Y)){g.apply(this,[U,Y,ac[Y]])}}}else{X=arguments.length>3?r.call(arguments,3):[];W=(ab?aa:ac).split(" ");ab&&(aa=p(ac,(Z=S),T))&&(X=r.call(X,1));this===C&&(aa=v(z,U,ac,aa,Z));for(V=W.length;V--;){j(U,W[V],aa,Z,X)}}return U},l=function(){return g.apply(C,arguments)},N=t?function(T,V,U){var S=k.createEvent(T?"HTMLEvents":"UIEvents");S[T?"initEvent":"initUIEvent"](V,true,true,H,1);U.dispatchEvent(S)}:function(S,U,T){T=d(T,S);S?T.fireEvent("on"+U,k.createEventObject()):T["_on"+U]++},u=function(V,aa,Y){var W,U,T,Z,S,X=aa.split(" ");for(W=X.length;W--;){aa=X[W].replace(E,"");if(Z=X[W].replace(w,"")){Z=Z.split(".")}if(!Z&&!Y&&V[y]){N(P[aa],aa,V)}else{S=O.get(V,aa);Y=[false].concat(Y);for(U=0,T=S.length;U<T;U++){if(S[U].inNamespaces(Z)){S[U].handler.apply(V,Y)}}}}return V},s=function(V,X,W){var U=0,T=O.get(X,W),S=T.length;for(;U<S;U++){T[U].original&&g(V,T[U].type,T[U].original)}return V},D={add:g,one:l,remove:z,clone:s,fire:u,noConflict:function(){R[o]=J;return this}};if(H[h]){var e=function(){var T,S=O.entries();for(T in S){if(S[T].type&&S[T].type!=="unload"){z(S[T].element,S[T].type)}}H[q]("onunload",e);H.CollectGarbage&&H.CollectGarbage()};H[h]("onunload",e)}return D});var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10};html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0};html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128};html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0};html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0};html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0};html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=(function(l){var b;if("script"==="SCRIPT".toLowerCase()){b=function(B){return B.toLowerCase()}}else{b=function(B){return B.replace(/[A-Z]/g,function(C){return String.fromCharCode(C.charCodeAt(0)|32)})}}var r={lt:"<",gt:">",amp:"&",nbsp:"\240",quot:'"',apos:"'"};var p=/^(?:https?|mailto|data)$/i;var n=/^#(\d+)$/;var x=/^#x([0-9A-Fa-f]+)$/;function j(C){C=b(C);if(r.hasOwnProperty(C)){return r[C]}var B=C.match(n);if(B){return String.fromCharCode(parseInt(B[1],10))}else{if(!!(B=C.match(x))){return String.fromCharCode(parseInt(B[1],16))}}return""}function c(C,B){return j(B)}var u=/\0/g;function m(B){return B.replace(u,"")}var v=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g;function e(B){return B.replace(v,c)}var t=/&/g;var A=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi;var a=/</g;var f=/>/g;var o=/\"/g;var h=/\=/g;function g(B){return B.replace(t,"&amp;").replace(a,"&lt;").replace(f,"&gt;").replace(o,"&#34;").replace(h,"&#61;")}function k(B){return B.replace(A,"&amp;$1").replace(a,"&lt;").replace(f,"&gt;")}var y=new RegExp("^\\s*(?:"+("(?:([a-z][a-z-]*)"+("(\\s*=\\s*"+("(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*)")+")")+"?)")+"|(/?>)|[\\s\\S][^a-z\\s>]*)","i");var z=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<!--[\\s\\S]*?-->|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i");function q(B){return function C(O,M){O=String(O);var P=null;var G=false;var E=[];var H=void 0;var I=void 0;var F=void 0;if(B.startDoc){B.startDoc(M)}while(O){var K=O.match(G?y:z);O=O.substring(K[0].length);if(G){if(K[1]){var J=b(K[1]);var R;if(K[2]){var N=K[3];switch(N.charCodeAt(0)){case 34:case 39:N=N.substring(1,N.length-1);break}R=e(m(N))}else{R=J}E.push(J,R)}else{if(K[4]){if(I!==void 0){if(F){if(B.startTag){B.startTag(H,E,M)}}else{if(B.endTag){B.endTag(H,M)}}}if(F&&(I&(l.eflags.CDATA|l.eflags.RCDATA))){if(P===null){P=b(O)}else{P=P.substring(P.length-O.length)}var Q=P.indexOf("</"+H);if(Q<0){Q=O.length}if(Q){if(I&l.eflags.CDATA){if(B.cdata){B.cdata(O.substring(0,Q),M)}}else{if(B.rcdata){B.rcdata(k(O.substring(0,Q)),M)}}O=O.substring(Q)}}H=I=F=void 0;E.length=0;G=false}}}else{if(K[1]){if(B.pcdata){B.pcdata(K[0],M)}}else{if(K[3]){F=!K[2];G=true;H=b(K[3]);I=l.ELEMENTS.hasOwnProperty(H)?l.ELEMENTS[H]:void 0}else{if(K[4]){if(B.pcdata){B.pcdata(K[4],M)}}else{if(K[5]){if(B.pcdata){var D=K[5];B.pcdata(D==="<"?"&lt;":D===">"?"&gt;":"&amp;",M)}}}}}}}if(B.endDoc){B.endDoc(M)}}}function w(C){var B;var D;return q({startDoc:function(E){B=[];D=false},startTag:function(H,K,F){if(D){return}if(!l.ELEMENTS.hasOwnProperty(H)){return}var E=l.ELEMENTS[H];if(E&l.eflags.FOLDABLE){return}else{if(E&l.eflags.UNSAFE){D=!(E&l.eflags.EMPTY);return}}K=C(H,K);if(K){if(!(E&l.eflags.EMPTY)){B.push(H)}F.push("<",H);for(var G=0,M=K.length;G<M;G+=2){var I=K[G],J=K[G+1];if(J!==null&&J!==void 0){F.push(" ",I,'="',g(J),'"')}}F.push(">")}},endTag:function(I,G){if(D){D=false;return}if(!l.ELEMENTS.hasOwnProperty(I)){return}var E=l.ELEMENTS[I];if(!(E&(l.eflags.UNSAFE|l.eflags.EMPTY|l.eflags.FOLDABLE))){var F;if(E&l.eflags.OPTIONAL_ENDTAG){for(F=B.length;--F>=0;){var J=B[F];if(J===I){break}if(!(l.ELEMENTS[J]&l.eflags.OPTIONAL_ENDTAG)){return}}}else{for(F=B.length;--F>=0;){if(B[F]===I){break}}}if(F<0){return}for(var H=B.length;--H>F;){var J=B[H];if(!(l.ELEMENTS[J]&l.eflags.OPTIONAL_ENDTAG)){G.push("</",J,">")}}B.length=F;G.push("</",I,">")}},pcdata:function(F,E){if(!D){E.push(F)}},rcdata:function(F,E){if(!D){E.push(F)}},cdata:function(F,E){if(!D){E.push(F)}},endDoc:function(E){for(var F=B.length;--F>=0;){E.push("</",B[F],">")}B.length=0}})}var s=new RegExp("^(?:([^:/?#]+):)?");function d(F,D,E){var B=[];w(function C(J,O){for(var I=0;I<O.length;I+=2){var K=O[I];var M=O[I+1];var H=null,G;if((G=J+"::"+K,l.ATTRIBS.hasOwnProperty(G))||(G="*::"+K,l.ATTRIBS.hasOwnProperty(G))){H=l.ATTRIBS[G]}if(H!==null){switch(H){case l.atype.NONE:break;case l.atype.SCRIPT:case l.atype.STYLE:M=null;break;case l.atype.ID:case l.atype.IDREF:case l.atype.IDREFS:case l.atype.GLOBAL_NAME:case l.atype.LOCAL_NAME:case l.atype.CLASSES:M=E?E(M):M;break;case l.atype.URI:var N=(""+M).match(s);if(!N){M=null}else{if(!N[1]||p.test(N[1])){M=D&&D(M)}else{M=null}}break;case l.atype.URI_FRAGMENT:if(M&&"#"===M.charAt(0)){M=E?E(M):M;if(M){M="#"+M}}else{M=null}break;default:M=null;break}}else{M=null}O[I+1]=M}return O})(F,B);return B.join("")}return{escapeAttrib:g,makeHtmlSanitizer:w,makeSaxParser:q,normalizeRCData:k,sanitize:d,unescapeEntities:e}})(html4);var html_sanitize=html.sanitize;if(typeof window!=="undefined"){window.html=html;window.html_sanitize=html_sanitize}html4.ATTRIBS["*::style"]=0;html4.ELEMENTS.style=0;html4.ATTRIBS["a::target"]=0;html4.ELEMENTS.video=0;html4.ATTRIBS["video::src"]=0;html4.ATTRIBS["video::poster"]=0;html4.ATTRIBS["video::controls"]=0;html4.ELEMENTS.audio=0;html4.ATTRIBS["audio::src"]=0;html4.ATTRIBS["video::autoplay"]=0;html4.ATTRIBS["video::controls"]=0;
+var Mustache=(typeof module!=="undefined"&&module.exports)||{};(function(x){x.name="mustache.js";x.version="0.5.0-dev";x.tags=["{{","}}"];x.parse=n;x.compile=e;x.render=w;x.clearCache=v;x.to_html=function(B,z,A,C){var y=w(B,z,A);if(typeof C==="function"){C(y)}else{return y}};var t=Object.prototype.toString;var f=Array.isArray;var b=Array.prototype.forEach;var g=String.prototype.trim;var j;if(f){j=f}else{j=function(y){return t.call(y)==="[object Array]"}}var s;if(b){s=function(z,A,y){return b.call(z,A,y)}}else{s=function(B,C,A){for(var z=0,y=B.length;z<y;++z){C.call(A,B[z],z,B)}}}var l=/^\s*$/;function c(y){return l.test(y)}var q;if(g){q=function(y){return y==null?"":g.call(y)}}else{var o,h;if(c("\xA0")){o=/^\s+/;h=/\s+$/}else{o=/^[\s\xA0]+/;h=/[\s\xA0]+$/}q=function(y){return y==null?"":String(y).replace(o,"").replace(h,"")}}var d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function p(y){return String(y).replace(/[&<>"'\/]/g,function(z){return d[z]||z})}function m(E,G,H,A){A=A||"<template>";var I=G.split("\n"),y=Math.max(H-3,0),B=Math.min(I.length,H+3),z=I.slice(y,B);var F;for(var C=0,D=z.length;C<D;++C){F=C+y+1;z[C]=(F===H?" >> ":" ")+z[C]}E.template=G;E.line=H;E.file=A;E.message=[A+":"+H,z.join("\n"),"",E.message].join("\n");return E}function u(y,G,F){if(y==="."){return G[G.length-1]}var E=y.split(".");var C=E.length-1;var D=E[C];var H,z,B=G.length,A,I;while(B){I=G.slice(0);z=G[--B];A=0;while(A<C){z=z[E[A++]];if(z==null){break}I.push(z)}if(z&&typeof z==="object"&&D in z){H=z[D];break}}if(typeof H==="function"){H=H.call(I[I.length-1])}if(H==null){return F}return H}function k(B,y,F,A){var z="";var D=u(B,y);if(A){if(D==null||D===false||(j(D)&&D.length===0)){z+=F()}}else{if(j(D)){s(D,function(G){y.push(G);z+=F();y.pop()})}else{if(typeof D==="object"){y.push(D);z+=F();y.pop()}else{if(typeof D==="function"){var C=y[y.length-1];var E=function(G){return w(G,C)};z+=D.call(C,F(),E)||""}else{if(D){z+=F()}}}}}return z}function n(ab,C){C=C||{};var M=C.tags||x.tags,N=M[0],H=M[M.length-1];var z=['var buffer = "";',"\nvar line = 1;","\ntry {",'\nbuffer += "'];var G=[],ac=false,Z=false;var X=function(){if(ac&&!Z&&!C.space){while(G.length){z.splice(G.pop(),1)}}else{G=[]}ac=false;Z=false};var U=[],R,D,O;var W=function(ad){M=q(ad).split(/\s+/);D=M[0];O=M[M.length-1]};var K=function(ad){z.push('";',R,'\nvar partial = partials["'+q(ad)+'"];',"\nif (partial) {","\n buffer += render(partial,stack[stack.length - 1],partials);","\n}",'\nbuffer += "')};var y=function(af,ad){var ae=q(af);if(ae===""){throw m(new Error("Section name may not be empty"),ab,J,C.file)}U.push({name:ae,inverted:ad});z.push('";',R,'\nvar name = "'+ae+'";',"\nvar callback = (function () {","\n return function () {",'\n var buffer = "";','\nbuffer += "')};var F=function(ad){y(ad,true)};var V=function(ae){var ad=q(ae);var ag=U.length!=0&&U[U.length-1].name;if(!ag||ad!=ag){throw m(new Error('Section named "'+ad+'" was never opened'),ab,J,C.file)}var af=U.pop();z.push('";',"\n return buffer;","\n };","\n})();");if(af.inverted){z.push("\nbuffer += renderSection(name,stack,callback,true);")}else{z.push("\nbuffer += renderSection(name,stack,callback);")}z.push('\nbuffer += "')};var Y=function(ad){z.push('";',R,'\nbuffer += lookup("'+q(ad)+'",stack,"");','\nbuffer += "')};var A=function(ad){z.push('";',R,'\nbuffer += escapeHTML(lookup("'+q(ad)+'",stack,""));','\nbuffer += "')};var J=1,aa,E;for(var S=0,T=ab.length;S<T;++S){if(ab.slice(S,S+N.length)===N){S+=N.length;aa=ab.substr(S,1);R="\nline = "+J+";";D=N;O=H;ac=true;switch(aa){case"!":S++;E=null;break;case"=":S++;H="="+H;E=W;break;case">":S++;E=K;break;case"#":S++;E=y;break;case"^":S++;E=F;break;case"/":S++;E=V;break;case"{":H="}"+H;case"&":S++;Z=true;E=Y;break;default:Z=true;E=A}var B=ab.indexOf(H,S);if(B===-1){throw m(new Error('Tag "'+N+'" was not closed properly'),ab,J,C.file)}var Q=ab.substring(S,B);if(E){E(Q)}var P=0;while(~(P=Q.indexOf("\n",P))){J++;P++}S=B+H.length-1;N=D;H=O}else{aa=ab.substr(S,1);switch(aa){case'"':case"\\":Z=true;z.push("\\"+aa);break;case"\r":break;case"\n":G.push(z.length);z.push("\\n");X();J++;break;default:if(c(aa)){G.push(z.length)}else{Z=true}z.push(aa)}}}if(U.length!=0){throw m(new Error('Section "'+U[U.length-1].name+'" was not closed properly'),ab,J,C.file)}X();z.push('";',"\nreturn buffer;","\n} catch (e) { throw {error: e, line: line}; }");var I=z.join("").replace(/buffer \+= "";\n/g,"");if(C.debug){if(typeof console!="undefined"&&console.log){console.log(I)}else{if(typeof print==="function"){print(I)}}}return I}function r(C,A){var z="view,partials,stack,lookup,escapeHTML,renderSection,render";var y=n(C,A);var B=new Function(z,y);return function(E,F){F=F||{};var D=[E];try{return B(E,F,D,u,p,k,w)}catch(G){throw m(G.error,C,G.line,A.file)}}}var a={};function v(){a={}}function e(z,y){y=y||{};if(y.cache!==false){if(!a[z]){a[z]=r(z,y)}return a[z]}return r(z,y)}function w(A,y,z){return e(A)(y,z)}})(Mustache);
+!function(d,c){typeof module!="undefined"?module.exports=c():typeof define=="function"&&define.amd?define(d,c):this[d]=c()}("reqwest",function(){function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}function setHeaders(a,b){var c=b.headers||{},d;c.Accept=c.Accept||defaultHeaders.accept[b.type]||defaultHeaders.accept["*"],!b.crossOrigin&&!c[requestedWith]&&(c[requestedWith]=defaultHeaders.requestedWith),c[contentType]||(c[contentType]=b.contentType||defaultHeaders.contentType);for(d in c){c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d])}}function generalCallback(a){lastValue=a}function urlappend(a,b){return a+(/\?/.test(a)?"&":"?")+b}function handleJsonp(a,b,c,d){var e=uniqid++,f=a.jsonpCallback||"callback",g=a.jsonpCallbackName||"reqwest_"+e,h=new RegExp("((^|\\?|&)"+f+")=([^&]+)"),i=d.match(h),j=doc.createElement("script"),k=0;i?i[3]==="?"?d=d.replace(h,"$1="+g):g=i[3]:d=urlappend(d,f+"="+g),win[g]=generalCallback,j.type="text/javascript",j.src=d,j.async=!0,typeof j.onreadystatechange!="undefined"&&(j.event="onclick",j.htmlFor=j.id="_reqwest_"+e),j.onload=j.onreadystatechange=function(){if(j[readyState]&&j[readyState]!=="complete"&&j[readyState]!=="loaded"||k){return !1}j.onload=j.onreadystatechange=null,j.onclick&&j.onclick(),a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(j),k=1},head.appendChild(j)}function getRequest(a,b,c){var d=(a.method||"GET").toUpperCase(),e=typeof a=="string"?a:a.url,f=a.processData!==!1&&a.data&&typeof a.data!="string"?reqwest.toQueryString(a.data):a.data||null,g;return(a.type=="jsonp"||d=="GET")&&f&&(e=urlappend(e,f),f=null),a.type=="jsonp"?handleJsonp(a,b,c,e):(g=xhr(),g.open(d,e,!0),setHeaders(g,a),g.onreadystatechange=handleReadyState(g,b,c),a.before&&a.before(g),g.send(f),g)}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function setType(a){var b=a.match(/\.(json|jsonp|html|xml)(\?|$)/);return b?b[1]:"js"}function init(o,fn){function complete(a){o.timeout&&clearTimeout(self.timeout),self.timeout=null,o.complete&&o.complete(a)}function success(resp){var r=resp.responseText;if(r){switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r}}fn(resp),o.success&&o.success(resp),complete(resp)}function error(a,b,c){o.error&&o.error(a,b,c),complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort()},o.timeout)),this.request=getRequest(o,success,error)}function reqwest(a,b){return new Reqwest(a,b)}function normalize(a){return a?a.replace(/\r?\n/g,"\r\n"):""}function serial(a,b){var c=a.name,d=a.tagName.toLowerCase(),e=function(a){a&&!a.disabled&&b(c,normalize(a.attributes.value&&a.attributes.value.specified?a.value:a.text))};if(a.disabled||!c){return}switch(d){case"input":if(!/reset|button|image|file/i.test(a.type)){var f=/checkbox/i.test(a.type),g=/radio/i.test(a.type),h=a.value;(!f&&!g||a.checked)&&b(c,normalize(f&&h===""?"on":h))}break;case"textarea":b(c,normalize(a.value));break;case"select":if(a.type.toLowerCase()==="select-one"){e(a.selectedIndex>=0?a.options[a.selectedIndex]:null)}else{for(var i=0;a.length&&i<a.length;i++){a.options[i].selected&&e(a.options[i])}}}}function eachFormElement(){var a=this,b,c,d,e=function(b,c){for(var e=0;e<c.length;e++){var f=b[byTag](c[e]);for(d=0;d<f.length;d++){serial(f[d],a)}}};for(c=0;c<arguments.length;c++){b=arguments[c],/input|select|textarea/i.test(b.tagName)&&serial(b,a),e(b,["input","select","textarea"])}}function serializeQueryString(){return reqwest.toQueryString(reqwest.serializeArray.apply(null,arguments))}function serializeHash(){var a={};return eachFormElement.apply(function(b,c){b in a?(a[b]&&!isArray(a[b])&&(a[b]=[a[b]]),a[b].push(c)):a[b]=c},arguments),a}var win=window,doc=document,twoHundo=/^20\d$/,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",requestedWith="X-Requested-With",head=doc[byTag]("head")[0],uniqid=0,lastValue,xmlHttpRequest="XMLHttpRequest",isArray=typeof Array.isArray=="function"?Array.isArray:function(a){return a instanceof Array},defaultHeaders={contentType:"application/x-www-form-urlencoded",accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"},requestedWith:xmlHttpRequest},xhr=win[xmlHttpRequest]?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};return Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serializeArray=function(){var a=[];return eachFormElement.apply(function(b,c){a.push({name:b,value:c})},arguments),a},reqwest.serialize=function(){if(arguments.length===0){return""}var a,b,c=Array.prototype.slice.call(arguments,0);return a=c.pop(),a&&a.nodeType&&c.push(a)&&(a=null),a&&(a=a.type),a=="map"?b=serializeHash:a=="array"?b=reqwest.serializeArray:b=serializeQueryString,b.apply(null,c)},reqwest.toQueryString=function(a){var b="",c,d=encodeURIComponent,e=function(a,c){b+=d(a)+"="+d(c)+"&"};if(isArray(a)){for(c=0;a&&c<a.length;c++){e(a[c].name,a[c].value)}}else{for(var f in a){if(!Object.hasOwnProperty.call(a,f)){continue}var g=a[f];if(isArray(g)){for(c=0;c<g.length;c++){e(f,g[c])}}else{e(f,a[f])}}}return b.replace(/&$/,"").replace(/%20/g,"+")},reqwest.compat=function(a,b){return a&&(a.type&&(a.method=a.type)&&delete a.type,a.dataType&&(a.type=a.dataType),a.jsonpCallback&&(a.jsonpCallbackName=a.jsonpCallback)&&delete a.jsonpCallback,a.jsonp&&(a.jsonpCallback=a.jsonp)),new Reqwest(a,b)},reqwest});wax=wax||{};wax.attribution=function(){var c,b={};function d(a){if(/^(https?:\/\/|data:image)/.test(a)){return a}}function e(a){return a}b.content=function(a){if(typeof a==="undefined"){return c.innerHTML}c.innerHTML=html_sanitize(a,d,e);return this};b.element=function(){return c};b.init=function(){c=document.createElement("div");c.className="wax-attribution";return this};return b.init()};wax=wax||{};wax.bwdetect=function(b,h){var e={},a=b.threshold||400,d="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+(+new Date()),g=1,f=b.auto===undefined?true:b.auto;function c(){wax.bw=-1;var j=new Image();j.src=d;var l=true;var k=setTimeout(function(){if(l&&wax.bw==-1){e.bw(0);l=false}},a);j.onload=function(){if(l&&wax.bw==-1){clearTimeout(k);e.bw(1);l=false}}}e.bw=function(j){if(!arguments.length){return g}var k=g;if(wax.bwlisteners&&wax.bwlisteners.length){(function(){listeners=wax.bwlisteners;wax.bwlisteners=[];for(i=0;i<listeners;i++){listeners[i](j)}})()}wax.bw=j;if(g!=(g=j)){h(j)}};e.add=function(){if(f){c()}return this};if(wax.bw==-1){wax.bwlisteners=wax.bwlisteners||[];wax.bwlisteners.push(e.bw)}else{if(wax.bw!==undefined){e.bw(wax.bw)}else{e.add()}}return e};wax.formatter=function(x){var formatter={},f;if(x&&typeof x==="string"){try{eval("f = "+x)}catch(e){if(console){console.log(e)}}}else{if(x&&typeof x==="function"){f=x}else{f=function(){}}}function urlX(url){if(/^(https?:\/\/|data:image)/.test(url)){return url}}function idX(id){return id}formatter.format=function(options,data){try{return html_sanitize(f(options,data),urlX,idX)}catch(e){if(console){console.log(e)}}};return formatter};wax.gi=function(b,d){d=d||{};var a={},c=d.resolution||4,f=d.tileSize||256;function e(g){if(g>=93){g--}if(g>=35){g--}g-=32;return g}a.grid_tile=function(){return b};a.getKey=function(g,h){if(!(b&&b.grid)){return}if((h<0)||(g<0)){return}if((Math.floor(h)>=f)||(Math.floor(g)>=f)){return}return e(b.grid[Math.floor((h)/c)].charCodeAt(Math.floor((g)/c)))};a.gridFeature=function(g,k){var h=this.getKey(g,k),j=b.keys;if(j&&j[h]&&b.data[j[h]]){return b.data[j[h]]}};a.tileFeature=function(h,k,g){if(!b){return}var j=wax.u.offset(g);feature=this.gridFeature(h-j.left,k-j.top);return feature};return a};wax.gm=function(){var c=4,f={},e={},g,d;var b=function(h){return h.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};function a(j){if(typeof j==="string"){j=[j]}return function h(l){if(!l){return}var m=new RegExp("/(\\d+)\\/(\\d+)\\/(\\d+)\\.[\\w\\._]+");var k=m.exec(l);if(!k){return}return j[parseInt(k[2],10)%j.length].replace(/\{z\}/g,k[1]).replace(/\{x\}/g,k[2]).replace(/\{y\}/g,k[3])}}e.formatter=function(h){if(!arguments.length){return d}d=wax.formatter(h);return e};e.template=function(h){if(!arguments.length){return d}d=wax.template(h);return e};e.gridUrl=function(h){if(!arguments.length){return b}b=typeof h==="function"?h:a(h);return e};e.getGrid=function(j,k){var h=b(j);if(!d||!h){return k(null,null)}wax.request.get(h,function(m,l){if(m){return k(m,null)}k(null,wax.gi(l,{formatter:d,resolution:c}))});return e};e.tilejson=function(h){if(!arguments.length){return g}if(h.template){e.template(h.template)}else{if(h.formatter){e.formatter(h.formatter)}}if(h.grids){e.gridUrl(h.grids)}if(h.resolution){c=h.resolution}g=h;return e};return e};wax=wax||{};wax.hash=function(k){k=k||{};function f(){return location.hash.substring(1)}function e(n){var m=window.location;m.replace(m.toString().replace((m.hash||/$/),"#"+n))}var h,d={},g=90-1e-8;function a(n){var l=n.split("/");for(var m=0;m<l.length;m++){l[m]=Number(l[m]);if(isNaN(l[m])){return true}}if(l.length<3){return true}else{if(l.length==3){k.setCenterZoom(l)}}}function b(){var l=k.getCenterZoom();if(h!==l){h=l;e(h)}}function c(l){if(l===h){return}if(a(h=l)){b()}}var j=wax.u.throttle(b,500);d.add=function(){c(f());k.bindChange(j);return this};d.remove=function(){k.unbindChange(j);return this};return d.add()};wax=wax||{};wax.interaction=function(){var p=wax.gm(),g={},b=false,c=false,e,n=4,a,q,u,k,t,s;var o={mousemove:h,touchstart:d,mousedown:d};var m={touchend:r,touchmove:r,touchcancel:f};function l(x){var w=a();for(var v=0;v<w.length;v++){if((w[v][0]<x.y)&&((w[v][0]+256)>x.y)&&(w[v][1]<x.x)&&((w[v][1]+256)>x.x)){return w[v][2]}}return false}function j(){if(c){window.clearTimeout(c);c=null;return true}else{return false}}function h(v){if(b){return}var w=wax.u.eventoffset(v);g.screen_feature(w,function(x){if(x){bean.fire(g,"on",{parent:k(),data:x,formatter:p.formatter().format,pos:w,e:v})}else{bean.fire(g,"off")}})}function d(v){if(j()){return}b=true;e=wax.u.eventoffset(v);if(v.type==="mousedown"){bean.add(document.body,"click",r);bean.add(document.body,"mouseup",r)}else{if(v.type==="touchstart"&&v.touches.length===1){bean.fire(g,"off");bean.add(k(),m)}}}function f(){bean.remove(k(),m);b=false}function r(x){var v={},y=wax.u.eventoffset(x);b=false;for(var w in x){v[w]=x[w]}bean.remove(document.body,"mouseup",r);bean.remove(k(),m);if(x.type==="touchend"){g.click(x,e)}else{if(Math.round(y.y/n)===Math.round(e.y/n)&&Math.round(y.x/n)===Math.round(e.x/n)){c=window.setTimeout(function(){c=null;g.click(v,y)},300)}}return r}g.click=function(v,w){g.screen_feature(w,function(x){if(x){bean.fire(g,"on",{parent:k(),data:x,formatter:p.formatter().format,pos:w,e:v})}})};g.screen_feature=function(x,w){var v=l(x);if(!v){w(null)}p.getGrid(v.src,function(A,z){if(A||!z){return w(null)}var y=z.tileFeature(x.x,x.y,v);w(y)})};g.attach=function(v){if(!arguments.length){return q}q=v;return g};g.detach=function(v){if(!arguments.length){return u}u=v;return g};g.map=function(v){if(!arguments.length){return t}t=v;if(q){q(t)}bean.add(k(),o);bean.add(k(),"touchstart",d);return g};g.grid=function(v){if(!arguments.length){return a}a=v;return g};g.remove=function(v){if(u){u(t)}bean.remove(k(),o);bean.fire(g,"remove");return g};g.tilejson=function(v){if(!arguments.length){return p.tilejson()}p.tilejson(v);return g};g.formatter=function(){return p.formatter()};g.on=function(w,v){bean.add(g,w,v);return g};g.off=function(w,v){bean.remove(g,w,v);return g};g.gridmanager=function(v){if(!arguments.length){return p}p=v;return g};g.parent=function(v){k=v;return g};return g};var wax=wax||{};wax.legend=function(){var c,d={},a;function b(f){if(/^(https?:\/\/|data:image)/.test(f)){return f}}function e(f){return f}d.element=function(){return a};d.content=function(f){if(!arguments.length){return c.innerHTML}if(f){c.innerHTML=html_sanitize(f,b,e);c.style.display="block"}else{c.innerHTML="";c.style.display="none"}return d};d.add=function(){a=document.createElement("div");a.className="wax-legends";c=a.appendChild(document.createElement("div"));c.className="wax-legend";c.style.display="none";return d};return d.add()};var wax=wax||{};wax.location=function(){var b={};function a(d){console.log(d);if((d.e.type==="mousemove"||!d.e.type)){return}else{var c=d.formatter({format:"location"},d.data);if(c){window.location.href=c}}}b.events=function(){return{on:a}};return b};var wax=wax||{};wax.movetip={};wax.movetip=function(){var d=false,k={},a,b,l,j;function g(n){var m=wax.u.eventoffset(n);if((a.height+m.y)>(b.top+b.height)&&(b.height>a.height)){m.y-=a.height;l.className+=" flip-y"}if((a.width+m.x)>(b.left+b.width)){m.x-=a.width;l.className+=" flip-x"}l.style.left=m.x+"px";l.style.top=m.y+"px"}function h(m){var n=document.createElement("div");n.className="wax-tooltip wax-tooltip-0";n.innerHTML=m;return n}function e(){if(l){l.parentNode.removeChild(l);l=null}}function f(r){var p;if(d){return}if((r.e.type==="mousemove"||!r.e.type)){p=r.formatter({format:"teaser"},r.data);if(!p){return}e();j.style.cursor="pointer";l=document.body.appendChild(h(p))}else{p=r.formatter({format:"teaser"},r.data);if(!p){return}e();var m=document.body.appendChild(h(p));m.className+=" wax-popup";var q=m.appendChild(document.createElement("a"));q.href="#close";q.className="close";q.innerHTML="Close";d=true;l=m;a=wax.u.offset(l);b=wax.u.offset(j);g(r.e);bean.add(q,"click touchend",function n(o){o.stop();e();d=false})}if(l){a=wax.u.offset(l);b=wax.u.offset(j);g(r.e)}}function c(){j.style.cursor="default";if(!d){e()}}k.parent=function(m){if(!arguments.length){return j}j=m;return k};k.events=function(){return{on:f,off:c}};return k};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,c){if(this.cache[a]){return c(this.cache[a][0],this.cache[a][1])}else{this.promises[a]=this.promises[a]||[];this.promises[a].push(c);if(this.locks[a]){return}var b=this;this.locks[a]=true;reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(e){b.locks[a]=false;b.cache[a]=[null,e];for(var d=0;d<b.promises[a].length;d++){b.promises[a][d](b.cache[a][0],b.cache[a][1])}},error:function(e){b.locks[a]=false;b.cache[a]=[e,null];for(var d=0;d<b.promises[a].length;d++){b.promises[a][d](b.cache[a][0],b.cache[a][1])}}})}}};wax.template=function(a){var c={};function b(e){if(/^(https?:\/\/|data:image)/.test(e)){return e}}function d(e){return e}c.format=function(e,g){var h={};for(var f in g){h[f]=g[f]}if(e.format){h["__"+e.format+"__"]=true}return html_sanitize(Mustache.to_html(a,h),b,d)};return c};if(!wax){var wax={}}wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={};wax.tooltip=function(){var d=false,a=false,m={},h=[],k,c,l;if(document.body.style["-webkit-transition"]!==undefined){c="webkitTransitionEnd"}else{if(document.body.style.MozTransition!==undefined){c="transitionend"}}function j(n){var o=document.createElement("div");o.className="wax-tooltip wax-tooltip-0";o.innerHTML=n;return o}function e(){if(this.parentNode){this.parentNode.removeChild(this)}}function f(){var n;while(n=h.pop()){if(a&&c){bean.add(n,c,e);n.className+=" wax-fade"}else{if(n.parentNode){n.parentNode.removeChild(n)}}}}function g(s){var q;if(s.e.type==="mousemove"||!s.e.type){if(!d){q=s.content||s.formatter({format:"teaser"},s.data);if(!q||q==k){return}f();l.style.cursor="pointer";h.push(l.appendChild(j(q)));k=q}}else{q=s.content||s.formatter({format:"full"},s.data);if(!q){if(s.e.type&&s.e.type.match(/touch/)){q=s.content||s.formatter({format:"teaser"},s.data)}if(!q){return}}f();l.style.cursor="pointer";var n=l.appendChild(j(q));n.className+=" wax-popup";var r=n.appendChild(document.createElement("a"));r.href="#close";r.className="close";r.innerHTML="Close";d=true;h.push(n);bean.add(r,"touchstart mousedown",function(o){o.stop()});bean.add(r,"click touchend",function p(o){o.stop();f();d=false})}}function b(){l.style.cursor="default";k=null;if(!d){f()}}m.parent=function(n){if(!arguments.length){return l}l=n;return m};m.animate=function(n){if(!arguments.length){return a}a=n;return m};m.events=function(){return{on:g,off:b}};return m};var wax=wax||{};wax.u={offset:function(b){var a=b.offsetWidth||parseInt(b.style.width,10),j=b.offsetHeight||parseInt(b.style.height,10),h=document.body,g=0,c=0;var k=function(l){if(l===h||l===document.documentElement){return}g+=l.offsetTop;c+=l.offsetLeft;var e=l.style.transform||l.style.WebkitTransform||l.style.OTransform||l.style.MozTransform||l.style.msTransform;if(e){if(match=e.match(/translate\((.+)px, (.+)px\)/)){g+=parseInt(match[2],10);c+=parseInt(match[1],10)}else{if(match=e.match(/translate3d\((.+)px, (.+)px, (.+)px\)/)){g+=parseInt(match[2],10);c+=parseInt(match[1],10)}else{if(match=e.match(/matrix3d\(([\-\d,\s]+)\)/)){var m=match[1].split(",");g+=parseInt(m[13],10);c+=parseInt(m[12],10)}else{if(match=e.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/)){g+=parseInt(match[2],10);c+=parseInt(match[1],10)}}}}}};k(b);try{while(b=b.offsetParent){k(b)}}catch(f){}g+=h.offsetTop;c+=h.offsetLeft;g+=h.parentNode.offsetTop;c+=h.parentNode.offsetLeft;var d=document.defaultView?window.getComputedStyle(h.parentNode,null):h.parentNode.currentStyle;if(h.parentNode.offsetTop!==parseInt(d.marginTop,10)&&!isNaN(parseInt(d.marginTop,10))){g+=parseInt(d.marginTop,10);c+=parseInt(d.marginLeft,10)}return{top:g,left:c,height:j,width:a}},"$":function(a){return(typeof a==="string")?document.getElementById(a):a},indexOf:function(e,d){var a=Array.prototype.indexOf;if(e===null){return -1}var c,b;if(a&&e.indexOf===a){return e.indexOf(d)}for(c=0,b=e.length;c<b;c++){if(e[c]===d){return c}}return -1},eventoffset:function(h){var b=0;var j=0;if(!h){h=window.event}if(h.pageX||h.pageY){return{x:h.pageX,y:h.pageY}}else{if(h.clientX||h.clientY){var g=document.documentElement,a=document.body;var d=document.body.parentNode.currentStyle;var c=parseInt(d.marginTop,10)||0;var f=parseInt(d.marginLeft,10)||0;return{x:h.clientX,y:h.clientY}}else{if(h.touches&&h.touches.length===1){return{x:h.touches[0].pageX,y:h.touches[0].pageY}}}}},limit:function(b,d,a){var c;return function(){var f=this,e=arguments;var g=function(){c=null;b.apply(f,e)};if(a){clearTimeout(c)}if(a||!c){c=setTimeout(g,d)}}},throttle:function(a,b){return this.limit(a,b,false)}};wax=wax||{};wax.leaf=wax.leaf||{};wax.leaf.interaction=function(){var e=false,c,g;function a(){e=true}function d(){if(!e&&c){return c}else{return(c=(function(k){var m=[];for(var h in k){if(k[h]._tiles){for(var j in k[h]._tiles){var l=wax.u.offset(k[h]._tiles[j]);m.push([l.top,l.left,k[h]._tiles[j]])}}}return m})(g._layers))}}function b(h){if(!arguments.length){return g}g=h;var j=["moveend"];for(var k=0;k<j.length;k++){g.on(j[k],a)}}function f(h){if(!arguments.length){return g}g=h;var j=["moveend"];for(var k=0;k<j.length;k++){g.off(j[k],a)}}return wax.interaction().attach(b).detach(f).parent(function(){return g._container}).grid(d)};wax=wax||{};wax.leaf=wax.leaf||{};wax.leaf.legend=function(c,d){d=d||{};var a,b={};b.add=function(){a=wax.legend().content(d.legend||"");return this};b.content=function(e){if(e){a.content(e.legend||"")}};b.element=function(){return a.element()};b.appendTo=function(e){wax.u.$(e).appendChild(a.element());return this};return b.add()};wax=wax||{};wax.leaf=wax.leaf||{};wax.leaf.connector=L.TileLayer.extend({initialize:function(a){a=a||{};a.minZoom=a.minzoom||0;a.maxZoom=a.maxzoom||22;a.opacity=a.opacity||1;L.TileLayer.prototype.initialize.call(this,a.tiles[0],a)}});
Please sign in to comment.
Something went wrong with that request. Please try again.