Commit d278b5a5 authored by Christopher S Barnett's avatar Christopher S Barnett
Browse files

- change .geojson extension to .json to serve correct mime type

parent 2fbb7d3c
!function t(e,n,i){function o(r,a){if(!n[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var u=n[r]={exports:{}};e[r][0].call(u.exports,function(t){var n=e[r][1][t];return o(n||t)},u,u.exports,t,e,n,i)}return n[r].exports}for(var s="function"==typeof require&&require,r=0;r<i.length;r++)o(i[r]);return o}({1:[function(t,e,n){!function(t){var e={calculateColor:function(t,e){if(0===t.indexOf("#")){var n=t.slice(1);return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4),16)+","+e+")"}return/^rgb\(/.test(t)?t.replace(/rgb/,"rgba").replace(")",",")+e+")":t.split(",").splice(0,3).join(",")+e+")"}},n={forEach:function(t,e,n){if("function"==typeof Array.prototype.forEach)t.forEach(e,n);else for(var i=0,o=t.length;i<o;i++)e.apply(n,[t[i],i,t])},map:function(t,e,n){if("function"==typeof Array.prototype.map)return t.map(e,n);for(var i=[],o=0,s=t.length;o<s;o++)i[o]=e.apply(n,[t[o],o,t]);return i}},i=function(){var t=function(t){this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.style=t.style,this.color=t.color,this.size=t.size,this.zoom=t.zoom,this.borderWidth=t.borderWidth,this.borderColor=t.borderColor};return t.prototype.draw=function(t){if(t.save(),t.translate(this.x,this.y),t.rotate(this.rotation),t.lineWidth=this.borderWidth||0,t.strokeStyle=this.borderColor||"#000",t.fillStyle=this.color||"#000",t.beginPath(),"circle"===this.style){var e=this.size*this.zoom/2;t.arc(0,0,e,0,2*Math.PI,!1)}else if("arrow"===this.style){var e=this.size*this.zoom/2;t.moveTo(-e,-e),t.lineTo(e,0),t.lineTo(-e,e),t.lineTo(-e/4,0),t.lineTo(-e,-e)}t.closePath(),t.stroke(),t.fill(),t.restore()},t}(),o=function(){var t=function(t){var e=t.startX,n=t.startY,i=t.endX,o=t.endY,s=Math.sqrt(Math.pow(e-i,2)+Math.pow(n-o,2)),r=(e+i)/2,a=(n+o)/2,l=1*(n-o)+r,h=1*(i-e)+a,u=Math.sqrt(Math.pow(s/2,2)+Math.pow(1*s,2)),c=Math.atan2(n-h,e-l),d=Math.atan2(o-h,i-l);this.startX=e,this.startY=n,this.endX=i,this.endY=o,this.centerX=l,this.centerY=h,this.startAngle=c,this.endAngle=d,this.startLabel=t&&t.labels&&t.labels[0],this.endLabel=t&&t.labels&&t.labels[1],this.radius=u,this.lineWidth=t.width||1,this.strokeStyle=t.color||"#000",this.label=t.label,this.font=t.font,this.shadowBlur=t.shadowBlur};return t.prototype.draw=function(t){if(t.save(),t.lineWidth=this.lineWidth,t.strokeStyle="rgba(54,144,192, 0.5)",t.shadowColor=t.strokeStyle,t.shadowBlur=this.shadowBlur||1,t.beginPath(),t.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,!1),t.stroke(),t.restore(),t.save(),t.fillStyle=this.strokeStyle,this.label){if(t.font=this.label,this.startLabel){var e=this.startX-15,n=this.startY+5;t.fillText(this.startLabel,e,n)}if(this.endLabel){var e=this.endX-15,n=this.endY-5;t.fillText(this.endLabel,e,n)}}t.restore()},t}(),s=function(){function t(t){this.x=t.x,this.y=t.y,this.maxRadius=t.radius,this.color=t.color,this.shadowBlur=5,this.lineWidth=t.borderWidth,this.r=0,this.factor=2/t.radius,this.defaultFactor=2/t.radius}return t.prototype.draw=function(t){this.r+=.5,t.save(),t.translate(this.x,this.y);var n=this.color;n=e.calculateColor(n,1-this.r/this.maxRadius),t.strokeStyle=n,t.lineWidth=this.lineWidth,t.beginPath(),t.arc(0,0,this.r,0,2*Math.PI,!1),t.stroke(),t.restore(),Math.abs(this.maxRadius-this.r)<.8&&(this.r=0)},t}(),r=function(){var t=function(t){var e=t.startX,n=t.startY,o=t.endX,s=t.endY,r=Math.sqrt(Math.pow(e-o,2)+Math.pow(n-s,2)),a=(e+o)/2,l=(n+s)/2,h=1*(n-s)+a,u=1*(o-e)+l,c=Math.sqrt(Math.pow(r/2,2)+Math.pow(1*r,2)),d=Math.atan2(n-u,e-h),p=Math.atan2(s-u,o-h);d*p<0&&(d<0?(d+=2*Math.PI,p+=2*Math.PI):p+=2*Math.PI),this.tailPointsCount=50,this.centerX=h,this.centerY=u,this.startAngle=d,this.endAngle=p,this.radius=c,this.lineWidth=t.width||1,this.strokeStyle=t.color||"#fff";var f=t.zoom||1;this.defaultFactor=r>0?.005:.0035,this.factor=this.defaultFactor,this.deltaAngle=80/Math.min(this.radius,400)/this.tailPointsCount,this.trailAngle=this.startAngle,this.arcAngle=this.startAngle,this.animateBlur=!0,this.marker=new i({x:50,y:80,rotation:50*Math.PI/180,style:"arrow",color:"rgb(255, 255, 255)",size:2,zoom:f,borderWidth:0,borderColor:this.strokeStyle})};return t.prototype.setFactor=function(t){this.factor=this.defaultFactor*t},t.prototype.getFactor=function(){return this.factor},t.prototype.drawArc=function(t,e,n,i,o){t.save(),t.lineWidth=n,t.strokeStyle=e,t.shadowColor=this.strokeStyle,t.lineCap="round",t.beginPath(),t.arc(this.centerX,this.centerY,this.radius,i,o,!1),t.stroke(),t.restore()},t.prototype.draw=function(t){var n=this.endAngle,i=this.trailAngle+this.factor,o=this.strokeStyle;this.animateBlur&&(this.arcAngle=i),this.trailAngle=i,o=e.calculateColor(o,.1),this.drawArc(t,o,this.lineWidth,this.startAngle,this.arcAngle);for(var s=this.tailPointsCount,r=0;r<s;r++){var a=e.calculateColor(this.strokeStyle,.3-.3/s*r);this.trailAngle-this.deltaAngle*r>this.startAngle&&this.drawArc(t,a,2-2/s*r,this.trailAngle-this.deltaAngle*r,this.trailAngle)}t.save(),t.translate(this.centerX,this.centerY),this.marker.x=Math.cos(this.trailAngle)*this.radius,this.marker.y=Math.sin(this.trailAngle)*this.radius,this.marker.rotation=this.trailAngle+Math.PI/2,this.marker.draw(t),t.restore(),180*(n-this.trailAngle)/Math.PI<.5&&(this.trailAngle=this.startAngle,this.animateBlur=!1)},t}(),a=function(){var e=function(t){this.data=t.data,this.store={arcs:[],markers:[],pulses:[],sparks:[]},this.playAnimation=!0,this.started=!1,this.context=t.context,this.style=t.style,this.init()};return e.prototype.init=function(){this.updateData(this.data)},e.prototype.add=function(t){},e.prototype.remove=function(){},e.prototype.clear=function(){this.store={arcs:[],markers:[],pulses:[],sparks:[]},this.playAnimation=!0,this.started=!1,t.cancelAnimationFrame(this.requestAnimationId)},e.prototype.setSparkFactorMultiplier=function(t){n.forEach(this.store.sparks,function(e){e.setFactor(t)})},e.prototype.distance=function(t,e){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))},e.prototype.updateData=function(t,e){e||(e=1),t&&0!==t.length&&(this.clear(),this.data=t,this.data&&this.data.length>0&&n.forEach(this.data,function(t){var n=!1;if(t.from[0]===t.to[0]&&t.from[1]===t.to[1]&&(n=!0),n){var a=new s({x:t.to[0],y:t.to[1],radius:this.style.pulse.radius,color:t.color,borderWidth:this.style.pulse.borderWidth});this.store.pulses.push(a)}else{var l=new o({startX:t.from[0],startY:t.from[1],endX:t.to[0],endY:t.to[1],labels:t.labels,label:this.style.arc.label,font:this.style.arc.font,width:this.style.arc.width,color:t.color}),h=new i({x:t.from[0],y:t.from[1],rotation:l.endAngle+Math.PI/2,style:"circle",color:t.color,size:1,borderWidth:1,borderColor:"#000",zoom:e}),u=new i({x:t.to[0],y:t.to[1],rotation:l.endAngle+Math.PI/2,style:"circle",color:t.color,size:2,borderWidth:1,borderColor:"#000",zoom:e}),c=new r({startX:t.from[0],startY:t.from[1],endX:t.to[0],endY:t.to[1],width:5,color:t.color,zoom:e});this.store.arcs.push(l),this.store.markers.push(h),this.store.markers.push(u),this.store.sparks.push(c)}},this))},e.prototype.start=function(e){var n,i=this,o=Date.now();this.started||(this.started=!0,function s(){function r(t){for(var e=0,n=t.length;e<n;e++)t[e].draw(i.context)}i.requestAnimationId=t.requestAnimationFrame(s,e);var a=Date.now();n=a-o,i.playAnimation&&n>1e3/24&&(o=a-n%(1e3/24),e.width=e.width,r(i.store.arcs),r(i.store.markers),r(i.store.pulses),r(i.store.sparks))}())},e.prototype.play=function(){this.playAnimation=!0},e.prototype.pause=function(){this.playAnimation=!1},e}();L.MigrationLayer=L.Class.extend({options:{map:{},data:{},pulseRadius:25,pulseBorderWidth:3,arcWidth:1,arcLabel:!0,arcLabelFont:"15px sans-serif",Marker:{},Spark:{}},_setOptions:function(t,e){t.hasOwnProperty("options")||(t.options=t.options?L.Util.create(t.options):{});for(var n in e)t.options[n]=e[n];return t.options},initialize:function(t){this._setOptions(this,t),this._map=this.options.map||{},this._data=this.options.data||{},this._style={pulse:{radius:this.options.pulseRadius,borderWidth:this.options.pulseBorderWidth},arc:{width:this.options.arcWidth,label:this.options.arcLabel,font:this.options.arcLabelFont}}||{},this._show=!0,this._init()},_init:function(){var t=L.DomUtil.create("div","leaflet-ODLayer-container");if(t.style.position="absolute",t.style.width=this._map.getSize().x+"px",t.style.height=this._map.getSize().y+"px",this.container=t,this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),t.appendChild(this.canvas),this._map.getPanes().overlayPane.appendChild(t),!this.migration){var e=this._convertData();this.migration=new a({data:e,context:this.context,style:this._style})}},_resize:function(){var e=this._map.getBounds(),n=e.getNorthWest(),i=this._map.latLngToContainerPoint(n);i.y>0?this.container.style.top=-i.y+"px":this.container.style.top="0px";var o=t.getComputedStyle(this._map.getContainer());this.canvas.setAttribute("width",parseInt(o.width,10)),this.canvas.setAttribute("height",parseInt(o.height,10))},_convertData:function(){var t=this._map.getBounds();if(this._data&&t){return n.map(this._data,function(t){var e=this._map.latLngToContainerPoint(new L.LatLng(t.from[1],t.from[0])),n=this._map.latLngToContainerPoint(new L.LatLng(t.to[1],t.to[0]));return{from:[e.x,e.y],to:[n.x,n.y],labels:t.labels,value:t.value,color:t.color}},this)}},_bindMapEvents:function(){var t=this;this._map.on("movestart ",function(){t.migration.pause()}),this._map.on("zoomstart ",function(){t.container.style.display="none"}),this._map.on("moveend",function(){t.migration.play(),t._show&&(t.container.style.display="",t._draw())})},_draw:function(){if(this._map.getBounds()&&this.migration.playAnimation){this._resize(),this._transform();var t=this._convertData();this.migration.updateData(t,this._map.getZoom()),t.length>0&&!this.migration.started&&this.migration.start(this.canvas)}},_transform:function(){var t=this._map.getBounds(),e=this._map.latLngToLayerPoint(t.getNorthWest());L.DomUtil.setPosition(this.container,e)},addTo:function(){if(this._bindMapEvents(),this._map.getBounds()&&this.migration.playAnimation){this._resize(),this._transform();var t=this._convertData();this.migration.updateData(t,this._map.getZoom()),this.migration.start(this.canvas)}},setData:function(t){this._data=t,t.length>0?this._draw():(this.migration.clear(),this._draw())},getData:function(){return this._data},hide:function(){this.container.style.display="none",this._show=!1},show:function(){this.container.style.display="",this._show=!0},play:function(){this.migration.play()},pause:function(){this.migration.pause()},destroy:function(){this.migration.clear(),this.container.parentNode.removeChild(this.container),this._map.clearAllEventListeners(),this.mapHandles=[]},setFactor:function(t){this.migration.setSparkFactorMultiplier(t)}}),L.migrationLayer=function(t){return new L.MigrationLayer(t)}}(window)},{}],2:[function(t,e,n){jQuery=t("jquery"),$=jQuery,t("bootstrap");var i=t("leaflet"),o=t("underscore");t("leaflet-legend"),t("./leaflet.migrationLayer-master/src/src.js"),t("leaflet-easybutton"),t("leaflet.pattern"),ConnectionMap=function(){return{map:null,caseLayer:null,filtered_deals:[],full_country_list:[],current_country_list:[],init:function(t,e){var n=this;i.Browser.chrome||i.Browser.safari?$("body").css("filter","saturate(135%)"):i.Browser.ie&&$("body").css("filter","saturate(90%)"),n.home_bounds=[[90,-180],[-90,180]],n.map=i.map("map",{zoom:2,minZoom:2,maxBounds:n.home_bounds,maxBoundsViscosity:1}).setView([0,0],2),i.tileLayer("https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="http://cartodb.com/attributions">CartoDB</a>',subdomains:"abcd",maxZoom:19,maxBounds:n.home_bounds,maxBoundsViscosity:1}).addTo(this.map);var o=new i.Control.Legend({position:"bottomright",collapsed:!1,controlButton:{title:"Legend"}});n.map.addControl(o),$(".legend-container").append($("#legend")),$(".legend-toggle").append("<i class='legend-toggle-icon fa fa-info fa-2x' style='color: #000'></i>");var s=function(t,e){n.selectDeals("by-deal","")};i.easyButton('<span class="reload glyphicon glyphicon-refresh" title="reset the map" data-toggle="tooltip"></span>',s).addTo(n.map),i.Control.Watermark=i.Control.extend({onAdd:function(t){var e=i.DomUtil.create("a");return e.href="http://fletcher.tufts.edu/World-Peace-Foundation",e.target="_blank",i.DomUtil.create("img","wpf-logo",e).src="images/wpf-logo-fletcher.png",e}}),i.control.watermark=function(t){return new i.Control.Watermark(t)},i.control.watermark({position:"bottomleft"}).addTo(n.map);var r=new i.StripePattern({color:n.styles.buyer.fillColor,spaceColor:n.styles.seller.fillColor,spaceOpacity:1,angle:-45});return r.addTo(this.map),n.styles.mixed.fillPattern=r,n.loadBaseCountries().done(function(){n.loadConnections().done(function(){n.selectionTypeHandler(),n.removeSelectionHandler(),n.selectByHeaderHandler(),void 0!==t&&(void 0===e&&(e=""),n.selectDeals(t,e))})})},styles:{base:{color:"#ccc",weight:1,opacity:.2,fillOpacity:.1,fillColor:"#aaa"},baseDim:{color:"#ccc",opacity:0,fillOpacity:0,fillColor:"#000"},interactionHighlight:{fillOpacity:.7,fillColor:"#ccc"},highlight:{fillOpacity:.7},focus:{fillOpacity:.7,opacity:1,weight:2,color:"#ffffff"},buyer:{weight:1,fillColor:"#8c510a",color:"#8c510a",fillOpacity:.2,opacity:.8},seller:{weight:1,color:"#01665e",fillColor:"#01665e",fillOpacity:.2,opacity:.8},internal:{weight:1,color:"#64681a",fillColor:"#64681a",fillOpacity:.2,opacity:.8},mixed:{weight:1,color:"#01665e",fillOpacity:.3,opacity:.8}},getStyle:function(t){var e=this.styles;return o.has(t.properties,"role")&&""!==t.properties.role?e[t.properties.role]:e.base},selectionType:"by-deal",selectionVal:"",selectionTypeHandler:function(){var t=this;$(".selection-type").click(function(e){t.selectDeals(e.target.id,"")})},removeSelectionHandler:function(){var t=this;$(".selection").on("click",".remove-selection",function(e){t.selectDeals(t.selectionType,"")})},selectByHeaderHandler:function(){var t=this;$(".details").on("click",".case-name",function(e){var n=$(this).find("input").attr("value");t.selectDeals("by-deal",n)}),$(".details").on("click",".country-name",function(e){var n=$(this).find("input").attr("value");t.selectDeals("by-country",n)})},setSelectionType:function(t){this.selectionType=t,$(".selection-type").removeClass("selected"),$("#"+t).addClass("selected")},clickCountry:function(t){var e=t.target,n=e.feature.id;this.highlightFeature(n)},highlightFeature:function(t){var e=this;e.hasTransaction(t)&&e.selectDeals("by-country",t)},mapHome:function(){this.map.fitBounds(this.home_bounds),this.map.setView([0,0],2)},selectDeals:function(t,e,n){void 0===n&&(n=!1),this.setSelectionType(t),this.selectionVal=e;var i=e,s=!0;if(o.isEmpty(e))i="full list",s=!1;else if("by-country"===t){var r=this.getCountry(e);i=r.properties.name}var a=this.selectionLabelTemplate()({val:i,showRemove:s});$(".selection").html(a),this.filterDeals(t,e),this.displayDetails(),n||(window.location.hash="#"+encodeURIComponent(t.substr(3))+"="+encodeURIComponent(e)),this.current_country_list=this.renderSourcesAndTargets(this.filtered_deals),this.renderLinks(),this.map.fitBounds(this.transactionBounds)},filterDeals:function(t,e){var n=this,i=[];o.isEmpty(e)?i=n.deals:"by-country"===t?o.each(n.deals,function(t){o.union(o.where(t.transactions,{buyer:e}),o.where(t.transactions,{seller:e}),o.where(t.transactions,{internal:e})).length>0&&i.push(t)}):"by-deal"===t&&(i=o.where(n.deals,{deal_name:e})),i.length>0&&o.has(i[0],"sort_year")&&(i=o.sortBy(i,"sort_year")),n.filtered_deals=i,n.setCounter(i.length)},setCounter:function(t){var e=" case";1!==t&&(e+="s"),$(".result-counter").text(t+e)},detailsTemplate:function(){var t=$("#details-template").html();return o.template(t)},countryListTemplate:function(){var t=$("#country-list-template").html();return o.template(t)},selectionLabelTemplate:function(){var t=$("#sel-label-template").html();return o.template(t)},injectCountryNames:function(t){var e=this,n={connections:{}};return o.has(t,"country")&&(n.country=e.getCountry(t.country).properties.name),o.each(t.connections,function(t){n.connections[t.deal_name]={exporters:[],importers:[],internal:[]};var i=n.connections[t.deal_name];o.each(t.transactions,function(t){o.has(t,"seller")?t.seller===t.buyer?i.internal.push(e.getCountry(t.seller).properties.name):(i.exporters.push(e.getCountry(t.seller).properties.name),i.importers.push(e.getCountry(t.buyer).properties.name)):o.has(t,"internal")&&i.internal.push(e.getCountry(t.internal).properties.name)}),i.exporters=o.uniq(i.exporters),i.importers=o.uniq(i.importers),i.internal=o.uniq(i.internal),o.extend(i,e.getProperties(t.deal_name))}),n},getProperties:function(t){return o.findWhere(this.deals,{deal_name:t})},displayDetailsByCountry:function(t){var e=this,n=e.injectCountryNames({country:t,connections:e.filtered_deals});return e.detailsTemplate()(n)},displayDetailsByDeal:function(t){var e=this,n=e.injectCountryNames({dealName:t,connections:e.filtered_deals});return e.detailsTemplate()(n)},displayAllCountries:function(){var t=this,e={countries:t.full_country_list};return t.countryListTemplate()(e)},displayAllDeals:function(){var t=this,e=t.injectCountryNames({connections:t.filtered_deals});return t.detailsTemplate()(e)},displayDetails:function(){var t=this,e="";"by-country"===t.selectionType?e=o.isEmpty(t.selectionVal)?t.displayAllCountries():t.displayDetailsByCountry(t.selectionVal):"by-deal"===t.selectionType&&(e=o.isEmpty(t.selectionVal)?t.displayAllDeals():t.displayDetailsByDeal(t.selectionVal));var n=$(".details");n.html(e);var i=$(window).height()-n.offset().top-20;$(".details").height(i),t.detailsHeightHandler||(t.detailsHeightHandler=!0,$(window).resize(function(){var t=$(window).height()-n.offset().top-20;n.height(t)})),n.scrollTop(0)},detailsHeightHandler:!1,resetHighlight:function(){var t=this;this.caseLayer.eachLayer(function(e){e.setStyle(t.getStyle(e.feature))}),this.interactionLayer.eachLayer(function(e){e.setStyle(t.styles.base)})},loadBaseCountries:function(){var t=this;return $.getJSON("data/world_50m.geojson",function(e){function n(e,n){function i(e){e.target.setStyle(t.styles.interactionHighlight)}function s(e){var n=e.target.feature.properties.id;o.contains(o.pluck(t.current_country_list,"fid"),n)?e.target.setStyle(t.styles.baseDim):e.target.setStyle(t.styles.base)}n.on({click:$.proxy(t.clickCountry,t),mouseover:i,mouseout:s})}function s(t,e){t.properties.role=""}t.countryGeoJSON=e;var r={style:t.styles.base,onEachFeature:n};t.interactionLayer=i.geoJSON(e,r).addTo(t.map);var a="display_countries";t.map.createPane(a),t.map.getPane(a).style.zIndex=201,t.caseLayer=i.geoJSON([],{onEachFeature:s,pane:a}).addTo(t.map)})},getCountry:function(t){if(!o.isUndefined(this.countryGeoJSON)){return o.findWhere(this.countryGeoJSON.features,{id:t})}},loadConnections:function(){var t=this;return $.getJSON("data/wpf_deals.json",function(e){t.deals=e.data,$(".number_of_cases").text(t.deals.length),t.createMigrationLayer(),t.initializeInteractionLayer(),t.selectDeals("by-deal","",!0)})},createMigrationLayer:function(){this.migrationLayer=new i.migrationLayer({map:this.map,data:[]}),this.migrationLayer.addTo(this.map)},renewMigrationLayer:function(t){this.migrationLayer.setData(t)},copyCountries:function(t){var e=[],n=this;return o.each(t,function(t){var i=$.extend({},n.getCountry(t));e.push(i)}),e},addToCountryList:function(t,e,n,i){var s=this,r=o.findWhere(i,{fid:t});if(o.isUndefined(r)){var a={fid:t,name:s.getCountry(t).properties.name,cases:1,deals:[n]};a.role=[e],i.push(a)}else o.contains(r.deals,n)||(r.deals.push(n),r.cases=r.deals.length),o.contains(r.role,e)||r.role.push(e)},renderSourcesAndTargets:function(t){o.isUndefined(t)&&(t=this.filtered_deals);var e=this,n=[];return o.each(t,function(t){o.each(t.transactions,function(i){o.has(i,"internal")?e.addToCountryList(i.internal,"internal deal",t.deal_name,n):o.has(i,"seller")&&(i.seller===i.buyer?e.addToCountryList(i.seller,"internal deal",t.deal_name,n):(e.addToCountryList(i.seller,"seller",t.deal_name,n),e.addToCountryList(i.buyer,"buyer",t.deal_name,n)))})}),n=o.sortBy(n,"cases").reverse(),e.updateCountryRoles(t,n),n},extractCountriesFromDeal:function(t){var e=[];return o.each(t.transactions,function(t){o.has(t,"seller")?(e.push(t.seller),e.push(t.buyer)):o.has(t,"internal")&&e.push(t.internal)}),e},extractAllCountriesFromDeals:function(t){var e=this,n=[];return o.each(t,function(t){n=o.union(n,e.extractCountriesFromDeal(t))}),o.uniq(n)},countriesByRole:function(t,e,n){var i=this,s=o.filter(n,function(t){return o.contains(i.extractAllCountriesFromDeals(e),t.fid)});return o.filter(s,function(e){return o.contains(e.role,t)})},countryIdsByRole:function(t,e,n){var i=this.countriesByRole(t,e,n);return i.length>0?o.uniq(o.pluck(i,"fid")):[]},initializeInteractionLayer:function(){this.full_country_list=this.renderSourcesAndTargets(this.deals);var t=this.countryIdsByRole("seller",this.deals,this.full_country_list),e=this.countryIdsByRole("buyer",this.deals,this.full_country_list),n=this.countryIdsByRole("internal deal",this.deals,this.full_country_list),i=o.uniq(o.union(t,e,n));this.replaceGeoJSON(this.interactionLayer,i)},updateCountryRoles:function(t,e){var n=this,i=this.countryIdsByRole("seller",t,e),s=this.countryIdsByRole("buyer",t,e),r=this.countryIdsByRole("internal deal",t,e),a=o.uniq(o.union(i,s,r));this.replaceGeoJSON(this.caseLayer,a),this.caseLayer.eachLayer(function(t){var e=[],a=t.feature.id;o.contains(i,a)&&e.push("seller"),o.contains(s,a)&&e.push("buyer"),o.contains(r,a)&&e.push("internal"),0===e.length?t.feature.properties.role="":1===e.length?t.feature.properties.role=e[0]:e.length>1&&(t.feature.properties.role="mixed"),t.setStyle(n.getStyle(t.feature))})},replaceGeoJSON:function(t,e){var n=this.copyCountries(e);t.clearLayers(),t.addData(n)},hasTransaction:function(t){var e=o.where(this.full_country_list,{fid:t});return e.length>0&&e[0].cases>0},pointToArray:function(t){return[t.lng,t.lat]},transactionBounds:i.latLngBounds([[-90,-180],[90,180]]),getCentroid:function(t){if(t.geometry.coordinates.length<=1){return this.pointToArray(t.getCenter())}var e=[];if(o.each(t.geometry.coordinates,function(t){1===t.length&&(t=t[0]),t.length>e.length&&(e=t)}),e.length<3)return e;var n=i.polygon(e).addTo(this.map),s=this.pointToArray(n.getCenter());return this.map.removeLayer(n),[s[1],s[0]]},getConnectorPoint:function(t){return o.has(t.properties,"capital_pt")?t.properties.capital_pt:this.getCentroid(t)},resetMap:function(){this.selectDeals("by-deal","")},clearLinks:function(){this.resetHighlight(),this.renewMigrationLayer([])},applyHighlights:function(t){var e=this;this.resetHighlight();var n=!1;e.transactionBounds=i.latLngBounds(),"by-country"!==this.selectionType||o.isEmpty(this.selectionVal)||(n=!0),e.caseLayer.eachLayer(function(s){if(e.currentCountriesContains(t,s.feature.id))if(o.has(s.feature,"bbox")){var r=s.feature.bbox;e.transactionBounds.extend(i.latLngBounds(i.latLng(r[1],r[0]),i.latLng(r[3],r[2])))}else e.transactionBounds.extend(s.getBounds());n&&s.feature.id===e.selectionVal&&s.setStyle(e.styles.focus)}),this.interactionLayer.eachLayer(function(n){e.currentCountriesContains(t,n.feature.id)&&n.setStyle(e.styles.baseDim)})},countryRoles:["buyer","seller","internal","mixed"],currentCountriesContains:function(t,e,n){var i=this.countryRoles;o.isUndefined(n)||(i=o.without(i,n));var s=!1;return o.each(i,function(n){s=s||o.contains(t[n],e)}),s},createMigration:function(t,e){return{from:this.getConnectorPoint(t),to:this.getConnectorPoint(e),color:"#3690c0"}},extendBounds:function(t){var e=this,n=i.latLngBounds();o.each(t.geometry.coordinates,function(t){var s=i.latLngBounds();o.each(t,function(t){s.isValid()?s.extend(i.latLng(t[1],t[0])):s=i.latLngBounds([[t[1],t[0]],[t[1],t[0]]])}),e.compareBounds(s,n)&&(console.log("current bounds bigger than max"),n.isValid()?console.log(n.toBBoxString()):console.log("maxbounds is invalid"),console.log(s.toBBoxString()),n=s)}),console.log("maxBounds:"),console.log(n.toBBoxString()),this.transactionBounds.isValid()?this.transactionBounds.extend(n):this.transactionBounds=n},compareBounds:function(t,e){return!e.isValid()||!!t.isValid()&&Math.abs(Math.cos(t.getWest())-Math.cos(t.getWest())*Math.abs(t.getNorth()-t.getSouth()))>Math.abs(Math.cos(e.getWest())-Math.cos(e.getWest())*Math.abs(e.getNorth()-e.getSouth()))},renderLinks:function(){var t=this,e=[],n={seller:[],buyer:[],internal:[],mixed:[]},i=function(e,i){var s=o.without(t.countryRoles,i);!function(t){var e=!1;return o.each(s,function(i){e=e||o.contains(n[i],t)}),e}(e)?o.contains(n[i],e)||n[i].push(e):(o.each(s,function(t){n[t]=o.without(n[t],e)}),n.mixed.push(e))};o.each(t.filtered_deals,function(n){var s=n.transactions;o.each(s,function(n){var s=void 0,r=void 0;o.has(n,"seller")?(i(n.seller,"seller"),i(n.buyer,"buyer"),s=t.getCountry(n.seller),r=t.getCountry(n.buyer)):o.has(n,"internal")&&(i(n.internal,"internal"),s=t.getCountry(n.internal),r=s),o.isUndefined(s)||o.isUndefined(r)||e.push(t.createMigration(s,r))})}),t.applyHighlights(n),t.filtered_deals.length===t.deals.length?t.renewMigrationLayer([]):t.renewMigrationLayer(e)}}},$(document).ready(function(){var t=!0,e="by-deal",n="";if(window.location.hash){var i=window.location.hash.substr(1).split("=");e="by-"+i[0];var s=["by-deal","by-country"];i.length>2||s.indexOf(e)===-1?(e="by-deal",n=""):n=1===i.length||0===i[1].length?"":decodeURIComponent(i[1]),n.length>0&&(t=!1)}var r=ConnectionMap();r.init(e,n).done(function(){var e=o.template($("#intro-text-content").html());$("#intro-text").html(e({val:r.filtered_deals.length})),$("#splash-screen-text").html(o.template($("#full-text-content").html())({val:r.filtered_deals.length})),t&&$(".intro-text-modal").modal("show")});var a={placement:"right"};$('[data-toggle="tooltip"]').tooltip(a)})},{"./leaflet.migrationLayer-master/src/src.js":1,bootstrap:3,jquery:16,leaflet:20,"leaflet-easybutton":17,"leaflet-legend":18,"leaflet.pattern":19,underscore:21}],3:[function(t,e,n){t("../../js/transition.js"),t("../../js/alert.js"),t("../../js/button.js"),t("../../js/carousel.js"),t("../../js/collapse.js"),t("../../js/dropdown.js"),t("../../js/modal.js"),t("../../js/tooltip.js"),t("../../js/popover.js"),t("../../js/scrollspy.js"),t("../../js/tab.js"),t("../../js/affix.js")},{"../../js/affix.js":4,"../../js/alert.js":5,"../../js/button.js":6,"../../js/carousel.js":7,"../../js/collapse.js":8,"../../js/dropdown.js":9,"../../js/modal.js":10,"../../js/popover.js":11,"../../js/scrollspy.js":12,"../../js/tab.js":13,"../../js/tooltip.js":14,"../../js/transition.js":15}],4:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.affix"),s="object"==typeof e&&e;o||i.data("bs.affix",o=new n(this,s)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),s=this.$element.offset(),r=this.$target.height();if(null!=n&&"top"==this.affixed)return o<n&&"top";if("bottom"==this.affixed)return null!=n?!(o+this.unpin<=s.top)&&"bottom":!(o+r<=t-i)&&"bottom";var a=null==this.affixed,l=a?o:s.top,h=a?r:e;return null!=n&&o<=n?"top":null!=i&&l+h>=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,s=i.bottom,r=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(s=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof s&&(s=i.bottom(this.$element));var a=this.getState(r,e,o,s);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),h=t.Event(l+".bs.affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:r-e-s})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery)},{}],5:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new i(this)),"string"==typeof e&&o[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){r.detach().trigger("closed.bs.alert").remove()}var o=t(this),s=o.attr("data-target");s||(s=o.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var r=t("#"===s?[]:s);e&&e.preventDefault(),r.length||(r=o.closest(".alert")),r.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery)},{}],6:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.button"),s="object"==typeof e&&e;o||i.data("bs.button",o=new n(this,s)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",s=i.data();e+="Text",null==s.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy(function(){i[o](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target).closest(".btn");e.call(i,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))
!function t(e,n,i){function o(r,a){if(!n[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var u=n[r]={exports:{}};e[r][0].call(u.exports,function(t){var n=e[r][1][t];return o(n||t)},u,u.exports,t,e,n,i)}return n[r].exports}for(var s="function"==typeof require&&require,r=0;r<i.length;r++)o(i[r]);return o}({1:[function(t,e,n){!function(t){var e={calculateColor:function(t,e){if(0===t.indexOf("#")){var n=t.slice(1);return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4),16)+","+e+")"}return/^rgb\(/.test(t)?t.replace(/rgb/,"rgba").replace(")",",")+e+")":t.split(",").splice(0,3).join(",")+e+")"}},n={forEach:function(t,e,n){if("function"==typeof Array.prototype.forEach)t.forEach(e,n);else for(var i=0,o=t.length;i<o;i++)e.apply(n,[t[i],i,t])},map:function(t,e,n){if("function"==typeof Array.prototype.map)return t.map(e,n);for(var i=[],o=0,s=t.length;o<s;o++)i[o]=e.apply(n,[t[o],o,t]);return i}},i=function(){var t=function(t){this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.style=t.style,this.color=t.color,this.size=t.size,this.zoom=t.zoom,this.borderWidth=t.borderWidth,this.borderColor=t.borderColor};return t.prototype.draw=function(t){if(t.save(),t.translate(this.x,this.y),t.rotate(this.rotation),t.lineWidth=this.borderWidth||0,t.strokeStyle=this.borderColor||"#000",t.fillStyle=this.color||"#000",t.beginPath(),"circle"===this.style){var e=this.size*this.zoom/2;t.arc(0,0,e,0,2*Math.PI,!1)}else if("arrow"===this.style){var e=this.size*this.zoom/2;t.moveTo(-e,-e),t.lineTo(e,0),t.lineTo(-e,e),t.lineTo(-e/4,0),t.lineTo(-e,-e)}t.closePath(),t.stroke(),t.fill(),t.restore()},t}(),o=function(){var t=function(t){var e=t.startX,n=t.startY,i=t.endX,o=t.endY,s=Math.sqrt(Math.pow(e-i,2)+Math.pow(n-o,2)),r=(e+i)/2,a=(n+o)/2,l=1*(n-o)+r,h=1*(i-e)+a,u=Math.sqrt(Math.pow(s/2,2)+Math.pow(1*s,2)),c=Math.atan2(n-h,e-l),d=Math.atan2(o-h,i-l);this.startX=e,this.startY=n,this.endX=i,this.endY=o,this.centerX=l,this.centerY=h,this.startAngle=c,this.endAngle=d,this.startLabel=t&&t.labels&&t.labels[0],this.endLabel=t&&t.labels&&t.labels[1],this.radius=u,this.lineWidth=t.width||1,this.strokeStyle=t.color||"#000",this.label=t.label,this.font=t.font,this.shadowBlur=t.shadowBlur};return t.prototype.draw=function(t){if(t.save(),t.lineWidth=this.lineWidth,t.strokeStyle="rgba(54,144,192, 0.5)",t.shadowColor=t.strokeStyle,t.shadowBlur=this.shadowBlur||1,t.beginPath(),t.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,!1),t.stroke(),t.restore(),t.save(),t.fillStyle=this.strokeStyle,this.label){if(t.font=this.label,this.startLabel){var e=this.startX-15,n=this.startY+5;t.fillText(this.startLabel,e,n)}if(this.endLabel){var e=this.endX-15,n=this.endY-5;t.fillText(this.endLabel,e,n)}}t.restore()},t}(),s=function(){function t(t){this.x=t.x,this.y=t.y,this.maxRadius=t.radius,this.color=t.color,this.shadowBlur=5,this.lineWidth=t.borderWidth,this.r=0,this.factor=2/t.radius,this.defaultFactor=2/t.radius}return t.prototype.draw=function(t){this.r+=.5,t.save(),t.translate(this.x,this.y);var n=this.color;n=e.calculateColor(n,1-this.r/this.maxRadius),t.strokeStyle=n,t.lineWidth=this.lineWidth,t.beginPath(),t.arc(0,0,this.r,0,2*Math.PI,!1),t.stroke(),t.restore(),Math.abs(this.maxRadius-this.r)<.8&&(this.r=0)},t}(),r=function(){var t=function(t){var e=t.startX,n=t.startY,o=t.endX,s=t.endY,r=Math.sqrt(Math.pow(e-o,2)+Math.pow(n-s,2)),a=(e+o)/2,l=(n+s)/2,h=1*(n-s)+a,u=1*(o-e)+l,c=Math.sqrt(Math.pow(r/2,2)+Math.pow(1*r,2)),d=Math.atan2(n-u,e-h),p=Math.atan2(s-u,o-h);d*p<0&&(d<0?(d+=2*Math.PI,p+=2*Math.PI):p+=2*Math.PI),this.tailPointsCount=50,this.centerX=h,this.centerY=u,this.startAngle=d,this.endAngle=p,this.radius=c,this.lineWidth=t.width||1,this.strokeStyle=t.color||"#fff";var f=t.zoom||1;this.defaultFactor=r>0?.005:.0035,this.factor=this.defaultFactor,this.deltaAngle=80/Math.min(this.radius,400)/this.tailPointsCount,this.trailAngle=this.startAngle,this.arcAngle=this.startAngle,this.animateBlur=!0,this.marker=new i({x:50,y:80,rotation:50*Math.PI/180,style:"arrow",color:"rgb(255, 255, 255)",size:2,zoom:f,borderWidth:0,borderColor:this.strokeStyle})};return t.prototype.setFactor=function(t){this.factor=this.defaultFactor*t},t.prototype.getFactor=function(){return this.factor},t.prototype.drawArc=function(t,e,n,i,o){t.save(),t.lineWidth=n,t.strokeStyle=e,t.shadowColor=this.strokeStyle,t.lineCap="round",t.beginPath(),t.arc(this.centerX,this.centerY,this.radius,i,o,!1),t.stroke(),t.restore()},t.prototype.draw=function(t){var n=this.endAngle,i=this.trailAngle+this.factor,o=this.strokeStyle;this.animateBlur&&(this.arcAngle=i),this.trailAngle=i,o=e.calculateColor(o,.1),this.drawArc(t,o,this.lineWidth,this.startAngle,this.arcAngle);for(var s=this.tailPointsCount,r=0;r<s;r++){var a=e.calculateColor(this.strokeStyle,.3-.3/s*r);this.trailAngle-this.deltaAngle*r>this.startAngle&&this.drawArc(t,a,2-2/s*r,this.trailAngle-this.deltaAngle*r,this.trailAngle)}t.save(),t.translate(this.centerX,this.centerY),this.marker.x=Math.cos(this.trailAngle)*this.radius,this.marker.y=Math.sin(this.trailAngle)*this.radius,this.marker.rotation=this.trailAngle+Math.PI/2,this.marker.draw(t),t.restore(),180*(n-this.trailAngle)/Math.PI<.5&&(this.trailAngle=this.startAngle,this.animateBlur=!1)},t}(),a=function(){var e=function(t){this.data=t.data,this.store={arcs:[],markers:[],pulses:[],sparks:[]},this.playAnimation=!0,this.started=!1,this.context=t.context,this.style=t.style,this.init()};return e.prototype.init=function(){this.updateData(this.data)},e.prototype.add=function(t){},e.prototype.remove=function(){},e.prototype.clear=function(){this.store={arcs:[],markers:[],pulses:[],sparks:[]},this.playAnimation=!0,this.started=!1,t.cancelAnimationFrame(this.requestAnimationId)},e.prototype.setSparkFactorMultiplier=function(t){n.forEach(this.store.sparks,function(e){e.setFactor(t)})},e.prototype.distance=function(t,e){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))},e.prototype.updateData=function(t,e){e||(e=1),t&&0!==t.length&&(this.clear(),this.data=t,this.data&&this.data.length>0&&n.forEach(this.data,function(t){var n=!1;if(t.from[0]===t.to[0]&&t.from[1]===t.to[1]&&(n=!0),n){var a=new s({x:t.to[0],y:t.to[1],radius:this.style.pulse.radius,color:t.color,borderWidth:this.style.pulse.borderWidth});this.store.pulses.push(a)}else{var l=new o({startX:t.from[0],startY:t.from[1],endX:t.to[0],endY:t.to[1],labels:t.labels,label:this.style.arc.label,font:this.style.arc.font,width:this.style.arc.width,color:t.color}),h=new i({x:t.from[0],y:t.from[1],rotation:l.endAngle+Math.PI/2,style:"circle",color:t.color,size:1,borderWidth:1,borderColor:"#000",zoom:e}),u=new i({x:t.to[0],y:t.to[1],rotation:l.endAngle+Math.PI/2,style:"circle",color:t.color,size:2,borderWidth:1,borderColor:"#000",zoom:e}),c=new r({startX:t.from[0],startY:t.from[1],endX:t.to[0],endY:t.to[1],width:5,color:t.color,zoom:e});this.store.arcs.push(l),this.store.markers.push(h),this.store.markers.push(u),this.store.sparks.push(c)}},this))},e.prototype.start=function(e){var n,i=this,o=Date.now();this.started||(this.started=!0,function s(){function r(t){for(var e=0,n=t.length;e<n;e++)t[e].draw(i.context)}i.requestAnimationId=t.requestAnimationFrame(s,e);var a=Date.now();n=a-o,i.playAnimation&&n>1e3/24&&(o=a-n%(1e3/24),e.width=e.width,r(i.store.arcs),r(i.store.markers),r(i.store.pulses),r(i.store.sparks))}())},e.prototype.play=function(){this.playAnimation=!0},e.prototype.pause=function(){this.playAnimation=!1},e}();L.MigrationLayer=L.Class.extend({options:{map:{},data:{},pulseRadius:25,pulseBorderWidth:3,arcWidth:1,arcLabel:!0,arcLabelFont:"15px sans-serif",Marker:{},Spark:{}},_setOptions:function(t,e){t.hasOwnProperty("options")||(t.options=t.options?L.Util.create(t.options):{});for(var n in e)t.options[n]=e[n];return t.options},initialize:function(t){this._setOptions(this,t),this._map=this.options.map||{},this._data=this.options.data||{},this._style={pulse:{radius:this.options.pulseRadius,borderWidth:this.options.pulseBorderWidth},arc:{width:this.options.arcWidth,label:this.options.arcLabel,font:this.options.arcLabelFont}}||{},this._show=!0,this._init()},_init:function(){var t=L.DomUtil.create("div","leaflet-ODLayer-container");if(t.style.position="absolute",t.style.width=this._map.getSize().x+"px",t.style.height=this._map.getSize().y+"px",this.container=t,this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),t.appendChild(this.canvas),this._map.getPanes().overlayPane.appendChild(t),!this.migration){var e=this._convertData();this.migration=new a({data:e,context:this.context,style:this._style})}},_resize:function(){var e=this._map.getBounds(),n=e.getNorthWest(),i=this._map.latLngToContainerPoint(n);i.y>0?this.container.style.top=-i.y+"px":this.container.style.top="0px";var o=t.getComputedStyle(this._map.getContainer());this.canvas.setAttribute("width",parseInt(o.width,10)),this.canvas.setAttribute("height",parseInt(o.height,10))},_convertData:function(){var t=this._map.getBounds();if(this._data&&t){return n.map(this._data,function(t){var e=this._map.latLngToContainerPoint(new L.LatLng(t.from[1],t.from[0])),n=this._map.latLngToContainerPoint(new L.LatLng(t.to[1],t.to[0]));return{from:[e.x,e.y],to:[n.x,n.y],labels:t.labels,value:t.value,color:t.color}},this)}},_bindMapEvents:function(){var t=this;this._map.on("movestart ",function(){t.migration.pause()}),this._map.on("zoomstart ",function(){t.container.style.display="none"}),this._map.on("moveend",function(){t.migration.play(),t._show&&(t.container.style.display="",t._draw())})},_draw:function(){if(this._map.getBounds()&&this.migration.playAnimation){this._resize(),this._transform();var t=this._convertData();this.migration.updateData(t,this._map.getZoom()),t.length>0&&!this.migration.started&&this.migration.start(this.canvas)}},_transform:function(){var t=this._map.getBounds(),e=this._map.latLngToLayerPoint(t.getNorthWest());L.DomUtil.setPosition(this.container,e)},addTo:function(){if(this._bindMapEvents(),this._map.getBounds()&&this.migration.playAnimation){this._resize(),this._transform();var t=this._convertData();this.migration.updateData(t,this._map.getZoom()),this.migration.start(this.canvas)}},setData:function(t){this._data=t,t.length>0?this._draw():(this.migration.clear(),this._draw())},getData:function(){return this._data},hide:function(){this.container.style.display="none",this._show=!1},show:function(){this.container.style.display="",this._show=!0},play:function(){this.migration.play()},pause:function(){this.migration.pause()},destroy:function(){this.migration.clear(),this.container.parentNode.removeChild(this.container),this._map.clearAllEventListeners(),this.mapHandles=[]},setFactor:function(t){this.migration.setSparkFactorMultiplier(t)}}),L.migrationLayer=function(t){return new L.MigrationLayer(t)}}(window)},{}],2:[function(t,e,n){jQuery=t("jquery"),$=jQuery,t("bootstrap");var i=t("leaflet"),o=t("underscore");t("leaflet-legend"),t("./leaflet.migrationLayer-master/src/src.js"),t("leaflet-easybutton"),t("leaflet.pattern"),ConnectionMap=function(){return{map:null,caseLayer:null,filtered_deals:[],full_country_list:[],current_country_list:[],init:function(t,e){var n=this;i.Browser.chrome||i.Browser.safari?$("body").css("filter","saturate(135%)"):i.Browser.ie&&$("body").css("filter","saturate(90%)"),n.home_bounds=[[90,-180],[-90,180]],n.map=i.map("map",{zoom:2,minZoom:2,maxBounds:n.home_bounds,maxBoundsViscosity:1}).setView([0,0],2),i.tileLayer("https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="http://cartodb.com/attributions">CartoDB</a>',subdomains:"abcd",maxZoom:19,maxBounds:n.home_bounds,maxBoundsViscosity:1}).addTo(this.map);var o=new i.Control.Legend({position:"bottomright",collapsed:!1,controlButton:{title:"Legend"}});n.map.addControl(o),$(".legend-container").append($("#legend")),$(".legend-toggle").append("<i class='legend-toggle-icon fa fa-info fa-2x' style='color: #000'></i>");var s=function(t,e){n.selectDeals("by-deal","")};i.easyButton('<span class="reload glyphicon glyphicon-refresh" title="reset the map" data-toggle="tooltip"></span>',s).addTo(n.map),i.Control.Watermark=i.Control.extend({onAdd:function(t){var e=i.DomUtil.create("a");return e.href="http://fletcher.tufts.edu/World-Peace-Foundation",e.target="_blank",i.DomUtil.create("img","wpf-logo",e).src="images/wpf-logo-fletcher.png",e}}),i.control.watermark=function(t){return new i.Control.Watermark(t)},i.control.watermark({position:"bottomleft"}).addTo(n.map);var r=new i.StripePattern({color:n.styles.buyer.fillColor,spaceColor:n.styles.seller.fillColor,spaceOpacity:1,angle:-45});return r.addTo(this.map),n.styles.mixed.fillPattern=r,n.loadBaseCountries().done(function(){n.loadConnections().done(function(){n.selectionTypeHandler(),n.removeSelectionHandler(),n.selectByHeaderHandler(),void 0!==t&&(void 0===e&&(e=""),n.selectDeals(t,e))})})},styles:{base:{color:"#ccc",weight:1,opacity:.2,fillOpacity:.1,fillColor:"#aaa"},baseDim:{color:"#ccc",opacity:0,fillOpacity:0,fillColor:"#000"},interactionHighlight:{fillOpacity:.7,fillColor:"#ccc"},highlight:{fillOpacity:.7},focus:{fillOpacity:.7,opacity:1,weight:2,color:"#ffffff"},buyer:{weight:1,fillColor:"#8c510a",color:"#8c510a",fillOpacity:.2,opacity:.8},seller:{weight:1,color:"#01665e",fillColor:"#01665e",fillOpacity:.2,opacity:.8},internal:{weight:1,color:"#64681a",fillColor:"#64681a",fillOpacity:.2,opacity:.8},mixed:{weight:1,color:"#01665e",fillOpacity:.3,opacity:.8}},getStyle:function(t){var e=this.styles;return o.has(t.properties,"role")&&""!==t.properties.role?e[t.properties.role]:e.base},selectionType:"by-deal",selectionVal:"",selectionTypeHandler:function(){var t=this;$(".selection-type").click(function(e){t.selectDeals(e.target.id,"")})},removeSelectionHandler:function(){var t=this;$(".selection").on("click",".remove-selection",function(e){t.selectDeals(t.selectionType,"")})},selectByHeaderHandler:function(){var t=this;$(".details").on("click",".case-name",function(e){var n=$(this).find("input").attr("value");t.selectDeals("by-deal",n)}),$(".details").on("click",".country-name",function(e){var n=$(this).find("input").attr("value");t.selectDeals("by-country",n)})},setSelectionType:function(t){this.selectionType=t,$(".selection-type").removeClass("selected"),$("#"+t).addClass("selected")},clickCountry:function(t){var e=t.target,n=e.feature.id;this.highlightFeature(n)},highlightFeature:function(t){var e=this;e.hasTransaction(t)&&e.selectDeals("by-country",t)},mapHome:function(){this.map.fitBounds(this.home_bounds),this.map.setView([0,0],2)},selectDeals:function(t,e,n){void 0===n&&(n=!1),this.setSelectionType(t),this.selectionVal=e;var i=e,s=!0;if(o.isEmpty(e))i="full list",s=!1;else if("by-country"===t){var r=this.getCountry(e);i=r.properties.name}var a=this.selectionLabelTemplate()({val:i,showRemove:s});$(".selection").html(a),this.filterDeals(t,e),this.displayDetails(),n||(window.location.hash="#"+encodeURIComponent(t.substr(3))+"="+encodeURIComponent(e)),this.current_country_list=this.renderSourcesAndTargets(this.filtered_deals),this.renderLinks(),this.map.fitBounds(this.transactionBounds)},filterDeals:function(t,e){var n=this,i=[];o.isEmpty(e)?i=n.deals:"by-country"===t?o.each(n.deals,function(t){o.union(o.where(t.transactions,{buyer:e}),o.where(t.transactions,{seller:e}),o.where(t.transactions,{internal:e})).length>0&&i.push(t)}):"by-deal"===t&&(i=o.where(n.deals,{deal_name:e})),i.length>0&&o.has(i[0],"sort_year")&&(i=o.sortBy(i,"sort_year")),n.filtered_deals=i,n.setCounter(i.length)},setCounter:function(t){var e=" case";1!==t&&(e+="s"),$(".result-counter").text(t+e)},detailsTemplate:function(){var t=$("#details-template").html();return o.template(t)},countryListTemplate:function(){var t=$("#country-list-template").html();return o.template(t)},selectionLabelTemplate:function(){var t=$("#sel-label-template").html();return o.template(t)},injectCountryNames:function(t){var e=this,n={connections:{}};return o.has(t,"country")&&(n.country=e.getCountry(t.country).properties.name),o.each(t.connections,function(t){n.connections[t.deal_name]={exporters:[],importers:[],internal:[]};var i=n.connections[t.deal_name];o.each(t.transactions,function(t){o.has(t,"seller")?t.seller===t.buyer?i.internal.push(e.getCountry(t.seller).properties.name):(i.exporters.push(e.getCountry(t.seller).properties.name),i.importers.push(e.getCountry(t.buyer).properties.name)):o.has(t,"internal")&&i.internal.push(e.getCountry(t.internal).properties.name)}),i.exporters=o.uniq(i.exporters),i.importers=o.uniq(i.importers),i.internal=o.uniq(i.internal),o.extend(i,e.getProperties(t.deal_name))}),n},getProperties:function(t){return o.findWhere(this.deals,{deal_name:t})},displayDetailsByCountry:function(t){var e=this,n=e.injectCountryNames({country:t,connections:e.filtered_deals});return e.detailsTemplate()(n)},displayDetailsByDeal:function(t){var e=this,n=e.injectCountryNames({dealName:t,connections:e.filtered_deals});return e.detailsTemplate()(n)},displayAllCountries:function(){var t=this,e={countries:t.full_country_list};return t.countryListTemplate()(e)},displayAllDeals:function(){var t=this,e=t.injectCountryNames({connections:t.filtered_deals});return t.detailsTemplate()(e)},displayDetails:function(){var t=this,e="";"by-country"===t.selectionType?e=o.isEmpty(t.selectionVal)?t.displayAllCountries():t.displayDetailsByCountry(t.selectionVal):"by-deal"===t.selectionType&&(e=o.isEmpty(t.selectionVal)?t.displayAllDeals():t.displayDetailsByDeal(t.selectionVal));var n=$(".details");n.html(e);var i=$(window).height()-n.offset().top-20;$(".details").height(i),t.detailsHeightHandler||(t.detailsHeightHandler=!0,$(window).resize(function(){var t=$(window).height()-n.offset().top-20;n.height(t)})),n.scrollTop(0)},detailsHeightHandler:!1,resetHighlight:function(){var t=this;this.caseLayer.eachLayer(function(e){e.setStyle(t.getStyle(e.feature))}),this.interactionLayer.eachLayer(function(e){e.setStyle(t.styles.base)})},loadBaseCountries:function(){var t=this;return $.getJSON("data/world_50m.json",function(e){function n(e,n){function i(e){e.target.setStyle(t.styles.interactionHighlight)}function s(e){var n=e.target.feature.properties.id;o.contains(o.pluck(t.current_country_list,"fid"),n)?e.target.setStyle(t.styles.baseDim):e.target.setStyle(t.styles.base)}n.on({click:$.proxy(t.clickCountry,t),mouseover:i,mouseout:s})}function s(t,e){t.properties.role=""}t.countryGeoJSON=e;var r={style:t.styles.base,onEachFeature:n};t.interactionLayer=i.geoJSON(e,r).addTo(t.map);var a="display_countries";t.map.createPane(a),t.map.getPane(a).style.zIndex=201,t.caseLayer=i.geoJSON([],{onEachFeature:s,pane:a}).addTo(t.map)})},getCountry:function(t){if(!o.isUndefined(this.countryGeoJSON)){return o.findWhere(this.countryGeoJSON.features,{id:t})}},loadConnections:function(){var t=this;return $.getJSON("data/wpf_deals.json",function(e){t.deals=e.data,$(".number_of_cases").text(t.deals.length),t.createMigrationLayer(),t.initializeInteractionLayer(),t.selectDeals("by-deal","",!0)})},createMigrationLayer:function(){this.migrationLayer=new i.migrationLayer({map:this.map,data:[]}),this.migrationLayer.addTo(this.map)},renewMigrationLayer:function(t){this.migrationLayer.setData(t)},copyCountries:function(t){var e=[],n=this;return o.each(t,function(t){var i=$.extend({},n.getCountry(t));e.push(i)}),e},addToCountryList:function(t,e,n,i){var s=this,r=o.findWhere(i,{fid:t});if(o.isUndefined(r)){var a={fid:t,name:s.getCountry(t).properties.name,cases:1,deals:[n]};a.role=[e],i.push(a)}else o.contains(r.deals,n)||(r.deals.push(n),r.cases=r.deals.length),o.contains(r.role,e)||r.role.push(e)},renderSourcesAndTargets:function(t){o.isUndefined(t)&&(t=this.filtered_deals);var e=this,n=[];return o.each(t,function(t){o.each(t.transactions,function(i){o.has(i,"internal")?e.addToCountryList(i.internal,"internal deal",t.deal_name,n):o.has(i,"seller")&&(i.seller===i.buyer?e.addToCountryList(i.seller,"internal deal",t.deal_name,n):(e.addToCountryList(i.seller,"seller",t.deal_name,n),e.addToCountryList(i.buyer,"buyer",t.deal_name,n)))})}),n=o.sortBy(n,"cases").reverse(),e.updateCountryRoles(t,n),n},extractCountriesFromDeal:function(t){var e=[];return o.each(t.transactions,function(t){o.has(t,"seller")?(e.push(t.seller),e.push(t.buyer)):o.has(t,"internal")&&e.push(t.internal)}),e},extractAllCountriesFromDeals:function(t){var e=this,n=[];return o.each(t,function(t){n=o.union(n,e.extractCountriesFromDeal(t))}),o.uniq(n)},countriesByRole:function(t,e,n){var i=this,s=o.filter(n,function(t){return o.contains(i.extractAllCountriesFromDeals(e),t.fid)});return o.filter(s,function(e){return o.contains(e.role,t)})},countryIdsByRole:function(t,e,n){var i=this.countriesByRole(t,e,n);return i.length>0?o.uniq(o.pluck(i,"fid")):[]},initializeInteractionLayer:function(){this.full_country_list=this.renderSourcesAndTargets(this.deals);var t=this.countryIdsByRole("seller",this.deals,this.full_country_list),e=this.countryIdsByRole("buyer",this.deals,this.full_country_list),n=this.countryIdsByRole("internal deal",this.deals,this.full_country_list),i=o.uniq(o.union(t,e,n));this.replaceGeoJSON(this.interactionLayer,i)},updateCountryRoles:function(t,e){var n=this,i=this.countryIdsByRole("seller",t,e),s=this.countryIdsByRole("buyer",t,e),r=this.countryIdsByRole("internal deal",t,e),a=o.uniq(o.union(i,s,r));this.replaceGeoJSON(this.caseLayer,a),this.caseLayer.eachLayer(function(t){var e=[],a=t.feature.id;o.contains(i,a)&&e.push("seller"),o.contains(s,a)&&e.push("buyer"),o.contains(r,a)&&e.push("internal"),0===e.length?t.feature.properties.role="":1===e.length?t.feature.properties.role=e[0]:e.length>1&&(t.feature.properties.role="mixed"),t.setStyle(n.getStyle(t.feature))})},replaceGeoJSON:function(t,e){var n=this.copyCountries(e);t.clearLayers(),t.addData(n)},hasTransaction:function(t){var e=o.where(this.full_country_list,{fid:t});return e.length>0&&e[0].cases>0},pointToArray:function(t){return[t.lng,t.lat]},transactionBounds:i.latLngBounds([[-90,-180],[90,180]]),getCentroid:function(t){if(t.geometry.coordinates.length<=1){return this.pointToArray(t.getCenter())}var e=[];if(o.each(t.geometry.coordinates,function(t){1===t.length&&(t=t[0]),t.length>e.length&&(e=t)}),e.length<3)return e;var n=i.polygon(e).addTo(this.map),s=this.pointToArray(n.getCenter());return this.map.removeLayer(n),[s[1],s[0]]},getConnectorPoint:function(t){return o.has(t.properties,"capital_pt")?t.properties.capital_pt:this.getCentroid(t)},resetMap:function(){this.selectDeals("by-deal","")},clearLinks:function(){this.resetHighlight(),this.renewMigrationLayer([])},applyHighlights:function(t){var e=this;this.resetHighlight();var n=!1;e.transactionBounds=i.latLngBounds(),"by-country"!==this.selectionType||o.isEmpty(this.selectionVal)||(n=!0),e.caseLayer.eachLayer(function(s){if(e.currentCountriesContains(t,s.feature.id))if(o.has(s.feature,"bbox")){var r=s.feature.bbox;e.transactionBounds.extend(i.latLngBounds(i.latLng(r[1],r[0]),i.latLng(r[3],r[2])))}else e.transactionBounds.extend(s.getBounds());n&&s.feature.id===e.selectionVal&&s.setStyle(e.styles.focus)}),this.interactionLayer.eachLayer(function(n){e.currentCountriesContains(t,n.feature.id)&&n.setStyle(e.styles.baseDim)})},countryRoles:["buyer","seller","internal","mixed"],currentCountriesContains:function(t,e,n){var i=this.countryRoles;o.isUndefined(n)||(i=o.without(i,n));var s=!1;return o.each(i,function(n){s=s||o.contains(t[n],e)}),s},createMigration:function(t,e){return{from:this.getConnectorPoint(t),to:this.getConnectorPoint(e),color:"#3690c0"}},extendBounds:function(t){var e=this,n=i.latLngBounds();o.each(t.geometry.coordinates,function(t){var s=i.latLngBounds();o.each(t,function(t){s.isValid()?s.extend(i.latLng(t[1],t[0])):s=i.latLngBounds([[t[1],t[0]],[t[1],t[0]]])}),e.compareBounds(s,n)&&(console.log("current bounds bigger than max"),n.isValid()?console.log(n.toBBoxString()):console.log("maxbounds is invalid"),console.log(s.toBBoxString()),n=s)}),console.log("maxBounds:"),console.log(n.toBBoxString()),this.transactionBounds.isValid()?this.transactionBounds.extend(n):this.transactionBounds=n},compareBounds:function(t,e){return!e.isValid()||!!t.isValid()&&Math.abs(Math.cos(t.getWest())-Math.cos(t.getWest())*Math.abs(t.getNorth()-t.getSouth()))>Math.abs(Math.cos(e.getWest())-Math.cos(e.getWest())*Math.abs(e.getNorth()-e.getSouth()))},renderLinks:function(){var t=this,e=[],n={seller:[],buyer:[],internal:[],mixed:[]},i=function(e,i){var s=o.without(t.countryRoles,i);!function(t){var e=!1;return o.each(s,function(i){e=e||o.contains(n[i],t)}),e}(e)?o.contains(n[i],e)||n[i].push(e):(o.each(s,function(t){n[t]=o.without(n[t],e)}),n.mixed.push(e))};o.each(t.filtered_deals,function(n){var s=n.transactions;o.each(s,function(n){var s=void 0,r=void 0;o.has(n,"seller")?(i(n.seller,"seller"),i(n.buyer,"buyer"),s=t.getCountry(n.seller),r=t.getCountry(n.buyer)):o.has(n,"internal")&&(i(n.internal,"internal"),s=t.getCountry(n.internal),r=s),o.isUndefined(s)||o.isUndefined(r)||e.push(t.createMigration(s,r))})}),t.applyHighlights(n),t.filtered_deals.length===t.deals.length?t.renewMigrationLayer([]):t.renewMigrationLayer(e)}}},$(document).ready(function(){var t=!0,e="by-deal",n="";if(window.location.hash){var i=window.location.hash.substr(1).split("=");e="by-"+i[0];var s=["by-deal","by-country"];i.length>2||s.indexOf(e)===-1?(e="by-deal",n=""):n=1===i.length||0===i[1].length?"":decodeURIComponent(i[1]),n.length>0&&(t=!1)}var r=ConnectionMap();r.init(e,n).done(function(){var e=o.template($("#intro-text-content").html());$("#intro-text").html(e({val:r.filtered_deals.length})),$("#splash-screen-text").html(o.template($("#full-text-content").html())({val:r.filtered_deals.length})),t&&$(".intro-text-modal").modal("show")});var a={placement:"right"};$('[data-toggle="tooltip"]').tooltip(a)})},{"./leaflet.migrationLayer-master/src/src.js":1,bootstrap:3,jquery:16,leaflet:20,"leaflet-easybutton":17,"leaflet-legend":18,"leaflet.pattern":19,underscore:21}],3:[function(t,e,n){t("../../js/transition.js"),t("../../js/alert.js"),t("../../js/button.js"),t("../../js/carousel.js"),t("../../js/collapse.js"),t("../../js/dropdown.js"),t("../../js/modal.js"),t("../../js/tooltip.js"),t("../../js/popover.js"),t("../../js/scrollspy.js"),t("../../js/tab.js"),t("../../js/affix.js")},{"../../js/affix.js":4,"../../js/alert.js":5,"../../js/button.js":6,"../../js/carousel.js":7,"../../js/collapse.js":8,"../../js/dropdown.js":9,"../../js/modal.js":10,"../../js/popover.js":11,"../../js/scrollspy.js":12,"../../js/tab.js":13,"../../js/tooltip.js":14,"../../js/transition.js":15}],4:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.affix"),s="object"==typeof e&&e;o||i.data("bs.affix",o=new n(this,s)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),s=this.$element.offset(),r=this.$target.height();if(null!=n&&"top"==this.affixed)return o<n&&"top";if("bottom"==this.affixed)return null!=n?!(o+this.unpin<=s.top)&&"bottom":!(o+r<=t-i)&&"bottom";var a=null==this.affixed,l=a?o:s.top,h=a?r:e;return null!=n&&o<=n?"top":null!=i&&l+h>=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,s=i.bottom,r=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(s=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof s&&(s=i.bottom(this.$element));var a=this.getState(r,e,o,s);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),h=t.Event(l+".bs.affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:r-e-s})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery)},{}],5:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new i(this)),"string"==typeof e&&o[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){r.detach().trigger("closed.bs.alert").remove()}var o=t(this),s=o.attr("data-target");s||(s=o.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var r=t("#"===s?[]:s);e&&e.preventDefault(),r.length||(r=o.closest(".alert")),r.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery)},{}],6:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.button"),s="object"==typeof e&&e;o||i.data("bs.button",o=new n(this,s)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",s=i.data();e+="Text",null==s.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy(function(){i[o](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target).closest(".btn");e.call(i,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))
}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},{}],7:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.carousel"),s=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),r="string"==typeof e?e:s.slide;o||i.data("bs.carousel",o=new n(this,s)),"number"==typeof e?o.to(e):r?o[r]():s.interval&&o.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e);if(("prev"==t&&0===n||"next"==t&&n==this.$items.length-1)&&!this.options.wrap)return e;var i="prev"==t?-1:1,o=(n+i)%this.$items.length;return this.$items.eq(o)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),s=i||this.getItemForDirection(e,o),r=this.interval,a="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var h=s[0],u=t.Event("slide.bs.carousel",{relatedTarget:h,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,r&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var c=t(this.$indicators.children()[this.getItemIndex(s)]);c&&c.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:h,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,o.addClass(a),s.addClass(a),o.one("bsTransitionEnd",function(){s.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(d)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(o.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(d)),r&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var o=function(n){var i,o=t(this),s=t(o.attr("data-target")||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var r=t.extend({},s.data(),o.data()),a=o.attr("data-slide-to");a&&(r.interval=!1),e.call(s,r),a&&s.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery)},{}],8:[function(t,e,n){+function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),o=n.data("bs.collapse"),s=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!o&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),o||n.data("bs.collapse",o=new i(this,s)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.7",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"))&&e.transitioning)){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),e||o.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[r](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return o.call(this);this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(i.TRANSITION_DURATION)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var o=t(i);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var o=t(this);o.attr("data-target")||i.preventDefault();var s=e(o),r=s.data("bs.collapse"),a=r?"toggle":o.data();n.call(s,a)})}(jQuery)},{}],9:[function(t,e,n){+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(o).remove(),t(s).each(function(){var i=t(this),o=e(i),s={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",s)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",s)))))}))}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof e&&i[e].call(n)})}var o=".dropdown-backdrop",s='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};r.VERSION="3.3.7",r.prototype.toggle=function(i){var o=t(this);if(!o.is(".disabled, :disabled")){var s=e(o),r=s.hasClass("open");if(n(),!r){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(s.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=e(i),r=o.hasClass("open");if(!r&&27!=n.which||r&&27==n.which)return 27==n.which&&o.find(s).trigger("focus"),i.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(n.target);38==n.which&&l>0&&l--,40==n.which&&l<a.length-1&&l++,~l||(l=0),a.eq(l).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=i,t.fn.dropdown.Constructor=r,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,this},t(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",s,r.prototype.toggle).on("keydown.bs.dropdown.data-api",s,r.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",r.prototype.keydown)}(jQuery)},{}],10:[function(t,e,n){+function(t){"use strict";function e(e,i){return this.each(function(){var o=t(this),s=o.data("bs.modal"),r=t.extend({},n.DEFAULTS,o.data(),"object"==typeof e&&e);s||o.data("bs.modal",s=new n(this,r)),"string"==typeof e?s[e](i):r.show&&s.show(i)})}var n=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,o=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var o=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),o&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});o?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(s)}))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){if(this.ignoreBackdropClick)return void(this.ignoreBackdropClick=!1);t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):r()}else e&&e()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=t(this),o=i.attr("href"),s=t(i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),r=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},s.data(),i.data());i.is("a")&&n.preventDefault(),s.one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),e.call(s,r,this)})}(jQuery)},{}],11:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.popover"),s="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||i.data("bs.popover",o=new n(this,s)),"string"==typeof e&&o[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery)},{}],12:[function(t,e,n){+function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),o=i.data("bs.scrollspy"),s="object"==typeof n&&n;o||i.data("bs.scrollspy",o=new e(this,s)),"string"==typeof n&&o[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),s=/^#./.test(o)&&t(o);return s&&s.length&&s.is(":visible")&&[[s[n]().top+i,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,s=this.targets,r=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return r!=(t=s[s.length-1])&&this.activate(t);if(r&&e<o[0])return this.activeTarget=null,this.clear();for(t=o.length;t--;)r!=s[t]&&e>=o[t]&&(void 0===o[t+1]||e<o[t+1])&&this.activate(s[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=t.fn.scrollspy;t.fn.scrollspy=n,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);n.call(e,e.data())})})}(jQuery)},{}],13:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.tab");o||i.data("bs.tab",o=new n(this)),"string"==typeof e&&o[e]()})}var n=function(e){this.element=t(e)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=e.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=n.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),r=t.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(s),e.trigger(r),!r.isDefaultPrevented()&&!s.isDefaultPrevented()){var a=t(i);this.activate(e.closest("li"),n),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},n.prototype.activate=function(e,i,o){function s(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var r=i.find("> .active"),a=o&&t.support.transition&&(r.length&&r.hasClass("fade")||!!i.find("> .fade").length);r.length&&a?r.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s(),r.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},{}],14:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.tooltip"),s="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||i.data("bs.tooltip",o=new n(this,s)),"string"==typeof e&&o[e]())})}var n=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),s=o.length;s--;){var r=o[s];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)}},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var o=this,s=this.tip(),r=this.getUID(this.type);this.setContent(),s.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&s.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,h=l.test(a);h&&(a=a.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),c=s[0].offsetWidth,d=s[0].offsetHeight;if(h){var p=a,f=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+d>f.bottom?"top":"top"==a&&u.top-d<f.top?"bottom":"right"==a&&u.right+c>f.width?"left":"left"==a&&u.left-c<f.left?"right":a,s.removeClass(p).addClass(a)}var m=this.getCalculatedOffset(a,u,c,d);this.applyPlacement(m,a);var g=function(){var t=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==t&&o.leave(o)};t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",g).emulateTransitionEnd(n.TRANSITION_DURATION):g()}},n.prototype.applyPlacement=function(e,n){var i=this.tip(),o=i[0].offsetWidth,s=i[0].offsetHeight,r=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(r)&&(r=0),isNaN(a)&&(a=0),e.top+=r,e.left+=a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,h=i[0].offsetHeight;"top"==n&&h!=s&&(e.top=e.top+s-h);var u=this.getViewportAdjustedDelta(n,e,l,h);u.left?e.left+=u.left:e.top+=u.top;var c=/top|bottom/.test(n),d=c?2*u.left-o+l:2*u.top-s+h,p=c?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(d,i[0][p],c)},n.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},n.prototype.hide=function(e){function i(){"in"!=o.hoverState&&s.detach(),o.$element&&o.$element.removeAttr("aria-describedby").trigger("hidden.bs."+o.type),e&&e()}var o=this,s=t(this.$tip),r=t.Event("hide.bs."+this.type);if(this.$element.trigger(r),!r.isDefaultPrevented())return s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this},n.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(e){e=e||this.$element;var n=e[0],i="BODY"==n.tagName,o=n.getBoundingClientRect();null==o.width&&(o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var s=window.SVGElement&&n instanceof window.SVGElement,r=i?{top:0,left:0}:s?null:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},o,a,l,r)},n.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},n.prototype.getViewportAdjustedDelta=function(t,e,n,i){var o={top:0,left:0};if(!this.$viewport)return o;var s=this.options.viewport&&this.options.viewport.padding||0,r=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-s-r.scroll,l=e.top+s-r.scroll+i;a<r.top?o.top=r.top-a:l>r.top+r.height&&(o.top=r.top+r.height-l)}else{var h=e.left-s,u=e.left+s+n;h<r.left?o.left=r.left-h:u>r.right&&(o.left=r.left+r.width-u)}return o},n.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},n.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var i=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery)},{}],15:[function(t,e,n){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},{}],16:[function(t,e,n){!function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){
var e=!!t&&"length"in t&&t.length,n=ot.type(t);return"function"!==n&&!ot.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function i(t,e,n){if(ot.isFunction(e))return ot.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return ot.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(ct.test(e))return ot.filter(e,t,n);e=ot.filter(e,t)}return ot.grep(t,function(t){return Q.call(e,t)>-1!==n})}function o(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function s(t){var e={};return ot.each(t.match(gt)||[],function(t,n){e[n]=!0}),e}function r(){X.removeEventListener("DOMContentLoaded",r),t.removeEventListener("load",r),ot.ready()}function a(){this.expando=ot.expando+a.uid++}function l(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(Lt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:wt.test(n)?ot.parseJSON(n):n)}catch(t){}xt.set(t,e,n)}else n=void 0;return n}function h(t,e,n,i){var o,s=1,r=20,a=i?function(){return i.cur()}:function(){return ot.css(t,e,"")},l=a(),h=n&&n[3]||(ot.cssNumber[e]?"":"px"),u=(ot.cssNumber[e]||"px"!==h&&+l)&&Ct.exec(ot.css(t,e));if(u&&u[3]!==h){h=h||u[3],n=n||[],u=+l||1;do{s=s||".5",u/=s,ot.style(t,e,u+h)}while(s!==(s=a()/l)&&1!==s&&--r)}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=h,i.start=u,i.end=o)),o}function u(t,e){var n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&ot.nodeName(t,e)?ot.merge([t],n):n}function c(t,e){for(var n=0,i=t.length;n<i;n++)bt.set(t[n],"globalEval",!e||bt.get(e[n],"globalEval"))}function d(t,e,n,i,o){for(var s,r,a,l,h,d,p=e.createDocumentFragment(),f=[],m=0,g=t.length;m<g;m++)if((s=t[m])||0===s)if("object"===ot.type(s))ot.merge(f,s.nodeType?[s]:s);else if(Mt.test(s)){for(r=r||p.appendChild(e.createElement("div")),a=(St.exec(s)||["",""])[1].toLowerCase(),l=At[a]||At._default,r.innerHTML=l[1]+ot.htmlPrefilter(s)+l[2],d=l[0];d--;)r=r.lastChild;ot.merge(f,r.childNodes),r=p.firstChild,r.textContent=""}else f.push(e.createTextNode(s));for(p.textContent="",m=0;s=f[m++];)if(i&&ot.inArray(s,i)>-1)o&&o.push(s);else if(h=ot.contains(s.ownerDocument,s),r=u(p.appendChild(s),"script"),h&&c(r),n)for(d=0;s=r[d++];)kt.test(s.type||"")&&n.push(s);return p}function p(){return!0}function f(){return!1}function m(){try{return X.activeElement}catch(t){}}function g(t,e,n,i,o,s){var r,a;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(a in e)g(t,a,n,i,e[a],s);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),o===!1)o=f;else if(!o)return t;return 1===s&&(r=o,o=function(t){return ot().off(t),r.apply(this,arguments)},o.guid=r.guid||(r.guid=ot.guid++)),t.each(function(){ot.event.add(this,e,o,i,n)})}function _(t,e){return ot.nodeName(t,"table")&&ot.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function v(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function y(t){var e=zt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function b(t,e){var n,i,o,s,r,a,l,h;if(1===e.nodeType){if(bt.hasData(t)&&(s=bt.access(t),r=bt.set(e,s),h=s.events)){delete r.handle,r.events={};for(o in h)for(n=0,i=h[o].length;n<i;n++)ot.event.add(e,o,h[o][n])}xt.hasData(t)&&(a=xt.access(t),l=ot.extend({},a),xt.set(e,l))}}function x(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Et.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function w(t,e,n,i){e=J.apply([],e);var o,s,r,a,l,h,c=0,p=t.length,f=p-1,m=e[0],g=ot.isFunction(m);if(g||p>1&&"string"==typeof m&&!it.checkClone&&It.test(m))return t.each(function(o){var s=t.eq(o);g&&(e[0]=m.call(this,o,s.html())),w(s,e,n,i)});if(p&&(o=d(e,t[0].ownerDocument,!1,t,i),s=o.firstChild,1===o.childNodes.length&&(o=s),s||i)){for(r=ot.map(u(o,"script"),v),a=r.length;c<p;c++)l=o,c!==f&&(l=ot.clone(l,!0,!0),a&&ot.merge(r,u(l,"script"))),n.call(t[c],l,c);if(a)for(h=r[r.length-1].ownerDocument,ot.map(r,y),c=0;c<a;c++)l=r[c],kt.test(l.type||"")&&!bt.access(l,"globalEval")&&ot.contains(h,l)&&(l.src?ot._evalUrl&&ot._evalUrl(l.src):ot.globalEval(l.textContent.replace(jt,"")))}return t}function L(t,e,n){for(var i,o=e?ot.filter(e,t):t,s=0;null!=(i=o[s]);s++)n||1!==i.nodeType||ot.cleanData(u(i)),i.parentNode&&(n&&ot.contains(i.ownerDocument,i)&&c(u(i,"script")),i.parentNode.removeChild(i));return t}function T(t,e){var n=ot(e.createElement(t)).appendTo(e.body),i=ot.css(n[0],"display");return n.detach(),i}function C(t){var e=X,n=Zt[t];return n||(n=T(t,e),"none"!==n&&n||(Rt=(Rt||ot("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=Rt[0].contentDocument,e.write(),e.close(),n=T(t,e),Rt.detach()),Zt[t]=n),n}function P(t,e,n){var i,o,s,r,a=t.style;return n=n||Ht(t),r=n?n.getPropertyValue(e)||n[e]:void 0,""!==r&&void 0!==r||ot.contains(t.ownerDocument,t)||(r=ot.style(t,e)),n&&!it.pixelMarginRight()&&Ft.test(r)&&$t.test(e)&&(i=a.width,o=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=n.width,a.width=i,a.minWidth=o,a.maxWidth=s),void 0!==r?r+"":r}function D(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function E(t){if(t in Jt)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=Yt.length;n--;)if((t=Yt[n]+e)in Jt)return t}function S(t,e,n){var i=Ct.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function k(t,e,n,i,o){for(var s=n===(i?"border":"content")?4:"width"===e?1:0,r=0;s<4;s+=2)"margin"===n&&(r+=ot.css(t,n+Pt[s],!0,o)),i?("content"===n&&(r-=ot.css(t,"padding"+Pt[s],!0,o)),"margin"!==n&&(r-=ot.css(t,"border"+Pt[s]+"Width",!0,o))):(r+=ot.css(t,"padding"+Pt[s],!0,o),"padding"!==n&&(r+=ot.css(t,"border"+Pt[s]+"Width",!0,o)));return r}function A(t,e,n){var i=!0,o="width"===e?t.offsetWidth:t.offsetHeight,s=Ht(t),r="border-box"===ot.css(t,"boxSizing",!1,s);if(o<=0||null==o){if(o=P(t,e,s),(o<0||null==o)&&(o=t.style[e]),Ft.test(o))return o;i=r&&(it.boxSizingReliable()||o===t.style[e]),o=parseFloat(o)||0}return o+k(t,e,n||(r?"border":"content"),i,s)+"px"}function M(t,e){for(var n,i,o,s=[],r=0,a=t.length;r<a;r++)i=t[r],i.style&&(s[r]=bt.get(i,"olddisplay"),n=i.style.display,e?(s[r]||"none"!==n||(i.style.display=""),""===i.style.display&&Dt(i)&&(s[r]=bt.access(i,"olddisplay",C(i.nodeName)))):(o=Dt(i),"none"===n&&o||bt.set(i,"olddisplay",o?n:ot.css(i,"display"))));for(r=0;r<a;r++)i=t[r],i.style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?s[r]||"":"none"));return t}function B(t,e,n,i,o){return new B.prototype.init(t,e,n,i,o)}function O(){return t.setTimeout(function(){Kt=void 0}),Kt=ot.now()}function N(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)n=Pt[i],o["margin"+n]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function U(t,e,n){for(var i,o=(j.tweeners[e]||[]).concat(j.tweeners["*"]),s=0,r=o.length;s<r;s++)if(i=o[s].call(n,e,t))return i}function I(t,e,n){var i,o,s,r,a,l,h,u=this,c={},d=t.style,p=t.nodeType&&Dt(t),f=bt.get(t,"fxshow");n.queue||(a=ot._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,u.always(function(){u.always(function(){a.unqueued--,ot.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],h=ot.css(t,"display"),"inline"===("none"===h?bt.get(t,"olddisplay")||C(t.nodeName):h)&&"none"===ot.css(t,"float")&&(d.display="inline-block")),n.overflow&&(d.overflow="hidden",u.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in e)if(o=e[i],te.exec(o)){if(delete e[i],s=s||"toggle"===o,o===(p?"hide":"show")){if("show"!==o||!f||void 0===f[i])continue;p=!0}c[i]=f&&f[i]||ot.style(t,i)}else h=void 0;if(ot.isEmptyObject(c))"inline"===("none"===h?C(t.nodeName):h)&&(d.display=h);else{f?"hidden"in f&&(p=f.hidden):f=bt.access(t,"fxshow",{}),s&&(f.hidden=!p),p?ot(t).show():u.done(function(){ot(t).hide()}),u.done(function(){var e;bt.remove(t,"fxshow");for(e in c)ot.style(t,e,c[e])});for(i in c)r=U(p?f[i]:0,i,u),i in f||(f[i]=r.start,p&&(r.end=r.start,r.start="width"===i||"height"===i?1:0))}}function z(t,e){var n,i,o,s,r;for(n in t)if(i=ot.camelCase(n),o=e[i],s=t[n],ot.isArray(s)&&(o=s[1],s=t[n]=s[0]),n!==i&&(t[i]=s,delete t[n]),(r=ot.cssHooks[i])&&"expand"in r){s=r.expand(s),delete t[i];for(n in s)n in t||(t[n]=s[n],e[n]=o)}else e[i]=o}function j(t,e,n){var i,o,s=0,r=j.prefilters.length,a=ot.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=Kt||O(),n=Math.max(0,h.startTime+h.duration-e),i=n/h.duration||0,s=1-i,r=0,l=h.tweens.length;r<l;r++)h.tweens[r].run(s);return a.notifyWith(t,[h,s,n]),s<1&&l?n:(a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:ot.extend({},e),opts:ot.extend(!0,{specialEasing:{},easing:ot.easing._default},n),originalProperties:e,originalOptions:n,startTime:Kt||O(),duration:n.duration,tweens:[],createTween:function(e,n){var i=ot.Tween(t,h.opts,e,n,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(i),i},stop:function(e){var n=0,i=e?h.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)h.tweens[n].run(1);return e?(a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h,e])):a.rejectWith(t,[h,e]),this}}),u=h.props;for(z(u,h.opts.specialEasing);s<r;s++)if(i=j.prefilters[s].call(h,t,u,h.opts))return ot.isFunction(i.stop)&&(ot._queueHooks(h.elem,h.opts.queue).stop=ot.proxy(i.stop,i)),i;return ot.map(u,U,h),ot.isFunction(h.opts.start)&&h.opts.start.call(t,h),ot.fx.timer(ot.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always)}function R(t){return t.getAttribute&&t.getAttribute("class")||""}function Z(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,s=e.toLowerCase().match(gt)||[];if(ot.isFunction(n))for(;i=s[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function $(t,e,n,i){function o(a){var l;return s[a]=!0,ot.each(t[a]||[],function(t,a){var h=a(e,n,i);return"string"!=typeof h||r||s[h]?r?!(l=h):void 0:(e.dataTypes.unshift(h),o(h),!1)}),l}var s={},r=t===me;return o(e.dataTypes[0])||!s["*"]&&o("*")}function F(t,e){var n,i,o=ot.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&ot.extend(!0,t,i),t}function H(t,e,n){for(var i,o,s,r,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)s=l[0];else{for(o in n){if(!l[0]||t.converters[o+" "+l[0]]){s=o;break}r||(r=o)}s=s||r}if(s)return s!==l[0]&&l.unshift(s),n[s]}function W(t,e,n,i){var o,s,r,a,l,h={},u=t.dataTypes.slice();if(u[1])for(r in t.converters)h[r.toLowerCase()]=t.converters[r];for(s=u.shift();s;)if(t.responseFields[s]&&(n[t.responseFields[s]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=s,s=u.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(r=h[l+" "+s]||h["* "+s]))for(o in h)if(a=o.split(" "),a[1]===s&&(r=h[l+" "+a[0]]||h["* "+a[0]])){r===!0?r=h[o]:h[o]!==!0&&(s=a[0],u.unshift(a[1]));break}if(r!==!0)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+l+" to "+s}}}return{state:"success",data:e}}function q(t,e,n,i){var o;if(ot.isArray(e))ot.each(e,function(e,o){n||ve.test(t)?i(t,o):q(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)});else if(n||"object"!==ot.type(e))i(t,e);else for(o in e)q(t+"["+o+"]",e[o],n,i)}function V(t){return ot.isWindow(t)?t:9===t.nodeType&&t.defaultView}var G=[],X=t.document,Y=G.slice,J=G.concat,K=G.push,Q=G.indexOf,tt={},et=tt.toString,nt=tt.hasOwnProperty,it={},ot=function(t,e){return new ot.fn.init(t,e)},st=function(t,e){return e.toUpperCase()};ot.fn=ot.prototype={jquery:"2.2.4",constructor:ot,selector:"",length:0,toArray:function(){return Y.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:Y.call(this)},pushStack:function(t){var e=ot.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return ot.each(this,t)},map:function(t){return this.pushStack(ot.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(Y.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:K,sort:G.sort,splice:G.splice},ot.extend=ot.fn.extend=function(){var t,e,n,i,o,s,r=arguments[0]||{},a=1,l=arguments.length,h=!1;for("boolean"==typeof r&&(h=r,r=arguments[a]||{},a++),"object"==typeof r||ot.isFunction(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=r[e],i=t[e],r!==i&&(h&&i&&(ot.isPlainObject(i)||(o=ot.isArray(i)))?(o?(o=!1,s=n&&ot.isArray(n)?n:[]):s=n&&ot.isPlainObject(n)?n:{},r[e]=ot.extend(h,s,i)):void 0!==i&&(r[e]=i));return r},ot.extend({expando:"jQuery"+("2.2.4"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===ot.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=t&&t.toString();return!ot.isArray(t)&&e-parseFloat(e)+1>=0},isPlainObject:function(t){var e;if("object"!==ot.type(t)||t.nodeType||ot.isWindow(t))return!1;if(t.constructor&&!nt.call(t,"constructor")&&!nt.call(t.constructor.prototype||{},"isPrototypeOf"))return!1;for(e in t);return void 0===e||nt.call(t,e)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?tt[et.call(t)]||"object":typeof t},globalEval:function(t){var e,n=eval;(t=ot.trim(t))&&(1===t.indexOf("use strict")?(e=X.createElement("script"),e.text=t,X.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,st)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var i,o=0;if(n(t))for(i=t.length;o<i&&e.call(t[o],o,t[o])!==!1;o++);else for(o in t)if(e.call(t[o],o,t[o])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(n(Object(t))?ot.merge(i,"string"==typeof t?[t]:t):K.call(i,t)),i},inArray:function(t,e,n){return null==e?-1:Q.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;i++)t[o++]=e[i];return t.length=o,t},grep:function(t,e,n){for(var i=[],o=0,s=t.length,r=!n;o<s;o++)!e(t[o],o)!==r&&i.push(t[o]);return i},map:function(t,e,i){var o,s,r=0,a=[];if(n(t))for(o=t.length;r<o;r++)null!=(s=e(t[r],r,i))&&a.push(s);else for(r in t)null!=(s=e(t[r],r,i))&&a.push(s);return J.apply([],a)},guid:1,proxy:function(t,e){var n,i,o;if("string"==typeof e&&(n=t[e],e=t,t=n),ot.isFunction(t))return i=Y.call(arguments,2),o=function(){return t.apply(e||this,i.concat(Y.call(arguments)))},o.guid=t.guid=t.guid||ot.guid++,o},now:Date.now,support:it}),"function"==typeof Symbol&&(ot.fn[Symbol.iterator]=G[Symbol.iterator]),ot.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){tt["[object "+e+"]"]=e.toLowerCase()});var rt=function(t){function e(t,e,n,i){var o,s,r,a,h,c,d,p,f=e&&e.ownerDocument,m=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==m&&9!==m&&11!==m)return n;if(!i&&((e?e.ownerDocument||e:z)!==k&&S(e),e=e||k,M)){if(11!==m&&(c=mt.exec(t)))if(o=c[1]){if(9===m){if(!(r=e.getElementById(o)))return n;if(r.id===o)return n.push(r),n}else if(f&&(r=f.getElementById(o))&&U(e,r)&&r.id===o)return n.push(r),n}else{if(c[2])return Y.apply(n,e.getElementsByTagName(t)),n;if((o=c[3])&&y.getElementsByClassName&&e.getElementsByClassName)return Y.apply(n,e.getElementsByClassName(o)),n}if(y.qsa&&!F[t+" "]&&(!B||!B.test(t))){if(1!==m)f=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(_t,"\\$&"):e.setAttribute("id",a=I),d=L(t),s=d.length,h=ut.test(a)?"#"+a:"[id='"+a+"']";s--;)d[s]=h+" "+u(d[s]);p=d.join(","),f=gt.test(t)&&l(e.parentNode)||e}if(p)try{return Y.apply(n,f.querySelectorAll(p)),n}catch(t){}finally{a===I&&e.removeAttribute("id")}}}return C(t.replace(st,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>b.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[I]=!0,t}function o(t){var e=k.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function s(t,e){for(var n=t.split("|"),i=n.length;i--;)b.attrHandle[n[i]]=e}function r(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||W)-(~t.sourceIndex||W);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return i(function(e){return e=+e,i(function(n,i){for(var o,s=t([],n.length,e),r=s.length;r--;)n[o=s[r]]&&(n[o]=!(i[o]=n[o]))})})}function l(t){return t&&void 0!==t.getElementsByTagName&&t}function h(){}function u(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function c(t,e,n){var i=e.dir,o=n&&"parentNode"===i,s=R++;return e.first?function(e,n,s){for(;e=e[i];)if(1===e.nodeType||o)return t(e,n,s)}:function(e,n,r){var a,l,h,u=[j,s];if(r){for(;e=e[i];)if((1===e.nodeType||o)&&t(e,n,r))return!0}else for(;e=e[i];)if(1===e.nodeType||o){if(h=e[I]||(e[I]={}),l=h[e.uniqueID]||(h[e.uniqueID]={}),(a=l[i])&&a[0]===j&&a[1]===s)return u[2]=a[2];if(l[i]=u,u[2]=t(e,n,r))return!0}}}function d(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function p(t,n,i){for(var o=0,s=n.length;o<s;o++)e(t,n[o],i);return i}function f(t,e,n,i,o){for(var s,r=[],a=0,l=t.length,h=null!=e;a<l;a++)(s=t[a])&&(n&&!n(s,i,o)||(r.push(s),h&&e.push(a)));return r}function m(t,e,n,o,s,r){return o&&!o[I]&&(o=m(o)),s&&!s[I]&&(s=m(s,r)),i(function(i,r,a,l){var h,u,c,d=[],m=[],g=r.length,_=i||p(e||"*",a.nodeType?[a]:a,[]),v=!t||!i&&e?_:f(_,d,t,a,l),y=n?s||(i?t:g||o)?[]:r:v;if(n&&n(v,y,a,l),o)for(h=f(y,m),o(h,[],a,l),u=h.length;u--;)(c=h[u])&&(y[m[u]]=!(v[m[u]]=c));if(i){if(s||t){if(s){for(h=[],u=y.length;u--;)(c=y[u])&&h.push(v[u]=c);s(null,y=[],h,l)}for(u=y.length;u--;)(c=y[u])&&(h=s?K(i,c):d[u])>-1&&(i[h]=!(r[h]=c))}}else y=f(y===r?y.splice(g,y.length):y),s?s(null,r,y,l):Y.apply(r,y)})}function g(t){for(var e,n,i,o=t.length,s=b.relative[t[0].type],r=s||b.relative[" "],a=s?1:0,l=c(function(t){return t===e},r,!0),h=c(function(t){return K(e,t)>-1},r,!0),p=[function(t,n,i){var o=!s&&(i||n!==P)||((e=n).nodeType?l(t,n,i):h(t,n,i));return e=null,o}];a<o;a++)if(n=b.relative[t[a].type])p=[c(d(p),n)];else{if(n=b.filter[t[a].type].apply(null,t[a].matches),n[I]){for(i=++a;i<o&&!b.relative[t[i].type];i++);return m(a>1&&d(p),a>1&&u(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(st,"$1"),n,a<i&&g(t.slice(a,i)),i<o&&g(t=t.slice(i)),i<o&&u(t))}p.push(n)}return d(p)}function _(t,n){var o=n.length>0,s=t.length>0,r=function(i,r,a,l,h){var u,c,d,p=0,m="0",g=i&&[],_=[],v=P,y=i||s&&b.find.TAG("*",h),x=j+=null==v?1:Math.random()||.1,w=y.length;for(h&&(P=r===k||r||h);m!==w&&null!=(u=y[m]);m++){if(s&&u){for(c=0,r||u.ownerDocument===k||(S(u),a=!M);d=t[c++];)if(d(u,r||k,a)){l.push(u);break}h&&(j=x)}o&&((u=!d&&u)&&p--,i&&g.push(u))}if(p+=m,o&&m!==p){for(c=0;d=n[c++];)d(g,_,r,a);if(i){if(p>0)for(;m--;)g[m]||_[m]||(_[m]=G.call(l));_=f(_)}Y.apply(l,_),h&&!i&&_.length>0&&p+n.length>1&&e.uniqueSort(l)}return h&&(j=x,P=v),g};return o?i(r):r}var v,y,b,x,w,L,T,C,P,D,E,S,k,A,M,B,O,N,U,I="sizzle"+1*new Date,z=t.document,j=0,R=0,Z=n(),$=n(),F=n(),H=function(t,e){return t===e&&(E=!0),0},W=1<<31,q={}.hasOwnProperty,V=[],G=V.pop,X=V.push,Y=V.push,J=V.slice,K=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},Q="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",tt="[\\x20\\t\\r\\n\\f]",et="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt="\\["+tt+"*("+et+")(?:"+tt+"*([*^$|!~]?=)"+tt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+et+"))|)"+tt+"*\\]",it=":("+et+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+nt+")*)|.*)\\)|)",ot=new RegExp(tt+"+","g"),st=new RegExp("^"+tt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+tt+"+$","g"),rt=new RegExp("^"+tt+"*,"+tt+"*"),at=new RegExp("^"+tt+"*([>+~]|"+tt+")"+tt+"*"),lt=new RegExp("="+tt+"*([^\\]'\"]*?)"+tt+"*\\]","g"),ht=new RegExp(it),ut=new RegExp("^"+et+"$"),ct={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et+"|[*])"),ATTR:new RegExp("^"+nt),PSEUDO:new RegExp("^"+it),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+tt+"*(even|odd|(([+-]|)(\\d*)n|)"+tt+"*(?:([+-]|)"+tt+"*(\\d+)|))"+tt+"*\\)|)","i"),bool:new RegExp("^(?:"+Q+")$","i"),needsContext:new RegExp("^"+tt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+tt+"*((?:-\\d)?\\d*)"+tt+"*\\)|)(?=[^-]|$)","i")},dt=/^(?:input|select|textarea|button)$/i,pt=/^h\d$/i,ft=/^[^{]+\{\s*\[native \w/,mt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,_t=/'|\\/g,vt=new RegExp("\\\\([\\da-f]{1,6}"+tt+"?|("+tt+")|.)","ig"),yt=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},bt=function(){S()};try{Y.apply(V=J.call(z.childNodes),z.childNodes),V[z.childNodes.length].nodeType}catch(t){Y={apply:V.length?function(t,e){X.apply(t,J.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}y=e.support={},w=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},S=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:z;return i!==k&&9===i.nodeType&&i.documentElement?(k=i,A=k.documentElement,M=!w(k),(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",bt,!1):n.attachEvent&&n.attachEvent("onunload",bt)),y.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),y.getElementsByTagName=o(function(t){return t.appendChild(k.createComment("")),!t.getElementsByTagName("*").length}),y.getElementsByClassName=ft.test(k.getElementsByClassName),y.getById=o(function(t){return A.appendChild(t).id=I,!k.getElementsByName||!k.getElementsByName(I).length}),y.getById?(b.find.ID=function(t,e){if(void 0!==e.getElementById&&M){var n=e.getElementById(t);return n?[n]:[]}},b.filter.ID=function(t){var e=t.replace(vt,yt);return function(t){return t.getAttribute("id")===e}}):(delete b.find.ID,b.filter.ID=function(t){var e=t.replace(vt,yt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),b.find.TAG=y.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):y.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,s=e.getElementsByTagName(t);if("*"===t){for(;n=s[o++];)1===n.nodeType&&i.push(n);return i}return s},b.find.CLASS=y.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&M)return e.getElementsByClassName(t)},O=[],B=[],(y.qsa=ft.test(k.querySelectorAll))&&(o(function(t){A.appendChild(t).innerHTML="<a id='"+I+"'></a><select id='"+I+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&B.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||B.push("\\["+tt+"*(?:value|"+Q+")"),t.querySelectorAll("[id~="+I+"-]").length||B.push("~="),t.querySelectorAll(":checked").length||B.push(":checked"),t.querySelectorAll("a#"+I+"+*").length||B.push(".#.+[+~]")}),o(function(t){var e=k.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&B.push("name"+tt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||B.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),B.push(",.*:")})),(y.matchesSelector=ft.test(N=A.matches||A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&o(function(t){y.disconnectedMatch=N.call(t,"div"),N.call(t,"[s!='']:x"),O.push("!=",it)}),B=B.length&&new RegExp(B.join("|")),O=O.length&&new RegExp(O.join("|")),e=ft.test(A.compareDocumentPosition),U=e||ft.test(A.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},H=e?function(t,e){if(t===e)return E=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!y.sortDetached&&e.compareDocumentPosition(t)===n?t===k||t.ownerDocument===z&&U(z,t)?-1:e===k||e.ownerDocument===z&&U(z,e)?1:D?K(D,t)-K(D,e):0:4&n?-1:1)}:function(t,e){if(t===e)return E=!0,0;var n,i=0,o=t.parentNode,s=e.parentNode,a=[t],l=[e];if(!o||!s)return t===k?-1:e===k?1:o?-1:s?1:D?K(D,t)-K(D,e):0;if(o===s)return r(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?r(a[i],l[i]):a[i]===z?-1:l[i]===z?1:0},k):k},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==k&&S(t),n=n.replace(lt,"='$1']"),y.matchesSelector&&M&&!F[n+" "]&&(!O||!O.test(n))&&(!B||!B.test(n)))try{var i=N.call(t,n);if(i||y.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(n,k,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==k&&S(t),U(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==k&&S(t);var n=b.attrHandle[e.toLowerCase()],i=n&&q.call(b.attrHandle,e.toLowerCase())?n(t,e,!M):void 0;return void 0!==i?i:y.attributes||!M?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,o=0;if(E=!y.detectDuplicates,D=!y.sortStable&&t.slice(0),t.sort(H),E){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)t.splice(n[i],1)}return D=null,t},x=e.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=x(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=x(e);return n},b=e.selectors={cacheLength:50,createPseudo:i,match:ct,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(vt,yt),t[3]=(t[3]||t[4]||t[5]||"").replace(vt,yt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ct.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ht.test(n)&&(e=L(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(vt,yt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=Z[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&Z(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(o){var s=e.attr(o,t);return null==s?"!="===n:!n||(s+="","="===n?s===i:"!="===n?s!==i:"^="===n?i&&0===s.indexOf(i):"*="===n?i&&s.indexOf(i)>-1:"$="===n?i&&s.slice(-i.length)===i:"~="===n?(" "+s.replace(ot," ")+" ").indexOf(i)>-1:"|="===n&&(s===i||s.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,o){var s="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var h,u,c,d,p,f,m=s!==r?"nextSibling":"previousSibling",g=e.parentNode,_=a&&e.nodeName.toLowerCase(),v=!l&&!a,y=!1;if(g){if(s){for(;m;){for(d=e;d=d[m];)if(a?d.nodeName.toLowerCase()===_:1===d.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?g.firstChild:g.lastChild],r&&v){for(d=g,c=d[I]||(d[I]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),h=u[t]||[],p=h[0]===j&&h[1],y=p&&h[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(y=p=0)||f.pop();)if(1===d.nodeType&&++y&&d===e){u[t]=[j,p,y];break}}else if(v&&(d=e,c=d[I]||(d[I]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),h=u[t]||[],p=h[0]===j&&h[1],y=p),y===!1)for(;(d=++p&&d&&d[m]||(y=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==_:1!==d.nodeType)||!++y||(v&&(c=d[I]||(d[I]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),u[t]=[j,y]),d!==e)););return(y-=o)===i||y%i==0&&y/i>=0}}},PSEUDO:function(t,n){var o,s=b.pseudos[t]||b.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return s[I]?s(n):s.length>1?(o=[t,t,"",n],b.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,o=s(t,n),r=o.length;r--;)i=K(t,o[r]),t[i]=!(e[i]=o[r])}):function(t){return s(t,0,o)}):s}},pseudos:{not:i(function(t){var e=[],n=[],o=T(t.replace(st,"$1"));return o[I]?i(function(t,e,n,i){for(var s,r=o(t,null,i,[]),a=t.length;a--;)(s=r[a])&&(t[a]=!(e[a]=s))}):function(t,i,s){return e[0]=t,o(e,null,s,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(vt,yt),function(e){return(e.textContent||e.innerText||x(e)).indexOf(t)>-1}}),lang:i(function(t){return ut.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(vt,yt).toLowerCase(),function(e){var n;do{if(n=M?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===A},focus:function(t){return t===k.activeElement&&(!k.hasFocus||k.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!b.pseudos.empty(t)},header:function(t){return pt.test(t.nodeName)},input:function(t){return dt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:a(function(){return[0]}),last:a(function(t,e){return[e-1]}),eq:a(function(t,e,n){return[n<0?n+e:n]}),even:a(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:a(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:a(function(t,e,n){for(var i=n<0?n+e:n;--i>=0;)t.push(i);return t}),gt:a(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}},b.pseudos.nth=b.pseudos.eq;for(v in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[v]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(v);for(v in{submit:!0,reset:!0})b.pseudos[v]=function(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}(v);return h.prototype=b.filters=b.pseudos,b.setFilters=new h,L=e.tokenize=function(t,n){
var i,o,s,r,a,l,h,u=$[t+" "];if(u)return n?0:u.slice(0);for(a=t,l=[],h=b.preFilter;a;){i&&!(o=rt.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(s=[])),i=!1,(o=at.exec(a))&&(i=o.shift(),s.push({value:i,type:o[0].replace(st," ")}),a=a.slice(i.length));for(r in b.filter)!(o=ct[r].exec(a))||h[r]&&!(o=h[r](o))||(i=o.shift(),s.push({value:i,type:r,matches:o}),a=a.slice(i.length));if(!i)break}return n?a.length:a?e.error(t):$(t,l).slice(0)},T=e.compile=function(t,e){var n,i=[],o=[],s=F[t+" "];if(!s){for(e||(e=L(t)),n=e.length;n--;)s=g(e[n]),s[I]?i.push(s):o.push(s);s=F(t,_(o,i)),s.selector=t}return s},C=e.select=function(t,e,n,i){var o,s,r,a,h,c="function"==typeof t&&t,d=!i&&L(t=c.selector||t);if(n=n||[],1===d.length){if(s=d[0]=d[0].slice(0),s.length>2&&"ID"===(r=s[0]).type&&y.getById&&9===e.nodeType&&M&&b.relative[s[1].type]){if(!(e=(b.find.ID(r.matches[0].replace(vt,yt),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(s.shift().value.length)}for(o=ct.needsContext.test(t)?0:s.length;o--&&(r=s[o],!b.relative[a=r.type]);)if((h=b.find[a])&&(i=h(r.matches[0].replace(vt,yt),gt.test(s[0].type)&&l(e.parentNode)||e))){if(s.splice(o,1),!(t=i.length&&u(s)))return Y.apply(n,i),n;break}}return(c||T(t,d))(i,e,!M,n,!e||gt.test(t)&&l(e.parentNode)||e),n},y.sortStable=I.split("").sort(H).join("")===I,y.detectDuplicates=!!E,S(),y.sortDetached=o(function(t){return 1&t.compareDocumentPosition(k.createElement("div"))}),o(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||s("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),y.attributes&&o(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||s("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||s(Q,function(t,e,n){var i;if(!n)return t[e]===!0?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);ot.find=rt,ot.expr=rt.selectors,ot.expr[":"]=ot.expr.pseudos,ot.uniqueSort=ot.unique=rt.uniqueSort,ot.text=rt.getText,ot.isXMLDoc=rt.isXML,ot.contains=rt.contains;var at=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&ot(t).is(n))break;i.push(t)}return i},lt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},ht=ot.expr.match.needsContext,ut=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ct=/^.[^:#\[\.,]*$/;ot.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?ot.find.matchesSelector(i,t)?[i]:[]:ot.find.matches(t,ot.grep(e,function(t){return 1===t.nodeType}))},ot.fn.extend({find:function(t){var e,n=this.length,i=[],o=this;if("string"!=typeof t)return this.pushStack(ot(t).filter(function(){for(e=0;e<n;e++)if(ot.contains(o[e],this))return!0}));for(e=0;e<n;e++)ot.find(t,o[e],i);return i=this.pushStack(n>1?ot.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&ht.test(t)?ot(t):t||[],!1).length}});var dt,pt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(ot.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||dt,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:pt.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof ot?e[0]:e,ot.merge(this,ot.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:X,!0)),ut.test(i[1])&&ot.isPlainObject(e))for(i in e)ot.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return o=X.getElementById(i[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=X,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):ot.isFunction(t)?void 0!==n.ready?n.ready(t):t(ot):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),ot.makeArray(t,this))}).prototype=ot.fn,dt=ot(X);var ft=/^(?:parents|prev(?:Until|All))/,mt={children:!0,contents:!0,next:!0,prev:!0};ot.fn.extend({has:function(t){var e=ot(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(ot.contains(this,e[t]))return!0})},closest:function(t,e){for(var n,i=0,o=this.length,s=[],r=ht.test(t)||"string"!=typeof t?ot(t,e||this.context):0;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(r?r.index(n)>-1:1===n.nodeType&&ot.find.matchesSelector(n,t))){s.push(n);break}return this.pushStack(s.length>1?ot.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?Q.call(ot(t),this[0]):Q.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(ot.uniqueSort(ot.merge(this.get(),ot(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ot.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return at(t,"parentNode")},parentsUntil:function(t,e,n){return at(t,"parentNode",n)},next:function(t){return o(t,"nextSibling")},prev:function(t){return o(t,"previousSibling")},nextAll:function(t){return at(t,"nextSibling")},prevAll:function(t){return at(t,"previousSibling")},nextUntil:function(t,e,n){return at(t,"nextSibling",n)},prevUntil:function(t,e,n){return at(t,"previousSibling",n)},siblings:function(t){return lt((t.parentNode||{}).firstChild,t)},children:function(t){return lt(t.firstChild)},contents:function(t){return t.contentDocument||ot.merge([],t.childNodes)}},function(t,e){ot.fn[t]=function(n,i){var o=ot.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=ot.filter(i,o)),this.length>1&&(mt[t]||ot.uniqueSort(o),ft.test(t)&&o.reverse()),this.pushStack(o)}});var gt=/\S+/g;ot.Callbacks=function(t){t="string"==typeof t?s(t):ot.extend({},t);var e,n,i,o,r=[],a=[],l=-1,h=function(){for(o=t.once,i=e=!0;a.length;l=-1)for(n=a.shift();++l<r.length;)r[l].apply(n[0],n[1])===!1&&t.stopOnFalse&&(l=r.length,n=!1);t.memory||(n=!1),e=!1,o&&(r=n?[]:"")},u={add:function(){return r&&(n&&!e&&(l=r.length-1,a.push(n)),function e(n){ot.each(n,function(n,i){ot.isFunction(i)?t.unique&&u.has(i)||r.push(i):i&&i.length&&"string"!==ot.type(i)&&e(i)})}(arguments),n&&!e&&h()),this},remove:function(){return ot.each(arguments,function(t,e){for(var n;(n=ot.inArray(e,r,n))>-1;)r.splice(n,1),n<=l&&l--}),this},has:function(t){return t?ot.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=a=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=a=[],n||(r=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=n||[],n=[t,n.slice?n.slice():n],a.push(n),e||h()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},ot.extend({Deferred:function(t){var e=[["resolve","done",ot.Callbacks("once memory"),"resolved"],["reject","fail",ot.Callbacks("once memory"),"rejected"],["notify","progress",ot.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return ot.Deferred(function(n){ot.each(e,function(e,s){var r=ot.isFunction(t[e])&&t[e];o[s[1]](function(){var t=r&&r.apply(this,arguments);t&&ot.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[s[0]+"With"](this===i?n.promise():this,r?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?ot.extend(t,i):i}},o={};return i.pipe=i.then,ot.each(e,function(t,s){var r=s[2],a=s[3];i[s[1]]=r.add,a&&r.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),o[s[0]]=function(){return o[s[0]+"With"](this===o?i:this,arguments),this},o[s[0]+"With"]=r.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e,n,i,o=0,s=Y.call(arguments),r=s.length,a=1!==r||t&&ot.isFunction(t.promise)?r:0,l=1===a?t:ot.Deferred(),h=function(t,n,i){return function(o){n[t]=this,i[t]=arguments.length>1?Y.call(arguments):o,i===e?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(r>1)for(e=new Array(r),n=new Array(r),i=new Array(r);o<r;o++)s[o]&&ot.isFunction(s[o].promise)?s[o].promise().progress(h(o,n,e)).done(h(o,i,s)).fail(l.reject):--a;return a||l.resolveWith(i,s),l.promise()}});var _t;ot.fn.ready=function(t){return ot.ready.promise().done(t),this},ot.extend({isReady:!1,readyWait:1,holdReady:function(t){t?ot.readyWait++:ot.ready(!0)},ready:function(t){(t===!0?--ot.readyWait:ot.isReady)||(ot.isReady=!0,t!==!0&&--ot.readyWait>0||(_t.resolveWith(X,[ot]),ot.fn.triggerHandler&&(ot(X).triggerHandler("ready"),ot(X).off("ready"))))}}),ot.ready.promise=function(e){return _t||(_t=ot.Deferred(),"complete"===X.readyState||"loading"!==X.readyState&&!X.documentElement.doScroll?t.setTimeout(ot.ready):(X.addEventListener("DOMContentLoaded",r),t.addEventListener("load",r))),_t.promise(e)},ot.ready.promise();var vt=function(t,e,n,i,o,s,r){var a=0,l=t.length,h=null==n;if("object"===ot.type(n)){o=!0;for(a in n)vt(t,e,a,n[a],!0,s,r)}else if(void 0!==i&&(o=!0,ot.isFunction(i)||(r=!0),h&&(r?(e.call(t,i),e=null):(h=e,e=function(t,e,n){return h.call(ot(t),n)})),e))for(;a<l;a++)e(t[a],n,r?i:i.call(t[a],a,e(t[a],n)));return o?t:h?e.call(t):l?e(t[0],n):s},yt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};a.uid=1,a.prototype={register:function(t,e){var n=e||{};return t.nodeType?t[this.expando]=n:Object.defineProperty(t,this.expando,{value:n,writable:!0,configurable:!0}),t[this.expando]},cache:function(t){if(!yt(t))return{};var e=t[this.expando];return e||(e={},yt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,o=this.cache(t);if("string"==typeof e)o[e]=n;else for(i in e)o[i]=e[i];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][e]},access:function(t,e,n){var i;return void 0===e||e&&"string"==typeof e&&void 0===n?(i=this.get(t,e),void 0!==i?i:this.get(t,ot.camelCase(e))):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i,o,s=t[this.expando];if(void 0!==s){if(void 0===e)this.register(t);else{ot.isArray(e)?i=e.concat(e.map(ot.camelCase)):(o=ot.camelCase(e),e in s?i=[e,o]:(i=o,i=i in s?[i]:i.match(gt)||[])),n=i.length;for(;n--;)delete s[i[n]]}(void 0===e||ot.isEmptyObject(s))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!ot.isEmptyObject(e)}};var bt=new a,xt=new a,wt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Lt=/[A-Z]/g;ot.extend({hasData:function(t){return xt.hasData(t)||bt.hasData(t)},data:function(t,e,n){return xt.access(t,e,n)},removeData:function(t,e){xt.remove(t,e)},_data:function(t,e,n){return bt.access(t,e,n)},_removeData:function(t,e){bt.remove(t,e)}}),ot.fn.extend({data:function(t,e){var n,i,o,s=this[0],r=s&&s.attributes;if(void 0===t){if(this.length&&(o=xt.get(s),1===s.nodeType&&!bt.get(s,"hasDataAttrs"))){for(n=r.length;n--;)r[n]&&(i=r[n].name,0===i.indexOf("data-")&&(i=ot.camelCase(i.slice(5)),l(s,i,o[i])));bt.set(s,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each(function(){xt.set(this,t)}):vt(this,function(e){var n,i;if(s&&void 0===e){if(void 0!==(n=xt.get(s,t)||xt.get(s,t.replace(Lt,"-$&").toLowerCase())))return n;if(i=ot.camelCase(t),void 0!==(n=xt.get(s,i)))return n;if(void 0!==(n=l(s,i,void 0)))return n}else i=ot.camelCase(t),this.each(function(){var n=xt.get(this,i);xt.set(this,i,e),t.indexOf("-")>-1&&void 0!==n&&xt.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){xt.remove(this,t)})}}),ot.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=bt.get(t,e),n&&(!i||ot.isArray(n)?i=bt.access(t,e,ot.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=ot.queue(t,e),i=n.length,o=n.shift(),s=ot._queueHooks(t,e),r=function(){ot.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete s.stop,o.call(t,r,s)),!i&&s&&s.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return bt.get(t,n)||bt.access(t,n,{empty:ot.Callbacks("once memory").add(function(){bt.remove(t,[e+"queue",n])})})}}),ot.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?ot.queue(this[0],t):void 0===e?this:this.each(function(){var n=ot.queue(this,t,e);ot._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&ot.dequeue(this,t)})},dequeue:function(t){return this.each(function(){ot.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=ot.Deferred(),s=this,r=this.length,a=function(){--i||o.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";r--;)(n=bt.get(s[r],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var Tt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ct=new RegExp("^(?:([+-])=|)("+Tt+")([a-z%]*)$","i"),Pt=["Top","Right","Bottom","Left"],Dt=function(t,e){return t=e||t,"none"===ot.css(t,"display")||!ot.contains(t.ownerDocument,t)},Et=/^(?:checkbox|radio)$/i,St=/<([\w:-]+)/,kt=/^$|\/(?:java|ecma)script/i,At={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,"",""]};At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td;var Mt=/<|&#?\w+;/;!function(){var t=X.createDocumentFragment(),e=t.appendChild(X.createElement("div")),n=X.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),it.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",it.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Bt=/^key/,Ot=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Nt=/^([^.]*)(?:\.(.+)|)/;ot.event={global:{},add:function(t,e,n,i,o){var s,r,a,l,h,u,c,d,p,f,m,g=bt.get(t);if(g)for(n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=ot.guid++),(l=g.events)||(l=g.events={}),(r=g.handle)||(r=g.handle=function(e){return void 0!==ot&&ot.event.triggered!==e.type?ot.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(gt)||[""],h=e.length;h--;)a=Nt.exec(e[h])||[],p=m=a[1],f=(a[2]||"").split(".").sort(),p&&(c=ot.event.special[p]||{},p=(o?c.delegateType:c.bindType)||p,c=ot.event.special[p]||{},u=ot.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&ot.expr.match.needsContext.test(o),namespace:f.join(".")},s),(d=l[p])||(d=l[p]=[],d.delegateCount=0,c.setup&&c.setup.call(t,i,f,r)!==!1||t.addEventListener&&t.addEventListener(p,r)),c.add&&(c.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,u):d.push(u),ot.event.global[p]=!0)},remove:function(t,e,n,i,o){var s,r,a,l,h,u,c,d,p,f,m,g=bt.hasData(t)&&bt.get(t);if(g&&(l=g.events)){for(e=(e||"").match(gt)||[""],h=e.length;h--;)if(a=Nt.exec(e[h])||[],p=m=a[1],f=(a[2]||"").split(".").sort(),p){for(c=ot.event.special[p]||{},p=(i?c.delegateType:c.bindType)||p,d=l[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=s=d.length;s--;)u=d[s],!o&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(d.splice(s,1),u.selector&&d.delegateCount--,c.remove&&c.remove.call(t,u));r&&!d.length&&(c.teardown&&c.teardown.call(t,f,g.handle)!==!1||ot.removeEvent(t,p,g.handle),delete l[p])}else for(p in l)ot.event.remove(t,p+e[h],n,i,!0);ot.isEmptyObject(l)&&bt.remove(t,"handle events")}},dispatch:function(t){t=ot.event.fix(t);var e,n,i,o,s,r=[],a=Y.call(arguments),l=(bt.get(this,"events")||{})[t.type]||[],h=ot.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!h.preDispatch||h.preDispatch.call(this,t)!==!1){for(r=ot.event.handlers.call(this,t,l),e=0;(o=r[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,n=0;(s=o.handlers[n++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(s.namespace)||(t.handleObj=s,t.data=s.data,void 0!==(i=((ot.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,a))&&(t.result=i)===!1&&(t.preventDefault(),t.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,o,s,r=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(i=[],n=0;n<a;n++)s=e[n],o=s.selector+" ",void 0===i[o]&&(i[o]=s.needsContext?ot(o,this).index(l)>-1:ot.find(o,this,null,[l]).length),i[o]&&i.push(s);i.length&&r.push({elem:l,handlers:i})}return a<e.length&&r.push({elem:this,handlers:e.slice(a)}),r},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,o,s=e.button;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||X,i=n.documentElement,o=n.body,t.pageX=e.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),t.pageY=e.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),t.which||void 0===s||(t.which=1&s?1:2&s?3:4&s?2:0),t}},fix:function(t){if(t[ot.expando])return t;var e,n,i,o=t.type,s=t,r=this.fixHooks[o];for(r||(this.fixHooks[o]=r=Ot.test(o)?this.mouseHooks:Bt.test(o)?this.keyHooks:{}),i=r.props?this.props.concat(r.props):this.props,t=new ot.Event(s),e=i.length;e--;)n=i[e],t[n]=s[n];return t.target||(t.target=X),3===t.target.nodeType&&(t.target=t.target.parentNode),r.filter?r.filter(t,s):t},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==m()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===m()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&ot.nodeName(this,"input"))return this.click(),!1},_default:function(t){return ot.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},ot.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},ot.Event=function(t,e){if(!(this instanceof ot.Event))return new ot.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?p:f):this.type=t,e&&ot.extend(this,e),this.timeStamp=t&&t.timeStamp||ot.now(),this[ot.expando]=!0},ot.Event.prototype={constructor:ot.Event,isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=p,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=p,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=p,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},ot.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){ot.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,o=t.relatedTarget,s=t.handleObj;return o&&(o===i||ot.contains(i,o))||(t.type=s.origType,n=s.handler.apply(this,arguments),t.type=e),n}}}),ot.fn.extend({on:function(t,e,n,i){return g(this,t,e,n,i)},one:function(t,e,n,i){return g(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,ot(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return e!==!1&&"function"!=typeof e||(n=e,e=void 0),n===!1&&(n=f),this.each(function(){ot.event.remove(this,t,n,e)})}});var Ut=/<script|<style|<link/i,It=/checked\s*(?:[^=]|=\s*.checked.)/i,zt=/^true\/(.*)/,jt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;ot.extend({htmlPrefilter:function(t){return t.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,"<$1></$2>")},clone:function(t,e,n){var i,o,s,r,a=t.cloneNode(!0),l=ot.contains(t.ownerDocument,t);if(!(it.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ot.isXMLDoc(t)))for(r=u(a),s=u(t),i=0,o=s.length;i<o;i++)x(s[i],r[i]);if(e)if(n)for(s=s||u(t),r=r||u(a),i=0,o=s.length;i<o;i++)b(s[i],r[i]);else b(t,a);return r=u(a,"script"),r.length>0&&c(r,!l&&u(t,"script")),a},cleanData:function(t){for(var e,n,i,o=ot.event.special,s=0;void 0!==(n=t[s]);s++)if(yt(n)){if(e=n[bt.expando]){if(e.events)for(i in e.events)o[i]?ot.event.remove(n,i):ot.removeEvent(n,i,e.handle);n[bt.expando]=void 0}n[xt.expando]&&(n[xt.expando]=void 0)}}}),ot.fn.extend({domManip:w,detach:function(t){return L(this,t,!0)},remove:function(t){return L(this,t)},text:function(t){return vt(this,function(t){return void 0===t?ot.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return w(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){_(this,t).appendChild(t)}})},prepend:function(){return w(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=_(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return w(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return w(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(ot.cleanData(u(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return ot.clone(this,t,e)})},html:function(t){return vt(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ut.test(t)&&!At[(St.exec(t)||["",""])[1].toLowerCase()]){t=ot.htmlPrefilter(t);try{for(;n<i;n++)e=this[n]||{},1===e.nodeType&&(ot.cleanData(u(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return w(this,arguments,function(e){var n=this.parentNode;ot.inArray(this,t)<0&&(ot.cleanData(u(this)),n&&n.replaceChild(e,this))},t)}}),ot.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){ot.fn[t]=function(t){for(var n,i=[],o=ot(t),s=o.length-1,r=0;r<=s;r++)n=r===s?this:this.clone(!0),ot(o[r])[e](n),K.apply(i,n.get());return this.pushStack(i)}});var Rt,Zt={HTML:"block",BODY:"block"},$t=/^margin/,Ft=new RegExp("^("+Tt+")(?!px)[a-z%]+$","i"),Ht=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Wt=function(t,e,n,i){var o,s,r={};for(s in e)r[s]=t.style[s],t.style[s]=e[s];o=n.apply(t,i||[]);for(s in e)t.style[s]=r[s];return o},qt=X.documentElement;!function(){function e(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",qt.appendChild(r);var e=t.getComputedStyle(a);n="1%"!==e.top,s="2px"===e.marginLeft,i="4px"===e.width,a.style.marginRight="50%",o="4px"===e.marginRight,qt.removeChild(r)}var n,i,o,s,r=X.createElement("div"),a=X.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",it.clearCloneStyle="content-box"===a.style.backgroundClip,r.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",r.appendChild(a),ot.extend(it,{pixelPosition:function(){return e(),n},boxSizingReliable:function(){return null==i&&e(),i},pixelMarginRight:function(){return null==i&&e(),o},reliableMarginLeft:function(){return null==i&&e(),s},reliableMarginRight:function(){var e,n=a.appendChild(X.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",qt.appendChild(r),e=!parseFloat(t.getComputedStyle(n).marginRight),qt.removeChild(r),a.removeChild(n),e}}))}();var Vt=/^(none|table(?!-c[ea]).+)/,Gt={position:"absolute",visibility:"hidden",display:"block"},Xt={letterSpacing:"0",fontWeight:"400"},Yt=["Webkit","O","Moz","ms"],Jt=X.createElement("div").style;ot.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=P(t,"opacity");return""===n?"1":n}}}},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(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,r,a=ot.camelCase(e),l=t.style;if(e=ot.cssProps[a]||(ot.cssProps[a]=E(a)||a),r=ot.cssHooks[e]||ot.cssHooks[a],void 0===n)return r&&"get"in r&&void 0!==(o=r.get(t,!1,i))?o:l[e];s=typeof n,"string"===s&&(o=Ct.exec(n))&&o[1]&&(n=h(t,e,o),s="number"),null!=n&&n===n&&("number"===s&&(n+=o&&o[3]||(ot.cssNumber[a]?"":"px")),it.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),r&&"set"in r&&void 0===(n=r.set(t,n,i))||(l[e]=n))}},css:function(t,e,n,i){var o,s,r,a=ot.camelCase(e);return e=ot.cssProps[a]||(ot.cssProps[a]=E(a)||a),r=ot.cssHooks[e]||ot.cssHooks[a],r&&"get"in r&&(o=r.get(t,!0,n)),void 0===o&&(o=P(t,e,i)),"normal"===o&&e in Xt&&(o=Xt[e]),""===n||n?(s=parseFloat(o),n===!0||isFinite(s)?s||0:o):o}}),ot.each(["height","width"],function(t,e){ot.cssHooks[e]={get:function(t,n,i){if(n)return Vt.test(ot.css(t,"display"))&&0===t.offsetWidth?Wt(t,Gt,function(){return A(t,e,i)}):A(t,e,i)},set:function(t,n,i){var o,s=i&&Ht(t),r=i&&k(t,e,i,"border-box"===ot.css(t,"boxSizing",!1,s),s);return r&&(o=Ct.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=ot.css(t,e)),S(t,n,r)}}}),ot.cssHooks.marginLeft=D(it.reliableMarginLeft,function(t,e){if(e)return(parseFloat(P(t,"marginLeft"))||t.getBoundingClientRect().left-Wt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),ot.cssHooks.marginRight=D(it.reliableMarginRight,function(t,e){if(e)return Wt(t,{display:"inline-block"},P,[t,"marginRight"])}),ot.each({margin:"",padding:"",border:"Width"},function(t,e){ot.cssHooks[t+e]={expand:function(n){for(var i=0,o={},s="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+Pt[i]+e]=s[i]||s[i-2]||s[0];return o}},$t.test(t)||(ot.cssHooks[t+e].set=S)}),ot.fn.extend({css:function(t,e){return vt(this,function(t,e,n){var i,o,s={},r=0;if(ot.isArray(e)){for(i=Ht(t),o=e.length;r<o;r++)s[e[r]]=ot.css(t,e[r],!1,i);return s}return void 0!==n?ot.style(t,e,n):ot.css(t,e)},t,e,arguments.length>1)},show:function(){return M(this,!0)},hide:function(){return M(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Dt(this)?ot(this).show():ot(this).hide()})}}),ot.Tween=B,B.prototype={constructor:B,init:function(t,e,n,i,o,s){this.elem=t,this.prop=n,this.easing=o||ot.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=s||(ot.cssNumber[n]?"":"px")},cur:function(){var t=B.propHooks[this.prop];return t&&t.get?t.get(this):B.propHooks._default.get(this)},run:function(t){var e,n=B.propHooks[this.prop];return this.options.duration?this.pos=e=ot.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):B.propHooks._default.set(this),this}},B.prototype.init.prototype=B.prototype,B.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=ot.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){ot.fx.step[t.prop]?ot.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[ot.cssProps[t.prop]]&&!ot.cssHooks[t.prop]?t.elem[t.prop]=t.now:ot.style(t.elem,t.prop,t.now+t.unit)}}},B.propHooks.scrollTop=B.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ot.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},ot.fx=B.prototype.init,ot.fx.step={};var Kt,Qt,te=/^(?:toggle|show|hide)$/,ee=/queueHooks$/;ot.Animation=ot.extend(j,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return h(n.elem,t,Ct.exec(e),n),n}]},tweener:function(t,e){ot.isFunction(t)?(e=t,t=["*"]):t=t.match(gt);for(var n,i=0,o=t.length;i<o;i++)n=t[i],j.tweeners[n]=j.tweeners[n]||[],j.tweeners[n].unshift(e)},prefilters:[I],prefilter:function(t,e){e?j.prefilters.unshift(t):j.prefilters.push(t)}}),ot.speed=function(t,e,n){var i=t&&"object"==typeof t?ot.extend({},t):{complete:n||!n&&e||ot.isFunction(t)&&t,duration:t,easing:n&&e||e&&!ot.isFunction(e)&&e};return i.duration=ot.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in ot.fx.speeds?ot.fx.speeds[i.duration]:ot.fx.speeds._default,null!=i.queue&&i.queue!==!0||(i.queue="fx"),i.old=i.complete,i.complete=function(){ot.isFunction(i.old)&&i.old.call(this),i.queue&&ot.dequeue(this,i.queue)},i},ot.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Dt).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=ot.isEmptyObject(t),s=ot.speed(e,n,i),r=function(){var e=j(this,ot.extend({},t),s);(o||bt.get(this,"finish"))&&e.stop(!0)};return r.finish=r,o||s.queue===!1?this.each(r):this.queue(s.queue,r)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",s=ot.timers,r=bt.get(this);if(o)r[o]&&r[o].stop&&i(r[o]);else for(o in r)r[o]&&r[o].stop&&ee.test(o)&&i(r[o]);for(o=s.length;o--;)s[o].elem!==this||null!=t&&s[o].queue!==t||(s[o].anim.stop(n),e=!1,s.splice(o,1));!e&&n||ot.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=bt.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],s=ot.timers,r=i?i.length:0;for(n.finish=!0,ot.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<r;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),ot.each(["toggle","show","hide"],function(t,e){var n=ot.fn[e];ot.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(N(e,!0),t,i,o)}}),ot.each({slideDown:N("show"),slideUp:N("hide"),slideToggle:N("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){ot.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),ot.timers=[],ot.fx.tick=function(){var t,e=0,n=ot.timers;for(Kt=ot.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||ot.fx.stop(),Kt=void 0},ot.fx.timer=function(t){ot.timers.push(t),t()?ot.fx.start():ot.timers.pop()},ot.fx.interval=13,ot.fx.start=function(){Qt||(Qt=t.setInterval(ot.fx.tick,ot.fx.interval))},ot.fx.stop=function(){t.clearInterval(Qt),Qt=null},ot.fx.speeds={slow:600,fast:200,_default:400},ot.fn.delay=function(e,n){return e=ot.fx?ot.fx.speeds[e]||e:e,n=n||"fx",this.queue(n,function(n,i){var o=t.setTimeout(n,e);i.stop=function(){t.clearTimeout(o)}})},function(){
......
......@@ -555,7 +555,7 @@ ConnectionMap = function () {
*/
loadBaseCountries: function () {
var self = this;
return $.getJSON("data/world_50m.geojson", function (countries) {
return $.getJSON("data/world_50m.json", function (countries) {
// populate the geojson object
self.countryGeoJSON = countries;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment