mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-06 00:18:51 +08:00
2 lines
61 KiB
JavaScript
2 lines
61 KiB
JavaScript
var Nt=Object.defineProperty,Ct=Object.defineProperties;var Gt=Object.getOwnPropertyDescriptors;var Ve=Object.getOwnPropertySymbols;var Ft=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable;var qe=(t,e,r)=>e in t?Nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Je=(t,e)=>{for(var r in e||(e={}))Ft.call(e,r)&&qe(t,r,e[r]);if(Ve)for(var r of Ve(e))Ht.call(e,r)&&qe(t,r,e[r]);return t},We=(t,e)=>Ct(t,Gt(e));import{W as Xt,d as dt,a as zt,m as Ut,b as Vt,X as qt,f as de,Z as Jt,k as Qe,i as b,w as m,e as X,g as Wt,h as z,F as Qt,l as Yt,u as Zt}from"./index-DgJA1iiK.js";var se={},W={},l={};Object.defineProperty(l,"__esModule",{value:!0});function Kt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var en=function t(e,r){Kt(this,t),this.data=e,this.text=r.text||e,this.options=r};l.default=en;Object.defineProperty(W,"__esModule",{value:!0});W.CODE39=void 0;var tn=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),nn=l,rn=an(nn);function an(t){return t&&t.__esModule?t:{default:t}}function on(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function un(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fn(t,e){if(typeof e!="function"&&e!==null)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)}var cn=function(t){fn(e,t);function e(r,n){return on(this,e),r=r.toUpperCase(),n.mod43&&(r+=hn(_n(r))),un(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return tn(e,[{key:"encode",value:function(){for(var n=ie("*"),a=0;a<this.data.length;a++)n+=ie(this.data[a])+"0";return n+=ie("*"),{data:n,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),e}(rn.default),ht=["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","-","."," ","$","/","+","%","*"],ln=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function ie(t){return dn(_t(t))}function dn(t){return ln[t].toString(2)}function hn(t){return ht[t]}function _t(t){return ht.indexOf(t)}function _n(t){for(var e=0,r=0;r<t.length;r++)e+=_t(t[r]);return e=e%43,e}W.CODE39=cn;var y={},ye={},M={},f={};Object.defineProperty(f,"__esModule",{value:!0});var B;function oe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vt=f.SET_A=0,st=f.SET_B=1,yt=f.SET_C=2;f.SHIFT=98;var vn=f.START_A=103,sn=f.START_B=104,yn=f.START_C=105;f.MODULO=103;f.STOP=106;f.FNC1=207;f.SET_BY_CODE=(B={},oe(B,vn,vt),oe(B,sn,st),oe(B,yn,yt),B);f.SWAP={101:vt,100:st,99:yt};f.A_START_CHAR="Ð";f.B_START_CHAR="Ñ";f.C_START_CHAR="Ò";f.A_CHARS="[\0-_È-Ï]";f.B_CHARS="[ -È-Ï]";f.C_CHARS="(Ï*[0-9]{2}Ï*)";f.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011];Object.defineProperty(M,"__esModule",{value:!0});var pn=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),gn=l,On=En(gn),h=f;function En(t){return t&&t.__esModule?t:{default:t}}function bn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function wn(t,e){if(typeof e!="function"&&e!==null)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)}var $n=function(t){wn(e,t);function e(r,n){bn(this,e);var a=mn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r.substring(1),n));return a.bytes=r.split("").map(function(i){return i.charCodeAt(0)}),a}return pn(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var n=this.bytes,a=n.shift()-105,i=h.SET_BY_CODE[a];if(i===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&n.unshift(h.FNC1);var o=e.next(n,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(a)+o.result+e.getBar((o.checksum+a)%h.MODULO)+e.getBar(h.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var n=this.options.ean128||!1;return typeof n=="string"&&(n=n.toLowerCase()==="true"),n}}],[{key:"getBar",value:function(n){return h.BARS[n]?h.BARS[n].toString():""}},{key:"correctIndex",value:function(n,a){if(a===h.SET_A){var i=n.shift();return i<32?i+64:i-32}else return a===h.SET_B?n.shift()-32:(n.shift()-48)*10+n.shift()-48}},{key:"next",value:function(n,a,i){if(!n.length)return{result:"",checksum:0};var o=void 0,u=void 0;if(n[0]>=200){u=n.shift()-105;var d=h.SWAP[u];d!==void 0?o=e.next(n,a+1,d):((i===h.SET_A||i===h.SET_B)&&u===h.SHIFT&&(n[0]=i===h.SET_A?n[0]>95?n[0]-96:n[0]:n[0]<32?n[0]+96:n[0]),o=e.next(n,a+1,i))}else u=e.correctIndex(n,i),o=e.next(n,a+1,i);var g=e.getBar(u),Lt=u*a;return{result:g+o.result,checksum:Lt+o.checksum}}}]),e}(On.default);M.default=$n;var pe={};Object.defineProperty(pe,"__esModule",{value:!0});var O=f,pt=function(e){return e.match(new RegExp("^"+O.A_CHARS+"*"))[0].length},gt=function(e){return e.match(new RegExp("^"+O.B_CHARS+"*"))[0].length},Ot=function(e){return e.match(new RegExp("^"+O.C_CHARS+"*"))[0]};function ge(t,e){var r=e?O.A_CHARS:O.B_CHARS,n=t.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(n)return n[1]+"Ì"+Et(t.substring(n[1].length));var a=t.match(new RegExp("^"+r+"+"))[0];return a.length===t.length?t:a+String.fromCharCode(e?205:206)+ge(t.substring(a.length),!e)}function Et(t){var e=Ot(t),r=e.length;if(r===t.length)return t;t=t.substring(r);var n=pt(t)>=gt(t);return e+String.fromCharCode(n?206:205)+ge(t,n)}pe.default=function(t){var e=void 0,r=Ot(t).length;if(r>=2)e=O.C_START_CHAR+Et(t);else{var n=pt(t)>gt(t);e=(n?O.A_START_CHAR:O.B_START_CHAR)+ge(t,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(a,i){return"Ë"+i})};Object.defineProperty(ye,"__esModule",{value:!0});var xn=M,Sn=bt(xn),Rn=pe,An=bt(Rn);function bt(t){return t&&t.__esModule?t:{default:t}}function Pn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ue(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Tn(t,e){if(typeof e!="function"&&e!==null)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)}var Mn=function(t){Tn(e,t);function e(r,n){if(Pn(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(r))var a=ue(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,An.default)(r),n));else var a=ue(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return ue(a)}return e}(Sn.default);ye.default=Mn;var Oe={};Object.defineProperty(Oe,"__esModule",{value:!0});var kn=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),In=M,Dn=Bn(In),Ye=f;function Bn(t){return t&&t.__esModule?t:{default:t}}function jn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ln(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Nn(t,e){if(typeof e!="function"&&e!==null)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)}var Cn=function(t){Nn(e,t);function e(r,n){return jn(this,e),Ln(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Ye.A_START_CHAR+r,n))}return kn(e,[{key:"valid",value:function(){return new RegExp("^"+Ye.A_CHARS+"+$").test(this.data)}}]),e}(Dn.default);Oe.default=Cn;var Ee={};Object.defineProperty(Ee,"__esModule",{value:!0});var Gn=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),Fn=M,Hn=Xn(Fn),Ze=f;function Xn(t){return t&&t.__esModule?t:{default:t}}function zn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Un(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Vn(t,e){if(typeof e!="function"&&e!==null)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)}var qn=function(t){Vn(e,t);function e(r,n){return zn(this,e),Un(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Ze.B_START_CHAR+r,n))}return Gn(e,[{key:"valid",value:function(){return new RegExp("^"+Ze.B_CHARS+"+$").test(this.data)}}]),e}(Hn.default);Ee.default=qn;var be={};Object.defineProperty(be,"__esModule",{value:!0});var Jn=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),Wn=M,Qn=Yn(Wn),Ke=f;function Yn(t){return t&&t.__esModule?t:{default:t}}function Zn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function er(t,e){if(typeof e!="function"&&e!==null)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)}var tr=function(t){er(e,t);function e(r,n){return Zn(this,e),Kn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Ke.C_START_CHAR+r,n))}return Jn(e,[{key:"valid",value:function(){return new RegExp("^"+Ke.C_CHARS+"+$").test(this.data)}}]),e}(Qn.default);be.default=tr;Object.defineProperty(y,"__esModule",{value:!0});y.CODE128C=y.CODE128B=y.CODE128A=y.CODE128=void 0;var nr=ye,rr=Q(nr),ar=Oe,ir=Q(ar),or=Ee,ur=Q(or),fr=be,cr=Q(fr);function Q(t){return t&&t.__esModule?t:{default:t}}y.CODE128=rr.default;y.CODE128A=ir.default;y.CODE128B=ur.default;y.CODE128C=cr.default;var c={},me={},s={};Object.defineProperty(s,"__esModule",{value:!0});s.SIDE_BIN="101";s.MIDDLE_BIN="01010";s.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]};s.EAN2_STRUCTURE=["LL","LG","GL","GG"];s.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"];s.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"];var Y={},$={};Object.defineProperty($,"__esModule",{value:!0});var lr=s,dr=function(e,r,n){var a=e.split("").map(function(o,u){return lr.BINARIES[r[u]]}).map(function(o,u){return o?o[e[u]]:""});if(n){var i=e.length-1;a=a.map(function(o,u){return u<i?o+n:o})}return a.join("")};$.default=dr;Object.defineProperty(Y,"__esModule",{value:!0});var hr=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),R=s,_r=$,et=mt(_r),vr=l,sr=mt(vr);function mt(t){return t&&t.__esModule?t:{default:t}}function yr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function gr(t,e){if(typeof e!="function"&&e!==null)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)}var Or=function(t){gr(e,t);function e(r,n){yr(this,e);var a=pr(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return a.fontSize=!n.flat&&n.fontSize>n.width*10?n.width*10:n.fontSize,a.guardHeight=n.height+a.fontSize/2+n.textMargin,a}return hr(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(n,a){return this.text.substr(n,a)}},{key:"leftEncode",value:function(n,a){return(0,et.default)(n,a)}},{key:"rightText",value:function(n,a){return this.text.substr(n,a)}},{key:"rightEncode",value:function(n,a){return(0,et.default)(n,a)}},{key:"encodeGuarded",value:function(){var n={fontSize:this.fontSize},a={height:this.guardHeight};return[{data:R.SIDE_BIN,options:a},{data:this.leftEncode(),text:this.leftText(),options:n},{data:R.MIDDLE_BIN,options:a},{data:this.rightEncode(),text:this.rightText(),options:n},{data:R.SIDE_BIN,options:a}]}},{key:"encodeFlat",value:function(){var n=[R.SIDE_BIN,this.leftEncode(),R.MIDDLE_BIN,this.rightEncode(),R.SIDE_BIN];return{data:n.join(""),text:this.text}}}]),e}(sr.default);Y.default=Or;Object.defineProperty(me,"__esModule",{value:!0});var Er=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),j=function t(e,r,n){e===null&&(e=Function.prototype);var a=Object.getOwnPropertyDescriptor(e,r);if(a===void 0){var i=Object.getPrototypeOf(e);return i===null?void 0:t(i,r,n)}else{if("value"in a)return a.value;var o=a.get;return o===void 0?void 0:o.call(n)}},br=s,mr=Y,wr=$r(mr);function $r(t){return t&&t.__esModule?t:{default:t}}function xr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Rr(t,e){if(typeof e!="function"&&e!==null)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)}var tt=function(e){var r=e.substr(0,12).split("").map(function(n){return+n}).reduce(function(n,a,i){return i%2?n+a*3:n+a},0);return(10-r%10)%10},Ar=function(t){Rr(e,t);function e(r,n){xr(this,e),r.search(/^[0-9]{12}$/)!==-1&&(r+=tt(r));var a=Sr(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return a.lastChar=n.lastChar,a}return Er(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===tt(this.data)}},{key:"leftText",value:function(){return j(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var n=this.data.substr(1,6),a=br.EAN13_STRUCTURE[this.data[0]];return j(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,n,a)}},{key:"rightText",value:function(){return j(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var n=this.data.substr(7,6);return j(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,n,"RRRRRR")}},{key:"encodeGuarded",value:function(){var n=j(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(n.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(n.push({data:"00"}),n.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),n}}]),e}(wr.default);me.default=Ar;var we={};Object.defineProperty(we,"__esModule",{value:!0});var Pr=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),U=function t(e,r,n){e===null&&(e=Function.prototype);var a=Object.getOwnPropertyDescriptor(e,r);if(a===void 0){var i=Object.getPrototypeOf(e);return i===null?void 0:t(i,r,n)}else{if("value"in a)return a.value;var o=a.get;return o===void 0?void 0:o.call(n)}},Tr=Y,Mr=kr(Tr);function kr(t){return t&&t.__esModule?t:{default:t}}function Ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Br(t,e){if(typeof e!="function"&&e!==null)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)}var nt=function(e){var r=e.substr(0,7).split("").map(function(n){return+n}).reduce(function(n,a,i){return i%2?n+a:n+a*3},0);return(10-r%10)%10},jr=function(t){Br(e,t);function e(r,n){return Ir(this,e),r.search(/^[0-9]{7}$/)!==-1&&(r+=nt(r)),Dr(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return Pr(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===nt(this.data)}},{key:"leftText",value:function(){return U(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var n=this.data.substr(0,4);return U(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,n,"LLLL")}},{key:"rightText",value:function(){return U(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var n=this.data.substr(4,4);return U(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,n,"RRRR")}}]),e}(Mr.default);we.default=jr;var $e={};Object.defineProperty($e,"__esModule",{value:!0});var Lr=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),Nr=s,Cr=$,Gr=wt(Cr),Fr=l,Hr=wt(Fr);function wt(t){return t&&t.__esModule?t:{default:t}}function Xr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ur(t,e){if(typeof e!="function"&&e!==null)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)}var Vr=function(e){var r=e.split("").map(function(n){return+n}).reduce(function(n,a,i){return i%2?n+a*9:n+a*3},0);return r%10},qr=function(t){Ur(e,t);function e(r,n){return Xr(this,e),zr(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return Lr(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var n=Nr.EAN5_STRUCTURE[Vr(this.data)];return{data:"1011"+(0,Gr.default)(this.data,n,"01"),text:this.text}}}]),e}(Hr.default);$e.default=qr;var xe={};Object.defineProperty(xe,"__esModule",{value:!0});var Jr=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),Wr=s,Qr=$,Yr=$t(Qr),Zr=l,Kr=$t(Zr);function $t(t){return t&&t.__esModule?t:{default:t}}function ea(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ta(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function na(t,e){if(typeof e!="function"&&e!==null)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)}var ra=function(t){na(e,t);function e(r,n){return ea(this,e),ta(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return Jr(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var n=Wr.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,Yr.default)(this.data,n,"01"),text:this.text}}}]),e}(Kr.default);xe.default=ra;var C={};Object.defineProperty(C,"__esModule",{value:!0});var aa=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();C.checksum=he;var ia=$,A=xt(ia),oa=l,ua=xt(oa);function xt(t){return t&&t.__esModule?t:{default:t}}function fa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ca(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function la(t,e){if(typeof e!="function"&&e!==null)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)}var da=function(t){la(e,t);function e(r,n){fa(this,e),r.search(/^[0-9]{11}$/)!==-1&&(r+=he(r));var a=ca(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return a.displayValue=n.displayValue,n.fontSize>n.width*10?a.fontSize=n.width*10:a.fontSize=n.fontSize,a.guardHeight=n.height+a.fontSize/2+n.textMargin,a}return aa(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==he(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=(0,A.default)(this.data.substr(0,6),"LLLLLL"),n+="01010",n+=(0,A.default)(this.data.substr(6,6),"RRRRRR"),n+="101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101"+(0,A.default)(this.data[0],"L"),options:{height:this.guardHeight}}),n.push({data:(0,A.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),n.push({data:"01010",options:{height:this.guardHeight}}),n.push({data:(0,A.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),n.push({data:(0,A.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),n}}]),e}(ua.default);function he(t){var e=0,r;for(r=1;r<11;r+=2)e+=parseInt(t[r]);for(r=0;r<11;r+=2)e+=parseInt(t[r])*3;return(10-e%10)%10}C.default=da;var Se={};Object.defineProperty(Se,"__esModule",{value:!0});var ha=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),_a=$,va=St(_a),sa=l,ya=St(sa),pa=C;function St(t){return t&&t.__esModule?t:{default:t}}function ga(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Oa(t,e){if(typeof e!="function"&&e!==null)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)}var Ea=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],ba=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],ma=function(t){Oa(e,t);function e(r,n){ga(this,e);var a=fe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));if(a.isValid=!1,r.search(/^[0-9]{6}$/)!==-1)a.middleDigits=r,a.upcA=rt(r,"0"),a.text=n.text||""+a.upcA[0]+r+a.upcA[a.upcA.length-1],a.isValid=!0;else if(r.search(/^[01][0-9]{7}$/)!==-1)if(a.middleDigits=r.substring(1,r.length-1),a.upcA=rt(a.middleDigits,r[0]),a.upcA[a.upcA.length-1]===r[r.length-1])a.isValid=!0;else return fe(a);else return fe(a);return a.displayValue=n.displayValue,n.fontSize>n.width*10?a.fontSize=n.width*10:a.fontSize=n.fontSize,a.guardHeight=n.height+a.fontSize/2+n.textMargin,a}return ha(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=this.encodeMiddleDigits(),n+="010101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101",options:{height:this.guardHeight}}),n.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),n.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),n}},{key:"encodeMiddleDigits",value:function(){var n=this.upcA[0],a=this.upcA[this.upcA.length-1],i=ba[parseInt(a)][parseInt(n)];return(0,va.default)(this.middleDigits,i)}}]),e}(ya.default);function rt(t,e){for(var r=parseInt(t[t.length-1]),n=Ea[r],a="",i=0,o=0;o<n.length;o++){var u=n[o];u==="X"?a+=t[i++]:a+=u}return a=""+e+a,""+a+(0,pa.checksum)(a)}Se.default=ma;Object.defineProperty(c,"__esModule",{value:!0});c.UPCE=c.UPC=c.EAN2=c.EAN5=c.EAN8=c.EAN13=void 0;var wa=me,$a=k(wa),xa=we,Sa=k(xa),Ra=$e,Aa=k(Ra),Pa=xe,Ta=k(Pa),Ma=C,ka=k(Ma),Ia=Se,Da=k(Ia);function k(t){return t&&t.__esModule?t:{default:t}}c.EAN13=$a.default;c.EAN8=Sa.default;c.EAN5=Aa.default;c.EAN2=Ta.default;c.UPC=ka.default;c.UPCE=Da.default;var T={},Z={},G={};Object.defineProperty(G,"__esModule",{value:!0});G.START_BIN="1010";G.END_BIN="11101";G.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"];Object.defineProperty(Z,"__esModule",{value:!0});var Ba=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),V=G,ja=l,La=Na(ja);function Na(t){return t&&t.__esModule?t:{default:t}}function Ca(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ga(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Fa(t,e){if(typeof e!="function"&&e!==null)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)}var Ha=function(t){Fa(e,t);function e(){return Ca(this,e),Ga(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Ba(e,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var n=this,a=this.data.match(/.{2}/g).map(function(i){return n.encodePair(i)}).join("");return{data:V.START_BIN+a+V.END_BIN,text:this.text}}},{key:"encodePair",value:function(n){var a=V.BINARIES[n[1]];return V.BINARIES[n[0]].split("").map(function(i,o){return(i==="1"?"111":"1")+(a[o]==="1"?"000":"0")}).join("")}}]),e}(La.default);Z.default=Ha;var Re={};Object.defineProperty(Re,"__esModule",{value:!0});var Xa=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),za=Z,Ua=Va(za);function Va(t){return t&&t.__esModule?t:{default:t}}function qa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ja(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Wa(t,e){if(typeof e!="function"&&e!==null)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)}var at=function(e){var r=e.substr(0,13).split("").map(function(n){return parseInt(n,10)}).reduce(function(n,a,i){return n+a*(3-i%2*2)},0);return Math.ceil(r/10)*10-r},Qa=function(t){Wa(e,t);function e(r,n){return qa(this,e),r.search(/^[0-9]{13}$/)!==-1&&(r+=at(r)),Ja(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return Xa(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===at(this.data)}}]),e}(Ua.default);Re.default=Qa;Object.defineProperty(T,"__esModule",{value:!0});T.ITF14=T.ITF=void 0;var Ya=Z,Za=Rt(Ya),Ka=Re,ei=Rt(Ka);function Rt(t){return t&&t.__esModule?t:{default:t}}T.ITF=Za.default;T.ITF14=ei.default;var v={},x={};Object.defineProperty(x,"__esModule",{value:!0});var ti=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),ni=l,ri=ai(ni);function ai(t){return t&&t.__esModule?t:{default:t}}function ii(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oi(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ui(t,e){if(typeof e!="function"&&e!==null)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)}var fi=function(t){ui(e,t);function e(r,n){return ii(this,e),oi(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return ti(e,[{key:"encode",value:function(){for(var n="110",a=0;a<this.data.length;a++){var i=parseInt(this.data[a]),o=i.toString(2);o=ci(o,4-o.length);for(var u=0;u<o.length;u++)n+=o[u]=="0"?"100":"110"}return n+="1001",{data:n,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),e}(ri.default);function ci(t,e){for(var r=0;r<e;r++)t="0"+t;return t}x.default=fi;var Ae={},S={};Object.defineProperty(S,"__esModule",{value:!0});S.mod10=li;S.mod11=di;function li(t){for(var e=0,r=0;r<t.length;r++){var n=parseInt(t[r]);(r+t.length)%2===0?e+=n:e+=n*2%10+Math.floor(n*2/10)}return(10-e%10)%10}function di(t){for(var e=0,r=[2,3,4,5,6,7],n=0;n<t.length;n++){var a=parseInt(t[t.length-1-n]);e+=r[n%r.length]*a}return(11-e%11)%11}Object.defineProperty(Ae,"__esModule",{value:!0});var hi=x,_i=si(hi),vi=S;function si(t){return t&&t.__esModule?t:{default:t}}function yi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pi(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function gi(t,e){if(typeof e!="function"&&e!==null)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)}var Oi=function(t){gi(e,t);function e(r,n){return yi(this,e),pi(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r+(0,vi.mod10)(r),n))}return e}(_i.default);Ae.default=Oi;var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0});var Ei=x,bi=wi(Ei),mi=S;function wi(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 xi(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Si(t,e){if(typeof e!="function"&&e!==null)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)}var Ri=function(t){Si(e,t);function e(r,n){return $i(this,e),xi(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r+(0,mi.mod11)(r),n))}return e}(bi.default);Pe.default=Ri;var Te={};Object.defineProperty(Te,"__esModule",{value:!0});var Ai=x,Pi=Ti(Ai),it=S;function Ti(t){return t&&t.__esModule?t:{default:t}}function Mi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ki(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ii(t,e){if(typeof e!="function"&&e!==null)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)}var Di=function(t){Ii(e,t);function e(r,n){return Mi(this,e),r+=(0,it.mod10)(r),r+=(0,it.mod10)(r),ki(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return e}(Pi.default);Te.default=Di;var Me={};Object.defineProperty(Me,"__esModule",{value:!0});var Bi=x,ji=Li(Bi),ot=S;function Li(t){return t&&t.__esModule?t:{default:t}}function Ni(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ci(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Gi(t,e){if(typeof e!="function"&&e!==null)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)}var Fi=function(t){Gi(e,t);function e(r,n){return Ni(this,e),r+=(0,ot.mod11)(r),r+=(0,ot.mod10)(r),Ci(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return e}(ji.default);Me.default=Fi;Object.defineProperty(v,"__esModule",{value:!0});v.MSI1110=v.MSI1010=v.MSI11=v.MSI10=v.MSI=void 0;var Hi=x,Xi=F(Hi),zi=Ae,Ui=F(zi),Vi=Pe,qi=F(Vi),Ji=Te,Wi=F(Ji),Qi=Me,Yi=F(Qi);function F(t){return t&&t.__esModule?t:{default:t}}v.MSI=Xi.default;v.MSI10=Ui.default;v.MSI11=qi.default;v.MSI1010=Wi.default;v.MSI1110=Yi.default;var K={};Object.defineProperty(K,"__esModule",{value:!0});K.pharmacode=void 0;var Zi=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),Ki=l,eo=to(Ki);function to(t){return t&&t.__esModule?t:{default:t}}function no(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ro(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ao(t,e){if(typeof e!="function"&&e!==null)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)}var io=function(t){ao(e,t);function e(r,n){no(this,e);var a=ro(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return a.number=parseInt(r,10),a}return Zi(e,[{key:"encode",value:function(){for(var n=this.number,a="";!isNaN(n)&&n!=0;)n%2===0?(a="11100"+a,n=(n-2)/2):(a="100"+a,n=(n-1)/2);return a=a.slice(0,-2),{data:a,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(eo.default);K.pharmacode=io;var ee={};Object.defineProperty(ee,"__esModule",{value:!0});ee.codabar=void 0;var oo=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),uo=l,fo=co(uo);function co(t){return t&&t.__esModule?t:{default:t}}function lo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ho(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function _o(t,e){if(typeof e!="function"&&e!==null)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)}var vo=function(t){_o(e,t);function e(r,n){lo(this,e),r.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(r="A"+r+"A");var a=ho(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r.toUpperCase(),n));return a.text=a.options.text||a.text.replace(/[A-D]/g,""),a}return oo(e,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var n=[],a=this.getEncodings(),i=0;i<this.data.length;i++)n.push(a[this.data.charAt(i)]),i!==this.data.length-1&&n.push("0");return{text:this.text,data:n.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),e}(fo.default);ee.codabar=vo;var te={};Object.defineProperty(te,"__esModule",{value:!0});te.GenericBarcode=void 0;var so=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),yo=l,po=go(yo);function go(t){return t&&t.__esModule?t:{default:t}}function Oo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Eo(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function bo(t,e){if(typeof e!="function"&&e!==null)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)}var mo=function(t){bo(e,t);function e(r,n){return Oo(this,e),Eo(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return so(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(po.default);te.GenericBarcode=mo;Object.defineProperty(se,"__esModule",{value:!0});var wo=W,q=y,P=c,ut=T,L=v,$o=K,xo=ee,So=te;se.default={CODE39:wo.CODE39,CODE128:q.CODE128,CODE128A:q.CODE128A,CODE128B:q.CODE128B,CODE128C:q.CODE128C,EAN13:P.EAN13,EAN8:P.EAN8,EAN5:P.EAN5,EAN2:P.EAN2,UPC:P.UPC,UPCE:P.UPCE,ITF14:ut.ITF14,ITF:ut.ITF,MSI:L.MSI,MSI10:L.MSI10,MSI11:L.MSI11,MSI1010:L.MSI1010,MSI1110:L.MSI1110,pharmacode:$o.pharmacode,codabar:xo.codabar,GenericBarcode:So.GenericBarcode};var I={};Object.defineProperty(I,"__esModule",{value:!0});var Ro=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};I.default=function(t,e){return Ro({},t,e)};var ke={};Object.defineProperty(ke,"__esModule",{value:!0});ke.default=Ao;function Ao(t){var e=[];function r(n){if(Array.isArray(n))for(var a=0;a<n.length;a++)r(n[a]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}return r(t),e}var Ie={};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.default=Po;function Po(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}var De={},Be={},ne={};Object.defineProperty(ne,"__esModule",{value:!0});ne.default=To;function To(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in e)e.hasOwnProperty(r)&&(r=e[r],typeof t[r]=="string"&&(t[r]=parseInt(t[r],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}var re={};Object.defineProperty(re,"__esModule",{value:!0});var Mo={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};re.default=Mo;Object.defineProperty(Be,"__esModule",{value:!0});var ko=ne,Io=At(ko),Do=re,ft=At(Do);function At(t){return t&&t.__esModule?t:{default:t}}function Bo(t){var e={};for(var r in ft.default)ft.default.hasOwnProperty(r)&&(t.hasAttribute("jsbarcode-"+r.toLowerCase())&&(e[r]=t.getAttribute("jsbarcode-"+r.toLowerCase())),t.hasAttribute("data-"+r.toLowerCase())&&(e[r]=t.getAttribute("data-"+r.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,Io.default)(e),e}Be.default=Bo;var je={},Le={},_={};Object.defineProperty(_,"__esModule",{value:!0});_.getTotalWidthOfEncodings=_.calculateEncodingAttributes=_.getBarcodePadding=_.getEncodingHeight=_.getMaximumHeightOfEncodings=void 0;var jo=I,Lo=No(jo);function No(t){return t&&t.__esModule?t:{default:t}}function Pt(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function Tt(t,e,r){if(r.displayValue&&e<t){if(r.textAlign=="center")return Math.floor((t-e)/2);if(r.textAlign=="left")return 0;if(r.textAlign=="right")return Math.floor(t-e)}return 0}function Co(t,e,r){for(var n=0;n<t.length;n++){var a=t[n],i=(0,Lo.default)(e,a.options),o;i.displayValue?o=Ho(a.text,i,r):o=0;var u=a.data.length*i.width;a.width=Math.ceil(Math.max(o,u)),a.height=Pt(a,i),a.barcodePadding=Tt(o,u,i)}}function Go(t){for(var e=0,r=0;r<t.length;r++)e+=t[r].width;return e}function Fo(t){for(var e=0,r=0;r<t.length;r++)t[r].height>e&&(e=t[r].height);return e}function Ho(t,e,r){var n;if(r)n=r;else if(typeof document!="undefined")n=document.createElement("canvas").getContext("2d");else return 0;n.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var a=n.measureText(t);if(!a)return 0;var i=a.width;return i}_.getMaximumHeightOfEncodings=Fo;_.getEncodingHeight=Pt;_.getBarcodePadding=Tt;_.calculateEncodingAttributes=Co;_.getTotalWidthOfEncodings=Go;Object.defineProperty(Le,"__esModule",{value:!0});var Xo=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),zo=I,Uo=Vo(zo),ce=_;function Vo(t){return t&&t.__esModule?t:{default:t}}function qo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Jo=function(){function t(e,r,n){qo(this,t),this.canvas=e,this.encodings=r,this.options=n}return Xo(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var r=0;r<this.encodings.length;r++){var n=(0,Uo.default)(this.options,this.encodings[r].options);this.drawCanvasBarcode(n,this.encodings[r]),this.drawCanvasText(n,this.encodings[r]),this.moveCanvasDrawing(this.encodings[r])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var r=this.canvas.getContext("2d");r.save(),(0,ce.calculateEncodingAttributes)(this.encodings,this.options,r);var n=(0,ce.getTotalWidthOfEncodings)(this.encodings),a=(0,ce.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=n+this.options.marginLeft+this.options.marginRight,this.canvas.height=a,r.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(r.fillStyle=this.options.background,r.fillRect(0,0,this.canvas.width,this.canvas.height)),r.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(r,n){var a=this.canvas.getContext("2d"),i=n.data,o;r.textPosition=="top"?o=r.marginTop+r.fontSize+r.textMargin:o=r.marginTop,a.fillStyle=r.lineColor;for(var u=0;u<i.length;u++){var d=u*r.width+n.barcodePadding;i[u]==="1"?a.fillRect(d,o,r.width,r.height):i[u]&&a.fillRect(d,o,r.width,r.height*i[u])}}},{key:"drawCanvasText",value:function(r,n){var a=this.canvas.getContext("2d"),i=r.fontOptions+" "+r.fontSize+"px "+r.font;if(r.displayValue){var o,u;r.textPosition=="top"?u=r.marginTop+r.fontSize-r.textMargin:u=r.height+r.textMargin+r.marginTop+r.fontSize,a.font=i,r.textAlign=="left"||n.barcodePadding>0?(o=0,a.textAlign="left"):r.textAlign=="right"?(o=n.width-1,a.textAlign="right"):(o=n.width/2,a.textAlign="center"),a.fillText(n.text,o,u)}}},{key:"moveCanvasDrawing",value:function(r){var n=this.canvas.getContext("2d");n.translate(r.width,0)}},{key:"restoreCanvas",value:function(){var r=this.canvas.getContext("2d");r.restore()}}]),t}();Le.default=Jo;var Ne={};Object.defineProperty(Ne,"__esModule",{value:!0});var Wo=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),Qo=I,Yo=Zo(Qo),le=_;function Zo(t){return t&&t.__esModule?t:{default:t}}function Ko(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var J="http://www.w3.org/2000/svg",eu=function(){function t(e,r,n){Ko(this,t),this.svg=e,this.encodings=r,this.options=n,this.document=n.xmlDocument||document}return Wo(t,[{key:"render",value:function(){var r=this.options.marginLeft;this.prepareSVG();for(var n=0;n<this.encodings.length;n++){var a=this.encodings[n],i=(0,Yo.default)(this.options,a.options),o=this.createGroup(r,i.marginTop,this.svg);this.setGroupOptions(o,i),this.drawSvgBarcode(o,i,a),this.drawSVGText(o,i,a),r+=a.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,le.calculateEncodingAttributes)(this.encodings,this.options);var r=(0,le.getTotalWidthOfEncodings)(this.encodings),n=(0,le.getMaximumHeightOfEncodings)(this.encodings),a=r+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(a,n),this.options.background&&this.drawRect(0,0,a,n,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(r,n,a){var i=a.data,o;n.textPosition=="top"?o=n.fontSize+n.textMargin:o=0;for(var u=0,d=0,g=0;g<i.length;g++)d=g*n.width+a.barcodePadding,i[g]==="1"?u++:u>0&&(this.drawRect(d-n.width*u,o,n.width*u,n.height,r),u=0);u>0&&this.drawRect(d-n.width*(u-1),o,n.width*u,n.height,r)}},{key:"drawSVGText",value:function(r,n,a){var i=this.document.createElementNS(J,"text");if(n.displayValue){var o,u;i.setAttribute("style","font:"+n.fontOptions+" "+n.fontSize+"px "+n.font),n.textPosition=="top"?u=n.fontSize-n.textMargin:u=n.height+n.textMargin+n.fontSize,n.textAlign=="left"||a.barcodePadding>0?(o=0,i.setAttribute("text-anchor","start")):n.textAlign=="right"?(o=a.width-1,i.setAttribute("text-anchor","end")):(o=a.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",o),i.setAttribute("y",u),i.appendChild(this.document.createTextNode(a.text)),r.appendChild(i)}}},{key:"setSvgAttributes",value:function(r,n){var a=this.svg;a.setAttribute("width",r+"px"),a.setAttribute("height",n+"px"),a.setAttribute("x","0px"),a.setAttribute("y","0px"),a.setAttribute("viewBox","0 0 "+r+" "+n),a.setAttribute("xmlns",J),a.setAttribute("version","1.1"),a.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(r,n,a){var i=this.document.createElementNS(J,"g");return i.setAttribute("transform","translate("+r+", "+n+")"),a.appendChild(i),i}},{key:"setGroupOptions",value:function(r,n){r.setAttribute("style","fill:"+n.lineColor+";")}},{key:"drawRect",value:function(r,n,a,i,o){var u=this.document.createElementNS(J,"rect");return u.setAttribute("x",r),u.setAttribute("y",n),u.setAttribute("width",a),u.setAttribute("height",i),o.appendChild(u),u}}]),t}();Ne.default=eu;var Ce={};Object.defineProperty(Ce,"__esModule",{value:!0});var tu=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function nu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ru=function(){function t(e,r,n){nu(this,t),this.object=e,this.encodings=r,this.options=n}return tu(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();Ce.default=ru;Object.defineProperty(je,"__esModule",{value:!0});var au=Le,iu=Ge(au),ou=Ne,uu=Ge(ou),fu=Ce,cu=Ge(fu);function Ge(t){return t&&t.__esModule?t:{default:t}}je.default={CanvasRenderer:iu.default,SVGRenderer:uu.default,ObjectRenderer:cu.default};var D={};Object.defineProperty(D,"__esModule",{value:!0});function Fe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function He(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Xe(t,e){if(typeof e!="function"&&e!==null)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)}var lu=function(t){Xe(e,t);function e(r,n){Fe(this,e);var a=He(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.name="InvalidInputException",a.symbology=r,a.input=n,a.message='"'+a.input+'" is not a valid input for '+a.symbology,a}return e}(Error),du=function(t){Xe(e,t);function e(){Fe(this,e);var r=He(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.name="InvalidElementException",r.message="Not supported type to render on",r}return e}(Error),hu=function(t){Xe(e,t);function e(){Fe(this,e);var r=He(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.name="NoElementException",r.message="No element to render on.",r}return e}(Error);D.InvalidInputException=lu;D.InvalidElementException=du;D.NoElementException=hu;Object.defineProperty(De,"__esModule",{value:!0});var _u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vu=Be,_e=Mt(vu),su=je,N=Mt(su),yu=D;function Mt(t){return t&&t.__esModule?t:{default:t}}function ze(t){if(typeof t=="string")return pu(t);if(Array.isArray(t)){for(var e=[],r=0;r<t.length;r++)e.push(ze(t[r]));return e}else{if(typeof HTMLCanvasElement!="undefined"&&t instanceof HTMLImageElement)return gu(t);if(t&&t.nodeName&&t.nodeName.toLowerCase()==="svg"||typeof SVGElement!="undefined"&&t instanceof SVGElement)return{element:t,options:(0,_e.default)(t),renderer:N.default.SVGRenderer};if(typeof HTMLCanvasElement!="undefined"&&t instanceof HTMLCanvasElement)return{element:t,options:(0,_e.default)(t),renderer:N.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:N.default.CanvasRenderer};if(t&&(typeof t=="undefined"?"undefined":_u(t))==="object"&&!t.nodeName)return{element:t,renderer:N.default.ObjectRenderer};throw new yu.InvalidElementException}}function pu(t){var e=document.querySelectorAll(t);if(e.length!==0){for(var r=[],n=0;n<e.length;n++)r.push(ze(e[n]));return r}}function gu(t){var e=document.createElement("canvas");return{element:e,options:(0,_e.default)(t),renderer:N.default.CanvasRenderer,afterRender:function(){t.setAttribute("src",e.toDataURL())}}}De.default=ze;var Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});var Ou=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Eu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var bu=function(){function t(e){Eu(this,t),this.api=e}return Ou(t,[{key:"handleCatch",value:function(r){if(r.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw r.message;else throw r;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(r){try{var n=r.apply(void 0,arguments);return this.api._options.valid(!0),n}catch(a){return this.handleCatch(a),this.api}}}]),t}();Ue.default=bu;var mu=se,w=E(mu),wu=I,H=E(wu),$u=ke,kt=E($u),xu=Ie,ct=E(xu),Su=De,Ru=E(Su),Au=ne,Pu=E(Au),Tu=Ue,Mu=E(Tu),It=D,ku=re,Dt=E(ku);function E(t){return t&&t.__esModule?t:{default:t}}var p=function(){},ae=function(e,r,n){var a=new p;if(typeof e=="undefined")throw Error("No element to render on was provided.");return a._renderProperties=(0,Ru.default)(e),a._encodings=[],a._options=Dt.default,a._errorHandler=new Mu.default(a),typeof r!="undefined"&&(n=n||{},n.format||(n.format=jt()),a.options(n)[n.format](r,n).render()),a};ae.getModule=function(t){return w.default[t]};for(var lt in w.default)w.default.hasOwnProperty(lt)&&Iu(w.default,lt);function Iu(t,e){p.prototype[e]=p.prototype[e.toUpperCase()]=p.prototype[e.toLowerCase()]=function(r,n){var a=this;return a._errorHandler.wrapBarcodeCall(function(){n.text=typeof n.text=="undefined"?void 0:""+n.text;var i=(0,H.default)(a._options,n);i=(0,Pu.default)(i);var o=t[e],u=Bt(r,o,i);return a._encodings.push(u),a})}}function Bt(t,e,r){t=""+t;var n=new e(t,r);if(!n.valid())throw new It.InvalidInputException(n.constructor.name,t);var a=n.encode();a=(0,kt.default)(a);for(var i=0;i<a.length;i++)a[i].options=(0,H.default)(r,a[i].options);return a}function jt(){return w.default.CODE128?"CODE128":Object.keys(w.default)[0]}p.prototype.options=function(t){return this._options=(0,H.default)(this._options,t),this};p.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this};p.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var t;for(var e in this._renderProperties){t=this._renderProperties[e];var r=(0,H.default)(this._options,t.options);r.format=="auto"&&(r.format=jt()),this._errorHandler.wrapBarcodeCall(function(){var n=r.value,a=w.default[r.format.toUpperCase()],i=Bt(n,a,r);ve(t,i,r)})}}};p.prototype.render=function(){if(!this._renderProperties)throw new It.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)ve(this._renderProperties[t],this._encodings,this._options);else ve(this._renderProperties,this._encodings,this._options);return this};p.prototype._defaults=Dt.default;function ve(t,e,r){e=(0,kt.default)(e);for(var n=0;n<e.length;n++)e[n].options=(0,H.default)(r,e[n].options),(0,ct.default)(e[n].options);(0,ct.default)(r);var a=t.renderer,i=new a(t.element,e,r);i.render(),t.afterRender&&t.afterRender()}typeof window!="undefined"&&(window.JsBarcode=ae);typeof jQuery!="undefined"&&(jQuery.fn.JsBarcode=function(t,e){var r=[];return jQuery(this).each(function(){r.push(this)}),ae(r,t,e)});var Du=ae;const Bu=Xt(Du),ju=dt({name:"ReBarcode",__name:"index",props:{tag:{type:String,default:"canvas"},text:{type:String,default:null},options:{type:Object,default(){return{}}},type:{type:String,default:"CODE128"}},setup(t){const e=t,r=zt(null);return Ut(()=>{const n=We(Je({},e.options),{format:e.type});Bu(r.value,e.text,n)}),(n,a)=>(de(),Vt(qt(t.tag),{ref_key:"wrapEl",ref:r},null,512))}}),Lu=Jt(ju),Nu={class:"font-medium"},Fu=dt({name:"BarCode",__name:"barcode",setup(t){const e=[{text:"CODE128",type:"CODE128",options:{}},{text:"CODE39",type:"CODE39",options:{lineColor:"#990000"}},{text:"123456",type:"pharmacode",options:{background:"#eee",width:5}}];return(r,n)=>{const a=X("el-link"),i=X("el-card"),o=X("el-col"),u=X("el-row");return de(),Qe("div",null,[b(i,{shadow:"never"},{header:m(()=>[Wt("div",Nu,[z(" 条形码(基于 "),b(a,{href:"https://lindell.me/JsBarcode/",target:"_blank",style:{margin:"0 5px 4px 0","font-size":"16px"}},{default:m(()=>[z(" JsBarcode ")]),_:1}),z(" 生成) ")]),b(a,{class:"mt-2",href:"https://github.com/pure-admin/vue-pure-admin/blob/main/src/views/able/barcode.vue",target:"_blank"},{default:m(()=>[z(" 代码位置 src/views/able/barcode.vue ")]),_:1})]),default:m(()=>[b(u,{gutter:12},{default:m(()=>[(de(),Qe(Qt,null,Yt(e,(d,g)=>b(o,{key:g,xs:24,sm:24,md:12,lg:8,xl:8},{default:m(()=>[b(i,{shadow:"hover",class:"flex justify-center"},{default:m(()=>[b(Zt(Lu),{text:d.text,type:d.type,options:d.options},null,8,["text","type","options"])]),_:2},1024)]),_:2},1024)),64))]),_:1})]),_:1})])}}});export{Fu as default};
|