UNPKG

@boom_pk/lowcode-barcode-component

Version:

阿里低代码引擎条形码组件

1 lines 70.1 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React")):"function"==typeof define&&define.amd?define(["React"],t):"object"==typeof exports?exports.BarcodeComponent=t(require("React")):e.BarcodeComponent=t(e.React)}(self,(e=>(()=>{"use strict";var t={23:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(3551))&&r.__esModule?r:{default:r},i=n(6320),a=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e+=(0,i.mod10)(e),e+=(0,i.mod10)(e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(o.default);t.default=a},739:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1135),a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var e=this,t=this.data.match(/.{2}/g).map((function(t){return e.encodePair(t)})).join("");return{data:i.START_BIN+t+i.END_BIN,text:this.text}}},{key:"encodePair",value:function(e){var t=i.BINARIES[e[1]];return i.BINARIES[e[0]].split("").map((function(e,n){return("1"===e?"111":"1")+("1"===t[n]?"000":"0")})).join("")}}]),t}(((r=n(2444))&&r.__esModule?r:{default:r}).default);t.default=a},892:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(9796)),o=i(n(5099));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t={};for(var n in o.default)o.default.hasOwnProperty(n)&&(e.hasAttribute("jsbarcode-"+n.toLowerCase())&&(t[n]=e.getAttribute("jsbarcode-"+n.toLowerCase())),e.hasAttribute("data-"+n.toLowerCase())&&(t[n]=e.getAttribute("data-"+n.toLowerCase())));return t.value=e.getAttribute("jsbarcode-value")||e.getAttribute("data-value"),(0,r.default)(t)}},1087:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(6929),a=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var e=this.data.split("").flatMap((function(e){return i.MULTI_SYMBOLS[e]||e})),n=e.map((function(e){return t.getEncoding(e)})).join(""),r=t.checksum(e,20),o=t.checksum(e.concat(r),15);return{text:this.text,data:t.getEncoding("ÿ")+n+t.getEncoding(r)+t.getEncoding(o)+t.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(e){return i.BINARIES[t.symbolValue(e)]}},{key:"getSymbol",value:function(e){return i.SYMBOLS[e]}},{key:"symbolValue",value:function(e){return i.SYMBOLS.indexOf(e)}},{key:"checksum",value:function(e,n){var r=e.slice().reverse().reduce((function(e,r,o){var i=o%n+1;return e+t.symbolValue(r)*i}),0);return t.getSymbol(r%47)}}]),t}(((r=n(2444))&&r.__esModule?r:{default:r}).default);t.default=a},1133:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.codabar=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),0===e.search(/^[0-9\-\$\:\.\+\/]+$/)&&(e="A"+e+"A");var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.toUpperCase(),n));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push("0");return{text:this.text,data:e.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}(((r=n(2444))&&r.__esModule?r:{default:r}).default);t.codabar=i},1135:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.START_BIN="1010",t.END_BIN="11101",t.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},1271:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),t}(((r=n(1087))&&r.__esModule?r:{default:r}).default);t.default=i},1428:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE39=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=e.toUpperCase(),n.mod43&&(e+=function(e){return a[e]}(function(e){for(var t=0,n=0;n<e.length;n++)t+=f(e[n]);return t%43}(e))),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"encode",value:function(){for(var e=l("*"),t=0;t<this.data.length;t++)e+=l(this.data[t])+"0";return{data:e+=l("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),t}(((r=n(2444))&&r.__esModule?r:{default:r}).default),a=["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","-","."," ","$","/","+","%","*"],u=[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 l(e){return function(e){return u[e].toString(2)}(f(e))}function f(e){return a.indexOf(e)}t.CODE39=i},1490:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e,t){return n({},e,t)}},1509:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE128C=t.CODE128B=t.CODE128A=t.CODE128=void 0;var r=u(n(4845)),o=u(n(3804)),i=u(n(3541)),a=u(n(5798));function u(e){return e&&e.__esModule?e:{default:e}}t.CODE128=r.default,t.CODE128A=o.default,t.CODE128B=i.default,t.CODE128C=a.default},1687:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=(r=n(1490))&&r.__esModule?r:{default:r},a=n(6258),u=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.canvas=t,this.encodings=n,this.options=r}return o(e,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,i.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var e=this.canvas.getContext("2d");e.save(),(0,a.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,a.getTotalWidthOfEncodings)(this.encodings),n=(0,a.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(e,t){var n,r=this.canvas.getContext("2d"),o=t.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,r.fillStyle=e.lineColor;for(var i=0;i<o.length;i++){var a=i*e.width+t.barcodePadding;"1"===o[i]?r.fillRect(a,n,e.width,e.height):o[i]&&r.fillRect(a,n,e.width,e.height*o[i])}}},{key:"drawCanvasText",value:function(e,t){var n,r,o=this.canvas.getContext("2d"),i=e.fontOptions+" "+e.fontSize+"px "+e.font;e.displayValue&&(r="top"==e.textPosition?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,o.font=i,"left"==e.textAlign||t.barcodePadding>0?(n=0,o.textAlign="left"):"right"==e.textAlign?(n=t.width-1,o.textAlign="right"):(n=t.width/2,o.textAlign="center"),o.fillText(t.text,n,r))}},{key:"moveCanvasDrawing",value:function(e){this.canvas.getContext("2d").translate(e.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),e}();t.default=u},1886:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericBarcode=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),t}(((r=n(2444))&&r.__esModule?r:{default:r}).default);t.GenericBarcode=i},2444:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.text=n.text||t,this.options=n}},2700:(e,t)=>{var n;function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var o=t.SET_A=0,i=t.SET_B=1,a=t.SET_C=2,u=(t.SHIFT=98,t.START_A=103),l=t.START_B=104,f=t.START_C=105;t.MODULO=103,t.STOP=106,t.FNC1=207,t.SET_BY_CODE=(r(n={},u,o),r(n,l,i),r(n,f,a),n),t.SWAP={101:o,100:i,99:a},t.A_START_CHAR=String.fromCharCode(208),t.B_START_CHAR=String.fromCharCode(209),t.C_START_CHAR=String.fromCharCode(210),t.A_CHARS="[\0-_È-Ï]",t.B_CHARS="[ -È-Ï]",t.C_CHARS="(Ï*[0-9]{2}Ï*)",t.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]},2727:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1687)),o=a(n(5965)),i=a(n(3528));function a(e){return e&&e.__esModule?e:{default:e}}t.default={CanvasRenderer:r.default,SVGRenderer:o.default,ObjectRenderer:i.default}},2889:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pharmacode=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.number=parseInt(e,10),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"encode",value:function(){for(var e=this.number,t="";!isNaN(e)&&0!=e;)e%2==0?(t="11100"+t,e=(e-2)/2):(t="100"+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),t}(((r=n(2444))&&r.__esModule?r:{default:r}).default);t.pharmacode=i},3528:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.object=t,this.encodings=n,this.options=r}return n(e,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),e}();t.default=r},3541:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=(r=n(3651))&&r.__esModule?r:{default:r},a=n(2700),u=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.B_START_CHAR+e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return new RegExp("^"+a.B_CHARS+"+$").test(this.data)}}]),t}(i.default);t.default=u},3551:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"encode",value:function(){for(var e="110",t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=a(n,4-n.length);for(var r=0;r<n.length;r++)e+="0"==n[r]?"100":"110"}return{data:e+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),t}(((r=n(2444))&&r.__esModule?r:{default:r}).default);function a(e,t){for(var n=0;n<t;n++)e="0"+e;return e}t.default=i},3623:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}},3651:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=(r=n(2444))&&r.__esModule?r:{default:r},a=n(2700),u=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.substring(1),n));return r.bytes=e.split("").map((function(e){return e.charCodeAt(0)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var e=this.bytes,n=e.shift()-105,r=a.SET_BY_CODE[n];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&e.unshift(a.FNC1);var o=t.next(e,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:t.getBar(n)+o.result+t.getBar((o.checksum+n)%a.MODULO)+t.getBar(a.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var e=this.options.ean128||!1;return"string"==typeof e&&(e="true"===e.toLowerCase()),e}}],[{key:"getBar",value:function(e){return a.BARS[e]?a.BARS[e].toString():""}},{key:"correctIndex",value:function(e,t){if(t===a.SET_A){var n=e.shift();return n<32?n+64:n-32}return t===a.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:"next",value:function(e,n,r){if(!e.length)return{result:"",checksum:0};var o=void 0,i=void 0;if(e[0]>=200){i=e.shift()-105;var u=a.SWAP[i];void 0!==u?o=t.next(e,n+1,u):(r!==a.SET_A&&r!==a.SET_B||i!==a.SHIFT||(e[0]=r===a.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),o=t.next(e,n+1,r))}else i=t.correctIndex(e,r),o=t.next(e,n+1,r);var l=i*n;return{result:t.getBar(i)+o.result,checksum:l+o.checksum}}}]),t}(i.default);t.default=u},3781:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(6350)),i=u(n(2444)),a=n(7960);function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],c=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(r.isValid=!1,-1!==e.search(/^[0-9]{6}$/))r.middleDigits=e,r.upcA=p(e,"0"),r.text=n.text||""+r.upcA[0]+e+r.upcA[r.upcA.length-1],r.isValid=!0;else{if(-1===e.search(/^[01][0-9]{7}$/))return l(r);if(r.middleDigits=e.substring(1,e.length-1),r.upcA=p(r.middleDigits,e[0]),r.upcA[r.upcA.length-1]!==e[e.length-1])return l(r);r.isValid=!0}return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var e="";return e+="101",e+=this.encodeMiddleDigits(),{data:e+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var e=[];return this.displayValue&&e.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),e}},{key:"encodeMiddleDigits",value:function(){var e=this.upcA[0],t=this.upcA[this.upcA.length-1],n=c[parseInt(t)][parseInt(e)];return(0,o.default)(this.middleDigits,n)}}]),t}(i.default);function p(e,t){for(var n=parseInt(e[e.length-1]),r=f[n],o="",i=0,u=0;u<r.length;u++){var l=r[u];o+="X"===l?e[i++]:l}return(o=""+t+o)+(0,a.checksum)(o)}t.default=s},3804:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=(r=n(3651))&&r.__esModule?r:{default:r},a=n(2700),u=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.A_START_CHAR+e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return new RegExp("^"+a.A_CHARS+"+$").test(this.data)}}]),t}(i.default);t.default=u},4205:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.api=t}return n(e,[{key:"handleCatch",value:function(e){if("InvalidInputException"!==e.name)throw e;if(this.api._options.valid===this.api._defaults.valid)throw e.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),e}();t.default=r},4250:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(6575),u=(r=n(4754))&&r.__esModule?r:{default:r},l=function(e){return(10-e.substr(0,12).split("").map((function(e){return+e})).reduce((function(e,t,n){return n%2?e+3*t:e+t}),0)%10)%10},f=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),-1!==e.search(/^[0-9]{12}$/)&&(e+=l(e));var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastChar=n.lastChar,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===l(this.data)}},{key:"leftText",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var e=this.data.substr(1,6),n=a.EAN13_STRUCTURE[this.data[0]];return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"leftEncode",this).call(this,e,n)}},{key:"rightText",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var e=this.data.substr(7,6);return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rightEncode",this).call(this,e,"RRRRRR")}},{key:"encodeGuarded",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(e.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),t}(u.default);t.default=f},4754:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(6575),i=a(n(6350));function a(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.fontSize=!n.flat&&n.fontSize>10*n.width?10*n.width:n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(e,t){return this.text.substr(e,t)}},{key:"leftEncode",value:function(e,t){return(0,i.default)(e,t)}},{key:"rightText",value:function(e,t){return this.text.substr(e,t)}},{key:"rightEncode",value:function(e,t){return(0,i.default)(e,t)}},{key:"encodeGuarded",value:function(){var e={fontSize:this.fontSize},t={height:this.guardHeight};return[{data:o.SIDE_BIN,options:t},{data:this.leftEncode(),text:this.leftText(),options:e},{data:o.MIDDLE_BIN,options:t},{data:this.rightEncode(),text:this.rightText(),options:e},{data:o.SIDE_BIN,options:t}]}},{key:"encodeFlat",value:function(){return{data:[o.SIDE_BIN,this.leftEncode(),o.MIDDLE_BIN,this.rightEncode(),o.SIDE_BIN].join(""),text:this.text}}}]),t}(a(n(2444)).default);t.default=u},4802:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(2700),o=function(e){return e.match(new RegExp("^"+r.A_CHARS+"*"))[0].length},i=function(e){return e.match(new RegExp("^"+r.B_CHARS+"*"))[0].length},a=function(e){return e.match(new RegExp("^"+r.C_CHARS+"*"))[0]};function u(e,t){var n=t?r.A_CHARS:r.B_CHARS,o=e.match(new RegExp("^("+n+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(o)return o[1]+String.fromCharCode(204)+l(e.substring(o[1].length));var i=e.match(new RegExp("^"+n+"+"))[0];return i.length===e.length?e:i+String.fromCharCode(t?205:206)+u(e.substring(i.length),!t)}function l(e){var t=a(e),n=t.length;if(n===e.length)return e;e=e.substring(n);var r=o(e)>=i(e);return t+String.fromCharCode(r?206:205)+u(e,r)}t.default=function(e){var t=void 0;if(a(e).length>=2)t=r.C_START_CHAR+l(e);else{var n=o(e)>i(e);t=(n?r.A_START_CHAR:r.B_START_CHAR)+u(e,n)}return t.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,(function(e,t){return String.fromCharCode(203)+t}))}},4845:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(3651)),o=i(n(4802));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(e,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(0,o.default)(e),n));else r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return a(r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default);t.default=u},4883:t=>{t.exports=e},5070:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ITF14=t.ITF=void 0;var r=i(n(739)),o=i(n(8122));function i(e){return e&&e.__esModule?e:{default:e}}t.ITF=r.default,t.ITF14=o.default},5099:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.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(){}}},5726:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UPCE=t.UPC=t.EAN2=t.EAN5=t.EAN8=t.EAN13=void 0;var r=f(n(4250)),o=f(n(8784)),i=f(n(8075)),a=f(n(7570)),u=f(n(7960)),l=f(n(3781));function f(e){return e&&e.__esModule?e:{default:e}}t.EAN13=r.default,t.EAN8=o.default,t.EAN5=i.default,t.EAN2=a.default,t.UPC=u.default,t.UPCE=l.default},5798:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=(r=n(3651))&&r.__esModule?r:{default:r},a=n(2700),u=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.C_START_CHAR+e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return new RegExp("^"+a.C_CHARS+"+$").test(this.data)}}]),t}(i.default);t.default=u},5965:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=(r=n(1490))&&r.__esModule?r:{default:r},a=n(6258),u="http://www.w3.org/2000/svg",l=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return o(e,[{key:"render",value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var n=this.encodings[t],r=(0,i.default)(this.options,n.options),o=this.createGroup(e,r.marginTop,this.svg);this.setGroupOptions(o,r),this.drawSvgBarcode(o,r,n),this.drawSVGText(o,r,n),e+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,a.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,a.getTotalWidthOfEncodings)(this.encodings),t=(0,a.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(e,t,n){var r,o=n.data;r="top"==t.textPosition?t.fontSize+t.textMargin:0;for(var i=0,a=0,u=0;u<o.length;u++)a=u*t.width+n.barcodePadding,"1"===o[u]?i++:i>0&&(this.drawRect(a-t.width*i,r,t.width*i,t.height,e),i=0);i>0&&this.drawRect(a-t.width*(i-1),r,t.width*i,t.height,e)}},{key:"drawSVGText",value:function(e,t,n){var r,o,i=this.document.createElementNS(u,"text");t.displayValue&&(i.setAttribute("style","font:"+t.fontOptions+" "+t.fontSize+"px "+t.font),o="top"==t.textPosition?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,"left"==t.textAlign||n.barcodePadding>0?(r=0,i.setAttribute("text-anchor","start")):"right"==t.textAlign?(r=n.width-1,i.setAttribute("text-anchor","end")):(r=n.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",r),i.setAttribute("y",o),i.appendChild(this.document.createTextNode(n.text)),e.appendChild(i))}},{key:"setSvgAttributes",value:function(e,t){var n=this.svg;n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+e+" "+t),n.setAttribute("xmlns",u),n.setAttribute("version","1.1"),n.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(e,t,n){var r=this.document.createElementNS(u,"g");return r.setAttribute("transform","translate("+e+", "+t+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(e,t){e.setAttribute("style","fill:"+t.lineColor+";")}},{key:"drawRect",value:function(e,t,n,r,o){var i=this.document.createElementNS(u,"rect");return i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("width",n),i.setAttribute("height",r),o.appendChild(i),i}}]),e}();t.default=l},6065:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(3551))&&r.__esModule?r:{default:r},i=n(6320),a=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,i.mod11)(e),n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(o.default);t.default=a},6129:(e,t,n)=>{var r=p(n(9368)),o=p(n(1490)),i=p(n(8165)),a=p(n(3623)),u=p(n(8179)),l=p(n(9796)),f=p(n(4205)),c=n(8157),s=p(n(5099));function p(e){return e&&e.__esModule?e:{default:e}}var d=function(){},h=function(e,t,n){var r=new d;if(void 0===e)throw Error("No element to render on was provided.");return r._renderProperties=(0,u.default)(e),r._encodings=[],r._options=s.default,r._errorHandler=new f.default(r),void 0!==t&&((n=n||{}).format||(n.format=g()),r.options(n)[n.format](t,n).render()),r};for(var y in h.getModule=function(e){return r.default[e]},r.default)r.default.hasOwnProperty(y)&&b(r.default,y);function b(e,t){d.prototype[t]=d.prototype[t.toUpperCase()]=d.prototype[t.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall((function(){r.text=void 0===r.text?void 0:""+r.text;var a=(0,o.default)(i._options,r);a=(0,l.default)(a);var u=e[t],f=v(n,u,a);return i._encodings.push(f),i}))}}function v(e,t,n){var r=new t(e=""+e,n);if(!r.valid())throw new c.InvalidInputException(r.constructor.name,e);var a=r.encode();a=(0,i.default)(a);for(var u=0;u<a.length;u++)a[u].options=(0,o.default)(n,a[u].options);return a}function g(){return r.default.CODE128?"CODE128":Object.keys(r.default)[0]}function _(e,t,n){t=(0,i.default)(t);for(var r=0;r<t.length;r++)t[r].options=(0,o.default)(n,t[r].options),(0,a.default)(t[r].options);(0,a.default)(n),new(0,e.renderer)(e.element,t,n).render(),e.afterRender&&e.afterRender()}d.prototype.options=function(e){return this._options=(0,o.default)(this._options,e),this},d.prototype.blank=function(e){var t=new Array(e+1).join("0");return this._encodings.push({data:t}),this},d.prototype.init=function(){var e;if(this._renderProperties)for(var t in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){e=this._renderProperties[t];var n=(0,o.default)(this._options,e.options);"auto"==n.format&&(n.format=g()),this._errorHandler.wrapBarcodeCall((function(){var t=v(n.value,r.default[n.format.toUpperCase()],n);_(e,t,n)}))}},d.prototype.render=function(){if(!this._renderProperties)throw new c.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)_(this._renderProperties[e],this._encodings,this._options);else _(this._renderProperties,this._encodings,this._options);return this},d.prototype._defaults=s.default,"undefined"!=typeof window&&(window.JsBarcode=h),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each((function(){n.push(this)})),h(n,e,t)}),e.exports=h},6258:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getTotalWidthOfEncodings=t.calculateEncodingAttributes=t.getBarcodePadding=t.getEncodingHeight=t.getMaximumHeightOfEncodings=void 0;var r,o=(r=n(1490))&&r.__esModule?r:{default:r};function i(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function a(e,t,n){if(n.displayValue&&t<e){if("center"==n.textAlign)return Math.floor((e-t)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(e-t)}return 0}function u(e,t,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=t.fontOptions+" "+t.fontSize+"px "+t.font;var o=r.measureText(e);return o?o.width:0}t.getMaximumHeightOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t},t.getEncodingHeight=i,t.getBarcodePadding=a,t.calculateEncodingAttributes=function(e,t,n){for(var r=0;r<e.length;r++){var l,f=e[r],c=(0,o.default)(t,f.options);l=c.displayValue?u(f.text,c,n):0;var s=f.data.length*c.width;f.width=Math.ceil(Math.max(l,s)),f.height=i(f,c),f.barcodePadding=a(l,s,c)}},t.getTotalWidthOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t}},6320:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=2*r%10+Math.floor(2*r/10)}return(10-t%10)%10},t.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var o=parseInt(e[e.length-1-r]);t+=n[r%n.length]*o}return(11-t%11)%11}},6338:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(3551))&&r.__esModule?r:{default:r},i=n(6320),a=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,i.mod10)(e),n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(o.default);t.default=a},6350:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(6575);t.default=function(e,t,n){var o=e.split("").map((function(e,n){return r.BINARIES[t[n]]})).map((function(t,n){return t?t[e[n]]:""}));if(n){var i=e.length-1;o=o.map((function(e,t){return t<i?e+n:e}))}return o.join("")}},6575:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SIDE_BIN="101",t.MIDDLE_BIN="01010",t.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"]},t.EAN2_STRUCTURE=["LL","LG","GL","GG"],t.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],t.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},6929:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SYMBOLS=["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.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],t.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"":["($)","G"],"\b":["($)","H"],"\t":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)