1var mepr_populate_states=function(obj){(function($){var country=obj.val();var form=obj.closest('.mepr-form');if(form==undefined){return} 2form.find('.mepr-states-dropdown option').remove();var states_dropdown=form.find('.mepr-states-dropdown');var states_text=form.find('.mepr-states-text');if(states_dropdown.length<=0||states_text.length<=0){return} 3var fieldname=states_dropdown.data('fieldname');var value=states_dropdown.data('value').toString();if(fieldname==undefined||value==undefined){return} 4fieldname=fieldname.replace(/^\s+/,'');fieldname=fieldname.replace(/\s+$/,'');value=value.replace(/^\s+/,'');value=value.replace(/\s+$/,'');var required=!!obj.attr('required');if(MeprI18n.states[country]!==undefined){states_dropdown.attr('name',fieldname);states_dropdown.show();states_text.removeAttr('name');states_text.hide();if(required){states_text.removeAttr('required');states_dropdown.attr('required','')} 5states_dropdown.append('<option value="">'+MeprI18n.please_select_state+'</option>');for(var st in MeprI18n.states[country]){var selected=(value===st?' selected="selected"':'');states_dropdown.append('<option value="'+st+'" '+selected+'>'+MeprI18n.states[country][st]+'</option>')}}else{states_dropdown.removeAttr('name');states_dropdown.hide();states_text.attr('name',fieldname);states_text.show();if(required){states_dropdown.removeAttr('required');states_text.attr('required','')}}})(jQuery)};var mepr_set_locate_inputs=function(country,state){(function($){if(country!==''&&state!==''){if(MeprI18n.states[country]!==undefined&&MeprI18n.states[country][state]===undefined){state=''}} 6if($('.mepr-form .mepr-countries-dropdown').length>0){$.each($('.mepr-form .mepr-countries-dropdown'),function(i,obj){if($(obj).val()===undefined||$(obj).val()===''){$(obj).val(country)} 7mepr_populate_states($(obj))})} 8if($('.mepr-form .mepr-states-dropdown').length>0){$.each($('.mepr-form .mepr-states-dropdown'),function(i,obj){if($(obj).data('value')===undefined||$(obj).data('value')===''){var options=$(obj).find('option');$.each(options,function(i,option){if(state===option.value){$(obj).attr('data-value',state);$(option).attr('selected','selected');return!1}})}})} 9if($('.mepr-form .mepr-geo-country').length>0){$.each($('.mepr-form .mepr-geo-country'),function(i,obj){$(obj).val(country)})} 10$('.mepr-form .mepr-countries-dropdown').trigger('mepr-geolocated')})(jQuery)};var mepr_ssl_geoip_services={caseproof:{url:'https://cspf-locate.herokuapp.com?callback=?',cindex:'country_code',sindex:'region_code',used:!1,type:'jsonp',},};var mepr_locate=function(source_key){(function($){if(source_key==undefined){source_key='caseproof'} 11source=mepr_ssl_geoip_services[source_key];if(source.used===!0){return mepr_set_locate_inputs('','')} 12$.ajax({url:source.url,method:'GET',timeout:5000,dataType:source.type,}).done(function(data){var state=((data[source.sindex]!==undefined)?data[source.sindex]:'');var country=((data[source.cindex]!==undefined)?data[source.cindex]:'');mepr_set_locate_inputs(country,state)}).fail(function(){mepr_ssl_geoip_services[source_key].used=!0;for(var k in mepr_ssl_geoip_services){var next_source=mepr_ssl_geoip_services[k];if(next_source.used===!1){return mepr_locate(k)}} 13mepr_set_locate_inputs('','')});return!1})(jQuery)};jQuery(document).ready(function($){$.each($('.mepr-form .mepr-countries-dropdown'),function(i,obj){mepr_populate_states($(obj));$(obj).on('change',function(e){mepr_populate_states($(obj))})})})
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.