1"use strict";$(function(){if($("#js-vehicle-part-exchange").length){function e(e){var a=e.data("yiiActiveForm");return $.each(a.attributes,function(){this.status=3}),e.yiiActiveForm("validate"),0===$(".has-error",e).length}$(".js-next-button").click(function(){var a=$(this).parents(".card-section"),t=a.find("form"),n=!0;if(t.length&&(n=n&&e(t)),n){const e=a.parent().next();e.removeClass("hide"),$("html, body").animate({scrollTop:e.offset().top-60},200),$(this).hide()}else a.parent().next().addClass("hide");return n}),$(".js-part-exchange-reload").click(function(e){e.preventDefault(),SensiSpinner.show(),scrollToElement("#js-vehicle-part-exchange"),window.location.reload()}),$(".js-part-exchange-submit").click(function(a){a.preventDefault();var t=$(this),n=$(this).parents(".card-section"),s=n.find("form");const i="#"+n.find('input[name="g-recaptcha-response"]').attr("id");if(t.prop("disabled",!0),e(s)){$(".js-part-exchange-valuing-message").appendTo(document.body).show(),SensiSpinner.show(),setRecaptchaAndCall(i,"part-exchange-valuation",{function:function(){window.partExchangeOnlyEnquiry?function(){var e=$
1(".card-section").find('input[name="g-recaptcha-response"]').val();$('[name="g-recaptcha-response"').val(e);var a=$("#js-vehicle-part-exchange").find("form").serialize();$("<form>",{method:"post"}).append($("<input>",{name:"VehicleValuationForm",value:a,type:"hidden"})).append($("<input>",{name:$("#js-vehicle-part-exchange").find("input[name^=_csrf-]").prop("name"),value:$("#js-vehicle-part-exchange").find("input[name^=_csrf-]").val(),type:"hidden"})).appendTo("body").submit()}():(e=$("#js-vehicle-part-exchange").find("form").serialize(),a=$.ajax({type:"POST",dataType:"json",url:SensiHelper.getFranchiseUrlPrefix()+"/valuation/part-exchange",data:{data:e},success:function(e){var a=$(".card-valuation");a.removeClass("hide"),e.html?(a.find("h3").html(e.html),e.notAllowed?$(".js-part-exchange-store").hide():$(".js-part-exchange-store").show()):e.valuationsHtml?a.find("h3").html(e.valuationsHtml):e.success?(a.find("h3").html("£"+e.valuation),$(".js-valuation-result-hide-on-false").removeClass("hide")):(a.find("h3").html("Unfortunately we are unable to offer you a value for your vehicle at this time, however, we may still be able to assist. Please contact us to discuss with a member of our team."),$(".js-valuation-result-hide-on-false").addClass("hide"),$(".js-part-exchange-store").hide()),$(".js-part-exchange-valuing-message").hide(),SensiSpinner.hide(),t.hide(),scrollToElement("#js-valuation-summary"),$("#js-vehicle-part-exchange input,button,checkbox,select").prop("disabled",!0),$(".js-get-vehicle-details, .js-next-button").hide(),$(".js-valuation-result-buttons").removeClass("hide")},error:function(){422===a.status&&($.each(a.responseJSON,function(e,a){a=a[0],e="partexchangeform-"+e.toLowerCase();var t=$("#"+e);t.siblings("div.help-block").remove(),t.after('<div class="help-block">'+a+"</div>"),t.closest(".form-group").addClass("has-error")}),void 0!==a.responseJSON.message&&injectAlertMessage(a.responseJSON.message)),$(".card-valuation").addClass("hide"),$(".js-part-exchange-valuing-message").hide(),SensiSpinner.hide(),t.prop("disabled",!1)}}));var e,a}})}else $("#js-vehicle-part-exchange form#form04").length&&scrollToElement("#js-vehicle-part-exchange form#form04"),t.prop("disabled",!1)}),$(".js-part-exchange-store").on("click",function(){var e={input:{},radioButtonToInput:{},checkbox:{}};$("[data-pe-store]").each(function(){"checkbox"==$(this).data("pe-store")?(e[$(this).data("pe-store")][this.id]=$(this).is(":checked"),console.info($(this).is(":checked"))):e[$(this).data("pe-store")][this.id]=$(this).val()}),localStorage.setItem("partExchangeValuation",JSON.stringify(e))})}Object.byString=function(e,a){for(var t=(a=(a=a.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),n=0,s=t.length;n<s;++n){var i=t[n];if(!(i in e))return;e=e[i]}return e}});
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.