1/*! 2 * Datepicker for Bootstrap v1.10.0 (https://github.com/uxsolutions/bootstrap-datepicker) 3 * 4 * Licensed under the Apache License v2.0 (https://www.apache.org/licenses/LICENSE-2.0) 5 */ 6function saveCookie(n,t,i,r){var u=new Date,f;u.setTime(u.getTime());i&&(i=i*864e5);f=new Date(u.getTime()+i);document.cookie=n+"="+escape(t)+(i?";expires="+f.toUTCString():"")+";path="+r+";samesite=lax"}function getCookie(n){var i=document.cookie.indexOf(n+"="),r=i+n.length+1,t;return!i&&n!=document.cookie.substring(0,n.length)?null:i==-1?null:(t=document.cookie.indexOf(";",r),t==-1&&(t=document.cookie.length),unescape(document.cookie.substring(r,t)))}function readCookie(n){var t=RegExp(""+n+"[^;]+").exec(document.cookie);return decodeURIComponent(!t?"":t.toString().replace(/^[^=]+./,""))}function deleteCookie(n){document.cookie=n+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}function queryString(n){if(hu=window.location.search.substring(1),r="",hu!=""){for(gy=hu.split("&"),i=0;i<gy.length;i++)ft=gy[i].split("="),ft[0]==n&&(r=ft[1]);return r}return""}function parseQueryString(n,t){if(r="",n!=""){for(gy=n.split("&"),i=0;i<gy.length;i++)ft=gy[i].split("="),ft[0]==t&&(r=ft[1]);return r}return""}function queryStringMvc(n){var i=new RegExp("\\/"+n+"\\.(.+?)\\/","i"),t=i.exec(window.location.href);return t?t[1]:""}function regExMatch(n,t,i){var r=n.exec(t);return r?r[i]:""}function getFormVal(n){var t=encodeURIComponent($.trim($("#"+n).val()));return t=="undefined"?"":t}function getCurrentUrl(n){if(arguments.length>0&&n)return window.location.pathname;var i=window.location,t=window.location.port;return i.protocol+"//"+i.hostname+(t!=""&&t!="80"&&t!="443"?":"+t:"")+i.pathname}function getCheckVal(n){var t=$("#"+n);return t.is(":checked")?encodeURIComponent(t.val()):""}function getCheckValGroup(n){var t="";return $("input[name='"+n+"']:checked").each(function(){t+=t?","+$(this).val():$(this).val()}),t}function getRadioVal(n){return encodeURIComponent($("input[name='"+n+"']:checked").val())}function disableButton(n,t){var i=$("#"+n);i.attr("data-orig-text",i.html());i.html(t);i.attr("disabled","disabled").addClass("disabled")}function reenableButton(n){var t=$("#"+n);t.html(t.attr("data-orig-text"));t.removeAttr("data-orig-text").removeAttr("disabled").removeClass("disabled")}function getSecToken(){return encodeURIComponent($("input[name=__RequestVerificationToken]").val())}function getSecTokenRaw(){return $("input[name=__RequestVerificationToken]").val()}function serializeSecToken(n){return n==!0?"__RequestVerificationToken="+getSecToken():"&__RequestVerificationToken="+getSecToken()}function handleResponseError(n){isAdmin=window.location.toString().indexOf("/admin")>-1?!0:!1;n.errType?window.location=(isAdmin?"/admin":"")+"/error/?err="+n.errType:n.redirect&&(window.location=n.redirect)}function formObj(){this.onStart=function(){disableButton(this.button,this.disabledText)};this.reenableForm=function(){reenableButton(this.button)};this.clearFields=function(){$("#"+this.button).closest("form").find("input").each(function(){var n=$(this),t;n.val("");n.attr("type")=="password"&&(t=$("#"+n.attr("id")+"-temp"),t.length>0&&(n.hide(),t.show()))})};this.onSuccess=function(){var n=this.resp;return n.errType?window.location=(this.isAdmin?"/admin":"")+"/error/?err="+n.errType:n.redirect?window.location=n.redirect:this.callback(n),n.IsValid?(this.formRedirects||this.reenableForm(),unhideCode(this.button),(!n.Data||n.Data&&!n.Data.overrideReset==!0)&&resetAction(this.button)):this.reenableForm(),!1};this.initForm=function(n){var t=this;$("#"+t.button).click(function(){if(!$(this).is(":visible")&&t.checkButtonVisibility||n&&!confirm(n))return!1;try{return removeFeedback(),t.onStart(),$.ajax({type:"POST",cache:!1,dataType:"json",url:t.service,data:t.data()+serializeSecToken(),timeout:t.timeout,success:function(n){t.resp=n;t.onSuccess()},error:function(){alert("An error occurred");t.reenableForm()}}),!1}catch(i){return t.reenableForm(),!1}})}}function showPopover(n,t,i,r){var u=$("#"+n),f,o,e;i&&!u.is(":visible")&&(u=$("#"+i));r&&!u.is(":visible")&&(u=$("#"+r));f=u.data("popover");f?(f.$tip.find(".content p").html(t),f.$tip.show()):(u.popover({content:t,trigger:"manual"}),u.popover("show"),window.pageYOffset>0&&(o=u.data("popover").$tip,e=parseInt(o.css("top").replace("px","")),e=e-window.pageYOffset,o.css("top",e+"px")))}function showAlert(n,t,i,r){i||(i="alert-error");t||(t="fas fa-times-circle mr-2");r||(r="alert");$("#"+r).after('<div class="alert '+i+'"><i class="'+t+'"><\/i> '+n+"<\/div>");
6window.location="#"}function showValidationError(n,t,i){var r,u,f;arguments.length===3?(u=$("#"+i+""),n=="service"&&u.find("#btn-services-dropdown").length&&(n="btn-services-dropdown"),r=u.find("#"+n+""),n=="file"&&u.find('[name="file"]').length&&(r=u.find('input[name="file"][type="file"]')),r.length==0&&(r=u.find('[name="'+n+'"]'))):(r=$("#"+n+""),r.length==0&&(r=$('input[name="'+n+'"]')));r.is("input[type=hidden]")&&r.closest(".form-group").length&&(r=r.closest(".form-group").find("input").eq(0));document.location.href.indexOf("/admin/")>-1?(r.closest(".control-group").addClass("error"),t&&(r.after('<span class="help-inline">'+t+"<\/span>"),f=r.closest(".controls"),f.children(".code").hide())):(r.is('input[name="agree"][type=checkbox]')||r.closest(".form-group").addClass("has-error"),(r.is("input")||r.is("select"))&&(r.is("input[type=hidden],input[type=checkbox],input[name=file][type=file]")||r.closest(".form-group").length&&(r.closest(".form-group").addClass("has-feedback"),r.is("input")&&!r.next("span.fa-exclamation-circle.form-control-feedback").length&&r.after("<span class='far fa-exclamation-circle form-control-feedback' aria-hidden='true'><\/span>"))))}function showValidationErrorMessage(n,t,i){var r,u,f;arguments.length===3?(u=$("#"+i+""),n=="service"&&u.find("#btn-services-dropdown").length&&(n="btn-services-dropdown"),r=u.find("#"+n+""),n=="file"&&u.find('[name="file"]').length&&(r=u.find('input[name="file"][type="file"]')),r.length==0&&(r=u.find('[name="'+n+'"]'))):(r=$("#"+n+""),r.length==0&&(r=$('input[name="'+n+'"]')));r.is("input[type=hidden]")&&r.closest(".form-group").length&&(r=r.closest(".form-group").find("input").eq(0));f=r;(r.is("input")||r.is("select")||r.is("button")||r.is("textarea"))&&!r.is("input[type=hidden]")&&r.closest(".form-group").length&&(r.parent().hasClass("input-group")&&r.parent().find(".help-block.help-line").length===0?f=r.parent():r.is('input[name="file"][type="file"]')?f=r.closest(".form-group").children(":last-child"):r.is("input[type=checkbox]")&&r.closest(".hp-disclaimer-message").length&&(r.closest(".hp-disclaimer-message").after('<div class="form-group has-error"><span><\/span><\/div>'),f=r.closest(".hp-disclaimer-message").next().children(":last-child")),f.siblings(".help-block.help-inline").length===0&&f.after('<span class="help-block help-inline">'+t+"<\/span>"))}function scrollToFirstError(){var n=$(".has-error").first(),t;n.length&&(t=$(".navbar").outerHeight()||0,$("html, body").animate({scrollTop:n.offset().top-t},500))}function hideValidationError(n){var t=$("#"+n+"");document.location.href.indexOf("/admin/")>-1&&(t.closest(".control-group").removeClass("error"),t.next(".help-inline").remove(),t.closest(".controls").children(".code").show())}function showValidationErrorField(n){var t=$("#"+n+"");t.addClass("error")}function showUploaderValidationError(n){var t=$(".uploadify-button-text");t.text(n);t.css("color","#B94A48");t.closest(".control-group").addClass("error")}function showEditorValidationError(n,t){t||(t=$(".sun-editor"));t.css("border","1px solid #B94A48");t.closest(".control-group").addClass("error");n&&t.after('<span class="help-inline">'+n+"<\/span>")}function showDateTimeValidationError(n,t){var i=$("#"+n+"");i.length&&(i.css("border","1px solid #B94A48"),i.closest(".control-group").addClass("error"),t&&i.closest(".form-group").append('<span class="help-inline">'+t+"<\/span>"))}function unhideCode(n){$("#"+n).closest("form").find(".code").show()}function resetAction(n){$("#"+n).closest("form").find("input[id$='action']").val("edit")}function removeFeedback(){$(".uploadify-button-text").css("color","#333333");$(".sun-editor").css("border","1px solid #DDDDDD");$(".error").removeClass("error");$(".has-error").removeClass("has-error");$(".has-feedback").removeClass("has-feedback");$(".form-control-feedback").remove();$(".help-inline:not([class*='no-clear'])").remove();$(".help-block:not([class*='no-clear'])").remove();$(".alert:not([class*='no-clear'])").hide()}function getSafeHtml(n){var t=$("#"+n).val();return t=encodeURIComponent(t),t.replace(/%/g,"~")}function convertSafeHtml(n){return n=encodeURIComponent(n),n.replace(/%/g,"~")}function decodeSafeHtml(n){return n=n.replace(/~/g,"%"),decodeURIComponent(n)}function isNumeric(n){return!isNaN(parseFloat(n))&&isFinite(n)}function trim(n,t){while(n.substring(0,1)==t)n=n.substring(1);while(n.substring(n.length-1)==t)n=n.substring(0,n.length-1);return n}function isHTML5UploadEnabled(){return typeof FormData!="undefined"}function initUpload(n,t,i){var r=n?$(n):$(".file-upload");r.length>0&&r.each(function(n,r){function ut(){var n;
6return $.ajax({type:"POST",cache:!1,dataType:"json","async":!1,url:"/ws/file/upload-token/",data:serializeSecToken(),success:function(t){t.Ok?n=t.token:handleResponseError(t)},error:function(){alert("An error occurred")}}),n}function h(n){if(nt++,p){var t=Math.random().toString(36).substring(2);v.append('<div id="Err_'+t+'" class="alert alert-error" style="margin-bottom: 5px; line-height: 150%">'+n+"<\/div>");setTimeout(function(){v.find("#Err_"+t).fadeOut("fast",function(){$(this).remove()})},5e3)}else alert(n)}var u=$(r),c=u.attr("id"),nt,s,a;c||(c="file-upload-"+n,u.attr("id",c));var ft=u.closest("form"),tt=u.attr("id")+"-queue",v=ft.find(".file-upload-queue").attr("id",tt),p=v.length>0?!0:!1,k=u.attr("id")+"-thumbnail",e=u.attr("id")+"-file",o=$("#"+k).length?$("#"+k):u.parent().find(".file-upload-thumbnail").attr("id",k),it=o.length>0?!0:!1,w=u.attr("data-size-limit"),d=parseInt(u.attr("data-file-limit")),b=u.attr("data-button-class"),y=u.attr("data-button-text"),rt=u.attr("data-uploader-path"),et=u.attr("data-filetype-desc"),g=u.attr("data-filetype-exts"),f=u.attr("data-redirect"),ot=u.attr("data-no-reenable"),l;if(o.length&&o.attr("src")==""&&o.hide(),u.hide(),nt=0,isHTML5UploadEnabled()){s=$(".uploader-btn[for='"+c+"']");s.length===0&&(u.after("<label for='"+c+"' class='uploader-btn "+b+"'>"+y+"<\/label>"),s=$(".uploader-btn[for='"+c+"']"));d>1&&u.attr("multiple","multiple");g&&u.attr("accept",g.replace(/\*/g,"").replace(/\;/g,","));a=function(){var n=!1;return i&&typeof i=="function"&&(n=i(),n||s.removeClass("disabled")),n&&(s.text(y),s.addClass("disabled")),n};function n(){s.text(y);a()||s.removeClass("disabled")}a();u.on("change",function(i){var c,r,p;if(!a()){c=i.target.files;s.addClass("disabled");s.text("Uploading...");r="";u[0].hasAttribute("data-filetype-exts")&&(r=u.attr("data-filetype-exts").replace(/\*/g,"").split(";").filter(n=>n));var b=0,v=0,y=0;$.each(c,function(n,i){var k,d;if(!a()){var f=c[b++],s=new FormData,p=0;r!=="undefined"&&r!==""&&r.length>0&&(k=f.name.toLowerCase().substr(f.name.lastIndexOf(".")),p=$.inArray(k,r));p>=0?w===""||f.size<w*1048576?(d=ut(function(){}),s.append("token",d),s.append("fileId",e),s.append("Filename",f.name),s.append("Filedata",i),y++,$.ajax({url:rt,enctype:"multipart/form-data",type:"POST",data:s,cache:!1,processData:!1,contentType:!1,success:function(n){typeof n.error=="undefined"?(t&&typeof t=="function"?t(u,f,n):(l=f.name,n==="error"?h("An error occurred processing "+f.name):n==="size-error"?h("Incorrect file size(W X H) used."):it?(o.attr("src",u.attr("data-thumbnail-url")+n),o.attr("data-filename",n),o.show()):e&&($("#"+e).attr("data-filename",n),$("#"+e).is("a")&&($("#"+e).attr("href",u.attr("data-thumbnail-url")+n),$("#"+e).show(),$("#"+e+"-delete").show()))),a()):h("An error occurred processing "+f.name);v++},error:function(){h("An error occurred processing "+f.name)}})):alert(f.name+" Exceeds file size limit "+w+" MB."):alert(f.name+" not allowed. Please use following file types: "+r)}});p=setInterval(function(){y===v&&(clearInterval(p),f&&f!==""?(f.indexOf("{lastFile}")>-1&&(f=l?f.replace("{lastFile}",encodeURIComponent(l)):""),window.location=f):n())},1e3);u.val("")}})}else{function n(){u.uploadify("settings","buttonText",y);u.uploadify("settings","buttonClass",b);u.uploadify("disable",!1)}u.uploadify({buttonClass:b,width:190,height:34,buttonText:y,progressData:"percentage",swf:"/js/lib/uploadify.swf",uploader:rt,queueID:p?tt:!1,auto:!0,fileTypeDesc:et,fileTypeExts:g,queueSizeLimit:d,multi:d>1?!0:!1,fileSizeLimit:w+"MB",removeTimeout:1,successTimeout:180,overrideEvents:["onDialogClose"],itemTemplate:p?'<div id="${fileID}" class="alert alert-success" style="margin-bottom: 5px; line-height: 150%"><button type="button" class="close" onclick="$(\'#${instanceID}\').uploadify(\'cancel\', \'${fileID}\')">×<\/button><span class="fileName">${fileName} (${fileSize})<\/span><span class="data"><\/span><\/div>':null,onFallback:function(){h("You need Flash installed to upload files")},onUploadSuccess:function(n,i){t&&typeof t=="function"?t(u,n,i):(l=n.name,i==="error"?h("An error occurred processing "+n.name):it?(o.attr("src",u.attr("data-thumbnail-url")+i),o.attr("data-filename",i),o.show(),u.trigger("uploaded",i)):e&&($("#"+e).data("data-filename",i),u.trigger("uploaded",i)))},onUploadStart:function(){var n=!1,t;i&&typeof i=="function"&&(n=i());n||(t=ut(),u.uploadify("settings","formData",{token:t,fileId:e}),u.uploadify("settings","buttonText","Uploading..."),u.uploadify("settings","buttonClass",b+" disabled"),u.uploadify("disable",!0))},onQueueComplete:function(){ot!="true"&&n();i&&typeof i=="function"&&i()&&u.uploadify("disable",!0)},onDialogClose:function(t){if(t.filesErrored>0&&h(t.errorMsg),p&&f)var i=setInterval(function(){var t=v.find("div[id^='SWFUpload']").length,r=v.find("div[id^='Err_']").length;t==0&&r==0&&(clearInterval(i),f.indexOf("{lastFile}")>-1&&(f=l?f.replace("{lastFile}",encodeURIComponent(l)):""),f!=""&&nt==0?window.location=f:n())},100);return!1},onSWFReady:function(){i&&typeof i=="function"&&i()&&u.uploadify("disable",!0)}})}})}function getCombinedAlert(n){var t="";for(var i in n.ErrFields)t+=(t==""?"* ":"\n* ")+n.ErrFields[i].replace(/^\*/,"");return t}function isIE(){var u,t=-1,n=window.navigator.userAgent,i=n.indexOf("MSIE "),f=n.indexOf("Trident/"),r;return i>0?t=parseInt(n.substring(i+5,n.indexOf(".",i)),10):f>0&&(r=n.indexOf("rv:"),t=parseInt(n.substring(r+3,n.indexOf(".",r)),10)),t>-1?t:u}function googleAutoComplete(n,t,i,r){var e=n.find(t),o,u,f;e.length&&(o=getGoogleMapsAPIKey(),(i===undefined||i===null||i==="")&&(i="address"),(r===undefined||r===null||r==="")&&(r=""),u=n.find('input[name="form"]').val(),u=u?u.trim():null,f=["us","ca"],typeof google=="undefined"||typeof window.google.maps=="undefined"?u!==null&&u!==""&&u!==undefined?$.post("/ws/form-validation-settings/",{formName:u}).done(n=>{n&&n.GoogleCountriesList!=null&&n.GoogleCountriesList.length&&!n.GoogleCountriesList.every(n=>n.toLowerCase()==="all")&&(f=n.GoogleCountriesList),$.getScript("https://maps.googleapis.com/ma
6ps/api/js?key="+o+"&libraries=places",function(){initGoogleAutocomplete(e,t,i,r,f)})}):$.getScript("https://maps.googleapis.com/maps/api/js?key="+o+"&libraries=places",function(){initGoogleAutocomplete(e,t,i,r,f)}):u!==null&&u!==""&&u!==undefined?$.post("/ws/form-validation-settings/",{formName:u}).done(n=>{n&&n.GoogleCountriesList!=null&&n.GoogleCountriesList.length&&!n.GoogleCountriesList.every(n=>n.toLowerCase()==="all")&&(f=n.GoogleCountriesList),initGoogleAutocomplete(e,t,i,r,f)}):initGoogleAutocomplete(e,t,i,r,f))}function initGoogleAutocomplete(n,t,i,r,u){var f=new window.google.maps.places.Autocomplete(n.get(0),{types:[i]}),e;f.setComponentRestrictions({country:u});f.addListener("place_changed",function(){var t=f.getPlace();n.val(t.formatted_address);n.attr("data-place-id",t.place_id);populateAddressHiddenFields(t.formatted_address,t.place_id,i,r);n.trigger("google-autocomplete-picked")});e=function(){$(t).attr("autocomplete")==="off"?$(t).attr("autocomplete","none"):setTimeout(e,100)};e();$(window).load(function(){$(t).attr("autocomplete","none")});n.on("focusout",function(){var n=$(this).val(),t=$(this).attr("data-place-id");populateAddressHiddenFields(n,t,i,r)})}function googleAutoCompleteSuggestion(n,t,i,r){var u=n.find(t),f;u.length&&(f=getGoogleMapsAPIKey(),(i===undefined||i===null||i==="")&&(i="address"),(r===undefined||r===null||r==="")&&(r=""),typeof google=="undefined"||typeof window.google.maps=="undefined"?$.getScript("https://maps.googleapis.com/maps/api/js?key="+f+"&libraries=places",function(){initGoogleAutocompleteSuggestion(u,t,i,r)}):initGoogleAutocompleteSuggestion(u,t,i,r))}function initGoogleAutocompleteSuggestion(n,t,i,r){var u=new window.google.maps.places.Autocomplete(n.get(0),{types:[i]}),f;u.setComponentRestrictions({country:["us","ca"]});u.addListener("place_changed",function(){var t=u.getPlace();n.val(t.formatted_address);n.attr("data-place-id",t.place_id);populateAddressHiddenFieldsSuggestion(t.formatted_address,t.place_id,i,r);n.trigger("google-suggestion-picked")});f=function(){$(t).attr("autocomplete")==="off"?$(t).attr("autocomplete","none"):setTimeout(f,100)};f();$(window).load(function(){$(t).attr("autocomplete","none")});n.on("focusout",function(){var n=$(this).val(),t=$(this).attr("data-place-id");populateAddressHiddenFieldsSuggestion(n,t,i,r)})}function parseGoogleAddress(n){var i=n?n.address_components:null,u=n?n.partial_match===!0?!0:!1:!1,t,r;if(this.address1="",this.address2="",this.city="",this.longcity="",this.neighborhood="",this.state="",this.county="",this.township="",this.zip="",this.country="",this.latitude="",this.longitude="",this.formatted_address="",i&&u===!1){for(t=0;t<i.length;t++)r=i[t].types[0],r==="street_number"?this.address1=i[t].short_name:r==="route"?this.address1+=" "+i[t].short_name:r==="locality"?(this.city=i[t].short_name,this.longcity=i[t].long_name):r==="administrative_area_level_1"?this.state=i[t].short_name:r==="administrative_area_level_2"?this.county=i[t].short_name:r==="administrative_area_level_3"?this.township=i[t].short_name:r==="postal_code"?this.zip=i[t].short_name:r==="country"?(this.country=i[t].short_name,this.country==="US"&&(this.country="USA")):r==="subpremise"?this.address2=i[t].short_name:r==="neighborhood"&&(this.neighborhood=i[t].short_name);this.city===""&&(this.neighborhood!==""?this.city=this.neighborhood:this.township!==""&&(this.city=this.township));this.formatted_address=n.formatted_address;this.latitude=n.geometry.location.lat();this.longitude=n.geometry.location.lng()}}function bestMatchedGoogleAddress(n){var t=n.length>0?n[0]:null;return n.length>1&&$.each(n,function(i){var r=[];return n[i].address_components.findIndex(function(n){n.types.indexOf("street_number")>-1?r.push("street_number"):n.types.indexOf("route")>-1?r.push("route"):n.types.indexOf("locality")>-1?r.push("locality"):n.types.indexOf("administrative_area_level_1")>-1?r.push("administrative_area_level_1"):n.types.indexOf("postal_code")>-1?r.push("postal_code"):n.types.indexOf("country")>-1&&r.push("country")}),r.includes("street_number")&&r.includes("route")&&r.includes("locality")&&r.includes("administrative_area_level_1")&&r.includes("postal_code")&&r.includes("country")?(t=n[i],!1):void 0}),t}function populateAddressHiddenFields(n,t,i,r,u){var f,e;if((i===undefined||i===null||i==="")&&(i="address"),(r===undefined||r===null||r==="")&&(r=""),(t===undefined||t===null)&&(t=""),f=function(n){n==="address"?($("#g-"+r+"address1").val(""),$("#g-"+r+"address2").val(""),$("#g-"+r+"city").val(""),$("#g-"+r+"state").val(""),$("#g-"+r+"zip").val(""),$("#g-"+r+"country").val(""),$("#g-"+r+"latitude").val(""),$("#g-"+r+"longitude").val(""),$("#g-"+r+"neighborhood").length&&$("#g-"+r+"neighborhood").val(""),$("#g-"+r+"fromcity").length&&$("#g-"+r+"fromcity").val(""),$("#g-"+r+"fromstate").length&&$("#g-"+r+"fromstate").val(""),$("#g-"+r+"fromzip").length&&$("#g-"+r+"fromzip").val(""),$("#g-"+r+"county").length&&$("#g-"+r+"county").val("")):n==="(regions)"&&($("#g-"+r+"city").val(""),$("#g-"+r+"state").val(""),$("#g-"+r+"zip").val(""),$("#g-"+r+"country").val(""))},n===""){f(i);return}if(t===""){if(u!==undefined){u();return}return}e=new window.google.maps.Geocoder;e.geocode({placeId:t},function(t,e){var c,s,l,o,h;e==="OK"?i==="(regions)"?(c=t.length>0?t[0]:null,s=new parseGoogleAddress(c),s.formatted_address!==""?(h=!0,s.city!==null&&s.city!==""?$(`#g-${r}city`).val(s.city):h=!1,n.toLowerCase().includes(s.state.toLowerCase())?$(`#g-${r}state`).val(s.state):h=!1,n.toLowerCase().includes(s.zip)?$(`#g-${r}zip`).val(s.zip):h=!1,n.toLowerCase().includes(s.country.toLowerCase())?$(`#g-${r}country`).val(s.country):h=!1,h||f(i)):f(i)):(l=bestMatchedGoogleAddress(t),o=new parseGoogleAddress(l),o.formatted_address!==""?(h=!0,$(`#g-${r}address1`).val(o.address1),$(`#g-${r}address2`).val(o.address2),$(`#g-${r}city`).val(o.city),$(`#g-${r}neighborhood`).val(o.neighborhood),n.toLowerCase().includes(o.state.toLowerCase())?$(`#g-${r}state`).val(o.state):h=!1,n.toLowerCase().includes(o.zip.toLowerCase())?$(`#g-${r}zip`).val(o.zip):h=!1,n.toLowerCase().includes(o.country.toLowerCase())?$(`#g-${r}country`).val(o.country):h=!1,$(`#g-${r}latitude`).val(o.latitude),$(`#g-${r}longitude`).val(o.longitude),$(`#g-${r}fromcity`).val(o.city),$(`#g-${r}fromstate`).val(o.state),$(`#g-${r}fromzip`).val(o.zip),$(`#g-${r}county`).val(o.county),h||f(i)):f(i)):f(i);u!==undefined&&u()})}function populateAddressHiddenFieldsSuggestion(n,t,i,r,u){var f,e;if((i===undefined||i===null||i==="")&&(i="address"),(r===undefined||r===null||r==="")&&(r=""),(t===undefined||t===null)&&(t=""),f=function(n){n==="address"?($("#g-"+r+"address2").val(""),$("#g-"+r+"city").val(""),$("#g-"+r+"state").val(""),$("#g-"+r+"zip").val(""),$("#g-"+r+"country").val(""),$("#g-"+r+"latitude").val(""),$("#g-"+r+"longitude").val(""),$("#g-"+r+"neighborhood").length&&$("#g-"+r+"neighborhood").val(""),$("#g-"+r+"fromcity").length&&$("#g-"+r+"fromcity").val(""),$("#g-"+r+"fromstate").length&&$("#g-"+r+"fromstate").val(""),$("#g-"+r+"fromzip").length&&$("#g-"+r+"fromzip").val(""),$("#g-"+r+"county").length&&$("#g-"+r+"county").val("")):n==="(regions)"&&($("#g-"+r+"city").val(""),$("#g-"+r+"state").val(""),$("#g-"+r+"zip").val(""),$("#g-"+r+"country").val(""))},n===""){f(i);return}if(t===""){if(u!==undefined){u();return}return}e=new window.google.maps.Geocoder;e.geocode({placeId:t},function(t,e){var c,s,l,o,h;e==="OK"?i==="(regions)"?(c=t.length>0?t[0]:null,s=new parseGoogleAddress(c),s.formatted_address!==""?(h=!0,n.toLowerCase().includes(s.city.toLowerCase())?$(`#g-${r}city`).val(s.city):n.toLowerCase().includes(s.longcity.toLowerCase())?$(`#g-${r}city`).val(s.city):h=!1,n.toLowerCase().includes(s.state.toLowerCase())?$(`#g-${r}state`).val(s.state):h=!1,n.toLowerCase().includes(s.zip)?$(`#g-${r}zip`).val(s.zip):h=!1,n.toLowerCase().includes(s.country.toLowerCase())?$(`#g-${r}country`).val(s.country):h=!1,h||f(i)):f(i)):(l=bestMatchedGoogleAddress(t),o=new parseGoogleAddress(l),o.formatted_address!==""?(h=!0,$(`#g-${r}address2`).val(o.address2),$(`#g-${r}city`).val(o.city),$(`#g-${r}neighborhood`).val(o.neighborhood),n.toLowerCase().includes(o.state.toLowerCase())?$(`#g-${r}state`).val(o.state):h=!1,n.toLowerCase().includes(o.zip.toLowerCase())?$(`#g-${r}zip`).val(o.zip):h=!1,n.toLowerCase().includes(o.country.toLowerCase())?$(`#g-${r}country`).val(o.country):h=!1,$(`#g-${r}latitude`).val(o.latitude),$(`#g-${r}longitude`).val(o.longitude),$(`#g-${r}fromcity`).val(o.city),$(`#g-${r}fromstate`).val(o.state),$(`#g-${r}fromzip`).val(o.zip),$(`#g-${r}county`).val(o.county),h?$(`#g-${r}address1`).val(o.address1):(t=null,f(i))):f(i)):f(i);u!==undefined&&u()})}function getGoogleMapsAPIKey(){var n="";
6return $.ajax({type:"POST",cache:!1,dataType:"json","async":!1,url:"/ws/googlemaps-apikey/",data:serializeSecToken(),success:function(t){n=t}}),n}function getGoogleCaptchaSiteKey(){var n="";return $.ajax({type:"POST",cache:!1,dataType:"json","async":!1,url:"/ws/googlerecaptcha-key/",data:"",success:function(t){n=t}}),n}function UpdateQueryString(n,t,i){var u,r,f;return i||(i=window.location.href),u=new RegExp("([?&])"+n+"=.*?(&|#|$)(.*)","gi"),u.test(i)?typeof t!="undefined"&&t!==null?i.replace(u,"$1"+n+"="+t+"$2$3"):(r=i.split("#"),i=r[0].replace(u,"$1$3").replace(/(&|\?)$/,""),typeof r[1]!="undefined"&&r[1]!==null&&(i+="#"+r[1]),i):typeof t!="undefined"&&t!==null?(f=i.indexOf("?")!==-1?"&":"?",r=i.split("#"),i=r[0]+f+n+"="+t,typeof r[1]!="undefined"&&r[1]!==null&&(i+="#"+r[1]),i):i}function addParameterToURL(n){return _url=location.href,_url+=(_url.split("?")[1]?"&":"?")+n}function GenerateGUID(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t=="x"?i:i&3|8).toString(16)})}function getUrlParameter(n){const u=window.location.search.substring(1),r=u.split("&");for(var t,i=0;i<r.length;i++)if(t=r[i].split("="),t[0]===n)return t[1]===undefined?!0:decodeURIComponent(t[1]);return null}function initCharCounter(){$.each($(".char-counter"),function(n,t){var r=$(t),u=r.attr("data-input-id"),f=r.attr("data-count"),i;if(u!==""&&(i=$("#"+u),i.length)){f!==""&&i.attr("maxlength",f);r.html(i.val().length);i.on("keyup",function(){r.html($(this).val().length)})}})}function initWordCounter(){$.each($(".word-counter"),function(n,t){var r=$(t),e=r.attr("data-input-id"),i,u,f,o;if(e!==""&&(i=$("#"+e),i.length)){u=i.val().trim();f=0;u!==""&&(o=u.trim().split(/\s+/),f=o.length);r.html(f);i.on("keyup",function(){var n=$(this).val().trim(),t=0,i;n!==""&&(i=n.trim().split(/\s+/),t=i.length);r.html(t)})}})}function initRatings(){$(".rating-selector").each(function(n){var t=$(this).attr("id"),i;t=t?t+"-value":"rating-hidden-"+(n+1);$("#"+t).length<=0&&(i=0,$(this).find("a").each(function(){$(this).hasClass("yes-value")&&i++}),$(this).append('<input id="'+t+'" name="'+t+'" type="hidden" value="'+i+'"/>'));$(this).find("a").each(function(){$(this).on("click",function(){$(this).siblings("a").removeClass("yes-value");$(this).nextAll("a").addClass("yes-value");$(this).addClass("yes-value");var n=5-$(this).index();$("#"+t).val(n)})});$(this).on("mouseenter",function(){$(this).find("a").removeClass("yes-value")});$(this).on("mouseleave",function(){var n=$("#"+t).val();$(this).find("a").each(function(t,i){t>=5-n&&n!=0&&$(i).addClass("yes-value")})})})}function initLazy(){if($(".lazyload").length){$(window).on("scroll",function(){n()});n();function n(){var n=$(window).scrollTop()+$(window).height();$(".lazyload").each(function(){var t=$(this).offset().top,i=$(this).attr("data-src");n>t&&$(this).removeClass("lazyload").attr("src",i).removeAttr("data-src")})}}}function initMultiSelection(){$(".services-dropdown-menu input").on("change",function(){var n=[];$(".form-selected-service:checked").each(function(){n.push("<span class='badge'>"+$(this).val()+"<\/span>")});n.length?$("#btn-services-dropdown div").html(n):$("#btn-services-dropdown div").html("Project Type")});$(".services-dropdown-menu input").trigger("change");$(".services-dropdown-menu").on("click",function(n){n.stopPropagation()})}function isMobile(){return $(window).width()<=991}function parseBooleanFromAttribute(n,t){var i=n.getAttribute(t);return i===null?!1:i.toLowerCase()==="true"}(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(jQuery)})(function(n,t){function f(){return new Date(Date.UTC.apply(Date,arguments))}function o(){var n=new Date;return f(n.getFullYear(),n.getMonth(),n.getDate())}function l(n,t){return n.getUTCFullYear()===t.getUTCFullYear()&&n.getUTCMonth()===t.getUTCMonth()&&n.getUTCDate()===t.getUTCDate()}function h(i,r){return function(){return r!==t&&n.fn.datepicker.deprecated(r),this[i].apply(this,arguments)}}function p(n){return n&&!isNaN(n.getTime())}function w(t,i){function s(n,t){return t.toLowerCase()}var u=n(t).data(),f={},e,o=new RegExp("^"+i.toLowerCase()+"([A-Z])"),r;i=new RegExp("^"+i.toLowerCase());for(r in u)i.test(r)&&(e=r.replace(o,s),f[e]=u[r]);return f}function b(t){var u={},i;
6if(r[t]||(t=t.split("-")[0],r[t]))return i=r[t],n.each(y,function(n,t){t in i&&(u[t]=i[t])}),u}var a=function(){var t={get:function(n){return this.slice(n)[0]},contains:function(n){for(var i=n&&n.valueOf(),t=0,r=this.length;t<r;t++)if(0<=this[t].valueOf()-i&&this[t].valueOf()-i<864e5)return t;return-1},remove:function(n){this.splice(n,1)},replace:function(n){n&&(Array.isArray(n)||(n=[n]),this.clear(),this.push.apply(this,n))},clear:function(){this.length=0},copy:function(){var n=new a;return n.replace(this),n}};return function(){var i=[];return i.push.apply(i,arguments),n.extend(i,t),i}}(),u=function(t,r){n.data(t,"datepicker",this);this._events=[];this._secondaryEvents=[];this._process_options(r);this.dates=new a;this.viewDate=this.o.defaultViewDate;this.focusDate=null;this.element=n(t);this.isInput=this.element.is("input");this.inputField=this.isInput?this.element:this.element.find("input");this.component=this.element.hasClass("date")?this.element.find(".add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn"):!1;this.component&&this.component.length===0&&(this.component=!1);this.isInline=this.o.isInline===null?!this.component&&!this.isInput:this.o.isInline;this.picker=n(i.template);this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow);this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow);this._buildEvents();this._attachEvents();this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu");this.o.rtl&&this.picker.addClass("datepicker-rtl");this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(n,t){return Number(t)+1});this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled});this._allow_update=!1;this.setViewMode(this.o.startView);this._allow_update=!0;this.fillDow();this.fillMonths();this.update();this.isInline&&this.show()},c,v,s,e,y,r,i;u.prototype={constructor:u,_resolveViewName:function(t){return n.each(i.viewModes,function(i,r){if(t===i||n.inArray(t,r.names)!==-1)return t=i,!1}),t},_resolveDaysOfWeek:function(t){return Array.isArray(t)||(t=t.split(/[,\s]*/)),n.map(t,Number)},_check_template:function(i){try{if(i===t||i==="")return!1;if((i.match(/[<>]/g)||[]).length<=0)return!0;var r=n(i);return r.length>0}catch(u){return!1}},_process_options:function(t){var u,h,l,s,c;if(this._o=n.extend({},this._o,t),u=this.o=n.extend({},this._o),h=u.language,r[h]||(h=h.split("-")[0],r[h]||(h=e.language)),u.language=h,u.startView=this._resolveViewName(u.startView),u.minViewMode=this._resolveViewName(u.minViewMode),u.maxViewMode=this._resolveViewName(u.maxViewMode),u.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,u.startView)),u.multidate!==!0&&(u.multidate=Number(u.multidate)||!1,u.multidate!==!1&&(u.multidate=Math.max(0,u.multidate))),u.multidateSeparator=String(u.multidateSeparator),u.weekStart%=7,u.weekEnd=(u.weekStart+6)%7,l=i.parseFormat(u.format),u.startDate!==-Infinity&&(u.startDate=u.startDate?u.startDate instanceof Date?this._local_to_utc(this._zero_time(u.startDate)):i.parseDate(u.startDate,l,u.language,u.assumeNearbyYear):-Infinity),u.endDate!==Infinity&&(u.endDate=u.endDate?u.endDate instanceof Date?this._local_to_utc(this._zero_time(u.endDate)):i.parseDate(u.endDate,l,u.language,u.assumeNearbyYear):Infinity),u.daysOfWeekDisabled=this._resolveDaysOfWeek(u.daysOfWeekDisabled||[]),u.daysOfWeekHighlighted=this._resolveDaysOfWeek(u.daysOfWeekHighlighted||[]),u.datesDisabled=u.datesDisabled||[],Array.isArray(u.datesDisabled)||(u.datesDisabled=u.datesDisabled.split(",")),u.datesDisabled=n.map(u.datesDisabled,function(n){return i.parseDate(n,l,u.language,u.assumeNearbyYear)}),s=String(u.orientation).toLowerCase().split(/\s+/g),c=u.orientation.toLowerCase(),s=n.grep(s,function(n){return/^auto|left|right|top|bottom$/.test(n)}),u.orientation={x:"auto",y:"auto"},c&&c!=="auto")if(s.length===1)switch(s[0]){case"top":case"bottom":u.orientation.y=s[0];break;case"left":case"right":u.orientation.x=s[0]}else c=n.grep(s,function(n){return/^left|right$/.test(n)}),u.orientation.x=c[0]||"auto",c=n.grep(s,function(n){return/^top|bottom$/.test(n)}),u.orientation.y=c[0]||"auto";if(u.defaultViewDate instanceof Date||typeof u.defaultViewDate=="string")u.defaultViewDate=i.parseDate(u.defaultViewDate,l,u.language,u.assumeNearbyYear);else if(u.defaultViewDate){var a=u.defaultViewDate.year||(new Date).getFullYear(),v=u.defaultViewDate.month||0,y=u.defaultViewDate.day||1;u.defaultViewDate=f(a,v,y)}else u.defaultViewDate=o()},_applyEvents:function(n){for(var i=0,f,r,u;i<n.length;i++){f=n[i][0];n[i].length===2?(r=t,u=n[i][1]):n[i].length===3&&(r=n[i][1],u=n[i][2]);f.on(u,r)}},_unapplyEvents:function(n){for(var i=0,f,r,u;i<n.length;i++)f=n[i][0],n[i].length===2?(u=t,r=n[i][1]):n[i].length===3&&(u=n[i][1],r=n[i][2]),f.off(r,u)},_buildEvents:function(){var t={keyup:n.proxy(function(t){n.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:n.proxy(this.keydown,this),paste:n.proxy(this.paste,this)};this.o.showOnFocus===!0&&(t.focus=n.proxy(this.show,this));this._events=this.isInput?[[this.element,t]]:this.component&&this.inputField.length?[[this.inputField,t],[this.component,{click:n.proxy(this.show,this)}]]:[[this.element,{click:n.proxy(this.show,this),keydown:n.proxy(this.keydown,this)}]];this._events.push([this.element,"*",{blur:n.proxy(function(n){this._focused_from=n.target},this)}],[this.element,{blur:n.proxy(function(n){this._focused_from=n.target},this)}]);this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":n.proxy(function(n){this.update(n.date)},this)}]);this._secondaryEvents=[[this.picker,{click:n.proxy(this.click,this)}],[this.picker,".prev, .next",{click:n.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:n.proxy(this.dayCellClick,this)}],[n(window),{resize:n.proxy(this.place,this)}],[n(document),{"mousedown touchstart":n.proxy(function(n){this.element.is(n.target)||this.element.find(n.target).length||this.picker.is(n.target)||this.picker.find(n.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents();this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents();this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,r){var u=r||this.dates.get(-1),f=this._utc_to_local(u);this.element.trigger({type:t,date:f,viewMode:this.viewMode,dates:n.map(this.dates,this._utc_to_local),format:n.proxy(function(n,t){arguments.length===0?(n=this.dates.length-1,t=this.o.format):typeof n=="string"&&(t=n,n=this.dates.length-1);t=t||this.o.format;var r=this.dates.get(n);return i.formatDate(r,t,this.o.language)},this)})},show:function(){if(!this.inputField.is(":disabled")&&(!this.inputField.prop("readonly")||this.o.enableOnReadonly!==!1))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&n(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(t){var i;if(t.originalEvent.clipboardData&&t.originalEvent.clipboardData.types&&n.inArray("text/plain",t.originalEvent.clipboardData.types)!==-1)i=t.originalEvent.clipboardData.getData("text/plain");else if(window.clipboardData)i=window.clipboardData.getData("Text");else return;this.setDate(i);this.update();t.preventDefault()},_utc_to_local:function(n){if(!n)return n;var t=new Date(n.getTime()+n.getTimezoneOffset()*6e4);return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(t=new Date(n.getTime()+t.getTimezoneOffset()*6e4)),t},_local_to_utc:function(n){return n&&new Date(n.getTime()-n.getTimezoneOffset()*6e4)},_zero_time:function(n){return n&&new Date(n.getFullYear(),n.getMonth(),n.getDate())},_zero_utc_time:function(n){return n&&f(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate())},getDates:function(){return n.map(this.dates,this._utc_to_local)},getUTCDates:function(){return n.map(this.dates,function(n){return new Date(n)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var n=this.dates.get(-1);return n!==t?new Date(n):null},clearDates:function(){this.inputField.val("");this._trigger("changeDate");this.update();this.o.autoclose&&this.hide()},setDates:function(){var n=Array.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,n),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=Array.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,n.map(t,this._utc_to_local)),this},setDate:h("setDates"),setUTCDate:h("setUTCDates"),remove:h("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var n=this.getFormattedDate();return this.inputField.val(n),this},getFormattedDate:function(r){r===t&&(r=this.o.format);var u=this.o.language;return n.map(this.dates,function(n){return i.formatDate(n,r,u)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(n){return this._process_options({startDate:n}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(n){return this._process_options({endDate:n}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(n){return this._process_options({daysOfWeekDisabled:n}),this.update(),this},setDaysOfWeekHighlighted:function(n){return this._process_options({daysOfWeekHighlighted:n}),this.update(),this},setDatesDisabled:function(n){return this._process_options({datesDisabled:n}),this.update(),this},place:function(){var r,y,p;if(this.isInline)return this;var f=this.picker.outerWidth(),s=this.picker.outerHeight(),e=n(this.o.container),h=e.width(),c=this.o.container==="body"?n(document).scrollTop():e.scrollTop(),l=e.offset(),a=[0];this.element.parents().each(function(){var t=n(this).css("z-index");t!=="auto"&&Number(t)!==0&&a.push(Number(t))});var v=Math.max.apply(Math,a)+this.o.zIndexOffset,u=this.component?this.component.parent().offset():this.element.offset(),w=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),o=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),t=u.left-l.left,i=u.top-l.top;return this.o.container!=="body"&&(i+=c),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(t-=f-o)):u.left<0?(this.picker.addClass("datepicker-orient-left"),t-=u.left-10):t+f>h?(this.picker.addClass("datepicker-orient-right"),t+=o-f):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left"),r=this.o.orientation.y,r==="auto"&&(y=-c+i-s,r=y<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+r),r==="top"?i-=s+parseInt(this.picker.css("padding-top")):i+=w,this.o.rtl?(p=h-(t+o),this.picker.css({top:i,right:p,zIndex:v})):this.picker.css({top:i,left:t,zIndex:v}),this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var u=this.dates.copy(),t=[],r=!1;return arguments.length?(n.each(arguments,n.proxy(function(n,i){i instanceof Date&&(i=this._local_to_utc(i));t.push(i)},this)),r=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),t=t&&this.o.multidate?t.split(this.o.multidateSeparator):[t],delete this.element.data().date),t=n.map(t,n.proxy(function(n){return i.parseDate(n,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),t=n.grep(t,n.proxy(function(n){return!this.dateWithinRange(n)||!n},this),!0),this.dates.replace(t),this.o.updateViewDate&&(this.viewDate=this.dates.length?new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?new Date(this.o.startDate):this.viewDate>this.o.endDate?new Date(this.o.endDate):this.o.defaultViewDate),r?(this.setValue(),this.element.change()):this.dates.length&&String(u)!==String(this.dates)&&r&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&u.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var i=this.o.weekStart,t="<tr>";for(this.o.calendarWeeks&&(t+='<th class="cw"> <\/th>');i<this.o.weekStart+7;)t+='<th class="dow',n.inArray(i,this.o.daysOfWeekDisabled)!==-1&&(t+=" disabled"),t+='">'+r[this.o.language].daysMin[i++%7]+"<\/th>";t+="<\/tr>";this.picker.find(".datepicker-days thead").append(t)}},fillMonths:function(){for(var t=this._utc_to_local(this.viewDate),i="",u,n=0;n<12;n++)u=t&&t.getMonth()===n?" focused":"",i+='<span class="month'+u+'">'+r[this.o.language].monthsShort[n]+"<\/span>";this.picker.find(".datepicker-months td").html(i)},setRange:function(t){t&&t.length?this.range=n.map(t,function(n){return n.valueOf()}):delete this.range;this.fill()},getClassNames:function(t){var i=[],r=this.viewDate.getUTCFullYear(),u=this.viewDate.getUTCMonth(),f=o();return t.getUTCFullYear()<r||t.getUTCFullYear()===r&&t.getUTCMonth()<u?i.push("old"):(t.getUTCFullYear()>r||t.getUTCFullYear()===r&&t.getUTCMonth()>u)&&i.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&l(t,f)&&i.push("today"),this.dates.contains(t)!==-1&&i.push("active"),this.dateWithinRange(t)||i.push("disabled"),this.dateIsDisabled(t)&&i.push("disabled","disabled-date"),n.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)!==-1&&i.push("highlighted"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&i.push("range"),n.inArray(t.valueOf(),this.range)!==-1&&i.push("selected"),t.valueOf()===this.range[0]&&i.push("range-start"),t.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},_fill_yearsView:function(i,r,u,f,e,o,s){for(var w="",c=u/10,b=this.picker.find(i),v=Math.floor(f/u)*u,p=v+c*9,k=Math.floor(this.viewDate.getFullYear()/c)*c,d=n.map(this.dates,function(n){return Math.floor(n.getUTCFullYear()/c)*c}),l,y,h,a=v-c;a<=p+c;a+=c)l=[r],y=null,a===v-c?l.push("old"):a===p+c&&l.push("new"),n.inArray(a,d)!==-1&&l.push("active"),(a<e||a>o)&&l.push("disabled"),a===k&&l.push("focused"),s!==n.noop&&(h=s(new Date(a,0,1)),h===t?h={}:typeof h=="boolean"?h={enabled:h}:typeof h=="string"&&(h={classes:h}),h.enabled===!1&&l.push("disabled"),h.classes&&(l=l.concat(h.classes.split(/\s+/))),h.tooltip&&(y=h.tooltip)),w+='<span class="'+l.join(" ")+'"'+(y?' title="'+y+'"':"")+">"+a+"<\/span>";b.find(".datepicker-switch").text(v+"-"+p);b.find("td").html(w)},fill:function(){var b=new Date(this.viewDate),s=b.getUTCFullYear(),nt=b.getUTCMonth(),v=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,et=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,y=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,ot=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,st=r[this.o.language].today||r.en.today||"",ht=r[this.o.language].clear||r.en.clear||"",ct=r[this.o.language].titleFormat||r.en.titleFormat,k=o(),lt=(this.o.todayBtn===!0||this.o.todayBtn==="linked")&&k>=this.o.startDate&&k<=this.o.endDate&&!this.weekOfDateIsDisabled(k),p,u,e,tt,c,l,w,h,g,ut,a,ft;if(!isNaN(s)&&!isNaN(nt)){for(this.picker.find(".datepicker-days .datepicker-switch").text(i.formatDate(b,ct,this.o.language)),this.picker.find("tfoot .t
6oday").text(st).css("display",lt?"table-cell":"none"),this.picker.find("tfoot .clear").text(ht).css("display",this.o.clearBtn===!0?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display",typeof this.o.title=="string"&&this.o.title!==""?"table-cell":"none"),this.updateNavArrows(),this.fillMonths(),e=f(s,nt,0),tt=e.getUTCDate(),e.setUTCDate(tt-(e.getUTCDay()-this.o.weekStart+7)%7),c=new Date(e),e.getUTCFullYear()<100&&c.setUTCFullYear(e.getUTCFullYear()),c.setUTCDate(c.getUTCDate()+42),c=c.valueOf(),l=[];e.valueOf()<c;){if(w=e.getUTCDay(),w===this.o.weekStart&&(l.push("<tr>"),this.o.calendarWeeks)){var it=new Date(+e+(this.o.weekStart-w-7)%7*864e5),rt=new Date(Number(it)+(11-it.getUTCDay())%7*864e5),d=new Date(Number(d=f(rt.getUTCFullYear(),0,1))+(11-d.getUTCDay())%7*864e5),at=(rt-d)/6048e5+1;l.push('<td class="cw">'+at+"<\/td>")}h=this.getClassNames(e);h.push("day");g=e.getUTCDate();this.o.beforeShowDay!==n.noop&&(u=this.o.beforeShowDay(this._utc_to_local(e)),u===t?u={}:typeof u=="boolean"?u={enabled:u}:typeof u=="string"&&(u={classes:u}),u.enabled===!1&&h.push("disabled"),u.classes&&(h=h.concat(u.classes.split(/\s+/))),u.tooltip&&(p=u.tooltip),u.content&&(g=u.content));h=typeof n.uniqueSort=="function"?n.uniqueSort(h):n.unique(h);l.push('<td class="'+h.join(" ")+'"'+(p?' title="'+p+'"':"")+' data-date="'+e.getTime().toString()+'">'+g+"<\/td>");p=null;w===this.o.weekEnd&&l.push("<\/tr>");e.setUTCDate(e.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(l.join(""));ut=r[this.o.language].monthsTitle||r.en.monthsTitle||"Months";a=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?ut:s).end().find("tbody span").removeClass("active");n.each(this.dates,function(n,t){t.getUTCFullYear()===s&&a.eq(t.getUTCMonth()).addClass("active")});(s<v||s>y)&&a.addClass("disabled");s===v&&a.slice(0,et).addClass("disabled");s===y&&a.slice(ot+1).addClass("disabled");this.o.beforeShowMonth!==n.noop&&(ft=this,n.each(a,function(i,r){var f=new Date(s,i,1),u=ft.o.beforeShowMonth(f);u===t?u={}:typeof u=="boolean"?u={enabled:u}:typeof u=="string"&&(u={classes:u});u.enabled!==!1||n(r).hasClass("disabled")||n(r).addClass("disabled");u.classes&&n(r).addClass(u.classes);u.tooltip&&n(r).prop("title",u.tooltip)}));this._fill_yearsView(".datepicker-years","year",10,s,v,y,this.o.beforeShowYear);this._fill_yearsView(".datepicker-decades","decade",100,s,v,y,this.o.beforeShowDecade);this._fill_yearsView(".datepicker-centuries","century",1e3,s,v,y,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var u=new Date(this.viewDate),t=u.getUTCFullYear(),f=u.getUTCMonth(),e=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,s=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,o=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,h=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,i,r,n=1;switch(this.viewMode){case 4:n*=10;case 3:n*=10;case 2:n*=10;case 1:i=Math.floor(t/n)*n<=e;r=Math.floor(t/n)*n+n>o;break;case 0:i=t<=e&&f<=s;r=t>=o&&f>=h}this.picker.find(".prev").toggleClass("disabled",i);this.picker.find(".next").toggleClass("disabled",r)}},click:function(t){t.preventDefault();t.stopPropagation();var r,s,u,e;r=n(t.target);r.hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1);r.hasClass("today")&&!r.hasClass("day")&&(this.setViewMode(0),this._setDate(o(),this.o.todayBtn==="linked"?null:"view"));r.hasClass("clear")&&this.clearDates();r.hasClass("disabled")||(r.hasClass("month")||r.hasClass("year")||r.hasClass("decade")||r.hasClass("century"))&&(this.viewDate.setUTCDate(1),s=1,this.viewMode===1?(e=r.parent().find("span").index(r),u=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e)):(e=0,u=Number(r.text()),this.viewDate.setUTCFullYear(u)),this._trigger(i.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(f(u,e,s)):(this.setViewMode(this.viewMode-1),this.fill()));this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus();delete this._focused_from},dayCellClick:function(t){var r=n(t.currentTarget),u=r.data("date"),i=new Date(u);this.o.updateViewDate&&(i.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),i.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate));this._setDate(i)},navArrowsClick:function(t){var u=n(t.currentTarget),r=u.hasClass("prev")?-1:1;this.viewMode!==0&&(r*=i.viewModes[this.viewMode].navStep*12);this.viewDate=this.moveMonth(this.viewDate,r);this._trigger(i.viewModes[this.viewMode].e,this.viewDate);this.fill()},_toggle_multidate:function(n){var t=this.dates.contains(n);if(n||this.dates.clear(),t!==-1?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):this.o.multidate===!1?(this.dates.clear(),this.dates.push(n)):this.dates.push(n),typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(n,t){t&&t!=="date"||this._toggle_multidate(n&&new Date(n));(!t&&this.o.updateViewDate||t==="view")&&(this.viewDate=n&&new Date(n));this.fill();this.setValue();t&&t==="view"||this._trigger("changeDate");this.inputField.trigger("change");this.o.autoclose&&(!t||t==="date")&&this.hide()},moveDay:function(n,t){var i=new Date(n);return i.setUTCDate(n.getUTCDate()+t),i},moveWeek:function(n,t){return this.moveDay(n,t*7)},moveMonth:function(n,t){var f;if(!p(n))return this.o.defaultViewDate;if(!t)return n;var i=new Date(n.valueOf()),e=i.getUTCDate(),o=i.getUTCMonth(),s=Math.abs(t),r,u;if(t=t>0?1:-1,s===1)u=t===-1?function(){return i.getUTCMonth()===o}:function(){return i.getUTCMonth()!==r},r=o+t,i.setUTCMonth(r),r=(r+12)%12;else{for(f=0;f<s;f++)i=this.moveMonth(i,t);r=i.getUTCMonth();i.setUTCDate(e);u=function(){return r!==i.getUTCMonth()}}while(u())i.setUTCDate(--e),i.setUTCMonth(r);return i},moveYear:function(n,t){return this.moveMonth(n,t*12)},moveAvailableDate:function(n,t,i){do{if(n=this[i](n,t),!this.dateWithinRange(n))return!1;i="moveDay"}
6while(this.dateIsDisabled(n));return n},weekOfDateIsDisabled:function(t){return n.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1},dateIsDisabled:function(t){return this.weekOfDateIsDisabled(t)||n.grep(this.o.datesDisabled,function(n){return l(t,n)}).length>0},dateWithinRange:function(n){return n>=this.o.startDate&&n<=this.o.endDate},keydown:function(n){if(!this.picker.is(":visible")){(n.keyCode===40||n.keyCode===27)&&(this.show(),n.stopPropagation());return}var u=!1,t,i,r=this.focusDate||this.viewDate;switch(n.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide();n.preventDefault();n.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||this.o.daysOfWeekDisabled.length===7)break;t=n.keyCode===37||n.keyCode===38?-1:1;this.viewMode===0?n.ctrlKey?(i=this.moveAvailableDate(r,t,"moveYear"),i&&this._trigger("changeYear",this.viewDate)):n.shiftKey?(i=this.moveAvailableDate(r,t,"moveMonth"),i&&this._trigger("changeMonth",this.viewDate)):n.keyCode===37||n.keyCode===39?i=this.moveAvailableDate(r,t,"moveDay"):this.weekOfDateIsDisabled(r)||(i=this.moveAvailableDate(r,t,"moveWeek")):this.viewMode===1?((n.keyCode===38||n.keyCode===40)&&(t=t*4),i=this.moveAvailableDate(r,t,"moveMonth")):this.viewMode===2&&((n.keyCode===38||n.keyCode===40)&&(t=t*4),i=this.moveAvailableDate(r,t,"moveYear"));i&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),n.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate;this.o.keyboardNavigation&&(this._toggle_multidate(r),u=!0);this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.setValue();this.fill();this.picker.is(":visible")&&(n.preventDefault(),n.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();this.hide()}u&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))},setViewMode:function(n){this.viewMode=n;this.picker.children("div").hide().filter(".datepicker-"+i.viewModes[this.viewMode].clsName).show();this.updateNavArrows();this._trigger("changeViewMode",new Date(this.viewDate))}};c=function(t,i){n.data(t,"datepicker",this);this.element=n(t);this.inputs=n.map(i.inputs,function(n){return n.jquery?n[0]:n});delete i.inputs;this.keepEmptyValues=i.keepEmptyValues;delete i.keepEmptyValues;s.call(n(this.inputs),i).on("changeDate",n.proxy(this.dateUpdated,this));this.pickers=n.map(this.inputs,function(t){return n.data(t,"datepicker")});this.updateDates()};c.prototype={updateDates:function(){this.dates=n.map(this.pickers,function(n){return n.getUTCDate()});this.updateRanges()},updateRanges:function(){var t=n.map(this.dates,function(n){return n.valueOf()});n.each(this.pickers,function(n,i){i.setRange(t)})},clearDates:function(){n.each(this.pickers,function(n,t){t.clearDates()})},dateUpdated:function(i){var e;if(!this.updating&&(this.updating=!0,e=n.data(i.target,"datepicker"),e!==t)){var r=e.getUTCDate(),s=this.keepEmptyValues,o=n.inArray(i.target,this.inputs),u=o-1,f=o+1,h=this.inputs.length;if(o!==-1){if(n.each(this.pickers,function(n,t){t.getUTCDate()||t!==e&&s||t.setUTCDate(r)}),r<this.dates[u])while(u>=0&&r<this.dates[u]&&(this.pickers[u].element.val()||"").length>0)this.pickers[u--].setUTCDate(r);else if(r>this.dates[f])while(f<h&&r>this.dates[f]&&(this.pickers[f].element.val()||"").length>0)this.pickers[f++].setUTCDate(r);this.updateDates();delete this.updating}}},destroy:function(){n.map(this.pickers,function(n){n.destroy()});n(this.inputs).off("changeDate",this.dateUpdated);delete this.element.data().datepicker},remove:h("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};v=n.fn.datepicker;s=function(i){var f=Array.apply(null,arguments),r;if(f.shift(),this.each(function(){var s=n(this),t=s.data("datepicker"),h=typeof i=="object"&&i;if(!t){var l=w(this,"date"),a=n.extend({},e,l,h),v=b(a.language),o=n.extend({},e,v,l,h);s.hasClass("input-daterange")||o.inputs?(n.extend(o,{inputs:o.inputs||s.find("input").toArray()}),t=new c(this,o)):t=new u(this,o);s.data("datepicker",t)}typeof i=="string"&&typeof t[i]=="function"&&(r=t[i].apply(t,f))}
6),r===t||r instanceof u||r instanceof c)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");else return r};n.fn.datepicker=s;e=n.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:n.noop,beforeShowMonth:n.noop,beforeShowYear:n.noop,beforeShowDecade:n.noop,beforeShowCentury:n.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",isInline:null,keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0};y=n.fn.datepicker.locale_opts=["format","rtl","weekStart"];n.fn.datepicker.Constructor=u;r=n.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}};i={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(n){if(typeof n.toValue=="function"&&typeof n.toDisplay=="function")return n;var t=n.replace(this.validParts,'\0').split('\0'),i=n.match(this.validParts);if(!t||!t.length||!i||i.length===0)throw new Error("Invalid date format.");return{separators:t,parts:i}},parseDate:function(f,e,s,h){function et(n,t){return t===!0&&(t=10),n<100&&(n+=2e3,n>(new Date).getFullYear()+t&&(n-=100)),n}function ut(){var n=this.slice(0,l[c].length),t=l[c].slice(0,n.length);return n.toLowerCase()===t.toLowerCase()}var tt,g,l,y,it,c,rt,v,ft,d,w;if(!f)return t;if(f instanceof Date)return f;if(typeof e=="string"&&(e=i.parseFormat(e)),e.toValue)return e.toValue(f,e,s);if(tt={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},g={yesterday:"-1d",today:"+0d",tomorrow:"+1d"},f in g&&(f=g[f]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(f)){for(l=f.match(/([\-+]\d+)([dmwy])/gi),f=new Date,c=0;c<l.length;c++)y=l[c].match(/([\-+]\d+)([dmwy])/i),it=Number(y[1]),rt=tt[y[2].toLowerCase()],f=u.prototype[rt](f,it);return u.prototype._zero_utc_time(f)}l=f&&f.match(this.nonpunctuation)||[];var b={},nt=["yyyy","yy","M","MM","m","mm","d","dd"],a={yyyy:function(n,t){return n.setUTCFullYear(h?et(t,h):t)},m:function(n,t){if(isNaN(n))return n;for(t-=1;t<0;)t+=12;for(t%=12,n.setUTCMonth(t);n.getUTCMonth()!==t;)n.setUTCDate(n.getUTCDate()-1);return n},d:function(n,t){return n.setUTCDate(t)}},p,k;if(a.yy=a.yyyy,a.M=a.MM=a.mm=a.m,a.dd=a.d,f=o(),v=e.parts.slice(),l.length!==v.length&&(v=n(v).filter(function(t,i){return n.inArray(i,nt)!==-1}).toArray()),l.length===v.length){for(c=0,ft=v.length;c<ft;c++){if(p=parseInt(l[c],10),y=v[c],isNaN(p))switch(y){case"MM":k=n(r[s].months).filter(ut);p=n.inArray(k[0],r[s].months)+1;break;case"M":k=n(r[s].monthsShort).filter(ut);p=n.inArray(k[0],r[s].monthsShort)+1}b[y]=p}for(c=0;c<nt.length;c++)w=nt[c],w in b&&!isNaN(b[w])&&(d=new Date(f),a[w](d,b[w]),isNaN(d)||(f=d))}return f},formatDate:function(t,u,f){var e,s,o,h;if(!t)return"";if(typeof u=="string"&&(u=i.parseFormat(u)),u.toDisplay)return u.toDisplay(t,u,f);for(e={d:t.getUTCDate(),D:r[f].daysShort[t.getUTCDay()],DD:r[f].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:r[f].monthsShort[t.getUTCMonth()],MM:r[f].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()},e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,t=[],s=n.extend([],u.separators),o=0,h=u.parts.length;o<=h;o++)s.length&&t.push(s.shift()),t.push(e[u.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"><\/th><\/tr><tr><th class="prev">'+e.templates.leftArrow+'<\/th><th colspan="5" class="datepicker-switch"><\/th><th class="next">'+e.templates.rightArrow+"<\/th><\/tr><\/thead>",contTemplate:'<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"><\/th><\/tr><tr><th colspan="7" class="clear"><\/th><\/tr><\/tfoot>'};i.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+i.headTemplate+"<tbody><\/tbody>"+i.footTemplate+'<\/table><\/div><div class="datepicker-months"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-years"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-decades"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-centuries"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+"<\/table><\/div><\/div>";n.fn.datepicker.DPGlobal=i;n.fn.datepicker.noConflict=function(){return n.fn.datepicker=v,this};n.fn.datepicker.version="1.10.0";n.fn.datepicker.deprecated=function(n){var t=window.console;t&&t.warn&&t.warn("DEPRECATED: "+n)};n(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var i=n(this);i.data("datepicker")||(t.preventDefault(),s.call(i,"show"))});
6n(function(){s.call(n('[data-provide="datepicker-inline"]'))})}),function(n){"use strict";typeof define=="function"&&define.amd?define(["jquery"],n):typeof module!="undefined"&&module.exports?module.exports=n(require("jquery")):n(jQuery)}(function(n){var e=-1,r=-1,i=function(n){return parseFloat(n)||0},o=function(t){var f=1,e=n(t),u=null,r=[];return e.each(function(){var t=n(this),e=t.offset().top-i(t.css("margin-top")),o=r.length>0?r[r.length-1]:null;o===null?r.push(t):Math.floor(Math.abs(u-e))<=f?r[r.length-1]=o.add(t):r.push(t);u=e}),r},u=function(t){var i={byRow:!0,property:"height",target:null,remove:!1};return typeof t=="object"?n.extend(i,t):(typeof t=="boolean"?i.byRow=t:t==="remove"&&(i.remove=!0),i)},t=n.fn.matchHeight=function(i){var r=u(i),f;return r.remove?(f=this,this.css(r.property,""),n.each(t._groups,function(n,t){t.elements=t.elements.not(f)}),this):this.length<=1&&!r.target?this:(t._groups.push({elements:this,options:r}),t._apply(this,r),this)},f;t.version="master";t._groups=[];t._throttle=80;t._maintainScroll=!1;t._beforeUpdate=null;t._afterUpdate=null;t._rows=o;t._parse=i;t._parseOptions=u;t._apply=function(r,f){var e=u(f),s=n(r),c=[s],l=n(window).scrollTop(),a=n("html").outerHeight(!0),h=s.parents().filter(":hidden");return h.each(function(){var t=n(this);t.data("style-cache",t.attr("style"))}),h.css("display","block"),e.byRow&&!e.target&&(s.each(function(){var i=n(this),t=i.css("display");t!=="inline-block"&&t!=="flex"&&t!=="inline-flex"&&(t="block");i.data("style-cache",i.attr("style"));i.css({display:t,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),c=o(s),s.each(function(){var t=n(this);t.attr("style",t.data("style-cache")||"")})),n.each(c,function(t,r){var u=n(r),f=0;if(e.target)f=e.target.outerHeight(!1);else{if(e.byRow&&u.length<=1){u.css(e.property,"");return}u.each(function(){var t=n(this),u=t.attr("style"),i=t.css("display"),r;i!=="inline-block"&&i!=="flex"&&i!=="inline-flex"&&(i="block");r={display:i};r[e.property]="";t.css(r);t.outerHeight(!1)>f&&(f=t.outerHeight(!1));u?t.attr("style",u):t.css("display","")})}u.each(function(){var t=n(this),r=0;e.target&&t.is(e.target)||(t.css("box-sizing")!=="border-box"&&(r+=i(t.css("border-top-width"))+i(t.css("border-bottom-width")),r+=i(t.css("padding-top"))+i(t.css("padding-bottom"))),t.css(e.property,f-r+"px"))})}),h.each(function(){var t=n(this);t.attr("style",t.data("style-cache")||null)}),t._maintainScroll&&n(window).scrollTop(l/a*n("html").outerHeight(!0)),this};t._applyDataApi=function(){var t={};n("[data-match-height], [data-mh]").each(function(){var i=n(this),r=i.attr("data-mh")||i.attr("data-match-height");t[r]=r in t?t[r].add(i):i});n.each(t,function(){this.matchHeight(!0)})};f=function(i){t._beforeUpdate&&t._beforeUpdate(i,t._groups);n.each(t._groups,function(){t._apply(this.elements,this.options)});t._afterUpdate&&t._afterUpdate(i,t._groups)};t._update=function(i,u){if(u&&u.type==="resize"){var o=n(window).width();if(o===e)return;e=o}i?r===-1&&(r=setTimeout(function(){f(u);r=-1},t._throttle)):f(u)};n(t._applyDataApi);n(window).bind("load",function(n){t._update(!1,n)});n(window).bind("resize orientationchange",function(n){t._update(!0,n)})}),function(n){typeof define=="function"&&define.amd?define([],n):typeof module!="undefined"&&module!==null&&module.exports?module.exports=n:n()}(function(){function st(n){return new CustomEvent(n,ot)}function a(n){return n[l]||(n[l]={})}function n(n,t,i,r){function s(n){i(n,r)}t=t.split(c);for(var f=a(n),e=t.length,o,u;e--;)u=t[e],o=f[u]||(f[u]=[]),o.push([i,s]),n.addEventListener(u,s)}function t(n,t,i){t=t.split(c);var e=a(n),o=t.length,f,r,u;if(e)while(o--)if(f=t[o],r=e[f],r)for(u=r.length;u--;)r[u][0]===i&&(n.removeEventListener(f,r[u][1]),r.splice(u,1))}function u(n,t,i){var r=st(t);i&&ft(r,i);n.dispatchEvent(r)}function ht(n){function u(){t?(r(),et(u),i=!0,t=!1):i=!1}var r=n,t=!1,i=!1;this.kick=function(){t=!0;i||u()};this.end=function(n){var u=r;n&&(i?(r=t?function(){u();n()}:n,t=!0):n())}}function ct(){}function v(n){n.preventDefault()}function lt(n){return!!h[n.target.tagName.toLowerCase()]}function at(n){return n.which===1&&!n.ctrlKey&&!n.altKey}function f(n,t){var i,r;if(n.identifiedTouch)return n.identifiedTouch(t);for(i=-1,r=n.length;++i<r;)if(n[i].identifier===t)return n[i]}function y(n,t){var i=f(n.changedTouches,t.identifier);if(i)return i.pageX===t.pageX&&i.pageY===t.pageY?void 0:i}function vt(t){at(t)&&(lt(t)||(n(document,i.move,p,t),n(document,i.cancel,w,t)))}function p(n,t){d(n,t,n,b)}function w(){b()}function b(){t(document,i.move,p);t(document,i.cancel,w)}function yt(t){if(!h[t.target.tagName.toLowerCase()]){var i=t.changedTouches[0],u={target:i.target,pageX:i.pageX,pageY:i.pageY,identifier:i.identifier,touchmove:function(n,t){pt(n,t)},touchend:function(n,t){wt(n,t)}};n(document,r.move,u.touchmove,u);n(document,r.cancel,u.touchend,u)}}function pt(n,t){var i=y(n,t);i&&d(n,t,i,k)}function wt(n,t){var i=f(n.changedTouches,t.identifier);i&&k(t)}
6function k(n){t(document,r.move,n.touchmove);t(document,r.cancel,n.touchend)}function d(n,t,i,r){var u=i.pageX-t.pageX,f=i.pageY-t.pageY;u*u+f*f<s*s||bt(n,t,i,u,f,r)}function bt(n,t,i,r,f,e){var o=n.targetTouches,s=n.timeStamp-t.timeStamp,h={altKey:n.altKey,ctrlKey:n.ctrlKey,shiftKey:n.shiftKey,startX:t.pageX,startY:t.pageY,distX:r,distY:f,deltaX:r,deltaY:f,pageX:i.pageX,pageY:i.pageY,velocityX:r/s,velocityY:f/s,identifier:t.identifier,targetTouches:o,finger:o?o.length:1,enableMove:function(){this.moveEnabled=!0;this.enableMove=ct;n.preventDefault()}};u(t.target,"movestart",h);e(t)}function g(n,t){var i=t.timer;t.touch=n;t.timeStamp=n.timeStamp;i.kick()}function nt(n,i){var r=i.target,u=i.event,f=i.timer;kt();tt(r,u,f,function(){setTimeout(function(){t(r,"click",v)},0)})}function kt(){t(document,i.move,g);t(document,i.end,nt)}function dt(n,t){var i=t.event,u=t.timer,r=y(n,i);r&&(n.preventDefault(),i.targetTouches=n.targetTouches,t.touch=r,t.timeStamp=n.timeStamp,u.kick())}function gt(n,t){var r=t.target,i=t.event,u=t.timer,e=f(n.changedTouches,i.identifier);e&&(ni(t),tt(r,i,u))}function ni(n){t(document,r.move,n.activeTouchmove);t(document,r.end,n.activeTouchend)}function ti(n,t,i){var r=i-n.timeStamp;n.distX=t.pageX-n.startX;n.distY=t.pageY-n.startY;n.deltaX=t.pageX-n.pageX;n.deltaY=t.pageY-n.pageY;n.velocityX=.3*n.velocityX+.7*n.deltaX/r;n.velocityY=.3*n.velocityY+.7*n.deltaY/r;n.pageX=t.pageX;n.pageY=t.pageY}function tt(n,t,i,r){i.end(function(){return u(n,"moveend",t),r&&r()})}function ii(t){function o(){ti(e,f.touch,f.timeStamp);u(f.target,"move",e)}if(!t.defaultPrevented&&t.moveEnabled){var e={startX:t.startX,startY:t.startY,pageX:t.pageX,pageY:t.pageY,distX:t.distX,distY:t.distY,deltaX:t.deltaX,deltaY:t.deltaY,velocityX:t.velocityX,velocityY:t.velocityY,identifier:t.identifier,targetTouches:t.targetTouches,finger:t.finger},f={target:t.target,event:e,timer:new ht(o),touch:undefined,timeStamp:t.timeStamp};t.identifier===undefined?(n(t.target,"click",v),n(document,i.move,g,f),n(document,i.end,nt,f)):(f.activeTouchmove=function(n,t){dt(n,t)},f.activeTouchend=function(n,t){gt(n,t)},n(document,r.move,f.activeTouchmove,f),n(document,r.end,f.activeTouchend,f))}}function it(n){n.enableMove()}function rt(n){n.enableMove()}function ut(n){n.enableMove()}function o(n){var t=n.handler;n.handler=function(n){for(var r=e.length,i;r--;)i=e[r],n[i]=n.originalEvent[i];t.apply(this,arguments)}}var ft=Object.assign||window.jQuery&&jQuery.extend,s=8,et=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(n){return window.setTimeout(function(){n()},25)}}(),e;(function(){function n(n,t){t=t||{bubbles:!1,cancelable:!1,detail:undefined};var i=document.createEvent("CustomEvent");return i.initCustomEvent(n,t.bubbles,t.cancelable,t.detail),i}if(typeof window.CustomEvent=="function")return!1;n.prototype=window.Event.prototype;window.CustomEvent=n})();var h={textarea:!0,input:!0,select:!0,button:!0},i={move:"mousemove",cancel:"mouseup dragstart",end:"mouseup"},r={move:"touchmove",cancel:"touchend",end:"touchend"},c=/\s+/,ot={bubbles:!0,cancelable:!0},l=typeof Symbol=="function"?Symbol("events"):{};(n(document,"mousedown",vt),n(document,"touchstart",yt),n(document,"movestart",ii),window.jQuery)&&(e="startX startY pageX pageY distX distY deltaX deltaY velocityX velocityY".split(" "),jQuery.event.special.movestart={setup:function(){return n(this,"movestart",it),!1},teardown:function(){return t(this,"movestart",it),!1},add:o},jQuery.event.special.move={setup:function(){return n(this,"movestart",rt),!1},teardown:function(){return t(this,"movestart",rt),!1},add:o},jQuery.event.special.moveend={setup:function(){return n(this,"movestart",ut),!1},teardown:function(){return t(this,"movestart",ut),!1},add:o})}),function(n){n.fn.twentytwenty=function(t){var t=n.extend({default_offset_pct:.5,orientation:"horizontal",before_label:"Before",after_label:"After",no_overlay:!1,move_slider_on_hover:!1,move_with_handle_only:!0,click_to_move:!1},t);return this.each(function(){var e=t.default_offset_pct,i=n(this),u=t.orientation,d=u==="vertical"?"down":"left",g=u==="vertical"?"up":"right",s,r,o,f;i.wrap("<div class='twentytwenty-wrapper twentytwenty-"+u+"'><\/div>");t.no_overlay||(i.append("<div class='twentytwenty-overlay'><\/div>"),s=i.find(".twentytwenty-overlay"),s.append("<div class='twentytwenty-before-label' data-content='"+t.before_label+"'><\/div>"),s.append("<div class='twentytwenty-after-label' data-content='"+t.after_label+"'><\/div>"));r=i.find("img:first");o=i.find("img:last");i.append("<div class='twentytwenty-handle'><\/div>");f=i.find(".twentytwenty-handle");f.append("<span class='twentytwenty-"+d+"-arrow'><\/span>");f.append("<span class='twentytwenty-"+g+"-arrow'><\/span>");i.addClass("twentytwenty-container");r.addClass("twentytwenty-before");o.addClass("twentytwenty-after");var nt=function(n){var t=r.width(),i=r.height();return{w:t+"px",h:i+"px",cw:n*t+"px",ch:n*i+"px"}},tt=function(n){u==="vertical"?(r.css("clip","rect(0,"+n.w+","+n.ch+",0)"),o.css("clip","rect("+n.ch+","+n.w+","+n.h+",0)")):(r.css("clip","rect(0,"+n.cw+","+n.h+",0)"),o.css("clip","rect(0,"+n.w+","+n.h+","+n.cw+")"));i.css("height",n.h)},h=function(n){var t=nt(n);f.css(u==="vertical"?"top":"left",u==="vertical"?t.ch:t.cw);tt(t)},it=function(n,t,i){return Math.max(t,Math.min(i,n))},p=function(n,t){var i=u==="vertical"?(t-l)/v:(n-c)/a;return it(i,0,1)};n(window).on("resize.twentytwenty",function(){h(e)});var c=0,l=0,a=0,v=0,w=function(n){(n.distX>n.distY&&n.distX<-n.distY||n.distX<n.distY&&n.distX>-n.distY)&&u!=="vertical"?n.preventDefault():(n.distX<n.distY&&n.distX<-n.distY||n.distX>n.distY&&n.distX>-n.distY)&&u==="vertical"&&n.preventDefault();i.addClass("active");c=i.offset().left;l=i.offset().top;a=r.width();v=r.height()},b=function(n){i.hasClass("active")&&(e=p(n.pageX,n.pageY),h(e))},k=function(){i.removeClass("active")},y=t.move_with_handle_only?f:i;y.on("movestart",w);y.on("move",b);y.on("moveend",k);if(t.move_slider_on_hover){i.on("mouseenter",w);i.on("mousemove",b);i.on("mouseleave",k)}f.on("touchmove",function(n){n.preventDefault()});i.find("img").on("mousedown",function(n){n.preventDefault()});if(t.click_to_move)i.on("click",function(n){c=i.offset().left;l=i.offset().top;a=r.width();v=r.height();e=p(n.pageX,n.pageY);h(e)});n(window).trigger("resize.twentytwenty")})}}(jQuery);jQuery.fn.extend({addToList:function(n,t){return this.filter(":input").val(function(i,r){if(n==""||n==null||n==undefined)return r;if(r=="")return n;var u=r.split(t);return u.push(n),u.join(t)}).end()},removeFromList:function(n,t){return this.filter(":input").val(function(i,r){return n==""||n==null||n==undefined?r:$.grep(r.split(t),function(t){return t!=n}).join(t)}).end()}});var submitText="<i class='far fa-circle-notch fa-spin'><\/i> Submitting...",trackOutboundLink=function(n,t,i){typeof ga!="undefined"&&ga("send","event",n,t,i)};String.prototype.format=function(){var n=arguments;return this.replace(/{(\d+)}/g,function(t,i){return typeof n[i]!="undefined"?n[i]:t})};$(document).on("click",".btn-set-color",function(){var n=$(this).attr("data-color");$(".btn-set-color.active").removeClass("active");$(this).addClass("active")});$(function(){function n(){$("form").each(function(n,t){var i=$(t),r=i.find(".select-date"),u=i.find('input[name="form"]').val();u&&$.post("/ws/datepicker-options/",{form:u}).done(function(n){if(n){var t=n.disabledSpecificDays;r.datepicker({startDate:"0",daysOfWeekDisabled:n.disabledDays,endDate:n.endDate,datesDisabled:t,autoclose:!0}).on("keydown",function(n){n.key==="Enter"&&(n.preventDefault(),r.val("").blur()
6)})}else i.on("click",".select-date",function(){var t=$(this).attr("data-action-field"),n=i.find("#"+t),r=n.data("datepicker");if(!r)n.datepicker("show").on("changeDate",function(){n.datepicker("hide")}).on("keydown",function(t){t.key==="Enter"&&(t.preventDefault(),n.val("").blur())})})})})}function t(){$(".activate-video").on("click",function(){var n=$(this).attr("data-thevideo"),t=$(this).attr("title");$("#modal-video iframe").attr("src",n);$("#modal-video .modal-title").text(t)});$("#modal-video").on("hidden.bs.modal",function(){$(this).find("iframe").attr("src","")})}function i(){var n={section:$(".search-section"),applyfilter:function(n){($this=this,$this.section.length&&n.searchbarclassname.length&&n.entryclassname.length)&&$this.section.find(n.searchbarclassname).keyup(function(t){var u,i,r,f;if(t.preventDefault(),$this=this,u=$this.value.toLowerCase(),i=$(n.entryclassname),i.length)for(r=0;r<i.length;r++)f=$(i[r]).find(n.entryvalclassname)[0].innerText.toLowerCase(),i[r].style.display=f.indexOf(u)<0?"none":n.defaultdisplay})}};n.applyfilter({searchbarclassname:".searchbar",entryclassname:".search-item",entryvalclassname:".search-item-identifier",defaultdisplay:""})}function r(){if($("#header.keep-on-screen").length){var n=$("#header.keep-on-screen"),t=n.offset().top;$(window).scroll(function(){var n=$(window).scrollTop();n>t?$("body").addClass("fixed-navigation"):$("body").removeClass("fixed-navigation")})}}function u(){$(".scroll-to-collapse").on("shown.bs.collapse",function(){$("html, body").animate({scrollTop:$(this).offset().top},1e3)})}function f(){$(".scroll-to").on("click",function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var n=$(this.hash),t=$("#header").height();if(n=n.length?n:$("[name="+this.hash.slice(1)+"]"),n.length)return $("html,body").animate({scrollTop:n.offset().top-t},1e3),!1}})}function e(){$(".page-nav-btn-group a").each(function(){$(this).attr("href")==window.location.pathname&&$(this).addClass("active")})}function o(){const n=window.location.pathname,t=$(".navbar-nav .aMain");let i=!1;if(t.each(function(){const t=$(this);if(t.attr("href")===n)return t.addClass("active"),i=!0,!1}),!i){var r=trim(n,"/").split("/");t.each(function(){const n=$(this);if(n.attr("href")=="/"+r[0]+"/")return n.addClass("active"),!1})}}function s(){$(".navflyout-toggle, .mobile-nav-toggle").on("click",function(){$("body").hasClass("nav-open")?$("body").removeClass("nav-open"):$("body").addClass("nav-open")})}function h(){if($(".triggerAnimate").length){$(window).on("scroll",function(){var n=$(window).scrollTop(),t=n+$(window).height()-100;$(".triggerAnimate").each(function(){t>$(this).offset().top&&$(this).addClass("animate")})});$(".triggerAnimate").trigger("scroll")}}function c(){if($(".quote-form").length){var n=$(".quote-form").offset().top,t=n+$(".quote-form").height();$(window).scroll(function(){var i=$(window).scrollTop(),r=i+$(window).height();r>n&&i<t?$(".btn-quote-ft-mobile").removeClass("showme"):$(".btn-quote-ft-mobile").addClass("showme")})}else $(".btn-quote-ft-mobile").hide()}function l(){$("a[data-toggle='collapse']").click(function(n){n.preventDefault();var t=$(this).attr("data-collapse-container");$(this).data("hideaftershow")==!0&&$(this).fadeOut();$("#"+t).find("div.collapse").each(function(){var n=$(this);n.hasClass("in")&&n.collapse("toggle")})})}function a(){if($("#template-enablevideo").length&&$(document).width()>768){var n=$("#template-enablevideo").html();$(".fullscreen-bg .video").replaceWith(n)}}function v(){$("textarea.auto-grow").on("input",function(){var n=$(this);n.val()===""?n.css("height","auto"):n.outerHeight(n[0].scrollHeight)})}function y(){$(".match-height").matchHeight()}function p(){var n=$("#goog-gt-votingForm");n.length&&($("#goog-gt-votingInputSrcLang").length&&$('<label for="goog-gt-votingInputSrcLang" type="hidden">L1<\/label>').insertBefore("#goog-gt-votingInputSrcLang"),$("#goog-gt-votingInputTrgLang").length&&$('<label for="goog-gt-votingInputTrgLang" type="hidden">L2<\/label>').insertBefore("#goog-gt-votingInputTrgLang"),$("#goog-gt-votingInputSrcText").length&&$('<label for="goog-gt-votingInputSrcText" t
6ype="hidden">L3<\/label>').insertBefore("#goog-gt-votingInputSrcText"),$("#goog-gt-votingInputTrgText").length&&$('<label for="goog-gt-votingInputTrgText" type="hidden">L4<\/label>').insertBefore("#goog-gt-votingInputTrgText"),$("#goog-gt-votingInputVote").length&&$('<label for="goog-gt-votingInputVote" type="hidden">L5<\/label>').insertBefore("#goog-gt-votingInputVote"))}function w(){$(window).load(function(){$(".twentytwenty-container").twentytwenty()})}n();t();i();r();u();f();e();o();s();h();c();l();a();v();y();initLazy();p();w()});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.