1/*!!! WARNING: THIS IS A COMPILED FILE FROM TYPESCRIPT (Please do not edit this transpiled file directly as its generated automatically. Instead please edit the .ts file of the same filename/filepath as this one and ensure you have the DFusion Task Runner default task running)*/ 2window.addEventListener("DOMContentLoaded",()=>{const quickSearchForm=document.getElementById("builder-model-quick-search");var choice_select_builder=new window.Choices(document.getElementById('select-builder'),{shouldSort:!1,searchPlaceholderValue:"Enter Search..."});var choice_select_model=new window.Choices(document.getElementById('select-model'),{shouldSort:!1,searchPlaceholderValue:"Enter Search...",searchEnabled:!1});var choice_select_category=new window.Choices(document.getElementById('select-category'),{shouldSort:!1,searchEnabled:!1});document.getElementById("select-builder").addEventListener("change",function(event){const select=event.target;const encoded_builder_id=select.value;const pathname=window.location.pathname;const prefix=pathname.slice(0,pathname.indexOf("/",1));const has_options=select.selectedOptions[0].dataset.customProperties.split(/\s+/);const has_new=has_options.indexOf('has_new')!=-1;const has_used=has_options.indexOf('has_used')!=-1;choice_select_category.destroy();document.querySelector('#select-category option[value="any"]').disabled=!has_new;document.querySelector('#select-category option[value="new"]').disabled=!has_new;document.querySelector('#select-category option[value="used"]').disabled=!has_used;if(!has_new) 3document.getElementById('select-category').value='used';choice_select_category=new window.Choices(document.getElementById("select-category"),{shouldSort:!1,searchEnabled:!1});var lineage_list=[];fetch(`${prefix}/homepage/lineage?id=${encoded_builder_id}`).then(response=>response.json()).then(function(lineage_list){lineage_list.sort((a,b)=>{if((a.production_status==1?1:2)<(b.production_status==1?1:2)){return-1}else if((a.production_status==1?1:2)>(b.production_status==1?1:2)){return 1} 4if(a.name<b.name){return-1}else if(a.name>b.name){return 1} 5return 0});choice_select_model.destroy();const select=document.getElementById("select-model");select.innerHTML="<optgroup label=\"Any Model\"><option value=\"any\">Any Model</option></optgroup>";const in_production=lineage_list.filter(e=>e.production_status==1);const other=lineage_list.filter(e=>e.production_status!=1);if(in_production.length>0){const optgroup_in_production=document.createElement("optgroup");optgroup_in_production.label="In Production";in_production.forEach(item=>{const option=document.createElement("option");option.value=item.id;option.textContent=item.name;optgroup_in_production.appendChild(option)});select.appendChild(optgroup_in_production)} 6if(other.length>0){const optgroup_discontinued=document.createElement("optgroup");optgroup_discontinued.label="Discontinued";other.forEach(item=>{const option=document.createElement("option");option.value=item.id;option.textContent=item.name;optgroup_discontinued.appendChild(option)});select.appendChild(optgroup_discontinued)} 7choice_select_model=new window.Choices(document.getElementById("select-model"),{shouldSort:!1,searchPlaceholderValue:"Enter search..."})}).catch(error=>console.log(`Error: ${error}`))});quickSearchForm.addEventListener("submit",function(event){event.preventDefault();const encoded_builder_select=document.getElementById("select-builder");const encoded_builder_id=encoded_builder_select.value;const tender_only=(encoded_builder_select.selectedOptions[0].dataset.customProperties.split(' ').indexOf('tender_only')!=-1)?'tender_only':'';const encoded_lineage_select=document.getElementById("select-model");const encoded_lineage_id=encoded_lineage_select.value;const category_select=document.getElementById("select-category");const category=category_select.value;const pathname=window.location.pathname;const prefix=pathname.slice(0,pathname.indexOf("/",1));const submit_from_location=event.submitter.dataset.location;fetch(`${prefix}/homepage/search-url?builder_id=${encoded_builder_id}&lineage_id=${encoded_lineage_id}&category=${category}&tender_only=${tender_only}&from_location=${submit_from_location}`).then(function(response){return response.text()}).then(function(search_url){if(search_url){window.location.href=`${prefix}${search_url}`}else{window.location.reload()}}).catch(error=>{console.log(`Error: ${error}`);let errorParagraph=document.createElement('p');errorParagraph.classList.add("error-tpm-text");errorParagraph.innerHTML='There has been an error processing your request.';quickSearchForm.appendChild(errorParagraph);setTimeout(function(){errorParagraph.remove()},4000)})})});
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.