(()=>{"use strict";const i=class{minField;maxField;constructor(i,t){this.minField=i,this.maxField=t,this.initEvents()}initEvents(){this.minField.on("change",this.validateFields.bind(this)),this.maxField.on("change",this.validateFields.bind(this))}validateFields(){let i=this.parseQuantity(this.minField),t=this.parseQuantity(this.maxField);i=Math.max(0,i),t=Math.max(0,t),t>0&&t<i&&(t=i),this.minField.val(i),this.maxField.val(t)}parseQuantity(i){const t=i.val();return""===t?0:Math.max(0,parseInt(t,10))}};var t;(t=jQuery)(void 0).ready(function(){const a=t("#min_amount_to_order"),e=t("#max_amount_to_order");new i(a,e)})})();