!function(t,e){for(var r in e)t[r]=e[r]}(window,function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=14)}([function(t,e,r){t.exports=r(8)},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,c,"next",t)}function c(t){r(a,o,i,s,c,"throw",t)}s(void 0)}))}}},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e){function r(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rn({exact:!0}).test(t);o.v4=t=>n.v4({exact:!0}).test(t),o.v6=t=>n.v6({exact:!0}).test(t),o.version=t=>o(t)?o.v4(t)?4:6:void 0,t.exports=o},function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return A()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=y(a,r);if(s){if(s===u)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var h=c(t,e,r);if("normal"===h.type){if(n=r.done?"completed":"suspendedYield",h.arg===u)continue;return{value:h.arg,done:r.done}}"throw"===h.type&&(n="completed",r.method="throw",r.arg=h.arg)}}}(t,r,a),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var u={};function h(){}function l(){}function f(){}var p={};p[o]=function(){return this};var d=Object.getPrototypeOf,m=d&&d(d(I([])));m&&m!==e&&r.call(m,o)&&(p=m);var v=f.prototype=h.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function x(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,s){var u=c(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function y(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,y(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,u;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function I(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){var n=r(5);t.exports=function(t){if(Array.isArray(t))return n(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e,r){var n=r(5);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){"use strict";const n=t=>t&&t.includeBoundaries?"(?:(?<=\\s|^)(?=[a-fA-F\\d:])|(?<=[a-fA-F\\d:])(?=\\s|$))":"",o="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",i="[a-fA-F\\d]{1,4}",a=`\n(?:\n(?:${i}:){7}(?:${i}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${i}:){6}(?:${o}|:${i}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${i}:){5}(?::${o}|(?::${i}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${i}:){4}(?:(?::${i}){0,1}:${o}|(?::${i}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${i}:){3}(?:(?::${i}){0,2}:${o}|(?::${i}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${i}:){2}(?:(?::${i}){0,3}:${o}|(?::${i}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${i}:){1}(?:(?::${i}){0,4}:${o}|(?::${i}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${i}){0,5}:${o}|(?::${i}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),s=new RegExp(`(?:^${o}$)|(?:^${a}$)`),c=new RegExp(`^${o}$`),u=new RegExp(`^${a}$`),h=t=>t&&t.exact?s:new RegExp(`(?:${n(t)}${o}${n(t)})|(?:${n(t)}${a}${n(t)})`,"g");h.v4=t=>t&&t.exact?c:new RegExp(`${n(t)}${o}${n(t)}`,"g"),h.v6=t=>t&&t.exact?u:new RegExp(`${n(t)}${a}${n(t)}`,"g"),t.exports=h},function(t,e,r){"use strict";r.r(e),r.d(e,"process",(function(){return gt})),r.d(e,"getSignature",(function(){return yt})),r.d(e,"cancel",(function(){return bt}));var n=r(0),o=r.n(n),i=r(2),a=r.n(i),s=r(3),c=r.n(s),u=r(1),h=r.n(u),l=r(4),f=r.n(l),p=r(6),d=r.n(p),m="",v="";function g(t){if("string"==typeof t)return(new TextDecoder).decode(g("string"!=typeof(e=t)?null:(new TextEncoder).encode(e)));var e;if(t.length<0)return t;var r=[2];r.push.apply(r,d()(t)),r.push(3);var n=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=0,o=e;o-1))if("0,65535"===n[o]){var i=new O(n[o+1]);r.moveTo(i.x-1,i.y-1)}else{var a=new O(n[o]);r.lineTo(a.x,a.y)}return r.stroke(),e.toDataURL("image/png").replace("data:image/png;base64,","")}}]),t}(),O=function t(e){h()(this,t),c()(this,"x",0),c()(this,"y",0),e.indexOf(",")>=0&&(this.x=e.split(",")[0],this.y=e.split(",")[1])},D="cc:sale",N="cc:credit",j="cc:authonly",P="cc:capture",_="cc:postauth",M="cc:void",B="cc:voidrelease",F="cc:voidrefund",U="cc:balance",G="ebtfs:sale",H="ebtfs:credit",Z="ebtfs:balance",Y="ebtcb:sale",z="ebtcb:balance",W="gift:redeem",q="gift:issue",J="gift:balance";function V(t){var e,r,n,o,i,a,s,c,u,h,l,f,p,d,y=function(t,e){var r=t.xCommand;if(r.toLowerCase().indexOf("cc")>=0)return e?"T02":"T00";if(r.toLowerCase().indexOf("ebt")>=0)return"T04";if(r.toLowerCase().indexOf("gift")>=0)return"T06";throw new Error("Unsupported command: "+r)}(t),w=function(t){var e=t.xCommand;switch(e){case D:case G:case Y:case W:return"01";case N:case H:return"02";case j:return"03";case P:return"04";case _:return"05";case q:return"10";case M:case B:case F:return"16";case U:case Z:case z:case J:return"23"}throw new Error("Unsupported command: "+e)}(t),b=[y,"1.28",w,function(t,e){var r=t.xAmount,n=t.xTax;switch(e){case"01":case"04":case"05":return[Q(r),"","","",Q(n)].join(v);case"03":case"02":case"06":case"10":return Q(r);case"16":case"18":case"19":case"20":case"21":case"23":case"24":default:return""}}(t,w),(r=(e=t).xExp,n=e.xCommand,o=e.xAllowDuplicate,i=e.xBillFirstName,a=e.xBillLastName,s=e.xCity,c=e.xEmail,["",r,"",K(n),"",o?1:"",i,a,"","",s,c].join(v)),(h=(u=t).xInvoice,l=u.xRefnum,f=u.xZip,p=u.xStreet,[l,h,"","",(d=new Date,"".concat(d.getFullYear()).concat(x(d.getMonth()+1,2)).concat(x(d.getDate(),2)).concat(x(d.getHours(),2)).concat(x(d.getMinutes(),2)).concat(x(d.getSeconds(),2))),"","",f,p,"",""].join(v))];return["T00","T06"].includes(y)?b.push(function(t,e){var r=t.xZip,n=t.xStreet,o=function(t){return function(t){return["01","03","10"].includes(t)}(t)}(e);return[o?r:"",o?n:""].join(v)}(t,w)+m+m+m+m):b.push(""),g(b.join(m))}function K(t){if(t.toLowerCase().indexOf("ebt")<0)return"";if(t.toLowerCase().indexOf("ebtfs")>=0)return"F";if(t.toLowerCase().indexOf("ebtcb")>=0)return"C";throw new Error("Unsupported EBT Type: "+t)}function Q(t){return Math.round(100*t)}var X=function t(e){h()(this,t),c()(this,"hostInformation",{}),c()(this,"amountInformation",{}),c()(this,"accountInformation",{}),c()(this,"traceInformation",{}),c()(this,"avsInformation",{});var r=(e=e.substr(0,e.length-2)).split(m);r.length<1||(this.status=r[0].trim(),r.length<2||(this.command=r[1].trim(),r.length<4||(this.responseCode=r[3].trim(),r.length<5||(this.responseMessage=r[4].trim(),r.length<6||(this.hostInformation=new tt(r[5].trim()),r.length<7||(this.transactionType=r[6].trim(),r.length<8||(this.amountInformation=new et(r[7].trim()),r.length<9||(this.accountInformation=new rt(r[8].trim()),r.length<10||(this.traceInformation=new nt(r[9].trim()),r.length<11||(this.avsInformation=new ot(r[10].trim()),r.length<14||(this.additionalInformation=r[13].trim())))))))))))},tt=function t(e){h()(this,t);var r=e.split(v);r.length<1||(this.hostResponseCode=r[0].trim(),r.length<2||(this.hostResponseMessage=r[1].trim(),r.length<3||(this.authCode=r[2].trim(),r.length<4||(this.hostReferenceNumber=r[3].trim(),r.length<5||(this.traceNumber=r[4].trim(),r.length<6||(this.batchNumber=r[5].trim(),r.length<7||(this.transactionIdentifier=r[6].trim(),r.length<8||(this.gatewayTransactionID=r[7].trim()))))))))},et=function t(e){h()(this,t);var r=e.split(v);r.length<1||(this.approveAmount=r[0].trim(),r.length<2||(this.amountDue=r[1].trim(),r.length<3||(this.tipAmount=r[2].trim(),r.length<4||(this.cashbackAmount=r[3].trim(),r.length<5||(this.fee=r[4].trim(),r.length<6||(this.taxAmount=r[5].trim(),r.length<7||(this.balance1=r[6].trim(),r.length<8||(this.balance2=r[7].trim(),r.length<9||(this.serviceFee=r[8].trim())))))))))},rt=function t(e){h()(this,t);var r=e.split(v);r.length<1||(this.account=r[0].trim(),r.length<2||(this.entryMode=r[1].trim(),r.length<3||(this.expDate=r[2].trim(),r.length<7||(this.cardType=r[6].trim(),r.length<8||(this.cardHolder=r[7].trim())))))},nt=function t(e){h()(this,t);var r=e.split(v);r.length<1||(this.transactionNumber=r[0].trim(),r.length<2||(this.referenceNumber=r[1].trim(),r.length<3||(this.timeStamp=r[2].trim(),r.length<4||(this.invoiceNumber=r[3].trim()))))},ot=function t(e){h()(this,t);var r=e.split(v);r.length<1||(this.approvalCode=r[0].trim(),r.length<2||(this.message=r[1].trim(),r.length<3||(this.zipCode=r[2].trim(),r.length<4||(this.address1=r[3].trim(),r.length<5||(this.approvalCode=r[4].trim())))))};function it(t,e){return"000000"!==e.responseCode?{xResult:at(e),xStatus:st(e),xError:ct(e)}:{xResult:"A",xStatus:"Approved",xAuthCode:e.hostInformation.authCode,xCommand:t.xCommand,xAuthAmount:(e.amountInformation.approveAmount||0)/100,xRefNum:e.hostInformation.hostReferenceNumber,xBatch:e.hostInformation.batchNumber,xAvsResult:e.avsInformation.message,xAvsResultCode:e.avsInformation.approvalCode,xMaskedCardNumber:e.accountInformation.account,xName:e.accountInformation.cardHolder,xRemainingBalance:(e.amountInformation.balance1||0)/100,xRemainingBalanceEBTCB:t.xCommand.startsWith("ebt")?(e.amountInformation.balance1||0)/100:"",xRemainingBalanceEBTFS:t.xCommand.startsWith("ebt")?(e.amountInformation.balance2||0)/100:"",xConvenienceFee:(e.amountInformation.serviceFee||0)/100,xCashbackAmount:(e.amountInformation.cashbackAmount||0)/100,xTip:(e.amountInformation.tipAmount||0)/100,xExp:e.accountInformation.expDate,xInvoice:e.traceInformation.invoiceNumber,xCardType:ut(e.accountInformation.cardType)}}function at(t){switch(t.responseCode){case"000000":return"A";case"000100":case"100011":return"D";default:return"E"}}function st(t){switch(t.responseCode){case"000000":return"Approved";case"000100":case"100011":return"Declined";default:return"Error"}}function ct(t){var e=t.responseCode,r=t.hostInformation,n=t.responseMessage;return"000000"===e?"":(null==r?void 0:r.hostResponseCode)&&"0"!==(null==r?void 0:r.hostResponseCode)&&(null==r?void 0:r.hostResponseMessage)||n}function ut(t){switch(t=Number.parseInt(t)){case 1:return $;case 2:return S;case 3:return C;case 4:return k;case 5:return L;case 7:return R;default:return A}}var ht=function(){function t(e){h()(this,t),this.ipDeviceCommunicator=e}var e;return f()(t,[{key:"process",value:(e=a()(o.a.mark((function t(e){var r,n,i;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.validate(e),r=V(e),t.next=5,this.ipDeviceCommunicator.getData(btoa(r));case 5:return n=t.sent,i=new X(n),t.abrupt("return",it(e,i));case 10:return t.prev=10,t.t0=t.catch(0),t.abrupt("return",{xResult:"E",xStatus:"Error",xError:t.t0.toString()});case 13:case"end":return t.stop()}}),t,this,[[0,10]])}))),function(t){return e.apply(this,arguments)})},{key:"validate",value:function(t){t.xInvoice=t.xInvoice||"",t.xStreet=t.xStreet||"",t.xZip=t.xZip||"",t.xTip=t.xTip||"",t.xTax=t.xTax||"",t.xExp=t.xExp||"",t.xAllowDuplicate=!!t.xAllowDuplicate,t.xBillFirstName=t.xBillFirstName||"",t.xBillLastName=t.xBillLastName||"",t.xCity=t.xCity||"",t.xEmail=t.xEmail||"",t.xRefnum=t.xRefnum||0}}]),t}(),lt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h()(this,t),this.signatureReader=e.signatureReader,this.cardReader=e.cardReader}var e,r;return f()(t,[{key:"getSignature",value:(r=a()(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.signatureReader.getSignature());case 1:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"process",value:(e=a()(o.a.mark((function t(e){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.cardReader.process(e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),t}(),ft="",pt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(h()(this,t),e.deviceIpAddress)ft=e.deviceIpAddress;else if(!e.deviceSerialNumber)throw new Error("Device serial number required");this.serialNumber=e.deviceSerialNumber}return f()(t,[{key:"getIP",value:function(){return ft}}]),t}(),dt=r(7),mt=r.n(dt),vt=function(){function t(e,r,n){var i,s=this;h()(this,t),c()(this,"getData",function(){var t=a()(o.a.mark((function t(e){var r,n,i;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("".concat(s.protocol,"//").concat(s.ip,":").concat(s.port,"?").concat(e));case 3:if((r=t.sent).ok){t.next=6;break}throw r;case 6:return n=r.body.getReader(),t.next=9,y(n,new Uint8Array);case 9:return i=(i=t.sent)?new TextDecoder("utf-8").decode(i):"",t.abrupt("return",i);case 14:throw t.prev=14,t.t0=t.catch(0),console.error(t.t0),t.t0;case 18:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(e){return t.apply(this,arguments)}}()),c()(this,"tryRegisterIp",a()(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s.isHttps){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,fetch("/",{body:"ip=".concat(s._ip),method:"POST",mode:"no-cors",headers:{"Content-Type":"application/x-www-form-urlencoded"}});case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))),this._ip=e,this.port=r,":"!==(i=n).charAt(i.length-1)&&(n+=":"),this.protocol=n}return f()(t,[{key:"ip",get:function(){return this.isHttps&&mt.a.v4(this._ip)?"ip-".concat(this._ip.replaceAll(".","-"),".mylocaldevice.com"):this._ip}},{key:"isHttps",get:function(){return"https:"===this.protocol}}]),t}();function gt(t){return xt.apply(this,arguments)}function xt(){return(xt=a()(o.a.mark((function t(e){var r,n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=new pt(e.settings),n=new lt({cardReader:new ht(new vt(r.getIP(),e.settings.deviceIpPort,e.settings.deviceIpProtocol||location.protocol))}),It(e.settings.deviceIpAddress,n),t.next=6,n.process(e);case 6:return t.abrupt("return",t.sent);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",{xResult:"E",xStatus:"Error",xError:t.t0.toString()});case 12:return t.prev=12,Et[e.settings.deviceIpAddress]=void 0,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))).apply(this,arguments)}function yt(t){return wt.apply(this,arguments)}function wt(){return(wt=a()(o.a.mark((function t(e){var r,n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=new pt(e),n=new lt({signatureReader:new T(new vt(r.getIP(),e.deviceIpPort,e.deviceIpProtocol||location.protocol))}),It(e.deviceIpAddress,n),t.next=6,n.getSignature();case 6:return t.abrupt("return",t.sent);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",{xResult:"E",xStatus:"Error",xError:t.t0.toString()});case 12:return t.prev=12,Et[e.deviceIpAddress]=void 0,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))).apply(this,arguments)}function bt(t){try{var e=new pt(t);(new lt).cancel(new vt(e.getIP(),t.deviceIpPort,"http"))}catch(t){throw console.error(t),t}}var Et={};function It(t,e){if(Et[t])throw"Transaction in progress";Et[t]=e}}]));