function newJsEnabled(){return sessionStorage.getItem("IsNewJsEnabled")==="True"}function stringEscape(n){return n.replace(/'/g,"&apos;")}function getFormattedFilename(n){if(accusoftSecurityEnabled())return n;try{var t=JSON.parse(atob(unescape(n)));return t.FileName}catch(i){return n}}function accusoftSecurityEnabled(){return _securityfeature&&_securityfeature.accusoftViewer===!0}function getUniqueId(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)})}function getQueryString(){var t=window.location.search||"",i=[],r={},n;if(t=t.substr(1),t.length){i=t.split("&");for(pairNum in i)(n=i[pairNum].split("=")[0],n.length)&&(typeof r[n]=="undefined"&&(r[n]=[]),r[n].push(i[pairNum].split("=")[1]))}return r}function getParameterByName(n,t=window.location.href){n=n.toLocaleLowerCase().replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t.toLocaleLowerCase());return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function commonErrorHandling(n){if(n.status==400){var t=n.responseJSON.message+"<br>";for(let i in n.responseJSON.modelState)n.responseJSON.modelState.hasOwnProperty(i)&&(t+="<br>"+n.responseJSON.modelState[i]);toastr.error(_Common.Error+": "+t)}else toastr(_Common.Error+": "+n.responseJSON.exceptionMessage)}function isNullOrEmpty(n){return typeof n!="string"||!n.trim().length}function UploadSecurityChecks(){function n(n){var r;return n>0&&(r=i[n]),r||t}function u(n){const t=n.toLocaleLowerCase().split(".");return t.length>1?`.${t.pop()}`:""}const t=[".doc",".docx",".xlsx",".xls",".jpg",".jpeg",".png",".gif",".svg",".pptx",".ppt",".txt",".idml",".indd",".pdf",".rtf",".tif",".tiff",".rdl",".json"],i={5:[".docx"],20:[".docx"]},r=[20];this.getAcceptTypes=function(t){return n(t).join(",")};this.validate=function(i,r,f){if(!i)return!1;var e=u(i);return t.includes(e)?n(f).includes(e)?!0:(toastr.error(`File type must be ${n(f).join(", ")}.`),!1):(toastr.error(`File name: ${i} of file type - ${r} is not allowed.`),!1)};this.allowMultipleFiles=function(n){return!r.includes(n)}}$(document).on("click",".form-reset-button",function(){var n=$(this).parents("form").first();if(n){$(n).validate().resetForm();$(n).find(".error").removeClass("error");try{$(n).find("input,textarea,select").val("").end().find("input[type=checkbox], input[type=radio]").prop("checked","").end();$(n).reset()}catch(t){}}})