1class BalanceChecker{constructor(e){this.container=e,this.form=e.find("form, .form"),this.brand=e.data("brand"),this.pinTrigger=6003,this.message=null,this.result=null,this.loader=$('<span class="balance-checker__loader"></span>'),this.load()}load(){var e=this;this.form.is("form")?this.form.on("submit",(function(){let a=$(this).find("[name=card_number]").val(),n=$(this).find("[name=pin]").val();return e.retrieveBalance({cardNumber:a,pin:n,brand:e.brand}),!1})):this.container.find(".balance-checker__inner .btn").click((function(){let a=$(this).closest(".balance-checker__inner"),n=a.find("[name=card_number]").val(),t=a.find("[name=pin]").val();return e.retrieveBalance({cardNumber:n,pin:t,brand:e.brand}),!1})),this.togglePin()}retrieveBalance(e){var a=this;this.loader.appendTo(this.container).css("opacity",0).animate({opacity:1},300),$.ajax({url:"https://stores.doversaddlery.com/balance/api/checkBalance/",data:e,type:"POST",cache:!1,success:function(e){0==e.status&&e.message?a.return("message",e.message):1==e.status&&e.result.balance_nice&&a.return("result",e.result),a.loader.remove()},error:function(e){a.return("result","An error has occurred, please contact us."),this.loader.remove()}})}togglePin(){var e=this;this.container.find("[name=card_number]").on("keyup input paste change",(function(){$(this).val().slice(0,4)==e.pinTrigger?e.form.find(".pin-input").show():e.form.find(".pin-input").hide()}))}return(e,a){var n=this,t={message:'<div class="message"></div>',result:'<div class="balance-checker__result"><h3>Here\'s your Balance:</h3><div class="balance-amount"></div><div class="balance-expiration" style="display: none;"></div><div class="card-number">Gift card ending in ...<span></span></div><div class="check-another"><a href="#">Check another gift card</a></div></div>'};"message"==e&&null===this.message?this.message=$(t.message):"result"==e&&null===this.result&&(this.result=$(t.result));for(let[a]of Object.entries(t))null!==this[a]&&a!=e&&this[a].stop().animate({opacity:0}
1,400,(function(){$(this).remove()}));"message"==e&&"string"==typeof a?this.message.text(a).addClass("error"):"result"==e&&"object"==typeof a&&(this.form.css("height",this.form.find(".balance-checker__inner").outerHeight()),this.form.find(".balance-checker__inner").animate({opacity:0},400,(function(){$(this).hide()})),this.result.find(".balance-amount").text(a.balance_nice),this.result.find(".card-number span").text(a.last_four),void 0!==a.expiration&&this.result.find(".balance-expiration").show().text(a.expiration?"Promotional Gift Card Expiration Date: "+a.expiration:"")),n[e].css("opacity",0).prependTo(n.form).animate({opacity:1},400),null!==this.result&&this.result.find(".check-another a").click((function(){return n.result.animate({opacity:0},400,(function(){$(this).remove(),n.form.is("form")?n.form[0].reset():n.form.find("input").val(""),n.form.find(".pin-input").hide(),n.form.find(".balance-checker__inner").show().animate({opacity:1},400,(function(){n.form.css("height","")}))})),!1}))}}$((function(){$(".balance-checker").each((function(){new BalanceChecker($(this))}))}));
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.