diff --git a/README.md b/README.md index 25f8dd4c..84daf607 100644 --- a/README.md +++ b/README.md @@ -112,14 +112,14 @@ Download or get the CDN link to the script: | Name | Supported barcodes | Size (gzip) | CDN / Download | |------|--------------------|:-----------:|---------------:| -| *All* | *All the barcodes!* | *7 kB* | *[JsBarcode.all.min.js][1]* | -| CODE128 | CODE128 (auto and force mode) | 4.7 kB | [JsBarcode.code128.min.js][2] | -| CODE39 | CODE39 | 3.7 kB | [JsBarcode.code39.min.js][3] | -| EAN / UPC | EAN-13, EAN-8, EAN-5, EAN-2, UPC (A) | 4.2 kB | [JsBarcode.ean-upc.min.js][4] | -| ITF-14 | ITF-14 | 3.5 kB | [JsBarcode.itf-14.min.js][5] | -| ITF | ITF | 3.4 kB | [JsBarcode.itf.min.js][6] | -| MSI | MSI, MSI10, MSI11, MSI1010, MSI1110 | 3.9 kB | [JsBarcode.msi.min.js][7] | -| Pharmacode | Pharmacode | 3.3 kB | [JsBarcode.pharmacode.min.js][8] | +| *All* | *All the barcodes!* | *6.9 kB* | *[JsBarcode.all.min.js][1]* | +| CODE128 | CODE128 (auto and force mode) | 4.6 kB | [JsBarcode.code128.min.js][2] | +| CODE39 | CODE39 | 3.6 kB | [JsBarcode.code39.min.js][3] | +| EAN / UPC | EAN-13, EAN-8, EAN-5, EAN-2, UPC (A) | 4.1 kB | [JsBarcode.ean-upc.min.js][4] | +| ITF-14 | ITF-14 | 3.4 kB | [JsBarcode.itf-14.min.js][5] | +| ITF | ITF | 3.3 kB | [JsBarcode.itf.min.js][6] | +| MSI | MSI, MSI10, MSI11, MSI1010, MSI1110 | 3.8 kB | [JsBarcode.msi.min.js][7] | +| Pharmacode | Pharmacode | 3.2 kB | [JsBarcode.pharmacode.min.js][8] | ### Step 2: Include the script in your code: diff --git a/bin/JsBarcode.js b/bin/JsBarcode.js index 76da0eda..d99136b8 100644 --- a/bin/JsBarcode.js +++ b/bin/JsBarcode.js @@ -147,70 +147,30 @@ API.prototype.init = function () { this._renderProperties = [this._renderProperties]; } - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; + var renderProperty; + for (var i in this._renderProperties) { + renderProperty = this._renderProperties[i]; + var options = (0, _merge2.default)(this._options, renderProperty.options); - try { - for (var _iterator = this._renderProperties[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var renderProperty = _step.value; - - var options = (0, _merge2.default)(this._options, renderProperty.options); - - if (options.format == "auto") { - options.format = autoSelectBarcode(); - } + if (options.format == "auto") { + options.format = autoSelectBarcode(); + } - var text = options.value; + var text = options.value; - var Encoder = _barcodes2.default[options.format.toUpperCase()]; + var Encoder = _barcodes2.default[options.format.toUpperCase()]; - var encoded = encode(text, Encoder, options); + var encoded = encode(text, Encoder, options); - render(renderProperty, encoded, options); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } + render(renderProperty, encoded, options); } }; // The render API call. Calls the real render function. API.prototype.render = function () { if (Array.isArray(this._renderProperties)) { - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = this._renderProperties[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var renderProperty = _step2.value; - - render(renderProperty, this._encodings, this._options); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } + for (var i in this._renderProperties) { + render(this._renderProperties[i], this._encodings, this._options); } } else { render(this._renderProperties, this._encodings, this._options); diff --git a/bin/renderers/svg.js b/bin/renderers/svg.js index 61ac185d..d766ba87 100644 --- a/bin/renderers/svg.js +++ b/bin/renderers/svg.js @@ -83,7 +83,7 @@ function prepareSVG(svg, options, encodings) { svg.setAttribute("xmlns", svgns); svg.setAttribute("version", "1.1"); - svg.style.transform = "translate(0,0)"; + //svg.style.transform = "translate(0,0)"; if (options.background) { svg.style.background = options.background; diff --git a/bower.json b/bower.json index 58ed553a..4a858d09 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "JsBarcode", "main": "dist/JsBarcode.all.min.js", - "version": "3.3.6", + "version": "3.3.7", "homepage": "https://github.com/lindell/JsBarcode", "authors": [ "Johan Lindell " diff --git a/dist/JsBarcode.all.js b/dist/JsBarcode.all.js index 99340761..18ba9233 100644 --- a/dist/JsBarcode.all.js +++ b/dist/JsBarcode.all.js @@ -776,70 +776,30 @@ this._renderProperties = [this._renderProperties]; } - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; + var renderProperty; + for (var i in this._renderProperties) { + renderProperty = this._renderProperties[i]; + var options = (0, _merge2.default)(this._options, renderProperty.options); - try { - for (var _iterator = this._renderProperties[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var renderProperty = _step.value; - - var options = (0, _merge2.default)(this._options, renderProperty.options); - - if (options.format == "auto") { - options.format = autoSelectBarcode(); - } + if (options.format == "auto") { + options.format = autoSelectBarcode(); + } - var text = options.value; + var text = options.value; - var Encoder = _barcodes2.default[options.format.toUpperCase()]; + var Encoder = _barcodes2.default[options.format.toUpperCase()]; - var encoded = encode(text, Encoder, options); + var encoded = encode(text, Encoder, options); - render(renderProperty, encoded, options); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } + render(renderProperty, encoded, options); } }; // The render API call. Calls the real render function. API.prototype.render = function () { if (Array.isArray(this._renderProperties)) { - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = this._renderProperties[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var renderProperty = _step2.value; - - render(renderProperty, this._encodings, this._options); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } + for (var i in this._renderProperties) { + render(this._renderProperties[i], this._encodings, this._options); } } else { render(this._renderProperties, this._encodings, this._options); @@ -2650,7 +2610,7 @@ svg.setAttribute("xmlns", svgns); svg.setAttribute("version", "1.1"); - svg.style.transform = "translate(0,0)"; + //svg.style.transform = "translate(0,0)"; if (options.background) { svg.style.background = options.background; diff --git a/dist/JsBarcode.all.min.js b/dist/JsBarcode.all.min.js index 453e49eb..aa0b2094 100644 --- a/dist/JsBarcode.all.min.js +++ b/dist/JsBarcode.all.min.js @@ -1,2 +1,2 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(e.s=10)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){n(this,t),this.startBin="101",this.endBin="101",this.middleBin="01010",this.Lbinary=["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],this.Gbinary=["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],this.Rbinary=["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"]}return t.prototype.encode=function(t,e,n){var r="";n=n||"";for(var i=0;in;n++)t="0"+t;return t}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(e){n(this,t),this.string=e}return t.prototype.encode=function(){for(var t="110",e=0;e=200)r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):100===r?n=this.nextB(t,e+1):98===r?(t[0]=t[0]>95?t[0]-96:t[0],n=this.nextA(t,e+1)):n=this.nextA(t,e+1);else{var i=t[0];r=32>i?i+64:i-32,t.shift(),n=this.nextA(t,e+1)}var o=this.getEncoding(r),s=r*e;return{result:o+n.result,checksum:s+n.checksum}},t.prototype.nextB=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):101===r?n=this.nextA(t,e+1):98===r?(t[0]=t[0]<32?t[0]+96:t[0],n=this.nextB(t,e+1)):n=this.nextB(t,e+1)):(r=t[0]-32,t.shift(),n=this.nextB(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t.prototype.nextC=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),n=100===r?this.nextB(t,e+1):101===r?this.nextA(t,e+1):this.nextC(t,e+1)):(r=10*(t[0]-48)+t[1]-48,t.shift(),t.shift(),n=this.nextC(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t}();e["default"]=r},function(t,e){"use strict";function n(t){for(var e=0,n=0;n=2?String.fromCharCode(210)+c(t):n>r?String.fromCharCode(208)+u(t):String.fromCharCode(209)+f(t),e=e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}function u(t){var e=t.match(/^([\x00-\x5F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x00-\x5F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(205)+f(t.substring(n[0].length))}function f(t){var e=t.match(/^([\x20-\x7F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x20-\x7F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(206)+u(t.substring(n[0].length))}function c(t){var e=t.match(/^(\xCF*[0-9]{2}\xCF*)+/)[0],n=e.length;if(n===t.length)return t;t=t.substring(n);var r=t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length,i=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length;return r>=i?e+String.fromCharCode(206)+u(t):e+String.fromCharCode(205)+f(t)}Object.defineProperty(e,"__esModule",{value:!0});var h=n(2),l=r(h),d=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));if(-1!==n.search(/^[\x00-\x7F\xC8-\xD3]+$/))var r=o(this,t.call(this,a(n)));else var r=o(this,t.call(this,n));return o(r)}return s(e,t),e}(l["default"]);e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var i=n(14),o=r(i),s=n(11),a=r(s),u=n(12),f=r(u),c=n(13),h=r(c);e.CODE128=o["default"],e.CODE128A=a["default"],e.CODE128B=f["default"],e.CODE128C=h["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e,r){n(this,t),this.string=e.toUpperCase(),this.mod43Enabled=r.mod43||!1,this.characters=["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","-","."," ","$","/","+","%","*"],this.encodings=[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]}return t.prototype.getEncoding=function(t){return this.getBinary(this.characterValue(t))},t.prototype.getBinary=function(t){return this.encodings[t].toString(2)},t.prototype.getCharacter=function(t){return this.characters[t]},t.prototype.characterValue=function(t){return this.characters.indexOf(t)},t.prototype.encode=function(){for(var t=this.string,e=this.getEncoding("*"),n=0;n10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin,this.lastChar=n.lastChar}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{13}$/)&&this.string[12]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[],n=this.structure[this.string[0]],r=this.string.substr(1,6),i=this.string.substr(7,6);return e.push({data:"000000000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:t.encode(r,n),text:r,options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(i,"RRRRRR"),text:i,options:{fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),this.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.lastChar,options:{fontSize:this.fontSize}})),e},t.prototype.checksum=function(t){var e,n=0;for(e=0;12>e;e+=2)n+=parseInt(t[e]);for(e=1;12>e;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),this.string=e,this.structure=["LL","LG","GL","GG"]}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{2}$/)},t.prototype.encode=function(){var t=new s["default"],e=this.structure[parseInt(this.string)%4],n="1011";return n+=t.encode(this.string,e,"01"),{data:n,text:this.string}},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),this.string=e,this.structure=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"]}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{5}$/)},t.prototype.encode=function(){var t=new s["default"],e=this.checksum(),n="1011";return n+=t.encode(this.string,this.structure[e],"01"),{data:n,text:this.string}},t.prototype.checksum=function(){var t=0;return t+=3*parseInt(this.string[0]),t+=9*parseInt(this.string[1]),t+=3*parseInt(this.string[2]),t+=9*parseInt(this.string[3]),t+=3*parseInt(this.string[4]),t%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),-1!==e.search(/^[0-9]{7}$/)?this.string=e+this.checksum(e):this.string=e}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{8}$/)&&this.string[7]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e="",n=this.string.substr(0,4),r=this.string.substr(4,4);return e+=t.startBin,e+=t.encode(n,"LLLL"),e+=t.middleBin,e+=t.encode(r,"RRRR"),e+=t.endBin,{data:e,text:this.string}},t.prototype.checksum=function(t){var e,n=0;for(e=0;7>e;e+=2)n+=3*parseInt(t[e]);for(e=1;7>e;e+=2)n+=parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e,n){i(this,t),-1!==e.search(/^[0-9]{11}$/)?this.string=e+this.checksum(e):this.string=e,n.fontSize>10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{12}$/)&&this.string[11]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[];return e.push({data:"00000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+t.encode(this.string[0],"L"),options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(1,5),"LLLLL"),text:this.string.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(6,5),"RRRRR"),text:this.string.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:t.encode(this.string[11],"R")+"101",options:{height:this.guardHeight}}),e.push({data:"00000000",text:this.string[11],options:{textAlign:"right",fontSize:this.fontSize}}),e},t.prototype.checksum=function(t){var e,n=0;for(e=1;11>e;e+=2)n+=parseInt(t[e]);for(e=0;11>e;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var i=n(17),o=r(i),s=n(20),a=r(s),u=n(19),f=r(u),c=n(18),h=r(c),l=n(21),d=r(l);e.EAN13=o["default"],e.EAN8=a["default"],e.EAN5=f["default"],e.EAN2=h["default"],e.UPC=d["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.string=e}return t.prototype.encode=function(){return{data:"10101010101010101010101010101010101010101",text:this.string}},t.prototype.valid=function(){return!0},t}();e.GenericBarcode=r},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.string=e,this.binaryRepresentation={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"}}return t.prototype.valid=function(){return-1!==this.string.search(/^([0-9]{2})+$/)},t.prototype.encode=function(){for(var t="1010",e=0;ei;i++)e+="1"==n[i]?"111":"1",e+="1"==r[i]?"000":"0";return e},t}();e.ITF=r},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.string=e,-1!==e.search(/^[0-9]{13}$/)&&(this.string+=this.checksum(e)),this.binaryRepresentation={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"}}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{14}$/)&&this.string[13]==this.checksum()},t.prototype.encode=function(){for(var t="1010",e=0;14>e;e+=2)t+=this.calculatePair(this.string.substr(e,2));return t+="11101",{data:t,text:this.string}},t.prototype.calculatePair=function(t){for(var e="",n=this.binaryRepresentation[t[0]],r=this.binaryRepresentation[t[1]],i=0;5>i;i++)e+="1"==n[i]?"111":"1",e+="1"==r[i]?"000":"0";return e},t.prototype.checksum=function(){for(var t=0,e=0;13>e;e++)t+=parseInt(this.string[e])*(3-e%2*2);return 10-t%10},t}();e.ITF14=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),u=r(a),f=n(3),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.string+=(0,f.mod10)(r.string),r}return s(e,t),e}(u["default"]);e["default"]=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),u=r(a),f=n(3),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.string+=(0,f.mod10)(r.string),r.string+=(0,f.mod10)(r.string),r}return s(e,t),e}(u["default"]);e["default"]=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),u=r(a),f=n(3),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.string+=(0,f.mod11)(r.string),r}return s(e,t),e}(u["default"]);e["default"]=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),u=r(a),f=n(3),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.string+=(0,f.mod11)(r.string),r.string+=(0,f.mod10)(r.string),r}return s(e,t),e}(u["default"]);e["default"]=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var i=n(1),o=r(i),s=n(26),a=r(s),u=n(28),f=r(u),c=n(27),h=r(c),l=n(29),d=r(l);e.MSI=o["default"],e.MSI10=a["default"],e.MSI11=f["default"],e.MSI1010=h["default"],e.MSI1110=d["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.number=parseInt(e,10)}return t.prototype.encode=function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2===0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return e=e.slice(0,-2),{data:e,text:this.number+""}},t.prototype.valid=function(){return this.number>=3&&this.number<=131070},t}();e.pharmacode=r},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var n in e)n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,n,e);for(var r=0;r0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,l=0;a.displayValue&&u>f&&("center"==a.textAlign?l=Math.floor((u-f)/2):"left"==a.textAlign?l=0:"right"==a.textAlign&&(l=Math.floor(u-f))),n[s].barcodePadding=l,c>o&&(o=c),i+=n[s].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,r.clearRect(0,0,t.width,t.height),e.background&&(r.fillStyle=e.background,r.fillRect(0,0,t.width,t.height)),r.translate(e.marginLeft,0)}function s(t,e,n){var r,i,o=t.getContext("2d"),s=n.data;r="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var a=0;a0?(o=0,r.textAlign="left"):"right"==e.textAlign?(o=n.width-1,r.textAlign="right"):(o=n.width/2,r.textAlign="center"),r.fillText(n.text,o,s)}}function u(t,e){var n=t.getContext("2d");n.translate(e.width,0)}function f(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var c=n(4),h=r(c);e["default"]=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){var r=n.marginLeft;o(t,n,e);for(var i=0;i0?s.fontSize:0)+s.textMargin+s.marginTop+s.marginBottom,h=0;s.displayValue&&a>f&&("center"==s.textAlign?h=Math.floor((a-f)/2):"left"==s.textAlign?h=0:"right"==s.textAlign&&(h=Math.floor(a-f))),n[o].barcodePadding=h,c>i&&(i=c),r+=n[o].width}var l=r+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",l+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+l+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),t.style.transform="translate(0,0)",e.background&&(t.style.background=e.background)}function s(t,e,n){var r,i,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var s=0,a=0;a0&&(h(u-e.width*s,r,e.width*s,e.height,t),s=0)}s>0&&h(u-e.width*(s-1),r,e.width*s,e.height,t)}function a(t,e,n){var r=document.createElementNS(p,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}}function u(t,e,n){var r=document.createElement("canvas").getContext("2d");r.font=n.fontOptions+" "+n.fontSize+"px "+n.font;var i=r.measureText(t).width;return i}function f(t,e,n){var r=document.createElementNS(p,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function c(t,e,n){t.setAttribute("style","fill:"+e.lineColor+";")}function h(t,e,n,r,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(4),d=r(l);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(e.s=10)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){n(this,t),this.startBin="101",this.endBin="101",this.middleBin="01010",this.Lbinary=["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],this.Gbinary=["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],this.Rbinary=["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"]}return t.prototype.encode=function(t,e,n){var r="";n=n||"";for(var i=0;in;n++)t="0"+t;return t}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(e){n(this,t),this.string=e}return t.prototype.encode=function(){for(var t="110",e=0;e=200)r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):100===r?n=this.nextB(t,e+1):98===r?(t[0]=t[0]>95?t[0]-96:t[0],n=this.nextA(t,e+1)):n=this.nextA(t,e+1);else{var i=t[0];r=32>i?i+64:i-32,t.shift(),n=this.nextA(t,e+1)}var o=this.getEncoding(r),s=r*e;return{result:o+n.result,checksum:s+n.checksum}},t.prototype.nextB=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):101===r?n=this.nextA(t,e+1):98===r?(t[0]=t[0]<32?t[0]+96:t[0],n=this.nextB(t,e+1)):n=this.nextB(t,e+1)):(r=t[0]-32,t.shift(),n=this.nextB(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t.prototype.nextC=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),n=100===r?this.nextB(t,e+1):101===r?this.nextA(t,e+1):this.nextC(t,e+1)):(r=10*(t[0]-48)+t[1]-48,t.shift(),t.shift(),n=this.nextC(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t}();e["default"]=r},function(t,e){"use strict";function n(t){for(var e=0,n=0;n=2?String.fromCharCode(210)+c(t):n>r?String.fromCharCode(208)+u(t):String.fromCharCode(209)+f(t),e=e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}function u(t){var e=t.match(/^([\x00-\x5F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x00-\x5F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(205)+f(t.substring(n[0].length))}function f(t){var e=t.match(/^([\x20-\x7F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x20-\x7F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(206)+u(t.substring(n[0].length))}function c(t){var e=t.match(/^(\xCF*[0-9]{2}\xCF*)+/)[0],n=e.length;if(n===t.length)return t;t=t.substring(n);var r=t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length,i=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length;return r>=i?e+String.fromCharCode(206)+u(t):e+String.fromCharCode(205)+f(t)}Object.defineProperty(e,"__esModule",{value:!0});var h=n(2),l=r(h),d=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));if(-1!==n.search(/^[\x00-\x7F\xC8-\xD3]+$/))var r=o(this,t.call(this,a(n)));else var r=o(this,t.call(this,n));return o(r)}return s(e,t),e}(l["default"]);e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var i=n(14),o=r(i),s=n(11),a=r(s),u=n(12),f=r(u),c=n(13),h=r(c);e.CODE128=o["default"],e.CODE128A=a["default"],e.CODE128B=f["default"],e.CODE128C=h["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e,r){n(this,t),this.string=e.toUpperCase(),this.mod43Enabled=r.mod43||!1,this.characters=["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","-","."," ","$","/","+","%","*"],this.encodings=[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]}return t.prototype.getEncoding=function(t){return this.getBinary(this.characterValue(t))},t.prototype.getBinary=function(t){return this.encodings[t].toString(2)},t.prototype.getCharacter=function(t){return this.characters[t]},t.prototype.characterValue=function(t){return this.characters.indexOf(t)},t.prototype.encode=function(){for(var t=this.string,e=this.getEncoding("*"),n=0;n10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin,this.lastChar=n.lastChar}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{13}$/)&&this.string[12]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[],n=this.structure[this.string[0]],r=this.string.substr(1,6),i=this.string.substr(7,6);return e.push({data:"000000000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:t.encode(r,n),text:r,options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(i,"RRRRRR"),text:i,options:{fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),this.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.lastChar,options:{fontSize:this.fontSize}})),e},t.prototype.checksum=function(t){var e,n=0;for(e=0;12>e;e+=2)n+=parseInt(t[e]);for(e=1;12>e;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),this.string=e,this.structure=["LL","LG","GL","GG"]}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{2}$/)},t.prototype.encode=function(){var t=new s["default"],e=this.structure[parseInt(this.string)%4],n="1011";return n+=t.encode(this.string,e,"01"),{data:n,text:this.string}},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),this.string=e,this.structure=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"]}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{5}$/)},t.prototype.encode=function(){var t=new s["default"],e=this.checksum(),n="1011";return n+=t.encode(this.string,this.structure[e],"01"),{data:n,text:this.string}},t.prototype.checksum=function(){var t=0;return t+=3*parseInt(this.string[0]),t+=9*parseInt(this.string[1]),t+=3*parseInt(this.string[2]),t+=9*parseInt(this.string[3]),t+=3*parseInt(this.string[4]),t%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),-1!==e.search(/^[0-9]{7}$/)?this.string=e+this.checksum(e):this.string=e}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{8}$/)&&this.string[7]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e="",n=this.string.substr(0,4),r=this.string.substr(4,4);return e+=t.startBin,e+=t.encode(n,"LLLL"),e+=t.middleBin,e+=t.encode(r,"RRRR"),e+=t.endBin,{data:e,text:this.string}},t.prototype.checksum=function(t){var e,n=0;for(e=0;7>e;e+=2)n+=3*parseInt(t[e]);for(e=1;7>e;e+=2)n+=parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e,n){i(this,t),-1!==e.search(/^[0-9]{11}$/)?this.string=e+this.checksum(e):this.string=e,n.fontSize>10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{12}$/)&&this.string[11]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[];return e.push({data:"00000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+t.encode(this.string[0],"L"),options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(1,5),"LLLLL"),text:this.string.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(6,5),"RRRRR"),text:this.string.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:t.encode(this.string[11],"R")+"101",options:{height:this.guardHeight}}),e.push({data:"00000000",text:this.string[11],options:{textAlign:"right",fontSize:this.fontSize}}),e},t.prototype.checksum=function(t){var e,n=0;for(e=1;11>e;e+=2)n+=parseInt(t[e]);for(e=0;11>e;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var i=n(17),o=r(i),s=n(20),a=r(s),u=n(19),f=r(u),c=n(18),h=r(c),l=n(21),d=r(l);e.EAN13=o["default"],e.EAN8=a["default"],e.EAN5=f["default"],e.EAN2=h["default"],e.UPC=d["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.string=e}return t.prototype.encode=function(){return{data:"10101010101010101010101010101010101010101",text:this.string}},t.prototype.valid=function(){return!0},t}();e.GenericBarcode=r},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.string=e,this.binaryRepresentation={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"}}return t.prototype.valid=function(){return-1!==this.string.search(/^([0-9]{2})+$/)},t.prototype.encode=function(){for(var t="1010",e=0;ei;i++)e+="1"==n[i]?"111":"1",e+="1"==r[i]?"000":"0";return e},t}();e.ITF=r},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.string=e,-1!==e.search(/^[0-9]{13}$/)&&(this.string+=this.checksum(e)),this.binaryRepresentation={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"}}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{14}$/)&&this.string[13]==this.checksum()},t.prototype.encode=function(){for(var t="1010",e=0;14>e;e+=2)t+=this.calculatePair(this.string.substr(e,2));return t+="11101",{data:t,text:this.string}},t.prototype.calculatePair=function(t){for(var e="",n=this.binaryRepresentation[t[0]],r=this.binaryRepresentation[t[1]],i=0;5>i;i++)e+="1"==n[i]?"111":"1",e+="1"==r[i]?"000":"0";return e},t.prototype.checksum=function(){for(var t=0,e=0;13>e;e++)t+=parseInt(this.string[e])*(3-e%2*2);return 10-t%10},t}();e.ITF14=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),u=r(a),f=n(3),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.string+=(0,f.mod10)(r.string),r}return s(e,t),e}(u["default"]);e["default"]=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),u=r(a),f=n(3),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.string+=(0,f.mod10)(r.string),r.string+=(0,f.mod10)(r.string),r}return s(e,t),e}(u["default"]);e["default"]=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),u=r(a),f=n(3),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.string+=(0,f.mod11)(r.string),r}return s(e,t),e}(u["default"]);e["default"]=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),u=r(a),f=n(3),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.string+=(0,f.mod11)(r.string),r.string+=(0,f.mod10)(r.string),r}return s(e,t),e}(u["default"]);e["default"]=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var i=n(1),o=r(i),s=n(26),a=r(s),u=n(28),f=r(u),c=n(27),h=r(c),l=n(29),d=r(l);e.MSI=o["default"],e.MSI10=a["default"],e.MSI11=f["default"],e.MSI1010=h["default"],e.MSI1110=d["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.number=parseInt(e,10)}return t.prototype.encode=function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2===0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return e=e.slice(0,-2),{data:e,text:this.number+""}},t.prototype.valid=function(){return this.number>=3&&this.number<=131070},t}();e.pharmacode=r},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var n in e)n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,n,e);for(var r=0;r0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,l=0;a.displayValue&&u>f&&("center"==a.textAlign?l=Math.floor((u-f)/2):"left"==a.textAlign?l=0:"right"==a.textAlign&&(l=Math.floor(u-f))),n[s].barcodePadding=l,c>o&&(o=c),i+=n[s].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,r.clearRect(0,0,t.width,t.height),e.background&&(r.fillStyle=e.background,r.fillRect(0,0,t.width,t.height)),r.translate(e.marginLeft,0)}function s(t,e,n){var r,i,o=t.getContext("2d"),s=n.data;r="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var a=0;a0?(o=0,r.textAlign="left"):"right"==e.textAlign?(o=n.width-1,r.textAlign="right"):(o=n.width/2,r.textAlign="center"),r.fillText(n.text,o,s)}}function u(t,e){var n=t.getContext("2d");n.translate(e.width,0)}function f(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var c=n(4),h=r(c);e["default"]=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){var r=n.marginLeft;o(t,n,e);for(var i=0;i0?s.fontSize:0)+s.textMargin+s.marginTop+s.marginBottom,h=0; +s.displayValue&&a>f&&("center"==s.textAlign?h=Math.floor((a-f)/2):"left"==s.textAlign?h=0:"right"==s.textAlign&&(h=Math.floor(a-f))),n[o].barcodePadding=h,c>i&&(i=c),r+=n[o].width}var l=r+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",l+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+l+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),e.background&&(t.style.background=e.background)}function s(t,e,n){var r,i,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var s=0,a=0;a0&&(h(u-e.width*s,r,e.width*s,e.height,t),s=0)}s>0&&h(u-e.width*(s-1),r,e.width*s,e.height,t)}function a(t,e,n){var r=document.createElementNS(p,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}}function u(t,e,n){var r=document.createElement("canvas").getContext("2d");r.font=n.fontOptions+" "+n.fontSize+"px "+n.font;var i=r.measureText(t).width;return i}function f(t,e,n){var r=document.createElementNS(p,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function c(t,e,n){t.setAttribute("style","fill:"+e.lineColor+";")}function h(t,e,n,r,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(4),d=r(l);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file diff --git a/dist/barcodes/JsBarcode.code128.min.js b/dist/barcodes/JsBarcode.code128.min.js index a2cf013b..fcaac91d 100644 --- a/dist/barcodes/JsBarcode.code128.min.js +++ b/dist/barcodes/JsBarcode.code128.min.js @@ -1 +1 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(e.s=7)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.bytes=[];for(var r=0;r=200)r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):100===r?n=this.nextB(t,e+1):98===r?(t[0]=t[0]>95?t[0]-96:t[0],n=this.nextA(t,e+1)):n=this.nextA(t,e+1);else{var i=t[0];r=32>i?i+64:i-32,t.shift(),n=this.nextA(t,e+1)}var o=this.getEncoding(r),a=r*e;return{result:o+n.result,checksum:a+n.checksum}},t.prototype.nextB=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):101===r?n=this.nextA(t,e+1):98===r?(t[0]=t[0]<32?t[0]+96:t[0],n=this.nextB(t,e+1)):n=this.nextB(t,e+1)):(r=t[0]-32,t.shift(),n=this.nextB(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t.prototype.nextC=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),n=100===r?this.nextB(t,e+1):101===r?this.nextA(t,e+1):this.nextC(t,e+1)):(r=10*(t[0]-48)+t[1]-48,t.shift(),t.shift(),n=this.nextC(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t}();e["default"]=r},function(t,e){"use strict";function n(t,e){var n,r={};for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);for(n in e)e.hasOwnProperty(n)&&"undefined"!=typeof e[n]&&(r[n]=e[n]);return r}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12);e["default"]={CODE128:r.CODE128,CODE128A:r.CODE128A,CODE128B:r.CODE128B,CODE128C:r.CODE128C}},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var n={};for(var r in e)t.hasAttribute("jsbarcode-"+r.toLowerCase())&&(n[r]=t.getAttribute("jsbarcode-"+r.toLowerCase())),t.hasAttribute("data-"+r.toLowerCase())&&(n[r]=t.getAttribute("data-"+r.toLowerCase()));return n.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),n=(0,a["default"])(n)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(13),a=r(o);e["default"]=i},function(t,e){"use strict";function n(t){function e(t){if(Array.isArray(t))for(var r=0;r=2?String.fromCharCode(210)+l(t):n>r?String.fromCharCode(208)+s(t):String.fromCharCode(209)+f(t),e=e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}function s(t){var e=t.match(/^([\x00-\x5F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+l(t.substring(e[1].length));var n=t.match(/^[\x00-\x5F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(205)+f(t.substring(n[0].length))}function f(t){var e=t.match(/^([\x20-\x7F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+l(t.substring(e[1].length));var n=t.match(/^[\x20-\x7F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(206)+s(t.substring(n[0].length))}function l(t){var e=t.match(/^(\xCF*[0-9]{2}\xCF*)+/)[0],n=e.length;if(n===t.length)return t;t=t.substring(n);var r=t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length,i=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length;return r>=i?e+String.fromCharCode(206)+s(t):e+String.fromCharCode(205)+f(t)}Object.defineProperty(e,"__esModule",{value:!0});var c=n(0),d=r(c),h=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));if(-1!==n.search(/^[\x00-\x7F\xC8-\xD3]+$/))var r=o(this,t.call(this,u(n)));else var r=o(this,t.call(this,n));return o(r)}return a(e,t),e}(d["default"]);e["default"]=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var i=n(11),o=r(i),a=n(8),u=r(a),s=n(9),f=r(s),l=n(10),c=r(l);e.CODE128=o["default"],e.CODE128A=u["default"],e.CODE128B=f["default"],e.CODE128C=c["default"]},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var n in e)n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,n,e);for(var r=0;r0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,d=0;u.displayValue&&s>f&&("center"==u.textAlign?d=Math.floor((s-f)/2):"left"==u.textAlign?d=0:"right"==u.textAlign&&(d=Math.floor(s-f))),n[a].barcodePadding=d,l>o&&(o=l),i+=n[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,r.clearRect(0,0,t.width,t.height),e.background&&(r.fillStyle=e.background,r.fillRect(0,0,t.width,t.height)),r.translate(e.marginLeft,0)}function a(t,e,n){var r,i,o=t.getContext("2d"),a=n.data;r="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var u=0;u0?(o=0,r.textAlign="left"):"right"==e.textAlign?(o=n.width-1,r.textAlign="right"):(o=n.width/2,r.textAlign="center"),r.fillText(n.text,o,a)}}function s(t,e){var n=t.getContext("2d");n.translate(e.width,0)}function f(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var l=n(1),c=r(l);e["default"]=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){var r=n.marginLeft;o(t,n,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,c=0;a.displayValue&&u>f&&("center"==a.textAlign?c=Math.floor((u-f)/2):"left"==a.textAlign?c=0:"right"==a.textAlign&&(c=Math.floor(u-f))),n[o].barcodePadding=c,l>i&&(i=l),r+=n[o].width}var d=r+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",d+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+d+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),t.style.transform="translate(0,0)",e.background&&(t.style.background=e.background)}function a(t,e,n){var r,i,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,u=0;u0&&(c(s-e.width*a,r,e.width*a,e.height,t),a=0)}a>0&&c(s-e.width*(a-1),r,e.width*a,e.height,t)}function u(t,e,n){var r=document.createElementNS(p,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}}function s(t,e,n){var r=document.createElement("canvas").getContext("2d");r.font=n.fontOptions+" "+n.fontSize+"px "+n.font;var i=r.measureText(t).width;return i}function f(t,e,n){var r=document.createElementNS(p,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function l(t,e,n){t.setAttribute("style","fill:"+e.lineColor+";")}function c(t,e,n,r,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var d=n(1),h=r(d);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(e.s=7)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.bytes=[];for(var r=0;r=200)r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):100===r?n=this.nextB(t,e+1):98===r?(t[0]=t[0]>95?t[0]-96:t[0],n=this.nextA(t,e+1)):n=this.nextA(t,e+1);else{var i=t[0];r=32>i?i+64:i-32,t.shift(),n=this.nextA(t,e+1)}var o=this.getEncoding(r),a=r*e;return{result:o+n.result,checksum:a+n.checksum}},t.prototype.nextB=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):101===r?n=this.nextA(t,e+1):98===r?(t[0]=t[0]<32?t[0]+96:t[0],n=this.nextB(t,e+1)):n=this.nextB(t,e+1)):(r=t[0]-32,t.shift(),n=this.nextB(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t.prototype.nextC=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),n=100===r?this.nextB(t,e+1):101===r?this.nextA(t,e+1):this.nextC(t,e+1)):(r=10*(t[0]-48)+t[1]-48,t.shift(),t.shift(),n=this.nextC(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t}();e["default"]=r},function(t,e){"use strict";function n(t,e){var n,r={};for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);for(n in e)e.hasOwnProperty(n)&&"undefined"!=typeof e[n]&&(r[n]=e[n]);return r}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12);e["default"]={CODE128:r.CODE128,CODE128A:r.CODE128A,CODE128B:r.CODE128B,CODE128C:r.CODE128C}},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var n={};for(var r in e)t.hasAttribute("jsbarcode-"+r.toLowerCase())&&(n[r]=t.getAttribute("jsbarcode-"+r.toLowerCase())),t.hasAttribute("data-"+r.toLowerCase())&&(n[r]=t.getAttribute("data-"+r.toLowerCase()));return n.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),n=(0,a["default"])(n)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(13),a=r(o);e["default"]=i},function(t,e){"use strict";function n(t){function e(t){if(Array.isArray(t))for(var r=0;r=2?String.fromCharCode(210)+l(t):n>r?String.fromCharCode(208)+s(t):String.fromCharCode(209)+f(t),e=e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}function s(t){var e=t.match(/^([\x00-\x5F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+l(t.substring(e[1].length));var n=t.match(/^[\x00-\x5F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(205)+f(t.substring(n[0].length))}function f(t){var e=t.match(/^([\x20-\x7F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+l(t.substring(e[1].length));var n=t.match(/^[\x20-\x7F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(206)+s(t.substring(n[0].length))}function l(t){var e=t.match(/^(\xCF*[0-9]{2}\xCF*)+/)[0],n=e.length;if(n===t.length)return t;t=t.substring(n);var r=t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length,i=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length;return r>=i?e+String.fromCharCode(206)+s(t):e+String.fromCharCode(205)+f(t)}Object.defineProperty(e,"__esModule",{value:!0});var c=n(0),d=r(c),h=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));if(-1!==n.search(/^[\x00-\x7F\xC8-\xD3]+$/))var r=o(this,t.call(this,u(n)));else var r=o(this,t.call(this,n));return o(r)}return a(e,t),e}(d["default"]);e["default"]=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var i=n(11),o=r(i),a=n(8),u=r(a),s=n(9),f=r(s),l=n(10),c=r(l);e.CODE128=o["default"],e.CODE128A=u["default"],e.CODE128B=f["default"],e.CODE128C=c["default"]},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var n in e)n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,n,e);for(var r=0;r0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,d=0;u.displayValue&&s>f&&("center"==u.textAlign?d=Math.floor((s-f)/2):"left"==u.textAlign?d=0:"right"==u.textAlign&&(d=Math.floor(s-f))),n[a].barcodePadding=d,l>o&&(o=l),i+=n[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,r.clearRect(0,0,t.width,t.height),e.background&&(r.fillStyle=e.background,r.fillRect(0,0,t.width,t.height)),r.translate(e.marginLeft,0)}function a(t,e,n){var r,i,o=t.getContext("2d"),a=n.data;r="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var u=0;u0?(o=0,r.textAlign="left"):"right"==e.textAlign?(o=n.width-1,r.textAlign="right"):(o=n.width/2,r.textAlign="center"),r.fillText(n.text,o,a)}}function s(t,e){var n=t.getContext("2d");n.translate(e.width,0)}function f(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var l=n(1),c=r(l);e["default"]=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){var r=n.marginLeft;o(t,n,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,c=0;a.displayValue&&u>f&&("center"==a.textAlign?c=Math.floor((u-f)/2):"left"==a.textAlign?c=0:"right"==a.textAlign&&(c=Math.floor(u-f))),n[o].barcodePadding=c,l>i&&(i=l),r+=n[o].width}var d=r+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",d+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+d+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),e.background&&(t.style.background=e.background)}function a(t,e,n){var r,i,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,u=0;u0&&(c(s-e.width*a,r,e.width*a,e.height,t),a=0)}a>0&&c(s-e.width*(a-1),r,e.width*a,e.height,t)}function u(t,e,n){var r=document.createElementNS(p,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}}function s(t,e,n){var r=document.createElement("canvas").getContext("2d");r.font=n.fontOptions+" "+n.fontSize+"px "+n.font;var i=r.measureText(t).width;return i}function f(t,e,n){var r=document.createElementNS(p,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function l(t,e,n){t.setAttribute("style","fill:"+e.lineColor+";")}function c(t,e,n,r,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var d=n(1),h=r(d);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file diff --git a/dist/barcodes/JsBarcode.code39.min.js b/dist/barcodes/JsBarcode.code39.min.js index 3db606b5..6763ac06 100644 --- a/dist/barcodes/JsBarcode.code39.min.js +++ b/dist/barcodes/JsBarcode.code39.min.js @@ -1 +1 @@ -!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(e.s=6)}([function(t,e){"use strict";function r(t,e){var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);for(r in e)e.hasOwnProperty(r)&&"undefined"!=typeof e[r]&&(n[r]=e[r]);return n}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7);e["default"]={CODE39:n.CODE39}},function(t,e){"use strict";function r(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in e)t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(r[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(r[n]=t.getAttribute("data-"+n.toLowerCase()));return r.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),r=(0,a["default"])(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),a=n(o);e["default"]=i},function(t,e){"use strict";function r(t){function e(t){if(Array.isArray(t))for(var n=0;n0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,h=0;u.displayValue&&s>f&&("center"==u.textAlign?h=Math.floor((s-f)/2):"left"==u.textAlign?h=0:"right"==u.textAlign&&(h=Math.floor(s-f))),r[a].barcodePadding=h,d>o&&(o=d),i+=r[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,n.clearRect(0,0,t.width,t.height),e.background&&(n.fillStyle=e.background,n.fillRect(0,0,t.width,t.height)),n.translate(e.marginLeft,0)}function a(t,e,r){var n,i,o=t.getContext("2d"),a=r.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var u=0;u0?(o=0,n.textAlign="left"):"right"==e.textAlign?(o=r.width-1,n.textAlign="right"):(o=r.width/2,n.textAlign="center"),n.fillText(r.text,o,a)}}function s(t,e){var r=t.getContext("2d");r.translate(e.width,0)}function f(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var d=r(0),l=n(d);e["default"]=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){var n=r.marginLeft;o(t,r,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,l=0;a.displayValue&&u>f&&("center"==a.textAlign?l=Math.floor((u-f)/2):"left"==a.textAlign?l=0:"right"==a.textAlign&&(l=Math.floor(u-f))),r[o].barcodePadding=l,d>i&&(i=d),n+=r[o].width}var h=n+e.marginLeft+e.marginRight,p=i;t.setAttribute("width",h+"px"),t.setAttribute("height",p+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+h+" "+p),t.setAttribute("xmlns",g),t.setAttribute("version","1.1"),t.style.transform="translate(0,0)",e.background&&(t.style.background=e.background)}function a(t,e,r){var n,i,o=r.data;n="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,u=0;u0&&(l(s-e.width*a,n,e.width*a,e.height,t),a=0)}a>0&&l(s-e.width*(a-1),n,e.width*a,e.height,t)}function u(t,e,r){var n=document.createElementNS(g,"text");if(e.displayValue){var i,o;n.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||r.barcodePadding>0?(i=0,n.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=r.width-1,n.setAttribute("text-anchor","end")):(i=r.width/2,n.setAttribute("text-anchor","middle")),n.setAttribute("x",i),n.setAttribute("y",o),n.appendChild(document.createTextNode(r.text)),t.appendChild(n)}}function s(t,e,r){var n=document.createElement("canvas").getContext("2d");n.font=r.fontOptions+" "+r.fontSize+"px "+r.font;var i=n.measureText(t).width;return i}function f(t,e,r){var n=document.createElementNS(g,"g");return n.setAttribute("transform","translate("+t+", "+e+")"),r.appendChild(n),n}function d(t,e,r){t.setAttribute("style","fill:"+e.lineColor+";")}function l(t,e,r,n,i){var o=document.createElementNS(g,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",r),o.setAttribute("height",n),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var h=r(0),c=n(h);e["default"]=i;var g="http://www.w3.org/2000/svg"}]); \ No newline at end of file +!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(e.s=6)}([function(t,e){"use strict";function r(t,e){var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);for(r in e)e.hasOwnProperty(r)&&"undefined"!=typeof e[r]&&(n[r]=e[r]);return n}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7);e["default"]={CODE39:n.CODE39}},function(t,e){"use strict";function r(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in e)t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(r[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(r[n]=t.getAttribute("data-"+n.toLowerCase()));return r.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),r=(0,a["default"])(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),a=n(o);e["default"]=i},function(t,e){"use strict";function r(t){function e(t){if(Array.isArray(t))for(var n=0;n0?s.fontSize:0)+s.textMargin+s.marginTop+s.marginBottom,h=0;s.displayValue&&u>f&&("center"==s.textAlign?h=Math.floor((u-f)/2):"left"==s.textAlign?h=0:"right"==s.textAlign&&(h=Math.floor(u-f))),r[a].barcodePadding=h,d>o&&(o=d),i+=r[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,n.clearRect(0,0,t.width,t.height),e.background&&(n.fillStyle=e.background,n.fillRect(0,0,t.width,t.height)),n.translate(e.marginLeft,0)}function a(t,e,r){var n,i,o=t.getContext("2d"),a=r.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var s=0;s0?(o=0,n.textAlign="left"):"right"==e.textAlign?(o=r.width-1,n.textAlign="right"):(o=r.width/2,n.textAlign="center"),n.fillText(r.text,o,a)}}function u(t,e){var r=t.getContext("2d");r.translate(e.width,0)}function f(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var d=r(0),l=n(d);e["default"]=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){var n=r.marginLeft;o(t,r,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,l=0;a.displayValue&&s>f&&("center"==a.textAlign?l=Math.floor((s-f)/2):"left"==a.textAlign?l=0:"right"==a.textAlign&&(l=Math.floor(s-f))),r[o].barcodePadding=l,d>i&&(i=d),n+=r[o].width}var h=n+e.marginLeft+e.marginRight,p=i;t.setAttribute("width",h+"px"),t.setAttribute("height",p+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+h+" "+p),t.setAttribute("xmlns",g),t.setAttribute("version","1.1"),e.background&&(t.style.background=e.background)}function a(t,e,r){var n,i,o=r.data;n="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,s=0;s0&&(l(u-e.width*a,n,e.width*a,e.height,t),a=0)}a>0&&l(u-e.width*(a-1),n,e.width*a,e.height,t)}function s(t,e,r){var n=document.createElementNS(g,"text");if(e.displayValue){var i,o;n.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||r.barcodePadding>0?(i=0,n.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=r.width-1,n.setAttribute("text-anchor","end")):(i=r.width/2,n.setAttribute("text-anchor","middle")),n.setAttribute("x",i),n.setAttribute("y",o),n.appendChild(document.createTextNode(r.text)),t.appendChild(n)}}function u(t,e,r){var n=document.createElement("canvas").getContext("2d");n.font=r.fontOptions+" "+r.fontSize+"px "+r.font;var i=n.measureText(t).width;return i}function f(t,e,r){var n=document.createElementNS(g,"g");return n.setAttribute("transform","translate("+t+", "+e+")"),r.appendChild(n),n}function d(t,e,r){t.setAttribute("style","fill:"+e.lineColor+";")}function l(t,e,r,n,i){var o=document.createElementNS(g,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",r),o.setAttribute("height",n),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var h=r(0),c=n(h);e["default"]=i;var g="http://www.w3.org/2000/svg"}]); \ No newline at end of file diff --git a/dist/barcodes/JsBarcode.ean-upc.min.js b/dist/barcodes/JsBarcode.ean-upc.min.js index 4a78900f..e79a9ee1 100644 --- a/dist/barcodes/JsBarcode.ean-upc.min.js +++ b/dist/barcodes/JsBarcode.ean-upc.min.js @@ -1 +1 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(e.s=7)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){n(this,t),this.startBin="101",this.endBin="101",this.middleBin="01010",this.Lbinary=["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],this.Gbinary=["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],this.Rbinary=["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"]}return t.prototype.encode=function(t,e,n){var r="";n=n||"";for(var i=0;i10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin,this.lastChar=n.lastChar}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{13}$/)&&this.string[12]==this.checksum(this.string)},t.prototype.encode=function(){var t=new a["default"],e=[],n=this.structure[this.string[0]],r=this.string.substr(1,6),i=this.string.substr(7,6);return e.push({data:"000000000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:t.encode(r,n),text:r,options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(i,"RRRRRR"),text:i,options:{fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),this.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.lastChar,options:{fontSize:this.fontSize}})),e},t.prototype.checksum=function(t){var e,n=0;for(e=0;12>e;e+=2)n+=parseInt(t[e]);for(e=1;12>e;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=r(o),s=function(){function t(e){i(this,t),this.string=e,this.structure=["LL","LG","GL","GG"]}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{2}$/)},t.prototype.encode=function(){var t=new a["default"],e=this.structure[parseInt(this.string)%4],n="1011";return n+=t.encode(this.string,e,"01"),{data:n,text:this.string}},t}();e["default"]=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=r(o),s=function(){function t(e){i(this,t),this.string=e,this.structure=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"]}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{5}$/)},t.prototype.encode=function(){var t=new a["default"],e=this.checksum(),n="1011";return n+=t.encode(this.string,this.structure[e],"01"),{data:n,text:this.string}},t.prototype.checksum=function(){var t=0;return t+=3*parseInt(this.string[0]),t+=9*parseInt(this.string[1]),t+=3*parseInt(this.string[2]),t+=9*parseInt(this.string[3]),t+=3*parseInt(this.string[4]),t%10},t}();e["default"]=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=r(o),s=function(){function t(e){i(this,t),-1!==e.search(/^[0-9]{7}$/)?this.string=e+this.checksum(e):this.string=e}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{8}$/)&&this.string[7]==this.checksum(this.string)},t.prototype.encode=function(){var t=new a["default"],e="",n=this.string.substr(0,4),r=this.string.substr(4,4);return e+=t.startBin,e+=t.encode(n,"LLLL"),e+=t.middleBin,e+=t.encode(r,"RRRR"),e+=t.endBin,{data:e,text:this.string}},t.prototype.checksum=function(t){var e,n=0;for(e=0;7>e;e+=2)n+=3*parseInt(t[e]);for(e=1;7>e;e+=2)n+=parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=r(o),s=function(){function t(e,n){i(this,t),-1!==e.search(/^[0-9]{11}$/)?this.string=e+this.checksum(e):this.string=e,n.fontSize>10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{12}$/)&&this.string[11]==this.checksum(this.string)},t.prototype.encode=function(){var t=new a["default"],e=[];return e.push({data:"00000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+t.encode(this.string[0],"L"),options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(1,5),"LLLLL"),text:this.string.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(6,5),"RRRRR"),text:this.string.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:t.encode(this.string[11],"R")+"101",options:{height:this.guardHeight}}),e.push({data:"00000000",text:this.string[11],options:{textAlign:"right",fontSize:this.fontSize}}),e},t.prototype.checksum=function(t){var e,n=0;for(e=1;11>e;e+=2)n+=parseInt(t[e]);for(e=0;11>e;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var i=n(8),o=r(i),a=n(11),s=r(a),u=n(10),f=r(u),d=n(9),h=r(d),l=n(12),c=r(l);e.EAN13=o["default"],e.EAN8=s["default"],e.EAN5=f["default"],e.EAN2=h["default"],e.UPC=c["default"]},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var n in e)n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,n,e);for(var r=0;r0?s.fontSize:0)+s.textMargin+s.marginTop+s.marginBottom,l=0;s.displayValue&&u>f&&("center"==s.textAlign?l=Math.floor((u-f)/2):"left"==s.textAlign?l=0:"right"==s.textAlign&&(l=Math.floor(u-f))),n[a].barcodePadding=l,d>o&&(o=d),i+=n[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,r.clearRect(0,0,t.width,t.height),e.background&&(r.fillStyle=e.background,r.fillRect(0,0,t.width,t.height)),r.translate(e.marginLeft,0)}function a(t,e,n){var r,i,o=t.getContext("2d"),a=n.data;r="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var s=0;s0?(o=0,r.textAlign="left"):"right"==e.textAlign?(o=n.width-1,r.textAlign="right"):(o=n.width/2,r.textAlign="center"),r.fillText(n.text,o,a)}}function u(t,e){var n=t.getContext("2d");n.translate(e.width,0)}function f(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var d=n(1),h=r(d);e["default"]=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){var r=n.marginLeft;o(t,n,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,h=0;a.displayValue&&s>f&&("center"==a.textAlign?h=Math.floor((s-f)/2):"left"==a.textAlign?h=0:"right"==a.textAlign&&(h=Math.floor(s-f))),n[o].barcodePadding=h,d>i&&(i=d),r+=n[o].width}var l=r+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",l+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+l+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),t.style.transform="translate(0,0)",e.background&&(t.style.background=e.background)}function a(t,e,n){var r,i,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,s=0;s0&&(h(u-e.width*a,r,e.width*a,e.height,t),a=0)}a>0&&h(u-e.width*(a-1),r,e.width*a,e.height,t)}function s(t,e,n){var r=document.createElementNS(p,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}}function u(t,e,n){var r=document.createElement("canvas").getContext("2d");r.font=n.fontOptions+" "+n.fontSize+"px "+n.font;var i=r.measureText(t).width;return i}function f(t,e,n){var r=document.createElementNS(p,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function d(t,e,n){t.setAttribute("style","fill:"+e.lineColor+";")}function h(t,e,n,r,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(1),c=r(l);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file +!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(e.s=7)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){n(this,t),this.startBin="101",this.endBin="101",this.middleBin="01010",this.Lbinary=["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],this.Gbinary=["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],this.Rbinary=["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"]}return t.prototype.encode=function(t,e,n){var i="";n=n||"";for(var r=0;r10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin,this.lastChar=n.lastChar}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{13}$/)&&this.string[12]==this.checksum(this.string)},t.prototype.encode=function(){var t=new a["default"],e=[],n=this.structure[this.string[0]],i=this.string.substr(1,6),r=this.string.substr(7,6);return e.push({data:"000000000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:t.encode(i,n),text:i,options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(r,"RRRRRR"),text:r,options:{fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),this.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.lastChar,options:{fontSize:this.fontSize}})),e},t.prototype.checksum=function(t){var e,n=0;for(e=0;12>e;e+=2)n+=parseInt(t[e]);for(e=1;12>e;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=s},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),s=function(){function t(e){r(this,t),this.string=e,this.structure=["LL","LG","GL","GG"]}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{2}$/)},t.prototype.encode=function(){var t=new a["default"],e=this.structure[parseInt(this.string)%4],n="1011";return n+=t.encode(this.string,e,"01"),{data:n,text:this.string}},t}();e["default"]=s},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),s=function(){function t(e){r(this,t),this.string=e,this.structure=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"]}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{5}$/)},t.prototype.encode=function(){var t=new a["default"],e=this.checksum(),n="1011";return n+=t.encode(this.string,this.structure[e],"01"),{data:n,text:this.string}},t.prototype.checksum=function(){var t=0;return t+=3*parseInt(this.string[0]),t+=9*parseInt(this.string[1]),t+=3*parseInt(this.string[2]),t+=9*parseInt(this.string[3]),t+=3*parseInt(this.string[4]),t%10},t}();e["default"]=s},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),s=function(){function t(e){r(this,t),-1!==e.search(/^[0-9]{7}$/)?this.string=e+this.checksum(e):this.string=e}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{8}$/)&&this.string[7]==this.checksum(this.string)},t.prototype.encode=function(){var t=new a["default"],e="",n=this.string.substr(0,4),i=this.string.substr(4,4);return e+=t.startBin,e+=t.encode(n,"LLLL"),e+=t.middleBin,e+=t.encode(i,"RRRR"),e+=t.endBin,{data:e,text:this.string}},t.prototype.checksum=function(t){var e,n=0;for(e=0;7>e;e+=2)n+=3*parseInt(t[e]);for(e=1;7>e;e+=2)n+=parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=s},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),s=function(){function t(e,n){r(this,t),-1!==e.search(/^[0-9]{11}$/)?this.string=e+this.checksum(e):this.string=e,n.fontSize>10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin}return t.prototype.valid=function(){return-1!==this.string.search(/^[0-9]{12}$/)&&this.string[11]==this.checksum(this.string)},t.prototype.encode=function(){var t=new a["default"],e=[];return e.push({data:"00000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+t.encode(this.string[0],"L"),options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(1,5),"LLLLL"),text:this.string.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(6,5),"RRRRR"),text:this.string.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:t.encode(this.string[11],"R")+"101",options:{height:this.guardHeight}}),e.push({data:"00000000",text:this.string[11],options:{textAlign:"right",fontSize:this.fontSize}}),e},t.prototype.checksum=function(t){var e,n=0;for(e=1;11>e;e+=2)n+=parseInt(t[e]);for(e=0;11>e;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=s},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var r=n(8),o=i(r),a=n(11),s=i(a),u=n(10),f=i(u),d=n(9),h=i(d),l=n(12),c=i(l);e.EAN13=o["default"],e.EAN8=s["default"],e.EAN5=f["default"],e.EAN2=h["default"],e.UPC=c["default"]},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var n in e)n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e,n){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,n,e);for(var i=0;i0?s.fontSize:0)+s.textMargin+s.marginTop+s.marginBottom,l=0;s.displayValue&&u>f&&("center"==s.textAlign?l=Math.floor((u-f)/2):"left"==s.textAlign?l=0:"right"==s.textAlign&&(l=Math.floor(u-f))),n[a].barcodePadding=l,d>o&&(o=d),r+=n[a].width}t.width=r+e.marginLeft+e.marginRight,t.height=o,i.clearRect(0,0,t.width,t.height),e.background&&(i.fillStyle=e.background,i.fillRect(0,0,t.width,t.height)),i.translate(e.marginLeft,0)}function a(t,e,n){var i,r,o=t.getContext("2d"),a=n.data;i="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,r=e.height,o.fillStyle=e.lineColor;for(var s=0;s0?(o=0,i.textAlign="left"):"right"==e.textAlign?(o=n.width-1,i.textAlign="right"):(o=n.width/2,i.textAlign="center"),i.fillText(n.text,o,a)}}function u(t,e){var n=t.getContext("2d");n.translate(e.width,0)}function f(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var d=n(1),h=i(d);e["default"]=r},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e,n){var i=n.marginLeft;o(t,n,e);for(var r=0;r0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,h=0;a.displayValue&&s>f&&("center"==a.textAlign?h=Math.floor((s-f)/2):"left"==a.textAlign?h=0:"right"==a.textAlign&&(h=Math.floor(s-f))),n[o].barcodePadding=h,d>r&&(r=d),i+=n[o].width}var l=i+e.marginLeft+e.marginRight,g=r;t.setAttribute("width",l+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+l+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),e.background&&(t.style.background=e.background)}function a(t,e,n){var i,r,o=n.data;i="top"==e.textPosition?e.fontSize+e.textMargin:0,r=e.height;for(var a=0,s=0;s0&&(h(u-e.width*a,i,e.width*a,e.height,t),a=0)}a>0&&h(u-e.width*(a-1),i,e.width*a,e.height,t)}function s(t,e,n){var i=document.createElementNS(p,"text");if(e.displayValue){var r,o;i.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,i.setAttribute("text-anchor","start")):"right"==e.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(document.createTextNode(n.text)),t.appendChild(i)}}function u(t,e,n){var i=document.createElement("canvas").getContext("2d");i.font=n.fontOptions+" "+n.fontSize+"px "+n.font;var r=i.measureText(t).width;return r}function f(t,e,n){var i=document.createElementNS(p,"g");return i.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(i),i}function d(t,e,n){t.setAttribute("style","fill:"+e.lineColor+";")}function h(t,e,n,i,r){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",i),r.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(1),c=i(l);e["default"]=r;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file diff --git a/dist/barcodes/JsBarcode.itf-14.min.js b/dist/barcodes/JsBarcode.itf-14.min.js index b1f5b2ab..bb77e9b0 100644 --- a/dist/barcodes/JsBarcode.itf-14.min.js +++ b/dist/barcodes/JsBarcode.itf-14.min.js @@ -1 +1 @@ -!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(e.s=6)}([function(t,e){"use strict";function r(t,e){var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);for(r in e)e.hasOwnProperty(r)&&"undefined"!=typeof e[r]&&(n[r]=e[r]);return n}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7);e["default"]={ITF14:n.ITF14}},function(t,e){"use strict";function r(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in e)t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(r[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(r[n]=t.getAttribute("data-"+n.toLowerCase()));return r.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),r=(0,a["default"])(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),a=n(o);e["default"]=i},function(t,e){"use strict";function r(t){function e(t){if(Array.isArray(t))for(var n=0;ne;e+=2)t+=this.calculatePair(this.string.substr(e,2));return t+="11101",{data:t,text:this.string}},t.prototype.calculatePair=function(t){for(var e="",r=this.binaryRepresentation[t[0]],n=this.binaryRepresentation[t[1]],i=0;5>i;i++)e+="1"==r[i]?"111":"1",e+="1"==n[i]?"000":"0";return e},t.prototype.checksum=function(){for(var t=0,e=0;13>e;e++)t+=parseInt(this.string[e])*(3-e%2*2);return 10-t%10},t}();e.ITF14=n},function(t,e){"use strict";function r(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var r in e)r=e[r],"string"==typeof t[r]&&(t[r]=parseInt(t[r],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,r,e);for(var n=0;n0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,h=0;u.displayValue&&f>s&&("center"==u.textAlign?h=Math.floor((f-s)/2):"left"==u.textAlign?h=0:"right"==u.textAlign&&(h=Math.floor(f-s))),r[a].barcodePadding=h,d>o&&(o=d),i+=r[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,n.clearRect(0,0,t.width,t.height),e.background&&(n.fillStyle=e.background,n.fillRect(0,0,t.width,t.height)),n.translate(e.marginLeft,0)}function a(t,e,r){var n,i,o=t.getContext("2d"),a=r.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var u=0;u0?(o=0,n.textAlign="left"):"right"==e.textAlign?(o=r.width-1,n.textAlign="right"):(o=r.width/2,n.textAlign="center"),n.fillText(r.text,o,a)}}function f(t,e){var r=t.getContext("2d");r.translate(e.width,0)}function s(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var d=r(0),l=n(d);e["default"]=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){var n=r.marginLeft;o(t,r,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,l=0;a.displayValue&&u>s&&("center"==a.textAlign?l=Math.floor((u-s)/2):"left"==a.textAlign?l=0:"right"==a.textAlign&&(l=Math.floor(u-s))),r[o].barcodePadding=l,d>i&&(i=d),n+=r[o].width}var h=n+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",h+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+h+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),t.style.transform="translate(0,0)",e.background&&(t.style.background=e.background)}function a(t,e,r){var n,i,o=r.data;n="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,u=0;u0&&(l(f-e.width*a,n,e.width*a,e.height,t),a=0)}a>0&&l(f-e.width*(a-1),n,e.width*a,e.height,t)}function u(t,e,r){var n=document.createElementNS(p,"text");if(e.displayValue){var i,o;n.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||r.barcodePadding>0?(i=0,n.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=r.width-1,n.setAttribute("text-anchor","end")):(i=r.width/2,n.setAttribute("text-anchor","middle")),n.setAttribute("x",i),n.setAttribute("y",o),n.appendChild(document.createTextNode(r.text)),t.appendChild(n)}}function f(t,e,r){var n=document.createElement("canvas").getContext("2d");n.font=r.fontOptions+" "+r.fontSize+"px "+r.font;var i=n.measureText(t).width;return i}function s(t,e,r){var n=document.createElementNS(p,"g");return n.setAttribute("transform","translate("+t+", "+e+")"),r.appendChild(n),n}function d(t,e,r){t.setAttribute("style","fill:"+e.lineColor+";")}function l(t,e,r,n,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",r),o.setAttribute("height",n),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var h=r(0),c=n(h);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file +!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(e.s=6)}([function(t,e){"use strict";function r(t,e){var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);for(r in e)e.hasOwnProperty(r)&&"undefined"!=typeof e[r]&&(n[r]=e[r]);return n}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7);e["default"]={ITF14:n.ITF14}},function(t,e){"use strict";function r(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in e)t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(r[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(r[n]=t.getAttribute("data-"+n.toLowerCase()));return r.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),r=(0,a["default"])(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),a=n(o);e["default"]=i},function(t,e){"use strict";function r(t){function e(t){if(Array.isArray(t))for(var n=0;ne;e+=2)t+=this.calculatePair(this.string.substr(e,2));return t+="11101",{data:t,text:this.string}},t.prototype.calculatePair=function(t){for(var e="",r=this.binaryRepresentation[t[0]],n=this.binaryRepresentation[t[1]],i=0;5>i;i++)e+="1"==r[i]?"111":"1",e+="1"==n[i]?"000":"0";return e},t.prototype.checksum=function(){for(var t=0,e=0;13>e;e++)t+=parseInt(this.string[e])*(3-e%2*2);return 10-t%10},t}();e.ITF14=n},function(t,e){"use strict";function r(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var r in e)r=e[r],"string"==typeof t[r]&&(t[r]=parseInt(t[r],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,r,e);for(var n=0;n0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,h=0;u.displayValue&&s>f&&("center"==u.textAlign?h=Math.floor((s-f)/2):"left"==u.textAlign?h=0:"right"==u.textAlign&&(h=Math.floor(s-f))),r[a].barcodePadding=h,d>o&&(o=d),i+=r[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,n.clearRect(0,0,t.width,t.height),e.background&&(n.fillStyle=e.background,n.fillRect(0,0,t.width,t.height)),n.translate(e.marginLeft,0)}function a(t,e,r){var n,i,o=t.getContext("2d"),a=r.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var u=0;u0?(o=0,n.textAlign="left"):"right"==e.textAlign?(o=r.width-1,n.textAlign="right"):(o=r.width/2,n.textAlign="center"),n.fillText(r.text,o,a)}}function s(t,e){var r=t.getContext("2d");r.translate(e.width,0)}function f(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var d=r(0),l=n(d);e["default"]=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){var n=r.marginLeft;o(t,r,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,l=0;a.displayValue&&u>f&&("center"==a.textAlign?l=Math.floor((u-f)/2):"left"==a.textAlign?l=0:"right"==a.textAlign&&(l=Math.floor(u-f))),r[o].barcodePadding=l,d>i&&(i=d),n+=r[o].width}var h=n+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",h+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+h+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),e.background&&(t.style.background=e.background)}function a(t,e,r){var n,i,o=r.data;n="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,u=0;u0&&(l(s-e.width*a,n,e.width*a,e.height,t),a=0)}a>0&&l(s-e.width*(a-1),n,e.width*a,e.height,t)}function u(t,e,r){var n=document.createElementNS(p,"text");if(e.displayValue){var i,o;n.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||r.barcodePadding>0?(i=0,n.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=r.width-1,n.setAttribute("text-anchor","end")):(i=r.width/2,n.setAttribute("text-anchor","middle")),n.setAttribute("x",i),n.setAttribute("y",o),n.appendChild(document.createTextNode(r.text)),t.appendChild(n)}}function s(t,e,r){var n=document.createElement("canvas").getContext("2d");n.font=r.fontOptions+" "+r.fontSize+"px "+r.font;var i=n.measureText(t).width;return i}function f(t,e,r){var n=document.createElementNS(p,"g");return n.setAttribute("transform","translate("+t+", "+e+")"),r.appendChild(n),n}function d(t,e,r){t.setAttribute("style","fill:"+e.lineColor+";")}function l(t,e,r,n,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",r),o.setAttribute("height",n),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var h=r(0),c=n(h);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file diff --git a/dist/barcodes/JsBarcode.itf.min.js b/dist/barcodes/JsBarcode.itf.min.js index 65bb5234..80df169d 100644 --- a/dist/barcodes/JsBarcode.itf.min.js +++ b/dist/barcodes/JsBarcode.itf.min.js @@ -1 +1 @@ -!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(e.s=6)}([function(t,e){"use strict";function r(t,e){var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);for(r in e)e.hasOwnProperty(r)&&"undefined"!=typeof e[r]&&(n[r]=e[r]);return n}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7);e["default"]={ITF:n.ITF}},function(t,e){"use strict";function r(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in e)t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(r[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(r[n]=t.getAttribute("data-"+n.toLowerCase()));return r.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),r=(0,a["default"])(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),a=n(o);e["default"]=i},function(t,e){"use strict";function r(t){function e(t){if(Array.isArray(t))for(var n=0;ni;i++)e+="1"==r[i]?"111":"1",e+="1"==n[i]?"000":"0";return e},t}();e.ITF=n},function(t,e){"use strict";function r(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var r in e)r=e[r],"string"==typeof t[r]&&(t[r]=parseInt(t[r],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,r,e);for(var n=0;n0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,h=0;u.displayValue&&f>s&&("center"==u.textAlign?h=Math.floor((f-s)/2):"left"==u.textAlign?h=0:"right"==u.textAlign&&(h=Math.floor(f-s))),r[a].barcodePadding=h,d>o&&(o=d),i+=r[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,n.clearRect(0,0,t.width,t.height),e.background&&(n.fillStyle=e.background,n.fillRect(0,0,t.width,t.height)),n.translate(e.marginLeft,0)}function a(t,e,r){var n,i,o=t.getContext("2d"),a=r.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var u=0;u0?(o=0,n.textAlign="left"):"right"==e.textAlign?(o=r.width-1,n.textAlign="right"):(o=r.width/2,n.textAlign="center"),n.fillText(r.text,o,a)}}function f(t,e){var r=t.getContext("2d");r.translate(e.width,0)}function s(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var d=r(0),l=n(d);e["default"]=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){var n=r.marginLeft;o(t,r,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,l=0;a.displayValue&&u>s&&("center"==a.textAlign?l=Math.floor((u-s)/2):"left"==a.textAlign?l=0:"right"==a.textAlign&&(l=Math.floor(u-s))),r[o].barcodePadding=l,d>i&&(i=d),n+=r[o].width}var h=n+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",h+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+h+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),t.style.transform="translate(0,0)",e.background&&(t.style.background=e.background)}function a(t,e,r){var n,i,o=r.data;n="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,u=0;u0&&(l(f-e.width*a,n,e.width*a,e.height,t),a=0)}a>0&&l(f-e.width*(a-1),n,e.width*a,e.height,t)}function u(t,e,r){var n=document.createElementNS(p,"text");if(e.displayValue){var i,o;n.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||r.barcodePadding>0?(i=0,n.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=r.width-1,n.setAttribute("text-anchor","end")):(i=r.width/2,n.setAttribute("text-anchor","middle")),n.setAttribute("x",i),n.setAttribute("y",o),n.appendChild(document.createTextNode(r.text)),t.appendChild(n)}}function f(t,e,r){var n=document.createElement("canvas").getContext("2d");n.font=r.fontOptions+" "+r.fontSize+"px "+r.font;var i=n.measureText(t).width;return i}function s(t,e,r){var n=document.createElementNS(p,"g");return n.setAttribute("transform","translate("+t+", "+e+")"),r.appendChild(n),n}function d(t,e,r){t.setAttribute("style","fill:"+e.lineColor+";")}function l(t,e,r,n,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",r),o.setAttribute("height",n),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var h=r(0),c=n(h);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file +!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(e.s=6)}([function(t,e){"use strict";function r(t,e){var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);for(r in e)e.hasOwnProperty(r)&&"undefined"!=typeof e[r]&&(n[r]=e[r]);return n}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7);e["default"]={ITF:n.ITF}},function(t,e){"use strict";function r(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in e)t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(r[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(r[n]=t.getAttribute("data-"+n.toLowerCase()));return r.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),r=(0,a["default"])(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),a=n(o);e["default"]=i},function(t,e){"use strict";function r(t){function e(t){if(Array.isArray(t))for(var n=0;ni;i++)e+="1"==r[i]?"111":"1",e+="1"==n[i]?"000":"0";return e},t}();e.ITF=n},function(t,e){"use strict";function r(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var r in e)r=e[r],"string"==typeof t[r]&&(t[r]=parseInt(t[r],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,r,e);for(var n=0;n0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,h=0;u.displayValue&&f>s&&("center"==u.textAlign?h=Math.floor((f-s)/2):"left"==u.textAlign?h=0:"right"==u.textAlign&&(h=Math.floor(f-s))),r[a].barcodePadding=h,d>o&&(o=d),i+=r[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,n.clearRect(0,0,t.width,t.height),e.background&&(n.fillStyle=e.background,n.fillRect(0,0,t.width,t.height)),n.translate(e.marginLeft,0)}function a(t,e,r){var n,i,o=t.getContext("2d"),a=r.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var u=0;u0?(o=0,n.textAlign="left"):"right"==e.textAlign?(o=r.width-1,n.textAlign="right"):(o=r.width/2,n.textAlign="center"),n.fillText(r.text,o,a)}}function f(t,e){var r=t.getContext("2d");r.translate(e.width,0)}function s(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var d=r(0),l=n(d);e["default"]=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){var n=r.marginLeft;o(t,r,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,l=0;a.displayValue&&u>s&&("center"==a.textAlign?l=Math.floor((u-s)/2):"left"==a.textAlign?l=0:"right"==a.textAlign&&(l=Math.floor(u-s))),r[o].barcodePadding=l,d>i&&(i=d),n+=r[o].width}var h=n+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",h+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+h+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),e.background&&(t.style.background=e.background)}function a(t,e,r){var n,i,o=r.data;n="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,u=0;u0&&(l(f-e.width*a,n,e.width*a,e.height,t),a=0)}a>0&&l(f-e.width*(a-1),n,e.width*a,e.height,t)}function u(t,e,r){var n=document.createElementNS(p,"text");if(e.displayValue){var i,o;n.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||r.barcodePadding>0?(i=0,n.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=r.width-1,n.setAttribute("text-anchor","end")):(i=r.width/2,n.setAttribute("text-anchor","middle")),n.setAttribute("x",i),n.setAttribute("y",o),n.appendChild(document.createTextNode(r.text)),t.appendChild(n)}}function f(t,e,r){var n=document.createElement("canvas").getContext("2d");n.font=r.fontOptions+" "+r.fontSize+"px "+r.font;var i=n.measureText(t).width;return i}function s(t,e,r){var n=document.createElementNS(p,"g");return n.setAttribute("transform","translate("+t+", "+e+")"),r.appendChild(n),n}function d(t,e,r){t.setAttribute("style","fill:"+e.lineColor+";")}function l(t,e,r,n,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",r),o.setAttribute("height",n),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var h=r(0),c=n(h);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file diff --git a/dist/barcodes/JsBarcode.msi.min.js b/dist/barcodes/JsBarcode.msi.min.js index 1ec368ef..32223c01 100644 --- a/dist/barcodes/JsBarcode.msi.min.js +++ b/dist/barcodes/JsBarcode.msi.min.js @@ -1 +1 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(e.s=8)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;e>n;n++)t="0"+t;return t}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(e){n(this,t),this.string=e}return t.prototype.encode=function(){for(var t="110",e=0;e0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,c=0;u.displayValue&&f>s&&("center"==u.textAlign?c=Math.floor((f-s)/2):"left"==u.textAlign?c=0:"right"==u.textAlign&&(c=Math.floor(f-s))),n[a].barcodePadding=c,l>i&&(i=l),o+=n[a].width}t.width=o+e.marginLeft+e.marginRight,t.height=i,r.clearRect(0,0,t.width,t.height),e.background&&(r.fillStyle=e.background,r.fillRect(0,0,t.width,t.height)),r.translate(e.marginLeft,0)}function a(t,e,n){var r,o,i=t.getContext("2d"),a=n.data;r="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,o=e.height,i.fillStyle=e.lineColor;for(var u=0;u0?(i=0,r.textAlign="left"):"right"==e.textAlign?(i=n.width-1,r.textAlign="right"):(i=n.width/2,r.textAlign="center"),r.fillText(n.text,i,a)}}function f(t,e){var n=t.getContext("2d");n.translate(e.width,0)}function s(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var l=n(2),d=r(l);e["default"]=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){var r=n.marginLeft;i(t,n,e);for(var o=0;o0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,d=0;a.displayValue&&u>s&&("center"==a.textAlign?d=Math.floor((u-s)/2):"left"==a.textAlign?d=0:"right"==a.textAlign&&(d=Math.floor(u-s))),n[i].barcodePadding=d,l>o&&(o=l),r+=n[i].width}var c=r+e.marginLeft+e.marginRight,g=o;t.setAttribute("width",c+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+c+" "+g),t.setAttribute("xmlns",h),t.setAttribute("version","1.1"),t.style.transform="translate(0,0)",e.background&&(t.style.background=e.background)}function a(t,e,n){var r,o,i=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0,o=e.height;for(var a=0,u=0;u0&&(d(f-e.width*a,r,e.width*a,e.height,t),a=0)}a>0&&d(f-e.width*(a-1),r,e.width*a,e.height,t)}function u(t,e,n){var r=document.createElementNS(h,"text");if(e.displayValue){var o,i;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),i="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(o=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(o=n.width-1,r.setAttribute("text-anchor","end")):(o=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",o),r.setAttribute("y",i),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}}function f(t,e,n){var r=document.createElement("canvas").getContext("2d");r.font=n.fontOptions+" "+n.fontSize+"px "+n.font;var o=r.measureText(t).width;return o}function s(t,e,n){var r=document.createElementNS(h,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function l(t,e,n){t.setAttribute("style","fill:"+e.lineColor+";")}function d(t,e,n,r,o){var i=document.createElementNS(h,"rect");i.setAttribute("x",t),i.setAttribute("y",e),i.setAttribute("width",n),i.setAttribute("height",r),o.appendChild(i)}Object.defineProperty(e,"__esModule",{value:!0});var c=n(2),p=r(c);e["default"]=o;var h="http://www.w3.org/2000/svg"}]); \ No newline at end of file +!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(e.s=8)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;e>n;n++)t="0"+t;return t}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(e){n(this,t),this.string=e}return t.prototype.encode=function(){for(var t="110",e=0;e0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,c=0;u.displayValue&&f>s&&("center"==u.textAlign?c=Math.floor((f-s)/2):"left"==u.textAlign?c=0:"right"==u.textAlign&&(c=Math.floor(f-s))),n[a].barcodePadding=c,l>i&&(i=l),o+=n[a].width}t.width=o+e.marginLeft+e.marginRight,t.height=i,r.clearRect(0,0,t.width,t.height),e.background&&(r.fillStyle=e.background,r.fillRect(0,0,t.width,t.height)),r.translate(e.marginLeft,0)}function a(t,e,n){var r,o,i=t.getContext("2d"),a=n.data;r="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,o=e.height,i.fillStyle=e.lineColor;for(var u=0;u0?(i=0,r.textAlign="left"):"right"==e.textAlign?(i=n.width-1,r.textAlign="right"):(i=n.width/2,r.textAlign="center"),r.fillText(n.text,i,a)}}function f(t,e){var n=t.getContext("2d");n.translate(e.width,0)}function s(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var l=n(2),d=r(l);e["default"]=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){var r=n.marginLeft;i(t,n,e);for(var o=0;o0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,d=0;a.displayValue&&u>s&&("center"==a.textAlign?d=Math.floor((u-s)/2):"left"==a.textAlign?d=0:"right"==a.textAlign&&(d=Math.floor(u-s))),n[i].barcodePadding=d,l>o&&(o=l),r+=n[i].width}var c=r+e.marginLeft+e.marginRight,g=o;t.setAttribute("width",c+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+c+" "+g),t.setAttribute("xmlns",h),t.setAttribute("version","1.1"),e.background&&(t.style.background=e.background)}function a(t,e,n){var r,o,i=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0,o=e.height;for(var a=0,u=0;u0&&(d(f-e.width*a,r,e.width*a,e.height,t),a=0)}a>0&&d(f-e.width*(a-1),r,e.width*a,e.height,t)}function u(t,e,n){var r=document.createElementNS(h,"text");if(e.displayValue){var o,i;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),i="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(o=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(o=n.width-1,r.setAttribute("text-anchor","end")):(o=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",o),r.setAttribute("y",i),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}}function f(t,e,n){var r=document.createElement("canvas").getContext("2d");r.font=n.fontOptions+" "+n.fontSize+"px "+n.font;var o=r.measureText(t).width;return o}function s(t,e,n){var r=document.createElementNS(h,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function l(t,e,n){t.setAttribute("style","fill:"+e.lineColor+";")}function d(t,e,n,r,o){var i=document.createElementNS(h,"rect");i.setAttribute("x",t),i.setAttribute("y",e),i.setAttribute("width",n),i.setAttribute("height",r),o.appendChild(i)}Object.defineProperty(e,"__esModule",{value:!0});var c=n(2),p=r(c);e["default"]=o;var h="http://www.w3.org/2000/svg"}]); \ No newline at end of file diff --git a/dist/barcodes/JsBarcode.pharmacode.min.js b/dist/barcodes/JsBarcode.pharmacode.min.js index 707fea05..d523d5c4 100644 --- a/dist/barcodes/JsBarcode.pharmacode.min.js +++ b/dist/barcodes/JsBarcode.pharmacode.min.js @@ -1 +1 @@ -!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(e.s=6)}([function(t,e){"use strict";function r(t,e){var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);for(r in e)e.hasOwnProperty(r)&&"undefined"!=typeof e[r]&&(n[r]=e[r]);return n}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7);e["default"]={pharmacode:n.pharmacode}},function(t,e){"use strict";function r(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in e)t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(r[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(r[n]=t.getAttribute("data-"+n.toLowerCase()));return r.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),r=(0,a["default"])(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),a=n(o);e["default"]=i},function(t,e){"use strict";function r(t){function e(t){if(Array.isArray(t))for(var n=0;n=3&&this.number<=131070},t}();e.pharmacode=n},function(t,e){"use strict";function r(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var r in e)r=e[r],"string"==typeof t[r]&&(t[r]=parseInt(t[r],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,r,e);for(var n=0;n0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,h=0;u.displayValue&&f>d&&("center"==u.textAlign?h=Math.floor((f-d)/2):"left"==u.textAlign?h=0:"right"==u.textAlign&&(h=Math.floor(f-d))),r[a].barcodePadding=h,s>o&&(o=s),i+=r[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,n.clearRect(0,0,t.width,t.height),e.background&&(n.fillStyle=e.background,n.fillRect(0,0,t.width,t.height)),n.translate(e.marginLeft,0)}function a(t,e,r){var n,i,o=t.getContext("2d"),a=r.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var u=0;u0?(o=0,n.textAlign="left"):"right"==e.textAlign?(o=r.width-1,n.textAlign="right"):(o=r.width/2,n.textAlign="center"),n.fillText(r.text,o,a)}}function f(t,e){var r=t.getContext("2d");r.translate(e.width,0)}function d(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var s=r(0),l=n(s);e["default"]=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){var n=r.marginLeft;o(t,r,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,l=0;a.displayValue&&u>d&&("center"==a.textAlign?l=Math.floor((u-d)/2):"left"==a.textAlign?l=0:"right"==a.textAlign&&(l=Math.floor(u-d))),r[o].barcodePadding=l,s>i&&(i=s),n+=r[o].width}var h=n+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",h+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+h+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),t.style.transform="translate(0,0)",e.background&&(t.style.background=e.background)}function a(t,e,r){var n,i,o=r.data;n="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,u=0;u0&&(l(f-e.width*a,n,e.width*a,e.height,t),a=0)}a>0&&l(f-e.width*(a-1),n,e.width*a,e.height,t)}function u(t,e,r){var n=document.createElementNS(p,"text");if(e.displayValue){var i,o;n.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||r.barcodePadding>0?(i=0,n.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=r.width-1,n.setAttribute("text-anchor","end")):(i=r.width/2,n.setAttribute("text-anchor","middle")),n.setAttribute("x",i),n.setAttribute("y",o),n.appendChild(document.createTextNode(r.text)),t.appendChild(n)}}function f(t,e,r){var n=document.createElement("canvas").getContext("2d");n.font=r.fontOptions+" "+r.fontSize+"px "+r.font;var i=n.measureText(t).width;return i}function d(t,e,r){var n=document.createElementNS(p,"g");return n.setAttribute("transform","translate("+t+", "+e+")"),r.appendChild(n),n}function s(t,e,r){t.setAttribute("style","fill:"+e.lineColor+";")}function l(t,e,r,n,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",r),o.setAttribute("height",n),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var h=r(0),c=n(h);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file +!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(e.s=6)}([function(t,e){"use strict";function r(t,e){var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);for(r in e)e.hasOwnProperty(r)&&"undefined"!=typeof e[r]&&(n[r]=e[r]);return n}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7);e["default"]={pharmacode:n.pharmacode}},function(t,e){"use strict";function r(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in e)t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(r[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(r[n]=t.getAttribute("data-"+n.toLowerCase()));return r.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),r=(0,a["default"])(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),a=n(o);e["default"]=i},function(t,e){"use strict";function r(t){function e(t){if(Array.isArray(t))for(var n=0;n=3&&this.number<=131070},t}();e.pharmacode=n},function(t,e){"use strict";function r(t){var e=["width","height","textMargin","fontSize","margin","marginLeft","marginBottom","marginLeft","marginRight"];for(var r in e)r=e[r],"string"==typeof t[r]&&(t[r]=parseInt(t[r],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){if(!t.getContext)throw new Error("The browser does not support canvas.");o(t,r,e);for(var n=0;n0?u.fontSize:0)+u.textMargin+u.marginTop+u.marginBottom,h=0;u.displayValue&&f>d&&("center"==u.textAlign?h=Math.floor((f-d)/2):"left"==u.textAlign?h=0:"right"==u.textAlign&&(h=Math.floor(f-d))),r[a].barcodePadding=h,s>o&&(o=s),i+=r[a].width}t.width=i+e.marginLeft+e.marginRight,t.height=o,n.clearRect(0,0,t.width,t.height),e.background&&(n.fillStyle=e.background,n.fillRect(0,0,t.width,t.height)),n.translate(e.marginLeft,0)}function a(t,e,r){var n,i,o=t.getContext("2d"),a=r.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i=e.height,o.fillStyle=e.lineColor;for(var u=0;u0?(o=0,n.textAlign="left"):"right"==e.textAlign?(o=r.width-1,n.textAlign="right"):(o=r.width/2,n.textAlign="center"),n.fillText(r.text,o,a)}}function f(t,e){var r=t.getContext("2d");r.translate(e.width,0)}function d(t){var e=t.getContext("2d");e.restore()}Object.defineProperty(e,"__esModule",{value:!0});var s=r(0),l=n(s);e["default"]=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){var n=r.marginLeft;o(t,r,e);for(var i=0;i0?a.fontSize:0)+a.textMargin+a.marginTop+a.marginBottom,l=0;a.displayValue&&u>d&&("center"==a.textAlign?l=Math.floor((u-d)/2):"left"==a.textAlign?l=0:"right"==a.textAlign&&(l=Math.floor(u-d))),r[o].barcodePadding=l,s>i&&(i=s),n+=r[o].width}var h=n+e.marginLeft+e.marginRight,g=i;t.setAttribute("width",h+"px"),t.setAttribute("height",g+"px"),t.setAttribute("x","0px"),t.setAttribute("y","0px"),t.setAttribute("viewBox","0 0 "+h+" "+g),t.setAttribute("xmlns",p),t.setAttribute("version","1.1"),e.background&&(t.style.background=e.background)}function a(t,e,r){var n,i,o=r.data;n="top"==e.textPosition?e.fontSize+e.textMargin:0,i=e.height;for(var a=0,u=0;u0&&(l(f-e.width*a,n,e.width*a,e.height,t),a=0)}a>0&&l(f-e.width*(a-1),n,e.width*a,e.height,t)}function u(t,e,r){var n=document.createElementNS(p,"text");if(e.displayValue){var i,o;n.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||r.barcodePadding>0?(i=0,n.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=r.width-1,n.setAttribute("text-anchor","end")):(i=r.width/2,n.setAttribute("text-anchor","middle")),n.setAttribute("x",i),n.setAttribute("y",o),n.appendChild(document.createTextNode(r.text)),t.appendChild(n)}}function f(t,e,r){var n=document.createElement("canvas").getContext("2d");n.font=r.fontOptions+" "+r.fontSize+"px "+r.font;var i=n.measureText(t).width;return i}function d(t,e,r){var n=document.createElementNS(p,"g");return n.setAttribute("transform","translate("+t+", "+e+")"),r.appendChild(n),n}function s(t,e,r){t.setAttribute("style","fill:"+e.lineColor+";")}function l(t,e,r,n,i){var o=document.createElementNS(p,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",r),o.setAttribute("height",n),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var h=r(0),c=n(h);e["default"]=i;var p="http://www.w3.org/2000/svg"}]); \ No newline at end of file diff --git a/package.json b/package.json index 528cd7f6..255c078d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jsbarcode", - "version": "3.3.6", + "version": "3.3.7", "description": "JsBarcode is a simple and powerfull way to create different types of 1d barcodes.", "main": "./bin/JsBarcode.js", "directories": {