text: (function d(p,e,t){function r(i,o){if(!e[i]){if(!p[i]){var s="function"==typeof require&&require;if(!o&&s)return s(i,!0);if(n)return n(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var c=e[i]={exports:{}};p[i][0].call(c.exports,function(t){var e=p[i][1][t];return r(e?e:t)},c,c.exports,d,p,e,t)}return e[i].exports}for(var n="function"==typeof require&&require,a=0;a<t.length;a++)r(t[a]);return r})({1:[function(e,t){"use strict";var o=Math.min,r=Math.pow;t.exports=function(t,a,n,i){function s(e){function r(e,t){var o=parseInt(e.substring(1),16);return"rgba(".concat(o>>16,", ",255&o>>8,", ",255&o,", ",t,")")}function a(e,t){return-1<_.highlight.indexOf(t)?{radius:o(e.radius,h)}:{radius:o(e.radius,h),backgroundColor:r(m,v),borderColor:r(m,e.opacity)}}var i=t.getZoom(),s=O(e),l=w(s),p=S(i,C(e)),c=o(p,g),u=Object.assign({interactive:!1},T(e),{weight:c,radius:2*p,className:l});if(-1<_.exclude.indexOf(s))return null;var b={className:"marker-circle"};if((-1<_.background.indexOf(s)||0<_.highlight.length&&0>_.highlight.indexOf(s))&&(u.radius=o(u.radius,h),u.opacity="0.5",u.borderColor=m,u.width=1,u.backgroundColor=r(m,u.opacity),u.class="background"),(-1<_.highlight.indexOf(s)||0>_.background.indexOf(s))&&(u.up=!0,u.opacity="1",u.borderColor=u.color,u.backgroundColor=r(u.color,"0.85"),u.class="highlight"),P&&e.area_id===P);else if(P&&k)try{var y=0<d({type:"featureCollection",features:[e]},k).features.length;y||(u=Object.assign(u,a(u,s)))}catch(t){console.error("@turf/within",t),u=Object.assign(u,a(u,s))}else P&&(u=Object.assign(u,a(u,s)));var f=2*u.radius;b.iconSize=f;var E="".concat("font-size:",f,"px;","width:",f,"px;","height:",f,"px;","border-color:",u.borderColor,";","border-width:",u.weight,"px ",u.weight,"px;","background-color:",u.backgroundColor,";");return b.html=x<=u.radius?"<div class=\"circle\" style=\""+E+"\">"+n.getIcon(e)+"</div>":"<div class=\"circle circle-small "+u.class+"\" style=\""+E+"\"></div>",L.divIcon(b)}function l(e,t){var o=s(e);return o?L.marker(t,{icon:o,interactive:!1,pane:"customMarkerPane"}):null}var d=e("@turf/within"),p=e("moment"),c="https://loggerproxy.firstlife.org/events/{x}/{y}/{z}";switch(i){case"pt2":c="https://loggerproxy-pt2.firstlife.org/events/{x}/{y}/{z}";break;case"pt3":c="https://loggerproxy-pt3.firstlife.org/events/{x}/{y}/{z}";break;case"sandona":c="https://loggerproxy-sandona.firstlife.org/events/{x}/{y}/{z}";break;case"torino":c="https://loggerproxy-torino.firstlife.org/events/{x}/{y}/{z}";break;case"southwark":c="https://loggerproxy-southwark.firstlife.org/events/{x}/{y}/{z}";break;default:}var u=20,b={from:null,to:null},m="#9E9E9E",y=function(e){return"FL_GROUPS"===e?"#3F7F91":"FL_EVENTS"===e?"#88BA5C":"FL_NEWS"===e?"#823256":"FL_ARTICLES"===e?"#FFB310":"FL_PLACES"===e?"#FE4336":e.includes("imc.infalia")?"#82b1ff":e.includes("tmp.infalia")?"#3F51B5":e.includes("liquidfeedback")?"#4CAF50":e.includes("firstlife")?"#FF9800":e.includes("geokey")?"#F44336":e.includes("communitymaps")?"#009688":"#c32630"},f="";b.from&&b.from.utc()&&(f=""==f?f.concat("?"):f.concat("&"),f=f.concat("start_time=",b.from.utc().format("x"))),b.to&&b.to.utc()&&(f=""===f?f.concat("?"):f.concat("&"),f=f.concat("end_time=",b.to.utc().format("x")));var _={highlight:[],background:[],exclude:[]},g=2,h=8,v=0.6,x=14,S=function(e,t){var o=e<t?3:1.4,a=-1*r(e-t,2),n=2*r(o,2),i=Math.floor(10*Math.exp(a/n));return Math.max(i,2.5)},O=function(e){return e.properties.entity_type||e.application||e.properties.hasType},w=function(e){return"FL_GROUPS"===e?"People":"FL_EVENTS"===e?"Calendar":"FL_NEWS"===e?"Alert":"FL_ARTICLES"===e?"Content":"FL_PLACES"===e?"Location":e.includes("imc.infalia")?"Alert":e.includes("tmp.infalia")?"Activity":e.includes("liquidfeedback")?"Input":e.includes("firstlife")?"People":e.includes("geokey")?"Content":e.includes("communitymaps")?"Content":"Content"},T=function(e){var t=O(e),o=y(t);return{opacity:0.8,fill:!0,fillOpacity:0.8,weight:0,color:o,fillColor:o}},P=null,k=null,C=function(e){if(e&&e.properties&&e.properties.zoom_level)return e&&e.properties&&e.properties.zoom_level;if(e&&e.properties&&e.properties.hasType)switch(e.properties.hasType){case"BicyclePath":case"Highway":case"Hospital":case"UrbanPark":return 16;break;default:return u;}return u},E={layers:{default:{pointToLayer:function(e,t){return l(e,t)}}}},D=L.geoJsonGridLayer(c+f,E);return D.update=function(){console.log("grid update");var e=D.getLayers()[0];if(e){var r=e._layers,a=t.getZoom();for(var n in r){var i=r[n],l=C(i.feature),d=S(a,l),p=o(d,g),c=O(i.feature);-1<_.background.indexOf(c)&&(d=o(d,h)),i.setIcon(s(i.feature))}}},D.setStyle=function(e){e&&(P=e.id,k={type:"featureCollection",features:e.features},D.update())},D.resetStyle=function(){P=null,k=null,D.update()},a.observe.filter(function(e){return"features"in e}).subscribe(function(e){return D.setStyle(e)}),a.observe.filter(function(e){return"reset"in e}).subscribe(function(){D.resetStyle()}),a.observe.filter(function(e){return"date"in e}).filter(function(e){return e.date}).subscribe(function(e){(e.from||e.to)&&(b.from=e.from||b.from,b.to=e.to||b.to,f="?start_time=".concat(b.from.utc().format("x")).concat("&end_time=",b.to.utc().format("x")),D.remove(),D=L.geoJsonGridLayer(c+f,E),D.addTo(t))}),t.on("zoomend",function(){D.update()}),a.observe.filter(function(e){return"priority"in e}).map(function(e){return e.priority}).subscribe(function(e){_=e}),D.addTo(t),D}},{"@turf/within":18,moment:21}],2:[function(e,t){"use strict";t.exports=function(t,o){function e(e,t){var o=new CustomEvent(e,{detail:t||{},bubbles:!0,cancelable:!1});console.debug("notifying action",e,o.detail),document.dispatchEvent(o)}var r="areaViewer.resetView",a="areaViewer.setBounds",n="areaViewer.setContrast",i="areaViewer.setLanguage",s="areaViewer.setDate",l="areaViewer.setInteractive",d="areaViewer.focusTo",p="areaViewer.toExplore";document.addEventListener(a,function(o){console.log(a,o.detail);o.detail.bounds&&(t.restore(),t.move(o.bounds))},!1),document.addEventListener("areaViewer.setView",function(r){(r.detail.lat&&r.detail.lng||r.detail.center)&&(t.restore(),o.setView(r.detail.center||L.latLng(r.detail.lat,r.detail.lng),r.detail.zoom||18))},!1),document.addEventListener(r,function(t){console.log(r,t.detail)},!1),document.addEventListener(n,function(o){console.log(n,o.detail),t.contrast(o.detail.contrast)},!1),document.addEventListener(i,function(o){console.log(i,o.detail);o.detail.lang&&t.lang(lang)},!1),document.addEventListener(s,function(o){console.log(s,o.detail);o.detail.date_from&&o.detail.date_to&&t.date({from:o.detail.date_from,to:o.detail.date_to})},!1),document.addEventListener(l,function(o){console.log(l,o.detail);null===o.detail.interactive||"null"===o.detail.interactive||"undefined"===o.detail.interactive||t.interactive({interactive:o.detail.interactive})},!1),document.addEventListener("areaViewer.setPriority",function(o){o.detail.priority&&t.priority(o.detail.priority)},!1),document.addEventListener(d,function(o){console.debug(d,o.detail);o.detail.id&&t.focus({id:o.detail.id})},!1),document.addEventListener(p,function(o){console.log(p,o.detail),t.restore()},!1),t.observe.filter(function(e){return"reset"in e}).subscribe(function(){e("areaViewer.explore")}),t.observe.filter(function(e){return"c"in e}).filter(function(e){return e.c}).subscribe(function(t){e("areaViewer.position",t)}),t.observe.filter(function(e){return"id"in e}).map(function(e){return{features:e.features,content:e.content}}).subscribe(function(t){e("areaViewer.focusOn",{id:t.features[0].id||t.features[0]._id||t.features[0].properties.id,feature:t.features[0],content:t.content})})}},{}],3:[function(e,t){"use strict";t.exports=function(e){var t="#c32630",o=L.geoJson([],{style:{color:t,weight:2,fill:!0,fillColor:t,opacity:1,fillOpacity:0.35,dashArray:"10"},pane:"focusPane"});return o.setLayer=function(e){o.clearLayers();var t=o.addData(e);return t},e.observe.filter(function(e){return"features"in e}).map(function(e){return e.features}).subscribe(function(e){console.debug("check focus",e),o.setLayer(e)}),o}},{}],4:[function(e,t){"use strict";t.exports=function(t,o,r,a,n,i,s,l){function d(e){var t="",o=e.type.toLowerCase();switch(o){case"city_block":t=t.concat(h.city_block[lang]);break;case"quartieri":t=t.concat(h.quartieri[lang]);break;case"site":t=t.concat(h.site[lang]);break;case"tile":t=t.concat(h.tile[lang]);default:}return"undefined"!=typeof e.name&&e.type!==e.name&&(""!==t&&(t=t.concat(": ")),t=t.concat(e.name)),t}function p(e){var t="<li class=\"mdl-list__item mdl-list__item--two-line\"><span class=\"mdl-list__item-primary-content\">",o="</li>",r=null,a=s.getIcon(e);if(t=t.concat("<i class=\"material-icons mdl-list__item-icon\">",a,"</i>"),(e.properties.name||e.properties.hasName||e.details.name)&&(r=e.properties.name||e.properties.hasName||e.details.name,t=t.concat("<span class=\"name\">",r,"</span>")),e.timestamp){var n=b.duration(b()-b(e.timestamp)).humanize();t=t.concat("<span class=\"mdl-list__item-sub-title\">",n,"</span>")}if(e.properties.reference_external_url||e.properties.external_url){var i=e.properties.reference_external_url||e.properties.external_url;o="</span>".concat("<span class=\"mdl-list__item-secondary-content\">","<a class=\"mdl-list__item-secondary-action\" target=\"_top\" href=\"",i,"\">","<i class=\"material-icons\">","launch","</i>","</a></span>",o)}return r?t.concat(o):null}function c(e){return f.empty(),!e||"undefined"==typeof e||1>e.length?f.append("<span>"+x.empty[S]+"</span>"):f.append("<span>"+x.full[S]+"</span>")}var u=e("jquery"),b=e("moment"),m=u("#"+r),y=u("#"+a),f=u("#"+i),_=u("#"+n),g=!0,h={city_block:{en:"City block",it:"Isolato"},quartieri:{en:"Neighbourhood",it:"Quartiere"},site:{en:"Outdoor place",it:"Spazio esterno"},tile:{en:"Area",it:"Area"}};m.empty();var v={it:"Indietro",en:"Back"},x={empty:{it:"Nessun contenuto",en:"No contents yet"},full:{it:"Contenuti",en:"Contents"}},S=l,O=null;t.observe.filter(function(e){return"features"in e}).map(function(e){return e.features[0].properties}).subscribe(function(e){w(e)}),t.observe.filter(function(e){return"reset"in e}).subscribe(function(){O=null,w()}),t.observe.filter(function(e){return"lang"in e}).map(function(e){return e.lang}).subscribe(function(e){S===e||(console.debug("to setup current language",e),S=e,w())});var w=function(e){if(!e&&!O)return k(),void m.empty();e&&(O=d(e));var t="<button class=\"mdl-button mdl-js-button mdl-button--icon\" id=\"exitFocus\" title=\""+v[S]+"\"><i class=\"material-icons\">clear</i></button>",o=u("<div id=\"label\">"+t.concat("<span class=\"placeName\">",O,"</span></div>"));m.empty(),m.append(o),P(),console.debug("label: ",O,"from feature: ",e)},T=function(){console.debug("click to exit from focus mode"),t.restore()},P=function(){document.getElementById("exitFocus")&&document.getElementById("exitFocus").addEventListener("click",T)},k=function(){document.getElementById("exitFocus")&&document.getElementById("exitFocus").removeEventListener("click",T)};t.observe.filter(function(e){return"interactive"in e}).map(function(e){return e.interactive}).subscribe(function(e){g=e}),t.observe.filter(function(e){return"content"in e}).map(function(e){return e.content}).subscribe(function(e){y.empty();"false"===g||!1===g||(console.debug("add content to featurebox",e,g),e.sort(function(e,t){return e.timestamp>=t.timestamp}).forEach(function(t){var o=p(t);o&&y.append(o)}),c(e))}),w()}},{jquery:19,moment:21}],5:[function(e,t){"use strict";t.exports=function(){var e="#c32630",t={color:"transparent",weight:0,fillColor:"transparent"},o={color:e,weight:2,fill:!1,fillColor:e,opacity:1,fillOpacity:0.5},r=function(){return{fill:!1,weight:0}},a={nazioni:r,nazioni_mondo:r,regioni:r,regioni_europa:r,provincie:r,province_europa:r,comuni:r,comune:r,comuni_italia:r,circoscrizioni:r,quartieri:r,city_block:r,site:r,building:r,landusages:r,roads:r,waterareas:r,waterways:r,indoor:r,interactive:r};L.Path.mergeOptions(t),L.Polyline.mergeOptions(t),L.Polygon.mergeOptions(t),L.Rectangle.mergeOptions(t),L.Circle.mergeOptions(t),L.CircleMarker.mergeOptions(t),a.buildings=a.building,a.boundaries=a.boundary,a.places=a.place,a.pois=a.poi,a.roads=a.road;var n={rendererFactory:L.svg.tile,attribution:!1,vectorTileLayerStyles:a,interactive:!0,pane:"vectorGridPane",getFeatureId:function(t){return t.properties.id},layersOrdering:function(e,t){switch(t){case 1:case 2:return["nazioni_mondo","waterareas"];break;case 3:case 4:return["nazioni_mondo","regioni_europa","province_europa"];break;case 5:case 6:return["nazioni_mondo","regioni_europa","province_europa"];break;case 7:case 8:return["nazioni_mondo","regioni_europa","province_europa"];break;case 9:case 10:return["nazioni_mondo","regioni_europa","province_europa","comuni_italia","comune"];break;case 11:case 12:return["province_europa","comuni_italia","comune"];break;case 13:case 14:return["province_europa","comuni_italia","comune","quartieri","landusages","waterareas"];break;case 15:case 16:return["comuni_italia","quartieri","city_block","waterareas","landusages"];break;case 17:case 18:return["quartieri","city_block","waterareas","landusages","building","site"];break;case 19:case 20:return["city_block","waterareas","landusages","building","site","indoor"];break;default:return Object.keys(e);}}},i=L.vectorGrid.protobuf("https://tiles.firstlife.org/tile/{z}/{x}/{y}",n),s=null;return i.highlight=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;s&&i.resetFeatureStyle(s),e&&(s=e,i.setFeatureStyle(e,o))},i.resetStyle=function(){s&&(i.resetFeatureStyle(s),s=null)},i}},{}],6:[function(e,t){"use strict";var o=function(){e("leaflet"),e("../libs/Leaflet.VectorGrid"),e("../libs/leaflet-geojson-gridlayer");var t=e("@turf/within"),o=e("@turf/helpers"),r=e("jquery"),a="southwark";console.log("current environment:",a);var n="areaViewer",i="en";i="en";var s=!0,l={true:"focus",false:"nofocus"},d=e("./utils"),p=d(),c=e("./map"),u=c(n,a),b=u.zoomControl,m=r("#"+n),y=e("./status"),f=y(u),_=e("./events"),g=_(f,u),h=e("./datasource.js"),v=e("./interactive.js"),x=v(),S=e("./focus"),O=S(f),w=e("./infobox"),T=w(f,u,"infobox","featurebox",n,"featureboxheader",p,i),P={en:"Search...",it:"Cerca..."},k={defaultMarkGeocode:!1,position:"topleft",placeholder:P[i]};geoCoder();var C=L.Control.geocoder(k);!1,f.move({bounds:u.getBounds(),center:u.getCenter(),zoom:u.getZoom()}),x.addTo(u),h(u,f,p,a),O.addTo(u),C.addTo(u),f.observe.filter(function(e){return"features"in e}).subscribe(function(e){console.log("focus management",e.features);var t=O.setLayer(e.features);console.debug("fLayer.setLayer",t),r("body").addClass(l[s]),u.invalidateSize(),u.fitBounds(t.getBounds())}),f.observe.filter(function(e){return"interactive"in e}).map(function(e){return e.interactive}).subscribe(function(e){s=e}),f.observe.filter(function(e){return"contrast"in e}).map(function(e){return e.contrast}).subscribe(function(e){e?u.setBasemap("contrast"):u.setBasemap("base")}),f.observe.filter(function(e){return"reset"in e}).subscribe(function(){r("body").removeClass(l[s]),u.invalidateSize(),x.resetStyle(),console.debug("check fLayer",O),O.clearLayers()}),f.observe.filter(function(e){return"reset"in e}).subscribe(function(){C.addTo(u)}),f.observe.filter(function(e){return"id"in e}).subscribe(function(){C.remove()}),f.observe.filter(function(e){return"lang"in e}).map(function(e){return e.lang}).subscribe(function(e){C.remove(),k.placeholder=P[e],C=L.Control.geocoder(k),C.addTo(u)}),x.on("click",function(r){if(!r.originalEvent.defaultPrevented){r.originalEvent.preventDefault();var e=f.getFocus();if(console.debug("is focus?",e),e){console.debug("click inside focus area",e);var a=o.point([r.latlng.lng,r.latlng.lat]),n={type:"FeatureCollection",features:e.features};try{var i=t(o.featureCollection([a]),n);1>i.features.length?f.restore():f.focus({feature:r.layer.properties,id:r.layer.properties.id})}catch(t){return console.error("turf.within error",t),void f.restore()}}else f.focus({feature:r.layer.properties,id:r.layer.properties.id})}}),u.on("click",function(t){if(!t.originalEvent.defaultPrevented)return t.originalEvent.preventDefault(),console.debug("click on map, current status",f.current()),"focus"===f.current()?f.restore():void f.focus({lat:t.latlng.lat,lng:t.latlng.lng,zoom:u.getZoom()})}),u.on("moveend",function(){f.move({bounds:u.getBounds(),center:u.getCenter(),zoom:u.getZoom()})}),C.on("markgeocode",function(t){u.setView(t.geocode.center,locationZoom)}),f.observe.filter(function(e){return"id"in e}).subscribe(function(){b.remove()}),f.observe.filter(function(e){return"reset"in e}).subscribe(function(){b.addTo(u)})};t.exports.AreaViewer=o,o()},{"../libs/Leaflet.VectorGrid":10,"../libs/leaflet-geojson-gridlayer":11,"./datasource.js":1,"./events":2,"./focus":3,"./infobox":4,"./interactive.js":5,"./map":7,"./status":8,"./utils":9,"@turf/helpers":14,"@turf/within":18,jquery:19,leaflet:20}],7:[function(e,t){"use strict";t.exports=function(t,o){var r=e("jquery"),a={base:L.tileLayer("https://c.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:20,attribution:"Tiles and Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>."}),contrast:L.tileLayer("https://c.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:20,attribution:"Tiles and Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>."})},n=14,i=45.630373,s=12.566082;// const contrastAttribution = "Map tiles by <a href='http://stamen.com'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>.";
  //     "tile_edit_attribution": "Map tiles by <a href='http://stamen.com'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>."
  "pt1"===o?(n=14,i=51.483448,s=-0.082088):"pt2"===o?(n=14,i=45.070339,s=7.686864):"pt3"===o?(n=14,i=45.630373,s=12.566082):"sandona"===o?(n=14,i=45.630373,s=12.566082):"torino"===o?(n=14,i=45.070339,s=7.686864):"southwark"===o?(n=14,i=51.483448,s=-0.082088):void 0;var l=L.map(t).setView([i,s],n),d=l.zoomControl;d.setPosition("bottomleft"),l.createPane("focusPane"),l.createPane("customMarkerPane"),l.createPane("vectorGridPane"),l.getPane("focusPane").style.zIndex=9,l.getPane("overlayPane").style.zIndex=10,l.getPane("customMarkerPane").style.zIndex=10,l.getPane("vectorGridPane").style.zIndex=11;var p=a.base.addTo(l);return l.setBasemap=function(e){p&&l.removeLayer(p),p=a[e]||a.base,l.addLayer(p)},l}},{jquery:19}],8:[function(e,t){"use strict";t.exports=function(t){function o(e){return function(t){console.debug("focusHandler",t),t.feature||t.id?"focus"===y?0<m.focus.features.lenght&&JSON.stringify(m.focus.features).find(t.id)&&n(t,e):n(t,e):a(t,e)}}function r(e){return"undefined"!=typeof t._layers&&t._layers?(console.debug("extractContent",t,e),Object.keys(t._layers).reduce(function(o,r){var a=t._layers[r].feature;if(!a)return o;if(a&&a.properties&&a.properties.area_id&&a.properties.area_id===features[0].id)return o.concat(a);try{var n=0<u({type:"featureCollection",features:[a]},{type:"featureCollection",features:[e]}).features.length;if(console.debug("is inside?",n),n)return o.concat(a)}catch(t){console.error("@turf/within",t)}return o},[])):[]}function a(e,t){if(e||e.tileId||e.lat&&e.lng&&e.zoom){var o=null,a=null;if(e.tileId){a=e.tileId;var n=e.tileId.split(":");o=[parseFloat(n[0]),parseFloat(n[1]),parseInt(n[2])],console.debug("focus on tileId, tile",o)}else{if(o=b.pointToTile(parseFloat(e.lng),parseFloat(e.lat),parseInt(e.zoom)),!o)return;if(a=o[0]+":"+o[1]+":"+o[2],console.debug("virtual focus on tile",a),!a)return}if(o&&a){var i=b.tileToBBOX(o);if(console.debug("virtual focus on bbox",i),!!i){var s=b.tileToGeoJSON(o);console.debug("virtual focus on polygon",s),s&&(s.id=a,s.properties={id:a,type:"tile"},m.focus.id=a,m.focus.bounds=i,m.focus.features=[s],m.focus.content=r(s),y="focus",t.next(m.focus))}}}}function n(e,t){if(console.debug("focus on ",e),y="focus",m.focus.id=e.id,e.id&&3===e.id.split(":").length)return a({tileId:e.id},t);p.getFeature(e.id).then(function(e){m.focus.features=Array.isArray(e)?e:"FeatureCollection"===e.type?e.features:"Feature"===e.type?[e]:[];var o=s(m.focus.features[0]);m.focus.bounds=[o[1],o[0],o[3],o[4]],m.focus.content=r(e),console.debug("stato focus",m.focus),t.next(m.focus)},function(e){console.error("getFeature",e)})}function i(e){var t=Object.assign(e);return e.from&&e.to&&Date.parse(e.from)>Date.parse(e.to)&&(t.from=e.to),!e.from&&e.to&&(console.log("adding date_from"),t.from=e.to),!e.to&&e.from&&(t.to=e.from),t}var s=e("@turf/bbox"),l=e("rxjs/Rx"),d=e("./utils"),p=d(),c=e("moment"),u=e("@turf/within"),b=e("@mapbox/tilebelt"),m={focus:{id:null,bounds:null,features:[]},explorer:{bounds:null,reset:!0},interface:{lang:"en",contrast:!1,interactive:!0},view:{c:null,priority:{highlight:[],background:[],exclude:[]},date:{from:null,to:null}}},y="explorer",f={focus:null,move:null,restore:null,lang:null,contrast:null,priority:null,interactive:null,date:null,observe:null,current:function(){return y}};return f.observe=l.Observable.create(function(e){console.debug("check observer",Object.assign({},e)),f.lang=function(t){m["interface"].lang!==t&&(m["interface"].lang="it"===t?"it":"en",e.next(m["interface"]))},f.contrast=function(t){m["interface"].contrast===t||(m["interface"].contrast=t,e.next(m["interface"]))},f.priority=function(t){m.view.priority=t,e.next(m.view)},f.date=function(t){var o=i(t);m.view.date.from=o.from,m.view.date.to=o.to,e.next(m.view.date)},f.interactive=function(t){m["interface"].interactive="false"!==t.interactive,e.next(m["interface"])},f.focus=o(e),f.move=function(t){m.view.c=t.center.lat+":"+t.center.lng+":"+t.zoom,e.next(m.view);var o=t.bounds;switch(y){case"focus":break;default:m.explorer.bounds=o;}},f.restore=function(){console.debug("to restore?","explorer"!=y),"explorer"==y||(y="explorer",e.next(m.explorer))}}).share(),f.observe.subscribe(),f.getFocus=function(){return"focus"==y?m.focus:null},f}},{"./utils":9,"@mapbox/tilebelt":12,"@turf/bbox":13,"@turf/within":18,moment:21,"rxjs/Rx":30}],9:[function(e,t){"use strict";t.exports=function(){return{hideStyle:function(e){return function(t){return t.area_id&&t.area_id===e?{up:!0}:{weight:0,fillColor:"gray",radius:1,up:!1}}},getFeature:function(e){return console.log("getFeature",e),new Promise(function(t,o){var r=new XMLHttpRequest,a="https://tiles.firstlife.org/areas/".concat(e);r.open("GET",a),r.onload=function(){200<=r.status&&300>r.status?t(JSON.parse(r.response)):o(r.statusText)},r.onerror=function(){return o(r.statusText)},r.send()})},getIcon:function(e){var t="place";if(e.properties.hasType){var o=e.properties.hasType.toLowerCase();t="school"===o?"school":"initiative"===o?"assessment":"event"===o?"event":"report"===o?"build":"room"}if(e.activity_type){var r=e.activity_type.toLowerCase();switch(r){case"object_created":break;case"object_removed":t="delete";break;case"contribution_added":t="playlist add";break;case"contribution_updated":t="playlist add check";break;case"contribution_removed":t="exposure neg 1";break;case"issue_voted_on":t="exposure plus 1";break;case"interest_added":t="exposure plus 1";break;case"interest_removed":t="exposure neg 1";break;case"support_added":t="exposure plus 1";break;case"support_removed":t="exposure neg 1";break;case"suggestion_rated":t="exposure";break;default:}}return"<i class=\"material-icons mdl-list__item-icon\">"+t+"</i>"}}}},{}],10:[function(){var e=Math.PI,t=Math.round,o=Math.sqrt,r=Math.LN2,a=Math.log,n=String.fromCharCode,s=Math.floor,l=Math.pow;(function(){"use strict";function i(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}function d(e,t,o){var r=o.buf,a,n;if(n=r[o.pos++],a=(112&n)>>4,128>n)return c(e,a,t);if(n=r[o.pos++],a|=(127&n)<<3,128>n)return c(e,a,t);if(n=r[o.pos++],a|=(127&n)<<10,128>n)return c(e,a,t);if(n=r[o.pos++],a|=(127&n)<<17,128>n)return c(e,a,t);if(n=r[o.pos++],a|=(127&n)<<24,128>n)return c(e,a,t);if(n=r[o.pos++],a|=(1&n)<<31,128>n)return c(e,a,t);throw new Error("Expected varint not more than 10 bytes")}function p(e){return e.type===i.Bytes?e.readVarint()+e.pos:e.pos+1}function c(e,t,o){return o?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function u(e,t){var o,r;if(0<=e?(o=0|e%4294967296,r=0|e/4294967296):(o=~(-e%4294967296),r=~(-e/4294967296),4294967295^o?o=0|o+1:(o=0,r=0|r+1)),0x10000000000000000<=e||-0x10000000000000000>e)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),b(o,r,t),m(r,t)}function b(e,t,o){o.buf[o.pos++]=128|127&e,e>>>=7,o.buf[o.pos++]=128|127&e,e>>>=7,o.buf[o.pos++]=128|127&e,e>>>=7,o.buf[o.pos++]=128|127&e,e>>>=7,o.buf[o.pos]=127&e}function m(e,t){var o=(7&e)<<4;(t.buf[t.pos++]|=o|((e>>>=3)?128:0),!!e)&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!!e)&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!!e)&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!!e)&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e))}function y(e,t,o){var n=16383>=t?1:2097151>=t?2:268435455>=t?3:Math.ceil(a(t)/(7*r));o.realloc(n);for(var s=o.pos-1;s>=e;s--)o.buf[s+n]=o.buf[s]}function f(e,t){for(var o=0;o<e.length;o++)t.writeVarint(e[o])}function _(e,t){for(var o=0;o<e.length;o++)t.writeSVarint(e[o])}function g(e,t){for(var o=0;o<e.length;o++)t.writeFloat(e[o])}function h(e,t){for(var o=0;o<e.length;o++)t.writeDouble(e[o])}function v(e,t){for(var o=0;o<e.length;o++)t.writeBoolean(e[o])}function x(e,t){for(var o=0;o<e.length;o++)t.writeFixed32(e[o])}function S(e,t){for(var o=0;o<e.length;o++)t.writeSFixed32(e[o])}function O(e,t){for(var o=0;o<e.length;o++)t.writeFixed64(e[o])}function w(e,t){for(var o=0;o<e.length;o++)t.writeSFixed64(e[o])}// Buffer code below from https://github.com/feross/buffer, MIT-licensed
  function T(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function P(e,t,o){e[o]=t,e[o+1]=t>>>8,e[o+2]=t>>>16,e[o+3]=t>>>24}function k(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function C(e,t,o){for(var r="",a=t;a<o;){var i=e[a],s=null,l=239<i?4:223<i?3:191<i?2:1;if(a+l>o)break;var d,p,c;1==l?128>i&&(s=i):2==l?(d=e[a+1],128==(192&d)&&(s=(31&i)<<6|63&d,127>=s&&(s=null))):3==l?(d=e[a+1],p=e[a+2],128==(192&d)&&128==(192&p)&&(s=(15&i)<<12|(63&d)<<6|63&p,(2047>=s||55296<=s&&57343>=s)&&(s=null))):4==l&&(d=e[a+1],p=e[a+2],c=e[a+3],128==(192&d)&&128==(192&p)&&128==(192&c)&&(s=(15&i)<<18|(63&d)<<12|(63&p)<<6|63&c,(65535>=s||1114112<=s)&&(s=null))),null===s?(s=65533,l=1):65535<s&&(s-=65536,r+=n(55296|1023&s>>>10),s=56320|1023&s),r+=n(s),a+=l}return r}function E(e,t,o){for(var r=0,a,n;r<t.length;r++){if(a=t.charCodeAt(r),!(55295<a&&57344>a))n&&(e[o++]=239,e[o++]=191,e[o++]=189,n=null);else if(!n){56319<a||r+1===t.length?(e[o++]=239,e[o++]=191,e[o++]=189):n=a;continue}else if(56320>a){e[o++]=239,e[o++]=191,e[o++]=189,n=a;continue}else a=65536|(n-55296<<10|a-56320),n=null;128>a?e[o++]=a:(2048>a?e[o++]=192|a>>6:(65536>a?e[o++]=224|a>>12:(e[o++]=240|a>>18,e[o++]=128|63&a>>12),e[o++]=128|63&a>>6),e[o++]=128|63&a)}return o}function D(e,t){this.x=e,this.y=t}function A(e,t,o,r,a){this.properties={},this.extent=o,this.type=0,this._pbf=e,this._geometry=-1,this._keys=r,this._values=a,e.readFields(j,this,t)}function j(e,t,o){1==e?t.id=o.readVarint():2==e?M(o,t):3==e?t.type=o.readVarint():4==e&&(t._geometry=o.pos)}function M(e,t){for(var o=e.readVarint()+e.pos;e.pos<o;){var r=t._keys[e.readVarint()],a=t._values[e.readVarint()];t.properties[r]=a}}function N(e){var t=e.length;if(1>=t)return[e];for(var o=[],r=0,a,n,i;r<t;r++)(i=I(e[r]),0!==i)&&(void 0==n&&(n=0>i),n===0>i?(a&&o.push(a),a=[e[r]]):a.push(e[r]));return a&&o.push(a),o}function I(e){for(var t=0,o=0,r=e.length,a=r-1,n,i;o<r;a=o++)n=e[o],i=e[a],t+=(i.x-n.x)*(n.y+i.y);return t}function R(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(z,this,t),this.length=this._features.length}function z(e,t,o){15===e?t.version=o.readVarint():1===e?t.name=o.readString():5===e?t.extent=o.readVarint():2===e?t._features.push(o.pos):3===e?t._keys.push(o.readString()):4===e&&t._values.push(B(o))}function B(e){for(var t=null,o=e.readVarint()+e.pos;e.pos<o;){var r=e.readVarint()>>3;t=1==r?e.readString():2==r?e.readFloat():3==r?e.readDouble():4==r?e.readVarint64():5==r?e.readVarint():6==r?e.readSVarint():7==r?e.readBoolean():null}return t}function F(e,t,o){if(3===e){var r=new q(o,o.readVarint()+o.pos);r.length&&(t[r.name]=r)}}var U=Math.atan2;(function(e){function t(e){if("string"!=typeof e&&(e+=""),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function o(e){return"string"!=typeof e&&(e+=""),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return g.iterable&&(t[Symbol.iterator]=function(){return t}),t}function a(e){this.map={},e instanceof a?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function s(e){return new Promise(function(t,o){e.onload=function(){t(e.result)},e.onerror=function(){o(e.error)}})}function l(e){var t=new FileReader,o=s(t);return t.readAsArrayBuffer(e),o}function d(e){var t=new FileReader,o=s(t);return t.readAsText(e),o}function p(e){for(var t=new Uint8Array(e),o=Array(t.length),r=0;r<t.length;r++)o[r]=n(t[r]);return o.join("")}function c(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function u(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,!e)this._bodyText="";else if("string"==typeof e)this._bodyText=e;else if(g.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(g.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(g.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(g.arrayBuffer&&g.blob&&v(e))this._bodyArrayBuffer=c(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else if(g.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||x(e)))this._bodyArrayBuffer=c(e);else throw new Error("unsupported BodyInit type");this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):g.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},g.blob&&(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");else return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(l)}),this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return d(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");else return Promise.resolve(this._bodyText)},g.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}function b(e){var t=e.toUpperCase();return-1<S.indexOf(t)?t:e}function m(e,t){t=t||{};var o=t.body;if(e instanceof m){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new a(e.headers)),this.method=e.method,this.mode=e.mode,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=e+"";if(this.credentials=t.credentials||this.credentials||"omit",(t.headers||!this.headers)&&(this.headers=new a(t.headers)),this.method=b(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function y(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var o=e.split("="),r=o.shift().replace(/\+/g," "),a=o.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}}),t}function f(e){var t=new a;return e.split(/\r?\n/).forEach(function(e){var o=e.split(":"),r=o.shift().trim();if(r){var a=o.join(":").trim();t.append(r,a)}}),t}function _(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=200<=this.status&&300>this.status,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new a(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var g={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(g.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=function(e){return e&&DataView.prototype.isPrototypeOf(e)},x=ArrayBuffer.isView||function(e){return e&&-1<h.indexOf(Object.prototype.toString.call(e))};a.prototype.append=function(e,r){e=t(e),r=o(r);var a=this.map[e];this.map[e]=a?a+","+r:r},a.prototype["delete"]=function(e){delete this.map[t(e)]},a.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},a.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},a.prototype.set=function(e,r){this.map[t(e)]=o(r)},a.prototype.forEach=function(e,t){var o=this;for(var r in this.map)o.map.hasOwnProperty(r)&&e.call(t,o.map[r],r,o)},a.prototype.keys=function(){var e=[];return this.forEach(function(t,o){e.push(o)}),r(e)},a.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},a.prototype.entries=function(){var e=[];return this.forEach(function(t,o){e.push([o,t])}),r(e)},g.iterable&&(a.prototype[Symbol.iterator]=a.prototype.entries);var S=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},u.call(m.prototype),u.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var O=[301,302,303,307,308];_.redirect=function(e,t){if(-1===O.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},e.Headers=a,e.Request=m,e.Response=_,e.fetch=function(e,t){return new Promise(function(o,r){var a=new m(e,t),n=new XMLHttpRequest;n.onload=function(){var e={status:n.status,statusText:n.statusText,headers:f(n.getAllResponseHeaders()||"")};e.url="responseURL"in n?n.responseURL:e.headers.get("X-Request-URL");var t="response"in n?n.response:n.responseText;o(new _(t,e))},n.onerror=function(){r(new TypeError("Network request failed"))},n.ontimeout=function(){r(new TypeError("Network request failed"))},n.open(a.method,a.url,!0),"include"===a.credentials&&(n.withCredentials=!0),"responseType"in n&&g.blob&&(n.responseType="blob"),a.headers.forEach(function(e,t){n.setRequestHeader(t,e)}),n.send("undefined"==typeof a._bodyInit?null:a._bodyInit)})},e.fetch.polyfill=!0}})("undefined"==typeof self?void 0:self);var V={read:function(t,o,r,a,n){var p=8*n-a-1,c=(1<<p)-1,u=c>>1,b=-7,y=r?n-1:0,i=r?-1:1,d=t[o+y],s,e;for(y+=i,s=d&(1<<-b)-1,d>>=-b,b+=p;0<b;s=256*s+t[o+y],y+=i,b-=8);for(e=s&(1<<-b)-1,s>>=-b,b+=a;0<b;e=256*e+t[o+y],y+=i,b-=8);if(0===s)s=1-u;else{if(s===c)return e?NaN:(d?-1:1)*Infinity;e+=l(2,a),s-=u}return(d?-1:1)*e*l(2,s-a)},write:function(t,o,n,p,u,b){var y=8*b-u-1,f=(1<<y)-1,_=f>>1,g=23===u?5.960464477539063e-8-6.617444900424222e-24:0,h=p?0:b-1,i=p?1:-1,d=0>o||0===o&&0>1/o?1:0,v,x,m;for(o=Math.abs(o),isNaN(o)||o===Infinity?(x=isNaN(o)?1:0,v=f):(v=s(a(o)/r),1>o*(m=l(2,-v))&&(v--,m*=2),o+=1<=v+_?g/m:g*l(2,1-_),2<=o*m&&(v++,m/=2),v+_>=f?(x=0,v=f):1<=v+_?(x=(o*m-1)*l(2,u),v+=_):(x=o*l(2,_-1)*l(2,u),v=0));8<=u;t[n+h]=255&x,h+=i,x/=256,u-=8);for(v=v<<u|x,y+=u;0<y;t[n+h]=255&v,h+=i,v/=256,y-=8);t[n+h-i]|=128*d}};i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var W=4294967296,Z=1/W;i.prototype={destroy:function(){this.buf=null},readFields:function(e,t,o){var r=this;for(o=o||this.length;this.pos<o;){var a=r.readVarint(),n=r.pos;r.type=7&a,e(a>>3,t,r),r.pos===n&&r.skip(a)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=T(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=k(this.buf,this.pos);return this.pos+=4,e},// 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)
  readFixed64:function(){var e=T(this.buf,this.pos)+T(this.buf,this.pos+4)*W;return this.pos+=8,e},readSFixed64:function(){var e=T(this.buf,this.pos)+k(this.buf,this.pos+4)*W;return this.pos+=8,e},readFloat:function(){var e=V.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=V.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t=this.buf,o,r;return(r=t[this.pos++],o=127&r,128>r)?o:(r=t[this.pos++],o|=(127&r)<<7,128>r)?o:(r=t[this.pos++],o|=(127&r)<<14,128>r)?o:(r=t[this.pos++],o|=(127&r)<<21,128>r)?o:(r=t[this.pos],o|=(15&r)<<28,d(o,e,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return 1==e%2?(e+1)/-2:e/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var e=this.readVarint()+this.pos,t=C(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var o=this,r=p(this);for(e=e||[];this.pos<r;)e.push(o.readVarint(t));return e},readPackedSVarint:function(e){var t=this,o=p(this);for(e=e||[];this.pos<o;)e.push(t.readSVarint());return e},readPackedBoolean:function(e){var t=this,o=p(this);for(e=e||[];this.pos<o;)e.push(t.readBoolean());return e},readPackedFloat:function(e){var t=this,o=p(this);for(e=e||[];this.pos<o;)e.push(t.readFloat());return e},readPackedDouble:function(e){var t=this,o=p(this);for(e=e||[];this.pos<o;)e.push(t.readDouble());return e},readPackedFixed32:function(e){var t=this,o=p(this);for(e=e||[];this.pos<o;)e.push(t.readFixed32());return e},readPackedSFixed32:function(e){var t=this,o=p(this);for(e=e||[];this.pos<o;)e.push(t.readSFixed32());return e},readPackedFixed64:function(e){var t=this,o=p(this);for(e=e||[];this.pos<o;)e.push(t.readFixed64());return e},readPackedSFixed64:function(e){var t=this,o=p(this);for(e=e||[];this.pos<o;)e.push(t.readSFixed64());return e},skip:function(e){var t=7&e;if(t===i.Varint)for(;127<this.buf[this.pos++];);else if(t===i.Bytes)this.pos=this.readVarint()+this.pos;else if(t===i.Fixed32)this.pos+=4;else if(t===i.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var o=new Uint8Array(t);o.set(this.buf),this.buf=o,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),P(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),P(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),P(this.buf,-1&e,this.pos),P(this.buf,s(e*Z),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),P(this.buf,-1&e,this.pos),P(this.buf,s(e*Z),this.pos+4),this.pos+=8},writeVarint:function(e){return(e=+e||0,268435455<e||0>e)?void u(e,this):void((this.realloc(4),this.buf[this.pos++]=127&e|(127<e?128:0),!(127>=e))&&(this.buf[this.pos++]=127&(e>>>=7)|(127<e?128:0),!(127>=e))&&(this.buf[this.pos++]=127&(e>>>=7)|(127<e?128:0),127>=e||(this.buf[this.pos++]=127&e>>>7)))},writeSVarint:function(e){this.writeVarint(0>e?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(!!e)},writeString:function(e){e=e+"",this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=E(this.buf,e,this.pos);var o=this.pos-t;128<=o&&y(t,o,this),this.pos=t-1,this.writeVarint(o),this.pos+=o},writeFloat:function(e){this.realloc(4),V.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),V.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=this,o=e.length;this.writeVarint(o),this.realloc(o);for(var r=0;r<o;r++)t.buf[t.pos++]=e[r]},writeRawMessage:function(e,t){this.pos++;var o=this.pos;e(t,this);var r=this.pos-o;128<=r&&y(o,r,this),this.pos=o-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,o){this.writeTag(e,i.Bytes),this.writeRawMessage(t,o)},writePackedVarint:function(e,t){this.writeMessage(e,f,t)},writePackedSVarint:function(e,t){this.writeMessage(e,_,t)},writePackedBoolean:function(e,t){this.writeMessage(e,v,t)},writePackedFloat:function(e,t){this.writeMessage(e,g,t)},writePackedDouble:function(e,t){this.writeMessage(e,h,t)},writePackedFixed32:function(e,t){this.writeMessage(e,x,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,S,t)},writePackedFixed64:function(e,t){this.writeMessage(e,O,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,w,t)},writeBytesField:function(e,t){this.writeTag(e,i.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,i.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,i.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,i.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,i.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,i.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,i.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,i.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,i.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,i.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}};D.prototype={clone:function(){return new D(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return o(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return o(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,o=e.y-this.y;return t*t+o*o},angle:function(){return U(this.y,this.x)},angleTo:function(e){return U(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return U(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,o=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=o,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),o=Math.sin(e),r=t*this.x-o*this.y,a=o*this.x+t*this.y;return this.x=r,this.y=a,this},_round:function(){return this.x=t(this.x),this.y=t(this.y),this}},D.convert=function(e){return e instanceof D?e:Array.isArray(e)?new D(e[0],e[1]):e};A.types=["Unknown","Point","LineString","Polygon"],A.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,o=1,r=0,a=0,n=0,i=[],s;e.pos<t;){if(!r){var l=e.readVarint();o=7&l,r=l>>3}if(r--,1==o||2==o)a+=e.readSVarint(),n+=e.readSVarint(),1==o&&(s&&i.push(s),s=[]),s.push(new D(a,n));else if(7==o)s&&s.push(s[0].clone());else throw new Error("unknown command "+o)}return s&&i.push(s),i},A.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,o=1,r=0,a=0,n=0,i=Infinity,s=-Infinity,l=Infinity,d=-Infinity;e.pos<t;){if(!r){var p=e.readVarint();o=7&p,r=p>>3}if(r--,1==o||2==o)a+=e.readSVarint(),n+=e.readSVarint(),a<i&&(i=a),a>s&&(s=a),n<l&&(l=n),n>d&&(d=n);else if(7!=o)throw new Error("unknown command "+o)}return[i,l,s,d]},A.prototype.toGeoJSON=function(t,o,r){function a(t){for(var o=0;o<t.length;o++){var r=t[o],a=180-360*(r.y+d)/n;t[o]=[360*(r.x+s)/n-180,360/e*Math.atan(Math.exp(a*e/180))-90]}}var n=this.extent*l(2,r),s=this.extent*t,d=this.extent*o,p=this.loadGeometry(),c=A.types[this.type],u,i;switch(this.type){case 1:var b=[];for(u=0;u<p.length;u++)b[u]=p[u][0];p=b,a(p);break;case 2:for(u=0;u<p.length;u++)a(p[u]);break;case 3:for(p=N(p),u=0;u<p.length;u++)for(i=0;i<p[u].length;i++)a(p[u][i]);}1===p.length?p=p[0]:c="Multi"+c;var m={type:"Feature",geometry:{type:c,coordinates:p},properties:this.properties};return"id"in this&&(m.id=this.id),m};R.prototype.feature=function(e){if(0>e||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new A(this._pbf,t,this.extent,this._keys,this._values)};var q=R,H=function(e,t){this.layers=e.readFields(F,{},t)};L.SVG.Tile=L.SVG.extend({initialize:function(e,t,o){L.SVG.prototype.initialize.call(this,o),this._tileCoord=e,this._size=t,this._initContainer(),this._container.setAttribute("width",this._size.x),this._container.setAttribute("height",this._size.y),this._container.setAttribute("viewBox",[0,0,this._size.x,this._size.y].join(" ")),this._layers={}},getCoord:function(){return this._tileCoord},getContainer:function(){return this._container},onAdd:L.Util.falseFn,addTo:function(e){if(this._map=e,this.options.interactive)for(var t in this._layers){var o=this._layers[t];o._path.style.pointerEvents="auto",this._map._targets[L.stamp(o._path)]=o}},removeFrom:function(){if(this.options.interactive)for(var e in this._layers){var t=this._layers[e];delete this._map._targets[L.stamp(t._path)]}delete this._map},_initContainer:function(){L.SVG.prototype._initContainer.call(this);L.SVG.create("rect")},_addPath:function(e){this._rootGroup.appendChild(e._path),this._layers[L.stamp(e)]=e},_updateIcon:function(e){var t=e._path=L.SVG.create("image"),o=e.options.icon,r=o.options,a=L.point(r.iconSize),n=r.iconAnchor||a&&a.divideBy(2,!0),i=e._point.subtract(n);t.setAttribute("x",i.x),t.setAttribute("y",i.y),t.setAttribute("width",a.x+"px"),t.setAttribute("height",a.y+"px"),t.setAttribute("href",r.iconUrl)}}),L.svg.tile=function(e,t,o){return new L.SVG.Tile(e,t,o)};var G=L.Class.extend({render:function(e,t){this._renderer=e,this.options=t,e._initPath(this),e._updateStyle(this)},updateStyle:function(e,t){this.options=t,e._updateStyle(this)},_getPixelBounds:function(){for(var e=this._parts,t=L.bounds([]),o=0,r;o<e.length;o++){r=e[o];for(var a=0;a<r.length;a++)t.extend(r[a])}var n=this._clickTolerance(),i=new L.Point(n,n);return t.min._subtract(i),t.max._add(i),t},_clickTolerance:L.Path.prototype._clickTolerance}),Y={_makeFeatureParts:function(e,t){var o=e.geometry,r;this._parts=[];for(var a=0;a<o.length;a++){for(var n=o[a],i=[],s=0;s<n.length;s++)r=n[s],i.push(L.point(r).scaleBy(t));this._parts.push(i)}},makeInteractive:function(){this._pxBounds=this._getPixelBounds()}},$=L.CircleMarker.extend({includes:G.prototype,statics:{iconCache:{}},initialize:function(e,t){this.properties=e.properties,this._makeFeatureParts(e,t)},render:function(e,t){G.prototype.render.call(this,e,t),this._radius=t.radius||L.CircleMarker.prototype.options.radius,this._updatePath()},_makeFeatureParts:function(e,t){var o=e.geometry[0];"object"==typeof o[0]&&"x"in o[0]?(this._point=L.point(o[0]).scaleBy(t),this._empty=L.Util.falseFn):(this._point=L.point(o).scaleBy(t),this._empty=L.Util.falseFn)},makeInteractive:function(){this._updateBounds()},updateStyle:function(e,t){return this._radius=t.radius||this._radius,this._updateBounds(),G.prototype.updateStyle.call(this,e,t)},_updateBounds:function(){var e=this.options.icon;if(e){var t=L.point(e.options.iconSize),o=e.options.iconAnchor||t&&t.divideBy(2,!0),r=this._point.subtract(o);this._pxBounds=new L.Bounds(r,r.add(e.options.iconSize))}else L.CircleMarker.prototype._updateBounds.call(this)},_updatePath:function(){this.options.icon?this._renderer._updateIcon(this):L.CircleMarker.prototype._updatePath.call(this)},_getImage:function(){if(this.options.icon){var e=this.options.icon.options.iconUrl,t=PointLayer.iconCache[e];if(!t){var o=this.options.icon;t=PointLayer.iconCache[e]=o.createIcon()}return t}return null},_containsPoint:function(e){var t=this.options.icon;return t?this._pxBounds.contains(e):L.CircleMarker.prototype._containsPoint.call(this,e)}}),J=L.Polyline.extend({includes:[G.prototype,Y],initialize:function(e,t){this.properties=e.properties,this._makeFeatureParts(e,t)},render:function(e,t){t.fill=!1,G.prototype.render.call(this,e,t),this._updatePath()},updateStyle:function(e,t){t.fill=!1,G.prototype.updateStyle.call(this,e,t)}}),X=L.Polygon.extend({includes:[G.prototype,Y],initialize:function(e,t){this.properties=e.properties,this._makeFeatureParts(e,t)},render:function(e,t){G.prototype.render.call(this,e,t),this._updatePath()}});L.VectorGrid=L.GridLayer.extend({options:{rendererFactory:L.svg.tile,vectorTileLayerStyles:{},interactive:!1},initialize:function(e){L.setOptions(this,e),L.GridLayer.prototype.initialize.apply(this,arguments),this.options.getFeatureId&&(this._vectorTiles={},this._overriddenStyles={},this.on("tileunload",function(t){var e=this._tileCoordsToKey(t.coords),o=this._vectorTiles[e];o&&this._map&&o.removeFrom(this._map),delete this._vectorTiles[e]},this)),this._dataLayerNames={}},createTile:function(e,t){var o=this.options.getFeatureId,r=this.getTileSize(),a=this.options.rendererFactory(e,r,this.options),n=this._getVectorTilePromise(e),s=e.z;return o&&(this._vectorTiles[this._tileCoordsToKey(e)]=a,a._features={}),n.then(function(r){var n=Object.keys(r.layers);for(var l in this.options.layersOrdering&&(n=this.options.layersOrdering(r.layers,s)),n){var d=n[l];if(r.layers[d]){this._dataLayerNames[d]=!0;for(var p=r.layers[d],c=this.getTileSize().divideBy(p.extent),u=this.options.vectorTileLayerStyles[d]||L.Path.prototype.options,b=0;b<p.features.length;b++){var i=p.features[b],m=u,y;if(o){y=this.options.getFeatureId(i);var f=this._overriddenStyles[y];f&&(f[d]?m=f[d]:m=f)}if(m instanceof Function&&(m=m(i.properties,e.z)),m instanceof Array||(m=[m]),!!m.length){for(var _=this._createLayer(i,c),g=0,h;g<m.length;g++)h=L.extend({},L.Path.prototype.options,m[g]),_.render(a,h),a._addPath(_);this.options.interactive&&_.makeInteractive(),o&&(a._features[y]={layerName:d,feature:_})}}}}null!=this._map&&a.addTo(this._map),L.Util.requestAnimFrame(t.bind(e,null,null))}.bind(this)),a.getContainer()},setFeatureStyle:function(e,t){for(var o in this._overriddenStyles[e]=t,this._vectorTiles){var r=this._vectorTiles[o],a=r._features,n=a[e];if(n){var i=n.feature,s=t;t[n.layerName]&&(s=t[n.layerName]),this._updateStyles(i,r,s)}}return this},resetFeatureStyle:function(e){for(var t in delete this._overriddenStyles[e],this._vectorTiles){var o=this._vectorTiles[t],r=o._features,a=r[e];if(a){var n=a.feature,i=this.options.vectorTileLayerStyles[a.layerName]||L.Path.prototype.options;this._updateStyles(n,o,i)}}return this},getDataLayerNames:function(){return Object.keys(this._dataLayerNames)},_updateStyles:function(e,t,o){o=o instanceof Function?o(e.properties,t.getCoord().z):o,o instanceof Array||(o=[o]);for(var r=0,a;r<o.length;r++)a=L.extend({},L.Path.prototype.options,o[r]),e.updateStyle(t,a)},_createLayer:function(e,t){var o;switch(e.type){case 1:o=new $(e,t);break;case 2:o=new J(e,t);break;case 3:o=new X(e,t);}return this.options.interactive&&o.addEventParent(this),o}}),L.vectorGrid=function(e){return new L.VectorGrid(e)},L.VectorGrid.Protobuf=L.VectorGrid.extend({options:{subdomains:"abc",fetchOptions:{}},initialize:function(e,t){this._url=e,L.VectorGrid.prototype.initialize.call(this,t)},_getSubdomain:L.TileLayer.prototype._getSubdomain,_getVectorTilePromise:function(e){var t={s:this._getSubdomain(e),x:e.x,y:e.y,z:e.z},o=this.layersOrdering;if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=r),t["-y"]=r}var a=L.Util.template(this._url,L.extend(t,this.options));return fetch(a,this.options.fetchOptions).then(function(e){return e.ok?e.blob().then(function(e){var t=new FileReader;return new Promise(function(o){t.addEventListener("loadend",function(){var e=new i(t.result);return o(new H(e))}),t.readAsArrayBuffer(e)})}):{layers:[]}}).then(function(e){for(var t in e.layers){for(var o=[],r=0,a;r<e.layers[t].length;r++)a=e.layers[t].feature(r),a.geometry=a.loadGeometry(),o.push(a);e.layers[t].features=o}return e})}}),L.vectorGrid.protobuf=function(e,t){return new L.VectorGrid.Protobuf(e,t)};var K=function(e,t,o){try{return window.URL.createObjectURL(new Blob([Uint8Array.from(e.split("").map(function(e){return e.charCodeAt(0)}))],{type:t}))}catch(r){return"data:"+t+(o?";base64,":",")+e}}("'use strict';\n\nvar simplify_1 = simplify$1;\n\n// calculate simplification data using optimized Douglas-Peucker algorithm\n\nfunction simplify$1(points, tolerance) {\n\n    var sqTolerance = tolerance * tolerance,\n        len = points.length,\n        first = 0,\n        last = len - 1,\n        stack = [],\n        i, maxSqDist, sqDist, index;\n\n    // always retain the endpoints (1 is the max value)\n    points[first][2] = 1;\n    points[last][2] = 1;\n\n    // avoid recursion by using a stack\n    while (last) {\n\n        maxSqDist = 0;\n\n        for (i = first + 1; i < last; i++) {\n            sqDist = getSqSegDist(points[i], points[first], points[last]);\n\n            if (sqDist > maxSqDist) {\n                index = i;\n                maxSqDist = sqDist;\n            }\n        }\n\n        if (maxSqDist > sqTolerance) {\n            points[index][2] = maxSqDist; // save the point importance in squared pixels as a z coordinate\n            stack.push(first);\n            stack.push(index);\n            first = index;\n\n        } else {\n            last = stack.pop();\n            first = stack.pop();\n        }\n    }\n}\n\n// square distance from a point to a segment\nfunction getSqSegDist(p, a, b) {\n\n    var x = a[0], y = a[1],\n        bx = b[0], by = b[1],\n        px = p[0], py = p[1],\n        dx = bx - x,\n        dy = by - y;\n\n    if (dx !== 0 || dy !== 0) {\n\n        var t = ((px - x) * dx + (py - y) * dy) / (dx * dx + dy * dy);\n\n        if (t > 1) {\n            x = bx;\n            y = by;\n\n        } else if (t > 0) {\n            x += dx * t;\n            y += dy * t;\n        }\n    }\n\n    dx = px - x;\n    dy = py - y;\n\n    return dx * dx + dy * dy;\n}\n\nvar feature = createFeature$1;\n\nfunction createFeature$1(tags, type, geom, id) {\n    var feature = {\n        id: id || null,\n        type: type,\n        geometry: geom,\n        tags: tags || null,\n        min: [Infinity, Infinity], // initial bbox values\n        max: [-Infinity, -Infinity]\n    };\n    calcBBox(feature);\n    return feature;\n}\n\n// calculate the feature bounding box for faster clipping later\nfunction calcBBox(feature) {\n    var geometry = feature.geometry,\n        min = feature.min,\n        max = feature.max;\n\n    if (feature.type === 1) {\n        calcRingBBox(min, max, geometry);\n    } else {\n        for (var i = 0; i < geometry.length; i++) {\n            calcRingBBox(min, max, geometry[i]);\n        }\n    }\n\n    return feature;\n}\n\nfunction calcRingBBox(min, max, points) {\n    for (var i = 0, p; i < points.length; i++) {\n        p = points[i];\n        min[0] = Math.min(p[0], min[0]);\n        max[0] = Math.max(p[0], max[0]);\n        min[1] = Math.min(p[1], min[1]);\n        max[1] = Math.max(p[1], max[1]);\n    }\n}\n\nvar convert_1 = convert$1;\n\nvar simplify = simplify_1;\nvar createFeature = feature;\n\n// converts GeoJSON feature into an intermediate projected JSON vector format with simplification data\n\nfunction convert$1(data, tolerance) {\n    var features = [];\n\n    if (data.type === 'FeatureCollection') {\n        for (var i = 0; i < data.features.length; i++) {\n            convertFeature(features, data.features[i], tolerance);\n        }\n    } else if (data.type === 'Feature') {\n        convertFeature(features, data, tolerance);\n\n    } else {\n        // single geometry or a geometry collection\n        convertFeature(features, {geometry: data}, tolerance);\n    }\n    return features;\n}\n\nfunction convertFeature(features, feature$$1, tolerance) {\n    if (feature$$1.geometry === null) {\n        // ignore features with null geometry\n        return;\n    }\n\n    var geom = feature$$1.geometry,\n        type = geom.type,\n        coords = geom.coordinates,\n        tags = feature$$1.properties,\n        id = feature$$1.id,\n        i, j, rings, projectedRing;\n\n    if (type === 'Point') {\n        features.push(createFeature(tags, 1, [projectPoint(coords)], id));\n\n    } else if (type === 'MultiPoint') {\n        features.push(createFeature(tags, 1, project(coords), id));\n\n    } else if (type === 'LineString') {\n        features.push(createFeature(tags, 2, [project(coords, tolerance)], id));\n\n    } else if (type === 'MultiLineString' || type === 'Polygon') {\n        rings = [];\n        for (i = 0; i < coords.length; i++) {\n            projectedRing = project(coords[i], tolerance);\n            if (type === 'Polygon') { projectedRing.outer = (i === 0); }\n            rings.push(projectedRing);\n        }\n        features.push(createFeature(tags, type === 'Polygon' ? 3 : 2, rings, id));\n\n    } else if (type === 'MultiPolygon') {\n        rings = [];\n        for (i = 0; i < coords.length; i++) {\n            for (j = 0; j < coords[i].length; j++) {\n                projectedRing = project(coords[i][j], tolerance);\n                projectedRing.outer = (j === 0);\n                rings.push(projectedRing);\n            }\n        }\n        features.push(createFeature(tags, 3, rings, id));\n\n    } else if (type === 'GeometryCollection') {\n        for (i = 0; i < geom.geometries.length; i++) {\n            convertFeature(features, {\n                geometry: geom.geometries[i],\n                properties: tags\n            }, tolerance);\n        }\n\n    } else {\n        throw new Error('Input data is not a valid GeoJSON object.');\n    }\n}\n\nfunction project(lonlats, tolerance) {\n    var projected = [];\n    for (var i = 0; i < lonlats.length; i++) {\n        projected.push(projectPoint(lonlats[i]));\n    }\n    if (tolerance) {\n        simplify(projected, tolerance);\n        calcSize(projected);\n    }\n    return projected;\n}\n\nfunction projectPoint(p) {\n    var sin = Math.sin(p[1] * Math.PI / 180),\n        x = (p[0] / 360 + 0.5),\n        y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI);\n\n    y = y < 0 ? 0 :\n        y > 1 ? 1 : y;\n\n    return [x, y, 0];\n}\n\n// calculate area and length of the poly\nfunction calcSize(points) {\n    var area = 0,\n        dist = 0;\n\n    for (var i = 0, a, b; i < points.length - 1; i++) {\n        a = b || points[i];\n        b = points[i + 1];\n\n        area += a[0] * b[1] - b[0] * a[1];\n\n        // use Manhattan distance instead of Euclidian one to avoid expensive square root computation\n        dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]);\n    }\n    points.area = Math.abs(area / 2);\n    points.dist = dist;\n}\n\nvar tile = transformTile;\nvar point = transformPoint;\n\n// Transforms the coordinates of each feature in the given tile from\n// mercator-projected space into (extent x extent) tile space.\nfunction transformTile(tile, extent) {\n    if (tile.transformed) { return tile; }\n\n    var z2 = tile.z2,\n        tx = tile.x,\n        ty = tile.y,\n        i, j, k;\n\n    for (i = 0; i < tile.features.length; i++) {\n        var feature = tile.features[i],\n            geom = feature.geometry,\n            type = feature.type;\n\n        if (type === 1) {\n            for (j = 0; j < geom.length; j++) { geom[j] = transformPoint(geom[j], extent, z2, tx, ty); }\n\n        } else {\n            for (j = 0; j < geom.length; j++) {\n                var ring = geom[j];\n                for (k = 0; k < ring.length; k++) { ring[k] = transformPoint(ring[k], extent, z2, tx, ty); }\n            }\n        }\n    }\n\n    tile.transformed = true;\n\n    return tile;\n}\n\nfunction transformPoint(p, extent, z2, tx, ty) {\n    var x = Math.round(extent * (p[0] * z2 - tx)),\n        y = Math.round(extent * (p[1] * z2 - ty));\n    return [x, y];\n}\n\nvar transform$1 = {\n\ttile: tile,\n\tpoint: point\n};\n\nvar clip_1 = clip$1;\n\nvar createFeature$2 = feature;\n\n/* clip features between two axis-parallel lines:\n *     |        |\n *  ___|___     |     /\n * /   |   ____|____/\n *     |        |\n */\n\nfunction clip$1(features, scale, k1, k2, axis, intersect, minAll, maxAll) {\n\n    k1 /= scale;\n    k2 /= scale;\n\n    if (minAll >= k1 && maxAll <= k2) { return features; } // trivial accept\n    else if (minAll > k2 || maxAll < k1) { return null; } // trivial reject\n\n    var clipped = [];\n\n    for (var i = 0; i < features.length; i++) {\n\n        var feature$$1 = features[i],\n            geometry = feature$$1.geometry,\n            type = feature$$1.type,\n            min, max;\n\n        min = feature$$1.min[axis];\n        max = feature$$1.max[axis];\n\n        if (min >= k1 && max <= k2) { // trivial accept\n            clipped.push(feature$$1);\n            continue;\n        } else if (min > k2 || max < k1) { continue; } // trivial reject\n\n        var slices = type === 1 ?\n                clipPoints(geometry, k1, k2, axis) :\n                clipGeometry(geometry, k1, k2, axis, intersect, type === 3);\n\n        if (slices.length) {\n            // if a feature got clipped, it will likely get clipped on the next zoom level as well,\n            // so there's no need to recalculate bboxes\n            clipped.push(createFeature$2(feature$$1.tags, type, slices, feature$$1.id));\n        }\n    }\n\n    return clipped.length ? clipped : null;\n}\n\nfunction clipPoints(geometry, k1, k2, axis) {\n    var slice = [];\n\n    for (var i = 0; i < geometry.length; i++) {\n        var a = geometry[i],\n            ak = a[axis];\n\n        if (ak >= k1 && ak <= k2) { slice.push(a); }\n    }\n    return slice;\n}\n\nfunction clipGeometry(geometry, k1, k2, axis, intersect, closed) {\n\n    var slices = [];\n\n    for (var i = 0; i < geometry.length; i++) {\n\n        var ak = 0,\n            bk = 0,\n            b = null,\n            points = geometry[i],\n            area = points.area,\n            dist = points.dist,\n            outer = points.outer,\n            len = points.length,\n            a, j, last;\n\n        var slice = [];\n\n        for (j = 0; j < len - 1; j++) {\n            a = b || points[j];\n            b = points[j + 1];\n            ak = bk || a[axis];\n            bk = b[axis];\n\n            if (ak < k1) {\n\n                if ((bk > k2)) { // ---|-----|-->\n                    slice.push(intersect(a, b, k1), intersect(a, b, k2));\n                    if (!closed) { slice = newSlice(slices, slice, area, dist, outer); }\n\n                } else if (bk >= k1) { slice.push(intersect(a, b, k1)); } // ---|-->  |\n\n            } else if (ak > k2) {\n\n                if ((bk < k1)) { // <--|-----|---\n                    slice.push(intersect(a, b, k2), intersect(a, b, k1));\n                    if (!closed) { slice = newSlice(slices, slice, area, dist, outer); }\n\n                } else if (bk <= k2) { slice.push(intersect(a, b, k2)); } // |  <--|---\n\n            } else {\n\n                slice.push(a);\n\n                if (bk < k1) { // <--|---  |\n                    slice.push(intersect(a, b, k1));\n                    if (!closed) { slice = newSlice(slices, slice, area, dist, outer); }\n\n                } else if (bk > k2) { // |  ---|-->\n                    slice.push(intersect(a, b, k2));\n                    if (!closed) { slice = newSlice(slices, slice, area, dist, outer); }\n                }\n                // | --> |\n            }\n        }\n\n        // add the last point\n        a = points[len - 1];\n        ak = a[axis];\n        if (ak >= k1 && ak <= k2) { slice.push(a); }\n\n        // close the polygon if its endpoints are not the same after clipping\n\n        last = slice[slice.length - 1];\n        if (closed && last && (slice[0][0] !== last[0] || slice[0][1] !== last[1])) { slice.push(slice[0]); }\n\n        // add the final slice\n        newSlice(slices, slice, area, dist, outer);\n    }\n\n    return slices;\n}\n\nfunction newSlice(slices, slice, area, dist, outer) {\n    if (slice.length) {\n        // we don't recalculate the area/length of the unclipped geometry because the case where it goes\n        // below the visibility threshold as a result of clipping is rare, so we avoid doing unnecessary work\n        slice.area = area;\n        slice.dist = dist;\n        if (outer !== undefined) { slice.outer = outer; }\n\n        slices.push(slice);\n    }\n    return [];\n}\n\nvar clip$2 = clip_1;\nvar createFeature$3 = feature;\n\nvar wrap_1 = wrap$1;\n\nfunction wrap$1(features, buffer, intersectX) {\n    var merged = features,\n        left  = clip$2(features, 1, -1 - buffer, buffer,     0, intersectX, -1, 2), // left world copy\n        right = clip$2(features, 1,  1 - buffer, 2 + buffer, 0, intersectX, -1, 2); // right world copy\n\n    if (left || right) {\n        merged = clip$2(features, 1, -buffer, 1 + buffer, 0, intersectX, -1, 2) || []; // center world copy\n\n        if (left) { merged = shiftFeatureCoords(left, 1).concat(merged); } // merge left into center\n        if (right) { merged = merged.concat(shiftFeatureCoords(right, -1)); } // merge right into center\n    }\n\n    return merged;\n}\n\nfunction shiftFeatureCoords(features, offset) {\n    var newFeatures = [];\n\n    for (var i = 0; i < features.length; i++) {\n        var feature$$1 = features[i],\n            type = feature$$1.type;\n\n        var newGeometry;\n\n        if (type === 1) {\n            newGeometry = shiftCoords(feature$$1.geometry, offset);\n        } else {\n            newGeometry = [];\n            for (var j = 0; j < feature$$1.geometry.length; j++) {\n                newGeometry.push(shiftCoords(feature$$1.geometry[j], offset));\n            }\n        }\n\n        newFeatures.push(createFeature$3(feature$$1.tags, type, newGeometry, feature$$1.id));\n    }\n\n    return newFeatures;\n}\n\nfunction shiftCoords(points, offset) {\n    var newPoints = [];\n    newPoints.area = points.area;\n    newPoints.dist = points.dist;\n\n    for (var i = 0; i < points.length; i++) {\n        newPoints.push([points[i][0] + offset, points[i][1], points[i][2]]);\n    }\n    return newPoints;\n}\n\nvar tile$1 = createTile$1;\n\nfunction createTile$1(features, z2, tx, ty, tolerance, noSimplify) {\n    var tile = {\n        features: [],\n        numPoints: 0,\n        numSimplified: 0,\n        numFeatures: 0,\n        source: null,\n        x: tx,\n        y: ty,\n        z2: z2,\n        transformed: false,\n        min: [2, 1],\n        max: [-1, 0]\n    };\n    for (var i = 0; i < features.length; i++) {\n        tile.numFeatures++;\n        addFeature(tile, features[i], tolerance, noSimplify);\n\n        var min = features[i].min,\n            max = features[i].max;\n\n        if (min[0] < tile.min[0]) { tile.min[0] = min[0]; }\n        if (min[1] < tile.min[1]) { tile.min[1] = min[1]; }\n        if (max[0] > tile.max[0]) { tile.max[0] = max[0]; }\n        if (max[1] > tile.max[1]) { tile.max[1] = max[1]; }\n    }\n    return tile;\n}\n\nfunction addFeature(tile, feature, tolerance, noSimplify) {\n\n    var geom = feature.geometry,\n        type = feature.type,\n        simplified = [],\n        sqTolerance = tolerance * tolerance,\n        i, j, ring, p;\n\n    if (type === 1) {\n        for (i = 0; i < geom.length; i++) {\n            simplified.push(geom[i]);\n            tile.numPoints++;\n            tile.numSimplified++;\n        }\n\n    } else {\n\n        // simplify and transform projected coordinates for tile geometry\n        for (i = 0; i < geom.length; i++) {\n            ring = geom[i];\n\n            // filter out tiny polylines & polygons\n            if (!noSimplify && ((type === 2 && ring.dist < tolerance) ||\n                                (type === 3 && ring.area < sqTolerance))) {\n                tile.numPoints += ring.length;\n                continue;\n            }\n\n            var simplifiedRing = [];\n\n            for (j = 0; j < ring.length; j++) {\n                p = ring[j];\n                // keep points with importance > tolerance\n                if (noSimplify || p[2] > sqTolerance) {\n                    simplifiedRing.push(p);\n                    tile.numSimplified++;\n                }\n                tile.numPoints++;\n            }\n\n            if (type === 3) { rewind(simplifiedRing, ring.outer); }\n\n            simplified.push(simplifiedRing);\n        }\n    }\n\n    if (simplified.length) {\n        var tileFeature = {\n            geometry: simplified,\n            type: type,\n            tags: feature.tags || null\n        };\n        if (feature.id !== null) {\n            tileFeature.id = feature.id;\n        }\n        tile.features.push(tileFeature);\n    }\n}\n\nfunction rewind(ring, clockwise) {\n    var area = signedArea(ring);\n    if (area < 0 === clockwise) { ring.reverse(); }\n}\n\nfunction signedArea(ring) {\n    var sum = 0;\n    for (var i = 0, len = ring.length, j = len - 1, p1, p2; i < len; j = i++) {\n        p1 = ring[i];\n        p2 = ring[j];\n        sum += (p2[0] - p1[0]) * (p1[1] + p2[1]);\n    }\n    return sum;\n}\n\nvar index = geojsonvt;\n\nvar convert = convert_1;\nvar transform = transform$1;\nvar clip = clip_1;\nvar wrap = wrap_1;\nvar createTile = tile$1;     // final simplified tile generation\n\n\nfunction geojsonvt(data, options) {\n    return new GeoJSONVT(data, options);\n}\n\nfunction GeoJSONVT(data, options) {\n    options = this.options = extend(Object.create(this.options), options);\n\n    var debug = options.debug;\n\n    if (debug) { console.time('preprocess data'); }\n\n    var z2 = 1 << options.maxZoom, // 2^z\n        features = convert(data, options.tolerance / (z2 * options.extent));\n\n    this.tiles = {};\n    this.tileCoords = [];\n\n    if (debug) {\n        console.timeEnd('preprocess data');\n        console.log('index: maxZoom: %d, maxPoints: %d', options.indexMaxZoom, options.indexMaxPoints);\n        console.time('generate tiles');\n        this.stats = {};\n        this.total = 0;\n    }\n\n    features = wrap(features, options.buffer / options.extent, intersectX);\n\n    // start slicing from the top tile down\n    if (features.length) { this.splitTile(features, 0, 0, 0); }\n\n    if (debug) {\n        if (features.length) { console.log('features: %d, points: %d', this.tiles[0].numFeatures, this.tiles[0].numPoints); }\n        console.timeEnd('generate tiles');\n        console.log('tiles generated:', this.total, JSON.stringify(this.stats));\n    }\n}\n\nGeoJSONVT.prototype.options = {\n    maxZoom: 14,            // max zoom to preserve detail on\n    indexMaxZoom: 5,        // max zoom in the tile index\n    indexMaxPoints: 100000, // max number of points per tile in the tile index\n    solidChildren: false,   // whether to tile solid square tiles further\n    tolerance: 3,           // simplification tolerance (higher means simpler)\n    extent: 4096,           // tile extent\n    buffer: 64,             // tile buffer on each side\n    debug: 0                // logging level (0, 1 or 2)\n};\n\nGeoJSONVT.prototype.splitTile = function (features, z, x, y, cz, cx, cy) {\n    var this$1 = this;\n\n\n    var stack = [features, z, x, y],\n        options = this.options,\n        debug = options.debug,\n        solid = null;\n\n    // avoid recursion by using a processing queue\n    while (stack.length) {\n        y = stack.pop();\n        x = stack.pop();\n        z = stack.pop();\n        features = stack.pop();\n\n        var z2 = 1 << z,\n            id = toID(z, x, y),\n            tile = this$1.tiles[id],\n            tileTolerance = z === options.maxZoom ? 0 : options.tolerance / (z2 * options.extent);\n\n        if (!tile) {\n            if (debug > 1) { console.time('creation'); }\n\n            tile = this$1.tiles[id] = createTile(features, z2, x, y, tileTolerance, z === options.maxZoom);\n            this$1.tileCoords.push({z: z, x: x, y: y});\n\n            if (debug) {\n                if (debug > 1) {\n                    console.log('tile z%d-%d-%d (features: %d, points: %d, simplified: %d)',\n                        z, x, y, tile.numFeatures, tile.numPoints, tile.numSimplified);\n                    console.timeEnd('creation');\n                }\n                var key = 'z' + z;\n                this$1.stats[key] = (this$1.stats[key] || 0) + 1;\n                this$1.total++;\n            }\n        }\n\n        // save reference to original geometry in tile so that we can drill down later if we stop now\n        tile.source = features;\n\n        // if it's the first-pass tiling\n        if (!cz) {\n            // stop tiling if we reached max zoom, or if the tile is too simple\n            if (z === options.indexMaxZoom || tile.numPoints <= options.indexMaxPoints) { continue; }\n\n        // if a drilldown to a specific tile\n        } else {\n            // stop tiling if we reached base zoom or our target tile zoom\n            if (z === options.maxZoom || z === cz) { continue; }\n\n            // stop tiling if it's not an ancestor of the target tile\n            var m = 1 << (cz - z);\n            if (x !== Math.floor(cx / m) || y !== Math.floor(cy / m)) { continue; }\n        }\n\n        // stop tiling if the tile is solid clipped square\n        if (!options.solidChildren && isClippedSquare(tile, options.extent, options.buffer)) {\n            if (cz) { solid = z; } // and remember the zoom if we're drilling down\n            continue;\n        }\n\n        // if we slice further down, no need to keep source geometry\n        tile.source = null;\n\n        if (debug > 1) { console.time('clipping'); }\n\n        // values we'll use for clipping\n        var k1 = 0.5 * options.buffer / options.extent,\n            k2 = 0.5 - k1,\n            k3 = 0.5 + k1,\n            k4 = 1 + k1,\n            tl, bl, tr, br, left, right;\n\n        tl = bl = tr = br = null;\n\n        left  = clip(features, z2, x - k1, x + k3, 0, intersectX, tile.min[0], tile.max[0]);\n        right = clip(features, z2, x + k2, x + k4, 0, intersectX, tile.min[0], tile.max[0]);\n\n        if (left) {\n            tl = clip(left, z2, y - k1, y + k3, 1, intersectY, tile.min[1], tile.max[1]);\n            bl = clip(left, z2, y + k2, y + k4, 1, intersectY, tile.min[1], tile.max[1]);\n        }\n\n        if (right) {\n            tr = clip(right, z2, y - k1, y + k3, 1, intersectY, tile.min[1], tile.max[1]);\n            br = clip(right, z2, y + k2, y + k4, 1, intersectY, tile.min[1], tile.max[1]);\n        }\n\n        if (debug > 1) { console.timeEnd('clipping'); }\n\n        if (features.length) {\n            stack.push(tl || [], z + 1, x * 2,     y * 2);\n            stack.push(bl || [], z + 1, x * 2,     y * 2 + 1);\n            stack.push(tr || [], z + 1, x * 2 + 1, y * 2);\n            stack.push(br || [], z + 1, x * 2 + 1, y * 2 + 1);\n        }\n    }\n\n    return solid;\n};\n\nGeoJSONVT.prototype.getTile = function (z, x, y) {\n    var this$1 = this;\n\n    var options = this.options,\n        extent = options.extent,\n        debug = options.debug;\n\n    var z2 = 1 << z;\n    x = ((x % z2) + z2) % z2; // wrap tile x coordinate\n\n    var id = toID(z, x, y);\n    if (this.tiles[id]) { return transform.tile(this.tiles[id], extent); }\n\n    if (debug > 1) { console.log('drilling down to z%d-%d-%d', z, x, y); }\n\n    var z0 = z,\n        x0 = x,\n        y0 = y,\n        parent;\n\n    while (!parent && z0 > 0) {\n        z0--;\n        x0 = Math.floor(x0 / 2);\n        y0 = Math.floor(y0 / 2);\n        parent = this$1.tiles[toID(z0, x0, y0)];\n    }\n\n    if (!parent || !parent.source) { return null; }\n\n    // if we found a parent tile containing the original geometry, we can drill down from it\n    if (debug > 1) { console.log('found parent tile z%d-%d-%d', z0, x0, y0); }\n\n    // it parent tile is a solid clipped square, return it instead since it's identical\n    if (isClippedSquare(parent, extent, options.buffer)) { return transform.tile(parent, extent); }\n\n    if (debug > 1) { console.time('drilling down'); }\n    var solid = this.splitTile(parent.source, z0, x0, y0, z, x, y);\n    if (debug > 1) { console.timeEnd('drilling down'); }\n\n    // one of the parent tiles was a solid clipped square\n    if (solid !== null) {\n        var m = 1 << (z - solid);\n        id = toID(solid, Math.floor(x / m), Math.floor(y / m));\n    }\n\n    return this.tiles[id] ? transform.tile(this.tiles[id], extent) : null;\n};\n\nfunction toID(z, x, y) {\n    return (((1 << z) * y + x) * 32) + z;\n}\n\nfunction intersectX(a, b, x) {\n    return [x, (x - a[0]) * (b[1] - a[1]) / (b[0] - a[0]) + a[1], 1];\n}\nfunction intersectY(a, b, y) {\n    return [(y - a[1]) * (b[0] - a[0]) / (b[1] - a[1]) + a[0], y, 1];\n}\n\nfunction extend(dest, src) {\n    for (var i in src) { dest[i] = src[i]; }\n    return dest;\n}\n\n// checks whether a tile is a whole-area fill after clipping; if it is, there's no sense slicing it further\nfunction isClippedSquare(tile, extent, buffer) {\n\n    var features = tile.source;\n    if (features.length !== 1) { return false; }\n\n    var feature = features[0];\n    if (feature.type !== 3 || feature.geometry.length > 1) { return false; }\n\n    var len = feature.geometry[0].length;\n    if (len !== 5) { return false; }\n\n    for (var i = 0; i < len; i++) {\n        var p = transform.point(feature.geometry[0][i], extent, tile.z2, tile.x, tile.y);\n        if ((p[0] !== -buffer && p[0] !== extent + buffer) ||\n            (p[1] !== -buffer && p[1] !== extent + buffer)) { return false; }\n    }\n\n    return true;\n}\n\nvar identity = function(x) {\n  return x;\n};\n\nvar transform$3 = function(topology) {\n  if ((transform = topology.transform) == null) { return identity; }\n  var transform,\n      x0,\n      y0,\n      kx = transform.scale[0],\n      ky = transform.scale[1],\n      dx = transform.translate[0],\n      dy = transform.translate[1];\n  return function(point, i) {\n    if (!i) { x0 = y0 = 0; }\n    point[0] = (x0 += point[0]) * kx + dx;\n    point[1] = (y0 += point[1]) * ky + dy;\n    return point;\n  };\n};\n\nvar bbox = function(topology) {\n  var bbox = topology.bbox;\n\n  function bboxPoint(p0) {\n    p1[0] = p0[0], p1[1] = p0[1], t(p1);\n    if (p1[0] < x0) { x0 = p1[0]; }\n    if (p1[0] > x1) { x1 = p1[0]; }\n    if (p1[1] < y0) { y0 = p1[1]; }\n    if (p1[1] > y1) { y1 = p1[1]; }\n  }\n\n  function bboxGeometry(o) {\n    switch (o.type) {\n      case \"GeometryCollection\": o.geometries.forEach(bboxGeometry); break;\n      case \"Point\": bboxPoint(o.coordinates); break;\n      case \"MultiPoint\": o.coordinates.forEach(bboxPoint); break;\n    }\n  }\n\n  if (!bbox) {\n    var t = transform$3(topology), p0, p1 = new Array(2), name,\n        x0 = Infinity, y0 = x0, x1 = -x0, y1 = -x0;\n\n    topology.arcs.forEach(function(arc) {\n      var i = -1, n = arc.length;\n      while (++i < n) {\n        p0 = arc[i], p1[0] = p0[0], p1[1] = p0[1], t(p1, i);\n        if (p1[0] < x0) { x0 = p1[0]; }\n        if (p1[0] > x1) { x1 = p1[0]; }\n        if (p1[1] < y0) { y0 = p1[1]; }\n        if (p1[1] > y1) { y1 = p1[1]; }\n      }\n    });\n\n    for (name in topology.objects) {\n      bboxGeometry(topology.objects[name]);\n    }\n\n    bbox = topology.bbox = [x0, y0, x1, y1];\n  }\n\n  return bbox;\n};\n\nvar reverse = function(array, n) {\n  var t, j = array.length, i = j - n;\n  while (i < --j) { t = array[i], array[i++] = array[j], array[j] = t; }\n};\n\nvar feature$2 = function(topology, o) {\n  return o.type === \"GeometryCollection\"\n      ? {type: \"FeatureCollection\", features: o.geometries.map(function(o) { return feature$3(topology, o); })}\n      : feature$3(topology, o);\n};\n\nfunction feature$3(topology, o) {\n  var id = o.id,\n      bbox = o.bbox,\n      properties = o.properties == null ? {} : o.properties,\n      geometry = object(topology, o);\n  return id == null && bbox == null ? {type: \"Feature\", properties: properties, geometry: geometry}\n      : bbox == null ? {type: \"Feature\", id: id, properties: properties, geometry: geometry}\n      : {type: \"Feature\", id: id, bbox: bbox, properties: properties, geometry: geometry};\n}\n\nfunction object(topology, o) {\n  var transformPoint = transform$3(topology),\n      arcs = topology.arcs;\n\n  function arc(i, points) {\n    if (points.length) { points.pop(); }\n    for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length; k < n; ++k) {\n      points.push(transformPoint(a[k].slice(), k));\n    }\n    if (i < 0) { reverse(points, n); }\n  }\n\n  function point(p) {\n    return transformPoint(p.slice());\n  }\n\n  function line(arcs) {\n    var points = [];\n    for (var i = 0, n = arcs.length; i < n; ++i) { arc(arcs[i], points); }\n    if (points.length < 2) { points.push(points[0].slice()); }\n    return points;\n  }\n\n  function ring(arcs) {\n    var points = line(arcs);\n    while (points.length < 4) { points.push(points[0].slice()); }\n    return points;\n  }\n\n  function polygon(arcs) {\n    return arcs.map(ring);\n  }\n\n  function geometry(o) {\n    var type = o.type, coordinates;\n    switch (type) {\n      case \"GeometryCollection\": return {type: type, geometries: o.geometries.map(geometry)};\n      case \"Point\": coordinates = point(o.coordinates); break;\n      case \"MultiPoint\": coordinates = o.coordinates.map(point); break;\n      case \"LineString\": coordinates = line(o.arcs); break;\n      case \"MultiLineString\": coordinates = o.arcs.map(line); break;\n      case \"Polygon\": coordinates = polygon(o.arcs); break;\n      case \"MultiPolygon\": coordinates = o.arcs.map(polygon); break;\n      default: return null;\n    }\n    return {type: type, coordinates: coordinates};\n  }\n\n  return geometry(o);\n}\n\nvar stitch = function(topology, arcs) {\n  var stitchedArcs = {},\n      fragmentByStart = {},\n      fragmentByEnd = {},\n      fragments = [],\n      emptyIndex = -1;\n\n  // Stitch empty arcs first, since they may be subsumed by other arcs.\n  arcs.forEach(function(i, j) {\n    var arc = topology.arcs[i < 0 ? ~i : i], t;\n    if (arc.length < 3 && !arc[1][0] && !arc[1][1]) {\n      t = arcs[++emptyIndex], arcs[emptyIndex] = i, arcs[j] = t;\n    }\n  });\n\n  arcs.forEach(function(i) {\n    var e = ends(i),\n        start = e[0],\n        end = e[1],\n        f, g;\n\n    if (f = fragmentByEnd[start]) {\n      delete fragmentByEnd[f.end];\n      f.push(i);\n      f.end = end;\n      if (g = fragmentByStart[end]) {\n        delete fragmentByStart[g.start];\n        var fg = g === f ? f : f.concat(g);\n        fragmentByStart[fg.start = f.start] = fragmentByEnd[fg.end = g.end] = fg;\n      } else {\n        fragmentByStart[f.start] = fragmentByEnd[f.end] = f;\n      }\n    } else if (f = fragmentByStart[end]) {\n      delete fragmentByStart[f.start];\n      f.unshift(i);\n      f.start = start;\n      if (g = fragmentByEnd[start]) {\n        delete fragmentByEnd[g.end];\n        var gf = g === f ? f : g.concat(f);\n        fragmentByStart[gf.start = g.start] = fragmentByEnd[gf.end = f.end] = gf;\n      } else {\n        fragmentByStart[f.start] = fragmentByEnd[f.end] = f;\n      }\n    } else {\n      f = [i];\n      fragmentByStart[f.start = start] = fragmentByEnd[f.end = end] = f;\n    }\n  });\n\n  function ends(i) {\n    var arc = topology.arcs[i < 0 ? ~i : i], p0 = arc[0], p1;\n    if (topology.transform) { p1 = [0, 0], arc.forEach(function(dp) { p1[0] += dp[0], p1[1] += dp[1]; }); }\n    else { p1 = arc[arc.length - 1]; }\n    return i < 0 ? [p1, p0] : [p0, p1];\n  }\n\n  function flush(fragmentByEnd, fragmentByStart) {\n    for (var k in fragmentByEnd) {\n      var f = fragmentByEnd[k];\n      delete fragmentByStart[f.start];\n      delete f.start;\n      delete f.end;\n      f.forEach(function(i) { stitchedArcs[i < 0 ? ~i : i] = 1; });\n      fragments.push(f);\n    }\n  }\n\n  flush(fragmentByEnd, fragmentByStart);\n  flush(fragmentByStart, fragmentByEnd);\n  arcs.forEach(function(i) { if (!stitchedArcs[i < 0 ? ~i : i]) { fragments.push([i]); } });\n\n  return fragments;\n};\n\nfunction extractArcs(topology, object$$1, filter) {\n  var arcs = [],\n      geomsByArc = [],\n      geom;\n\n  function extract0(i) {\n    var j = i < 0 ? ~i : i;\n    (geomsByArc[j] || (geomsByArc[j] = [])).push({i: i, g: geom});\n  }\n\n  function extract1(arcs) {\n    arcs.forEach(extract0);\n  }\n\n  function extract2(arcs) {\n    arcs.forEach(extract1);\n  }\n\n  function extract3(arcs) {\n    arcs.forEach(extract2);\n  }\n\n  function geometry(o) {\n    switch (geom = o, o.type) {\n      case \"GeometryCollection\": o.geometries.forEach(geometry); break;\n      case \"LineString\": extract1(o.arcs); break;\n      case \"MultiLineString\": case \"Polygon\": extract2(o.arcs); break;\n      case \"MultiPolygon\": extract3(o.arcs); break;\n    }\n  }\n\n  geometry(object$$1);\n\n  geomsByArc.forEach(filter == null\n      ? function(geoms) { arcs.push(geoms[0].i); }\n      : function(geoms) { if (filter(geoms[0].g, geoms[geoms.length - 1].g)) { arcs.push(geoms[0].i); } });\n\n  return arcs;\n}\n\nfunction planarRingArea(ring) {\n  var i = -1, n = ring.length, a, b = ring[n - 1], area = 0;\n  while (++i < n) { a = b, b = ring[i], area += a[0] * b[1] - a[1] * b[0]; }\n  return Math.abs(area); // Note: doubled area!\n}\n\nvar bisect = function(a, x) {\n  var lo = 0, hi = a.length;\n  while (lo < hi) {\n    var mid = lo + hi >>> 1;\n    if (a[mid] < x) { lo = mid + 1; }\n    else { hi = mid; }\n  }\n  return lo;\n};\n\nvar slicers = {};\nvar options;\n\nonmessage = function (e) {\n\tif (e.data[0] === 'slice') {\n\t\t// Given a blob of GeoJSON and some topojson/geojson-vt options, do the slicing.\n\t\tvar geojson = e.data[1];\n\t\toptions     = e.data[2];\n\n\t\tif (geojson.type && geojson.type === 'Topology') {\n\t\t\tfor (var layerName in geojson.objects) {\n\t\t\t\tslicers[layerName] = index(\n\t\t\t\t\tfeature$2(geojson, geojson.objects[layerName])\n\t\t\t\t, options);\n\t\t\t}\n\t\t} else {\n\t\t\tslicers[options.vectorTileLayerName] = index(geojson, options);\n\t\t}\n\n\t} else if (e.data[0] === 'get') {\n\t\t// Gets the vector tile for the given coordinates, sends it back as a message\n\t\tvar coords = e.data[1];\n\n\t\tvar tileLayers = {};\n\t\tfor (var layerName in slicers) {\n\t\t\tvar slicedTileLayer = slicers[layerName].getTile(coords.z, coords.x, coords.y);\n\n\t\t\tif (slicedTileLayer) {\n\t\t\t\tvar vectorTileLayer = {\n\t\t\t\t\tfeatures: [],\n\t\t\t\t\textent: options.extent,\n\t\t\t\t\tname: options.vectorTileLayerName,\n\t\t\t\t\tlength: slicedTileLayer.features.length\n\t\t\t\t};\n\n\t\t\t\tfor (var i in slicedTileLayer.features) {\n\t\t\t\t\tvar feat = {\n\t\t\t\t\t\tgeometry: slicedTileLayer.features[i].geometry,\n\t\t\t\t\t\tproperties: slicedTileLayer.features[i].tags,\n\t\t\t\t\t\ttype: slicedTileLayer.features[i].type\t// 1 = point, 2 = line, 3 = polygon\n\t\t\t\t\t};\n\t\t\t\t\tvectorTileLayer.features.push(feat);\n\t\t\t\t}\n\t\t\t\ttileLayers[layerName] = vectorTileLayer;\n\t\t\t}\n\t\t}\n\t\tpostMessage({ layers: tileLayers, coords: coords });\n\t}\n};\n//# sourceMappingURL=slicerWebWorker.js.worker.map\n","text/plain; charset=us-ascii",!1);L.VectorGrid.Slicer=L.VectorGrid.extend({options:{vectorTileLayerName:"sliced",extent:4096,maxZoom:14},initialize:function(e,t){L.VectorGrid.prototype.initialize.call(this,t);var t={};for(var o in this.options)"rendererFactory"!=o&&"vectorTileLayerStyles"!=o&&"function"!=typeof this.options[o]&&(t[o]=this.options[o]);this._worker=new Worker(K),this._worker.postMessage(["slice",e,t])},_getVectorTilePromise:function(e){var t=this,o=new Promise(function(o){t._worker.addEventListener("message",function r(a){a.data.coords&&a.data.coords.x===e.x&&a.data.coords.y===e.y&&a.data.coords.z===e.z&&(o(a.data),t._worker.removeEventListener("message",r))})});return this._worker.postMessage(["get",e]),o}}),L.vectorGrid.slicer=function(e,t){return new L.VectorGrid.Slicer(e,t)},L.Canvas.Tile=L.Canvas.extend({initialize:function(e,t,o){L.Canvas.prototype.initialize.call(this,o),this._tileCoord=e,this._size=t,this._initContainer(),this._container.setAttribute("width",this._size.x),this._container.setAttribute("height",this._size.y),this._layers={},this._drawnLayers={},this._drawing=!0,o.interactive&&(this._container.style.pointerEvents="auto")},getCoord:function(){return this._tileCoord},getContainer:function(){return this._container},getOffset:function(){return this._tileCoord.scaleBy(this._size).subtract(this._map.getPixelOrigin())},onAdd:L.Util.falseFn,addTo:function(e){this._map=e},removeFrom:function(){delete this._map},_onClick:function(t){var e=this._map.mouseEventToLayerPoint(t).subtract(this.getOffset()),o,r;for(var a in this._layers)o=this._layers[a],o.options.interactive&&o._containsPoint(e)&&!this._map._draggableMoved(o)&&(r=o);r&&(L.DomEvent.fakeStop(t),this._fireEvent([r],t))},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var e=this._map.mouseEventToLayerPoint(t).subtract(this.getOffset());this._handleMouseHover(t,e)}},_updateIcon:function(e){if(this._drawing){var t=e.options.icon,o=t.options,r=L.point(o.iconSize),a=o.iconAnchor||r&&r.divideBy(2,!0),n=e._point.subtract(a),i=this._ctx,s=e._getImage();s.complete?i.drawImage(s,n.x,n.y,r.x,r.y):L.DomEvent.on(s,"load",function(){i.drawImage(s,n.x,n.y,r.x,r.y)}),this._drawnLayers[e._leaflet_id]=e}}}),L.canvas.tile=function(e,t,o){return new L.Canvas.Tile(e,t,o)}})()},{}],11:[function(){(function(){function e(e){e.GeoJSONGridLayer=e.GridLayer.extend({initialize:function(t,o){e.GridLayer.prototype.initialize.call(this,o),this._url=t,this._geojsons={},this._features={},this.geoJsonClass=this.options.geoJsonClass?this.options.geoJsonClass:e.GeoJSON},onAdd:function(t){var o=this._geojsons;Object.keys(o).forEach(function(e){t.addLayer(o[e])}),e.GridLayer.prototype.onAdd.call(this,t),this.zoomanimHandler=this._handleZoom.bind(this),t.on("zoomanim",this.zoomanimHandler)},onRemove:function(t){var o=this._geojsons;Object.keys(o).forEach(function(e){t.removeLayer(o[e])}),e.GridLayer.prototype.onRemove.call(this,t),t.off("zoomanim",this.zoomanimHandler)},_handleZoom:function(t){this.checkZoomConditions(t.zoom)},createTile:function(t,o){var r=e.DomUtil.create("div","leaflet-tile"),a=this.getTileSize();return r.width=a.x,r.height=a.y,this.fetchTile(t,function(e){o(e,r)}),r},fetchTile:function(t,o){var r=e.Util.template(this._url,t),a=this,n=new XMLHttpRequest;n.open("GET",r,!0),n.onload=function(){if(200<=n.status&&400>n.status){var e=JSON.parse(n.responseText);a.addData(e),o(null)}else o(n.statusText)},n.onerror=function(){o(n.statusText)},n.send()},getLayers:function(){var e=this._geojsons,t=[];return Object.keys(e).forEach(function(o){t.push(e[o])}),t},hasLayerWithId:function(e,t){return this._geojsons[e]&&this._features[e]&&this._features[e].hasOwnProperty(t)},addData:function(e){if("FeatureCollection"===e.type)this.addSubLayerData("default",e);else{var t=this;Object.keys(e).forEach(function(o){t.addSubLayerData(o,e[o])})}},addSubLayerData:function(e,t){this._geojsons[e]||(this._geojsons[e]=new this.geoJsonClass(null,this.options.layers[e]).addTo(this._map),this.checkZoomConditions(this._map.getZoom()));var o=t.features.filter(function(t){return!this.hasLayerWithId(e,t.id?t.id:t.properties.id)},this);this._features[e]||(this._features[e]={}),o.forEach(function(t){var o=t.id?t.id:t.properties.id;this._features[e][o]=t},this),this._geojsons[e].addData({type:"FeatureCollection",features:o})},checkZoomConditions:function(e){var t=this._geojsons,o=this._map;Object.keys(t).forEach(function(r){var a=t[r],n=a.options;n.maxZoom&&e>n.maxZoom||n.minZoom&&e<n.minZoom?o.removeLayer(a):o.addLayer(a)})}}),e.geoJsonGridLayer=function(t,o){return new e.GeoJSONGridLayer(t,o)}}window.console||{error:function(){},warn:function(){}};"function"==typeof define&&define.amd?define(["leaflet"],function(t){e(t)}):e(L)})()},{}],12:[function(e,t){"use strict";function o(t){var o=r(t[0]+1,t[2]),e=r(t[0],t[2]),i=a(t[1]+1,t[2]),s=a(t[1],t[2]);return[e,i,o,s]}function r(e,t){return 360*(e/_(2,t))-180}function a(e,t){var o=b-2*b*e/_(2,t);return h*Math.atan(0.5*(f(o)-f(-o)))}function n(e,t,o){var r=u(e,t,o);return r[0]=m(r[0]),r[1]=m(r[1]),r}function i(e){return[[2*e[0],2*e[1],e[2]+1],[2*e[0]+1,2*e[1],e[2]+1],[2*e[0]+1,2*e[1]+1,e[2]+1],[2*e[0],2*e[1]+1,e[2]+1]]}function s(e){return 0==e[0]%2&&0==e[1]%2?[e[0]/2,e[1]/2,e[2]-1]:0==e[0]%2&&0==!e[1]%2?[e[0]/2,(e[1]-1)/2,e[2]-1]:0==!e[0]%2&&0==e[1]%2?[(e[0]-1)/2,e[1]/2,e[2]-1]:[(e[0]-1)/2,(e[1]-1)/2,e[2]-1]}function l(e){return i(s(e))}function d(e,t){for(var o=0;o<e.length;o++)if(p(e[o],t))return!0;return!1}function p(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function c(e){for(var t=28,o=0,r;o<t;o++)if(r=1<<32-(o+1),(e[0]&r)!=(e[2]&r)||(e[1]&r)!=(e[3]&r))return o;return t}function u(e,t,o){var r=Math.sin(t*g),a=_(2,o),n=a*(0.5-0.25*Math.log((1+r)/(1-r))/b);return[a*(e/360+0.5),n,o]}var b=Math.PI,m=Math.floor,f=Math.exp,_=Math.pow,g=b/180,h=180/b;t.exports={tileToGeoJSON:function(e){var t=o(e),r={type:"Polygon",coordinates:[[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]]]};return r},tileToBBOX:o,getChildren:i,getParent:s,getSiblings:l,hasTile:d,hasSiblings:function(e,t){for(var o=l(e),r=0;r<o.length;r++)if(!d(t,o[r]))return!1;return!0},tilesEqual:p,tileToQuadkey:function(e){for(var t="",o=e[2];0<o;o--){var r=0,a=1<<o-1;0!=(e[0]&a)&&r++,0!=(e[1]&a)&&(r+=2),t+=r.toString()}return t},quadkeyToTile:function(e){for(var t=0,o=0,r=e.length,a=r;0<a;a--){var n=1<<a-1,i=+e[r-a];1==i&&(t|=n),2==i&&(o|=n),3==i&&(t|=n,o|=n)}return[t,o,r]},pointToTile:n,bboxToTile:function(e){var t=n(e[0],e[1],32),o=n(e[2],e[3],32),r=[t[0],t[1],o[0],o[1]],a=c(r);if(0===a)return[0,0,0];var i=r[0]>>>32-a,s=r[1]>>>32-a;return[i,s,a]},pointToTileFraction:u}},{}],13:[function(e,t){var o=e("@turf/meta").coordEach;t.exports=function(e){var t=[Infinity,Infinity,-Infinity,-Infinity];return o(e,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}},{"@turf/meta":17}],14:[function(e,t){function o(e,t){if(!e)throw new Error("No geometry passed");return{type:"Feature",properties:t||{},geometry:e}}function r(e,t){if(e===void 0||null===e)throw new Error("radians is required");var o=s[t||"kilometers"];if(!o)throw new Error("units is invalid");return e*o}function a(e,t){if(e===void 0||null===e)throw new Error("distance is required");var o=s[t||"kilometers"];if(!o)throw new Error("units is invalid");return e/o}function n(e){if(null===e||e===void 0)throw new Error("radians is required");return 180*(e%(2*i))/i}var i=Math.PI,s={miles:3960,nauticalmiles:3441.145,degrees:57.2957795,radians:1,inches:250905600,yards:6969600,meters:6373000,metres:6373000,centimeters:6.373e8,centimetres:6.373e8,kilometers:6373,kilometres:6373,feet:20908792.65},l={kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,centimetres:1e4,millimeter:1e6,acres:2.47105e-4,miles:3.86e-7,yards:1.195990046,feet:10.763910417,inches:1550.003100006};t.exports={feature:o,featureCollection:function(e){if(!e)throw new Error("No features passed");if(!Array.isArray(e))throw new Error("features must be an Array");return{type:"FeatureCollection",features:e}},geometryCollection:function(e,t){if(!e)throw new Error("geometries is required");return o({type:"GeometryCollection",geometries:e},t)},point:function(e,t){if(!e)throw new Error("No coordinates passed");if(void 0===e.length)throw new Error("Coordinates must be an array");if(2>e.length)throw new Error("Coordinates must be at least 2 numbers long");if("number"!=typeof e[0]||"number"!=typeof e[1])throw new Error("Coordinates must contain numbers");return o({type:"Point",coordinates:e},t)},multiPoint:function(e,t){if(!e)throw new Error("No coordinates passed");return o({type:"MultiPoint",coordinates:e},t)},lineString:function(e,t){if(!e)throw new Error("No coordinates passed");if(2>e.length)throw new Error("Coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:e},t)},multiLineString:function(e,t){if(!e)throw new Error("No coordinates passed");return o({type:"MultiLineString",coordinates:e},t)},polygon:function(e,t){if(!e)throw new Error("No coordinates passed");for(var r=0,a;r<e.length;r++){if(a=e[r],4>a.length)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var n=0;n<a[a.length-1].length;n++)if(a[a.length-1][n]!==a[0][n])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:e},t)},multiPolygon:function(e,t){if(!e)throw new Error("No coordinates passed");return o({type:"MultiPolygon",coordinates:e},t)},radiansToDistance:r,distanceToRadians:a,distanceToDegrees:function(e,t){return n(a(e,t))},radians2degrees:n,degrees2radians:function(e){if(null===e||e===void 0)throw new Error("degrees is required");return e%360*i/180},bearingToAngle:function(e){if(null===e||void 0===e)throw new Error("bearing is required");var t=e%360;return 0>t&&(t+=360),t},convertDistance:function(e,t,o){if(null===e||e===void 0)throw new Error("distance is required");if(!(0<=e))throw new Error("distance must be a positive number");var n=r(a(e,t),o||"kilometers");return n},convertArea:function(e,t,o){if(null===e||e===void 0)throw new Error("area is required");if(!(0<=e))throw new Error("area must be a positive number");var r=l[t||"meters"];if(!r)throw new Error("invalid original units");var a=l[o||"kilometers"];if(!a)throw new Error("invalid final units");return e/r*a},round:function(e,t){if(e===void 0||null===e||isNaN(e))throw new Error("num is required");if(t&&!(0<=t))throw new Error("precision must be a positive number");var o=Math.pow(10,t||0);return Math.round(e*o)/o}}},{}],15:[function(e,t){function o(e,t,o){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var a=0,n=t.length-1;a<t.length;n=a++){var i=t[a][0],s=t[a][1],l=t[n][0],d=t[n][1],p=0==e[1]*(i-l)+s*(l-e[0])+d*(e[0]-i)&&0>=(i-e[0])*(l-e[0])&&0>=(s-e[1])*(d-e[1]);if(p)return!o;var c=s>e[1]!=d>e[1]&&e[0]<(l-i)*(e[1]-s)/(d-s)+i;c&&(r=!r)}return r}function r(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}var a=e("@turf/invariant"),n=a.getCoord,s=a.getCoords;t.exports=function(e,t,a){if(!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var l=n(e),d=s(t),p=t.geometry?t.geometry.type:t.type,c=t.bbox;if(c&&!1===r(l,c))return!1;"Polygon"===p&&(d=[d]);for(var u=0,i=!1;u<d.length&&!i;u++)if(o(l,d[u][0],a)){for(var b=!1,m=1;m<d[u].length&&!b;)o(l,d[u][m],!a)&&(b=!0),m++;b||(i=!0)}return i}},{"@turf/invariant":16}],16:[function(e,t){function o(e){if(!e)throw new Error("No obj passed");var t;if(e.length?t=e:e.coordinates?t=e.coordinates:e.geometry&&e.geometry.coordinates&&(t=e.geometry.coordinates),t)return r(t),t;throw new Error("No valid coordinates")}function r(e){if(1<e.length&&"number"==typeof e[0]&&"number"==typeof e[1])return!0;if(Array.isArray(e[0])&&e[0].length)return r(e[0]);throw new Error("coordinates must only contain numbers")}function a(e){if(!e)throw new Error("<geojson> is required");if(e.geometry)return e.geometry;if(e.coordinates||e.geometries)return e;throw new Error("<geojson> must be a Feature or Geometry Object")}t.exports={geojsonType:function(e,t,o){if(!t||!o)throw new Error("type and name required");if(!e||e.type!==t)throw new Error("Invalid input to "+o+": must be a "+t+", given "+e.type)},collectionOf:function(e,t,o){if(!e)throw new Error("No featureCollection passed");if(!o)throw new Error(".collectionOf() requires a name");if(!e||"FeatureCollection"!==e.type)throw new Error("Invalid input to "+o+", FeatureCollection required");for(var r=0,a;r<e.features.length;r++){if(a=e.features[r],!a||"Feature"!==a.type||!a.geometry)throw new Error("Invalid input to "+o+", Feature with geometry required");if(!a.geometry||a.geometry.type!==t)throw new Error("Invalid input to "+o+": must be a "+t+", given "+a.geometry.type)}},featureOf:function(e,t,o){if(!e)throw new Error("No feature passed");if(!o)throw new Error(".featureOf() requires a name");if(!e||"Feature"!==e.type||!e.geometry)throw new Error("Invalid input to "+o+", Feature with geometry required");if(!e.geometry||e.geometry.type!==t)throw new Error("Invalid input to "+o+": must be a "+t+", given "+e.geometry.type)},getCoord:function(e){if(!e)throw new Error("No obj passed");var t=o(e);if(1<t.length&&"number"==typeof t[0]&&"number"==typeof t[1])return t;throw new Error("Coordinate is not a valid Point")},getCoords:o,containsNumber:r,getGeom:a,getGeomType:function(e){return a(e).type}}},{}],17:[function(e,t){function o(e,t,r){if(null!==e){var a=0,n=0,i=e.type,s="FeatureCollection"===i,d=s?e.features.length:1,p,c,u,b,m,l,y,f,_,g;for(p=0;p<d;p++){var h=0;for(_=s?e.features[p].geometry:"Feature"===i?e.geometry:e,g=!!_&&"GeometryCollection"===_.type,y=g?_.geometries.length:1,c=0;c<y;c++)if(l=g?_.geometries[c]:_,null!==l){f=l.coordinates;var v=l.type;switch(a=r&&("Polygon"===v||"MultiPolygon"===v)?1:0,v){case null:break;case"Point":t(f,n,p,h),n++,h++;break;case"LineString":case"MultiPoint":for(u=0;u<f.length;u++)t(f[u],n,p,h),n++,h++;break;case"Polygon":case"MultiLineString":for(u=0;u<f.length;u++)for(b=0;b<f[u].length-a;b++)t(f[u][b],n,p,h),n++,h++;break;case"MultiPolygon":for(u=0;u<f.length;u++)for(b=0;b<f[u].length;b++)for(m=0;m<f[u][b].length-a;m++)t(f[u][b][m],n,p,h),n++,h++;break;case"GeometryCollection":for(u=0;u<l.geometries.length;u++)o(l.geometries[u],t,r);break;default:throw new Error("Unknown Geometry Type");}}}}}function r(e,t,r,a){var n=r;return o(e,function(e,o,a,i){n=0===o&&void 0===r?e:t(n,e,o,a,i)},a),n}function a(e,t){var o;switch(e.type){case"FeatureCollection":for(o=0;o<e.features.length;o++)t(e.features[o].properties,o);break;case"Feature":t(e.properties,0);}}function n(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var o=0;o<e.features.length;o++)t(e.features[o],o)}function i(e,t){var o=0,r="FeatureCollection"===e.type,a="Feature"===e.type,n=r?e.features.length:1,s,i,l,d,p,c,u,b;for(s=0;s<n;s++)for(c=r?e.features[s].geometry:a?e.geometry:e,b=r?e.features[s].properties:a?e.properties:{},u=!!c&&"GeometryCollection"===c.type,p=u?c.geometries.length:1,l=0;l<p;l++){if(d=u?c.geometries[l]:c,null===d){t(null,o,b),o++;continue}switch(d.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{t(d,o,b),o++;break}case"GeometryCollection":{for(i=0;i<d.geometries.length;i++)t(d.geometries[i],o,b),o++;break}default:throw new Error("Unknown Geometry Type");}}}function s(e,t){i(e,function(e,o,r){var a=null===e?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return void t(d(e,r),o,0);}var n;"MultiPoint"===a?n="Point":"MultiLineString"===a?n="LineString":"MultiPolygon"===a?n="Polygon":void 0;e.coordinates.forEach(function(e,a){var i={type:n,coordinates:e};t(d(i,r),o,a)})})}function l(e,t){s(e,function(e,o){var a=0;if(e.geometry){var n=e.geometry.type;"Point"===n||"MultiPoint"===n||r(e,function(r,n){var i=p([r,n],e.properties);return t(i,o,a),a++,n})}})}function d(e,t){if(e===void 0)throw new Error("No geometry passed");return{type:"Feature",properties:t||{},geometry:e}}function p(e,t){if(!e)throw new Error("No coordinates passed");if(2>e.length)throw new Error("Coordinates must be an array of two or more positions");return{type:"Feature",properties:t||{},geometry:{type:"LineString",coordinates:e}}}function c(e,t){if(!e)throw new Error("geojson is required");var o=e.geometry?e.geometry.type:e.type;if(!o)throw new Error("invalid geojson");if("FeatureCollection"===o)throw new Error("FeatureCollection is not supported");if("GeometryCollection"===o)throw new Error("GeometryCollection is not supported");var r=e.geometry?e.geometry.coordinates:e.coordinates;if(!r)throw new Error("geojson must contain coordinates");switch(o){case"LineString":return void t(r,0,0);case"Polygon":case"MultiLineString":for(var a=0,n=0;n<r.length;n++)"MultiLineString"===o&&(a=n),t(r[n],n,a);return;case"MultiPolygon":for(var i=0;i<r.length;i++)for(var s=0;s<r[i].length;s++)t(r[i][s],s,i);return;default:throw new Error(o+" geometry not supported");}}t.exports={coordEach:o,coordReduce:r,propEach:a,propReduce:function(e,t,o){var r=o;return a(e,function(e,a){r=0===a&&void 0===o?e:t(r,e,a)}),r},featureEach:n,featureReduce:function(e,t,o){var r=o;return n(e,function(e,a){r=0===a&&void 0===o?e:t(r,e,a)}),r},coordAll:function(e){var t=[];return o(e,function(e){t.push(e)}),t},geomEach:i,geomReduce:function(e,t,o){var r=o;return i(e,function(e,a,n){r=0===a&&void 0===o?e:t(r,e,a,n)}),r},flattenEach:s,flattenReduce:function(e,t,o){var r=o;return s(e,function(e,a,n){r=0===a&&0===n&&void 0===o?e:t(r,e,a,n)}),r},segmentEach:l,segmentReduce:function(e,t,o){var r=o;return l(e,function(e,a,n){r=0===a&&void 0===o?e:t(r,e,a,n)}),r},lineEach:c,lineReduce:function(e,t,o){var r=o;return c(e,function(e,a,n){r=0===a&&void 0===o?e:t(r,e,a,n)}),r}}},{}],18:[function(e,t){var o=e("@turf/inside"),r=e("@turf/helpers").featureCollection;t.exports=function(e,t){for(var a=r([]),n=0;n<t.features.length;n++)for(var i=0,s;i<e.features.length;i++)s=o(e.features[i],t.features[n]),s&&a.features.push(e.features[i]);return a}},{"@turf/helpers":14,"@turf/inside":15}],19:[function(e,t){var o=String.fromCharCode,r=Math.max;(function(e,o){"use strict";"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?o(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return o(e)}:o(e)})("undefined"==typeof window?this:window,function(e,t){"use strict";function a(e,t){t=t||ae;var o=t.createElement("script");o.text=e,t.head.appendChild(o).parentNode.removeChild(o)}function n(e){var t=!!e&&"length"in e&&e.length,o=_e.type(e);return"function"===o||_e.isWindow(e)?!1:"array"===o||0===t||"number"==typeof t&&0<t&&t-1 in e}function s(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function i(e,t,o){return _e.isFunction(t)?_e.grep(e,function(e,r){return!!t.call(e,r,e)!==o}):t.nodeType?_e.grep(e,function(e){return e===t!==o}):"string"==typeof t?ke.test(t)?_e.filter(t,e,o):(t=_e.filter(t,e),_e.grep(e,function(e){return-1<de.call(t,e)!==o&&1===e.nodeType})):_e.grep(e,function(e){return-1<de.call(t,e)!==o})}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return _e.each(e.match(je)||[],function(e,o){t[o]=!0}),t}function p(e){return e}function c(e){throw e}function u(e,t,o,r){var a;try{e&&_e.isFunction(a=e.promise)?a.call(e).done(t).fail(o):e&&_e.isFunction(a=e.then)?a.call(e,t,o):t.apply(void 0,[e].slice(r))}catch(e){o.apply(void 0,[e])}}function b(){ae.removeEventListener("DOMContentLoaded",b),e.removeEventListener("load",b),_e.ready()}function m(){this.expando=_e.expando+m.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Fe.test(e)?JSON.parse(e):e)}function f(e,t,o){var r;if(void 0===o&&1===e.nodeType)if(r="data-"+t.replace(Ue,"-$&").toLowerCase(),o=e.getAttribute(r),"string"==typeof o){try{o=y(o)}catch(t){}Be.set(e,t,o)}else o=void 0;return o}function _(e,t,o,r){var a=1,n=20,i=r?function(){return r.cur()}:function(){return _e.css(e,t,"")},s=i(),l=o&&o[3]||(_e.cssNumber[t]?"":"px"),d=(_e.cssNumber[t]||"px"!==l&&+s)&&We.exec(_e.css(e,t)),p;if(d&&d[3]!==l){l=l||d[3],o=o||[],d=+s||1;do a=a||".5",d/=a,_e.style(e,t,d+l);while(a!=(a=i()/s)&&1!=a&&--n)}return o&&(d=+d||+s||0,p=o[1]?d+(o[1]+1)*o[2]:+o[2],r&&(r.unit=l,r.start=d,r.end=p)),p}function g(e){var t=e.ownerDocument,o=e.nodeName,r=Ge[o],a;return r?r:(a=t.body.appendChild(t.createElement(o)),r=_e.css(a,"display"),a.parentNode.removeChild(a),"none"===r&&(r="block"),Ge[o]=r,r)}function h(e,t){for(var o=[],r=0,a=e.length,n,i;r<a;r++)(i=e[r],!!i.style)&&(n=i.style.display,t?("none"===n&&(o[r]=ze.get(i,"display")||null,!o[r]&&(i.style.display="")),""===i.style.display&&qe(i)&&(o[r]=g(i))):"none"!==n&&(o[r]="none",ze.set(i,"display",n)));for(r=0;r<a;r++)null!=o[r]&&(e[r].style.display=o[r]);return e}function v(e,t){var o;return o="undefined"==typeof e.getElementsByTagName?"undefined"==typeof e.querySelectorAll?[]:e.querySelectorAll(t||"*"):e.getElementsByTagName(t||"*"),void 0===t||t&&s(e,t)?_e.merge([e],o):o}function x(e,t){for(var o=0,r=e.length;o<r;o++)ze.set(e[o],"globalEval",!t||ze.get(t[o],"globalEval"))}function S(e,t,o,r,a){for(var n=t.createDocumentFragment(),s=[],d=0,i=e.length,l,p,c,u,b,m;d<i;d++)if(l=e[d],l||0===l)if("object"===_e.type(l))_e.merge(s,l.nodeType?[l]:l);else if(!Ke.test(l))s.push(t.createTextNode(l));else{for(p=p||n.appendChild(t.createElement("div")),c=($e.exec(l)||["",""])[1].toLowerCase(),u=Xe[c]||Xe._default,p.innerHTML=u[1]+_e.htmlPrefilter(l)+u[2],m=u[0];m--;)p=p.lastChild;_e.merge(s,p.childNodes),p=n.firstChild,p.textContent=""}for(n.textContent="",d=0;l=s[d++];){if(r&&-1<_e.inArray(l,r)){a&&a.push(l);continue}if(b=_e.contains(l.ownerDocument,l),p=v(n.appendChild(l),"script"),b&&x(p),o)for(m=0;l=p[m++];)Je.test(l.type||"")&&o.push(l)}return n}function O(){return!0}function w(){return!1}function T(){try{return ae.activeElement}catch(e){}}function P(e,t,o,r,a,n){var i,s;if("object"==typeof t){for(s in"string"!=typeof o&&(r=r||o,o=void 0),t)P(e,s,o,r,t[s],n);return e}if(null==r&&null==a?(a=o,r=o=void 0):null==a&&("string"==typeof o?(a=r,r=void 0):(a=r,r=o,o=void 0)),!1===a)a=w;else if(!a)return e;return 1===n&&(i=a,a=function(e){return _e().off(e),i.apply(this,arguments)},a.guid=i.guid||(i.guid=_e.guid++)),e.each(function(){_e.event.add(this,t,a,r,o)})}function k(e,t){return s(e,"table")&&s(11===t.nodeType?t.firstChild:t,"tr")?_e(">tbody",e)[0]||e:e}function C(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function D(e,t){var o,r,a,n,i,s,l,d;if(1===t.nodeType){if(ze.hasData(e)&&(n=ze.access(e),i=ze.set(t,n),d=n.events,d))for(a in delete i.handle,i.events={},d)for(o=0,r=d[a].length;o<r;o++)_e.event.add(t,a,d[a][o]);Be.hasData(e)&&(s=Be.access(e),l=_e.extend({},s),Be.set(t,l))}}function A(e,t){var o=t.nodeName.toLowerCase();"input"===o&&Ye.test(e.type)?t.checked=e.checked:("input"===o||"textarea"===o)&&(t.defaultValue=e.defaultValue)}function j(e,t,o,r){t=se.apply([],t);var n=0,i=e.length,s=t[0],l=_e.isFunction(s),d,p,c,u,b,m;if(l||1<i&&"string"==typeof s&&!ye.checkClone&&nt.test(s))return e.each(function(a){var n=e.eq(a);l&&(t[0]=s.call(this,a,n.html())),j(n,t,o,r)});if(i&&(d=S(t,e[0].ownerDocument,!1,e,r),p=d.firstChild,1===d.childNodes.length&&(d=p),p||r)){for(c=_e.map(v(d,"script"),C),u=c.length;n<i;n++)b=d,n!=i-1&&(b=_e.clone(b,!0,!0),u&&_e.merge(c,v(b,"script"))),o.call(e[n],b,n);if(u)for(m=c[c.length-1].ownerDocument,_e.map(c,E),n=0;n<u;n++)b=c[n],Je.test(b.type||"")&&!ze.access(b,"globalEval")&&_e.contains(m,b)&&(b.src?_e._evalUrl&&_e._evalUrl(b.src):a(b.textContent.replace(st,""),m))}return e}function M(e,t,o){for(var r=t?_e.filter(t,e):e,a=0,n;null!=(n=r[a]);a++)o||1!==n.nodeType||_e.cleanData(v(n)),n.parentNode&&(o&&_e.contains(n.ownerDocument,n)&&x(v(n,"script")),n.parentNode.removeChild(n));return e}function N(e,t,o){var r=e.style,a,n,i,s;return o=o||pt(e),o&&(s=o.getPropertyValue(t)||o[t],""===s&&!_e.contains(e.ownerDocument,e)&&(s=_e.style(e,t)),!ye.pixelMarginRight()&&dt.test(s)&&lt.test(t)&&(a=r.width,n=r.minWidth,i=r.maxWidth,r.minWidth=r.maxWidth=r.width=s,s=o.width,r.width=a,r.minWidth=n,r.maxWidth=i)),void 0===s?s:s+""}function I(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function R(e){if(e in ft)return e;for(var t=e[0].toUpperCase()+e.slice(1),o=yt.length;o--;)if(e=yt[o]+t,e in ft)return e}function z(e){var t=_e.cssProps[e];return t||(t=_e.cssProps[e]=R(e)||e),t}function B(e,t,o){var a=We.exec(t);return a?r(0,a[2]-(o||0))+(a[3]||"px"):t}function F(e,t,o,r,a){var n=0,s;for(s=o===(r?"border":"content")?4:"width"===t?1:0;4>s;s+=2)"margin"===o&&(n+=_e.css(e,o+Ze[s],!0,a)),r?("content"===o&&(n-=_e.css(e,"padding"+Ze[s],!0,a)),"margin"!==o&&(n-=_e.css(e,"border"+Ze[s]+"Width",!0,a))):(n+=_e.css(e,"padding"+Ze[s],!0,a),"padding"!==o&&(n+=_e.css(e,"border"+Ze[s]+"Width",!0,a)));return n}function U(e,t,o){var r=pt(e),a=N(e,t,r),n="border-box"===_e.css(e,"boxSizing",!1,r),i;return dt.test(a)?a:(i=n&&(ye.boxSizingReliable()||a===e.style[t]),"auto"===a&&(a=e["offset"+t[0].toUpperCase()+t.slice(1)]),a=parseFloat(a)||0,a+F(e,t,o||(n?"border":"content"),i,r)+"px")}function V(e,t,o,r,a){return new V.prototype.init(e,t,o,r,a)}function W(){vt&&(!1===ae.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(W):e.setTimeout(W,_e.fx.interval),_e.fx.tick())}function Z(){return e.setTimeout(function(){ht=void 0}),ht=_e.now()}function q(e,t){var o=0,r={height:e},a;for(t=t?1:0;4>o;o+=2-t)a=Ze[o],r["margin"+a]=r["padding"+a]=e;return t&&(r.opacity=r.width=e),r}function H(e,t,o){for(var r=(Y.tweeners[t]||[]).concat(Y.tweeners["*"]),a=0,n=r.length,i;a<n;a++)if(i=r[a].call(o,t,e))return i}function G(e,t){var o,r,a,n,i;for(o in e)if(r=_e.camelCase(o),a=t[r],n=e[o],Array.isArray(n)&&(a=n[1],n=e[o]=n[0]),o!==r&&(e[r]=n,delete e[o]),i=_e.cssHooks[r],i&&"expand"in i)for(o in n=i.expand(n),delete e[r],n)o in e||(e[o]=n[o],t[o]=a);else t[r]=a}function Y(e,t,o){var a=0,n=Y.prefilters.length,i=_e.Deferred().always(function(){delete s.elem}),s=function(){if(c)return!1;for(var t=ht||Z(),o=r(0,l.startTime+l.duration-t),a=o/l.duration||0,n=1-a,s=0,d=l.tweens.length;s<d;s++)l.tweens[s].run(n);return(i.notifyWith(e,[l,n,o]),1>n&&d)?o:(d||i.notifyWith(e,[l,1,0]),i.resolveWith(e,[l]),!1)},l=i.promise({elem:e,props:_e.extend({},t),opts:_e.extend(!0,{specialEasing:{},easing:_e.easing._default},o),originalProperties:t,originalOptions:o,startTime:ht||Z(),duration:o.duration,tweens:[],createTween:function(t,o){var r=_e.Tween(e,l.opts,t,o,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var o=0,r=t?l.tweens.length:0;if(c)return this;for(c=!0;o<r;o++)l.tweens[o].run(1);return t?(i.notifyWith(e,[l,1,0]),i.resolveWith(e,[l,t])):i.rejectWith(e,[l,t]),this}}),d=l.props,p,c;for(G(d,l.opts.specialEasing);a<n;a++)if(p=Y.prefilters[a].call(l,e,d,l.opts),p)return _e.isFunction(p.stop)&&(_e._queueHooks(l.elem,l.opts.queue).stop=_e.proxy(p.stop,p)),p;return _e.map(d,H,l),_e.isFunction(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),_e.fx.timer(_e.extend(s,{elem:e,anim:l,queue:l.opts.queue})),l}function $(e){var t=e.match(je)||[];return t.join(" ")}function J(e){return e.getAttribute&&e.getAttribute("class")||""}function X(e,t,o,r){if(Array.isArray(t))_e.each(t,function(t,a){o||Et.test(e)?r(e,a):X(e+"["+("object"==typeof a&&null!=a?t:"")+"]",a,o,r)});else if(!o&&"object"===_e.type(t))for(var a in t)X(e+"["+a+"]",t[a],o,r);else r(e,t)}function K(e){return function(t,o){"string"!=typeof t&&(o=t,t="*");var r=0,a=t.toLowerCase().match(je)||[],n;if(_e.isFunction(o))for(;n=a[r++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(o)):(e[n]=e[n]||[]).push(o)}}function Q(e,t,o,r){function a(s){var l;return n[s]=!0,_e.each(e[s]||[],function(e,s){var d=s(t,o,r);return"string"!=typeof d||i||n[d]?i?!(l=d):void 0:(t.dataTypes.unshift(d),a(d),!1)}),l}var n={},i=e===Vt;return a(t.dataTypes[0])||!n["*"]&&a("*")}function ee(e,t){var o=_e.ajaxSettings.flatOptions||{},r,a;for(r in t)void 0!==t[r]&&((o[r]?e:a||(a={}))[r]=t[r]);return a&&_e.extend(!0,e,a),e}function te(e,t,o){for(var r=e.contents,a=e.dataTypes,n,i,s,l;"*"===a[0];)a.shift(),void 0==n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(i in r)if(r[i]&&r[i].test(n)){a.unshift(i);break}if(a[0]in o)s=a[0];else{for(i in o){if(!a[0]||e.converters[i+" "+a[0]]){s=i;break}l||(l=i)}s=s||l}return s?(s!==a[0]&&a.unshift(s),o[s]):void 0}function oe(e,t,o,r){var a={},n=e.dataTypes.slice(),i,s,l,d,p;if(n[1])for(l in e.converters)a[l.toLowerCase()]=e.converters[l];for(s=n.shift();s;)if(e.responseFields[s]&&(o[e.responseFields[s]]=t),!p&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),p=s,s=n.shift(),s)if("*"===s)s=p;else if("*"!==p&&p!==s){if(l=a[p+" "+s]||a["* "+s],!l)for(i in a)if(d=i.split(" "),d[1]===s&&(l=a[p+" "+d[0]]||a["* "+d[0]],l)){!0===l?l=a[i]:!0!==a[i]&&(s=d[0],n.unshift(d[1]));break}if(!0!==l)if(l&&e.throws)t=l(t);else try{t=l(t)}catch(t){return{state:"parsererror",error:l?t:"No conversion from "+p+" to "+s}}}return{state:"success",data:t}}var re=[],ae=e.document,ne=Object.getPrototypeOf,ie=re.slice,se=re.concat,le=re.push,de=re.indexOf,pe={},ce=pe.toString,ue=pe.hasOwnProperty,be=ue.toString,me=be.call(Object),ye={},fe="3.2.1",_e=function(e,t){return new _e.fn.init(e,t)},ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,he=/^-ms-/,ve=/-([a-z])/g,xe=function(e,t){return t.toUpperCase()};_e.fn=_e.prototype={jquery:fe,constructor:_e,length:0,toArray:function(){return ie.call(this)},get:function(e){return null==e?ie.call(this):0>e?this[e+this.length]:this[e]},pushStack:function(e){var t=_e.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return _e.each(this,e)},map:function(e){return this.pushStack(_e.map(this,function(t,o){return e.call(t,o,t)}))},slice:function(){return this.pushStack(ie.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,o=+e+(0>e?t:0);return this.pushStack(0<=o&&o<t?[this[o]]:[])},end:function(){return this.prevObject||this.constructor()},push:le,sort:re.sort,splice:re.splice},_e.extend=_e.fn.extend=function(){var e=arguments[0]||{},t=1,o=arguments.length,r=!1,a,n,i,s,l,d;for("boolean"==typeof e&&(r=e,e=arguments[t]||{},t++),"object"==typeof e||_e.isFunction(e)||(e={}),t===o&&(e=this,t--);t<o;t++)if(null!=(a=arguments[t]))for(n in a)(i=e[n],s=a[n],e!==s)&&(r&&s&&(_e.isPlainObject(s)||(l=Array.isArray(s)))?(l?(l=!1,d=i&&Array.isArray(i)?i:[]):d=i&&_e.isPlainObject(i)?i:{},e[n]=_e.extend(r,d,s)):void 0!==s&&(e[n]=s));return e},_e.extend({expando:"jQuery"+(fe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===_e.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=_e.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,o;return e&&"[object Object]"===ce.call(e)&&((t=ne(e),!!!t)||(o=ue.call(t,"constructor")&&t.constructor,"function"==typeof o&&be.call(o)===me))},isEmptyObject:function(e){for(var t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?pe[ce.call(e)]||"object":typeof e},globalEval:function(e){a(e)},camelCase:function(e){return e.replace(he,"ms-").replace(ve,xe)},each:function(e,t){var o=0,r;if(n(e))for(r=e.length;o<r&&!1!==t.call(e[o],o,e[o]);o++);else for(o in e)if(!1===t.call(e[o],o,e[o]))break;return e},trim:function(e){return null==e?"":(e+"").replace(ge,"")},makeArray:function(e,t){var o=t||[];return null!=e&&(n(Object(e))?_e.merge(o,"string"==typeof e?[e]:e):le.call(o,e)),o},inArray:function(e,t,o){return null==t?-1:de.call(t,e,o)},merge:function(e,t){for(var o=+t.length,r=0,a=e.length;r<o;r++)e[a++]=t[r];return e.length=a,e},grep:function(e,t,o){for(var r=[],a=0,n=e.length,i;a<n;a++)i=!t(e[a],a),i!==!o&&r.push(e[a]);return r},map:function(e,t,o){var r=0,a=[],i,s;if(n(e))for(i=e.length;r<i;r++)s=t(e[r],r,o),null!=s&&a.push(s);else for(r in e)s=t(e[r],r,o),null!=s&&a.push(s);return se.apply([],a)},guid:1,proxy:function(e,t){var o,r,a;if("string"==typeof t&&(o=e[t],t=e,e=o),!!_e.isFunction(e))return r=ie.call(arguments,2),a=function(){return e.apply(t||this,r.concat(ie.call(arguments)))},a.guid=e.guid=e.guid||_e.guid++,a},now:Date.now,support:ye}),"function"==typeof Symbol&&(_e.fn[Symbol.iterator]=re[Symbol.iterator]),_e.each(["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol"],function(e,t){pe["[object "+t+"]"]=t.toLowerCase()});var Se=/*!
   * Sizzle CSS Selector Engine v2.3.3
   * https://sizzlejs.com/
   *
   * Copyright jQuery Foundation and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2016-08-08
   */function(e){function t(e,t,o,r){var a=t&&t.ownerDocument,n=t?t.nodeType:9,s,l,i,d,p,c,u;if(o=o||[],"string"!=typeof e||!e||1!==n&&9!==n&&11!==n)return o;if(!r&&((t?t.ownerDocument||t:w)!==ge&&_e(t),t=t||ge,ve)){if(11!==n&&(p=Q.exec(e)))if(!(s=p[1])){if(p[2])return I.apply(o,t.getElementsByTagName(e)),o;if((s=p[3])&&le.getElementsByClassName&&t.getElementsByClassName)return I.apply(o,t.getElementsByClassName(s)),o}else if(9===n){if(!(i=t.getElementById(s)))return o;if(i.id===s)return o.push(i),o}else if(a&&(i=a.getElementById(s))&&we(t,i)&&i.id===s)return o.push(i),o;if(le.qsa&&!E[e+" "]&&(!xe||!xe.test(e))){if(1!==n)a=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((d=t.getAttribute("id"))?d=d.replace(re,ae):t.setAttribute("id",d=O),c=ce(e),l=c.length;l--;)c[l]="#"+d+" "+y(c[l]);u=c.join(","),a=ee.test(e)&&b(t.parentNode)||t}if(u)try{return I.apply(o,a.querySelectorAll(u)),o}catch(e){}finally{d===O&&t.removeAttribute("id")}}}return be(e.replace(W,"$1"),t,o,r)}function r(){function e(o,r){return t.push(o+" ")>de.cacheLength&&delete e[t.shift()],e[o+" "]=r}var t=[];return e}function a(e){return e[O]=!0,e}function n(e){var t=ge.createElement("fieldset");try{return!!e(t)}catch(t){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function s(e,t){for(var o=e.split("|"),r=o.length;r--;)de.attrHandle[o[r]]=t}function l(e,t){var o=t&&e,r=o&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(o)for(;o=o.nextSibling;)if(o===t)return-1;return e?1:-1}function d(e){return function(t){var o=t.nodeName.toLowerCase();return"input"===o&&t.type===e}}function p(e){return function(t){var o=t.nodeName.toLowerCase();return("input"===o||"button"===o)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:!!("label"in t)&&t.disabled===e}}function u(e){return a(function(t){return t=+t,a(function(o,r){for(var a=e([],o.length,t),n=a.length,i;n--;)o[i=a[n]]&&(o[i]=!(r[i]=o[i]))})})}function b(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function m(){}function y(e){for(var t=0,o=e.length,r="";t<o;t++)r+=e[t].value;return r}function f(e,t,o){var r=t.dir,a=t.next,n=a||r,i=o&&"parentNode"===n,s=P++;return t.first?function(t,o,a){for(;t=t[r];)if(1===t.nodeType||i)return e(t,o,a);return!1}:function(t,o,l){var d=[T,s],p,c,u;if(l){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,o,l))return!0;}else for(;t=t[r];)if(1===t.nodeType||i)if(u=t[O]||(t[O]={}),c=u[t.uniqueID]||(u[t.uniqueID]={}),a&&a===t.nodeName.toLowerCase())t=t[r]||t;else{if((p=c[n])&&p[0]===T&&p[1]===s)return d[2]=p[2];if(c[n]=d,d[2]=e(t,o,l))return!0}return!1}}function _(e){return 1<e.length?function(t,o,r){for(var a=e.length;a--;)if(!e[a](t,o,r))return!1;return!0}:e[0]}function g(e,o,r){for(var a=0,n=o.length;a<n;a++)t(e,o[a],r);return r}function h(e,t,o,r,a){for(var n=[],s=0,i=e.length,l;s<i;s++)(l=e[s])&&(!o||o(l,r,a))&&(n.push(l),null!=t&&t.push(s));return n}function v(e,t,o,r,n,i){return r&&!r[O]&&(r=v(r)),n&&!n[O]&&(n=v(n,i)),a(function(a,s,l,d){var p=[],c=[],u=s.length,b=a||g(t||"*",l.nodeType?[l]:l,[]),m=e&&(a||!t)?h(b,p,e,l,d):b,y=o?n||(a?e:u||r)?[]:s:m,f,_,i;if(o&&o(m,y,l,d),r)for(f=h(y,c),r(f,[],l,d),_=f.length;_--;)(i=f[_])&&(y[c[_]]=!(m[c[_]]=i));if(!a)y=h(y===s?y.splice(u,y.length):y),n?n(null,s,y,d):I.apply(s,y);else if(n||e){if(n){for(f=[],_=y.length;_--;)(i=y[_])&&f.push(m[_]=i);n(null,y=[],f,d)}for(_=y.length;_--;)(i=y[_])&&-1<(f=n?z(a,i):p[_])&&(a[f]=!(s[f]=i))}})}function x(e){for(var t=e.length,o=de.relative[e[0].type],r=o||de.relative[" "],a=o?1:0,n=f(function(e){return e===l},r,!0),i=f(function(e){return-1<z(l,e)},r,!0),s=[function(e,t,r){var a=!o&&(r||t!==me)||((l=t).nodeType?n(e,t,r):i(e,t,r));return l=null,a}],l,d,p;a<t;a++)if(d=de.relative[e[a].type])s=[f(_(s),d)];else{if(d=de.filter[e[a].type].apply(null,e[a].matches),d[O]){for(p=++a;p<t&&!de.relative[e[p].type];p++);return v(1<a&&_(s),1<a&&y(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(W,"$1"),d,a<p&&x(e.slice(a,p)),p<t&&x(e=e.slice(p)),p<t&&y(e))}s.push(d)}return _(s)}function S(e,o){var r=0<o.length,n=0<e.length,i=function(a,s,l,d,p){var c=0,u="0",i=a&&[],b=[],m=me,y=a||n&&de.find.TAG("*",p),f=T+=null==m?1:Math.random()||0.1,_=y.length,g,v,x;for(p&&(me=s===ge||s||p);u!==_&&null!=(g=y[u]);u++){if(n&&g){for(v=0,s||g.ownerDocument===ge||(_e(g),l=!ve);x=e[v++];)if(x(g,s||ge,l)){d.push(g);break}p&&(T=f)}r&&((g=!x&&g)&&c--,a&&i.push(g))}if(c+=u,r&&u!==c){for(v=0;x=o[v++];)x(i,b,s,l);if(a){if(0<c)for(;u--;)i[u]||b[u]||(b[u]=M.call(d));b=h(b)}I.apply(d,b),p&&!a&&0<b.length&&1<c+o.length&&t.uniqueSort(d)}return p&&(T=f,me=m),i};return r?a(i):i}var O="sizzle"+1*new Date,w=e.document,T=0,P=0,k=r(),C=r(),E=r(),D=function(e,t){return e===t&&(fe=!0),0},A={}.hasOwnProperty,j=[],M=j.pop,N=j.push,I=j.push,R=j.slice,z=function(e,t){for(var o=0,r=e.length;o<r;o++)if(e[o]===t)return o;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",U="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",V=/[\x20\t\r\n\f]+/g,W=/^[\x20\t\r\n\f]+|((?:^|[^\\])(?:\\.)*)[\x20\t\r\n\f]+$/g,Z=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,q=/^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/,H=/=[\x20\t\r\n\f]*([^\]'"]*?)[\x20\t\r\n\f]*\]/g,G=/:((?:\\.|[\w-]|[^-\xa0])+)(?:\((('((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)")|((?:\\.|[^\\()[\]]|\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^-\xa0])+))|)[\x20\t\r\n\f]*\])*)|.*)\)|)/,Y=/^(?:\\.|[\w-]|[^-\xa0])+$/,$={ID:/^#((?:\\.|[\w-]|[^-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^-\xa0])+)/,TAG:/^((?:\\.|[\w-]|[^-\xa0])+|[*])/,ATTR:/^\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^-\xa0])+))|)[\x20\t\r\n\f]*\]/,PSEUDO:/^:((?:\\.|[\w-]|[^-\xa0])+)(?:\((('((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)")|((?:\\.|[^\\()[\]]|\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^-\xa0])+))|)[\x20\t\r\n\f]*\])*)|.*)\)|)/,CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,bool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},J=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=/\\([\da-f]{1,6}[\x20\t\r\n\f]?|([\x20\t\r\n\f])|.)/ig,oe=function(e,t,r){var a="0x"+t-65536;return a!=a||r?t:0>a?o(a+65536):o(55296|a>>10,56320|1023&a)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ae=function(e,t){return t?"\0"===e?"\uFFFD":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ne=function(){_e()},ie=f(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"}),se,le,de,pe,i,ce,ue,be,me,ye,fe,_e,ge,he,ve,xe,Se,Oe,we;try{I.apply(j=R.call(w.childNodes),w.childNodes),j[w.childNodes.length].nodeType}catch(t){I={apply:j.length?function(e,t){N.apply(e,R.call(t))}:function(e,t){for(var o=e.length,r=0;e[o++]=t[r++];);e.length=o-1}}}for(se in le=t.support={},i=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},_e=t.setDocument=function(e){var t=e?e.ownerDocument||e:w,o,r;return t!==ge&&9===t.nodeType&&t.documentElement?(ge=t,he=ge.documentElement,ve=!i(ge),w!==ge&&(r=ge.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ne,!1):r.attachEvent&&r.attachEvent("onunload",ne)),le.attributes=n(function(e){return e.className="i",!e.getAttribute("className")}),le.getElementsByTagName=n(function(e){return e.appendChild(ge.createComment("")),!e.getElementsByTagName("*").length}),le.getElementsByClassName=K.test(ge.getElementsByClassName),le.getById=n(function(e){return he.appendChild(e).id=O,!ge.getElementsByName||!ge.getElementsByName(O).length}),le.getById?(de.filter.ID=function(e){var t=e.replace(te,oe);return function(e){return e.getAttribute("id")===t}},de.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&ve){var o=t.getElementById(e);return o?[o]:[]}}):(de.filter.ID=function(e){var t=e.replace(te,oe);return function(e){var o="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return o&&o.value===t}},de.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&ve){var o=t.getElementById(e),r,a,n;if(o){if(r=o.getAttributeNode("id"),r&&r.value===e)return[o];for(n=t.getElementsByName(e),a=0;o=n[a++];)if(r=o.getAttributeNode("id"),r&&r.value===e)return[o]}return[]}}),de.find.TAG=le.getElementsByTagName?function(e,t){return"undefined"==typeof t.getElementsByTagName?le.qsa?t.querySelectorAll(e):void 0:t.getElementsByTagName(e)}:function(e,t){var o=[],r=0,a=t.getElementsByTagName(e),n;if("*"===e){for(;n=a[r++];)1===n.nodeType&&o.push(n);return o}return a},de.find.CLASS=le.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&ve)return t.getElementsByClassName(e)},Se=[],xe=[],(le.qsa=K.test(ge.querySelectorAll))&&(n(function(e){he.appendChild(e).innerHTML="<a id='"+O+"'></a><select id='"+O+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&xe.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||xe.push("\\["+F+"*(?:value|"+B+")"),e.querySelectorAll("[id~="+O+"-]").length||xe.push("~="),e.querySelectorAll(":checked").length||xe.push(":checked"),e.querySelectorAll("a#"+O+"+*").length||xe.push(".#.+[+~]")}),n(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=ge.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&xe.push("name"+F+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&xe.push(":enabled",":disabled"),he.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&xe.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),xe.push(",.*:")})),(le.matchesSelector=K.test(Oe=he.matches||he.webkitMatchesSelector||he.mozMatchesSelector||he.oMatchesSelector||he.msMatchesSelector))&&n(function(e){le.disconnectedMatch=Oe.call(e,"*"),Oe.call(e,"[s!='']:x"),Se.push("!=",":("+U+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+("\\["+F+"*("+U+")(?:"+F+"*([*^$|!~]?=)"+F+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+U+"))|)"+F+"*\\]")+")*)|.*)\\)|)")}),xe=xe.length&&new RegExp(xe.join("|")),Se=Se.length&&new RegExp(Se.join("|")),o=K.test(he.compareDocumentPosition),we=o||K.test(he.contains)?function(e,t){var o=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&1===r.nodeType&&(o.contains?o.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},D=o?function(e,t){if(e===t)return fe=!0,0;var o=!e.compareDocumentPosition-!t.compareDocumentPosition;return o?o:(o=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&o||!le.sortDetached&&t.compareDocumentPosition(e)===o?e===ge||e.ownerDocument===w&&we(w,e)?-1:t===ge||t.ownerDocument===w&&we(w,t)?1:ye?z(ye,e)-z(ye,t):0:4&o?-1:1)}:function(e,t){if(e===t)return fe=!0,0;var o=0,r=e.parentNode,a=t.parentNode,n=[e],i=[t],s;if(!r||!a)return e===ge?-1:t===ge?1:r?-1:a?1:ye?z(ye,e)-z(ye,t):0;if(r===a)return l(e,t);for(s=e;s=s.parentNode;)n.unshift(s);for(s=t;s=s.parentNode;)i.unshift(s);for(;n[o]===i[o];)o++;return o?l(n[o],i[o]):n[o]===w?-1:i[o]===w?1:0},ge):ge},t.matches=function(e,o){return t(e,null,null,o)},t.matchesSelector=function(e,o){if((e.ownerDocument||e)!==ge&&_e(e),o=o.replace(H,"='$1']"),le.matchesSelector&&ve&&!E[o+" "]&&(!Se||!Se.test(o))&&(!xe||!xe.test(o)))try{var r=Oe.call(e,o);if(r||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(t){}return 0<t(o,ge,null,[e]).length},t.contains=function(e,t){return(e.ownerDocument||e)!==ge&&_e(e),we(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==ge&&_e(e);var o=de.attrHandle[t.toLowerCase()],r=o&&A.call(de.attrHandle,t.toLowerCase())?o(e,t,!ve):void 0;return void 0===r?le.attributes||!ve?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null:r},t.escape=function(e){return(e+"").replace(re,ae)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t=[],o=0,r=0,a;if(fe=!le.detectDuplicates,ye=!le.sortStable&&e.slice(0),e.sort(D),fe){for(;a=e[r++];)a===e[r]&&(o=t.push(r));for(;o--;)e.splice(t[o],1)}return ye=null,e},pe=t.getText=function(e){var t="",o=0,r=e.nodeType,a;if(!r)for(;a=e[o++];)t+=pe(a);else if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)t+=pe(e)}else if(3===r||4===r)return e.nodeValue;return t},de=t.selectors={cacheLength:50,createPseudo:a,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,oe),e[3]=(e[3]||e[4]||e[5]||"").replace(te,oe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(!e[3]&&t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t=!e[6]&&e[2],o;return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":t&&G.test(t)&&(o=ce(t,!0))&&(o=t.indexOf(")",t.length-o)-t.length)&&(e[0]=e[0].slice(0,o),e[2]=t.slice(0,o)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,oe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&k(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,o,r){return function(a){var n=t.attr(a,e);return null==n?"!="===o:!o||(n+="","="===o?n===r:"!="===o?n!==r:"^="===o?r&&0===n.indexOf(r):"*="===o?r&&-1<n.indexOf(r):"$="===o?r&&n.slice(-r.length)===r:"~="===o?-1<(" "+n.replace(V," ")+" ").indexOf(r):"|="===o&&(n===r||n.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,o,r,a){var n="nth"!==e.slice(0,3),i="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===a?function(e){return!!e.parentNode}:function(t,o,l){var d=n==i?"previousSibling":"nextSibling",p=t.parentNode,c=s&&t.nodeName.toLowerCase(),u=!l&&!s,b=!1,m,y,f,_,g,h;if(p){if(n){for(;d;){for(_=t;_=_[d];)if(s?_.nodeName.toLowerCase()===c:1===_.nodeType)return!1;h=d="only"===e&&!h&&"nextSibling"}return!0}if(h=[i?p.firstChild:p.lastChild],i&&u){for(_=p,f=_[O]||(_[O]={}),y=f[_.uniqueID]||(f[_.uniqueID]={}),m=y[e]||[],g=m[0]===T&&m[1],b=g&&m[2],_=g&&p.childNodes[g];_=++g&&_&&_[d]||(b=g=0)||h.pop();)if(1===_.nodeType&&++b&&_===t){y[e]=[T,g,b];break}}else if(u&&(_=t,f=_[O]||(_[O]={}),y=f[_.uniqueID]||(f[_.uniqueID]={}),m=y[e]||[],g=m[0]===T&&m[1],b=g),!1===b)for(;(_=++g&&_&&_[d]||(b=g=0)||h.pop())&&!((s?_.nodeName.toLowerCase()===c:1===_.nodeType)&&++b&&(u&&(f=_[O]||(_[O]={}),y=f[_.uniqueID]||(f[_.uniqueID]={}),y[e]=[T,b]),_===t)););return b-=a,b===r||0==b%r&&0<=b/r}}},PSEUDO:function(e,o){var r=de.pseudos[e]||de.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e),n;return r[O]?r(o):1<r.length?(n=[e,e,"",o],de.setFilters.hasOwnProperty(e.toLowerCase())?a(function(e,t){for(var a=r(e,o),n=a.length,i;n--;)i=z(e,a[n]),e[i]=!(t[i]=a[n])}):function(e){return r(e,0,n)}):r}},pseudos:{not:a(function(e){var t=[],o=[],r=ue(e.replace(W,"$1"));return r[O]?a(function(e,t,o,a){for(var n=r(e,null,a,[]),s=e.length,i;s--;)(i=n[s])&&(e[s]=!(t[s]=i))}):function(e,a,n){return t[0]=e,r(t,null,n,o),t[0]=null,!o.pop()}}),has:a(function(e){return function(o){return 0<t(e,o).length}}),contains:a(function(e){return e=e.replace(te,oe),function(t){return-1<(t.textContent||t.innerText||pe(t)).indexOf(e)}}),lang:a(function(e){return Y.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(te,oe).toLowerCase(),function(t){var o;do if(o=ve?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return o=o.toLowerCase(),o===e||0===o.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var o=e.location&&e.location.hash;return o&&o.slice(1)===t.id},root:function(e){return e===he},focus:function(e){return e===ge.activeElement&&(!ge.hasFocus||ge.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(6>e.nodeType)return!1;return!0},parent:function(e){return!de.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,o){return[0>o?o+t:o]}),even:u(function(e,t){for(var o=0;o<t;o+=2)e.push(o);return e}),odd:u(function(e,t){for(var o=1;o<t;o+=2)e.push(o);return e}),lt:u(function(e,t,o){for(var r=0>o?o+t:o;0<=--r;)e.push(r);return e}),gt:u(function(e,t,o){for(var r=0>o?o+t:o;++r<t;)e.push(r);return e})}},de.pseudos.nth=de.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})de.pseudos[se]=d(se);for(se in{submit:!0,reset:!0})de.pseudos[se]=p(se);return m.prototype=de.filters=de.pseudos,de.setFilters=new m,ce=t.tokenize=function(e,o){var r=C[e+" "],a,n,i,s,l,d,p;if(r)return o?0:r.slice(0);for(l=e,d=[],p=de.preFilter;l;){for(s in(!a||(n=Z.exec(l)))&&(n&&(l=l.slice(n[0].length)||l),d.push(i=[])),a=!1,(n=q.exec(l))&&(a=n.shift(),i.push({value:a,type:n[0].replace(W," ")}),l=l.slice(a.length)),de.filter)(n=$[s].exec(l))&&(!p[s]||(n=p[s](n)))&&(a=n.shift(),i.push({value:a,type:s,matches:n}),l=l.slice(a.length));if(!a)break}return o?l.length:l?t.error(e):C(e,d).slice(0)},ue=t.compile=function(e,t){var o=[],r=[],a=E[e+" "],n;if(!a){for(t||(t=ce(e)),n=t.length;n--;)a=x(t[n]),a[O]?o.push(a):r.push(a);a=E(e,S(r,o)),a.selector=e}return a},be=t.select=function(e,t,o,r){var a="function"==typeof e&&e,n=!r&&ce(e=a.selector||e),s,i,l,d,p;if(o=o||[],1===n.length){if(i=n[0]=n[0].slice(0),2<i.length&&"ID"===(l=i[0]).type&&9===t.nodeType&&ve&&de.relative[i[1].type]){if(t=(de.find.ID(l.matches[0].replace(te,oe),t)||[])[0],!t)return o;a&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(s=$.needsContext.test(e)?0:i.length;s--&&(l=i[s],!de.relative[d=l.type]);)if((p=de.find[d])&&(r=p(l.matches[0].replace(te,oe),ee.test(i[0].type)&&b(t.parentNode)||t))){if(i.splice(s,1),e=r.length&&y(i),!e)return I.apply(o,r),o;break}}return(a||ue(e,n))(r,t,!ve,o,!t||ee.test(e)&&b(t.parentNode)||t),o},le.sortStable=O.split("").sort(D).join("")===O,le.detectDuplicates=!!fe,_e(),le.sortDetached=n(function(e){return 1&e.compareDocumentPosition(ge.createElement("fieldset"))}),n(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||s("type|href|height|width",function(e,t,o){if(!o)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),le.attributes&&n(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||s("value",function(e,t,o){if(!o&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),n(function(e){return null==e.getAttribute("disabled")})||s(B,function(e,t,o){var r;if(!o)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);_e.find=Se,_e.expr=Se.selectors,_e.expr[":"]=_e.expr.pseudos,_e.uniqueSort=_e.unique=Se.uniqueSort,_e.text=Se.getText,_e.isXMLDoc=Se.isXML,_e.contains=Se.contains,_e.escapeSelector=Se.escape;var Oe=function(e,t,o){for(var r=[];(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(void 0!==o&&_e(e).is(o))break;r.push(e)}return r},we=function(e,t){for(var o=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&o.push(e);return o},Te=_e.expr.match.needsContext,Pe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,ke=/^.[^:#\[\.,]*$/;_e.filter=function(e,t,o){var r=t[0];return o&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?_e.find.matchesSelector(r,e)?[r]:[]:_e.find.matches(e,_e.grep(t,function(e){return 1===e.nodeType}))},_e.fn.extend({find:function(e){var t=this.length,o=this,r,a;if("string"!=typeof e)return this.pushStack(_e(e).filter(function(){for(r=0;r<t;r++)if(_e.contains(o[r],this))return!0}));for(a=this.pushStack([]),r=0;r<t;r++)_e.find(e,o[r],a);return 1<t?_e.uniqueSort(a):a},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&Te.test(e)?_e(e):e||[],!1).length}});var Ce=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Le=_e.fn.init=function(e,t,o){var r,a;if(!e)return this;if(o=o||Ee,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:Ce.exec(e),r&&(r[1]||!t)){if(r[1]){if(t=t instanceof _e?t[0]:t,_e.merge(this,_e.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ae,!0)),Pe.test(r[1])&&_e.isPlainObject(t))for(r in t)_e.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return a=ae.getElementById(r[2]),a&&(this[0]=a,this.length=1),this}return!t||t.jquery?(t||o).find(e):this.constructor(t).find(e)}return e.nodeType?(this[0]=e,this.length=1,this):_e.isFunction(e)?void 0===o.ready?e(_e):o.ready(e):_e.makeArray(e,this)},Ee;Le.prototype=_e.fn,Ee=_e(ae);var De=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};_e.fn.extend({has:function(e){var t=_e(e,this),o=t.length;return this.filter(function(){for(var e=0;e<o;e++)if(_e.contains(this,t[e]))return!0})},closest:function(e,t){var o=0,r=this.length,a=[],n="string"!=typeof e&&_e(e),i;if(!Te.test(e))for(;o<r;o++)for(i=this[o];i&&i!==t;i=i.parentNode)if(11>i.nodeType&&(n?-1<n.index(i):1===i.nodeType&&_e.find.matchesSelector(i,e))){a.push(i);break}return this.pushStack(1<a.length?_e.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?de.call(_e(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(_e.uniqueSort(_e.merge(this.get(),_e(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),_e.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Oe(e,"parentNode")},parentsUntil:function(e,t,o){return Oe(e,"parentNode",o)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return Oe(e,"nextSibling")},prevAll:function(e){return Oe(e,"previousSibling")},nextUntil:function(e,t,o){return Oe(e,"nextSibling",o)},prevUntil:function(e,t,o){return Oe(e,"previousSibling",o)},siblings:function(e){return we((e.parentNode||{}).firstChild,e)},children:function(e){return we(e.firstChild)},contents:function(e){return s(e,"iframe")?e.contentDocument:(s(e,"template")&&(e=e.content||e),_e.merge([],e.childNodes))}},function(e,t){_e.fn[e]=function(o,r){var a=_e.map(this,t,o);return"Until"!==e.slice(-5)&&(r=o),r&&"string"==typeof r&&(a=_e.filter(r,a)),1<this.length&&(!Ae[e]&&_e.uniqueSort(a),De.test(e)&&a.reverse()),this.pushStack(a)}});var je=/[^\x20\t\r\n\f]+/g;_e.Callbacks=function(e){e="string"==typeof e?d(e):_e.extend({},e);var t=[],o=[],r=-1,a=function(){for(p=p||e.once,l=i=!0;o.length;r=-1)for(s=o.shift();++r<t.length;)!1===t[r].apply(s[0],s[1])&&e.stopOnFalse&&(r=t.length,s=!1);e.memory||(s=!1),i=!1,p&&(s?t=[]:t="")},n={add:function(){return t&&(s&&!i&&(r=t.length-1,o.push(s)),function o(r){_e.each(r,function(r,a){_e.isFunction(a)?(!e.unique||!n.has(a))&&t.push(a):a&&a.length&&"string"!==_e.type(a)&&o(a)})}(arguments),s&&!i&&a()),this},remove:function(){return _e.each(arguments,function(e,o){for(var a;-1<(a=_e.inArray(o,t,a));)t.splice(a,1),a<=r&&r--}),this},has:function(e){return e?-1<_e.inArray(e,t):0<t.length},empty:function(){return t&&(t=[]),this},disable:function(){return p=o=[],t=s="",this},disabled:function(){return!t},lock:function(){return p=o=[],s||i||(t=s=""),this},locked:function(){return!!p},fireWith:function(e,t){return p||(t=t||[],t=[e,t.slice?t.slice():t],o.push(t),!i&&a()),this},fire:function(){return n.fireWith(this,arguments),this},fired:function(){return!!l}},i,s,l,p;return n},_e.extend({Deferred:function(t){var o=[["notify","progress",_e.Callbacks("memory"),_e.Callbacks("memory"),2],["resolve","done",_e.Callbacks("once memory"),_e.Callbacks("once memory"),0,"resolved"],["reject","fail",_e.Callbacks("once memory"),_e.Callbacks("once memory"),1,"rejected"]],r="pending",a={state:function(){return r},always:function(){return n.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var e=arguments;return _e.Deferred(function(t){_e.each(o,function(o,r){var a=_e.isFunction(e[r[4]])&&e[r[4]];n[r[1]](function(){var e=a&&a.apply(this,arguments);e&&_e.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,a?[e]:arguments)})}),e=null}).promise()},then:function(t,r,a){function n(t,o,r,a){return function(){var s=this,l=arguments,d=function(){var e,d;if(!(t<i)){if(e=r.apply(s,l),e===o.promise())throw new TypeError("Thenable self-resolution");d=e&&("object"==typeof e||"function"==typeof e)&&e.then,_e.isFunction(d)?a?d.call(e,n(i,o,p,a),n(i,o,c,a)):(i++,d.call(e,n(i,o,p,a),n(i,o,c,a),n(i,o,p,o.notifyWith))):(r!==p&&(s=void 0,l=[e]),(a||o.resolveWith)(s,l))}},u=a?d:function(){try{d()}catch(a){_e.Deferred.exceptionHook&&_e.Deferred.exceptionHook(a,u.stackTrace),t+1>=i&&(r!==c&&(s=void 0,l=[a]),o.rejectWith(s,l))}};t?u():(_e.Deferred.getStackHook&&(u.stackTrace=_e.Deferred.getStackHook()),e.setTimeout(u))}}var i=0;return _e.Deferred(function(e){o[0][3].add(n(0,e,_e.isFunction(a)?a:p,e.notifyWith)),o[1][3].add(n(0,e,_e.isFunction(t)?t:p)),o[2][3].add(n(0,e,_e.isFunction(r)?r:c))}).promise()},promise:function(e){return null==e?a:_e.extend(e,a)}},n={};return _e.each(o,function(e,t){var i=t[2],s=t[5];a[t[1]]=i.add,s&&i.add(function(){r=s},o[3-e][2].disable,o[0][2].lock),i.add(t[3].fire),n[t[0]]=function(){return n[t[0]+"With"](this===n?void 0:this,arguments),this},n[t[0]+"With"]=i.fireWith}),a.promise(n),t&&t.call(n,n),n},when:function(e){var t=arguments.length,o=t,r=Array(o),a=ie.call(arguments),n=_e.Deferred(),i=function(e){return function(o){r[e]=this,a[e]=1<arguments.length?ie.call(arguments):o,--t||n.resolveWith(r,a)}};if(1>=t&&(u(e,n.done(i(o)).resolve,n.reject,!t),"pending"===n.state()||_e.isFunction(a[o]&&a[o].then)))return n.then();for(;o--;)u(a[o],i(o),n.reject);return n.promise()}});var Me=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_e.Deferred.exceptionHook=function(t,o){e.console&&e.console.warn&&t&&Me.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,o)},_e.readyException=function(t){e.setTimeout(function(){throw t})};var Ne=_e.Deferred();_e.fn.ready=function(e){return Ne.then(e).catch(function(e){_e.readyException(e)}),this},_e.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?! --_e.readyWait:!_e.isReady)&&(_e.isReady=!0,!0!==e&&0<--_e.readyWait||Ne.resolveWith(ae,[_e]))}}),_e.ready.then=Ne.then,"complete"!==ae.readyState&&("loading"===ae.readyState||ae.documentElement.doScroll)?(ae.addEventListener("DOMContentLoaded",b),e.addEventListener("load",b)):e.setTimeout(_e.ready);var Ie=function(e,t,o,r,a,n,s){var l=0,i=e.length,d=null==o;if("object"===_e.type(o))for(l in a=!0,o)Ie(e,t,l,o[l],!0,n,s);else if(void 0!==r&&(a=!0,_e.isFunction(r)||(s=!0),d&&(s?(t.call(e,r),t=null):(d=t,t=function(e,t,o){return d.call(_e(e),o)})),t))for(;l<i;l++)t(e[l],o,s?r:r.call(e[l],l,t(e[l],o)));return a?e:d?t.call(e):i?t(e[0],o):n},Re=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};m.uid=1,m.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Re(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,o){var r=this.cache(e),a;if("string"==typeof t)r[_e.camelCase(t)]=o;else for(a in t)r[_e.camelCase(a)]=t[a];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][_e.camelCase(t)]},access:function(e,t,o){return void 0===t||t&&"string"==typeof t&&void 0===o?this.get(e,t):(this.set(e,t,o),void 0===o?t:o)},remove:function(e,t){var o=e[this.expando],r;if(void 0!==o){if(void 0!==t)for(Array.isArray(t)?t=t.map(_e.camelCase):(t=_e.camelCase(t),t=(t in o)?[t]:t.match(je)||[]),r=t.length;r--;)delete o[t[r]];(void 0===t||_e.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!_e.isEmptyObject(t)}};var ze=new m,Be=new m,Fe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ue=/[A-Z]/g;_e.extend({hasData:function(e){return Be.hasData(e)||ze.hasData(e)},data:function(e,t,o){return Be.access(e,t,o)},removeData:function(e,t){Be.remove(e,t)},_data:function(e,t,o){return ze.access(e,t,o)},_removeData:function(e,t){ze.remove(e,t)}}),_e.fn.extend({data:function(e,t){var o=this[0],r=o&&o.attributes,a,n,i;if(void 0===e){if(this.length&&(i=Be.get(o),1===o.nodeType&&!ze.get(o,"hasDataAttrs"))){for(a=r.length;a--;)r[a]&&(n=r[a].name,0===n.indexOf("data-")&&(n=_e.camelCase(n.slice(5)),f(o,n,i[n])));ze.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Be.set(this,e)}):Ie(this,function(t){var r;return o&&void 0===t?(r=Be.get(o,e),void 0!==r)?r:(r=f(o,e),void 0===r?void 0:r):void this.each(function(){Be.set(this,e,t)})},null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Be.remove(this,e)})}}),_e.extend({queue:function(e,t,o){var r;if(e)return t=(t||"fx")+"queue",r=ze.get(e,t),o&&(!r||Array.isArray(o)?r=ze.access(e,t,_e.makeArray(o)):r.push(o)),r||[]},dequeue:function(e,t){t=t||"fx";var o=_e.queue(e,t),r=o.length,a=o.shift(),n=_e._queueHooks(e,t);"inprogress"===a&&(a=o.shift(),r--),a&&("fx"===t&&o.unshift("inprogress"),delete n.stop,a.call(e,function(){_e.dequeue(e,t)},n)),!r&&n&&n.empty.fire()},_queueHooks:function(e,t){var o=t+"queueHooks";return ze.get(e,o)||ze.access(e,o,{empty:_e.Callbacks("once memory").add(function(){ze.remove(e,[t+"queue",o])})})}}),_e.fn.extend({queue:function(e,t){var o=2;return"string"!=typeof e&&(t=e,e="fx",o--),arguments.length<o?_e.queue(this[0],e):void 0===t?this:this.each(function(){var o=_e.queue(this,e,t);_e._queueHooks(this,e),"fx"===e&&"inprogress"!==o[0]&&_e.dequeue(this,e)})},dequeue:function(e){return this.each(function(){_e.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var o=1,r=_e.Deferred(),a=this,n=this.length,i=function(){--o||r.resolveWith(a,[a])},s;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";n--;)s=ze.get(a[n],e+"queueHooks"),s&&s.empty&&(o++,s.empty.add(i));return i(),r.promise(t)}});var Ve=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,We=new RegExp("^(?:([+-])=|)("+Ve+")([a-z%]*)$","i"),Ze=["Top","Right","Bottom","Left"],qe=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&_e.contains(e.ownerDocument,e)&&"none"===_e.css(e,"display")},He=function(e,t,o,r){var a={},n,i;for(i in t)a[i]=e.style[i],e.style[i]=t[i];for(i in n=o.apply(e,r||[]),t)e.style[i]=a[i];return n},Ge={};_e.fn.extend({show:function(){return h(this,!0)},hide:function(){return h(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){qe(this)?_e(this).show():_e(this).hide()})}});var Ye=/^(?:checkbox|radio)$/i,$e=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Je=/^$|\/(?:java|ecma)script/i,Xe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ke=/<|&#?\w+;/;(function(){var e=ae.createDocumentFragment(),t=e.appendChild(ae.createElement("div")),o=ae.createElement("input");o.setAttribute("type","radio"),o.setAttribute("checked","checked"),o.setAttribute("name","t"),t.appendChild(o),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue})();var Qe=ae.documentElement,et=/^key/,tt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ot=/^([^.]*)(?:\.(.+)|)/;_e.event={global:{},add:function(o,e,r,a,n){var i=ze.get(o),s,l,d,p,c,t,u,b,m,y,f;if(i)for(r.handler&&(s=r,r=s.handler,n=s.selector),n&&_e.find.matchesSelector(Qe,n),r.guid||(r.guid=_e.guid++),(p=i.events)||(p=i.events={}),(l=i.handle)||(l=i.handle=function(t){return"undefined"!=typeof _e&&_e.event.triggered!==t.type?_e.event.dispatch.apply(o,arguments):void 0}),e=(e||"").match(je)||[""],c=e.length;c--;)(d=ot.exec(e[c])||[],m=f=d[1],y=(d[2]||"").split(".").sort(),!!m)&&(u=_e.event.special[m]||{},m=(n?u.delegateType:u.bindType)||m,u=_e.event.special[m]||{},t=_e.extend({type:m,origType:f,data:a,handler:r,guid:r.guid,selector:n,needsContext:n&&_e.expr.match.needsContext.test(n),namespace:y.join(".")},s),(b=p[m])||(b=p[m]=[],b.delegateCount=0,(!u.setup||!1===u.setup.call(o,a,y,l))&&o.addEventListener&&o.addEventListener(m,l)),u.add&&(u.add.call(o,t),!t.handler.guid&&(t.handler.guid=r.guid)),n?b.splice(b.delegateCount++,0,t):b.push(t),_e.event.global[m]=!0)},remove:function(e,o,r,a,n){var i=ze.hasData(e)&&ze.get(e),s,l,d,p,c,t,u,b,m,y,f;if(i&&(p=i.events)){for(o=(o||"").match(je)||[""],c=o.length;c--;){if(d=ot.exec(o[c])||[],m=f=d[1],y=(d[2]||"").split(".").sort(),!m){for(m in p)_e.event.remove(e,m+o[c],r,a,!0);continue}for(u=_e.event.special[m]||{},m=(a?u.delegateType:u.bindType)||m,b=p[m]||[],d=d[2]&&new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=s=b.length;s--;)t=b[s],(n||f===t.origType)&&(!r||r.guid===t.guid)&&(!d||d.test(t.namespace))&&(!a||a===t.selector||"**"===a&&t.selector)&&(b.splice(s,1),t.selector&&b.delegateCount--,u.remove&&u.remove.call(e,t));l&&!b.length&&((!u.teardown||!1===u.teardown.call(e,y,i.handle))&&_e.removeEvent(e,m,i.handle),delete p[m])}_e.isEmptyObject(p)&&ze.remove(e,"handle events")}},dispatch:function(e){var t=_e.event.fix(e),o=Array(arguments.length),r=(ze.get(this,"events")||{})[t.type]||[],a=_e.event.special[t.type]||{},n,i,s,l,d,p;for(o[0]=t,n=1;n<arguments.length;n++)o[n]=arguments[n];if(t.delegateTarget=this,!(a.preDispatch&&!1===a.preDispatch.call(this,t))){for(p=_e.event.handlers.call(this,t,r),n=0;(l=p[n++])&&!t.isPropagationStopped();)for(t.currentTarget=l.elem,i=0;(d=l.handlers[i++])&&!t.isImmediatePropagationStopped();)(!t.rnamespace||t.rnamespace.test(d.namespace))&&(t.handleObj=d,t.data=d.data,s=((_e.event.special[d.origType]||{}).handle||d.handler).apply(l.elem,o),void 0!==s&&!1===(t.result=s)&&(t.preventDefault(),t.stopPropagation()));return a.postDispatch&&a.postDispatch.call(this,t),t.result}},handlers:function(e,t){var o=[],r=t.delegateCount,a=e.target,n,i,s,l,d;if(r&&a.nodeType&&!("click"===e.type&&1<=e.button))for(;a!==this;a=a.parentNode||this)if(1===a.nodeType&&("click"!==e.type||!0!==a.disabled)){for(l=[],d={},n=0;n<r;n++)i=t[n],s=i.selector+" ",void 0===d[s]&&(d[s]=i.needsContext?-1<_e(s,this).index(a):_e.find(s,this,null,[a]).length),d[s]&&l.push(i);l.length&&o.push({elem:a,handlers:l})}return a=this,r<t.length&&o.push({elem:a,handlers:t.slice(r)}),o},addProp:function(e,t){Object.defineProperty(_e.Event.prototype,e,{enumerable:!0,configurable:!0,get:_e.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[_e.expando]?e:new _e.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==T()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===T()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&s(this,"input"))return this.click(),!1},_default:function(e){return s(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},_e.removeEvent=function(e,t,o){e.removeEventListener&&e.removeEventListener(t,o)},_e.Event=function(e,t){return this instanceof _e.Event?void(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?O:w,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&_e.extend(this,t),this.timeStamp=e&&e.timeStamp||_e.now(),this[_e.expando]=!0):new _e.Event(e,t)},_e.Event.prototype={constructor:_e.Event,isDefaultPrevented:w,isPropagationStopped:w,isImmediatePropagationStopped:w,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=O,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=O,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=O,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},_e.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&et.test(e.type)?null==e.charCode?e.keyCode:e.charCode:!e.which&&void 0!==t&&tt.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},_e.event.addProp),_e.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){_e.event.special[e]={delegateType:t,bindType:t,handle:function(e){var o=this,r=e.relatedTarget,a=e.handleObj,n;return r&&(r===o||_e.contains(o,r))||(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),_e.fn.extend({on:function(e,t,o,r){return P(this,e,t,o,r)},one:function(e,t,o,r){return P(this,e,t,o,r,1)},off:function(e,t,o){var r,a;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,_e(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(a in e)this.off(a,t,e[a]);return this}return(!1===t||"function"==typeof t)&&(o=t,t=void 0),!1===o&&(o=w),this.each(function(){_e.event.remove(this,e,o,t)})}});var rt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,at=/<script|<style|<link/i,nt=/checked\s*(?:[^=]|=\s*.checked.)/i,it=/^true\/(.*)/,st=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;_e.extend({htmlPrefilter:function(e){return e.replace(rt,"<$1></$2>")},clone:function(e,t,o){var r=e.cloneNode(!0),a=_e.contains(e.ownerDocument,e),n,i,s,l;if(!ye.noCloneChecked&&(1===e.nodeType||11===e.nodeType)&&!_e.isXMLDoc(e))for(l=v(r),s=v(e),(n=0,i=s.length);n<i;n++)A(s[n],l[n]);if(t)if(o)for(s=s||v(e),l=l||v(r),(n=0,i=s.length);n<i;n++)D(s[n],l[n]);else D(e,r);return l=v(r,"script"),0<l.length&&x(l,!a&&v(e,"script")),r},cleanData:function(e){for(var t=_e.event.special,o=0,r,a,n;void 0!==(a=e[o]);o++)if(Re(a)){if(r=a[ze.expando]){if(r.events)for(n in r.events)t[n]?_e.event.remove(a,n):_e.removeEvent(a,n,r.handle);a[ze.expando]=void 0}a[Be.expando]&&(a[Be.expando]=void 0)}}}),_e.fn.extend({detach:function(e){return M(this,e,!0)},remove:function(e){return M(this,e)},text:function(e){return Ie(this,function(e){return void 0===e?_e.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return j(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=k(this,e);t.appendChild(e)}})},prepend:function(){return j(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=k(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return j(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return j(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e=0,t;null!=(t=this[e]);e++)1===t.nodeType&&(_e.cleanData(v(t,!1)),t.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return _e.clone(this,e,t)})},html:function(e){return Ie(this,function(e){var t=this[0]||{},o=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!at.test(e)&&!Xe[($e.exec(e)||["",""])[1].toLowerCase()]){e=_e.htmlPrefilter(e);try{for(;o<r;o++)t=this[o]||{},1===t.nodeType&&(_e.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(t){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return j(this,arguments,function(t){var o=this.parentNode;0>_e.inArray(this,e)&&(_e.cleanData(v(this)),o&&o.replaceChild(t,this))},e)}}),_e.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){_e.fn[e]=function(e){for(var o=[],r=_e(e),a=r.length-1,n=0,i;n<=a;n++)i=n==a?this:this.clone(!0),_e(r[n])[t](i),le.apply(o,i.get());return this.pushStack(o)}});var lt=/^margin/,dt=new RegExp("^("+Ve+")(?!px)[a-z%]+$","i"),pt=function(t){var o=t.ownerDocument.defaultView;return o&&o.opener||(o=e),o.getComputedStyle(t)};(function(){function t(){if(r){r.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",r.innerHTML="",Qe.appendChild(o);var t=e.getComputedStyle(r);a="1%"!==t.top,s="2px"===t.marginLeft,n="4px"===t.width,r.style.marginRight="50%",i="4px"===t.marginRight,Qe.removeChild(o),r=null}}var o=ae.createElement("div"),r=ae.createElement("div"),a,n,i,s;r.style&&(r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===r.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(r),_e.extend(ye,{pixelPosition:function(){return t(),a},boxSizingReliable:function(){return t(),n},pixelMarginRight:function(){return t(),i},reliableMarginLeft:function(){return t(),s}}))})();var ct=/^(none|table(?!-c[ea]).+)/,ut=/^--/,bt={position:"absolute",visibility:"hidden",display:"block"},mt={letterSpacing:"0",fontWeight:"400"},yt=["Webkit","Moz","ms"],ft=ae.createElement("div").style;_e.extend({cssHooks:{opacity:{get:function(e,t){if(t){var o=N(e,"opacity");return""===o?"1":o}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,o,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a=_e.camelCase(t),n=ut.test(t),i=e.style,s,l,d;if(n||(t=z(a)),d=_e.cssHooks[t]||_e.cssHooks[a],void 0!==o){if(l=typeof o,"string"===l&&(s=We.exec(o))&&s[1]&&(o=_(e,t,s),l="number"),null==o||o!==o)return;"number"===l&&(o+=s&&s[3]||(_e.cssNumber[a]?"":"px")),ye.clearCloneStyle||""!==o||0!==t.indexOf("background")||(i[t]="inherit"),d&&"set"in d&&void 0===(o=d.set(e,o,r))||(n?i.setProperty(t,o):i[t]=o)}else return d&&"get"in d&&void 0!==(s=d.get(e,!1,r))?s:i[t]}},css:function(e,t,o,r){var a=_e.camelCase(t),n=ut.test(t),i,s,l;return n||(t=z(a)),l=_e.cssHooks[t]||_e.cssHooks[a],l&&"get"in l&&(i=l.get(e,!0,o)),void 0===i&&(i=N(e,t,r)),"normal"===i&&t in mt&&(i=mt[t]),""===o||o?(s=parseFloat(i),!0===o||isFinite(s)?s||0:i):i}}),_e.each(["height","width"],function(e,t){_e.cssHooks[t]={get:function(e,o,r){if(o)return!ct.test(_e.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?U(e,t,r):He(e,bt,function(){return U(e,t,r)})},set:function(e,o,r){var a=r&&pt(e),n=r&&F(e,t,r,"border-box"===_e.css(e,"boxSizing",!1,a),a),i;return n&&(i=We.exec(o))&&"px"!==(i[3]||"px")&&(e.style[t]=o,o=_e.css(e,t)),B(e,o,n)}}}),_e.cssHooks.marginLeft=I(ye.reliableMarginLeft,function(e,t){if(t)return(parseFloat(N(e,"marginLeft"))||e.getBoundingClientRect().left-He(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),_e.each({margin:"",padding:"",border:"Width"},function(e,t){_e.cssHooks[e+t]={expand:function(o){for(var r=0,a={},n="string"==typeof o?o.split(" "):[o];4>r;r++)a[e+Ze[r]+t]=n[r]||n[r-2]||n[0];return a}},lt.test(e)||(_e.cssHooks[e+t].set=B)}),_e.fn.extend({css:function(e,t){return Ie(this,function(e,t,o){var r={},a=0,n,i;if(Array.isArray(t)){for(n=pt(e),i=t.length;a<i;a++)r[t[a]]=_e.css(e,t[a],!1,n);return r}return void 0===o?_e.css(e,t):_e.style(e,t,o)},e,t,1<arguments.length)}}),_e.Tween=V,V.prototype={constructor:V,init:function(e,t,o,r,a,n){this.elem=e,this.prop=o,this.easing=a||_e.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=n||(_e.cssNumber[o]?"":"px")},cur:function(){var e=V.propHooks[this.prop];return e&&e.get?e.get(this):V.propHooks._default.get(this)},run:function(e){var t=V.propHooks[this.prop],o;return this.pos=this.options.duration?o=_e.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):o=e,this.now=(this.end-this.start)*o+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):V.propHooks._default.set(this),this}},V.prototype.init.prototype=V.prototype,V.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=_e.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){_e.fx.step[e.prop]?_e.fx.step[e.prop](e):1===e.elem.nodeType&&(null!=e.elem.style[_e.cssProps[e.prop]]||_e.cssHooks[e.prop])?_e.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},V.propHooks.scrollTop=V.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},_e.easing={linear:function(e){return e},swing:function(e){return 0.5-Math.cos(e*Math.PI)/2},_default:"swing"},_e.fx=V.prototype.init,_e.fx.step={};var _t=/^(?:toggle|show|hide)$/,gt=/queueHooks$/,ht,vt;_e.Animation=_e.extend(Y,{tweeners:{"*":[function(e,t){var o=this.createTween(e,t);return _(o.elem,e,We.exec(t),o),o}]},tweener:function(e,t){_e.isFunction(e)?(t=e,e=["*"]):e=e.match(je);for(var o=0,r=e.length,a;o<r;o++)a=e[o],Y.tweeners[a]=Y.tweeners[a]||[],Y.tweeners[a].unshift(t)},prefilters:[function(e,t,o){var r=this,a={},n=e.style,i=e.nodeType&&qe(e),s=ze.get(e,"fxshow"),l,d,p,c,u,b,m,y;for(l in o.queue||(c=_e._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,u=c.empty.fire,c.empty.fire=function(){c.unqueued||u()}),c.unqueued++,r.always(function(){r.always(function(){c.unqueued--,_e.queue(e,"fx").length||c.empty.fire()})})),t)if(d=t[l],_t.test(d)){if(delete t[l],p=p||"toggle"===d,d===(i?"hide":"show"))if("show"===d&&s&&void 0!==s[l])i=!0;else continue;a[l]=s&&s[l]||_e.style(e,l)}if(b=!_e.isEmptyObject(t),b||!_e.isEmptyObject(a))for(l in("width"in t||"height"in t)&&1===e.nodeType&&(o.overflow=[n.overflow,n.overflowX,n.overflowY],m=s&&s.display,null==m&&(m=ze.get(e,"display")),y=_e.css(e,"display"),"none"===y&&(m?y=m:(h([e],!0),m=e.style.display||m,y=_e.css(e,"display"),h([e]))),("inline"===y||"inline-block"===y&&null!=m)&&"none"===_e.css(e,"float")&&(!b&&(r.done(function(){n.display=m}),null==m&&(y=n.display,m="none"===y?"":y)),n.display="inline-block")),o.overflow&&(n.overflow="hidden",r.always(function(){n.overflow=o.overflow[0],n.overflowX=o.overflow[1],n.overflowY=o.overflow[2]})),b=!1,a)b||(s?"hidden"in s&&(i=s.hidden):s=ze.access(e,"fxshow",{display:m}),p&&(s.hidden=!i),i&&h([e],!0),r.done(function(){for(l in i||h([e]),ze.remove(e,"fxshow"),a)_e.style(e,l,a[l])})),b=H(i?s[l]:0,l,r),l in s||(s[l]=b.start,i&&(b.end=b.start,b.start=0))}],prefilter:function(e,t){t?Y.prefilters.unshift(e):Y.prefilters.push(e)}}),_e.speed=function(e,t,o){var r=e&&"object"==typeof e?_e.extend({},e):{complete:o||!o&&t||_e.isFunction(e)&&e,duration:e,easing:o&&t||t&&!_e.isFunction(t)&&t};return _e.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in _e.fx.speeds?r.duration=_e.fx.speeds[r.duration]:r.duration=_e.fx.speeds._default),(null==r.queue||!0===r.queue)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){_e.isFunction(r.old)&&r.old.call(this),r.queue&&_e.dequeue(this,r.queue)},r},_e.fn.extend({fadeTo:function(e,t,o,r){return this.filter(qe).css("opacity",0).show().end().animate({opacity:t},e,o,r)},animate:function(e,t,o,r){var a=_e.isEmptyObject(e),n=_e.speed(t,o,r),i=function(){var t=Y(this,_e.extend({},e),n);(a||ze.get(this,"finish"))&&t.stop(!0)};return i.finish=i,a||!1===n.queue?this.each(i):this.queue(n.queue,i)},stop:function(e,t,o){var r=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof e&&(o=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,a=null!=e&&e+"queueHooks",n=_e.timers,i=ze.get(this);if(a)i[a]&&i[a].stop&&r(i[a]);else for(a in i)i[a]&&i[a].stop&&gt.test(a)&&r(i[a]);for(a=n.length;a--;)n[a].elem===this&&(null==e||n[a].queue===e)&&(n[a].anim.stop(o),t=!1,n.splice(a,1));(t||!o)&&_e.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t=ze.get(this),o=t[e+"queue"],r=t[e+"queueHooks"],a=_e.timers,n=o?o.length:0,i;for(t.finish=!0,_e.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),i=a.length;i--;)a[i].elem===this&&a[i].queue===e&&(a[i].anim.stop(!0),a.splice(i,1));for(i=0;i<n;i++)o[i]&&o[i].finish&&o[i].finish.call(this);delete t.finish})}}),_e.each(["toggle","show","hide"],function(e,t){var o=_e.fn[t];_e.fn[t]=function(e,r,a){return null==e||"boolean"==typeof e?o.apply(this,arguments):this.animate(q(t,!0),e,r,a)}}),_e.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){_e.fn[e]=function(e,o,r){return this.animate(t,e,o,r)}}),_e.timers=[],_e.fx.tick=function(){var e=0,t=_e.timers,o;for(ht=_e.now();e<t.length;e++)o=t[e],o()||t[e]!==o||t.splice(e--,1);t.length||_e.fx.stop(),ht=void 0},_e.fx.timer=function(e){_e.timers.push(e),_e.fx.start()},_e.fx.interval=13,_e.fx.start=function(){vt||(vt=!0,W())},_e.fx.stop=function(){vt=null},_e.fx.speeds={slow:600,fast:200,_default:400},_e.fn.delay=function(t,o){return t=_e.fx?_e.fx.speeds[t]||t:t,o=o||"fx",this.queue(o,function(o,r){var a=e.setTimeout(o,t);r.stop=function(){e.clearTimeout(a)}})},function(){var e=ae.createElement("input"),t=ae.createElement("select"),o=t.appendChild(ae.createElement("option"));e.type="checkbox",ye.checkOn=""!==e.value,ye.optSelected=o.selected,e=ae.createElement("input"),e.value="t",e.type="radio",ye.radioValue="t"===e.value}();var xt=_e.expr.attrHandle,St;_e.fn.extend({attr:function(e,t){return Ie(this,_e.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){_e.removeAttr(this,e)})}}),_e.extend({attr:function(e,t,o){var r=e.nodeType,a,n;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof e.getAttribute?_e.prop(e,t,o):(1===r&&_e.isXMLDoc(e)||(n=_e.attrHooks[t.toLowerCase()]||(_e.expr.match.bool.test(t)?St:void 0)),void 0!==o)?null===o?void _e.removeAttr(e,t):n&&"set"in n&&void 0!==(a=n.set(e,o,t))?a:(e.setAttribute(t,o+""),o):n&&"get"in n&&null!==(a=n.get(e,t))?a:(a=_e.find.attr(e,t),null==a?void 0:a)},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&s(e,"input")){var o=e.value;return e.setAttribute("type",t),o&&(e.value=o),t}}}},removeAttr:function(e,t){var o=0,r=t&&t.match(je),a;if(r&&1===e.nodeType)for(;a=r[o++];)e.removeAttribute(a)}}),St={set:function(e,t,o){return!1===t?_e.removeAttr(e,o):e.setAttribute(o,o),o}},_e.each(_e.expr.match.bool.source.match(/\w+/g),function(e,t){var o=xt[t]||_e.find.attr;xt[t]=function(e,t,r){var a=t.toLowerCase(),n,i;return r||(i=xt[a],xt[a]=n,n=null==o(e,t,r)?null:a,xt[a]=i),n}});var Ot=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;_e.fn.extend({prop:function(e,t){return Ie(this,_e.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[_e.propFix[e]||e]})}}),_e.extend({prop:function(e,t,o){var r=e.nodeType,a,n;if(3!==r&&8!==r&&2!==r)return 1===r&&_e.isXMLDoc(e)||(t=_e.propFix[t]||t,n=_e.propHooks[t]),void 0===o?n&&"get"in n&&null!==(a=n.get(e,t))?a:e[t]:n&&"set"in n&&void 0!==(a=n.set(e,o,t))?a:e[t]=o},propHooks:{tabIndex:{get:function(e){var t=_e.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ye.optSelected||(_e.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),_e.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_e.propFix[this.toLowerCase()]=this}),_e.fn.extend({addClass:function(e){var t=0,o,r,a,n,i,s,l;if(_e.isFunction(e))return this.each(function(t){_e(this).addClass(e.call(this,t,J(this)))});if("string"==typeof e&&e)for(o=e.match(je)||[];r=this[t++];)if(n=J(r),a=1===r.nodeType&&" "+$(n)+" ",a){for(s=0;i=o[s++];)0>a.indexOf(" "+i+" ")&&(a+=i+" ");l=$(a),n!==l&&r.setAttribute("class",l)}return this},removeClass:function(e){var t=0,o,r,a,n,i,s,l;if(_e.isFunction(e))return this.each(function(t){_e(this).removeClass(e.call(this,t,J(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(o=e.match(je)||[];r=this[t++];)if(n=J(r),a=1===r.nodeType&&" "+$(n)+" ",a){for(s=0;i=o[s++];)for(;-1<a.indexOf(" "+i+" ");)a=a.replace(" "+i+" "," ");l=$(a),n!==l&&r.setAttribute("class",l)}return this},toggleClass:function(e,t){var o=typeof e;return"boolean"==typeof t&&"string"==o?t?this.addClass(e):this.removeClass(e):_e.isFunction(e)?this.each(function(o){_e(this).toggleClass(e.call(this,o,J(this),t),t)}):this.each(function(){var t,r,a,n;if("string"==o)for(r=0,a=_e(this),n=e.match(je)||[];t=n[r++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else(void 0===e||"boolean"==o)&&(t=J(this),t&&ze.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":ze.get(this,"__className__")||""))})},hasClass:function(e){var t=0,o,r;for(o=" "+e+" ";r=this[t++];)if(1===r.nodeType&&-1<(" "+$(J(r))+" ").indexOf(o))return!0;return!1}});var Tt=/\r/g;_e.fn.extend({val:function(e){var t=this[0],o,r,a;return arguments.length?(a=_e.isFunction(e),this.each(function(t){var r;1!==this.nodeType||(r=a?e.call(this,t,_e(this).val()):e,null==r?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=_e.map(r,function(e){return null==e?"":e+""})),o=_e.valHooks[this.type]||_e.valHooks[this.nodeName.toLowerCase()],(!o||!("set"in o)||void 0===o.set(this,r,"value"))&&(this.value=r))})):t?(o=_e.valHooks[t.type]||_e.valHooks[t.nodeName.toLowerCase()],o&&"get"in o&&void 0!==(r=o.get(t,"value")))?r:(r=t.value,"string"==typeof r?r.replace(Tt,""):null==r?"":r):void 0}}),_e.extend({valHooks:{option:{get:function(e){var t=_e.find.attr(e,"value");return null==t?$(_e.text(e)):t}},select:{get:function(e){var t=e.options,o=e.selectedIndex,r="select-one"===e.type,a=r?null:[],n=r?o+1:t.length,l,d,p;for(p=0>o?n:r?o:0;p<n;p++)if(d=t[p],(d.selected||p===o)&&!d.disabled&&(!d.parentNode.disabled||!s(d.parentNode,"optgroup"))){if(l=_e(d).val(),r)return l;a.push(l)}return a},set:function(e,t){for(var o=e.options,r=_e.makeArray(t),a=o.length,n,i;a--;)i=o[a],(i.selected=-1<_e.inArray(_e.valHooks.option.get(i),r))&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),_e.each(["radio","checkbox"],function(){_e.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<_e.inArray(_e(e).val(),t)}},ye.checkOn||(_e.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Pt=/^(?:focusinfocus|focusoutblur)$/;_e.extend(_e.event,{trigger:function(t,o,r,a){var n=[r||ae],s=ue.call(t,"type")?t.type:t,l=ue.call(t,"namespace")?t.namespace.split("."):[],d,i,p,c,u,b,m;if((i=p=r=r||ae,3!==r.nodeType&&8!==r.nodeType)&&!Pt.test(s+_e.event.triggered)&&(-1<s.indexOf(".")&&(l=s.split("."),s=l.shift(),l.sort()),u=0>s.indexOf(":")&&"on"+s,t=t[_e.expando]?t:new _e.Event(s,"object"==typeof t&&t),t.isTrigger=a?2:3,t.namespace=l.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+l.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),o=null==o?[t]:_e.makeArray(o,[t]),m=_e.event.special[s]||{},a||!m.trigger||!1!==m.trigger.apply(r,o))){if(!a&&!m.noBubble&&!_e.isWindow(r)){for(c=m.delegateType||s,Pt.test(c+s)||(i=i.parentNode);i;i=i.parentNode)n.push(i),p=i;p===(r.ownerDocument||ae)&&n.push(p.defaultView||p.parentWindow||e)}for(d=0;(i=n[d++])&&!t.isPropagationStopped();)t.type=1<d?c:m.bindType||s,b=(ze.get(i,"events")||{})[t.type]&&ze.get(i,"handle"),b&&b.apply(i,o),b=u&&i[u],b&&b.apply&&Re(i)&&(t.result=b.apply(i,o),!1===t.result&&t.preventDefault());return t.type=s,a||t.isDefaultPrevented()||m._default&&!1!==m._default.apply(n.pop(),o)||!Re(r)||!u||!_e.isFunction(r[s])||_e.isWindow(r)||(p=r[u],p&&(r[u]=null),_e.event.triggered=s,r[s](),_e.event.triggered=void 0,p&&(r[u]=p)),t.result}},simulate:function(t,o,r){var a=_e.extend(new _e.Event,r,{type:t,isSimulated:!0});_e.event.trigger(a,null,o)}}),_e.fn.extend({trigger:function(e,t){return this.each(function(){_e.event.trigger(e,t,this)})},triggerHandler:function(e,t){var o=this[0];if(o)return _e.event.trigger(e,t,o,!0)}}),_e.each(["blur","focus","focusin","focusout","resize","scroll","click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","change","select","submit","keydown","keypress","keyup","contextmenu"],function(e,t){_e.fn[t]=function(e,o){return 0<arguments.length?this.on(t,null,e,o):this.trigger(t)}}),_e.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ye.focusin="onfocusin"in e,ye.focusin||_e.each({focus:"focusin",blur:"focusout"},function(e,t){var o=function(e){_e.event.simulate(t,e.target,_e.event.fix(e))};_e.event.special[t]={setup:function(){var r=this.ownerDocument||this,a=ze.access(r,t);a||r.addEventListener(e,o,!0),ze.access(r,t,(a||0)+1)},teardown:function(){var r=this.ownerDocument||this,a=ze.access(r,t)-1;a?ze.access(r,t,a):(r.removeEventListener(e,o,!0),ze.remove(r,t))}}});var kt=e.location,Ct=_e.now(),Lt=/\?/;_e.parseXML=function(t){var o;if(!t||"string"!=typeof t)return null;try{o=new e.DOMParser().parseFromString(t,"text/xml")}catch(t){o=void 0}return(!o||o.getElementsByTagName("parsererror").length)&&_e.error("Invalid XML: "+t),o};var Et=/\[\]$/,Dt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;_e.param=function(e,t){var o=[],r=function(e,t){var r=_e.isFunction(t)?t():t;o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==r?"":r)},a;if(Array.isArray(e)||e.jquery&&!_e.isPlainObject(e))_e.each(e,function(){r(this.name,this.value)});else for(a in e)X(a,e[a],t,r);return o.join("&")},_e.fn.extend({serialize:function(){return _e.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=_e.prop(this,"elements");return e?_e.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!_e(this).is(":disabled")&&jt.test(this.nodeName)&&!At.test(e)&&(this.checked||!Ye.test(e))}).map(function(e,t){var o=_e(this).val();return null==o?null:Array.isArray(o)?_e.map(o,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:o.replace(Dt,"\r\n")}}).get()}});var Mt=/%20/g,Nt=/#.*$/,It=/([?&])_=[^&]*/,Rt=/^(.*?):[ \t]*([^\r\n]*)$/mg,zt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Bt=/^(?:GET|HEAD)$/,Ft=/^\/\//,Ut={},Vt={},Wt="*/".concat("*"),Zt=ae.createElement("a");Zt.href=kt.href,_e.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:kt.href,type:"GET",isLocal:zt.test(kt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":_e.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ee(ee(e,_e.ajaxSettings),t):ee(_e.ajaxSettings,e)},ajaxPrefilter:K(Ut),ajaxTransport:K(Vt),ajax:function(t,o){function r(t,o,r,i){var c=o,u,b,g,v,O;x||(x=!0,h&&e.clearTimeout(h),y=void 0,_=i||"",m.readyState=0<t?4:0,u=200<=t&&300>t||304===t,r&&(v=te(a,m,r)),v=oe(a,v,m,u),u?(a.ifModified&&(O=m.getResponseHeader("Last-Modified"),O&&(_e.lastModified[f]=O),O=m.getResponseHeader("etag"),O&&(_e.etag[f]=O)),204===t||"HEAD"===a.type?c="nocontent":304===t?c="notmodified":(c=v.state,b=v.data,g=v.error,u=!g)):(g=c,(t||!c)&&(c="error",0>t&&(t=0))),m.status=t,m.statusText=(o||c)+"",u?l.resolveWith(n,[b,c,m]):l.rejectWith(n,[m,c,g]),m.statusCode(p),p=void 0,S&&s.trigger(u?"ajaxSuccess":"ajaxError",[m,a,u?b:g]),d.fireWith(n,[m,c]),S&&(s.trigger("ajaxComplete",[m,a]),! --_e.active&&_e.event.trigger("ajaxStop")))}"object"==typeof t&&(o=t,t=void 0),o=o||{};var a=_e.ajaxSetup({},o),n=a.context||a,s=a.context&&(n.nodeType||n.jquery)?_e(n):_e.event,l=_e.Deferred(),d=_e.Callbacks("once memory"),p=a.statusCode||{},c={},u={},b="canceled",m={readyState:0,getResponseHeader:function(e){var t;if(x){if(!g)for(g={};t=Rt.exec(_);)g[t[1].toLowerCase()]=t[2];t=g[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return x?_:null},setRequestHeader:function(e,t){return null==x&&(e=u[e.toLowerCase()]=u[e.toLowerCase()]||e,c[e]=t),this},overrideMimeType:function(e){return null==x&&(a.mimeType=e),this},statusCode:function(e){if(e)if(x)m.always(e[m.status]);else// Lazy-add the new callbacks in a way that preserves old ones
  for(var t in e)p[t]=[p[t],e[t]];return this},abort:function(e){var t=e||b;return y&&y.abort(t),r(0,t),this}},y,f,_,g,h,v,x,S,O,i;if(l.promise(m),a.url=((t||a.url||kt.href)+"").replace(Ft,kt.protocol+"//"),a.type=o.method||o.type||a.method||a.type,a.dataTypes=(a.dataType||"*").toLowerCase().match(je)||[""],null==a.crossDomain){v=ae.createElement("a");try{v.href=a.url,v.href=v.href,a.crossDomain=Zt.protocol+"//"+Zt.host!=v.protocol+"//"+v.host}catch(t){a.crossDomain=!0}}if(a.data&&a.processData&&"string"!=typeof a.data&&(a.data=_e.param(a.data,a.traditional)),Q(Ut,a,o,m),x)return m;for(O in S=_e.event&&a.global,S&&0==_e.active++&&_e.event.trigger("ajaxStart"),a.type=a.type.toUpperCase(),a.hasContent=!Bt.test(a.type),f=a.url.replace(Nt,""),a.hasContent?a.data&&a.processData&&0===(a.contentType||"").indexOf("application/x-www-form-urlencoded")&&(a.data=a.data.replace(Mt,"+")):(i=a.url.slice(f.length),a.data&&(f+=(Lt.test(f)?"&":"?")+a.data,delete a.data),!1===a.cache&&(f=f.replace(It,"$1"),i=(Lt.test(f)?"&":"?")+"_="+Ct++ +i),a.url=f+i),a.ifModified&&(_e.lastModified[f]&&m.setRequestHeader("If-Modified-Since",_e.lastModified[f]),_e.etag[f]&&m.setRequestHeader("If-None-Match",_e.etag[f])),(a.data&&a.hasContent&&!1!==a.contentType||o.contentType)&&m.setRequestHeader("Content-Type",a.contentType),m.setRequestHeader("Accept",a.dataTypes[0]&&a.accepts[a.dataTypes[0]]?a.accepts[a.dataTypes[0]]+("*"===a.dataTypes[0]?"":", "+Wt+"; q=0.01"):a.accepts["*"]),a.headers)m.setRequestHeader(O,a.headers[O]);if(a.beforeSend&&(!1===a.beforeSend.call(n,m,a)||x))return m.abort();if(b="abort",d.add(a.complete),m.done(a.success),m.fail(a.error),y=Q(Vt,a,o,m),!y)r(-1,"No Transport");else{if(m.readyState=1,S&&s.trigger("ajaxSend",[m,a]),x)return m;a.async&&0<a.timeout&&(h=e.setTimeout(function(){m.abort("timeout")},a.timeout));try{x=!1,y.send(c,r)}catch(t){if(x)throw t;r(-1,t)}}return m},getJSON:function(e,t,o){return _e.get(e,t,o,"json")},getScript:function(e,t){return _e.get(e,void 0,t,"script")}}),_e.each(["get","post"],function(e,t){_e[t]=function(e,o,r,a){return _e.isFunction(o)&&(a=a||r,r=o,o=void 0),_e.ajax(_e.extend({url:e,type:t,dataType:a,data:o,success:r},_e.isPlainObject(e)&&e))}}),_e._evalUrl=function(e){return _e.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},_e.fn.extend({wrapAll:function(e){var t;return this[0]&&(_e.isFunction(e)&&(e=e.call(this[0])),t=_e(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return _e.isFunction(e)?this.each(function(t){_e(this).wrapInner(e.call(this,t))}):this.each(function(){var t=_e(this),o=t.contents();o.length?o.wrapAll(e):t.append(e)})},wrap:function(e){var t=_e.isFunction(e);return this.each(function(o){_e(this).wrapAll(t?e.call(this,o):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){_e(this).replaceWith(this.childNodes)}),this}}),_e.expr.pseudos.hidden=function(e){return!_e.expr.pseudos.visible(e)},_e.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},_e.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var qt={0:200,1223:204},Ht=_e.ajaxSettings.xhr();ye.cors=!!Ht&&"withCredentials"in Ht,ye.ajax=Ht=!!Ht,_e.ajaxTransport(function(t){var o,r;if(ye.cors||Ht&&!t.crossDomain)return{send:function(a,n){var s=t.xhr(),l;if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(l in t.xhrFields)s[l]=t.xhrFields[l];for(l in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||a["X-Requested-With"]||(a["X-Requested-With"]="XMLHttpRequest"),a)s.setRequestHeader(l,a[l]);o=function(e){return function(){o&&(o=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"==typeof s.status?n(s.status,s.statusText):n(0,"error"):n(qt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=o(),r=s.onerror=o("error"),void 0===s.onabort?s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){o&&r()})}:s.onabort=r,o=o("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(o)throw t}},abort:function(){o&&o()}}}),_e.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),_e.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return _e.globalEval(e),e}}}),_e.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),_e.ajaxTransport("script",function(e){if(e.crossDomain){var t,o;return{send:function(r,a){t=_e("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",o=function(e){t.remove(),o=null,e&&a("error"===e.type?404:200,e.type)}),ae.head.appendChild(t[0])},abort:function(){o&&o()}}}});var Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;_e.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||_e.expando+"_"+Ct++;return this[e]=!0,e}}),_e.ajaxPrefilter("json jsonp",function(t,o,r){var a=!1!==t.jsonp&&(Yt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(t.data)&&"data"),n,i,s;if(a||"jsonp"===t.dataTypes[0])return n=t.jsonpCallback=_e.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Yt,"$1"+n):!1!==t.jsonp&&(t.url+=(Lt.test(t.url)?"&":"?")+t.jsonp+"="+n),t.converters["script json"]=function(){return s||_e.error(n+" was not called"),s[0]},t.dataTypes[0]="json",i=e[n],e[n]=function(){s=arguments},r.always(function(){void 0===i?_e(e).removeProp(n):e[n]=i,t[n]&&(t.jsonpCallback=o.jsonpCallback,Gt.push(n)),s&&_e.isFunction(i)&&i(s[0]),s=i=void 0}),"script"}),ye.createHTMLDocument=function(){var e=ae.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),_e.parseHTML=function(e,t,o){if("string"!=typeof e)return[];"boolean"==typeof t&&(o=t,t=!1);var r,a,n;return(t||(ye.createHTMLDocument?(t=ae.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=ae.location.href,t.head.appendChild(r)):t=ae),a=Pe.exec(e),n=!o&&[],a)?[t.createElement(a[1])]:(a=S([e],t,n),n&&n.length&&_e(n).remove(),_e.merge([],a.childNodes))},_e.fn.load=function(e,t,o){var r=this,a=e.indexOf(" "),n,i,s;return-1<a&&(n=$(e.slice(a)),e=e.slice(0,a)),_e.isFunction(t)?(o=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<r.length&&_e.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){s=arguments,r.html(n?_e("<div>").append(_e.parseHTML(e)).find(n):e)}).always(o&&function(e,t){r.each(function(){o.apply(this,s||[e.responseText,t,e])})}),this},_e.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){_e.fn[t]=function(e){return this.on(t,e)}}),_e.expr.pseudos.animated=function(e){return _e.grep(_e.timers,function(t){return e===t.elem}).length},_e.offset={setOffset:function(e,t,o){var r=_e.css(e,"position"),a=_e(e),n={},i,s,l,d,p,c,u;"static"===r&&(e.style.position="relative"),p=a.offset(),l=_e.css(e,"top"),c=_e.css(e,"left"),u=("absolute"===r||"fixed"===r)&&-1<(l+c).indexOf("auto"),u?(i=a.position(),d=i.top,s=i.left):(d=parseFloat(l)||0,s=parseFloat(c)||0),_e.isFunction(t)&&(t=t.call(e,o,_e.extend({},p))),null!=t.top&&(n.top=t.top-p.top+d),null!=t.left&&(n.left=t.left-p.left+s),"using"in t?t.using.call(e,n):a.css(n)}},_e.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){_e.offset.setOffset(this,e,t)});var t=this[0],o,r,a,n;if(t)return t.getClientRects().length?(a=t.getBoundingClientRect(),o=t.ownerDocument,r=o.documentElement,n=o.defaultView,{top:a.top+n.pageYOffset-r.clientTop,left:a.left+n.pageXOffset-r.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e=this[0],t={top:0,left:0},o,r;return"fixed"===_e.css(e,"position")?r=e.getBoundingClientRect():(o=this.offsetParent(),r=this.offset(),!s(o[0],"html")&&(t=o.offset()),t={top:t.top+_e.css(o[0],"borderTopWidth",!0),left:t.left+_e.css(o[0],"borderLeftWidth",!0)}),{top:r.top-t.top-_e.css(e,"marginTop",!0),left:r.left-t.left-_e.css(e,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===_e.css(e,"position");)e=e.offsetParent;return e||Qe})}}),_e.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var o="pageYOffset"===t;_e.fn[e]=function(r){return Ie(this,function(e,r,a){var n;return _e.isWindow(e)?n=e:9===e.nodeType&&(n=e.defaultView),void 0===a?n?n[t]:e[r]:void(n?n.scrollTo(o?n.pageXOffset:a,o?a:n.pageYOffset):e[r]=a)},e,r,arguments.length)}}),_e.each(["top","left"],function(e,t){_e.cssHooks[t]=I(ye.pixelPosition,function(e,o){if(o)return o=N(e,t),dt.test(o)?_e(e).position()[t]+"px":o})}),_e.each({Height:"height",Width:"width"},function(e,t){_e.each({padding:"inner"+e,content:t,"":"outer"+e},function(o,a){_e.fn[a]=function(n,i){var s=arguments.length&&(o||"boolean"!=typeof n),l=o||(!0===n||!0===i?"margin":"border");return Ie(this,function(t,o,n){var i;return _e.isWindow(t)?0===a.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,r(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===n?_e.css(t,o,l):_e.style(t,o,n,l)},t,s?n:void 0,s)}})}),_e.fn.extend({bind:function(e,t,o){return this.on(e,null,t,o)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,o,r){return this.on(t,e,o,r)},undelegate:function(e,t,o){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",o)}}),_e.holdReady=function(e){e?_e.readyWait++:_e.ready(!0)},_e.isArray=Array.isArray,_e.parseJSON=JSON.parse,_e.nodeName=s,"function"==typeof define&&define.amd&&define("jquery",[],function(){return _e});var $t=e.jQuery,Jt=e.$;return _e.noConflict=function(t){return e.$===_e&&(e.$=Jt),t&&e.jQuery===_e&&(e.jQuery=$t),_e},t||(e.jQuery=e.$=_e),_e})},{}],20:[function(e,t){var o=Math.atan,n=Math.PI,a=Math.round,s=Math.sin,r=Math.cos,l=Math.sqrt,i=Math.ceil,d=Math.LN2,p=Math.log,u=Math.abs,c=Math.min,b=Math.max,m=Math.floor,y=Math.exp,f=Math.pow;(function(_,g){var e=Math.acos,h={version:"1.0.3"};"object"==typeof t&&"object"==typeof t.exports?t.exports=h:"function"==typeof define&&define.amd&&define(h),"undefined"!=typeof _&&function(){var e=_.L;h.noConflict=function(){return _.L=e,this},_.L=h}(),h.Util={extend:function(e){var t,o,r,a;for(o=1,r=arguments.length;o<r;o++)for(t in a=arguments[o],a)e[t]=a[t];return e},create:Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),bind:function(e,t){var o=Array.prototype.slice;if(e.bind)return e.bind.apply(e,o.call(arguments,1));var r=o.call(arguments,2);return function(){return e.apply(t,r.length?r.concat(o.call(arguments)):arguments)}},stamp:function(e){return e._leaflet_id=e._leaflet_id||++h.Util.lastId,e._leaflet_id},lastId:0,throttle:function(e,t,o){var r,a,n,i;return i=function(){r=!1,a&&(n.apply(o,a),a=!1)},n=function(){r?a=arguments:(e.apply(o,arguments),setTimeout(i,t),r=!0)},n},wrapNum:function(e,t,o){var r=t[1],a=t[0],n=r-a;return e===r&&o?e:((e-a)%n+n)%n+a},falseFn:function(){return!1},formatNum:function(e,t){var o=f(10,t||5);return a(e*o)/o},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},splitWords:function(e){return h.Util.trim(e).split(/\s+/)},setOptions:function(e,t){for(var o in e.hasOwnProperty("options")||(e.options=e.options?h.Util.create(e.options):{}),t)e.options[o]=t[o];return e.options},getParamString:function(e,t,o){var r=[];for(var a in e)r.push(encodeURIComponent(o?a.toUpperCase():a)+"="+encodeURIComponent(e[a]));return(t&&-1!==t.indexOf("?")?"&":"?")+r.join("&")},template:function(e,t){return e.replace(h.Util.templateRe,function(e,o){var r=t[o];if(r===void 0)throw new Error("No value provided for variable "+e);else"function"==typeof r&&(r=r(t));return r})},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},indexOf:function(e,t){for(var o=0;o<e.length;o++)if(e[o]===t)return o;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){return _["webkit"+e]||_["moz"+e]||_["ms"+e]}function t(e){var t=+new Date,r=b(0,16-(t-o));return o=t+r,_.setTimeout(e,r)}var o=0,r=_.requestAnimationFrame||e("RequestAnimationFrame")||t,a=_.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){_.clearTimeout(e)};h.Util.requestAnimFrame=function(e,o,a){return a&&r===t?void e.call(o):r.call(_,h.bind(e,o))},h.Util.cancelAnimFrame=function(e){e&&a.call(_,e)}}(),h.extend=h.Util.extend,h.bind=h.Util.bind,h.stamp=h.Util.stamp,h.setOptions=h.Util.setOptions,h.Class=function(){},h.Class.extend=function(e){var t=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=t.__super__=this.prototype,r=h.Util.create(o);for(var a in r.constructor=t,t.prototype=r,this)this.hasOwnProperty(a)&&"prototype"!=a&&(t[a]=this[a]);return e.statics&&(h.extend(t,e.statics),delete e.statics),e.includes&&(h.Util.extend.apply(null,[r].concat(e.includes)),delete e.includes),r.options&&(e.options=h.Util.extend(h.Util.create(r.options),e.options)),h.extend(r,e),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=r._initHooks.length;e<t;e++)r._initHooks[e].call(this)}},t},h.Class.include=function(e){return h.extend(this.prototype,e),this},h.Class.mergeOptions=function(e){return h.extend(this.prototype.options,e),this},h.Class.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),o="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(o),this},h.Evented=h.Class.extend({on:function(e,t,o){if("object"==typeof e)for(var r in e)this._on(r,e[r],t);else{e=h.Util.splitWords(e);for(var a=0,n=e.length;a<n;a++)this._on(e[a],t,o)}return this},off:function(e,t,o){if(!e)delete this._events;else if("object"==typeof e)for(var r in e)this._off(r,e[r],t);else{e=h.Util.splitWords(e);for(var a=0,n=e.length;a<n;a++)this._off(e[a],t,o)}return this},_on:function(e,t,o){this._events=this._events||{};var r=this._events[e];r||(r=[],this._events[e]=r),o===this&&(o=void 0);for(var a={fn:t,ctx:o},n=r,s=0,i=n.length;s<i;s++)if(n[s].fn===t&&n[s].ctx===o)return;n.push(a)},_off:function(e,t,o){var r,a,n;if(this._events&&(r=this._events[e],!!r)){if(!t){for(a=0,n=r.length;a<n;a++)r[a].fn=h.Util.falseFn;return void delete this._events[e]}if(o===this&&(o=void 0),r)for(a=0,n=r.length;a<n;a++){var i=r[a];if(i.ctx===o&&i.fn===t)return i.fn=h.Util.falseFn,this._firingCount&&(this._events[e]=r=r.slice()),void r.splice(a,1)}}},fire:function(e,t,o){if(!this.listens(e,o))return this;var r=h.Util.extend({},t,{type:e,target:this});if(this._events){var a=this._events[e];if(a){this._firingCount=this._firingCount+1||1;for(var n=0,i=a.length,s;n<i;n++)s=a[n],s.fn.call(s.ctx||this,r);this._firingCount--}}return o&&this._propagateEvent(r),this},listens:function(e,t){var o=this._events&&this._events[e];if(o&&o.length)return!0;if(t)for(var r in this._eventParents)if(this._eventParents[r].listens(e,t))return!0;return!1},once:function(e,t,o){if("object"==typeof e){for(var r in e)this.once(r,e[r],t);return this}var a=h.bind(function(){this.off(e,t,o).off(e,a,o)},this);return this.on(e,t,o).on(e,a,o)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[h.stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[h.stamp(e)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,h.extend({layer:t.target},t),!0)}});var v=h.Evented.prototype;v.addEventListener=v.on,v.removeEventListener=v.clearAllEventListeners=v.off,v.addOneTimeEventListener=v.once,v.fireEvent=v.fire,v.hasEventListeners=v.listens,h.Mixin={Events:v},function(){var e=navigator.userAgent.toLowerCase(),t=g.documentElement,o="ActiveXObject"in _,r=-1!==e.indexOf("webkit"),a=-1!==e.indexOf("phantom"),n=-1!==e.search("android [23]"),i=-1!==e.indexOf("chrome"),s=-1!==e.indexOf("gecko")&&!r&&!_.opera&&!o,l=0===navigator.platform.indexOf("Win"),d="undefined"!=typeof orientation||-1!==e.indexOf("mobile"),p=!_.PointerEvent&&_.MSPointerEvent,c=_.PointerEvent||p,u=o&&"transition"in t.style,b="WebKitCSSMatrix"in _&&"m11"in new _.WebKitCSSMatrix&&!n,m="MozPerspective"in t.style,y="OTransition"in t.style,f=!_.L_NO_TOUCH&&(c||"ontouchstart"in _||_.DocumentTouch&&g instanceof _.DocumentTouch);h.Browser={ie:o,ielt9:o&&!g.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in g),webkit:r,gecko:s,android:-1!==e.indexOf("android"),android23:n,chrome:i,safari:!i&&-1!==e.indexOf("safari"),win:l,ie3d:u,webkit3d:b,gecko3d:m,opera12:y,any3d:!_.L_DISABLE_3D&&(u||b||m)&&!y&&!a,mobile:d,mobileWebkit:d&&r,mobileWebkit3d:d&&b,mobileOpera:d&&_.opera,mobileGecko:d&&s,touch:!!f,msPointer:!!p,pointer:!!c,retina:1<(_.devicePixelRatio||_.screen.deviceXDPI/_.screen.logicalXDPI)}}(),h.Point=function(e,t,o){this.x=o?a(e):e,this.y=o?a(t):t},h.Point.prototype={clone:function(){return new h.Point(this.x,this.y)},add:function(e){return this.clone()._add(h.point(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(h.point(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new h.Point(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new h.Point(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=a(this.x),this.y=a(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=m(this.x),this.y=m(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=i(this.x),this.y=i(this.y),this},distanceTo:function(e){e=h.point(e);var t=e.x-this.x,o=e.y-this.y;return l(t*t+o*o)},equals:function(e){return e=h.point(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=h.point(e),u(e.x)<=u(this.x)&&u(e.y)<=u(this.y)},toString:function(){return"Point("+h.Util.formatNum(this.x)+", "+h.Util.formatNum(this.y)+")"}},h.point=function(e,t,o){return e instanceof h.Point?e:h.Util.isArray(e)?new h.Point(e[0],e[1]):void 0===e||null===e?e:"object"==typeof e&&"x"in e&&"y"in e?new h.Point(e.x,e.y):new h.Point(e,t,o)},h.Bounds=function(e,t){if(e)for(var o=t?[e,t]:e,r=0,a=o.length;r<a;r++)this.extend(o[r])},h.Bounds.prototype={extend:function(e){return e=h.point(e),this.min||this.max?(this.min.x=c(e.x,this.min.x),this.max.x=b(e.x,this.max.x),this.min.y=c(e.y,this.min.y),this.max.y=b(e.y,this.max.y)):(this.min=e.clone(),this.max=e.clone()),this},getCenter:function(e){return new h.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return new h.Point(this.min.x,this.max.y)},getTopRight:function(){return new h.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,o;return e="number"==typeof e[0]||e instanceof h.Point?h.point(e):h.bounds(e),e instanceof h.Bounds?(t=e.min,o=e.max):t=o=e,t.x>=this.min.x&&o.x<=this.max.x&&t.y>=this.min.y&&o.y<=this.max.y},intersects:function(e){e=h.bounds(e);var t=this.min,o=this.max,r=e.min,a=e.max,n=a.x>=t.x&&r.x<=o.x,i=a.y>=t.y&&r.y<=o.y;return n&&i},overlaps:function(e){e=h.bounds(e);var t=this.min,o=this.max,r=e.min,a=e.max,n=a.x>t.x&&r.x<o.x,i=a.y>t.y&&r.y<o.y;return n&&i},isValid:function(){return!!(this.min&&this.max)}},h.bounds=function(e,t){return!e||e instanceof h.Bounds?e:new h.Bounds(e,t)},h.Transformation=function(e,t,o,r){this._a=e,this._b=t,this._c=o,this._d=r},h.Transformation.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new h.Point((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}},h.DomUtil={get:function(e){return"string"==typeof e?g.getElementById(e):e},getStyle:function(e,t){var o=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!o||"auto"===o)&&g.defaultView){var r=g.defaultView.getComputedStyle(e,null);o=r?r[t]:null}return"auto"===o?null:o},create:function(e,t,o){var r=g.createElement(e);return r.className=t||"",o&&o.appendChild(r),r},remove:function(e){var t=e.parentNode;t&&t.removeChild(e)},empty:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},toFront:function(e){e.parentNode.appendChild(e)},toBack:function(e){var t=e.parentNode;t.insertBefore(e,t.firstChild)},hasClass:function(e,t){if(e.classList!==void 0)return e.classList.contains(t);var o=h.DomUtil.getClass(e);return 0<o.length&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(o)},addClass:function(e,t){if(e.classList!==void 0)for(var o=h.Util.splitWords(t),r=0,a=o.length;r<a;r++)e.classList.add(o[r]);else if(!h.DomUtil.hasClass(e,t)){var n=h.DomUtil.getClass(e);h.DomUtil.setClass(e,(n?n+" ":"")+t)}},removeClass:function(e,t){e.classList===void 0?h.DomUtil.setClass(e,h.Util.trim((" "+h.DomUtil.getClass(e)+" ").replace(" "+t+" "," "))):e.classList.remove(t)},setClass:function(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t},getClass:function(e){return e.className.baseVal===void 0?e.className:e.className.baseVal},setOpacity:function(e,t){"opacity"in e.style?e.style.opacity=t:"filter"in e.style&&h.DomUtil._setOpacityIE(e,t)},_setOpacityIE:function(e,t){var o=!1,r="DXImageTransform.Microsoft.Alpha";try{o=e.filters.item(r)}catch(o){if(1===t)return}t=a(100*t),o?(o.Enabled=100!==t,o.Opacity=t):e.style.filter+=" progid:"+r+"(opacity="+t+")"},testProp:function(e){for(var t=g.documentElement.style,o=0;o<e.length;o++)if(e[o]in t)return e[o];return!1},setTransform:function(e,t,o){var r=t||new h.Point(0,0);e.style[h.DomUtil.TRANSFORM]=(h.Browser.ie3d?"translate("+r.x+"px,"+r.y+"px)":"translate3d("+r.x+"px,"+r.y+"px,0)")+(o?" scale("+o+")":"")},setPosition:function(e,t){e._leaflet_pos=t,h.Browser.any3d?h.DomUtil.setTransform(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")},getPosition:function(e){return e._leaflet_pos||new h.Point(0,0)}},function(){h.DomUtil.TRANSFORM=h.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]);var e=h.DomUtil.TRANSITION=h.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);if(h.DomUtil.TRANSITION_END="webkitTransition"===e||"OTransition"===e?e+"End":"transitionend","onselectstart"in g)h.DomUtil.disableTextSelection=function(){h.DomEvent.on(_,"selectstart",h.DomEvent.preventDefault)},h.DomUtil.enableTextSelection=function(){h.DomEvent.off(_,"selectstart",h.DomEvent.preventDefault)};else{var t=h.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);h.DomUtil.disableTextSelection=function(){if(t){var e=g.documentElement.style;this._userSelect=e[t],e[t]="none"}},h.DomUtil.enableTextSelection=function(){t&&(g.documentElement.style[t]=this._userSelect,delete this._userSelect)}}h.DomUtil.disableImageDrag=function(){h.DomEvent.on(_,"dragstart",h.DomEvent.preventDefault)},h.DomUtil.enableImageDrag=function(){h.DomEvent.off(_,"dragstart",h.DomEvent.preventDefault)},h.DomUtil.preventOutline=function(e){for(;-1===e.tabIndex;)e=e.parentNode;e&&e.style&&(h.DomUtil.restoreOutline(),this._outlineElement=e,this._outlineStyle=e.style.outline,e.style.outline="none",h.DomEvent.on(_,"keydown",h.DomUtil.restoreOutline,this))},h.DomUtil.restoreOutline=function(){this._outlineElement&&(this._outlineElement.style.outline=this._outlineStyle,delete this._outlineElement,delete this._outlineStyle,h.DomEvent.off(_,"keydown",h.DomUtil.restoreOutline,this))}}(),h.LatLng=function(e,t,o){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,o!==void 0&&(this.alt=+o)},h.LatLng.prototype={equals:function(e,t){if(!e)return!1;e=h.latLng(e);var o=b(u(this.lat-e.lat),u(this.lng-e.lng));return o<=(t===void 0?1e-9:t)},toString:function(e){return"LatLng("+h.Util.formatNum(this.lat,e)+", "+h.Util.formatNum(this.lng,e)+")"},distanceTo:function(e){return h.CRS.Earth.distance(this,h.latLng(e))},wrap:function(){return h.CRS.Earth.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,o=t/r(n/180*this.lat);return h.latLngBounds([this.lat-t,this.lng-o],[this.lat+t,this.lng+o])},clone:function(){return new h.LatLng(this.lat,this.lng,this.alt)}},h.latLng=function(e,t,o){return e instanceof h.LatLng?e:h.Util.isArray(e)&&"object"!=typeof e[0]?3===e.length?new h.LatLng(e[0],e[1],e[2]):2===e.length?new h.LatLng(e[0],e[1]):null:void 0===e||null===e?e:"object"==typeof e&&"lat"in e?new h.LatLng(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new h.LatLng(e,t,o)},h.LatLngBounds=function(e,t){if(e)for(var o=t?[e,t]:e,r=0,a=o.length;r<a;r++)this.extend(o[r])},h.LatLngBounds.prototype={extend:function(e){var t=this._southWest,o=this._northEast,r,a;if(e instanceof h.LatLng)r=e,a=e;else{if(!(e instanceof h.LatLngBounds))return e?this.extend(h.latLng(e)||h.latLngBounds(e)):this;if(r=e._southWest,a=e._northEast,!r||!a)return this}return t||o?(t.lat=c(r.lat,t.lat),t.lng=c(r.lng,t.lng),o.lat=b(a.lat,o.lat),o.lng=b(a.lng,o.lng)):(this._southWest=new h.LatLng(r.lat,r.lng),this._northEast=new h.LatLng(a.lat,a.lng)),this},pad:function(e){var t=this._southWest,o=this._northEast,r=u(t.lat-o.lat)*e,a=u(t.lng-o.lng)*e;return new h.LatLngBounds(new h.LatLng(t.lat-r,t.lng-a),new h.LatLng(o.lat+r,o.lng+a))},getCenter:function(){return new h.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new h.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new h.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e="number"==typeof e[0]||e instanceof h.LatLng||"lat"in e?h.latLng(e):h.latLngBounds(e);var t=this._southWest,o=this._northEast,r,a;return e instanceof h.LatLngBounds?(r=e.getSouthWest(),a=e.getNorthEast()):r=a=e,r.lat>=t.lat&&a.lat<=o.lat&&r.lng>=t.lng&&a.lng<=o.lng},intersects:function(e){e=h.latLngBounds(e);var t=this._southWest,o=this._northEast,r=e.getSouthWest(),a=e.getNorthEast(),n=a.lat>=t.lat&&r.lat<=o.lat,i=a.lng>=t.lng&&r.lng<=o.lng;return n&&i},overlaps:function(e){e=h.latLngBounds(e);var t=this._southWest,o=this._northEast,r=e.getSouthWest(),a=e.getNorthEast(),n=a.lat>t.lat&&r.lat<o.lat,i=a.lng>t.lng&&r.lng<o.lng;return n&&i},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e){return!!e&&(e=h.latLngBounds(e),this._southWest.equals(e.getSouthWest())&&this._northEast.equals(e.getNorthEast()))},isValid:function(){return!!(this._southWest&&this._northEast)}},h.latLngBounds=function(e,t){return e instanceof h.LatLngBounds?e:new h.LatLngBounds(e,t)},h.Projection={},h.Projection.LonLat={project:function(e){return new h.Point(e.lng,e.lat)},unproject:function(e){return new h.LatLng(e.y,e.x)},bounds:h.bounds([-180,-90],[180,90])},h.Projection.SphericalMercator={R:6378137,MAX_LATITUDE:85.0511287798,project:function(e){var t=n/180,o=this.MAX_LATITUDE,r=b(c(o,e.lat),-o),a=s(r*t);return new h.Point(this.R*e.lng*t,this.R*p((1+a)/(1-a))/2)},unproject:function(e){var t=180/n;return new h.LatLng((2*o(y(e.y/this.R))-n/2)*t,e.x*t/this.R)},bounds:function(){var e=6378137*n;return h.bounds([-e,-e],[e,e])}()},h.CRS={latLngToPoint:function(e,t){var o=this.projection.project(e),r=this.scale(t);return this.transformation._transform(o,r)},pointToLatLng:function(e,t){var o=this.scale(t),r=this.transformation.untransform(e,o);return this.projection.unproject(r)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*f(2,e)},zoom:function(e){return p(e/256)/d},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,o=this.scale(e),r=this.transformation.transform(t.min,o),a=this.transformation.transform(t.max,o);return h.bounds(r,a)},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?h.Util.wrapNum(e.lng,this.wrapLng,!0):e.lng,o=this.wrapLat?h.Util.wrapNum(e.lat,this.wrapLat,!0):e.lat,r=e.alt;return h.latLng(o,t,r)},wrapLatLngBounds:function(e){var t=e.getCenter(),o=this.wrapLatLng(t),r=t.lat-o.lat,a=t.lng-o.lng;if(0==r&&0==a)return e;var n=e.getSouthWest(),i=e.getNorthEast(),s=h.latLng({lat:n.lat-r,lng:n.lng-a}),l=h.latLng({lat:i.lat-r,lng:i.lng-a});return new h.LatLngBounds(s,l)}},h.CRS.Simple=h.extend({},h.CRS,{projection:h.Projection.LonLat,transformation:new h.Transformation(1,0,-1,0),scale:function(e){return f(2,e)},zoom:function(e){return p(e)/d},distance:function(e,t){var o=t.lng-e.lng,r=t.lat-e.lat;return l(o*o+r*r)},infinite:!0}),h.CRS.Earth=h.extend({},h.CRS,{wrapLng:[-180,180],R:6371000,distance:function(t,o){var i=n/180,l=t.lat*i,d=o.lat*i,p=s(l)*s(d)+r(l)*r(d)*r((o.lng-t.lng)*i);return this.R*e(c(p,1))}}),h.CRS.EPSG3857=h.extend({},h.CRS.Earth,{code:"EPSG:3857",projection:h.Projection.SphericalMercator,transformation:function(){var e=0.5/(n*h.Projection.SphericalMercator.R);return new h.Transformation(e,0.5,-e,0.5)}()}),h.CRS.EPSG900913=h.extend({},h.CRS.EPSG3857,{code:"EPSG:900913"}),h.CRS.EPSG4326=h.extend({},h.CRS.Earth,{code:"EPSG:4326",projection:h.Projection.LonLat,transformation:new h.Transformation(1/180,1,-1/180,0.5)}),h.Map=h.Evented.extend({options:{crs:h.CRS.EPSG3857,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,t){t=h.setOptions(this,t),this._initContainer(e),this._initLayout(),this._onResize=h.bind(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.zoom!==void 0&&(this._zoom=this._limitZoom(t.zoom)),t.center&&t.zoom!==void 0&&this.setView(h.latLng(t.center),t.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=h.DomUtil.TRANSITION&&h.Browser.any3d&&!h.Browser.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),h.DomEvent.on(this._proxy,h.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,o){if(t=void 0===t?this._zoom:this._limitZoom(t),e=this._limitCenter(h.latLng(e),t,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&!0!==o){void 0!==o.animate&&(o.zoom=h.extend({animate:o.animate},o.zoom),o.pan=h.extend({animate:o.animate,duration:o.duration},o.pan));var r=this._zoom===t?this._tryAnimatedPan(e,o.pan):this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,o.zoom);if(r)return clearTimeout(this._sizeTimer),this}return this._resetView(e,t),this},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(h.Browser.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(h.Browser.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,o){var r=this.getZoomScale(t),a=this.getSize().divideBy(2),n=e instanceof h.Point?e:this.latLngToContainerPoint(e),i=n.subtract(a).multiplyBy(1-1/r),s=this.containerPointToLatLng(a.add(i));return this.setView(s,t,{zoom:o})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():h.latLngBounds(e);var o=h.point(t.paddingTopLeft||t.padding||[0,0]),r=h.point(t.paddingBottomRight||t.padding||[0,0]),a=this.getBoundsZoom(e,!1,o.add(r));a="number"==typeof t.maxZoom?c(t.maxZoom,a):a;var n=r.subtract(o).divideBy(2),i=this.project(e.getSouthWest(),a),s=this.project(e.getNorthEast(),a),l=this.unproject(i.add(s).divideBy(2).add(n),a);return{center:l,zoom:a}},fitBounds:function(e,t){if(e=h.latLngBounds(e),!e.isValid())throw new Error("Bounds are not valid.");var o=this._getBoundsCenterZoom(e,t);return this.setView(o.center,o.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(e=h.point(e).round(),t=t||{},!e.x&&!e.y)return this.fire("moveend");if(!0!==t.animate&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new h.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){h.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var o=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,o,t.duration||0.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,o,t){function a(e){var t=e?-1:1,o=e?O:x,r=(O*O-x*x+t*P*P*w*w)/(2*o*P*w),a=l(r*r+1)-r,n=1e-9>a?-18:p(a);return n}function r(e){return(y(e)-y(-e))/2}function i(e){return(y(e)+y(-e))/2}function n(e){return r(e)/i(e)}function d(e){return x*(i(k)/i(k+T*e))}function c(e){return x*(i(k)*n(k+T*e)-r(k))/P}function u(e){return 1-f(1-e,1.5)}function m(){var r=(Date.now()-C)/S,t=u(r)*E;1>=r?(this._flyToFrame=h.Util.requestAnimFrame(m,this),this._move(this.unproject(_.add(g.subtract(_).multiplyBy(c(t)/w)),v),this.getScaleZoom(x/d(t),v),{flyTo:!0})):this._move(e,o)._moveEnd(!0)}if(t=t||{},!1===t.animate||!h.Browser.any3d)return this.setView(e,o,t);this._stop();var _=this.project(this.getCenter()),g=this.project(e),s=this.getSize(),v=this._zoom;e=h.latLng(e),o=void 0===o?v:o;var x=b(s.x,s.y),O=x*this.getZoomScale(v,o),w=g.distanceTo(_)||1,T=1.42,P=T*T,k=a(0),C=Date.now(),E=(a(1)-k)/T,S=t.duration?1e3*t.duration:0.8*(1e3*E);return this._moveStart(!0),m.call(this),this},flyToBounds:function(e,t){var o=this._getBoundsCenterZoom(e,t);return this.flyTo(o.center,o.zoom,t)},setMaxBounds:function(e){return(e=h.latLngBounds(e),!e.isValid())?(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds)):(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds))},setMinZoom:function(e){return this.options.minZoom=e,this._loaded&&this.getZoom()<this.options.minZoom?this.setZoom(e):this},setMaxZoom:function(e){return this.options.maxZoom=e,this._loaded&&this.getZoom()>this.options.maxZoom?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var o=this.getCenter(),r=this._limitCenter(o,this._zoom,h.latLngBounds(e));return o.equals(r)||this.panTo(r,t),this._enforcingBounds=!1,this},invalidateSize:function(e){if(!this._loaded)return this;e=h.extend({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),r=t.divideBy(2).round(),a=o.divideBy(2).round(),n=r.subtract(a);return n.x||n.y?(e.animate&&e.pan?this.panBy(n):(e.pan&&this._rawPanBy(n),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(h.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=h.extend({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=h.bind(this._handleGeolocationResponse,this),o=h.bind(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,o,e):navigator.geolocation.getCurrentPosition(t,o,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){var t=e.code,o=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+o+"."})},_handleGeolocationResponse:function(e){var t=e.coords.latitude,o=e.coords.longitude,r=new h.LatLng(t,o),a=r.toBounds(e.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(a);this.setView(r,n.maxZoom?c(s,n.maxZoom):s)}var l={latlng:r,bounds:a,timestamp:e.timestamp};for(var d in e.coords)"number"==typeof e.coords[d]&&(l[d]=e.coords[d]);this.fire("locationfound",l)},addHandler:function(e,t){if(!t)return this;var o=this[e]=new t(this);return this._handlers.push(o),this.options[e]&&o.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var e in h.DomUtil.remove(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();return this},createPane:function(e,t){var o="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),r=h.DomUtil.create("div",o,t||this._mapPane);return e&&(this._panes[e]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),o=this.unproject(e.getTopRight());return new h.LatLngBounds(t,o)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?Infinity:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,o){e=h.latLngBounds(e),o=h.point(o||[0,0]);var r=this.getZoom()||0,n=this.getMinZoom(),s=this.getMaxZoom(),l=e.getNorthWest(),d=e.getSouthEast(),p=this.getSize().subtract(o),u=h.bounds(this.project(d,r),this.project(l,r)).getSize(),y=h.Browser.any3d?this.options.zoomSnap:1,f=c(p.x/u.x,p.y/u.y);return r=this.getScaleZoom(f,r),y&&(r=a(r/(y/100))*(y/100),r=t?i(r/y)*y:m(r/y)*y),b(n,c(s,r))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new h.Point(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var o=this._getTopLeftPoint(e,t);return new h.Bounds(o,o.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var o=this.options.crs;return t=void 0===t?this._zoom:t,o.scale(e)/o.scale(t)},getScaleZoom:function(e,t){var o=this.options.crs;t=t===void 0?this._zoom:t;var r=o.zoom(e*o.scale(t));return isNaN(r)?Infinity:r},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(h.latLng(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(h.point(e),t)},layerPointToLatLng:function(e){var t=h.point(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){var t=this.project(h.latLng(e))._round();return t._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(h.latLng(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(h.latLngBounds(e))},distance:function(e,t){return this.options.crs.distance(h.latLng(e),h.latLng(t))},containerPointToLayerPoint:function(e){return h.point(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return h.point(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(h.point(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(h.latLng(e)))},mouseEventToContainerPoint:function(t){return h.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(e){var t=this._container=h.DomUtil.get(e);if(!t)throw new Error("Map container not found.");else if(t._leaflet_id)throw new Error("Map container is already initialized.");h.DomEvent.addListener(t,"scroll",this._onScroll,this),this._containerId=h.Util.stamp(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&h.Browser.any3d,h.DomUtil.addClass(e,"leaflet-container"+(h.Browser.touch?" leaflet-touch":"")+(h.Browser.retina?" leaflet-retina":"")+(h.Browser.ielt9?" leaflet-oldie":"")+(h.Browser.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=h.DomUtil.getStyle(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),h.DomUtil.setPosition(this._mapPane,new h.Point(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(h.DomUtil.addClass(e.markerPane,"leaflet-zoom-hide"),h.DomUtil.addClass(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t){h.DomUtil.setPosition(this._mapPane,new h.Point(0,0));var o=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var r=this._zoom!==t;this._moveStart(r)._move(e,t)._moveEnd(r),this.fire("viewreset"),o&&this.fire("load")},_moveStart:function(e){return e&&this.fire("zoomstart"),this.fire("movestart")},_move:function(e,t,o){void 0===t&&(t=this._zoom);var r=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),(r||o&&o.pinch)&&this.fire("zoom",o),this.fire("move",o)},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return h.Util.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){h.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(h.DomEvent){this._targets={},this._targets[h.stamp(this._container)]=this;var t=e?"off":"on";h.DomEvent[t](this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&h.DomEvent[t](_,"resize",this._onResize,this),h.Browser.any3d&&this.options.transform3DLimit&&this[t]("moveend",this._onMoveEnd)}},_onResize:function(){h.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=h.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();b(u(e.x),u(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var o=[],r="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,n=!1,i;a;){if(i=this._targets[h.stamp(a)],i&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){n=!0;break}if(i&&i.listens(e,!0)){if(r&&!h.DomEvent._isExternalTarget(a,t))break;if(o.push(i),r)break}if(a===this._container)break;a=a.parentNode}return o.length||n||r||!h.DomEvent._isExternalTarget(a,t)||(o=[this]),o},_handleDOMEvent:function(t){if(this._loaded&&!h.DomEvent._skipped(t)){var e="keypress"===t.type&&13===t.keyCode?"click":t.type;"mousedown"===e&&h.DomUtil.preventOutline(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_fireDOMEvent:function(t,o,r){if("click"===t.type){var a=h.Util.extend({},t);a.type="preclick",this._fireDOMEvent(a,a.type,r)}if(!t._stopped&&(r=(r||[]).concat(this._findEventTargets(t,o)),!!r.length)){var n=r[0];"contextmenu"===o&&n.listens(o,!0)&&h.DomEvent.preventDefault(t);var s={originalEvent:t};if("keypress"!==t.type){var l=n instanceof h.Marker;s.containerPoint=l?this.latLngToContainerPoint(n.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=l?n.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var d=0;d<r.length;d++)if(r[d].fire(o,s,!0),s.originalEvent._stopped||r[d].options.nonBubblingEvents&&-1!==h.Util.indexOf(r[d].options.nonBubblingEvents,o))return}},_draggableMoved:function(e){return e=e.dragging&&e.dragging.enabled()?e:this,e.dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return h.DomUtil.getPosition(this._mapPane)||new h.Point(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){var o=e&&t!==void 0?this._getNewPixelOrigin(e,t):this.getPixelOrigin();return o.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var o=this.getSize()._divideBy(2);return this.project(e,t)._subtract(o)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,o){var r=this._getNewPixelOrigin(o,t);return this.project(e,t)._subtract(r)},_latLngBoundsToNewLayerBounds:function(e,t,o){var r=this._getNewPixelOrigin(o,t);return h.bounds([this.project(e.getSouthWest(),t)._subtract(r),this.project(e.getNorthWest(),t)._subtract(r),this.project(e.getSouthEast(),t)._subtract(r),this.project(e.getNorthEast(),t)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,o){if(!o)return e;var r=this.project(e,t),a=this.getSize().divideBy(2),n=new h.Bounds(r.subtract(a),r.add(a)),i=this._getBoundsOffset(n,o,t);return i.round().equals([0,0])?e:this.unproject(r.add(i),t)},_limitOffset:function(e,t){if(!t)return e;var o=this.getPixelBounds(),r=new h.Bounds(o.min.add(e),o.max.add(e));return e.add(this._getBoundsOffset(r,t))},_getBoundsOffset:function(e,t,o){var r=h.bounds(this.project(t.getNorthEast(),o),this.project(t.getSouthWest(),o)),a=r.min.subtract(e.min),n=r.max.subtract(e.max),i=this._rebound(a.x,-n.x),s=this._rebound(a.y,-n.y);return new h.Point(i,s)},_rebound:function(e,t){return 0<e+t?a(e-t)/2:b(0,i(e))-b(0,m(t))},_limitZoom:function(e){var t=this.getMinZoom(),o=this.getMaxZoom(),r=h.Browser.any3d?this.options.zoomSnap:1;return r&&(e=a(e/r)*r),b(t,c(o,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){h.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var o=this._getCenterOffset(e)._floor();return(!0===(t&&t.animate)||this.getSize().contains(o))&&(this.panBy(o,t),!0)},_createAnimProxy:function(){var t=this._proxy=h.DomUtil.create("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(o){var e=h.DomUtil.TRANSFORM,r=t.style[e];h.DomUtil.setTransform(t,this.project(o.center,o.zoom),this.getZoomScale(o.zoom,1)),r===t.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var e=this.getCenter(),o=this.getZoom();h.DomUtil.setTransform(t,this.project(e,o),this.getZoomScale(o,1))},this)},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,o){if(this._animatingZoom)return!0;if(o=o||{},!this._zoomAnimated||!1===o.animate||this._nothingToAnimate()||u(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),a=this._getCenterOffset(e)._divideBy(1-1/r);return(!0===o.animate||this.getSize().contains(a))&&(h.Util.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(e,t,!0)},this),!0)},_animateZoom:function(e,t,o,r){o&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,h.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:r}),setTimeout(h.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(h.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),h.Util.requestAnimFrame(function(){this._moveEnd(!0)},this))}}),h.map=function(e,t){return new h.Map(e,t)},h.Layer=h.Evented.extend({options:{pane:"overlayPane",nonBubblingEvents:[],attribution:null},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[h.stamp(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[h.stamp(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var o=this.getEvents();e.on(o,this),this.once("remove",function(){e.off(o,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}}),h.Map.include({addLayer:function(e){var t=h.stamp(e);return this._layers[t]?this:(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var t=h.stamp(e);return this._layers[t]?(this._loaded&&e.onRemove(this),e.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(e.getAttribution()),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return!!e&&h.stamp(e)in this._layers},eachLayer:function(e,t){for(var o in this._layers)e.call(t,this._layers[o]);return this},_addLayers:function(e){e=e?h.Util.isArray(e)?e:[e]:[];for(var t=0,o=e.length;t<o;t++)this.addLayer(e[t])},_addZoomLimit:function(e){(isNaN(e.options.maxZoom)||!isNaN(e.options.minZoom))&&(this._zoomBoundLayers[h.stamp(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=h.stamp(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=Infinity,t=-Infinity,o=this._getZoomSpan();for(var r in this._zoomBoundLayers){var a=this._zoomBoundLayers[r].options;e=a.minZoom===void 0?e:c(e,a.minZoom),t=a.maxZoom===void 0?t:b(t,a.maxZoom)}this._layersMaxZoom=t===-Infinity?void 0:t,this._layersMinZoom=e===Infinity?void 0:e,o!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var x="_leaflet_events";h.DomEvent={on:function(e,t,o,r){if("object"==typeof t)for(var a in t)this._on(e,a,t[a],o);else{t=h.Util.splitWords(t);for(var n=0,i=t.length;n<i;n++)this._on(e,t[n],o,r)}return this},off:function(e,t,o,r){if("object"==typeof t)for(var a in t)this._off(e,a,t[a],o);else{t=h.Util.splitWords(t);for(var n=0,i=t.length;n<i;n++)this._off(e,t[n],o,r)}return this},_on:function(t,e,o,r){var a=e+h.stamp(o)+(r?"_"+h.stamp(r):"");if(t[x]&&t[x][a])return this;var n=function(a){return o.call(r||t,a||_.event)},i=n;return h.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,n,a):h.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&!(h.Browser.pointer&&h.Browser.chrome)?this.addDoubleTapListener(t,n,a):"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",n,!1):"mouseenter"===e||"mouseleave"===e?(n=function(o){o=o||_.event,h.DomEvent._isExternalTarget(t,o)&&i(o)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",n,!1)):("click"===e&&h.Browser.android&&(n=function(t){return h.DomEvent._filterClick(t,i)}),t.addEventListener(e,n,!1)):"attachEvent"in t&&t.attachEvent("on"+e,n),t[x]=t[x]||{},t[x][a]=n,this},_off:function(e,t,o,r){var a=t+h.stamp(o)+(r?"_"+h.stamp(r):""),n=e[x]&&e[x][a];return n?(h.Browser.pointer&&0===t.indexOf("touch")?this.removePointerListener(e,t,a):h.Browser.touch&&"dblclick"===t&&this.removeDoubleTapListener?this.removeDoubleTapListener(e,a):"removeEventListener"in e?"mousewheel"===t?e.removeEventListener("onwheel"in e?"wheel":"mousewheel",n,!1):e.removeEventListener("mouseenter"===t?"mouseover":"mouseleave"===t?"mouseout":t,n,!1):"detachEvent"in e&&e.detachEvent("on"+t,n),e[x][a]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,h.DomEvent._skipped(t),this},disableScrollPropagation:function(e){return h.DomEvent.on(e,"mousewheel",h.DomEvent.stopPropagation)},disableClickPropagation:function(e){var t=h.DomEvent.stopPropagation;return h.DomEvent.on(e,h.Draggable.START.join(" "),t),h.DomEvent.on(e,{click:h.DomEvent._fakeStop,dblclick:t})},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return h.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new h.Point(t.clientX,t.clientY);var o=e.getBoundingClientRect();return new h.Point(t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop)},_wheelPxFactor:h.Browser.win&&h.Browser.chrome?2:h.Browser.gecko?_.devicePixelRatio:1,getWheelDelta:function(t){return h.Browser.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/h.DomEvent._wheelPxFactor:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&32765>u(t.detail)?20*-t.detail:t.detail?60*(t.detail/-32765):0},_skipEvents:{},_fakeStop:function(t){h.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_isExternalTarget:function(t,o){var e=o.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(e){return!1}return e!==t},_filterClick:function(t,e){var o=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,r=h.DomEvent._lastClick&&o-h.DomEvent._lastClick;return r&&100<r&&500>r||t.target._simulatedClick&&!t._simulated?void h.DomEvent.stop(t):void(h.DomEvent._lastClick=o,e(t))}},h.DomEvent.addListener=h.DomEvent.on,h.DomEvent.removeListener=h.DomEvent.off,h.PosAnimation=h.Evented.extend({run:function(e,t,o,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=o||0.25,this._easeOutPower=1/b(r||0.5,0.2),this._startPos=h.DomUtil.getPosition(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=h.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,o=1e3*this._duration;t<o?this._runFrame(this._easeOut(t/o),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var o=this._startPos.add(this._offset.multiplyBy(e));t&&o._round(),h.DomUtil.setPosition(this._el,o),this.fire("step")},_complete:function(){h.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-f(1-e,this._easeOutPower)}}),h.Projection.Mercator={R:6378137,R_MINOR:6356752.314245179,bounds:h.bounds([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var o=n/180,a=this.R,i=t.lat*o,d=this.R_MINOR/a,c=l(1-d*d),e=c*s(i),u=Math.tan(n/4-i/2)/f((1-e)/(1+e),c/2);return i=-a*p(b(u,1e-10)),new h.Point(t.lng*o*a,i)},unproject:function(t){for(var a=180/n,d=this.R,r=this.R_MINOR/d,p=l(1-r*r),e=y(-t.y/d),c=n/2-2*o(e),b=0,i=0.1,m;15>b&&1e-7<u(i);b++)m=p*s(c),m=f((1-m)/(1+m),p/2),i=n/2-2*o(e*m)-c,c+=i;return new h.LatLng(c*a,t.x*a/d)}},h.CRS.EPSG3395=h.extend({},h.CRS.Earth,{code:"EPSG:3395",projection:h.Projection.Mercator,transformation:function(){var e=0.5/(n*h.Projection.Mercator.R);return new h.Transformation(e,0.5,-e,0.5)}()}),h.GridLayer=h.Layer.extend({options:{tileSize:256,opacity:1,updateWhenIdle:h.Browser.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){h.setOptions(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),h.DomUtil.remove(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=null},bringToFront:function(){return this._map&&(h.DomUtil.toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(h.DomUtil.toBack(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(!this._onMove&&(this._onMove=h.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return g.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof h.Point?e:new h.Point(e,e)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t=this.getPane().children,o=-e(-Infinity,Infinity),r=0,a=t.length,n;r<a;r++)n=t[r].style.zIndex,t[r]!==this._container&&n&&(o=e(o,+n));isFinite(o)&&(this.options.zIndex=o+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!h.Browser.ielt9){h.DomUtil.setOpacity(this._container,this.options.opacity);var e=+new Date,t=!1,o=!1;for(var r in this._tiles){var a=this._tiles[r];if(a.current&&a.loaded){var n=c(1,(e-a.loaded)/200);h.DomUtil.setOpacity(a.el,n),1>n?t=!0:(a.active&&(o=!0),a.active=!0)}}o&&!this._noPrune&&this._pruneTiles(),t&&(h.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=h.Util.requestAnimFrame(this._updateOpacity,this))}},_initContainer:function(){this._container||(this._container=h.DomUtil.create("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),1>this.options.opacity&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var o in this._levels)this._levels[o].el.children.length||o===e?this._levels[o].el.style.zIndex=t-u(e-o):(h.DomUtil.remove(this._levels[o].el),this._removeTilesAtZoom(o),delete this._levels[o]);var r=this._levels[e],a=this._map;return r||(r=this._levels[e]={},r.el=h.DomUtil.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=t,r.origin=a.project(a.unproject(a.getPixelOrigin()),e).round(),r.zoom=e,this._setZoomTransform(r,a.getCenter(),a.getZoom()),h.Util.falseFn(r.el.offsetWidth)),this._level=r,r}},_pruneTiles:function(){if(this._map){var e=this._map.getZoom(),t,o;if(e>this.options.maxZoom||e<this.options.minZoom)return void this._removeAllTiles();for(t in this._tiles)o=this._tiles[t],o.retain=o.current;for(t in this._tiles)if(o=this._tiles[t],o.current&&!o.active){var r=o.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)h.DomUtil.remove(this._levels[e].el),delete this._levels[e];this._removeAllTiles(),this._tileZoom=null},_retainParent:function(e,t,o,r){var a=m(e/2),n=m(t/2),i=o-1,s=new h.Point(+a,+n);s.z=+i;var l=this._tileCoordsToKey(s),d=this._tiles[l];return d&&d.active?(d.retain=!0,!0):(d&&d.loaded&&(d.retain=!0),!!(i>r)&&this._retainParent(a,n,i,r))},_retainChildren:function(e,t,o,r){for(var a=2*e;a<2*e+2;a++)for(var n=2*t,i;n<2*t+2;n++){i=new h.Point(a,n),i.z=o+1;var s=this._tileCoordsToKey(i),l=this._tiles[s];if(l&&l.active){l.retain=!0;continue}else l&&l.loaded&&(l.retain=!0);o+1<r&&this._retainChildren(a,n,o+1,r)}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_setView:function(e,t,o,r){var n=a(t);(this.options.maxZoom!==void 0&&n>this.options.maxZoom||this.options.minZoom!==void 0&&n<this.options.minZoom)&&(n=void 0);var i=this.options.updateWhenZooming&&n!==this._tileZoom;(!r||i)&&(this._tileZoom=n,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),n!==void 0&&this._update(e),!o&&this._pruneTiles(),this._noPrune=!!o),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var o in this._levels)this._setZoomTransform(this._levels[o],e,t)},_setZoomTransform:function(e,t,o){var r=this._map.getZoomScale(o,e.zoom),a=e.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(t,o)).round();h.Browser.any3d?h.DomUtil.setTransform(e.el,a,r):h.DomUtil.setPosition(e.el,a)},_resetGrid:function(){var e=this._map,t=e.options.crs,o=this._tileSize=this.getTileSize(),r=this._tileZoom,a=this._map.getPixelWorldBounds(this._tileZoom);a&&(this._globalTileRange=this._pxBoundsToTileRange(a)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[m(e.project([0,t.wrapLng[0]],r).x/o.x),i(e.project([0,t.wrapLng[1]],r).x/o.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[m(e.project([t.wrapLat[0],0],r).y/o.x),i(e.project([t.wrapLat[1],0],r).y/o.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(e){var t=this._map,o=t._animatingZoom?b(t._animateToZoom,t.getZoom()):t.getZoom(),r=t.getZoomScale(o,this._tileZoom),a=t.project(e,this._tileZoom).floor(),n=t.getSize().divideBy(2*r);return new h.Bounds(a.subtract(n),a.add(n))},_update:function(e){var t=this._map;if(t){var o=t.getZoom();if(void 0===e&&(e=t.getCenter()),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(e),a=this._pxBoundsToTileRange(r),n=a.getCenter(),s=[],l=this.options.keepBuffer,d=new h.Bounds(a.getBottomLeft().subtract([l,-l]),a.getTopRight().add([l,-l]));for(var p in this._tiles){var b=this._tiles[p].coords;b.z===this._tileZoom&&d.contains(h.point(b.x,b.y))||(this._tiles[p].current=!1)}if(1<u(o-this._tileZoom))return void this._setView(e,o);for(var c=a.min.y;c<=a.max.y;c++)for(var m=a.min.x,i;m<=a.max.x;m++)if(i=new h.Point(m,c),i.z=this._tileZoom,!!this._isValidTile(i)){var y=this._tiles[this._tileCoordsToKey(i)];y?y.current=!0:s.push(i)}if(s.sort(function(e,t){return e.distanceTo(n)-t.distanceTo(n)}),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var f=g.createDocumentFragment();for(m=0;m<s.length;m++)this._addTile(s[m],f);this._level.el.appendChild(f)}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var o=this._globalTileRange;if(!t.wrapLng&&(e.x<o.min.x||e.x>o.max.x)||!t.wrapLat&&(e.y<o.min.y||e.y>o.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(e);return h.latLngBounds(this.options.bounds).overlaps(r)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToBounds:function(e){var t=this._map,o=this.getTileSize(),r=e.scaleBy(o),a=r.add(o),n=t.unproject(r,e.z),i=t.unproject(a,e.z),s=new h.LatLngBounds(n,i);return this.options.noWrap||t.wrapLatLngBounds(s),s},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),o=new h.Point(+t[0],+t[1]);return o.z=+t[2],o},_removeTile:function(e){var t=this._tiles[e];t&&(h.DomUtil.remove(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){h.DomUtil.addClass(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=h.Util.falseFn,e.onmousemove=h.Util.falseFn,h.Browser.ielt9&&1>this.options.opacity&&h.DomUtil.setOpacity(e,this.options.opacity),h.Browser.android&&!h.Browser.android23&&(e.style.WebkitBackfaceVisibility="hidden")},_addTile:function(e,t){var o=this._getTilePos(e),r=this._tileCoordsToKey(e),a=this.createTile(this._wrapCoords(e),h.bind(this._tileReady,this,e));this._initTile(a),2>this.createTile.length&&h.Util.requestAnimFrame(h.bind(this._tileReady,this,e,null,a)),h.DomUtil.setPosition(a,o),this._tiles[r]={el:a,coords:e,current:!0},t.appendChild(a),this.fire("tileloadstart",{tile:a,coords:e})},_tileReady:function(e,t,o){if(this._map){t&&this.fire("tileerror",{error:t,tile:o,coords:e});var r=this._tileCoordsToKey(e);o=this._tiles[r],o&&(o.loaded=+new Date,this._map._fadeAnimated?(h.DomUtil.setOpacity(o.el,0),h.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=h.Util.requestAnimFrame(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),!t&&(h.DomUtil.addClass(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),h.Browser.ielt9||!this._map._fadeAnimated?h.Util.requestAnimFrame(this._pruneTiles,this):setTimeout(h.bind(this._pruneTiles,this),250)))}},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new h.Point(this._wrapX?h.Util.wrapNum(e.x,this._wrapX):e.x,this._wrapY?h.Util.wrapNum(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new h.Bounds(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}}),h.gridLayer=function(e){return new h.GridLayer(e)},h.TileLayer=h.GridLayer.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,minNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(e,t){this._url=e,t=h.setOptions(this,t),t.detectRetina&&h.Browser.retina&&0<t.maxZoom&&(t.tileSize=m(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom++):(t.zoomOffset++,t.maxZoom--),t.minZoom=b(0,t.minZoom)),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),h.Browser.android||this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url=e,t||this.redraw(),this},createTile:function(e,t){var o=g.createElement("img");return h.DomEvent.on(o,"load",h.bind(this._tileOnLoad,this,t,o)),h.DomEvent.on(o,"error",h.bind(this._tileOnError,this,t,o)),this.options.crossOrigin&&(o.crossOrigin=""),o.alt="",o.setAttribute("role","presentation"),o.src=this.getTileUrl(e),o},getTileUrl:function(e){var t={r:h.Browser.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=o),t["-y"]=o}return h.Util.template(this._url,h.extend(t,this.options))},_tileOnLoad:function(e,t){h.Browser.ielt9?setTimeout(h.bind(e,this,null,t),0):e(null,t)},_tileOnError:function(t,o,r){var e=this.options.errorTileUrl;e&&o.src!==e&&(o.src=e),t(r,o)},getTileSize:function(){var e=this._map,t=h.GridLayer.prototype.getTileSize.call(this),o=this._tileZoom+this.options.zoomOffset,r=this.options.minNativeZoom,a=this.options.maxNativeZoom;return null!==r&&o<r?t.divideBy(e.getZoomScale(r,o)).round():null!==a&&o>a?t.divideBy(e.getZoomScale(a,o)).round():t},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom,o=this.options.zoomReverse,r=this.options.zoomOffset,a=this.options.minNativeZoom,n=this.options.maxNativeZoom;return o&&(e=t-e),e+=r,null!==a&&e<a?a:null!==n&&e>n?n:e},_getSubdomain:function(e){var t=u(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)this._tiles[e].coords.z!==this._tileZoom&&(t=this._tiles[e].el,t.onload=h.Util.falseFn,t.onerror=h.Util.falseFn,t.complete||(t.src=h.Util.emptyImageUrl,h.DomUtil.remove(t)))}}),h.tileLayer=function(e,t){return new h.TileLayer(e,t)},h.TileLayer.WMS=h.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var o=h.extend({},this.defaultWmsParams);for(var r in t)r in this.options||(o[r]=t[r]);t=h.setOptions(this,t),o.width=o.height=t.tileSize*(t.detectRetina&&h.Browser.retina?2:1),this.wmsParams=o},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[t]=this._crs.code,h.TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToBounds(e),o=this._crs.project(t.getNorthWest()),r=this._crs.project(t.getSouthEast()),a=(1.3<=this._wmsVersion&&this._crs===h.CRS.EPSG4326?[r.y,o.x,o.y,r.x]:[o.x,r.y,r.x,o.y]).join(","),n=h.TileLayer.prototype.getTileUrl.call(this,e);return n+h.Util.getParamString(this.wmsParams,n,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(e,t){return h.extend(this.wmsParams,e),t||this.redraw(),this}}),h.tileLayer.wms=function(e,t){return new h.TileLayer.WMS(e,t)},h.ImageOverlay=h.Layer.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1},initialize:function(e,t,o){this._url=e,this._bounds=h.latLngBounds(t),h.setOptions(this,o)},onAdd:function(){this._image||(this._initImage(),1>this.options.opacity&&this._updateOpacity()),this.options.interactive&&(h.DomUtil.addClass(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){h.DomUtil.remove(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&h.DomUtil.toFront(this._image),this},bringToBack:function(){return this._map&&h.DomUtil.toBack(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=e,this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._image=h.DomUtil.create("img","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));e.onselectstart=h.Util.falseFn,e.onmousemove=h.Util.falseFn,e.onload=h.bind(this.fire,this,"load"),this.options.crossOrigin&&(e.crossOrigin=""),e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),o=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;h.DomUtil.setTransform(this._image,o,e)},_reset:function(){var e=this._image,t=new h.Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),o=t.getSize();h.DomUtil.setPosition(e,t.min),e.style.width=o.x+"px",e.style.height=o.y+"px"},_updateOpacity:function(){h.DomUtil.setOpacity(this._image,this.options.opacity)}}),h.imageOverlay=function(e,t,o){return new h.ImageOverlay(e,t,o)},h.Icon=h.Class.extend({initialize:function(e){h.setOptions(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var o=this._getIconUrl(e);if(!o){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r=this._createImg(o,t&&"IMG"===t.tagName?t:null);return this._setIconStyles(r,e),r},_setIconStyles:function(e,t){var o=this.options,r=o[t+"Size"];"number"==typeof r&&(r=[r,r]);var a=h.point(r),n=h.point("shadow"===t&&o.shadowAnchor||o.iconAnchor||a&&a.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(o.className||""),n&&(e.style.marginLeft=-n.x+"px",e.style.marginTop=-n.y+"px"),a&&(e.style.width=a.x+"px",e.style.height=a.y+"px")},_createImg:function(e,t){return t=t||g.createElement("img"),t.src=e,t},_getIconUrl:function(e){return h.Browser.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}}),h.icon=function(e){return new h.Icon(e)},h.Icon.Default=h.Icon.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return h.Icon.Default.imagePath||(h.Icon.Default.imagePath=this._detectIconPath()),(this.options.imagePath||h.Icon.Default.imagePath)+h.Icon.prototype._getIconUrl.call(this,e)},_detectIconPath:function(){var e=h.DomUtil.create("div","leaflet-default-icon-path",g.body),t=h.DomUtil.getStyle(e,"background-image")||h.DomUtil.getStyle(e,"backgroundImage");return g.body.removeChild(e),0===t.indexOf("url")?t.replace(/^url\([\"\']?/,"").replace(/marker-icon\.png[\"\']?\)$/,""):""}}),h.Marker=h.Layer.extend({options:{icon:new h.Icon.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(e,t){h.setOptions(this,t),this._latlng=h.latLng(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),this._zoomAnimated&&e.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=h.latLng(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),o=e.icon.createIcon(this._icon),r=!1;o!==this._icon&&(this._icon&&this._removeIcon(),r=!0,e.title&&(o.title=e.title),e.alt&&(o.alt=e.alt)),h.DomUtil.addClass(o,t),e.keyboard&&(o.tabIndex="0"),this._icon=o,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var a=e.icon.createShadow(this._shadow),n=!1;a!==this._shadow&&(this._removeShadow(),n=!0),a&&(h.DomUtil.addClass(a,t),a.alt=""),this._shadow=a,1>e.opacity&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),a&&n&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),h.DomUtil.remove(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&h.DomUtil.remove(this._shadow),this._shadow=null},_setPos:function(e){h.DomUtil.setPosition(this._icon,e),this._shadow&&h.DomUtil.setPosition(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon.style.zIndex=this._zIndex+e},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(h.DomUtil.addClass(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),h.Handler.MarkerDrag)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new h.Handler.MarkerDrag(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;h.DomUtil.setOpacity(this._icon,e),this._shadow&&h.DomUtil.setOpacity(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor||[0,0]},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor||[0,0]}}),h.marker=function(e,t){return new h.Marker(e,t)},h.DivIcon=h.Icon.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var t=e&&"DIV"===e.tagName?e:g.createElement("div"),o=this.options;if(t.innerHTML=!1===o.html?"":o.html,o.bgPos){var r=h.point(o.bgPos);t.style.backgroundPosition=-r.x+"px "+-r.y+"px"}return this._setIconStyles(t,"icon"),t},createShadow:function(){return null}}),h.divIcon=function(e){return new h.DivIcon(e)},h.DivOverlay=h.Layer.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(e,t){h.setOptions(this,e),this._source=t},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&h.DomUtil.setOpacity(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&h.DomUtil.setOpacity(this._container,1),this.bringToFront()},onRemove:function(e){e._fadeAnimated?(h.DomUtil.setOpacity(this._container,0),this._removeTimeout=setTimeout(h.bind(h.DomUtil.remove,h.DomUtil,this._container),200)):h.DomUtil.remove(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=h.latLng(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&h.DomUtil.toFront(this._container),this},bringToBack:function(){return this._map&&h.DomUtil.toBack(this._container),this},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=h.point(this.options.offset),o=this._getAnchor();this._zoomAnimated?h.DomUtil.setPosition(this._container,e.add(o)):t=t.add(e).add(o);var r=this._containerBottom=-t.y,n=this._containerLeft=-a(this._containerWidth/2)+t.x;this._container.style.bottom=r+"px",this._container.style.left=n+"px"}},_getAnchor:function(){return[0,0]}}),h.Popup=h.DivOverlay.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,className:""},openOn:function(e){return e.openPopup(this),this},onAdd:function(e){h.DivOverlay.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),!(this._source instanceof h.Path)&&this._source.on("preclick",h.DomEvent.stopPropagation))},onRemove:function(e){h.DivOverlay.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),!(this._source instanceof h.Path)&&this._source.off("preclick",h.DomEvent.stopPropagation))},getEvents:function(){var e=h.DivOverlay.prototype.getEvents.call(this);return("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this._close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var e="leaflet-popup",t=this._container=h.DomUtil.create("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated");if(this.options.closeButton){var o=this._closeButton=h.DomUtil.create("a",e+"-close-button",t);o.href="#close",o.innerHTML="&#215;",h.DomEvent.on(o,"click",this._onCloseButtonClick,this)}var r=this._wrapper=h.DomUtil.create("div",e+"-content-wrapper",t);this._contentNode=h.DomUtil.create("div",e+"-content",r),h.DomEvent.disableClickPropagation(r).disableScrollPropagation(this._contentNode).on(r,"contextmenu",h.DomEvent.stopPropagation),this._tipContainer=h.DomUtil.create("div",e+"-tip-container",t),this._tip=h.DomUtil.create("div",e+"-tip",this._tipContainer)},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var o=e.offsetWidth;o=c(o,this.options.maxWidth),o=b(o,this.options.minWidth),t.width=o+1+"px",t.whiteSpace="",t.height="";var r=e.offsetHeight,a=this.options.maxHeight,n="leaflet-popup-scrolled";a&&r>a?(t.height=a+"px",h.DomUtil.addClass(e,n)):h.DomUtil.removeClass(e,n),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),o=this._getAnchor();h.DomUtil.setPosition(this._container,e.add(o))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var e=this._map,t=parseInt(h.DomUtil.getStyle(this._container,"marginBottom"),10)||0,o=this._container.offsetHeight+t,r=this._containerWidth,a=new h.Point(this._containerLeft,-o-this._containerBottom);a._add(h.DomUtil.getPosition(this._container));var n=e.layerPointToContainerPoint(a),i=h.point(this.options.autoPanPadding),s=h.point(this.options.autoPanPaddingTopLeft||i),l=h.point(this.options.autoPanPaddingBottomRight||i),d=e.getSize(),p=0,c=0;n.x+r+l.x>d.x&&(p=n.x+r-d.x+l.x),0>n.x-p-s.x&&(p=n.x-s.x),n.y+o+l.y>d.y&&(c=n.y+o-d.y+l.y),0>n.y-c-s.y&&(c=n.y-s.y),(p||c)&&e.fire("autopanstart").panBy([p,c])}},_onCloseButtonClick:function(t){this._close(),h.DomEvent.stop(t)},_getAnchor:function(){return h.point(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),h.popup=function(e,t){return new h.Popup(e,t)},h.Map.mergeOptions({closePopupOnClick:!0}),h.Map.include({openPopup:function(e,t,o){return(e instanceof h.Popup||(e=new h.Popup(o).setContent(e)),t&&e.setLatLng(t),this.hasLayer(e))?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=e,this.addLayer(e))},closePopup:function(e){return e&&e!==this._popup||(e=this._popup,this._popup=null),e&&this.removeLayer(e),this}}),h.Layer.include({bindPopup:function(e,t){return e instanceof h.Popup?(h.setOptions(e,t),this._popup=e,e._source=this):((!this._popup||t)&&(this._popup=new h.Popup(t,this)),this._popup.setContent(e)),this._popupHandlersAdded||(this.on({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e,t){if(e instanceof h.Layer||(t=e,e=this),e instanceof h.FeatureGroup)for(var o in this._layers){e=this._layers[o];break}return t||(t=e.getCenter?e.getCenter():e.getLatLng()),this._popup&&this._map&&(this._popup._source=e,this._popup.update(),this._map.openPopup(this._popup,t)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(e){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(e)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;if(this._popup)return this._map?(h.DomEvent.stop(t),e instanceof h.Path?void this.openPopup(t.layer||t.target,t.latlng):void(this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))):void 0},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),h.Tooltip=h.DivOverlay.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:0.9},onAdd:function(e){h.DivOverlay.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(e){h.DivOverlay.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var e=h.DivOverlay.prototype.getEvents.call(this);return h.Browser.touch&&!this.options.permanent&&(e.preclick=this._close),e},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var e="leaflet-tooltip"+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=h.DomUtil.create("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t=this._map,o=this._container,r=t.latLngToContainerPoint(t.getCenter()),a=t.layerPointToContainerPoint(e),n=this.options.direction,i=o.offsetWidth,s=o.offsetHeight,l=h.point(this.options.offset),d=this._getAnchor();"top"===n?e=e.add(h.point(-i/2+l.x,-s+l.y+d.y,!0)):"bottom"===n?e=e.subtract(h.point(i/2-l.x,-l.y,!0)):"center"===n?e=e.subtract(h.point(i/2+l.x,s/2-d.y+l.y,!0)):"right"===n||"auto"===n&&a.x<r.x?(n="right",e=e.add(h.point(l.x+d.x,d.y-s/2+l.y,!0))):(n="left",e=e.subtract(h.point(i+d.x-l.x,s/2-d.y-l.y,!0))),h.DomUtil.removeClass(o,"leaflet-tooltip-right"),h.DomUtil.removeClass(o,"leaflet-tooltip-left"),h.DomUtil.removeClass(o,"leaflet-tooltip-top"),h.DomUtil.removeClass(o,"leaflet-tooltip-bottom"),h.DomUtil.addClass(o,"leaflet-tooltip-"+n),h.DomUtil.setPosition(o,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&h.DomUtil.setOpacity(this._container,e)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return h.point(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),h.tooltip=function(e,t){return new h.Tooltip(e,t)},h.Map.include({openTooltip:function(e,t,o){return e instanceof h.Tooltip||(e=new h.Tooltip(o).setContent(e)),t&&e.setLatLng(t),this.hasLayer(e)?this:this.addLayer(e)},closeTooltip:function(e){return e&&this.removeLayer(e),this}}),h.Layer.include({bindTooltip:function(e,t){return e instanceof h.Tooltip?(h.setOptions(e,t),this._tooltip=e,e._source=this):((!this._tooltip||t)&&(this._tooltip=h.tooltip(t,this)),this._tooltip.setContent(e)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){if(e||!this._tooltipHandlersAdded){var t=e?"off":"on",o={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?o.add=this._openTooltip:(o.mouseover=this._openTooltip,o.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(o.mousemove=this._moveTooltip),h.Browser.touch&&(o.click=this._openTooltip)),this[t](o),this._tooltipHandlersAdded=!e}},openTooltip:function(e,t){if(e instanceof h.Layer||(t=e,e=this),e instanceof h.FeatureGroup)for(var o in this._layers){e=this._layers[o];break}return t||(t=e.getCenter?e.getCenter():e.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=e,this._tooltip.update(),this._map.openTooltip(this._tooltip,t),this._tooltip.options.interactive&&this._tooltip._container&&(h.DomUtil.addClass(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(h.DomUtil.removeClass(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(e){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(e)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e=t.latlng,o,r;this._tooltip.options.sticky&&t.originalEvent&&(o=this._map.mouseEventToContainerPoint(t.originalEvent),r=this._map.containerPointToLayerPoint(o),e=this._map.layerPointToLatLng(r)),this._tooltip.setLatLng(e)}}),h.LayerGroup=h.Layer.extend({initialize:function(e){this._layers={};var t,o;if(e)for(t=0,o=e.length;t<o;t++)this.addLayer(e[t])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return!!e&&(e in this._layers||this.getLayerId(e)in this._layers)},clearLayers:function(){for(var e in this._layers)this.removeLayer(this._layers[e]);return this},invoke:function(e){var t=Array.prototype.slice.call(arguments,1),o,r;for(o in this._layers)r=this._layers[o],r[e]&&r[e].apply(r,t);return this},onAdd:function(e){for(var t in this._layers)e.addLayer(this._layers[t])},onRemove:function(e){for(var t in this._layers)e.removeLayer(this._layers[t])},eachLayer:function(e,t){for(var o in this._layers)e.call(t,this._layers[o]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];for(var t in this._layers)e.push(this._layers[t]);return e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return h.stamp(e)}}),h.layerGroup=function(e){return new h.LayerGroup(e)},h.FeatureGroup=h.LayerGroup.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),h.LayerGroup.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),h.LayerGroup.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new h.LatLngBounds;for(var t in this._layers){var o=this._layers[t];e.extend(o.getBounds?o.getBounds():o.getLatLng())}return e}}),h.featureGroup=function(e){return new h.FeatureGroup(e)},h.Renderer=h.Layer.extend({options:{padding:0.1},initialize:function(e){h.setOptions(this,e),h.stamp(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&h.DomUtil.addClass(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){h.DomUtil.remove(this._container),this.off("update",this._updatePaths,this)},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var o=this._map.getZoomScale(t,this._zoom),r=h.DomUtil.getPosition(this._container),a=this._map.getSize().multiplyBy(0.5+this.options.padding),n=this._map.project(this._center,t),i=this._map.project(e,t),s=i.subtract(n),l=a.multiplyBy(-o).add(r).add(a).subtract(s);h.Browser.any3d?h.DomUtil.setTransform(this._container,l,o):h.DomUtil.setPosition(this._container,l)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),o=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new h.Bounds(o,o.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),h.Map.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this.options.preferCanvas&&h.canvas()||h.svg()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=h.SVG&&h.svg({pane:e})||h.Canvas&&h.canvas({pane:e}),this._paneRenderers[e]=t),t}}),h.Path=h.Layer.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:0.2,fillRule:"evenodd",interactive:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return h.setOptions(this,e),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(h.Browser.touch?10:0)}}),h.LineUtil={simplify:function(e,t){if(!t||!e.length)return e.slice();var o=t*t;return e=this._reducePoints(e,o),e=this._simplifyDP(e,o),e},pointToSegmentDistance:function(e,t,o){return l(this._sqClosestPointOnSegment(e,t,o,!0))},closestPointOnSegment:function(e,t,o){return this._sqClosestPointOnSegment(e,t,o)},_simplifyDP:function(e,t){var o=e.length,r=typeof Uint8Array==void 0+""?Array:Uint8Array,a=new r(o);a[0]=a[o-1]=1,this._simplifyDPStep(e,a,t,0,o-1);var n=[],s;for(s=0;s<o;s++)a[s]&&n.push(e[s]);return n},_simplifyDPStep:function(e,t,o,r,a){var n=0,s,l,i;for(l=r+1;l<=a-1;l++)i=this._sqClosestPointOnSegment(e[l],e[r],e[a],!0),i>n&&(s=l,n=i);n>o&&(t[s]=1,this._simplifyDPStep(e,t,o,r,s),this._simplifyDPStep(e,t,o,s,a))},_reducePoints:function(e,t){for(var o=[e[0]],r=1,a=0,n=e.length;r<n;r++)this._sqDist(e[r],e[a])>t&&(o.push(e[r]),a=r);return a<n-1&&o.push(e[n-1]),o},clipSegment:function(e,t,o,r,a){var n=r?this._lastCode:this._getBitCode(e,o),i=this._getBitCode(t,o),s,l,d;for(this._lastCode=i;;){if(!(n|i))return[e,t];if(n&i)return!1;s=n||i,l=this._getEdgeIntersection(e,t,s,o,a),d=this._getBitCode(l,o),s===n?(e=l,n=d):(t=l,i=d)}},_getEdgeIntersection:function(e,t,o,r,a){var n=t.x-e.x,i=t.y-e.y,s=r.min,l=r.max,d,p;return 8&o?(d=e.x+n*(l.y-e.y)/i,p=l.y):4&o?(d=e.x+n*(s.y-e.y)/i,p=s.y):2&o?(d=l.x,p=e.y+i*(l.x-e.x)/n):1&o&&(d=s.x,p=e.y+i*(s.x-e.x)/n),new h.Point(d,p,a)},_getBitCode:function(e,t){var o=0;return e.x<t.min.x?o|=1:e.x>t.max.x&&(o|=2),e.y<t.min.y?o|=4:e.y>t.max.y&&(o|=8),o},_sqDist:function(e,t){var o=t.x-e.x,r=t.y-e.y;return o*o+r*r},_sqClosestPointOnSegment:function(e,o,r,a){var n=o.x,i=o.y,s=r.x-n,l=r.y-i,d=s*s+l*l,p;return 0<d&&(p=((e.x-n)*s+(e.y-i)*l)/d,1<p?(n=r.x,i=r.y):0<p&&(n+=s*p,i+=l*p)),s=e.x-n,l=e.y-i,a?s*s+l*l:new h.Point(n,i)}},h.Polyline=h.Path.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){h.setOptions(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t=Infinity,o=null,r=h.LineUtil._sqClosestPointOnSegment,a=0,n=this._parts.length,s,d,p;a<n;a++){p=this._parts[a];for(var c=1,i=p.length;c<i;c++){s=p[c-1],d=p[c];var u=r(e,s,d,!0);u<t&&(t=u,o=r(e,s,d))}}return o&&(o.distance=l(t)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var e=this._rings[0],t=e.length,o,r,a,n,i,s,l;if(!t)return null;for(o=0,r=0;o<t-1;o++)r+=e[o].distanceTo(e[o+1])/2;if(0===r)return this._map.layerPointToLatLng(e[0]);for(o=0,n=0;o<t-1;o++)if(i=e[o],s=e[o+1],a=i.distanceTo(s),n+=a,n>r)return l=(n-r)/a,this._map.layerPointToLatLng([s.x-l*(s.x-i.x),s.y-l*(s.y-i.y)])},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=h.latLng(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new h.LatLngBounds,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return h.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],o=h.Polyline._flat(e),r=0,a=e.length;r<a;r++)o?(t[r]=h.latLng(e[r]),this._bounds.extend(t[r])):t[r]=this._convertLatLngs(e[r]);return t},_project:function(){var e=new h.Bounds;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e);var t=this._clickTolerance(),o=new h.Point(t,t);this._bounds.isValid()&&e.isValid()&&(e.min._subtract(o),e.max._add(o),this._pxBounds=e)},_projectLatlngs:function(e,t,o){var r=e[0]instanceof h.LatLng,a=e.length,n,i;if(r){for(i=[],n=0;n<a;n++)i[n]=this._map.latLngToLayerPoint(e[n]),o.extend(i[n]);t.push(i)}else for(n=0;n<a;n++)this._projectLatlngs(e[n],t,o)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e)){if(this.options.noClip)return void(this._parts=this._rings);var t=this._parts,o,r,a,n,i,s,l;for(o=0,a=0,n=this._rings.length;o<n;o++)for(l=this._rings[o],r=0,i=l.length;r<i-1;r++)(s=h.LineUtil.clipSegment(l[r],l[r+1],e,r,!0),!!s)&&(t[a]=t[a]||[],t[a].push(s[0]),(s[1]!==l[r+1]||r===i-2)&&(t[a].push(s[1]),a++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,o=0,r=e.length;o<r;o++)e[o]=h.LineUtil.simplify(e[o],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)}}),h.polyline=function(e,t){return new h.Polyline(e,t)},h.Polyline._flat=function(e){return!h.Util.isArray(e[0])||"object"!=typeof e[0][0]&&"undefined"!=typeof e[0][0]},h.PolyUtil={},h.PolyUtil.clipPolygon=function(e,t,o){var r=[1,4,2,8],n=h.LineUtil,s,l,i,d,c,a,u,b,m;for(l=0,u=e.length;l<u;l++)e[l]._code=n._getBitCode(e[l],t);for(d=0;4>d;d++){for(b=r[d],s=[],(l=0,u=e.length,i=u-1);l<u;i=l++)c=e[l],a=e[i],c._code&b?!(a._code&b)&&(m=n._getEdgeIntersection(a,c,b,t,o),m._code=n._getBitCode(m,t),s.push(m)):(a._code&b&&(m=n._getEdgeIntersection(a,c,b,t,o),m._code=n._getBitCode(m,t),s.push(m)),s.push(c));e=s}return e},h.Polygon=h.Polyline.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var e=this._rings[0],t=e.length,o,r,a,n,i,s,l,d,p;if(!t)return null;for(s=l=d=0,o=0,r=t-1;o<t;r=o++)a=e[o],n=e[r],i=a.y*n.x-n.y*a.x,l+=(a.x+n.x)*i,d+=(a.y+n.y)*i,s+=3*i;return p=0===s?e[0]:[l/s,d/s],this._map.layerPointToLatLng(p)},_convertLatLngs:function(e){var t=h.Polyline.prototype._convertLatLngs.call(this,e),o=t.length;return 2<=o&&t[0]instanceof h.LatLng&&t[0].equals(t[o-1])&&t.pop(),t},_setLatLngs:function(e){h.Polyline.prototype._setLatLngs.call(this,e),h.Polyline._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return h.Polyline._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,o=new h.Point(t,t);if(e=new h.Bounds(e.min.subtract(o),e.max.add(o)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e)){if(this.options.noClip)return void(this._parts=this._rings);for(var r=0,a=this._rings.length,n;r<a;r++)n=h.PolyUtil.clipPolygon(this._rings[r],e,!0),n.length&&this._parts.push(n)}},_updatePath:function(){this._renderer._updatePoly(this,!0)}}),h.polygon=function(e,t){return new h.Polygon(e,t)},h.Rectangle=h.Polygon.extend({initialize:function(e,t){h.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=h.latLngBounds(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}}),h.rectangle=function(e,t){return new h.Rectangle(e,t)},h.CircleMarker=h.Path.extend({options:{fill:!0,radius:10},initialize:function(e,t){h.setOptions(this,t),this._latlng=h.latLng(e),this._radius=this.options.radius},setLatLng:function(e){return this._latlng=h.latLng(e),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return h.Path.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,o=this._clickTolerance(),r=[e+o,t+o];this._pxBounds=new h.Bounds(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)}}),h.circleMarker=function(e,t){return new h.CircleMarker(e,t)},h.Circle=h.CircleMarker.extend({initialize:function(e,t,o){if("number"==typeof t&&(t=h.extend({},o,{radius:t})),h.setOptions(this,t),this._latlng=h.latLng(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new h.LatLngBounds(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:h.Path.prototype.setStyle,_project:function(){var t=this._latlng.lng,o=this._latlng.lat,i=this._map,l=i.options.crs;if(l.distance===h.CRS.Earth.distance){var c=n/180,d=this._mRadius/h.CRS.Earth.R/c,u=i.project([o+d,t]),m=i.project([o-d,t]),y=u.add(m).divideBy(2),p=i.unproject(y).lat,f=e((r(d*c)-s(o*c)*s(p*c))/(r(o*c)*r(p*c)))/c;(isNaN(f)||0==f)&&(f=d/r(n/180*o)),this._point=y.subtract(i.getPixelOrigin()),this._radius=isNaN(f)?0:b(a(y.x-i.project([p,t-f]).x),1),this._radiusY=b(a(y.y-u.y),1)}else{var _=l.unproject(l.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(_).x}this._updateBounds()}}),h.circle=function(e,t,o){return new h.Circle(e,t,o)},h.SVG=h.Renderer.extend({getEvents:function(){var e=h.Renderer.prototype.getEvents.call(this);return e.zoomstart=this._onZoomStart,e},_initContainer:function(){this._container=h.SVG.create("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=h.SVG.create("g"),this._container.appendChild(this._rootGroup)},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){h.Renderer.prototype._update.call(this);var e=this._bounds,t=e.getSize(),o=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,o.setAttribute("width",t.x),o.setAttribute("height",t.y)),h.DomUtil.setPosition(o,e.min),o.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=h.SVG.create("path");e.options.className&&h.DomUtil.addClass(t,e.options.className),e.options.interactive&&h.DomUtil.addClass(t,"leaflet-interactive"),this._updateStyle(e),this._layers[h.stamp(e)]=e},_addPath:function(e){this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){h.DomUtil.remove(e._path),e.removeInteractiveTarget(e._path),delete this._layers[h.stamp(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,o=e.options;t&&(o.stroke?(t.setAttribute("stroke",o.color),t.setAttribute("stroke-opacity",o.opacity),t.setAttribute("stroke-width",o.weight),t.setAttribute("stroke-linecap",o.lineCap),t.setAttribute("stroke-linejoin",o.lineJoin),o.dashArray?t.setAttribute("stroke-dasharray",o.dashArray):t.removeAttribute("stroke-dasharray"),o.dashOffset?t.setAttribute("stroke-dashoffset",o.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),o.fill?(t.setAttribute("fill",o.fillColor||o.color),t.setAttribute("fill-opacity",o.fillOpacity),t.setAttribute("fill-rule",o.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,h.SVG.pointsToPath(e._parts,t))},_updateCircle:function(e){var t=e._point,o=e._radius,a=e._radiusY||o,n="a"+o+","+a+" 0 1,0 ",i=e._empty()?"M0 0":"M"+(t.x-o)+","+t.y+n+2*o+",0 "+n+2*-o+",0 ";this._setPath(e,i)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){h.DomUtil.toFront(e._path)},_bringToBack:function(e){h.DomUtil.toBack(e._path)}}),h.extend(h.SVG,{create:function(e){return g.createElementNS("http://www.w3.org/2000/svg",e)},pointsToPath:function(e,t){var o="",r,a,n,i,s,l;for(r=0,n=e.length;r<n;r++){for(s=e[r],a=0,i=s.length;a<i;a++)l=s[a],o+=(a?"L":"M")+l.x+" "+l.y;o+=t?h.Browser.svg?"z":"x":""}return o||"M0 0"}}),h.Browser.svg=!!(g.createElementNS&&h.SVG.create("svg").createSVGRect),h.svg=function(e){return h.Browser.svg||h.Browser.vml?new h.SVG(e):null},h.Browser.vml=!h.Browser.svg&&function(){try{var e=g.createElement("div");e.innerHTML="<v:shape adj=\"1\"/>";var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(t){return!1}}(),h.SVG.include(h.Browser.vml?{_initContainer:function(){this._container=h.DomUtil.create("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(h.Renderer.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=h.SVG.create("shape");h.DomUtil.addClass(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=h.SVG.create("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[h.stamp(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;h.DomUtil.remove(t),e.removeInteractiveTarget(t),delete this._layers[h.stamp(e)]},_updateStyle:function(e){var t=e._stroke,o=e._fill,r=e.options,a=e._container;a.stroked=!!r.stroke,a.filled=!!r.fill,r.stroke?(!t&&(t=e._stroke=h.SVG.create("stroke")),a.appendChild(t),t.weight=r.weight+"px",t.color=r.color,t.opacity=r.opacity,t.dashStyle=r.dashArray?h.Util.isArray(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):"",t.endcap=r.lineCap.replace("butt","flat"),t.joinstyle=r.lineJoin):t&&(a.removeChild(t),e._stroke=null),r.fill?(!o&&(o=e._fill=h.SVG.create("fill")),a.appendChild(o),o.color=r.fillColor||r.color,o.opacity=r.fillOpacity):o&&(a.removeChild(o),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),o=a(e._radius),r=a(e._radiusY||o);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+o+","+r+" 0,"+23592600)},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){h.DomUtil.toFront(e._container)},_bringToBack:function(e){h.DomUtil.toBack(e._container)}}:{}),h.Browser.vml&&(h.SVG.create=function(){try{return g.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return g.createElement("<lvml:"+e+" class=\"lvml\">")}}catch(t){return function(e){return g.createElement("<"+e+" xmlns=\"urn:schemas-microsoft.com:vml\" class=\"lvml\">")}}}()),h.Canvas=h.Renderer.extend({getEvents:function(){var e=h.Renderer.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){h.Renderer.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=g.createElement("canvas");h.DomEvent.on(e,"mousemove",h.Util.throttle(this._onMouseMove,32,this),this).on(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this).on(e,"mouseout",this._handleMouseOut,this),this._ctx=e.getContext("2d")},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;for(var t in this._redrawBounds=null,this._layers)e=this._layers[t],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){this._drawnLayers={},h.Renderer.prototype._update.call(this);var e=this._bounds,t=this._container,o=e.getSize(),r=h.Browser.retina?2:1;h.DomUtil.setPosition(t,e.min),t.width=r*o.x,t.height=r*o.y,t.style.width=o.x+"px",t.style.height=o.y+"px",h.Browser.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){h.Renderer.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[h.stamp(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,o=t.next,r=t.prev;o?o.prev=r:this._drawLast=r,r?r.next=o:this._drawFirst=o,delete e._order,delete this._layers[h.stamp(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(e.options.dashArray){var t=e.options.dashArray.split(","),o=[],r;for(r=0;r<t.length;r++)o.push(+t[r]);e.options._dashArray=o}},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||h.Util.requestAnimFrame(this._redraw,this))},_extendRedrawBounds:function(e){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new h.Bounds,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var e=this._redrawBounds,t;if(this._ctx.save(),e){var o=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,o.x,o.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)t=r.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var o=e._parts,r=o.length,a=this._ctx,n,i,s,l;if(r){for(this._drawnLayers[e._leaflet_id]=e,a.beginPath(),a.setLineDash&&a.setLineDash(e.options&&e.options._dashArray||[]),n=0;n<r;n++){for(i=0,s=o[n].length;i<s;i++)l=o[n][i],a[i?"lineTo":"moveTo"](l.x,l.y);t&&a.closePath()}this._fillStroke(a,e)}}},_updateCircle:function(e){if(this._drawing&&!e._empty()){var t=e._point,o=this._ctx,a=e._radius,r=(e._radiusY||a)/a;this._drawnLayers[e._leaflet_id]=e,1!=r&&(o.save(),o.scale(1,r)),o.beginPath(),o.arc(t.x,t.y/r,a,0,2*n,!1),1!=r&&o.restore(),this._fillStroke(o,e)}},_fillStroke:function(e,t){var o=t.options;o.fill&&(e.globalAlpha=o.fillOpacity,e.fillStyle=o.fillColor||o.color,e.fill(o.fillRule||"evenodd")),o.stroke&&0!==o.weight&&(e.globalAlpha=o.opacity,e.lineWidth=o.weight,e.strokeStyle=o.color,e.lineCap=o.lineCap,e.lineJoin=o.lineJoin,e.stroke())},_onClick:function(t){for(var e=this._map.mouseEventToLayerPoint(t),o=this._drawFirst,r,a;o;o=o.next)r=o.layer,r.options.interactive&&r._containsPoint(e)&&!this._map._draggableMoved(r)&&(a=r);a&&(h.DomEvent._fakeStop(t),this._fireEvent([a],t))},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(h.DomUtil.removeClass(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var o=this._drawFirst,r,a;o;o=o.next)r=o.layer,r.options.interactive&&r._containsPoint(e)&&(a=r);a!==this._hoveredLayer&&(this._handleMouseOut(t),a&&(h.DomUtil.addClass(this._container,"leaflet-interactive"),this._fireEvent([a],t,"mouseover"),this._hoveredLayer=a)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,o,e){this._map._fireDOMEvent(o,e||o.type,t)},_bringToFront:function(e){var t=e._order,o=t.next,r=t.prev;if(o)o.prev=r;else return;r?r.next=o:o&&(this._drawFirst=o),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e)},_bringToBack:function(e){var t=e._order,o=t.next,r=t.prev;if(r)r.next=o;else return;o?o.prev=r:r&&(this._drawLast=r),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e)}}),h.Browser.canvas=function(){return!!g.createElement("canvas").getContext}(),h.canvas=function(e){return h.Browser.canvas?new h.Canvas(e):null},h.Polyline.prototype._containsPoint=function(e,t){var o=this._clickTolerance(),r,a,n,i,s,l;if(!this._pxBounds.contains(e))return!1;for(r=0,i=this._parts.length;r<i;r++)for(l=this._parts[r],a=0,s=l.length,n=s-1;a<s;n=a++)if((t||0!==a)&&h.LineUtil.pointToSegmentDistance(e,l[n],l[a])<=o)return!0;return!1},h.Polygon.prototype._containsPoint=function(e){var t=!1,o,r,a,n,i,s,l,d;if(!this._pxBounds.contains(e))return!1;for(n=0,l=this._parts.length;n<l;n++)for(o=this._parts[n],i=0,d=o.length,s=d-1;i<d;s=i++)r=o[i],a=o[s],r.y>e.y!=a.y>e.y&&e.x<(a.x-r.x)*(e.y-r.y)/(a.y-r.y)+r.x&&(t=!t);return t||h.Polyline.prototype._containsPoint.call(this,e,!0)},h.CircleMarker.prototype._containsPoint=function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()},h.GeoJSON=h.FeatureGroup.extend({initialize:function(e,t){h.setOptions(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t=h.Util.isArray(e)?e:e.features,o,r,a;if(t){for(o=0,r=t.length;o<r;o++)a=t[o],(a.geometries||a.geometry||a.features||a.coordinates)&&this.addData(a);return this}var n=this.options;if(n.filter&&!n.filter(e))return this;var i=h.GeoJSON.geometryToLayer(e,n);return i?(i.feature=h.GeoJSON.asFeature(e),i.defaultOptions=i.options,this.resetStyle(i),n.onEachFeature&&n.onEachFeature(e,i),this.addLayer(i)):this},resetStyle:function(e){return e.options=h.Util.extend({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){"function"==typeof t&&(t=t(e.feature)),e.setStyle&&e.setStyle(t)}}),h.extend(h.GeoJSON,{geometryToLayer:function(e,t){var o="Feature"===e.type?e.geometry:e,r=o?o.coordinates:null,a=[],n=t&&t.pointToLayer,s=t&&t.coordsToLatLng||this.coordsToLatLng,l,d,p,i;if(!r&&!o)return null;switch(o.type){case"Point":return l=s(r),n?n(e,l):new h.Marker(l);case"MultiPoint":for(p=0,i=r.length;p<i;p++)l=s(r[p]),a.push(n?n(e,l):new h.Marker(l));return new h.FeatureGroup(a);case"LineString":case"MultiLineString":return d=this.coordsToLatLngs(r,"LineString"===o.type?0:1,s),new h.Polyline(d,t);case"Polygon":case"MultiPolygon":return d=this.coordsToLatLngs(r,"Polygon"===o.type?1:2,s),new h.Polygon(d,t);case"GeometryCollection":for(p=0,i=o.geometries.length;p<i;p++){var c=this.geometryToLayer({geometry:o.geometries[p],type:"Feature",properties:e.properties},t);c&&a.push(c)}return new h.FeatureGroup(a);default:throw new Error("Invalid GeoJSON object.");}},coordsToLatLng:function(e){return new h.LatLng(e[1],e[0],e[2])},coordsToLatLngs:function(e,t,o){for(var r=[],a=0,n=e.length,i;a<n;a++)i=t?this.coordsToLatLngs(e[a],t-1,o):(o||this.coordsToLatLng)(e[a]),r.push(i);return r},latLngToCoords:function(e){return e.alt===void 0?[e.lng,e.lat]:[e.lng,e.lat,e.alt]},latLngsToCoords:function(e,t,o){for(var r=[],a=0,n=e.length;a<n;a++)r.push(t?h.GeoJSON.latLngsToCoords(e[a],t-1,o):h.GeoJSON.latLngToCoords(e[a]));return!t&&o&&r.push(r[0]),r},getFeature:function(e,t){return e.feature?h.extend({},e.feature,{geometry:t}):h.GeoJSON.asFeature(t)},asFeature:function(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}});var S={toGeoJSON:function(){return h.GeoJSON.getFeature(this,{type:"Point",coordinates:h.GeoJSON.latLngToCoords(this.getLatLng())})}};h.Marker.include(S),h.Circle.include(S),h.CircleMarker.include(S),h.Polyline.prototype.toGeoJSON=function(){var e=!h.Polyline._flat(this._latlngs),t=h.GeoJSON.latLngsToCoords(this._latlngs,e?1:0);return h.GeoJSON.getFeature(this,{type:(e?"Multi":"")+"LineString",coordinates:t})},h.Polygon.prototype.toGeoJSON=function(){var e=!h.Polyline._flat(this._latlngs),t=e&&!h.Polyline._flat(this._latlngs[0]),o=h.GeoJSON.latLngsToCoords(this._latlngs,t?2:e?1:0,!0);return e||(o=[o]),h.GeoJSON.getFeature(this,{type:(t?"Multi":"")+"Polygon",coordinates:o})},h.LayerGroup.include({toMultiPoint:function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),h.GeoJSON.getFeature(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint();var t="GeometryCollection"===e,o=[];return this.eachLayer(function(e){if(e.toGeoJSON){var r=e.toGeoJSON();o.push(t?r.geometry:h.GeoJSON.asFeature(r))}}),t?h.GeoJSON.getFeature(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}}),h.geoJSON=function(e,t){return new h.GeoJSON(e,t)},h.geoJson=h.geoJSON,h.Draggable=h.Evented.extend({options:{clickTolerance:3},statics:{START:h.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(e,t,o){this._element=e,this._dragStartTarget=t||e,this._preventOutline=o},enable:function(){this._enabled||(h.DomEvent.on(this._dragStartTarget,h.Draggable.START.join(" "),this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(h.Draggable._dragging===this&&this.finishDrag(),h.DomEvent.off(this._dragStartTarget,h.Draggable.START.join(" "),this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!h.DomUtil.hasClass(this._element,"leaflet-zoom-anim"))&&!(h.Draggable._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches)&&(h.Draggable._dragging=this,this._preventOutline&&h.DomUtil.preventOutline(this._element),h.DomUtil.disableImageDrag(),h.DomUtil.disableTextSelection(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t;this._startPoint=new h.Point(e.clientX,e.clientY),h.DomEvent.on(g,h.Draggable.MOVE[t.type],this._onMove,this).on(g,h.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled){if(t.touches&&1<t.touches.length)return void(this._moved=!0);var e=t.touches&&1===t.touches.length?t.touches[0]:t,o=new h.Point(e.clientX,e.clientY),r=o.subtract(this._startPoint);(r.x||r.y)&&!(u(r.x)+u(r.y)<this.options.clickTolerance)&&(h.DomEvent.preventDefault(t),!this._moved&&(this.fire("dragstart"),this._moved=!0,this._startPos=h.DomUtil.getPosition(this._element).subtract(r),h.DomUtil.addClass(g.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,_.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),h.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(r),this._moving=!0,h.Util.cancelAnimFrame(this._animRequest),this._lastEvent=t,this._animRequest=h.Util.requestAnimFrame(this._updatePosition,this,!0))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),h.DomUtil.setPosition(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){t._simulated||!this._enabled||this.finishDrag()},finishDrag:function(){for(var e in h.DomUtil.removeClass(g.body,"leaflet-dragging"),this._lastTarget&&(h.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),h.Draggable.MOVE)h.DomEvent.off(g,h.Draggable.MOVE[e],this._onMove,this).off(g,h.Draggable.END[e],this._onUp,this);h.DomUtil.enableImageDrag(),h.DomUtil.enableTextSelection(),this._moved&&this._moving&&(h.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,h.Draggable._dragging=!1}}),h.Handler=h.Class.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}}),h.Map.mergeOptions({dragging:!0,inertia:!h.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:Infinity,easeLinearity:0.2,worldCopyJump:!1,maxBoundsViscosity:0}),h.Map.Drag=h.Handler.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new h.Draggable(e._mapPane,e._container),this._draggable.on({down:this._onDown,dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}h.DomUtil.addClass(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){h.DomUtil.removeClass(this._map._container,"leaflet-grab"),h.DomUtil.removeClass(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDown:function(){this._map._stop()},_onDragStart:function(){var e=this._map;if(this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=h.latLngBounds(this._map.options.maxBounds);this._offsetLimit=h.bounds(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=c(1,b(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,o=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(o),this._times.push(e),50<e-this._times[0]&&(this._positions.shift(),this._times.shift())}this._map.fire("move",t).fire("drag",t)},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=a(e/2),o=this._initialWorldOffset,r=this._draggable._newPos.x,n=(r-t+o)%e+t-o,i=(r+t+o)%e-t-o,s=u(n+o)<u(i+o)?n:i;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,o=e.options,r=!o.inertia||2>this._times.length;if(e.fire("dragend",t),r)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),n=(this._lastTime-this._times[0])/1e3,i=o.easeLinearity,s=a.multiplyBy(i/n),l=s.distanceTo([0,0]),d=c(o.inertiaMaxSpeed,l),p=s.multiplyBy(d/l),u=d/(o.inertiaDeceleration*i),b=p.multiplyBy(-u/2).round();b.x||b.y?(b=e._limitOffset(b,e.options.maxBounds),h.Util.requestAnimFrame(function(){e.panBy(b,{duration:u,easeLinearity:i,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}}),h.Map.addInitHook("addHandler","dragging",h.Map.Drag),h.Map.mergeOptions({doubleClickZoom:!0}),h.Map.DoubleClickZoom=h.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,o=e.getZoom(),r=e.options.zoomDelta,a=t.originalEvent.shiftKey?o-r:o+r;"center"===e.options.doubleClickZoom?e.setZoom(a):e.setZoomAround(t.containerPoint,a)}}),h.Map.addInitHook("addHandler","doubleClickZoom",h.Map.DoubleClickZoom),h.Map.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),h.Map.ScrollWheelZoom=h.Handler.extend({addHooks:function(){h.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){h.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=h.DomEvent.getWheelDelta(t),o=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var r=b(o-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(h.bind(this._performZoom,this),r),h.DomEvent.stop(t)},_performZoom:function(){var e=this._map,t=e.getZoom(),o=this._map.options.zoomSnap||0;e._stop();var r=this._delta/(4*this._map.options.wheelPxPerZoomLevel),a=4*p(2/(1+y(-u(r))))/d,n=o?i(a/o)*o:a,s=e._limitZoom(t+(0<this._delta?n:-n))-t;this._delta=0,this._startTime=null;s&&("center"===e.options.scrollWheelZoom?e.setZoom(t+s):e.setZoomAround(this._lastMousePos,t+s))}}),h.Map.addInitHook("addHandler","scrollWheelZoom",h.Map.ScrollWheelZoom),h.extend(h.DomEvent,{_touchstart:h.Browser.msPointer?"MSPointerDown":h.Browser.pointer?"pointerdown":"touchstart",_touchend:h.Browser.msPointer?"MSPointerUp":h.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(e,t,o){function r(t){var e;if(h.Browser.pointer){if(!h.Browser.edge||"mouse"===t.pointerType)return;e=h.DomEvent._pointersCount}else e=t.touches.length;if(!(1<e)){var o=Date.now(),r=o-(p||o);c=t.touches?t.touches[0]:t,n=0<r&&r<=i,p=o}}function a(o){if(n&&!c.cancelBubble){if(h.Browser.pointer){if(!h.Browser.edge||"mouse"===o.pointerType)return;var e={},r,a;for(a in c)r=c[a],e[a]=r&&r.bind?r.bind(c):r;c=e}c.type="dblclick",t(c),p=null}}var n=!1,i=250,s="_leaflet_",l=this._touchstart,d=this._touchend,p,c;return e[s+l+o]=r,e[s+d+o]=a,e[s+"dblclick"+o]=t,e.addEventListener(l,r,!1),e.addEventListener(d,a,!1),e.addEventListener("dblclick",t,!1),this},removeDoubleTapListener:function(e,t){var o="_leaflet_",r=e[o+this._touchstart+t],a=e[o+this._touchend+t],n=e[o+"dblclick"+t];return e.removeEventListener(this._touchstart,r,!1),e.removeEventListener(this._touchend,a,!1),h.Browser.edge||e.removeEventListener("dblclick",n,!1),this}}),h.extend(h.DomEvent,{POINTER_DOWN:h.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:h.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:h.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:h.Browser.msPointer?"MSPointerCancel":"pointercancel",TAG_WHITE_LIST:["INPUT","SELECT","OPTION"],_pointers:{},_pointersCount:0,addPointerListener:function(e,t,o,r){return"touchstart"===t?this._addPointerStart(e,o,r):"touchmove"===t?this._addPointerMove(e,o,r):"touchend"===t&&this._addPointerEnd(e,o,r),this},removePointerListener:function(e,t,o){var r=e["_leaflet_"+t+o];return"touchstart"===t?e.removeEventListener(this.POINTER_DOWN,r,!1):"touchmove"===t?e.removeEventListener(this.POINTER_MOVE,r,!1):"touchend"===t&&(e.removeEventListener(this.POINTER_UP,r,!1),e.removeEventListener(this.POINTER_CANCEL,r,!1)),this},_addPointerStart:function(e,t,o){var r=h.bind(function(o){if("mouse"!==o.pointerType&&o.MSPOINTER_TYPE_MOUSE&&o.pointerType!==o.MSPOINTER_TYPE_MOUSE)if(0>this.TAG_WHITE_LIST.indexOf(o.target.tagName))h.DomEvent.preventDefault(o);else return;this._handlePointer(o,t)},this);if(e["_leaflet_touchstart"+o]=r,e.addEventListener(this.POINTER_DOWN,r,!1),!this._pointerDocListener){var a=h.bind(this._globalPointerUp,this);g.documentElement.addEventListener(this.POINTER_DOWN,h.bind(this._globalPointerDown,this),!0),g.documentElement.addEventListener(this.POINTER_MOVE,h.bind(this._globalPointerMove,this),!0),g.documentElement.addEventListener(this.POINTER_UP,a,!0),g.documentElement.addEventListener(this.POINTER_CANCEL,a,!0),this._pointerDocListener=!0}},_globalPointerDown:function(t){this._pointers[t.pointerId]=t,this._pointersCount++},_globalPointerMove:function(t){this._pointers[t.pointerId]&&(this._pointers[t.pointerId]=t)},_globalPointerUp:function(t){delete this._pointers[t.pointerId],this._pointersCount--},_handlePointer:function(t,e){for(var o in t.touches=[],this._pointers)t.touches.push(this._pointers[o]);t.changedTouches=[t],e(t)},_addPointerMove:function(e,t,o){var r=h.bind(function(o){(o.pointerType===o.MSPOINTER_TYPE_MOUSE||"mouse"===o.pointerType)&&0===o.buttons||this._handlePointer(o,t)},this);e["_leaflet_touchmove"+o]=r,e.addEventListener(this.POINTER_MOVE,r,!1)},_addPointerEnd:function(e,t,o){var r=h.bind(function(o){this._handlePointer(o,t)},this);e["_leaflet_touchend"+o]=r,e.addEventListener(this.POINTER_UP,r,!1),e.addEventListener(this.POINTER_CANCEL,r,!1)}}),h.Map.mergeOptions({touchZoom:h.Browser.touch&&!h.Browser.android23,bounceAtZoomLimits:!0}),h.Map.TouchZoom=h.Handler.extend({addHooks:function(){h.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),h.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){h.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),h.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||2!==t.touches.length||e._animatingZoom||this._zooming)){var o=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(o.add(r)._divideBy(2))),this._startDist=o.distanceTo(r),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),h.DomEvent.on(g,"touchmove",this._onTouchMove,this).on(g,"touchend",this._onTouchEnd,this),h.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,o=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]),a=o.distanceTo(r)/this._startDist;if(this._zoom=e.getScaleZoom(a,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&1>a||this._zoom>e.getMaxZoom()&&1<a)&&(this._zoom=e._limitZoom(this._zoom)),"center"!==e.options.touchZoom){var n=o._add(r)._divideBy(2)._subtract(this._centerPoint);if(1==a&&0===n.x&&0===n.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(n),this._zoom)}else if(this._center=this._startLatLng,1==a)return;this._moved||(e._moveStart(!0),this._moved=!0),h.Util.cancelAnimFrame(this._animRequest);var i=h.bind(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=h.Util.requestAnimFrame(i,this,!0),h.DomEvent.preventDefault(t)}},_onTouchEnd:function(){return this._moved&&this._zooming?void(this._zooming=!1,h.Util.cancelAnimFrame(this._animRequest),h.DomEvent.off(g,"touchmove",this._onTouchMove).off(g,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):void(this._zooming=!1)}}),h.Map.addInitHook("addHandler","touchZoom",h.Map.TouchZoom),h.Map.mergeOptions({tap:!0,tapTolerance:15}),h.Map.Tap=h.Handler.extend({addHooks:function(){h.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){h.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(h.DomEvent.preventDefault(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],o=e.target;this._startPos=this._newPos=new h.Point(e.clientX,e.clientY),o.tagName&&"a"===o.tagName.toLowerCase()&&h.DomUtil.addClass(o,"leaflet-active"),this._holdTimeout=setTimeout(h.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),h.DomEvent.on(g,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),h.DomEvent.off(g,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],o=e.target;o&&o.tagName&&"a"===o.tagName.toLowerCase()&&h.DomUtil.removeClass(o,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new h.Point(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,o){var e=g.createEvent("MouseEvents");e._simulated=!0,o.target._simulatedClick=!0,e.initMouseEvent(t,!0,!0,_,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(e)}}),h.Browser.touch&&!h.Browser.pointer&&h.Map.addInitHook("addHandler","tap",h.Map.Tap),h.Map.mergeOptions({boxZoom:!0}),h.Map.BoxZoom=h.Handler.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane},addHooks:function(){h.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){h.DomEvent.off(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_resetState:function(){this._moved=!1},_onMouseDown:function(t){return t.shiftKey&&(1===t.which||1===t.button)&&void(this._resetState(),h.DomUtil.disableTextSelection(),h.DomUtil.disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(t),h.DomEvent.on(g,{contextmenu:h.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this))},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=h.DomUtil.create("div","leaflet-zoom-box",this._container),h.DomUtil.addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new h.Bounds(this._point,this._startPoint),o=e.getSize();h.DomUtil.setPosition(this._box,e.min),this._box.style.width=o.x+"px",this._box.style.height=o.y+"px"},_finish:function(){this._moved&&(h.DomUtil.remove(this._box),h.DomUtil.removeClass(this._container,"leaflet-crosshair")),h.DomUtil.enableTextSelection(),h.DomUtil.enableImageDrag(),h.DomEvent.off(g,{contextmenu:h.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),!!this._moved)){setTimeout(h.bind(this._resetState,this),0);var e=new h.LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),h.Map.addInitHook("addHandler","boxZoom",h.Map.BoxZoom),h.Map.mergeOptions({keyboard:!0,keyboardPanDelta:80}),h.Map.Keyboard=h.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;0>=e.tabIndex&&(e.tabIndex="0"),h.DomEvent.on(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),h.DomEvent.off(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=g.body,t=g.documentElement,o=e.scrollTop||t.scrollTop,r=e.scrollLeft||t.scrollLeft;this._map._container.focus(),_.scrollTo(r,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var t=this._panKeys={},o=this.keyCodes,r,a;for(r=0,a=o.left.length;r<a;r++)t[o.left[r]]=[-1*e,0];for(r=0,a=o.right.length;r<a;r++)t[o.right[r]]=[e,0];for(r=0,a=o.down.length;r<a;r++)t[o.down[r]]=[0,e];for(r=0,a=o.up.length;r<a;r++)t[o.up[r]]=[0,-1*e]},_setZoomDelta:function(e){var t=this._zoomKeys={},o=this.keyCodes,r,a;for(r=0,a=o.zoomIn.length;r<a;r++)t[o.zoomIn[r]]=e;for(r=0,a=o.zoomOut.length;r<a;r++)t[o.zoomOut[r]]=-e},_addHooks:function(){h.DomEvent.on(g,"keydown",this._onKeyDown,this)},_removeHooks:function(){h.DomEvent.off(g,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=t.keyCode,o=this._map,r;if(e in this._panKeys){if(o._panAnim&&o._panAnim._inProgress)return;r=this._panKeys[e],t.shiftKey&&(r=h.point(r).multiplyBy(3)),o.panBy(r),o.options.maxBounds&&o.panInsideBounds(o.options.maxBounds)}else if(e in this._zoomKeys)o.setZoom(o.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(27===e)o.closePopup();else return;h.DomEvent.stop(t)}}}),h.Map.addInitHook("addHandler","keyboard",h.Map.Keyboard),h.Handler.MarkerDrag=h.Handler.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new h.Draggable(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),h.DomUtil.addClass(e,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&h.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(t){var e=this._marker,o=e._shadow,r=h.DomUtil.getPosition(e._icon),a=e._map.layerPointToLatLng(r);o&&h.DomUtil.setPosition(o,r),e._latlng=a,t.latlng=a,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),h.Control=h.Class.extend({options:{position:"topright"},initialize:function(e){h.setOptions(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),o=this.getPosition(),r=e._controlCorners[o];return h.DomUtil.addClass(t,"leaflet-control"),-1===o.indexOf("bottom")?r.appendChild(t):r.insertBefore(t,r.firstChild),this},remove:function(){return this._map?(h.DomUtil.remove(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}}),h.control=function(e){return new h.Control(e)},h.Map.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){function e(e,a){t[e+a]=h.DomUtil.create("div",o+e+" "+o+a,r)}var t=this._controlCorners={},o="leaflet-",r=this._controlContainer=h.DomUtil.create("div",o+"control-container",this._container);e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){h.DomUtil.remove(this._controlContainer)}}),h.Control.Zoom=h.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",o=h.DomUtil.create("div",t+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,t+"-in",o,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,t+"-out",o,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),o},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(e,t,o,r,a){var n=h.DomUtil.create("a",o,r);return n.innerHTML=e,n.href="#",n.title=t,n.setAttribute("role","button"),n.setAttribute("aria-label",t),h.DomEvent.on(n,"mousedown dblclick",h.DomEvent.stopPropagation).on(n,"click",h.DomEvent.stop).on(n,"click",a,this).on(n,"click",this._refocusOnMap,this),n},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";h.DomUtil.removeClass(this._zoomInButton,t),h.DomUtil.removeClass(this._zoomOutButton,t),(this._disabled||e._zoom===e.getMinZoom())&&h.DomUtil.addClass(this._zoomOutButton,t),(this._disabled||e._zoom===e.getMaxZoom())&&h.DomUtil.addClass(this._zoomInButton,t)}}),h.Map.mergeOptions({zoomControl:!0}),h.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new h.Control.Zoom,this.addControl(this.zoomControl))}),h.control.zoom=function(e){return new h.Control.Zoom(e)},h.Control.Attribution=h.Control.extend({options:{position:"bottomright",prefix:"<a href=\"http://leafletjs.com\" title=\"A JS library for interactive maps\">Leaflet</a>"},initialize:function(e){h.setOptions(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=h.DomUtil.create("div","leaflet-control-attribution"),h.DomEvent&&h.DomEvent.disableClickPropagation(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),this._container},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var o=[];this.options.prefix&&o.push(this.options.prefix),e.length&&o.push(e.join(", ")),this._container.innerHTML=o.join(" | ")}}}),h.Map.mergeOptions({attributionControl:!0}),h.Map.addInitHook(function(){this.options.attributionControl&&new h.Control.Attribution().addTo(this)}),h.control.attribution=function(e){return new h.Control.Attribution(e)},h.Control.Scale=h.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",o=h.DomUtil.create("div",t),r=this.options;return this._addScales(r,t+"-line",o),e.on(r.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),o},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,o){e.metric&&(this._mScale=h.DomUtil.create("div",t,o)),e.imperial&&(this._iScale=h.DomUtil.create("div",t,o))},_update:function(){var e=this._map,t=e.getSize().y/2,o=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(o)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),o=1e3>t?t+" m":t/1e3+" km";this._updateScale(this._mScale,o,t/e)},_updateImperial:function(e){var t=3.2808399*e,o,r,a;5280<t?(o=t/5280,r=this._getRoundNum(o),this._updateScale(this._iScale,r+" mi",r/o)):(a=this._getRoundNum(t),this._updateScale(this._iScale,a+" ft",a/t))},_updateScale:function(e,t,o){e.style.width=a(this.options.maxWidth*o)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=f(10,(m(e)+"").length-1),o=e/t;return o=10<=o?10:5<=o?5:3<=o?3:2<=o?2:1,t*o}}),h.control.scale=function(e){return new h.Control.Scale(e)},h.Control.Layers=h.Control.extend({options:{collapsed:!0,position:"topright",// If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.
  autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,o,r){return o<r?-1:r<o?1:0}},initialize:function(e,t,o){for(var r in h.setOptions(this,o),this._layers=[],this._lastZIndex=0,this._handlingClick=!1,e)this._addLayer(e[r],r);for(r in t)this._addLayer(t[r],r,!0)},onAdd:function(e){return this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this),this._container},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var t=this._getLayer(h.stamp(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){h.DomUtil.addClass(this._container,"leaflet-control-layers-expanded"),this._form.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._form.clientHeight?(h.DomUtil.addClass(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=e+"px"):h.DomUtil.removeClass(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return h.DomUtil.removeClass(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=h.DomUtil.create("div",e),o=this.options.collapsed;t.setAttribute("aria-haspopup",!0),h.DomEvent.disableClickPropagation(t),h.Browser.touch||h.DomEvent.disableScrollPropagation(t);var r=this._form=h.DomUtil.create("form",e+"-list");o&&(this._map.on("click",this.collapse,this),!h.Browser.android&&h.DomEvent.on(t,{mouseenter:this.expand,mouseleave:this.collapse},this));var a=this._layersLink=h.DomUtil.create("a",e+"-toggle",t);a.href="#",a.title="Layers",h.Browser.touch?h.DomEvent.on(a,"click",h.DomEvent.stop).on(a,"click",this.expand,this):h.DomEvent.on(a,"focus",this.expand,this),h.DomEvent.on(r,"click",function(){setTimeout(h.bind(this._onInputClick,this),0)},this),o||this.expand(),this._baseLayersList=h.DomUtil.create("div",e+"-base",r),this._separator=h.DomUtil.create("div",e+"-separator",r),this._overlaysList=h.DomUtil.create("div",e+"-overlays",r),t.appendChild(r)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&h.stamp(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,o){e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:o}),this.options.sortLayers&&this._layers.sort(h.bind(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex))},_update:function(){if(!this._container)return this;h.DomUtil.empty(this._baseLayersList),h.DomUtil.empty(this._overlaysList);var e=0,t,o,r,a;for(r=0;r<this._layers.length;r++)a=this._layers[r],this._addItem(a),o=o||a.overlay,t=t||!a.overlay,e+=a.overlay?0:1;return this.options.hideSingleBase&&(t=t&&1<e,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=o&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(h.stamp(t.target)),o=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;o&&this._map.fire(o,e)},_createRadioElement:function(e,t){var o="<input type=\"radio\" class=\"leaflet-control-layers-selector\" name=\""+e+"\""+(t?" checked=\"checked\"":"")+"/>",r=g.createElement("div");return r.innerHTML=o,r.firstChild},_addItem:function(e){var t=g.createElement("label"),o=this._map.hasLayer(e.layer),r;e.overlay?(r=g.createElement("input"),r.type="checkbox",r.className="leaflet-control-layers-selector",r.defaultChecked=o):r=this._createRadioElement("leaflet-base-layers",o),r.layerId=h.stamp(e.layer),h.DomEvent.on(r,"click",this._onInputClick,this);var a=g.createElement("span");a.innerHTML=" "+e.name;var n=g.createElement("div");t.appendChild(n),n.appendChild(r),n.appendChild(a);var i=e.overlay?this._overlaysList:this._baseLayersList;return i.appendChild(t),this._checkDisabledLayers(),t},_onInputClick:function(){var e=this._form.getElementsByTagName("input"),t=[],o=[],r,a,n;this._handlingClick=!0;for(var s=e.length-1;0<=s;s--)r=e[s],a=this._getLayer(r.layerId).layer,n=this._map.hasLayer(a),r.checked&&!n?t.push(a):!r.checked&&n&&o.push(a);for(s=0;s<o.length;s++)this._map.removeLayer(o[s]);for(s=0;s<t.length;s++)this._map.addLayer(t[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var e=this._form.getElementsByTagName("input"),t=this._map.getZoom(),o=e.length-1,r,a;0<=o;o--)r=e[o],a=this._getLayer(r.layerId).layer,r.disabled=void 0!==a.options.minZoom&&t<a.options.minZoom||void 0!==a.options.maxZoom&&t>a.options.maxZoom},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),h.control.layers=function(e,t,o){return new h.Control.Layers(e,t,o)}})(window,document)},{}],21:[function(e,t,o){var r=Math.round,a=Math.ceil,n=Math.abs,s=Math.min,i=Math.floor;//! license : MIT
  (function(e,r){"object"==typeof o&&"undefined"!=typeof t?t.exports=r():"function"==typeof define&&define.amd?define(r):e.moment=r()})(this,function(){"use strict";function o(){return kt.apply(null,arguments)}function l(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function d(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function p(e){for(var t in e)return!1;return!0}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function b(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function m(e,t){var o=[],r;for(r=0;r<e.length;++r)o.push(t(e[r],r));return o}function y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function f(e,t){for(var o in t)y(t,o)&&(e[o]=t[o]);return y(t,"toString")&&(e.toString=t.toString),y(t,"valueOf")&&(e.valueOf=t.valueOf),e}function _(e,t,o,r){return We(e,t,o,r,!0).utc()}function g(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function h(e){return null==e._pf&&(e._pf=g()),e._pf}function v(e){if(null==e._isValid){var t=h(e),o=Lt.call(t.parsedDateParts,function(e){return null!=e}),r=!isNaN(e._d.getTime())&&0>t.overflow&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&o);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null==Object.isFrozen||!Object.isFrozen(e))e._isValid=r;else return r}return e._isValid}function x(e){var t=_(NaN);return null==e?h(t).userInvalidated=!0:f(h(t),e),t}function S(e,t){var o,r,a;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=h(t)),u(t._locale)||(e._locale=t._locale),0<Et.length)for(o=0;o<Et.length;o++)r=Et[o],a=t[r],u(a)||(e[r]=a);return e}function O(e){S(this,e),this._d=new Date(null==e._d?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),!1==Dt&&(Dt=!0,o.updateOffset(this),Dt=!1)}function w(e){return e instanceof O||null!=e&&null!=e._isAMomentObject}function T(e){return 0>e?a(e)||0:i(e)}function P(e){var t=+e,o=0;return 0!=t&&isFinite(t)&&(o=T(t)),o}function k(e,t,o){var r=s(e.length,t.length),a=n(e.length-t.length),l=0,d;for(d=0;d<r;d++)(o&&e[d]!==t[d]||!o&&P(e[d])!==P(t[d]))&&l++;return l+a}function C(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function E(e,t){var r=!0;return f(function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),r){for(var a=[],n=0,i;n<arguments.length;n++){if(i="","object"==typeof arguments[n]){for(var s in i+="\n["+n+"] ",arguments[0])i+=s+": "+arguments[0][s]+", ";i=i.slice(0,-2)}else i=arguments[n];a.push(i)}C(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+new Error().stack),r=!1}return t.apply(this,arguments)},t)}function D(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),At[e]||(C(t),At[e]=!0)}function A(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function j(e,t){var o=f({},e),r;for(r in t)y(t,r)&&(d(e[r])&&d(t[r])?(o[r]={},f(o[r],e[r]),f(o[r],t[r])):null==t[r]?delete o[r]:o[r]=t[r]);for(r in e)y(e,r)&&!y(t,r)&&d(e[r])&&(o[r]=f({},o[r]));return o}function M(e){null!=e&&this.set(e)}function N(e,t){var o=e.toLowerCase();It[o]=It[o+"s"]=It[t]=e}function I(e){return"string"==typeof e?It[e]||It[e.toLowerCase()]:void 0}function R(e){var t={},o,r;for(r in e)y(e,r)&&(o=I(r),o&&(t[o]=e[r]));return t}function z(e,t){Rt[e]=t}function B(e){var t=[];for(var o in e)t.push({unit:o,priority:Rt[o]});return t.sort(function(e,t){return e.priority-t.priority}),t}function F(e,t){return function(r){return null==r?U(this,e):(V(this,e,r),o.updateOffset(this,t),this)}}function U(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function V(e,t,o){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](o)}function W(e,t,o){var r=""+n(e),a=t-r.length;return(0<=e?o?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}function Z(e,t,o,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),e&&(Ut[e]=a),t&&(Ut[t[0]]=function(){return W(a.apply(this,arguments),t[1],t[2])}),o&&(Ut[o]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function q(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function H(e){var t=e.match(zt),o,r;for(o=0,r=t.length;o<r;o++)t[o]=Ut[t[o]]?Ut[t[o]]:q(t[o]);return function(o){var a="",n;for(n=0;n<r;n++)a+=A(t[n])?t[n].call(o,e):t[n];return a}}function G(e,t){return e.isValid()?(t=Y(t,e.localeData()),Ft[t]=Ft[t]||H(t),Ft[t](e)):e.localeData().invalidDate()}function Y(e,t){function o(e){return t.longDateFormat(e)||e}var r=5;for(Bt.lastIndex=0;0<=r&&Bt.test(e);)e=e.replace(Bt,o),Bt.lastIndex=0,r-=1;return e}function $(e,t,o){no[e]=A(t)?t:function(e){return e&&o?o:t}}function J(e,t){return y(no,e)?no[e](t._strict,t._locale):new RegExp(X(e))}function X(e){return K(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,o,r,a){return t||o||r||a}))}function K(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(e,t){var o=t,r;for("string"==typeof e&&(e=[e]),c(t)&&(o=function(e,o){o[t]=P(e)}),r=0;r<e.length;r++)io[e[r]]=o}function ee(e,t){Q(e,function(e,o,r,a){r._w=r._w||{},t(e,r._w,r,a)})}function te(e,t,o){null!=t&&y(io,e)&&io[e](t,o._a,o,e)}function oe(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function re(e,t,o){var r=e.toLocaleLowerCase(),a,n,i;if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],a=0;12>a;++a)i=_([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(i,"").toLocaleLowerCase();return o?"MMM"===t?(n=go.call(this._shortMonthsParse,r),-1===n?null:n):(n=go.call(this._longMonthsParse,r),-1===n?null:n):"MMM"===t?(n=go.call(this._shortMonthsParse,r),-1!==n)?n:(n=go.call(this._longMonthsParse,r),-1===n?null:n):(n=go.call(this._longMonthsParse,r),-1!==n)?n:(n=go.call(this._shortMonthsParse,r),-1===n?null:n)}function ae(e,t){var o;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=P(t);else if(t=e.localeData().monthsParse(t),!c(t))return e;return o=s(e.date(),oe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,o),e}function ne(e){return null==e?U(this,"Month"):(ae(this,e),o.updateOffset(this,!0),this)}function ie(){function e(e,t){return t.length-e.length}var t=[],o=[],r=[],a,n;for(a=0;12>a;a++)n=_([2e3,a]),t.push(this.monthsShort(n,"")),o.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(t.sort(e),o.sort(e),r.sort(e),a=0;12>a;a++)t[a]=K(t[a]),o[a]=K(o[a]);for(a=0;24>a;a++)r[a]=K(r[a]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function se(e){return le(e)?366:365}function le(e){return 0==e%4&&0!=e%100||0==e%400}function de(e,t,o,r,a,n,i){var s=new Date(e,t,o,r,a,n,i);return 100>e&&0<=e&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function pe(e){var t=new Date(Date.UTC.apply(null,arguments));return 100>e&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function ce(e,t,o){var r=7+t-o,a=(7+pe(e,0,r).getUTCDay()-t)%7;return-a+r-1}function ue(e,t,o,r,a){var n=ce(e,r,a),i=1+7*(t-1)+(7+o-r)%7+n,s,l;return 0>=i?(s=e-1,l=se(s)+i):i>se(e)?(s=e+1,l=i-se(e)):(s=e,l=i),{year:s,dayOfYear:l}}function be(e,t,o){var r=ce(e.year(),t,o),a=i((e.dayOfYear()-r-1)/7)+1,n,s;return 1>a?(s=e.year()-1,n=a+me(s,t,o)):a>me(e.year(),t,o)?(n=a-me(e.year(),t,o),s=e.year()+1):(s=e.year(),n=a),{week:n,year:s}}function me(e,t,o){var r=ce(e,t,o),a=ce(e+1,t,o);return(se(e)-r+a)/7}function ye(e,t){return"string"==typeof e?isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10):e}function fe(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function _e(e,t,o){var r=e.toLocaleLowerCase(),a,n,i;if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;7>a;++a)i=_([2000,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(i,"").toLocaleLowerCase();return o?"dddd"===t?(n=go.call(this._weekdaysParse,r),-1===n?null:n):"ddd"===t?(n=go.call(this._shortWeekdaysParse,r),-1===n?null:n):(n=go.call(this._minWeekdaysParse,r),-1===n?null:n):"dddd"===t?(n=go.call(this._weekdaysParse,r),-1!==n)?n:(n=go.call(this._shortWeekdaysParse,r),-1!==n)?n:(n=go.call(this._minWeekdaysParse,r),-1===n?null:n):"ddd"===t?(n=go.call(this._shortWeekdaysParse,r),-1!==n)?n:(n=go.call(this._weekdaysParse,r),-1!==n)?n:(n=go.call(this._minWeekdaysParse,r),-1===n?null:n):(n=go.call(this._minWeekdaysParse,r),-1!==n)?n:(n=go.call(this._weekdaysParse,r),-1!==n)?n:(n=go.call(this._shortWeekdaysParse,r),-1===n?null:n)}function ge(){function e(e,t){return t.length-e.length}var t=[],o=[],r=[],a=[],n,i,s,l,d;for(n=0;7>n;n++)i=_([2000,1]).day(n),s=this.weekdaysMin(i,""),l=this.weekdaysShort(i,""),d=this.weekdays(i,""),t.push(s),o.push(l),r.push(d),a.push(s),a.push(l),a.push(d);for(t.sort(e),o.sort(e),r.sort(e),a.sort(e),n=0;7>n;n++)o[n]=K(o[n]),r[n]=K(r[n]),a[n]=K(a[n]);this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function he(){return this.hours()%12||12}function ve(e,t){Z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function xe(e,t){return t._meridiemParse}function Se(e){return e?e.toLowerCase().replace("_","-"):e}function Oe(e){for(var t=0,o,r,a,n;t<e.length;){for(n=Se(e[t]).split("-"),o=n.length,r=Se(e[t+1]),r=r?r.split("-"):null;0<o;){if(a=we(n.slice(0,o).join("-")),a)return a;if(r&&r.length>=o&&k(n,r,!0)>=o-1)break;o--}t++}return null}function we(o){var r=null;if(!wo[o]&&"undefined"!=typeof t&&t&&t.exports)try{r=jo._abbr,e("./locale/"+o),Te(r)}catch(t){}return wo[o]}function Te(e,t){var o;return e&&(o=u(t)?ke(e):Pe(e,t),o&&(jo=o)),jo._abbr}function Pe(e,t){if(null!==t){var o=Oo;if(t.abbr=e,null!=wo[e])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=wo[e]._config;else if(null!=t.parentLocale)if(null!=wo[t.parentLocale])o=wo[t.parentLocale]._config;else return To[t.parentLocale]||(To[t.parentLocale]=[]),To[t.parentLocale].push({name:e,config:t}),null;return wo[e]=new M(j(o,t)),To[e]&&To[e].forEach(function(e){Pe(e.name,e.config)}),Te(e),wo[e]}return delete wo[e],null}function ke(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return jo;if(!l(e)){if(t=we(e),t)return t;e=[e]}return Oe(e)}function Ce(e){var t=e._a,o;return t&&-2===h(e).overflow&&(o=0>t[lo]||11<t[lo]?lo:1>t[po]||t[po]>oe(t[so],t[lo])?po:0>t[co]||24<t[co]||24===t[co]&&(0!==t[uo]||0!==t[bo]||0!==t[mo])?co:0>t[uo]||59<t[uo]?uo:0>t[bo]||59<t[bo]?bo:0>t[mo]||999<t[mo]?mo:-1,h(e)._overflowDayOfYear&&(o<so||o>po)&&(o=po),h(e)._overflowWeeks&&-1===o&&(o=yo),h(e)._overflowWeekday&&-1===o&&(o=fo),h(e).overflow=o),e}function Le(e){var t=e._i,o=Po.exec(t)||ko.exec(t),r,a,n,i,s,l;if(o){for(h(e).iso=!0,r=0,a=Lo.length;r<a;r++)if(Lo[r][1].exec(o[1])){i=Lo[r][0],n=!1!==Lo[r][2];break}if(null==i)return void(e._isValid=!1);if(o[3]){for(r=0,a=Eo.length;r<a;r++)if(Eo[r][1].exec(o[3])){s=(o[2]||" ")+Eo[r][0];break}if(null==s)return void(e._isValid=!1)}if(!n&&null!=s)return void(e._isValid=!1);if(o[4])if(Co.exec(o[4]))l="Z";else return void(e._isValid=!1);e._f=i+(s||"")+(l||""),Ie(e)}else e._isValid=!1}function Ee(e){var t={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"},o,r,a,n,i,s,l,d;if(o=e._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,""),r=Ao.exec(o),r){if(a=r[1]?"ddd"+(5===r[1].length?", ":" "):"",n="D MMM "+(10<r[2].length?"YYYY ":"YY "),i="HH:mm"+(r[4]?":ss":""),r[1]){var p=new Date(r[2]),c=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][p.getDay()];if(r[1].substr(0,3)!==c)return h(e).weekdayMismatch=!0,void(e._isValid=!1)}switch(r[5].length){case 2:0===d?l=" +0000":(d="YXWVUTSRQPONZABCDEFGHIKLM".indexOf(r[5][1].toUpperCase())-12,l=(0>d?" -":" +")+(""+d).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:l=t[r[5]];break;default:l=t[" GMT"];}r[5]=l,e._i=r.splice(1).join(""),s=" ZZ",e._f=a+n+i+s,Ie(e),h(e).rfc2822=!0}else e._isValid=!1}function De(e){var t=Do.exec(e._i);if(null!==t)return void(e._d=new Date(+t[1]));if(Le(e),!1===e._isValid)delete e._isValid;else return;if(Ee(e),!1===e._isValid)delete e._isValid;else return;o.createFromInputFallback(e)}function Ae(e,t,o){return null==e?null==t?o:t:e}function je(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Me(e){var t=[],o,r,a,n;if(!e._d){for(a=je(e),e._w&&null==e._a[po]&&null==e._a[lo]&&Ne(e),null!=e._dayOfYear&&(n=Ae(e._a[so],a[so]),(e._dayOfYear>se(n)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),r=pe(n,0,e._dayOfYear),e._a[lo]=r.getUTCMonth(),e._a[po]=r.getUTCDate()),o=0;3>o&&null==e._a[o];++o)e._a[o]=t[o]=a[o];for(;7>o;o++)e._a[o]=t[o]=null==e._a[o]?2===o?1:0:e._a[o];24===e._a[co]&&0===e._a[uo]&&0===e._a[bo]&&0===e._a[mo]&&(e._nextDay=!0,e._a[co]=0),e._d=(e._useUTC?pe:de).apply(null,t),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[co]=24)}}function Ne(e){var t,o,r,a,n,i,s,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)n=1,i=4,o=Ae(t.GG,e._a[so],be(Ze(),1,4).year),r=Ae(t.W,1),a=Ae(t.E,1),(1>a||7<a)&&(l=!0);else{n=e._locale._week.dow,i=e._locale._week.doy;var d=be(Ze(),n,i);o=Ae(t.gg,e._a[so],d.year),r=Ae(t.w,d.week),null==t.d?null==t.e?a=n:(a=t.e+n,(0>t.e||6<t.e)&&(l=!0)):(a=t.d,(0>a||6<a)&&(l=!0))}1>r||r>me(o,n,i)?h(e)._overflowWeeks=!0:null==l?(s=ue(o,r,a,n,i),e._a[so]=s.year,e._dayOfYear=s.dayOfYear):h(e)._overflowWeekday=!0}function Ie(e){if(e._f===o.ISO_8601)return void Le(e);if(e._f===o.RFC_2822)return void Ee(e);e._a=[],h(e).empty=!0;var t=""+e._i,r=t.length,a=0,n,i,s,l,d;for(s=Y(e._f,e._locale).match(zt)||[],n=0;n<s.length;n++)l=s[n],i=(t.match(J(l,e))||[])[0],i&&(d=t.substr(0,t.indexOf(i)),0<d.length&&h(e).unusedInput.push(d),t=t.slice(t.indexOf(i)+i.length),a+=i.length),Ut[l]?(i?h(e).empty=!1:h(e).unusedTokens.push(l),te(l,i,e)):e._strict&&!i&&h(e).unusedTokens.push(l);h(e).charsLeftOver=r-a,0<t.length&&h(e).unusedInput.push(t),12>=e._a[co]&&!0===h(e).bigHour&&0<e._a[co]&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[co]=Re(e._locale,e._a[co],e._meridiem),Me(e),Ce(e)}function Re(e,t,o){var r;return null==o?t:null==e.meridiemHour?null==e.isPM?t:(r=e.isPM(o),r&&12>t&&(t+=12),r||12!==t||(t=0),t):e.meridiemHour(t,o)}function ze(e){var t,o,r,a,n;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)(n=0,t=S({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],Ie(t),!!v(t))&&(n+=h(t).charsLeftOver,n+=10*h(t).unusedTokens.length,h(t).score=n,(null==r||n<r)&&(r=n,o=t));f(e,o||t)}function Be(e){if(!e._d){var t=R(e._i);e._a=m([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Me(e)}}function Fe(e){var t=new O(Ce(Ue(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ue(e){var t=e._i,o=e._f;return(e._locale=e._locale||ke(e._l),null===t||void 0===o&&""===t)?x({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t))?new O(Ce(t)):(b(t)?e._d=t:l(o)?ze(e):o?Ie(e):Ve(e),v(e)||(e._d=null),e)}function Ve(e){var t=e._i;u(t)?e._d=new Date(o.now()):b(t)?e._d=new Date(t.valueOf()):"string"==typeof t?De(e):l(t)?(e._a=m(t.slice(0),function(e){return parseInt(e,10)}),Me(e)):d(t)?Be(e):c(t)?e._d=new Date(t):o.createFromInputFallback(e)}function We(e,t,o,r,a){var n={};return(!0===o||!1===o)&&(r=o,o=void 0),(d(e)&&p(e)||l(e)&&0===e.length)&&(e=void 0),n._isAMomentObject=!0,n._useUTC=n._isUTC=a,n._l=o,n._i=e,n._f=t,n._strict=r,Fe(n)}function Ze(e,t,o,r){return We(e,t,o,r,!1)}function qe(e,t){var o,r;if(1===t.length&&l(t[0])&&(t=t[0]),!t.length)return Ze();for(o=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](o))&&(o=t[r]);return o}function He(e){for(var t in e)if(-1===Io.indexOf(t)||null!=e[t]&&isNaN(e[t]))return!1;for(var o=!1,r=0;r<Io.length;++r)if(e[Io[r]]){if(o)return!1;parseFloat(e[Io[r]])!==P(e[Io[r]])&&(o=!0)}return!0}function Ge(e){var t=R(e),o=t.year||0,r=t.quarter||0,a=t.month||0,n=t.week||0,i=t.day||0,s=t.hour||0,l=t.minute||0,d=t.second||0,p=t.millisecond||0;this._isValid=He(t),this._milliseconds=+p+1e3*d+6e4*l+60*(60*(1e3*s)),this._days=+i+7*n,this._months=+a+3*r+12*o,this._data={},this._locale=ke(),this._bubble()}function Ye(e){return e instanceof Ge}function $e(e){return 0>e?-1*r(-1*e):r(e)}function Je(e,t){Z(e,0,0,function(){var e=this.utcOffset(),o="+";return 0>e&&(e=-e,o="-"),o+W(~~(e/60),2)+t+W(~~e%60,2)})}function Xe(e,t){var o=(t||"").match(e);if(null===o)return null;var r=o[o.length-1]||[],a=(r+"").match(Ro)||["-",0,0],n=+(60*a[1])+P(a[2]);return 0===n?0:"+"===a[0]?n:-n}function Ke(e,t){var r,a;return t._isUTC?(r=t.clone(),a=(w(e)||b(e)?e.valueOf():Ze(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+a),o.updateOffset(r,!1),r):Ze(e).local()}function Qe(e){return 15*-r(e._d.getTimezoneOffset()/15)}function et(){return!!this.isValid()&&this._isUTC&&0===this._offset}function tt(e,t){var o=e,r=null,a,n,i;return Ye(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:c(e)?(o={},t?o[t]=e:o.milliseconds=e):(r=zo.exec(e))?(a="-"===r[1]?-1:1,o={y:0,d:P(r[po])*a,h:P(r[co])*a,m:P(r[uo])*a,s:P(r[bo])*a,ms:P($e(1e3*r[mo]))*a}):(r=Bo.exec(e))?(a="-"===r[1]?-1:1,o={y:ot(r[2],a),M:ot(r[3],a),w:ot(r[4],a),d:ot(r[5],a),h:ot(r[6],a),m:ot(r[7],a),s:ot(r[8],a)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=at(Ze(o.from),Ze(o.to)),o={},o.ms=i.milliseconds,o.M=i.months),n=new Ge(o),Ye(e)&&y(e,"_locale")&&(n._locale=e._locale),n}function ot(e,t){var o=e&&parseFloat(e.replace(",","."));return(isNaN(o)?0:o)*t}function rt(e,t){var o={milliseconds:0,months:0};return o.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(o.months,"M").isAfter(t)&&--o.months,o.milliseconds=+t-+e.clone().add(o.months,"M"),o}function at(e,t){var o;return e.isValid()&&t.isValid()?(t=Ke(t,e),e.isBefore(t)?o=rt(e,t):(o=rt(t,e),o.milliseconds=-o.milliseconds,o.months=-o.months),o):{milliseconds:0,months:0}}function nt(e,t){return function(o,r){var a,n;return null===r||isNaN(+r)||(D(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=o,o=r,r=n),o="string"==typeof o?+o:o,a=tt(o,r),it(this,a,e),this}}function it(e,t,r,a){var n=t._milliseconds,i=$e(t._days),s=$e(t._months);e.isValid()&&(a=null==a||a,n&&e._d.setTime(e._d.valueOf()+n*r),i&&V(e,"Date",U(e,"Date")+i*r),s&&ae(e,U(e,"Month")+s*r),a&&o.updateOffset(e,i||s))}function st(e,t){var o=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(o,"months"),a,n;return 0>t-r?(a=e.clone().add(o-1,"months"),n=(t-r)/(r-a)):(a=e.clone().add(o+1,"months"),n=(t-r)/(a-r)),-(o+n)||0}function lt(e){var t;return void 0===e?this._locale._abbr:(t=ke(e),null!=t&&(this._locale=t),this)}function dt(){return this._locale}function pt(e,t){Z(0,[e,e.length],0,t)}function ct(e,t,o,r,a){var n;return null==e?be(this,r,a).year:(n=me(e,r,a),t>n&&(t=n),ut.call(this,e,t,o,r,a))}function ut(e,t,o,r,a){var n=ue(e,t,o,r,a),i=pe(n.year,0,n.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}function bt(e,t){t[mo]=P(1e3*("0."+e))}function mt(e){return e}function yt(e,t,o,r){var a=ke(),n=_().set(r,t);return a[o](n,e)}function ft(e,t,o){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return yt(e,t,o,"month");var r=[],a;for(a=0;12>a;a++)r[a]=yt(e,a,o,"month");return r}function _t(e,t,o,r){"boolean"==typeof e?(c(t)&&(o=t,t=void 0),t=t||""):(t=e,o=t,e=!1,c(t)&&(o=t,t=void 0),t=t||"");var a=ke(),n=e?a._week.dow:0;if(null!=o)return yt(t,(o+n)%7,r,"day");var s=[],l;for(l=0;7>l;l++)s[l]=yt(t,(l+n)%7,r,"day");return s}function gt(e,t,o,r){var a=tt(t,o);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function ht(e){return 0>e?i(e):a(e)}function vt(e){return 4800*e/146097}function xt(e){return 146097*e/4800}function St(e){return function(){return this.as(e)}}function Ot(e){return function(){return this.isValid()?this._data[e]:NaN}}function wt(e,t,o,r,a){return a.relativeTime(t||1,!!o,e,r)}function Tt(e,t,o){var r=tt(e).abs(),n=ur(r.as("s")),i=ur(r.as("m")),s=ur(r.as("h")),l=ur(r.as("d")),d=ur(r.as("M")),p=ur(r.as("y")),c=n<=br.ss&&["s",n]||n<br.s&&["ss",n]||1>=i&&["m"]||i<br.m&&["mm",i]||1>=s&&["h"]||s<br.h&&["hh",s]||1>=l&&["d"]||l<br.d&&["dd",l]||1>=d&&["M"]||d<br.M&&["MM",d]||1>=p&&["y"]||["yy",p];return c[2]=t,c[3]=0<+e,c[4]=o,wt.apply(null,c)}function Pt(){if(!this.isValid())return this.localeData().invalidDate();var e=mr(this._milliseconds)/1e3,t=mr(this._days),o=mr(this._months),r,a,n;r=T(e/60),a=T(r/60),e%=60,r%=60,n=T(o/12),o%=12;var i=n,l=o,d=t,p=a,c=r,u=e,s=this.asSeconds();return s?(0>s?"-":"")+"P"+(i?i+"Y":"")+(l?l+"M":"")+(d?d+"D":"")+(p||c||u?"T":"")+(p?p+"H":"")+(c?c+"M":"")+(u?u+"S":""):"P0D"}var kt,Ct;Ct=Array.prototype.some?Array.prototype.some:function(e){for(var o=Object(this),t=o.length>>>0,r=0;r<t;r++)if(r in o&&e.call(this,o[r],r,o))return!0;return!1};var Lt=Ct,Et=o.momentProperties=[],Dt=!1,At={};o.suppressDeprecationWarnings=!1,o.deprecationHandler=null;var jt=Object.keys?Object.keys:function(e){var t=[],o;for(o in e)y(e,o)&&t.push(o);return t};var Mt=jt,Nt=/\d{1,2}/,It={},Rt={},zt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Bt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ft={},Ut={},Vt=/\d/,Wt=/\d\d/,Zt=/\d{3}/,qt=/\d{4}/,Ht=/[+-]?\d{6}/,Gt=/\d\d?/,Yt=/\d\d\d\d?/,$t=/\d\d\d\d\d\d?/,Jt=/\d{1,3}/,Xt=/\d{1,4}/,Kt=/[+-]?\d{1,6}/,Qt=/\d+/,eo=/[+-]?\d+/,to=/Z|[+-]\d\d:?\d\d/gi,oo=/Z|[+-]\d\d(?::?\d\d)?/gi,ro=/[+-]?\d+(\.\d{1,3})?/,ao=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,no={},io={},so=0,lo=1,po=2,co=3,uo=4,bo=5,mo=6,yo=7,fo=8,_o;_o=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};var go=_o;Z("M",["MM",2],"Mo",function(){return this.month()+1}),Z("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Z("MMMM",0,0,function(e){return this.localeData().months(this,e)}),N("month","M"),z("month",8),$("M",Gt),$("MM",Gt,Wt),$("MMM",function(e,t){return t.monthsShortRegex(e)}),$("MMMM",function(e,t){return t.monthsRegex(e)}),Q(["M","MM"],function(e,t){t[lo]=P(e)-1}),Q(["MMM","MMMM"],function(e,t,o,r){var a=o._locale.monthsParse(e,r,o._strict);null==a?h(o).invalidMonth=e:t[lo]=a});var ho=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;Z("Y",0,0,function(){var e=this.year();return 9999>=e?""+e:"+"+e}),Z(0,["YY",2],0,function(){return this.year()%100}),Z(0,["YYYY",4],0,"year"),Z(0,["YYYYY",5],0,"year"),Z(0,["YYYYYY",6,!0],0,"year"),N("year","y"),z("year",1),$("Y",eo),$("YY",Gt,Wt),$("YYYY",Xt,qt),$("YYYYY",Kt,Ht),$("YYYYYY",Kt,Ht),Q(["YYYYY","YYYYYY"],so),Q("YYYY",function(e,t){t[so]=2===e.length?o.parseTwoDigitYear(e):P(e)}),Q("YY",function(e,t){t[so]=o.parseTwoDigitYear(e)}),Q("Y",function(e,t){t[so]=parseInt(e,10)}),o.parseTwoDigitYear=function(e){return P(e)+(68<P(e)?1900:2e3)};var vo=F("FullYear",!0);Z("w",["ww",2],"wo","week"),Z("W",["WW",2],"Wo","isoWeek"),N("week","w"),N("isoWeek","W"),z("week",5),z("isoWeek",5),$("w",Gt),$("ww",Gt,Wt),$("W",Gt),$("WW",Gt,Wt),ee(["w","ww","W","WW"],function(e,t,o,r){t[r.substr(0,1)]=P(e)});Z("d",0,"do","day"),Z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Z("e",0,0,"weekday"),Z("E",0,0,"isoWeekday"),N("day","d"),N("weekday","e"),N("isoWeekday","E"),z("day",11),z("weekday",11),z("isoWeekday",11),$("d",Gt),$("e",Gt),$("E",Gt),$("dd",function(e,t){return t.weekdaysMinRegex(e)}),$("ddd",function(e,t){return t.weekdaysShortRegex(e)}),$("dddd",function(e,t){return t.weekdaysRegex(e)}),ee(["dd","ddd","dddd"],function(e,t,o,r){var a=o._locale.weekdaysParse(e,r,o._strict);null==a?h(o).invalidWeekday=e:t.d=a}),ee(["d","e","E"],function(e,t,o,r){t[r]=P(e)});Z("H",["HH",2],0,"hour"),Z("h",["hh",2],0,he),Z("k",["kk",2],0,function(){return this.hours()||24}),Z("hmm",0,0,function(){return""+he.apply(this)+W(this.minutes(),2)}),Z("hmmss",0,0,function(){return""+he.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),Z("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),Z("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)}),ve("a",!0),ve("A",!1),N("hour","h"),z("hour",13),$("a",xe),$("A",xe),$("H",Gt),$("h",Gt),$("k",Gt),$("HH",Gt,Wt),$("hh",Gt,Wt),$("kk",Gt,Wt),$("hmm",Yt),$("hmmss",$t),$("Hmm",Yt),$("Hmmss",$t),Q(["H","HH"],co),Q(["k","kk"],function(e,t){var o=P(e);t[co]=24===o?0:o}),Q(["a","A"],function(e,t,o){o._isPm=o._locale.isPM(e),o._meridiem=e}),Q(["h","hh"],function(e,t,o){t[co]=P(e),h(o).bigHour=!0}),Q("hmm",function(e,t,o){var r=e.length-2;t[co]=P(e.substr(0,r)),t[uo]=P(e.substr(r)),h(o).bigHour=!0}),Q("hmmss",function(e,t,o){var r=e.length-4,a=e.length-2;t[co]=P(e.substr(0,r)),t[uo]=P(e.substr(r,2)),t[bo]=P(e.substr(a)),h(o).bigHour=!0}),Q("Hmm",function(e,t){var o=e.length-2;t[co]=P(e.substr(0,o)),t[uo]=P(e.substr(o))}),Q("Hmmss",function(e,t){var o=e.length-4,r=e.length-2;t[co]=P(e.substr(0,o)),t[uo]=P(e.substr(o,2)),t[bo]=P(e.substr(r))});var xo=/[ap]\.?m?\.?/i,So=F("Hours",!0),Oo={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:Nt,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],week:{dow:0,doy:6},weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],meridiemParse:xo},wo={},To={},Po=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ko=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Co=/Z|[+-]\d\d(?::?\d\d)?/,Lo=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Eo=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Do=/^\/?Date\((\-?\d+)/i,Ao=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/,jo;o.createFromInputFallback=E("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),o.ISO_8601=function(){},o.RFC_2822=function(){};var Mo=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ze.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:x()}),No=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ze.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:x()}),Io=["year","quarter","month","week","day","hour","minute","second","millisecond"];Je("Z",":"),Je("ZZ",""),$("Z",oo),$("ZZ",oo),Q(["Z","ZZ"],function(e,t,o){o._useUTC=!0,o._tzm=Xe(oo,e)});var Ro=/([\+\-]|\d\d)/gi;o.updateOffset=function(){};var zo=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Bo=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;tt.fn=Ge.prototype,tt.invalid=function(){return tt(NaN)};var Fo=nt(1,"add"),Uo=nt(-1,"subtract");o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Vo=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});Z(0,["gg",2],0,function(){return this.weekYear()%100}),Z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),pt("gggg","weekYear"),pt("ggggg","weekYear"),pt("GGGG","isoWeekYear"),pt("GGGGG","isoWeekYear"),N("weekYear","gg"),N("isoWeekYear","GG"),z("weekYear",1),z("isoWeekYear",1),$("G",eo),$("g",eo),$("GG",Gt,Wt),$("gg",Gt,Wt),$("GGGG",Xt,qt),$("gggg",Xt,qt),$("GGGGG",Kt,Ht),$("ggggg",Kt,Ht),ee(["gggg","ggggg","GGGG","GGGGG"],function(e,t,o,r){t[r.substr(0,2)]=P(e)}),ee(["gg","GG"],function(e,t,r,a){t[a]=o.parseTwoDigitYear(e)}),Z("Q",0,"Qo","quarter"),N("quarter","Q"),z("quarter",7),$("Q",Vt),Q("Q",function(e,t){t[lo]=3*(P(e)-1)}),Z("D",["DD",2],"Do","date"),N("date","D"),z("date",9),$("D",Gt),$("DD",Gt,Wt),$("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Q(["D","DD"],po),Q("Do",function(e,t){t[po]=P(e.match(Gt)[0],10)});var Wo=F("Date",!0);Z("DDD",["DDDD",3],"DDDo","dayOfYear"),N("dayOfYear","DDD"),z("dayOfYear",4),$("DDD",Jt),$("DDDD",Zt),Q(["DDD","DDDD"],function(e,t,o){o._dayOfYear=P(e)}),Z("m",["mm",2],0,"minute"),N("minute","m"),z("minute",14),$("m",Gt),$("mm",Gt,Wt),Q(["m","mm"],uo);var Zo=F("Minutes",!1);Z("s",["ss",2],0,"second"),N("second","s"),z("second",15),$("s",Gt),$("ss",Gt,Wt),Q(["s","ss"],bo);var qo=F("Seconds",!1);Z("S",0,0,function(){return~~(this.millisecond()/100)}),Z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Z(0,["SSS",3],0,"millisecond"),Z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),N("millisecond","ms"),z("millisecond",16),$("S",Jt,Vt),$("SS",Jt,Wt),$("SSS",Jt,Zt);var Ho;for(Ho="SSSS";9>=Ho.length;Ho+="S")$(Ho,Qt);for(Ho="S";9>=Ho.length;Ho+="S")Q(Ho,bt);var Go=F("Milliseconds",!1);Z("z",0,0,"zoneAbbr"),Z("zz",0,0,"zoneName");var Yo=O.prototype;Yo.add=Fo,Yo.calendar=function(e,t){var r=e||Ze(),a=Ke(r,this).startOf("day"),n=o.calendarFormat(this,a)||"sameElse",i=t&&(A(t[n])?t[n].call(this,r):t[n]);return this.format(i||this.localeData().calendar(n,this,Ze(r)))},Yo.clone=function(){return new O(this)},Yo.diff=function(e,t,o){var r,a,n,i;return this.isValid()?(r=Ke(e,this),!r.isValid())?NaN:(a=6e4*(r.utcOffset()-this.utcOffset()),t=I(t),"year"===t||"month"===t||"quarter"===t?(i=st(this,r),"quarter"===t?i/=3:"year"===t&&(i/=12)):(n=this-r,i="second"===t?n/1e3:"minute"===t?n/6e4:"hour"===t?n/36e5:"day"===t?(n-a)/864e5:"week"===t?(n-a)/6048e5:n),o?i:T(i)):NaN},Yo.endOf=function(e){return(e=I(e),void 0===e||"millisecond"===e)?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},Yo.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},Yo.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Ze(e).isValid())?tt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Yo.fromNow=function(e){return this.from(Ze(),e)},Yo.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Ze(e).isValid())?tt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Yo.toNow=function(e){return this.to(Ze(),e)},Yo.get=function(e){return e=I(e),A(this[e])?this[e]():this},Yo.invalidAt=function(){return h(this).overflow},Yo.isAfter=function(e,t){var o=w(e)?e:Ze(e);return this.isValid()&&o.isValid()&&(t=I(u(t)?"millisecond":t),"millisecond"===t?this.valueOf()>o.valueOf():o.valueOf()<this.clone().startOf(t).valueOf())},Yo.isBefore=function(e,t){var o=w(e)?e:Ze(e);return this.isValid()&&o.isValid()&&(t=I(u(t)?"millisecond":t),"millisecond"===t?this.valueOf()<o.valueOf():this.clone().endOf(t).valueOf()<o.valueOf())},Yo.isBetween=function(e,t,o,r){return r=r||"()",("("===r[0]?this.isAfter(e,o):!this.isBefore(e,o))&&(")"===r[1]?this.isBefore(t,o):!this.isAfter(t,o))},Yo.isSame=function(e,t){var o=w(e)?e:Ze(e),r;return this.isValid()&&o.isValid()&&(t=I(t||"millisecond"),"millisecond"===t?this.valueOf()===o.valueOf():(r=o.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))},Yo.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Yo.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Yo.isValid=function(){return v(this)},Yo.lang=Vo,Yo.locale=lt,Yo.localeData=dt,Yo.max=No,Yo.min=Mo,Yo.parsingFlags=function(){return f({},h(this))},Yo.set=function(e,t){if("object"==typeof e){e=R(e);for(var o=B(e),r=0;r<o.length;r++)this[o[r].unit](e[o[r].unit])}else if(e=I(e),A(this[e]))return this[e](t);return this},Yo.startOf=function(e){switch(e=I(e),e){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0);}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*i(this.month()/3)),this},Yo.subtract=Uo,Yo.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Yo.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Yo.toDate=function(){return new Date(this.valueOf())},Yo.toISOString=function(){if(!this.isValid())return null;var e=this.clone().utc();return 0>e.year()||9999<e.year()?G(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):A(Date.prototype.toISOString)?this.toDate().toISOString():G(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},Yo.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var o="["+e+"(\"]",r=0<=this.year()&&9999>=this.year()?"YYYY":"YYYYYY",a=t+"[\")]";return this.format(o+r+"-MM-DD[T]HH:mm:ss.SSS"+a)},Yo.toJSON=function(){return this.isValid()?this.toISOString():null},Yo.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Yo.unix=function(){return i(this.valueOf()/1e3)},Yo.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Yo.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Yo.year=vo,Yo.isLeapYear=function(){return le(this.year())},Yo.weekYear=function(e){return ct.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Yo.isoWeekYear=function(e){return ct.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Yo.quarter=Yo.quarters=function(e){return null==e?a((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Yo.month=ne,Yo.daysInMonth=function(){return oe(this.year(),this.month())},Yo.week=Yo.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Yo.isoWeek=Yo.isoWeeks=function(e){var t=be(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Yo.weeksInYear=function(){var e=this.localeData()._week;return me(this.year(),e.dow,e.doy)},Yo.isoWeeksInYear=function(){return me(this.year(),1,4)},Yo.date=Wo,Yo.day=Yo.days=function(e){if(!this.isValid())return null==e?NaN:this;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null==e?t:(e=ye(e,this.localeData()),this.add(e-t,"d"))},Yo.weekday=function(e){if(!this.isValid())return null==e?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Yo.isoWeekday=function(e){if(!this.isValid())return null==e?NaN:this;if(null!=e){var t=fe(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Yo.dayOfYear=function(e){var t=r((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Yo.hour=Yo.hours=So,Yo.minute=Yo.minutes=Zo,Yo.second=Yo.seconds=qo,Yo.millisecond=Yo.milliseconds=Go,Yo.utcOffset=function(e,t,r){var a=this._offset||0,i;if(!this.isValid())return null==e?NaN:this;if(null!=e){if("string"!=typeof e)16>n(e)&&!r&&(e*=60);else if(e=Xe(oo,e),null===e)return this;return!this._isUTC&&t&&(i=Qe(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==e&&(!t||this._changeInProgress?it(this,tt(e-a,"m"),1,!1):!this._changeInProgress&&(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Qe(this)},Yo.utc=function(e){return this.utcOffset(0,e)},Yo.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Qe(this),"m")),this},Yo.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Xe(to,this._i);null==e?this.utcOffset(0,!0):this.utcOffset(e)}return this},Yo.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ze(e).utcOffset():0,0==(this.utcOffset()-e)%60)},Yo.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Yo.isLocal=function(){return!!this.isValid()&&!this._isUTC},Yo.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Yo.isUtc=et,Yo.isUTC=et,Yo.zoneAbbr=function(){return this._isUTC?"UTC":""},Yo.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Yo.dates=E("dates accessor is deprecated. Use date instead.",Wo),Yo.months=E("months accessor is deprecated. Use month instead",ne),Yo.years=E("years accessor is deprecated. Use year instead",vo),Yo.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null==e?-this.utcOffset():("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this)}),Yo.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e={};if(S(e,this),e=Ue(e),e._a){var t=e._isUTC?_(e._a):Ze(e._a);this._isDSTShifted=this.isValid()&&0<k(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var $o=M.prototype;$o.calendar=function(e,t,o){var r=this._calendar[e]||this._calendar.sameElse;return A(r)?r.call(t,o):r},$o.longDateFormat=function(e){var t=this._longDateFormat[e],o=this._longDateFormat[e.toUpperCase()];return t||!o?t:(this._longDateFormat[e]=o.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},$o.invalidDate=function(){return this._invalidDate},$o.ordinal=function(e){return this._ordinal.replace("%d",e)},$o.preparse=mt,$o.postformat=mt,$o.relativeTime=function(e,t,o,r){var a=this._relativeTime[o];return A(a)?a(e,t,o,r):a.replace(/%d/i,e)},$o.pastFuture=function(e,t){var o=this._relativeTime[0<e?"future":"past"];return A(o)?o(t):o.replace(/%s/i,t)},$o.set=function(e){var t,o;for(o in e)t=e[o],A(t)?this[o]=t:this["_"+o]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},$o.months=function(e,t){return e?l(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ho).test(t)?"format":"standalone"][e.month()]:l(this._months)?this._months:this._months.standalone},$o.monthsShort=function(e,t){return e?l(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ho.test(t)?"format":"standalone"][e.month()]:l(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},$o.monthsParse=function(e,t,o){var r,a,n;if(this._monthsParseExact)return re.call(this,e,t,o);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(a=_([2e3,r]),o&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),o||this._monthsParse[r]||(n="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(n.replace(".",""),"i")),o&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(o&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!o&&this._monthsParse[r].test(e))return r}},$o.monthsRegex=function(e){return this._monthsParseExact?(y(this,"_monthsRegex")||ie.call(this),e?this._monthsStrictRegex:this._monthsRegex):(y(this,"_monthsRegex")||(this._monthsRegex=ao),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},$o.monthsShortRegex=function(e){return this._monthsParseExact?(y(this,"_monthsRegex")||ie.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(y(this,"_monthsShortRegex")||(this._monthsShortRegex=ao),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},$o.week=function(e){return be(e,this._week.dow,this._week.doy).week},$o.firstDayOfYear=function(){return this._week.doy},$o.firstDayOfWeek=function(){return this._week.dow},$o.weekdays=function(e,t){return e?l(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:l(this._weekdays)?this._weekdays:this._weekdays.standalone},$o.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},$o.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},$o.weekdaysParse=function(e,t,o){var r,a,n;if(this._weekdaysParseExact)return _e.call(this,e,t,o);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;7>r;r++){if(a=_([2000,1]).day(r),o&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(n="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(n.replace(".",""),"i")),o&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(o&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(o&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!o&&this._weekdaysParse[r].test(e))return r}},$o.weekdaysRegex=function(e){return this._weekdaysParseExact?(y(this,"_weekdaysRegex")||ge.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(y(this,"_weekdaysRegex")||(this._weekdaysRegex=ao),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},$o.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(y(this,"_weekdaysRegex")||ge.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(y(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ao),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},$o.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(y(this,"_weekdaysRegex")||ge.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(y(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ao),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},$o.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},$o.meridiem=function(e,t,o){return 11<e?o?"pm":"PM":o?"am":"AM"},Te("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,o=1===P(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th";return e+o}}),o.lang=E("moment.lang is deprecated. Use moment.locale instead.",Te),o.langData=E("moment.langData is deprecated. Use moment.localeData instead.",ke);var Jo=n,Xo=St("ms"),Ko=St("s"),Qo=St("m"),er=St("h"),tr=St("d"),or=St("w"),rr=St("M"),ar=St("y"),nr=Ot("milliseconds"),ir=Ot("seconds"),sr=Ot("minutes"),lr=Ot("hours"),dr=Ot("days"),pr=Ot("months"),cr=Ot("years"),ur=r,br={ss:44,s:45,m:45,h:22,d:26,M:11},mr=n,yr=Ge.prototype;return yr.isValid=function(){return this._isValid},yr.abs=function(){var e=this._data;return this._milliseconds=Jo(this._milliseconds),this._days=Jo(this._days),this._months=Jo(this._months),e.milliseconds=Jo(e.milliseconds),e.seconds=Jo(e.seconds),e.minutes=Jo(e.minutes),e.hours=Jo(e.hours),e.months=Jo(e.months),e.years=Jo(e.years),this},yr.add=function(e,t){return gt(this,e,t,1)},yr.subtract=function(e,t){return gt(this,e,t,-1)},yr.as=function(e){if(!this.isValid())return NaN;var t=this._milliseconds,o,a;if(e=I(e),"month"===e||"year"===e)return o=this._days+t/864e5,a=this._months+vt(o),"month"===e?a:a/12;switch(o=this._days+r(xt(this._months)),e){case"week":return o/7+t/6048e5;case"day":return o+t/864e5;case"hour":return 24*o+t/36e5;case"minute":return 1440*o+t/6e4;case"second":return 86400*o+t/1e3;case"millisecond":return i(864e5*o)+t;default:throw new Error("Unknown unit "+e);}},yr.asMilliseconds=Xo,yr.asSeconds=Ko,yr.asMinutes=Qo,yr.asHours=er,yr.asDays=tr,yr.asWeeks=or,yr.asMonths=rr,yr.asYears=ar,yr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*P(this._months/12):NaN},yr._bubble=function(){var e=this._milliseconds,t=this._days,o=this._months,r=this._data,a,n,i,s,l;return 0<=e&&0<=t&&0<=o||0>=e&&0>=t&&0>=o||(e+=864e5*ht(xt(o)+t),t=0,o=0),r.milliseconds=e%1e3,a=T(e/1e3),r.seconds=a%60,n=T(a/60),r.minutes=n%60,i=T(n/60),r.hours=i%24,t+=T(i/24),l=T(vt(t)),o+=l,t-=ht(xt(l)),s=T(o/12),o%=12,r.days=t,r.months=o,r.years=s,this},yr.get=function(e){return e=I(e),this.isValid()?this[e+"s"]():NaN},yr.milliseconds=nr,yr.seconds=ir,yr.minutes=sr,yr.hours=lr,yr.days=dr,yr.weeks=function(){return T(this.days()/7)},yr.months=pr,yr.years=cr,yr.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),o=Tt(this,!e,t);return e&&(o=t.pastFuture(+this,o)),t.postformat(o)},yr.toISOString=Pt,yr.toString=Pt,yr.toJSON=Pt,yr.locale=lt,yr.localeData=dt,yr.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Pt),yr.lang=Vo,Z("X",0,0,"unix"),Z("x",0,0,"valueOf"),$("x",eo),$("X",ro),Q("X",function(e,t,o){o._d=new Date(1e3*parseFloat(e,10))}),Q("x",function(e,t,o){o._d=new Date(P(e))}),o.version="2.18.1",function(e){kt=e}(Ze),o.fn=Yo,o.min=function(){var e=[].slice.call(arguments,0);return qe("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return qe("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=_,o.unix=function(e){return Ze(1e3*e)},o.months=function(e,t){return ft(e,t,"months")},o.isDate=b,o.locale=Te,o.invalid=x,o.duration=tt,o.isMoment=w,o.weekdays=function(e,t,o){return _t(e,t,o,"weekdays")},o.parseZone=function(){return Ze.apply(null,arguments).parseZone()},o.localeData=ke,o.isDuration=Ye,o.monthsShort=function(e,t){return ft(e,t,"monthsShort")},o.weekdaysMin=function(e,t,o){return _t(e,t,o,"weekdaysMin")},o.defineLocale=Pe,o.updateLocale=function(e,t){if(null!=t){var o=Oo,r;null!=wo[e]&&(o=wo[e]._config),t=j(o,t),r=new M(t),r.parentLocale=wo[e],wo[e]=r,Te(e)}else null!=wo[e]&&(null==wo[e].parentLocale?null!=wo[e]&&delete wo[e]:wo[e]=wo[e].parentLocale);return wo[e]},o.locales=function(){return Mt(wo)},o.weekdaysShort=function(e,t,o){return _t(e,t,o,"weekdaysShort")},o.normalizeUnits=I,o.relativeTimeRounding=function(e){return void 0===e?ur:"function"==typeof e&&(ur=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==br[e]&&(void 0===t?br[e]:(br[e]=t,"s"===e&&(br.ss=t-1),!0))},o.calendarFormat=function(e,t){var o=e.diff(t,"days",!0);return-6>o?"sameElse":-1>o?"lastWeek":0>o?"lastDay":1>o?"sameDay":2>o?"nextDay":7>o?"nextWeek":"sameElse"},o.prototype=Yo,o})},{}],22:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./Subject"),n=e("./Subscription"),i=function(e){function t(){e.apply(this,arguments),this.value=null,this.hasNext=!1,this.hasCompleted=!1}return r(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),n.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),n.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(a.Subject);o.AsyncSubject=i},{"./Subject":32,"./Subscription":35}],23:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./Subject"),n=e("./util/ObjectUnsubscribedError"),i=function(e){function t(t){e.call(this),this._value=t}return r(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var o=e.prototype._subscribe.call(this,t);return o&&!o.closed&&t.next(this._value),o},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;else if(this.closed)throw new n.ObjectUnsubscribedError;else return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(a.Subject);o.BehaviorSubject=i},{"./Subject":32,"./util/ObjectUnsubscribedError":346}],24:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./Subscriber"),n=function(e){function t(t,o,r){e.call(this),this.parent=t,this.outerValue=o,this.outerIndex=r,this.index=0}return r(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(a.Subscriber);o.InnerSubscriber=n},{"./Subscriber":34}],25:[function(e,t,o){"use strict";var r=e("./Observable"),a=function(){function e(e,t,o){this.kind=e,this.value=t,this.error=o,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete();}},e.prototype.do=function(e,t,o){var r=this.kind;return"N"===r?e&&e(this.value):"E"===r?t&&t(this.error):"C"===r?o&&o():void 0},e.prototype.accept=function(e,t,o){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,o)},e.prototype.toObservable=function(){var e=this.kind;switch(e){case"N":return r.Observable.of(this.value);case"E":return r.Observable.throw(this.error);case"C":return r.Observable.empty();}throw new Error("unexpected notification kind value")},e.createNext=function(t){return"undefined"==typeof t?e.undefinedValueNotification:new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}();o.Notification=a},{"./Observable":26}],26:[function(e,t,o){"use strict";var r=e("./util/root"),a=e("./util/toSubscriber"),n=e("./symbol/observable"),i=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var o=new e;return o.source=this,o.operator=t,o},e.prototype.subscribe=function(e,t,o){var r=this.operator,n=a.toSubscriber(e,t,o);if(r?r.call(n,this.source):n.add(this.source?this._subscribe(n):this._trySubscribe(n)),n.syncErrorThrowable&&(n.syncErrorThrowable=!1,n.syncErrorThrown))throw n.syncErrorValue;return n},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.syncErrorThrown=!0,e.syncErrorValue=t,e.error(t)}},e.prototype.forEach=function(e,t){var o=this;if(t||(r.root.Rx&&r.root.Rx.config&&r.root.Rx.config.Promise?t=r.root.Rx.config.Promise:r.root.Promise&&(t=r.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,r){var a=o.subscribe(function(t){if(a)try{e(t)}catch(e){r(e),a.unsubscribe()}else e(t)},r,t)})},e.prototype._subscribe=function(e){return this.source.subscribe(e)},e.prototype[n.observable]=function(){return this},e.create=function(t){return new e(t)},e}();o.Observable=i},{"./symbol/observable":332,"./util/root":363,"./util/toSubscriber":365}],27:[function(e,t,o){"use strict";o.empty={closed:!0,next:function(){},error:function(e){throw e},complete:function(){}}},{}],28:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./Subscriber"),n=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.notifyNext=function(e,t){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(a.Subscriber);o.OuterSubscriber=n},{"./Subscriber":34}],29:[function(e,t,o){"use strict";var r=Number.POSITIVE_INFINITY,a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("./Subject"),i=e("./scheduler/queue"),s=e("./Subscription"),l=e("./operator/observeOn"),d=e("./util/ObjectUnsubscribedError"),p=e("./SubjectSubscription"),c=function(e){function t(t,o,a){void 0===t&&(t=r),void 0===o&&(o=r),e.call(this),this.scheduler=a,this._events=[],this._bufferSize=1>t?1:t,this._windowTime=1>o?1:o}return a(t,e),t.prototype.next=function(t){var o=this._getNow();this._events.push(new u(o,t)),this._trimBufferThenGetEvents(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t=this._trimBufferThenGetEvents(),o=this.scheduler,r;if(this.closed)throw new d.ObjectUnsubscribedError;else this.hasError?r=s.Subscription.EMPTY:this.isStopped?r=s.Subscription.EMPTY:(this.observers.push(e),r=new p.SubjectSubscription(this,e));o&&e.add(e=new l.ObserveOnSubscriber(e,o));for(var a=t.length,n=0;n<a&&!e.closed;n++)e.next(t[n].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),r},t.prototype._getNow=function(){return(this.scheduler||i.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,o=this._windowTime,r=this._events,a=r.length,n=0;n<a&&!(e-r[n].time<o);)n++;return a>t&&(n=Math.max(n,a-t)),0<n&&r.splice(0,n),r},t}(n.Subject);o.ReplaySubject=c;var u=function(){return function(e,t){this.time=e,this.value=t}}()},{"./Subject":32,"./SubjectSubscription":33,"./Subscription":35,"./operator/observeOn":266,"./scheduler/queue":330,"./util/ObjectUnsubscribedError":346}],30:[function(e,t,o){"use strict";var r=e("./Subject");o.Subject=r.Subject,o.AnonymousSubject=r.AnonymousSubject;var a=e("./Observable");o.Observable=a.Observable,e("./add/observable/bindCallback"),e("./add/observable/bindNodeCallback"),e("./add/observable/combineLatest"),e("./add/observable/concat"),e("./add/observable/defer"),e("./add/observable/empty"),e("./add/observable/forkJoin"),e("./add/observable/from"),e("./add/observable/fromEvent"),e("./add/observable/fromEventPattern"),e("./add/observable/fromPromise"),e("./add/observable/generate"),e("./add/observable/if"),e("./add/observable/interval"),e("./add/observable/merge"),e("./add/observable/race"),e("./add/observable/never"),e("./add/observable/of"),e("./add/observable/onErrorResumeNext"),e("./add/observable/pairs"),e("./add/observable/range"),e("./add/observable/using"),e("./add/observable/throw"),e("./add/observable/timer"),e("./add/observable/zip"),e("./add/observable/dom/ajax"),e("./add/observable/dom/webSocket"),e("./add/operator/buffer"),e("./add/operator/bufferCount"),e("./add/operator/bufferTime"),e("./add/operator/bufferToggle"),e("./add/operator/bufferWhen"),e("./add/operator/catch"),e("./add/operator/combineAll"),e("./add/operator/combineLatest"),e("./add/operator/concat"),e("./add/operator/concatAll"),e("./add/operator/concatMap"),e("./add/operator/concatMapTo"),e("./add/operator/count"),e("./add/operator/dematerialize"),e("./add/operator/debounce"),e("./add/operator/debounceTime"),e("./add/operator/defaultIfEmpty"),e("./add/operator/delay"),e("./add/operator/delayWhen"),e("./add/operator/distinct"),e("./add/operator/distinctUntilChanged"),e("./add/operator/distinctUntilKeyChanged"),e("./add/operator/do"),e("./add/operator/exhaust"),e("./add/operator/exhaustMap"),e("./add/operator/expand"),e("./add/operator/elementAt"),e("./add/operator/filter"),e("./add/operator/finally"),e("./add/operator/find"),e("./add/operator/findIndex"),e("./add/operator/first"),e("./add/operator/groupBy"),e("./add/operator/ignoreElements"),e("./add/operator/isEmpty"),e("./add/operator/audit"),e("./add/operator/auditTime"),e("./add/operator/last"),e("./add/operator/let"),e("./add/operator/every"),e("./add/operator/map"),e("./add/operator/mapTo"),e("./add/operator/materialize"),e("./add/operator/max"),e("./add/operator/merge"),e("./add/operator/mergeAll"),e("./add/operator/mergeMap"),e("./add/operator/mergeMapTo"),e("./add/operator/mergeScan"),e("./add/operator/min"),e("./add/operator/multicast"),e("./add/operator/observeOn"),e("./add/operator/onErrorResumeNext"),e("./add/operator/pairwise"),e("./add/operator/partition"),e("./add/operator/pluck"),e("./add/operator/publish"),e("./add/operator/publishBehavior"),e("./add/operator/publishReplay"),e("./add/operator/publishLast"),e("./add/operator/race"),e("./add/operator/reduce"),e("./add/operator/repeat"),e("./add/operator/repeatWhen"),e("./add/operator/retry"),e("./add/operator/retryWhen"),e("./add/operator/sample"),e("./add/operator/sampleTime"),e("./add/operator/scan"),e("./add/operator/sequenceEqual"),e("./add/operator/share"),e("./add/operator/shareReplay"),e("./add/operator/single"),e("./add/operator/skip"),e("./add/operator/skipLast"),e("./add/operator/skipUntil"),e("./add/operator/skipWhile"),e("./add/operator/startWith"),e("./add/operator/subscribeOn"),e("./add/operator/switch"),e("./add/operator/switchMap"),e("./add/operator/switchMapTo"),e("./add/operator/take"),e("./add/operator/takeLast"),e("./add/operator/takeUntil"),e("./add/operator/takeWhile"),e("./add/operator/throttle"),e("./add/operator/throttleTime"),e("./add/operator/timeInterval"),e("./add/operator/timeout"),e("./add/operator/timeoutWith"),e("./add/operator/timestamp"),e("./add/operator/toArray"),e("./add/operator/toPromise"),e("./add/operator/window"),e("./add/operator/windowCount"),e("./add/operator/windowTime"),e("./add/operator/windowToggle"),e("./add/operator/windowWhen"),e("./add/operator/withLatestFrom"),e("./add/operator/zip"),e("./add/operator/zipAll");var n=e("./Subscription");o.Subscription=n.Subscription;var i=e("./Subscriber");o.Subscriber=i.Subscriber;var s=e("./AsyncSubject");o.AsyncSubject=s.AsyncSubject;var l=e("./ReplaySubject");o.ReplaySubject=l.ReplaySubject;var d=e("./BehaviorSubject");o.BehaviorSubject=d.BehaviorSubject;var p=e("./observable/ConnectableObservable");o.ConnectableObservable=p.ConnectableObservable;var c=e("./Notification");o.Notification=c.Notification;var u=e("./util/EmptyError");o.EmptyError=u.EmptyError;var b=e("./util/ArgumentOutOfRangeError");o.ArgumentOutOfRangeError=b.ArgumentOutOfRangeError;var m=e("./util/ObjectUnsubscribedError");o.ObjectUnsubscribedError=m.ObjectUnsubscribedError;var y=e("./util/TimeoutError");o.TimeoutError=y.TimeoutError;var f=e("./util/UnsubscriptionError");o.UnsubscriptionError=f.UnsubscriptionError;var _=e("./operator/timeInterval");o.TimeInterval=_.TimeInterval;var g=e("./operator/timestamp");o.Timestamp=g.Timestamp;var h=e("./testing/TestScheduler");o.TestScheduler=h.TestScheduler;var v=e("./scheduler/VirtualTimeScheduler");o.VirtualTimeScheduler=v.VirtualTimeScheduler;var x=e("./observable/dom/AjaxObservable");o.AjaxResponse=x.AjaxResponse,o.AjaxError=x.AjaxError,o.AjaxTimeoutError=x.AjaxTimeoutError;var S=e("./scheduler/asap"),O=e("./scheduler/async"),w=e("./scheduler/queue"),T=e("./scheduler/animationFrame"),P=e("./symbol/rxSubscriber"),k=e("./symbol/iterator"),C=e("./symbol/observable"),E={asap:S.asap,queue:w.queue,animationFrame:T.animationFrame,async:O.async};o.Scheduler=E;var D={rxSubscriber:P.rxSubscriber,observable:C.observable,iterator:k.iterator};o.Symbol=D},{"./AsyncSubject":22,"./BehaviorSubject":23,"./Notification":25,"./Observable":26,"./ReplaySubject":29,"./Subject":32,"./Subscriber":34,"./Subscription":35,"./add/observable/bindCallback":36,"./add/observable/bindNodeCallback":37,"./add/observable/combineLatest":38,"./add/observable/concat":39,"./add/observable/defer":40,"./add/observable/dom/ajax":41,"./add/observable/dom/webSocket":42,"./add/observable/empty":43,"./add/observable/forkJoin":44,"./add/observable/from":45,"./add/observable/fromEvent":46,"./add/observable/fromEventPattern":47,"./add/observable/fromPromise":48,"./add/observable/generate":49,"./add/observable/if":50,"./add/observable/interval":51,"./add/observable/merge":52,"./add/observable/never":53,"./add/observable/of":54,"./add/observable/onErrorResumeNext":55,"./add/observable/pairs":56,"./add/observable/race":57,"./add/observable/range":58,"./add/observable/throw":59,"./add/observable/timer":60,"./add/observable/using":61,"./add/observable/zip":62,"./add/operator/audit":63,"./add/operator/auditTime":64,"./add/operator/buffer":65,"./add/operator/bufferCount":66,"./add/operator/bufferTime":67,"./add/operator/bufferToggle":68,"./add/operator/bufferWhen":69,"./add/operator/catch":70,"./add/operator/combineAll":71,"./add/operator/combineLatest":72,"./add/operator/concat":73,"./add/operator/concatAll":74,"./add/operator/concatMap":75,"./add/operator/concatMapTo":76,"./add/operator/count":77,"./add/operator/debounce":78,"./add/operator/debounceTime":79,"./add/operator/defaultIfEmpty":80,"./add/operator/delay":81,"./add/operator/delayWhen":82,"./add/operator/dematerialize":83,"./add/operator/distinct":84,"./add/operator/distinctUntilChanged":85,"./add/operator/distinctUntilKeyChanged":86,"./add/operator/do":87,"./add/operator/elementAt":88,"./add/operator/every":89,"./add/operator/exhaust":90,"./add/operator/exhaustMap":91,"./add/operator/expand":92,"./add/operator/filter":93,"./add/operator/finally":94,"./add/operator/find":95,"./add/operator/findIndex":96,"./add/operator/first":97,"./add/operator/groupBy":98,"./add/operator/ignoreElements":99,"./add/operator/isEmpty":100,"./add/operator/last":101,"./add/operator/let":102,"./add/operator/map":103,"./add/operator/mapTo":104,"./add/operator/materialize":105,"./add/operator/max":106,"./add/operator/merge":107,"./add/operator/mergeAll":108,"./add/operator/mergeMap":109,"./add/operator/mergeMapTo":110,"./add/operator/mergeScan":111,"./add/operator/min":112,"./add/operator/multicast":113,"./add/operator/observeOn":114,"./add/operator/onErrorResumeNext":115,"./add/operator/pairwise":116,"./add/operator/partition":117,"./add/operator/pluck":118,"./add/operator/publish":119,"./add/operator/publishBehavior":120,"./add/operator/publishLast":121,"./add/operator/publishReplay":122,"./add/operator/race":123,"./add/operator/reduce":124,"./add/operator/repeat":125,"./add/operator/repeatWhen":126,"./add/operator/retry":127,"./add/operator/retryWhen":128,"./add/operator/sample":129,"./add/operator/sampleTime":130,"./add/operator/scan":131,"./add/operator/sequenceEqual":132,"./add/operator/share":133,"./add/operator/shareReplay":134,"./add/operator/single":135,"./add/operator/skip":136,"./add/operator/skipLast":137,"./add/operator/skipUntil":138,"./add/operator/skipWhile":139,"./add/operator/startWith":140,"./add/operator/subscribeOn":141,"./add/operator/switch":142,"./add/operator/switchMap":143,"./add/operator/switchMapTo":144,"./add/operator/take":145,"./add/operator/takeLast":146,"./add/operator/takeUntil":147,"./add/operator/takeWhile":148,"./add/operator/throttle":149,"./add/operator/throttleTime":150,"./add/operator/timeInterval":151,"./add/operator/timeout":152,"./add/operator/timeoutWith":153,"./add/operator/timestamp":154,"./add/operator/toArray":155,"./add/operator/toPromise":156,"./add/operator/window":157,"./add/operator/windowCount":158,"./add/operator/windowTime":159,"./add/operator/windowToggle":160,"./add/operator/windowWhen":161,"./add/operator/withLatestFrom":162,"./add/operator/zip":163,"./add/operator/zipAll":164,"./observable/ConnectableObservable":169,"./observable/dom/AjaxObservable":194,"./operator/timeInterval":303,"./operator/timestamp":306,"./scheduler/VirtualTimeScheduler":326,"./scheduler/animationFrame":327,"./scheduler/asap":328,"./scheduler/async":329,"./scheduler/queue":330,"./symbol/iterator":331,"./symbol/observable":332,"./symbol/rxSubscriber":333,"./testing/TestScheduler":338,"./util/ArgumentOutOfRangeError":340,"./util/EmptyError":341,"./util/ObjectUnsubscribedError":346,"./util/TimeoutError":348,"./util/UnsubscriptionError":349}],31:[function(e,t,o){"use strict";var r=function(){function e(t,o){void 0===o&&(o=e.now),this.SchedulerAction=t,this.now=o}return e.prototype.schedule=function(e,t,o){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(o,t)},e.now=Date.now?Date.now:function(){return+new Date},e}();o.Scheduler=r},{}],32:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./Observable"),n=e("./Subscriber"),i=e("./Subscription"),s=e("./util/ObjectUnsubscribedError"),l=e("./SubjectSubscription"),d=e("./symbol/rxSubscriber"),p=function(e){function t(t){e.call(this,t),this.destination=t}return r(t,e),t}(n.Subscriber);o.SubjectSubscriber=p;var c=function(e){function t(){e.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return r(t,e),t.prototype[d.rxSubscriber]=function(){return new p(this)},t.prototype.lift=function(e){var t=new u(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new s.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,o=t.length,r=t.slice(),a=0;a<o;a++)r[a].next(e)},t.prototype.error=function(e){if(this.closed)throw new s.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,o=t.length,r=t.slice(),a=0;a<o;a++)r[a].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new s.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,o=e.slice(),r=0;r<t;r++)o[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new s.ObjectUnsubscribedError;else return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new s.ObjectUnsubscribedError;else return this.hasError?(e.error(this.thrownError),i.Subscription.EMPTY):this.isStopped?(e.complete(),i.Subscription.EMPTY):(this.observers.push(e),new l.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new a.Observable;return e.source=this,e},t.create=function(e,t){return new u(e,t)},t}(a.Observable);o.Subject=c;var u=function(e){function t(t,o){e.call(this),this.destination=t,this.source=o}return r(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){var t=this.source;return t?this.source.subscribe(e):i.Subscription.EMPTY},t}(c);o.AnonymousSubject=u},{"./Observable":26,"./SubjectSubscription":33,"./Subscriber":34,"./Subscription":35,"./symbol/rxSubscriber":333,"./util/ObjectUnsubscribedError":346}],33:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./Subscription"),n=function(e){function t(t,o){e.call(this),this.subject=t,this.subscriber=o,this.closed=!1}return r(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,!(!t||0===t.length||e.isStopped||e.closed)){var o=t.indexOf(this.subscriber);-1!==o&&t.splice(o,1)}}},t}(a.Subscription);o.SubjectSubscription=n},{"./Subscription":35}],34:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./util/isFunction"),n=e("./Subscription"),i=e("./Observer"),s=e("./symbol/rxSubscriber"),l=function(e){function t(o,r,a){switch(e.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=i.empty;break;case 1:if(!o){this.destination=i.empty;break}if("object"==typeof o){o instanceof t?(this.destination=o,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new d(this,o));break}default:this.syncErrorThrowable=!0,this.destination=new d(this,o,r,a);}}return r(t,e),t.prototype[s.rxSubscriber]=function(){return this},t.create=function(e,o,r){var a=new t(e,o,r);return a.syncErrorThrowable=!1,a},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this,t=e._parent,o=e._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=o,this},t}(n.Subscription);o.Subscriber=l;var d=function(e){function t(t,o,r,n){e.call(this),this._parentSubscriber=t;var s=this,l;a.isFunction(o)?l=o:o&&(l=o.next,r=o.error,n=o.complete,o!==i.empty&&(s=Object.create(o),a.isFunction(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=l,this._error=r,this._complete=n}return r(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber;if(this._error)t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(!t.syncErrorThrowable)throw this.unsubscribe(),e;else t.syncErrorValue=e,t.syncErrorThrown=!0,this.unsubscribe()}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var o=function(){return e._complete.call(e._context)};t.syncErrorThrowable?(this.__tryOrSetError(t,o),this.unsubscribe()):(this.__tryOrUnsub(o),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){throw this.unsubscribe(),e}},t.prototype.__tryOrSetError=function(e,t,o){try{t.call(this._context,o)}catch(t){return e.syncErrorValue=t,e.syncErrorThrown=!0,!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(l)},{"./Observer":27,"./Subscription":35,"./symbol/rxSubscriber":333,"./util/isFunction":356}],35:[function(e,t,o){"use strict";function r(e){return e.reduce(function(e,t){return e.concat(t instanceof d.UnsubscriptionError?t.errors:t)},[])}var a=e("./util/isArray"),n=e("./util/isObject"),i=e("./util/isFunction"),s=e("./util/tryCatch"),l=e("./util/errorObject"),d=e("./util/UnsubscriptionError"),p=function(){function e(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var e=!1,t;if(!this.closed){var o=this,p=o._parent,c=o._parents,u=o._unsubscribe,b=o._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var m=-1,y=c?c.length:0;p;)p.remove(this),p=++m<y&&c[m]||null;if(i.isFunction(u)){var f=s.tryCatch(u).call(this);f===l.errorObject&&(e=!0,t=t||(l.errorObject.e instanceof d.UnsubscriptionError?r(l.errorObject.e.errors):[l.errorObject.e]))}if(a.isArray(b))for(m=-1,y=b.length;++m<y;){var _=b[m];if(n.isObject(_)){var f=s.tryCatch(_.unsubscribe).call(_);if(f===l.errorObject){e=!0,t=t||[];var g=l.errorObject.e;g instanceof d.UnsubscriptionError?t=t.concat(r(g.errors)):t.push(g)}}}if(e)throw new d.UnsubscriptionError(t)}},e.prototype.add=function(t){if(!t||t===e.EMPTY)return e.EMPTY;if(t===this)return this;var o=t;switch(typeof t){case"function":o=new e(t);case"object":if(o.closed||"function"!=typeof o.unsubscribe)return o;if(this.closed)return o.unsubscribe(),o;if("function"!=typeof o._addParent){var r=o;o=new e,o._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.");}var a=this._subscriptions||(this._subscriptions=[]);return a.push(o),o._addParent(this),o},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var o=t.indexOf(e);-1!==o&&t.splice(o,1)}},e.prototype._addParent=function(e){var t=this,o=t._parent,r=t._parents;o&&o!==e?r?-1===r.indexOf(e)&&r.push(e):this._parents=[e]:this._parent=e},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();o.Subscription=p},{"./util/UnsubscriptionError":349,"./util/errorObject":352,"./util/isArray":353,"./util/isFunction":356,"./util/isObject":358,"./util/tryCatch":366}],36:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/bindCallback");t.Observable.bindCallback=o.bindCallback},{"../../Observable":26,"../../observable/bindCallback":189}],37:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/bindNodeCallback");t.Observable.bindNodeCallback=o.bindNodeCallback},{"../../Observable":26,"../../observable/bindNodeCallback":190}],38:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/combineLatest");t.Observable.combineLatest=o.combineLatest},{"../../Observable":26,"../../observable/combineLatest":191}],39:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/concat");t.Observable.concat=o.concat},{"../../Observable":26,"../../observable/concat":192}],40:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/defer");t.Observable.defer=o.defer},{"../../Observable":26,"../../observable/defer":193}],41:[function(e){"use strict";var t=e("../../../Observable"),o=e("../../../observable/dom/ajax");t.Observable.ajax=o.ajax},{"../../../Observable":26,"../../../observable/dom/ajax":196}],42:[function(e){"use strict";var t=e("../../../Observable"),o=e("../../../observable/dom/webSocket");t.Observable.webSocket=o.webSocket},{"../../../Observable":26,"../../../observable/dom/webSocket":197}],43:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/empty");t.Observable.empty=o.empty},{"../../Observable":26,"../../observable/empty":198}],44:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/forkJoin");t.Observable.forkJoin=o.forkJoin},{"../../Observable":26,"../../observable/forkJoin":199}],45:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/from");t.Observable.from=o.from},{"../../Observable":26,"../../observable/from":200}],46:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/fromEvent");t.Observable.fromEvent=o.fromEvent},{"../../Observable":26,"../../observable/fromEvent":201}],47:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/fromEventPattern");t.Observable.fromEventPattern=o.fromEventPattern},{"../../Observable":26,"../../observable/fromEventPattern":202}],48:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/fromPromise");t.Observable.fromPromise=o.fromPromise},{"../../Observable":26,"../../observable/fromPromise":203}],49:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/GenerateObservable");t.Observable.generate=o.GenerateObservable.create},{"../../Observable":26,"../../observable/GenerateObservable":177}],50:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/if");t.Observable.if=o._if},{"../../Observable":26,"../../observable/if":204}],51:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/interval");t.Observable.interval=o.interval},{"../../Observable":26,"../../observable/interval":205}],52:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/merge");t.Observable.merge=o.merge},{"../../Observable":26,"../../observable/merge":206}],53:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/never");t.Observable.never=o.never},{"../../Observable":26,"../../observable/never":207}],54:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/of");t.Observable.of=o.of},{"../../Observable":26,"../../observable/of":208}],55:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/onErrorResumeNext");t.Observable.onErrorResumeNext=o.onErrorResumeNextStatic},{"../../Observable":26,"../../operator/onErrorResumeNext":267}],56:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/pairs");t.Observable.pairs=o.pairs},{"../../Observable":26,"../../observable/pairs":209}],57:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/race");t.Observable.race=o.raceStatic},{"../../Observable":26,"../../operator/race":275}],58:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/range");t.Observable.range=o.range},{"../../Observable":26,"../../observable/range":210}],59:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/throw");t.Observable.throw=o._throw},{"../../Observable":26,"../../observable/throw":211}],60:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/timer");t.Observable.timer=o.timer},{"../../Observable":26,"../../observable/timer":212}],61:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/using");t.Observable.using=o.using},{"../../Observable":26,"../../observable/using":213}],62:[function(e){"use strict";var t=e("../../Observable"),o=e("../../observable/zip");t.Observable.zip=o.zip},{"../../Observable":26,"../../observable/zip":214}],63:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/audit");t.Observable.prototype.audit=o.audit},{"../../Observable":26,"../../operator/audit":215}],64:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/auditTime");t.Observable.prototype.auditTime=o.auditTime},{"../../Observable":26,"../../operator/auditTime":216}],65:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/buffer");t.Observable.prototype.buffer=o.buffer},{"../../Observable":26,"../../operator/buffer":217}],66:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/bufferCount");t.Observable.prototype.bufferCount=o.bufferCount},{"../../Observable":26,"../../operator/bufferCount":218}],67:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/bufferTime");t.Observable.prototype.bufferTime=o.bufferTime},{"../../Observable":26,"../../operator/bufferTime":219}],68:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/bufferToggle");t.Observable.prototype.bufferToggle=o.bufferToggle},{"../../Observable":26,"../../operator/bufferToggle":220}],69:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/bufferWhen");t.Observable.prototype.bufferWhen=o.bufferWhen},{"../../Observable":26,"../../operator/bufferWhen":221}],70:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/catch");t.Observable.prototype.catch=o._catch,t.Observable.prototype._catch=o._catch},{"../../Observable":26,"../../operator/catch":222}],71:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/combineAll");t.Observable.prototype.combineAll=o.combineAll},{"../../Observable":26,"../../operator/combineAll":223}],72:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/combineLatest");t.Observable.prototype.combineLatest=o.combineLatest},{"../../Observable":26,"../../operator/combineLatest":224}],73:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/concat");t.Observable.prototype.concat=o.concat},{"../../Observable":26,"../../operator/concat":225}],74:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/concatAll");t.Observable.prototype.concatAll=o.concatAll},{"../../Observable":26,"../../operator/concatAll":226}],75:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/concatMap");t.Observable.prototype.concatMap=o.concatMap},{"../../Observable":26,"../../operator/concatMap":227}],76:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/concatMapTo");t.Observable.prototype.concatMapTo=o.concatMapTo},{"../../Observable":26,"../../operator/concatMapTo":228}],77:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/count");t.Observable.prototype.count=o.count},{"../../Observable":26,"../../operator/count":229}],78:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/debounce");t.Observable.prototype.debounce=o.debounce},{"../../Observable":26,"../../operator/debounce":230}],79:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/debounceTime");t.Observable.prototype.debounceTime=o.debounceTime},{"../../Observable":26,"../../operator/debounceTime":231}],80:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/defaultIfEmpty");t.Observable.prototype.defaultIfEmpty=o.defaultIfEmpty},{"../../Observable":26,"../../operator/defaultIfEmpty":232}],81:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/delay");t.Observable.prototype.delay=o.delay},{"../../Observable":26,"../../operator/delay":233}],82:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/delayWhen");t.Observable.prototype.delayWhen=o.delayWhen},{"../../Observable":26,"../../operator/delayWhen":234}],83:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/dematerialize");t.Observable.prototype.dematerialize=o.dematerialize},{"../../Observable":26,"../../operator/dematerialize":235}],84:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/distinct");t.Observable.prototype.distinct=o.distinct},{"../../Observable":26,"../../operator/distinct":236}],85:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/distinctUntilChanged");t.Observable.prototype.distinctUntilChanged=o.distinctUntilChanged},{"../../Observable":26,"../../operator/distinctUntilChanged":237}],86:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/distinctUntilKeyChanged");t.Observable.prototype.distinctUntilKeyChanged=o.distinctUntilKeyChanged},{"../../Observable":26,"../../operator/distinctUntilKeyChanged":238}],87:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/do");t.Observable.prototype.do=o._do,t.Observable.prototype._do=o._do},{"../../Observable":26,"../../operator/do":239}],88:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/elementAt");t.Observable.prototype.elementAt=o.elementAt},{"../../Observable":26,"../../operator/elementAt":240}],89:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/every");t.Observable.prototype.every=o.every},{"../../Observable":26,"../../operator/every":241}],90:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/exhaust");t.Observable.prototype.exhaust=o.exhaust},{"../../Observable":26,"../../operator/exhaust":242}],91:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/exhaustMap");t.Observable.prototype.exhaustMap=o.exhaustMap},{"../../Observable":26,"../../operator/exhaustMap":243}],92:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/expand");t.Observable.prototype.expand=o.expand},{"../../Observable":26,"../../operator/expand":244}],93:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/filter");t.Observable.prototype.filter=o.filter},{"../../Observable":26,"../../operator/filter":245}],94:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/finally");t.Observable.prototype.finally=o._finally,t.Observable.prototype._finally=o._finally},{"../../Observable":26,"../../operator/finally":246}],95:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/find");t.Observable.prototype.find=o.find},{"../../Observable":26,"../../operator/find":247}],96:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/findIndex");t.Observable.prototype.findIndex=o.findIndex},{"../../Observable":26,"../../operator/findIndex":248}],97:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/first");t.Observable.prototype.first=o.first},{"../../Observable":26,"../../operator/first":249}],98:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/groupBy");t.Observable.prototype.groupBy=o.groupBy},{"../../Observable":26,"../../operator/groupBy":250}],99:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/ignoreElements");t.Observable.prototype.ignoreElements=o.ignoreElements},{"../../Observable":26,"../../operator/ignoreElements":251}],100:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/isEmpty");t.Observable.prototype.isEmpty=o.isEmpty},{"../../Observable":26,"../../operator/isEmpty":252}],101:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/last");t.Observable.prototype.last=o.last},{"../../Observable":26,"../../operator/last":253}],102:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/let");t.Observable.prototype.let=o.letProto,t.Observable.prototype.letBind=o.letProto},{"../../Observable":26,"../../operator/let":254}],103:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/map");t.Observable.prototype.map=o.map},{"../../Observable":26,"../../operator/map":255}],104:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/mapTo");t.Observable.prototype.mapTo=o.mapTo},{"../../Observable":26,"../../operator/mapTo":256}],105:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/materialize");t.Observable.prototype.materialize=o.materialize},{"../../Observable":26,"../../operator/materialize":257}],106:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/max");t.Observable.prototype.max=o.max},{"../../Observable":26,"../../operator/max":258}],107:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/merge");t.Observable.prototype.merge=o.merge},{"../../Observable":26,"../../operator/merge":259}],108:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/mergeAll");t.Observable.prototype.mergeAll=o.mergeAll},{"../../Observable":26,"../../operator/mergeAll":260}],109:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/mergeMap");t.Observable.prototype.mergeMap=o.mergeMap,t.Observable.prototype.flatMap=o.mergeMap},{"../../Observable":26,"../../operator/mergeMap":261}],110:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/mergeMapTo");t.Observable.prototype.flatMapTo=o.mergeMapTo,t.Observable.prototype.mergeMapTo=o.mergeMapTo},{"../../Observable":26,"../../operator/mergeMapTo":262}],111:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/mergeScan");t.Observable.prototype.mergeScan=o.mergeScan},{"../../Observable":26,"../../operator/mergeScan":263}],112:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/min");t.Observable.prototype.min=o.min},{"../../Observable":26,"../../operator/min":264}],113:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/multicast");t.Observable.prototype.multicast=o.multicast},{"../../Observable":26,"../../operator/multicast":265}],114:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/observeOn");t.Observable.prototype.observeOn=o.observeOn},{"../../Observable":26,"../../operator/observeOn":266}],115:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/onErrorResumeNext");t.Observable.prototype.onErrorResumeNext=o.onErrorResumeNext},{"../../Observable":26,"../../operator/onErrorResumeNext":267}],116:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/pairwise");t.Observable.prototype.pairwise=o.pairwise},{"../../Observable":26,"../../operator/pairwise":268}],117:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/partition");t.Observable.prototype.partition=o.partition},{"../../Observable":26,"../../operator/partition":269}],118:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/pluck");t.Observable.prototype.pluck=o.pluck},{"../../Observable":26,"../../operator/pluck":270}],119:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/publish");t.Observable.prototype.publish=o.publish},{"../../Observable":26,"../../operator/publish":271}],120:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/publishBehavior");t.Observable.prototype.publishBehavior=o.publishBehavior},{"../../Observable":26,"../../operator/publishBehavior":272}],121:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/publishLast");t.Observable.prototype.publishLast=o.publishLast},{"../../Observable":26,"../../operator/publishLast":273}],122:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/publishReplay");t.Observable.prototype.publishReplay=o.publishReplay},{"../../Observable":26,"../../operator/publishReplay":274}],123:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/race");t.Observable.prototype.race=o.race},{"../../Observable":26,"../../operator/race":275}],124:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/reduce");t.Observable.prototype.reduce=o.reduce},{"../../Observable":26,"../../operator/reduce":276}],125:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/repeat");t.Observable.prototype.repeat=o.repeat},{"../../Observable":26,"../../operator/repeat":277}],126:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/repeatWhen");t.Observable.prototype.repeatWhen=o.repeatWhen},{"../../Observable":26,"../../operator/repeatWhen":278}],127:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/retry");t.Observable.prototype.retry=o.retry},{"../../Observable":26,"../../operator/retry":279}],128:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/retryWhen");t.Observable.prototype.retryWhen=o.retryWhen},{"../../Observable":26,"../../operator/retryWhen":280}],129:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/sample");t.Observable.prototype.sample=o.sample},{"../../Observable":26,"../../operator/sample":281}],130:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/sampleTime");t.Observable.prototype.sampleTime=o.sampleTime},{"../../Observable":26,"../../operator/sampleTime":282}],131:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/scan");t.Observable.prototype.scan=o.scan},{"../../Observable":26,"../../operator/scan":283}],132:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/sequenceEqual");t.Observable.prototype.sequenceEqual=o.sequenceEqual},{"../../Observable":26,"../../operator/sequenceEqual":284}],133:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/share");t.Observable.prototype.share=o.share},{"../../Observable":26,"../../operator/share":285}],134:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/shareReplay");t.Observable.prototype.shareReplay=o.shareReplay},{"../../Observable":26,"../../operator/shareReplay":286}],135:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/single");t.Observable.prototype.single=o.single},{"../../Observable":26,"../../operator/single":287}],136:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/skip");t.Observable.prototype.skip=o.skip},{"../../Observable":26,"../../operator/skip":288}],137:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/skipLast");t.Observable.prototype.skipLast=o.skipLast},{"../../Observable":26,"../../operator/skipLast":289}],138:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/skipUntil");t.Observable.prototype.skipUntil=o.skipUntil},{"../../Observable":26,"../../operator/skipUntil":290}],139:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/skipWhile");t.Observable.prototype.skipWhile=o.skipWhile},{"../../Observable":26,"../../operator/skipWhile":291}],140:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/startWith");t.Observable.prototype.startWith=o.startWith},{"../../Observable":26,"../../operator/startWith":292}],141:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/subscribeOn");t.Observable.prototype.subscribeOn=o.subscribeOn},{"../../Observable":26,"../../operator/subscribeOn":293}],142:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/switch");t.Observable.prototype.switch=o._switch,t.Observable.prototype._switch=o._switch},{"../../Observable":26,"../../operator/switch":294}],143:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/switchMap");t.Observable.prototype.switchMap=o.switchMap},{"../../Observable":26,"../../operator/switchMap":295}],144:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/switchMapTo");t.Observable.prototype.switchMapTo=o.switchMapTo},{"../../Observable":26,"../../operator/switchMapTo":296}],145:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/take");t.Observable.prototype.take=o.take},{"../../Observable":26,"../../operator/take":297}],146:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/takeLast");t.Observable.prototype.takeLast=o.takeLast},{"../../Observable":26,"../../operator/takeLast":298}],147:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/takeUntil");t.Observable.prototype.takeUntil=o.takeUntil},{"../../Observable":26,"../../operator/takeUntil":299}],148:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/takeWhile");t.Observable.prototype.takeWhile=o.takeWhile},{"../../Observable":26,"../../operator/takeWhile":300}],149:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/throttle");t.Observable.prototype.throttle=o.throttle},{"../../Observable":26,"../../operator/throttle":301}],150:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/throttleTime");t.Observable.prototype.throttleTime=o.throttleTime},{"../../Observable":26,"../../operator/throttleTime":302}],151:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/timeInterval");t.Observable.prototype.timeInterval=o.timeInterval},{"../../Observable":26,"../../operator/timeInterval":303}],152:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/timeout");t.Observable.prototype.timeout=o.timeout},{"../../Observable":26,"../../operator/timeout":304}],153:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/timeoutWith");t.Observable.prototype.timeoutWith=o.timeoutWith},{"../../Observable":26,"../../operator/timeoutWith":305}],154:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/timestamp");t.Observable.prototype.timestamp=o.timestamp},{"../../Observable":26,"../../operator/timestamp":306}],155:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/toArray");t.Observable.prototype.toArray=o.toArray},{"../../Observable":26,"../../operator/toArray":307}],156:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/toPromise");t.Observable.prototype.toPromise=o.toPromise},{"../../Observable":26,"../../operator/toPromise":308}],157:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/window");t.Observable.prototype.window=o.window},{"../../Observable":26,"../../operator/window":309}],158:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/windowCount");t.Observable.prototype.windowCount=o.windowCount},{"../../Observable":26,"../../operator/windowCount":310}],159:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/windowTime");t.Observable.prototype.windowTime=o.windowTime},{"../../Observable":26,"../../operator/windowTime":311}],160:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/windowToggle");t.Observable.prototype.windowToggle=o.windowToggle},{"../../Observable":26,"../../operator/windowToggle":312}],161:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/windowWhen");t.Observable.prototype.windowWhen=o.windowWhen},{"../../Observable":26,"../../operator/windowWhen":313}],162:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/withLatestFrom");t.Observable.prototype.withLatestFrom=o.withLatestFrom},{"../../Observable":26,"../../operator/withLatestFrom":314}],163:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/zip");t.Observable.prototype.zip=o.zipProto},{"../../Observable":26,"../../operator/zip":315}],164:[function(e){"use strict";var t=e("../../Observable"),o=e("../../operator/zipAll");t.Observable.prototype.zipAll=o.zipAll},{"../../Observable":26,"../../operator/zipAll":316}],165:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=e("./ScalarObservable"),i=e("./EmptyObservable"),s=function(e){function t(t,o){e.call(this),this.arrayLike=t,this.scheduler=o,o||1!==t.length||(this._isScalar=!0,this.value=t[0])}return r(t,e),t.create=function(e,o){var r=e.length;return 0===r?new i.EmptyObservable:1===r?new n.ScalarObservable(e[0],o):new t(e,o)},t.dispatch=function(e){var t=e.arrayLike,o=e.index,r=e.length,a=e.subscriber;return a.closed?void 0:o>=r?void a.complete():void(a.next(t[o]),e.index=o+1,this.schedule(e))},t.prototype._subscribe=function(e){var o=this,r=o.arrayLike,a=o.scheduler,n=r.length;if(a)return a.schedule(t.dispatch,0,{arrayLike:r,index:0,length:n,subscriber:e});for(var s=0;s<n&&!e.closed;s++)e.next(r[s]);e.complete()},t}(a.Observable);o.ArrayLikeObservable=s},{"../Observable":26,"./EmptyObservable":171,"./ScalarObservable":185}],166:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=e("./ScalarObservable"),i=e("./EmptyObservable"),s=e("../util/isScheduler"),l=function(e){function t(t,o){e.call(this),this.array=t,this.scheduler=o,o||1!==t.length||(this._isScalar=!0,this.value=t[0])}return r(t,e),t.create=function(e,o){return new t(e,o)},t.of=function(){for(var e=[],o=0;o<arguments.length;o++)e[o-0]=arguments[o];var r=e[e.length-1];s.isScheduler(r)?e.pop():r=null;var a=e.length;return 1<a?new t(e,r):1===a?new n.ScalarObservable(e[0],r):new i.EmptyObservable(r)},t.dispatch=function(e){var t=e.array,o=e.index,r=e.count,a=e.subscriber;return o>=r?void a.complete():void(a.next(t[o]),a.closed||(e.index=o+1,this.schedule(e)))},t.prototype._subscribe=function(e){var o=this.array,r=o.length,a=this.scheduler;if(a)return a.schedule(t.dispatch,0,{array:o,index:0,count:r,subscriber:e});for(var n=0;n<r&&!e.closed;n++)e.next(o[n]);e.complete()},t}(a.Observable);o.ArrayObservable=l},{"../Observable":26,"../util/isScheduler":360,"./EmptyObservable":171,"./ScalarObservable":185}],167:[function(e,t,o){"use strict";function r(e){var t=e.value,o=e.subject;o.next(t),o.complete()}function a(e){var t=e.err,o=e.subject;o.error(t)}var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},i=e("../Observable"),s=e("../util/tryCatch"),l=e("../util/errorObject"),d=e("../AsyncSubject"),p=function(e){function t(t,o,r,a,n){e.call(this),this.callbackFunc=t,this.selector=o,this.args=r,this.context=a,this.scheduler=n}/**
       * Converts a callback API to a function that returns an Observable.
       *
       * <span class="informal">Give it a function `f` of type `f(x, callback)` and
       * it will return a function `g` that when called as `g(x)` will output an
       * Observable.</span>
       *
       * `bindCallback` is not an operator because its input and output are not
       * Observables. The input is a function `func` with some parameters, but the
       * last parameter must be a callback function that `func` calls when it is
       * done.
       *
       * The output of `bindCallback` is a function that takes the same parameters
       * as `func`, except the last one (the callback). When the output function
       * is called with arguments, it will return an Observable. If `func` function
       * calls its callback with one argument, the Observable will emit that value.
       * If on the other hand callback is called with multiple values, resulting
       * Observable will emit an array with these arguments.
       *
       * It is very important to remember, that input function `func` is not called
       * when output function is, but rather when Observable returned by output
       * function is subscribed. This means if `func` makes AJAX request, that request
       * will be made every time someone subscribes to resulting Observable, but not before.
       *
       * Optionally, selector function can be passed to `bindObservable`. That function
       * takes the same arguments as callback, and returns value
       * that will be emitted by Observable instead of callback parameters themselves.
       * Even though by default multiple arguments passed to callback appear in the stream as array,
       * selector function will be called with arguments directly, just as callback would.
       * This means you can imagine default selector (when one is not provided explicitly)
       * as function that aggregates all its arguments into array, or simply returns first argument,
       * if there is only one.
       *
       * Last optional parameter - {@link Scheduler} - can be used to control when call
       * to `func` happens after someone subscribes to Observable, as well as when results
       * passed to callback will be emitted. By default subscription to Observable calls `func`
       * synchronously, but using `Scheduler.async` as last parameter will defer call to input function,
       * just like wrapping that call in `setTimeout` with time `0` would. So if you use async Scheduler
       * and call `subscribe` on output Observable, all function calls that are currently executing,
       * will end before `func` is invoked.
       *
       * When it comes to emitting results passed to callback, by default they are emitted
       * immediately after `func` invokes callback. In particular, if callback is called synchronously,
       * then subscription to resulting Observable will call `next` function synchronously as well.
       * If you want to defer that call, using `Scheduler.async` will, again, do the job.
       * This means that by using `Scheduler.async` you can, in a sense, ensure that `func`
       * always calls its callback asynchronously, thus avoiding terrifying Zalgo.
       *
       * Note that Observable created by output function will always emit only one value
       * and then complete right after. Even if `func` calls callback multiple times, values from
       * second and following calls will never appear in the stream. If you need to
       * listen for multiple calls, you probably want to use {@link fromEvent} or
       * {@link fromEventPattern} instead.
       *
       * If `func` depends on some context (`this` property), that context will be set
       * to the same context that output function has at call time. In particular, if `func`
       * is called as method of some object, in order to preserve proper behaviour,
       * it is recommended to set context of output function to that object as well,
       * provided `func` is not already bound.
       *
       * If input function calls its callback in "node style" (i.e. first argument to callback is
       * optional error parameter signaling whether call failed or not), {@link bindNodeCallback}
       * provides convenient error handling and probably is a better choice.
       * `bindCallback` will treat such functions without any difference and error parameter
       * (whether passed or not) will always be interpreted as regular callback argument.
       *
       *
       * @example <caption>Convert jQuery's getJSON to an Observable API</caption>
       * // Suppose we have jQuery.getJSON('/my/url', callback)
       * var getJSONAsObservable = Rx.Observable.bindCallback(jQuery.getJSON);
       * var result = getJSONAsObservable('/my/url');
       * result.subscribe(x => console.log(x), e => console.error(e));
       *
       *
       * @example <caption>Receive array of arguments passed to callback</caption>
       * someFunction((a, b, c) => {
       *   console.log(a); // 5
       *   console.log(b); // 'some string'
       *   console.log(c); // {someProperty: 'someValue'}
       * });
       *
       * const boundSomeFunction = Rx.Observable.bindCallback(someFunction);
       * boundSomeFunction().subscribe(values => {
       *   console.log(values) // [5, 'some string', {someProperty: 'someValue'}]
       * });
       *
       *
       * @example <caption>Use bindCallback with selector function</caption>
       * someFunction((a, b, c) => {
       *   console.log(a); // 'a'
       *   console.log(b); // 'b'
       *   console.log(c); // 'c'
       * });
       *
       * const boundSomeFunction = Rx.Observable.bindCallback(someFunction, (a, b, c) => a + b + c);
       * boundSomeFunction().subscribe(value => {
       *   console.log(value) // 'abc'
       * });
       *
       *
       * @example <caption>Compare behaviour with and without async Scheduler</caption>
       * function iCallMyCallbackSynchronously(cb) {
       *   cb();
       * }
       *
       * const boundSyncFn = Rx.Observable.bindCallback(iCallMyCallbackSynchronously);
       * const boundAsyncFn = Rx.Observable.bindCallback(iCallMyCallbackSynchronously, null, Rx.Scheduler.async);
       *
       * boundSyncFn().subscribe(() => console.log('I was sync!'));
       * boundAsyncFn().subscribe(() => console.log('I was async!'));
       * console.log('This happened...');
       *
       * // Logs:
       * // I was sync!
       * // This happened...
       * // I was async!
       *
       *
       * @example <caption>Use bindCallback on object method</caption>
       * const boundMethod = Rx.Observable.bindCallback(someObject.methodWithCallback);
       * boundMethod.call(someObject) // make sure methodWithCallback has access to someObject
       * .subscribe(subscriber);
       *
       *
       * @see {@link bindNodeCallback}
       * @see {@link from}
       * @see {@link fromPromise}
       *
       * @param {function} func Function with a callback as the last parameter.
       * @param {function} [selector] A function which takes the arguments from the
       * callback and maps those to a value to emit on the output Observable.
       * @param {Scheduler} [scheduler] The scheduler on which to schedule the
       * callbacks.
       * @return {function(...params: *): Observable} A function which returns the
       * Observable that delivers the same values the callback would deliver.
       * @static true
       * @name bindCallback
       * @owner Observable
       */return n(t,e),t.create=function(e,o,r){return void 0===o&&(o=void 0),function(){for(var a=[],n=0;n<arguments.length;n++)a[n-0]=arguments[n];return new t(e,o,a,this,r)}},t.prototype._subscribe=function(e){var o=this.callbackFunc,r=this.args,a=this.scheduler,n=this.subject;if(!a){if(!n){n=this.subject=new d.AsyncSubject;var i=function e(){for(var t=[],o=0;o<arguments.length;o++)t[o-0]=arguments[o];var r=e.source,a=r.selector,n=r.subject;if(a){var i=s.tryCatch(a).apply(this,t);i===l.errorObject?n.error(l.errorObject.e):(n.next(i),n.complete())}else n.next(1>=t.length?t[0]:t),n.complete()};i.source=this;var p=s.tryCatch(o).apply(this.context,r.concat(i));p===l.errorObject&&n.error(l.errorObject.e)}return n.subscribe(e)}return a.schedule(t.dispatch,0,{source:this,subscriber:e,context:this.context})},t.dispatch=function(e){var t=this,o=e.source,n=e.subscriber,i=e.context,p=o.callbackFunc,c=o.args,u=o.scheduler,b=o.subject;if(!b){b=o.subject=new d.AsyncSubject;var m=function e(){for(var o=[],n=0;n<arguments.length;n++)o[n-0]=arguments[n];var i=e.source,d=i.selector,p=i.subject;if(d){var c=s.tryCatch(d).apply(this,o);c===l.errorObject?t.add(u.schedule(a,0,{err:l.errorObject.e,subject:p})):t.add(u.schedule(r,0,{value:c,subject:p}))}else{var b=1>=o.length?o[0]:o;t.add(u.schedule(r,0,{value:b,subject:p}))}};m.source=o;var y=s.tryCatch(p).apply(i,c.concat(m));y===l.errorObject&&b.error(l.errorObject.e)}t.add(b.subscribe(n))},t}(i.Observable);o.BoundCallbackObservable=p},{"../AsyncSubject":22,"../Observable":26,"../util/errorObject":352,"../util/tryCatch":366}],168:[function(e,t,o){"use strict";function r(e){var t=this,o=e.source,r=e.subscriber,i=e.context,s=o,c=s.callbackFunc,u=s.args,b=s.scheduler,m=o.subject;if(!m){m=o.subject=new p.AsyncSubject;var y=function e(){for(var o=[],r=0;r<arguments.length;r++)o[r-0]=arguments[r];var i=e.source,s=i.selector,p=i.subject,c=o.shift();if(c)t.add(b.schedule(n,0,{err:c,subject:p}));else if(s){var u=l.tryCatch(s).apply(this,o);u===d.errorObject?t.add(b.schedule(n,0,{err:d.errorObject.e,subject:p})):t.add(b.schedule(a,0,{value:u,subject:p}))}else{var m=1>=o.length?o[0]:o;t.add(b.schedule(a,0,{value:m,subject:p}))}};y.source=o;var f=l.tryCatch(c).apply(i,u.concat(y));f===d.errorObject&&t.add(b.schedule(n,0,{err:d.errorObject.e,subject:m}))}t.add(m.subscribe(r))}function a(e){var t=e.value,o=e.subject;o.next(t),o.complete()}function n(e){var t=e.err,o=e.subject;o.error(t)}var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},s=e("../Observable"),l=e("../util/tryCatch"),d=e("../util/errorObject"),p=e("../AsyncSubject"),c=function(e){function t(t,o,r,a,n){e.call(this),this.callbackFunc=t,this.selector=o,this.args=r,this.context=a,this.scheduler=n}return i(t,e),t.create=function(e,o,r){return void 0===o&&(o=void 0),function(){for(var a=[],n=0;n<arguments.length;n++)a[n-0]=arguments[n];return new t(e,o,a,this,r)}},t.prototype._subscribe=function(e){var t=this.callbackFunc,o=this.args,a=this.scheduler,n=this.subject;if(!a){if(!n){n=this.subject=new p.AsyncSubject;var i=function e(){for(var t=[],o=0;o<arguments.length;o++)t[o-0]=arguments[o];var r=e.source,a=r.selector,n=r.subject,i=t.shift();if(i)n.error(i);else if(a){var s=l.tryCatch(a).apply(this,t);s===d.errorObject?n.error(d.errorObject.e):(n.next(s),n.complete())}else n.next(1>=t.length?t[0]:t),n.complete()};i.source=this;var s=l.tryCatch(t).apply(this.context,o.concat(i));s===d.errorObject&&n.error(d.errorObject.e)}return n.subscribe(e)}return a.schedule(r,0,{source:this,subscriber:e,context:this.context})},t}(s.Observable);o.BoundNodeCallbackObservable=c},{"../AsyncSubject":22,"../Observable":26,"../util/errorObject":352,"../util/tryCatch":366}],169:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subject"),n=e("../Observable"),i=e("../Subscriber"),s=e("../Subscription"),l=function(e){function t(t,o){e.call(this),this.source=t,this.subjectFactory=o,this._refCount=0,this._isComplete=!1}return r(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,e=this._connection=new s.Subscription,e.add(this.source.subscribe(new p(this.getSubject(),this))),e.closed?(this._connection=null,e=s.Subscription.EMPTY):this._connection=e),e},t.prototype.refCount=function(){return this.lift(new c(this))},t}(n.Observable);o.ConnectableObservable=l;var d=l.prototype;o.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:d._subscribe},_isComplete:{value:d._isComplete,writable:!0},getSubject:{value:d.getSubject},connect:{value:d.connect},refCount:{value:d.refCount}};var p=function(e){function t(t,o){e.call(this,t),this.connectable=o}return r(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber),c=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var o=this.connectable;o._refCount++;var r=new u(e,o),a=t.subscribe(r);return r.closed||(r.connection=o.connect()),a},e}(),u=function(e){function t(t,o){e.call(this,t),this.connectable=o}return r(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e)return void(this.connection=null);this.connectable=null;var t=e._refCount;if(0>=t)return void(this.connection=null);if(e._refCount=t-1,1<t)return void(this.connection=null);var o=this.connection,r=e._connection;this.connection=null,r&&(!o||r===o)&&r.unsubscribe()},t}(i.Subscriber)},{"../Observable":26,"../Subject":32,"../Subscriber":34,"../Subscription":35}],170:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=e("../util/subscribeToResult"),i=e("../OuterSubscriber"),s=function(e){function t(t){e.call(this),this.observableFactory=t}return r(t,e),t.create=function(e){return new t(e)},t.prototype._subscribe=function(e){return new l(e,this.observableFactory)},t}(a.Observable);o.DeferObservable=s;var l=function(e){function t(t,o){e.call(this,t),this.factory=o,this.tryDefer()}return r(t,e),t.prototype.tryDefer=function(){try{this._callFactory()}catch(e){this._error(e)}},t.prototype._callFactory=function(){var e=this.factory();e&&this.add(n.subscribeToResult(this,e))},t}(i.OuterSubscriber)},{"../Observable":26,"../OuterSubscriber":28,"../util/subscribeToResult":364}],171:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=function(e){function t(t){e.call(this),this.scheduler=t}return r(t,e),t.create=function(e){return new t(e)},t.dispatch=function(e){var t=e.subscriber;t.complete()},t.prototype._subscribe=function(e){var o=this.scheduler;return o?o.schedule(t.dispatch,0,{subscriber:e}):void e.complete()},t}(a.Observable);o.EmptyObservable=n},{"../Observable":26}],172:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=function(e){function t(t,o){e.call(this),this.error=t,this.scheduler=o}return r(t,e),t.create=function(e,o){return new t(e,o)},t.dispatch=function(e){var t=e.error,o=e.subscriber;o.error(t)},t.prototype._subscribe=function(e){var o=this.error,r=this.scheduler;return e.syncErrorThrowable=!0,r?r.schedule(t.dispatch,0,{error:o,subscriber:e}):void e.error(o)},t}(a.Observable);o.ErrorObservable=n},{"../Observable":26}],173:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=e("./EmptyObservable"),i=e("../util/isArray"),s=e("../util/subscribeToResult"),l=e("../OuterSubscriber"),d=function(e){function t(t,o){e.call(this),this.sources=t,this.resultSelector=o}return r(t,e),t.create=function(){for(var e=[],o=0;o<arguments.length;o++)e[o-0]=arguments[o];if(null===e||0===arguments.length)return new n.EmptyObservable;var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&i.isArray(e[0])&&(e=e[0]),0===e.length?new n.EmptyObservable:new t(e,r)},t.prototype._subscribe=function(e){return new p(e,this.sources,this.resultSelector)},t}(a.Observable);o.ForkJoinObservable=d;var p=function(e){function t(t,o,r){e.call(this,t),this.sources=o,this.resultSelector=r,this.completed=0,this.haveValues=0;var a=o.length;this.total=a,this.values=Array(a);for(var n=0;n<a;n++){var i=o[n],l=s.subscribeToResult(this,i,null,n);l&&(l.outerIndex=n,this.add(l))}}return r(t,e),t.prototype.notifyNext=function(e,t,o,r,a){this.values[o]=t,a._hasValue||(a._hasValue=!0,this.haveValues++)},t.prototype.notifyComplete=function(e){var t=this.destination,o=this,r=o.haveValues,a=o.resultSelector,n=o.values,i=n.length;if(!e._hasValue)return void t.complete();if(this.completed++,this.completed===i){if(r===i){var s=a?a.apply(this,n):n;t.next(s)}t.complete()}},t}(l.OuterSubscriber)},{"../Observable":26,"../OuterSubscriber":28,"../util/isArray":353,"../util/subscribeToResult":364,"./EmptyObservable":171}],174:[function(e,t,o){"use strict";function r(e){return!!e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}function a(e){return!!e&&"function"==typeof e.on&&"function"==typeof e.off}function n(e){return!!e&&"[object NodeList]"===m.call(e)}function s(e){return!!e&&"[object HTMLCollection]"===m.call(e)}function l(e){return!!e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},d=e("../Observable"),p=e("../util/tryCatch"),c=e("../util/isFunction"),u=e("../util/errorObject"),b=e("../Subscription"),m=Object.prototype.toString,y=function(e){function t(t,o,r,a){e.call(this),this.sourceObj=t,this.eventName=o,this.selector=r,this.options=a}return i(t,e),t.create=function(e,o,r,a){return c.isFunction(r)&&(a=r,r=void 0),new t(e,o,a,r)},t.setupSubscription=function(e,o,d,p,c){var u;if(n(e)||s(e))for(var m=0,i=e.length;m<i;m++)t.setupSubscription(e[m],o,d,p,c);else if(l(e)){e.addEventListener(o,d,c),u=function(){return e.removeEventListener(o,d)}}else if(a(e)){e.on(o,d),u=function(){return e.off(o,d)}}else if(r(e)){e.addListener(o,d),u=function(){return e.removeListener(o,d)}}else throw new TypeError("Invalid event target");p.add(new b.Subscription(u))},t.prototype._subscribe=function(o){var e=this.sourceObj,r=this.eventName,a=this.options,n=this.selector,i=n?function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var r=p.tryCatch(n).apply(void 0,e);r===u.errorObject?o.error(u.errorObject.e):o.next(r)}:function(t){return o.next(t)};t.setupSubscription(e,r,i,o,a)},t}(d.Observable);o.FromEventObservable=y},{"../Observable":26,"../Subscription":35,"../util/errorObject":352,"../util/isFunction":356,"../util/tryCatch":366}],175:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../util/isFunction"),n=e("../Observable"),i=e("../Subscription"),s=function(e){function t(t,o,r){e.call(this),this.addHandler=t,this.removeHandler=o,this.selector=r}return r(t,e),t.create=function(e,o,r){return new t(e,o,r)},t.prototype._subscribe=function(t){var e=this,o=this.removeHandler,r=this.selector?function(){for(var o=[],r=0;r<arguments.length;r++)o[r-0]=arguments[r];e._callSelector(t,o)}:function(o){t.next(o)},n=this._callAddHandler(r,t);a.isFunction(o)&&t.add(new i.Subscription(function(){o(r,n)}))},t.prototype._callSelector=function(t,e){try{var o=this.selector.apply(this,e);t.next(o)}catch(o){t.error(o)}},t.prototype._callAddHandler=function(e,t){try{return this.addHandler(e)||null}catch(o){t.error(o)}},t}(n.Observable);o.FromEventPatternObservable=s},{"../Observable":26,"../Subscription":35,"../util/isFunction":356}],176:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../util/isArray"),n=e("../util/isArrayLike"),i=e("../util/isPromise"),s=e("./PromiseObservable"),l=e("./IteratorObservable"),d=e("./ArrayObservable"),p=e("./ArrayLikeObservable"),c=e("../symbol/iterator"),u=e("../Observable"),b=e("../operator/observeOn"),m=e("../symbol/observable"),y=function(e){function t(t,o){e.call(this,null),this.ish=t,this.scheduler=o}return r(t,e),t.create=function(e,o){if(null!=e){if("function"==typeof e[m.observable])return e instanceof u.Observable&&!o?e:new t(e,o);if(a.isArray(e))return new d.ArrayObservable(e,o);if(i.isPromise(e))return new s.PromiseObservable(e,o);if("function"==typeof e[c.iterator]||"string"==typeof e)return new l.IteratorObservable(e,o);if(n.isArrayLike(e))return new p.ArrayLikeObservable(e,o)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")},t.prototype._subscribe=function(e){var t=this.ish,o=this.scheduler;return null==o?t[m.observable]().subscribe(e):t[m.observable]().subscribe(new b.ObserveOnSubscriber(e,o,0))},t}(u.Observable);o.FromObservable=y},{"../Observable":26,"../operator/observeOn":266,"../symbol/iterator":331,"../symbol/observable":332,"../util/isArray":353,"../util/isArrayLike":354,"../util/isPromise":359,"./ArrayLikeObservable":165,"./ArrayObservable":166,"./IteratorObservable":180,"./PromiseObservable":183}],177:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=e("../util/isScheduler"),i=function(e){return e},s=function(e){function t(t,o,r,a,n){e.call(this),this.initialState=t,this.condition=o,this.iterate=r,this.resultSelector=a,this.scheduler=n}return r(t,e),t.create=function(e,o,r,a,s){return 1==arguments.length?new t(e.initialState,e.condition,e.iterate,e.resultSelector||i,e.scheduler):void 0===a||n.isScheduler(a)?new t(e,o,r,i,a):new t(e,o,r,a,s)},t.prototype._subscribe=function(e){var o=this.initialState;if(this.scheduler)return this.scheduler.schedule(t.dispatch,0,{subscriber:e,iterate:this.iterate,condition:this.condition,resultSelector:this.resultSelector,state:o});var r=this,a=r.condition,n=r.resultSelector,i=r.iterate;do{if(a){var s=void 0;try{s=a(o)}catch(t){return void e.error(t)}if(!s){e.complete();break}}var l=void 0;try{l=n(o)}catch(t){return void e.error(t)}if(e.next(l),e.closed)break;try{o=i(o)}catch(t){return void e.error(t)}}while(!0)},t.dispatch=function(e){var t=e.subscriber,o=e.condition;if(!t.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(e){return void t.error(e)}else e.needIterate=!0;if(o){var r;try{r=o(e.state)}catch(e){return void t.error(e)}if(!r)return void t.complete();if(t.closed)return}var a;try{a=e.resultSelector(e.state)}catch(e){return void t.error(e)}if(!t.closed)return t.next(a),t.closed?void 0:this.schedule(e)}},t}(a.Observable);o.GenerateObservable=s},{"../Observable":26,"../util/isScheduler":360}],178:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=e("../util/subscribeToResult"),i=e("../OuterSubscriber"),s=function(e){function t(t,o,r){e.call(this),this.condition=t,this.thenSource=o,this.elseSource=r}return r(t,e),t.create=function(e,o,r){return new t(e,o,r)},t.prototype._subscribe=function(e){var t=this,o=t.condition,r=t.thenSource,a=t.elseSource;return new l(e,o,r,a)},t}(a.Observable);o.IfObservable=s;var l=function(e){function t(t,o,r,a){e.call(this,t),this.condition=o,this.thenSource=r,this.elseSource=a,this.tryIf()}return r(t,e),t.prototype.tryIf=function(){var e=this,t=e.condition,o=e.thenSource,r=e.elseSource,a;try{a=t();var i=a?o:r;i?this.add(n.subscribeToResult(this,i)):this._complete()}catch(e){this._error(e)}},t}(i.OuterSubscriber)},{"../Observable":26,"../OuterSubscriber":28,"../util/subscribeToResult":364}],179:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../util/isNumeric"),n=e("../Observable"),i=e("../scheduler/async"),s=function(e){function t(t,o){void 0===t&&(t=0),void 0===o&&(o=i.async),e.call(this),this.period=t,this.scheduler=o,(!a.isNumeric(t)||0>t)&&(this.period=0),o&&"function"==typeof o.schedule||(this.scheduler=i.async)}return r(t,e),t.create=function(e,o){return void 0===e&&(e=0),void 0===o&&(o=i.async),new t(e,o)},t.dispatch=function(e){var t=e.index,o=e.subscriber,r=e.period;o.next(t),o.closed||(e.index+=1,this.schedule(e,r))},t.prototype._subscribe=function(e){var o=this.period,r=this.scheduler;e.add(r.schedule(t.dispatch,o,{index:0,subscriber:e,period:o}))},t}(n.Observable);o.IntervalObservable=s},{"../Observable":26,"../scheduler/async":329,"../util/isNumeric":357}],180:[function(e,t,o){"use strict";function r(e){var t=e[p.iterator];if(!t&&"string"==typeof e)return new u(e);if(!t&&void 0!==e.length)return new b(e);if(!t)throw new TypeError("object is not iterable");return e[p.iterator]()}function a(e){var t=+e.length;return isNaN(t)?0:0!=t&&n(t)?(t=i(t)*Math.floor(Math.abs(t)),0>=t?0:t>m?m:t):t}function n(e){return"number"==typeof e&&l.root.isFinite(e)}function i(e){var t=+e;return 0==t?t:isNaN(t)?t:0>t?-1:1}var s=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},l=e("../util/root"),d=e("../Observable"),p=e("../symbol/iterator"),c=function(e){function t(t,o){if(e.call(this),this.scheduler=o,null==t)throw new Error("iterator cannot be null.");this.iterator=r(t)}return s(t,e),t.create=function(e,o){return new t(e,o)},t.dispatch=function(e){var t=e.index,o=e.hasError,r=e.iterator,a=e.subscriber;if(o)return void a.error(e.error);var n=r.next();return n.done?void a.complete():(a.next(n.value),e.index=t+1,a.closed?void("function"==typeof r.return&&r.return()):void this.schedule(e))},t.prototype._subscribe=function(e){var o=this,r=o.iterator,a=o.scheduler;if(a)return a.schedule(t.dispatch,0,{index:0,iterator:r,subscriber:e});do{var n=r.next();if(n.done){e.complete();break}else e.next(n.value);if(e.closed){"function"==typeof r.return&&r.return();break}}while(!0)},t}(d.Observable);o.IteratorObservable=c;var u=function(){function e(e,t,o){void 0===t&&(t=0),void 0===o&&(o=e.length),this.str=e,this.idx=t,this.len=o}return e.prototype[p.iterator]=function(){return this},e.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},e}(),b=function(){function e(e,t,o){void 0===t&&(t=0),void 0===o&&(o=a(e)),this.arr=e,this.idx=t,this.len=o}return e.prototype[p.iterator]=function(){return this},e.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},e}(),m=9007199254740991},{"../Observable":26,"../symbol/iterator":331,"../util/root":363}],181:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=e("../util/noop"),i=function(e){function t(){e.call(this)}return r(t,e),t.create=function(){return new t},t.prototype._subscribe=function(){n.noop()},t}(a.Observable);o.NeverObservable=i},{"../Observable":26,"../util/noop":361}],182:[function(e,t,o){"use strict";function r(e){var t=e.obj,o=e.keys,r=e.length,a=e.index,n=e.subscriber;if(a===r)return void n.complete();var i=o[a];n.next([i,t[i]]),e.index=a+1,this.schedule(e)}var a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../Observable"),i=function(e){function t(t,o){e.call(this),this.obj=t,this.scheduler=o,this.keys=Object.keys(t)}return a(t,e),t.create=function(e,o){return new t(e,o)},t.prototype._subscribe=function(e){var t=this,o=t.keys,a=t.scheduler,n=o.length;if(a)return a.schedule(r,0,{obj:this.obj,keys:o,length:n,index:0,subscriber:e});for(var i=0,s;i<n;i++)s=o[i],e.next([s,this.obj[s]]);e.complete()},t}(n.Observable);o.PairsObservable=i},{"../Observable":26}],183:[function(e,t,o){"use strict";function r(e){var t=e.value,o=e.subscriber;o.closed||(o.next(t),o.complete())}function a(e){var t=e.err,o=e.subscriber;o.closed||o.error(t)}var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},i=e("../util/root"),s=e("../Observable"),l=function(e){function t(t,o){e.call(this),this.promise=t,this.scheduler=o}return n(t,e),t.create=function(e,o){return new t(e,o)},t.prototype._subscribe=function(e){var t=this,o=this.promise,n=this.scheduler;if(null==n)this._isScalar?!e.closed&&(e.next(this.value),e.complete()):o.then(function(o){t.value=o,t._isScalar=!0,e.closed||(e.next(o),e.complete())},function(t){e.closed||e.error(t)}).then(null,function(e){i.root.setTimeout(function(){throw e})});else if(!this._isScalar)o.then(function(o){t.value=o,t._isScalar=!0,e.closed||e.add(n.schedule(r,0,{value:o,subscriber:e}))},function(t){e.closed||e.add(n.schedule(a,0,{err:t,subscriber:e}))}).then(null,function(e){i.root.setTimeout(function(){throw e})});else if(!e.closed)return n.schedule(r,0,{value:this.value,subscriber:e})},t}(s.Observable);o.PromiseObservable=l},{"../Observable":26,"../util/root":363}],184:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=function(e){function t(t,o,r){e.call(this),this.start=t,this._count=o,this.scheduler=r}return r(t,e),t.create=function(e,o,r){return void 0===e&&(e=0),void 0===o&&(o=0),new t(e,o,r)},t.dispatch=function(e){var t=e.start,o=e.index,r=e.count,a=e.subscriber;return o>=r?void a.complete():void(a.next(t),a.closed||(e.index=o+1,e.start=t+1,this.schedule(e)))},t.prototype._subscribe=function(e){var o=0,r=this.start,a=this._count,n=this.scheduler;if(n)return n.schedule(t.dispatch,0,{index:o,count:a,start:r,subscriber:e});do{if(o++>=a){e.complete();break}if(e.next(r++),e.closed)break}while(!0)},t}(a.Observable);o.RangeObservable=n},{"../Observable":26}],185:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=function(e){function t(t,o){e.call(this),this.value=t,this.scheduler=o,this._isScalar=!0,o&&(this._isScalar=!1)}return r(t,e),t.create=function(e,o){return new t(e,o)},t.dispatch=function(e){var t=e.done,o=e.value,r=e.subscriber;return t?void r.complete():void(r.next(o),r.closed||(e.done=!0,this.schedule(e)))},t.prototype._subscribe=function(e){var o=this.value,r=this.scheduler;return r?r.schedule(t.dispatch,0,{done:!1,value:o,subscriber:e}):void(e.next(o),e.closed||e.complete())},t}(a.Observable);o.ScalarObservable=n},{"../Observable":26}],186:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=e("../scheduler/asap"),i=e("../util/isNumeric"),s=function(e){function t(t,o,r){void 0===o&&(o=0),void 0===r&&(r=n.asap),e.call(this),this.source=t,this.delayTime=o,this.scheduler=r,(!i.isNumeric(o)||0>o)&&(this.delayTime=0),r&&"function"==typeof r.schedule||(this.scheduler=n.asap)}return r(t,e),t.create=function(e,o,r){return void 0===o&&(o=0),void 0===r&&(r=n.asap),new t(e,o,r)},t.dispatch=function(e){var t=e.source,o=e.subscriber;return this.add(t.subscribe(o))},t.prototype._subscribe=function(e){var o=this.delayTime,r=this.source,a=this.scheduler;return a.schedule(t.dispatch,o,{source:r,subscriber:e})},t}(a.Observable);o.SubscribeOnObservable=s},{"../Observable":26,"../scheduler/asap":328,"../util/isNumeric":357}],187:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../util/isNumeric"),n=e("../Observable"),i=e("../scheduler/async"),s=e("../util/isScheduler"),l=e("../util/isDate"),d=function(e){function t(t,o,r){void 0===t&&(t=0),e.call(this),this.period=-1,this.dueTime=0,a.isNumeric(o)?this.period=1>+o&&1||+o:s.isScheduler(o)&&(r=o),s.isScheduler(r)||(r=i.async),this.scheduler=r,this.dueTime=l.isDate(t)?+t-this.scheduler.now():t}return r(t,e),t.create=function(e,o,r){return void 0===e&&(e=0),new t(e,o,r)},t.dispatch=function(e){var t=e.index,o=e.period,r=e.subscriber,a=this;if(r.next(t),!r.closed)return-1===o?r.complete():void(e.index=t+1,a.schedule(e,o))},t.prototype._subscribe=function(e){var o=this,r=o.period,a=o.dueTime,n=o.scheduler;return n.schedule(t.dispatch,a,{index:0,period:r,subscriber:e})},t}(n.Observable);o.TimerObservable=d},{"../Observable":26,"../scheduler/async":329,"../util/isDate":355,"../util/isNumeric":357,"../util/isScheduler":360}],188:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=e("../util/subscribeToResult"),i=e("../OuterSubscriber"),s=function(e){function t(t,o){e.call(this),this.resourceFactory=t,this.observableFactory=o}return r(t,e),t.create=function(e,o){return new t(e,o)},t.prototype._subscribe=function(e){var t=this,o=t.resourceFactory,r=t.observableFactory,a;try{return a=o(),new l(e,a,r)}catch(t){e.error(t)}},t}(a.Observable);o.UsingObservable=s;var l=function(e){function t(t,o,r){e.call(this,t),this.resource=o,this.observableFactory=r,t.add(o),this.tryUse()}return r(t,e),t.prototype.tryUse=function(){try{var e=this.observableFactory.call(this,this.resource);e&&this.add(n.subscribeToResult(this,e))}catch(e){this._error(e)}},t}(i.OuterSubscriber)},{"../Observable":26,"../OuterSubscriber":28,"../util/subscribeToResult":364}],189:[function(e,t,o){"use strict";var r=e("./BoundCallbackObservable");o.bindCallback=r.BoundCallbackObservable.create},{"./BoundCallbackObservable":167}],190:[function(e,t,o){"use strict";var r=e("./BoundNodeCallbackObservable");o.bindNodeCallback=r.BoundNodeCallbackObservable.create},{"./BoundNodeCallbackObservable":168}],191:[function(e,t,o){"use strict";var r=e("../util/isScheduler"),a=e("../util/isArray"),n=e("./ArrayObservable"),i=e("../operator/combineLatest");o.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var o=null,s=null;return r.isScheduler(e[e.length-1])&&(s=e.pop()),"function"==typeof e[e.length-1]&&(o=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),new n.ArrayObservable(e,s).lift(new i.CombineLatestOperator(o))}},{"../operator/combineLatest":224,"../util/isArray":353,"../util/isScheduler":360,"./ArrayObservable":166}],192:[function(e,t,o){"use strict";var r=e("../operator/concat");o.concat=r.concatStatic},{"../operator/concat":225}],193:[function(e,t,o){"use strict";var r=e("./DeferObservable");o.defer=r.DeferObservable.create},{"./DeferObservable":170}],194:[function(e,t,o){"use strict";function r(){if(u.root.XMLHttpRequest)return new u.root.XMLHttpRequest;if(!!u.root.XDomainRequest)return new u.root.XDomainRequest;throw new Error("CORS is not supported by your browser")}function a(){if(u.root.XMLHttpRequest)return new u.root.XMLHttpRequest;var e;try{for(var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],o=0;3>o;o++)try{if(e=t[o],new u.root.ActiveXObject(e))break}catch(t){}return new u.root.ActiveXObject(e)}catch(t){throw new Error("XMLHttpRequest is not supported by your browser")}}function n(e,t){return void 0===t&&(t=null),new g({method:"GET",url:e,headers:t})}function i(e,t,o){return new g({method:"POST",url:e,body:t,headers:o})}function s(e,t){return new g({method:"DELETE",url:e,headers:t})}function l(e,t,o){return new g({method:"PUT",url:e,body:t,headers:o})}function d(e,t,o){return new g({method:"PATCH",url:e,body:t,headers:o})}function p(e,t){return new g({method:"GET",url:e,responseType:"json",headers:t}).lift(new _.MapOperator(function(e){return e.response},null))}var c=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},u=e("../../util/root"),b=e("../../util/tryCatch"),m=e("../../util/errorObject"),y=e("../../Observable"),f=e("../../Subscriber"),_=e("../../operator/map");o.ajaxGet=n;o.ajaxPost=i;o.ajaxDelete=s;o.ajaxPut=l;o.ajaxPatch=d;o.ajaxGetJSON=p;var g=function(e){function t(t){e.call(this);var o={async:!0,createXHR:function(){return this.crossDomain?r.call(this):a()},crossDomain:!1,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"==typeof t)o.url=t;else for(var n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);this.request=o}return c(t,e),t.prototype._subscribe=function(e){return new h(e,this.request)},t.create=function(){var e=function(e){return new t(e)};return e.get=n,e.post=i,e.delete=s,e.put=l,e.patch=d,e.getJSON=p,e}(),t}(y.Observable);o.AjaxObservable=g;var h=function(e){function t(t,o){e.call(this,t),this.request=o,this.done=!1;var r=o.headers=o.headers||{};o.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),"Content-Type"in r||u.root.FormData&&o.body instanceof u.root.FormData||"undefined"==typeof o.body||(r["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),o.body=this.serializeBody(o.body,o.headers["Content-Type"]),this.send()}return c(t,e),t.prototype.next=function(t){this.done=!0;var e=this,o=e.xhr,r=e.request,a=e.destination,n=new v(t,o,r);a.next(n)},t.prototype.send=function(){var e=this,t=e.request,o=e.request,r=o.user,a=o.method,n=o.url,i=o.async,s=o.password,l=o.headers,d=o.body,p=t.createXHR,c=b.tryCatch(p).call(t);if(c===m.errorObject)this.error(m.errorObject.e);else{this.xhr=c,this.setupEvents(c,t);var u;if(u=r?b.tryCatch(c.open).call(c,a,n,i,r,s):b.tryCatch(c.open).call(c,a,n,i),u===m.errorObject)return this.error(m.errorObject.e),null;if(i&&(c.timeout=t.timeout,c.responseType=t.responseType),"withCredentials"in c&&(c.withCredentials=!!t.withCredentials),this.setHeaders(c,l),u=d?b.tryCatch(c.send).call(c,d):b.tryCatch(c.send).call(c),u===m.errorObject)return this.error(m.errorObject.e),null}return c},t.prototype.serializeBody=function(e,t){if(!e||"string"==typeof e)return e;if(u.root.FormData&&e instanceof u.root.FormData)return e;if(t){var o=t.indexOf(";");-1!==o&&(t=t.substring(0,o))}return"application/x-www-form-urlencoded"===t?Object.keys(e).map(function(t){return encodeURI(t)+"="+encodeURI(e[t])}).join("&"):"application/json"===t?JSON.stringify(e):e},t.prototype.setHeaders=function(e,t){for(var o in t)t.hasOwnProperty(o)&&e.setRequestHeader(o,t[o])},t.prototype.setupEvents=function(e,t){function o(t){var e=o,r=e.subscriber,a=e.progressSubscriber,n=e.request;a&&a.error(t),r.error(new S(this,n))}function r(t){var e=r,o=e.subscriber,a=e.progressSubscriber,n=e.request;if(4===this.readyState){var i=1223===this.status?204:this.status,s="text"===this.responseType?this.response||this.responseText:this.response;0===i&&(i=s?200:0),200<=i&&300>i?(a&&a.complete(),o.next(t),o.complete()):(a&&a.error(t),o.error(new x("ajax error "+i,this,n)))}}var a=t.progressSubscriber;if(e.ontimeout=o,o.request=t,o.subscriber=this,o.progressSubscriber=a,e.upload&&"withCredentials"in e){if(a){var n;n=function(t){var e=n.progressSubscriber;e.next(t)},u.root.XDomainRequest?e.onprogress=n:e.upload.onprogress=n,n.progressSubscriber=a}var i;i=function(t){var e=i,o=e.progressSubscriber,r=e.subscriber,a=e.request;o&&o.error(t),r.error(new x("ajax error",this,a))},e.onerror=i,i.request=t,i.subscriber=this,i.progressSubscriber=a}e.onreadystatechange=r,r.subscriber=this,r.progressSubscriber=a,r.request=t},t.prototype.unsubscribe=function(){var t=this,o=t.done,r=t.xhr;!o&&r&&4!==r.readyState&&"function"==typeof r.abort&&r.abort(),e.prototype.unsubscribe.call(this)},t}(f.Subscriber);o.AjaxSubscriber=h;var v=function(){return function(e,t,o){switch(this.originalEvent=e,this.xhr=t,this.request=o,this.status=t.status,this.responseType=t.responseType||o.responseType,this.responseType){case"json":this.response="response"in t?t.responseType?t.response:JSON.parse(t.response||t.responseText||"null"):JSON.parse(t.responseText||"null");break;case"xml":this.response=t.responseXML;break;case"text":default:this.response="response"in t?t.response:t.responseText;}}}();o.AjaxResponse=v;var x=function(e){function t(t,o,r){e.call(this,t),this.message=t,this.xhr=o,this.request=r,this.status=o.status}return c(t,e),t}(Error);o.AjaxError=x;var S=function(e){function t(t,o){e.call(this,"ajax timeout",t,o)}return c(t,e),t}(x);o.AjaxTimeoutError=S},{"../../Observable":26,"../../Subscriber":34,"../../operator/map":255,"../../util/errorObject":352,"../../util/root":363,"../../util/tryCatch":366}],195:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../../Subject"),n=e("../../Subscriber"),i=e("../../Observable"),s=e("../../Subscription"),l=e("../../util/root"),d=e("../../ReplaySubject"),p=e("../../util/tryCatch"),c=e("../../util/errorObject"),u=e("../../util/assign"),b=function(e){function t(t,o){if(t instanceof i.Observable)e.call(this,o,t);else{if(e.call(this),this.WebSocketCtor=l.root.WebSocket,this._output=new a.Subject,"string"==typeof t?this.url=t:u.assign(this,t),!this.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new d.ReplaySubject}}return r(t,e),t.prototype.resultSelector=function(t){return JSON.parse(t.data)},t.create=function(e){return new t(e)},t.prototype.lift=function(e){var o=new t(this,this.destination);return o.operator=e,o},t.prototype._resetState=function(){this.socket=null,this.source||(this.destination=new d.ReplaySubject),this._output=new a.Subject},t.prototype.multiplex=function(e,t,o){var r=this;return new i.Observable(function(a){var n=p.tryCatch(e)();n===c.errorObject?a.error(c.errorObject.e):r.next(n);var i=r.subscribe(function(e){var t=p.tryCatch(o)(e);t===c.errorObject?a.error(c.errorObject.e):t&&a.next(e)},function(e){return a.error(e)},function(){return a.complete()});return function(){var e=p.tryCatch(t)();e===c.errorObject?a.error(c.errorObject.e):r.next(e),i.unsubscribe()}})},t.prototype._connectSocket=function(){var t=this,e=this.WebSocketCtor,o=this._output,r=null;try{r=this.protocol?new e(this.url,this.protocol):new e(this.url),this.socket=r,this.binaryType&&(this.socket.binaryType=this.binaryType)}catch(t){return void o.error(t)}var a=new s.Subscription(function(){t.socket=null,r&&1===r.readyState&&r.close()});r.onopen=function(i){var e=t.openObserver;e&&e.next(i);var s=t.destination;t.destination=n.Subscriber.create(function(e){return 1===r.readyState&&r.send(e)},function(a){var e=t.closingObserver;e&&e.next(void 0),a&&a.code?r.close(a.code,a.reason):o.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),t._resetState()},function(){var e=t.closingObserver;e&&e.next(void 0),r.close(),t._resetState()}),s&&s instanceof d.ReplaySubject&&a.add(s.subscribe(t.destination))},r.onerror=function(r){t._resetState(),o.error(r)},r.onclose=function(r){t._resetState();var e=t.closeObserver;e&&e.next(r),r.wasClean?o.complete():o.error(r)},r.onmessage=function(r){var e=p.tryCatch(t.resultSelector)(r);e===c.errorObject?o.error(c.errorObject.e):o.next(e)}},t.prototype._subscribe=function(e){var t=this,o=this.source;if(o)return o.subscribe(e);this.socket||this._connectSocket();var r=new s.Subscription;return r.add(this._output.subscribe(e)),r.add(function(){var e=t.socket;0===t._output.observers.length&&(e&&1===e.readyState&&e.close(),t._resetState())}),r},t.prototype.unsubscribe=function(){var t=this,o=t.source,r=t.socket;r&&1===r.readyState&&(r.close(),this._resetState()),e.prototype.unsubscribe.call(this),o||(this.destination=new d.ReplaySubject)},t}(a.AnonymousSubject);o.WebSocketSubject=b},{"../../Observable":26,"../../ReplaySubject":29,"../../Subject":32,"../../Subscriber":34,"../../Subscription":35,"../../util/assign":351,"../../util/errorObject":352,"../../util/root":363,"../../util/tryCatch":366}],196:[function(e,t,o){"use strict";var r=e("./AjaxObservable");o.ajax=r.AjaxObservable.create},{"./AjaxObservable":194}],197:[function(e,t,o){"use strict";var r=e("./WebSocketSubject");o.webSocket=r.WebSocketSubject.create},{"./WebSocketSubject":195}],198:[function(e,t,o){"use strict";var r=e("./EmptyObservable");o.empty=r.EmptyObservable.create},{"./EmptyObservable":171}],199:[function(e,t,o){"use strict";var r=e("./ForkJoinObservable");o.forkJoin=r.ForkJoinObservable.create},{"./ForkJoinObservable":173}],200:[function(e,t,o){"use strict";var r=e("./FromObservable");o.from=r.FromObservable.create},{"./FromObservable":176}],201:[function(e,t,o){"use strict";var r=e("./FromEventObservable");o.fromEvent=r.FromEventObservable.create},{"./FromEventObservable":174}],202:[function(e,t,o){"use strict";var r=e("./FromEventPatternObservable");o.fromEventPattern=r.FromEventPatternObservable.create},{"./FromEventPatternObservable":175}],203:[function(e,t,o){"use strict";var r=e("./PromiseObservable");o.fromPromise=r.PromiseObservable.create},{"./PromiseObservable":183}],204:[function(e,t,o){"use strict";var r=e("./IfObservable");o._if=r.IfObservable.create},{"./IfObservable":178}],205:[function(e,t,o){"use strict";var r=e("./IntervalObservable");o.interval=r.IntervalObservable.create},{"./IntervalObservable":179}],206:[function(e,t,o){"use strict";var r=e("../operator/merge");o.merge=r.mergeStatic},{"../operator/merge":259}],207:[function(e,t,o){"use strict";var r=e("./NeverObservable");o.never=r.NeverObservable.create},{"./NeverObservable":181}],208:[function(e,t,o){"use strict";var r=e("./ArrayObservable");o.of=r.ArrayObservable.of},{"./ArrayObservable":166}],209:[function(e,t,o){"use strict";var r=e("./PairsObservable");o.pairs=r.PairsObservable.create},{"./PairsObservable":182}],210:[function(e,t,o){"use strict";var r=e("./RangeObservable");o.range=r.RangeObservable.create},{"./RangeObservable":184}],211:[function(e,t,o){"use strict";var r=e("./ErrorObservable");o._throw=r.ErrorObservable.create},{"./ErrorObservable":172}],212:[function(e,t,o){"use strict";var r=e("./TimerObservable");o.timer=r.TimerObservable.create},{"./TimerObservable":187}],213:[function(e,t,o){"use strict";var r=e("./UsingObservable");o.using=r.UsingObservable.create},{"./UsingObservable":188}],214:[function(e,t,o){"use strict";var r=e("../operator/zip");o.zip=r.zipStatic},{"../operator/zip":315}],215:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../util/tryCatch"),n=e("../util/errorObject"),i=e("../OuterSubscriber"),s=e("../util/subscribeToResult");o.audit=function(e){return this.lift(new l(e))};var l=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.durationSelector))},e}(),d=function(e){function t(t,o){e.call(this,t),this.durationSelector=o,this.hasValue=!1}return r(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=a.tryCatch(this.durationSelector)(e);if(t===n.errorObject)this.destination.error(n.errorObject.e);else{var o=s.subscribeToResult(this,t);o.closed?this.clearThrottle():this.add(this.throttled=o)}}},t.prototype.clearThrottle=function(){var e=this,t=e.value,o=e.hasValue,r=e.throttled;r&&(this.remove(r),this.throttled=null,r.unsubscribe()),o&&(this.value=null,this.hasValue=!1,this.destination.next(t))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.OuterSubscriber)},{"../OuterSubscriber":28,"../util/errorObject":352,"../util/subscribeToResult":364,"../util/tryCatch":366}],216:[function(e,t,o){"use strict";function r(e){e.clearThrottle()}var a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../scheduler/async"),i=e("../Subscriber");o.auditTime=function(e,t){return void 0===t&&(t=n.async),this.lift(new s(e,t))};var s=function(){function e(e,t){this.duration=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.duration,this.scheduler))},e}(),l=function(e){function t(t,o,r){e.call(this,t),this.duration=o,this.scheduler=r,this.hasValue=!1}return a(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0,this.throttled||this.add(this.throttled=this.scheduler.schedule(r,this.duration,this))},t.prototype.clearThrottle=function(){var e=this,t=e.value,o=e.hasValue,r=e.throttled;r&&(this.remove(r),this.throttled=null,r.unsubscribe()),o&&(this.value=null,this.hasValue=!1,this.destination.next(t))},t}(i.Subscriber)},{"../Subscriber":34,"../scheduler/async":329}],217:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.buffer=function(e){return this.lift(new i(e))};var i=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,o){e.call(this,t),this.buffer=[],this.add(n.subscribeToResult(this,o))}return r(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],218:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.bufferCount=function(e,t){return void 0===t&&(t=null),this.lift(new n(e,t))};var n=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,this.subscriberClass=t&&e!==t?s:i}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),i=function(e){function t(t,o){e.call(this,t),this.bufferSize=o,this.buffer=[]}return r(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;0<t.length&&this.destination.next(t),e.prototype._complete.call(this)},t}(a.Subscriber),s=function(e){function t(t,o,r){e.call(this,t),this.bufferSize=o,this.startBufferEvery=r,this.buffers=[],this.count=0}return r(t,e),t.prototype._next=function(e){var t=this,o=t.bufferSize,r=t.startBufferEvery,a=t.buffers,n=t.count;this.count++,0==n%r&&a.push([]);for(var s=a.length,i;s--;)i=a[s],i.push(e),i.length===o&&(a.splice(s,1),this.destination.next(i))},t.prototype._complete=function(){for(var t=this,o=t.buffers,r=t.destination,a;0<o.length;)a=o.shift(),0<a.length&&r.next(a);e.prototype._complete.call(this)},t}(a.Subscriber)},{"../Subscriber":34}],219:[function(e,t,o){"use strict";function r(e){var t=e.subscriber,o=e.context;o&&t.closeContext(o),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function a(e){var t=e.bufferCreationInterval,o=e.bufferTimeSpan,r=e.subscriber,a=e.scheduler,i=r.openContext(),s=this;r.closed||(r.add(i.closeAction=a.schedule(n,o,{subscriber:r,context:i})),s.schedule(e,t))}function n(e){var t=e.subscriber,o=e.context;t.closeContext(o)}var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},s=e("../scheduler/async"),l=e("../Subscriber"),d=e("../util/isScheduler");o.bufferTime=function(e){var t=arguments.length,o=s.async;d.isScheduler(arguments[arguments.length-1])&&(o=arguments[arguments.length-1],t--);var r=null;2<=t&&(r=arguments[1]);var a=Number.POSITIVE_INFINITY;return 3<=t&&(a=arguments[2]),this.lift(new p(e,r,a,o))};var p=function(){function e(e,t,o,r){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=o,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),c=function(){return function(){this.buffer=[]}}(),u=function(e){function t(t,o,i,s,l){e.call(this,t),this.bufferTimeSpan=o,this.bufferCreationInterval=i,this.maxBufferSize=s,this.scheduler=l,this.contexts=[];var d=this.openContext();if(this.timespanOnly=null==i||0>i,this.timespanOnly){var p={subscriber:this,context:d,bufferTimeSpan:o};this.add(d.closeAction=l.schedule(r,o,p))}else{var c={subscriber:this,context:d},u={bufferTimeSpan:o,bufferCreationInterval:i,subscriber:this,scheduler:l};this.add(d.closeAction=l.schedule(n,o,c)),this.add(l.schedule(a,i,u))}}return i(t,e),t.prototype._next=function(e){for(var t=this.contexts,o=t.length,r=0,a;r<o;r++){var n=t[r],i=n.buffer;i.push(e),i.length==this.maxBufferSize&&(a=n)}a&&this.onBufferFull(a)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this,o=t.contexts,r=t.destination,a;0<o.length;)a=o.shift(),r.next(a.buffer);e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var o=this.bufferTimeSpan,a={subscriber:this,context:e,bufferTimeSpan:o};this.add(e.closeAction=this.scheduler.schedule(r,o,a))}},t.prototype.openContext=function(){var e=new c;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts,o=t?t.indexOf(e):-1;0<=o&&t.splice(t.indexOf(e),1)},t}(l.Subscriber)},{"../Subscriber":34,"../scheduler/async":329,"../util/isScheduler":360}],220:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscription"),n=e("../util/subscribeToResult"),i=e("../OuterSubscriber");o.bufferToggle=function(e,t){return this.lift(new s(e,t))};var s=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.openings,this.closingSelector))},e}(),l=function(e){function t(t,o,r){e.call(this,t),this.openings=o,this.closingSelector=r,this.contexts=[],this.add(n.subscribeToResult(this,o))}return r(t,e),t.prototype._next=function(e){for(var t=this.contexts,o=t.length,r=0;r<o;r++)t[r].buffer.push(e)},t.prototype._error=function(t){for(var o=this.contexts,r;0<o.length;)r=o.shift(),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null;this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,o;0<t.length;)o=t.shift(),this.destination.next(o.buffer),o.subscription.unsubscribe(),o.buffer=null,o.subscription=null;this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector,o=t.call(this,e);o&&this.trySubscribe(o)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var o=e.buffer,r=e.subscription;this.destination.next(o),t.splice(t.indexOf(e),1),this.remove(r),r.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,o=new a.Subscription,r={buffer:[],subscription:o};t.push(r);var i=n.subscribeToResult(this,e,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),o.add(i))},t}(i.OuterSubscriber)},{"../OuterSubscriber":28,"../Subscription":35,"../util/subscribeToResult":364}],221:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscription"),n=e("../util/tryCatch"),i=e("../util/errorObject"),s=e("../OuterSubscriber"),l=e("../util/subscribeToResult");o.bufferWhen=function(e){return this.lift(new d(e))};var d=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.closingSelector))},e}(),p=function(e){function t(t,o){e.call(this,t),this.closingSelector=o,this.subscribing=!1,this.openBuffer()}return r(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e=this.closingSubscription;e&&(this.remove(e),e.unsubscribe());var t=this.buffer;this.buffer&&this.destination.next(t),this.buffer=[];var o=n.tryCatch(this.closingSelector)();o===i.errorObject?this.error(i.errorObject.e):(e=new a.Subscription,this.closingSubscription=e,this.add(e),this.subscribing=!0,e.add(l.subscribeToResult(this,o)),this.subscribing=!1)},t}(s.OuterSubscriber)},{"../OuterSubscriber":28,"../Subscription":35,"../util/errorObject":352,"../util/subscribeToResult":364,"../util/tryCatch":366}],222:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o._catch=function(e){var t=new i(e),o=this.lift(t);return t.caught=o};var i=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,o,r){e.call(this,t),this.selector=o,this.caught=r}return r(t,e),t.prototype.error=function(t){if(!this.isStopped){var o;try{o=this.selector(t,this.caught)}catch(t){return void e.prototype.error.call(this,t)}this._unsubscribeAndRecycle(),this.add(n.subscribeToResult(this,o))}},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],223:[function(e,t,o){"use strict";var r=e("./combineLatest");o.combineAll=function(e){return this.lift(new r.CombineLatestOperator(e))}},{"./combineLatest":224}],224:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../observable/ArrayObservable"),n=e("../util/isArray"),i=e("../OuterSubscriber"),s=e("../util/subscribeToResult"),l={};o.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var o=null;return"function"==typeof e[e.length-1]&&(o=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),e.unshift(this),this.lift.call(new a.ArrayObservable(e),new d(o))};var d=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.project))},e}();o.CombineLatestOperator=d;var p=function(e){function t(t,o){e.call(this,t),this.project=o,this.active=0,this.values=[],this.observables=[]}return r(t,e),t.prototype._next=function(e){this.values.push(l),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var o=0,r;o<t;o++)r=e[o],this.add(s.subscribeToResult(this,r,r,o))}},t.prototype.notifyComplete=function(){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,o){var r=this.values,a=r[o],n=this.toRespond?a===l?--this.toRespond:this.toRespond:0;r[o]=t,0===n&&(this.project?this._tryProject(r):this.destination.next(r.slice()))},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(i.OuterSubscriber);o.CombineLatestSubscriber=p},{"../OuterSubscriber":28,"../observable/ArrayObservable":166,"../util/isArray":353,"../util/subscribeToResult":364}],225:[function(e,t,o){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var o=null,r=e;return n.isScheduler(r[e.length-1])&&(o=r.pop()),null===o&&1===e.length&&e[0]instanceof a.Observable?e[0]:new i.ArrayObservable(e,o).lift(new s.MergeAllOperator(1))}var a=e("../Observable"),n=e("../util/isScheduler"),i=e("../observable/ArrayObservable"),s=e("./mergeAll");o.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.lift.call(r.apply(void 0,[this].concat(e)))},o.concatStatic=r},{"../Observable":26,"../observable/ArrayObservable":166,"../util/isScheduler":360,"./mergeAll":260}],226:[function(e,t,o){"use strict";var r=e("./mergeAll");o.concatAll=function(){return this.lift(new r.MergeAllOperator(1))}},{"./mergeAll":260}],227:[function(e,t,o){"use strict";var r=e("./mergeMap");o.concatMap=function(e,t){return this.lift(new r.MergeMapOperator(e,t,1))}},{"./mergeMap":261}],228:[function(e,t,o){"use strict";var r=e("./mergeMapTo");o.concatMapTo=function(e,t){return this.lift(new r.MergeMapToOperator(e,t,1))}},{"./mergeMapTo":262}],229:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.count=function(e){return this.lift(new n(e,this))};var n=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.predicate,this.source))},e}(),i=function(e){function t(t,o,r){e.call(this,t),this.predicate=o,this.source=r,this.count=0,this.index=0}return r(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){return void this.destination.error(e)}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(a.Subscriber)},{"../Subscriber":34}],230:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.debounce=function(e){return this.lift(new i(e))};var i=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,o){e.call(this,t),this.durationSelector=o,this.hasValue=!1,this.durationSubscription=null}return r(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var o=this.durationSubscription;this.value=e,this.hasValue=!0,o&&(o.unsubscribe(),this.remove(o)),o=n.subscribeToResult(this,t),o.closed||this.add(this.durationSubscription=o)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,o=this.durationSubscription;o&&(this.durationSubscription=null,o.unsubscribe(),this.remove(o)),this.value=null,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],231:[function(e,t,o){"use strict";function r(e){e.debouncedNext()}var a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../Subscriber"),i=e("../scheduler/async");o.debounceTime=function(e,t){return void 0===t&&(t=i.async),this.lift(new s(e,t))};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,o,r){e.call(this,t),this.dueTime=o,this.scheduler=r,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}return a(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(r,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){this.clearDebounce(),this.hasValue&&(this.destination.next(this.lastValue),this.lastValue=null,this.hasValue=!1)},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(n.Subscriber)},{"../Subscriber":34,"../scheduler/async":329}],232:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.defaultIfEmpty=function(e){return void 0===e&&(e=null),this.lift(new n(e))};var n=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.defaultValue))},e}(),i=function(e){function t(t,o){e.call(this,t),this.defaultValue=o,this.isEmpty=!0}return r(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(a.Subscriber)},{"../Subscriber":34}],233:[function(e,t,o){"use strict";/**
   * Delays the emission of items from the source Observable by a given timeout or
   * until a given Date.
   *
   * <span class="informal">Time shifts each item by some specified amount of
   * milliseconds.</span>
   *
   * <img src="./img/delay.png" width="100%">
   *
   * If the delay argument is a Number, this operator time shifts the source
   * Observable by that amount of time expressed in milliseconds. The relative
   * time intervals between the values are preserved.
   *
   * If the delay argument is a Date, this operator time shifts the start of the
   * Observable execution until the given date occurs.
   *
   * @example <caption>Delay each click by one second</caption>
   * var clicks = Rx.Observable.fromEvent(document, 'click');
   * var delayedClicks = clicks.delay(1000); // each click emitted after 1 second
   * delayedClicks.subscribe(x => console.log(x));
   *
   * @example <caption>Delay all clicks until a future date happens</caption>
   * var clicks = Rx.Observable.fromEvent(document, 'click');
   * var date = new Date('March 15, 2050 12:00:00'); // in the future
   * var delayedClicks = clicks.delay(date); // click emitted only after that date
   * delayedClicks.subscribe(x => console.log(x));
   *
   * @see {@link debounceTime}
   * @see {@link delayWhen}
   *
   * @param {number|Date} delay The delay duration in milliseconds (a `number`) or
   * a `Date` until which the emission of the source items is delayed.
   * @param {Scheduler} [scheduler=async] The IScheduler to use for
   * managing the timers that handle the time-shift for each item.
   * @return {Observable} An Observable that delays the emissions of the source
   * Observable by the specified timeout or Date.
   * @method delay
   * @owner Observable
   */function r(e,t){void 0===t&&(t=n.async);var o=i.isDate(e),r=o?+e-t.now():Math.abs(e);return this.lift(new d(r,t))}var a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../scheduler/async"),i=e("../util/isDate"),s=e("../Subscriber"),l=e("../Notification");o.delay=r;var d=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.delay,this.scheduler))},e}(),p=function(e){function t(t,o,r){e.call(this,t),this.delay=o,this.scheduler=r,this.queue=[],this.active=!1,this.errored=!1}return a(t,e),t.dispatch=function(e){for(var t=e.source,o=t.queue,r=e.scheduler,a=e.destination;0<o.length&&0>=o[0].time-r.now();)o.shift().notification.observe(a);if(0<o.length){var n=Math.max(0,o[0].time-r.now());this.schedule(e,n)}else t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,o=new c(t.now()+this.delay,e);this.queue.push(o),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e)},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete())},t}(s.Subscriber),c=function(){return function(e,t){this.time=e,this.notification=t}}()},{"../Notification":25,"../Subscriber":34,"../scheduler/async":329,"../util/isDate":355}],234:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../Observable"),i=e("../OuterSubscriber"),s=e("../util/subscribeToResult");o.delayWhen=function(e,t){return t?new p(this,t).lift(new l(e)):this.lift(new l(e))};var l=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.delayDurationSelector))},e}(),d=function(e){function t(t,o){e.call(this,t),this.delayDurationSelector=o,this.completed=!1,this.delayNotifierSubscriptions=[],this.values=[]}return r(t,e),t.prototype.notifyNext=function(e,t,o,r,a){this.destination.next(e),this.removeSubscription(a),this.tryComplete()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){try{var t=this.delayDurationSelector(e);t&&this.tryDelay(t,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e),o=null;return-1!==t&&(o=this.values[t],this.delayNotifierSubscriptions.splice(t,1),this.values.splice(t,1)),o},t.prototype.tryDelay=function(e,t){var o=s.subscribeToResult(this,e,t);o&&!o.closed&&(this.add(o),this.delayNotifierSubscriptions.push(o)),this.values.push(t)},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(i.OuterSubscriber),p=function(e){function t(t,o){e.call(this),this.source=t,this.subscriptionDelay=o}return r(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new c(e,this.source))},t}(n.Observable),c=function(e){function t(t,o){e.call(this),this.parent=t,this.source=o,this.sourceSubscribed=!1}return r(t,e),t.prototype._next=function(){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(a.Subscriber)},{"../Observable":26,"../OuterSubscriber":28,"../Subscriber":34,"../util/subscribeToResult":364}],235:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.dematerialize=function(){return this.lift(new n)};var n=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new i(e))},e}(),i=function(e){function t(t){e.call(this,t)}return r(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(a.Subscriber)},{"../Subscriber":34}],236:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult"),i=e("../util/Set");o.distinct=function(e,t){return this.lift(new s(e,t))};var s=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.keySelector,this.flushes))},e}(),l=function(e){function t(t,o,r){e.call(this,t),this.keySelector=o,this.values=new i.Set,r&&this.add(n.subscribeToResult(this,r))}return r(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t=this.destination,o;try{o=this.keySelector(e)}catch(e){return void t.error(e)}this._finalizeNext(o,e)},t.prototype._finalizeNext=function(e,t){var o=this.values;o.has(e)||(o.add(e),this.destination.next(t))},t}(a.OuterSubscriber);o.DistinctSubscriber=l},{"../OuterSubscriber":28,"../util/Set":347,"../util/subscribeToResult":364}],237:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../util/tryCatch"),i=e("../util/errorObject");o.distinctUntilChanged=function(e,t){return this.lift(new s(e,t))};var s=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.compare,this.keySelector))},e}(),l=function(e){function t(t,o,r){e.call(this,t),this.keySelector=r,this.hasKey=!1,"function"==typeof o&&(this.compare=o)}return r(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){var t=this.keySelector,o=e;if(t&&(o=n.tryCatch(this.keySelector)(e),o===i.errorObject))return this.destination.error(i.errorObject.e);var r=!1;if(!this.hasKey)this.hasKey=!0;else if(r=n.tryCatch(this.compare)(this.key,o),r===i.errorObject)return this.destination.error(i.errorObject.e);!1===!!r&&(this.key=o,this.destination.next(e))},t}(a.Subscriber)},{"../Subscriber":34,"../util/errorObject":352,"../util/tryCatch":366}],238:[function(e,t,o){"use strict";var r=e("./distinctUntilChanged");o.distinctUntilKeyChanged=function(e,t){return r.distinctUntilChanged.call(this,function(o,r){return t?t(o[e],r[e]):o[e]===r[e]})}},{"./distinctUntilChanged":237}],239:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o._do=function(e,t,o){return this.lift(new n(e,t,o))};var n=function(){function e(e,t,o){this.nextOrObserver=e,this.error=t,this.complete=o}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.nextOrObserver,this.error,this.complete))},e}(),i=function(e){function t(t,o,r,n){e.call(this,t);var i=new a.Subscriber(o,r,n);i.syncErrorThrowable=!0,this.add(i),this.safeSubscriber=i}return r(t,e),t.prototype._next=function(e){var t=this.safeSubscriber;t.next(e),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.next(e)},t.prototype._error=function(e){var t=this.safeSubscriber;t.error(e),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.error(e)},t.prototype._complete=function(){var e=this.safeSubscriber;e.complete(),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.complete()},t}(a.Subscriber)},{"../Subscriber":34}],240:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../util/ArgumentOutOfRangeError");o.elementAt=function(e,t){return this.lift(new i(e,t))};var i=function(){function e(e,t){if(this.index=e,this.defaultValue=t,0>e)throw new n.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.index,this.defaultValue))},e}(),s=function(e){function t(t,o,r){e.call(this,t),this.index=o,this.defaultValue=r}return r(t,e),t.prototype._next=function(e){0==this.index--&&(this.destination.next(e),this.destination.complete())},t.prototype._complete=function(){var e=this.destination;0<=this.index&&("undefined"==typeof this.defaultValue?e.error(new n.ArgumentOutOfRangeError):e.next(this.defaultValue)),e.complete()},t}(a.Subscriber)},{"../Subscriber":34,"../util/ArgumentOutOfRangeError":340}],241:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.every=function(e,t){return this.lift(new n(e,t,this))};var n=function(){function e(e,t,o){this.predicate=e,this.thisArg=t,this.source=o}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.predicate,this.thisArg,this.source))},e}(),i=function(e){function t(t,o,r,a){e.call(this,t),this.predicate=o,this.thisArg=r,this.source=a,this.index=0,this.thisArg=r||this}return r(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){return void this.destination.error(e)}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(a.Subscriber)},{"../Subscriber":34}],242:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.exhaust=function(){return this.lift(new i)};var i=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){e.call(this,t),this.hasCompleted=!1,this.hasSubscription=!1}return r(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(n.subscribeToResult(this,e)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(e){this.remove(e),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],243:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.exhaustMap=function(e,t){return this.lift(new i(e,t))};var i=function(){function e(e,t){this.project=e,this.resultSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.resultSelector))},e}(),s=function(e){function t(t,o,r){e.call(this,t),this.project=o,this.resultSelector=r,this.hasSubscription=!1,this.hasCompleted=!1,this.index=0}return r(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t=this.index++,o=this.destination;try{var r=this.project(e,t);this.hasSubscription=!0,this.add(n.subscribeToResult(this,r,e,t))}catch(e){o.error(e)}},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyNext=function(e,t,o,r){var a=this,n=a.resultSelector,i=a.destination;n?this.trySelectResult(e,t,o,r):i.next(t)},t.prototype.trySelectResult=function(e,t,o,r){var a=this,n=a.resultSelector,i=a.destination;try{var s=n(e,t,o,r);i.next(s)}catch(e){i.error(e)}},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.remove(e),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],244:[function(e,t,o){"use strict";var r=Number.POSITIVE_INFINITY,a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../util/tryCatch"),i=e("../util/errorObject"),s=e("../OuterSubscriber"),l=e("../util/subscribeToResult");o.expand=function(e,t,o){return void 0===t&&(t=r),void 0===o&&(o=void 0),t=1>(t||0)?r:t,this.lift(new d(e,t,o))};var d=function(){function e(e,t,o){this.project=e,this.concurrent=t,this.scheduler=o}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.project,this.concurrent,this.scheduler))},e}();o.ExpandOperator=d;var p=function(e){function t(t,o,a,n){e.call(this,t),this.project=o,this.concurrent=a,this.scheduler=n,this.index=0,this.active=0,this.hasCompleted=!1,a<r&&(this.buffer=[])}return a(t,e),t.dispatch=function(e){var t=e.subscriber,o=e.result,r=e.value,a=e.index;t.subscribeToProjection(o,r,a)},t.prototype._next=function(e){var o=this.destination;if(o.closed)return void this._complete();var r=this.index++;if(this.active<this.concurrent){o.next(e);var a=n.tryCatch(this.project)(e,r);if(a===i.errorObject)o.error(i.errorObject.e);else if(!this.scheduler)this.subscribeToProjection(a,e,r);else{var s={subscriber:this,result:a,value:e,index:r};this.add(this.scheduler.schedule(t.dispatch,0,s))}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,o){this.active++,this.add(l.subscribeToResult(this,e,t,o))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete()},t.prototype.notifyNext=function(e,t){this._next(t)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t&&0<t.length&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(s.OuterSubscriber);o.ExpandSubscriber=p},{"../OuterSubscriber":28,"../util/errorObject":352,"../util/subscribeToResult":364,"../util/tryCatch":366}],245:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.filter=function(e,t){return this.lift(new n(e,t))};var n=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.predicate,this.thisArg))},e}(),i=function(e){function t(t,o,r){e.call(this,t),this.predicate=o,this.thisArg=r,this.count=0,this.predicate=o}return r(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(a.Subscriber)},{"../Subscriber":34}],246:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../Subscription");o._finally=function(e){return this.lift(new i(e))};var i=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.callback))},e}(),s=function(e){function t(t,o){e.call(this,t),this.add(new n.Subscription(o))}return r(t,e),t}(a.Subscriber)},{"../Subscriber":34,"../Subscription":35}],247:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.find=function(e,t){if("function"!=typeof e)throw new TypeError("predicate is not a function");return this.lift(new n(e,this,!1,t))};var n=function(){function e(e,t,o,r){this.predicate=e,this.source=t,this.yieldIndex=o,this.thisArg=r}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();o.FindValueOperator=n;var i=function(e){function t(t,o,r,a,n){e.call(this,t),this.predicate=o,this.source=r,this.yieldIndex=a,this.thisArg=n,this.index=0}return r(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){var t=this,o=t.predicate,r=t.thisArg,a=this.index++;try{var n=o.call(r||this,e,a,this.source);n&&this.notifyComplete(this.yieldIndex?a:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(a.Subscriber);o.FindValueSubscriber=i},{"../Subscriber":34}],248:[function(e,t,o){"use strict";var r=e("./find");o.findIndex=function(e,t){return this.lift(new r.FindValueOperator(e,this,!0,t))}},{"./find":247}],249:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../util/EmptyError");o.first=function(e,t,o){return this.lift(new i(e,t,o,this))};var i=function(){function e(e,t,o,r){this.predicate=e,this.resultSelector=t,this.defaultValue=o,this.source=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.resultSelector,this.defaultValue,this.source))},e}(),s=function(e){function t(t,o,r,a,n){e.call(this,t),this.predicate=o,this.resultSelector=r,this.defaultValue=a,this.source=n,this.index=0,this.hasCompleted=!1,this._emitted=!1}return r(t,e),t.prototype._next=function(e){var t=this.index++;this.predicate?this._tryPredicate(e,t):this._emit(e,t)},t.prototype._tryPredicate=function(e,t){var o;try{o=this.predicate(e,t,this.source)}catch(e){return void this.destination.error(e)}o&&this._emit(e,t)},t.prototype._emit=function(e,t){return this.resultSelector?void this._tryResultSelector(e,t):void this._emitFinal(e)},t.prototype._tryResultSelector=function(e,t){var o;try{o=this.resultSelector(e,t)}catch(e){return void this.destination.error(e)}this._emitFinal(o)},t.prototype._emitFinal=function(e){var t=this.destination;this._emitted||(this._emitted=!0,t.next(e),t.complete(),this.hasCompleted=!0)},t.prototype._complete=function(){var e=this.destination;this.hasCompleted||"undefined"==typeof this.defaultValue?!this.hasCompleted&&e.error(new n.EmptyError):(e.next(this.defaultValue),e.complete())},t}(a.Subscriber)},{"../Subscriber":34,"../util/EmptyError":341}],250:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../Subscription"),i=e("../Observable"),s=e("../Subject"),l=e("../util/Map"),d=e("../util/FastMap");o.groupBy=function(e,t,o,r){return this.lift(new p(e,t,o,r))};var p=function(){function e(e,t,o,r){this.keySelector=e,this.elementSelector=t,this.durationSelector=o,this.subjectSelector=r}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,o,r,a,n){e.call(this,t),this.keySelector=o,this.elementSelector=r,this.durationSelector=a,this.subjectSelector=n,this.groups=null,this.attemptedToUnsubscribe=!1,this.count=0}return r(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){return void this.error(e)}this._group(e,t)},t.prototype._group=function(e,t){var o=this.groups;o||(o=this.groups="string"==typeof t?new d.FastMap:new l.Map);var r=o.get(t),a;if(this.elementSelector)try{a=this.elementSelector(e)}catch(e){this.error(e)}else a=e;if(!r){r=this.subjectSelector?this.subjectSelector():new s.Subject,o.set(t,r);var n=new b(t,r,this);if(this.destination.next(n),this.durationSelector){var i;try{i=this.durationSelector(new b(t,r))}catch(e){return void this.error(e)}this.add(i.subscribe(new u(t,r,this)))}}r.closed||r.next(a)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(a.Subscriber),u=function(e){function t(t,o,r){e.call(this,o),this.key=t,this.group=o,this.parent=r}return r(t,e),t.prototype._next=function(){this.complete()},t.prototype._unsubscribe=function(){var e=this,t=e.parent,o=e.key;this.key=this.parent=null,t&&t.removeGroup(o)},t}(a.Subscriber),b=function(e){function t(t,o,r){e.call(this),this.key=t,this.groupSubject=o,this.refCountSubscription=r}return r(t,e),t.prototype._subscribe=function(e){var t=new n.Subscription,o=this,r=o.refCountSubscription,a=o.groupSubject;return r&&!r.closed&&t.add(new m(r)),t.add(a.subscribe(e)),t},t}(i.Observable);o.GroupedObservable=b;var m=function(e){function t(t){e.call(this),this.parent=t,t.count++}return r(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(n.Subscription)},{"../Observable":26,"../Subject":32,"../Subscriber":34,"../Subscription":35,"../util/FastMap":342,"../util/Map":344}],251:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../util/noop");o.ignoreElements=function(){return this.lift(new i)};var i=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype._next=function(){n.noop()},t}(a.Subscriber)},{"../Subscriber":34,"../util/noop":361}],252:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.isEmpty=function(){return this.lift(new n)};var n=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new i(e))},e}(),i=function(e){function t(t){e.call(this,t)}return r(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(a.Subscriber)},{"../Subscriber":34}],253:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../util/EmptyError");o.last=function(e,t,o){return this.lift(new i(e,t,o,this))};var i=function(){function e(e,t,o,r){this.predicate=e,this.resultSelector=t,this.defaultValue=o,this.source=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.resultSelector,this.defaultValue,this.source))},e}(),s=function(e){function t(t,o,r,a,n){e.call(this,t),this.predicate=o,this.resultSelector=r,this.defaultValue=a,this.source=n,this.hasValue=!1,this.index=0,"undefined"!=typeof a&&(this.lastValue=a,this.hasValue=!0)}return r(t,e),t.prototype._next=function(e){var t=this.index++;if(this.predicate)this._tryPredicate(e,t);else{if(this.resultSelector)return void this._tryResultSelector(e,t);this.lastValue=e,this.hasValue=!0}},t.prototype._tryPredicate=function(e,t){var o;try{o=this.predicate(e,t,this.source)}catch(e){return void this.destination.error(e)}if(o){if(this.resultSelector)return void this._tryResultSelector(e,t);this.lastValue=e,this.hasValue=!0}},t.prototype._tryResultSelector=function(e,t){var o;try{o=this.resultSelector(e,t)}catch(e){return void this.destination.error(e)}this.lastValue=o,this.hasValue=!0},t.prototype._complete=function(){var e=this.destination;this.hasValue?(e.next(this.lastValue),e.complete()):e.error(new n.EmptyError)},t}(a.Subscriber)},{"../Subscriber":34,"../util/EmptyError":341}],254:[function(e,t,o){"use strict";o.letProto=function(e){return e(this)}},{}],255:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.map=function(e,t){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return this.lift(new n(e,t))};var n=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.project,this.thisArg))},e}();o.MapOperator=n;var i=function(e){function t(t,o,r){e.call(this,t),this.project=o,this.count=0,this.thisArg=r||this}return r(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(a.Subscriber)},{"../Subscriber":34}],256:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.mapTo=function(e){return this.lift(new n(e))};var n=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.value))},e}(),i=function(e){function t(t,o){e.call(this,t),this.value=o}return r(t,e),t.prototype._next=function(){this.destination.next(this.value)},t}(a.Subscriber)},{"../Subscriber":34}],257:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../Notification");o.materialize=function(){return this.lift(new i)};var i=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){e.call(this,t)}return r(t,e),t.prototype._next=function(e){this.destination.next(n.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(n.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(n.Notification.createComplete()),e.complete()},t}(a.Subscriber)},{"../Notification":25,"../Subscriber":34}],258:[function(e,t,o){"use strict";function r(e){var t="function"==typeof e?function(t,o){return 0<e(t,o)?t:o}:function(e,t){return e>t?e:t};return this.lift(new a.ReduceOperator(t))}var a=e("./reduce");o.max=r},{"./reduce":276}],259:[function(e,t,o){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var o=Number.POSITIVE_INFINITY,r=null,l=e[e.length-1];return s.isScheduler(l)?(r=e.pop(),1<e.length&&"number"==typeof e[e.length-1]&&(o=e.pop())):"number"==typeof l&&(o=e.pop()),null===r&&1===e.length&&e[0]instanceof a.Observable?e[0]:new n.ArrayObservable(e,r).lift(new i.MergeAllOperator(o))}var a=e("../Observable"),n=e("../observable/ArrayObservable"),i=e("./mergeAll"),s=e("../util/isScheduler");o.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.lift.call(r.apply(void 0,[this].concat(e)))},o.mergeStatic=r},{"../Observable":26,"../observable/ArrayObservable":166,"../util/isScheduler":360,"./mergeAll":260}],260:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.mergeAll=function(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),this.lift(new i(e))};var i=function(){function e(e){this.concurrent=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.concurrent))},e}();o.MergeAllOperator=i;var s=function(e){function t(t,o){e.call(this,t),this.concurrent=o,this.hasCompleted=!1,this.buffer=[],this.active=0}return r(t,e),t.prototype._next=function(e){this.active<this.concurrent?(this.active++,this.add(n.subscribeToResult(this,e))):this.buffer.push(e)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,0<t.length?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(a.OuterSubscriber);o.MergeAllSubscriber=s},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],261:[function(e,t,o){"use strict";var r=Number.POSITIVE_INFINITY,a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../util/subscribeToResult"),i=e("../OuterSubscriber");o.mergeMap=function(e,t,o){return void 0===o&&(o=r),"number"==typeof t&&(o=t,t=null),this.lift(new s(e,t,o))};var s=function(){function e(e,t,o){void 0===o&&(o=r),this.project=e,this.resultSelector=t,this.concurrent=o}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.project,this.resultSelector,this.concurrent))},e}();o.MergeMapOperator=s;var l=function(e){function t(t,o,a,n){void 0===n&&(n=r),e.call(this,t),this.project=o,this.resultSelector=a,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return a(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t=this.index++,o;try{o=this.project(e,t)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(o,e,t)},t.prototype._innerSub=function(e,t,o){this.add(n.subscribeToResult(this,e,t,o))},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},t.prototype.notifyNext=function(e,t,o,r){this.resultSelector?this._notifyResultSelector(e,t,o,r):this.destination.next(t)},t.prototype._notifyResultSelector=function(e,t,o,r){var a;try{a=this.resultSelector(e,t,o,r)}catch(e){return void this.destination.error(e)}this.destination.next(a)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,0<t.length?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(i.OuterSubscriber);o.MergeMapSubscriber=l},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],262:[function(e,t,o){"use strict";var r=Number.POSITIVE_INFINITY,a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../OuterSubscriber"),i=e("../util/subscribeToResult");o.mergeMapTo=function(e,t,o){return void 0===o&&(o=r),"number"==typeof t&&(o=t,t=null),this.lift(new s(e,t,o))};var s=function(){function e(e,t,o){void 0===o&&(o=r),this.ish=e,this.resultSelector=t,this.concurrent=o}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.ish,this.resultSelector,this.concurrent))},e}();o.MergeMapToOperator=s;var l=function(e){function t(t,o,a,n){void 0===n&&(n=r),e.call(this,t),this.ish=o,this.resultSelector=a,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return a(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.resultSelector,o=this.index++,r=this.ish,a=this.destination;this.active++,this._innerSub(r,a,t,e,o)}else this.buffer.push(e)},t.prototype._innerSub=function(e,t,o,r,a){this.add(i.subscribeToResult(this,e,r,a))},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},t.prototype.notifyNext=function(e,t,o,r){var a=this,n=a.resultSelector,i=a.destination;n?this.trySelectResult(e,t,o,r):i.next(t)},t.prototype.trySelectResult=function(e,t,o,r){var a=this,n=a.resultSelector,i=a.destination,s;try{s=n(e,t,o,r)}catch(e){return void i.error(e)}i.next(s)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,0<t.length?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(n.OuterSubscriber);o.MergeMapToSubscriber=l},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],263:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../util/tryCatch"),n=e("../util/errorObject"),i=e("../util/subscribeToResult"),s=e("../OuterSubscriber");o.mergeScan=function(e,t,o){return void 0===o&&(o=Number.POSITIVE_INFINITY),this.lift(new l(e,t,o))};var l=function(){function e(e,t,o){this.accumulator=e,this.seed=t,this.concurrent=o}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.accumulator,this.seed,this.concurrent))},e}();o.MergeScanOperator=l;var d=function(e){function t(t,o,r,a){e.call(this,t),this.accumulator=o,this.acc=r,this.concurrent=a,this.hasValue=!1,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return r(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,o=a.tryCatch(this.accumulator)(this.acc,e),r=this.destination;o===n.errorObject?r.error(n.errorObject.e):(this.active++,this._innerSub(o,e,t))}else this.buffer.push(e)},t.prototype._innerSub=function(e,t,o){this.add(i.subscribeToResult(this,e,t,o))},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t.prototype.notifyNext=function(e,t){var o=this.destination;this.acc=t,this.hasValue=!0,o.next(t)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,0<t.length?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(s.OuterSubscriber);o.MergeScanSubscriber=d},{"../OuterSubscriber":28,"../util/errorObject":352,"../util/subscribeToResult":364,"../util/tryCatch":366}],264:[function(e,t,o){"use strict";function r(e){var t="function"==typeof e?function(t,o){return 0>e(t,o)?t:o}:function(e,t){return e<t?e:t};return this.lift(new a.ReduceOperator(t))}var a=e("./reduce");o.min=r},{"./reduce":276}],265:[function(e,t,o){"use strict";var r=e("../observable/ConnectableObservable");o.multicast=function(e,t){var o;if(o="function"==typeof e?e:function(){return e},"function"==typeof t)return this.lift(new a(o,t));var n=Object.create(this,r.connectableObservableDescriptor);return n.source=this,n.subjectFactory=o,n};var a=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var o=this.selector,r=this.subjectFactory(),a=o(r).subscribe(e);return a.add(t.subscribe(r)),a},e}();o.MulticastOperator=a},{"../observable/ConnectableObservable":169}],266:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../Notification");o.observeOn=function(e,t){return void 0===t&&(t=0),this.lift(new i(e,t))};var i=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.scheduler,this.delay))},e}();o.ObserveOnOperator=i;var s=function(e){function t(t,o,r){void 0===r&&(r=0),e.call(this,t),this.scheduler=o,this.delay=r}return r(t,e),t.dispatch=function(e){var t=e.notification,o=e.destination;t.observe(o),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.add(this.scheduler.schedule(t.dispatch,this.delay,new l(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(n.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(n.Notification.createError(e))},t.prototype._complete=function(){this.scheduleMessage(n.Notification.createComplete())},t}(a.Subscriber);o.ObserveOnSubscriber=s;var l=function(){return function(e,t){this.notification=e,this.destination=t}}();o.ObserveOnMessage=l},{"../Notification":25,"../Subscriber":34}],267:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../observable/FromObservable"),n=e("../util/isArray"),i=e("../OuterSubscriber"),s=e("../util/subscribeToResult");o.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return 1===e.length&&n.isArray(e[0])&&(e=e[0]),this.lift(new l(e))},o.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var o=null;return 1===e.length&&n.isArray(e[0])&&(e=e[0]),o=e.shift(),new a.FromObservable(o,null).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.nextSources))},e}(),d=function(e){function t(t,o){e.call(this,t),this.destination=t,this.nextSources=o}return r(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(){this.subscribeToNextSource()},t.prototype._complete=function(){this.subscribeToNextSource()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();e?this.add(s.subscribeToResult(this,e)):this.destination.complete()},t}(i.OuterSubscriber)},{"../OuterSubscriber":28,"../observable/FromObservable":176,"../util/isArray":353,"../util/subscribeToResult":364}],268:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.pairwise=function(){return this.lift(new n)};var n=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new i(e))},e}(),i=function(e){function t(t){e.call(this,t),this.hasPrev=!1}return r(t,e),t.prototype._next=function(e){this.hasPrev?this.destination.next([this.prev,e]):this.hasPrev=!0,this.prev=e},t}(a.Subscriber)},{"../Subscriber":34}],269:[function(e,t,o){"use strict";var r=e("../util/not"),a=e("./filter");o.partition=function(e,t){return[a.filter.call(this,e,t),a.filter.call(this,r.not(e,t))]}},{"../util/not":362,"./filter":245}],270:[function(e,t,o){"use strict";function r(e,t){return function(o){for(var r=o,a=0,n;a<t;a++)if(n=r[e[a]],"undefined"!=typeof n)r=n;else return;return r}}var a=e("./map");o.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var o=e.length;if(0===o)throw new Error("list of properties cannot be empty.");return a.map.call(this,r(e,o))}},{"./map":255}],271:[function(e,t,o){"use strict";var r=e("../Subject"),a=e("./multicast");o.publish=function(e){return e?a.multicast.call(this,function(){return new r.Subject},e):a.multicast.call(this,new r.Subject)}},{"../Subject":32,"./multicast":265}],272:[function(e,t,o){"use strict";var r=e("../BehaviorSubject"),a=e("./multicast");o.publishBehavior=function(e){return a.multicast.call(this,new r.BehaviorSubject(e))}},{"../BehaviorSubject":23,"./multicast":265}],273:[function(e,t,o){"use strict";var r=e("../AsyncSubject"),a=e("./multicast");o.publishLast=function(){return a.multicast.call(this,new r.AsyncSubject)}},{"../AsyncSubject":22,"./multicast":265}],274:[function(e,t,o){"use strict";var r=Number.POSITIVE_INFINITY,a=e("../ReplaySubject"),n=e("./multicast");o.publishReplay=function(e,t,o){return void 0===e&&(e=r),void 0===t&&(t=r),n.multicast.call(this,new a.ReplaySubject(e,t,o))}},{"../ReplaySubject":29,"./multicast":265}],275:[function(e,t,o){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(1===e.length)if(n.isArray(e[0]))e=e[0];else return e[0];return new i.ArrayObservable(e).lift(new d)}var a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../util/isArray"),i=e("../observable/ArrayObservable"),s=e("../OuterSubscriber"),l=e("../util/subscribeToResult");o.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return 1===e.length&&n.isArray(e[0])&&(e=e[0]),this.lift.call(r.apply(void 0,[this].concat(e)))},o.raceStatic=r;var d=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new p(e))},e}();o.RaceOperator=d;var p=function(e){function t(t){e.call(this,t),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}return a(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var o=0;o<t&&!this.hasFirst;o++){var r=e[o],a=l.subscribeToResult(this,r,r,o);this.subscriptions&&this.subscriptions.push(a),this.add(a)}this.observables=null}},t.prototype.notifyNext=function(e,t,o){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==o){var a=this.subscriptions[r];a.unsubscribe(),this.remove(a)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);o.RaceSubscriber=p},{"../OuterSubscriber":28,"../observable/ArrayObservable":166,"../util/isArray":353,"../util/subscribeToResult":364}],276:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.reduce=function(e,t){var o=!1;return 2<=arguments.length&&(o=!0),this.lift(new n(e,t,o))};var n=function(){function e(e,t,o){void 0===o&&(o=!1),this.accumulator=e,this.seed=t,this.hasSeed=o}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.accumulator,this.seed,this.hasSeed))},e}();o.ReduceOperator=n;var i=function(e){function t(t,o,r,a){e.call(this,t),this.accumulator=o,this.hasSeed=a,this.index=0,this.hasValue=!1,this.acc=r,this.hasSeed||this.index++}return r(t,e),t.prototype._next=function(e){this.hasValue||(this.hasValue=this.hasSeed)?this._tryReduce(e):(this.acc=e,this.hasValue=!0)},t.prototype._tryReduce=function(e){var t;try{t=this.accumulator(this.acc,e,this.index++)}catch(e){return void this.destination.error(e)}this.acc=t},t.prototype._complete=function(){(this.hasValue||this.hasSeed)&&this.destination.next(this.acc),this.destination.complete()},t}(a.Subscriber);o.ReduceSubscriber=i},{"../Subscriber":34}],277:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../observable/EmptyObservable");o.repeat=function(e){return void 0===e&&(e=-1),0===e?new n.EmptyObservable:0>e?this.lift(new i(-1,this)):this.lift(new i(e-1,this))};var i=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,o,r){e.call(this,t),this.count=o,this.source=r}return r(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this,o=t.source,r=t.count;if(0===r)return e.prototype.complete.call(this);-1<r&&(this.count=r-1),o.subscribe(this._unsubscribeAndRecycle())}},t}(a.Subscriber)},{"../Subscriber":34,"../observable/EmptyObservable":171}],278:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subject"),n=e("../util/tryCatch"),i=e("../util/errorObject"),s=e("../OuterSubscriber"),l=e("../util/subscribeToResult");o.repeatWhen=function(e){return this.lift(new d(e))};var d=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.notifier,t))},e}(),p=function(e){function t(t,o,r){e.call(this,t),this.notifier=o,this.source=r,this.sourceIsBeingSubscribedTo=!0}return r(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(!this.retries)this.subscribeToRetries();else if(this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},t.prototype._unsubscribe=function(){var e=this,t=e.notifications,o=e.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),o&&(o.unsubscribe(),this.retriesSubscription=null),this.retries=null},t.prototype._unsubscribeAndRecycle=function(){var t=this,o=t.notifications,r=t.retries,a=t.retriesSubscription;return this.notifications=null,this.retries=null,this.retriesSubscription=null,e.prototype._unsubscribeAndRecycle.call(this),this.notifications=o,this.retries=r,this.retriesSubscription=a,this},t.prototype.subscribeToRetries=function(){this.notifications=new a.Subject;var t=n.tryCatch(this.notifier)(this.notifications);return t===i.errorObject?e.prototype.complete.call(this):void(this.retries=t,this.retriesSubscription=l.subscribeToResult(this,t))},t}(s.OuterSubscriber)},{"../OuterSubscriber":28,"../Subject":32,"../util/errorObject":352,"../util/subscribeToResult":364,"../util/tryCatch":366}],279:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.retry=function(e){return void 0===e&&(e=-1),this.lift(new n(e,this))};var n=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.count,this.source))},e}(),i=function(e){function t(t,o,r){e.call(this,t),this.count=o,this.source=r}return r(t,e),t.prototype.error=function(t){if(!this.isStopped){var o=this,r=o.source,a=o.count;if(0===a)return e.prototype.error.call(this,t);-1<a&&(this.count=a-1),r.subscribe(this._unsubscribeAndRecycle())}},t}(a.Subscriber)},{"../Subscriber":34}],280:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subject"),n=e("../util/tryCatch"),i=e("../util/errorObject"),s=e("../OuterSubscriber"),l=e("../util/subscribeToResult");o.retryWhen=function(e){return this.lift(new d(e,this))};var d=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.notifier,this.source))},e}(),p=function(e){function t(t,o,r){e.call(this,t),this.notifier=o,this.source=r}return r(t,e),t.prototype.error=function(t){if(!this.isStopped){var o=this.errors,r=this.retries,s=this.retriesSubscription;if(!r){if(o=new a.Subject,r=n.tryCatch(this.notifier)(o),r===i.errorObject)return e.prototype.error.call(this,i.errorObject.e);s=l.subscribeToResult(this,r)}else this.errors=null,this.retriesSubscription=null;this._unsubscribeAndRecycle(),this.errors=o,this.retries=r,this.retriesSubscription=s,o.next(t)}},t.prototype._unsubscribe=function(){var e=this,t=e.errors,o=e.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),o&&(o.unsubscribe(),this.retriesSubscription=null),this.retries=null},t.prototype.notifyNext=function(){var e=this,t=e.errors,o=e.retries,r=e.retriesSubscription;this.errors=null,this.retries=null,this.retriesSubscription=null,this._unsubscribeAndRecycle(),this.errors=t,this.retries=o,this.retriesSubscription=r,this.source.subscribe(this)},t}(s.OuterSubscriber)},{"../OuterSubscriber":28,"../Subject":32,"../util/errorObject":352,"../util/subscribeToResult":364,"../util/tryCatch":366}],281:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.sample=function(e){return this.lift(new i(e))};var i=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var o=new s(e),r=t.subscribe(o);return r.add(n.subscribeToResult(o,this.notifier)),r},e}(),s=function(e){function t(){e.apply(this,arguments),this.hasValue=!1}return r(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],282:[function(e,t,o){"use strict";function r(e){var t=e.subscriber,o=e.period;t.notifyNext(),this.schedule(e,o)}var a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../Subscriber"),i=e("../scheduler/async");o.sampleTime=function(e,t){return void 0===t&&(t=i.async),this.lift(new s(e,t))};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,o,a){e.call(this,t),this.period=o,this.scheduler=a,this.hasValue=!1,this.add(a.schedule(r,o,{subscriber:this,period:o}))}return a(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(n.Subscriber)},{"../Subscriber":34,"../scheduler/async":329}],283:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.scan=function(e,t){var o=!1;return 2<=arguments.length&&(o=!0),this.lift(new n(e,t,o))};var n=function(){function e(e,t,o){void 0===o&&(o=!1),this.accumulator=e,this.seed=t,this.hasSeed=o}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.accumulator,this.seed,this.hasSeed))},e}(),i=function(e){function t(t,o,r,a){e.call(this,t),this.accumulator=o,this._seed=r,this.hasSeed=a,this.index=0}return r(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){return this.hasSeed?this._tryNext(e):void(this.seed=e,this.destination.next(e))},t.prototype._tryNext=function(e){var t=this.index++,o;try{o=this.accumulator(this.seed,e,t)}catch(e){this.destination.error(e)}this.seed=o,this.destination.next(o)},t}(a.Subscriber)},{"../Subscriber":34}],284:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../util/tryCatch"),i=e("../util/errorObject");o.sequenceEqual=function(e,t){return this.lift(new s(e,t))};var s=function(){function e(e,t){this.compareTo=e,this.comparor=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.compareTo,this.comparor))},e}();o.SequenceEqualOperator=s;var l=function(e){function t(t,o,r){e.call(this,t),this.compareTo=o,this.comparor=r,this._a=[],this._b=[],this._oneComplete=!1,this.add(o.subscribe(new d(t,this)))}return r(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t.prototype.checkValues=function(){for(var e=this,t=e._a,o=e._b,r=e.comparor;0<t.length&&0<o.length;){var s=t.shift(),a=o.shift(),l=!1;r?(l=n.tryCatch(r)(s,a),l===i.errorObject&&this.destination.error(i.errorObject.e)):l=s===a,l||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t}(a.Subscriber);o.SequenceEqualSubscriber=l;var d=function(e){function t(t,o){e.call(this,t),this.parent=o}return r(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e)},t.prototype._complete=function(){this.parent._complete()},t}(a.Subscriber)},{"../Subscriber":34,"../util/errorObject":352,"../util/tryCatch":366}],285:[function(e,t,o){"use strict";function r(){return new n.Subject}var a=e("./multicast"),n=e("../Subject");o.share=function(){return a.multicast.call(this,r).refCount()}},{"../Subject":32,"./multicast":265}],286:[function(e,t,o){"use strict";var r=e("./multicast"),a=e("../ReplaySubject");o.shareReplay=function(e,t,o){var n=r.multicast.call(this,function(){return this._isComplete?i:i=new a.ReplaySubject(e,t,o)}),i;return n.refCount()}},{"../ReplaySubject":29,"./multicast":265}],287:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../util/EmptyError");o.single=function(e){return this.lift(new i(e,this))};var i=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,o,r){e.call(this,t),this.predicate=o,this.source=r,this.seenValue=!1,this.index=0}return r(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;0<this.index?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new n.EmptyError)},t}(a.Subscriber)},{"../Subscriber":34,"../util/EmptyError":341}],288:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.skip=function(e){return this.lift(new n(e))};var n=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.total))},e}(),i=function(e){function t(t,o){e.call(this,t),this.total=o,this.count=0}return r(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(a.Subscriber)},{"../Subscriber":34}],289:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../util/ArgumentOutOfRangeError");o.skipLast=function(e){return this.lift(new i(e))};var i=function(){function e(e){if(this._skipCount=e,0>this._skipCount)throw new n.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new a.Subscriber(e)):t.subscribe(new s(e,this._skipCount))},e}(),s=function(e){function t(t,o){e.call(this,t),this._skipCount=o,this._count=0,this._ring=Array(o)}return r(t,e),t.prototype._next=function(e){var t=this._skipCount,o=this._count++;if(o<t)this._ring[o]=e;else{var r=o%t,a=this._ring,n=a[r];a[r]=e,this.destination.next(n)}},t}(a.Subscriber)},{"../Subscriber":34,"../util/ArgumentOutOfRangeError":340}],290:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.skipUntil=function(e){return this.lift(new i(e))};var i=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,o){e.call(this,t),this.hasValue=!1,this.isInnerStopped=!1,this.add(n.subscribeToResult(this,o))}return r(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype._complete=function(){this.isInnerStopped?e.prototype._complete.call(this):this.unsubscribe()},t.prototype.notifyNext=function(){this.hasValue=!0},t.prototype.notifyComplete=function(){this.isInnerStopped=!0,this.isStopped&&e.prototype._complete.call(this)},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],291:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.skipWhile=function(e){return this.lift(new n(e))};var n=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.predicate))},e}(),i=function(e){function t(t,o){e.call(this,t),this.predicate=o,this.skipping=!0,this.index=0}return r(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(a.Subscriber)},{"../Subscriber":34}],292:[function(e,t,o){"use strict";var r=e("../observable/ArrayObservable"),a=e("../observable/ScalarObservable"),n=e("../observable/EmptyObservable"),i=e("./concat"),s=e("../util/isScheduler");o.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var o=e[e.length-1];s.isScheduler(o)?e.pop():o=null;var l=e.length;return 1===l?i.concatStatic(new a.ScalarObservable(e[0],o),this):1<l?i.concatStatic(new r.ArrayObservable(e,o),this):i.concatStatic(new n.EmptyObservable(o),this)}},{"../observable/ArrayObservable":166,"../observable/EmptyObservable":171,"../observable/ScalarObservable":185,"../util/isScheduler":360,"./concat":225}],293:[function(e,t,o){"use strict";var r=e("../observable/SubscribeOnObservable");o.subscribeOn=function(e,t){return void 0===t&&(t=0),this.lift(new a(e,t))};var a=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new r.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},{"../observable/SubscribeOnObservable":186}],294:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o._switch=function(){return this.lift(new i)};var i=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){e.call(this,t),this.active=0,this.hasCompleted=!1}return r(t,e),t.prototype._next=function(e){this.unsubscribeInner(),this.active++,this.add(this.innerSubscription=n.subscribeToResult(this,e))},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&this.destination.complete()},t.prototype.unsubscribeInner=function(){this.active=0<this.active?this.active-1:0;var e=this.innerSubscription;e&&(e.unsubscribe(),this.remove(e))},t.prototype.notifyNext=function(e,t){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.unsubscribeInner(),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],295:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.switchMap=function(e,t){return this.lift(new i(e,t))};var i=function(){function e(e,t){this.project=e,this.resultSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.resultSelector))},e}(),s=function(e){function t(t,o,r){e.call(this,t),this.project=o,this.resultSelector=r,this.index=0}return r(t,e),t.prototype._next=function(e){var t=this.index++,o;try{o=this.project(e,t)}catch(e){return void this.destination.error(e)}this._innerSub(o,e,t)},t.prototype._innerSub=function(e,t,o){var r=this.innerSubscription;r&&r.unsubscribe(),this.add(this.innerSubscription=n.subscribeToResult(this,e,t,o))},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.innerSubscription=null},t.prototype.notifyComplete=function(t){this.remove(t),this.innerSubscription=null,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t,o,r){this.resultSelector?this._tryNotifyNext(e,t,o,r):this.destination.next(t)},t.prototype._tryNotifyNext=function(e,t,o,r){var a;try{a=this.resultSelector(e,t,o,r)}catch(e){return void this.destination.error(e)}this.destination.next(a)},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],296:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.switchMapTo=function(e,t){return this.lift(new i(e,t))};var i=function(){function e(e,t){this.observable=e,this.resultSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.observable,this.resultSelector))},e}(),s=function(e){function t(t,o,r){e.call(this,t),this.inner=o,this.resultSelector=r,this.index=0}return r(t,e),t.prototype._next=function(e){var t=this.innerSubscription;t&&t.unsubscribe(),this.add(this.innerSubscription=n.subscribeToResult(this,this.inner,e,this.index++))},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.innerSubscription=null},t.prototype.notifyComplete=function(t){this.remove(t),this.innerSubscription=null,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t,o,r){var a=this,n=a.resultSelector,i=a.destination;n?this.tryResultSelector(e,t,o,r):i.next(t)},t.prototype.tryResultSelector=function(e,t,o,r){var a=this,n=a.resultSelector,i=a.destination,s;try{s=n(e,t,o,r)}catch(e){return void i.error(e)}i.next(s)},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],297:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../util/ArgumentOutOfRangeError"),i=e("../observable/EmptyObservable");o.take=function(e){return 0===e?new i.EmptyObservable:this.lift(new s(e))};var s=function(){function e(e){if(this.total=e,0>this.total)throw new n.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.total))},e}(),l=function(e){function t(t,o){e.call(this,t),this.total=o,this.count=0}return r(t,e),t.prototype._next=function(e){var t=this.total,o=++this.count;o<=t&&(this.destination.next(e),o===t&&(this.destination.complete(),this.unsubscribe()))},t}(a.Subscriber)},{"../Subscriber":34,"../observable/EmptyObservable":171,"../util/ArgumentOutOfRangeError":340}],298:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../util/ArgumentOutOfRangeError"),i=e("../observable/EmptyObservable");o.takeLast=function(e){return 0===e?new i.EmptyObservable:this.lift(new s(e))};var s=function(){function e(e){if(this.total=e,0>this.total)throw new n.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.total))},e}(),l=function(e){function t(t,o){e.call(this,t),this.total=o,this.ring=[],this.count=0}return r(t,e),t.prototype._next=function(e){var t=this.ring,o=this.total,r=this.count++;if(t.length<o)t.push(e);else{t[r%o]=e}},t.prototype._complete=function(){var e=this.destination,t=this.count;if(0<t)for(var o=this.count>=this.total?this.total:this.count,r=this.ring,a=0,n;a<o;a++)n=t++%o,e.next(r[n]);e.complete()},t}(a.Subscriber)},{"../Subscriber":34,"../observable/EmptyObservable":171,"../util/ArgumentOutOfRangeError":340}],299:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.takeUntil=function(e){return this.lift(new i(e))};var i=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,o){e.call(this,t),this.notifier=o,this.add(n.subscribeToResult(this,o))}return r(t,e),t.prototype.notifyNext=function(){this.complete()},t.prototype.notifyComplete=function(){},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],300:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.takeWhile=function(e){return this.lift(new n(e))};var n=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new i(e,this.predicate))},e}(),i=function(e){function t(t,o){e.call(this,t),this.predicate=o,this.index=0}return r(t,e),t.prototype._next=function(e){var t=this.destination,o;try{o=this.predicate(e,this.index++)}catch(e){return void t.error(e)}this.nextOrComplete(e,o)},t.prototype.nextOrComplete=function(e,t){var o=this.destination;t?o.next(e):o.complete()},t}(a.Subscriber)},{"../Subscriber":34}],301:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.defaultThrottleConfig={leading:!0,trailing:!1},o.throttle=function(e,t){return void 0===t&&(t=o.defaultThrottleConfig),this.lift(new i(e,t.leading,t.trailing))};var i=function(){function e(e,t,o){this.durationSelector=e,this.leading=t,this.trailing=o}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,o,r,a){e.call(this,t),this.destination=t,this.durationSelector=o,this._leading=r,this._trailing=a,this._hasTrailingValue=!1}return r(t,e),t.prototype._next=function(e){if(this.throttled)this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=e);else{var t=this.tryDurationSelector(e);t&&this.add(this.throttled=n.subscribeToResult(this,t)),this._leading&&(this.destination.next(e),this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=e))}},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype._unsubscribe=function(){var e=this,t=e.throttled,o=e._trailingValue,r=e._hasTrailingValue,a=e._trailing;this._trailingValue=null,this._hasTrailingValue=!1,t&&(this.remove(t),this.throttled=null,t.unsubscribe())},t.prototype._sendTrailing=function(){var e=this,t=e.destination,o=e.throttled,r=e._trailing,a=e._trailingValue,n=e._hasTrailingValue;o&&r&&n&&(t.next(a),this._trailingValue=null,this._hasTrailingValue=!1)},t.prototype.notifyNext=function(){this._sendTrailing(),this._unsubscribe()},t.prototype.notifyComplete=function(){this._sendTrailing(),this._unsubscribe()},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],302:[function(e,t,o){"use strict";function r(e){var t=e.subscriber;t.clearThrottle()}var a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../Subscriber"),i=e("../scheduler/async"),s=e("./throttle");o.throttleTime=function(e,t,o){return void 0===t&&(t=i.async),void 0===o&&(o=s.defaultThrottleConfig),this.lift(new l(e,t,o.leading,o.trailing))};var l=function(){function e(e,t,o,r){this.duration=e,this.scheduler=t,this.leading=o,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),d=function(e){function t(t,o,r,a,n){e.call(this,t),this.duration=o,this.scheduler=r,this.leading=a,this.trailing=n,this._hasTrailingValue=!1,this._trailingValue=null}return a(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(r,this.duration,{subscriber:this})),this.leading&&this.destination.next(e))},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(n.Subscriber)},{"../Subscriber":34,"../scheduler/async":329,"./throttle":301}],303:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../scheduler/async");o.timeInterval=function(e){return void 0===e&&(e=n.async),this.lift(new s(e))};var i=function(){return function(e,t){this.value=e,this.interval=t}}();o.TimeInterval=i;var s=function(){function e(e){this.scheduler=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.scheduler))},e}(),l=function(e){function t(t,o){e.call(this,t),this.scheduler=o,this.lastTime=0,this.lastTime=o.now()}return r(t,e),t.prototype._next=function(e){var t=this.scheduler.now(),o=t-this.lastTime;this.lastTime=t,this.destination.next(new i(e,o))},t}(a.Subscriber)},{"../Subscriber":34,"../scheduler/async":329}],304:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../scheduler/async"),n=e("../util/isDate"),i=e("../Subscriber"),s=e("../util/TimeoutError");o.timeout=function(e,t){void 0===t&&(t=a.async);var o=n.isDate(e),r=o?+e-t.now():Math.abs(e);return this.lift(new l(r,o,t,new s.TimeoutError()))};var l=function(){function e(e,t,o,r){this.waitFor=e,this.absoluteTimeout=t,this.scheduler=o,this.errorInstance=r}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.absoluteTimeout,this.waitFor,this.scheduler,this.errorInstance))},e}(),d=function(e){function t(t,o,r,a,n){e.call(this,t),this.absoluteTimeout=o,this.waitFor=r,this.scheduler=a,this.errorInstance=n,this.action=null,this.scheduleTimeout()}return r(t,e),t.dispatchTimeout=function(e){e.error(e.errorInstance)},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.errorInstance=null},t}(i.Subscriber)},{"../Subscriber":34,"../scheduler/async":329,"../util/TimeoutError":348,"../util/isDate":355}],305:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../scheduler/async"),n=e("../util/isDate"),i=e("../OuterSubscriber"),s=e("../util/subscribeToResult");o.timeoutWith=function(e,t,o){void 0===o&&(o=a.async);var r=n.isDate(e),i=r?+e-o.now():Math.abs(e);return this.lift(new l(i,r,t,o))};var l=function(){function e(e,t,o,r){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=o,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),d=function(e){function t(t,o,r,a,n){e.call(this,t),this.absoluteTimeout=o,this.waitFor=r,this.withObservable=a,this.scheduler=n,this.action=null,this.scheduleTimeout()}return r(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.subscribeToResult(e,t))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},t}(i.OuterSubscriber)},{"../OuterSubscriber":28,"../scheduler/async":329,"../util/isDate":355,"../util/subscribeToResult":364}],306:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../scheduler/async");o.timestamp=function(e){return void 0===e&&(e=n.async),this.lift(new s(e))};var i=function(){return function(e,t){this.value=e,this.timestamp=t}}();o.Timestamp=i;var s=function(){function e(e){this.scheduler=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.scheduler))},e}(),l=function(e){function t(t,o){e.call(this,t),this.scheduler=o}return r(t,e),t.prototype._next=function(e){var t=this.scheduler.now();this.destination.next(new i(e,t))},t}(a.Subscriber)},{"../Subscriber":34,"../scheduler/async":329}],307:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber");o.toArray=function(){return this.lift(new n)};var n=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new i(e))},e}(),i=function(e){function t(t){e.call(this,t),this.array=[]}return r(t,e),t.prototype._next=function(e){this.array.push(e)},t.prototype._complete=function(){this.destination.next(this.array),this.destination.complete()},t}(a.Subscriber)},{"../Subscriber":34}],308:[function(e,t,o){"use strict";var r=e("../util/root");o.toPromise=function(e){var t=this;if(e||(r.root.Rx&&r.root.Rx.config&&r.root.Rx.config.Promise?e=r.root.Rx.config.Promise:r.root.Promise&&(e=r.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,o){var r;t.subscribe(function(e){return r=e},function(e){return o(e)},function(){return e(r)})})}},{"../util/root":363}],309:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subject"),n=e("../OuterSubscriber"),i=e("../util/subscribeToResult");o.window=function(e){return this.lift(new s(e))};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var o=new l(e),r=t.subscribe(o);return r.closed||o.add(i.subscribeToResult(o,this.windowBoundaries)),r},e}(),l=function(e){function t(t){e.call(this,t),this.window=new a.Subject,t.next(this.window)}return r(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,o=this.window=new a.Subject;t.next(o)},t}(n.OuterSubscriber)},{"../OuterSubscriber":28,"../Subject":32,"../util/subscribeToResult":364}],310:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscriber"),n=e("../Subject");o.windowCount=function(e,t){return void 0===t&&(t=0),this.lift(new i(e,t))};var i=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.windowSize,this.startWindowEvery))},e}(),s=function(e){function t(t,o,r){e.call(this,t),this.destination=t,this.windowSize=o,this.startWindowEvery=r,this.windows=[new n.Subject],this.count=0,t.next(this.windows[0])}return r(t,e),t.prototype._next=function(e){for(var t=0<this.startWindowEvery?this.startWindowEvery:this.windowSize,o=this.destination,r=this.windowSize,a=this.windows,s=a.length,l=0;l<s&&!this.closed;l++)a[l].next(e);var i=this.count-r+1;if(0<=i&&0==i%t&&!this.closed&&a.shift().complete(),0==++this.count%t&&!this.closed){var d=new n.Subject;a.push(d),o.next(d)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;0<t.length&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;0<e.length&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(a.Subscriber)},{"../Subject":32,"../Subscriber":34}],311:[function(e,t,o){"use strict";function r(e){var t=e.subscriber,o=e.windowTimeSpan,r=e.window;r&&t.closeWindow(r),e.window=t.openWindow(),this.schedule(e,o)}function a(e){var t=e.windowTimeSpan,o=e.subscriber,r=e.scheduler,a=e.windowCreationInterval,i=o.openWindow(),s=this,l={action:s,subscription:null};l.subscription=r.schedule(n,t,{subscriber:o,window:i,context:l}),s.add(l.subscription),s.schedule(e,a)}function n(e){var t=e.subscriber,o=e.window,r=e.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),t.closeWindow(o)}var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},s=e("../Subject"),l=e("../scheduler/async"),d=e("../Subscriber"),p=e("../util/isNumeric"),c=e("../util/isScheduler");o.windowTime=function(e){var t=l.async,o=null,r=Number.POSITIVE_INFINITY;return c.isScheduler(arguments[3])&&(t=arguments[3]),c.isScheduler(arguments[2])?t=arguments[2]:p.isNumeric(arguments[2])&&(r=arguments[2]),c.isScheduler(arguments[1])?t=arguments[1]:p.isNumeric(arguments[1])&&(o=arguments[1]),this.lift(new u(e,o,r,t))};var u=function(){function e(e,t,o,r){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=o,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new m(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),b=function(e){function t(){e.apply(this,arguments),this._numberOfNextedValues=0}return i(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(s.Subject),m=function(e){function t(t,o,i,s,l){e.call(this,t),this.destination=t,this.windowTimeSpan=o,this.windowCreationInterval=i,this.maxWindowSize=s,this.scheduler=l,this.windows=[];var d=this.openWindow();if(null!==i&&0<=i){var p={subscriber:this,window:d,context:null},c={windowTimeSpan:o,windowCreationInterval:i,subscriber:this,scheduler:l};this.add(l.schedule(n,o,p)),this.add(l.schedule(a,i,c))}else{var u={subscriber:this,window:d,windowTimeSpan:o};this.add(l.schedule(r,o,u))}}return i(t,e),t.prototype._next=function(e){for(var t=this.windows,o=t.length,r=0,a;r<o;r++)a=t[r],a.closed||(a.next(e),a.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(a))},t.prototype._error=function(e){for(var t=this.windows;0<t.length;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows,t;0<e.length;)t=e.shift(),t.closed||t.complete();this.destination.complete()},t.prototype.openWindow=function(){var e=new b;this.windows.push(e);var t=this.destination;return t.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(d.Subscriber)},{"../Subject":32,"../Subscriber":34,"../scheduler/async":329,"../util/isNumeric":357,"../util/isScheduler":360}],312:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subject"),n=e("../Subscription"),i=e("../util/tryCatch"),s=e("../util/errorObject"),l=e("../OuterSubscriber"),d=e("../util/subscribeToResult");o.windowToggle=function(e,t){return this.lift(new p(e,t))};var p=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,o,r){e.call(this,t),this.openings=o,this.closingSelector=r,this.contexts=[],this.add(this.openSubscription=d.subscribeToResult(this,o,o))}return r(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var o=t.length,r=0;r<o;r++)t[r].window.next(e)},t.prototype._error=function(t){var o=this.contexts;if(this.contexts=null,o)for(var r=o.length,a=-1,n;++a<r;)n=o[a],n.window.error(t),n.subscription.unsubscribe();e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var o=t.length,r=-1,a;++r<o;)a=t[r],a.window.complete(),a.subscription.unsubscribe();e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,o=-1,r;++o<t;)r=e[o],r.window.unsubscribe(),r.subscription.unsubscribe()},t.prototype.notifyNext=function(e,t){if(e===this.openings){var o=this.closingSelector,r=i.tryCatch(o)(t);if(r===s.errorObject)return this.error(s.errorObject.e);var l=new a.Subject,p=new n.Subscription,c={window:l,subscription:p};this.contexts.push(c);var u=d.subscribeToResult(this,r,c);u.closed?this.closeWindow(this.contexts.length-1):(u.context=c,p.add(u)),this.destination.next(l)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,o=t[e],r=o.window,a=o.subscription;t.splice(e,1),r.complete(),a.unsubscribe()}},t}(l.OuterSubscriber)},{"../OuterSubscriber":28,"../Subject":32,"../Subscription":35,"../util/errorObject":352,"../util/subscribeToResult":364,"../util/tryCatch":366}],313:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subject"),n=e("../util/tryCatch"),i=e("../util/errorObject"),s=e("../OuterSubscriber"),l=e("../util/subscribeToResult");o.windowWhen=function(e){return this.lift(new d(e))};var d=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.closingSelector))},e}(),p=function(e){function t(t,o){e.call(this,t),this.destination=t,this.closingSelector=o,this.openWindow()}return r(t,e),t.prototype.notifyNext=function(e,t,o,r,a){this.openWindow(a)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t=this.window;t&&t.complete();var o=this.window=new a.Subject;this.destination.next(o);var r=n.tryCatch(this.closingSelector)();if(r===i.errorObject){var s=i.errorObject.e;this.destination.error(s),this.window.error(s)}else this.add(this.closingNotification=l.subscribeToResult(this,r))},t}(s.OuterSubscriber)},{"../OuterSubscriber":28,"../Subject":32,"../util/errorObject":352,"../util/subscribeToResult":364,"../util/tryCatch":366}],314:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../OuterSubscriber"),n=e("../util/subscribeToResult");o.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var o;"function"==typeof e[e.length-1]&&(o=e.pop());return this.lift(new i(e,o))};var i=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.observables,this.project))},e}(),s=function(e){function t(t,o,r){e.call(this,t),this.observables=o,this.project=r,this.toRespond=[];var a=o.length;this.values=Array(a);for(var s=0;s<a;s++)this.toRespond.push(s);for(var s=0,i;s<a;s++)i=o[s],this.add(n.subscribeToResult(this,i,i,s))}return r(t,e),t.prototype.notifyNext=function(e,t,o){this.values[o]=t;var r=this.toRespond;if(0<r.length){var a=r.indexOf(o);-1!==a&&r.splice(a,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(a.OuterSubscriber)},{"../OuterSubscriber":28,"../util/subscribeToResult":364}],315:[function(e,t,o){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var o=e[e.length-1];return"function"==typeof o&&e.pop(),new n.ArrayObservable(e).lift(new c(o))}var a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../observable/ArrayObservable"),i=e("../util/isArray"),s=e("../Subscriber"),l=e("../OuterSubscriber"),d=e("../util/subscribeToResult"),p=e("../symbol/iterator");o.zipProto=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.lift.call(r.apply(void 0,[this].concat(e)))},o.zipStatic=r;var c=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}();o.ZipOperator=c;var u=function(e){function t(t,o,r){void 0===r&&(r=Object.create(null)),e.call(this,t),this.iterators=[],this.active=0,this.project="function"==typeof o?o:null,this.values=r}return a(t,e),t.prototype._next=function(e){var t=this.iterators;i.isArray(e)?t.push(new m(e)):"function"==typeof e[p.iterator]?t.push(new b(e[p.iterator]())):t.push(new y(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(0===t)return void this.destination.complete();this.active=t;for(var o=0,r;o<t;o++)r=e[o],r.stillUnsubscribed?this.add(r.subscribe(r,o)):this.active--},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,o=this.destination,r=0,a;r<t;r++)if(a=e[r],"function"==typeof a.hasValue&&!a.hasValue())return;for(var n=!1,i=[],r=0;r<t;r++){var a=e[r],s=a.next();if(a.hasCompleted()&&(n=!0),s.done)return void o.complete();i.push(s.value)}this.project?this._tryProject(i):o.next(i),n&&o.complete()},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(s.Subscriber);o.ZipSubscriber=u;var b=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return e&&e.done},e}(),m=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[p.iterator]=function(){return this},e.prototype.next=function(){var e=this.index++,t=this.array;return e<this.length?{value:t[e],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),y=function(e){function t(t,o,r){e.call(this,t),this.parent=o,this.observable=r,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return a(t,e),t.prototype[p.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return 0<this.buffer.length},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){0<this.buffer.length?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e,t){this.buffer.push(t),this.parent.checkIterators()},t.prototype.subscribe=function(e,t){return d.subscribeToResult(this,this.observable,this,t)},t}(l.OuterSubscriber)},{"../OuterSubscriber":28,"../Subscriber":34,"../observable/ArrayObservable":166,"../symbol/iterator":331,"../util/isArray":353,"../util/subscribeToResult":364}],316:[function(e,t,o){"use strict";var r=e("./zip");o.zipAll=function(e){return this.lift(new r.ZipOperator(e))}},{"./zip":315}],317:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subscription"),n=function(e){function t(){e.call(this)}return r(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(a.Subscription);o.Action=n},{"../Subscription":35}],318:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./AsyncAction"),n=e("../util/AnimationFrame"),i=function(e){function t(t,o){e.call(this,t,o),this.scheduler=t,this.work=o}return r(t,e),t.prototype.requestAsyncId=function(t,o,r){return(void 0===r&&(r=0),null!==r&&0<r)?e.prototype.requestAsyncId.call(this,t,o,r):(t.actions.push(this),t.scheduled||(t.scheduled=n.AnimationFrame.requestAnimationFrame(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,o,r){return(void 0===r&&(r=0),null!==r&&0<r||null===r&&0<this.delay)?e.prototype.recycleAsyncId.call(this,t,o,r):void(0===t.actions.length&&(n.AnimationFrame.cancelAnimationFrame(o),t.scheduled=void 0))},t}(a.AsyncAction);o.AnimationFrameAction=i},{"../util/AnimationFrame":339,"./AsyncAction":322}],319:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./AsyncScheduler"),n=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t=this.actions,o=-1,r=t.length,a;e=e||t.shift();do if(a=e.execute(e.state,e.delay))break;while(++o<r&&(e=t.shift()));if(this.active=!1,a){for(;++o<r&&(e=t.shift());)e.unsubscribe();throw a}},t}(a.AsyncScheduler);o.AnimationFrameScheduler=n},{"./AsyncScheduler":323}],320:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../util/Immediate"),n=e("./AsyncAction"),i=function(e){function t(t,o){e.call(this,t,o),this.scheduler=t,this.work=o}return r(t,e),t.prototype.requestAsyncId=function(t,o,r){return(void 0===r&&(r=0),null!==r&&0<r)?e.prototype.requestAsyncId.call(this,t,o,r):(t.actions.push(this),t.scheduled||(t.scheduled=a.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,o,r){return(void 0===r&&(r=0),null!==r&&0<r||null===r&&0<this.delay)?e.prototype.recycleAsyncId.call(this,t,o,r):void(0===t.actions.length&&(a.Immediate.clearImmediate(o),t.scheduled=void 0))},t}(n.AsyncAction);o.AsapAction=i},{"../util/Immediate":343,"./AsyncAction":322}],321:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./AsyncScheduler"),n=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t=this.actions,o=-1,r=t.length,a;e=e||t.shift();do if(a=e.execute(e.state,e.delay))break;while(++o<r&&(e=t.shift()));if(this.active=!1,a){for(;++o<r&&(e=t.shift());)e.unsubscribe();throw a}},t}(a.AsyncScheduler);o.AsapScheduler=n},{"./AsyncScheduler":323}],322:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../util/root"),n=e("./Action"),i=function(e){function t(t,o){e.call(this,t,o),this.scheduler=t,this.work=o,this.pending=!1}return r(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e,this.pending=!0;var o=this.id,r=this.scheduler;return null!=o&&(this.id=this.recycleAsyncId(r,o,t)),this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,o){return void 0===o&&(o=0),a.root.setInterval(e.flush.bind(e,this),o)},t.prototype.recycleAsyncId=function(e,t,o){return void 0===o&&(o=0),null!==o&&this.delay===o&&!1===this.pending?t:a.root.clearInterval(t)&&void 0||void 0},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var o=this._execute(e,t);return o?o:void(!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null)))},t.prototype._execute=function(e){var t=!1,o;try{this.work(e)}catch(r){t=!0,o=!!r&&r||new Error(r)}if(t)return this.unsubscribe(),o},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,o=t.actions,r=o.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&o.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(n.Action);o.AsyncAction=i},{"../util/root":363,"./Action":317}],323:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Scheduler"),n=function(e){function t(){e.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return r(t,e),t.prototype.flush=function(e){var t=this.actions;if(this.active)return void t.push(e);var o;this.active=!0;do if(o=e.execute(e.state,e.delay))break;while(e=t.shift());if(this.active=!1,o){for(;e=t.shift();)e.unsubscribe();throw o}},t}(a.Scheduler);o.AsyncScheduler=n},{"../Scheduler":31}],324:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./AsyncAction"),n=function(e){function t(t,o){e.call(this,t,o),this.scheduler=t,this.work=o}return r(t,e),t.prototype.schedule=function(t,o){return(void 0===o&&(o=0),0<o)?e.prototype.schedule.call(this,t,o):(this.delay=o,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,o){return 0<o||this.closed?e.prototype.execute.call(this,t,o):this._execute(t,o)},t.prototype.requestAsyncId=function(t,o,r){return void 0===r&&(r=0),null!==r&&0<r||null===r&&0<this.delay?e.prototype.requestAsyncId.call(this,t,o,r):t.flush(this)},t}(a.AsyncAction);o.QueueAction=n},{"./AsyncAction":322}],325:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./AsyncScheduler"),n=function(e){function t(){e.apply(this,arguments)}return r(t,e),t}(a.AsyncScheduler);o.QueueScheduler=n},{"./AsyncScheduler":323}],326:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("./AsyncAction"),n=e("./AsyncScheduler"),i=function(e){function t(t,o){var r=this;void 0===t&&(t=s),void 0===o&&(o=Number.POSITIVE_INFINITY),e.call(this,t,function(){return r.frame}),this.maxFrames=o,this.frame=0,this.index=-1}return r(t,e),t.prototype.flush=function(){for(var e=this,t=e.actions,o=e.maxFrames,r,a;(a=t.shift())&&(this.frame=a.delay)<=o&&!(r=a.execute(a.state,a.delay)););if(r){for(;a=t.shift();)a.unsubscribe();throw r}},t.frameTimeFactor=10,t}(n.AsyncScheduler);o.VirtualTimeScheduler=i;var s=function(e){function t(t,o,r){void 0===r&&(r=t.index+=1),e.call(this,t,o),this.scheduler=t,this.work=o,this.index=r,this.active=!0,this.index=t.index=r}return r(t,e),t.prototype.schedule=function(o,r){if(void 0===r&&(r=0),!this.id)return e.prototype.schedule.call(this,o,r);this.active=!1;var a=new t(this.scheduler,this.work);return this.add(a),a.schedule(o,r)},t.prototype.requestAsyncId=function(e,o,r){void 0===r&&(r=0),this.delay=e.frame+r;var a=e.actions;return a.push(this),a.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,o){void 0===o&&(o=0)},t.prototype._execute=function(t,o){if(!0===this.active)return e.prototype._execute.call(this,t,o)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(a.AsyncAction);o.VirtualAction=s},{"./AsyncAction":322,"./AsyncScheduler":323}],327:[function(e,t,o){"use strict";var r=e("./AnimationFrameAction"),a=e("./AnimationFrameScheduler");o.animationFrame=new a.AnimationFrameScheduler(r.AnimationFrameAction)},{"./AnimationFrameAction":318,"./AnimationFrameScheduler":319}],328:[function(e,t,o){"use strict";var r=e("./AsapAction"),a=e("./AsapScheduler");o.asap=new a.AsapScheduler(r.AsapAction)},{"./AsapAction":320,"./AsapScheduler":321}],329:[function(e,t,o){"use strict";var r=e("./AsyncAction"),a=e("./AsyncScheduler");o.async=new a.AsyncScheduler(r.AsyncAction)},{"./AsyncAction":322,"./AsyncScheduler":323}],330:[function(e,t,o){"use strict";var r=e("./QueueAction"),a=e("./QueueScheduler");o.queue=new a.QueueScheduler(r.QueueAction)},{"./QueueAction":324,"./QueueScheduler":325}],331:[function(e,t,o){"use strict";function r(e){var t=e.Symbol;if("function"==typeof t)return t.iterator||(t.iterator=t("iterator polyfill")),t.iterator;var o=e.Set;if(o&&"function"==typeof new o()["@@iterator"])return"@@iterator";var r=e.Map;if(r)for(var a=Object.getOwnPropertyNames(r.prototype),n=0,i;n<a.length;++n)if(i=a[n],"entries"!==i&&"size"!==i&&r.prototype[i]===r.prototype.entries)return i;return"@@iterator"}var a=e("../util/root");o.symbolIteratorPonyfill=r,o.iterator=r(a.root),o.$$iterator=o.iterator},{"../util/root":363}],332:[function(e,t,o){"use strict";function r(e){var t=e.Symbol,o;return"function"==typeof t?t.observable?o=t.observable:(o=t("observable"),t.observable=o):o="@@observable",o}var a=e("../util/root");o.getSymbolObservable=r,o.observable=r(a.root),o.$$observable=o.observable},{"../util/root":363}],333:[function(e,t,o){"use strict";var r=e("../util/root"),a=r.root.Symbol;o.rxSubscriber="function"==typeof a&&"function"==typeof a.for?a.for("rxSubscriber"):"@@rxSubscriber",o.$$rxSubscriber=o.rxSubscriber},{"../util/root":363}],334:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Observable"),n=e("../Subscription"),i=e("./SubscriptionLoggable"),s=e("../util/applyMixins"),l=function(e){function t(t,o){e.call(this,function(e){var t=this,o=t.logSubscribedFrame();return e.add(new n.Subscription(function(){t.logUnsubscribedFrame(o)})),t.scheduleMessages(e),e}),this.messages=t,this.subscriptions=[],this.scheduler=o}return r(t,e),t.prototype.scheduleMessages=function(e){for(var t=this.messages.length,o=0,r;o<t;o++)r=this.messages[o],e.add(this.scheduler.schedule(function(e){var t=e.message,o=e.subscriber;t.notification.observe(o)},r.frame,{message:r,subscriber:e}))},t}(a.Observable);o.ColdObservable=l,s.applyMixins(l,[i.SubscriptionLoggable])},{"../Observable":26,"../Subscription":35,"../util/applyMixins":350,"./SubscriptionLoggable":337}],335:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("../Subject"),n=e("../Subscription"),i=e("./SubscriptionLoggable"),s=e("../util/applyMixins"),l=function(e){function t(t,o){e.call(this),this.messages=t,this.subscriptions=[],this.scheduler=o}return r(t,e),t.prototype._subscribe=function(t){var o=this,r=o.logSubscribedFrame();return t.add(new n.Subscription(function(){o.logUnsubscribedFrame(r)})),e.prototype._subscribe.call(this,t)},t.prototype.setup=function(){for(var e=this,t=e.messages.length,o=0;o<t;o++)(function(){var t=e.messages[o];e.scheduler.schedule(function(){t.notification.observe(e)},t.frame)})()},t}(a.Subject);o.HotObservable=l,s.applyMixins(l,[i.SubscriptionLoggable])},{"../Subject":32,"../Subscription":35,"../util/applyMixins":350,"./SubscriptionLoggable":337}],336:[function(e,t,o){"use strict";var r=function(){return function(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.subscribedFrame=e,this.unsubscribedFrame=t}}();o.SubscriptionLog=r},{}],337:[function(e,t,o){"use strict";var r=e("./SubscriptionLog"),a=function(){function e(){this.subscriptions=[]}return e.prototype.logSubscribedFrame=function(){return this.subscriptions.push(new r.SubscriptionLog(this.scheduler.now())),this.subscriptions.length-1},e.prototype.logUnsubscribedFrame=function(e){var t=this.subscriptions,o=t[e];t[e]=new r.SubscriptionLog(o.subscribedFrame,this.scheduler.now())},e}();o.SubscriptionLoggable=a},{"./SubscriptionLog":336}],338:[function(e,t,o){"use strict";var r=Number.POSITIVE_INFINITY,a=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../Observable"),i=e("../Notification"),s=e("./ColdObservable"),l=e("./HotObservable"),d=e("./SubscriptionLog"),p=e("../scheduler/VirtualTimeScheduler"),c=function(e){function t(t){e.call(this,p.VirtualAction,750),this.assertDeepEqual=t,this.hotObservables=[],this.coldObservables=[],this.flushTests=[]}return a(t,e),t.prototype.createTime=function(e){var o=e.indexOf("|");if(-1===o)throw new Error("marble diagram for time should have a completion marker \"|\"");return o*t.frameTimeFactor},t.prototype.createColdObservable=function(e,o,r){if(-1!==e.indexOf("^"))throw new Error("cold observable cannot have subscription offset \"^\"");if(-1!==e.indexOf("!"))throw new Error("cold observable cannot have unsubscription marker \"!\"");var a=t.parseMarbles(e,o,r),n=new s.ColdObservable(a,this);return this.coldObservables.push(n),n},t.prototype.createHotObservable=function(e,o,r){if(-1!==e.indexOf("!"))throw new Error("hot observable cannot have unsubscription marker \"!\"");var a=t.parseMarbles(e,o,r),n=new l.HotObservable(a,this);return this.hotObservables.push(n),n},t.prototype.materializeInnerObservable=function(e,t){var o=this,r=[];return e.subscribe(function(e){r.push({frame:o.frame-t,notification:i.Notification.createNext(e)})},function(e){r.push({frame:o.frame-t,notification:i.Notification.createError(e)})},function(){r.push({frame:o.frame-t,notification:i.Notification.createComplete()})}),r},t.prototype.expectObservable=function(e,o){var a=this;void 0===o&&(o=null);var s=[],l={actual:s,ready:!1},d=t.parseMarblesAsSubscriptions(o).unsubscribedFrame,p;return this.schedule(function(){p=e.subscribe(function(e){var t=e;e instanceof n.Observable&&(t=a.materializeInnerObservable(t,a.frame)),s.push({frame:a.frame,notification:i.Notification.createNext(t)})},function(e){s.push({frame:a.frame,notification:i.Notification.createError(e)})},function(){s.push({frame:a.frame,notification:i.Notification.createComplete()})})},0),d!==r&&this.schedule(function(){return p.unsubscribe()},d),this.flushTests.push(l),{toBe:function(e,o,r){l.ready=!0,l.expected=t.parseMarbles(e,o,r,!0)}}},t.prototype.expectSubscriptions=function(e){var o={actual:e,ready:!1};return this.flushTests.push(o),{toBe:function(e){var r="string"==typeof e?[e]:e;o.ready=!0,o.expected=r.map(function(e){return t.parseMarblesAsSubscriptions(e)})}}},t.prototype.flush=function(){for(var t=this.hotObservables;0<t.length;)t.shift().setup();e.prototype.flush.call(this);for(var o=this.flushTests.filter(function(e){return e.ready}),r;0<o.length;)r=o.shift(),this.assertDeepEqual(r.actual,r.expected)},t.parseMarblesAsSubscriptions=function(e){if("string"!=typeof e)return new d.SubscriptionLog(r);for(var t=e.length,o=-1,a=r,n=r,s=0;s<t;s++){var i=s*this.frameTimeFactor,l=e[s];switch(l){case"-":case" ":break;case"(":o=i;break;case")":o=-1;break;case"^":if(a!==r)throw new Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");a=-1<o?o:i;break;case"!":if(n!==r)throw new Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");n=-1<o?o:i;break;default:throw new Error("there can only be '^' and '!' markers in a subscription marble diagram. Found instead '"+l+"'.");}}return 0>n?new d.SubscriptionLog(a):new d.SubscriptionLog(a,n)},t.parseMarbles=function(e,t,o,r){if(void 0===r&&(r=!1),-1!==e.indexOf("!"))throw new Error("conventional marble diagrams cannot have the unsubscription marker \"!\"");for(var a=e.length,n=[],l=e.indexOf("^"),d=-1===l?0:l*-this.frameTimeFactor,p="object"==typeof t?function(e){return r&&t[e]instanceof s.ColdObservable?t[e].messages:t[e]}:function(e){return e},u=-1,b=0;b<a;b++){var m=b*this.frameTimeFactor+d,y=void 0,f=e[b];switch(f){case"-":case" ":break;case"(":u=m;break;case")":u=-1;break;case"|":y=i.Notification.createComplete();break;case"^":break;case"#":y=i.Notification.createError(o||"error");break;default:y=i.Notification.createNext(p(f));}y&&n.push({frame:-1<u?u:m,notification:y})}return n},t}(p.VirtualTimeScheduler);o.TestScheduler=c},{"../Notification":25,"../Observable":26,"../scheduler/VirtualTimeScheduler":326,"./ColdObservable":334,"./HotObservable":335,"./SubscriptionLog":336}],339:[function(e,t,o){"use strict";var r=e("./root"),a=function(){return function(e){e.requestAnimationFrame?(this.cancelAnimationFrame=e.cancelAnimationFrame.bind(e),this.requestAnimationFrame=e.requestAnimationFrame.bind(e)):e.mozRequestAnimationFrame?(this.cancelAnimationFrame=e.mozCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.mozRequestAnimationFrame.bind(e)):e.webkitRequestAnimationFrame?(this.cancelAnimationFrame=e.webkitCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.webkitRequestAnimationFrame.bind(e)):e.msRequestAnimationFrame?(this.cancelAnimationFrame=e.msCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.msRequestAnimationFrame.bind(e)):e.oRequestAnimationFrame?(this.cancelAnimationFrame=e.oCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.oRequestAnimationFrame.bind(e)):(this.cancelAnimationFrame=e.clearTimeout.bind(e),this.requestAnimationFrame=function(t){return e.setTimeout(t,1e3/60)})}}();o.RequestAnimationFrameDefinition=a,o.AnimationFrame=new a(r.root)},{"./root":363}],340:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=function(e){function t(){var t=e.call(this,"argument out of range");this.name=t.name="ArgumentOutOfRangeError",this.stack=t.stack,this.message=t.message}return r(t,e),t}(Error);o.ArgumentOutOfRangeError=a},{}],341:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=function(e){function t(){var t=e.call(this,"no elements in sequence");this.name=t.name="EmptyError",this.stack=t.stack,this.message=t.message}return r(t,e),t}(Error);o.EmptyError=a},{}],342:[function(e,t,o){"use strict";var r=function(){function e(){this.values={}}return e.prototype.delete=function(e){return this.values[e]=null,!0},e.prototype.set=function(e,t){return this.values[e]=t,this},e.prototype.get=function(e){return this.values[e]},e.prototype.forEach=function(e,t){var o=this.values;for(var r in o)o.hasOwnProperty(r)&&null!==o[r]&&e.call(t,o[r],r)},e.prototype.clear=function(){this.values={}},e}();o.FastMap=r},{}],343:[function(e,t,o){"use strict";var r=e("./root"),a=function(){function e(e){if(this.root=e,e.setImmediate&&"function"==typeof e.setImmediate)this.setImmediate=e.setImmediate.bind(e),this.clearImmediate=e.clearImmediate.bind(e);else{this.nextHandle=1,this.tasksByHandle={},this.currentlyRunningATask=!1,this.setImmediate=this.canUseProcessNextTick()?this.createProcessNextTickSetImmediate():this.canUsePostMessage()?this.createPostMessageSetImmediate():this.canUseMessageChannel()?this.createMessageChannelSetImmediate():this.canUseReadyStateChange()?this.createReadyStateChangeSetImmediate():this.createSetTimeoutSetImmediate();var t=function e(t){delete e.instance.tasksByHandle[t]};t.instance=this,this.clearImmediate=t}}return e.prototype.identify=function(e){return this.root.Object.prototype.toString.call(e)},e.prototype.canUseProcessNextTick=function(){return"[object process]"===this.identify(this.root.process)},e.prototype.canUseMessageChannel=function(){return!!this.root.MessageChannel},e.prototype.canUseReadyStateChange=function(){var e=this.root.document;return!!(e&&"onreadystatechange"in e.createElement("script"))},e.prototype.canUsePostMessage=function(){var e=this.root;if(e.postMessage&&!e.importScripts){var t=!0,o=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=o,t}return!1},e.prototype.partiallyApplied=function(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];var r=function e(){var t=e,o=t.handler,r=t.args;"function"==typeof o?o.apply(void 0,r):new Function(""+o)()};return r.handler=e,r.args=t,r},e.prototype.addFromSetImmediateArguments=function(e){return this.tasksByHandle[this.nextHandle]=this.partiallyApplied.apply(void 0,e),this.nextHandle++},e.prototype.createProcessNextTickSetImmediate=function(){var e=function e(){var t=e.instance,o=t.addFromSetImmediateArguments(arguments);return t.root.process.nextTick(t.partiallyApplied(t.runIfPresent,o)),o};return e.instance=this,e},e.prototype.createPostMessageSetImmediate=function(){var e=this.root,t="setImmediate$"+e.Math.random()+"$",o=function o(r){var a=o.instance;r.source===e&&"string"==typeof r.data&&0===r.data.indexOf(t)&&a.runIfPresent(+r.data.slice(t.length))};o.instance=this,e.addEventListener("message",o,!1);var r=function e(){var t=e,o=t.messagePrefix,r=t.instance,a=r.addFromSetImmediateArguments(arguments);return r.root.postMessage(o+a,"*"),a};return r.instance=this,r.messagePrefix=t,r},e.prototype.runIfPresent=function(e){if(this.currentlyRunningATask)this.root.setTimeout(this.partiallyApplied(this.runIfPresent,e),0);else{var t=this.tasksByHandle[e];if(t){this.currentlyRunningATask=!0;try{t()}finally{this.clearImmediate(e),this.currentlyRunningATask=!1}}}},e.prototype.createMessageChannelSetImmediate=function(){var e=this,t=new this.root.MessageChannel;t.port1.onmessage=function(t){var o=t.data;e.runIfPresent(o)};var o=function e(){var t=e,o=t.channel,r=t.instance,a=r.addFromSetImmediateArguments(arguments);return o.port2.postMessage(a),a};return o.channel=t,o.instance=this,o},e.prototype.createReadyStateChangeSetImmediate=function(){var e=function e(){var t=e.instance,o=t.root,r=o.document,a=r.documentElement,n=t.addFromSetImmediateArguments(arguments),i=r.createElement("script");return i.onreadystatechange=function(){t.runIfPresent(n),i.onreadystatechange=null,a.removeChild(i),i=null},a.appendChild(i),n};return e.instance=this,e},e.prototype.createSetTimeoutSetImmediate=function(){var e=function e(){var t=e.instance,o=t.addFromSetImmediateArguments(arguments);return t.root.setTimeout(t.partiallyApplied(t.runIfPresent,o),0),o};return e.instance=this,e},e}();o.ImmediateDefinition=a,o.Immediate=new a(r.root)},{"./root":363}],344:[function(e,t,o){"use strict";var r=e("./root"),a=e("./MapPolyfill");o.Map=r.root.Map||function(){return a.MapPolyfill}()},{"./MapPolyfill":345,"./root":363}],345:[function(e,t,o){"use strict";var r=function(){function e(){this.size=0,this._values=[],this._keys=[]}return e.prototype.get=function(e){var t=this._keys.indexOf(e);return-1===t?void 0:this._values[t]},e.prototype.set=function(e,t){var o=this._keys.indexOf(e);return-1===o?(this._keys.push(e),this._values.push(t),this.size++):this._values[o]=t,this},e.prototype.delete=function(e){var t=this._keys.indexOf(e);return-1!==t&&(this._values.splice(t,1),this._keys.splice(t,1),this.size--,!0)},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this.size=0},e.prototype.forEach=function(e,t){for(var o=0;o<this.size;o++)e.call(t,this._values[o],this._keys[o])},e}();o.MapPolyfill=r},{}],346:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=function(e){function t(){var t=e.call(this,"object unsubscribed");this.name=t.name="ObjectUnsubscribedError",this.stack=t.stack,this.message=t.message}return r(t,e),t}(Error);o.ObjectUnsubscribedError=a},{}],347:[function(e,t,o){"use strict";function r(){return function(){function e(){this._values=[]}return e.prototype.add=function(e){this.has(e)||this._values.push(e)},e.prototype.has=function(e){return-1!==this._values.indexOf(e)},Object.defineProperty(e.prototype,"size",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._values.length=0},e}()}var a=e("./root");o.minimalSetImpl=r,o.Set=a.root.Set||r()},{"./root":363}],348:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=function(e){function t(){var t=e.call(this,"Timeout has occurred");this.name=t.name="TimeoutError",this.stack=t.stack,this.message=t.message}return r(t,e),t}(Error);o.TimeoutError=a},{}],349:[function(e,t,o){"use strict";var r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=function(e){function t(t){e.call(this),this.errors=t;var o=Error.call(this,t?t.length+" errors occurred during unsubscription:\n  "+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"");this.name=o.name="UnsubscriptionError",this.stack=o.stack,this.message=o.message}return r(t,e),t}(Error);o.UnsubscriptionError=a},{}],350:[function(e,t,o){"use strict";o.applyMixins=function(e,t){for(var o=0,r=t.length;o<r;o++)for(var a=t[o],n=Object.getOwnPropertyNames(a.prototype),i=0,s=n.length,l;i<s;i++)l=n[i],e.prototype[l]=a.prototype[l]}},{}],351:[function(e,t,o){"use strict";function r(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];for(var r=t.length,a=0,n;a<r;a++)for(var i in n=t[a],n)n.hasOwnProperty(i)&&(e[i]=n[i]);return e}function a(e){return e.Object.assign||r}var n=e("./root");o.assignImpl=r;o.getAssign=a,o.assign=a(n.root)},{"./root":363}],352:[function(e,t,o){"use strict";o.errorObject={e:{}}},{}],353:[function(e,t,o){"use strict";o.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},{}],354:[function(e,t,o){"use strict";o.isArrayLike=function(e){return e&&"number"==typeof e.length}},{}],355:[function(e,t,o){"use strict";o.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},{}],356:[function(e,t,o){"use strict";o.isFunction=function(e){return"function"==typeof e}},{}],357:[function(e,t,o){"use strict";var r=e("../util/isArray");o.isNumeric=function(e){return!r.isArray(e)&&0<=e-parseFloat(e)+1}},{"../util/isArray":353}],358:[function(e,t,o){"use strict";o.isObject=function(e){return null!=e&&"object"==typeof e}},{}],359:[function(e,t,o){"use strict";o.isPromise=function(e){return e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},{}],360:[function(e,t,o){"use strict";o.isScheduler=function(e){return e&&"function"==typeof e.schedule}},{}],361:[function(e,t,o){"use strict";o.noop=function(){}},{}],362:[function(e,t,o){"use strict";o.not=function(e,t){function o(){return!o.pred.apply(o.thisArg,arguments)}return o.pred=e,o.thisArg=t,o}},{}],363:[function(e,t,o){(function(e){"use strict";var t="undefined"!=typeof window&&window,r="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,a=t||"undefined"!=typeof e&&e||r;o.root=a,function(){if(!a)throw new Error("RxJS could not find any global context (window, self, global)")}()}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],364:[function(e,t,o){"use strict";var r=e("./root"),a=e("./isArrayLike"),n=e("./isPromise"),i=e("./isObject"),s=e("../Observable"),l=e("../symbol/iterator"),d=e("../InnerSubscriber"),p=e("../symbol/observable");o.subscribeToResult=function(e,t,o,c){var u=new d.InnerSubscriber(e,o,c);if(u.closed)return null;if(t instanceof s.Observable)return t._isScalar?(u.next(t.value),u.complete(),null):t.subscribe(u);if(a.isArrayLike(t)){for(var b=0,m=t.length;b<m&&!u.closed;b++)u.next(t[b]);u.closed||u.complete()}else{if(n.isPromise(t))return t.then(function(e){u.closed||(u.next(e),u.complete())},function(e){return u.error(e)}).then(null,function(e){r.root.setTimeout(function(){throw e})}),u;if(t&&"function"==typeof t[l.iterator]){var y=t[l.iterator]();do{var f=y.next();if(f.done){u.complete();break}if(u.next(f.value),u.closed)break}while(!0)}else if(t&&"function"==typeof t[p.observable]){var _=t[p.observable]();if("function"!=typeof _.subscribe)u.error(new TypeError("Provided object does not correctly implement Symbol.observable"));else return _.subscribe(new d.InnerSubscriber(e,o,c))}else{var g=i.isObject(t)?"an invalid object":"'"+t+"'";u.error(new TypeError("You provided "+g+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable."))}}return null}},{"../InnerSubscriber":24,"../Observable":26,"../symbol/iterator":331,"../symbol/observable":332,"./isArrayLike":354,"./isObject":358,"./isPromise":359,"./root":363}],365:[function(e,t,o){"use strict";var r=e("../Subscriber"),a=e("../symbol/rxSubscriber"),n=e("../Observer");o.toSubscriber=function(e,t,o){if(e){if(e instanceof r.Subscriber)return e;if(e[a.rxSubscriber])return e[a.rxSubscriber]()}return e||t||o?new r.Subscriber(e,t,o):new r.Subscriber(n.empty)}},{"../Observer":27,"../Subscriber":34,"../symbol/rxSubscriber":333}],366:[function(e,t,o){"use strict";function r(){try{return n.apply(this,arguments)}catch(t){return a.errorObject.e=t,a.errorObject}}var a=e("./errorObject"),n;o.tryCatch=function(e){return n=e,r}},{"./errorObject":352}]},{},[6]);