(()=>{functione(e,n){for(vart=0;t<n.length;t++){vara=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"ina&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}(new(function(){functionn(){!function(e,n){if(!(einstanceofn))thrownewTypeError("Cannot call a class as a function")}(this,n),this.button=document.querySelector("#pay-button")}vart,a,r;returnt=n,(a=[{key:"init",value:function(){this.frames=Frames.init(document.querySelector("meta[name=public-key]").content)}},{key:"handle",value:function(){vare=this;this.init(),Frames.addEventHandler(Frames.Events.CARD_VALIDATION_CHANGED,(function(n){e.button.disabled=!Frames.isCardValid()})),Frames.addEventHandler(Frames.Events.CARD_TOKENIZED,(function(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e),document.getElementById("server_response").submit()})),document.querySelector("#authorization-form").addEventListener("submit",(function(n){e.button.disabled=!0,n.preventDefault(),Frames.submitCard()}))}}])&&e(t.prototype,a),r&&e(t,r),n}())).handle()})();