var WSEditorsController=function(){function n(){}return n.CallBackPanelDisableEditors=function(n){this.SetEnableEditorsInContainer(n.GetMainElement(),!1)},n.SetEnableEditorsInContainer=function(n,t){ASPxClientControl.GetControlCollection().ProcessControlsInContainer(n,function(n){typeof n.SetEnabled=="function"&&n.SetEnabled(t)})},n.TextEditGotFocus=function(n){var t=n.GetCaptionCell();t!=null&&t.classList.remove("Invisible")},n.TextEditLostFocus=function(n){var i=n.GetValue(),t;n.nullText!=""&&(i==null||i=="")&&(t=n.GetCaptionCell(),t!=null&&t.classList.add("Invisible"))},n}(),ZeroGuid="00000000-0000-0000-0000-000000000000",CountryStateController=function(){function n(n,t,i){this.statesData=n;this.countryControl=t;this.stateControl=i;t.SelectedIndexChanged.AddHandler(this.CountryChanged.bind(this));t.Validation.AddHandler(this.CountryValidate.bind(this));t.Init.AddHandler(this.CountryInit.bind(this));i.SelectedIndexChanged.AddHandler(this.StateChanged.bind(this));i.Validation.AddHandler(this.StateValidation.bind(this))}return n.prototype.CountryInit=function(n){var i=this.stateControl.GetSelectedItem(),t;i==null?(t=n.GetSelectedItem(),t!=null&&this.UpdateStatesCollectionForCountry(t.value)):i.value==ZeroGuid&&this.StatesRemoveButNA()},n.prototype.CountryChanged=function(n){var t=n.GetSelectedItem();t!=null&&this.UpdateStatesCollectionForCountry(t.value)},n.prototype.CountryValidate=function(n,t){t.isValid=n.GetSelectedItem()!=null},n.prototype.StateChanged=function(n){var t=n.GetSelectedItem(),i,r;if(t!=null)if(t.value=="10000000-0000-0000-0000-000000000001")n.SetSelectedItem(null),n.HideDropDown();else{if(i=this.countryControl.GetSelectedItem(),t.value==ZeroGuid){i!=null&&this.IsStateRequired(i.value)&&this.countryControl.SetSelectedItem(null);return}r=this.statesData[t.value].CountryId;this.countryControl.SetSelectedItem(this.countryControl.FindItemByValue(r))}},n.prototype.StateValidation=function(n,t){var r=this.countryControl.GetSelectedItem(),i=n.GetSelectedItem();t.isValid=r==null&&i==null||i!=null},n.prototype.UpdateStatesCollectionForCountry=function(n){if(this.IsStateRequired(n)){this.stateControl.ClearItems();this.stateControl.BeginUpdate();for(var t in this.statesData)this.statesData[t].CountryId==n&&this.stateControl.AddItem(this.statesData[t].Name,t);this.stateControl.SetSelectedIndex(-1);this.stateControl.EndUpdate()}else this.stateControl.ClearItems(),this.stateControl.BeginUpdate(),this.stateControl.AddItem("N/A",ZeroGuid),this.stateControl.SetSelectedIndex(0),this.stateControl.EndUpdate()},n.prototype.IsStateRequired=function(n){for(var t in this.statesData)if(this.statesData[t].CountryId==n)return!0;return!1},n.prototype.StatesRemoveButNA=function(){this.stateControl.BeginUpdate();for(var n=this.stateControl.GetItemCount()-1;n>0;n--)this.stateControl.RemoveItem(n);this.stateControl.EndUpdate()},n}(),LightBoxController=function(){function n(){var t=this,n=document.getElementById("LightBox");n!=null&&(this.pages=n.querySelectorAll("[data-lightbox-page]"),this.pages.forEach(function(n){n.classList.contains("Current")||n.classList.add("Right");n.querySelectorAll("[data-lightbox-action-showpage]").forEach(function(n){n.addEventListener("click",function(i){i.preventDefault();t.ShowPage(n.getAttribute("data-lightbox-action-showpage"))})})}))}return n.prototype.ShowPage=function(n){var t=null,i=null,u=-1,f=-1,r=0;(this.pages.forEach(function(e){e.getAttribute("data-lightbox-page")==n&&(t=e,u=r);e.classList.contains("Current")&&(i=e,f=r);r++}),t!=null)&&i!=t&&(i.classList.remove("Current"),f<u?i.classList.add("Left"):i.classList.add("Right"),t.classList.remove("Right"),t.classList.remove("Left"),t.classList.add("Current"))},n}(),PerfectScrollerController=function(){function n(){var n=this,t;document.querySelectorAll('a[href^="#"]:not([href="#"])').forEach(function(t){t.addEventListener("click",function(i){i.preventDefault();n.ScrollToAnchor(t.getAttribute("href").substr(1))})});document.querySelectorAll("a[data-scroll-to]").forEach(function(t){t.addEventListener("click",function(i){i.preventDefault();n.ScrollTo(document.querySelector('[data-anchor="'+t.getAttribute("data-scroll-to")+'"]'))})});window.addEventListener("hashchange",function(){if(n.cancelHashChange){n.cancelHashChange=!1;return}n.ScrollToAnchor(n.GetHash())});t=this.GetHash();t!=null&&t!==""&&(this.SetHash(""),window.addEventListener("DOMContentLoaded",function(){n.ScrollToAnchor(t)}))}return Object.defineProperty(n.prototype,"LongScrollDelta",{get:function(){return 1500},enumerable:!1,configurable:!0}),n.prototype.SetHash=function(n){history?history.replaceState(undefined,undefined,"#"+n):location.replace("#"+n)},n.prototype.GetHash=function(){return document.location.hash.length>1?document.location.hash.substr(1):null},n.prototype.ScrollTo=function(t){var u=this,f,i,e,r;t!=null&&(this.cancelHashChange=!0,f=document.$scrollTop,i=this.GetScrollTo(t),Math.abs(f-i)>this.LongScrollDelta&&(e=f>i?i+this.LongScrollDelta:i-this.LongScrollDelta,window.scrollTo(0,e)),r=t.getAttribute("name"),r=r!=null?r:"",n.SmoothScrollToPosition(i,300,function(){r!=""&&u.GetHash()!=r&&(u.cancelHashChange=!0,t.setAttribute("name",""),u.SetHash(r),t.setAttribute("name",r));i=u.GetScrollTo(t);document.$scrollTop!=i&&n.SmoothScrollToPosition(i,100)}))},n.prototype.ScrollToAnchor=function(n){n!=null&&this.ScrollTo(document.querySelector('a[name="'+n+'"]'))},n.prototype.GetScrollTo=function(n){var t,r,i,u;if(n!=null){if(t=n,n.getAttribute("data-anchor")==null&&(t=t.nextElementSibling),t==null&&(t=n),r=t.getBoundingClientRect().top-document.documentElement.getBoundingClientRect().top-parseInt(getComputedStyle(t).marginTop,10),n.previousElementSibling==null){for(i=n.parentElement;i!=null&&i.previousElementSibling==null;)i=i.parentElement;i!=null&&(r-=parseInt(getComputedStyle(i).paddingTop,10))}return document.querySelectorAll(".Fixed").forEach(function(n){getComputedStyle(n).position=="fixed"&&(r-=n.offsetHeight)}),u=0,document.querySelectorAll(".sys-fixed").forEach(function(n){for(var t=n.previousElementSibling;t!=null&&t.getAttribute("data-control")!=="FixedBarPlaceholder";)t=t.previousElementSibling;t!=null&&t.scrollTop<r&&(u+=t.offsetHeight)}),r-u+1}},n.SmoothScrollToPosition=function(n,t,i){var o=this;i===void 0&&(i=null);var f=document.$scrollTop,s=n-f,u=0,e=16,h=function(n,t,i,r){return i*Math.sqrt(1-(n=n/r-1)*n)+t},r=function(){u+=e;window.scrollTo(0,h(u,f,s,t));u<t?window.requestAnimationFrame?window.requestAnimationFrame(r):setTimeout(r,e):i!=null&&i.call(o)};window.requestAnimationFrame?window.requestAnimationFrame(r):r()},n}(),VideoController;window.PerfectScroller=PerfectScrollerController;VideoController=function(){function n(){var n=this;document.querySelectorAll(".NativeVideo").forEach(function(t){var i=t.querySelector("video");i!=null&&(i.addEventListener("play",n.OnVideoStarted.bind(n,t)),i.addEventListener("pause",n.OnVideoPaused.bind(n,t)),i.addEventListener("ended",n.OnVideoEnded.bind(n,t)),t.addEventListener("click",n.VideoClick.bind(n,t,i)))})}return n.prototype.VideoClick=function(n,t){!t.paused&&!t.ended&&t.currentTime>0?t.pause():(n.classList.add("Playing"),t.play())},n.prototype.OnVideoPaused=function(n){n.classList.remove("Playing")},n.prototype.OnVideoEnded=function(n){n.classList.remove("Playing")},n.prototype.OnVideoStarted=function(n){n.classList.add("Playing")},n}()