(()=>{functione(t){returne="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},e(t)}functiont(t,r){for(varn=0;n<r.length;n++){vara=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"ina&&(a.writable=!0),Object.defineProperty(t,(o=a.key,d=void0,d=function(t,r){if("object"!==e(t)||null===t)returnt;varn=t[Symbol.toPrimitive];if(void0!==n){vara=n.call(t,r||"default");if("object"!==e(a))returna;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===e(d)?d:String(d)),a)}varo,d}varr=function(){functione(t,r){!function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,e),this.publicKey=t,this.loginId=r,this.cardHolderName=document.getElementById("cardholder_name"),this.cardButton=document.getElementById("card_button")}varr,n,a;returnr=e,(n=[{key:"handleAuthorization",value:function(){vare=$("#my-card"),t={};t.clientKey=this.publicKey,t.apiLoginID=this.loginId;varr={};r.cardNumber=e.CardJs("cardNumber").replace(/[^\d]/g,""),r.month=e.CardJs("expiryMonth").replace(/[^\d]/g,""),r.year=e.CardJs("expiryYear").replace(/[^\d]/g,""),r.cardCode=document.getElementById("cvv").value.replace(/[^\d]/g,"");varn={};returnn.authData=t,n.cardData=r,document.getElementById("card_button").disabled=!0,document.querySelector("#card_button > svg").classList.remove("hidden"),document.querySelector("#card_button > span").classList.add("hidden"),Accept.dispatchData(n,this.responseHandler),!1}},{key:"responseHandler",value:function(e){return"Error"===e.messages.resultCode?($("#errors").show().html("<p>"+e.messages.message[0].code+": "+e.messages.message[0].text+"</p>"),document.getElementById("card_button").disabled=!1,document.querySelector("#card_button > svg").classList.add("hidden"),document.querySelector("#card_button > span").classList.remove("hidden")):"Ok"===e.messages.resultCode&&(document.getElementById("dataDescriptor").value=e.opaqueData.dataDescriptor,document.getElementById("dataValue").value=e.opaqueData.dataValue,document.getElementById("server_response").submit()),!1}},{key:"handle",value:function(){vare=this;returnthis.cardButton.addEventListener("click",(function(){e.cardButton.disabled=!e.cardButton.disabled,e.handleAuthorization()})),this}}])&&t(r.prototype,n),a&&t(r,a),Object.defineProperty(r,"prototype",{writable:!1}),e}();newr(document.querySelector('meta[name="authorize-public-key"]').content,document.querySelector('meta[name="authorize-login-id"]').content).handle()})();