1var CSE=(function(CSE,$){CSE.form='';CSE.loaded=!1;CSE.jqXHR=!1;CSE.current=[];CSE.previous=[];CSE.fetch=function(){$('html').addClass('loading');CSE.target.append('<div class="loading-icon">Searching...</div>');if(CSE.jqXHR&&CSE.jqXHR.readyState!==4){CSE.jqXHR.abort()} 2CSE.previous=CSE.current;CSE.current=CSE.form.serializeArray();var postData={'action':'equipment_search_refresh','data':{'current':JSON.stringify(CSE.current),'previous':JSON.stringify(CSE.previous),}};CSE.jqXHR=$.post(CSE.ajaxurl,postData,function(response){var json=$.parseJSON(response);CSE.update_field_options(json);CSE.render(json)})} 3CSE.parse_fields=function(json){if(CSE.jqXHR&&CSE.jqXHR.readyState!==4){CSE.jqXHR.abort()} 4CSE.previous=CSE.current;CSE.current=CSE.form.serializeArray();CSE.jqXHR=$.post(CSE.ajaxurl,{'action':'equipment_search_fields','changed':CSE.changed,'data':{'current':JSON.stringify(CSE.current),'previous':JSON.stringify(CSE.previous),}},function(response){var json=$.parseJSON(response);CSE.update_field_options(json)})} 5CSE.update_field_options=function(json){$.each(json.values,function(name,values){var $input=CSE.form.find('[name="'+name+'"]');$input.html(values).trigger('update.fs');if($input.hasClass('selectric-input')&&typeof($input.selectric)=='function'){$input.selectric('refresh')}})} 6CSE.inject=function(){$inject=$('#js-equipment-search-inject');if(!$inject.length) 7return;CSE.form=$inject;var target=CSE.form.find('#target').val();CSE.target=$(target);CSE.changed=$(this).attr('name');CSE.fieldStates();CSE.parse_fields()} 8CSE.render=function(json){$(window).trigger('CSE::beforeRender');CSE.target.html(json.template);$(window).trigger('CSE::afterRender');$('html').removeClass('loading')} 9CSE.fieldStates=function(){var fields=CSE.form.find('[data-enabled-field]');fields.each(function(){var f=$(this),src=CSE.form.find('[name="'+f.data('enabled-field')+'"]').val(),val=f.data('enabled-value');if(src==val){f.removeAttr('disabled');f.trigger('enable')}else{f.attr('disabled','disabled') 10f.trigger('disable')}})} 11$(function(){$('.js-equipment-search-form').on('change','select, input',function(event){CSE.form=$(this).closest('.js-equipment-search-form');CSE.changed=$(this).attr('name');CSE.fieldStates();CSE.parse_fields()});$('.js-equipment-search-form').on('submit',function(event){var $this=$(this),$action=$this.find('#action'),action=$action.length?$action.val():'';if(action=='equipment_search_refresh'){event.preventDefault();CSE.fetch()}});CSE.inject()});return CSE})(CSE||{},jQuery)
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.