var cdnImagePath,deleteConfirm="Are you sure you want to delete?",archieveConfirm="Are you sure you want to archieve?",keepAlive=void 0,SelectedSender=[],userType={vagaroAdmin:"6"},commonPermissionDenied="/Users/PermissionDenied.aspx",SupportUpSellFeature={CalendarCharges:"0",CreditCardProcessing:"1",QuickBook:"2",Xero:"3",CheckinApp:"4",BrandedApp:"5",EmailMarketing:"6",TextMarketing:"7",Forms:"8",CustomWebsite:"9",ShoppingCart:"10",FeatureBusiness:"11",VagaroDrive:"12",Gusto:"13",LiveStream:"14",VagaroPayLater:"15",DataLake:"16",MySite:"17",VagaroPayroll:"18",APIsandWebhooks:"20"};function selectString(e){return"Please select "+e+"."}function requiredString(e){return"Please enter value of "+e+"."}function cbo_OnClientLoad(e){e.get_inputDomElement().readOnly="readonly"}function RedirectPage(e){location.href=e}function IgnoreScriptTag(e,s){""==s&&(s="<>"),document.all?k=e.keyCode:k=e.which;for(var a=0;a<s.length;a++)if(s.charCodeAt(a)==k)return e.returnValue=null,!1}function IgnoreCharacters(e,s){""==s&&(s='&#%*:"\\|/.<>?'),document.all?k=e.keyCode:k=e.which;for(var a=0;a<s.length;a++)if(s.charCodeAt(a)==k)return e.returnValue=null,!1}function IgnoreCharactersWithDot(e,s){""==s&&(s='&#%*:"\\|/<>?'),document.all?k=e.keyCode:k=e.which;for(var a=0;a<s.length;a++)if(s.charCodeAt(a)==k)return e.returnValue=null,!1}function IgnoreCharactersWithSingleQuote(e,s){""==s&&(s="&#%*:\"\\|/.<>?'"),document.all?k=e.keyCode:k=e.which;for(var a=0;a<s.length;a++)if(s.charCodeAt(a)==k)return e.returnValue=null,!1}var dFeatures="dialogHeight: 200px; dialogWidth: 400px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: Yes;",modalWin="null",returnValue="",pHeight,pWidth;function xShowModalDialog(e,s,a){if(null==e||""==e)return alert("Invalid URL input."),!1;if(null!=s&&""!=s||(s=""),null!=a&&""!=a||(a=dFeatures),-1!=window.navigator.appVersion.indexOf("MSIE"))return returnValue=window.showModalDialog(e,s,a),!1;for(x in a=a.replace(/ /gi,""),aFeatures=a.split(";"),sWinFeat="directories=0,menubar=0,titlebar=0,toolbar=0,",aFeatures)switch(aTmp=aFeatures[x].split(":"),sKey=aTmp[0].toLowerCase(),sVal=aTmp[1],sKey){case"dialogheight":sWinFeat+="height="+sVal+",",pHeight=sVal.replace("px","");break;case"dialogwidth":sWinFeat+="width="+sVal+",",pWidth=sVal.replace("px","");break;case"dialogtop":sWinFeat+="screenY="+sVal+",";break;case"dialogleft":sWinFeat+="screenX="+sVal+",";break;case"resizable":sWinFeat+="resizable="+sVal+",";break;case"status":sWinFeat+="status="+sVal+",";break;case"center":"yes"==sVal.toLowerCase()&&(sWinFeat+="screenY="+(screen.availHeight-pHeight)/2+",",sWinFeat+="screenX="+(screen.availWidth-pWidth)/2+",")}modalWin=window.open(String(e),"",sWinFeat),null!=s&&""!=s&&(modalWin.dialogArguments=s)}function CheckAlpha(e){var s;return(s=document.all?e.keyCode:e.which)>64&&s<91||s>96&&s<123||8==s||0==s}function CheckAlphaWithSpace(e){var s;return(s=document.all?e.keyCode:e.which)>64&&s<91||s>96&&s<123||8==s||0==s||32==s}function CheckNumeric(e,s){var a;a=document.all?e.keyCode:e.which;var c=e.srcElement.value;if(c.indexOf(".")>-1){if(46==a)return!1;if(c.substring(c.indexOf("."),c.length).length>s)return!1}return a>=48&&a<=57||46==a||8==a||0==a}function CheckCompany(e){var s;return(s=document.all?e.keyCode:e.which)>64&&s<91||s>96&&s<123||8==s||0==s||38==s||39==s||45==s||46==s||32==s}function CheckContactNo(e){var s;return(s=document.all?e.keyCode:e.which)>=48&&s<=57||8==s||0==s}function RemoveErrorMsg(){document.getElementById("divError").innerHTML=""}function openwindow(e){window.open(e,"","","")}var ratingDescSearch=new Array("Poor","Fair","Average","Good","Excellent"),ratingDescNormal=new Array("Excellent","Good","Average","Fair","Poor"),ratingDesc,shopdetailkeyword;function SetRatingControlBehavior(e,s,a){if(ratingDesc=ratingDescSearch,null!=document.getElementById(e))for(document.getElementById(e).onmouseout=new Function("FixClearValue("+a+");"),KeepValue[a]="",i=0;i<5;i++){var c=document.getElementById(e+"_Star_"+(i+1).toString());c.title="",c.onmouseover=new Function("ShowRatingDesc('"+ratingDesc[i]+"',-1,"+a+");"),c.onclick=new Function("ShowRatingDesc('"+ratingDesc[i]+"',1,"+a+");")}}function ShowRatingDesc(e,s,a){document.getElementById("spn"+a).innerHTML=e,null!=s&&1==s&&(KeepValue[a]=e)}function SetRatingControlBehaviorToSetVal(e,s,a){for(ratingDesc=ratingDescSearch,document.getElementById(e).onmouseout=new Function("FixClearValue("+a+");"),KeepValue[a]="",i=0;i<5;i++){var c=document.getElementById(e+"_Star_"+(i+1).toString());c.title="",c.onmouseover=new Function("ShowRatingDesc('"+ratingDesc[i]+"',-1,"+a+");"),c.onclick=new Function("ShowRatingDesc('"+ratingDesc[i]+"',1,"+a+");")}}function ShowRatingDescToSetVal(e,s,a){ratingDesc=ratingDescSearch,document.getElementById("spn"+a).innerHTML=ratingDescSearch[s],KeepValue[a]=ratingDescSearch[s]}function FixClearValueToSetVal(e,s){document.getElementById("spn"+e).innerHTML=ratingDescSearch[s]}function FixClearValue(e){document.getElementById("spn"+e).innerHTML=KeepValue[e]}function trim(e){var s=/^(\s*)$/;return s.test(e)&&0==(e=e.replace(s,"")).length||(s=/^(\s*)([\W\w]*)(\b\s*$)/).test(e)&&(e=e.replace(s,"$2")),e}function rTrim(e){var s=/^([\w\W]*)(\b\s*)$/;return s.test(e)&&(e=e.replace(s,"$1")),e}function lTrim(e){var s=/^(\s*)(\b[\w\W]*)$/;return s.test(e)&&(e=e.replace(s,"$2")),e}function readCookie(e){for(var s=e+"=",a=document.cookie.split(";"),c=0;c<a.length;c++){for(var t=a[c];" "==t.charAt(0);)t=t.substring(1,t.length);if(0==t.indexOf(s))return t.substring(s.length,t.length)}return null}function SetFocusOnError(){setTimeout("scroll(0, 0)",50)}function PrintPage(e,s){var a="/Users/PrintGrid.aspx?PageType="+e;null!=s&&"1"==s&&(a+="&isexport=1"),window.open(a,"","left=0,top=0,width=750,height=650,toolbar=0,scrollbars=0,status=0,resizable=0")}function echeck(e){if(""==trim(e))return!1;var s=!0;return/^[A-Za-z0-9_\+-]+(\.[A-Za-z0-9_\+-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.([A-Za-z]{2,10})$/.test(e)||(s=!1),s}function CallFailed(e){alert(e.get_message())}function Encrypt(e){for(output=new String,Temp=new Array,Temp2=new Array,TextSize=e.length,i=0;i<TextSize;i++)rnd=Math.round(122*Math.random())+68,Temp[i]=e.charCodeAt(i)+rnd,Temp2[i]=rnd;for(i=0;i<TextSize;i++)output+=String.fromCharCode(Temp[i],Temp2[i]);return output}function unEncrypt(e){for(output=new String,Temp=new Array,Temp2=new Array,TextSize=e.length,i=0;i<TextSize;i++)Temp[i]=e.charCodeAt(i),Temp2[i]=e.charCodeAt(i+1);for(i=0;i<TextSize;i+=2)output+=String.fromCharCode(Temp[i]-Temp2[i]);return output}function HtmlDecode(s){var out="";if(null!=s){for(var l=s.length,i=0;i<l;i++){var ch=s.charAt(i);if("&"==ch){var semicolonIndex=s.indexOf(";",i+1);if(semicolonIndex>0){var entity=s.substring(i+1,semicolonIndex);if(entity.length>1&&"#"==entity.charAt(0))ch="x"==entity.charAt(1)||"X"==entity.charAt(1)?String.fromCharCode(eval("0"+entity.substring(1))):String.fromCharCode(eval(entity.substring(1)));else switch(entity){case"quot":ch=String.fromCharCode(34);break;case"amp":ch=String.fromCharCode(38);break;case"lt":ch=String.fromCharCode(60);break;case"gt":ch=String.fromCharCode(62);break;case"nbsp":ch=String.fromCharCode(160);break;case"iexcl":ch=String.fromCharCode(161);break;case"cent":ch=String.fromCharCode(162);break;case"pound":ch=String.fromCharCode(163);break;case"curren":ch=String.fromCharCode(164);break;case"yen":ch=String.fromCharCode(165);break;case"brvbar":ch=String.fromCharCode(166);break;case"sect":ch=String.fromCharCode(167);break;case"uml":ch=String.fromCharCode(168);break;case"copy":ch=String.fromCharCode(169);break;case"ordf":ch=String.fromCharCode(170);break;case"laquo":ch=String.fromCharCode(171);break;case"not":ch=String.fromCharCode(172);break;case"shy":ch=String.fromCharCode(173);break;case"reg":ch=String.fromCharCode(174);break;case"macr":ch=String.fromCharCode(175);break;case"deg":ch=String.fromCharCode(176);break;case"plusmn":ch=String.fromCharCode(177);break;case"sup2":ch=String.fromCharCode(178);break;case"sup3":ch=String.fromCharCode(179);break;case"acute":ch=String.fromCharCode(180);break;case"micro":ch=String.fromCharCode(181);break;case"para":ch=String.fromCharCode(182);break;case"middot":ch=String.fromCharCode(183);break;case"cedil":ch=String.fromCharCode(184);break;case"sup1":ch=String.fromCharCode(185);break;case"ordm":ch=String.fromCharCode(186);break;case"raquo":ch=String.fromCharCode(187);break;case"frac14":ch=String.fromCharCode(188);break;case"frac12":ch=String.fromCharCode(189);break;case"frac34":ch=String.fromCharCode(190);break;case"iquest":ch=String.fromCharCode(191);break;case"Agrave":ch=String.fromCharCode(192);break;case"Aacute":ch=String.fromCharCode(193);break;case"Acirc":ch=String.fromCharCode(194);break;case"Atilde":ch=String.fromCharCode(195);break;case"Auml":ch=String.fromCharCode(196);break;case"Aring":ch=String.fromCharCode(197);break;case"AElig":ch=String.fromCharCode(198);break;case"Ccedil":ch=String.fromCharCode(199);break;case"Egrave":ch=String.fromCharCode(200);break;case"Eacute":ch=String.fromCharCode(201);break;case"Ecirc":ch=String.fromCharCode(202);break;case"Euml":ch=String.fromCharCode(203);break;case"Igrave":ch=String.fromCharCode(204);break;case"Iacute":ch=String.fromCharCode(205);break;case"Icirc":ch=String.fromCharCode(206);break;case"Iuml":ch=String.fromCharCode(207);break;case"ETH":ch=String.fromCharCode(208);break;case"Ntilde":ch=String.fromCharCode(209);break;case"Ograve":ch=String.fromCharCode(210);break;case"Oacute":ch=String.fromCharCode(211);break;case"Ocirc":ch=String.fromCharCode(212);break;case"Otilde":ch=String.fromCharCode(213);break;case"Ouml":ch=String.fromCharCode(214);break;case"times":ch=String.fromCharCode(215);break;case"Oslash":ch=String.fromCharCode(216);break;case"Ugrave":ch=String.fromCharCode(217);break;case"Uacute":ch=String.fromCharCode(218);break;case"Ucirc":ch=String.fromCharCode(219);break;case"Uuml":ch=String.fromCharCode(220);break;case"Yacute":ch=String.fromCharCode(221);break;case"THORN":ch=String.fromCharCode(222);break;case"szlig":ch=String.fromCharCode(223);break;case"agrave":ch=String.fromCharCode(224);break;case"aacute":ch=String.fromCharCode(225);break;case"acirc":ch=String.fromCharCode(226);break;case"atilde":ch=String.fromCharCode(227);break;case"auml":ch=String.fromCharCode(228);break;case"aring":ch=String.fromCharCode(229);break;case"aelig":ch=String.fromCharCode(230);break;case"ccedil":ch=String.fromCharCode(231);break;case"egrave":ch=String.fromCharCode(232);break;case"eacute":ch=String.fromCharCode(233);break;case"ecirc":ch=String.fromCharCode(234);break;case"euml":ch=String.fromCharCode(235);break;case"igrave":ch=String.fromCharCode(236);break;case"iacute":ch=String.fromCharCode(237);break;case"icirc":ch=String.fromCharCode(238);break;case"iuml":ch=String.fromCharCode(239);break;case"eth":ch=String.fromCharCode(240);break;case"ntilde":ch=String.fromCharCode(241);break;case"ograve":ch=String.fromCharCode(242);break;case"oacute":ch=String.fromCharCode(243);break;case"ocirc":ch=String.fromCharCode(244);break;case"otilde":ch=String.fromCharCode(245);break;case"ouml":ch=String.fromCharCode(246);break;case"divide":ch=String.fromCharCode(247);break;case"oslash":ch=String.fromCharCode(248);break;case"ugrave":ch=String.fromCharCode(249);break;case"uacute":ch=String.fromCharCode(250);break;case"ucirc":ch=String.fromCharCode(251);break;case"uuml":ch=String.fromCharCode(252);break;case"yacute":ch=String.fromCharCode(253);break;case"thorn":ch=String.fromCharCode(254);break;case"yuml":ch=String.fromCharCode(255);break;case"OElig":ch=String.fromCharCode(338);break;case"oelig":ch=String.fromCharCode(339);break;case"Scaron":ch=String.fromCharCode(352);break;case"scaron":ch=String.fromCharCode(353);break;case"Yuml":ch=String.fromCharCode(376);break;case"fnof":ch=String.fromCharCode(402);break;case"circ":ch=String.fromCharCode(710);break;case"tilde":ch=String.fromCharCode(732);break;case"Alpha":ch=String.fromCharCode(913);break;case"Beta":ch=String.fromCharCode(914);break;case"Gamma":ch=String.fromCharCode(915);break;case"Delta":ch=String.fromCharCode(916);break;case"Epsilon":ch=String.fromCharCode(917);break;case"Zeta":ch=String.fromCharCode(918);break;case"Eta":ch=String.fromCharCode(919);break;case"Theta":ch=String.fromCharCode(920);break;case"Iota":ch=String.fromCharCode(921);break;case"Kappa":ch=String.fromCharCode(922);break;case"Lambda":ch=String.fromCharCode(923);break;case"Mu":ch=String.fromCharCode(924);break;case"Nu":ch=String.fromCharCode(925);break;case"Xi":ch=String.fromCharCode(926);break;case"Omicron":ch=String.fromCharCode(927);break;case"Pi":ch=String.fromCharCode(928);break;case" Rho ":ch=String.fromCharCode(929);break;case"Sigma":ch=String.fromCharCode(931);break;case"Tau":ch=String.fromCharCode(932);break;case"Upsilon":ch=String.fromCharCode(933);break;case"Phi":ch=String.fromCharCode(934);break;case"Chi":ch=String.fromCharCode(935);break;case"Psi":ch=String.fromCharCode(936);break;case"Omega":ch=String.fromCharCode(937);break;case"alpha":ch=String.fromCharCode(945);break;case"beta":ch=String.fromCharCode(946);break;case"gamma":ch=String.fromCharCode(947);break;case"delta":ch=String.fromCharCode(948);break;case"epsilon":ch=String.fromCharCode(949);break;case"zeta":ch=String.fromCharCode(950);break;case"eta":ch=String.fromCharCode(951);break;case"theta":ch=String.fromCharCode(952);break;case"iota":ch=String.fromCharCode(953);break;case"kappa":ch=String.fromCharCode(954);break;case"lambda":ch=String.fromCharCode(955);break;case"mu":ch=String.fromCharCode(956);break;case"nu":ch=String.fromCharCode(957);break;case"xi":ch=String.fromCharCode(958);break;case"omicron":ch=String.fromCharCode(959);break;case"pi":ch=String.fromCharCode(960);break;case"rho":ch=String.fromCharCode(961);break;case"sigmaf":ch=String.fromCharCode(962);break;case"sigma":ch=String.fromCharCode(963);break;case"tau":ch=String.fromCharCode(964);break;case"upsilon":ch=String.fromCharCode(965);break;case"phi":ch=String.fromCharCode(966);break;case"chi":ch=String.fromCharCode(967);break;case"psi":ch=String.fromCharCode(968);break;case"omega":ch=String.fromCharCode(969);break;case"thetasym":ch=String.fromCharCode(977);break;case"upsih":ch=String.fromCharCode(978);break;case"piv":ch=String.fromCharCode(982);break;case"ensp":ch=String.fromCharCode(8194);break;case"emsp":ch=String.fromCharCode(8195);break;case"thinsp":ch=String.fromCharCode(8201);break;case"zwnj":ch=String.fromCharCode(8204);break;case"zwj":ch=String.fromCharCode(8205);break;case"lrm":ch=String.fromCharCode(8206);break;case"rlm":ch=String.fromCharCode(8207);break;case"ndash":ch=String.fromCharCode(8211);break;case"mdash":ch=String.fromCharCode(8212);break;case"lsquo":ch=String.fromCharCode(8216);break;case"rsquo":ch=String.fromCharCode(8217);break;case"sbquo":ch=String.fromCharCode(8218);break;case"ldquo":ch=String.fromCharCode(8220);break;case"rdquo":ch=String.fromCharCode(8221);break;case"bdquo":ch=String.fromCharCode(8222);break;case"dagger":ch=String.fromCharCode(8224);break;case"Dagger":ch=String.fromCharCode(8225);break;case"bull":ch=String.fromCharCode(8226);break;case"hellip":ch=String.fromCharCode(8230);break;case"permil":ch=String.fromCharCode(8240);break;case"prime":ch=String.fromCharCode(8242);break;case"Prime":ch=String.fromCharCode(8243);break;case"lsaquo":ch=String.fromCharCode(8249);break;case"rsaquo":ch=String.fromCharCode(8250);break;case"oline":ch=String.fromCharCode(8254);break;case"frasl":ch=String.fromCharCode(8260);break;case"euro":ch=String.fromCharCode(8364);break;case"image":ch=String.fromCharCode(8465);break;case"weierp":ch=String.fromCharCode(8472);break;case"real":ch=String.fromCharCode(8476);break;case"trade":ch=String.fromCharCode(8482);break;case"alefsym":ch=String.fromCharCode(8501);break;case"larr":ch=String.fromCharCode(8592);break;case"uarr":ch=String.fromCharCode(8593);break;case"rarr":ch=String.fromCharCode(8594);break;case"darr":ch=String.fromCharCode(8595);break;case"harr":ch=String.fromCharCode(8596);break;case"crarr":ch=String.fromCharCode(8629);break;case"lArr":ch=String.fromCharCode(8656);break;case"uArr":ch=String.fromCharCode(8657);break;case"rArr":ch=String.fromCharCode(8658);break;case"dArr":ch=String.fromCharCode(8659);break;case"hArr":ch=String.fromCharCode(8660);break;case"forall":ch=String.fromCharCode(8704);break;case"part":ch=String.fromCharCode(8706);break;case"exist":ch=String.fromCharCode(8707);break;case"empty":ch=String.fromCharCode(8709);break;case"nabla":ch=String.fromCharCode(8711);break;case"isin":ch=String.fromCharCode(8712);break;case"notin":ch=String.fromCharCode(8713);break;case"ni":ch=String.fromCharCode(8715);break;case"prod":ch=String.fromCharCode(8719);break;case"sum":ch=String.fromCharCode(8721);break;case"minus":ch=String.fromCharCode(8722);break;case"lowast":ch=String.fromCharCode(8727);break;case"radic":ch=String.fromCharCode(8730);break;case"prop":ch=String.fromCharCode(8733);break;case"infin":ch=String.fromCharCode(8734);break;case"ang":ch=String.fromCharCode(8736);break;case"and":ch=String.fromCharCode(8743);break;case"or":ch=String.fromCharCode(8744);break;case"cap":ch=String.fromCharCode(8745);break;case"cup":ch=String.fromCharCode(8746);break;case"int":ch=String.fromCharCode(8747);break;case"there4":ch=String.fromCharCode(8756);break;case"sim":ch=String.fromCharCode(8764);break;case"cong":ch=String.fromCharCode(8773);break;case"asymp":ch=String.fromCharCode(8776);break;case"ne":ch=String.fromCharCode(8800);break;case"equiv":ch=String.fromCharCode(8801);break;case"le":ch=String.fromCharCode(8804);break;case"ge":ch=String.fromCharCode(8805);break;case"sub":ch=String.fromCharCode(8834);break;case"sup":ch=String.fromCharCode(8835);break;case"nsub":ch=String.fromCharCode(8836);break;case"sube":ch=String.fromCharCode(8838);break;case"supe":ch=String.fromCharCode(8839);break;case"oplus":ch=String.fromCharCode(8853);break;case"otimes":ch=String.fromCharCode(8855);break;case"perp":ch=String.fromCharCode(8869);break;case"sdot":ch=String.fromCharCode(8901);break;case"lceil":ch=String.fromCharCode(8968);break;case"rceil":ch=String.fromCharCode(8969);break;case"lfloor":ch=String.fromCharCode(8970);break;case"rfloor":ch=String.fromCharCode(8971);break;case"lang":ch=String.fromCharCode(9001);break;case"rang":ch=String.fromCharCode(9002);break;case"loz":ch=String.fromCharCode(9674);break;case"spades":ch=String.fromCharCode(9824);break;case"clubs":ch=String.fromCharCode(9827);break;case"hearts":ch=String.fromCharCode(9829);break;case"diams":ch=String.fromCharCode(9830);break;default:ch=""}i=semicolonIndex}}out+=ch}return out}}function addOption(e,s,a,c,t){var n=document.createElement("OPTION");n.text=s,n.value=a,e.options.add(n),c&&(n.selected=!0),void 0!==t&&1==t&&(e.options[e.length-1].disabled=!0)}function ShowMyVagaroPage(e,s,a){shopdetailkeyword=s,Vagaro.MySampleService.ShowVagaroPage(e,a,CallSuccess_ShowMyVagaroPage,CallFailed)}function CallSuccess_ShowMyVagaroPage(e){if("Microsoft Internet Explorer"==navigator.appName){var s=document.createElement("a");s.href=location.protocol+"//"+location.host+shopdetailkeyword,s.target="_blank",document.body.appendChild(s),s.click()}else{null==window.open(location.protocol+"//"+location.host+shopdetailkeyword)&&alert("popup is blocked in your browser please enable popup first.")}}function IsNullOrEmpty(e){return null==e||(0==trim(e.toString()).length||"null"==trim(e.toString()))}function selectTextboxContent(e){navigator.userAgent.match(/iPad/i)&&null!==navigator.userAgent.match(/iPad/i)?setTimeout(function(){e.setSelectionRange(0,parseInt(e.value.length+1))},10):setTimeout(function(){e.select()},10)}function changeCSS(e,s,a,c){var t,n=!1;e.rules?t="rules":e.cssRules&&(t="cssRules");for(var i=0;i<e[t].length;i++)if(e[t][i].selectorText==s&&e[t][i].style[a]){e[t][i].style[a]=c,n=!0;break}n||(e.insertRule?e.insertRule(s+" { "+a+": "+c+"; }",e[t].length):e.addRule&&e.addRule(s,a+": "+c+";"))}function getQuerystring(e,s){alert(window.location.href),null==s&&(s=""),e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var a=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(window.location.href);return null==a?s:a[1]}function getViewPortHeightWidth(){var e,s;return void 0!==window.innerWidth?(e=window.innerWidth,s=window.innerHeight):void 0!==document.documentElement&&void 0!==document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?(e=document.documentElement.clientWidth,s=document.documentElement.clientHeight):(e=document.getElementsByTagName("body")[0].clientWidth,s=document.getElementsByTagName("body")[0].clientHeight),s+"|"+e}function trimPassword(e){return e.replace(/^\s+|\s+$/g,"")}function SetRatingStar(e){null==cdnImagePath&&(cdnImagePath="");var s="";return s+="<span class='rating-span'>",s+="<img src='"+cdnImagePath+"Images/star-ratting"+(e.split(":")[0]>=1?"":"-off")+".png' alt='' id='Overall1' style='float: left;' />",s+="<img src='"+cdnImagePath+"Images/star-ratting"+(e.split(":")[0]>=2?"":"-off")+".png' alt='' id='Overall2' style='float: left;' />",s+="<img src='"+cdnImagePath+"Images/star-ratting"+(e.split(":")[0]>=3?"":"-off")+".png' alt='' id='Overall3' style='float: left;' />",s+="<img src='"+cdnImagePath+"Images/star-ratting"+(e.split(":")[0]>=4?"":"-off")+".png' alt='' id='Overall4' style='float: left;' />",s+="<img src='"+cdnImagePath+"Images/star-ratting"+(e.split(":")[0]>=5?"":"-off")+".png' alt='' id='Overall5' style='float: left;' />",s+="</span>"}function GetFixLengthString(e,s){return e.length>s?e.substring(0,s-1)+"..":e}function setText(e,s){void 0!==e.textContent?e.textContent=s:void 0!==e.innerText&&(e.innerText=s)}function getTimezoneName(){return tmSummer=new Date(Date.UTC(2005,6,30,0,0,0,0)),so=-1*tmSummer.getTimezoneOffset(),tmWinter=new Date(Date.UTC(2005,12,30,0,0,0,0)),wo=-1*tmWinter.getTimezoneOffset(),gblso=so,gblwo=wo,-660==so&&-660==wo?"Pacific/Midway":-600==so&&-600==wo?"Pacific/Tahiti":-570==so&&-570==wo?"Pacific/Marquesas":-540==so&&-600==wo?"America/Adak":-540==so&&-540==wo?"Pacific/Gambier":-480==so&&-540==wo?"US/Alaska":-480==so&&-480==wo?"Pacific/Pitcairn":-420==so&&-480==wo?"US/Pacific":-420==so&&-420==wo?"US/Arizona":-360==so&&-420==wo?"US/Mountain":-360==so&&-360==wo?"America/Guatemala":-360==so&&-300==wo?"Pacific/Easter":-300==so&&-360==wo?"US/Central":-300==so&&-300==wo?"America/Bogota":-240==so&&-300==wo?"US/Eastern":-240==so&&-240==wo?"America/Caracas":-240==so&&-180==wo?"America/Santiago":-180==so&&-240==wo?"Canada/Atlantic":-180==so&&-180==wo?"America/Montevideo":-180==so&&-120==wo?"America/Sao_Paulo":-150==so&&-210==wo?"America/St_Johns":-120==so&&-180==wo?"America/Godthab":-120==so&&-120==wo?"America/Noronha":-60==so&&-60==wo?"Atlantic/Cape_Verde":0==so&&-60==wo?"Atlantic/Azores":0==so&&0==wo?"Africa/Casablanca":60==so&&0==wo?"Europe/London":60==so&&60==wo?"Africa/Algiers":60==so&&120==wo?"Africa/Windhoek":120==so&&60==wo?"Europe/Amsterdam":120==so&&120==wo?"Africa/Harare":180==so&&120==wo?"Europe/Athens":180==so&&180==wo?"Africa/Nairobi":240==so&&180==wo?"Europe/Moscow":240==so&&240==wo?"Asia/Dubai":270==so&&210==wo?"Asia/Tehran":270==so&&270==wo?"Asia/Kabul":300==so&&240==wo?"Asia/Baku":300==so&&300==wo?"Asia/Karachi":330==so&&330==wo?"Asia/Calcutta":345==so&&345==wo?"Asia/Katmandu":360==so&&300==wo?"Asia/Yekaterinburg":360==so&&360==wo?"Asia/Colombo":390==so&&390==wo?"Asia/Rangoon":420==so&&360==wo?"Asia/Almaty":420==so&&420==wo?"Asia/Bangkok":480==so&&420==wo?"Asia/Krasnoyarsk":480==so&&480==wo?"Australia/Perth":540==so&&480==wo?"Asia/Irkutsk":540==so&&540==wo?"Asia/Tokyo":570==so&&570==wo?"Australia/Darwin":570==so&&630==wo?"Australia/Adelaide":600==so&&540==wo?"Asia/Yakutsk":600==so&&600==wo?"Australia/Brisbane":600==so&&660==wo?"Australia/Sydney":630==so&&660==wo?"Australia/Lord_Howe":660==so&&600==wo?"Asia/Vladivostok":660==so&&660==wo?"Pacific/Guadalcanal":690==so&&690==wo?"Pacific/Norfolk":720==so&&660==wo?"Asia/Magadan":720==so&&720==wo?"Pacific/Fiji":720==so&&780==wo?"Pacific/Auckland":765==so&&825==wo?"Pacific/Chatham":780==so&&780==wo?"Pacific/Enderbury":840==so&&840==wo?"Pacific/Kiritimati":"US/Pacific"}function setCookie(e,s,a){var c=new Date;c.setDate(c.getDate()+a);var t=escape(s)+(null==a?"":"; expires="+c.toUTCString())+"; path=/;";document.cookie=e+"="+t}function getCookie(e){var s,a,c,t=document.cookie.split(";");for(s=0;s<t.length;s++)if(a=t[s].substr(0,t[s].indexOf("=")),c=t[s].substr(t[s].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(c)}function LoadFacebook(e,s){}function PrepareReviewStars(e){var s=document.createElement("a");return s.setAttribute("style","text-decoration:none"),s.setAttribute("title",e.toString()),s.setAttribute("href","#"),e>=1&&e<2?(s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>'):e>=2&&e<3?(s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>'):e>=3&&e<4?(s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>'):e>=4&&e<5?(s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>'):e>=5?(s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar filledRatingStar" >&nbsp;</span>'):(s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>',s.innerHTML+='<span style="float:left;" class="ratingStar emptyRatingStar">&nbsp;</span>'),s.innerHTML+="</a>",s.innerHTML}function GetValueFromRank(e){var s="";switch(e=parseFloat(e)){case 1:s="Poor";break;case 2:s="Fair";break;case 3:s="Average";break;case 4:s="Good";break;case 5:s="Excellent"}return s}function GetRoundValueFromRank(e){var s="";switch(e=Math.round(e)){case 1:s="Poor";break;case 2:s="Fair";break;case 3:s="Average";break;case 4:s="Good";break;case 5:s="Excellent"}return s}function ScrollToTop(){$("html, body").animate({scrollTop:0},"slow")}function ScrollToTopMenu(){$("html, body").animate({scrollTop:156},"slow")}function ScrollToTopShopDetail(){$("html, body").animate({scrollTop:$("#aTopShopDetail").offset().top},"slow")}function ScrollToTopPublicAcc(){$("html, body").animate({scrollTop:$("#aTopPublic").offset().top},"slow")}function CheckSplashScreen(e,s){Vagaro.MySampleService.CheckToShowSplashScreen(e,s,CallSuccessCheckSplashShow,CheckSplashShow_CallFailed)}function CheckSplashShow_CallFailed(e){}function CallSuccessCheckSplashShow(e){"true"==e.toString()&&(location.href="MobileSplash.aspx")}function RegisterLazyLoad(){$("img.lazy").lazyload({event:"sporty"})}function SetLazyTime(){setTimeout(function(){$("img.lazy").trigger("sporty")},2e3)}function ShowLoader(e){1==e?($("#apgLoading").show(),"undefined"!=typeof vgAppicationType&&1==vgAppicationType&&CallbackforMobileApp(0,0,"","",0,14)):$("#apgLoading").hide()}KeepValue=new Array;var _0x76b1=["undefined","length","#IsWaitforKeepALive","val","toLowerCase","true","protocol","//","hostname","port",":","/","WebServices/","POST","application/json; charset=utf-8","{","}","K","setRequestHeader","I","Val","keepAlive","#hdnToken1","token1","#hdnToken2","token2","grouptoken","json","ajax"];function CallWebServicehed(e,s,a,c){if(typeof keepAlive==_0x76b1[0]&&$(_0x76b1[2])[_0x76b1[1]]>0&&typeof $(_0x76b1[2])[_0x76b1[3]]()!=_0x76b1[0]&&$(_0x76b1[2])[_0x76b1[3]]()[_0x76b1[4]]()===_0x76b1[5])setTimeout(function(){CallWebServicehed(e,s,a,c)},500);else{var t=location[_0x76b1[6]]+_0x76b1[7]+location[_0x76b1[8]]+(location[_0x76b1[9]]&&_0x76b1[10]+location[_0x76b1[9]])+_0x76b1[11];e=t+_0x76b1[12]+e,$[_0x76b1[28]]({type:_0x76b1[13],contentType:_0x76b1[14],url:e,data:_0x76b1[15]+s+_0x76b1[16],beforeSend:function(e){e[_0x76b1[18]](_0x76b1[17],getek()),e[_0x76b1[18]](_0x76b1[19],getei()),e[_0x76b1[18]](_0x76b1[20],EncIV()),typeof keepAlive!=_0x76b1[0]&&e[_0x76b1[18]](_0x76b1[21],keepAlive),1==$(_0x76b1[22])[_0x76b1[1]]&&typeof $(_0x76b1[22])[_0x76b1[3]]()!=_0x76b1[0]&&e[_0x76b1[18]](_0x76b1[23],$(_0x76b1[22])[_0x76b1[3]]()),1==$(_0x76b1[24])[_0x76b1[1]]&&typeof $(_0x76b1[24])[_0x76b1[3]]()!=_0x76b1[0]&&e[_0x76b1[18]](_0x76b1[25],$(_0x76b1[24])[_0x76b1[3]]()),typeof groupID!=_0x76b1[0]&&e[_0x76b1[18]](_0x76b1[26],groupID)},dataType:_0x76b1[27],success:a,error:c})}}function CallWS(e,s,a,c){CallWSJSON(e,s="{"+s+"}",a,c)}function CallWSJSON(e,s,a,c){if(void 0===keepAlive&&$("#IsWaitforKeepALive").length>0&&void 0!==$("#IsWaitforKeepALive").val()&&"true"===$("#IsWaitforKeepALive").val().toLowerCase())setTimeout(function(){CallWSJSON(e,s,a,c)},500);else{var t=location.protocol+"//"+location.hostname+(location.port&&":"+location.port)+"/";e=t+"WebServices/"+e,$.ajax({type:"POST",contentType:"application/json; charset=utf-8",xhr:function(){return null!=window.childWindow?new window.childWindow.XMLHttpRequest:new window.XMLHttpRequest},beforeSend:function(e){if(void 0!==keepAlive&&e.setRequestHeader("keepAlive",keepAlive),1==$("#hdnToken1").length&&void 0!==$("#hdnToken1").val()&&e.setRequestHeader("token1",$("#hdnToken1").val()),1==$("#hdnToken2").length&&void 0!==$("#hdnToken2").val()&&e.setRequestHeader("token2",$("#hdnToken2").val()),"undefined"!=typeof groupID&&e.setRequestHeader("grouptoken",groupID),"undefined"!=typeof _common&&void 0!==_common.IsCookieLessWidget&&_common.IsCookieLessWidget())"undefined"!=typeof widgetcookievalue&&null!=widgetcookievalue&&""!=widgetcookievalue&&e.setRequestHeader("widgetcookievalue",widgetcookievalue);else try{void 0!==window.parent._common&&void 0!==window.parent._common.IsCookieLessWidget&&window.parent._common.IsCookieLessWidget()&&"undefined"!=typeof widgetcookievalue&&null!=widgetcookievalue&&""!=widgetcookievalue&&e.setRequestHeader("widgetcookievalue",widgetcookievalue)}catch(e){}},url:e,data:s,dataType:"json",success:a,error:function(e,s,a){try{if(403===e.status)return alert("Your session is expired. Please reload your page."),void location.reload(!0);""!=c&&null!=c&&null!=c&&"function"==typeof c&&c(e,s,a)}catch(e){}}})}}function AsyncCallWS(e,s,a,c){AsyncCallWSJSON(e,s="{"+s+"}",a,c)}function AsyncCallWSJSON(e,s,a,c){e=location.protocol+"//"+location.hostname+(location.port&&":"+location.port)+"/"+"WebServices/"+e,$.ajax({type:"POST",contentType:"application/json; charset=utf-8",beforeSend:function(e){void 0!==keepAlive&&e.setRequestHeader("keepAlive",keepAlive),1==$("#hdnToken1").length&&void 0!==$("#hdnToken1").val()&&e.setRequestHeader("token1",$("#hdnToken1").val()),1==$("#hdnToken2").length&&void 0!==$("#hdnToken2").val()&&e.setRequestHeader("token2",$("#hdnToken2").val()),"undefined"!=typeof groupID&&e.setRequestHeader("grouptoken",groupID)},url:e,async:!1,data:s,dataType:"json",success:a,error:function(e,s,a){try{if(403===e.status)return alert("Your session is expired. Please reload your page."),void location.reload(!0);""!=c&&null!=c&&null!=c&&"function"==typeof c&&c(e,s,a)}catch(e){}}})}function AddUserControlAsync(e,s,a,c){e=location.protocol+"//"+location.hostname+(location.port&&":"+location.port)+"/"+"WebServices/"+e,$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,async:!1,data:s,dataType:"json",success:function(e){a.append(e.d),"function"==typeof c&&c()},error:function(e){alert("error occured.")}})}function AddUserControl(e,s,a){e=location.protocol+"//"+location.hostname+(location.port&&":"+location.port)+"/"+"WebServices/"+e,$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:s,dataType:"json",success:function(e){a.append(e.d),"#divucNotification"==a.selector&&"undefined"!=typeof _vagroNotification&&_vagroNotification.LoadNews(0)},error:function(e){}})}function RedirectToShopListReview(e,s){data2="1"==s?"&mode=O":"",CallWS("MySampleService.asmx/SetShopDetailSession",'"sValue" : "'+("tab=7"+("1"==s?"&mode=O":""))+data2+'"',RedirectPage(e),RedirectPage(e))}function ClearValidationControls(){$(".inputbox-type1").removeClass("errorInput"),$(".requiredErrorText").hide(),$(".errorInput").hide()}function CallParentFunction(e,s,a){return ShowDynamicPopup(s,442,766,e,a),!1}function HidePrivacyPolicy(e){3==e?HideDynamicPopup("divUserAgreement"):11==e?HideDynamicPopup("divCustomerAgreement"):HideDynamicPopup("divPrivacyPolicy")}function RegisterMenuScroll(){$(function(){var e=$(".inBanner").offset().top,s=function(){$(window).scrollTop()>e?($(".inBanner").css({position:"fixed",top:"34px","z-index":999}),$("#navigation").css({position:"fixed",top:0,"z-index":999})):($(".inBanner").css({position:"relative",top:0}),$("#navigation").css({position:"relative"}))};s(),$(window).scroll(function(){s()})})}function LoadAddToThisSmartLayer(){$.getScript("//s7.addthis.com/js/300/addthis_widget.js#pubid=fredhelou",function(e,s,a){"success"==s&&200==a.status&&addthis.layers({theme:"transparent",share:{position:"left",numPreferredServices:5},follow:{services:[{service:"facebook",id:"vagaro"},{service:"twitter",id:"vagaro"},{service:"pinterest",id:"VagaroPins"}]}})})}function remainingTextCounter(e,s,a,c){if(s=document.getElementById(s),(e="object"==typeof e||"function"==typeof e?e:document.getElementById(e)).value.length>c)return e.value=e.value.substring(0,c),s[a]=0,!1;s[a]=c-e.value.length}function convertJSONDateToDate(e){if(null==e||null==e)return e;var s=/-?\d+/.exec(e);return new Date(parseInt(s[0]))}var cache_ulCustomerList=null,cache_divCustomers=null,cache_txtSearchCustomer=null,cache_divCustomersData=null,cache_pgNoMatchDiv=null,cache_pgDiv=null,cache_divtxtCustomers=null,cache_ctrlendIndex=null,cache_ctrltotalCout=null,cache_isFromiPadAndroid=null,cache_isLoadCustFromDB=null,cache_syncDuration=null,cache_liSelectedClassName=null,cache_HasCustomerRight=null,cache_BusinessId=null,cache_SelectctedItem=null,cache_custlist="cusList",cache_cusSynInfo="cusSynInfo",cache_pageIndex=0,cache_pageSize=10,cache_noOfRecords=0,cache_glbData=[],cache_MS_PER_MINUTE=6e4,cache_isDBCallOnly=!1,cache_lastSearchText="",cache_isFirstTime=!1,cache_isSyncStarted=!1,cache_liSelected,cache_glbisScrollTop=!1,cache_OldSelectctedUserId=0,cache_IsValidControls=!1,IsFirsttime=!0,cache_PageType={newappointmentbook:1,addeditcustomer:2,searchnewappointment:3,mergefromcustomer:4,mergetocustomer:5,customermanagement:6,giftcertificatesender:7,giftcertificateeceipient:8,promotions:9,searchfriendfamilycustomer:10,vagarodrivedashboard:11,vagarodrivefilters:12,searchnewclass:13},glbPageName="";function InitializecomponentWrapper(e,s){var a={};1==cache_PageType[e]?(a.ulCustomerList="ulCustomers",a.divCustomers="divCustomers",a.txtSearchCustomer="txtSearchCustomer",a.divCustomersData="divCustomersData",a.pgNoMatchDiv="pgNoMatchDiv",a.pgDiv="pgDiv",a.totalCout="totalCout",a.endIndex="endIndex",a.divtxtCustomers="divtxtCustomers"):2==cache_PageType[e]?(a.ulCustomerList="ulCustomersAddEdit",a.divCustomers="divCustomersAddEdit",a.txtSearchCustomer="txtCustomerSearchAddEdit",a.divCustomersData="divCustomersDataAddEdit",a.pgNoMatchDiv="pgNoMatchDivAddEdit",a.pgDiv="pgDivAddEdit",a.totalCout="totalCoutAddEdit",a.endIndex="endIndexAddEdit",a.divtxtCustomers="divtxtCustomersAddEdit"):3==cache_PageType[e]?(a.ulCustomerList="ulCustomersAppointment",a.divCustomers="divCustomersAppointment",a.txtSearchCustomer="txtCustomerSearchAppointment",a.divCustomersData="divCustomersDataAppointment",a.pgNoMatchDiv="pgNoMatchDivAppointment",a.pgDiv="pgDivAppointment",a.totalCout="totalCoutAppointment",a.endIndex="endIndexAppointment",a.divtxtCustomers="divtxtCustomersAppointment"):4==cache_PageType[e]?(a.ulCustomerList="ulCustomersFrom",a.divCustomers="divCustomersFrom",a.txtSearchCustomer="txtCustomerSearchFrom",a.divCustomersData="divCustomersDataFrom",a.pgNoMatchDiv="pgNoMatchDivFrom",a.pgDiv="pgDivFrom",a.totalCout="totalCoutFrom",a.endIndex="endIndexFrom",a.divtxtCustomers="divtxtCustomersFrom"):5==cache_PageType[e]?(a.ulCustomerList="ulCustomers_To",a.divCustomers="divCustomers_To",a.txtSearchCustomer="txtCustomerSearch_To",a.divCustomersData="divCustomersData_To",a.pgNoMatchDiv="pgNoMatchDiv_To",a.pgDiv="pgDiv_To",a.totalCout="totalCout_To",a.endIndex="endIndex_To",a.divtxtCustomers="divtxtCustomers_To"):6==cache_PageType[e]?(a.ulCustomerList="ulCustomers",a.divCustomers="divCustomers",a.txtSearchCustomer="txtCustomerSearch",a.divCustomersData="divCustomersData",a.pgNoMatchDiv="pgNoMatchDiv",a.pgDiv="pgDiv",a.totalCout="totalCout",a.endIndex="endIndex",a.divtxtCustomers="divtxtCustomers"):7==cache_PageType[e]?(a.ulCustomerList="ulCustomersGift",a.divCustomers="divCustomersGift",a.txtSearchCustomer="txtCustomerSearchGift",a.divCustomersData="divCustomersDataGift",a.pgNoMatchDiv="pgNoMatchDivGift",a.pgDiv="pgDivGift",a.totalCout="totalCoutGift",a.endIndex="endIndexGift",a.divtxtCustomers="divtxtCustomersGift"):8==cache_PageType[e]?(a.ulCustomerList="ulCustomersReceipient",a.divCustomers="divCustomersReceipient",a.txtSearchCustomer="txtCustomerSearchReceipient",a.divCustomersData="divCustomersDataReceipient",a.pgNoMatchDiv="pgNoMatchDivReceipient",a.pgDiv="pgDivReceipient",a.totalCout="totalCoutReceipient",a.endIndex="endIndexReceipient",a.divtxtCustomers="divtxtCustomersReceipient"):9==cache_PageType[e]?(a.ulCustomerList="ulCustomersSeeWho",a.divCustomers="divCustomersSeeWho",a.txtSearchCustomer="txtSearchCustomer",a.divCustomersData="divSearchCustomer",a.pgNoMatchDiv="pgNoMatchDivSeeWho",a.pgDiv="pgDivSeeWho",a.totalCout="totalCoutSeeWho",a.endIndex="endIndexSeeWho",a.divtxtCustomers="divtxtCustomersSeeWho"):10==cache_PageType[e]?(a.ulCustomerList="ulCustomersFriends",a.divCustomers="divCustomersFriends",a.txtSearchCustomer="txtCustomerSearchFriend",a.divCustomersData="divCustomersDataFriends",a.pgNoMatchDiv="pgNoMatchDivFriends",a.pgDiv="pgDivFriends",a.totalCout="totalCoutFriends",a.endIndex="endIndexFriends",a.divtxtCustomers="divtxtCustomersFriends"):11==cache_PageType[e]?(a.ulCustomerList="ulCustomersDashboard",a.divCustomers="divCustomersDashboard",a.txtSearchCustomer="txtCustomerSearchDashboard",a.divCustomersData="divCustomersDataDashboard",a.pgNoMatchDiv="pgNoMatchDivDashboard",a.pgDiv="pgDivDashboard",a.totalCout="totalCoutDashboard",a.endIndex="endIndexDashboard",a.divtxtCustomers="divtxtCustomersDashboard"):12==cache_PageType[e]?(a.ulCustomerList="ulCustomersFilters",a.divCustomers="divCustomersFilters",a.txtSearchCustomer="txtCustomerSearchFilters",a.divCustomersData="divCustomersDataFilters",a.pgNoMatchDiv="pgNoMatchDivFilters",a.pgDiv="pgDivFilters",a.totalCout="totalCoutFilters",a.endIndex="endIndexFilters",a.divtxtCustomers="divtxtCustomersFilters"):13==cache_PageType[e]&&(a.ulCustomerList="ulCustomersAppointment",a.divCustomers="divCustomersAppointment",a.txtSearchCustomer="txtCustomerSearchClass",a.divCustomersData="divCustomersDataAppointment",a.pgNoMatchDiv="pgNoMatchDivAppointment",a.pgDiv="pgDivAppointment",a.totalCout="totalCoutAppointment",a.endIndex="endIndexAppointment",a.divtxtCustomers="divtxtCustomersAppointment"),null!=s&&Object.getOwnPropertyNames(s).length>0?(a.isFromiPadAndroid=s.isFromiPadAndroid,a.isLoadCustFromDB=s.isLoadCustFromDB,a.syncDuration=s.syncDuration,a.liSelectedClassName=s.liSelectedClassName,a.HasCustomerRight=s.HasCustomerRight,a.BusinessId=s.BusinessId):(a.isFromiPadAndroid=cache_isFromiPadAndroid,a.isLoadCustFromDB=cache_isLoadCustFromDB,a.syncDuration=cache_syncDuration,a.liSelectedClassName=cache_liSelectedClassName,a.HasCustomerRight=cache_HasCustomerRight,a.BusinessId=cache_BusinessId),glbPageName!=cache_PageType[e]&&(glbPageName=cache_PageType[e],Initializecomponent(a))}function Initializecomponent(e){cache_ulCustomerList=GetClientID(e.ulCustomerList),cache_divCustomers=GetClientID(e.divCustomers),cache_txtSearchCustomer=GetClientID(e.txtSearchCustomer),cache_divCustomersData=GetClientID(e.divCustomersData),cache_pgNoMatchDiv=GetClientID(e.pgNoMatchDiv),cache_pgDiv=GetClientID(e.pgDiv),cache_divtxtCustomers=GetClientID(e.divtxtCustomerscache_pgDiv),cache_ctrlendIndex=GetClientID(e.endIndex),cache_ctrltotalCout=GetClientID(e.totalCout),cache_isFromiPadAndroid=e.isFromiPadAndroid,cache_isLoadCustFromDB=e.isLoadCustFromDB,cache_syncDuration=e.syncDuration,cache_liSelectedClassName=e.liSelectedClassName,cache_HasCustomerRight=e.HasCustomerRight,cache_BusinessId=e.BusinessId,Load_CachingCustomer(),cache_IsValidControls=IsValidControls(e),$(document).mousedown(function(e){if(1==cache_IsValidControls){var s=cache_divCustomersData;s.is(e.target)||0!==s.has(e.target).length||cache_divCustomers.is(e.target)||0!==cache_divCustomers.has(e.target).length||cache_pgDiv.is(e.target)||0!==cache_pgDiv.has(e.target).length||cache_pgNoMatchDiv.is(e.target)||0!==cache_pgNoMatchDiv.has(e.target).length||cache_divtxtCustomers.is(e.target)||0!==cache_divtxtCustomers.has(e.target).length||cache_divCustomers.is(":visible")&&cache_divCustomers.slideUp(250,function(){cache_PageType.customermanagement==glbPageName?(slideToggleofCustomerDetails(!0),cache_liSelected=null,cache_txtSearchCustomer.blur()):(cache_ulCustomerList.unbind("scroll"),cache_liSelected=null)})}}),$(document).mouseover(function(e){if(1==cache_IsValidControls){var s=cache_ulCustomerList,a=cache_ulCustomerList.find("> li");(!s.is(e.target)&&0!==s.has(e.target).length||!cache_divCustomers.is(e.target)&&0!==cache_divCustomers.has(e.target).length)&&void 0!==a&&(a.removeClass(cache_liSelectedClassName),cache_txtSearchCustomer.focus(),IsFirsttime=!0)}}),cache_PageType.customermanagement==glbPageName||cache_txtSearchCustomer.on("keydown paste",function(e){txtSearchCustomer_Keyup(e)})}function Load_CachingCustomer(){var e=!1;if("object"==typeof localStorage)try{localStorage.setItem("localStorage",1),localStorage.removeItem("localStorage"),91811!=cache_BusinessId&&125932!=cache_BusinessId&&121134!=cache_BusinessId&&96730!=cache_BusinessId&&30029!=cache_BusinessId&&137101!=cache_BusinessId&&179646!=cache_BusinessId&&250188!=cache_BusinessId&&251078!=cache_BusinessId&&255379!=cache_BusinessId&&255380!=cache_BusinessId&&255669!=cache_BusinessId&&255671!=cache_BusinessId&&255672!=cache_BusinessId&&255673!=cache_BusinessId&&255674!=cache_BusinessId&&255675!=cache_BusinessId&&255676!=cache_BusinessId&&255677!=cache_BusinessId&&255678!=cache_BusinessId&&255679!=cache_BusinessId&&255680!=cache_BusinessId&&292219!=cache_BusinessId&&289809!=cache_BusinessId&&290847!=cache_BusinessId&&291730!=cache_BusinessId&&292217!=cache_BusinessId&&292218!=cache_BusinessId&&292220!=cache_BusinessId&&317839!=cache_BusinessId&&317837!=cache_BusinessId&&317841!=cache_BusinessId&&317842!=cache_BusinessId&&317177!=cache_BusinessId&&333428!=cache_BusinessId&&333425!=cache_BusinessId&&333429!=cache_BusinessId&&333426!=cache_BusinessId&&333430!=cache_BusinessId&&333432!=cache_BusinessId&&333435!=cache_BusinessId&&333433!=cache_BusinessId&&333436!=cache_BusinessId&&333434!=cache_BusinessId&&333437!=cache_BusinessId&&333441!=cache_BusinessId&&333438!=cache_BusinessId&&333442!=cache_BusinessId&&333444!=cache_BusinessId&&333449!=cache_BusinessId&&333447!=cache_BusinessId&&333450!=cache_BusinessId&&333452!=cache_BusinessId&&333451!=cache_BusinessId&&333454!=cache_BusinessId&&333456!=cache_BusinessId&&333455!=cache_BusinessId&&333457!=cache_BusinessId&&333461!=cache_BusinessId&&333458!=cache_BusinessId&&333462!=cache_BusinessId&&333459!=cache_BusinessId&&333463!=cache_BusinessId&&333465!=cache_BusinessId&&333469!=cache_BusinessId&&333466!=cache_BusinessId&&333470!=cache_BusinessId&&333468!=cache_BusinessId&&333472!=cache_BusinessId&&333473!=cache_BusinessId&&333477!=cache_BusinessId&&333474!=cache_BusinessId&&333478!=cache_BusinessId&&333476!=cache_BusinessId&&333479!=cache_BusinessId&&333482!=cache_BusinessId&&333480!=cache_BusinessId&&333483!=cache_BusinessId&&333485!=cache_BusinessId&&333489!=cache_BusinessId&&333486!=cache_BusinessId&&333499!=cache_BusinessId&&333487!=cache_BusinessId&&333500!=cache_BusinessId&&333488!=cache_BusinessId&&333506!=cache_BusinessId&&333494!=cache_BusinessId&&333509!=cache_BusinessId&&333503!=cache_BusinessId&&333515!=cache_BusinessId&&333505!=cache_BusinessId&&333517!=cache_BusinessId&&333510!=cache_BusinessId&&333526!=cache_BusinessId&&333511!=cache_BusinessId&&333531!=cache_BusinessId&&333497!=cache_BusinessId&&333532!=cache_BusinessId&&333519!=cache_BusinessId&&333540!=cache_BusinessId&&333522!=cache_BusinessId&&333541!=cache_BusinessId&&333528!=cache_BusinessId&&333523!=cache_BusinessId&&333535!=cache_BusinessId&&333548!=cache_BusinessId&&333536!=cache_BusinessId&&333551!=cache_BusinessId&&333537!=cache_BusinessId&&333557!=cache_BusinessId&&333538!=cache_BusinessId&&333567!=cache_BusinessId&&333545!=cache_BusinessId&&333559!=cache_BusinessId&&333547!=cache_BusinessId&&333565!=cache_BusinessId&&333552!=cache_BusinessId&&333576!=cache_BusinessId&&333554!=cache_BusinessId&&333584!=cache_BusinessId&&333561!=cache_BusinessId&&333600!=cache_BusinessId&&333563!=cache_BusinessId&&333601!=cache_BusinessId&&333569!=cache_BusinessId&&333606!=cache_BusinessId&&333571!=cache_BusinessId&&333593!=cache_BusinessId&&333572!=cache_BusinessId&&333610!=cache_BusinessId&&333579!=cache_BusinessId&&333616!=cache_BusinessId&&333588!=cache_BusinessId&&333617!=cache_BusinessId&&333595!=cache_BusinessId&&333623!=cache_BusinessId&&333596!=cache_BusinessId&&333597!=cache_BusinessId&&333604!=cache_BusinessId&&333612!=cache_BusinessId&&333614!=cache_BusinessId&&333620!=cache_BusinessId&&333622!=cache_BusinessId&&333424!=cache_BusinessId&&333513!=cache_BusinessId&&333633!=cache_BusinessId&&333634!=cache_BusinessId&&333631!=cache_BusinessId&&333632!=cache_BusinessId&&333628!=cache_BusinessId&&333630!=cache_BusinessId&&333423!=cache_BusinessId&&333629!=cache_BusinessId&&333624!=cache_BusinessId&&333625!=cache_BusinessId&&333626!=cache_BusinessId&&333627!=cache_BusinessId&&333618!=cache_BusinessId&&333621!=cache_BusinessId&&333619!=cache_BusinessId&&333421!=cache_BusinessId&&333615!=cache_BusinessId&&333613!=cache_BusinessId&&333609!=cache_BusinessId&&333611!=cache_BusinessId&&333607!=cache_BusinessId&&333603!=cache_BusinessId&&333608!=cache_BusinessId&&333605!=cache_BusinessId&&333602!=cache_BusinessId&&333591!=cache_BusinessId&&333594!=cache_BusinessId&&333592!=cache_BusinessId&&333598!=cache_BusinessId&&333599!=cache_BusinessId&&333587!=cache_BusinessId&&333590!=cache_BusinessId&&333589!=cache_BusinessId&&333420!=cache_BusinessId&&333585!=cache_BusinessId&&333586!=cache_BusinessId&&333582!=cache_BusinessId&&333583!=cache_BusinessId&&333580!=cache_BusinessId&&333568!=cache_BusinessId&&333577!=cache_BusinessId&&333573!=cache_BusinessId&&333570!=cache_BusinessId&&333575!=cache_BusinessId&&333562!=cache_BusinessId&&333566!=cache_BusinessId&&333555!=cache_BusinessId&&333558!=cache_BusinessId&&333560!=cache_BusinessId&&333550!=cache_BusinessId&&333553!=cache_BusinessId&&333549!=cache_BusinessId&&333546!=cache_BusinessId&&333524!=cache_BusinessId&&333427!=cache_BusinessId&&333525!=cache_BusinessId&&333453!=cache_BusinessId&&333542!=cache_BusinessId&&333539!=cache_BusinessId&&333543!=cache_BusinessId&&333529!=cache_BusinessId&&333533!=cache_BusinessId&&333530!=cache_BusinessId&&333534!=cache_BusinessId&&333520!=cache_BusinessId&&333501!=cache_BusinessId&&333521!=cache_BusinessId&&333518!=cache_BusinessId&&333502!=cache_BusinessId&&333516!=cache_BusinessId&&333512!=cache_BusinessId&&333514!=cache_BusinessId&&333496!=cache_BusinessId&&333507!=cache_BusinessId&&333508!=cache_BusinessId&&333491!=cache_BusinessId&&333419!=cache_BusinessId&&333418!=cache_BusinessId&&333415!=cache_BusinessId&&333414!=cache_BusinessId&&333413!=cache_BusinessId&&333407!=cache_BusinessId&&333410!=cache_BusinessId&&333411!=cache_BusinessId&&333406!=cache_BusinessId&&333405!=cache_BusinessId&&333404!=cache_BusinessId&&333403!=cache_BusinessId&&333416!=cache_BusinessId&&333401!=cache_BusinessId&&333399!=cache_BusinessId&&333394!=cache_BusinessId&&333396!=cache_BusinessId&&333412!=cache_BusinessId&&333391!=cache_BusinessId&&333390!=cache_BusinessId&&333386!=cache_BusinessId&&333382!=cache_BusinessId&&333400!=cache_BusinessId&&333378!=cache_BusinessId&&333392!=cache_BusinessId&&333374!=cache_BusinessId&&333388!=cache_BusinessId&&333372!=cache_BusinessId&&333370!=cache_BusinessId&&333385!=cache_BusinessId&&333384!=cache_BusinessId&&333381!=cache_BusinessId&&333355!=cache_BusinessId&&333357!=cache_BusinessId&&333358!=cache_BusinessId&&333380!=cache_BusinessId&&333350!=cache_BusinessId&&333348!=cache_BusinessId&&333379!=cache_BusinessId&&333347!=cache_BusinessId&&333344!=cache_BusinessId&&333339!=cache_BusinessId&&333377!=cache_BusinessId&&333376!=cache_BusinessId&&333337!=cache_BusinessId&&333375!=cache_BusinessId&&333341!=cache_BusinessId&&333373!=cache_BusinessId&&333371!=cache_BusinessId&&333369!=cache_BusinessId&&333367!=cache_BusinessId&&333368!=cache_BusinessId&&333365!=cache_BusinessId&&333366!=cache_BusinessId&&333364!=cache_BusinessId&&333361!=cache_BusinessId&&333362!=cache_BusinessId&&333363!=cache_BusinessId&&333359!=cache_BusinessId&&333360!=cache_BusinessId&&333356!=cache_BusinessId&&333354!=cache_BusinessId&&333351!=cache_BusinessId&&333352!=cache_BusinessId&&333349!=cache_BusinessId&&333353!=cache_BusinessId&&333346!=cache_BusinessId&&333345!=cache_BusinessId&&333343!=cache_BusinessId&&333342!=cache_BusinessId&&333338!=cache_BusinessId&&333340!=cache_BusinessId&&333336!=cache_BusinessId&&333335!=cache_BusinessId&&333334!=cache_BusinessId&&333333!=cache_BusinessId&&333329!=cache_BusinessId&&333331!=cache_BusinessId&&333328!=cache_BusinessId&&333330!=cache_BusinessId&&333327!=cache_BusinessId&&333325!=cache_BusinessId&&333326!=cache_BusinessId&&333324!=cache_BusinessId&&328177!=cache_BusinessId&&328176!=cache_BusinessId&&328175!=cache_BusinessId&&328173!=cache_BusinessId&&328172!=cache_BusinessId&&328171!=cache_BusinessId&&328170!=cache_BusinessId&&328169!=cache_BusinessId&&328168!=cache_BusinessId&&328167!=cache_BusinessId&&328166!=cache_BusinessId&&328165!=cache_BusinessId&&328164!=cache_BusinessId&&328163!=cache_BusinessId&&328162!=cache_BusinessId&&328160!=cache_BusinessId&&328159!=cache_BusinessId&&328158!=cache_BusinessId&&324569!=cache_BusinessId&&324565!=cache_BusinessId&&324566!=cache_BusinessId&&324564!=cache_BusinessId&&324567!=cache_BusinessId&&324562!=cache_BusinessId&&324563!=cache_BusinessId&&324561!=cache_BusinessId&&324559!=cache_BusinessId&&324560!=cache_BusinessId&&324558!=cache_BusinessId&&324556!=cache_BusinessId&&324557!=cache_BusinessId&&324555!=cache_BusinessId&&324554!=cache_BusinessId&&324550!=cache_BusinessId&&324552!=cache_BusinessId&&324551!=cache_BusinessId&&324553!=cache_BusinessId&&324549!=cache_BusinessId&&324548!=cache_BusinessId&&324546!=cache_BusinessId&&324547!=cache_BusinessId&&324545!=cache_BusinessId&&324544!=cache_BusinessId&&324543!=cache_BusinessId&&324540!=cache_BusinessId&&324541!=cache_BusinessId&&324539!=cache_BusinessId&&324538!=cache_BusinessId&&324536!=cache_BusinessId&&324537!=cache_BusinessId&&324535!=cache_BusinessId&&324534!=cache_BusinessId&&321060!=cache_BusinessId&&324533!=cache_BusinessId&&321059!=cache_BusinessId&&321058!=cache_BusinessId&&321057!=cache_BusinessId&&321056!=cache_BusinessId&&321055!=cache_BusinessId&&321054!=cache_BusinessId&&321053!=cache_BusinessId&&321052!=cache_BusinessId&&321049!=cache_BusinessId&&321048!=cache_BusinessId&&321047!=cache_BusinessId&&321046!=cache_BusinessId&&321044!=cache_BusinessId&&321045!=cache_BusinessId&&321041!=cache_BusinessId&&321042!=cache_BusinessId&&321040!=cache_BusinessId&&321039!=cache_BusinessId&&321037!=cache_BusinessId&&321038!=cache_BusinessId&&314509!=cache_BusinessId&&314496!=cache_BusinessId&&314510!=cache_BusinessId&&314497!=cache_BusinessId&&314500!=cache_BusinessId&&314498!=cache_BusinessId&&314501!=cache_BusinessId&&314499!=cache_BusinessId&&314503!=cache_BusinessId&&314504!=cache_BusinessId&&314508!=cache_BusinessId&&314505!=cache_BusinessId&&321034!=cache_BusinessId&&314506!=cache_BusinessId&&321035!=cache_BusinessId&&314507!=cache_BusinessId&&321036!=cache_BusinessId&&315601!=cache_BusinessId&&315602!=cache_BusinessId&&314495!=cache_BusinessId&&314494!=cache_BusinessId&&314491!=cache_BusinessId&&314493!=cache_BusinessId&&314487!=cache_BusinessId&&314488!=cache_BusinessId&&314489!=cache_BusinessId&&314490!=cache_BusinessId&&314483!=cache_BusinessId&&314486!=cache_BusinessId&&314481!=cache_BusinessId&&314482!=cache_BusinessId&&314475!=cache_BusinessId&&314479!=cache_BusinessId&&314476!=cache_BusinessId&&314480!=cache_BusinessId&&314477!=cache_BusinessId&&314478!=cache_BusinessId&&314474!=cache_BusinessId&&314473!=cache_BusinessId&&314472!=cache_BusinessId&&287892!=cache_BusinessId&&287893!=cache_BusinessId&&285325!=cache_BusinessId&&287894!=cache_BusinessId&&287895!=cache_BusinessId&&287897!=cache_BusinessId&&287890!=cache_BusinessId&&287896!=cache_BusinessId&&287891!=cache_BusinessId&&287898!=cache_BusinessId&&314471!=cache_BusinessId&&314470!=cache_BusinessId&&314468!=cache_BusinessId&&314469!=cache_BusinessId&&314466!=cache_BusinessId&&314467!=cache_BusinessId&&318174!=cache_BusinessId&&318170!=cache_BusinessId&&318171!=cache_BusinessId&&318175!=cache_BusinessId&&318172!=cache_BusinessId&&318173!=cache_BusinessId&&318176!=cache_BusinessId&&322838!=cache_BusinessId&&279510!=cache_BusinessId&&318332!=cache_BusinessId&&318320!=cache_BusinessId&&323581!=cache_BusinessId&&318313!=cache_BusinessId&&318318!=cache_BusinessId&&323414!=cache_BusinessId&&318317!=cache_BusinessId&&323709!=cache_BusinessId&&325373!=cache_BusinessId&&330056!=cache_BusinessId&&323467!=cache_BusinessId&&318345!=cache_BusinessId&&323644!=cache_BusinessId&&323383!=cache_BusinessId&&323728!=cache_BusinessId&&327399!=cache_BusinessId&&323719!=cache_BusinessId&&323686!=cache_BusinessId&&318324!=cache_BusinessId&&323729!=cache_BusinessId&&323373!=cache_BusinessId&&323512!=cache_BusinessId&&323402!=cache_BusinessId&&326443!=cache_BusinessId&&323465!=cache_BusinessId&&323694!=cache_BusinessId&&323659!=cache_BusinessId&&323689!=cache_BusinessId&&323635!=cache_BusinessId&&323446!=cache_BusinessId&&323579!=cache_BusinessId&&325374!=cache_BusinessId&&318340!=cache_BusinessId&&329375!=cache_BusinessId&&323632!=cache_BusinessId&&318336!=cache_BusinessId&&318321!=cache_BusinessId&&323366!=cache_BusinessId&&323633!=cache_BusinessId&&323497!=cache_BusinessId&&323428!=cache_BusinessId&&323572!=cache_BusinessId&&323700!=cache_BusinessId&&323652!=cache_BusinessId&&323493!=cache_BusinessId&&323557!=cache_BusinessId&&326441!=cache_BusinessId&&323377!=cache_BusinessId&&332072!=cache_BusinessId&&318344!=cache_BusinessId&&323480!=cache_BusinessId&&330512!=cache_BusinessId&&323396!=cache_BusinessId&&323442!=cache_BusinessId&&323468!=cache_BusinessId&&323392!=cache_BusinessId&&323375!=cache_BusinessId&&318334!=cache_BusinessId&&328012!=cache_BusinessId&&323754!=cache_BusinessId&&323451!=cache_BusinessId&&323697!=cache_BusinessId&&325375!=cache_BusinessId&&323461!=cache_BusinessId&&323416!=cache_BusinessId&&323650!=cache_BusinessId&&323679!=cache_BusinessId&&323358!=cache_BusinessId&&323653!=cache_BusinessId&&323604!=cache_BusinessId&&318314!=cache_BusinessId&&318329!=cache_BusinessId&&323357!=cache_BusinessId&&323571!=cache_BusinessId&&318323!=cache_BusinessId&&323436!=cache_BusinessId&&323411!=cache_BusinessId&&323542!=cache_BusinessId&&323483!=cache_BusinessId&&323546!=cache_BusinessId&&323718!=cache_BusinessId&&323408!=cache_BusinessId&&318328!=cache_BusinessId&&323355!=cache_BusinessId&&326394!=cache_BusinessId&&318325!=cache_BusinessId&&323463!=cache_BusinessId&&323500!=cache_BusinessId&&323688!=cache_BusinessId&&323638!=cache_BusinessId&&323711!=cache_BusinessId&&323665!=cache_BusinessId&&323608!=cache_BusinessId&&323410!=cache_BusinessId&&323631!=cache_BusinessId&&323477!=cache_BusinessId&&321030!=cache_BusinessId&&323418!=cache_BusinessId&&323705!=cache_BusinessId&&323629!=cache_BusinessId&&323619!=cache_BusinessId&&326402!=cache_BusinessId&&323508!=cache_BusinessId&&318335!=cache_BusinessId&&323380!=cache_BusinessId&&323441!=cache_BusinessId&&323590!=cache_BusinessId&&323475!=cache_BusinessId&&318308!=cache_BusinessId&&326413!=cache_BusinessId&&323684!=cache_BusinessId&&318309!=cache_BusinessId&&318311!=cache_BusinessId&&329374!=cache_BusinessId&&323623!=cache_BusinessId&&318337!=cache_BusinessId&&323515!=cache_BusinessId&&323726!=cache_BusinessId&&323563!=cache_BusinessId&&323488!=cache_BusinessId&&323567!=cache_BusinessId&&323640!=cache_BusinessId&&318312!=cache_BusinessId&&323376!=cache_BusinessId&&326419!=cache_BusinessId&&323536!=cache_BusinessId&&323645!=cache_BusinessId&&323384!=cache_BusinessId&&318339!=cache_BusinessId&&318341!=cache_BusinessId&&323401!=cache_BusinessId&&326388!=cache_BusinessId&&318322!=cache_BusinessId&&323568!=cache_BusinessId&&323654!=cache_BusinessId&&323385!=cache_BusinessId&&323739!=cache_BusinessId&&318338!=cache_BusinessId&&323744!=cache_BusinessId&&323535!=cache_BusinessId&&299803!=cache_BusinessId&&323522!=cache_BusinessId&&318315!=cache_BusinessId&&318306!=cache_BusinessId&&323624!=cache_BusinessId&&323524!=cache_BusinessId&&326403!=cache_BusinessId&&323599!=cache_BusinessId&&323519!=cache_BusinessId&&323637!=cache_BusinessId&&323661!=cache_BusinessId&&323732!=cache_BusinessId&&323636!=cache_BusinessId&&323616!=cache_BusinessId&&323478!=cache_BusinessId&&323455!=cache_BusinessId&&323390!=cache_BusinessId&&319204!=cache_BusinessId&&318307!=cache_BusinessId&&323749!=cache_BusinessId&&323755!=cache_BusinessId&&323538!=cache_BusinessId&&329377!=cache_BusinessId&&318326!=cache_BusinessId&&323447!=cache_BusinessId&&323591!=cache_BusinessId&&323742!=cache_BusinessId&&323420!=cache_BusinessId&&323667!=cache_BusinessId&&318316!=cache_BusinessId&&326401!=cache_BusinessId&&326408!=cache_BusinessId&&323419!=cache_BusinessId&&318342!=cache_BusinessId&&323525!=cache_BusinessId&&323526!=cache_BusinessId&&323510!=cache_BusinessId&&323618!=cache_BusinessId&&327667!=cache_BusinessId&&323707!=cache_BusinessId&&323444!=cache_BusinessId&&323713!=cache_BusinessId&&323460!=cache_BusinessId&&323548!=cache_BusinessId&&323476!=cache_BusinessId&&323431!=cache_BusinessId&&323501!=cache_BusinessId&&323600!=cache_BusinessId&&323706!=cache_BusinessId&&326412!=cache_BusinessId&&323417!=cache_BusinessId&&323714!=cache_BusinessId&&323394!=cache_BusinessId&&321029!=cache_BusinessId&&318327!=cache_BusinessId&&323539!=cache_BusinessId&&323562!=cache_BusinessId&&323423!=cache_BusinessId&&323530!=cache_BusinessId&&323656!=cache_BusinessId&&323680!=cache_BusinessId&&318331!=cache_BusinessId&&326390!=cache_BusinessId&&326404!=cache_BusinessId&&323737!=cache_BusinessId&&327400!=cache_BusinessId&&332211!=cache_BusinessId&&323611!=cache_BusinessId&&321028!=cache_BusinessId&&318310!=cache_BusinessId&&323404!=cache_BusinessId&&323427!=cache_BusinessId&&323704!=cache_BusinessId&&323438!=cache_BusinessId&&323681!=cache_BusinessId&&323746!=cache_BusinessId&&323583!=cache_BusinessId&&323549!=cache_BusinessId&&323368!=cache_BusinessId&&323520!=cache_BusinessId&&326426!=cache_BusinessId&&326438!=cache_BusinessId&&318304!=cache_BusinessId&&323555!=cache_BusinessId&&323552!=cache_BusinessId&&326393!=cache_BusinessId&&323521!=cache_BusinessId&&323511!=cache_BusinessId&&323641!=cache_BusinessId&&326428!=cache_BusinessId&&323678!=cache_BusinessId&&323473!=cache_BusinessId&&323677!=cache_BusinessId&&323574!=cache_BusinessId&&318330!=cache_BusinessId&&323547!=cache_BusinessId&&323509!=cache_BusinessId&&323639!=cache_BusinessId&&318343!=cache_BusinessId&&323405!=cache_BusinessId&&323499!=cache_BusinessId&&323753!=cache_BusinessId&&323362!=cache_BusinessId&&323750!=cache_BusinessId&&323495!=cache_BusinessId&&323391!=cache_BusinessId&&323457!=cache_BusinessId&&325821!=cache_BusinessId&&323685!=cache_BusinessId&&323649!=cache_BusinessId&&323556!=cache_BusinessId&&323412!=cache_BusinessId&&323628!=cache_BusinessId&&323504!=cache_BusinessId&&329376!=cache_BusinessId&&323664!=cache_BusinessId&&323620!=cache_BusinessId&&323372!=cache_BusinessId&&327397!=cache_BusinessId&&323506!=cache_BusinessId&&323399!=cache_BusinessId&&326431!=cache_BusinessId&&319205!=cache_BusinessId&&323491!=cache_BusinessId&&323666!=cache_BusinessId&&323434!=cache_BusinessId&&331806!=cache_BusinessId&&332074!=cache_BusinessId&&323643!=cache_BusinessId&&323413!=cache_BusinessId&&323683!=cache_BusinessId&&329373!=cache_BusinessId&&326386!=cache_BusinessId&&326437!=cache_BusinessId&&326392!=cache_BusinessId&&326421!=cache_BusinessId&&326409!=cache_BusinessId&&326422!=cache_BusinessId&&326410!=cache_BusinessId&&326439!=cache_BusinessId&&326411!=cache_BusinessId&&326440!=cache_BusinessId&&326416!=cache_BusinessId&&326407!=cache_BusinessId&&326417!=cache_BusinessId&&326389!=cache_BusinessId&&326427!=cache_BusinessId&&326414!=cache_BusinessId&&326424!=cache_BusinessId&&326405!=cache_BusinessId&&326425!=cache_BusinessId&&326395!=cache_BusinessId&&326435!=cache_BusinessId&&326396!=cache_BusinessId&&326436!=cache_BusinessId&&326397!=cache_BusinessId&&326398!=cache_BusinessId&&323613!=cache_BusinessId&&323710!=cache_BusinessId&&323605!=cache_BusinessId&&323585!=cache_BusinessId&&323422!=cache_BusinessId&&323550!=cache_BusinessId&&323503!=cache_BusinessId&&326406!=cache_BusinessId&&326433!=cache_BusinessId&&326415!=cache_BusinessId&&326434!=cache_BusinessId&&326420!=cache_BusinessId&&326399!=cache_BusinessId&&326423!=cache_BusinessId&&326400!=cache_BusinessId&&326430!=cache_BusinessId&&326391!=cache_BusinessId&&326432!=cache_BusinessId&&318319!=cache_BusinessId&&323671!=cache_BusinessId&&325376!=cache_BusinessId&&321032!=cache_BusinessId&&323651!=cache_BusinessId&&332073!=cache_BusinessId&&330511!=cache_BusinessId&&323675!=cache_BusinessId&&323578!=cache_BusinessId&&323646!=cache_BusinessId&&323594!=cache_BusinessId&&323374!=cache_BusinessId&&323498!=cache_BusinessId&&323576!=cache_BusinessId&&323356!=cache_BusinessId&&323660!=cache_BusinessId&&323454!=cache_BusinessId&&323462!=cache_BusinessId&&323514!=cache_BusinessId&&323721!=cache_BusinessId&&323387!=cache_BusinessId&&323658!=cache_BusinessId&&323505!=cache_BusinessId&&323687!=cache_BusinessId&&323622!=cache_BusinessId&&323487!=cache_BusinessId&&323703!=cache_BusinessId&&323481!=cache_BusinessId&&323621!=cache_BusinessId&&323712!=cache_BusinessId&&323655!=cache_BusinessId&&323603!=cache_BusinessId&&323370!=cache_BusinessId&&323453!=cache_BusinessId&&323470!=cache_BusinessId&&323369!=cache_BusinessId&&323586!=cache_BusinessId&&323725!=cache_BusinessId&&323440!=cache_BusinessId&&323459!=cache_BusinessId&&323507!=cache_BusinessId&&323450!=cache_BusinessId&&323723!=cache_BusinessId&&323516!=cache_BusinessId&&323720!=cache_BusinessId&&323361!=cache_BusinessId&&323360!=cache_BusinessId&&323695!=cache_BusinessId&&323471!=cache_BusinessId&&323435!=cache_BusinessId&&323722!=cache_BusinessId&&323532!=cache_BusinessId&&323379!=cache_BusinessId&&327398!=cache_BusinessId&&323692!=cache_BusinessId&&323577!=cache_BusinessId&&323670!=cache_BusinessId&&323492!=cache_BusinessId&&323397!=cache_BusinessId&&323449!=cache_BusinessId&&323736!=cache_BusinessId&&323382!=cache_BusinessId&&323415!=cache_BusinessId&&323426!=cache_BusinessId&&323587!=cache_BusinessId&&323541!=cache_BusinessId&&323527!=cache_BusinessId&&323634!=cache_BusinessId&&323698!=cache_BusinessId&&323443!=cache_BusinessId&&323626!=cache_BusinessId&&323452!=cache_BusinessId&&323486!=cache_BusinessId&&323730!=cache_BusinessId&&323642!=cache_BusinessId&&323598!=cache_BusinessId&&323565!=cache_BusinessId&&323566!=cache_BusinessId&&323540!=cache_BusinessId&&323593!=cache_BusinessId&&323606!=cache_BusinessId&&323533!=cache_BusinessId&&323614!=cache_BusinessId&&323752!=cache_BusinessId&&323724!=cache_BusinessId&&323693!=cache_BusinessId&&323690!=cache_BusinessId&&323386!=cache_BusinessId&&323715!=cache_BusinessId&&317175!=cache_BusinessId&&323365!=cache_BusinessId&&323359!=cache_BusinessId&&323371!=cache_BusinessId&&323400!=cache_BusinessId&&323363!=cache_BusinessId&&323409!=cache_BusinessId&&323364!=cache_BusinessId&&323484!=cache_BusinessId&&323381!=cache_BusinessId&&323485!=cache_BusinessId&&323472!=cache_BusinessId&&323458!=cache_BusinessId&&323489!=cache_BusinessId&&323469!=cache_BusinessId&&323490!=cache_BusinessId&&323717!=cache_BusinessId&&323437!=cache_BusinessId&&323702!=cache_BusinessId&&317254!=cache_BusinessId&&323676!=cache_BusinessId&&323696!=cache_BusinessId&&323668!=cache_BusinessId&&323657!=cache_BusinessId&&323669!=cache_BusinessId&&323672!=cache_BusinessId&&323751!=cache_BusinessId&&323733!=cache_BusinessId&&323745!=cache_BusinessId&&323738!=cache_BusinessId&&323734!=cache_BusinessId&&323747!=cache_BusinessId&&323534!=cache_BusinessId&&323748!=cache_BusinessId&&323517!=cache_BusinessId&&323741!=cache_BusinessId&&323518!=cache_BusinessId&&323589!=cache_BusinessId&&323561!=cache_BusinessId&&323597!=cache_BusinessId&&323569!=cache_BusinessId&&323582!=cache_BusinessId&&323544!=cache_BusinessId&&323580!=cache_BusinessId&&323558!=cache_BusinessId&&323554!=cache_BusinessId&&323559!=cache_BusinessId&&323537!=cache_BusinessId&&323602!=cache_BusinessId&&323531!=cache_BusinessId&&323595!=cache_BusinessId&&323523!=cache_BusinessId&&323584!=cache_BusinessId&&323513!=cache_BusinessId&&323592!=cache_BusinessId&&323617!=cache_BusinessId&&323740!=cache_BusinessId&&323570!=cache_BusinessId&&323731!=cache_BusinessId&&323735!=cache_BusinessId&&323663!=cache_BusinessId&&324127!=cache_BusinessId&&323464!=cache_BusinessId&&323433!=cache_BusinessId&&323466!=cache_BusinessId&&323648!=cache_BusinessId&&323456!=cache_BusinessId&&323424!=cache_BusinessId&&323407!=cache_BusinessId&&323743!=cache_BusinessId&&323691!=cache_BusinessId&&323560!=cache_BusinessId&&323573!=cache_BusinessId&&323551!=cache_BusinessId&&323647!=cache_BusinessId&&323528!=cache_BusinessId&&323630!=cache_BusinessId&&323543!=cache_BusinessId&&323615!=cache_BusinessId&&323545!=cache_BusinessId&&323588!=cache_BusinessId&&323553!=cache_BusinessId&&323607!=cache_BusinessId&&323575!=cache_BusinessId&&323612!=cache_BusinessId&&323627!=cache_BusinessId&&323564!=cache_BusinessId&&323625!=cache_BusinessId&&323529!=cache_BusinessId&&323601!=cache_BusinessId&&323699!=cache_BusinessId&&323609!=cache_BusinessId&&323716!=cache_BusinessId&&323610!=cache_BusinessId&&323662!=cache_BusinessId&&323727!=cache_BusinessId&&323674!=cache_BusinessId&&323708!=cache_BusinessId&&323421!=cache_BusinessId&&323425!=cache_BusinessId&&323403!=cache_BusinessId&&323393!=cache_BusinessId&&323406!=cache_BusinessId&&323494!=cache_BusinessId&&323395!=cache_BusinessId&&323474!=cache_BusinessId&&323388!=cache_BusinessId&&323378!=cache_BusinessId&&323448!=cache_BusinessId&&323445!=cache_BusinessId&&323439!=cache_BusinessId&&323429!=cache_BusinessId&&323430!=cache_BusinessId&&323432!=cache_BusinessId&&323479!=cache_BusinessId&&323502!=cache_BusinessId&&323398!=cache_BusinessId&&334616!=cache_BusinessId&&336368!=cache_BusinessId&&15942!=cache_BusinessId&&263952!=cache_BusinessId&&340772!=cache_BusinessId&&299645!=cache_BusinessId&&340766!=cache_BusinessId&&340770!=cache_BusinessId&&340771!=cache_BusinessId&&340772!=cache_BusinessId&&340773!=cache_BusinessId&&340774!=cache_BusinessId&&340775!=cache_BusinessId&&340776!=cache_BusinessId&&350249!=cache_BusinessId&&228596!=cache_BusinessId&&160785!=cache_BusinessId&&18671!=cache_BusinessId&&50216!=cache_BusinessId&&155462!=cache_BusinessId&&260669!=cache_BusinessId&&246727!=cache_BusinessId&&294697!=cache_BusinessId&&182244!=cache_BusinessId&&338088!=cache_BusinessId&&340877!=cache_BusinessId&&351323!=cache_BusinessId&&246147!=cache_BusinessId&&342964!=cache_BusinessId&&306553!=cache_BusinessId&&324912!=cache_BusinessId&&325129!=cache_BusinessId&&325130!=cache_BusinessId&&325132!=cache_BusinessId&&98559!=cache_BusinessId&&117972!=cache_BusinessId&&329954!=cache_BusinessId&&104737!=cache_BusinessId&&257687!=cache_BusinessId&&45720!=cache_BusinessId&&133609!=cache_BusinessId&&387463!=cache_BusinessId||(cache_isDBCallOnly=!0,console.log("Account is loading very slowly :called"),e=!0)}catch(s){cache_isDBCallOnly=!0,e=!0}lastSyncBusID()!=parseFloat(cache_BusinessId)?InvalidateLocalStorage():cache_glbData="object"==typeof localStorage&&void 0!==localStorage[cache_custlist]&&localStorage[cache_custlist].length>0?JSON.parse(localStorage[cache_custlist]||[]):[],e?(cache_pageIndex=0,cache_pageSize=10,cache_isDBCallOnly=!0,cache_isFirstTime=!0):0==cache_isFirstTime&&"object"==typeof localStorage&&null==LastSyncDate()&&0==MaxQuataReached()?(cache_pageIndex=0,cache_pageSize=10,cache_isDBCallOnly=!0,setTimeout(function(){0!=isIEBrowser()&&cache_isFromiPadAndroid||GetFirstTimeAllCustomers()},1e3)):(cache_isDBCallOnly=!(!isIEBrowser()&&!cache_isFromiPadAndroid)||cache_isLoadCustFromDB,cache_isFirstTime=!0)}function txtSearchCustomer_focus(e){try{if(IsFirsttime=!0,1==cache_IsValidControls){if(0==cache_divCustomers.is(":visible")){cache_ulCustomerList.scrollTop(0),cache_pageIndex=0,cache_pageSize=10;try{cache_ulCustomerList.html("<li>Loading..</li>"),cache_divCustomers.slideDown(250,function(){cache_PageType.customermanagement==glbPageName?(cache_ulCustomerList.unbind("scroll"),setTimeout(function(){cache_ulCustomerList.bind("scroll",onCustomerListScroll)},150)):cache_ulCustomerList.bind("scroll",onCustomerListScroll)}),cache_glbData="object"==typeof localStorage&&void 0!==localStorage[cache_custlist]&&localStorage[cache_custlist].length>0?JSON.parse(localStorage[cache_custlist]||[]):[]}catch(e){}LoadMoreCustomers(),IsFromLocalStorage()&&NeedToSync()&&!cache_isSyncStarted&&(cache_isSyncStarted=!0,setTimeout(function(){GetCustomersForSync()},1e3))}cache_PageType.customermanagement==glbPageName&&null!=cache_liSelected&&void 0!==cache_ulCustomerList.find("> li")&&(cache_liSelected=cache_ulCustomerList.find(" li:nth-child("+(cache_pageIndex-1)*cache_pageSize/2+")").addClass(cache_liSelectedClassName))}}catch(e){console.log(e)}}function txtSearchCustomer_Keyup(e){if(1==cache_IsValidControls){var s=cache_txtSearchCustomer.val();try{if(keyCode=e.which||e.keyCode,!StringisNullOrUndefineOrBlank(typeof keyCode)&&13==keyCode)return 0==cache_ulCustomerList.find(" > li."+cache_liSelectedClassName).length&&null==cache_ulCustomerList.find(" > li."+cache_liSelectedClassName).data("custid")?(cache_PageType.customermanagement==glbPageName&&cache_txtSearchCustomer.blur(),cache_PageType.giftcertificatesender!=glbPageName&&cache_PageType.giftcertificateeceipient!=glbPageName||CloseCachingCustomerDropdown(),void e.preventDefault()):(SelectCustomerOnEnter(),void e.preventDefault());if((StringisNullOrUndefineOrBlank(s)||8==e.keyCode)&&(cache_OldSelectctedUserId=0),!StringisNullOrUndefineOrBlank(typeof keyCode)&&(9==keyCode||33==keyCode||34==keyCode||45==keyCode||8==keyCode&&""==s.trim()&&cache_lastSearchText==s))return void e.preventDefault();if(!StringisNullOrUndefineOrBlank(typeof keyCode)&&(38==keyCode||40==keyCode)){var a=cache_ulCustomerList.find("> li");if(void 0!==$("#liNoCust")&&""!=$("#liNoCust").text())return void e.preventDefault();if(void 0!==a&&a.removeClass(cache_liSelectedClassName),StringisNullOrUndefineOrBlank(typeof keyCode)||40!=keyCode){if(!StringisNullOrUndefineOrBlank(typeof keyCode)&&38==keyCode){if(null==cache_liSelected||0==cache_liSelected.index())return cache_liSelected=null,void e.preventDefault();cache_liSelected?(cache_liSelected.removeClass(cache_liSelectedClassName),next=cache_liSelected.prev(),next.length>0?(cache_liSelected=next.addClass(cache_liSelectedClassName),selected=next.text()):(cache_liSelected=a.last().addClass(cache_liSelectedClassName),selected=a.last().text())):(cache_liSelected=a.last().addClass(cache_liSelectedClassName),selected=a.last().text()),0==cache_liSelected.index()?cache_ulCustomerList.scrollTop(0):cache_ulCustomerList.scrollTop(cache_ulCustomerList.scrollTop()-cache_ulCustomerList.find(" li:nth-child("+(cache_liSelected.index()+1)+")").outerHeight())}}else{IsFirsttime&&(IsFirsttime=!1,cache_liSelected=null,cache_ulCustomerList.scrollTop(0)),cache_liSelected?(cache_liSelected.removeClass(cache_liSelectedClassName),next=cache_liSelected.next(),next.length>0?(cache_liSelected=next.addClass(cache_liSelectedClassName),selected=next.text()):null!=selected&&cache_ulCustomerList.find(" li:nth-child("+cache_ctrlendIndex[0].innerHTML+")").eq(0).text()==selected?(cache_liSelected=cache_ulCustomerList.find(" li:nth-child("+cache_ctrlendIndex[0].innerHTML+")").addClass("drpselected"),selected=cache_ulCustomerList.find(" li:nth-child("+cache_ctrlendIndex[0].innerHTML+")").eq(0).text()):(cache_liSelected=a.eq(0).addClass(cache_liSelectedClassName),selected=a.eq(0).text())):(cache_liSelected=a.eq(0).addClass(cache_liSelectedClassName),selected=a.eq(0).text());var c=cache_pageIndex*cache_pageSize;selected==cache_ulCustomerList.find(" li:nth-child("+c+")").data("fullname")&&(LoadMoreCustomers(),cache_liSelected=cache_ulCustomerList.find(" li:nth-child("+c+")").addClass(cache_liSelectedClassName),selected=cache_ulCustomerList.find(" li:nth-child("+c+")").eq(0).text()),cache_ulCustomerList.scrollTop(cache_ulCustomerList.scrollTop()+cache_ulCustomerList.find(" li:nth-child("+cache_liSelected.index()+")").outerHeight())}return void e.preventDefault()}}catch(e){console.log(e)}cache_lastSearchText=s,cache_pageIndex=0,cache_pageSize=10,cache_ulCustomerList.html("<li>Loading..</li>"),LoadMoreCustomers()}}function txtSearchCustomer_Keydown(e){try{if(1==cache_IsValidControls&&0==cache_isDBCallOnly&&(keyCode=e.which||e.keyCode,!StringisNullOrUndefineOrBlank(typeof keyCode)&&9==keyCode))return void e.preventDefault()}catch(e){}}function onCustomerListScroll(){1==cache_IsValidControls&&cache_ulCustomerList.scrollTop()+cache_ulCustomerList.innerHeight()>=cache_ulCustomerList[0].scrollHeight-50&&LoadMoreCustomers()}function SyncAgain(){try{if(void 0!==localStorage[cache_cusSynInfo]){var e=JSON.parse(localStorage[cache_cusSynInfo]),s=e.lstDt;if(null!=s){s=new Date(s);var a=new Date(s-(cache_syncDuration+1)*cache_MS_PER_MINUTE);e.lstDt=a,localStorage[cache_cusSynInfo]=JSON.stringify(e)}}}catch(e){}}function GetCustomers(){if(0!=IsFromLocalStorage()||!(cache_noOfRecords>cache_pageSize&&cache_noOfRecords<=cache_pageIndex*cache_pageSize+1||cache_noOfRecords>0&&cache_pageIndex*cache_pageSize+1>cache_noOfRecords)){var e=null==LastSyncDate()&&0==MaxQuataReached()||0==MaxQuataReached(),s=null;if(e){var a="object"==typeof localStorage&&void 0!==localStorage[cache_custlist]&&localStorage[cache_custlist].length>0?JSON.parse(localStorage[cache_custlist]||[]):[];null!=a&&a.length>0&&(s=LastSyncDate())}var c=IsControlUnderfined(cache_BusinessId)?0:cache_BusinessId,t=GetCachingCustomerRight(),n=0==MaxQuataReached()?"":cache_txtSearchCustomer.val(),i=0==MaxQuataReached()?1:cache_pageIndex+1,r=0==MaxQuataReached()?1e6:cache_pageSize,o=s,d=e,u=new vagaro.ajax;u.datamodel.Token="GetAllCustomers",u.datamodel.callback=GetCustomers_Success,u.datamodel.data=[c,n,t,i,r,o,d,""],u.datamodel.Error=GetCustomers_Fail,u.PostQue()}}function GetCustomers_Success(e){if(null!=e){var s=e.objUsersList;"object"==typeof localStorage&&0==MaxQuataReached()&&(null==LastSyncDate()&&InvalidateLocalStorage(),s=StoreLocalStorage(e.objUsersList,e.lastCalledTime,e.deletedIDs),e.TotalCount=null!=s?s.length:0,cache_glbData="object"==typeof localStorage&&void 0!==localStorage[cache_custlist]&&localStorage[cache_custlist].length>0?JSON.parse(localStorage[cache_custlist]||[]):[]);try{s=s.sort(Sortingalphabetical)}catch(e){}SearchCustomer(s,e.TotalCount),"9"==glbPageName&&_shopOwner.CallSeeWhoSearchList()}}function GetCustomers_Fail(){cache_isSyncStarted=!1}function GetCustomersForSync(){var e=null==LastSyncDate()&&0==MaxQuataReached()||0==MaxQuataReached(),s=null;if(e){var a="object"==typeof localStorage&&void 0!==localStorage[cache_custlist]&&localStorage[cache_custlist].length>0?JSON.parse(localStorage[cache_custlist]||[]):[];null!=a&&a.length>0&&(s=LastSyncDate())}var c=IsControlUnderfined(cache_BusinessId)?0:cache_BusinessId,t=GetCachingCustomerRight(),n=s,i=e,r=new vagaro.ajax;r.datamodel.Token="GetAllCustomers",r.datamodel.callback=GetCustomersForSync_Success,r.datamodel.data=[c,"",t,1,10,n,i,""],r.datamodel.Error=GetCustomers_Fail,r.PostQue()}function GetCustomersForSync_Success(e){if(null!=e){e.objUsersList;"object"==typeof localStorage&&0==MaxQuataReached()&&(null==LastSyncDate()&&InvalidateLocalStorage(),StoreLocalStorage(e.objUsersList,e.lastCalledTime,e.deletedIDs),cache_glbData="object"==typeof localStorage&&void 0!==localStorage[cache_custlist]&&localStorage[cache_custlist].length>0?JSON.parse(localStorage[cache_custlist]||[]):[],"9"==glbPageName&&_shopOwner.CallSeeWhoSearchList())}cache_isSyncStarted=!1}function InvalidateLocalStorage(){"object"==typeof localStorage&&(localStorage.removeItem(cache_custlist),localStorage.removeItem(cache_cusSynInfo))}function StoreLocalStorage(e,s,a){if(null==s){var c=new Date($.now());s=c.getDate()+"/"+(c.getMonth()+1)+"/"+c.getFullYear()+" "+c.getHours()+":"+c.getMinutes()+":"+c.getSeconds()}var t=e,n={};n.busID=parseFloat(cache_BusinessId),n.lstDt=new Date,n.maxDt=new Date,n.synDt=s;try{if(n.IsMaxQuataReached=!1,localStorage.removeItem(cache_cusSynInfo),localStorage[cache_cusSynInfo]=JSON.stringify(n),null==LastSyncDate())localStorage[cache_custlist]=null!=e?JSON.stringify(e):[];else{var i=[];if(void 0!==localStorage[cache_custlist]&&(i=JSON.parse(localStorage[cache_custlist])),null!=a&&""!=a&&a.length>0&&null!=i&&i.length>0){a=","+a+",";var r=$.grep(i,function(e){return a.indexOf(","+e.ID+",")<=-1});i=r}if(null!=i&&i.length>0&&null!=e&&e.length>0){var o=",";$.each(e,function(e,s){i.map(function(e){return e.ID}).indexOf(s.ID)>-1&&(o=o+s.ID+",")});r=$.grep(i,function(e){return o.indexOf(","+e.ID+",")<=-1});t=null!=(i=r)&&i.length>0?i.concat(e):e}else null!=e&&e.length>0?t=e:null!=i&&i.length>0&&(t=i);localStorage.removeItem(cache_custlist),localStorage[cache_custlist]=null!=t?JSON.stringify(t):[]}cache_isDBCallOnly=!(!isIEBrowser()&&!cache_isFromiPadAndroid)||cache_isLoadCustFromDB}catch(e){cache_isDBCallOnly=!0,InvalidateLocalStorage(),n.IsMaxQuataReached=!0,localStorage[cache_cusSynInfo]=JSON.stringify(n)}return t}function Sortingalphabetical(e,s){try{var a=e.FN.toLowerCase(),c=s.FN.toLowerCase();return a<c?-1:a>c?1:0}catch(e){return 0}}function LastSyncDate(){var e=null;if("object"==typeof localStorage&&void 0!==localStorage[cache_cusSynInfo]){var s=JSON.parse(localStorage[cache_cusSynInfo]);null!=s&&void 0!==s.synDt&&null!=s.synDt&&(e=s.synDt)}return e}function MaxQuataReached(){var e=!1;if(cache_isDBCallOnly)e=cache_isDBCallOnly;else if("object"==typeof localStorage&&void 0!==localStorage[cache_cusSynInfo]){var s=JSON.parse(localStorage[cache_cusSynInfo]),a=new Date,c=new Date(s.maxDt);e=a.setHours(0,0,0,0)==c.setHours(0,0,0,0)?s.IsMaxQuataReached:e}return e}function lastSyncBusID(){var e=0;"object"==typeof localStorage&&void 0!==localStorage[cache_cusSynInfo]&&(e=JSON.parse(localStorage[cache_cusSynInfo]).busID);return 0==e?parseFloat(cache_BusinessId):e}function IsFromLocalStorage(){return"object"==typeof localStorage&&null!=localStorage[cache_custlist]&&0==MaxQuataReached()&&lastSyncBusID()==parseFloat(cache_BusinessId)}function SearchCustomer(e,s){if(1==cache_IsValidControls)if(null!=e&&e.length>0){var a=e,c=1,t="9"==glbPageName?e.length:cache_pageSize,n=cache_txtSearchCustomer.val();n.length>0&&(n=n.replace(/^0+/,"").replace(/\(/g,"").replace(/\)/g,"").replace(/-/g,"").trim());var i=GetCachingCustomerRight();if(cache_noOfRecords=e.length,0==cache_pageIndex&&parseInt(a.length)>parseInt(cache_pageSize)&&"9"!=glbPageName&&(a=a.slice(0,10)),IsFromLocalStorage()?(a=$.grep(e,function(e){return""==n||CustomerSmartSearch(n.toLowerCase(),e.FN.trim().toLowerCase())||i&&!StringisNullOrUndefineOrBlank(n)&&!StringisNullOrUndefineOrBlank(e.E)&&e.E.replace(/ /g,"").replace(/\(/g,"").replace(/\)/g,"").replace(/-/g,"").indexOf(n.replace(/ /g,""))>-1||i&&!StringisNullOrUndefineOrBlank(n)&&!StringisNullOrUndefineOrBlank(e.C)&&e.C.replace(/ /g,"").replace(/\(/g,"").replace(/\)/g,"").replace(/-/g,"").indexOf(n.replace(/ /g,""))>-1||i&&!StringisNullOrUndefineOrBlank(n)&&!StringisNullOrUndefineOrBlank(e.D)&&e.D.replace(/ /g,"").replace(/\(/g,"").replace(/\)/g,"").replace(/-/g,"").indexOf(n.replace(/ /g,""))>-1||i&&!StringisNullOrUndefineOrBlank(n)&&!StringisNullOrUndefineOrBlank(e.N)&&e.N.replace(/ /g,"").replace(/\(/g,"").replace(/\)/g,"").replace(/-/g,"").indexOf(n.replace(/ /g,""))>-1}),cache_noOfRecords=a.length,c=cache_pageIndex*cache_pageSize+1,t="9"==glbPageName?t:(cache_pageIndex+1)*cache_pageSize):(cache_noOfRecords=s,c=1,t=a.length),cache_noOfRecords>cache_pageSize&&cache_noOfRecords<cache_pageIndex*cache_pageSize+1||cache_noOfRecords>0&&cache_pageIndex*cache_pageSize+1>cache_noOfRecords)return;t>cache_noOfRecords&&(t=cache_noOfRecords);for(var r=[],o="",d=c;d<=t;d++){var u={};u=a[d-1],o="",appendEmail="",i?(o=StringisNullOrUndefineOrBlank(u.C)?StringisNullOrUndefineOrBlank(u.D)?StringisNullOrUndefineOrBlank(u.N)?"":u.N:u.D:u.C,appendEmail=StringisNullOrUndefineOrBlank(u.E)?"":u.E,!StringisNullOrUndefineOrBlank(n)&&!StringisNullOrUndefineOrBlank(u.C)&&u.C.indexOf(n)>-1?o=u.C:!StringisNullOrUndefineOrBlank(n)&&!StringisNullOrUndefineOrBlank(u.D)&&u.D.indexOf(n)>-1?o=u.D:!StringisNullOrUndefineOrBlank(n)&&!StringisNullOrUndefineOrBlank(u.N)&&u.N.indexOf(n)>-1&&(o=u.N),!StringisNullOrUndefineOrBlank(n)&&!StringisNullOrUndefineOrBlank(u.E)&&u.E.indexOf(n)>-1&&(appendEmail=u.E)):(u.C="",u.D="",u.N="",u.E="");var l="undefined"!=typeof glbBusinessCountryId&&null!=glbBusinessCountryId?glbBusinessCountryId:"undefined"!=typeof businessCountryID&&null!=businessCountryID?businessCountryID:1;u.DName=u.FN+(StringisNullOrUndefineOrBlank(o)?"":" - "+FormatPhoneByCountry(o,l))+(StringisNullOrUndefineOrBlank(appendEmail)?"":" - "+appendEmail),r.push(u)}if(cache_pageIndex+=1,r.length>0){if(1==cache_pageIndex&&(cache_ulCustomerList.scrollTop(0),cache_ulCustomerList.html("")),$("#tmplCustomer").tmpl(r).appendTo(cache_ulCustomerList),IsFromLocalStorage()?cache_ctrlendIndex.html(t):cache_ctrlendIndex.html(cache_pageSize*cache_pageIndex>cache_noOfRecords?cache_noOfRecords:cache_pageSize*cache_pageIndex),cache_ctrltotalCout.html(cache_noOfRecords),cache_pgDiv.show(),cache_pgNoMatchDiv.hide(),1!=cache_pageIndex&&StringisNullOrUndefineOrBlank(cache_ulCustomerList.find(" li."+cache_liSelectedClassName).data("fullname"))&&!StringisNullOrUndefineOrBlank(cache_glbisScrollTop)&&cache_glbisScrollTop){var h=(cache_pageIndex-1)*cache_pageSize/2;cache_ulCustomerList.scrollTop(0),cache_ulCustomerList.scrollTop(cache_ulCustomerList.find(" li:nth-child("+h+")").position().top),cache_glbisScrollTop=!1}if(cache_PageType.searchfriendfamilycustomer==glbPageName){var _=document.getElementById("hdnUserID").value;cache_ulCustomerList.find("[data-custid='"+_+"']").attr("onclick",null),cache_ulCustomerList.find("[data-custid='"+_+"']").attr("disabled","disabled"),cache_ulCustomerList.find("[data-custid='"+_+"']").attr("style","cursor:no-drop")}}else CustomersNoRecordFound()}else CustomersNoRecordFound()}function CustomersNoRecordFound(){if(1==cache_IsValidControls){var e=$("#txtCustomerSearchAddEdit").val(),s={},a=[];s.C="",s.D="",s.N="",s.FN=e,s.DName=e,a.push(s),void 0===e&&StringisNullOrUndefineOrBlank(e)?cache_ulCustomerList.html("<li id='liNoCust'>No Matches Found</li>"):(cache_ulCustomerList.html(""),$("#tmplCustomer").tmpl(a).appendTo(cache_ulCustomerList)),cache_pgDiv.hide(),cache_pgNoMatchDiv.show()}}var DelayMethodCall=function(){var e=0;return function(s,a){clearTimeout(e),e=setTimeout(s,a)}}();function LoadMoreCustomers(e){void 0!==e&&(cache_glbisScrollTop=e);var s=MaxQuataReached()?50:0;DelayMethodCall(function(){if(IsFromLocalStorage())if(void 0!==cache_glbData&&null!=cache_glbData&&cache_glbData.length>0){try{cache_glbData=cache_glbData.sort(Sortingalphabetical)}catch(e){}SearchCustomer(cache_glbData),"9"==glbPageName&&_shopOwner.CallSeeWhoSearchList()}else GetCustomers();else GetCustomers()},s)}function selectedCustomer(e){if(1==cache_IsValidControls){if(!StringisNullOrUndefineOrBlank(e)){var s=$(e);SelectedSender=s;var a="undefined"!=typeof glbBusinessCountryId&&null!=glbBusinessCountryId?glbBusinessCountryId:"undefined"!=typeof businessCountryID&&null!=businessCountryID?businessCountryID:1;if(cache_PageType.customermanagement==glbPageName){var c="";cache_HasCustomerRight&&(StringisNullOrUndefineOrBlank(s.data("cell").toString())?StringisNullOrUndefineOrBlank(s.data("day").toString())?StringisNullOrUndefineOrBlank(s.data("night").toString())||(c=FormatPhoneByCountry(s.data("night").toString(),a)):c=FormatPhoneByCountry(s.data("day").toString(),a):c=FormatPhoneByCountry(s.data("cell").toString(),a)),cache_SelectctedItem=StringisNullOrUndefineOrBlank(c)?s.data("fullname"):s.data("fullname").substr(0,s.data("fullname").indexOf("-")).replace(/\s+$/g,"")+" - "+c,$("#spnCustomerDetailsFNP").html(cache_SelectctedItem)}cache_lastSearchText=s.data("fullname"),cache_txtSearchCustomer.val(s.data("fullname")),cache_divCustomers.slideUp(250,function(){cache_ulCustomerList.unbind("scroll")}),glbPageName!=cache_PageType.addeditcustomer?(cache_OldSelectctedUserId=s.data("custid"),glbPageName==cache_PageType.searchnewclass?_vgClassSessionSelection.SelectCustomerClass(e):"undefined"!=typeof Search&&null!=Search&&Search.IsFromSearchrPage()?0==$("#ucNewAppAjax_pnlNewAppointmentPopup:visible").length?CachingSelectedCustomer(e):CachingSelectedCustomerBooking(e):window.location.href.includes("/merchants/calendar")?(CachingSelectedCustomerBooking(e),1==glbPageName&&$("#divSearchCustomer").show()):CachingSelectedCustomer(e)):(cache_OldSelectctedUserId=s.data("custid"),CachingSelectedCustomerAddEdit(e))}cache_PageType.customermanagement==glbPageName&&cache_divCustomers.slideUp(250,function(){slideToggleofCustomerDetails(!0)})}}function NeedToSync(){var e=!0;if(void 0!==localStorage[cache_cusSynInfo]){var s=JSON.parse(localStorage[cache_cusSynInfo]);if(s.IsMaxQuataReached)e=!0;else{var a=new Date(s.lstDt),c=new Date;c<a&&c.setDate(c.getDate()+1);var t=c-a;e=Math.floor(t/1e3/60)>cache_syncDuration}}else e=!0;return e}function isIEBrowser(){var e=!1;return navigator.userAgent.match(/Trident.*rv\:11\./)&&(e=!0),e}function GetFirstTimeAllCustomers(){if(0==cache_isLoadCustFromDB){var e=IsControlUnderfined(cache_BusinessId)?0:cache_BusinessId,s=GetCachingCustomerRight(),a=new vagaro.ajax;a.datamodel.Token="GetAllCustomers",a.datamodel.callback=GetFirstTimeAllCustomers_Success,a.datamodel.data=[e,"",s,1,1e6,null,!0,""],a.datamodel.Error=GetFirstTimeAllCustomers_Fail,a.Post()}}function GetFirstTimeAllCustomers_Success(e){null!=e&&(cache_isFirstTime=!0,"object"==typeof localStorage&&InvalidateLocalStorage(),StoreLocalStorage(e.objUsersList,e.lastCalledTime,e.deletedIDs),cache_glbData="object"==typeof localStorage&&void 0!==localStorage[cache_custlist]&&localStorage[cache_custlist].length>0?JSON.parse(localStorage[cache_custlist]||[]):[],"9"==glbPageName&&_shopOwner.CallSeeWhoSearchList())}function GetFirstTimeAllCustomers_Fail(){}function SelectCustomerOnEnter(){1==cache_IsValidControls&&(cache_ulCustomerList.find(" > li."+cache_liSelectedClassName).length>0&&null!=cache_ulCustomerList.find(" > li."+cache_liSelectedClassName).data("custid")&&selectedCustomer(cache_ulCustomerList.find(" > li."+cache_liSelectedClassName)),cache_txtSearchCustomer.blur())}function GetClientID(e){return $("[id$="+e+"]")}function IsValidControls(e){try{return!IsControlUnderfined(cache_divCustomers)&&(!IsControlUnderfined(cache_ulCustomerList)&&(!IsControlUnderfined(e.cache_divCustomersData)&&(!IsControlUnderfined(e.ulCustomerList)&&(!IsControlUnderfined(e.cache_txtSearchCustomer)&&(!IsControlUnderfined(e.cache_ctrltotalCout)&&(!IsControlUnderfined(e.cache_ctrlendIndex)&&(!IsControlUnderfined(e.cache_liSelectedClassName)&&(!IsControlUnderfined(e.cache_pgNoMatchDiv)&&(!IsControlUnderfined(e.cache_pgDiv)&&(!IsControlUnderfined(e.cache_isFromiPadAndroid)&&(!IsControlUnderfined(e.cache_isLoadCustFromDB)&&(!IsControlUnderfined(e.cache_syncDuration)&&!IsControlUnderfined(e.cache_divtxtCustomers)))))))))))))}catch(e){return console.log("Error from IsValidControls function:> "+e),!1}}function StringisNullOrUndefineOrBlank(e){return void 0===e||null==e||""==e||null==e}function IsControlUnderfined(e){return void 0!==e&&(void 0===e||null==e||""==e||null==e)}function CloseCachingCustomerDropdown(){cache_divCustomers.is(":visible")&&cache_divCustomers.slideUp(250,function(){cache_ulCustomerList.unbind("scroll"),cache_liSelected=null,cache_txtSearchCustomer.blur()})}function setCustomerModuleCustomerLocalStorageData(){try{cache_glbData="object"==typeof localStorage&&void 0!==localStorage[cache_custlist]&&localStorage[cache_custlist].length>0?JSON.parse(localStorage[cache_custlist]||[]):[]}catch(e){}}function SetErrorDisplayMessage(e,s,a){"undefined"!=typeof ChangeAppStatus&&1==ChangeAppStatus.IsNewCall()?"1"==e?ShowHideDoneMessageCommon(s):"0"==e?ShowHideFailedMessageCommon(s):"2"==e&&ShowHideWarningMessageCommon(s):"1"==e?ShowHideDoneMessage(s,a):"0"==e?ShowHideFailedMessage(s):"2"==e&&ShowHideWarningMessage(s)}function iOSversion(){if(/iP(hone|od|ad)/.test(navigator.platform)){var e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||0,10)]}}function ShowHideDoneMessage(e,s){$(".banner-success .text-block-28").html(e);var a,c=Webflow.require("ix"),t=$(".banner-success"),n=setDisplayMessageTime(e);void 0!==s&&null!=s&&""!=s&&GetOrUpdateBusinessLastModifiedDetails(s,!1),"undefined"!=typeof ver&&ver[0]<=8?(a={type:"click",preserve3d:!0,stepsA:[{display:"-webkit-flex",transition:"transform 200ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:n},{transition:"transform 200 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]},c.run(a,t)):(a={type:"click",preserve3d:!0,stepsA:[{display:"flex",transition:"transform 200ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:n},{transition:"transform 200 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]},c.run(a,t))}function ShowHideFailedMessage(e){$(".banner-fail .text-block-28").html(e);var s=Webflow.require("ix"),a=$(".banner-fail"),c=setDisplayMessageTime(e);if("undefined"!=typeof ver)if(ver[0]<=9){var t={type:"click",preserve3d:!0,stepsA:[{display:"-webkit-flex",transition:"transform 200ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:c},{transition:"transform 200 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]};s.run(t,a)}else{t={type:"click",preserve3d:!0,stepsA:[{display:"flex",transition:"transform 200ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:c},{transition:"transform 200 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]};s.run(t,a)}else{t={type:"click",preserve3d:!0,stepsA:[{display:"flex",transition:"transform 200ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:c},{transition:"transform 200 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]};s.run(t,a)}}function ShowHideWarningMessage(e){$(".banner-warning .text-block-28").html(e);var s=Webflow.require("ix"),a=$(".banner-warning"),c=setDisplayMessageTime(e);if("undefined"!=typeof ver)if(ver[0]<=9){var t={type:"click",preserve3d:!0,stepsA:[{display:"-webkit-flex",transition:"transform 300ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:c},{transition:"transform 300 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]};s.run(t,a)}else{t={type:"click",preserve3d:!0,stepsA:[{display:"flex",transition:"transform 300ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:c},{transition:"transform 300 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]};s.run(t,a)}else{t={type:"click",preserve3d:!0,stepsA:[{display:"flex",transition:"transform 300ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:c},{transition:"transform 300 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]};s.run(t,a)}}function ShowHideWarningMessageForPopup(e){$(".banner-warning-popup .text-block-28").html(e);var s=Webflow.require("ix"),a=$(".banner-warning-popup");if("undefined"!=typeof ver)if(ver[0]<=9){var c={type:"click",preserve3d:!0,stepsA:[{display:"-webkit-flex",transition:"transform 300ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:"3s"},{transition:"transform 300 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]};s.run(c,a)}else{c={type:"click",preserve3d:!0,stepsA:[{display:"flex",transition:"transform 300ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:"3s"},{transition:"transform 300 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]};s.run(c,a)}else{c={type:"click",preserve3d:!0,stepsA:[{display:"flex",transition:"transform 300ms ease 0",x:"0px",y:"50px",z:"0px"},{wait:"3s"},{transition:"transform 300 ease 0",x:"0px",y:"0px",z:"0px"},{display:"none"}],stepsB:[]};s.run(c,a)}}function setDisplayMessageTime(e){var s="2s";return""!=e&&e.length>0&&(e.length<50?s="2s":e.length<100?s="3s":e.length<200?s="4s":e.length>200&&(s="7s")),s}function setkeepAlive(){!function(e){var s=0;try{window.location.href.includes("/merchants/calendar")&&(s=1)}catch(e){console.log(e)}var a=document.createElement("iframe");a.style.display="none",a.onload=function(){a.parentNode.removeChild(a)};try{a.src=e+"/keepalive.aspx?cal="+s+"&id="+(Math.random()+1).toString(36).substring(2)}catch(c){a.src=e+"/keepalive.aspx?cal="+s+"&id=w5a2g"}document.body.appendChild(a)}(location.protocol+"//"+location.hostname+(location.port?":"+location.port:""))}function GetOrUpdateBusinessLastModifiedDetails(e,s,a,c){void 0===a&&(a=null),IsNullOrEmpty(c)&&(c=null);var t=new vagaro.ajax;t.datamodel.Token="BusinessLastModifiedDetails",t.datamodel.callback=GetBusinessLastModified_Success,t.datamodel.data=[e,s,a,null,c],t.Post()}function GetBusinessLastModified_Success(e){var s="";null!=e&&(s=null==e.LastName?"Last Modified: "+e.FirstName:null==e.FirstName?"Last Modified: "+e.LastName:"Last Modified: "+e.FirstName+" "+e.LastName,s+=" - "+e.FormatedModifiedDate,"65"==e.PageID?(document.getElementById("ifmEmployeePayroll").contentWindow.document.getElementById("dvLastModified65").innerHTML=s,document.getElementById("ifmEmployeePayroll").contentWindow.document.getElementById("dvLastModified65").style.display="block"):($("#dvLastModified"+e.PageID).html(s),$("#dvLastModified"+e.PageID).show()),"41"==e.PageID&&$("#dvLastModifiedfooterVagaroDrive").html(s))}function GetOrUpdateLastModifiedDetails(e,s,a){void 0===s&&(s=null),void 0===e&&(e=null);var c=new vagaro.ajax;c.datamodel.Token="GetLastDate",c.datamodel.callback=GetOrUpdateLastModifiedDetails_Success,c.datamodel.data=[e,s,a],c.Post()}function GetOrUpdateLastModifiedDetails_Success(e){if(null==e||null==e.modified_by_name||null==e.ModifiedDate&&IsNullOrEmpty(e.ModifiedDate))$("#dvLastModified"+e.module_id).css("display","none");else{for(var s=e.modified_by_name.split(" "),a=0;a<s.length;a++)s[a]=s[a].charAt(0).toUpperCase()+s[a].slice(1);var c=s.join(" ");192==e.module_id?(document.getElementById("ifmEmployeePayroll").contentWindow.document.getElementById("dvLastModified192").innerHTML="Last Modified: "+c+" - "+e.ModifiedDate,document.getElementById("ifmEmployeePayroll").contentWindow.document.getElementById("dvLastModified192").style.display="block"):($("#dvLastModified"+e.module_id).html("Last Modified: "+c+" - "+e.ModifiedDate),$("#dvLastModified"+e.module_id).css("display","block"))}}function successGetBusinessListForCustomerMgmt(e){if(null!=e&&e.length>0){var s=$("#listBusiness");if("0"==$("#hdnOneTimeCallbusiList").val()&&s.data("businessdata",JSON.stringify(e)),"undefined"!=typeof _vagaroDriveDashboardPage){let c=s.data("businessdata")?JSON.parse(s.data("businessdata")):null;var a=[];if(null!=c){let t=null;t=""!=$("#hdnAllBusinessSharingConfig").val()?JSON.parse($("#hdnAllBusinessSharingConfig").val()):$("#hdnAllBusinessSharingConfig").val(),$.grep(t,function(e,s){$.grep(c,function(s,c){!0!==e.HasSharedVagaroDrive||e.BusinessID!==s.id&&-1!=s.id||-1!==$.inArray(s,a)||a.push(s)}),_vgVagaroDrive.model.BusinessID==e.BusinessID&&!0===e.HasSharedVagaroDrive&&(_vgVagaroDrive.model.IsLoggedInBusinessHasVagaroDriveShared=!0)}),e=a,s.data("businessids",JSON.stringify(a)),a.length>2&&1==_vgVagaroDrive.model.IsLoggedInBusinessHasVagaroDriveShared?$("#divBusCombo").css("display",""):$("#divBusCombo").css("display","none")}}$("#hdnOneTimeCallbusiList").val("1"),setAddressControlCust(e),s.select2("val",e)}}function LoadBusinessForMultilocation(e){var s=$("#ListBusinessForMultilocation");s.empty(),$("#ListBusinessForMultilocation").select2({placeholder:"All businesses",closeOnSelect:!0}),$.each(e,function(){s.append($("<option></option>").val(this.id).html(this.text))})}function setAddressControlCust(e){var s=$("#listBusiness"),a=s.select2({searchInputPlaceholder:"All businesses",combobox:!0,dropdownCssClass:"Select2-normaldropdown",selectOnClick:!0,multiple:!1,closeOnSelect:!0,allowClear:!0,isInitSelection:!1,formContainer:"#page-wrapper",data:function(){return null!=e&&$.each(e,function(){JSON.parse(this.IsMultilocationGroup)&&(this.disabled=!0)}),{results:e}},formatNoMatches:function(){return $(this).find("#select2-drop").css("display","block"),"No matches found"},formatSearching:function(){return $(this).find("#select2-drop").css("display","block"),"Searching…"},formatInputTooShort:function(e,s){return $(this).find("#select2-drop").css("display","none"),""},initSelection:function(e,s){},formatResult:function(e){$(this).find("#select2-drop").css("display","block");return e.IsMultilocationGroup?"<div data-id="+e.id+' class="multilocation-group-item">'+e.text+"</div>":"<div data-id="+e.id+' class="'+(e.MultiLocationGroupID>0?"multilocation-business-item":"")+'">'+e.text+"</div>"},matcher:function(e,s,a){for(var c=/\s\s+/g,t=/[^0-9a-zA-Z\" \"]+/gi,n=e.replace(c," "),i=(n=n.toLowerCase().replace(t,"")).split(" "),r="",o=i.length,d=0,u=0;u<=i.length-1;u++){var l=s.replace(c," ");if(((l=l.toLowerCase().replace(t,"")).match("^"+i[u])||-1!=l.indexOf(" "+i[u]))&&((""==r||i[u].indexOf(r)<0)&&(d+=1),r=" "+l,d>=o))break}return d>=o&&(a.isShow=!0,!0)}});a.on("select2-loaded",function(e){$(this).find(".select2-result-unselectable").addClass("select2-result-selectable").removeClass("select2-result-unselectable")}),a.on("select2-blur",function(e){e.preventDefault()}),a.on("select2-focus",function(e){$(this).find(".select2-input").select(),$("body").addClass("business-control-open")}),a.on("selected",function(e){$(e.currentTarget).select2("val",e.choice.id)}),a.on("select2-opening",function(e){s.select2("data",{id:"",text:""})}),a.on("select2-open",function(e){var a={},c=GetChoiceForSeleect2Cust(s);void 0!==c.id&&s.select2("data",{id:c.id,text:c.text}),(void 0===a.selectAllText||a.selectAllText)&&setTimeout(function(){$(e.target).parent("div").find(".select2-input").get(0).setSelectionRange(0,9999)},100),(void 0===a.selectAllText||a.selectAllText)&&setTimeout(function(){$(e.target).parent("div").find(".select2-input").get(0).setSelectionRange(0,9999)},100),$("body").addClass("business-control-open")}),a.on("select2-close",function(e){$("body").removeClass("business-control-open")})}function callGetBusinessListForCustomerMgmtFailed(e){ShowLoadingPanel(!1);try{var s=JSON.parse(e.responseText);alertMessage("2",s.Message)}catch(e){alertMessage("0","Failed to load group of business")}}function CustomerSmartSearch(e,s){for(var a=/\s\s+/g,c=/[^0-9a-zA-Z\" \"]+/gi,t=e.replace(a," "),n=(t=t.toLowerCase().replace(c,"")).split(" "),i="",r=n.length,o=0,d=0;d<=n.length-1;d++){var u=s.replace(a," ");if(((u=u.toLowerCase().replace(c,"")).match("^"+n[d])||-1!=u.indexOf(" "+n[d]))&&((""==i||n[d].indexOf(i)<0)&&(o+=1),i=" "+u,o>=r))break}return o>=r}function FindInitialsCharacters(e,s){var a=/[ !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,c=["ASS","WTF","SEX","SUK","FUK","DIE","BUM","TIT","BCH","DAM","HAH","OUT"];if(null!=e&&""!=e){var t=(e=e.replace("s+","")).split(" "),n="";if(t.length>0){for(var i=0;i<t.length;i++){var r=t[i].substr(0,1);1!=a.test(r)&&r==r.toUpperCase()&&0==is_numeric(r)&&(n+=r)}n.length<=0&&(n=e.substr(0,1))}else n=t[0].substr(0,1);return n.length>=3?(Check_Arrcontains(c,n=n.substr(0,3))&&(n=n.substr(0,n.length-1)),c=null,"SP"==s?n.substr(0,2).toUpperCase():n.toUpperCase()):n.toUpperCase()}return e}function Check_Arrcontains(e,s){for(var a=0;a<e.length;a++)if(e[a]===s)return!0;return!1}function CheckAndRemoveHTMLTagInString(e){return e.match(/(<([^>]+)>)/gi)&&(e=e.replace(/(<([^>]+)>)/gi,"")),e}function CheckAndRemoveHTMLTagAndJSInString(e){var s=/javascript:alert\(\d+\);/gi;return e.match(/(<([^>]+)>)/gi)&&(e=e.replace(/(<([^>]+)>)/gi,"")),e.match(s)&&(e=e.replace(s,"")),s=/javascript:alert\(\d+\)\//gi,e.match(s)&&(e=e.replace(s,"")),e}function RedirectToFeatureSubscriptionPage(e,s){var a=localStorage.SupportUpsell;if(void 0!==a&&null!=a&&""!=a){var c="",t="",n="";try{c=JSON.parse(a),t=c.SupportUpsellID,n=c.ActiveRecommendFeature}catch(e){}if(void 0!==t&&null!=t&&""!=t){var i={};i.supportUpsellID=t,i.featureID=e,i.isActive=1==s,i.isVagaroDriveActive=!1,i.statusID=0,ShowLoadingPanelForUpdateRecommStatus(!0);var r=c.RecommendFeature;return CallWSJSON("VagaroWebOffline.asmx/UpdateSupportRecommendedStatus",JSON.stringify(i),function(){ShowLoadingPanelForUpdateRecommStatus(!1),1==s&&(saveLogInMongo(e,89),AddLogInAmplitudeUpsell(e,89)),void 0!==r&&null!=r||(r="");var a=c.SupportUpsellTextMarketingPlan;void 0!==a&&null!=a||(a=""),e!=SupportUpSellFeature.Forms&&e!=SupportUpSellFeature.CheckinApp&&e!=SupportUpSellFeature.FeatureBusiness&&RedirectRecommFeaturePage(r,t,a,e,n)},callFailed_UpdateSupportRecommendedStatus),IsSupportNextstep(r,e)}}}function callSuccess_UpdateSupportRecommendedStatus(e){e.d;ShowLoadingPanelForUpdateRecommStatus(!1)}function ShowLoadingPanelForUpdateRecommStatus(e){1==e?($("#apgLoading").show(),$("#apgProgress").show(),$("#divQuickBookLoader").show(),$("#divXeroLoader").show()):($("#apgLoading").hide(),$("#apgProgress").hide(),$("#divQuickBookLoader").hide(),$("#divXeroLoader").hide())}function callFailed_UpdateSupportRecommendedStatus(e){ShowLoadingPanelForUpdateRecommStatus(!1)}function RedirectRecommFeaturePage(e,s,a,c,t,n){var i=0;if(void 0!==e&&null!=e&&""!=e){var r=e.split(",");if(0!=r.length)if(0==c)i=r[0];else{var o=r.indexOf(c);o<r.length-1&&(i=r[o+1])}var d={};d.SupportUpsellID=s,d.RecommendFeature=e,d.ActiveRecommendFeature=t,""!=a&&(d.SupportUpsellTextMarketingPlan=a),void 0!==n&&null!=n&&(d.ActiveSMSForMessenger=n),localStorage.SupportUpsell=JSON.stringify(d)}else localStorage.removeItem("SupportUpsell");var u=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"")+"/",l=GetPageFromFeatureID(i);if(""==l)return!1;u+=l;var h=navigator.userAgent.match(/VagaroAndroidPhone/i)||navigator.userAgent.match(/iospro/i)&&navigator.userAgent.match(/iPhone/i);if(i==SupportUpSellFeature.CustomWebsite&&h||i==SupportUpSellFeature.MySite&&h)i==SupportUpSellFeature.MySite?location.href="/ShopOwner/WebsiteBuilderProAppModal.aspx":CallBackCustomWebsiteDevice(41,s+"|~|"+u);else if(i==SupportUpSellFeature.QuickBook&&h)swal({title:"",text:"Quickbook/Xero can be enabled/disabled from web site only.",animation:"slide-from-bottom",customClass:"sweet-alert-model nextbtn-alert-btn"},function(c){c&&(swal.close(),RedirectRecommFeaturePage(e,s,a,i,t))});else{if(i!=SupportUpSellFeature.Xero||!h)return i==SupportUpSellFeature.MySite&&($("#chkRecommFeature_17").prop("checked")?RedirectToFeatureSubscriptionPage(SupportUpSellFeature.MySite,"1"):RedirectToFeatureSubscriptionPage(SupportUpSellFeature.MySite,"0")),location.href=u,!0;isQuickBookExistsInFlow(e)?RedirectRecommFeaturePage(e,s,a,i,t):swal({title:"",text:"Quickbook/Xero can be enabled/disabled from web site only.",animation:"slide-from-bottom",customClass:"sweet-alert-model nextbtn-alert-btn"},function(c){c&&(swal.close(),RedirectRecommFeaturePage(e,s,a,i,t))})}}function isQuickBookExistsInFlow(e){var s=!1;if(void 0!==e&&null!=e&&""!=e){var a=e.split(",");if(0!=a.length)$.grep(a,function(e){return e==SupportUpSellFeature.QuickBook}).length>0&&(s=!0)}return s}function GetPageFromFeatureID(e){var s="";switch(e){case SupportUpSellFeature.CreditCardProcessing:s+="merchants/settings/premiumfeature/creditcardprocessing?IsFromFeature=true";break;case SupportUpSellFeature.QuickBook:s+="merchants/settings/premiumfeature/integration/quickbook";break;case SupportUpSellFeature.Xero:s+="/merchants/settings/premiumfeature/integration/xero";break;case SupportUpSellFeature.CheckinApp:s+="/merchants/settings/premiumfeature/checkinapp";break;case SupportUpSellFeature.BrandedApp:s+="merchants/settings/premiumfeature/brandedapp";break;case SupportUpSellFeature.EmailMarketing:s+="/merchants/settings/premiumfeature/emailmarketingplans";break;case SupportUpSellFeature.TextMarketing:s+="merchants/settings/premiumfeature/textmarketingplans";break;case SupportUpSellFeature.Forms:s+="/merchants/settings/premiumfeature/form";break;case SupportUpSellFeature.CustomWebsite:s+="ShopOwner/ManageWebsite.aspx";break;case SupportUpSellFeature.ShoppingCart:s+="merchants/settings/thingswesell/shoppingcart";break;case SupportUpSellFeature.FeatureBusiness:s+="merchants/settings/book/notification?Type=GetFeatured";break;case SupportUpSellFeature.VagaroDrive:s+="merchants/settings/premiumfeature/drive";break;case SupportUpSellFeature.Gusto:s+="merchants/settings/premiumfeature/managesubscription";break;case SupportUpSellFeature.LiveStream:s+="/merchants/settings/premiumfeature/livestream";break;case SupportUpSellFeature.VagaroPayLater:s+="/merchants/settings/premiumfeature/vagaropaylater";break;case SupportUpSellFeature.DataLake:s+="/merchants/settings/premiumfeature/integration/datalake";break;case SupportUpSellFeature.APIsandWebhooks:s+="setting/developers/apisandwebhooks";break;case SupportUpSellFeature.VagaroPayroll:s+="setting/add-ons/vagaropayroll";break;case SupportUpSellFeature.MySite:s+="ShopOwner/ManageWebsite.aspx";break;default:s=""}return s}function ShowNextButtonForSupportUpSellForNextStep(e){var s=localStorage.SupportUpsell;if($(".clsSupportUpsellNext").hide(),RemoveClassInFeaturePage(e),void 0!==s&&null!=s&&""!=s){var a="",c="";try{var t=JSON.parse(s);a=t.SupportUpsellID,c=t.RecommendFeature}catch(e){}if(void 0!==a&&null!=a&&""!=a&&void 0!==c&&null!=c&&""!=c){var n=c.split(",");if(0!=n.length){var i=n.indexOf(e);-1!=i&&i<n.length-1&&($(".clsSupportUpsellNext").show(),AddClassInFeaturePage(e))}}}}function RemoveClassInFeaturePage(e){switch(e){case SupportUpSellFeature.CheckinApp:$(".checkinapp-settingwrap").removeClass("upsellcheckinapp");break;case SupportUpSellFeature.BrandedApp:$(".BrandedAppsetting").removeClass("upsellbrandedapp");break;case SupportUpSellFeature.TextMarketing:$(".settingMainWarp").removeClass("upsellformsettingsbg");break;case SupportUpSellFeature.Forms:$(".formsettingWrap").removeClass("upsellformsettingsbg");break;case SupportUpSellFeature.ShoppingCart:$(".newsettingmainwrap").addClass("upsellonlineshoing");break;case SupportUpSellFeature.FeatureBusiness:$(".newsettingmainwrap").removeClass("upsellgetfeature")}}function AddClassInFeaturePage(e){switch(e){case SupportUpSellFeature.CheckinApp:$(".checkinapp-settingwrap").addClass("upsellcheckinapp");break;case SupportUpSellFeature.BrandedApp:$(".BrandedAppsetting").addClass("upsellbrandedapp");break;case SupportUpSellFeature.TextMarketing:$(".settingMainWarp").addClass("upsellformsettingsbg");break;case SupportUpSellFeature.Forms:$(".formsettingWrap").addClass("upsellformsettingsbg");break;case SupportUpSellFeature.ShoppingCart:$(".newsettingmainwrap").addClass("upsellonlineshoing");break;case SupportUpSellFeature.FeatureBusiness:$(".newsettingmainwrap").addClass("upsellgetfeature")}}function RedirectToNextSupportFeature(e){var s=localStorage.SupportUpsell;if(void 0!==s&&null!=s&&""!=s){var a="",c="",t="",n="";try{var i=JSON.parse(s);a=i.SupportUpsellID,c=i.RecommendFeature,n=i.ActiveRecommendFeature,void 0!==(t=i.SupportUpsellTextMarketingPlan)&&null!=t||(t="")}catch(e){}void 0!==a&&null!=a&&""!=a&&void 0!==c&&null!=c&&""!=c&&RedirectRecommFeaturePage(c,a,t,e,n)}}function IsSupportNextstep(e,s){var a=0,c=!1;if(void 0!==e&&null!=e&&""!=e){var t=e.split(",");if(0!=t.length)if(0==s)a=t[0];else{var n=t.indexOf(s);n<t.length-1&&(a=t[n+1])}""!=GetPageFromFeatureID(a)&&(c=!0)}return c}function CallBackCustomWebsiteDevice(e,s){null!=e&&null!=s&&DeviceCallBackFun('5006||~||{"navType": '+e+',"screenType": 0,"screenTitle" : "","message": "'+s+'","messageType": 0,"action" : 0}')}function ClearFeatureSubscriptionLocalStorage(){localStorage.removeItem("SupportUpsell")}function IsAutoClickAsFeatureRecommenation(e,s){var a=!1,c=localStorage.SupportUpsell;if(void 0!==c&&null!=c&&""!=c){var t="",n="";try{var i=JSON.parse(c);t=i.SupportUpsellID,n=i.ActiveRecommendFeature}catch(e){}if(void 0!==t&&null!=t&&""!=t)if(void 0!==n&&null!=n&&""!=n)if(0!=n.length){var r=n.indexOf(e);(-1!=r&&1==s||-1==r&&0==s)&&(a=!0)}else 0==s&&(a=!0);else 0==s&&(a=!0)}return a}function DisplayPriceWithTax(e,s,a){try{if(""==s||null==s||null==s)return parseFloat(e.replace(",","")).toFixed(2);var c=_LoadTaxInfo.GetSelectedTaxValues(s).reduce(function(e,s){return e+s},0),t=0;t=parseFloat(ConvertTodecimalMorePrecious(c/100*parseFloat(e.replace(",","")),!0,4))+parseFloat(e.replace(",",""));try{if(void 0!==a&&null!=a&&""!=a&&"240419,431131".split(",").includes(a.toString())){if(t.toString().indexOf(".")>0&&t.toString().substring(t.toString().indexOf(".")+3,t.toString().indexOf(".")+4)<=5){var n=t.toString().substring(t.toString().indexOf(".")+1,t.toString().indexOf(".")+3);return"99"==n?parseFloat(t.toString().substring(0,t.toString().indexOf(".")+3))+.01:"01"==n?parseFloat(t.toString().substring(0,t.toString().indexOf(".")+3))-.01:t.toString().substring(0,t.toString().indexOf(".")+3)}var i=parseFloat(t).toFixed(2);return"01"==i.toString().substring(i.toString().indexOf(".")+1,i.toString().indexOf(".")+3)?parseFloat(i.toString().substring(0,i.toString().indexOf(".")+3))-.01:parseFloat(t).toFixed(2)}}catch(e){return parseFloat(t).toFixed(2)}return parseFloat(t).toFixed(2)}catch(s){return parseFloat(e).toFixed(2)}}function DisplayPriceWithoutTax(e,s){try{if(void 0===s||""==s||null==s||null==s)return parseFloat(StringisNullOrUndefineOrBlank(e)?0:e.replace(",","")).toFixed(2);var a,c=_LoadTaxInfo.GetSelectedTaxValues(s).reduce(function(e,s){return e+s},0);return a=parseFloat(ConvertTodecimalMorePrecious(StringisNullOrUndefineOrBlank(e)?0:parseFloat(e.replace(",",""))/(1+c/100),!0,4)),parseFloat(a).toFixed(2)}catch(s){return parseFloat(e).toFixed(2)}}FormatPhone=function(e){var s=e.replace(/\D/g,""),a={0:"(",3:") ",6:"-"};e="";for(var c=0;c<s.length;c++)e+=(a[c]||"")+s[c];return e},ver=iOSversion(),GetChoiceForSeleect2Cust=function(e){try{return JSON.parse(e.data("choice"))}catch(e){return{}}},FormatPhoneByCountry=function(e,s,a,c=""){try{if(null!=e&&void 0!==e&&0!=e.length&&e.length>8){var t=e.replace(/\D/g,""),n={0:"(",3:") ",6:"-"};void 0!==s&&null!=s&&1*s>0&&(2==s&&10==t.length?void 0!==c&&null!=c&&""!=c&&"353"==c||(t="0"+t):(4==s&&9==t.length||2==s&&9==t.length)&&(t="0"+t)),void 0!==s&&null!=s&&1*s>0&&(2==s?n=void 0===c||null==c||""==c||"353"!=c?{3:" ",7:" "}:{0:"(",2:") ",7:" "}:3==s?n={3:"-",6:"-"}:4==s&&(n={0:"(",2:") ",6:" "})),e="";for(var i=0;i<t.length;i++)e+=(n[i]||"")+t[i];null!=a&&""!=a&&null!=a&&"withoutspace"==a&&(e=e.replace(/([()-\s])+/g,""))}return e}catch(s){return e}},ClientValidateCsvInjection=function(e,arguments){if(""!=arguments.Value){const e=CheckCsvInjectionWords(arguments.Value);arguments.IsValid=!e}else arguments.IsValid=!0},RestrictCharacter=function(e){$(e).val($(e).val().replace(/^=+/g,"")),$(e).val($(e).val().replace(/^@+/g,"")),$(e).val($(e).val().replace(/^-+/g,"")),$(e).val($(e).val().replace(/^\++/g,""))},CheckCsvInjectionWords=function(e){return["+","-","=","@"].some(s=>e.startsWith(s))},PreventCSVInjection=function(e){if(null!=e&&null!=typeof e&&0==IsNullOrEmpty(e.val())){return CheckCsvInjectionWords(e.val())}return!0},PreventScriptInjection=function(e){var s=e.clipboardData.getData("Text");if(1==/<(.|\n)*?>/g.test(s))return!1},ConvertTodecimalMorePrecious=function(e,s,a){return isNaN(parseFloat(e))&&(e=0),s?Number(Math.round(e+"e"+a)+"e-"+a).toFixed(a):parseFloat(Number(Math.round(e+"e"+a)+"e-"+a).toFixed(a))},setDarkModePreference=function(e,s){$("#hdnDarkModePreference").val(s);var a="",c=window.location.host.split(".");document.cookie="ThemePreferance=0;domain="+window.location.hostname.replace("www.",".")+"; path=/;Expires=Thu, 01 Jan 1970 00:00:01 GMT;",a=c.length>=2?"."+c[c.length-2]+"."+c[c.length-1]:window.location.hostname.replace("www.","."),document.cookie="ThemePreferance="+s+";domain="+a+"; path=/";var t=$("#divDiscountMainAddEditWarp").val();void 0!==t&&null!=t||(1==s?$("html").attr("data-theme","dark"):0==s?$("html").attr("data-theme","light"):$("html").attr("data-theme",""),void 0!==vui.frame&&null!=vui.frame&&vui.frame.zenswipe.setDarkModePreference(s))},setThemePreferenceFromCookies=function(){var e=getCookie("ThemePreferance");1==e?$("html").attr("data-theme","dark"):2==e?$("html").attr("data-theme",""):$("html").attr("data-theme","light")},FormatDateTime=function(e){try{return null!=e&&null!=e&&""!=e&&("undefined"!=typeof BusinessCountryID&&null!=BusinessCountryID&&"2"==BusinessCountryID||"undefined"!=typeof _businessCountryId&&null!=_businessCountryId&&"2"==_businessCountryId||"undefined"!=typeof glbBusinessCountryId&&null!=glbBusinessCountryId&&"2"==glbBusinessCountryId)?"Invalid date"==moment(e).format("D MMM, YYYY h:mm A")?e:moment(e).format("D MMM, YYYY h:mm A"):"Invalid date"==moment(e).format("MMM D, YYYY h:mm A")?e:moment(e).format("MMM D, YYYY h:mm A")}catch(s){return e}},FormatDate=function(e){return null!=e&&null!=e&&"---"!=e&&("undefined"!=typeof BusinessCountryID&&null!=BusinessCountryID&&"2"==BusinessCountryID||"undefined"!=typeof _businessCountryId&&null!=_businessCountryId&&"2"==_businessCountryId||"undefined"!=typeof glbBusinessCountryId&&null!=glbBusinessCountryId&&"2"==glbBusinessCountryId)?"Invalid date"==moment(e).format("D MMM, YYYY")?e:moment(e).format("D MMM, YYYY"):"Invalid date"==moment(e).format("MMM D, YYYY")?e:moment(e).format("MMM D, YYYY")};var VagaroDateFormat=Object.freeze({DateFormat_Month_Time_Format:"MMM D, YYYY h:mm A",DateFormat_Month_Time_Format_UK:"D MMM, YYYY h:mm A",DateFormat_VagaroPro:"MMM D, YYYY",DateFormat_VagaroPro_UK:"D MMM, YYYY",DateFormat_Refund_Date_Time:"MMM-DD-YYYY h:mm A",DateFormat_Refund_Date_Time_UK:"DD-MMM-YYYY h:mm A",DateFormat_DailyDealDiscount:"M/D/YY",DateFormat_DailyDealDiscount_UK:"D/M/YY"});function GetBusinessCountryID(){return"undefined"!=typeof glbBusinessCountryId&&null!=glbBusinessCountryId&&""!=glbBusinessCountryId&&"0"!=glbBusinessCountryId?glbBusinessCountryId:"undefined"!=typeof _businessCountryId&&null!=_businessCountryId&&""!=_businessCountryId&&"0"!=_businessCountryId?_businessCountryId:"undefined"!=typeof BusinessCountryID&&null!=BusinessCountryID&&"0"!=BusinessCountryID&&"0"!=BusinessCountryID?BusinessCountryID:1}function fnRemoveHTMLTag(e){var s=$(e).val().trim();$(e).val(CheckAndRemoveHTMLTagInString(s))}function SearchGridCommonControl(e,s,a,c,t,n){var i=$(e).val().trim();if(i.length>=1){$(n).css("display","block");var r=/\s\s+/g,o='^[a-zA-Z0-9!@#$&()\\-`.+,/"]*$',d=i.replace(r," "),u=(d=(d=d.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")).toLowerCase().replace(o,"")).split(" "),l=u.length,h=!1;$(s).find(a).each(function(){var e=0;$(this).find(c).each(function(){for(var s=$(this).text().trim(),a=0,c=0;c<u.length;c++){var t=s.replace(r," ").toLowerCase().replace(o,"");(t.match(u[c])||-1!==t.indexOf(" "+u[c]))&&a++}a>=l?($(this).show(),e++,h=!0):$(this).hide()}),0===e?$(this).hide():$(this).show()}),h?$(t).css("display","none"):$(t).css("display","block")}else $(n).css("display","none"),$(s).find(c).each(function(){$(this).show()}),$(s).find(a).each(function(){$(this).show()}),$(t).css("display","none");$(s).trigger("resize")}function DisplaySalesPageIframe(e){return $("#hiddenLoginUser_Type").val()==userType.vagaroAdmin||"undefined"==typeof hdnIsdormant||null==hdnIsdormant||"True"!=hdnIsdormant.value||(window.location.href=commonPermissionDenied,!1)}function disableSubmenuHover(e){if($("#hiddenLoginUser_Type").val()!=userType.vagaroAdmin&&"undefined"!=typeof hdnIsdormant&&null!=hdnIsdormant&&"True"==hdnIsdormant.value){let s=e.target.closest("li"),a=s.querySelector("a").getAttribute("value");if(s){let e=s.querySelector("ul");"Help"!=a&&e&&e.querySelectorAll("li").forEach(e=>{e.style.display="none"})}}}function showDormantUpgradeModal(){if($("#hiddenLoginUser_Type").val()!=userType.vagaroAdmin){var e=(navigator.userAgent||navigator.vendor||window.opera).toLowerCase(),s=e.match(/iphone/i)||e.match(/itouch/i)||e.match(/android/i)||!1,a=e.match(/vagaroandroidtablet/i)||e.match(/ipad/i);if("undefined"!=typeof hdnIsdormant&&null!=hdnIsdormant&&"True"==hdnIsdormant.value)return s&&!a?(CallBackToMobileDormantUpgradePopup(),!0):($("#dormantUpgradeModal").modal("show"),!0)}return!1}function CallBackToMobileDormantUpgradePopup(){var e='5006||~||{"navType": 0,"screenType": 0,"screenTitle" : "","message": "","messageType": 0,"action" : "142|~|"}';navigator.userAgent.toLowerCase().indexOf("iphone")>-1?window.location="js-call:myObjectiveCFunction:"+e:navigator.userAgent.toLowerCase().indexOf("android")>-1&&null!=window.JSInterface&&window.JSInterface.CallWSMethod(e)}changeDateFormat=function(e,s,a){try{if(void 0!==a&&null!=a||(a=1),"2"!=a)return moment(e).format(s);switch(s){case VagaroDateFormat.DateFormat_Month_Time_Format:return moment(e).format(VagaroDateFormat.DateFormat_Month_Time_Format_UK);case VagaroDateFormat.DateFormat_VagaroPro:return moment(e).format(VagaroDateFormat.DateFormat_VagaroPro_UK);case VagaroDateFormat.DateFormat_Refund_Date_Time:return moment(e).format(VagaroDateFormat.DateFormat_Refund_Date_Time_UK);case VagaroDateFormat.DateFormat_DailyDealDiscount:return moment(e).format(VagaroDateFormat.DateFormat_DailyDealDiscount_UK);default:return e}}catch(a){return moment(e).format(s)}},datetimepicker=function(){var e="MMM D, YYYY - h:mm A";return"undefined"!=typeof _businessCountryId&&null!=_businessCountryId&&"2"==_businessCountryId&&(e="D MMM, YYYY - h:mm A"),e},datepicker=function(){var e="MMM D, YYYY";return"undefined"!=typeof glbBusinessCountryId&&null!=glbBusinessCountryId&&"2"==glbBusinessCountryId&&(e="D MMM, YYYY "),"undefined"!=typeof _businessCountryId&&null!=_businessCountryId&&"2"==_businessCountryId&&(e="D MMM, YYYY "),"undefined"!=typeof BusinessCountryID&&null!=BusinessCountryID&&"2"==BusinessCountryID&&(e="D MMM, YYYY "),e},settingmodulehistoryPicker=function(){var e="MMM-DD-YYYY";return"undefined"!=typeof glbBusinessCountryId&&null!=glbBusinessCountryId&&"2"==glbBusinessCountryId&&(e="DD-MMM-YYYY "),"undefined"!=typeof _businessCountryId&&null!=_businessCountryId&&"2"==_businessCountryId&&(e="DD-MMM-YYYY "),"undefined"!=typeof BusinessCountryID&&null!=BusinessCountryID&&"2"==BusinessCountryID&&(e="DD-MMM-YYYY "),e};