PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
bdthemes-element-pack
/
assets
/
vendor
/
js
!function(t,e,s,a){var i="flatWeatherPlugin",n={location:"Boston, MA",country:"USA",zmw:"02108.1.99999",displayCityNameOnly:!1,api:"darksky",forecast:5,apikey:"",latitude:"",longitude:"",view:"full",render:!1,loadingAnimation:!0,strings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],min:"Min",max:"Max",direction:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"]},timeformat:"12",lang:"EN"},o={openweathermap:["https://api.openweathermap.org/data/2.5/weather","https://api.openweathermap.org/data/2.5/forecast/daily"],wunderground:["https://api.wunderground.com/api/apikey/conditions/forecast/astronomy/"],darksky:["https://api.darksky.net/forecast/apikey/"]};function r(e,s){this.element=e,this.settings=t.extend({},n,s),this.settings.units&&"auto"!=this.settings.units||(this.settings.units=-1==["united states","usa","united states of america","us"].indexOf(this.settings.country.toLowerCase())?"metric":"imperial"),this.settings.forecast=Math.min(this.settings.forecast,5),"wunderground"==this.settings.api&&(this.settings.forecast=Math.min(this.settings.forecast,3)),this._name=i,this.once=!1,this.init()}function d(t,e){var s={};if("openweathermap"==e.api){""!=t[0].name?(s.location=t[0].name+", "+t[0].sys.country,s.city=t[0].name):""!=t[1].city.name?(s.location=t[1].city.name+", "+t[1].city.country,s.city=t[1].city.name):(s.location=e.location+", "+e.country,s.city=e.location),s.today={},s.today.temp={},s.today.temp.now=Math.round(t[0].main.temp),s.today.temp.min=Math.round(t[0].main.temp_min),s.today.temp.max=Math.round(t[0].main.temp_max),s.today.desc=t[0].weather[0].description.capitalize(),s.today.code=t[0].weather[0].id,s.today.wind=t[0].wind,s.today.humidity=t[0].main.humidity,s.today.pressure=t[0].main.pressure,s.today.sunrise=c(t[0].sys.sunrise,e.timeformat),s.today.sunset=c(t[0].sys.sunset,e.timeformat),s.today.day=p(new Date,e.strings.days),s.forecast=[];for(var a=0;a<e.forecast;a++){(d={}).day=p(new Date(1e3*t[1].list[a].dt),e.strings.days),d.code=t[1].list[a].weather[0].id,d.desc=t[1].list[a].weather[0].description.capitalize(),d.temp={max:Math.round(t[1].list[a].temp.max),min:Math.round(t[1].list[a].temp.min)},s.forecast.push(d)}}else if("darksky"==e.api){s.location=e.location,s.today={},s.today.temp={},s.today.temp.now=Math.round(t.currently.temperature),s.today.temp.min=Math.round(t.daily.data[0].temperatureMin),s.today.temp.max=Math.round(t.daily.data[0].temperatureMax),s.today.desc=t.daily.data[0].summary.capitalize();var i={"clear-day":"800","clear-night":"800",rain:"521",snow:"601",sleet:"611",wind:"954",fog:"741",cloudy:"802","partly-cloudy-day":"802","partly-cloudy-night":"800",hail:"906",thunderstorm:"200",tornado:"900"};s.today.code=i[t.currently.icon],s.today.wind={},s.today.wind.speed=t.currently.windSpeed,s.today.wind.deg=t.currently.windBearing,s.today.humidity=t.currently.humidity,s.today.pressure=t.currently.pressure,s.today.sunrise=c(t.daily.data[0].sunriseTime),s.today.sunset=c(t.daily.data[0].sunsetTime),s.today.day=p(new Date,e.strings.days),s.forecast=[];for(a=0;a<e.forecast;a++){(d={}).day=p(new Date(1e3*t.daily.data[a].time),e.strings.days),d.code=i[t.daily.data[a].icon],d.desc=t.daily.data[a].summary.capitalize(),d.temp={max:Math.round(t.daily.data[a].temperatureMax),min:Math.round(t.daily.data[a].temperatureMin)},s.forecast.push(d)}}else if("wunderground"==e.api){i={chanceflurries:"600",chancerain:"500",chancesleet:"611",chancesnow:"600",chancetstorms:"200",clear:"800",cloudy:"802",flurries:"600",fog:"741",hazy:"721",mostlycloudy:"802",mostlysunny:"802",partlycloudy:"802",partlysunny:"802",sleet:"611",rain:"501",snow:"601",sunny:"800",tstorms:"211",unknown:"951"};s.location=t.current_observation.display_location.full,s.city=t.current_observation.display_location.city,s.today={},s.today.temp={},"metric"==e.units?(s.today.temp.now=Math.round(t.current_observation.temp_c),s.today.temp.min=Math.round(t.forecast.simpleforecast.forecastday[0].low.celsius),s.today.temp.max=Math.round(t.forecast.simpleforecast.forecastday[0].high.celsius)):(s.today.temp.now=Math.round(t.current_observation.temp_f),s.today.temp.min=Math.round(t.forecast.simpleforecast.forecastday[0].low.fahrenheit),s.today.temp.max=Math.round(t.forecast.simpleforecast.forecastday[0].high.fahrenheit)),s.today.desc=t.current_observation.weather,s.today.code=i[t.current_observation.icon],s.today.wind={},"metric"==e.units?s.today.wind.speed=t.current_observation.wind_kph:s.today.wind.speed=t.current_observation.wind_mph,s.today.wind.deg=t.current_observation.wind_degrees,s.today.humidity=t.current_observation.relative_humidity,"metric"==e.units?s.today.pressure=t.current_observation.pressure_mb:s.today.pressure=t.current_observation.pressure_in;var n=t.sun_phase.sunrise.minute,o=t.sun_phase.sunset.minute;if("12"==e.timeformat){s.today.sunrise=t.sun_phase.sunrise.hour+":"+n+" AM";var r=t.sun_phase.sunset.hour%12;r=r||12,s.today.sunset=r+":"+o+" PM"}else s.today.sunrise=t.sun_phase.sunrise.hour+":"+n,s.today.sunset=t.sun_phase.sunset.hour+":"+o;s.today.day=p(new Date,e.strings.days),s.forecast=[];for(a=0;a<e.forecast+1;a++){var d;(d={}).day=p(new Date(1e3*t.forecast.simpleforecast.forecastday[a].date.epoch),e.strings.days),d.code=i[t.forecast.simpleforecast.forecastday[a].icon],d.desc=t.forecast.simpleforecast.forecastday[a].conditions,"metric"==e.units?d.temp={max:Math.round(t.forecast.simpleforecast.forecastday[a].high.celsius),min:Math.round(t.forecast.simpleforecast.forecastday[a].low.celsius)}:d.temp={max:Math.round(t.forecast.simpleforecast.forecastday[a].high.fahrenheit),min:Math.round(t.forecast.simpleforecast.forecastday[a].low.fahrenheit)},s.forecast.push(d)}}return s}function p(t,e){return e[t.getDay()]}function c(t,e){var s=(t=new Date(1e3*t)).getHours(),a=t.getMinutes(),i=s>=12?"PM":"AM";return"24"==e&&(i="",s=s<10?"0"+s:s),"12"==e&&(s%=12),(s=s||12)+":"+(a=a<10?"0"+a:a)+" "+i}t.extend(r.prototype,{init:function(){this.settings.render&&(this.settings.loadingAnimation&&!this.once&&(this.loading=t("<div/>",{id:"flatWeatherLoading",class:"wi loading"}),this.loading.appendTo(this.element)),this.fetchWeather().then(this.render,this.error)),this.once=!0},fetchWeather:function(){var e=this,s=new t.Deferred,a=[],i=this.settings.location+" "+this.settings.country;if("openweathermap"==this.settings.api){var n={};this.settings.lat&&this.settings.lon?(n.lat=this.settings.lat,n.lon=this.settings.lon):n.q=i,n.units=this.settings.units,this.settings.apikey&&(n.appid=this.settings.apikey),this.settings.lang&&(n.lang=this.settings.lang),a.push(n),n.cnt=this.settings.forecast+1,a.push(n)}else("wunderground"==this.settings.api||"darksky"==this.settings.api)&&(o[this.settings.api][0]=o[this.settings.api][0].replace(/apikey/,this.settings.apikey));for(var r=[],p=0;p<o[this.settings.api].length;p++)"wunderground"==this.settings.api?r.push(t.get(o[this.settings.api][p]+"lang:"+this.settings.lang+"/q/zmw:"+this.settings.zmw+".json")):"darksky"==this.settings.api?r.push(t.get(o[this.settings.api][p]+this.settings.latitude+","+this.settings.longitude)):r.push(t.get(o[this.settings.api][p],a[p]));return t.when.apply(this,r).done((function(){var a=Array.prototype.slice.call(arguments);if(a=r.length>1?a.map((function(t){return t[0]})):a[0],"openweathermap"!=e.settings.api||"200"==a[0].cod&&"200"==a[1].cod)if("wunderground"==e.settings.api&&a.response&&a.response.error)console.log("Error interacting with the wunderground api see error object below for details:"),console.log(a),s.reject(a,e);else if("darksky"==e.settings.api&&403==a.status)console.log("Error authenticating with the darkmap api see error object below for details:"),console.log(a),s.reject(a,e);else{var i=d(a,e.settings);e._weather=i,t.data(e.element,"weather",i),s.resolve(i,e)}else console.log("Error interacting with the openweathermap api see error object below for details:"),console.log(a),s.reject(a,e)})).fail((function(t){s.reject(t,e)})),s},error:function(e,s){s||(s=this),s.settings.loadingAnimation&&s.settings.render&&s.loading.remove(),e="openweathermap"==s.settings.api?"200"!=e.responseJSON.cod?e.responseJSON.cod+" "+e.responseJSON.message+" See console log for details.":e.responseJSON.message+" See console log for details.":"wunderground"==s.settings.api?e.response.error.type+" See console log for details.":"Sorry, the weather service is currently down. Please try again later.";var a=t("<div/>",{class:"flatWeatherPlugin "+s.settings.view});return t("<h2/>").text("Error").appendTo(a),t("<p/>").text(e).appendTo(a),t(s.element).html(a),t(s.element)},render:function(e,s){s||(s=this,e=this._weather);var a="metric"==s.settings.units?"°C":"°F";s.settings.loadingAnimation&&s.settings.render&&s.loading.remove();var i=t("<div/>",{class:"flatWeatherPlugin "+s.settings.view});if(s.settings.displayCityNameOnly?t("<h2/>").text(e.city).appendTo(i):t("<h2/>").text(e.location).appendTo(i),"forecast"!=s.settings.view){var n=t("<div/>",{class:"wiToday"}),o=t("<div/>",{class:"wiIconGroup"});t("<div/>",{class:"wi wi"+e.today.code}).appendTo(o),t("<p/>",{class:"wiText"}).text(e.today.desc).appendTo(o),o.appendTo(n),t("<p/>",{class:"wiTemperature"}).html(e.today.temp.now+"<sup>"+a+"</sup>").appendTo(n),n.appendTo(i)}if("simple"!=s.settings.view){var r=t("<div/>",{class:"wiDetail"});if("partial"==s.settings.view&&t("<p/>",{class:"wiDay"}).text(e.today.day).appendTo(n),"partial"!=s.settings.view){"today"!=s.settings.view&&t("<p/>",{class:"wiDay"}).text(e.today.day).appendTo(r);var d=t("<ul/>",{class:"astronomy"}).appendTo(r);t("<li/>",{class:"wi sunrise"}).text(e.today.sunrise).appendTo(d),t("<li/>",{class:"wi sunset"}).text(e.today.sunset).appendTo(d);var p=t("<ul/>",{class:"temp"}).appendTo(r);t("<li/>").html(s.settings.strings.max+": "+e.today.temp.max+"<sup>"+a+"</sup>").appendTo(p),t("<li/>").html(s.settings.strings.min+": "+e.today.temp.min+"<sup>"+a+"</sup>").appendTo(p);var c=t("<ul/>",{class:"atmosphere"}).appendTo(r);t("<li/>",{class:"wi humidity"}).text(e.today.humidity).appendTo(c),t("<li/>",{class:"wi pressure"}).text(e.today.pressure).appendTo(c),t("<li/>",{class:"wi wind"}).text(function(t,e,s,a){var i=e;i>=0&&i<=11.25||i>348.75&&i<=360?i=a[0]:i>11.25&&i<=33.75?i=a[1]:i>33.75&&i<=56.25?i=a[2]:i>56.25&&i<=78.75?i=a[3]:i>78.75&&i<=101.25?i=a[4]:i>101.25&&i<=123.75?i=a[5]:i>123.75&&i<=146.25?i=a[6]:i>146.25&&i<=168.75?i=a[7]:i>168.75&&i<=191.25?i=a[8]:i>191.25&&i<=213.75?i=a[9]:i>213.75&&i<=236.25?i=a[10]:i>236.25&&i<=258.75?i=a[11]:i>258.75&&i<=281.25?i=a[12]:i>281.25&&i<=303.75?i=a[13]:i>303.75&&i<=326.25?i=a[14]:i>326.25&&i<=348.75&&(i=a[15]);i||(i="");return i+" "+t+" "+("metric"==s?"km/h":"mph")}(e.today.wind.speed,e.today.wind.deg,s.settings.units,s.settings.strings.direction)).appendTo(c),r.appendTo(n)}if("today"!=s.settings.view||"forecast"==s.settings.view){for(var l=t("<ul/>",{class:"wiForecasts"}),u="forecast"==s.settings.view?0:1;u<e.forecast.length;u++){var y=t("<li/>",{class:"wiDay"}).html("<span>"+e.forecast[u].day+"</span>").appendTo(l),h=t("<ul/>",{class:"wiForecast"}).appendTo(y);t("<li/>",{class:"wi wi"+e.forecast[u].code}).appendTo(h),t("<li/>",{class:"wiMax"}).html(e.forecast[u].temp.max+"<sup>"+a+"</sup>").appendTo(h),t("<li/>",{class:"wiMin"}).html(e.forecast[u].temp.min+"<sup>"+a+"</sup>").appendTo(h)}l.appendTo(i)}}return t(s.element).html(i),t(s.element)}}),t.fn[i]=function(e,s){return t.isFunction(r.prototype[e])?this.data("plugin_"+i)[e](s):this.each((function(){if(!t.data(this,"plugin_"+i)){var s=new r(this,e);return t.data(this,"plugin_"+i,s)}}))},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)}}(jQuery,window,document);
[-] SplitText.js
[edit]
[-] awesomeCloud.min.js
[edit]
[-] prism.min.js
[edit]
[-] jquery.progressScroll.js
[edit]
[-] jquery.mThumbnailScroller.min.js
[edit]
[-] parallax.js
[edit]
[-] chart.min.js
[edit]
[-] typed.min.js
[edit]
[-] jquery.appear.min.js
[edit]
[-] lottie.d.ts
[edit]
[-] jquery.imagezoom.js
[edit]
[-] jquery.tagcanvas.min.js
[edit]
[-] prism.js
[edit]
[-] metisMenu.js
[edit]
[-] lottie.js
[edit]
[-] jquery.honeycombs.js
[edit]
[-] sidetabs.js
[edit]
[-] timeline.min.js
[edit]
[-] datatables.min.js
[edit]
[-] datatables.uikit.js
[edit]
[-] jquery.appear.js
[edit]
[+]
..
[-] popper.js
[edit]
[-] jquery.jplayer.js
[edit]
[-] image-compare-viewer.min.js
[edit]
[-] calendly.js
[edit]
[-] tilt.jquery.js
[edit]
[-] particles.min.js
[edit]
[-] jquery.progressHorizontal.min.js
[edit]
[-] timeline.js
[edit]
[-] jQuery.circleMenu.min.js
[edit]
[-] tippy.all.min.js
[edit]
[-] calendly.min.js
[edit]
[-] jquery.jplayer.min.js
[edit]
[-] jquery.newsTicker.min.js
[edit]
[-] darkmode.min.js
[edit]
[-] goodshare.min.js
[edit]
[-] SplitText.min.js
[edit]
[-] jquery.newsTicker.js
[edit]
[-] jquery.flatWeatherPlugin.min.js
[edit]
[-] rvslider.min.js
[edit]
[-] gmap.min.js
[edit]
[-] jquery.jclock.min.js
[edit]
[-] chart.js
[edit]
[-] jquery.mousewheel.js
[edit]
[-] vanilla-tilt.js
[edit]
[-] search.min.js
[edit]
[-] jquery.justifiedGallery.min.js
[edit]
[-] pageable.min.js
[edit]
[-] particles.js
[edit]
[-] jquery.imagezoom.min.js
[edit]
[-] jquery.mousewheel.min.js
[edit]
[-] gmap.js
[edit]
[-] news-ticker.min.js
[edit]
[-] datatables.uikit.min.js
[edit]
[-] tippy.all.js
[edit]
[-] gsap.js
[edit]
[-] table-of-content.min.js
[edit]
[-] gsap.min.js
[edit]
[-] metisMenu.min.js
[edit]
[-] wavify.min.js
[edit]
[-] jquery.progressScroll.min.js
[edit]
[-] morphext.min.js
[edit]
[-] darkmode.js
[edit]
[-] gridtab.min.js
[edit]
[-] morphext.js
[edit]
[-] image-compare-viewer.js
[edit]
[-] parallax.min.js
[edit]
[-] search.js
[edit]
[-] sidetabs.min.js
[edit]
[-] recliner.js
[edit]
[-] countUp.js
[edit]
[-] clipboard.js
[edit]
[-] jquery-asPieProgress.min.js
[edit]
[-] wavify.js
[edit]
[-] recliner.min.js
[edit]
[-] jquery.jclock.js
[edit]
[-] pageable.js
[edit]
[-] jquery.tagcanvas.js
[edit]
[-] gridtab.js
[edit]
[-] jquery-qrcode.js
[edit]
[-] countUp.min.js
[edit]
[-] awesomeCloud.js
[edit]
[-] jquery-asPieProgress.js
[edit]
[-] lottie.min.js
[edit]
[-] moment-timezone-with-data.min.js
[edit]
[-] jquery.justifiedGallery.js
[edit]
[-] datatables.js
[edit]
[-] rvslider.js
[edit]
[-] jquery.flatWeatherPlugin.js
[edit]
[-] moment.min.js
[edit]
[-] jquery.honeycombs.min.js
[edit]
[-] table-of-content.js
[edit]
[-] goodshare.js
[edit]
[-] leaflet.js
[edit]
[-] cookieconsent.min.js
[edit]
[-] moment-timezone-with-data.js
[edit]
[-] jQuery.circleMenu.js
[edit]
[-] leaflet.min.js
[edit]
[-] vanilla-tilt.min.js
[edit]
[-] floating-video.min.js
[edit]
[-] typed.js
[edit]
[-] popper.min.js
[edit]
[-] spritespin.js
[edit]
[-] jquery.progressHorizontal.js
[edit]
[-] floating-video.js
[edit]
[-] jquery.mThumbnailScroller.js
[edit]
[-] moment.js
[edit]
[-] spritespin.min.js
[edit]
[-] tilt.jquery.min.js
[edit]
[-] jquery-qrcode.min.js
[edit]
[-] cookieconsent.js
[edit]