PageSourceSearch

https://www.grant-thornton.gr/dist/v2/js-v2/modules/GTEPiServerForms.9aae282ca4c1fb31bc7054302356a1a5.js

js grant-thornton.gr collected 2026-09-24 19:40:27 UTC 7,877 bytes, 1 lines download raw bytes

1function findFormSuccessMessage(e){if(!e)return null;var e=$(e),t=e.find(".Form__Success__Message[data-f-form-statusmessage]").first();return(t=(t=t.length?t:e.find(".Form__Success__Message").first()).length?t:e.find(".Form__Status__Message.Form__Success__Message").first()).length?t[0]:null}GT.EPiServerForms=function(e){var u=this,r=(u.files={},"ValidationFail");function i(e){e=$(e.currentTarget);e.removeClass(r),e.parent().removeClass(r);let t=e.find('input[type="checkbox"][required]');t&&t.attr("aria-invalid",!1)}if(e.each(function(){var e=$(this),t=e.find(".Form__Element");t.on("change",i);let r=t.find("input,select,textarea");r&&r.find("input,select,textarea").on("change",i),e.find(".FormChoice").find("label").append('<i class="FormChoice__Icon"></i>');e.find(".FormSelection select[multiple]").parent().find("label").addClass("no-before");var t=e.find(".FormStep__Title, .Form__Title, .FormStep__Description, .Form__Description");u.emptyBlockChecker(t),e.find("input[type=file]").each(function(){u.files[this.name]=new GT.FileUpload(this)}),t=e,0<$(document).find(".campaign-page").length&&0<(t=$(t).find('button[type="submit"]')).length&&t.addClass("t33-campaign-page-form-submit")}),"undefined"!=typeof $$epiforms){$$epiforms(".EPiServerForms").on("formsNavigationNextStep formsNavigationPrevStep formsReset formsStartSubmitting formsSubmitted formsSubmittedError formsStepValidating FormsStructureChange FormsStepSubmitted FormsSubmissionFinalized FormsSubmitting",function(e,t,r){u[e.type](e)});var t=$("body"),o=$('<div class="form-loading-submit"><div class="lds-ripple"><div></div><div></div></div></div>');epi.EPiServer.Forms.AsyncSubmit=!0,$$epiforms(".EPiServerForms").on("formsStartSubmitting",function(e){t.append(o)}),$$epiforms(".EPiServerForms").on("formsSubmitted",function(e){$(".form-loading-submit").remove()});let e=Array.prototype.slice.call(document.querySelectorAll(".EPiServerForms [type='submit']"));e.length&&e.forEach(function(e){e.addEventListener("click",function(e){let t=e.target.closest(".EPiServerForms"),r=Array.prototype.slice.call(t.querySelectorAll('.Form__Element input[type="checkbox"][required]'));r.forEach(function(e){e.checked||e.setAttribute("aria-invalid",!0)})})}),$$epiforms(".EPiServerForms").on("formsSubmittedError",function(e){$(".form-loading-submit").remove()}),$(document).ready(function(){var e,t=(t=$("input[name='__FormGuid']")).length&&(t=t.filter(function(){var e=this.value,t=null;return!!(t=epi&&epi.EPiServer&&epi.EPiServer.Forms&&epi.EPiServer.Forms[e]?epi.EPiServer.Forms[e]:t)&&!!(t&&t.StepsInfo&&t.StepsInfo.Steps&&0<t.StepsInfo.Steps.length)})).length?t[0]:null;t&&(t=t.value,e=epi.EPiServer.Forms.Data.loadFormDataFromStorage(t),0!==Object.keys(e).length&&(e=$("#"+t)).length&&u.formScroll(e[0]))}),epi.EPiServer.Forms.Validators["EPiServer.Forms.Implementation.Validation.RegularExpressionValidator"]=function(e,t,r){var i=new RegExp(r.model.jsPattern).test(t);let o=document.querySelector('input[name="'+e+'"]'),n=t&&!i,s=r.model.message;return o&&t&&(0<o.maxLength&&t.length>o.maxLength&&(n=!0,s="This field's max-length is "+o.maxLength+"."),0<o.minLength&&t.length<o.minLength&&(n=!0,s="This field's min-length is "+o.maxLength+"."),0<o.minLength&&0<o.maxLength&&t.length!=o.maxLength&&(n=!0,s="This field's length is "+o.maxLength,o.getAttribute("india-phone")&&(s=document.querySelector(".india-phone-wrong-length")?.value||""))),n&&!s&&(s="This field is not correct."),n?{isValid:!1,message:s}:{isValid:!0}}}GT.isAdvancedUpload&&(epi.EPiServer.Forms.Validators["EPiServer.Forms.Implementation.Validation.RequiredValidator"]=function(e,t,r){return(u.files[e]?(e=u.files[e],!(t&&t.length||e.droppedFiles&&e.droppedFiles.length)):""==t||t&&!t.length)?{isValid:!1,message:r.model.message}:{isValid:!0}},epi.EPiServer.Forms.Validators["EPiServer.Forms.Implementation.Validation.AllowedExtensionsValidator"]=function(e,t,r){if(t&&!(t instanceof Array&&0==t.length)){var i=t,o=(u.files[e]&&u.files[e].droppedFiles&&u.files[e].droppedFiles.length&&(i=u.files[e].droppedFiles),r.model.accept),n=epi.EPiServer.Forms.UploadExtensionBlackList.split(","),s=null==o||o.length<1?[]:o.split(","),a=s.length,l=i.length;if(0<a)for(var m=0;m<a;m++)s[m]=s[m].substr(1);for(var p,f,d,c=0;c<l;c++)if(p=i[c].name,f=n,d=s,p=p.substr(2+(~-p.lastIndexOf(".")>>>0)),console.log(p),p.length<1||(p=p.toLowerCase(),0<=f.indexOf(p)||!(d.length<1||-1<d.indexOf(p))))return{isValid:!1,message:epi.EPiServer.Forms.Utils.stringFormat(r.model.message,[o])}}return{isValid:!0}},epi.EPiServer.Forms.Validators["EPiServer.Forms.Implementation.Validation.MaxFileSizeValidator"]=function(e,t,r){for(var i=t,o=0,n=(i=u.files[e]&&u.files[e].droppedFiles&&u.files[e].droppedFiles.length?u.files[e].droppedFiles:i).length,s=r.model.sizeInBytes;o<n;o++)if(i[o].size>s)return{isValid:!1,message:epi.EPiServer.Forms.Utils.stringFormat(r.model.message,[s/1048576])};return{isValid:!0}})},GT.EPiServerForms.prototype.emptyBlockChecker=function(e){e.each(function(){!this.innerHTML.length&&this.parentNode&&this.parentNode.removeChild(this)})},GT.EPiServerForms.prototype.emptyTextChecker=function(e){$(e).each(function(){$(this).text().trim().length||$(this).css("padding","0")})},GT.EPiServerForms.prototype.formsNavigationNextStep=function(e){$(e.currentTarget).find(".ValidationFail").removeClass("ValidationFail")}
1,GT.EPiServerForms.prototype.focusFormSuccessMessage=function(e){if($(".epi-editmode").length)return!1;e=findFormSuccessMessage(e);return!(!e||!$(e).text().trim())&&(e.setAttribute("tabindex","-1"),"function"==typeof e.focus&&e.focus({preventScroll:!0}),this.formScroll(e),!0)},GT.EPiServerForms.prototype.formScroll=function(s,a){var l;$(".epi-editmode").length||$(".c-widget__overlay").length||(l=$(window).width()<=768?70:8,$("header[data-sticky='true']").length&&(l+=150),setTimeout(function(){var e=$(s).parents([".newsletter-container",".contact-form-popup"].join(",")),t=$(s).parents(".EPiServerForms"),r=$("html, body"),i=$("html, body").scrollTop(),o=$(s).offset().top-l,n=Math.abs(i-o);e.length&&(i=(r=e).scrollTop(),o=Math.abs((t.offset()||{top:0}).top-$(s).offset().top)-20,n=Math.abs(i-o)),r.animate({scrollTop:o},Math.floor(n/2.5),a||function(){})},10))},GT.EPiServerForms.prototype.formsSubmitted=function(e){$(".ValidationFail").each(function(){var e=$(this),t=e.find(".Form__Element__ValidationError");t.length&&!t.text().length&&e.removeClass("ValidationFail")});var t,r=e.currentTarget;e.isFinalizedSubmission&&e.isSuccess?(t=this).focusFormSuccessMessage(r)||setTimeout(function(){t.focusFormSuccessMessage(r)},0):this.formScroll(r)},GT.EPiServerForms.prototype.formsStepValidating=function(e){var t,r=".Form__Element.ValidationFail",e=$(e.currentTarget).find(r+" input, "+r+" textarea, "+r+" select");e.length&&(t=e.eq(0),this.formScroll(t.parents(r),function(){768<$(window).width()&&t.focus()}))},GT.EPiServerForms.prototype.formsStartSubmitting=function(e){var t,r=e.formData;for(t in this.files){var i=this.files[t],o=i.filePicker[0].name,n=i.droppedFiles;if(n&&Object.getPrototypeOf(n[0])===File.prototype){for(var s="",a=0;a<n.length;a++)r.append(o+"_file_"+a,n[a]),s+=n[a].name+"|";r.append(o,s)}}},GT.EPiServerForms.prototype.formsNavigationPrevStep=function(){},GT.EPiServerForms.prototype.formsReset=function(){},GT.EPiServerForms.prototype.formsSubmittedError=function(){},GT.EPiServerForms.prototype.FormsStructureChange=function(){},GT.EPiServerForms.prototype.FormsStepSubmitted=function(){},GT.EPiServerForms.prototype.FormsSubmissionFinalized=function(e){e&&e.isSuccess&&e.currentTarget&&this.focusFormSuccessMessage(e.currentTarget)},GT.EPiServerForms.prototype.FormsSubmitting=function(){},GT.EPiServerForms.prototype.emptyTextChecker(".Form__Element__Caption"),"undefined"==typeof isV1GT&&GT.domContentLoadedFncList.push(function(){new GT.EPiServerForms($(".EPiServerForms"))});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.