From 2dd8599720b71e4128e8643839377ce5709954b0 Mon Sep 17 00:00:00 2001 From: Gonzalo De Spirito Date: Tue, 29 Sep 2020 17:49:43 -0300 Subject: [PATCH] Add callback to status messages on sale --- dist/pos.js | 11 ++++++++++- dist/pos.js.map | 2 +- package-lock.json | 2 +- package.json | 1 + src/pos.js | 23 +++++++++++------------ 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/dist/pos.js b/dist/pos.js index 1f2af3c..2a21bbf 100644 --- a/dist/pos.js +++ b/dist/pos.js @@ -1,2 +1,11 @@ -window.Transbank=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=155)}([function(t,n,e){var r=e(2),o=e(9),i=e(17),s=e(14),u=e(21),a=function(t,n,e){var c,f,l,h,p=t&a.F,d=t&a.G,v=t&a.S,y=t&a.P,g=t&a.B,m=d?r:v?r[n]||(r[n]={}):(r[n]||{}).prototype,b=d?o:o[n]||(o[n]={}),w=b.prototype||(b.prototype={});for(c in d&&(e=n),e)l=((f=!p&&m&&void 0!==m[c])?m:e)[c],h=g&&f?u(l,r):y&&"function"==typeof l?u(Function.call,l):l,m&&s(m,c,l,t&a.U),b[c]!=l&&i(b,c,h),y&&w[c]!=l&&(w[c]=l)};r.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,n){"function"==typeof Object.create?t.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,n){if(n){t.super_=n;var e=function(){};e.prototype=n.prototype,t.prototype=new e,t.prototype.constructor=t}}},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(59)("wks"),o=e(35),i=e(2).Symbol,s="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=s&&i[t]||(s?i:o)("Symbol."+t))}).store=r},function(t,n,e){var r=e(23),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n){var e=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=e)},function(t,n,e){t.exports=!e(3)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(4),o=e(105),i=e(31),s=Object.defineProperty;n.f=e(10)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return s(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(28);t.exports=function(t){return Object(r(t))}},function(t,n,e){"use strict";var r=e(1),o=e(140);function i(){o.call(this)}r(i,o),i.prototype.removeAllListeners=function(t){t?delete this._listeners[t]:this._listeners={}},i.prototype.once=function(t,n){var e=this,r=!1;this.on(t,(function o(){e.removeListener(t,o),r||(r=!0,n.apply(this,arguments))}))},i.prototype.emit=function(){var t=arguments[0],n=this._listeners[t];if(n){for(var e=arguments.length,r=new Array(e-1),o=1;o"+o+""};t.exports=function(t,n){var e={};e[t]=n(u),r(r.P+r.F*o((function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3})),"String",e)}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(11),o=e(34);t.exports=e(10)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(52),o=e(28);t.exports=function(t){return r(o(t))}},function(t,n,e){"use strict";var r=e(139);t.exports={getOrigin:function(t){if(!t)return null;var n=new r(t);if("file:"===n.protocol)return null;var e=n.port;return e||(e="https:"===n.protocol?"443":"80"),n.protocol+"//"+n.hostname+":"+e},isOriginEqual:function(t,n){var e=this.getOrigin(t)===this.getOrigin(n);return e},isSchemeEqual:function(t,n){return t.split(":")[0]===n.split(":")[0]},addPath:function(t,n){var e=t.split("?");return e[0]+n+(e[1]?"?"+e[1]:"")},addQuery:function(t,n){return t+(-1===t.indexOf("?")?"?"+n:"&"+n)}}},function(t,n,e){"use strict";var r=e(3);t.exports=function(t,n){return!!t&&r((function(){n?t.call(null,(function(){}),1):t.call(null)}))}},function(t,n,e){var r=e(22);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){var r=e(53),o=e(34),i=e(18),s=e(31),u=e(16),a=e(105),c=Object.getOwnPropertyDescriptor;n.f=e(10)?c:function(t,n){if(t=i(t),n=s(n,!0),a)try{return c(t,n)}catch(t){}if(u(t,n))return o(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(0),o=e(9),i=e(3);t.exports=function(t,n){var e=(o.Object||{})[t]||Object[t],s={};s[t]=n(e),r(r.S+r.F*i((function(){e(1)})),"Object",s)}},function(t,n,e){var r=e(21),o=e(52),i=e(12),s=e(7),u=e(121);t.exports=function(t,n){var e=1==t,a=2==t,c=3==t,f=4==t,l=6==t,h=5==t||l,p=n||u;return function(n,u,d){for(var v,y,g=i(n),m=o(g),b=r(u,d,3),w=s(m.length),x=0,S=e?p(n,w):a?p(n,0):void 0;w>x;x++)if((h||x in m)&&(y=b(v=m[x],x,g),t))if(e)S[x]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:S.push(v)}else if(f)return!1;return l?-1:c||f?f:S}}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){"use strict";if(e(10)){var r=e(36),o=e(2),i=e(3),s=e(0),u=e(70),a=e(97),c=e(21),f=e(48),l=e(34),h=e(17),p=e(49),d=e(23),v=e(7),y=e(132),g=e(38),m=e(31),b=e(16),w=e(54),x=e(5),S=e(12),_=e(89),E=e(39),O=e(41),T=e(40).f,j=e(91),k=e(35),P=e(6),N=e(26),A=e(60),I=e(55),C=e(93),F=e(46),M=e(63),R=e(47),L=e(92),U=e(123),D=e(11),W=e(24),B=D.f,G=W.f,V=o.RangeError,q=o.TypeError,z=o.Uint8Array,J=Array.prototype,H=a.ArrayBuffer,K=a.DataView,$=N(0),X=N(2),Y=N(3),Q=N(4),Z=N(5),tt=N(6),nt=A(!0),et=A(!1),rt=C.values,ot=C.keys,it=C.entries,st=J.lastIndexOf,ut=J.reduce,at=J.reduceRight,ct=J.join,ft=J.sort,lt=J.slice,ht=J.toString,pt=J.toLocaleString,dt=P("iterator"),vt=P("toStringTag"),yt=k("typed_constructor"),gt=k("def_constructor"),mt=u.CONSTR,bt=u.TYPED,wt=u.VIEW,xt=N(1,(function(t,n){return Tt(I(t,t[gt]),n)})),St=i((function(){return 1===new z(new Uint16Array([1]).buffer)[0]})),_t=!!z&&!!z.prototype.set&&i((function(){new z(1).set({})})),Et=function(t,n){var e=d(t);if(e<0||e%n)throw V("Wrong offset!");return e},Ot=function(t){if(x(t)&&bt in t)return t;throw q(t+" is not a typed array!")},Tt=function(t,n){if(!x(t)||!(yt in t))throw q("It is not a typed array constructor!");return new t(n)},jt=function(t,n){return kt(I(t,t[gt]),n)},kt=function(t,n){for(var e=0,r=n.length,o=Tt(t,r);r>e;)o[e]=n[e++];return o},Pt=function(t,n,e){B(t,n,{get:function(){return this._d[e]}})},Nt=function(t){var n,e,r,o,i,s,u=S(t),a=arguments.length,f=a>1?arguments[1]:void 0,l=void 0!==f,h=j(u);if(null!=h&&!_(h)){for(s=h.call(u),r=[],n=0;!(i=s.next()).done;n++)r.push(i.value);u=r}for(l&&a>2&&(f=c(f,arguments[2],2)),n=0,e=v(u.length),o=Tt(this,e);e>n;n++)o[n]=l?f(u[n],n):u[n];return o},At=function(){for(var t=0,n=arguments.length,e=Tt(this,n);n>t;)e[t]=arguments[t++];return e},It=!!z&&i((function(){pt.call(new z(1))})),Ct=function(){return pt.apply(It?lt.call(Ot(this)):Ot(this),arguments)},Ft={copyWithin:function(t,n){return U.call(Ot(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return Q(Ot(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return L.apply(Ot(this),arguments)},filter:function(t){return jt(this,X(Ot(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Z(Ot(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){$(Ot(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return et(Ot(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Ot(this),arguments)},lastIndexOf:function(t){return st.apply(Ot(this),arguments)},map:function(t){return xt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ut.apply(Ot(this),arguments)},reduceRight:function(t){return at.apply(Ot(this),arguments)},reverse:function(){for(var t,n=Ot(this).length,e=Math.floor(n/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return ft.call(Ot(this),t)},subarray:function(t,n){var e=Ot(this),r=e.length,o=g(t,r);return new(I(e,e[gt]))(e.buffer,e.byteOffset+o*e.BYTES_PER_ELEMENT,v((void 0===n?r:g(n,r))-o))}},Mt=function(t,n){return jt(this,lt.call(Ot(this),t,n))},Rt=function(t){Ot(this);var n=Et(arguments[1],1),e=this.length,r=S(t),o=v(r.length),i=0;if(o+n>e)throw V("Wrong length!");for(;i255?255:255&r),o.v[p](e*n+o.o,r,St)}(this,e,t)},enumerable:!0})};b?(d=e((function(t,e,r,o){f(t,d,c,"_d");var i,s,u,a,l=0,p=0;if(x(e)){if(!(e instanceof H||"ArrayBuffer"==(a=w(e))||"SharedArrayBuffer"==a))return bt in e?kt(d,e):Nt.call(d,e);i=e,p=Et(r,n);var g=e.byteLength;if(void 0===o){if(g%n)throw V("Wrong length!");if((s=g-p)<0)throw V("Wrong length!")}else if((s=v(o)*n)+p>g)throw V("Wrong length!");u=s/n}else u=y(e),i=new H(s=u*n);for(h(t,"_d",{b:i,o:p,l:s,e:u,v:new K(i)});l1)))/4)-f((t-1901+n)/100)+f((t-1601+n)/400)};n=function(t){for(o=f(t/864e5),e=f(o/365.2425)+1970-1;p(e+1,0)<=o;e++);for(r=f((o-p(e,0))/30.42);p(e,r+1)<=o;r++);o=1+o-p(e,r),s=f((i=(t%864e5+864e5)%864e5)/36e5)%24,u=f(i/6e4)%60,a=f(i/1e3)%60,c=i%1e3}}return(_=function(t){return t>-1/0&&t<1/0?(n(t),t=(e<=0||e>=1e4?(e<0?"-":"+")+S(6,e<0?-e:e):S(4,e))+"-"+S(2,r+1)+"-"+S(2,o)+"T"+S(2,s)+":"+S(2,u)+":"+S(2,a)+"."+S(3,c)+"Z",e=r=o=s=u=a=c=null):t=null,t})(t)};if(m("json-stringify")&&!m("date-serialization")){function E(t){return _(this)}var O=n.stringify;n.stringify=function(t,n,e){var r=i.prototype.toJSON;i.prototype.toJSON=E;var o=O(t,n,e);return i.prototype.toJSON=r,o}}else{var T=function(t){var n=t.charCodeAt(0),e=x[n];return e||"\\u00"+S(2,n.toString(16))},j=/[\x00-\x1f\x22\x5c]/g,k=function(t){return j.lastIndex=0,'"'+(j.test(t)?t.replace(j,T):t)+'"'},P=function(t,n,e,r,o,s,u){var a,f,l,h,p,v,g,m,b;if(y((function(){a=n[t]})),"object"==typeof a&&a&&(a.getUTCFullYear&&"[object Date]"==d.call(a)&&a.toJSON===i.prototype.toJSON?a=_(a):"function"==typeof a.toJSON&&(a=a.toJSON(t))),e&&(a=e.call(n,t,a)),null==a)return void 0===a?a:"null";switch("object"==(f=typeof a)&&(l=d.call(a)),l||f){case"boolean":case"[object Boolean]":return""+a;case"number":case"[object Number]":return a>-1/0&&a<1/0?""+a:"null";case"string":case"[object String]":return k(""+a)}if("object"==typeof a){for(g=u.length;g--;)if(u[g]===a)throw c();if(u.push(a),h=[],m=s,s+=o,"[object Array]"==l){for(v=0,g=a.length;v0)for(e>10&&(e=10),r="";r.length=48&&o<=57||o>=97&&o<=102||o>=65&&o<=70||F();t+=I("0x"+i.slice(n,N));break;default:F()}else{if(34==o)break;for(o=i.charCodeAt(N),n=N;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++N);t+=i.slice(n,N)}if(34==i.charCodeAt(N))return N++,t;F();default:if(n=N,45==o&&(r=!0,o=i.charCodeAt(++N)),o>=48&&o<=57){for(48==o&&((o=i.charCodeAt(N+1))>=48&&o<=57)&&F(),r=!1;N=48&&o<=57);N++);if(46==i.charCodeAt(N)){for(e=++N;e57);e++);e==N&&F(),N=e}if(101==(o=i.charCodeAt(N))||69==o){for(43!=(o=i.charCodeAt(++N))&&45!=o||N++,e=N;e57);e++);e==N&&F(),N=e}return+i.slice(n,N)}r&&F();var u=i.slice(N,N+4);if("true"==u)return N+=4,!0;if("fals"==u&&101==i.charCodeAt(N+4))return N+=5,!1;if("null"==u)return N+=4,null;F()}return"$"},R=function(t){var n,e;if("$"==t&&F(),"string"==typeof t){if("@"==(b?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(n=[];"]"!=(t=M());)e?","==t?"]"==(t=M())&&F():F():e=!0,","==t&&F(),n.push(R(t));return n}if("{"==t){for(n={};"}"!=(t=M());)e?","==t?"}"==(t=M())&&F():F():e=!0,","!=t&&"string"==typeof t&&"@"==(b?t.charAt(0):t[0])&&":"==M()||F(),n[t.slice(1)]=R(M());return n}F()}return t},L=function(t,n,e){var r=U(t,n,e);void 0===r?delete t[n]:t[n]=r},U=function(t,n,e){var r,o=t[n];if("object"==typeof o&&o)if("[object Array]"==d.call(o))for(r=o.length;r--;)L(d,w,o);else w(o,(function(t){L(o,t,e)}));return e.call(t,n,o)};n.parse=function(t,n){var e,r;return N=0,A=""+t,e=R(M()),"$"!=M()&&F(),N=A=null,n&&"[object Function]"==d.call(n)?U(((r={})[""]=e,r),"",n):e}}}return n.runInContext=f,n}if(!c||c.global!==c&&c.window!==c&&c.self!==c||(a=c),u&&!i)f(a,u);else{var l=a.JSON,h=a.JSON3,p=!1,d=f(a,a.JSON3={noConflict:function(){return p||(p=!0,a.JSON=l,a.JSON3=h,l=h=null),d}});a.JSON={parse:d.parse,stringify:d.stringify}}i&&(void 0===(o=function(){return d}.call(n,e,n,t))||(t.exports=o))}).call(this)}).call(this,e(358)(t),e(8))},function(t,n,e){var r=e(5);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){var r=e(35)("meta"),o=e(5),i=e(16),s=e(11).f,u=0,a=Object.isExtensible||function(){return!0},c=!e(3)((function(){return a(Object.preventExtensions({}))})),f=function(t){s(t,r,{value:{i:"O"+ ++u,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!a(t))return"F";if(!n)return"E";f(t)}return t[r].i},getWeak:function(t,n){if(!i(t,r)){if(!a(t))return!0;if(!n)return!1;f(t)}return t[r].w},onFreeze:function(t){return c&&l.NEED&&a(t)&&!i(t,r)&&f(t),t}}},function(t,n,e){"use strict";(function(n){var r=e(50),o={},i=!1,s=n.chrome&&n.chrome.app&&n.chrome.app.runtime;t.exports={attachEvent:function(t,e){void 0!==n.addEventListener?n.addEventListener(t,e,!1):n.document&&n.attachEvent&&(n.document.attachEvent("on"+t,e),n.attachEvent("on"+t,e))},detachEvent:function(t,e){void 0!==n.addEventListener?n.removeEventListener(t,e,!1):n.document&&n.detachEvent&&(n.document.detachEvent("on"+t,e),n.detachEvent("on"+t,e))},unloadAdd:function(t){if(s)return null;var n=r.string(8);return o[n]=t,i&&setTimeout(this.triggerUnloadCallbacks,0),n},unloadDel:function(t){t in o&&delete o[t]},triggerUnloadCallbacks:function(){for(var t in o)o[t](),delete o[t]}};s||t.exports.attachEvent("unload",(function(){i||(i=!0,t.exports.triggerUnloadCallbacks())}))}).call(this,e(8))},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){t.exports=!1},function(t,n,e){var r=e(107),o=e(76);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){var r=e(23),o=Math.max,i=Math.min;t.exports=function(t,n){return(t=r(t))<0?o(t+n,0):i(t,n)}},function(t,n,e){var r=e(4),o=e(108),i=e(76),s=e(75)("IE_PROTO"),u=function(){},a=function(){var t,n=e(73)("iframe"),r=i.length;for(n.style.display="none",e(77).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("