PageSourceSearch

https://ebad.com/wp-content/cache/asset-cleanup/one/js/item/apd_eb…085a689287ac5188f17c6c9f63f745650aa6dcab.js

js ebad.com collected 2026-10-02 11:36:39 UTC 9,664 bytes, 15 lines download raw bytes

1/*!/wp-content/themes/apd_ebad/js/fragibolt-fastener-calculator.js*/
2jQuery('document').ready(function(){var $=jQuery;var $form=$('.ffc-stepped-form');if($form.length){var
3field_first_name=$('input[name="first_name"]'),wpcf7_first_name=$('input[name="first-name"]'),field_last_name=$('input[name="last_name"]'),wpcf7_last_name=$('input[name="last-name"]'),field_your_email=$('input[name="your_email"]'),wpcf7_your_email=$('input[name="your-email"]'),field_number_phone=$('input[name="number_phone"]'),wpcf7_number_phone=$('input[name="number-phone"]'),field_your_company=$('input[name="your_company"]'),wpcf7_your_company=$('input[name="your-company"]'),field_application=$('select[name="your_application"]'),wpcf7_application=$('select[name="your-application"]'),field_part_number=$('input[name="part_number"]'),wpcf7_part_number=$('input[name="part-number"]'),field_size_code=$('input[name="size_code"]'),wpcf7_size_code=$('input[name="size-code"]'),field_thread_length=$('input[name="thread_length"]'),wpcf7_thread_length=$('input[name="thread-length"]'),field_shaft_length=$('input[name="shaft_length"]'),wpcf7_shaft_length=$('input[name="shaft-length"]'),field_notch_location=$('input[name="notch_location"]'),wpcf7_notch_location=$('input[name="notch-location"]');field_first_name.on('keyup keypress blur change',function(){wpcf7_first_name.val($(this).val())});field_last_name.on('keyup keypress blur change',function(){wpcf7_last_name.val($(this).val())});field_your_email.on('keyup keypress blur change',function(){wpcf7_your_email.val($(this).val())});field_number_phone.on('keyup keypress blur change',function(){wpcf7_number_phone.val($(this).val())});field_your_company.on('keyup keypress blur change',function(){wpcf7_your_company.val($(this).val())});field_application.on('keyup keypress blur change',function(){wpcf7_application.val($(this).val())});field_size_code.on('keyup keypress blur change',function(){wpcf7_size_code.val($(this).val())});field_thread_length.on('keyup keypress blur change',function(){wpcf7_thread_length.val($(this).val())});field_shaft_length.on('keyup keypress blur change',function(){wpcf7_shaft_length.val($(this).val())});field_notch_location.on('keyup keypress blur change',function(){wpcf7_notch_location.val($(this).val())});$('input.format-phone').each(function(){$(this).on("keyup keypress blur change",function(){formatPhone(this)})});$.validator.addMethod("regex",function(value,element,regexp){var re=new RegExp(regexp),input_label=$(element).attr('data-label');$.validator.messages.regex="Check formatting for "+input_label;return this.optional(element)||re.test(value)},$.validator.messages.regex);$form.find('input:not(".ignore-field"), select').each(function(i,v){switch(this.type){case 'password':case 'select-multiple':case 'select-one':case 'select':case 'text':case 'tel':case 'email':case 'textarea':$(this).val('');break;case 'checkbox':case 'radio':this.checked=!1}});$form.each(function(){$(this).validate()});$(".required-length").each(function(){var max_length=$(this).attr('data-max-length');var min_length=$(this).attr('data-min-length');if(max_length){$(this).rules("add",{required:!0,maxlength:max_length,minlength:min_length,regex:''})}});$('.calculator-fields input').keyup(function(){$(this).val($(this).val().toUpperCase())});$(".required-pattern").each(function(){var regex=$(this).attr('data-pattern');$(this).rules("add",{regex:regex})});$(".required-field").each(function(){$(this).rules("add",{required:!0})});$(".required-email").each(function(){$(this).rules("add",{email:!0})});$(".required-url").each(function(){$(this).rules("add",{validUrl:!0})});$(".not-required").each(function(){$(this).rules("add",{required:!1})});var $sections=$('.ffc-form-section');$('.flyer-select .poster-wrapper').on('click',function(){$(this).parent('div').find('input').click()});function navigateTo(index){$sections.removeClass('current').eq(index).addClass('current');$('.form-navigation .previous').toggle(index>0);var atTheEnd=index>=$sections.length-1;$('.form-navigation .next').toggle(!atTheEnd);$('.form-navigation [type=submit]').toggle(atTheEnd)}
4function curIndex(){return $sections.index($sections.filter('.current'))}
5$('.form-navigation .previous').click(function(e){e.preventDefault(e);navigateTo(curIndex()-1)});$('.form-navigation .next').click(function(e){e.preventDefault(e);var v=form_validation(curIndex());if(v){navigateTo(curIndex()+1)}});navigateTo(0);function runCalculator(){if($form.valid()){$form.addClass('processing');var results_wrapper=$('.calculator-results-wrapper'),part_number=$('input[name="part_number"]').val()?$('input[name="part_number"]').val():'-',size_code=$('input[name="size_code"]').val()?$('input[name="size_code"]').val():'-',thread_length=$('input[name="thread_length"]').val()?$('input[name="thread_length"]').val():'-',shaft_length=$('input[name="shaft_length"]').val()?$('input[name="shaft_length"]').val():'-',notch_location=$('input[name="notch_location"]').val()?$('input[name="notch_location"]').val():'-',result_verifiedFormat=$('#verifiedFormat'),result_verifiedFormatMsg=$('#verifiedFormatMsg'),result_sizeMachinable=$
5('#sizeMachinable'),result_sizeMachinableMsg=$('#sizeMachinableMsg'),result_fn10atPastMinValue=$('#fn10atPastMinValue'),result_fn10atPastMinValueMsg=$('#fn10atPastMinValueMsg'),result_fn13atBelowMaxValue=$('#fn13atBelowMaxValue'),result_fn13atBelowMaxValueMsg=$('#fn13atBelowMaxValueMsg'),result_nLargeEnoughMachining=$('#nLargeEnoughMachining'),result_nLargeEnoughMachiningMsg=$('#nLargeEnoughMachiningMsg');results_wrapper.removeClass('is-active');result_verifiedFormat.removeClass('failed').removeClass('passed');result_sizeMachinable.removeClass('passed').removeClass('failed');result_fn10atPastMinValue.removeClass('passed').removeClass('failed');result_fn13atBelowMaxValue.removeClass('passed').removeClass('failed');result_nLargeEnoughMachining.removeClass('passed').removeClass('failed');result_verifiedFormatMsg.empty();result_sizeMachinableMsg.empty();result_fn10atPastMinValueMsg.empty();result_fn13atBelowMaxValueMsg.empty();result_nLargeEnoughMachiningMsg.empty();$.ajax({type:"POST",url:'https://ebad2020.wpengine.com/wp-json/frangibolt-calculator/'+part_number+'/'+size_code+'/'+thread_length+'/'+shaft_length+'/'+notch_location+'/',crossDomain:!0,success:function(data){results_wrapper.addClass('is-active');result_verifiedFormatMsg.append(data.valid_callout_msg);result_sizeMachinableMsg.append(data.machinable_msg);result_fn10atPastMinValueMsg.append(data.is_fn10_at_or_past_minimum_value_msg);result_fn13atBelowMaxValueMsg.append(data.is_fn13_h_at_or_below_maximum_value_msg);result_nLargeEnoughMachiningMsg.append(data.is_n_large_enough_for_machining_msg);if(data.valid_callout){result_verifiedFormat.removeClass('failed').addClass('passed');result_verifiedFormat.find('.yes-no').find('strong').empty().append('Yes')}else{result_verifiedFormat.removeClass('passed').addClass('failed');result_verifiedFormat.find('.yes-no').find('strong').empty().append('No')}
6if(data.machinable){result_sizeMachinable.removeClass('failed').addClass('passed');result_sizeMachinable.find('.yes-no').find('strong').empty().append('Yes')}else{result_sizeMachinable.removeClass('passed').addClass('failed');result_sizeMachinable.find('.yes-no').find('strong').empty().append('No')}
7if(data.is_fn10_at_or_past_minimum_value){result_fn10atPastMinValue.removeClass('failed').addClass('passed');result_fn10atPastMinValue.find('.yes-no').find('strong').empty().append('Yes')}else{result_fn10atPastMinValue.removeClass('passed').addClass('failed');result_fn10atPastMinValue.find('.yes-no').find('strong').empty().append('No')}
8if(data.is_fn13_h_at_or_below_maximum_value){result_fn13atBelowMaxValue.removeClass('failed').addClass('passed');result_fn13atBelowMaxValue.find('.yes-no').find('strong').empty().append('Yes')}else{result_fn13atBelowMaxValue.removeClass('passed').addClass('failed');result_fn13atBelowMaxValue.find('.yes-no').find('strong').empty().append('No')}
9if(data.is_n_large_enough_for_machining){result_nLargeEnoughMachining.removeClass('failed').addClass('passed');result_nLargeEnoughMachining.find('.yes-no').find('strong').empty().append('Yes')}else{result_nLargeEnoughMachining.removeClass('passed').addClass('failed');result_nLargeEnoughMachining.find('.yes-no').find('strong').empty().append('No')}
10setTimeout(function(){$form.removeClass('processing');$('.frangibolt-fastener-calculator-wrapper').removeClass('d-none')},500)}})}}
11$('.run-calculator').on('click',function(){runCalculator()});$('.reset-calculator').on('click',function(){$('label.error').css('display','none');$('input.error').removeClass('error');$('input[name="part_number"]').val('');$('input[name="size_code"]').val('');$('input[name="thread_length"]').val('');$('input[name="shaft_length"]').val('');$('input[name="notch_location"]').val('');$('.calculator-results-wrapper').removeClass('is-active');$('.frangibolt-fastener-calculator-wrapper').addClass('d-none')});function formatPhone(field){var a,b,c,d,e;for(a=field.value,b={0:"(",3:") ",6:" - "},c=a.replace(/\D/g,""),d="",e=0;e<c.length&&10>e;e++)d+=(b[e]||"")+c[e];field.value=d}
12function form_validation(index){var valid=$form.valid(),fv=$form.data("validator"),proceed=!0;
12if(index===0){if('first_name' in fv.invalid||'last_name' in fv.invalid||'email' in fv.invalid||'your_company' in fv.invalid||'number_phone' in fv.invalid||'your_application' in fv.invalid){proceed=!1}}
13if(index===1){if('part_number' in fv.invalid||'size_code' in fv.invalid||'thread_length' in fv.invalid||'shaft_length' in fv.invalid||'notch_location' in fv.invalid){proceed=!1}}
14return proceed}}})
15;

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.