dealposbarcode 1.1.9 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkbarcode_app=self.webpackChunkbarcode_app||[]).push([[269],{9489:(C,s,p)=>{var y=O(p(3413)),m=O(p(7720)),A=O(p(2308)),T=O(p(7095)),t=O(p(4441)),i=O(p(201)),u=O(p(400)),c=p(4779),b=O(p(1452));function O(w){return w&&w.__esModule?w:{default:w}}var Z=function(){},M=function(I,k,R){var x=new Z;if(void 0===I)throw Error("No element to render on was provided.");return x._renderProperties=(0,t.default)(I),x._encodings=[],x._options=b.default,x._errorHandler=new u.default(x),void 0!==k&&((R=R||{}).format||(R.format=Q()),x.options(R)[R.format](k,R).render()),x};for(var N in M.getModule=function(w){return y.default[w]},y.default)y.default.hasOwnProperty(N)&&D(y.default,N);function D(w,I){Z.prototype[I]=Z.prototype[I.toUpperCase()]=Z.prototype[I.toLowerCase()]=function(k,R){var x=this;return x._errorHandler.wrapBarcodeCall(function(){R.text=void 0===R.text?void 0:""+R.text;var L=(0,m.default)(x._options,R);L=(0,i.default)(L);var $=G(k,w[I],L);return x._encodings.push($),x})}}function G(w,I,k){var R=new I(w=""+w,k);if(!R.valid())throw new c.InvalidInputException(R.constructor.name,w);var x=R.encode();x=(0,A.default)(x);for(var L=0;L<x.length;L++)x[L].options=(0,m.default)(k,x[L].options);return x}function Q(){return y.default.CODE128?"CODE128":Object.keys(y.default)[0]}function V(w,I,k){I=(0,A.default)(I);for(var R=0;R<I.length;R++)I[R].options=(0,m.default)(k,I[R].options),(0,T.default)(I[R].options);(0,T.default)(k),new(0,w.renderer)(w.element,I,k).render(),w.afterRender&&w.afterRender()}Z.prototype.options=function(w){return this._options=(0,m.default)(this._options,w),this},Z.prototype.blank=function(w){var I=new Array(w+1).join("0");return this._encodings.push({data:I}),this},Z.prototype.init=function(){var w;if(this._renderProperties)for(var I in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){var k=(0,m.default)(this._options,(w=this._renderProperties[I]).options);"auto"==k.format&&(k.format=Q()),this._errorHandler.wrapBarcodeCall(function(){var L=G(k.value,y.default[k.format.toUpperCase()],k);V(w,L,k)})}},Z.prototype.render=function(){if(!this._renderProperties)throw new c.NoElementException;if(Array.isArray(this._renderProperties))for(var w=0;w<this._renderProperties.length;w++)V(this._renderProperties[w],this._encodings,this._options);else V(this._renderProperties,this._encodings,this._options);return this},Z.prototype._defaults=b.default,"undefined"!=typeof window&&(window.JsBarcode=M),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(w,I){var k=[];return jQuery(this).each(function(){k.push(this)}),M(k,w,I)}),C.exports=M},6615:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=function y(e,m){(function(y,e){if(!(y instanceof e))throw new TypeError("Cannot call a class as a function")})(this,y),this.data=e,this.text=m.text||e,this.options=m}},8901:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),e=(t=p(6615))&&t.__esModule?t:{default:t},m=p(5286),l=function(t){function n(i,r){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);var u=function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i.substring(1),r));return u.bytes=i.split("").map(function(c){return c.charCodeAt(0)}),u}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.bytes,u=r.shift()-105,c=m.SET_BY_CODE[u];if(void 0===c)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&r.unshift(m.FNC1);var d=n.next(r,1,c);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:n.getBar(u)+d.result+n.getBar((d.checksum+u)%m.MODULO)+n.getBar(m.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var r=this.options.ean128||!1;return"string"==typeof r&&(r="true"===r.toLowerCase()),r}}],[{key:"getBar",value:function(r){return m.BARS[r]?m.BARS[r].toString():""}},{key:"correctIndex",value:function(r,u){if(u===m.SET_A){var c=r.shift();return c<32?c+64:c-32}return u===m.SET_B?r.shift()-32:10*(r.shift()-48)+r.shift()-48}},{key:"next",value:function(r,u,c){if(!r.length)return{result:"",checksum:0};var d=void 0,b=void 0;if(r[0]>=200){b=r.shift()-105;var O=m.SWAP[b];void 0!==O?d=n.next(r,u+1,O):((c===m.SET_A||c===m.SET_B)&&b===m.SHIFT&&(r[0]=c===m.SET_A?r[0]>95?r[0]-96:r[0]:r[0]<32?r[0]+96:r[0]),d=n.next(r,u+1,c))}else b=n.correctIndex(r,c),d=n.next(r,u+1,c);return{result:n.getBar(b)+d.result,checksum:b*u+d.checksum}}}]),n}(e.default);s.default=l},972:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),e=(t=p(8901))&&t.__esModule?t:{default:t},m=p(5286),l=function(t){function n(i,r){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,m.A_START_CHAR+i,r))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return new RegExp("^"+m.A_CHARS+"+$").test(this.data)}}]),n}(e.default);s.default=l},399:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),e=(t=p(8901))&&t.__esModule?t:{default:t},m=p(5286),l=function(t){function n(i,r){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,m.B_START_CHAR+i,r))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return new RegExp("^"+m.B_CHARS+"+$").test(this.data)}}]),n}(e.default);s.default=l},8108:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),e=(t=p(8901))&&t.__esModule?t:{default:t},m=p(5286),l=function(t){function n(i,r){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,m.C_START_CHAR+i,r))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return new RegExp("^"+m.C_CHARS+"+$").test(this.data)}}]),n}(e.default);s.default=l},4156:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var y=P(p(8901)),m=P(p(993));function P(t){return t&&t.__esModule?t:{default:t}}function g(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}var l=function(t){function n(i,r){if(function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(i))var u=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,m.default)(i),r));else u=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i,r));return g(u)}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),n}(y.default);s.default=l},993:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var _=p(5286),y=function(T){return T.match(new RegExp("^"+_.A_CHARS+"*"))[0].length},e=function(T){return T.match(new RegExp("^"+_.B_CHARS+"*"))[0].length},m=function(T){return T.match(new RegExp("^"+_.C_CHARS+"*"))[0]};function P(g,T){var l=T?_.A_CHARS:_.B_CHARS,t=g.match(new RegExp("^("+l+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(t)return t[1]+String.fromCharCode(204)+A(g.substring(t[1].length));var n=g.match(new RegExp("^"+l+"+"))[0];return n.length===g.length?g:n+String.fromCharCode(T?205:206)+P(g.substring(n.length),!T)}function A(g){var T=m(g),l=T.length;if(l===g.length)return g;g=g.substring(l);var t=y(g)>=e(g);return T+String.fromCharCode(t?206:205)+P(g,t)}s.default=function(g){var T=void 0;if(m(g).length>=2)T=_.C_START_CHAR+A(g);else{var t=y(g)>e(g);T=(t?_.A_START_CHAR:_.B_START_CHAR)+P(g,t)}return T.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(n,i){return String.fromCharCode(203)+i})}},5286:(C,s)=>{var p;function _(N,D,G){return D in N?Object.defineProperty(N,D,{value:G,enumerable:!0,configurable:!0,writable:!0}):N[D]=G,N}Object.defineProperty(s,"__esModule",{value:!0});var y=s.SET_A=0,e=s.SET_B=1,m=s.SET_C=2,A=(s.SHIFT=98,s.START_A=103),g=s.START_B=104,T=s.START_C=105;s.MODULO=103,s.STOP=106,s.FNC1=207,s.SET_BY_CODE=(_(p={},A,y),_(p,g,e),_(p,T,m),p),s.SWAP={101:y,100:e,99:m},s.A_START_CHAR=String.fromCharCode(208),s.B_START_CHAR=String.fromCharCode(209),s.C_START_CHAR=String.fromCharCode(210),s.A_CHARS="[\0-_\xc8-\xcf]",s.B_CHARS="[ -\x7f\xc8-\xcf]",s.C_CHARS="(\xcf*[0-9]{2}\xcf*)",s.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]},6625:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CODE128C=s.CODE128B=s.CODE128A=s.CODE128=void 0;var y=l(p(4156)),m=l(p(972)),A=l(p(399)),T=l(p(8108));function l(t){return t&&t.__esModule?t:{default:t}}s.CODE128=y.default,s.CODE128A=m.default,s.CODE128B=A.default,s.CODE128C=T.default},8104:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CODE39=void 0;var d,_=function(){function d(b,O){for(var Z=0;Z<O.length;Z++){var M=O[Z];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(b,M.key,M)}}return function(b,O,Z){return O&&d(b.prototype,O),Z&&d(b,Z),b}}(),T=function(d){function b(O,Z){return function(d,b){if(!(d instanceof b))throw new TypeError("Cannot call a class as a function")}(this,b),O=O.toUpperCase(),Z.mod43&&(O+=function(d){return l[d]}(function(d){for(var b=0,O=0;O<d.length;O++)b+=u(d[O]);return b%43}(O))),function(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?d:b}(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,O,Z))}return function(d,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}(b,d),_(b,[{key:"encode",value:function(){for(var Z=n("*"),M=0;M<this.data.length;M++)Z+=n(this.data[M])+"0";return{data:Z+=n("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),b}(((d=p(6615))&&d.__esModule?d:{default:d}).default),l=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],t=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function n(d){return function(d){return t[d].toString(2)}(u(d))}function u(d){return l.indexOf(d)}s.CODE39=T},2679:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var _=function(){function i(r,u){for(var c=0;c<u.length;c++){var d=u[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}return function(r,u,c){return u&&i(r.prototype,u),c&&i(r,c),r}}(),y=p(2998),m=g(p(188));function g(i){return i&&i.__esModule?i:{default:i}}var n=function(i){function r(u,c){!function(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}(this,r);var d=function(i,r){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?i:r}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,u,c));return d.fontSize=!c.flat&&c.fontSize>10*c.width?10*c.width:c.fontSize,d.guardHeight=c.height+d.fontSize/2+c.textMargin,d}return function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r)}(r,i),_(r,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(c,d){return this.text.substr(c,d)}},{key:"leftEncode",value:function(c,d){return(0,m.default)(c,d)}},{key:"rightText",value:function(c,d){return this.text.substr(c,d)}},{key:"rightEncode",value:function(c,d){return(0,m.default)(c,d)}},{key:"encodeGuarded",value:function(){var c={fontSize:this.fontSize},d={height:this.guardHeight};return[{data:y.SIDE_BIN,options:d},{data:this.leftEncode(),text:this.leftText(),options:c},{data:y.MIDDLE_BIN,options:d},{data:this.rightEncode(),text:this.rightText(),options:c},{data:y.SIDE_BIN,options:d}]}},{key:"encodeFlat",value:function(){return{data:[y.SIDE_BIN,this.leftEncode(),y.MIDDLE_BIN,this.rightEncode(),y.SIDE_BIN].join(""),text:this.text}}}]),r}(g(p(6615)).default);s.default=n},7674:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var i,_=function(){function i(r,u){for(var c=0;c<u.length;c++){var d=u[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}return function(r,u,c){return u&&i(r.prototype,u),c&&i(r,c),r}}(),y=function i(r,u,c){null===r&&(r=Function.prototype);var d=Object.getOwnPropertyDescriptor(r,u);if(void 0===d){var b=Object.getPrototypeOf(r);return null===b?void 0:i(b,u,c)}if("value"in d)return d.value;var O=d.get;return void 0===O?void 0:O.call(c)},e=p(2998),P=(i=p(2679))&&i.__esModule?i:{default:i},t=function(r){return(10-r.substr(0,12).split("").map(function(c){return+c}).reduce(function(c,d,b){return b%2?c+3*d:c+d},0)%10)%10},n=function(i){function r(u,c){(function(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")})(this,r),-1!==u.search(/^[0-9]{12}$/)&&(u+=t(u));var d=function(i,r){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?i:r}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,u,c));return d.lastChar=c.lastChar,d}return function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r)}(r,i),_(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===t(this.data)}},{key:"leftText",value:function(){return y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var c=this.data.substr(1,6),d=e.EAN13_STRUCTURE[this.data[0]];return y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"leftEncode",this).call(this,c,d)}},{key:"rightText",value:function(){return y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var c=this.data.substr(7,6);return y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rightEncode",this).call(this,c,"RRRRRR")}},{key:"encodeGuarded",value:function(){var c=y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(c.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(c.push({data:"00"}),c.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),c}}]),r}(P.default);s.default=n},2649:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var _=function(){function i(r,u){for(var c=0;c<u.length;c++){var d=u[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}return function(r,u,c){return u&&i(r.prototype,u),c&&i(r,c),r}}(),y=p(2998),m=g(p(188));function g(i){return i&&i.__esModule?i:{default:i}}var n=function(i){function r(u,c){return function(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}(this,r),function(i,r){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?i:r}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,u,c))}return function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r)}(r,i),_(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var c=y.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,m.default)(this.data,c,"01"),text:this.text}}}]),r}(g(p(6615)).default);s.default=n},639:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var _=function(){function r(u,c){for(var d=0;d<c.length;d++){var b=c[d];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(u,b.key,b)}}return function(u,c,d){return c&&r(u.prototype,c),d&&r(u,d),u}}(),y=p(2998),m=g(p(188));function g(r){return r&&r.__esModule?r:{default:r}}var i=function(r){function u(c,d){return function(r,u){if(!(r instanceof u))throw new TypeError("Cannot call a class as a function")}(this,u),function(r,u){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!u||"object"!=typeof u&&"function"!=typeof u?r:u}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,c,d))}return function(r,u){if("function"!=typeof u&&null!==u)throw new TypeError("Super expression must either be null or a function, not "+typeof u);r.prototype=Object.create(u&&u.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(r,u):r.__proto__=u)}(u,r),_(u,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var d=y.EAN5_STRUCTURE[function(u){return u.split("").map(function(d){return+d}).reduce(function(d,b,O){return O%2?d+9*b:d+3*b},0)%10}(this.data)];return{data:"1011"+(0,m.default)(this.data,d,"01"),text:this.text}}}]),u}(g(p(6615)).default);s.default=i},8036:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var n,_=function(){function n(i,r){for(var u=0;u<r.length;u++){var c=r[u];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,c.key,c)}}return function(i,r,u){return r&&n(i.prototype,r),u&&n(i,u),i}}(),y=function n(i,r,u){null===i&&(i=Function.prototype);var c=Object.getOwnPropertyDescriptor(i,r);if(void 0===c){var d=Object.getPrototypeOf(i);return null===d?void 0:n(d,r,u)}if("value"in c)return c.value;var b=c.get;return void 0===b?void 0:b.call(u)},m=(n=p(2679))&&n.__esModule?n:{default:n},l=function(i){return(10-i.substr(0,7).split("").map(function(u){return+u}).reduce(function(u,c,d){return d%2?u+c:u+3*c},0)%10)%10},t=function(n){function i(r,u){return function(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}(this,i),-1!==r.search(/^[0-9]{7}$/)&&(r+=l(r)),function(n,i){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!i||"object"!=typeof i&&"function"!=typeof i?n:i}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,r,u))}return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Super expression must either be null or a function, not "+typeof i);n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=i)}(i,n),_(i,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===l(this.data)}},{key:"leftText",value:function(){return y(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var u=this.data.substr(0,4);return y(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"leftEncode",this).call(this,u,"LLLL")}},{key:"rightText",value:function(){return y(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var u=this.data.substr(4,4);return y(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"rightEncode",this).call(this,u,"RRRR")}}]),i}(m.default);s.default=t},2589:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var _=function(){function i(r,u){for(var c=0;c<u.length;c++){var d=u[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}return function(r,u,c){return u&&i(r.prototype,u),c&&i(r,c),r}}();s.checksum=n;var e=A(p(188));function A(i){return i&&i.__esModule?i:{default:i}}var t=function(i){function r(u,c){(function(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")})(this,r),-1!==u.search(/^[0-9]{11}$/)&&(u+=n(u));var d=function(i,r){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?i:r}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,u,c));return d.displayValue=c.displayValue,d.fontSize=c.fontSize>10*c.width?10*c.width:c.fontSize,d.guardHeight=c.height+d.fontSize/2+c.textMargin,d}return function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r)}(r,i),_(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==n(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var c="";return c+="101",c+=(0,e.default)(this.data.substr(0,6),"LLLLLL"),c+="01010",c+=(0,e.default)(this.data.substr(6,6),"RRRRRR"),{data:c+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var c=[];return this.displayValue&&c.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),c.push({data:"101"+(0,e.default)(this.data[0],"L"),options:{height:this.guardHeight}}),c.push({data:(0,e.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),c.push({data:"01010",options:{height:this.guardHeight}}),c.push({data:(0,e.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),c.push({data:(0,e.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&c.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),c}}]),r}(A(p(6615)).default);function n(i){var u,r=0;for(u=1;u<11;u+=2)r+=parseInt(i[u]);for(u=0;u<11;u+=2)r+=3*parseInt(i[u]);return(10-r%10)%10}s.default=t},2054:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var _=function(){function c(d,b){for(var O=0;O<b.length;O++){var Z=b[O];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(d,Z.key,Z)}}return function(d,b,O){return b&&c(d.prototype,b),O&&c(d,O),d}}(),e=g(p(188)),P=g(p(6615)),A=p(2589);function g(c){return c&&c.__esModule?c:{default:c}}function l(c,d){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!d||"object"!=typeof d&&"function"!=typeof d?c:d}var n=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],i=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],r=function(c){function d(b,O){!function(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}(this,d);var Z=l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,b,O));if(Z.isValid=!1,-1!==b.search(/^[0-9]{6}$/))Z.middleDigits=b,Z.upcA=u(b,"0"),Z.text=O.text||""+Z.upcA[0]+b+Z.upcA[Z.upcA.length-1],Z.isValid=!0;else{if(-1===b.search(/^[01][0-9]{7}$/))return l(Z);if(Z.middleDigits=b.substring(1,b.length-1),Z.upcA=u(Z.middleDigits,b[0]),Z.upcA[Z.upcA.length-1]!==b[b.length-1])return l(Z);Z.isValid=!0}return Z.displayValue=O.displayValue,Z.fontSize=O.fontSize>10*O.width?10*O.width:O.fontSize,Z.guardHeight=O.height+Z.fontSize/2+O.textMargin,Z}return function(c,d){if("function"!=typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);c.prototype=Object.create(d&&d.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(c,d):c.__proto__=d)}(d,c),_(d,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var O="";return O+="101",O+=this.encodeMiddleDigits(),{data:O+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var O=[];return this.displayValue&&O.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),O.push({data:"101",options:{height:this.guardHeight}}),O.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),O.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&O.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),O}},{key:"encodeMiddleDigits",value:function(){var O=this.upcA[0],M=i[parseInt(this.upcA[this.upcA.length-1])][parseInt(O)];return(0,e.default)(this.middleDigits,M)}}]),d}(P.default);function u(c,d){for(var b=parseInt(c[c.length-1]),O=n[b],Z="",M=0,N=0;N<O.length;N++){var D=O[N];Z+="X"===D?c[M++]:D}return(Z=""+d+Z)+(0,A.checksum)(Z)}s.default=r},2998:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.SIDE_BIN="101",s.MIDDLE_BIN="01010",s.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},s.EAN2_STRUCTURE=["LL","LG","GL","GG"],s.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],s.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},188:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var _=p(2998);s.default=function(m,P,A){var g=m.split("").map(function(l,t){return _.BINARIES[P[t]]}).map(function(l,t){return l?l[m[t]]:""});if(A){var T=m.length-1;g=g.map(function(l,t){return t<T?l+A:l})}return g.join("")}},9214:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.UPCE=s.UPC=s.EAN2=s.EAN5=s.EAN8=s.EAN13=void 0;var y=r(p(7674)),m=r(p(8036)),A=r(p(639)),T=r(p(2649)),t=r(p(2589)),i=r(p(2054));function r(u){return u&&u.__esModule?u:{default:u}}s.EAN13=y.default,s.EAN8=m.default,s.EAN5=A.default,s.EAN2=T.default,s.UPC=t.default,s.UPCE=i.default},6651:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.GenericBarcode=void 0;var l,_=function(){function l(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&l(t.prototype,n),i&&l(t,i),t}}(),T=function(l){function t(n,i){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i))}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),_(t,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),t}(((l=p(6615))&&l.__esModule?l:{default:l}).default);s.GenericBarcode=T},9237:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),y=p(7851);function A(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function g(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}var l=function(t){function n(){return A(this,n),g(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var r=this,u=this.data.match(/.{2}/g).map(function(c){return r.encodePair(c)}).join("");return{data:y.START_BIN+u+y.END_BIN,text:this.text}}},{key:"encodePair",value:function(r){var u=y.BINARIES[r[1]];return y.BINARIES[r[0]].split("").map(function(c,d){return("1"===c?"111":"1")+("1"===u[d]?"000":"0")}).join("")}}]),n}(((t=p(6615))&&t.__esModule?t:{default:t}).default);s.default=l},6701:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),e=(t=p(9237))&&t.__esModule?t:{default:t},T=function(n){var i=n.substr(0,13).split("").map(function(r){return parseInt(r,10)}).reduce(function(r,u,c){return r+u*(3-c%2*2)},0);return 10*Math.ceil(i/10)-i},l=function(t){function n(i,r){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),-1!==i.search(/^[0-9]{13}$/)&&(i+=T(i)),function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i,r))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===T(this.data)}}]),n}(e.default);s.default=l},7851:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.START_BIN="1010",s.END_BIN="11101",s.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},4059:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ITF14=s.ITF=void 0;var y=P(p(9237)),m=P(p(6701));function P(A){return A&&A.__esModule?A:{default:A}}s.ITF=y.default,s.ITF14=m.default},44:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),T=function(t){function n(i,r){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i,r))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"encode",value:function(){for(var r="110",u=0;u<this.data.length;u++){var d=parseInt(this.data[u]).toString(2);d=l(d,4-d.length);for(var b=0;b<d.length;b++)r+="0"==d[b]?"100":"110"}return{data:r+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),n}(((t=p(6615))&&t.__esModule?t:{default:t}).default);function l(t,n){for(var i=0;i<n;i++)t="0"+t;return t}s.default=T},6926:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var l,y=(l=p(44))&&l.__esModule?l:{default:l},e=p(9122),T=function(l){function t(n,i){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n+(0,e.mod10)(n),i))}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),t}(y.default);s.default=T},6375:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var l,y=(l=p(44))&&l.__esModule?l:{default:l},e=p(9122),T=function(l){function t(n,i){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n+=(0,e.mod10)(n),n+=(0,e.mod10)(n),function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i))}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),t}(y.default);s.default=T},2558:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var l,y=(l=p(44))&&l.__esModule?l:{default:l},e=p(9122),T=function(l){function t(n,i){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n+(0,e.mod11)(n),i))}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),t}(y.default);s.default=T},3332:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var l,y=(l=p(44))&&l.__esModule?l:{default:l},e=p(9122),T=function(l){function t(n,i){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n+=(0,e.mod11)(n),n+=(0,e.mod10)(n),function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i))}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),t}(y.default);s.default=T},9122:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.mod10=function(y){for(var e=0,m=0;m<y.length;m++){var P=parseInt(y[m]);e+=(m+y.length)%2==0?P:2*P%10+Math.floor(2*P/10)}return(10-e%10)%10},s.mod11=function(y){for(var e=0,m=[2,3,4,5,6,7],P=0;P<y.length;P++){var A=parseInt(y[y.length-1-P]);e+=m[P%m.length]*A}return(11-e%11)%11}},495:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.MSI1110=s.MSI1010=s.MSI11=s.MSI10=s.MSI=void 0;var y=n(p(44)),m=n(p(6926)),A=n(p(2558)),T=n(p(6375)),t=n(p(3332));function n(i){return i&&i.__esModule?i:{default:i}}s.MSI=y.default,s.MSI10=m.default,s.MSI11=A.default,s.MSI1010=T.default,s.MSI1110=t.default},4162:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.codabar=void 0;var l,_=function(){function l(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&l(t.prototype,n),i&&l(t,i),t}}(),T=function(l){function t(n,i){(function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),0===n.search(/^[0-9\-\$\:\.\+\/]+$/)&&(n="A"+n+"A");var r=function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n.toUpperCase(),i));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),_(t,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var i=[],r=this.getEncodings(),u=0;u<this.data.length;u++)i.push(r[this.data.charAt(u)]),u!==this.data.length-1&&i.push("0");return{text:this.text,data:i.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),t}(((l=p(6615))&&l.__esModule?l:{default:l}).default);s.codabar=T},3413:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var _=p(8104),y=p(6625),e=p(9214),m=p(4059),P=p(495),A=p(3133),g=p(4162),T=p(6651);s.default={CODE39:_.CODE39,CODE128:y.CODE128,CODE128A:y.CODE128A,CODE128B:y.CODE128B,CODE128C:y.CODE128C,EAN13:e.EAN13,EAN8:e.EAN8,EAN5:e.EAN5,EAN2:e.EAN2,UPC:e.UPC,UPCE:e.UPCE,ITF14:m.ITF14,ITF:m.ITF,MSI:P.MSI,MSI10:P.MSI10,MSI11:P.MSI11,MSI1010:P.MSI1010,MSI1110:P.MSI1110,pharmacode:A.pharmacode,codabar:g.codabar,GenericBarcode:T.GenericBarcode}},3133:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.pharmacode=void 0;var l,_=function(){function l(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&l(t.prototype,n),i&&l(t,i),t}}(),T=function(l){function t(n,i){!function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return r.number=parseInt(n,10),r}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),_(t,[{key:"encode",value:function(){for(var i=this.number,r="";!isNaN(i)&&0!=i;)i%2==0?(r="11100"+r,i=(i-2)/2):(r="100"+r,i=(i-1)/2);return{data:r=r.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),t}(((l=p(6615))&&l.__esModule?l:{default:l}).default);s.pharmacode=T},400:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0});var p=function(){function e(m,P){for(var A=0;A<P.length;A++){var g=P[A];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(m,g.key,g)}}return function(m,P,A){return P&&e(m.prototype,P),A&&e(m,A),m}}(),y=function(){function e(m){(function(e,m){if(!(e instanceof m))throw new TypeError("Cannot call a class as a function")})(this,e),this.api=m}return p(e,[{key:"handleCatch",value:function(P){if("InvalidInputException"!==P.name)throw P;if(this.api._options.valid===this.api._defaults.valid)throw P.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(P){try{var A=P.apply(void 0,arguments);return this.api._options.valid(!0),A}catch(g){return this.handleCatch(g),this.api}}}]),e}();s.default=y},4779:(C,s)=>{function p(A,g){if(!(A instanceof g))throw new TypeError("Cannot call a class as a function")}function _(A,g){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!g||"object"!=typeof g&&"function"!=typeof g?A:g}function y(A,g){if("function"!=typeof g&&null!==g)throw new TypeError("Super expression must either be null or a function, not "+typeof g);A.prototype=Object.create(g&&g.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(A,g):A.__proto__=g)}Object.defineProperty(s,"__esModule",{value:!0});var e=function(A){function g(T,l){p(this,g);var t=_(this,(g.__proto__||Object.getPrototypeOf(g)).call(this));return t.name="InvalidInputException",t.symbology=T,t.input=l,t.message='"'+t.input+'" is not a valid input for '+t.symbology,t}return y(g,Error),g}(),m=function(A){function g(){p(this,g);var T=_(this,(g.__proto__||Object.getPrototypeOf(g)).call(this));return T.name="InvalidElementException",T.message="Not supported type to render on",T}return y(g,Error),g}(),P=function(A){function g(){p(this,g);var T=_(this,(g.__proto__||Object.getPrototypeOf(g)).call(this));return T.name="NoElementException",T.message="No element to render on.",T}return y(g,Error),g}();s.InvalidInputException=e,s.InvalidElementException=m,s.NoElementException=P},7095:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=function(_){return _.marginTop=_.marginTop||_.margin,_.marginBottom=_.marginBottom||_.margin,_.marginRight=_.marginRight||_.margin,_.marginLeft=_.marginLeft||_.margin,_}},7866:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var y=P(p(201)),m=P(p(1452));function P(g){return g&&g.__esModule?g:{default:g}}s.default=function(g){var T={};for(var l in m.default)m.default.hasOwnProperty(l)&&(g.hasAttribute("jsbarcode-"+l.toLowerCase())&&(T[l]=g.getAttribute("jsbarcode-"+l.toLowerCase())),g.hasAttribute("data-"+l.toLowerCase())&&(T[l]=g.getAttribute("data-"+l.toLowerCase())));return T.value=g.getAttribute("jsbarcode-value")||g.getAttribute("data-value"),(0,y.default)(T)}},4441:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e=g(p(7866)),P=g(p(1462)),A=p(4779);function g(n){return n&&n.__esModule?n:{default:n}}s.default=function T(n){if("string"==typeof n)return function(n){var i=document.querySelectorAll(n);if(0!==i.length){for(var r=[],u=0;u<i.length;u++)r.push(T(i[u]));return r}}(n);if(Array.isArray(n)){for(var i=[],r=0;r<n.length;r++)i.push(T(n[r]));return i}if("undefined"!=typeof HTMLCanvasElement&&n instanceof HTMLImageElement)return function(n){var i=document.createElement("canvas");return{element:i,options:(0,e.default)(n),renderer:P.default.CanvasRenderer,afterRender:function(){n.setAttribute("src",i.toDataURL())}}}(n);if(n&&n.nodeName&&"svg"===n.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&n instanceof SVGElement)return{element:n,options:(0,e.default)(n),renderer:P.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&n instanceof HTMLCanvasElement)return{element:n,options:(0,e.default)(n),renderer:P.default.CanvasRenderer};if(n&&n.getContext)return{element:n,renderer:P.default.CanvasRenderer};if(n&&"object"===(void 0===n?"undefined":_(n))&&!n.nodeName)return{element:n,renderer:P.default.ObjectRenderer};throw new A.InvalidElementException}},2308:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=function(_){var y=[];return function e(m){if(Array.isArray(m))for(var P=0;P<m.length;P++)e(m[P]);else m.text=m.text||"",m.data=m.data||"",y.push(m)}(_),y}},7720:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0});var p=Object.assign||function(_){for(var y=1;y<arguments.length;y++){var e=arguments[y];for(var m in e)Object.prototype.hasOwnProperty.call(e,m)&&(_[m]=e[m])}return _};s.default=function(_,y){return p({},_,y)}},201:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=function(_){var y=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var e in y)y.hasOwnProperty(e)&&"string"==typeof _[e=y[e]]&&(_[e]=parseInt(_[e],10));return"string"==typeof _.displayValue&&(_.displayValue="false"!=_.displayValue),_}},1452:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}}},3010:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var T,_=function(){function T(l,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,i.key,i)}}return function(l,t,n){return t&&T(l.prototype,t),n&&T(l,n),l}}(),e=(T=p(7720))&&T.__esModule?T:{default:T},m=p(9390),g=function(){function T(l,t,n){(function(T,l){if(!(T instanceof l))throw new TypeError("Cannot call a class as a function")})(this,T),this.canvas=l,this.encodings=t,this.options=n}return _(T,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var n=(0,e.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(n,this.encodings[t]),this.drawCanvasText(n,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,m.calculateEncodingAttributes)(this.encodings,this.options,t);var n=(0,m.getTotalWidthOfEncodings)(this.encodings),i=(0,m.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=n+this.options.marginLeft+this.options.marginRight,this.canvas.height=i,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,n){var u,i=this.canvas.getContext("2d"),r=n.data;u="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,i.fillStyle=t.lineColor;for(var c=0;c<r.length;c++){var d=c*t.width+n.barcodePadding;"1"===r[c]?i.fillRect(d,u,t.width,t.height):r[c]&&i.fillRect(d,u,t.width,t.height*r[c])}}},{key:"drawCanvasText",value:function(t,n){var u,c,i=this.canvas.getContext("2d");t.displayValue&&(c="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,i.font=t.fontOptions+" "+t.fontSize+"px "+t.font,"left"==t.textAlign||n.barcodePadding>0?(u=0,i.textAlign="left"):"right"==t.textAlign?(u=n.width-1,i.textAlign="right"):(u=n.width/2,i.textAlign="center"),i.fillText(n.text,u,c))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),T}();s.default=g},1462:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var y=g(p(3010)),m=g(p(5995)),A=g(p(3911));function g(T){return T&&T.__esModule?T:{default:T}}s.default={CanvasRenderer:y.default,SVGRenderer:m.default,ObjectRenderer:A.default}},3911:(C,s)=>{Object.defineProperty(s,"__esModule",{value:!0});var p=function(){function e(m,P){for(var A=0;A<P.length;A++){var g=P[A];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(m,g.key,g)}}return function(m,P,A){return P&&e(m.prototype,P),A&&e(m,A),m}}(),y=function(){function e(m,P,A){(function(e,m){if(!(e instanceof m))throw new TypeError("Cannot call a class as a function")})(this,e),this.object=m,this.encodings=P,this.options=A}return p(e,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),e}();s.default=y},9390:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getTotalWidthOfEncodings=s.calculateEncodingAttributes=s.getBarcodePadding=s.getEncodingHeight=s.getMaximumHeightOfEncodings=void 0;var t,y=(t=p(7720))&&t.__esModule?t:{default:t};function m(t,n){return n.height+(n.displayValue&&t.text.length>0?n.fontSize+n.textMargin:0)+n.marginTop+n.marginBottom}function P(t,n,i){if(i.displayValue&&n<t){if("center"==i.textAlign)return Math.floor((t-n)/2);if("left"==i.textAlign)return 0;if("right"==i.textAlign)return Math.floor(t-n)}return 0}function l(t,n,i){var r;if(i)r=i;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=n.fontOptions+" "+n.fontSize+"px "+n.font;var u=r.measureText(t);return u?u.width:0}s.getMaximumHeightOfEncodings=function(t){for(var n=0,i=0;i<t.length;i++)t[i].height>n&&(n=t[i].height);return n},s.getEncodingHeight=m,s.getBarcodePadding=P,s.calculateEncodingAttributes=function(t,n,i){for(var r=0;r<t.length;r++){var d,u=t[r],c=(0,y.default)(n,u.options);d=c.displayValue?l(u.text,c,i):0;var b=u.data.length*c.width;u.width=Math.ceil(Math.max(d,b)),u.height=m(u,c),u.barcodePadding=P(d,b,c)}},s.getTotalWidthOfEncodings=function(t){for(var n=0,i=0;i<t.length;i++)n+=t[i].width;return n}},5995:(C,s,p)=>{Object.defineProperty(s,"__esModule",{value:!0});var l,_=function(){function l(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&l(t.prototype,n),i&&l(t,i),t}}(),e=(l=p(7720))&&l.__esModule?l:{default:l},m=p(9390),g="http://www.w3.org/2000/svg",T=function(){function l(t,n,i){(function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")})(this,l),this.svg=t,this.encodings=n,this.options=i,this.document=i.xmlDocument||document}return _(l,[{key:"render",value:function(){var n=this.options.marginLeft;this.prepareSVG();for(var i=0;i<this.encodings.length;i++){var r=this.encodings[i],u=(0,e.default)(this.options,r.options),c=this.createGroup(n,u.marginTop,this.svg);this.setGroupOptions(c,u),this.drawSvgBarcode(c,u,r),this.drawSVGText(c,u,r),n+=r.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,m.calculateEncodingAttributes)(this.encodings,this.options);var n=(0,m.getTotalWidthOfEncodings)(this.encodings),i=(0,m.getMaximumHeightOfEncodings)(this.encodings),r=n+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(r,i),this.options.background&&this.drawRect(0,0,r,i,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(n,i,r){var c,u=r.data;c="top"==i.textPosition?i.fontSize+i.textMargin:0;for(var d=0,b=0,O=0;O<u.length;O++)b=O*i.width+r.barcodePadding,"1"===u[O]?d++:d>0&&(this.drawRect(b-i.width*d,c,i.width*d,i.height,n),d=0);d>0&&this.drawRect(b-i.width*(d-1),c,i.width*d,i.height,n)}},{key:"drawSVGText",value:function(n,i,r){var c,d,u=this.document.createElementNS(g,"text");i.displayValue&&(u.setAttribute("style","font:"+i.fontOptions+" "+i.fontSize+"px "+i.font),d="top"==i.textPosition?i.fontSize-i.textMargin:i.height+i.textMargin+i.fontSize,"left"==i.textAlign||r.barcodePadding>0?(c=0,u.setAttribute("text-anchor","start")):"right"==i.textAlign?(c=r.width-1,u.setAttribute("text-anchor","end")):(c=r.width/2,u.setAttribute("text-anchor","middle")),u.setAttribute("x",c),u.setAttribute("y",d),u.appendChild(this.document.createTextNode(r.text)),n.appendChild(u))}},{key:"setSvgAttributes",value:function(n,i){var r=this.svg;r.setAttribute("width",n+"px"),r.setAttribute("height",i+"px"),r.setAttribute("x","0px"),r.setAttribute("y","0px"),r.setAttribute("viewBox","0 0 "+n+" "+i),r.setAttribute("xmlns",g),r.setAttribute("version","1.1"),r.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(n,i,r){var u=this.document.createElementNS(g,"g");return u.setAttribute("transform","translate("+n+", "+i+")"),r.appendChild(u),u}},{key:"setGroupOptions",value:function(n,i){n.setAttribute("style","fill:"+i.lineColor+";")}},{key:"drawRect",value:function(n,i,r,u,c){var d=this.document.createElementNS(g,"rect");return d.setAttribute("x",n),d.setAttribute("y",i),d.setAttribute("width",r),d.setAttribute("height",u),c.appendChild(d),d}}]),l}();s.default=T},4269:(C,s,p)=>{p.r(s),p.d(s,{PagesModule:()=>Ee});var _=p(6019),y=p(1086),e=p(3668),m=p(4099);let P=(()=>{class h{constructor(){this.store=new m.X([])}getState(){return this.store.asObservable()}setState(o){this.store.next(o)}}return h.\u0275fac=function(o){return new(o||h)},h.\u0275prov=e.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"}),h})();var A=p(1286),g=p(1273),T=p(3405),l=p(8805),t=(()=>{return(h=t||(t={}))[h.SUPPLIER_BILL=0]="SUPPLIER_BILL",h[h.OUTLET_DELIVERY=1]="OUTLET_DELIVERY",t;var h})(),n=p(5304),i=p(2193),r=p(9090),u=p(5496),c=p(9010);let d=(()=>{class h{constructor(o,a){this.data=o,this.dialogRef=a,this.outlets=o.outlets}ngOnInit(){this.initModalConfig(),this.initTransactionType()}initModalConfig(){this.modalConfig=new i.O,this.modalConfig.title="Choose your transaction",this.modalConfig.hideMoreButton=!0}initTransactionType(){this.transactionTypes=[{title:"Supplier Bill",type:t.SUPPLIER_BILL},{title:"Outlet Delivery",type:t.OUTLET_DELIVERY}]}onOk(){this.selectedOutlet&&this.poNumber&&this.dialogRef.close({Outlet:this.selectedOutlet.getName,Number:this.poNumber,Type:this.selectedTransactionType})}onCancel(){this.dialogRef.close()}}return h.\u0275fac=function(o){return new(o||h)(e.Y36(n.WI),e.Y36(n.so))},h.\u0275cmp=e.Xpm({type:h,selectors:[["app-form-add-bill"]],decls:16,vars:10,consts:[[3,"config","onOk","onCancel"],[1,"row"],["align","center",1,"col-sm-12","mt-3"],[2,"position","relative","width","100%"],[1,"w-100"],["bindLabel","title","bindValue","type","placeholder","Choose Type",1,"sticky-top","tall",3,"items","ngModel","clearable","appendTo","ngModelChange"],[1,"pt-6"],["bindLabel","Name","placeholder","Choose Outlet",1,"sticky-top","tall",3,"items","ngModel","clearable","appendTo","ngModelChange"],[1,"form-label-group"],["min","1","id","qty","type","text","placeholder","Number","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"]],template:function(o,a){1&o&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"table",3),e.TgZ(5,"tbody"),e.TgZ(6,"tr",4),e.TgZ(7,"td"),e.TgZ(8,"ng-select",5),e.NdJ("ngModelChange",function(S){return a.selectedTransactionType=S}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"tr",4),e.TgZ(10,"td",6),e.TgZ(11,"ng-select",7),e.NdJ("ngModelChange",function(S){return a.selectedOutlet=S}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(12,"tr",4),e.TgZ(13,"td",6),e.TgZ(14,"div",8),e.TgZ(15,"input",9),e.NdJ("ngModelChange",function(S){return a.poNumber=S}),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.Q6J("config",a.modalConfig),e.xp6(8),e.Q6J("items",a.transactionTypes)("ngModel",a.selectedTransactionType)("clearable",!1)("appendTo","body"),e.xp6(3),e.Q6J("items",a.outlets)("ngModel",a.selectedOutlet)("clearable",!1)("appendTo","body"),e.xp6(4),e.Q6J("ngModel",a.poNumber))},directives:[r.M,u.w9,c.JJ,c.On,c.Fj],styles:[""]}),h})();var b=p(8053),O=p(8930);let Z=(()=>{class h{constructor(o){this.httpService=o,this.barcodeConfigState=new m.X(null)}updatePaperFormatConfig(o){let a=localStorage.getItem("Domain");return this.httpService.post("/api/Config/SaveConfig",{SubDomain:a,Version:this.paperFormatVersion,PaperFormats:o})}getPaperFormatConfig(){let o=localStorage.getItem("Domain"),a=[];return this.httpService.post("/api/Config/PaperConfig",{SubDomain:o}).pipe((0,b.U)(E=>(this.paperFormatVersion=E.version,a=E.PaperFormats,a)))}setBarcodeConfigState(o){this.barcodeConfigState.next(o)}getBarcodeConfigState(){return this.barcodeConfigState.asObservable()}}return h.\u0275fac=function(o){return new(o||h)(e.LFG(O.O))},h.\u0275prov=e.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"}),h})();var M=p(8076),N=p(5686),D=p(6731);const G=["input"];function Q(h,v){if(1&h&&e._UZ(0,"img",10),2&h){const o=e.oxw().$implicit;e.Q6J("src",o.ImgUrl,e.LSH)}}function V(h,v){if(1&h){const o=e.EpF();e.TgZ(0,"mat-option",8),e.NdJ("click",function(f){const E=e.CHM(o).$implicit;return e.oxw().changeDisplayName(E),f.stopPropagation()}),e.YNc(1,Q,1,1,"img",9),e._uU(2),e.qZA()}if(2&h){const o=v.$implicit,a=e.oxw();e.Q6J("value",o),e.xp6(1),e.Q6J("ngIf",a.renderThumbnail&&o.ImgUrl),e.xp6(1),e.hij(" ",o.Value," ")}}let w=(()=>{class h{constructor(o,a){this.httpService=o,this.ngZone=a,this.offlineStorage=[],this.inputLock=!1,this.renderThumbnail=!1,this.onOffline=new e.vpe,this.onEnter=new e.vpe,this.onSelect=new e.vpe,this.onOptionSelect=new e.vpe,this.reset=new e.vpe,this.termControl=new c.NI(""),this.options=[],this.complete=!1,this.foundProduct=!1,this.propagateChange=f=>{},this.termControl.valueChanges.pipe((0,N.b)(500)).subscribe(f=>{this.options=[],"object"==typeof f?(this.value=f.Key,this.clearOnSelect?this.clear():(this.termControl.setValue(f.Value),this.complete=!0),this.onSelect&&this.onSelect.emit(f.Key),this.options=[],"object"==typeof f&&(this.value=f.Key,this.clearOnSelect?this.clear():(this.termControl.setValue(f.Value),this.complete=!0),this.onOptionSelect)&&this.onOptionSelect.emit(JSON.stringify({Key:f.Key,Value:f.Value}))):"string"==typeof f&&f.length>0?f.length>2&&!this.inputLock&&this.search(f):this.clear()})}set display(o){this.input.nativeElement.value=o}get value(){return this._value}set value(o){this._value=o,this.propagateChange(this._value)}ngOnChanges(o){null!=o.ngModel&&null==o.ngModel.currentValue&&this.clear(),null!=o.display&&o.display.currentValue!=o.display.previousValue&&this.termControl.setValue(o.display.currentValue)}ngAfterViewInit(){}search(o){if(this.termControl.value.length>0){let a={};if(this.data&&(a=this.data),a.prefix=o,a.count=100,this.complete)this.complete=!1;else{let f=this.url,S=localStorage.getItem("Domain");S&&(f=`https://${S}${this.url}`),this.httpService.post(f,a).subscribe(E=>{this.options=E,this.foundProduct=this.options.length>0})}}else this.options=null}onblur(){setTimeout(()=>{},600)}changeDisplayName(o){this.input.nativeElement.value=o.Value}onKeydown(o){const a=o.key;"Enter"===a?(this.clearOnSelect&&this.clear(),!this.foundProduct&&this.termControl.value.length>0&&(this.onEnter.emit(this.termControl.value),o.stopPropagation()),null!=this.termControl.value&&(this.input.nativeElement.value=this.termControl.value.Value),this.foundProduct=!1):(this.inputLock&&("Backspace"===a?this.clear():this.validateInputLock()),this.complete=!1,this.reset.emit())}validateInputLock(){""==this.input.nativeElement.value||0==this.input.nativeElement.value.length?this.startInput=new Date:(new Date).getTime()-this.startInput.getTime()>500&&this.clear()}clear(){this.value=null,this.input.nativeElement.value=""}displayFn(o){return o&&o.Value}writeValue(o){}registerOnChange(o){this.propagateChange=o}registerOnTouched(){}}return h.\u0275fac=function(o){return new(o||h)(e.Y36(O.O),e.Y36(e.R0b))},h.\u0275cmp=e.Xpm({type:h,selectors:[["autocomplete"]],viewQuery:function(o,a){if(1&o&&e.Gf(G,7),2&o){let f;e.iGM(f=e.CRH())&&(a.input=f.first)}},inputs:{placeholder:"placeholder",url:"url",clearOnSelect:"clearOnSelect",offlineStorage:"offlineStorage",inputLock:"inputLock",data:"data",renderThumbnail:"renderThumbnail",ngModel:"ngModel",displayText:"displayText",localStorage:"localStorage",_value:"_value",display:"display"},outputs:{onOffline:"onOffline",onEnter:"onEnter",onSelect:"onSelect",onOptionSelect:"onOptionSelect",reset:"reset"},features:[e._Bn([{provide:c.JU,useExisting:(0,e.Gpc)(()=>h),multi:!0}]),e.TTD],decls:9,vars:5,consts:[[1,"w-100"],[1,"form-label-group"],["id","input","type","text","matInput","",1,"form-control","text-black",3,"matAutocomplete","placeholder","formControl","paste","keydown","blur"],["input",""],["for","input"],["autoActiveFirstOption","true"],["autocomplete","matAutocomplete"],["class","option-autocomplete",3,"value","click",4,"ngFor","ngForOf"],[1,"option-autocomplete",3,"value","click"],["width","30","height","30",3,"src",4,"ngIf"],["width","30","height","30",3,"src"]],template:function(o,a){if(1&o&&(e.TgZ(0,"mat-form-field",0),e.TgZ(1,"div",1),e.TgZ(2,"input",2,3),e.NdJ("paste",function(S){return a.inputLock?S.preventDefault():""})("keydown",function(S){return a.onKeydown(S)})("blur",function(){return a.onblur()}),e.qZA(),e.TgZ(4,"label",4),e._uU(5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(6,"mat-autocomplete",5,6),e.YNc(8,V,3,3,"mat-option",7),e.qZA()),2&o){const f=e.MAs(7);e.xp6(2),e.s9C("placeholder",a.placeholder||""),e.Q6J("matAutocomplete",f)("formControl",a.termControl),e.xp6(3),e.Oqu(a.placeholder||""),e.xp6(3),e.Q6J("ngForOf",a.options)}},directives:[M.ZL,c.Fj,c.JJ,c.oH,M.XC,_.sg,D.ey,_.O5],styles:["mat-option[_ngcontent-%COMP%]{font-size:12px}"]}),h})(),I=(()=>{class h{}return h.\u0275fac=function(o){return new(o||h)},h.\u0275mod=e.oAB({type:h}),h.\u0275inj=e.cJS({imports:[[M.Bb,_.ez,c.UX]]}),h})();function k(h,v){if(1&h){const o=e.EpF();e.TgZ(0,"tr",4),e.TgZ(1,"td"),e.TgZ(2,"div",6),e.TgZ(3,"input",10),e.NdJ("ngModelChange",function(f){return e.CHM(o),e.oxw().customPrice=f}),e.qZA(),e.TgZ(4,"label",11),e._uU(5,"Custom Price"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&h){const o=e.oxw();e.xp6(3),e.Q6J("ngModel",o.customPrice)}}let R=(()=>{class h{constructor(o,a,f){this.dialogRef=o,this.barcodeService=a,this.data=f,this.modalConfig=new i.O,this.event=new e.vpe,this.variantId="",this.variantName="",this.destroy$=new T.xQ,this.variantId=f.variantId,this.qty=f.qty,this.variantName=f.variantName,this.customPrice=f.customPrice}ngOnInit(){this.getBarcodeConfig(),this.initModalConfig()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getBarcodeConfig(){this.barcodeService.getBarcodeConfigState().pipe((0,l.R)(this.destroy$)).subscribe(o=>{o&&(this.paperFormat=o)})}initModalConfig(){this.modalConfig.title="Add New Product Barcode?",this.modalConfig.hideMoreButton=!0}addItem(o){this.variantId=o}onOk(){this.qty&&this.qty>0&&this.variantId&&this.dialogRef.close({variantId:this.variantId,qty:this.qty,customPrice:this.customPrice})}onCancel(){this.dialogRef.close()}}return h.\u0275fac=function(o){return new(o||h)(e.Y36(n.so),e.Y36(Z),e.Y36(n.WI))},h.\u0275cmp=e.Xpm({type:h,selectors:[["app-form-add-variant"]],outputs:{event:"event"},decls:16,vars:4,consts:[[3,"config","onOk","onCancel"],[1,"row"],["align","center",1,"col-sm-12","mt-3"],[2,"position","relative","width","100%"],[1,"w-100"],["placeholder","Name","url","/API/AC/GetVariantSuggestionByCodeNName",3,"display","onSelect"],[1,"form-label-group"],["min","1","id","qty","type","number","placeholder","Quantity","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],["for","qty"],["class","w-100",4,"ngIf"],["min","0","id","price","type","number","placeholder","Custom Price","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],["for","price"]],template:function(o,a){1&o&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"table",3),e.TgZ(5,"tbody"),e.TgZ(6,"tr",4),e.TgZ(7,"td"),e.TgZ(8,"autocomplete",5),e.NdJ("onSelect",function(S){return a.addItem(S)}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"tr",4),e.TgZ(10,"td"),e.TgZ(11,"div",6),e.TgZ(12,"input",7),e.NdJ("ngModelChange",function(S){return a.qty=S}),e.qZA(),e.TgZ(13,"label",8),e._uU(14,"Quantity"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(15,k,6,1,"tr",9),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.Q6J("config",a.modalConfig),e.xp6(8),e.Q6J("display",a.variantName),e.xp6(4),e.Q6J("ngModel",a.qty),e.xp6(3),e.Q6J("ngIf",null==a.paperFormat?null:a.paperFormat.CustomPriceEnabled))},directives:[r.M,w,c.qQ,c.wV,c.Fj,c.JJ,c.On,_.O5],styles:[""]}),h})(),x=(()=>{class h{constructor(o,a){this.dialogRef=o,this.data=a,this.event=new e.vpe,this.modalConfig=new i.O}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig.title="Upload New Product Barcode?",this.modalConfig.hideMoreButton=!0}onOk(){this.dialogRef.close(this.files)}onCancel(){this.dialogRef.close()}onUploadFile(o){o&&(this.files=o.target.files)}}return h.\u0275fac=function(o){return new(o||h)(e.Y36(n.so),e.Y36(n.WI))},h.\u0275cmp=e.Xpm({type:h,selectors:[["app-form-upload-variant"]],outputs:{event:"event"},decls:15,vars:1,consts:[[3,"config","onOk","onCancel"],[1,"row"],[1,"col-sm-12"],["href","//res.cloudinary.com/pos/raw/upload/POS/CSV/Barcode_DealPOS.csv"],[1,"value-title"],["type","file","aria-label","upload",3,"change"]],template:function(o,a){1&o&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"a",3),e._uU(5,"Download Sample CSV"),e.qZA(),e.TgZ(6,"table"),e.TgZ(7,"tbody"),e.TgZ(8,"tr"),e.TgZ(9,"th",4),e._uU(10,"CSV File"),e.qZA(),e.TgZ(11,"td"),e._uU(12,":"),e.qZA(),e.TgZ(13,"td"),e.TgZ(14,"input",5),e.NdJ("change",function(S){return a.onUploadFile(S)}),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&e.Q6J("config",a.modalConfig)},directives:[r.M],styles:[""]}),h})();var L=p(4522);let z=(()=>{class h{static StringFormat(o,...a){for(let f=0;f<a.length;f++)o=o.replace(`{${f}}`,a[f]);return o}static IsNotEmpty(o){return""!=o&&o!=h.GuidEmpty&&null!=o&&null!=o}static IsEmpty(o){return""==o||null==o||null==o||o==h.GuidEmpty}static FilterByID(o,a){try{const f=o.filter(S=>S.ID==a);if(f.length>0)return f[0]}catch(f){console.log("error filter")}return null}static DateOnly(o){return o?new Date(new Date(o).toDateString()):new Date((new Date).toDateString())}}return h.GuidEmpty="00000000-0000-0000-0000-000000000000",h.DecimalMinValue="-7.922816251426434e+28",h.InputLockTimeSpan=500,h.MinDate="0001-01-01T00:00:00",h.MinTime="00:00:00",h})();class te{constructor(v){v&&(this.AccountID=v.AccountID,this.CalculationTypeID=v.CalculationTypeID,this.ID=v.ID,this.Index=v.Index,this.Label=v.Label,this.MultipleTaxTypeID=v.MultipleTaxTypeID,this.Note=v.Note,this.PrintVisible=v.PrintVisible,this.Rate=v.Rate,this.TypeID=v.TypeID,this.Name=v.Name,this.Type=v.Type)}get getID(){return this.ID}get getType(){return this.Type}get getName(){return this.Name}get getAccountID(){return this.AccountID}set setAccountId(v){this.AccountID=v}get getCalculationTypeID(){return this.CalculationTypeID}set setCalculationID(v){this.CalculationTypeID=v}get getRate(){return this.Rate}set setRate(v){this.Rate=v}get getLabel(){return this.Label}}class X{set setCustomPrice(v){this.customPrice=v}get getCustomPrice(){return this.customPrice}get getUnitPrice(){return this.UnitPrice}set setUnitPrice(v){this.UnitPrice=v}get getCode(){return this.Code}set setCode(v){this.Code=v}get getModel(){return this.Model}set setModel(v){this.Model=v}get getName(){return this.Name}set setName(v){this.Name=v}get getCurrency(){return this.CurrencySymbol}set setCurrency(v){this.CurrencySymbol=v}}class ne{get getCode(){return this.Code}get getName(){return this.Name}get getSuspended(){return this.Suspended}set setCode(v){this.Code=v}set setName(v){this.Name=v}set setSuspended(v){this.Suspended=v}}class re{get getOutlet(){return this.Outlet}get getNumber(){return this.Number}get getDate(){return this.Date}get getDueDate(){return this.DueDate}get getSupplier(){return this.Supplier}get getCreatorID(){return this.CreatorID}get getCreated(){return this.Created}get getDiscount1(){return this.Discount1}get getDiscountAmount(){return this.DiscountAmount}get getGross(){return this.Gross}get getDiscountTotal(){return this.DiscountTotal}get getTaxType(){return this.TaxType}get getTax(){return this.Tax}get getPurchase(){return this.Purchase}get getPurchaseNTax(){return this.PurchaseNTax}get getDelivery(){return this.Delivery}get getVariants(){return this.Variants}get getPayments(){return this.Payments}set setOutlet(v){this.Outlet=v}set setNumber(v){this.Number=v}set setDate(v){this.Date=v}set setDueDate(v){this.DueDate=v}set setSupplier(v){this.Supplier=v}set setCreatorID(v){this.CreatorID=v}set setCreated(v){this.Created=v}set setDiscount1(v){this.Discount1=v}set setDiscountAmount(v){this.DiscountAmount=v}set setGross(v){this.Gross=v}set setDiscountTotal(v){this.DiscountTotal=v}set setTaxType(v){this.TaxType=v}set setTax(v){this.Tax=v}set setPurchase(v){this.Purchase=v}set setPurchaseNTax(v){this.PurchaseNTax=v}set setDelivery(v){this.Delivery=v}set setVariants(v){this.Variants=v}set setPayments(v){this.Payments=v}}class ie extends X{constructor(){super()}get getVariantID(){return this.VariantID}get getQuantity(){return this.Quantity}get getPrice(){return this.Price}get getDiscount(){return this.Discount}get getNettPrice(){return this.NettPrice}set setVariantID(v){this.VariantID=v}set setQuantity(v){this.Quantity=v}set setPrice(v){this.Price=v}set setDiscount(v){this.Discount=v}set setNettPrice(v){this.NettPrice=v}}let H=(()=>{class h{constructor(){}getProductModel(o){let a=new X;return a.setCode=o.Code,a.setCurrency=o.CurrencySymbol,a.setModel=o.Model,a.setName=o.Name,a.setUnitPrice=o.UnitPrice,a}getTaxModel(o){return new te(o)}getOutletModel(o){let a=new ne;return a.setCode=o.Code,a.setName=o.Name,a.setSuspended=o.Suspended,a}getVariantModel(o){let a=new ie;return a.setCode=o.Code,a.setDiscount=o.Discount,a.setNettPrice=o.NettPrice,a.setPrice=o.Price,a.setUnitPrice=o.UnitPrice,a.setQuantity=o.Quantity,a.setVariantID=o.VariantID,a.setName=o.Name,a}getBillModel(o){let a=new re;return a.setNumber=o.Number,a.setOutlet=o.Outlet,a.setVariants=o.Variants?o.Variants.map(f=>this.getVariantModel(f)):[],a}}return h.\u0275fac=function(o){return new(o||h)},h.\u0275prov=e.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"}),h})(),W=(()=>{class h{constructor(o,a,f){this.httpService=o,this.http=a,this.factoryService=f}getProductById(o){let a=localStorage.getItem("Domain");return this.httpService.post(`https://${a}/API/Product/GetVariantByID`,{id:o,entityID:z.GuidEmpty}).pipe((0,b.U)(f=>this.factoryService.getProductModel(f)))}uploadProducts(o){let a=localStorage.getItem("Domain"),f=new FormData;return f.append("file",o,o.name),this.httpService.postFormData(`https://${a}/API/Product/UploadCSVforBarcode`,f).pipe((0,b.U)(S=>S.map(E=>(E.Print=E.Print.map(F=>this.factoryService.getProductModel(F)),E))))}getTax(){let o=localStorage.getItem("Domain"),a=localStorage.getItem("Token"),f=`https://${o}/API/V3/Tax`,S=new L.WM({authorization:"Bearer "+a,"content-type":"application/json","X-ClientId":"dealpos-app"});return this.http.get(f,{headers:S}).pipe((0,b.U)(E=>{if(E)return E.map(F=>this.factoryService.getTaxModel(F))}))}}return h.\u0275fac=function(o){return new(o||h)(e.LFG(O.O),e.LFG(L.eN),e.LFG(H))},h.\u0275prov=e.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"}),h})();var K=p(8452);let oe=(()=>{class h{constructor(o,a){this.httpService=o,this.factoryService=a}get(){let a=localStorage.getItem("Domain");return this.httpService.post(`https://${a}/api/v3/Outlet/p`,{Suspended:!1}).pipe((0,b.U)(f=>{let S=[];return f&&(S=f.map(E=>this.factoryService.getOutletModel(E))),S}))}}return h.\u0275fac=function(o){return new(o||h)(e.LFG(O.O),e.LFG(H))},h.\u0275prov=e.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"}),h})(),ae=(()=>{class h{constructor(o,a){this.httpService=o,this.factoryService=a}get(o){let a=localStorage.getItem("Domain"),f=this.getEndPointByType(o.Type);return this.httpService.post(`https://${a}${f}`,{Outlet:o.Outlet,Number:o.Number}).pipe((0,b.U)(E=>E.map(F=>this.factoryService.getVariantModel(F))))}getEndPointByType(o){let a;return a=o===t.SUPPLIER_BILL?"/API/V3/Barcode/byBillNumber":"/API/V3/Barcode/byOutletDeliveryNumber",a}}return h.\u0275fac=function(o){return new(o||h)(e.LFG(O.O),e.LFG(H))},h.\u0275prov=e.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"}),h})();function ue(h,v){if(1&h){const o=e.EpF();e.TgZ(0,"tr",18),e.NdJ("click",function(){const f=e.CHM(o),S=f.$implicit,E=f.index;return e.oxw().onUpdateProduct(S,E)}),e.TgZ(1,"td"),e.TgZ(2,"i",19),e.NdJ("click",function(){const S=e.CHM(o).index;return e.oxw().onDeleteProduct(S)}),e.qZA(),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td",20),e._uU(6),e.qZA(),e.qZA()}if(2&h){const o=v.$implicit;e.xp6(4),e.AsE(" ",null==o||null==o.Variants[0]?null:o.Variants[0].getName,"- ",null==o||null==o.Variants[0]?null:o.Variants[0].getCode," - "),e.xp6(2),e.Oqu(null==o?null:o.Quantity)}}let le=(()=>{class h{constructor(o,a,f,S,E,F,j){this.dialog=o,this.productStateService=a,this.productService=f,this.toastService=S,this.queryParamService=E,this.outletService=F,this.billService=j,this.destroy$=new T.xQ,this.stickerTotal=0,this.productGroups=[],this.productSource=[],this.getRouteParam(),this.initOutlets()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getRouteParam(){this.queryParamService.getState().pipe((0,l.R)(this.destroy$)).subscribe(o=>{o.ID&&this.getProductById(o.ID,5),o.billNumber&&this.getBill({Number:o.billNumber,Outlet:o.outletName,Type:t.SUPPLIER_BILL})})}initOutlets(){this.outletService.get().pipe((0,l.R)(this.destroy$)).subscribe(o=>{this.outlets=o})}onAddBill(){this.dialog.open(d,{width:"350px",data:{outlets:this.outlets}}).afterClosed().pipe((0,l.R)(this.destroy$)).subscribe(o=>{o&&this.getBill(o)})}getBill(o){this.billService.get(o).pipe((0,l.R)(this.destroy$)).subscribe(a=>{a&&a.forEach(f=>{this.checkAvailableProductCode(f);let S=this.generateProductByQty(f,f.getQuantity);this.productGroups=[...this.productGroups,{VariantID:f.getVariantID,Quantity:f.getQuantity,Variants:S}],this.updateProductsSource()})})}onAddProduct(){let o,a;this.dialog.open(R,{width:"350px",data:{variantName:"",variantId:null,qty:null}}).afterClosed().pipe((0,l.R)(this.destroy$)).subscribe(f=>{f&&(o=f.variantId,a=f.qty,this.customPrice=f.customPrice,this.getProductById(o,a))})}getProductById(o,a){this.productService.getProductById(o).pipe((0,l.R)(this.destroy$)).subscribe(f=>{if(f){this.checkAvailableProductCode(f);let S=this.generateProductByQty(f,a);S=this.updateCustomPriceProducts(S),this.productGroups=[...this.productGroups,{VariantID:o,Quantity:a,Variants:S}],this.updateProductsSource()}})}checkAvailableProductCode(o){o.getCode||this.toastService.error("Product has no code","Code Not Found")}onUpdateProduct(o,a){this.dialog.open(R,{width:"350px",data:{variantName:o.Variants[0].getName+" - "+o.Variants[0].getCode,variantId:o.VariantID,qty:o.Quantity,customPrice:o.Variants[0].getCustomPrice}}).afterClosed().pipe((0,l.R)(this.destroy$)).subscribe(U=>{U&&(this.customPrice=U.customPrice,this.productService.getProductById(U.variantId).pipe((0,l.R)(this.destroy$)).subscribe(J=>{if(J){this.checkAvailableProductCode(J);let B=this.generateProductByQty(J,U.qty);B=this.updateCustomPriceProducts(B),this.productGroups[a].Variants=B,this.productGroups[a].Quantity=U.qty,this.productGroups[a].VariantID=U.variantId,this.updateProductsSource()}}))})}onDeleteProduct(o){this.productGroups=this.productGroups.filter((a,f)=>f!==o),this.updateProductsSource()}updateProductsSource(){this.productSource=[],this.productGroups.forEach(o=>{this.productSource=[...this.productSource,...o.Variants]}),this.stickerTotal=this.productSource.length,this.productStateService.setState(this.productSource)}onUploadProduct(){this.dialog.open(x,{width:"350px"}).afterClosed().pipe((0,l.R)(this.destroy$)).subscribe(o=>{if(o){let a;this.productService.uploadProducts(o[0]).pipe((0,l.R)(this.destroy$)).subscribe(f=>{f&&(this.productGroups=[...this.productGroups,...f.map(S=>(a={Quantity:S.Quantity,VariantID:S.VariantID,Variants:S.Print},a))],this.updateProductsSource())})}})}updateCustomPriceProducts(o){return o.map(f=>(f.setCustomPrice=this.customPrice,f))}generateProductByQty(o,a){let f=[];for(let S=1;S<=a;S++)f.push(o);return f}onClear(){this.productGroups=[],this.updateProductsSource()}onPrint(){window.print()}}return h.\u0275fac=function(o){return new(o||h)(e.Y36(n.uw),e.Y36(P),e.Y36(W),e.Y36(K._W),e.Y36(g.U),e.Y36(oe),e.Y36(ae))},h.\u0275cmp=e.Xpm({type:h,selectors:[["app-list-products"]],decls:29,vars:2,consts:[[1,"card","mt-3","sticky-top"],[1,"card-header","d-flex","justify-content-between","align-items-center","bg-white","pb-5",2,"border","none"],[1,"font-weight-light","m-1"],[1,"ml-1","font-italic","text-info","d-block","mt-1"],[1,"btn-group"],["type","button",1,"btn-md","btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-cart-plus"],["aria-hidden","true",1,"fa","fa-plus"],["aria-hidden","true",1,"fa","fa-upload"],[1,"card-body","py-0"],[1,"table","table-fixed"],[1,"thead-light","lh-1"],["scope","col"],["scope","col",1,"text-right"],[3,"click",4,"ngFor","ngForOf"],[1,"card-footer","d-flex","justify-content-end","bg-white"],[1,"btn","btn-lg","btn-outline-secondary","ml-5",3,"click"],[1,"btn","btn-lg","btn-success","ml-5",3,"click"],[3,"click"],["aria-hidden","true",1,"fa","fa-times",2,"color","#fb404b !important","cursor","pointer",3,"click"],[1,"text-right"]],template:function(o,a){1&o&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"h1",2),e._uU(3," Products "),e.TgZ(4,"small",3),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"div",4),e.TgZ(7,"button",5),e.NdJ("click",function(){return a.onAddBill()}),e._UZ(8,"i",6),e.qZA(),e.TgZ(9,"button",5),e.NdJ("click",function(){return a.onAddProduct()}),e._UZ(10,"i",7),e.qZA(),e.TgZ(11,"button",5),e.NdJ("click",function(){return a.onUploadProduct()}),e._UZ(12,"i",8),e.qZA(),e.qZA(),e.qZA(),e.TgZ(13,"div",9),e.TgZ(14,"table",10),e.TgZ(15,"thead",11),e.TgZ(16,"tr"),e._UZ(17,"th",12),e.TgZ(18,"th",12),e._uU(19,"NAME"),e.qZA(),e.TgZ(20,"th",13),e._uU(21,"QTY"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(22,"tbody"),e.YNc(23,ue,7,3,"tr",14),e.qZA(),e.qZA(),e.qZA(),e.TgZ(24,"div",15),e.TgZ(25,"a",16),e.NdJ("click",function(){return a.onClear()}),e._uU(26,"Clear"),e.qZA(),e.TgZ(27,"a",17),e.NdJ("click",function(){return a.onPrint()}),e._uU(28,"Print"),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.xp6(5),e.hij("( ",0===a.stickerTotal?"":a.stickerTotal," stickers )"),e.xp6(18),e.Q6J("ngForOf",a.productGroups))},directives:[_.sg],styles:["td[_ngcontent-%COMP%]{font-size:12px}th[_ngcontent-%COMP%]{font-size:12px}"]}),h})();function ce(h,v){if(1&h){const o=e.EpF();e.TgZ(0,"tr"),e.TgZ(1,"td"),e._uU(2,"Selected Tax"),e.qZA(),e.TgZ(3,"td"),e.TgZ(4,"ng-select",45),e.NdJ("ngModelChange",function(f){return e.CHM(o),e.oxw().taxOptionSelected=f})("change",function(){return e.CHM(o),e.oxw().onSelectTaxType()}),e.qZA(),e.qZA(),e.TgZ(5,"td"),e._uU(6,"Applied Tax ex: 100 + 10% = 110"),e.qZA(),e.qZA()}if(2&h){const o=e.oxw();e.xp6(4),e.Q6J("items",o.taxOptions)("ngModel",o.taxOptionSelected)("clearable",!1)}}const q=function(h){return{active:h}};let se=(()=>{class h{constructor(o,a){this.dialogRef=o,this.data=a,this.event=new e.vpe,this.modalConfig=new i.O,this.taxOptions=[],this.paperWidth=0,this.marginTop=0,this.marginLeft=0,this.stickerWidth=0,this.stickerHeight=0,this.barcodeHeight=0,this.spacingColumn=0,this.spacingRow=0,this.barcode=!0,this.code=!0,this.price=!0,this.name=!0,this.removeDefault=!0,this.desc=!0,this.priceTax=!0,this.customPrice=!0,this.fontSize=0,this.namePrefix="",this.maxChar=0,this.publiclineHeight=0,this.paperFormat=JSON.parse(JSON.stringify(a.paperFormat)),this.taxs=a.taxs,this.authTax=a.authTax,this.initTaxOptions(),this.activeTab="paper"}ngOnInit(){this.initModalConfig(),this.initFormValue(),this.authTax&&this.initTaxOptionSelected()}initTaxOptions(){this.taxOptions=[],this.taxs.forEach((o,a)=>{this.taxOptions=[...this.taxOptions,{id:a+1,name:o.getName,ID:o.getID}]})}initTaxOptionSelected(){this.taxSelected&&(this.taxOptionSelected=this.taxOptions.find(o=>o.ID===this.taxSelected.ID))}onSelectTaxType(){this.taxSelected=this.taxs.find(o=>o.getID===this.taxOptionSelected.ID)}initModalConfig(){this.modalConfig.title="Sticker Configuration",this.modalConfig.hideMoreButton=!0}onOk(){this.setPaperFormat(),this.dialogRef.close(this.paperFormat)}onCancel(){this.dialogRef.close()}initFormValue(){this.paperFormat&&(this.barcodeHeight=this.paperFormat.BarcodeHeight,this.paperWidth=this.paperFormat.PaperWidth,this.marginTop=this.paperFormat.MarginTop,this.marginLeft=this.paperFormat.MarginLeft,this.stickerWidth=this.paperFormat.StickerWidth,this.stickerHeight=this.paperFormat.StickerHeight,this.barcodeHeight=this.paperFormat.BarcodeHeight,this.spacingColumn=this.paperFormat.ColumnSpacing,this.spacingRow=this.paperFormat.RowSpacing,this.barcode=this.paperFormat.BarcodeVisible,this.code=this.paperFormat.CodeVisible,this.price=this.paperFormat.PriceVisible,this.name=this.paperFormat.NameVisible,this.desc=this.paperFormat.DescriptionAsCode,this.fontSize=this.paperFormat.ProductNameFontSize,this.namePrefix=this.paperFormat.ProductNamePrefix,this.maxChar=this.paperFormat.ProductNameMaxLength,this.lineHeight=this.paperFormat.LineHeight,this.priceTax=this.paperFormat.PriceWithTax,this.taxSelected=this.paperFormat.TaxType,this.customPrice=this.paperFormat.CustomPriceEnabled,this.storeName=this.paperFormat.StoreName,this.currencySymbol=this.paperFormat.CurrencySymbol)}setPaperFormat(){this.paperFormat&&(this.paperFormat.BarcodeHeight=this.barcodeHeight,this.paperFormat.PaperWidth=this.paperWidth,this.paperFormat.MarginTop=this.marginTop,this.paperFormat.MarginLeft=this.marginLeft,this.paperFormat.StickerWidth=this.stickerWidth,this.paperFormat.StickerHeight=this.stickerHeight,this.paperFormat.BarcodeHeight=this.barcodeHeight,this.paperFormat.ColumnSpacing=this.spacingColumn,this.paperFormat.RowSpacing=this.spacingRow,this.paperFormat.BarcodeVisible=this.barcode,this.paperFormat.CodeVisible=this.code,this.paperFormat.PriceVisible=this.price,this.paperFormat.NameVisible=this.name,this.paperFormat.DescriptionAsCode=this.desc,this.paperFormat.ProductNameFontSize=this.fontSize,this.paperFormat.ProductNamePrefix=this.namePrefix,this.paperFormat.ProductNameMaxLength=this.maxChar,this.paperFormat.LineHeight=this.lineHeight,this.paperFormat.PriceWithTax=this.priceTax,this.paperFormat.TaxType=this.taxSelected,this.paperFormat.CustomPriceEnabled=this.customPrice,this.paperFormat.StoreName=this.storeName,this.paperFormat.CurrencySymbol=this.currencySymbol)}dataTarget(o){this.activeTab=o}}return h.\u0275fac=function(o){return new(o||h)(e.Y36(n.so),e.Y36(n.WI))},h.\u0275cmp=e.Xpm({type:h,selectors:[["app-form-settings"]],outputs:{event:"event"},decls:276,vars:62,consts:[[3,"config","onOk","onCancel"],["container",""],[1,"container-fluid","px-0","bg-light-white","nav-tabs-custom-border"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["tabs",""],[1,"nav-item"],["data-toggle","tab",1,"nav-link",3,"ngClass","click"],["id","spacing-tab","data-toggle","tab","data-target","'#spacing'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","dua-tab","data-toggle","tab","data-target","'#sticker-content'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","price-tab","data-toggle","tab","data-target","'#price'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","advanced-tab","data-toggle","tab","data-target","'#advanced'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],[1,"tab-content"],["id","paper",1,"tab-pane","mt-0",3,"ngClass"],[1,"table","w-100"],[1,"input-group"],["type","number","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],[1,"input-group-append"],[1,"input-group-text"],["id","spacing",1,"tab-pane","mt-0",3,"ngClass"],["id","sticker-content",1,"tab-pane","mt-0",3,"ngClass"],[1,"form-check","form-check-inline"],["type","radio","name","barcode","id","barcode","value","option3",1,"form-check-input",3,"checked","change"],["for","barcode",1,"form-check-label"],["type","radio","name","barcode","id","barcode","value","option4",1,"form-check-input",3,"checked","change"],["type","radio","name","code","id","code","value","option1",1,"form-check-input",3,"checked","change"],["for","code",1,"form-check-label"],["type","radio","name","code","id","code","value","option2",1,"form-check-input",3,"checked","change"],["type","radio","name","price","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["for","inlineRadio1",1,"form-check-label"],["type","radio","name","price","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],["for","inlineRadio2",1,"form-check-label"],["type","radio","name","name","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["type","radio","name","name","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],["id","price",1,"tab-pane","mt-0",3,"ngClass"],["type","radio","name","priceTax","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["type","radio","name","priceTax","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],[4,"ngIf"],["type","radio","name","customPrice","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["type","radio","name","customPrice","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],["type","text","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],["id","advanced",1,"tab-pane","mt-0",3,"ngClass"],["type","radio","name","desc","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["type","radio","name","desc","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],["type","radio","name","default","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["type","radio","name","default","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],["bindLabel","name","placeholder","Select Column",1,"sticky-top",3,"items","ngModel","clearable","ngModelChange","change"]],template:function(o,a){1&o&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"ul",3,4),e.TgZ(6,"li",5),e.TgZ(7,"a",6),e.NdJ("click",function(){return a.dataTarget("paper")}),e._uU(8,"Paper"),e.qZA(),e.qZA(),e.TgZ(9,"li",5),e.TgZ(10,"a",7),e.NdJ("click",function(){return a.dataTarget("spacing")}),e._uU(11,"Spacing"),e.qZA(),e.qZA(),e.TgZ(12,"li",5),e.TgZ(13,"a",8),e.NdJ("click",function(){return a.dataTarget("sticker-content")}),e._uU(14,"Sticker Content"),e.qZA(),e.qZA(),e.TgZ(15,"li",5),e.TgZ(16,"a",9),e.NdJ("click",function(){return a.dataTarget("price")}),e._uU(17,"Price"),e.qZA(),e.qZA(),e.TgZ(18,"li",5),e.TgZ(19,"a",10),e.NdJ("click",function(){return a.dataTarget("advanced")}),e._uU(20,"Advanced"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(21,"div",11),e.TgZ(22,"div",12),e.TgZ(23,"table",13),e.TgZ(24,"tr"),e.TgZ(25,"td"),e._uU(26,"Paper Width"),e.qZA(),e.TgZ(27,"td"),e.TgZ(28,"div",14),e.TgZ(29,"input",15),e.NdJ("ngModelChange",function(S){return a.paperWidth=S}),e.qZA(),e.TgZ(30,"div",16),e.TgZ(31,"span",17),e._uU(32,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(33,"td"),e._uU(34,"The width of the paper"),e.qZA(),e.qZA(),e.TgZ(35,"tr"),e.TgZ(36,"td"),e._uU(37,"Sticker Width"),e.qZA(),e.TgZ(38,"td"),e.TgZ(39,"div",14),e.TgZ(40,"input",15),e.NdJ("ngModelChange",function(S){return a.stickerWidth=S}),e.qZA(),e.TgZ(41,"div",16),e.TgZ(42,"span",17),e._uU(43,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(44,"td"),e._uU(45,"The width of the sticker"),e.qZA(),e.qZA(),e.TgZ(46,"tr"),e.TgZ(47,"td"),e._uU(48,"Sticker Height"),e.qZA(),e.TgZ(49,"td"),e.TgZ(50,"div",14),e.TgZ(51,"input",15),e.NdJ("ngModelChange",function(S){return a.stickerHeight=S}),e.qZA(),e.TgZ(52,"div",16),e.TgZ(53,"span",17),e._uU(54,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(55,"td"),e._uU(56,"The height of the sticker"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(57,"div",18),e.TgZ(58,"table",13),e.TgZ(59,"tr"),e.TgZ(60,"td"),e._uU(61,"Left Indent"),e.qZA(),e.TgZ(62,"td"),e.TgZ(63,"div",14),e.TgZ(64,"input",15),e.NdJ("ngModelChange",function(S){return a.marginLeft=S}),e.qZA(),e.TgZ(65,"div",16),e.TgZ(66,"span",17),e._uU(67,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(68,"td"),e._uU(69,"the number of pixels appended before the first COLUMN"),e.qZA(),e.qZA(),e.TgZ(70,"tr"),e.TgZ(71,"td"),e._uU(72,"Top Indent"),e.qZA(),e.TgZ(73,"td"),e.TgZ(74,"div",14),e.TgZ(75,"input",15),e.NdJ("ngModelChange",function(S){return a.marginTop=S}),e.qZA(),e.TgZ(76,"div",16),e.TgZ(77,"span",17),e._uU(78,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(79,"td"),e._uU(80,"the number of pixels appended before the first ROW"),e.qZA(),e.qZA(),e.TgZ(81,"tr"),e.TgZ(82,"td"),e._uU(83,"Row Spacing"),e.qZA(),e.TgZ(84,"td"),e.TgZ(85,"div",14),e.TgZ(86,"input",15),e.NdJ("ngModelChange",function(S){return a.spacingRow=S}),e.qZA(),e.TgZ(87,"div",16),e.TgZ(88,"span",17),e._uU(89,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(90,"td"),e._uU(91,"The number of pixels between each ROW"),e.qZA(),e.qZA(),e.TgZ(92,"tr"),e.TgZ(93,"td"),e._uU(94,"Column Spacing"),e.qZA(),e.TgZ(95,"td"),e.TgZ(96,"div",14),e.TgZ(97,"input",15),e.NdJ("ngModelChange",function(S){return a.spacingColumn=S}),e.qZA(),e.TgZ(98,"div",16),e.TgZ(99,"span",17),e._uU(100,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(101,"td"),e._uU(102,"The number of pixels between each COLUMN"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(103,"div",19),e.TgZ(104,"table",13),e.TgZ(105,"tr"),e.TgZ(106,"td"),e._uU(107,"Barcode Height"),e.qZA(),e.TgZ(108,"td"),e.TgZ(109,"div",14),e.TgZ(110,"input",15),e.NdJ("ngModelChange",function(S){return a.barcodeHeight=S}),e.qZA(),e.TgZ(111,"div",16),e.TgZ(112,"span",17),e._uU(113,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(114,"td"),e._uU(115,"the height of the generated barcode in pixels"),e.qZA(),e.qZA(),e.TgZ(116,"tr"),e.TgZ(117,"td"),e._uU(118,"Product Name Font Size"),e.qZA(),e.TgZ(119,"td"),e.TgZ(120,"div",14),e.TgZ(121,"input",15),e.NdJ("ngModelChange",function(S){return a.fontSize=S}),e.qZA(),e.TgZ(122,"div",16),e.TgZ(123,"span",17),e._uU(124,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(125,"td"),e._uU(126,"Product Name Font Size"),e.qZA(),e.qZA(),e.TgZ(127,"tr"),e.TgZ(128,"td"),e._uU(129,"Barcode"),e.qZA(),e.TgZ(130,"td"),e.TgZ(131,"div",20),e.TgZ(132,"input",21),e.NdJ("change",function(){return a.barcode=!1}),e.qZA(),e.TgZ(133,"label",22),e._uU(134,"No"),e.qZA(),e.qZA(),e.TgZ(135,"div",20),e.TgZ(136,"input",23),e.NdJ("change",function(){return a.barcode=!0}),e.qZA(),e.TgZ(137,"label",22),e._uU(138,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(139,"td"),e._uU(140,"Whether barcode is visible"),e.qZA(),e.qZA(),e.TgZ(141,"tr"),e.TgZ(142,"td"),e._uU(143,"Code"),e.qZA(),e.TgZ(144,"td"),e.TgZ(145,"div",20),e.TgZ(146,"input",24),e.NdJ("change",function(){return a.code=!1}),e.qZA(),e.TgZ(147,"label",25),e._uU(148,"No"),e.qZA(),e.qZA(),e.TgZ(149,"div",20),e.TgZ(150,"input",26),e.NdJ("change",function(){return a.code=!0}),e.qZA(),e.TgZ(151,"label",25),e._uU(152,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(153,"td"),e._uU(154,"Whether variant code is visible"),e.qZA(),e.qZA(),e.TgZ(155,"tr"),e.TgZ(156,"td"),e._uU(157,"Price"),e.qZA(),e.TgZ(158,"td"),e.TgZ(159,"div",20),e.TgZ(160,"input",27),e.NdJ("change",function(){return a.price=!1}),e.qZA(),e.TgZ(161,"label",28),e._uU(162,"No"),e.qZA(),e.qZA(),e.TgZ(163,"div",20),e.TgZ(164,"input",29),e.NdJ("change",function(){return a.price=!0}),e.qZA(),e.TgZ(165,"label",30),e._uU(166,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(167,"td"),e._uU(168,"Whether variant price is visible"),e.qZA(),e.qZA(),e.TgZ(169,"tr"),e.TgZ(170,"td"),e._uU(171,"Name"),e.qZA(),e.TgZ(172,"td"),e.TgZ(173,"div",20),e.TgZ(174,"input",31),e.NdJ("change",function(){return a.name=!1}),e.qZA(),e.TgZ(175,"label",28),e._uU(176,"No"),e.qZA(),e.qZA(),e.TgZ(177,"div",20),e.TgZ(178,"input",32),e.NdJ("change",function(){return a.name=!0}),e.qZA(),e.TgZ(179,"label",30),e._uU(180,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(181,"td"),e._uU(182,"Whether variant name is visible"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(183,"div",33),e.TgZ(184,"table",13),e.TgZ(185,"tr"),e.TgZ(186,"td"),e._uU(187,"Price with Tax"),e.qZA(),e.TgZ(188,"td"),e.TgZ(189,"div",20),e.TgZ(190,"input",34),e.NdJ("change",function(){return a.priceTax=!1}),e.qZA(),e.TgZ(191,"label",28),e._uU(192,"No"),e.qZA(),e.qZA(),e.TgZ(193,"div",20),e.TgZ(194,"input",35),e.NdJ("change",function(){return a.priceTax=!0}),e.qZA(),e.TgZ(195,"label",30),e._uU(196,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(197,"td"),e._uU(198),e.qZA(),e.qZA(),e.YNc(199,ce,7,3,"tr",36),e.TgZ(200,"tr"),e.TgZ(201,"td"),e._uU(202,"Custom Price"),e.qZA(),e.TgZ(203,"td"),e.TgZ(204,"div",20),e.TgZ(205,"input",37),e.NdJ("change",function(){return a.customPrice=!1}),e.qZA(),e.TgZ(206,"label",28),e._uU(207,"No"),e.qZA(),e.qZA(),e.TgZ(208,"div",20),e.TgZ(209,"input",38),e.NdJ("change",function(){return a.customPrice=!0}),e.qZA(),e.TgZ(210,"label",30),e._uU(211,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(212,"td"),e._uU(213,"Allow custom price"),e.qZA(),e.qZA(),e.TgZ(214,"tr"),e.TgZ(215,"td"),e._uU(216,"Currency"),e.qZA(),e.TgZ(217,"td"),e.TgZ(218,"div",14),e.TgZ(219,"input",39),e.NdJ("ngModelChange",function(S){return a.currencySymbol=S}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(220,"td"),e._uU(221,"the default currency"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(222,"div",40),e.TgZ(223,"table",13),e.TgZ(224,"tr"),e.TgZ(225,"td"),e._uU(226,"Max Character"),e.qZA(),e.TgZ(227,"td"),e.TgZ(228,"div",14),e.TgZ(229,"input",15),e.NdJ("ngModelChange",function(S){return a.maxChar=S}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(230,"td"),e._uU(231,"the max character of the product name"),e.qZA(),e.qZA(),e.TgZ(232,"tr"),e.TgZ(233,"td"),e._uU(234,"Name Prefix"),e.qZA(),e.TgZ(235,"td"),e.TgZ(236,"div",14),e.TgZ(237,"input",39),e.NdJ("ngModelChange",function(S){return a.namePrefix=S}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(238,"td"),e._uU(239,"a word, letter, or number placed before product name"),e.qZA(),e.qZA(),e.TgZ(240,"tr"),e.TgZ(241,"td"),e._uU(242,"Store Name"),e.qZA(),e.TgZ(243,"td"),e.TgZ(244,"div",14),e.TgZ(245,"input",39),e.NdJ("ngModelChange",function(S){return a.storeName=S}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(246,"td"),e._uU(247,"the name of the store"),e.qZA(),e.qZA(),e.TgZ(248,"tr"),e.TgZ(249,"td"),e._uU(250,"Use description as code"),e.qZA(),e.TgZ(251,"td"),e.TgZ(252,"div",20),e.TgZ(253,"input",41),e.NdJ("change",function(){return a.desc=!1}),e.qZA(),e.TgZ(254,"label",28),e._uU(255,"No"),e.qZA(),e.qZA(),e.TgZ(256,"div",20),e.TgZ(257,"input",42),e.NdJ("change",function(){return a.desc=!0}),e.qZA(),e.TgZ(258,"label",30),e._uU(259,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(260,"td"),e._uU(261,"Copy product description into Product Code"),e.qZA(),e.qZA(),e.TgZ(262,"tr"),e.TgZ(263,"td"),e._uU(264,'Remove "Default"'),e.qZA(),e.TgZ(265,"td"),e.TgZ(266,"div",20),e.TgZ(267,"input",43),e.NdJ("change",function(){return a.removeDefault=!1}),e.qZA(),e.TgZ(268,"label",28),e._uU(269,"No"),e.qZA(),e.qZA(),e.TgZ(270,"div",20),e.TgZ(271,"input",44),e.NdJ("change",function(){return a.removeDefault=!0}),e.qZA(),e.TgZ(272,"label",30),e._uU(273,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(274,"td"),e._uU(275,'Remove "Default" Label from product name'),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.Q6J("config",a.modalConfig),e.xp6(7),e.Q6J("ngClass",e.VKq(42,q,"paper"===a.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(44,q,"spacing"===a.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(46,q,"sticker-content"===a.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(48,q,"price"===a.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(50,q,"advanced"===a.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(52,q,"paper"===a.activeTab)),e.xp6(7),e.Q6J("ngModel",a.paperWidth),e.xp6(11),e.Q6J("ngModel",a.stickerWidth),e.xp6(11),e.Q6J("ngModel",a.stickerHeight),e.xp6(6),e.Q6J("ngClass",e.VKq(54,q,"spacing"===a.activeTab)),e.xp6(7),e.Q6J("ngModel",a.marginLeft),e.xp6(11),e.Q6J("ngModel",a.marginTop),e.xp6(11),e.Q6J("ngModel",a.spacingRow),e.xp6(11),e.Q6J("ngModel",a.spacingColumn),e.xp6(6),e.Q6J("ngClass",e.VKq(56,q,"sticker-content"===a.activeTab)),e.xp6(7),e.Q6J("ngModel",a.barcodeHeight),e.xp6(11),e.Q6J("ngModel",a.fontSize),e.xp6(11),e.Q6J("checked",!a.barcode),e.xp6(4),e.Q6J("checked",a.barcode),e.xp6(10),e.Q6J("checked",!a.code),e.xp6(4),e.Q6J("checked",a.code),e.xp6(10),e.Q6J("checked",!a.price),e.xp6(4),e.Q6J("checked",a.price),e.xp6(10),e.Q6J("checked",!a.name),e.xp6(4),e.Q6J("checked",a.name),e.xp6(5),e.Q6J("ngClass",e.VKq(58,q,"price"===a.activeTab)),e.xp6(7),e.Q6J("checked",!a.priceTax),e.xp6(4),e.Q6J("checked",a.priceTax),e.xp6(4),e.hij("Tax is added to the product base price ",a.authTax,""),e.xp6(1),e.Q6J("ngIf",1==a.priceTax&&1==a.authTax),e.xp6(6),e.Q6J("checked",!a.customPrice),e.xp6(4),e.Q6J("checked",a.customPrice),e.xp6(10),e.Q6J("ngModel",a.currencySymbol),e.xp6(3),e.Q6J("ngClass",e.VKq(60,q,"advanced"===a.activeTab)),e.xp6(7),e.Q6J("ngModel",a.maxChar),e.xp6(8),e.Q6J("ngModel",a.namePrefix),e.xp6(8),e.Q6J("ngModel",a.storeName),e.xp6(8),e.Q6J("checked",!a.desc),e.xp6(4),e.Q6J("checked",a.desc),e.xp6(10),e.Q6J("checked",!a.removeDefault),e.xp6(4),e.Q6J("checked",a.removeDefault))},directives:[r.M,_.mk,c.wV,c.Fj,c.JJ,c.On,_.O5,u.w9],styles:[".input-group-append[_ngcontent-%COMP%]{height:30px}.form-control[_ngcontent-%COMP%]{height:30px;font-size:12px}.input-group-text[_ngcontent-%COMP%]{font-size:12px}.value-title[_ngcontent-%COMP%]{font-size:12px;font-weight:550;width:90px}.advance-value-title[_ngcontent-%COMP%]{font-size:12px;font-weight:550;width:135px}h3[_ngcontent-%COMP%]{margin-bottom:0;font-weight:550}label[_ngcontent-%COMP%]{font-size:12px}bs-dropdown-container[_ngcontent-%COMP%]{z-index:1060}.nav-tabs-custom-border[_ngcontent-%COMP%] .nav-tabs[_ngcontent-%COMP%]{border-bottom:0}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{border:1px solid #dee2e6;margin-bottom:15px}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(1){font-weight:bold;width:172px;padding:12px 1rem}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){width:120px}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(2), .tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){border-right:1px solid #dee2e6;border-left:1px solid #dee2e6}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2) input[_ngcontent-%COMP%]{border:0;border-bottom:1px solid #dee2e6}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2) .input-group-text[_ngcontent-%COMP%]{border:0;border-bottom:1px solid #dee2e6}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(3){font-style:italic;color:#28a745}"]}),h})();const de=["bcElement"],fe=p(9489);let he=(()=>{class h{constructor(o){this.renderer=o,this.elementType="svg",this.cssClass="barcode",this.format="CODE128",this.lineColor="#000000",this.width=2,this.height=100,this.displayValue=!1,this.fontOptions="",this.font="monospace",this.textAlign="center",this.textPosition="bottom",this.textMargin=2,this.fontSize=20,this.background="#ffffff",this.margin=10,this.marginTop=10,this.marginBottom=10,this.marginLeft=10,this.marginRight=10,this.value="",this.valid=()=>!0}get options(){return{format:this.format,lineColor:this.lineColor,width:this.width,height:this.height,displayValue:this.displayValue,fontOptions:this.fontOptions,font:this.font,textAlign:this.textAlign,textPosition:this.textPosition,textMargin:this.textMargin,fontSize:this.fontSize,background:this.background,margin:this.margin,marginTop:this.marginTop,marginBottom:this.marginBottom,marginLeft:this.marginLeft,marginRight:this.marginRight,valid:this.valid}}ngOnChanges(){this.createBarcode()}createBarcode(){if(!this.value)return;let o;switch(this.elementType){case"img":o=this.renderer.createElement("img");break;case"canvas":o=this.renderer.createElement("canvas");break;default:o=this.renderer.createElement("svg","svg")}fe(o,this.value,this.options);for(const a of this.bcElement.nativeElement.childNodes)this.renderer.removeChild(this.bcElement.nativeElement,a);this.renderer.appendChild(this.bcElement.nativeElement,o)}}return h.\u0275fac=function(o){return new(o||h)(e.Y36(e.Qsj))},h.\u0275cmp=e.Xpm({type:h,selectors:[["ngx-barcode6"]],viewQuery:function(o,a){if(1&o&&e.Gf(de,7),2&o){let f;e.iGM(f=e.CRH())&&(a.bcElement=f.first)}},inputs:{elementType:["bc-element-type","elementType"],cssClass:["bc-class","cssClass"],format:["bc-format","format"],lineColor:["bc-line-color","lineColor"],width:["bc-width","width"],height:["bc-height","height"],displayValue:["bc-display-value","displayValue"],fontOptions:["bc-font-options","fontOptions"],font:["bc-font","font"],textAlign:["bc-text-align","textAlign"],textPosition:["bc-text-position","textPosition"],textMargin:["bc-text-margin","textMargin"],fontSize:["bc-font-size","fontSize"],background:["bc-background","background"],margin:["bc-margin","margin"],marginTop:["bc-margin-top","marginTop"],marginBottom:["bc-margin-bottom","marginBottom"],marginLeft:["bc-margin-left","marginLeft"],marginRight:["bc-margin-right","marginRight"],value:["bc-value","value"],valid:["bc-valid","valid"]},features:[e.TTD],decls:2,vars:2,consts:[["bcElement",""]],template:function(o,a){1&o&&e._UZ(0,"div",null,0),2&o&&e.Tol(a.cssClass)},encapsulation:2}),h})(),pe=(()=>{class h{}return h.\u0275fac=function(o){return new(o||h)},h.\u0275mod=e.oAB({type:h}),h.\u0275inj=e.cJS({imports:[[]]}),h})(),ge=(()=>{class h{transform(o,a){let f=o,S=0;return a&&0!==a&&(S=o*(a/100),f=o+S),f}}return h.\u0275fac=function(o){return new(o||h)},h.\u0275pipe=e.Yjl({name:"taxPipe",type:h,pure:!0}),h})();function me(h,v){if(1&h&&e._UZ(0,"ngx-barcode6",18),2&h){const o=e.oxw().$implicit,a=e.oxw();e.Q6J("bc-value",null==o?null:o.getCode)("bc-element-type","img")("bc-width",1)("bc-height",null==a.selectedPaperFormat?null:a.selectedPaperFormat.BarcodeHeight)}}function ve(h,v){if(1&h&&(e.TgZ(0,"span",19),e._uU(1),e.qZA()),2&h){const o=e.oxw().$implicit,a=e.oxw();e.Udp("font-size",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(1),e.Oqu(o.getCode)}}function _e(h,v){if(1&h&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.ALo(3,"taxPipe"),e.BQk()),2&h){const o=e.oxw(2).$implicit,a=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,e.xi3(3,3,null==o?null:o.getCustomPrice,a.tax))," ")}}function ye(h,v){if(1&h&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.ALo(3,"taxPipe"),e.BQk()),2&h){const o=e.oxw(3).$implicit,a=e.oxw();e.xp6(1),e.AsE(" ",null==a.selectedPaperFormat?null:a.selectedPaperFormat.CurrencySymbol," ",e.lcZ(2,2,e.xi3(3,4,null==o?null:o.getUnitPrice,a.tax))," ")}}function Pe(h,v){if(1&h&&e.YNc(0,ye,4,7,"ng-container",20),2&h){e.oxw();const o=e.MAs(6),a=e.oxw(2);e.Q6J("ngIf",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.PriceWithTax)&&a.tax&&0!=a.tax)("ngIfElse",o)}}function Te(h,v){if(1&h&&(e._uU(0),e.ALo(1,"number")),2&h){const o=e.oxw(2).$implicit,a=e.oxw();e.AsE(" ",null==a.selectedPaperFormat?null:a.selectedPaperFormat.CurrencySymbol," ",e.lcZ(1,2,null==o?null:o.getUnitPrice)," ")}}function Ae(h,v){if(1&h&&(e.TgZ(0,"span",19),e.TgZ(1,"strong"),e.YNc(2,_e,4,6,"ng-container",20),e.YNc(3,Pe,1,2,"ng-template",null,21,e.W1O),e.YNc(5,Te,2,4,"ng-template",null,22,e.W1O),e.qZA(),e.qZA()),2&h){const o=e.MAs(4),a=e.oxw().$implicit,f=e.oxw();e.Udp("font-size",(null==f.selectedPaperFormat?null:f.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(2),e.Q6J("ngIf",(null==f.selectedPaperFormat?null:f.selectedPaperFormat.CustomPriceEnabled)&&0!==(null==a?null:a.getCustomPrice)&&void 0!==(null==a?null:a.getCustomPrice))("ngIfElse",o)}}function be(h,v){if(1&h&&(e.TgZ(0,"span",19),e._uU(1),e.ALo(2,"slice"),e.qZA()),2&h){const o=e.oxw().$implicit,a=e.oxw();e.Udp("font-size",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(1),e.hij(" ",e.Dn7(2,3,null!=a.selectedPaperFormat&&a.selectedPaperFormat.ProductNamePrefix?(null==a.selectedPaperFormat?null:a.selectedPaperFormat.ProductNamePrefix)+" "+o.getName:o.getName,0,null==a.selectedPaperFormat?null:a.selectedPaperFormat.ProductNameMaxLength)," ")}}function Se(h,v){if(1&h&&(e.TgZ(0,"li"),e.TgZ(1,"div",13),e.YNc(2,me,1,4,"ngx-barcode6",14),e.TgZ(3,"div",15),e.YNc(4,ve,2,3,"span",16),e.YNc(5,Ae,7,4,"span",16),e.YNc(6,be,3,7,"span",16),e.qZA(),e.TgZ(7,"div",17),e._uU(8),e.qZA(),e.qZA(),e.qZA()),2&h){const o=v.index,a=e.oxw();e.Udp("width",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.StickerWidth)+"px")("height",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.StickerHeight)+"px")("margin-right",(o+1)%a.totalStickerPerRow==0?0:(null==a.selectedPaperFormat?null:a.selectedPaperFormat.ColumnSpacing)+"px")("margin-bottom",o>=a.productPreview.length-a.lastIndex?0:(null==a.selectedPaperFormat?null:a.selectedPaperFormat.RowSpacing)+"px"),e.xp6(2),e.Q6J("ngIf",null==a.selectedPaperFormat?null:a.selectedPaperFormat.BarcodeVisible),e.xp6(2),e.Q6J("ngIf",null==a.selectedPaperFormat?null:a.selectedPaperFormat.CodeVisible),e.xp6(1),e.Q6J("ngIf",null==a.selectedPaperFormat?null:a.selectedPaperFormat.PriceVisible),e.xp6(1),e.Q6J("ngIf",null==a.selectedPaperFormat?null:a.selectedPaperFormat.NameVisible),e.xp6(1),e.Udp("font-size",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(1),e.hij(" ",null==a.selectedPaperFormat?null:a.selectedPaperFormat.StoreName," ")}}let Oe=(()=>{class h{constructor(o,a,f,S,E,F){this.dialog=o,this.productStateService=a,this.productService=f,this.barcodeService=S,this.toastService=E,this.authService=F,this.paperFormatOptions=[],this.optionSelected={id:1,name:"Continuous - 3 Column"},this.paperFormats=[],this.totalStickerPerRow=0,this.lastIndex=0,this.destroy$=new T.xQ,this.productPreview=[],this.taxs=[]}ngOnInit(){this.getPaperFormats(),this.checkAuthTax(),this.getVariantSource()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}checkAuthTax(){this.authService.getRoles().find(f=>"StpE"===f)?(this.getProductTax(),this.authTax=!0):this.authTax=!1}getProductTax(){this.productService.getTax().pipe((0,l.R)(this.destroy$)).subscribe(o=>{o&&(this.taxs=o)})}getPaperFormats(){this.barcodeService.getPaperFormatConfig().pipe((0,l.R)(this.destroy$)).subscribe(o=>{o&&(this.paperFormats=o,this.selectedPaperFormat=o[0],this.setSelectedPaperFormat(o[0]),this.initOptionFormat(),this.initOptionSelected(this.selectedPaperFormat))},o=>{console.error(o)})}initOptionFormat(){this.paperFormatOptions=[],this.paperFormats.forEach((o,a)=>{this.paperFormatOptions=[...this.paperFormatOptions,{id:a+1,name:o.Name}]})}initOptionSelected(o){this.optionSelected=this.paperFormatOptions.find(a=>a.name===o.Name)}getVariantSource(){this.productStateService.getState().pipe((0,l.R)(this.destroy$)).subscribe(o=>{this.productPreview=o,this.relayout()})}openSettingModal(){this.dialog.open(se,{width:"850px",data:{paperFormat:this.selectedPaperFormat,taxs:this.taxs,authTax:this.authTax}}).afterClosed().pipe((0,l.R)(this.destroy$)).subscribe(o=>{o&&this.selectedPaperFormat&&(this.updatePaperFormatSource(o),this.updatePaperFormat(),this.setSelectedPaperFormat(o))})}onSelectPaperFormat(){this.getPaperFormatBarcode()}getPaperFormatBarcode(){let a=this.findPaperFormatByName(this.optionSelected.name);this.setSelectedPaperFormat(a)}updatePaperFormat(){this.barcodeService.updatePaperFormatConfig(this.paperFormats).pipe((0,l.R)(this.destroy$)).subscribe(()=>{this.toastService.success("Success Update Paper Format","Success")},o=>{console.error(o)})}setSelectedPaperFormat(o){this.selectedPaperFormat=o,this.barcodeService.setBarcodeConfigState(o),this.relayout(),this.getPPnVal(o)}findPaperFormatByName(o){return this.paperFormats.find(f=>f.Name==o)}updatePaperFormatSource(o){this.paperFormats=this.paperFormats.map(a=>(o.Name===a.Name&&(a=o),a))}getPPnVal(o){this.tax=o.TaxType?o.TaxType.Rate:null}relayout(){var o,a,f,S,E,F;let j=(null===(o=this.selectedPaperFormat)||void 0===o?void 0:o.PaperWidth)?null===(a=this.selectedPaperFormat)||void 0===a?void 0:a.PaperWidth:0,Y=(null===(f=this.selectedPaperFormat)||void 0===f?void 0:f.StickerWidth)?null===(S=this.selectedPaperFormat)||void 0===S?void 0:S.StickerWidth:0,U=(null===(E=this.selectedPaperFormat)||void 0===E?void 0:E.ColumnSpacing)?null===(F=this.selectedPaperFormat)||void 0===F?void 0:F.ColumnSpacing:0,B=Math.floor((j+U)/(Y+U));this.totalStickerPerRow=B;let Re=Math.floor(this.productPreview.length/B),ee=this.productPreview.length-Re*B;this.lastIndex=0===ee?B:ee}}return h.\u0275fac=function(o){return new(o||h)(e.Y36(n.uw),e.Y36(P),e.Y36(W),e.Y36(Z),e.Y36(K._W),e.Y36(A.$))},h.\u0275cmp=e.Xpm({type:h,selectors:[["app-print-preview"]],decls:15,vars:10,consts:[[1,"mt-3","d-print-none"],[1,"card","mt-0","mb-0","paper-barcode"],[1,"card-header","d-flex","justify-content-between","align-items-center","border-bottom","pb-5","d-print-none"],[1,"font-weight-light"],["align","right",2,"width","400px"],[1,"d-inline-block","font-weight-light","text-info","font-italic"],["align","left","bindLabel","name","placeholder","Select Column",1,"d-inline-block","ml-4",3,"items","ngModel","clearable","ngModelChange","change"],[1,"btn","btn","btn-outline-secondary","ml-4",3,"click"],["aria-hidden","true",1,"fa","fa-cog"],[1,"card-body","p-0"],[1,"canvas","clearfix"],[1,"barcodes"],[3,"width","height","margin-right","margin-bottom",4,"ngFor","ngForOf"],[1,"position-relative"],[3,"bc-value","bc-element-type","bc-width","bc-height",4,"ngIf"],[2,"margin-top","-4px","line-height","1"],["class","d-block",3,"font-size",4,"ngIf"],[1,"vertical-text"],[3,"bc-value","bc-element-type","bc-width","bc-height"],[1,"d-block"],[4,"ngIf","ngIfElse"],["WITH_TAX",""],["WITHOUT_TAX",""]],template:function(o,a){1&o&&(e._UZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"div",2),e.TgZ(3,"h1",3),e._uU(4," Print Preview "),e.qZA(),e.TgZ(5,"div",4),e.TgZ(6,"h5",5),e._uU(7,"Paper Source"),e.qZA(),e.TgZ(8,"ng-select",6),e.NdJ("ngModelChange",function(S){return a.optionSelected=S})("change",function(){return a.onSelectPaperFormat()}),e.qZA(),e.TgZ(9,"button",7),e.NdJ("click",function(){return a.openSettingModal()}),e._UZ(10,"i",8),e.qZA(),e.qZA(),e.qZA(),e.TgZ(11,"div",9),e.TgZ(12,"div",10),e.TgZ(13,"ul",11),e.YNc(14,Se,9,15,"li",12),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.xp6(8),e.Q6J("items",a.paperFormatOptions)("ngModel",a.optionSelected)("clearable",!1),e.xp6(4),e.Udp("width",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.PaperWidth)+"px")("margin-top",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.MarginTop)+"px")("margin-left",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.MarginLeft)+"px"),e.xp6(2),e.Q6J("ngForOf",a.productPreview))},directives:[u.w9,c.JJ,c.On,_.sg,_.O5,he],pipes:[_.JJ,ge,_.OU],styles:["ng-select[_ngcontent-%COMP%]{width:50%}.card-header[_ngcontent-%COMP%]{height:65px} div.barcode>img{text-align:center;max-width:100%;border:none;outline:none}@media (max-width: 480px){ div.barcode>img{border:none!important}} div.canvas ul.barcodes li img{display:block;margin:0 auto}.vertical-text[_ngcontent-%COMP%]{transform:rotate(180deg);writing-mode:vertical-rl;position:absolute;right:0px;height:100%;top:8%;text-align:center}"]}),h})(),Ze=(()=>{class h{constructor(o,a,f){this.variantServiceState=o,this.authService=a,this.queryParamService=f,this.domainName=localStorage.getItem("Domain")}onLogout(){this.variantServiceState.setState([]),this.queryParamService.setState(null),this.authService.logout()}}return h.\u0275fac=function(o){return new(o||h)(e.Y36(P),e.Y36(A.$),e.Y36(g.U))},h.\u0275cmp=e.Xpm({type:h,selectors:[["app-pages"]],decls:20,vars:2,consts:[[1,"container"],[1,"row"],[1,"col-4","d-print-none"],[1,"col-8","p-0"],[1,"d-md-block","d-print-none"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"pt-1rem","mr-3"],["target","_blank","href","https://www.dealpos.com"],["src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid"],[1,"col-auto"],[1,"logout","d-print-none"],[3,"href"],[3,"click"],[1,"fa","fa-sign-out-alt"]],template:function(o,a){1&o&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"div",2),e._UZ(3,"app-list-products"),e.qZA(),e.TgZ(4,"div",3),e._UZ(5,"app-print-preview"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(6,"footer",4),e.TgZ(7,"div",5),e.TgZ(8,"div",6),e.TgZ(9,"p",7),e._uU(10,"Powered by : "),e.qZA(),e.TgZ(11,"a",8),e._UZ(12,"img",9),e.qZA(),e.qZA(),e.TgZ(13,"div",10),e.TgZ(14,"div",11),e.TgZ(15,"a",12),e._uU(16),e.qZA(),e.TgZ(17,"h5",13),e.NdJ("click",function(){return a.onLogout()}),e._UZ(18,"span",14),e._uU(19,"\xa0Logout"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.xp6(15),e.MGl("href","https://",a.domainName,"",e.LSH),e.xp6(1),e.Oqu(a.domainName))},directives:[le,Oe],styles:[".logout[_ngcontent-%COMP%]{position:relative;left:2.5vw;top:-5px;font-size:14px;cursor:pointer}footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:-1%}@media (min-height: 720px){footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:12%}}@media (min-height: 768px){footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:16%}}"]}),h})();var Ce=p(8972);const we=[{path:"",component:Ze}];let Ee=(()=>{class h{}return h.\u0275fac=function(o){return new(o||h)},h.\u0275mod=e.oAB({type:h}),h.\u0275inj=e.cJS({imports:[[_.ez,Ce.m,I,pe,y.Bz.forChild(we)]]}),h})()}}]);
@@ -129,7 +129,7 @@ ng-http-loader
129
129
  MIT
130
130
  The MIT License (MIT)
131
131
 
132
- Copyright (c) 2017-2019 mpalourdio
132
+ Copyright (c) 2017-2021 mpalourdio
133
133
 
134
134
  Permission is hereby granted, free of charge, to any person obtaining a copy of
135
135
  this software and associated documentation files (the "Software"), to deal in
@@ -149,9 +149,6 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
149
149
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
150
150
 
151
151
 
152
- ngx-barcode
153
- MIT
154
-
155
152
  ngx-toastr
156
153
  MIT
157
154
  The MIT License (MIT)
@@ -1,24 +1,23 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>DEALPOS Product Barcode Generator - Aplikasi Kasir / Point of Sale for retail business</title>
6
- <base href="/">
7
- <meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate">
8
- <meta http-equiv="Pragma" content="no-cache">
9
- <meta http-equiv="Expires" content="0">
10
- <meta name="viewport" content="width=device-width, initial-scale=1">
11
- <meta name="description" content="DEALPOS Product Barcode Generator - Aplikasi Kasir / Point of Sale for retail business">
12
- <meta name="keywords" content="Barcode, DealPOS, POS">
13
- <link rel="icon" type="image/x-icon" href="favicon.ico">
14
- <link rel="preconnect" href="https://fonts.gstatic.com">
15
- <link href="https:////fonts.googleapis.com/css?family=Roboto:300,400,700|Roboto+Slab:400,700" rel="stylesheet">
16
- <link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
17
- <link rel="manifest" href="manifest.webmanifest">
18
- <meta name="theme-color" content="#1976d2">
19
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dealposbarcode@1.1.9/barcode/styles.0bf721a144e37840b164.css"></head>
20
- <body>
21
- <app-root></app-root>
22
- <noscript>Please enable JavaScript to continue using this application.</noscript>
23
- <script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.1.9/barcode/runtime.da928dae3c1cf123a069.js" defer></script><script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.1.9/barcode/polyfills.94daefd414b8355106ab.js" defer></script><script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.1.9/barcode/main.73c35957c01a956eaafa.js" defer></script></body>
24
- </html>
1
+ <!DOCTYPE html><html lang="en"><head>
2
+ <meta charset="utf-8">
3
+ <title>DEALPOS Product Barcode Generator - Aplikasi Kasir / Point of Sale for retail business</title>
4
+ <base href="/">
5
+ <meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate">
6
+ <meta http-equiv="Pragma" content="no-cache">
7
+ <meta http-equiv="Expires" content="0">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1">
9
+ <meta name="description" content="DEALPOS Product Barcode Generator - Aplikasi Kasir / Point of Sale for retail business">
10
+ <meta name="keywords" content="Barcode, DealPOS, POS">
11
+ <link rel="icon" type="image/x-icon" href="favicon.ico">
12
+ <link rel="preconnect" href="https://fonts.gstatic.com">
13
+ <link href="https:////fonts.googleapis.com/css?family=Roboto:300,400,700|Roboto+Slab:400,700" rel="stylesheet">
14
+ <link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
15
+ <link rel="manifest" href="manifest.webmanifest">
16
+ <meta name="theme-color" content="#1976d2">
17
+ <style>@charset "UTF-8";body{background-color:#cbcbd226}@media print{body{background-color:#fff}}:root{--blue:#337ab7;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#c9302c;--orange:#f6a828;--yellow:#ffc107;--green:#89b03e;--teal:#20c997;--cyan:#17a2b8;--white:#ffffff;--gray:#6c757d;--gray-dark:#343a40;--primary:#337ab7;--secondary:#cccccc;--success:#89b03e;--info:#17a2b8;--warning:#f6a828;--danger:#c9302c;--light:#dddddd;--dark:#4d4d4d;--light-gray:rgba(203, 203, 210, .15);--light-blue:#dfeffc;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0;font-family:"Roboto",sans-serif;font-size:.75rem;font-weight:400;line-height:1.5;color:#333;text-align:left;background-color:#fff}@media (max-width: 991px){body{position:relative}}@media print{html,body{height:auto}body{color:#000!important}}@media print{html,body{background-color:#fff}}html,body{height:100%}body{margin:0;font-family:Arial,Helvetica,sans-serif;background-color:#a8a8af26!important}@page{size:auto}</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.0/barcode/styles.43c2c34807124c9d.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.0/barcode/styles.43c2c34807124c9d.css"></noscript></head>
18
+ <body>
19
+ <app-root></app-root>
20
+ <noscript>Please enable JavaScript to continue using this application.</noscript>
21
+ <script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.0/barcode/runtime.f90eab60d315cd71.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.0/barcode/polyfills.3eeaafac055ac6b7.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.0/barcode/main.632f40c0391a4765.js" type="module"></script>
22
+
23
+ </body></html>