function InitializeAboutContext(n){n.scrollToTopic=function(n,t,i){var r,u,f;n.preventDefault();r=document.querySelector("#heading"+i+'>a[aria-expanded="false"]');r&&r.click();u=$(window).width()<990;f=u?$("#topicId"+i)[0]:$("#"+t)[0];f.scrollIntoView()};n.scrollToTopicsSection=function(n){n.preventDefault();var t=document.querySelector(".wrapper_open_hack_topics");t&&t.scrollIntoView()};n.getTopicsPerRowCount=function(n){var t=0,i=5;n<=i&&(t=i);switch(n){case 1:t=3;break;case 2:t=3;break;case 3:t=3;break;case 4:t=4;break;case 5:t=5;break;case 6:t=3;break;case 7:t=4;break;case 8:t=4;break;case 9:t=5;break;case 10:t=5;break;case 11:t=4;break;case 12:t=4;break;case 13:t=5;break;case 14:t=5;break;case 15:t=5;break;case 16:t=4;break;case 17:t=5;break;case 18:t=5;break;case 19:t=5;break;case 20:t=5;break;default:t=i}return t};n.adjustTopicsRows=function(t){function u(n){return 100/n}var r=n.getTopicsPerRowCount(t),i=u(r);$(".wrapper_open_hack .topics > li").css("max-width",i+"%");$(".wrapper_open_hack .topics > li").css("width",i+"%")};n.initHtml5LightboxScript=function(){var n=document.createElement("script");n.type="text/javascript";n.src="/Scripts/Pages/html5lightbox/html5lightbox.js";n.async=!0;$("head")[0].appendChild(n);console.log("init html5lightbox script")}}function InitializeEventMapContext(n){function c(n,t){return n.reduce(function(n,i){var f=!1,r=$.grep(n,function(n){var r=t[0];return n[r]===i[r]})[0],e,u,o;if(!r){r={};f=!0;for(e in t)u=t[e],o=i[u],r[u]=o}return r.items||(r.items=[]),r.items.push(i),f&&n.push(r),n},[])}function u(n){var i,t;if(n&&(i=n.split("T"),i&&i[0]&&(t=i[0].split("-"),t&&t.length===3&&t[2])))return{day:+t[2],month:+t[1]-1,year:+t[0]}}var t,r,o,s;const h=864e5,f=36e5,e=24;t=null;n.activePin=null;n.activeClusteredPin=null;n.activePinColor="#e1088d";n.notactivePinColor="#494f55";n.commonPinColor="#2176bc";n.activePinSize=24;n.commonPinSize=22;n.outlineWidth=7;n.infoboxOffset=24;n.infoboxMaxWidth=570;n.infoboxMaxHeigh=292;n.minDate=Math.min.apply(null,$.map(n.Events,function(n){var t=u(n.StartDate),i=t?new Date(t.year,t.month,t.day):new Date(n.StartDate);return i.valueOf()}));n.maxDate=Math.max.apply(null,$.map(n.Events,function(n){var t=u(n.EndDate),i=t?new Date(t.year,t.month,t.day):new Date(n.EndDate);return i.valueOf()}));r=new Date;o=new Date(r.getFullYear(),r.getMonth(),r.getDate()).valueOf();n.firstDay=o;n.lastDay=n.maxDate;new Date(n.lastDay)<new Date(n.firstDay)&&(s=n.lastDay,n.lastDay=n.firstDay,n.firstDay=s);n.setSliderData=function(t,i){$("#slider-range1").slider("setValue",[t,i],!0);n.filterPushpins()};n.resetFilters=function(t){var f,s,e,h,o;t.preventDefault();n.hidePopup();var r=document.getElementById("select0011"),u=document.getElementById("select0021"),c=document.getElementById("select0031");for(u.length=1,r.length=1,f=n.Countries.sort(n.compare),i=0;i<n.Countries.length;i++)s=new Option(f[i].Name,f[i].Id),r.options[r.options.length]=s;for(e=n.Cities.sort(n.compare),i=0;i<n.Cities.length;i++)h=new Option(e[i].Name,e[i].Id),u.options[u.options.length]=h;for(o=[].slice.call(c.options),i=0;i<o.length;i++)o[i].selected=!0;$("#select0031").trigger("change.select2");n.setSliderData(n.firstDay,n.lastDay);$("#registration_available_2").is(":checked")&&($("#registration_available_2").prop("checked",!1),n.filterPushpins());$("#reset-filter-events-map").addClass("disabled")};n.cityChanged=function(){n.filterPushpins()};n.contryChanged=function(t){var u=document.getElementById("select0021"),r;for(u.length=1,r=+t.value<0?n.Cities:$.grep(n.Cities,function(n){return n.CountryId===+t.value}),r=r.sort(n.compare),i=0;i<r.length;i++)u.options[u.options.length]=new Option(r[i].Name,r[i].Id);n.filterPushpins()};n.technologyChanged=function(){n.filterPushpins()};n.onlyRegistered=function(){n.filterPushpins()};n.clickCluster=function(t){var r,i;n.activePin&&(r=n.activePin.data?n.activePin.data.isActive?n.commonPinColor:n.notactivePinColor:$.grep(n.activePin.containedPushpins,function(n){return n.data.isActive}).length>0?n.commonPinColor:n.notactivePinColor,n.activePin.setOptions({icon:n.createPushpinIcon(n.commonPinSize,n.outlineWidth,r),textOffset:new Microsoft.Maps.Point(0,15),anchor:new Microsoft.Maps.Point(n.commonPinSize,n.commonPinSize)}));i=t.primitive;i.setOptions({icon:n.createPushpinIcon(n.activePinSize,n.outlineWidth,n.activePinColor),textOffset:new Microsoft.Maps.Point(0,16),anchor:new Microsoft.Maps.Point(n.commonPinSize,n.commonPinSize)});n.activePin=i;n.map.setView({center:i.getLocation()});n.showInfobox(t.target)};n.mapPushpins=function(t){var e=[],o,f;for(i=0;i<t.length;i++){var r=$.grep(eventMapContext.Cities,function(n){return n.Id===t[i].CityId})[0],s=new Microsoft.Maps.Location(r.Lat,r.Long),u=new Date;t[i].isActive=new Date(t[i].EndDate).valueOf()>=new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0).valueOf();o=t[i].isActive?n.commonPinColor:n.notactivePinColor;f=new Microsoft.Maps.Pushpin(s,{icon:n.createPushpinIcon(n.commonPinSize,n.outlineWidth,o),text:"1",textOffset:new Microsoft.Maps.Point(0,15),anchor:new Microsoft.Maps.Point(n.commonPinSize,n.commonPinSize)});t[i].City=r;f.data=t[i];e.push(f)}return e};n.createClustering=function(i){var r=new Microsoft.Maps.ClusterLayer([],{gridSize:110,clusteredPinCallback:n.createCustomClusteredPin});n.clusterLayer=r;t=new Microsoft.Maps.Infobox(i.getCenter(),{visible:!1});t!=null&&t.setMap(i);Microsoft.Maps.Events.addHandler(r,"click",n.clickCluster);i.layers.insert(r);n.filterPushpins()};n.createCustomClusteredPin=function(t){var u=t.containedPushpins.length,r=n.notactivePinColor,i=n.commonPinSize;$.grep(t.containedPushpins,function(n){return n.data.isActive}).length>0&&(r=n.commonPinColor);n.activePin&&t.geometry.x===n.activePin.geometry.x&&t.geometry.y===n.activePin.geometry.y&&(r=n.activePinColor,i=n.activePinSize,n.activeClusteredPin=t);t.setOptions({icon:n.createPushpinIcon(i,n.outlineWidth,r),text:u,textOffset:new Microsoft.Maps.Point(0,15),anchor:new Microsoft.Maps.Point(i,i)})};n.createPushpinIcon=function(n,t,i){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+n*2+'" height="'+n*2+'"><circle cx="'+n+'" cy="'+n+'" r="'+n+'" fill="'+i+'" style="opacity: 0.4;"/><circle cx="'+n+'" cy="'+n+'" r="'+(n-t)+'" fill="'+i+'"/><\/svg>'};$(document).ready(function(){var r=$("#pushpin-popup-template").html(),i;n.createInfoBoxHtml=Handlebars.compile(r);$(window).on("orientationchange resize",function(){t!==null&&t.setOptions({visible:!1});$(window).width()<768?(n.infoboxMaxWidth=290,n.infoboxMaxHeigh=290):(n.infoboxMaxWidth=570,n.infoboxMaxHeigh=292)});$(window).width()<768?(n.infoboxMaxWidth=290,n.infoboxMaxHeigh=132):(n.infoboxMaxWidth=570,n.infoboxMaxHeigh=292);$("#slider-range1").slider({min:n.minDate,max:n.maxDate,step:h,range:!0,value:[n.firstDay,n.lastDay]});$("#select0011").select2({theme:"bootstrap",minimumResultsForSearch:-1,placeholder:"Country"});$("#select0021").select2({theme:"bootstrap",minimumResultsForSearch:-1,placeholder:"City"});$("#select0031").select2MultiCheckboxes({templateSelection:function(n,t){return n.length===0?"Technology Topic":"Technology Topics: "+n.length+" of "+t},width:"auto"});$(".slider-time-11").datepicker("update",new Date(n.firstDay));$(".slider-time-11").datepicker("setEndDate",new Date(n.lastDay));$(".slider-time-11").datepicker("setStartDate",new Date(n.minDate));$(".slider-time-21").datepicker("update",new Date(n.lastDay));$(".slider-time-21").datepicker("setStartDate",new Date(n.firstDay));$(".slider-time-21").datepicker("setEndDate",new Date(n.maxDate));$(".slider-time-21").datepicker().on("hide",function(n){n.currentTarget.blur()});$(".slider-time-11").datepicker().on("hide",function(n){n.currentTarget.blur()});i=function(t){var i=new Date(t.value[0]),r=new Date(t.value[1]);i.getHours()!==0&&(i=new Date(t.value[0]+f*(e-i.getHours())));r.getHours()!==0&&(r=new Date(t.value[1]+f*(e-r.getHours())));$(".slider-time-11").datepicker("setEndDate",r);$(".slider-time-21").datepicker("setStartDate",i);$(".slider-time-11").datepicker("update",i);$(".slider-time-21").datepicker("update",r);n.filterPushpins()};$("#slider-range1").on("slide",i);$("#slider-range1").on("slideStart",i);$(".slider-time-11").datepicker().on("changeDate",function(t){var i=$("#slider-range1").slider("getValue");n.setSliderData(t.date.valueOf(),i[1]);$(".slider-time-21").datepicker("setStartDate",t.date)});$(".slider-time-21").datepicker().on("changeDate",function(t){var i=$("#slider-range1").slider("getValue");n.setSliderData(i[0],t.date.valueOf());$(".slider-time-11").datepicker("setEndDate",t.date)})});n.compare=function(n,t){return n.Name<t.Name?-1:n.Name>t.Name?1:0};n.filterPushpins=function(){var s,h;if(n.mapLoaded){var t,u=+document.getElementById("select0011").value,f=+document.getElementById("select0021").value,c=$.map($.grep([].slice.call(document.getElementById("select0031").options),function(n){return n.selected}),function(n){return n.value}),e=$("#slider-range1").slider("getValue"),o=$("#registration_available_2").is(":checked"),i=e[0],r=e[1];n.hidePopup();f!==-1?t=$.grep(n.Events,function(n){return n.CityId===f}):u!==-1?(s=$.map($.grep(n.Cities,function(n){return n.CountryId===u}),function(n){return n.Id}),t=$.grep(n.Events,function(n){return s.indexOf(n.CityId)!==-1})):t=n.Events;o&&(t=$.grep(t,function(n){return n.isActive&&n.RegistrationLink}));t=$.grep(t,function(n){return c.indexOf(n.Technology)!==-1});t=$.grep(t,function(n){var t=new Date(n.StartDate),u=new Date(n.EndDate),f=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0).valueOf(),e=new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0).valueOf();return f>=i&&f<=r||e>=i&&e<=r||f<=i&&e>=r});h=n.mapPushpins(t);n.clusterLayer.setPushpins(h);i!==n.firstDay||r!==n.lastDay||f!==-1||u!==-1||$.grep([].slice.call(document.getElementById("select0031").options),function(n){return!n.selected}).length>0||o?$("#reset-filter-events-map").removeClass("disabled"):$("#reset-filter-events-map").addClass("disabled")}};n.showInfobox=function(r){var f=[],e;if(r.containedPushpins)for(e=r.containedPushpins,i=0;i<e.length;i++)f.push(e[i].data);else f.push(r.data);var o=$.map(f,function(t){var e=$.grep(n.Countries,function(n){return n.Id===t.City.CountryId})[0],i=new Date(t.StartDate),r=new Date(t.EndDate),f=i.getFullYear()===r.getFullYear(),o=f&&i.getMonth()===r.getMonth(),c=f&&o&&i.getDate()===r.getDate(),s=u(t.StartDate),h=u(t.EndDate),l=s?s.day:i.getDate(),a=h?h.day:r.getDate();return{tech:t.Technology,cityId:t.City.Id,cityName:t.City.Name,countryName:e?e.Name:"",regLink:t.RegistrationLink,isRegLink:t.RegistrationLink?!0:!1,eventPassed:!t.isActive,firstDay:l,firstMonth:i.toLocaleString("en-us",{month:"short"}),firstYear:i.getFullYear(),lastDay:a,lastMonth:r.toLocaleString("en-us",{month:"short"}),lastYear:r.getFullYear(),isOneMonth:o,isOneYear:f,isOneDay:c}}),s=c(o,["cityId","cityName","countryName"]),h=n.createInfoBoxHtml(s);t!=null&&t.setOptions({location:r.getLocation(),title:"",description:h,showCloseButton:!1,maxWidth:n.infoboxMaxWidth,maxHeight:n.infoboxMaxHeigh,offset:new Microsoft.Maps.Point(0,n.infoboxOffset),visible:!0})};n.hidePopup=function(){if(n.activePin){t!=null&&t.setOptions({visible:!1});var i=n.activePin.data?n.activePin.data.isActive?n.commonPinColor:n.notactivePinColor:$.grep(n.activePin.containedPushpins,function(n){return n.data.isActive}).length>0?n.commonPinColor:n.notactivePinColor;n.activePin.setOptions({icon:n.createPushpinIcon(n.commonPinSize,n.outlineWidth,i),textOffset:new Microsoft.Maps.Point(0,15)});n.activeClusteredPin&&n.activeClusteredPin.setOptions({icon:n.createPushpinIcon(n.commonPinSize,n.outlineWidth,i),textOffset:new Microsoft.Maps.Point(0,15)});n.activePin=null}}}function LoadMap(){var n=new Microsoft.Maps.Map(document.getElementById("myMap"),{credentials:eventMapContext.BingApiKey,zoom:4,minZoom:3,disableScrollWheelZoom:!0,showMapTypeSelector:!1,showZoomButtons:!0,center:new Microsoft.Maps.Location(38.281441,-44.0158),mapTypeId:Microsoft.Maps.MapTypeId.canvasDark,navigationBarMode:Microsoft.Maps.NavigationBarMode.compact,supportedMapTypes:[Microsoft.Maps.MapTypeId.road,Microsoft.Maps.MapTypeId.aerial,Microsoft.Maps.MapTypeId.canvasDark]});eventMapContext.mapLoaded=!0;eventMapContext.map=n;Microsoft.Maps.Events.addHandler(n,"click",function(){eventMapContext.hidePopup()});Microsoft.Maps.Events.addHandler(n,"viewchange",function(){eventMapContext.hidePopup()});Microsoft.Maps.loadModule("Microsoft.Maps.Clustering",function(){eventMapContext.createClustering(n)})}function InitializeCalendarEventsContext(n){function k(i){var r=function(){var n=["green","yellow","pink","orange","violet","blue"],t=Math.floor(Math.random()*n.length);return n[t]},u=$.map(i,function(i){var h=$.grep(calendarEventsContext.Cities,function(n){return n.Id===i.CityId})[0],k=$.grep(calendarEventsContext.Countries,function(n){return n.Id===h.CountryId})[0],u=new Date(i.StartDate),f=new Date(i.EndDate),l=u.getFullYear()===f.getFullYear(),d=l&&u.getMonth()===f.getMonth(),it=l&&d&&u.getDate()===f.getDate(),s=$.grep(n.Topics,function(n){return n.Title.toLowerCase().trim()===i.Technology.toLowerCase().trim()}),a=i.Technology,g=b,v;s&&s.length>0&&(v=s[0],a=v.Title,g=v.Icon);var rt=r(),y=new Date,ut=new Date(i.EndDate).valueOf()<new Date(y.getFullYear(),y.getMonth(),y.getDate(),0,0,0).valueOf(),c="Microsoft OpenHack: "+a+" | "+e(i.StartDate,i.EndDate)+" | "+h.Name+" #MSOpenHack";c=i.RegistrationLink?c+"\nCheck out this Microsoft OpenHack. You might be interested in this event.\nRegistration: "+i.RegistrationLink+"\nMore events: "+t+"\n"+w:c+"\n"+t+"/event/"+i.Id+"#events_calendar";var ft=encodeURIComponent(c),et=p+ft,nt=o(i.StartDate),tt=o(i.EndDate),ot=nt?nt.day:u.getDate(),st=tt?tt.day:f.getDate();return{eventId:i.Id,twitterUrl:et,title:a,tech:s?s.Technologies:i.Technology,city:h.Name,cityId:h.Id,icon:g,iconColor:rt,country:k.Name,countryId:k.Id,hasRegistration:i.RegistrationLink?!0:!1,eventPassed:ut,regLink:i.RegistrationLink,startDate:u.valueOf(),lastDate:f.valueOf(),firstDay:ot,firstMonth:u.toLocaleString("en-us",{month:"short"}),firstYear:u.getFullYear(),lastDay:st,lastMonth:f.toLocaleString("en-us",{month:"short"}),lastYear:f.getFullYear(),isOneMonth:d,isOneYear:l,isOneDay:it}});return u.sort(d)}function d(n,t){var i=l(new Date(n.startDate),new Date(t.startDate));return i===0&&(i=l(new Date(n.lastDate),new Date(t.lastDate))),i}function l(n,t){var i=n.getFullYear()-t.getFullYear();return i===0&&(i=n.getMonth()-t.getMonth(),i===0&&(i=n.getDate()-t.getDate())),i}function e(n,t){var i=new Date(n),r=new Date(t),u=i.getFullYear()===r.getFullYear(),f=u&&i.getMonth()===r.getMonth(),e=u&&f&&i.getDate()===r.getDate();return firstDay=i.getDate(),firstMonth=i.toLocaleString("en-us",{month:"short"}),firstYear=i.getFullYear(),lastDay=r.getDate(),lastMonth=r.toLocaleString("en-us",{month:"short"}),lastYear=r.getFullYear(),e?firstMonth+" "+firstDay+", "+firstYear:f?firstMonth+" "+firstDay+" - "+lastDay+", "+firstYear:u?firstMonth+" "+firstDay+" - "+lastMonth+" "+lastDay+", "+firstYear:firstMonth+" "+firstDay+", "+firstYear+" - "+lastMonth+" "+lastDay+", "+lastYear}function g(){var u=$.grep(n.Events,function(t){return t.Id===n.CurrentEventId}),e,r;if(u.length>0){var t=u[0],o=document.getElementById("select002"),s=document.getElementById("select003"),f=$.grep(n.Topics,function(n){return n.Title===t.Technology});if(f.length>0){for(e=f[0],r=[].slice.call(s.options),i=0;i<r.length;i++)r[i].value!==e.Title&&(r[i].selected=!1);$("#select003").trigger("change.select2")}n.setSliderData(new Date(t.StartDate).valueOf(),new Date(t.StartDate).valueOf());o.value=t.CityId;$("#select002").trigger("change.select2")}}function o(n){var i,t;if(n&&(i=n.split("T"),i&&i[0]&&(t=i[0].split("-"),t&&t.length===3&&t[2])))return{day:+t[2],month:+t[1]-1,year:+t[0]}}var f,c;const a=864e5,s=36e5,h=24,u=6,v=990,y=40,p="https://twitter.com/intent/tweet?status=",w=n.TwitterImageUrl;var t=window.location.origin+window.location.pathname,b='<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\t viewBox="0 0 220 220" style="enable-background:new 0 0 220 220;" xml:space="preserve"><style type="text/css">\t.st0{fill:#FFFFFF;}<\/style><g><g><path class="colorized" d="M110,11C55.4,11,11.1,55.3,11.1,110s44.3,98.9,98.9,98.9c54.6-0.1,98.9-44.3,98.9-98.9\t\t\tC208.9,55.3,164.6,11,110,11z M72.7,26.3c-6.1,11.2-10.8,23.2-13.9,35.5c-6.4-2.3-12.5-5.2-18.4-8.6c-0.6-0.3-1.3-0.5-1.9-0.5\t\t\tC47.6,41.4,59.4,32.3,72.7,26.3z M35,57.4c0.2,0.9,0.8,1.6,1.6,2.1l0,0c6.5,3.8,13.4,7,20.5,9.5c-2.6,12.3-4,24.7-4.2,37.3H18.5\t\t\tC19.2,88.8,24.9,71.8,35,57.4z M35,162.6c-10.1-14.4-15.9-31.4-16.6-48.9h34.5c0.2,12.5,1.6,25,4.2,37.3c-7.1,2.5-14,5.7-20.5,9.5\t\t\tC35.9,160.9,35.3,161.7,35,162.6z M38.5,167.2c0.7,0,1.3-0.1,1.9-0.5c5.8-3.5,12-6.3,18.4-8.6c3.1,12.4,7.8,24.3,13.9,35.5\t\t\tC59.4,187.6,47.6,178.6,38.5,167.2z M106.3,201.5c-7.8-0.3-15.5-1.6-22.9-3.8c0-0.1-0.1-0.2-0.1-0.3c-8.1-12.8-14-26.9-17.6-41.6\t\t\tc13.2-3.9,26.9-6,40.6-6.3V201.5z M106.3,142.2c-14.3,0.2-28.5,2.4-42.2,6.4c-2.4-11.5-3.7-23.2-3.9-35h46.2V142.2z M106.3,106.3\t\t\tH60.2c0.2-11.8,1.5-23.5,3.9-35c13.7,4,27.9,6.1,42.2,6.4V106.3z M106.3,70.5c-13.8-0.2-27.4-2.4-40.6-6.3\t\t\tc3.6-14.7,9.6-28.8,17.6-41.6c0-0.1,0.1-0.2,0.1-0.3c7.4-2.3,15.1-3.5,22.9-3.8V70.5z M184.9,57.4c10.3,14.6,16.1,31.9,16.6,49.7\t\t\tc-0.6-0.5-1.4-0.8-2.2-0.8H167c-0.2-12.5-1.6-25-4.2-37.3c7.1-2.5,14-5.7,20.5-9.5C184.1,59.1,184.7,58.3,184.9,57.4z M181.5,52.8\t\t\tc-0.7,0-1.3,0.1-1.9,0.5c-5.8,3.5-12,6.3-18.4,8.6c-3.1-12.4-7.8-24.3-13.9-35.5C160.6,32.3,172.3,41.4,181.5,52.8z M113.7,18.5\t\t\tc7.8,0.3,15.5,1.6,22.9,3.8c0,0.1,0.1,0.2,0.1,0.3c8.1,12.8,14,26.9,17.6,41.6c-13.2,3.9-26.9,6-40.6,6.3V18.5z M113.7,77.7\t\t\tc14.3-0.2,28.5-2.4,42.2-6.4c2.4,11.5,3.7,23.2,3.9,35h-46.2L113.7,77.7L113.7,77.7z M113.7,113.6h46.2c-0.2,11.8-1.5,23.5-3.9,35\t\t\tc-13.7-4-27.9-6.1-42.2-6.4L113.7,113.6L113.7,113.6z M136.6,197.6c-7.4,2.3-15.1,3.5-22.9,3.8v-52c13.8,0.2,27.4,2.4,40.6,6.3\t\t\tc-3.6,14.7-9.6,28.8-17.6,41.6C136.6,197.4,136.6,197.5,136.6,197.6z M147.3,193.6c6.1-11.2,10.8-23.2,13.9-35.5\t\t\tc6.4,2.3,12.5,5.2,18.4,8.6c0.6,0.3,1.2,0.5,1.9,0.5C172.3,178.6,160.6,187.6,147.3,193.6z M184.9,162.6c-0.2-0.9-0.8-1.6-1.6-2.1\t\t\tc-6.5-3.8-13.4-7-20.5-9.5c2.6-12.3,4-24.7,4.2-37.3h32.3c0.8,0,1.6-0.3,2.2-0.8C201,130.7,195.2,148,184.9,162.6z"/><\/g><\/g><g><g><path class="colorized" d="M56.9,209.6c-0.7-1.9-2.8-2.9-4.7-2.2l0,0c-18.6,6.9-32.6,6.8-39.5-0.1c-7.7-7.7-7-23.7,2.1-45\t\t\tc0.8-1.9-0.1-4-2-4.8c-1.9-0.8-4,0.1-4.8,1.9c-10.4,24.6-10.6,43-0.5,53.1c5.6,5.2,13,7.8,20.6,7.4c9.1-0.3,18.2-2.2,26.6-5.6\t\t\tC56.6,213.6,57.6,211.5,56.9,209.6z"/><\/g><\/g><g><g><path class="colorized" d="M212.6,7.4c-9.2-9.2-25.6-9.8-47.3-1.8c-1.9,0.7-2.9,2.8-2.2,4.7c0.7,1.9,2.8,2.9,4.7,2.2\t\t\tc18.6-6.9,32.6-6.8,39.5,0.1c7.7,7.7,7,23.7-2.1,45c-0.8,1.9,0.1,4,2,4.8c1.9,0.8,4-0.1,4.8-1.9C222.5,35.9,222.6,17.5,212.6,7.4z\t\t\t"/><\/g><\/g><g><g><path class="colorized" d="M60.5,8C35.9-2.5,17.5-2.6,7.4,7.4C-1.8,16.6-2.4,33,5.7,54.7c0.7,1.9,2.8,2.9,4.7,2.2\t\t\tc1.9-0.7,2.9-2.8,2.2-4.7c-6.9-18.6-6.8-32.6,0.1-39.5c7.7-7.7,23.7-6.9,45,2.1c1.9,0.8,4-0.1,4.8-2S62.4,8.7,60.5,8z"/><\/g><\/g><g><g><path class="colorized" d="M212,159.4c-0.8-1.9-2.9-2.7-4.8-1.9c-1.9,0.8-2.7,2.9-2,4.8c0,0,0,0,0,0c9,21.4,9.8,37.4,2.1,45\t\t\tc-7.7,7.7-23.7,7-45-2.1c-1.9-0.8-4,0.1-4.8,2c-0.8,1.9,0.1,4,1.9,4.8c10.2,4.7,21.2,7.4,32.5,8c7.6,0.4,15-2.3,20.6-7.4\t\t\tC222.6,202.4,222.4,184.1,212,159.4z"/><\/g><\/g><\/svg>',r=k(n.Events);n.minDate=Math.min.apply(null,$.map(n.Events,function(n){var t=o(n.StartDate),i=t?new Date(t.year,t.month,t.day):new Date(n.StartDate);return i.valueOf()}));n.maxDate=Math.max.apply(null,$.map(n.Events,function(n){var t=o(n.EndDate),i=t?new Date(t.year,t.month,t.day):new Date(n.EndDate);return i.valueOf()}));f=new Date;n.firstDay=new Date(f.getFullYear(),f.getMonth(),f.getDate(),0,0,0).valueOf();n.lastDay=n.maxDate;new Date(n.lastDay)<new Date(n.firstDay)&&(c=n.lastDay,n.lastDay=n.firstDay,n.firstDay=c);n.setSliderData=function(t,i){$("#slider-range").slider("setValue",[t,i],!0);n.filterEvents()};n.resetFilters=function(t){var f,s,e,h,o;t.preventDefault();var r=document.getElementById("select001"),u=document.getElementById("select002"),c=document.getElementById("select003");for(u.length=1,r.length=1,f=n.Countries.sort(n.compare),i=0;i<n.Countries.length;i++)s=new Option(f[i].Name,f[i].Id),r.options[r.options.length]=s;for(e=n.Cities.sort(n.compare),i=0;i<n.Cities.length;i++)h=new Option(e[i].Name,e[i].Id),u.options[u.options.length]=h;for(o=[].slice.call(c.options),i=0;i<o.length;i++)o[i].selected=!0;$("#select003").trigger("change.select2");n.setSliderData(n.firstDay,n.lastDay);$("#registration_available_1").is(":checked")&&($("#registration_available_1").prop("checked",!1),n.filterEvents());$("#reset-filter-calendar-events").addClass("disabled")};n.toggleSocials=function(n){var t,i;n.preventDefault();t=$(n.target).closest("a");t.toggleClass("btn_times").toggleClass("btn_share-alt");t.find(".fa.fa-stack-1x.fa-inverse").toggleClass("fa-times").toggleClass("fa-share-alt");i=t.siblings();i.animate({width:"toggle"},350)};n.shareFb=function(i,u){i.preventDefault();var f=$.grep(r,function(n){return+n.eventId==+u})[0];n.UseFbOverrideOG&&f.regLink?FB.ui({method:"share_open_graph",action_type:"og.likes",quote:t,hashtag:"#MSOpenHack",action_properties:JSON.stringify({object:{"og:url":f.regLink,"og:title":"Microsoft OpenHack: "+f.title+" | "+e(new Date(f.startDate),new Date(f.lastDate))+" | "+f.city,"og:description":"Check out this Microsoft OpenHack. You might be interested in this event.","og:image":t+"/content/img/socials/social_fb.png"}})},function(){}):FB.ui({method:"share",href:t+"/event/"+u+"#events_calendar",hashtag:"#MSOpenHack"},function(){})};n.shareLinkedInNew=function(n,i){n.preventDefault();var r=new XMLHttpRequest;r.open("GET",t+"api/linkedin/auth?eventid="+i);r.onreadystatechange=function(){if(r.readyState===XMLHttpRequest.DONE&&r.status===200){var n=JSON.parse(r.responseText),t=n.data;window.open(n.data,"_blank","toolbar=yes,top=500,left=500,width=1000,height=1000")}else console.log(r.status+": "+r.statusText)};r.send()};n.shareEmail=function(n,i){var s;n.preventDefault();n.stopPropagation();var f=$.grep(r,function(n){return+n.eventId==+i})[0],o="Microsoft OpenHack: "+f.title+" | "+e(new Date(f.startDate),new Date(f.lastDate))+" | "+f.city,u="Hello,\n\nPlease check out the below information on a Microsoft OpenHack.\n\n";u+="******************\nEvent Details\n******************\n\n";u+="Event: "+f.title+" | "+e(new Date(f.startDate),new Date(f.lastDate))+" | "+f.city+"\n";u+=f.regLink?"Registration link: "+f.regLink+" \n\n":"Registration link: "+t+"event/"+i+"#events_calendar \n\n";u+="Check out more details at: https://www.openhack.microsoft.com \n\n";u+="******************\nAbout OpenHack\n******************\n";u+="Microsoft OpenHack is a developer focused event where a wide variety of participants (Open) learn through hands-on experimentation (Hack) using challenges based on real world customer engagements designed to mimic the developer journey.\n\n";u+="OpenHack is targeted towards developers both new and familiar with the Microsoft ecosystem with activities focused on hands-on, code-with experiences versus formal session-based presentations. You will get an opportunity to network with fellow industry peers and other professional developers from large enterprises as well as Microsoft engineers.\n\n";u+="******************\n\n";u+="If you prefer I not forward you these types of communications, just let me know. To learn how to manage your contact preferences for other parts of Microsoft, please read our Privacy Statement.  http://go.microsoft.com/fwlink/?LinkId=521839. \n";u+="Microsoft Corporation, One Microsoft Way, Redmond, WA 98052 USA";u+="\n\n\n";o=encodeURIComponent(o);u=encodeURIComponent(u);s="mailto:?to=&subject="+o+"&body="+u;window.location.href=s};n.cityChanged=function(){n.filterEvents()};n.contryChanged=function(t){var u=document.getElementById("select002"),r;for(u.length=1,r=+t.value<0?n.Cities:$.grep(n.Cities,function(n){return n.CountryId===+t.value}),r=r.sort(n.compare),i=0;i<r.length;i++)u.options[u.options.length]=new Option(r[i].Name,r[i].Id);n.filterEvents()};n.technologyChanged=function(){n.filterEvents()};n.onlyRegistered=function(){n.filterEvents()};$(document).ready(function(){var i=$("#event-template").html(),r=$("#pagination-template").html(),t;n.createCalendarEvents=Handlebars.compile(i);n.createPagination=Handlebars.compile(r);$("#slider-range").slider({min:n.minDate,max:n.maxDate,step:a,range:!0,value:[n.firstDay,n.lastDay]});$("#select001").select2({theme:"bootstrap",minimumResultsForSearch:-1,placeholder:"Country"});$("#select002").select2({theme:"bootstrap",minimumResultsForSearch:-1,placeholder:"City"});$("#select003").select2MultiCheckboxes({templateSelection:function(n,t){return n.length===0?"Technology Topic":"Technology Topics: "+n.length+" of "+t},width:"auto"});$(".slider-time-1").datepicker("update",new Date(n.firstDay));$(".slider-time-1").datepicker("setEndDate",new Date(n.lastDay));$(".slider-time-1").datepicker("setStartDate",new Date(n.minDate));$(".slider-time-2").datepicker("update",new Date(n.lastDay));$(".slider-time-2").datepicker("setStartDate",new Date(n.firstDay));$(".slider-time-2").datepicker("setEndDate",new Date(n.maxDate));$(".slider-time-2").datepicker().on("hide",function(n){n.currentTarget.blur()});$(".slider-time-1").datepicker().on("hide",function(n){n.currentTarget.blur()});t=function(t){var i=new Date(t.value[0]),r=new Date(t.value[1]);i.getHours()!==0&&(i=new Date(t.value[0]+s*(h-i.getHours())));r.getHours()!==0&&(r=new Date(t.value[1]+s*(h-r.getHours())));$(".slider-time-1").datepicker("setEndDate",r);$(".slider-time-2").datepicker("setStartDate",i);$(".slider-time-1").datepicker("update",i);$(".slider-time-2").datepicker("update",r);n.filterEvents()};$("#slider-range").on("slide",t);$("#slider-range").on("slideStart",t);$(".slider-time-1").datepicker().on("changeDate",function(t){var i=$("#slider-range").slider("getValue");n.setSliderData(t.date.valueOf(),i[1]);$(".slider-time-2").datepicker("setStartDate",t.date)});$(".slider-time-2").datepicker().on("changeDate",function(t){var i=$("#slider-range").slider("getValue");n.setSliderData(i[0],t.date.valueOf());$(".slider-time-11").datepicker("setEndDate",t.date)});g();$(window).width()<v&&(n.isMobileWindow=!0);window.preSelectedTopic!=""&&setTimeout(function(){$("html, body").animate({scrollTop:$('a[name="events_calendar"]').offset().top},2e3)},2e3)});n.compare=function(n,t){return n.Name<t.Name?-1:n.Name>t.Name?1:0};n.pageChanged=function(t,i,r){var o,h,c,s,f,e,a;t.preventDefault();o=$("ul.pagination").find("li.page-item.active");i==="next"&&(h=o.text(),i=+h+1);i==="prev"&&(c=o.text(),i=+c-1);s=$("ul.pagination").find('li.page-item[data-page-number="'+i+'"]');s.length>0&&(o.removeClass("active"),s.addClass("active"));f=$("ul.pagination").find("#next-page");+i==+r?f.hasClass("disabled")||f.addClass("disabled"):f.hasClass("disabled")&&f.removeClass("disabled");e=$("ul.pagination").find("#prev-page");+i==1?e.hasClass("disabled")||e.addClass("disabled"):e.hasClass("disabled")&&e.removeClass("disabled");var l=(+i-1)*u,v=n.createCalendarEvents(n.allEventsCards.slice(l,l+u)),p=$(".width_100_pager").detach();$(".events_calendar_list").html(v).append(p);n.isMobileWindow&&($(".events_calendar_list")[0].scrollIntoView(),a=$(window).scrollTop(),$(window).scrollTop(a-y));$(".btn_share-alt").show()};n.filterEvents=function(){var t,s=+document.getElementById("select001").value,h=+document.getElementById("select002").value,y=$.map($.grep([].slice.call(document.getElementById("select003").options),function(n){return n.selected}),function(n){return n.value.toLowerCase().trim()}),l=$("#slider-range").slider("getValue"),a=$("#registration_available_1").is(":checked"),f=l[0],e=l[1],v,o,c,i;for(h!==-1?t=$.grep(r,function(n){return n.cityId===h}):s!==-1?(v=$.map($.grep(n.Cities,function(n){return n.CountryId===s}),function(n){return n.Id}),t=$.grep(r,function(n){return v.indexOf(n.cityId)!==-1})):t=r,a&&(t=$.grep(t,function(n){return!n.eventPassed&&n.hasRegistration})),t=$.grep(t,function(n){return y.indexOf(n.title.toLowerCase().trim())!==-1}),t=$.grep(t,function(n){var t=new Date(n.startDate),i=new Date(n.lastDate),r=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0).valueOf(),u=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0).valueOf();return r>=f&&r<=e||u>=f&&u<=e||r<=f&&u>=e}),n.allEventsCards=t,o=[],c=Math.ceil(n.allEventsCards.length/u),i=0;i<c;i++)o.push({title:i+1,activeClass:i===0?"active":""});var p={prevDisabled:"disabled",nextDisabled:"",pages:o,totalPages:c,showPagination:o.length>1?!0:!1,eventExist:n.allEventsCards.length>0},w=n.createCalendarEvents(n.allEventsCards.slice(0,u)),b=n.createPagination(p);$(".events_calendar_list").html(w).append(b);f!==n.firstDay||e!==n.lastDay||h!==-1||s!==-1||$.grep([].slice.call(document.getElementById("select003").options),function(n){return!n.selected}).length>0||a?$("#reset-filter-calendar-events").removeClass("disabled"):$("#reset-filter-calendar-events").addClass("disabled");$(".btn_share-alt").show()}}var CookiesConsentService={firstScroll:!0,cookiesConsentEvent:new Event("cookies-consent"),tryShowCookiesConsentBanner:function(){CookiesConsentService.getCookiesConsentBannerAsync().done(CookiesConsentService.getCookiesConsentBannerHandler)},getCookiesConsentBannerAsync:function(){return $.get("/pages/landing/GetCookiesConsentBanner")},getCookiesConsentBannerHandler:function(n){var i=null,u,f,t,r;if(n&&n.Success&&n.Data){for(i=n.Data,u=document.getElementsByTagName("head")[0],t=0;t<i.Javascripts.length;t++)f=document.createElement("script"),f.src=i.Javascripts[t],u.appendChild(f);for(t=0;t<i.Stylesheets.length;t++)r=document.createElement("link"),r.rel="stylesheet",r.type="text/css",r.href=i.Stylesheets[t],u.appendChild(r);if(document.body.insertAdjacentHTML("afterbegin",i.Markup),CookiesConsentService.addOnScrollHandler(),typeof mscc=="undefined"||mscc.hasConsent())console.log("has consent or not needed"),typeof mscc!="undefined"&&console.log("has consent",mscc.hasConsent()),CookiesConsentService.onCookiesAdded();else{console.log("need consent");console.log(mscc);CookiesConsentService.addOnScrollHandler();typeof mscc!="undefined"&&console.log(mscc.hasConsent());mscc.on("consent",CookiesConsentService.onCookiesAdded)}}else typeof consentCookiesForPage=="function"&&consentCookiesForPage(),CookiesConsentService.initGoogleAnalytics()},addOnScrollHandler:function(){window.onscroll=function(){CookiesConsentService.firstScroll&&CookiesConsentService.onScrollFirstTime()}},consentCookies:function(){console.log("consent cookies");$.get("/pages/landing/ConsentCookiesBanner",function(n){n==="True"&&($("#msccBanner").remove(),typeof consentCookiesForPage=="function"&&consentCookiesForPage(),CookiesConsentService.initGoogleAnalytics())})},onCookiesAdded:function(){console.log("onCookiesAdded")},onScrollFirstTime:function(){CookiesConsentService.firstScroll=!1;CookiesConsentService.consentCookies()},initGoogleAnalytics:function(){$("head").append("                    <script async src = \"https://www.googletagmanager.com/gtag/js?id=UA-131150462-1\" ><\/script>                    <script>                    window.dataLayer = window.dataLayer || [];                    function gtag() { dataLayer.push(arguments); }                    gtag('js', new Date());                    gtag('config', 'UA-131150462-1');                    <\/script>")}};(function(n){if(typeof exports=="object"&&typeof module!="undefined")module.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var t;t=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this;t.clay=n()}})(function(){var n;return function t(n,i,r){function f(u,o){var h,c,s;if(!i[u]){if(!n[u]){if(h=typeof require=="function"&&require,!o&&h)return h(u,!0);if(e)return e(u,!0);c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[u]={exports:{}};n[u][0].call(s.exports,function(t){var i=n[u][1][t];return f(i?i:t)},s,s.exports,t,n,i,r)}return i[u].exports}for(var e=typeof require=="function"&&require,u=0;u<r.length;u++)f(r[u]);return f}({1:[function(n,t){"use strict";function i(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=n("./utils"),e=n("./lib/element-resize-event"),o=i(e),s=n("exportable"),h=i(s),c=function(){return function(){function n(t,i){f(this,n);var u;this.selector=t;this.el=typeof t=="string"?r.$(t):t;this.options=r.extend({resize:"both",absolute:!1},i);this.eventHanlers={};u=this.el.style;this.initialStyles={resize:u.resize,overflow:u.overflow,top:u.top,left:u.left,margin:u.margin,position:u.position};this.el.style.resize=this.options.resize;this.el.style.overflow="auto";this.options.absolute&&this.cloneElement();this.addEvents()}return u(n,[{key:"addEvents",value:function(){o["default"](this.el,function(){var n=this.eventHanlers.resize,t;n&&(t=this.el.getBoundingClientRect(),n(t,this.el))}.bind(this))}},{key:"on",value:function(n,t){return this.eventHanlers[n]=t,this}},{key:"cloneElement",value:function(){var n=this.el.cloneNode(),t=this.el.getBoundingClientRect(),i=this.el.offsetTop,r=this.el.offsetLeft;this.el.style.top=i+"px";this.el.style.left=r+"px";this.el.style.margin=0;this.el.style.position="absolute";n.innerHTML="";n.id="";n.className="";n.style.visibility="hidden";n.style.height=t.height+"px";n.style.width=t.width+"px";this.el.parentNode.insertBefore(n,this.el)}},{key:"reset",value:function(){this.el.style.resize=this.initialStyles.resize;this.el.style.overflow=this.initialStyles.overflow}}]),n}()};h["default"]({module:t,name:"Clay",definition:c})},{"./lib/element-resize-event":2,"./utils":4,exportable:3}],2:[function(n,t){"use strict";t.exports=function(n,t){function o(n){var t=n.target||n.srcElement;t.__resizeRAF__&&e(t.__resizeRAF__);t.__resizeRAF__=f(function(){var i=t.__resizeTrigger__;i.__resizeListeners__.forEach(function(t){t.call(i,n)})})}function h(){this.contentDocument.defaultView.__resizeTrigger__=this.__resizeElement__;this.contentDocument.defaultView.addEventListener("resize",o)}var u=window.document,s=u.attachEvent,r,f,e,i;typeof navigator!="undefined"&&(r=navigator.userAgent.match(/Trident/));f=function(){var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(n){return window.setTimeout(n,20)};return function(t){return n(t)}}();e=function(){var n=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout;return function(t){return n(t)}}();n.__resizeListeners__||(n.__resizeListeners__=[],s?(n.__resizeTrigger__=n,n.attachEvent("onresize",o)):(getComputedStyle(n).position=="static"&&(n.style.position="relative"),i=n.__resizeTrigger__=u.createElement("object"),i.setAttribute("role","none"),i.setAttribute("aria-label","resize sensor"),i.setAttribute("tabindex","-1"),i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),i.setAttribute("class","resize-sensor"),i.__resizeElement__=n,i.onload=h,i.type="text/html",r&&n.appendChild(i),i.data="about:blank",r||n.appendChild(i)));n.__resizeListeners__.push(t)}},{}],3:[function(t,i){"use strict";i.exports=function(t){var i=t.module,u=t.name,r=t.definition;typeof i!="undefined"&&i.exports?i.exports=r():typeof n=="function"&&n.amd&&n(r);typeof window!="undefined"&&(window[u]=r())}},{}],4:[function(n,t){"use strict";function i(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n}function r(n){return document.querySelector(n)}function u(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(n){window.setTimeout(n,1e3/60)}}t.exports={extend:i,$:r,raf:u}},{}]},{},[1])(1)})