text: this.ej=this.ej||{},this.ej.barcodegenerator=function(e,t){"use strict";function r(e,r){var i=t.createElement(e);return r&&o(i,r),i}function i(e){var r,i=[];if("msie"===t.Browser.info.name||"edge"===t.Browser.info.name)for(var a=0;a<e.childNodes.length;a++)1===(r=e.childNodes[a]).nodeType&&i.push(r);else i=e.children;return i}function a(e){window.barcodeMeasureElement.style.visibility="visible";var t=i(window.barcodeMeasureElement.children[1])[0];t.textContent=e.string,t.setAttribute("style","font-size:"+e.stringSize+"px; font-family:"+e.fontStyle+";font-weight:");var r=new d(0,0);return r.width=t.getBBox().width,r.height=t.getBBox().height,window.barcodeMeasureElement.style.visibility="hidden",r}function o(e,t){for(var r=Object.keys(t),i=0;i<r.length;i++)e.setAttribute(r[i],t[r[i]])}function s(e,t){var r=document.createElementNS("http://www.w3.org/2000/svg",e);return o(r,t),r}function n(){if(window.barcodeMeasureElement)window.barcodeMeasureElement.usageCount+=1;else{var e=r("div",{id:"barcodeMeasureElement",class:"barcodeMeasureElement",style:"visibility:hidden ; height: 0px ; width: 0px; overflow: hidden;"}),t=r("span",{style:"display:inline-block ; line-height: normal"});e.appendChild(t);var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("xlink","http://www.w3.org/1999/xlink"),e.appendChild(i);var a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.appendChild(a),window.barcodeMeasureElement=e,window.barcodeMeasureElement.usageCount=1,document.body.appendChild(e)}}function c(e,t,r,i){var a=t;return"SVG"!==r||e.mode?e.mode&&a.parentNode.removeChild(a):a.innerHTML="",new b(i,"SVG"===r)}function h(e,t,r,i,a,o){return{width:e,height:t,x:r,y:i,color:a,strokeColor:o}}function l(e,t){var r,i;r=1.5*e.element.offsetWidth,i=1.5*e.element.offsetHeight,p.getContext(t).clearRect(0,0,r,i)}function u(e,t){l(e,t)}!function(e){e[e.invalid=0]="invalid"}(e.BarcodeEvent||(e.BarcodeEvent={})),function(e){e[e.All=2]="All"}(e.QuietZone||(e.QuietZone={})),function(e){e[e.Auto=0]="Auto",e[e.Size10x10=1]="Size10x10",e[e.Size12x12=2]="Size12x12",e[e.Size14x14=3]="Size14x14",e[e.Size16x16=4]="Size16x16",e[e.Size18x18=5]="Size18x18",e[e.Size20x20=6]="Size20x20",e[e.Size22x22=7]="Size22x22",e[e.Size24x24=8]="Size24x24",e[e.Size26x26=9]="Size26x26",e[e.Size32x32=10]="Size32x32",e[e.Size36x36=11]="Size36x36",e[e.Size40x40=12]="Size40x40",e[e.Size44x44=13]="Size44x44",e[e.Size48x48=14]="Size48x48",e[e.Size52x52=15]="Size52x52",e[e.Size64x64=16]="Size64x64",e[e.Size72x72=17]="Size72x72",e[e.Size80x80=18]="Size80x80",e[e.Size88x88=19]="Size88x88",e[e.Size96x96=20]="Size96x96",e[e.Size104x104=21]="Size104x104",e[e.Size120x120=22]="Size120x120",e[e.Size132x132=23]="Size132x132",e[e.Size144x144=24]="Size144x144",e[e.Size8x18=25]="Size8x18",e[e.Size8x32=26]="Size8x32",e[e.Size12x26=27]="Size12x26",e[e.Size12x36=28]="Size12x36",e[e.Size16x36=29]="Size16x36",e[e.Size16x48=30]="Size16x48"}(e.DataMatrixSize||(e.DataMatrixSize={})),function(e){e[e.Auto=0]="Auto",e[e.Version01=1]="Version01",e[e.Version02=2]="Version02",e[e.Version03=3]="Version03",e[e.Version04=4]="Version04",e[e.Version05=5]="Version05",e[e.Version06=6]="Version06",e[e.Version07=7]="Version07",e[e.Version08=8]="Version08",e[e.Version09=9]="Version09",e[e.Version10=10]="Version10",e[e.Version11=11]="Version11",e[e.Version12=12]="Version12",e[e.Version13=13]="Version13",e[e.Version14=14]="Version14",e[e.Version15=15]="Version15",e[e.Version16=16]="Version16",e[e.Version17=17]="Version17",e[e.Version18=18]="Version18",e[e.Version19=19]="Version19",e[e.Version20=20]="Version20",e[e.Version21=21]="Version21",e[e.Version22=22]="Version22",e[e.Version23=23]="Version23",e[e.Version24=24]="Version24",e[e.Version25=25]="Version25",e[e.Version26=26]="Version26",e[e.Version27=27]="Version27",e[e.Version28=28]="Version28",e[e.Version29=29]="Version29",e[e.Version30=30]="Version30",e[e.Version31=31]="Version31",e[e.Version32=32]="Version32",e[e.Version33=33]="Version33",e[e.Version34=34]="Version34",e[e.Version35=35]="Version35",e[e.Version36=36]="Version36",e[e.Version37=37]="Version37",e[e.Version38=38]="Version38",e[e.Version39=39]="Version39",e[e.Version40=40]="Version40"}(e.QRCodeVersion||(e.QRCodeVersion={})),function(e){e[e.Low=7]="Low",e[e.Medium=15]="Medium",e[e.Quartile=25]="Quartile",e[e.High=30]="High"}(e.ErrorCorrectionLevel||(e.ErrorCorrectionLevel={}));var d=function(){function e(e,t){this.width=e,this.height=t}return e}(),p=function(){function e(){}return e.getContext=function(e){return e.getContext("2d")},e.prototype.renderRootElement=function(e,t,i,a){var o=r("canvas",e),s=o.getContext("2d");return s.fillStyle=t,s.fillRect(0,0,i,a),o},e.prototype.renderRect=function(e,t){var r=e.getContext("2d");return r.fillStyle=t.color,r.fillRect(t.x,t.y,t.width,t.height),e},e.prototype.renderText=function(e,t){var r=e.getContext("2d");return r.save(),r.font=t.stringSize+"px "+t.fontStyle,r.fillStyle=t.color,r.fillText(t.string,t.x,t.y),e},e}(),m=function(){function e(){}return e.prototype.renderRootElement=function(e,t){var r=s("svg",e);return r.setAttribute("style","background:"+t),r},e.prototype.renderRect=function(e,t){var r=document.createElementNS("http://www.w3.org/2000/svg","rect");return r.setAttribute("x",t.x.toString()),r.setAttribute("y",t.y.toString()),r.setAttribute("width",t.width.toString()),r.setAttribute("height",t.height.toString()),r.setAttribute("fill",t.color),e.appendChild(r),e},e.prototype.renderText=function(e,t){var r=document.createElementNS("http://www.w3.org/2000/svg","text");return r.setAttribute("x",t.x.toString()),r.setAttribute("y",t.y.toString()),r.setAttribute("fill",t.color),r.style.fontSize=t.stringSize.toString()+"px",r.style.fontFamily=t.fontStyle,r.textContent=t.string,e.appendChild(r),e},e}(),b=function(){function e(e,t){this.renderer=null,this.isSvgMode=null,this.isSvgMode=t,this.renderer=t?new m:new p}return e.prototype.renderRootElement=function(e,t,r,i){return this.renderer.renderRootElement(e,t,r,i)},e.prototype.renderRectElement=function(e,t){return this.renderer.renderRect(e,t)},e.prototype.renderTextElement=function(e,t){return this.renderer.renderText(e,t)},e}(),f=function(){function e(){}return e}(),y=function(){function e(e,t,r,i){this.x=Number.MAX_VALUE,this.y=Number.MAX_VALUE,this.width=0,this.height=0,this.x=e,this.y=t,this.width=r,this.height=i}return e}(),v=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return v(t,e),t.prototype.getInstance=function(e){var t=document.getElementById(e);return new b(t.id,this.isSvgMode)},t.prototype.getDrawableSize=function(e,t,r){var i,a;return i=(this.isSvgMode?e.bottom:1.5*e.bottom)+(this.isSvgMode?e.top:1.5*e.top),a=(this.isSvgMode?e.right:1.5*e.right)+(this.isSvgMode?e.left:1.5*e.left),new y(e.left,e.top,t-a,r-i)},t.prototype.getBaseAttributes=function(e,t,r,i,a,o,s,n,c){var h={width:e,height:t,x:r,y:i,color:a,string:o,stringSize:s,visibility:n,fontStyle:c};if(this.isSvgMode||(h.height=h.height/1.5),o&&!this.isSvgMode){var l=1.5*this.margin.bottom-this.margin.bottom;h.y+=l}return h},t.prototype.getBarLineRatio=function(e,t){var r=this.type;if("Code39"===r||"Code32"===r||"Code39Extension"===r||"Code11"===r){var i=e.length*("Code39"===r||"Code32"===r||"Code39Extension"===r?6:3);return t/(e.length*("Code39"===r||"Code32"===r||"Code39Extension"===r?3:2)*2+i+e.length-1)}if("Code128A"===r||"Code128B"===r||"Code128C"===r||"Code128"===r)return t/((c=e[0].length)+e.length-1);if("Code93Extension"===r){for(var a=0,o=0;o<e.length;o++)for(var s=e[o],n=0;n<s.length;n++)a+=Number(s[n]);return t/a}for(var c=0,o=0;o<e.length;o++)c+=s=e[o].length;var h=void 0;return"Ean8"===r||"Ean13"===r||"UpcA"===r?h=2:"Code93"===r&&(h=1-e.length),t/(h?c+e.length-1+h:c+e.length-1)},t.prototype.multipleWidth=function(e,t,r){var i;return"1"===e[t]&&"1"===e[t+1]?(i=r+1,this.multipleWidth(e,t+1,i)):r},t.prototype.barCodeType=function(e){return"Code39"===e||"UpcE"===e||"Code39Extension"===e?"twoBars":"UpcA"===e||"Ean13"===e||"Ean8"===e?"threeBars":"noBars"},t.prototype.checkStartValueCondition=function(e,t,r,i){return 1===e&&0===t&&"twoBars"===i&&"UpcE"!==this.type||(0===e&&t===r-1||2===e&&t===r-2)&&("Ean8"===this.type||"Ean13"===this.type)||"UpcE"===this.type&&2===e&&0===t||"threeBars"===i&&2===e&&t===r-1||"UpcA"===this.type&&(1===e&&t===r-2||3===e&&t===r-2)||"noBars"===i&&0===e&&0===t},t.prototype.checkEndValueCondition=function(e,t,r,i,a,o){var s=this.type;return e===r&&t===i.length-2&&("Code39"===s||"Code39Extension"===s)||"Code11"===s&&t===i.length-1&&e===r-1||"Code93Extension"===s&&t===i.length-1&&e===r-1||"Ean8"===s&&(1===t&&e===r||t===i.length-2&&e===r)||"Ean13"===this.type&&(2===t&&1===e||t===i.length-2&&e===r)||"UpcA"===s&&(3===t&&0===e||5===t&&(a?e===o:1===e))||"UpcE"===s&&t===i.length-2&&1===e||"Code93"===s&&t===i.length-1&&e===r-1||"Code39"!==s&&"Code39Extension"!==s&&"Ean8"!==s&&"Ean13"!==s&&t===i.length-1&&e===r},t.prototype.getDisplayText=function(e,t){return"Ean8"===this.type?1===e?this.value.substring(0,4):this.value.substring(4,8):"Ean13"===this.type?2===e?this.value.substring(1,7):this.value.substring(7):"UpcA"===this.type?3===e?this.value.substring(0,6):this.value.substring(6,12):t.text?t.text:this.value},t.prototype.checkExtraHeight=function(e,t,r){return!(0!==e&&e!==r.length-1||"Code39"!==t&&"Code39Extension"!==t)||!("Ean8"!==t&&"Ean13"!==t||0!==e&&2!==e&&e!==r.length-1)||"UpcA"===t&&(1===e||e===r.length-2||e===r.length-4)||"UpcE"===t&&(1===e||e===r.length-2||e===r.length-4)},t.prototype.getWidthValue=function(e,t,r){return"Code93Extension"!==this.type&&(t=e?e%("Code32"===r?3:2)?1:2:1),"Code93Extension"===this.type&&(t=!e||e%4?!e||e%2?!e||e%3?1:3:2:4),t},t.prototype.calculateBarCodeAttributes=function(e,t,r){var i,o=!1,s=this.getDrawableSize(this.margin,this.width,this.height);if(s.height>0&&s.width>0){var c=void 0,h=[],l=s.x,u=this.getBarLineRatio(e,s.width);u=this.isSvgMode?u:u/1.5;for(var d=0,p=void 0,m=this.type,b=this.displayText.position,f=this.isSvgMode?1:1.5,y=void 0,v=void 0,g=void 0,k=void 0,C=0;C<e.length;C++){var w=e[C],x="UpcA"!==m&&"UpcE"!==m&&"Code11"!==m&&"Code93"!==m&&"Code93Extension"!==m,V=this.barCodeType(this.type),S=this.checkExtraHeight(C,m,e),E=w.length;o=!1;for(var A=0;x?A<=E:A<E;A++){var M=!1;this.checkStartValueCondition(C,A,E,V)?d=l:this.checkEndValueCondition(A,C,E,e,o,i)&&(p=l,"UpcA"===this.type&&o&&i&&(p-=i*u),M=!0);var D="Code39"===m||"Code93Extension"===m||"Code32"===m||"Code11"===m||"Code39Extension"===m?!(A%2):"1"===w[A],B=w.toString(),O=Number(B[A]),P=void 0;P=this.getWidthValue(O,P,m),P*=u,k=this.displayText;var L=this.getDisplayText(C,k);if(y=this.getBaseAttributes(void 0,void 0,d,"Bottom"===b?s.y+s.height+2:s.y+g-2,this.foreColor,r||L,k.size,k.visibility,k.font),g||(n(),g=(v=a(y)).height/2+2),S&&(c=this.getBaseAttributes(P,"Top"===b&&"noBars"!==V?s.height-g-this.displayText.margin.top:s.height,l,"Bottom"===b?s.y:s.y+g+this.displayText.margin.top,this.foreColor)),"Ean13"===m&&0===A&&0===C&&k.visibility&&((y=this.getBaseAttributes(void 0,void 0,d,"Bottom"===b?s.y+s.height+2:s.y+g+this.displayText.margin.top-2-this.displayText.margin.bottom,this.foreColor,r||L,k.size,k.visibility,k.font)).string=this.value[0],this.drawText(t,y)),!S||M||"UpcA"===m&&S){var N="Code39"===m||"Code32"===m||"Code93Extension"===m||"Code39Extension"===m||"Code11"===m,_=s.height,I=_-g*f>0?_-g*f:0;if(N||"Ean8"===m||"Ean13"===m){I="Top"===b&&"noBars"!==V?I-g:I;R=S?s.height:I;"Code39"!==this.type&&(R="Top"===b&&"noBars"!==V?R-this.displayText.margin.top-g:R),c=this.getBaseAttributes(P,R,l,"Bottom"===b?s.y:s.y+g+this.displayText.margin.top,this.foreColor)}if(!(N&&(M||N)||M&&"UpcE"===this.type)){A+=(i=this.multipleWidth(w,A,1))-1,i>1&&(o=!0);var T=i>1?i*P:P,z=s.height-g*f,R=S?s.height:z;R="Top"===b&&"noBars"!==V?R-this.displayText.margin.top-g:R,c=this.getBaseAttributes(T,R,l,"Bottom"===b?s.y:s.y+g+this.displayText.margin.top,this.foreColor),l=i>1?l+i*P:l+1*P}!M&&S||this.verticalTextMargin(k,c,y),k.visibility&&(p&&"Ean8"!==m&&"Ean13"!==m&&"UpcA"!==m&&"UpcE"!==m||("Ean8"===m||"UpcA"===m||"UpcE"===m||"Ean13"===m)&&M)&&(k.margin.left||k.margin.right||!k.text&&"UpcA"!==m?this.getAlignmentPosition(y,p,d,v):this.updateOverlappedTextPosition(p-d,y,v,d,k,p),this.alignDisplayText(y,k,d,p,v),this.drawText(t,y))}D&&h.push(c),this.canIncrementCheck(m,C,e)&&(l+=P)}}this.drawImage(t,h)}},t.prototype.canIncrementCheck=function(e,t,r){return"Code39"===e||"Code32"===e||"Code39Extension"===e||"Code93Extension"===e||"Code11"===e||"UpcE"===e&&(1===t||t===r.length-2)||!("Ean8"!==e&&"Ean13"!==e||0!==t&&t!==r.length-1&&2!==t)},t.prototype.verticalTextMargin=function(e,t,r){e.margin.top&&t.height-e.margin.top>0&&(e.margin.top>0&&"Bottom"===e.position?t.height-=e.margin.top:r.y+=e.margin.top),e.margin.bottom&&t.height-e.margin.bottom>0&&(e.margin.bottom>0?(r.y-=e.margin.bottom,"Bottom"===this.displayText.position&&(t.height-=e.margin.bottom)):r.y-=e.margin.bottom)},t.prototype.getAlignmentPosition=function(e,t,r,i){"Center"===this.displayText.alignment?e.x+=(t-r)/2-.5*i.width:"Left"===this.displayText.alignment?e.x=r:e.x=t-i.width},t.prototype.drawImage=function(e,t){for(var r=this.getInstance(e.id),i=0;i<t.length;i++)r.renderRectElement(e,t[i])},t.prototype.updateDisplayTextSize=function(e,t,r,i,o){if(e.x+t.width>r||e.x<i&&e.stringSize>2){e.x<i&&o.margin.right;if(e.x<i&&o.margin.right){e.stringSize-=2;var s=a(e);e.x+=(r-i)/2-.5*s.width;var n=void 0;n=o.margin.right-(r-(e.x+t.width)),e.x-=n,this.updateDisplayTextSize(e,s,r,i,o)}}},t.prototype.alignDisplayText=function(e,t,r,i,o){var s=!1;if(t.margin.left||t.margin.right){if(e.x-r<t.margin.left&&t.margin.left){s=!0;n=t.margin.left-(e.x-r);e.x+=n,this.updateDisplayTextSize(e,o,i,r,t)}if(i-(e.x+o.width)<t.margin.right&&t.margin.right&&!s){var n=t.margin.right-(i-(e.x+o.width));e.x-=n,this.updateDisplayTextSize(e,o,i,r,t)}else if(i-(e.x+o.width)<t.margin.right){var c=a(e);this.updateOverlappedTextPosition(i-r,e,c,r,t,i),this.updateDisplayTextSize(e,c,i,r,t)}}},t.prototype.updateOverlappedTextPosition=function(e,t,r,i,o,s){if((r.width>e||o)&&s-(t.x+r.width)<=o.margin.right&&t.stringSize>2){t.stringSize-=o?.2:2;var n=a(t);this.updateOverlappedTextPosition(e,t,n,i,o,s)}else!o.margin.left&&!o.margin.right&&t.stringSize>2&&this.getAlignmentPosition(t,s,i,r)},t.prototype.drawText=function(e,t){this.isSvgMode||(t.y/=1.5),this.getInstance(e.id).renderTextElement(e,t)},t}(f),k=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return k(t,e),t.prototype.validateInput=function(e){return-1===e.search(/^[0-9A-Za-z\-\.\ \@\$\/\+\%\!\@\#\$\%\&\*\^\(\)\_\+\=\<\>\?\{\}\[\]\~\-\Ê]+$/)?"Supports only 128 characters of ASCII.":void 0},t.prototype.getCodeValue=function(){return[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]},t.prototype.getBytes=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].charCodeAt(0));return t},t.prototype.appendStartStopCharacters=function(e){var t;return"Code128A"===this.type?t=String.fromCharCode(208):"Code128B"===this.type?t=String.fromCharCode(209):"Code128C"===this.type&&(t=String.fromCharCode(210)),t+e},t.prototype.check128C=function(e){return e.match(new RegExp("^(Ï*[0-9]{2}Ï*)*"))[0]},t.prototype.check128A=function(e){return e.match(new RegExp("^[\0-_È-Ï]*"))[0]},t.prototype.check128B=function(e){return e.match(new RegExp("^[ -È-Ï]*"))[0]},t.prototype.clipAB=function(e,t){var r=t?"[\0-_È-Ï]":"[ -È-Ï]",i=e.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));return i?i[1]+String.fromCharCode(204)+this.clipC(e.substring(i[1].length)):(e.match(new RegExp("^"+r+"+"))[0].length,e.length,e)},t.prototype.code128Clip=function(){if(this.check128C(this.value).length>=2)return String.fromCharCode(210)+this.clipC(this.value);var e=this.check128A(this.value)>this.check128B(this.value);return(e?String.fromCharCode(208):String.fromCharCode(209))+this.clipAB(this.value,e)},t.prototype.clipC=function(e){var t=this.check128C(e),r=t.length;if(r===e.length)return e;e=e.substring(r);var i=this.check128A(e)>=this.check128B(e);return t+String.fromCharCode(i?206:205)+this.clipAB(e,i)},t.prototype.draw=function(e){this.code128(e)},t.prototype.code128=function(e){var t=this.value;t="Code128"!==this.type?this.appendStartStopCharacters(t):this.code128Clip();var r,i,a=(r=this.getBytes(t)).shift()-105;i=103===a?"0":104===a?"1":"2";var o=this.encodeData(r,1,i),s=this.encode(a,o),n=[];n.push(s),this.calculateBarCodeAttributes(n,e)},t.prototype.encodeData=function(e,t,r){if(!e.length)return{result:"",checksum:0};var i,a;if(e[0]>=200){a=e.shift()-105;var o=this.swap(a);void 0!==o&&(i=this.encodeData(e,t+1,o))}else a=this.correctIndex(e,r),i=this.encodeData(e,t+1,r);var s=a*t;return{result:this.getCodes(a)+i.result,checksum:s+i.checksum}},t.prototype.swap=function(e){return 99===e?"2":100===e?"1":"0"},t.prototype.encode=function(e,t){var r=this.getCodes(e)+t.result;return this.enableCheckSum&&(r+=this.getCodes((t.checksum+e)%103)),r+=this.getCodes(106)},t.prototype.correctIndex=function(e,t){if("0"===t){var r=e.shift();return r<32?r+64:r-32}return"1"===t?e.shift()-32:10*(e.shift()-48)+e.shift()-48},t.prototype.getCodes=function(e){var t=this.getCodeValue();return t[e]?t[e].toString():""},t}(g),w=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t.prototype.validateInput=function(e){return new RegExp("^[ -È-Ï]+$").test(e)?void 0:"Supports only ASCII characters 32 to 127 (0–9, A–Z, a–z), and special characters."},t.prototype.draw=function(e){this.code128(e)},t}(C),V=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.validateInput=function(e){return new RegExp("^(Ï*[0-9]{2}Ï*)+$").test(e)?void 0:"Supports even number of numeric characters (00-99)."},t.prototype.draw=function(e){this.code128(e)},t}(C),E=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),A=function(e,t,r,i){var a,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(o<3?a(s):o>3?a(t,r,s):a(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},M=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return E(r,e),A([t.Property(10)],r.prototype,"left",void 0),A([t.Property(10)],r.prototype,"right",void 0),A([t.Property(10)],r.prototype,"top",void 0),A([t.Property(10)],r.prototype,"bottom",void 0),r}(t.ChildProperty),D=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),B=function(e,t,r,i){var a,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(o<3?a(s):o>3?a(t,r,s):a(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},O=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return D(r,e),B([t.Property("")],r.prototype,"text",void 0),B([t.Property(!0)],r.prototype,"visibility",void 0),B([t.Property("monospace")],r.prototype,"font",void 0),B([t.Property(20)],r.prototype,"size",void 0),B([t.Complex({left:0,right:0,top:0,bottom:0},M)],r.prototype,"margin",void 0),B([t.Property("Center")],r.prototype,"alignment",void 0),B([t.Property("Bottom")],r.prototype,"position",void 0),r}(t.ChildProperty),P=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return P(t,e),t.prototype.getCodeValue=function(){return["111221211","211211112","112211112","212211111","111221112","211221111","112221111","111211212","211211211","112211211","211112112","112112112","212112111","111122112","211122111","112122111","111112212","211112211","112112211","111122211","211111122","112111122","212111121","111121122","211121121","112121121","111111222","211111221","112111221","111121221","221111112","122111112","222111111","121121112","221121111","122121111","121111212","221111211","122111211","121121211","121212111","121211121","121112121","111212121"]},t.prototype.getCharacter=function(){return"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%"},t.prototype.checkSum=function(e,t){for(var r=0,i=0;i<e.length;i++)r+=t.indexOf(e[i]);return r%=43},t.prototype.validateInput=function(e){return-1===e.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)?"Supports A-Z, 0-9, and symbols ( - . $ / + % SPACE).":void 0},t.prototype.getPatternCollection=function(e,t){for(var r,i=[],a=this.getCodeValue(),o=0;o<e.length;o++)r=t.indexOf(e.charAt(o)),i.push(a[r]);return i},t.prototype.appendStartStopCharacters=function(e){return"*"+e+"*"},t.prototype.drawCode39Extension=function(e,t){this.draw(e,t)},t.prototype.draw=function(e,t){var r=t||this.value,i=this.getCharacter();this.enableCheckSum&&(r+=this.checkSum(r,i)),r=this.appendStartStopCharacters(r);var a=this.getPatternCollection(r,i);this.calculateBarCodeAttributes(a,e)},t}(g),N=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.validateInput=function(e){return-1===e.search(/^[0-9A-D\-\.\$\/\+\%\:]+$/)?"Supports 0-9, A-D and symbols (-,$, /, ., +).":void 0},t.prototype.getCodeValue=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","+":"101100110011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}},t.prototype.appendStartStopCharacters=function(e){return"A"+e+"A"},t.prototype.getPatternCollection=function(e,t){for(var r=[],i=0;i<e.length;i++){var a=e[i];r.push(t[a])}return r},t.prototype.draw=function(e){var t=this.getCodeValue(),r=this.value;r=this.appendStartStopCharacters(r);var i=this.getPatternCollection(r,t);this.calculateBarCodeAttributes(i,e)},t}(g),I=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t.prototype.validateInput=function(e){return new RegExp("^[\0-_È-Ï]+$").test(e)?void 0:"Supports only ASCII characters 00 to 95 (0–9, A–Z and control codes) and special characters."},t.prototype.draw=function(e){this.code128(e)},t}(C),z=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.validateInput=function(e){return-1!==e.search(/^[0-9]{8}$/)&&Number(e[7])===this.checkSumData(e)?void 0:"Accepts 8 numeric characters."},t.prototype.getCodeValueRight=function(e){return e?{0:"0001101",1:"0011001",2:"0010011",3:"0111101",4:"0100011",5:"0110001",6:"0101111",7:"0111011",8:"0110111",9:"0001011"}:{0:"1110010",1:"1100110",2:"1101100",3:"1000010",4:"1011100",5:"1001110",6:"1010000",7:"1000100",8:"1001000",9:"1110100"}},t.prototype.checkSumData=function(e){for(var t=0;t<e.length;t++){var r=10-(Number(e[1])+Number(e[3])+Number(e[5])+3*(Number(e[0])+Number(e[2])+Number(e[4])+Number(e[6])))%10;return 0===r?r=0:r}return 0},t.prototype.draw=function(e){var t=this.getCodeValueRight(!0),r=[];r.push("101"),r.push(this.leftValue(t,!0)),r.push("01010"),t=this.getCodeValueRight(!1),r.push(this.leftValue(t,!1)),r.push("101"),this.calculateBarCodeAttributes(r,e)},t.prototype.leftValue=function(e,t){for(var r,i=t?0:this.value.length-4;i<(t?this.value.length-4:this.value.length);i++)0===i||4===i?r=e[this.value[i]]:r+=e[this.value[i]];return r},t}(g),Q=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Q(t,e),t.prototype.validateInput=function(e){var t=this.checksumValue(e);return-1===e.search(/^[0-9]{13}$/)||Number(e[12])!==this.checkSumData(e)&&Number(e[12])!==t?-1!==e.search(/^[0-9]{12}$/)?(e+=this.checkSumData(e),void(this.value=e)):"Accepts 12 numeric characters.":void 0},t.prototype.checksumValue=function(e){return(10-e.substr(0,12).split("").map(function(e){return+e}).reduce(function(e,t,r){return r%2?e+3*t:e+t},0)%10)%10},t.prototype.checkSumData=function(e){var t=3*(Number(e[11])+Number(e[9])+Number(e[7])+Number(e[5])+Number(e[3])+Number(e[1]))+(Number(e[10])+Number(e[8])+Number(e[6])+Number(e[4])+Number(e[2])+Number(e[0]));return 10*Math.round(t/10)-t},t.prototype.getStructure=function(){return{0:"LLLLLL",1:"LLGLGG",2:"LLGGLG",3:"LLGGGL",4:"LGLLGG",5:"LGGLLG",6:"LGGGLL",7:"LGLGLG",8:"LGLGGL",9:"LGGLGL"}},t.prototype.getBinaries=function(){return{L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]}},t.prototype.draw=function(e){var t=[],r=this.getStructure()[this.value[0]];t.push("101");var i=this.value.substr(1,6);t.push(this.leftValue(!0,r,i)),t.push("01010"),i=this.value.substr(7,6),t.push(this.leftValue(!1,"RRRRRR",i)),t.push("101"),this.calculateBarCodeAttributes(t,e)},t.prototype.leftValue=function(e,t,r){var i,a,o;o=this.getBinaries();for(var s=0;s<r.length;s++)a=o[t[s]],0===s?i=a[r[s]]:i+=a[r[s]];return i},t}(g),F=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return F(t,e),t.prototype.validateInput=function(e){return-1!==e.search(/^[0-9]{6}$/)?void 0:"Accepts 6 numeric characters."},t.prototype.checkSum=function(e){var t,r=0;for(t=1;t<11;t+=2)r+=parseInt(e[t],void 0);for(t=0;t<11;t+=2)r+=3*parseInt(e[t],void 0);return(10-r%10)%10},t.prototype.getStructure=function(){return{0:"EEEOOO",1:"EEOEOO",2:"EEOOEO",3:"EEOOOE",4:"EOEEOO",5:"EOOEEO",6:"EOOOEE",7:"EOEOEO",8:"EOEOOE",9:"EOOEOE"}},t.prototype.getValue=function(){return["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"]},t.prototype.getExpansion=function(e){return this.getValue()[e]},t.prototype.getUpcValue=function(){for(var e=this.value[this.value.length-1],t=this.getExpansion(e),r="",i=0,a=0;a<t.length;a++){var o=t[a];r+="X"===o?this.value[i++]:o}var s=""+(r="0"+r);return this.enableCheckSum&&(s+=this.checkSum(r)),s},t.prototype.getBinaries=function(){return{O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]}},t.prototype.encoding=function(e,t,r){var i,a,o;o=this.getBinaries();for(var s=0;s<t.length;s++)a=o[r[s]],0===s?i=a[t[s]]:i+=a[t[s]];return i},t.prototype.draw=function(e){var t=[],r=this.getUpcValue(),i=this.getStructure()[r[r.length-1]];t.push("00000000"),t.push("101"),t.push(this.encoding(r,this.value,i)),t.push("010101"),t.push("00000000");var a=r[0]+this.value+r[r.length-1];this.calculateBarCodeAttributes(t,e,""===this.displayText.text?a:void 0)},t}(g),G=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.validateInput=function(e){return-1!==e.search(/^[0-9]{11}$/)&&this.enableCheckSum&&(this.value+=this.checkSumData(this.value)),-1!==this.value.search(/^[0-9]{12}$/)&&Number(this.value[11])===this.checkSumData(this.value)?void 0:"Accepts 11 numeric characters."},t.prototype.checkSumData=function(e){return(10-(3*(Number(e[0])+Number(e[2])+Number(e[4])+Number(e[6])+Number(e[8])+Number(e[10]))+(Number(e[9])+Number(e[7])+Number(e[5])+Number(e[3])+Number(e[1])))%10)%10},t.prototype.getBinaries=function(){return{L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"]}},t.prototype.draw=function(e){this.value;var t=[];t.push("00000000"),t.push("101"+this.leftValue(!0,"L",this.value[0])),t.push(this.leftValue(!0,"LLLLL",this.value.substr(1,5))),t.push("01010"),t.push(this.leftValue(!0,"RRRRR",this.value.substr(6,5))),t.push(this.leftValue(!0,"R",this.value[11])+"101"),t.push("00000000"),this.calculateBarCodeAttributes(t,e)},t.prototype.leftValue=function(e,t,r){var i,a,o;o=this.getBinaries();for(var s=0;s<r.length;s++)a=o[t[s]],0===s?i=a[r[s]]:i+=a[r[s]];return i},t}(g),U=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.validateInput=function(e){return-1===e.search(/^[0-9\-\*]+$/)?"This bar code support 0-9 , * , -":void 0},t.prototype.getCodeValue=function(){return{0:"111121",1:"211121",2:"121121",3:"221111",4:"112121",5:"212111",6:"122111",7:"111221",8:"211211",9:"211111","-":"112111","*":"112211"}},t.prototype.getPatternCollection=function(e){for(var t=[],r=this.getCodeValue(),i=0;i<e.length;i++)t.push(r[e[i]]);return t},t.prototype.draw=function(e){var t=[],r="*"+this.value+"*";t=this.getPatternCollection(r),this.calculateBarCodeAttributes(t,e)},t}(g),H=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.validateInput=function(e){return-1===e.search(/^[0-9A-Z\-\.\*\$\/\+\ %\ ]+$/)?"Supports A-Z, 0-9, and symbols ( - . $ / + % SPACE).":void 0},t.prototype.getCharacterWeight=function(){return{0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",A:"10",B:"11",C:"12",D:"13",E:"14",F:"15",G:"16",H:"17",I:"18",J:"19",K:"20",L:"21",M:"22",N:"23",O:"24",P:"25",Q:"26",R:"27",S:"28",T:"29",U:"30",V:"31",W:"32",X:"33",Y:"34",Z:"35","-":"36",".":"37"," ":"38",$:"39","/":"40","+":"41","%":"42","($)":"43","(/)":"44","(+)":"45","(%)":"46"}},t.prototype.getCodeValue=function(){return{0:"100010100",1:"101001000",2:"101000100",3:"101000010",4:"100101000",5:"100100100",6:"100100010",7:"101010000",8:"100010010",9:"100001010",A:"110101000",B:"110100100",C:"110100010",D:"110010100",E:"110010010",F:"110001010",G:"101101000",H:"101100100",I:"101100010",J:"100110100",K:"100011010",L:"101011000",M:"101001100",N:"101000110",O:"100101100",P:"100010110",Q:"110110100",R:"110110010",S:"110101100",T:"110100110",U:"110010110",V:"110011010",W:"101101100",X:"101100110",Y:"100110110",Z:"100111010","-":"100101110",".":"111010100"," ":"111010010",$:"111001010","/":"101101110","+":"101110110","%":"110101110","($)":"100100110","(/)":"111010110","(+)":"100110010","(%)":"111011010"}},t.prototype.getPatternCollection=function(e,t,r){for(var i=r,a=0;a<e.length;a++){var o=e[a];i.push(t[o])}},t.prototype.calculateCheckSum=function(e){for(var t,r=e,i=0,a=0,o=this.getCharacterWeight(),s=r.length;s>0;s--)i+=o[r[a]]*s,a++;return t=i%47,Object.keys(o)[t]},t.prototype.draw=function(e){var t=this.getCodeValue(),r=[],i=this.value;this.enableCheckSum&&(i+=this.calculateCheckSum(i),i+=this.calculateCheckSum(i)),r.push("101011110"),this.getPatternCollection(i,t,r),r.push("101011110"),r.push("1"),this.calculateBarCodeAttributes(r,e)},t}(g),J=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),K=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.barcodeSymbols=[],t}return J(t,e),t.prototype.validateInput=function(e){return this.getValue(e)?void 0:"Supports 128 characters of ASCII."},t.prototype.getValue=function(e){for(var t=0;t<e.length;t++)if(e.charCodeAt(t)>127)return!1;return!0},t.prototype.getBars=function(){this.barcodeSymbols[0]={value:"",checkDigit:0,bars:"111213"},this.barcodeSymbols[1]={value:"1",checkDigit:1,bars:"111213"},this.barcodeSymbols[2]={value:"2",checkDigit:2,bars:"111312 "},this.barcodeSymbols[3]={value:"3",checkDigit:3,bars:"111411 "},this.barcodeSymbols[4]={value:"4",checkDigit:4,bars:"121113"},this.barcodeSymbols[5]={value:"5",checkDigit:5,bars:"121212"},this.barcodeSymbols[6]={value:"6",checkDigit:6,bars:"121311"},this.barcodeSymbols[7]={value:"7",checkDigit:7,bars:"111114"},this.barcodeSymbols[8]={value:"8",checkDigit:8,bars:"131211"},this.barcodeSymbols[9]={value:"9",checkDigit:9,bars:"141111"},this.barcodeSymbols[10]={value:"A",checkDigit:10,bars:"211113"},this.barcodeSymbols[11]={value:"B",checkDigit:11,bars:"211212"},this.barcodeSymbols[12]={value:"C",checkDigit:12,bars:"211311"},this.barcodeSymbols[13]={value:"D",checkDigit:13,bars:"221112"},this.barcodeSymbols[14]={value:"E",checkDigit:14,bars:"221211 "},this.barcodeSymbols[15]={value:"F",checkDigit:15,bars:"231111"},this.barcodeSymbols[16]={value:"G",checkDigit:16,bars:"112113"},this.barcodeSymbols[17]={value:"H",checkDigit:17,bars:"112212"},this.barcodeSymbols[18]={value:"I",checkDigit:18,bars:"112311"},this.barcodeSymbols[19]={value:"J",checkDigit:19,bars:"122112"},this.barcodeSymbols[20]={value:"K",checkDigit:20,bars:"132111 "},this.barcodeSymbols[21]={value:"L",checkDigit:21,bars:"111123"},this.barcodeSymbols[22]={value:"M",checkDigit:22,bars:"111222"},this.barcodeSymbols[23]={value:"N",checkDigit:23,bars:"111321"},this.barcodeSymbols[24]={value:"O",checkDigit:24,bars:"121122 "},this.barcodeSymbols[25]={value:"P",checkDigit:25,bars:"131121 "},this.barcodeSymbols[26]={value:"Q",checkDigit:26,bars:"212112 "},this.barcodeSymbols[27]={value:"R",checkDigit:27,bars:" 212211 "},this.barcodeSymbols[28]={value:"S",checkDigit:28,bars:"211122"},this.barcodeSymbols[29]={value:"T",checkDigit:29,bars:"211221"},this.barcodeSymbols[30]={value:"U",checkDigit:30,bars:"221121"},this.barcodeSymbols[31]={value:"V",checkDigit:31,bars:"222111"},this.barcodeSymbols[32]={value:"W",checkDigit:32,bars:"112122"},this.barcodeSymbols[33]={value:"X",checkDigit:33,bars:"112221"},this.barcodeSymbols[34]={value:"Y",checkDigit:34,bars:"122121"},this.barcodeSymbols[35]={value:"Z",checkDigit:35,bars:" 123111"},this.barcodeSymbols[36]={value:"-",checkDigit:36,bars:"121131"},this.barcodeSymbols[37]={value:".",checkDigit:37,bars:"311112"},this.barcodeSymbols[38]={value:" ",checkDigit:38,bars:"311211"},this.barcodeSymbols[39]={value:"$",checkDigit:39,bars:"321111"},this.barcodeSymbols[40]={value:"/",checkDigit:40,bars:"112131"},this.barcodeSymbols[41]={value:"+",checkDigit:41,bars:"113121"},this.barcodeSymbols[42]={value:"%",checkDigit:42,bars:"211131"},this.barcodeSymbols[43]={value:"*",checkDigit:42,bars:"111141"},this.barcodeSymbols[44]={value:"ÿ",checkDigit:47,bars:"1111411"},this.barcodeSymbols[45]={value:"û",checkDigit:43,bars:"121220"},this.barcodeSymbols[46]={value:"ü",checkDigit:44,bars:"312111 "},this.barcodeSymbols[47]={value:"ý",checkDigit:45,bars:"311121"},this.barcodeSymbols[48]={value:"þ",checkDigit:46,bars:"122211"}},t.prototype.GetExtendedText=function(e){var t,r=this.value;this.extendedText="";for(var i=0;i<r.length;i++){for(var a=e.length-1;a>0;a--)if(e[a]&&e[a].value&&e[a].character===r[i]){t=e[a];break}t.keyword&&t.value?this.extendedText+=t.keyword+t.value:t.value&&t.value&&(this.extendedText+=t.value)}},t.prototype.drawCode93=function(e){this.getBars();var t=[],r=this.getArrayValue();this.GetExtendedText(r);for(var i=this.CalculateCheckDigit(),a=0;a<i.length;a++)this.extendedText+=i[a];t[0]="*"+this.extendedText+"ÿ";var o=[];o=this.encoding(t),this.calculateBarCodeAttributes(o,e)},t.prototype.GetCheckSumSymbols=function(){for(var e,t=this.extendedText,r=t,i=[],a=0,o=r.length,s=0;s<o;s++){0===(u=(o-s)%20)&&(u=20);for(var n=0;n<this.barcodeSymbols.length;n++)r[s]===this.barcodeSymbols[n].value&&(e=this.barcodeSymbols[n].checkDigit);a+=e*u}a%=47;for(var c="",h=0;h<this.barcodeSymbols.length;h++)if(a===this.barcodeSymbols[h].checkDigit){c=this.barcodeSymbols[h].value;break}var l=this.extendedText;l+=c,i[0]=c,a=0,o=(r=t=l).length;for(s=0;s<o;s++){var u=(o-s)%15;0===u&&(u=15);for(var d=0;d<this.barcodeSymbols.length;d++)r[s]===this.barcodeSymbols[d].value&&(a+=this.barcodeSymbols[d].checkDigit*u)}t+=a%=47;for(var p=" ",s=0;s<this.barcodeSymbols.length;s++)if(a===this.barcodeSymbols[s].checkDigit){p=this.barcodeSymbols[s].value;break}return l+=p,i[1]=p,i},t.prototype.CalculateCheckDigit=function(){for(var e=this.extendedText,t=0,r=0;r<e.length;r++)for(var i=0;i<this.barcodeSymbols.length;i++)e[r]===this.barcodeSymbols[i].value&&(t+=this.barcodeSymbols[i].checkDigit);return this.GetCheckSumSymbols()},t.prototype.getArrayValue=function(){var e=[];return e[0]={character:"\0",keyword:"ü",value:"U"},e[1]={character:"\x0001",keyword:"û",value:"A"},e[2]={character:"\x0002",keyword:"x00fb",value:"B"},e[3]={character:"\x0003",keyword:"û",value:"C"},e[4]={character:"\x0004",keyword:"û",value:"D"},e[5]={character:"\x0005",keyword:"û",value:"E"},e[6]={character:"\x0006",keyword:"û",value:"F"},e[7]={character:"a",keyword:"û",value:"G"},e[8]={character:"\b",keyword:"û",value:"H"},e[9]={character:"\t",keyword:"û",value:"I"},e[10]={character:"\n",keyword:"û",value:"J"},e[12]={character:"\v",keyword:"û",value:"K"},e[13]={character:"\f",keyword:"û",value:"L"},e[14]={character:"\r",keyword:"û",value:"M"},e[15]={character:"\x000e",keyword:"û",value:"N"},e[16]={character:"\x000f",keyword:"û",value:"O"},e[17]={character:"\x0010",keyword:"û",value:"P"},e[18]={character:"\x0011",keyword:"û",value:"Q"},e[19]={character:"\x0012",keyword:"û",value:"R"},e[20]={character:"\x0013",keyword:"û",value:"S"},e[21]={character:"\x0014",keyword:"û",value:"T"},e[22]={character:"\x0015",keyword:"û",value:"U"},e[23]={character:"\x0016",keyword:"û",value:"V"},e[24]={character:"\x0017",keyword:"û",value:"W"},e[25]={character:"\x0018",keyword:"û",value:"X"},e[26]={character:"\x0019",keyword:"û",value:"Y"},e[27]={character:"\x001a",keyword:"û",value:"Z"},e[28]={character:"\x001b",keyword:"ü",value:"A"},e[29]={character:"\x001c",keyword:"ü",value:"B"},e[30]={character:"\x001d",keyword:"ü",value:"C"},e[31]={character:"\x001e",keyword:"ü",value:"D"},e[32]={character:"\x001f",keyword:"ü",value:"E"},e[33]={character:" ",keyword:" "},e[34]={character:"!",keyword:"ý",value:"A"},e[35]={character:'"',keyword:"ý",value:"B"},e[36]={character:"#",keyword:"ý",value:"C"},e[37]={character:"$",keyword:"ý",value:"D"},e[38]={character:"%",keyword:"ý",value:"E"},e[39]={character:"&",keyword:"ý",value:"F"},e[40]={character:"'",keyword:"ý",value:"G"},e[41]={character:"(",keyword:"ý",value:"H"},e[42]={character:")",keyword:"ý",value:"I"},e[43]={character:"*",keyword:"ý",value:"J"},e[44]={character:"+",keyword:"ý",value:"K"},e[45]={character:",",keyword:"ý",value:"L"},e[46]={character:"-",keyword:"ý",value:"M"},e[47]={character:".",keyword:"ý",value:"N"},e[48]={character:"/",keyword:"ý",value:"O"},e[49]={character:"0",value:"0"},e[50]={character:"1",value:"1"},e[51]={character:"2",value:"2"},e[52]={character:"3",value:"3"},e[53]={character:"4",value:"4"},e[54]={character:"5",value:"5"},e[55]={character:"6",value:"6"},e[56]={character:"7",value:"7"},e[57]={character:"8",value:"8"},e[58]={character:"9",value:"9"},e[59]={character:":",keyword:"ý",value:"Z"},e[60]={character:";",keyword:"ü",value:"F"},e[61]={character:"<",keyword:"ü",value:"G"},e[62]={character:"=",keyword:"ü",value:"H"},e[63]={character:">",keyword:"ü",value:"I"},e[64]={character:"?",keyword:"ü",value:"J"},e[65]={character:"@",keyword:"ü",value:"V"},e[66]={character:"A",value:"A"},e[67]={character:"B",value:"B"},e[68]={character:"C",value:"C"},e[69]={character:"D",value:"D"},e[70]={character:"E",value:"E"},e[71]={character:"F",value:"F"},e[72]={character:"G",value:"G"},e[73]={character:"H",value:"H"},e[74]={character:"I",value:"I"},e[75]={character:"J",value:"J"},e[76]={character:"K",value:"K"},e[77]={character:"L",value:"L"},e[78]={character:"M",value:"M"},e[79]={character:"N",value:"N"},e[80]={character:"O",value:"O"},e[81]={character:"P",value:"P"},e[82]={character:"Q",value:"Q"},e[83]={character:"R",value:"R"},e[84]={character:"S",value:"S"},e[85]={character:"T",value:"T"},e[86]={character:"U",value:"U"},e[87]={character:"V",value:"V"},e[88]={character:"W",value:"W"},e[88]={character:"X",value:"X"},e[89]={character:"Y",value:"Y"},e[90]={character:"Z",value:"Z"},e[91]={character:"[",keyword:"ü",value:"K"},e[92]={character:"\\",keyword:"ü",value:"L"},e[93]={character:"]",keyword:"ü",value:"M"},e[94]={character:"^",keyword:"ü",value:"N"},e[95]={character:"_",keyword:"ü",value:"O"},e[96]={character:"`",keyword:"ü",value:"W"},e[97]={character:"a",keyword:"þ",value:"A"},e[98]={character:"b",keyword:"þ",value:"B"},e[99]={character:"c",keyword:"þ",value:"C"},e[100]={character:"d",keyword:"þ",value:"D"},e[101]={character:"e",keyword:"þ",value:"E"},e[102]={character:"f",keyword:"þ",value:"F"},e[103]={character:"g",keyword:"þ",value:"G"},e[104]={character:"h",keyword:"þ",value:"H"},e[105]={character:"i",keyword:"þ",value:"I"},e[106]={character:"j",keyword:"þ",value:"J"},e[107]={character:"k",keyword:"þ",value:"K"},e[108]={character:"l",keyword:"þ",value:"L"},e[109]={character:"m",keyword:"þ",value:"M"},e[110]={character:"n",keyword:"þ",value:"N"},e[111]={character:"o",keyword:"þ",value:"O"},e[112]={character:"p",keyword:"þ",value:"P"},e[113]={character:"q",keyword:"þ",value:"Q"},e[114]={character:"r",keyword:"þ",value:"R"},e[115]={character:"s",keyword:"þ",value:"S"},e[116]={character:"t",keyword:"þ",value:"T"},e[117]={character:"u",keyword:"þ",value:"U"},e[118]={character:"v",keyword:"þ",value:"V"},e[119]={character:"w",keyword:"þ",value:"W"},e[120]={character:"x",keyword:"þ",value:"X"},e[121]={character:"y",keyword:"þ",value:"Y"},e[122]={character:"z",keyword:"þ",value:"Z"},e[123]={character:"{",keyword:"ü",value:"P"},e[124]={character:"|",keyword:"ü",value:"Q"},e[125]={character:"}",keyword:"ü",value:"R"},e[126]={character:"~",keyword:"ü",value:"S"},e},t.prototype.encoding=function(e){for(var t=[],r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++)for(var a=0;a<this.barcodeSymbols.length;a++)e[r][i]===this.barcodeSymbols[a].value&&(t[i]=this.barcodeSymbols[a].bars);return t},t}(Z),Y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.validateInput=function(e){return 8===e.length&&e.match(/^[0-9]+$/)?void 0:"Accepts 9 numeric characters."},t.prototype.getCodeValue=function(){return[["0",0,["111331311"]],["1",1,["311311113"]],["2",2,["113311113"]],["3",3,["313311111"]],["4",4,["111331113"]],["5",5,["311331111"]],["6",6,["113331111"]],["7",7,["111311313"]],["8",8,["311311311"]],["9",9,["113311311"]],["A",10,["113113113"]],["B",11,["113113113"]],["C",12,["313113111"]],["D",13,["111133113"]],["E",14,["221211"]],["F",15,["113133111"]],["G",16,["111113313"]],["H",17,["311113311"]],["I",18,["112311"]],["J",19,["111133311"]],["K",20,["311111133"]],["L",21,["113111133"]],["M",22,["313111131"]],["N",23,["111131133"]],["O",24,["121122"]],["P",25,["113131131"]],["Q",26,["111111333"]],["R",27,["311111331"]],["S",28,["113111331"]],["T",29,["111131331"]],["U",30,["331111113"]],["V",31,["133111113"]],["W",32,["333111111"]],["X",33,["131131113"]],["Y",34,["331131111"]],["Z",35,["133131111"]],["*",0,["131131311"]]]},t.prototype.getPatternCollection=function(e){for(var t=[],r=this.getCodeValue(),i=0;i<=e.length;i++)for(var a=0;a<r.length;a++)e[i]===r[a][0]&&t.push(r[a][2][0]);return t},t.prototype.draw=function(e){var t,r="*"+this.value+"*";t=this.getPatternCollection(r),this.calculateBarCodeAttributes(t,e)},t}(g),ee=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ee(t,e),t.prototype.code39ExtensionValues=function(){return{0:"%U",1:"$A",2:"$B",3:"$C",4:"$D",5:"$E",6:"$F",7:"$G",8:"$H",9:"$I",10:"$J",11:"$K",12:"$L",13:"$M",14:"$N",15:"$O",16:"$P",17:"$Q",18:"$R",19:"$S",20:"$T",21:"$U",22:"$V",23:"$W",24:"$X",25:"$Y",26:"$Z",27:"%A",28:"%B",29:"%C",30:"%D",31:"%E",32:" ",33:"/A",34:"/B",35:"/C",36:"/D",37:"/E",38:"/F",39:"/G",40:"/H",41:"/I",42:"/J",43:"/K",44:"/L",45:"-",46:".",47:"/O",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",58:"/Z",59:"%F",60:"%G",61:"%H",62:"%I",63:"%J",64:"%V",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"%K",92:"%L",93:"%M",94:"%N",95:"%O",96:"%W",97:"+A",98:"+B",99:"+C",100:"+D",101:"+E",102:"+F",103:"+G",104:"+H",105:"+I",106:"+J",107:"+K",108:"+L",109:"+M",110:"+N",111:"+O",112:"+P",113:"+Q",114:"+R",115:"+S",116:"+T",117:"+U",118:"+V",119:"+W",120:"+X",121:"+Y",122:"+Z",123:"%P",124:"%Q",125:"\t%R",126:"%S",127:"%T"}},t.prototype.validateInput=function(e){return this.checkText(e)?void 0:"Supports 128 characters of ASCII."},t.prototype.checkText=function(e){for(var t=0;t<e.length;t++)if(e.charCodeAt(t)>127)return!1;return!0},t.prototype.code39Extension=function(e){for(var t="",r=this.code39ExtensionValues(),i=0;i<e.length;i++)t+=r[e[i].charCodeAt(0)];return t},t.prototype.drawCode39=function(e){var t=this.value,r=this.code39Extension(t);this.drawCode39Extension(e,r)},t}(L),re=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ie=function(e,t,r,i){var a,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(o<3?a(s):o>3?a(t,r,s):a(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},ae=function(r){function i(e,t){return r.call(this,e,t)||this}return re(i,r),i.prototype.triggerEvent=function(t,r){var i={message:r};this.trigger(e.BarcodeEvent[t],i)},i.prototype.onPropertyChanged=function(e,t){"Canvas"===this.mode&&"Canvas"!==e.mode?this.refreshCanvasBarcode():this.barcodeRenderer=c(e,this.barcodeCanvas,this.mode,this.element.id),e.width&&this.barcodeCanvas.setAttribute("width",String(e.width));for(var r=0,i=Object.keys(e);r<i.length;r++)switch(i[r]){case"width":this.element.style.width=this.getElementSize(this.width),this.barcodeCanvas.setAttribute("width",String(this.element.offsetWidth));break;case"height":this.element.style.height=this.getElementSize(this.height),this.barcodeCanvas.setAttribute("height",String(this.element.offsetHeight));break;case"backgroundColor":this.barcodeCanvas.setAttribute("style","background:"+e.backgroundColor);break;case"mode":this.initialize()}this.renderElements()},i.prototype.initialize=function(){this.element.style.height=this.getElementSize(this.height),this.element.style.width=this.getElementSize(this.width);var e=this.mode;this.barcodeCanvas=this.barcodeRenderer.renderRootElement({id:this.element.id+"content",height:"SVG"===e?this.element.offsetHeight:1.5*this.element.offsetHeight,width:"SVG"===e?this.element.offsetWidth:1.5*this.element.offsetWidth},this.backgroundColor,this.element.offsetWidth,this.element.offsetHeight),this.element.appendChild(this.barcodeCanvas)},i.prototype.renderElements=function(){var t;switch(this.type){case"Code39Extension":t=new te;break;case"Code39":t=new L;break;case"Codabar":t=new _;break;case"Code128A":t=new T;break;case"Code128B":t=new x;break;case"Code128C":t=new S;break;case"Code128":t=new C;break;case"Ean8":t=new R;break;case"Ean13":t=new j;break;case"UpcA":t=new W;break;case"UpcE":t=new X;break;case"Code11":t=new $;break;case"Code93":t=new Z;break;case"Code93Extension":t=new K;break;case"Code32":t=new q}"Canvas"===this.mode&&(this.barcodeCanvas.getContext("2d").setTransform(1,0,0,1,0,0),this.barcodeCanvas.getContext("2d").scale(1.5,1.5)),t.width=this.barcodeCanvas.getAttribute("width"),("Ean8"===this.type||"Ean13"===this.type||"UpcA"===this.type)&&this.displayText.text.length>0&&this.triggerEvent(e.BarcodeEvent.invalid,"Invalid Display Text"),t.value=this.value,t.margin=this.margin,t.type=this.type,t.height=this.barcodeCanvas.getAttribute("height"),t.foreColor=this.foreColor,t.isSvgMode="SVG"===this.mode,t.displayText=this.displayText,t.enableCheckSum=this.enableCheckSum;var r=t.validateInput(this.value);void 0===r?"Code39Extension"===this.type?t.drawCode39(this.barcodeCanvas):"Code93Extension"===this.type?t.drawCode93(this.barcodeCanvas):t.draw(this.barcodeCanvas):this.triggerEvent(e.BarcodeEvent.invalid,r),"Canvas"===this.mode&&(this.barcodeCanvas.style.transform="scale("+2/3+")",this.barcodeCanvas.style.transformOrigin="0 0")},i.prototype.refreshCanvasBarcode=function(){this.clearCanvas(this)},i.prototype.clearCanvas=function(e){var t,r;t=e.element.offsetWidth,r=e.element.offsetHeight,"SVG"!==e.mode&&p.getContext(this.barcodeCanvas).clearRect(0,0,t,r)},i.prototype.getPersistData=function(){var e=["loaded"];return this.addOnPersist(e)},i.prototype.getElementSize=function(e,t){return e.toString().indexOf("px")>0||e.toString().indexOf("%")>0?e.toString():e.toString()+"px"},i.prototype.preRender=function(){this.element.classList.add("e-barcode"),this.barcodeRenderer=new b(this.element.id,"SVG"===this.mode),this.initialize(),this.initializePrivateVariables(),this.setCulture();var e=document.getElementsByClassName("barcodeMeasureElement");if(e.length>0){for(var t=e.length-1;t>=0;t--)e[t].parentNode.removeChild(e[t]);window.barcodeMeasureElement=null}},i.prototype.initializePrivateVariables=function(){this.defaultLocale={}},i.prototype.setCulture=function(){this.localeObj=new t.L10n(this.getModuleName(),this.defaultLocale,this.locale)},i.prototype.render=function(){this.notify("initial-load",{}),this.trigger("load"),this.notify("initial-end",{}),this.renderElements(),this.renderComplete()},i.prototype.getModuleName=function(){return"barcode"},i.prototype.requiredModules=function(){return[]},i.prototype.destroy=function(){this.notify("destroy",{}),r.prototype.destroy.call(this)},ie([t.Property("100%")],i.prototype,"width",void 0),ie([t.Property("100px")],i.prototype,"height",void 0),ie([t.Property("SVG")],i.prototype,"mode",void 0),ie([t.Property("Code128")],i.prototype,"type",void 0),ie([t.Property(void 0)],i.prototype,"value",void 0),ie([t.Property(!0)],i.prototype,"enableCheckSum",void 0),ie([t.Complex({},O)],i.prototype,"displayText",void 0),ie([t.Complex({},M)],i.prototype,"margin",void 0),ie([t.Property("white")],i.prototype,"backgroundColor",void 0),ie([t.Property("black")],i.prototype,"foreColor",void 0),ie([t.Event()],i.prototype,"invalid",void 0),i}(t.Component),oe=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),se=function(e,t,r,i){var a,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(o<3?a(s):o>3?a(t,r,s):a(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},ne=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return oe(r,e),se([t.Property(0)],r.prototype,"x",void 0),se([t.Property(0)],r.prototype,"y",void 0),r}(t.ChildProperty),ce=function(){function e(){}return e.prototype.renderRootElement=function(e){return r("canvase",e)},e.prototype.renderRect=function(e,t){return r("canvase",t)},e.prototype.renderLine=function(e,t){return r("canvase",t)},e.prototype.renderText=function(e,t){return r("canvase",t)},e}(),he=function(){function e(e,t){this.numberOfErrorCorrectingCodeWords=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430],this.cp437CharSet=["2591","2592","2593","2502","2524","2561","2562","2556","2555","2563","2551","2557","255D","255C","255B","2510","2514","2534","252C","251C","2500","253C","255E","255F","255A","2554","2569","2566","2560","2550","256C","2567","2568","2564","2565","2559","2558","2552","2553","256B","256A","2518","250C","2588","2584","258C","2590","2580","25A0"],this.iso88592CharSet=["104","2D8","141","13D","15A","160","15E","164","179","17D","17B","105","2DB","142","13E","15B","2C7","161","15F","165","17A","2DD","17E","17C","154","102","139","106","10C","118","11A","10E","110","143","147","150","158","16E","170","162","155","103","13A","107","10D","119","11B","10F","111","144","148","151","159","16F","171","163","2D9"],this.iso88593CharSet=["126","124","130","15E","11E","134","17B","127","125","131","15F","11F","135","17C","10A","108","120","11C","16C","15C","10B","109","121","11D","16D","15D"],this.iso88594CharSet=["104","138","156","128","13B","160","112","122","166","17D","105","2DB","157","129","13C","2C7","161","113","123","167","14A","17E","14B","100","12E","10C","118","116","12A","110","145","14C","136","172","168","16A","101","12F","10D","119","117","12B","111","146","14D","137","173","169","16B"],this.windows1250CharSet=["141","104","15E","17B","142","105","15F","13D","13E","17C"],this.windows1251CharSet=["402","403","453","409","40A","40C","40B","40F","452","459","45A","45C","45B","45F","40E","45E","408","490","401","404","407","406","456","491","451","454","458","405","455","457"],this.windows1252CharSet=["20AC","201A","192","201E","2026","2020","2021","2C6","2030","160","2039","152","17D","2018","2019","201C","201D","2022","2013","2014","2DC","2122","161","203A","153","17E","178"],this.windows1256CharSet=["67E","679","152","686","698","688","6AF","6A9","691","153","6BA","6BE","6C1","644","645","646","647","648","649","64A","6D2"],this.cp437ReplaceNumber=[176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,254],this.iso88592ReplaceNumber=[161,162,163,165,166,169,170,171,172,174,175,177,178,179,181,182,183,185,186,187,188,189,190,191,192,195,197,198,200,202,204,207,208,209,210,213,216,217,219,222,224,227,229,230,232,234,236,239,240,241,242,245,248,249,251,254,255],this.iso88593ReplaceNumber=[161,166,169,170,171,172,175,177,182,185,186,187,188,191,197,198,213,216,221,222,229,230,245,248,253,254],this.iso88594ReplaceNumber=[161,162,163,165,166,169,170,171,172,174,177,178,179,181,182,183,185,186,187,188,189,190,191,192,199,200,202,204,207,208,209,210,211,217,221,222,224,231,232,234,236,239,240,241,242,243,249,253,254],this.windows1250ReplaceNumber=[163,165,170,175,179,185,186,188,190,191],this.windows1251ReplaceNumber=[128,129,131,138,140,141,142,143,144,154,156,157,158,159,161,162,163,165,168,170,175,178,179,180,184,186,188,189,190,191],this.windows1252ReplaceNumber=[128,130,131,132,133,134,135,136,137,138,139,140,142,145,146,147,148,149,150,151,152,153,154,155,156,158,159],this.windows1256ReplaceNumber=[129,138,140,141,142,143,144,152,154,156,159,170,192,225,227,228,229,230,236,237,255],this.endValues=[208,359,567,807,1079,1383,1568,1936,2336,2768,3232,3728,4256,4651,5243,5867,6523,7211,7931,8683,9252,10068,10916,11796,12708,13652,14628,15371,16411,17483,18587,19723,20891,22091,23008,24272,25568,26896,28256,29648],this.dataCapacityValues=[26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],this.numericDataCapacityLow=[41,77,127,187,255,322,370,461,552,652,772,883,1022,1101,1250,1408,1548,1725,1903,2061,2232,2409,2620,2812,3057,3283,3517,3669,3909,4158,4417,4686,4965,5253,5529,5836,6153,6479,6743,7089],this.numericDataCapacityMedium=[34,63,101,149,202,255,293,365,432,513,604,691,796,871,991,1082,1212,1346,1500,1600,1708,1872,2059,2188,2395,2544,2701,2857,3035,3289,3486,3693,3909,4134,4343,4588,4775,5039,5313,5596],this.numericDataCapacityQuartile=[27,48,77,111,144,178,207,259,312,364,427,489,580,621,703,775,876,948,1063,1159,1224,1358,1468,1588,1718,1804,1933,2085,2181,2358,2473,2670,2805,2949,3081,3244,3417,3599,3791,3993],this.numericDataCapacityHigh=[17,34,58,82,106,139,154,202,235,288,331,374,427,468,530,602,674,746,813,919,969,1056,1108,1228,1286,1425,1501,1581,1677,1782,1897,2022,2157,2301,2361,2524,2625,2735,2927,3057],this.alphanumericDataCapacityLow=[25,47,77,114,154,195,224,279,335,395,468,535,619,667,758,854,938,1046,1153,1249,1352,1460,1588,1704,1853,1990,2132,2223,2369,2520,2677,2840,3009,3183,3351,3537,3729,3927,4087,4296],this.alphanumericDataCapacityMedium=[20,38,61,90,122,154,178,221,262,311,366,419,483,528,600,656,734,816,909,970,1035,1134,1248,1326,1451,1542,1637,1732,1839,1994,2113,2238,2369,2506,2632,2780,2894,3054,3220,3391],this.alphanumericDataCapacityQuartile=[16,29,47,67,87,108,125,157,189,221,259,296,352,376,426,470,531,574,644,702,742,823,890,963,1041,1094,1172,1263,1322,1429,1499,1618,1700,1787,1867,1966,2071,2181,2298,2420],this.alphanumericDataCapacityHigh=[10,20,35,50,64,84,93,122,143,174,200,227,259,283,321,365,408,452,493,557,587,640,672,744,779,864,910,958,1016,1080,1150,1226,1307,1394,1431,1530,1591,1658,1774,1852],this.binaryDataCapacityLow=[17,32,53,78,106,134,154,192,230,271,321,367,425,458,520,586,644,718,792,858,929,1003,1091,1171,1273,1367,1465,1528,1628,1732,1840,1952,2068,2188,2303,2431,2563,2699,2809,2953],this.binaryDataCapacityMedium=[14,26,42,62,84,106,122,152,180,213,251,287,331,362,412,450,504,560,624,666,711,779,857,911,997,1059,1125,1190,1264,1370,1452,1538,1628,1722,1809,1911,1989,2099,2213,2331],this.binaryDataCapacityQuartile=[11,20,32,46,60,74,86,108,130,151,177,203,241,258,292,322,364,394,442,482,509,565,611,661,715,751,805,868,908,982,1030,1112,1168,1228,1283,1351,1423,1499,1579,1663],this.binaryDataCapacityHigh=[7,14,24,34,44,58,64,84,98,119,137,155,177,194,220,250,280,310,338,382,403,439,461,511,535,593,625,658,698,742,790,842,898,958,983,1051,1093,1139,1219,1273],this.mixedDataCapacityLow=[152,272,440,640,864,1088,1248,1552,1856,2192,2592,2960,3424,3688,4184,4712,5176,5768,6360,6888,7456,8048,8752,9392,10208,10960,11744,12248,13048,13880,4744,15640,16568,17528,18448,19472,20528,21616,22496,23648],this.mixedDataCapacityMedium=[128,244,352,512,688,864,992,1232,1456,1728,2032,2320,2672,2920,3320,3624,4056,4504,5016,5352,5712,6256,6880,7312,8e3,8496,9024,9544,10136,10984,1640,12328,13048,13800,14496,15312,15936,16816,17728,18672],this.mixedDataCapacityQuartile=[104,176,272,384,496,608,704,880,1056,1232,1440,1648,1952,2088,2360,2600,2936,3176,3560,3880,4096,4544,4912,5312,5744,6032,6464,6968,7288,7880,8264,8920,9368,9848,10288,10832,11408,12016,12656,13328],this.mixedDataCapacityHigh=[72,128,208,288,368,480,528,688,800,976,1120,1264,1440,1576,1784,2024,2264,2504,2728,3080,3248,3536,3712,4112,4304,4768,5024,5288,5608,5960,6344,6760,7208,7688,7888,8432,8768,9136,9776,10208],this.mVersion=e,this.mErrorCorrectionLevel=t,this.NumberOfDataCodeWord=this.obtainNumberOfDataCodeWord(),this.NumberOfErrorCorrectingCodeWords=this.obtainNumberOfErrorCorrectingCodeWords(),this.NumberOfErrorCorrectionBlocks=this.obtainNumberOfErrorCorrectionBlocks(),this.End=this.obtainEnd(),this.DataCapacity=this.obtainDataCapacity(),this.FormatInformation=this.obtainFormatInformation(),this.VersionInformation=this.obtainVersionInformation()}return Object.defineProperty(e.prototype,"NumberOfDataCodeWord",{get:function(){return this.mNumberOfDataCodeWord},set:function(e){this.mNumberOfDataCodeWord=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"NumberOfErrorCorrectingCodeWords",{get:function(){return this.mNumberOfErrorCorrectingCodeWords},set:function(e){this.mNumberOfErrorCorrectingCodeWords=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"NumberOfErrorCorrectionBlocks",{get:function(){return this.mNumberOfErrorCorrectionBlocks},set:function(e){this.mNumberOfErrorCorrectionBlocks=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"End",{set:function(e){this.mEnd=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"DataCapacity",{get:function(){return this.mDataCapacity},set:function(e){this.mDataCapacity=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"FormatInformation",{get:function(){return this.mFormatInformation},set:function(e){this.mFormatInformation=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"VersionInformation",{get:function(){return this.mVersionInformation},set:function(e){this.mVersionInformation=e},enumerable:!0,configurable:!0}),e.prototype.getAlphaNumericValues=function(e){var t=0;switch(e){case"0":t=0;break;case"1":t=1;break;case"2":t=2;break;case"3":t=3;break;case"4":t=4;break;case"5":t=5;break;case"6":t=6;break;case"7":t=7;break;case"8":t=8;break;case"9":t=9;break;case"A":t=10;break;case"B":t=11;break;case"C":t=12;break;case"D":t=13;break;case"E":t=14;break;case"F":t=15;break;case"G":t=16;break;case"H":t=17;break;case"I":t=18;break;case"J":t=19;break;case"K":t=20;break;case"L":t=21;break;case"M":t=22;break;case"N":t=23;break;case"O":t=24;break;case"P":t=25;break;case"Q":t=26;break;case"R":t=27;break;case"S":t=28;break;case"T":t=29;break;case"U":t=30;break;case"V":t=31;break;case"W":t=32;break;case"X":t=33;break;case"Y":t=34;break;case"Z":t=35;break;case" ":t=36;break;case"$":t=37;break;case"%":t=38;break;case"*":t=39;break;case"+":t=40;break;case"-":t=41;break;case".":t=42;break;case"/":t=43;break;case":":t=44}return t},e.prototype.obtainNumberOfDataCodeWord=function(){var e=0;switch(this.mVersion){case 1:switch(this.mErrorCorrectionLevel){case 7:e=19;break;case 15:e=16;break;case 25:e=13;break;case 30:e=9}break;case 2:switch(this.mErrorCorrectionLevel){case 7:e=34;break;case 15:e=28;break;case 25:e=22;break;case 30:e=16}break;case 3:switch(this.mErrorCorrectionLevel){case 7:e=55;break;case 15:e=44;break;case 25:e=34;break;case 30:e=26}break;case 4:switch(this.mErrorCorrectionLevel){case 7:e=80;break;case 15:e=64;break;case 25:e=48;break;case 30:e=36}break;case 5:switch(this.mErrorCorrectionLevel){case 7:e=108;break;case 15:e=86;break;case 25:e=62;break;case 30:e=46}break;case 6:switch(this.mErrorCorrectionLevel){case 7:e=136;break;case 15:e=108;break;case 25:e=76;break;case 30:e=60}break;case 7:switch(this.mErrorCorrectionLevel){case 7:e=156;break;case 15:e=124;break;case 25:e=88;break;case 30:e=66}break;case 8:switch(this.mErrorCorrectionLevel){case 7:e=194;break;case 15:e=154;break;case 25:e=110;break;case 30:e=86}break;case 9:switch(this.mErrorCorrectionLevel){case 7:e=232;break;case 15:e=182;break;case 25:e=132;break;case 30:e=100}break;case 10:switch(this.mErrorCorrectionLevel){case 7:e=274;break;case 15:e=216;break;case 25:e=154;break;case 30:e=122}break;case 11:switch(this.mErrorCorrectionLevel){case 7:e=324;break;case 15:e=254;break;case 25:e=180;break;case 30:e=140}break;case 12:switch(this.mErrorCorrectionLevel){case 7:e=370;break;case 15:e=290;break;case 25:e=206;break;case 30:e=158}break;case 13:switch(this.mErrorCorrectionLevel){case 7:e=428;break;case 15:e=334;break;case 25:e=244;break;case 30:e=180}break;case 14:switch(this.mErrorCorrectionLevel){case 7:e=461;break;case 15:e=365;break;case 25:e=261;break;case 30:e=197}break;case 15:switch(this.mErrorCorrectionLevel){case 7:e=523;break;case 15:e=415;break;case 25:e=295;break;case 30:e=223}break;case 16:switch(this.mErrorCorrectionLevel){case 7:e=589;break;case 15:e=453;break;case 25:e=325;break;case 30:e=253}break;case 17:switch(this.mErrorCorrectionLevel){case 7:e=647;break;case 15:e=507;break;case 25:e=367;break;case 30:e=283}break;case 18:switch(this.mErrorCorrectionLevel){case 7:e=721;break;case 15:e=563;break;case 25:e=397;break;case 30:e=313}break;case 19:switch(this.mErrorCorrectionLevel){case 7:e=795;break;case 15:e=627;break;case 25:e=445;break;case 30:e=341}break;case 20:switch(this.mErrorCorrectionLevel){case 7:e=861;break;case 15:e=669;break;case 25:e=485;break;case 30:e=385}break;case 21:switch(this.mErrorCorrectionLevel){case 7:e=932;break;case 15:e=714;break;case 25:e=512;break;case 30:e=406}break;case 22:switch(this.mErrorCorrectionLevel){case 7:e=1006;break;case 15:e=782;break;case 25:e=568;break;case 30:e=442}break;case 23:switch(this.mErrorCorrectionLevel){case 7:e=1094;break;case 15:e=860;break;case 25:e=614;break;case 30:e=464}break;case 24:switch(this.mErrorCorrectionLevel){case 7:e=1174;break;case 15:e=914;break;case 25:e=664;break;case 30:e=514}break;case 25:switch(this.mErrorCorrectionLevel){case 7:e=1276;break;case 15:e=1e3;break;case 25:e=718;break;case 30:e=538}break;case 26:switch(this.mErrorCorrectionLevel){case 7:e=1370;break;case 15:e=1062;break;case 25:e=754;break;case 30:e=596}break;case 27:switch(this.mErrorCorrectionLevel){case 7:e=1468;break;case 15:e=1128;break;case 25:e=808;break;case 30:e=628}break;case 28:switch(this.mErrorCorrectionLevel){case 7:e=1531;break;case 15:e=1193;break;case 25:e=871;break;case 30:e=661}break;case 29:switch(this.mErrorCorrectionLevel){case 7:e=1631;break;case 15:e=1267;break;case 25:e=911;break;case 30:e=701}break;case 30:switch(this.mErrorCorrectionLevel){case 7:e=1735;break;case 15:e=1373;break;case 25:e=985;break;case 30:e=745}break;case 31:switch(this.mErrorCorrectionLevel){case 7:e=1843;break;case 15:e=1455;break;case 25:e=1033;break;case 30:e=793}break;case 32:switch(this.mErrorCorrectionLevel){case 7:e=1955;break;case 15:e=1541;break;case 25:e=1115;break;case 30:e=845}break;case 33:switch(this.mErrorCorrectionLevel){case 7:e=2071;break;case 15:e=1631;break;case 25:e=1171;break;case 30:e=901}break;case 34:switch(this.mErrorCorrectionLevel){case 7:e=2191;break;case 15:e=1725;break;case 25:e=1231;break;case 30:e=961}break;case 35:switch(this.mErrorCorrectionLevel){case 7:e=2306;break;case 15:e=1812;break;case 25:e=1286;break;case 30:e=986}break;case 36:switch(this.mErrorCorrectionLevel){case 7:e=2434;break;case 15:e=1914;break;case 25:e=1354;break;case 30:e=1054}break;case 37:switch(this.mErrorCorrectionLevel){case 7:e=2566;break;case 15:e=1992;break;case 25:e=1426;break;case 30:e=1096}break;case 38:switch(this.mErrorCorrectionLevel){case 7:e=2702;break;case 15:e=2102;break;case 25:e=1502;break;case 30:e=1142}break;case 39:switch(this.mErrorCorrectionLevel){case 7:e=2812;break;case 15:e=2216;break;case 25:e=1582;break;case 30:e=1222}break;case 40:switch(this.mErrorCorrectionLevel){case 7:e=2956;break;case 15:e=2334;break;case 25:e=1666;break;case 30:e=1276}}return e},e.prototype.obtainNumberOfErrorCorrectingCodeWords=function(){var e=4*(this.mVersion-1);switch(this.mErrorCorrectionLevel){case 7:e+=0;break;case 15:e+=1;break;case 25:e+=2;break;case 30:e+=3}return this.numberOfErrorCorrectingCodeWords[e]},e.prototype.obtainNumberOfErrorCorrectionBlocks=function(){var e=null;switch(this.mVersion){case 1:case 2:e=[1];break;case 3:switch(this.mErrorCorrectionLevel){case 7:case 15:e=[1];break;case 25:case 30:e=[2]}break;case 4:switch(this.mErrorCorrectionLevel){case 7:e=[1];break;case 15:case 25:e=[2];break;case 30:e=[4]}break;case 5:switch(this.mErrorCorrectionLevel){case 7:e=[1];break;case 15:e=[2];break;case 25:e=[2,33,15,2,34,16];break;case 30:e=[2,33,11,2,34,12]}break;case 6:switch(this.mErrorCorrectionLevel){case 7:e=[2];break;case 15:case 25:case 30:e=[4]}break;case 7:switch(this.mErrorCorrectionLevel){case 7:e=[2];break;case 15:e=[4];break;case 25:e=[2,32,14,4,33,15];break;case 30:e=[4,39,13,1,40,14]}break;case 8:switch(this.mErrorCorrectionLevel){case 7:e=[2];break;case 15:e=[2,60,38,2,61,39];break;case 25:e=[4,40,18,2,41,19];break;case 30:e=[4,40,14,2,41,15]}break;case 9:switch(this.mErrorCorrectionLevel){case 7:e=[2];break;case 15:e=[3,58,36,2,59,37];break;case 25:e=[4,36,16,4,37,17];break;case 30:e=[4,36,12,4,37,13]}break;case 10:switch(this.mErrorCorrectionLevel){case 7:e=[2,86,68,2,87,69];break;case 15:e=[4,69,43,1,70,44];break;case 25:e=[6,43,19,2,44,20];break;case 30:e=[6,43,15,2,44,16]}break;case 11:switch(this.mErrorCorrectionLevel){case 7:e=[4];break;case 15:e=[1,80,50,4,81,51];break;case 25:e=[4,50,22,4,51,23];break;case 30:e=[3,36,12,8,37,13]}break;case 12:switch(this.mErrorCorrectionLevel){case 7:e=[2,116,92,2,117,93];break;case 15:e=[6,58,36,2,59,37];break;case 25:e=[4,46,20,6,47,21];break;case 30:e=[7,42,14,4,43,15]}break;case 13:switch(this.mErrorCorrectionLevel){case 7:e=[4];break;case 15:e=[8,59,37,1,60,38];break;case 25:e=[8,44,20,4,45,21];break;case 30:e=[12,33,11,4,34,12]}break;case 14:switch(this.mErrorCorrectionLevel){case 7:e=[3,145,115,1,146,116];break;case 15:e=[4,64,40,5,65,41];break;case 25:e=[11,36,16,5,37,17];break;case 30:e=[11,36,12,5,37,13]}break;case 15:switch(this.mErrorCorrectionLevel){case 7:e=[5,109,87,1,110,88];break;case 15:e=[5,65,41,5,66,42];break;case 25:e=[5,54,24,7,55,25];break;case 30:e=[11,36,12,7,37,13]}break;case 16:switch(this.mErrorCorrectionLevel){case 7:e=[5,112,98,1,123,99];break;case 15:e=[7,73,45,3,74,46];break;case 25:e=[15,43,19,2,44,20];break;case 30:e=[3,45,15,13,46,16]}break;case 17:switch(this.mErrorCorrectionLevel){case 7:e=[1,135,107,5,136,108];break;case 15:e=[10,74,46,1,75,47];break;case 25:e=[1,50,22,15,51,23];break;case 30:e=[2,42,14,17,43,15]}break;case 18:switch(this.mErrorCorrectionLevel){case 7:e=[5,150,120,1,151,121];break;case 15:e=[9,69,43,4,70,44];break;case 25:e=[17,50,22,1,51,23];break;case 30:e=[2,42,14,19,43,15]}break;case 19:switch(this.mErrorCorrectionLevel){case 7:e=[3,141,113,4,142,114];break;case 15:e=[3,70,44,11,71,45];break;case 25:e=[17,47,21,4,48,22];break;case 30:e=[9,39,13,16,40,14]}break;case 20:switch(this.mErrorCorrectionLevel){case 7:e=[3,135,107,5,136,108];break;case 15:e=[3,67,41,13,68,42];break;case 25:e=[15,54,24,5,55,25];break;case 30:e=[15,43,15,10,44,16]}break;case 21:switch(this.mErrorCorrectionLevel){case 7:e=[4,144,116,4,145,117];break;case 15:e=[17];break;case 25:e=[17,50,22,6,51,23];break;case 30:e=[19,46,16,6,47,17]}break;case 22:switch(this.mErrorCorrectionLevel){case 7:e=[2,139,111,7,140,112];break;case 15:e=[17];break;case 25:e=[7,54,24,16,55,25];break;case 30:e=[34]}break;case 23:switch(this.mErrorCorrectionLevel){case 7:e=[4,151,121,5,152,122];break;case 15:e=[4,75,47,14,76,48];break;case 25:e=[11,54,24,14,55,25];break;case 30:e=[16,45,15,14,46,16]}break;case 24:switch(this.mErrorCorrectionLevel){case 7:e=[6,147,117,4,148,118];break;case 15:e=[6,73,45,14,74,46];break;case 25:e=[11,54,24,16,55,25];break;case 30:e=[30,46,16,2,47,17]}break;case 25:switch(this.mErrorCorrectionLevel){case 7:e=[8,132,106,4,133,107];break;case 15:e=[8,75,47,13,76,48];break;case 25:e=[7,54,24,22,55,25];break;case 30:e=[22,45,15,13,46,16]}break;case 26:switch(this.mErrorCorrectionLevel){case 7:e=[10,142,114,2,143,115];break;case 15:e=[19,74,46,4,75,47];break;case 25:e=[28,50,22,6,51,23];break;case 30:e=[33,46,16,4,47,17]}break;case 27:switch(this.mErrorCorrectionLevel){case 7:e=[8,152,122,4,153,123];break;case 15:e=[22,73,45,3,74,46];break;case 25:e=[8,53,23,26,54,24];break;case 30:e=[12,45,15,28,46,16]}break;case 28:switch(this.mErrorCorrectionLevel){case 7:e=[3,147,117,10,148,118];break;case 15:e=[3,73,45,23,74,46];break;case 25:e=[4,54,24,31,55,25];break;case 30:e=[11,45,15,31,46,16]}break;case 29:switch(this.mErrorCorrectionLevel){case 7:e=[7,146,116,7,147,117];break;case 15:e=[21,73,45,7,74,46];break;case 25:e=[1,53,23,37,54,24];break;case 30:e=[19,45,15,26,46,16]}break;case 30:switch(this.mErrorCorrectionLevel){case 7:e=[5,145,115,10,146,116];break;case 15:e=[19,75,47,10,76,48];break;case 25:e=[15,54,24,25,55,25];break;case 30:e=[23,45,15,25,46,16]}break;case 31:switch(this.mErrorCorrectionLevel){case 7:e=[13,145,115,3,146,116];break;case 15:e=[2,74,46,29,75,47];break;case 25:e=[42,54,24,1,55,25];break;case 30:e=[23,45,15,28,46,16]}break;case 32:switch(this.mErrorCorrectionLevel){case 7:e=[17];break;case 15:e=[10,74,46,23,75,47];break;case 25:e=[10,54,24,35,55,25];break;case 30:e=[19,45,15,35,46,16]}break;case 33:switch(this.mErrorCorrectionLevel){case 7:e=[17,145,115,1,146,116];break;case 15:e=[14,74,46,21,75,47];break;case 25:e=[29,54,24,19,55,25];break;case 30:e=[11,45,15,46,46,16]}break;case 34:switch(this.mErrorCorrectionLevel){case 7:e=[13,145,115,6,146,116];break;case 15:e=[14,74,46,23,75,47];break;case 25:e=[44,54,24,7,55,25];break;case 30:e=[59,46,16,1,47,17]}break;case 35:switch(this.mErrorCorrectionLevel){case 7:e=[12,151,121,7,152,122];break;case 15:e=[12,75,47,26,76,48];break;case 25:e=[39,54,24,14,55,25];break;case 30:e=[22,45,15,41,46,16]}break;case 36:switch(this.mErrorCorrectionLevel){case 7:e=[6,151,121,14,152,122];break;case 15:e=[6,75,47,34,76,48];break;case 25:e=[46,54,24,10,55,25];break;case 30:e=[2,45,15,64,46,16]}break;case 37:switch(this.mErrorCorrectionLevel){case 7:e=[17,152,122,4,153,123];break;case 15:e=[29,74,46,14,75,47];break;case 25:e=[49,54,24,10,55,25];break;case 30:e=[24,45,15,46,46,16]}break;case 38:switch(this.mErrorCorrectionLevel){case 7:e=[4,152,122,18,153,123];break;case 15:e=[13,74,46,32,75,47];break;case 25:e=[48,54,24,14,55,25];break;case 30:e=[42,45,15,32,46,16]}break;case 39:switch(this.mErrorCorrectionLevel){case 7:e=[20,147,117,4,148,118];break;case 15:e=[40,75,47,7,76,48];break;case 25:e=[43,54,24,22,55,25];break;case 30:e=[10,45,15,67,46,16]}break;case 40:switch(this.mErrorCorrectionLevel){case 7:e=[19,148,118,6,149,119];break;case 15:e=[18,75,47,31,76,48];break;case 25:e=[34,54,24,34,55,25];break;case 30:e=[20,45,15,61,46,16]}}return e},e.prototype.obtainEnd=function(){return this.endValues[this.mVersion-1]},e.prototype.obtainDataCapacity=function(){return this.dataCapacityValues[this.mVersion-1]},e.prototype.obtainFormatInformation=function(){var e=null;switch(this.mErrorCorrectionLevel){case 7:e=[1,0,1,1,1,0,0,1,0,0,0,1,1,1,1];break;case 15:e=[1,1,0,1,0,0,1,0,1,1,0,1,1,0,1];break;case 25:e=[0,1,1,0,0,0,0,0,0,0,1,0,1,1,0];break;case 30:e=[0,0,0,0,1,0,1,1,1,0,0,1,1,0,0]}return e},e.prototype.obtainVersionInformation=function(){var e=null;switch(this.mVersion){case 7:e=[0,0,1,0,1,0,0,1,0,0,1,1,1,1,1,0,0,0];break;case 8:e=[0,0,1,1,1,1,0,1,1,0,1,0,0,0,0,1,0,0];break;case 9:e=[1,0,0,1,1,0,0,1,0,1,0,1,1,0,0,1,0,0];break;case 10:e=[1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,1,0,0];break;case 11:e=[0,1,1,0,1,1,1,1,1,1,0,1,1,1,0,1,0,0];break;case 12:e=[0,1,0,0,0,1,1,0,1,1,1,0,0,0,1,1,0,0];break;case 13:e=[1,1,1,0,0,0,1,0,0,0,0,1,1,0,1,1,0,0];break;case 14:e=[1,0,1,1,0,0,0,0,0,1,1,0,0,1,1,1,0,0];break;case 15:e=[0,0,0,1,0,1,0,0,1,0,0,1,1,1,1,1,0,0];break;case 16:e=[0,0,0,1,1,1,1,0,1,1,0,1,0,0,0,0,1,0];break;case 17:e=[1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,0,1,0];break;case 18:e=[1,1,1,0,1,0,0,0,0,1,0,1,0,1,0,0,1,0];break;case 19:e=[0,1,0,0,1,1,0,0,1,0,1,0,1,1,0,0,1,0];break;case 20:e=[0,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,1,0];break;case 21:e=[1,1,0,0,0,0,0,1,0,1,1,0,1,0,1,0,1,0];break;case 22:e=[1,0,0,1,0,0,1,1,0,0,0,1,0,1,1,0,1,0];break;case 23:e=[0,0,1,1,0,1,1,1,1,1,1,0,1,1,1,0,1,0];break;case 24:e=[0,0,1,0,0,0,1,1,0,1,1,1,0,0,0,1,1,0];break;case 25:e=[1,0,0,0,0,1,1,1,1,0,0,0,1,0,0,1,1,0];break;case 26:e=[1,1,0,1,0,1,0,1,1,1,1,1,0,1,0,1,1,0];break;case 27:e=[0,1,1,1,0,0,0,1,0,0,0,0,1,1,0,1,1,0];break;case 28:e=[0,1,0,1,1,0,0,0,0,0,1,1,0,0,1,1,1,0];break;case 29:e=[1,1,1,1,1,1,0,0,1,1,0,0,1,0,1,1,1,0];break;case 30:e=[1,0,1,0,1,1,1,0,1,0,1,1,0,1,1,1,1,0];break;case 31:e=[0,0,0,0,1,0,1,0,0,1,0,0,1,1,1,1,1,0];break;case 32:e=[1,0,1,0,1,0,1,1,1,0,0,1,0,0,0,0,0,1];break;case 33:e=[0,0,0,0,1,1,1,1,0,1,1,0,1,0,0,0,0,1];break;case 34:e=[0,1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,0,1];break;case 35:e=[1,1,1,1,1,0,0,1,1,1,1,0,1,1,0,0,0,1];break;case 36:e=[1,1,0,1,0,0,0,0,1,1,0,1,0,0,1,0,0,1];break;case 37:e=[0,1,1,1,0,1,0,0,0,0,1,0,1,0,1,0,0,1];break;case 38:e=[0,0,1,0,0,1,1,0,0,1,0,1,0,1,1,0,0,1];break;case 39:e=[1,0,0,0,0,0,1,0,1,0,1,0,1,1,1,0,0,1];break;case 40:e=[1,0,0,1,0,1,1,0,0,0,1,1,0,0,0,1,0,1]}return e},e.prototype.getNumericDataCapacity=function(e,t){var r=null;switch(t){case 7:r=this.numericDataCapacityLow;break;case 15:r=this.numericDataCapacityMedium;break;case 25:r=this.numericDataCapacityQuartile;break;case 30:r=this.numericDataCapacityHigh}return r[e-1]},e.prototype.getAlphanumericDataCapacity=function(e,t){var r=null;switch(t){case 7:r=this.alphanumericDataCapacityLow;break;case 15:r=this.alphanumericDataCapacityMedium;break;case 25:r=this.alphanumericDataCapacityQuartile;break;case 30:r=this.alphanumericDataCapacityHigh}return r[e-1]},e.prototype.getBinaryDataCapacity=function(e,t){var r=null;switch(t){case 7:r=this.binaryDataCapacityLow;break;case 15:r=this.binaryDataCapacityMedium;break;case 25:r=this.binaryDataCapacityQuartile;break;case 30:r=this.binaryDataCapacityHigh}return r[e-1]},e}(),le=function(){function e(e,t){this.alpha=[1,2,4,8,16,32,64,128,29,58,116,232,205,135,19,38,76,152,45,90,180,117,234,201,143,3,6,12,24,48,96,192,157,39,78,156,37,74,148,53,106,212,181,119,238,193,159,35,70,140,5,10,20,40,80,160,93,186,105,210,185,111,222,161,95,190,97,194,153,47,94,188,101,202,137,15,30,60,120,240,253,231,211,187,107,214,177,127,254,225,223,163,91,182,113,226,217,175,67,134,17,34,68,136,13,26,52,104,208,189,103,206,129,31,62,124,248,237,199,147,59,118,236,197,151,51,102,204,133,23,46,92,184,109,218,169,79,158,33,66,132,21,42,84,168,77,154,41,82,164,85,170,73,146,57,114,228,213,183,115,230,209,191,99,198,145,63,126,252,229,215,179,123,246,241,255,227,219,171,75,150,49,98,196,149,55,110,220,165,87,174,65,130,25,50,100,200,141,7,14,28,56,112,224,221,167,83,166,81,162,89,178,121,242,249,239,195,155,43,86,172,69,138,9,18,36,72,144,61,122,244,245,247,243,251,235,203,139,11,22,44,88,176,125,250,233,207,131,27,54,108,216,173,71,142],this.mQrBarcodeValues=new he(e,t);var r="DataCapacity";this.mLength=this.mQrBarcodeValues[r],r="NumberOfErrorCorrectingCodeWords",this.eccw=this.mQrBarcodeValues[r]}return Object.defineProperty(e.prototype,"DC",{set:function(e){this.mDataCodeWord=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"DataBits",{set:function(e){this.databits=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Eccw",{set:function(e){this.eccw=e},enumerable:!0,configurable:!0}),e.prototype.getErcw=function(){var e;switch(this.decimalValue=[this.databits],this.eccw){case 7:this.gx=[0,87,229,146,149,238,102,21];break;case 10:this.gx=[0,251,67,46,61,118,70,64,94,32,45];break;case 13:this.gx=[0,74,152,176,100,86,100,106,104,130,218,206,140,78];break;case 15:this.gx=[0,8,183,61,91,202,37,51,58,58,237,140,124,5,99,105];break;case 16:this.gx=[0,120,104,107,109,102,161,76,3,91,191,147,169,182,194,225,120];break;case 17:this.gx=[0,43,139,206,78,43,239,123,206,214,147,24,99,150,39,243,163,136];break;case 18:this.gx=[0,215,234,158,94,184,97,118,170,79,187,152,148,252,179,5,98,96,153];break;case 20:this.gx=[0,17,60,79,50,61,163,26,187,202,180,221,225,83,239,156,164,212,212,188,190];break;case 22:this.gx=[0,210,171,247,242,93,230,14,109,221,53,200,74,8,172,98,80,219,134,160,105,165,231];break;case 24:this.gx=[0,229,121,135,48,211,117,251,126,159,180,169,152,192,226,228,218,111,0,117,232,87,96,227,21];break;case 26:this.gx=[0,173,125,158,2,103,182,118,17,145,201,111,28,165,53,161,21,245,142,13,102,48,227,153,145,218,70];break;case 28:this.gx=[0,168,223,200,104,224,234,108,180,110,190,195,147,205,27,232,201,21,43,245,87,42,195,212,119,242,37,9,123];break;case 30:this.gx=[0,41,173,145,152,216,31,179,182,50,48,110,86,239,96,222,125,42,173,226,193,224,130,156,37,251,216,238,40,192,180]}return this.gx=this.getElement(this.gx,this.alpha),this.toDecimal(this.mDataCodeWord),e=this.divide(),this.toBinary(e)},e.prototype.toDecimal=function(e){for(var t=0;t<e.length;t++)this.decimalValue[t]=parseInt(e[t],2)},e.prototype.toBinary=function(e){for(var t=[],r=0;r<this.eccw;r++){var i="",a=e[r].toString(2);if(a.length<8)for(var o=0;o<8-a.length;o++)i+="0";t[r]=i+a}return t},e.prototype.divide=function(){for(var e={},t=0;t<this.decimalValue.length;t++)e[this.decimalValue.length-1-t]=this.decimalValue[t];for(var r={},t=0;t<this.gx.length;t++)r[this.gx.length-1-t]=this.findElement(this.gx[t],this.alpha);for(var i={},a=0,o=Object.keys(e);a<o.length;a++){h=o[a];i[Number(h)+this.eccw]=e[h]}e=i;var s=this.decimalValue.length+this.eccw-this.gx.length;i={};for(var n=0,c=Object.keys(r);n<c.length;n++){var h=c[n];i[Number(h)+s]=r[h]}r=i;for(var l=e,t=0;t<Object.keys(e).length;t++){var u=this.findLargestExponent(l);if(0===l[u])delete l[u];else{var d=this.convertToAlphaNotation(l),p=this.multiplyGeneratorPolynomByLeadterm(r,d[this.findLargestExponent(d)],t);p=this.convertToDecNotation(p),l=p=this.xORPolynoms(l,p)}}this.eccw=Object.keys(l).length;for(var m=[],b=0,f=Object.keys(l);b<f.length;b++){var y=f[b];m.push(l[y])}return m.reverse()},e.prototype.xORPolynoms=function(e,t){var r={},i={},a={};Object.keys(e).length>=Object.keys(t).length?(i=e,a=t):(i=t,a=e);for(var o=this.findLargestExponent(e),s=this.findLargestExponent(a),n=Object.keys(i).length-1,c=0,h=Object.keys(i);c<h.length;c++){var l=h[c];r[o-n]=i[l]^(Object.keys(a).length>n?a[s-n]:0),n--}return delete r[this.findLargestExponent(r)],r},e.prototype.multiplyGeneratorPolynomByLeadterm=function(e,t,r){for(var i={},a=0,o=Object.keys(e);a<o.length;a++){var s=o[a];i[Number(s)-r]=(e[s]+t)%255}return i},e.prototype.convertToDecNotation=function(e){for(var t={},r=0,i=Object.keys(e);r<i.length;r++){var a=i[r];t[a]=this.getIntValFromAlphaExp(e[a],this.alpha)}return t},e.prototype.convertToAlphaNotation=function(e){for(var t={},r=0,i=Object.keys(e);r<i.length;r++){var a=i[r];0!==e[a]&&(t[a]=this.findElement(e[a],this.alpha))}return t},e.prototype.findLargestExponent=function(e){for(var t=0,r=0,i=Object.keys(e);r<i.length;r++){var a=i[r];Number(a)>t&&(t=Number(a))}return t},e.prototype.getIntValFromAlphaExp=function(e,t){return e>255&&(e-=255),t[e]},e.prototype.findElement=function(e,t){var r;for(r=0;r<t.length&&e!==t[r];r++);return r},e.prototype.getElement=function(e,t){for(var r=[e.length],i=0;i<e.length;i++)e[i]>255&&(e[i]=e[i]-255),r[i]=t[e[i]];return r},e}(),ue=function(){function t(){this.mVersion=e.QRCodeVersion.Version01,this.mInputMode="NumericMode",this.validInput=!0,this.totalBits=0,this.mModuleValue=[],this.mDataAllocationValues=[[],[]],this.mixVersionERC=!0,this.mixExecutablePart=null,this.mixDataCount=0,this.mNoOfModules=21,this.mIsUserMentionedMode=!1,this.chooseDefaultMode=!1,this.mixRemainingPart=null,this.isXdimension=!1,this.mXDimension=1,this.mIsEci=!1,this.mIsUserMentionedErrorCorrectionLevel=!1,this.mEciAssignmentNumber=3,this.mIsUserMentionedVersion=!1,this.mErrorCorrectionLevel=e.ErrorCorrectionLevel.Low,this.textList=[],this.mode=[]}return Object.defineProperty(t.prototype,"XDimension",{get:function(){return this.mXDimension},set:function(e){this.mXDimension=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputMode",{get:function(){return this.mInputMode},set:function(e){this.mInputMode=e,this.mIsUserMentionedMode=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this.mVersion},set:function(t){this.mVersion=t,this.mNoOfModules=4*(this.mVersion-1)+21,t!==e.QRCodeVersion.Auto&&(this.mIsUserMentionedVersion=!0)},enumerable:!0,configurable:!0}),t.prototype.getBaseAttributes=function(e,t,r,i,a,o){return{width:e,height:t,x:r,y:i,color:a,strokeColor:o}},t.prototype.getInstance=function(e){var t=document.getElementById(e);return new b(t.id,this.isSvgMode)},t.prototype.drawImage=function(e,t,r,i,a,o){for(var s=this.getInstance(e.id),n=0;n<t.length;n++)s.renderRectElement(e,t[n])},t.prototype.draw=function(t,r,i,a,o,s,n,c){if(this.isSvgMode=n,this.generateValues(),this.validInput){var h=void 0,l=a-(o.left+o.right),u=i-(o.top+o.bottom);h=l>=u?u:l;var d=this.XDimension,p=e.QuietZone.All,m=l>=h?(l-h)/2:0,b=u>=h?(u-h)/2:0;b+=o.top,m+=o.left;var f=this.drawDisplayText(r,m,b,h,u,s,t,o,c);u-=f.height,s.margin.bottom>0&&("Top"===s.position?(b+=s.margin.bottom,u-=s.margin.bottom):u-=s.margin.bottom),s.margin.top>0&&("Top"===s.position?(b+=s.margin.top,u-=s.margin.top):u-=s.margin.top),d=(h=l>=u?u:l)/(this.mNoOfModules+2*p+1),this.isXdimension=!0,a=(this.mNoOfModules+2*p)*d,i=(this.mNoOfModules+2*p)*d;for(var y=this.mNoOfModules+2*p,v=this.mNoOfModules+2*p,g=[],k=0;k<y;k++){for(var C=0;C<v;C++){var w=void 0;if(w=this.mModuleValue[k][C].isBlack?c:"white",this.mDataAllocationValues[C][k].isFilled&&this.mDataAllocationValues[C][k].isBlack&&(w=c),"white"!==w){var x=void 0;x=this.getBaseAttributes(d,d,m,"Bottom"===s.position?b:b+f.height/2,w),g.push(x)}m+=d}b+=d,m=(l>=h?(l-h)/2:0)+o.left}return this.drawImage(r,g),this.mModuleValue=void 0,this.mDataAllocationValues=void 0,!0}return!1},t.prototype.drawText=function(e,t){this.getInstance(e.id).renderTextElement(e,t)},t.prototype.drawDisplayText=function(e,t,r,i,o,s,c,h,l){var u=s;n();var d=this.getBaseAttributes(i,o,t,r,"black");d.string=u.text?u.text:c,d.color=l,d.fontStyle=u.font,d.stringSize=u.size,d.visibility=u.visibility;var p=a(d),m=p.height/2+2;return d.height=m,d.x=t+i/2-p.width/2+u.margin.left-u.margin.right,"Bottom"===s.position?(s.margin.top>0&&(d.y=r+o),s.margin.bottom>0?d.y=r+o-u.margin.bottom:h.top<10?d.y=o+p.height/2:d.y=o+h.top):s.margin.top>0?d.y=r+s.margin.top+p.height/2:d.y=r+p.height/2,s.visibility&&this.drawText(e,d),d},t.prototype.generateValues=function(){this.mQrBarcodeValues=new he(this.mVersion,this.mErrorCorrectionLevel),this.initialize(),this.mQrBarcodeValues=new he(this.mVersion,this.mErrorCorrectionLevel);for(i=0;i<this.mNoOfModules;i++){this.mModuleValue.push([0]);for(s=0;s<this.mNoOfModules;s++)this.mModuleValue[i][s]=new de}if(this.drawPDP(0,0),this.drawPDP(this.mNoOfModules-7,0),this.drawPDP(0,this.mNoOfModules-7),this.drawTimingPattern(),1!==this.mVersion)for(var e=this.getAlignmentPatternCoOrdinates(),t=0,r=Object.keys(e);t<r.length;t++)for(var i=r[t],a=0,o=Object.keys(e);a<o.length;a++){var s=o[a];this.mModuleValue[e[i]][e[s]].isPdp||this.drawAlignmentPattern(e[i],e[s])}this.allocateFormatAndVersionInformation();var n=null;n=this.encodeData(),this.dataAllocationAndMasking(n),this.drawFormatInformation(),this.addQuietZone(),this.mQrBarcodeValues.FormatInformation=void 0,this.mQrBarcodeValues.NumberOfDataCodeWord=void 0,this.mQrBarcodeValues.NumberOfErrorCorrectingCodeWords=void 0,this.mQrBarcodeValues.VersionInformation=void 0,this.mQrBarcodeValues.alphanumericDataCapacityHigh=void 0,this.mQrBarcodeValues.alphanumericDataCapacityLow=void 0,this.mQrBarcodeValues.alphanumericDataCapacityMedium=void 0,this.mQrBarcodeValues.alphanumericDataCapacityQuartile=void 0,this.mQrBarcodeValues.binaryDataCapacityHigh=void 0,this.mQrBarcodeValues.dataCapacityValues=void 0,this.mQrBarcodeValues.endValues=void 0,this.mQrBarcodeValues.dataCapacityValues=void 0,this.mQrBarcodeValues=void 0,this.mIsUserMentionedVersion=void 0,this.mVersion=void 0},t.prototype.drawPDP=function(e,t){var r,i;for(r=e,i=t;r<e+7;r++,i++)this.mModuleValue[r][t].isBlack=!0,this.mModuleValue[r][t].isFilled=!0,this.mModuleValue[r][t].isPdp=!0,this.mModuleValue[r][t+6].isBlack=!0,this.mModuleValue[r][t+6].isFilled=!0,this.mModuleValue[r][t+6].isPdp=!0,t+7<this.mNoOfModules?(this.mModuleValue[r][t+7].isBlack=!1,this.mModuleValue[r][t+7].isFilled=!0,this.mModuleValue[r][t+7].isPdp=!0):t-1>=0&&(this.mModuleValue[r][t-1].isBlack=!1,this.mModuleValue[r][t-1].isFilled=!0,this.mModuleValue[r][t-1].isPdp=!0),this.mModuleValue[e][i].isBlack=!0,this.mModuleValue[e][i].isFilled=!0,this.mModuleValue[e][i].isPdp=!0,this.mModuleValue[e+6][i].isBlack=!0,this.mModuleValue[e+6][i].isFilled=!0,this.mModuleValue[e+6][i].isPdp=!0,e+7<this.mNoOfModules?(this.mModuleValue[e+7][i].isBlack=!1,this.mModuleValue[e+7][i].isFilled=!0,this.mModuleValue[e+7][i].isPdp=!0):e-1>=0&&(this.mModuleValue[e-1][i].isBlack=!1,this.mModuleValue[e-1][i].isFilled=!0,this.mModuleValue[e-1][i].isPdp=!0);for(e+7<this.mNoOfModules&&t+7<this.mNoOfModules?(this.mModuleValue[e+7][t+7].isBlack=!1,this.mModuleValue[e+7][t+7].isFilled=!0,this.mModuleValue[e+7][t+7].isPdp=!0):e+7<this.mNoOfModules&&t+7>=this.mNoOfModules?(this.mModuleValue[e+7][t-1].isBlack=!1,this.mModuleValue[e+7][t-1].isFilled=!0,this.mModuleValue[e+7][t-1].isPdp=!0):e+7>=this.mNoOfModules&&t+7<this.mNoOfModules&&(this.mModuleValue[e-1][t+7].isBlack=!1,this.mModuleValue[e-1][t+7].isFilled=!0,this.mModuleValue[e-1][t+7].isPdp=!0),r=++e,i=++t;r<e+5;r++,i++)this.mModuleValue[r][t].isBlack=!1,this.mModuleValue[r][t].isFilled=!0,this.mModuleValue[r][t].isPdp=!0,this.mModuleValue[r][t+4].isBlack=!1,this.mModuleValue[r][t+4].isFilled=!0,this.mModuleValue[r][t+4].isPdp=!0,this.mModuleValue[e][i].isBlack=!1,this.mModuleValue[e][i].isFilled=!0,this.mModuleValue[e][i].isPdp=!0,this.mModuleValue[e+4][i].isBlack=!1,this.mModuleValue[e+4][i].isFilled=!0,this.mModuleValue[e+4][i].isPdp=!0;for(r=++e,i=++t;r<e+3;r++,i++)this.mModuleValue[r][t].isBlack=!0,this.mModuleValue[r][t].isFilled=!0,this.mModuleValue[r][t].isPdp=!0,this.mModuleValue[r][t+2].isBlack=!0,this.mModuleValue[r][t+2].isFilled=!0,this.mModuleValue[r][t+2].isPdp=!0,this.mModuleValue[e][i].isBlack=!0,this.mModuleValue[e][i].isFilled=!0,this.mModuleValue[e][i].isPdp=!0,this.mModuleValue[e+2][i].isBlack=!0,this.mModuleValue[e+2][i].isFilled=!0,this.mModuleValue[e+2][i].isPdp=!0;this.mModuleValue[e+1][t+1].isBlack=!0,this.mModuleValue[e+1][t+1].isFilled=!0,this.mModuleValue[e+1][t+1].isPdp=!0},t.prototype.drawTimingPattern=function(){for(var e=8;e<this.mNoOfModules-8;e+=2)this.mModuleValue[e][6].isBlack=!0,this.mModuleValue[e][6].isFilled=!0,this.mModuleValue[e+1][6].isBlack=!1,this.mModuleValue[e+1][6].isFilled=!0,this.mModuleValue[6][e].isBlack=!0,this.mModuleValue[6][e].isFilled=!0,this.mModuleValue[6][e+1].isBlack=!1,this.mModuleValue[6][e+1].isFilled=!0;this.mModuleValue[this.mNoOfModules-8][8].isBlack=!0,this.mModuleValue[this.mNoOfModules-8][8].isFilled=!0},t.prototype.initialize=function(){this.mIsUserMentionedMode||(this.chooseDefaultMode=!0);for(var t="NumericMode",r=0;r<this.text.length;r++)if(this.text.charCodeAt(r)<58&&this.text.charCodeAt(r)>47);else{if(!(this.text.charCodeAt(r)<91&&this.text.charCodeAt(r)>64||"$"===this.text[r]||"%"===this.text[r]||"*"===this.text[r]||"+"===this.text[r]||"-"===this.text[r]||"."===this.text[r]||"/"===this.text[r]||":"===this.text[r]||" "===this.text[r])){if(this.text.charCodeAt(r)>=65377&&this.text.charCodeAt(r)<=65439||this.text.charCodeAt(r)>=97&&this.text.charCodeAt(r)<=122){t="BinaryMode";break}t="BinaryMode",this.mIsEci=!0;break}t="AlphaNumericMode"}if(this.mIsUserMentionedMode&&t!==this.mInputMode&&(("AlphaNumericMode"===t||"BinaryMode"===t)&&"NumericMode"===this.mInputMode||"BinaryMode"===t&&"AlphaNumericMode"===this.mInputMode)&&(this.validInput=!1,t!==this.mInputMode&&(("AlphaNumericMode"===t||"BinaryMode"===t)&&"NumericMode"===this.mInputMode||"BinaryMode"===t&&"AlphaNumericMode"===this.mInputMode)&&(this.validInput=!1)),this.inputMode=t,!0===this.mIsEci)for(r=0;r<this.text.length;r++)this.text.charCodeAt(r)>=32&&this.text.charCodeAt(r);if(this.mixVersionERC)if(!this.mIsUserMentionedVersion||this.mVersion&e.QRCodeVersion.Auto){var i=null;if(this.mIsUserMentionedErrorCorrectionLevel)switch(this.mInputMode){case"NumericMode":switch(this.mErrorCorrectionLevel){case 7:i=this.mQrBarcodeValues.numericDataCapacityLow;break;case 15:i=this.mQrBarcodeValues.numericDataCapacityMedium;break;case 25:i=this.mQrBarcodeValues.numericDataCapacityQuartile;break;case 30:i=this.mQrBarcodeValues.numericDataCapacityHigh}break;case"AlphaNumericMode":switch(this.mErrorCorrectionLevel){case 7:i=this.mQrBarcodeValues.alphanumericDataCapacityLow;break;case 15:i=this.mQrBarcodeValues.alphanumericDataCapacityMedium;break;case 25:i=this.mQrBarcodeValues.alphanumericDataCapacityQuartile;break;case 30:i=this.mQrBarcodeValues.alphanumericDataCapacityHigh}break;case"BinaryMode":switch(this.mErrorCorrectionLevel){case 7:i=this.mQrBarcodeValues.binaryDataCapacityLow;break;case 15:i=this.mQrBarcodeValues.binaryDataCapacityMedium;break;case 25:i=this.mQrBarcodeValues.binaryDataCapacityQuartile;break;case 30:i=this.mQrBarcodeValues.binaryDataCapacityHigh}}else switch(this.mErrorCorrectionLevel=e.ErrorCorrectionLevel.Medium,this.mInputMode){case"NumericMode":i=this.mQrBarcodeValues.numericDataCapacityMedium;break;case"AlphaNumericMode":i=this.mQrBarcodeValues.alphanumericDataCapacityMedium;break;case"BinaryMode":i=this.mQrBarcodeValues.binaryDataCapacityMedium}r=void 0;for(r=0;r<i.length&&!(i[r]>this.text.length);r++);this.version=r+1}else if(this.mIsUserMentionedVersion)if(this.mIsUserMentionedErrorCorrectionLevel){var a=0;"AlphaNumericMode"===this.mInputMode?a=this.mQrBarcodeValues.getAlphanumericDataCapacity(this.mVersion,this.mErrorCorrectionLevel):"NumericMode"===this.mInputMode&&(a=this.mQrBarcodeValues.getNumericDataCapacity(this.mVersion,this.mErrorCorrectionLevel)),"BinaryMode"===this.mInputMode&&(a=this.mQrBarcodeValues.getBinaryDataCapacity(this.mVersion,this.mErrorCorrectionLevel)),a<this.text.length&&(this.chooseDefaultMode?this.mixVersionERC=!1:this.validInput=!1)}else{var o=0,s=0,n=0,c=0;"AlphaNumericMode"===this.mInputMode?(o=this.mQrBarcodeValues.getAlphanumericDataCapacity(this.mVersion,e.ErrorCorrectionLevel.Low),s=this.mQrBarcodeValues.getAlphanumericDataCapacity(this.mVersion,e.ErrorCorrectionLevel.Medium),n=this.mQrBarcodeValues.getAlphanumericDataCapacity(this.mVersion,e.ErrorCorrectionLevel.Quartile),c=this.mQrBarcodeValues.getAlphanumericDataCapacity(this.mVersion,e.ErrorCorrectionLevel.High)):"NumericMode"===this.mInputMode?(o=this.mQrBarcodeValues.getNumericDataCapacity(this.mVersion,e.ErrorCorrectionLevel.Low),s=this.mQrBarcodeValues.getNumericDataCapacity(this.mVersion,e.ErrorCorrectionLevel.Medium),n=this.mQrBarcodeValues.getNumericDataCapacity(this.mVersion,e.ErrorCorrectionLevel.Quartile),c=this.mQrBarcodeValues.getNumericDataCapacity(this.mVersion,e.ErrorCorrectionLevel.High)):"BinaryMode"===this.mInputMode&&(o=this.mQrBarcodeValues.getBinaryDataCapacity(this.mVersion,e.ErrorCorrectionLevel.Low),s=this.mQrBarcodeValues.getBinaryDataCapacity(this.mVersion,e.ErrorCorrectionLevel.Medium),n=this.mQrBarcodeValues.getBinaryDataCapacity(this.mVersion,e.ErrorCorrectionLevel.Quartile),c=this.mQrBarcodeValues.getBinaryDataCapacity(this.mVersion,e.ErrorCorrectionLevel.High)),c>this.text.length?this.mErrorCorrectionLevel=e.ErrorCorrectionLevel.High:n>this.text.length?this.mErrorCorrectionLevel=e.ErrorCorrectionLevel.Quartile:s>this.text.length?this.mErrorCorrectionLevel=e.ErrorCorrectionLevel.Medium:o>this.text.length?this.mErrorCorrectionLevel=e.ErrorCorrectionLevel.Low:this.validInput=!1}},t.prototype.addQuietZone=function(){for(var t=e.QuietZone.All,r=this.mNoOfModules+2*t,i=this.mNoOfModules+2*t,a=[],o=[],s=0;s<r;s++){a.push([0]),o.push([0]);for(n=0;n<i;n++)a[s][n]=new de,o[s][n]=new de}for(s=0;s<i;s++)a[0][s]=new de,a[0][s].isBlack=!1,a[0][s].isFilled=!1,a[0][s].isPdp=!1,o[0][s]=new de,o[0][s].isBlack=!1,o[0][s].isFilled=!1,o[0][s].isPdp=!1;for(s=t;s<r-t;s++){a[s][0]=new de,a[s][0].isBlack=!1,a[s][0].isFilled=!1,a[s][0].isPdp=!1,o[s][0]=new de,o[s][0].isBlack=!1,o[s][0].isFilled=!1,o[s][0].isPdp=!1;for(var n=t;n<i-t;n++)a[s][n]=this.mModuleValue[s-t][n-t],o[s][n]=this.mDataAllocationValues[s-t][n-t];a[s][i-t]=new de,a[s][i-t].isBlack=!1,a[s][i-t].isFilled=!1,a[s][i-t].isPdp=!1,o[s][i-t]=new de,o[s][i-t].isBlack=!1,o[s][i-t].isFilled=!1,o[s][i-t].isPdp=!1}for(s=0;s<i;s++)a[r-t][s]=new de,a[r-t][s].isBlack=!1,a[r-t][s].isFilled=!1,a[r-t][s].isPdp=!1,o[r-t][s]=new de,o[r-t][s].isBlack=!1,o[r-t][s].isFilled=!1,o[r-t][s].isPdp=!1;this.mModuleValue=a,this.mDataAllocationValues=o},t.prototype.drawFormatInformation=function(){for(var e=this.mQrBarcodeValues.FormatInformation,t=0,r=0;r<7;r++)6===r?this.mModuleValue[r+1][8].isBlack=1===e[t]:this.mModuleValue[r][8].isBlack=1===e[t],this.mModuleValue[8][this.mNoOfModules-r-1].isBlack=1===e[t++];t=14;for(r=0;r<7;r++)6===r?this.mModuleValue[8][r+1].isBlack=1===e[t]:this.mModuleValue[8][r].isBlack=1===e[t],this.mModuleValue[this.mNoOfModules-r-1][8].isBlack=1===e[t--];this.mModuleValue[8][8].isBlack=1===e[7],this.mModuleValue[8][this.mNoOfModules-8].isBlack=1===e[7]},t.prototype.dataAllocationAndMasking=function(e){this.mDataAllocationValues=[];for(r=0;r<this.mNoOfModules;r++){this.mDataAllocationValues.push([0]);for(a=0;a<this.mNoOfModules;a++)this.mDataAllocationValues[r][a]=new de}for(var t=0,r=this.mNoOfModules-1;r>=0;r-=2){for(a=this.mNoOfModules-1;a>=0;a--)this.mModuleValue[r][a].isFilled&&this.mModuleValue[r-1][a].isFilled||(this.mModuleValue[r][a].isFilled||(t+1<e.length&&(this.mDataAllocationValues[r][a].isBlack=e[t++]),this.mDataAllocationValues[r][a].isBlack=(r+a)%3==0?!!this.mDataAllocationValues[r][a].isBlack:!this.mDataAllocationValues[r][a].isBlack,this.mDataAllocationValues[r][a].isFilled=!0),this.mModuleValue[r-1][a].isFilled||(t+1<e.length&&(this.mDataAllocationValues[r-1][a].isBlack=e[t++]),this.mDataAllocationValues[r-1][a].isBlack=(r-1+a)%3==0?!!this.mDataAllocationValues[r-1][a].isBlack:!this.mDataAllocationValues[r-1][a].isBlack,this.mDataAllocationValues[r-1][a].isFilled=!0));6===(r-=2)&&r--;for(var i=0;i<this.mNoOfModules;i++)this.mModuleValue[r][i].isFilled&&this.mModuleValue[r-1][i].isFilled||(this.mModuleValue[r][i].isFilled||(t+1<e.length&&(this.mDataAllocationValues[r][i].isBlack=e[t++]),this.mDataAllocationValues[r][i].isBlack=(r+i)%3!=0?!this.mDataAllocationValues[r][i].isBlack:!!this.mDataAllocationValues[r][i].isBlack,this.mDataAllocationValues[r][i].isFilled=!0),this.mModuleValue[r-1][i].isFilled||(t+1<e.length&&(this.mDataAllocationValues[r-1][i].isBlack=e[t++]),this.mDataAllocationValues[r-1][i].isBlack=(r-1+i)%3!=0?!this.mDataAllocationValues[r-1][i].isBlack:!!this.mDataAllocationValues[r-1][i].isBlack,this.mDataAllocationValues[r-1][i].isFilled=!0))}for(r=0;r<this.mNoOfModules;r++)for(var a=0;a<this.mNoOfModules;a++)if(!this.mModuleValue[r][a].isFilled){var o=this.mDataAllocationValues[r][a].isBlack;this.mDataAllocationValues[r][a].isBlack=!o}},t.prototype.allocateFormatAndVersionInformation=function(){for(r=0;r<9;r++)this.mModuleValue[8][r].isFilled=!0,this.mModuleValue[r][8].isFilled=!0;for(r=this.mNoOfModules-8;r<this.mNoOfModules;r++)this.mModuleValue[8][r].isFilled=!0,this.mModuleValue[r][8].isFilled=!0;if(this.mVersion>6)for(var e=this.mQrBarcodeValues.VersionInformation,t=0,r=0;r<6;r++)for(var i=2;i>=0;i--)this.mModuleValue[r][this.mNoOfModules-9-i].isBlack=1===e[t],this.mModuleValue[r][this.mNoOfModules-9-i].isFilled=!0,this.mModuleValue[this.mNoOfModules-9-i][r].isBlack=1===e[t++],this.mModuleValue[this.mNoOfModules-9-i][r].isFilled=!0},t.prototype.drawAlignmentPattern=function(e,t){var r,i;for(r=e-2,i=t-2;r<e+3;r++,i++)this.mModuleValue[r][t-2].isBlack=!0,this.mModuleValue[r][t-2].isFilled=!0,this.mModuleValue[r][t+2].isBlack=!0,this.mModuleValue[r][t+2].isFilled=!0,this.mModuleValue[e-2][i].isBlack=!0,this.mModuleValue[e-2][i].isFilled=!0,this.mModuleValue[e+2][i].isBlack=!0,this.mModuleValue[e+2][i].isFilled=!0;for(r=e-1,i=t-1;r<e+2;r++,i++)this.mModuleValue[r][t-1].isBlack=!1,this.mModuleValue[r][t-1].isFilled=!0,this.mModuleValue[r][t+1].isBlack=!1,this.mModuleValue[r][t+1].isFilled=!0,this.mModuleValue[e-1][i].isBlack=!1,this.mModuleValue[e-1][i].isFilled=!0,this.mModuleValue[e+1][i].isBlack=!1,this.mModuleValue[e+1][i].isFilled=!0;this.mModuleValue[e][t].isBlack=!0,this.mModuleValue[e][t].isFilled=!0},t.prototype.getAlignmentPatternCoOrdinates=function(){var e=null;switch(this.mVersion){case 2:e=[6,18];break;case 3:e=[6,22];break;case 4:e=[6,26];break;case 5:e=[6,30];break;case 6:e=[6,34];break;case 7:e=[6,22,38];break;case 8:e=[6,24,42];break;case 9:e=[6,26,46];break;case 10:e=[6,28,50];break;case 11:e=[6,30,54];break;case 12:e=[6,32,58];break;case 13:e=[6,34,62];break;case 14:e=[6,26,46,66];break;case 15:e=[6,26,48,70];break;case 16:e=[6,26,50,74];break;case 17:e=[6,30,54,78];break;case 18:e=[6,30,56,82];break;case 19:e=[6,30,58,86];break;case 20:e=[6,34,62,90];break;case 21:e=[6,28,50,72,94];break;case 22:e=[6,26,50,74,98];break;case 23:e=[6,30,54,78,102];break;case 24:e=[6,28,54,80,106];break;case 25:e=[6,32,58,84,110];break;case 26:e=[6,30,58,86,114];break;case 27:e=[6,34,62,90,118];break;case 28:e=[6,26,50,74,98,122];break;case 29:e=[6,30,54,78,102,126];break;case 30:e=[6,26,52,78,104,130];break;case 31:e=[6,30,56,82,108,134];break;case 32:e=[6,34,60,86,112,138];break;case 33:e=[6,30,58,86,114,142];break;case 34:e=[6,34,62,90,118,146];break;case 35:e=[6,30,54,78,102,126,150];break;case 36:e=[6,24,50,76,102,128,154];break;case 37:e=[6,28,54,80,106,132,158];break;case 38:e=[6,32,58,84,110,136,162];break;case 39:e=[6,26,54,82,110,138,166];break;case 40:e=[6,30,58,86,114,142,170]}return e},t.prototype.encodeData=function(){var e=[];switch(this.mInputMode){case"NumericMode":e.push(!1),e.push(!1),e.push(!1),e.push(!0);break;case"AlphaNumericMode":e.push(!1),e.push(!1),e.push(!0),e.push(!1);break;case"BinaryMode":if(this.mIsEci){e.push(!1),e.push(!0),e.push(!0),e.push(!0);for(var t=this.stringToBoolArray(this.mEciAssignmentNumber.toString(),8),r=0,i=Object.keys(t);r<i.length;r++){v=i[r];e.push(t[v])}}e.push(!1),e.push(!0),e.push(!1),e.push(!1)}var a=0;if(this.mVersion<10)switch(this.mInputMode){case"NumericMode":a=10;break;case"AlphaNumericMode":a=9;break;case"BinaryMode":a=8}else if(this.mVersion<27)switch(this.mInputMode){case"NumericMode":a=12;break;case"AlphaNumericMode":a=11;break;case"BinaryMode":a=16}else switch(this.mInputMode){case"NumericMode":a=14;break;case"AlphaNumericMode":a=13;break;case"BinaryMode":a=16}for(var o=this.intToBoolArray(this.text.length,a),s=0;s<a;s++)e.push(o[s]);if("NumericMode"===this.mInputMode)for(var n=this.text.split(""),c="",s=0;s<n.length;s++){t=void 0;if(c+=n[s],s%3==2&&0!==s||s===n.length-1){t=3===c.toString().length?this.stringToBoolArray(c,10):2===c.toString().length?this.stringToBoolArray(c,7):this.stringToBoolArray(c,4),c="";for(var h=0,l=Object.keys(t);h<l.length;h++){v=l[h];e.push(t[v])}}}else if("AlphaNumericMode"===this.mInputMode)for(var n=this.text.split(""),u="",c=0,s=0;s<n.length;s++){t=void 0;if(u+=n[s],s%2==0&&s+1!==n.length&&(c=45*this.mQrBarcodeValues.getAlphaNumericValues(n[s])),s%2==1&&0!==s){c+=this.mQrBarcodeValues.getAlphaNumericValues(n[s]),t=this.intToBoolArray(c,11),c=0;for(var d=0,p=Object.keys(t);d<p.length;d++){v=p[d];e.push(t[v])}u=""}if(1!==s&&""!==u&&s+1===n.length&&1===u.length){c=this.mQrBarcodeValues.getAlphaNumericValues(n[s]),t=this.intToBoolArray(c,6),c=0;for(var m=0,b=Object.keys(t);m<b.length;m++){v=b[m];e.push(t[v])}}}else if("BinaryMode"===this.mInputMode)for(var n=this.text.split(""),s=0;s<n.length;s++){c=0;this.text.charCodeAt(s)>=32&&this.text.charCodeAt(s)<=126||this.text.charCodeAt(s)>=161&&this.text.charCodeAt(s)<=255||10===this.text.charCodeAt(s)||13===this.text.charCodeAt(s)?c=n[s].charCodeAt(0):this.text.charCodeAt(s)>=65377&&this.text.charCodeAt(s)<=65439?c=n[s].charCodeAt(0)-65216:this.text.charCodeAt(s)>=1025&&this.text.charCodeAt(s)<=1119?c=n[s].charCodeAt(0)-864:this.text.charCodeAt(s)>=260&&this.text.charCodeAt(s)<=382||(this.validInput=!1);for(var t=this.intToBoolArray(c,8),f=0,y=Object.keys(t);f<y.length;f++){var v=y[f];e.push(t[v])}}if(0===this.mixDataCount){for(s=0;s<4&&e.length/8!==this.mQrBarcodeValues.NumberOfDataCodeWord;s++)e.push(!1);for(;e.length%8!=0;)e.push(!1);for(;e.length/8!==this.mQrBarcodeValues.NumberOfDataCodeWord&&(e.push(!0),e.push(!0),e.push(!0),e.push(!1),e.push(!0),e.push(!0),e.push(!1),e.push(!1),e.length/8!==this.mQrBarcodeValues.NumberOfDataCodeWord);)e.push(!1),e.push(!1),e.push(!1),e.push(!0),e.push(!1),e.push(!1),e.push(!1),e.push(!0);var g=this.mQrBarcodeValues.NumberOfDataCodeWord,k=this.mQrBarcodeValues.NumberOfErrorCorrectionBlocks,C=k[0];6===k.length&&(C=k[0]+k[3]);var w=[],x=e;if(6===k.length){var V=k[0]*k[2]*8;x=[];for(s=0;s<V;s++)x.push(e[s])}var S=[];S=this.createBlocks(x,k[0]);for(s=0;s<k[0];s++)w[s]=this.splitCodeWord(S,s,x.length/8/k[0]);if(6===k.length){x=[];for(s=k[0]*k[2]*8;s<e.length;s++)x.push(e[s]);var E=[];E=this.createBlocks(x,k[3]);for(var s=k[0],A=0;s<C;s++)w[s]=this.splitCodeWord(E,A++,x.length/8/k[3])}e=null,e=[];for(s=0;s<125;s++)for(P=0;P<C;P++)for(L=0;L<8;L++)s<w[P].length&&e.push("1"===w[P][s][L]);var M=new le(this.mVersion,this.mErrorCorrectionLevel);g=this.mQrBarcodeValues.NumberOfDataCodeWord;var D=this.mQrBarcodeValues.NumberOfErrorCorrectingCodeWords;6===(k=this.mQrBarcodeValues.NumberOfErrorCorrectionBlocks).length?M.DataBits=(g-k[3]*k[5])/k[0]:M.DataBits=g/k[0],M.Eccw=D/C;for(var B=[],O=0,s=0;s<k[0];s++)M.DC=w[O],B[O++]=M.getErcw();if(6===k.length){M.DataBits=(g-k[0]*k[2])/k[3];for(s=0;s<k[3];s++)M.DC=w[O],B[O++]=M.getErcw()}if(6!==k.length)for(s=0;s<B[0].length;s++)for(P=0;P<k[0];P++)for(L=0;L<8;L++)s<B[P].length&&e.push("1"===B[P][s][L]);else for(s=0;s<B[0].length;s++)for(var P=0;P<C;P++)for(var L=0;L<8;L++)s<B[P].length&&e.push("1"===B[P][s][L])}return e},t.prototype.stringToBoolArray=function(e,t){for(var r=[],i=e.split(""),a=0,o=0;o<i.length;o++)a=10*a+i[o].charCodeAt(0)-48;for(o=0;o<t;o++)r[t-o-1]=1==(a>>o&1);return r},t.prototype.intToBoolArray=function(e,t){for(var r=[],i=0;i<t;i++)r[t-i-1]=1==(e>>i&1);return r},t.prototype.splitCodeWord=function(e,t,r){for(var i=[],a=0;a<r;a++)i.push(e[t][a]);return i},t.prototype.createBlocks=function(e,t){for(var r=[],i=e.length/8/t,a="",o=0,s=0,n=0;n<t;n++){r.push([0]);for(c=0;c<i;c++)r[n][c]=""}for(var c=0;c<e.length;c++)c%8==0&&0!==c&&(r[s][o]=a,a="",++o===e.length/t/8&&(s++,o=0)),a+=e[c]?"1":"0";return r[s][o]=a,r},t}(),de=function(){function e(){this.isBlack=!1,this.isFilled=!1,this.isPdp=!1}return e}(),pe=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),me=function(e,t,r,i){var a,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(o<3?a(s):o>3?a(t,r,s):a(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},be=function(r){function i(e,t){var i=r.call(this,e,t)||this;return i.widthChange=!1,i.heightChange=!1,i}return pe(i,r),i.prototype.render=function(){this.notify("initial-load",{}),this.trigger("load"),this.notify("initial-end",{}),this.renderElements(),this.renderComplete()},i.prototype.triggerEvent=function(t,r){var i={message:r};this.trigger(e.BarcodeEvent[t],i)},i.prototype.renderElements=function(){var t=new ue;t.text=this.value,t.XDimension=this.xDimension,t.mIsUserMentionedErrorCorrectionLevel=void 0!==this.errorCorrectionLevel,t.mErrorCorrectionLevel=void 0!==this.errorCorrectionLevel?this.errorCorrectionLevel:e.ErrorCorrectionLevel.Medium,t.version=void 0!==this.version?this.version:void 0,t.mIsUserMentionedVersion=void 0!==this.version;var r="SVG"===this.mode,i=t.draw(this.value,this.barcodeCanvas,this.element.offsetHeight,this.element.offsetWidth,this.margin,this.displayText,r,this.foreColor);if("Canvas"===this.mode&&(this.barcodeCanvas.getContext("2d").setTransform(1,0,0,1,0,0),this.barcodeCanvas.getContext("2d").scale(1.5,1.5)),!i){this.triggerEvent(e.BarcodeEvent.invalid,"Invalid Input")}"Canvas"===this.mode&&(this.barcodeCanvas.style.transform="scale("+2/3+")",this.barcodeCanvas.style.transformOrigin="0 0")},i.prototype.setCulture=function(){this.localeObj=new t.L10n(this.getModuleName(),this.defaultLocale,this.locale)},i.prototype.getElementSize=function(e,t){return e.toString().indexOf("px")>0||e.toString().indexOf("%")>0?e.toString():e.toString()+"px"},i.prototype.initialize=function(){this.element.style.height=this.getElementSize(this.height),this.element.style.width=this.getElementSize(this.width),this.barcodeCanvas=this.barcodeRenderer.renderRootElement({id:this.element.id+"content",height:"SVG"===this.mode?this.element.offsetHeight:1.5*this.element.offsetHeight,width:"SVG"===this.mode?this.element.offsetWidth:1.5*this.element.offsetWidth},this.backgroundColor,this.element.offsetWidth,this.element.offsetHeight),this.element.appendChild(this.barcodeCanvas)},i.prototype.preRender=function(){this.element.classList.add("e-qrcode"),this.barcodeRenderer=new b(this.element.id,"SVG"===this.mode),this.initialize(),this.initializePrivateVariables(),this.setCulture()},i.prototype.getPersistData=function(){var e=["loaded"];return this.addOnPersist(e)},i.prototype.getModuleName=function(){return"QRCodeGenerator"},i.prototype.destroy=function(){this.notify("destroy",{}),r.prototype.destroy.call(this)},i.prototype.initializePrivateVariables=function(){this.defaultLocale={}},i.prototype.onPropertyChanged=function(e,t){var r,i;"Canvas"===this.mode&&"Canvas"!==e.mode?u(this,this.barcodeCanvas):this.barcodeRenderer=c(e,this.barcodeCanvas,this.mode,this.element.id),e.width&&("Canvas"===this.mode&&"Canvas"!==e.mode&&(this.widthChange=!0),r="Canvas"===this.mode&&"Canvas"!==e.mode?1.5*e.width:e.width,this.barcodeCanvas.setAttribute("width",String(r))),e.height&&("Canvas"===this.mode&&"Canvas"!==e.mode&&(this.heightChange=!0),i="Canvas"===this.mode&&"Canvas"!==e.mode?1.5*e.height:e.height,this.barcodeCanvas.setAttribute("height",String(i)));for(var a=0,o=Object.keys(e);a<o.length;a++)switch(o[a]){case"width":this.element.style.width=this.getElementSize(r),this.barcodeCanvas.setAttribute("width",String(this.element.offsetWidth));break;case"height":this.element.style.height=this.getElementSize(i),this.barcodeCanvas.setAttribute("height",String(this.element.offsetHeight));break;case"backgroundColor":this.barcodeCanvas.setAttribute("style","background:"+e.backgroundColor);break;case"mode":this.initialize()}this.renderElements()},me([t.Property("100%")],i.prototype,"height",void 0),me([t.Property("100%")],i.prototype,"width",void 0),me([t.Property("SVG")],i.prototype,"mode",void 0),me([t.Property(1)],i.prototype,"xDimension",void 0),me([t.Property()],i.prototype,"errorCorrectionLevel",void 0),me([t.Complex({},M)],i.prototype,"margin",void 0),me([t.Property("white")],i.prototype,"backgroundColor",void 0),me([t.Event()],i.prototype,"invalid",void 0),me([t.Property("black")],i.prototype,"foreColor",void 0),me([t.Complex({},O)],i.prototype,"displayText",void 0),me([t.Property()],i.prototype,"version",void 0),me([t.Property(void 0)],i.prototype,"value",void 0),i}(t.Component),fe=function(){function t(){this.mXDimension=1,this.mDataMatrixArray=[]}return Object.defineProperty(t.prototype,"XDimension",{set:function(e){this.mXDimension=e},enumerable:!0,configurable:!0}),t.prototype.GetData=function(){for(var e=this.value,t=[],r=0;r<e.length;r++)t.push(e.charCodeAt(r));return t},t.prototype.fillZero=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},t.prototype.DataMatrixNumericEncoder=function(e){var t=e,r=!0;t.length%2==1&&(r=!1,t=Array(e.length+1),t=this.fillZero(t),t=this.copy(e,0,t,0,e.length));var i=Array(t.length/2);i=this.fillZero(i);for(var a=0;a<i.length;a++)r||a!==i.length-1?i[a]=10*(t[2*a]-48)+(t[2*a+1]-48)+130:i[a]=t[2*a]+1;return i},t.prototype.ComputeBase256Codeword=function(e,t){var r=e+(149*(t+1)%255+1);return r<=255?r:r-256},t.prototype.DataMatrixBaseEncoder=function(e){var t=1;e.length>249&&t++;var r=Array(1+t+e.length);(r=this.fillZero(r))[0]=231,e.length<=249?r[1]=e.length:(r[1]=e.length/250+249,r[2]=e.length%250),r=this.copy(e,0,r,1+t,e.length);for(var i=1;i<r.length;i++)r[i]=this.ComputeBase256Codeword(r[i],i);return r},t.prototype.copy=function(e,t,r,i,a){for(var o=0;o<a;o++)r[i+o]=e[t+o];return r},t.prototype.DataMatrixEncoder=function(e){for(var t=e,r=0,i=0;i<e.length;i++)if(e[i]>=48&&e[i]<=57){var a=0;0!==i&&(a=r-1);var o=t[a]-1,s=0;0!==i&&1!==r&&(s=t[a-1]),235!==s&&o>=48&&o<=57?t[a]=10*(o-0)+(e[i]-0)+130:t[r++]=e[i]+1}else e[i]<127?t[r++]=e[i]+1:(t[r]=235,t[r++]=e[i]-127);var n=Array(r);return n=this.fillZero(n),n=t},t.prototype.PrepareDataCodeword=function(e){if("Auto"===this.encodingValue||"ASCIINumeric"===this.encodingValue){for(var t=!0,r=e,i="ASCII",a=0;a<r.length;a++)(r[a]<48||r[a]>57)&&(t=!1);if(t&&(i="ASCIINumeric"),"ASCIINumeric"===this.encodingValue&&this.encodingValue!==i)return"Data contains invalid characters and cannot be encoded as ASCIINumeric.";this.encodingValue=i}var o=[];switch(this.encodingValue){case"ASCII":o=this.DataMatrixEncoder(e);break;case"ASCIINumeric":o=this.DataMatrixNumericEncoder(e);break;case"Base256":o=this.DataMatrixBaseEncoder(e)}return o},t.prototype.PdfDataMatrixSymbolAttribute=function(e,t,r,i,a,o,s,n){return{SymbolRow:e,SymbolColumn:t,HorizontalDataRegion:r,VerticalDataRegion:i,DataCodewords:a,CorrectionCodewords:o,InterleavedBlock:s,InterleavedDataBlock:n}},t.prototype.getmSymbolAttributes=function(){var e=[];return e.push(this.PdfDataMatrixSymbolAttribute(10,10,1,1,3,5,1,3)),e.push(this.PdfDataMatrixSymbolAttribute(12,12,1,1,5,7,1,5)),e.push(this.PdfDataMatrixSymbolAttribute(14,14,1,1,8,10,1,8)),e.push(this.PdfDataMatrixSymbolAttribute(16,16,1,1,12,12,1,12)),e.push(this.PdfDataMatrixSymbolAttribute(18,18,1,1,18,14,1,18)),e.push(this.PdfDataMatrixSymbolAttribute(20,20,1,1,22,18,1,22)),e.push(this.PdfDataMatrixSymbolAttribute(22,22,1,1,30,20,1,30)),e.push(this.PdfDataMatrixSymbolAttribute(24,24,1,1,36,24,1,36)),e.push(this.PdfDataMatrixSymbolAttribute(26,26,1,1,44,28,1,44)),e.push(this.PdfDataMatrixSymbolAttribute(32,32,2,2,62,36,1,62)),e.push(this.PdfDataMatrixSymbolAttribute(36,36,2,2,86,42,1,86)),e.push(this.PdfDataMatrixSymbolAttribute(40,40,2,2,114,48,1,114)),e.push(this.PdfDataMatrixSymbolAttribute(44,44,2,2,144,56,1,144)),e.push(this.PdfDataMatrixSymbolAttribute(48,48,2,2,174,68,1,174)),e.push(this.PdfDataMatrixSymbolAttribute(52,52,2,2,204,84,2,102)),e.push(this.PdfDataMatrixSymbolAttribute(64,64,4,4,280,112,2,140)),e.push(this.PdfDataMatrixSymbolAttribute(72,72,4,4,368,144,4,92)),e.push(this.PdfDataMatrixSymbolAttribute(80,80,4,4,456,192,4,114)),e.push(this.PdfDataMatrixSymbolAttribute(88,88,4,4,576,224,4,144)),e.push(this.PdfDataMatrixSymbolAttribute(96,96,4,4,696,272,4,174)),e.push(this.PdfDataMatrixSymbolAttribute(104,104,4,4,816,336,6,136)),e.push(this.PdfDataMatrixSymbolAttribute(120,120,6,6,1050,408,6,175)),e.push(this.PdfDataMatrixSymbolAttribute(132,132,6,6,1304,496,8,163)),e.push(this.PdfDataMatrixSymbolAttribute(144,144,6,6,1558,620,10,156)),e.push(this.PdfDataMatrixSymbolAttribute(8,18,1,1,5,7,1,5)),e.push(this.PdfDataMatrixSymbolAttribute(8,32,2,1,10,11,1,10)),e.push(this.PdfDataMatrixSymbolAttribute(12,26,1,1,16,14,1,16)),e.push(this.PdfDataMatrixSymbolAttribute(12,36,2,1,22,18,1,22)),e.push(this.PdfDataMatrixSymbolAttribute(16,36,2,1,32,24,1,32)),e.push(this.PdfDataMatrixSymbolAttribute(16,48,2,1,49,28,1,49)),e},t.prototype.PadCodewords=function(e,t,r){for(var i=t.length,a=[],o=0;o<i;o++)a.push(t[o]);for(i<e&&a.push(129),i=a.length;i<e;){var s=129+149*(i+1)%253+1;s>254&&(s-=254),a.push(s),i=a.length}return Array(a.length),a},t.prototype.EccProduct=function(e,t){if(0===e||0===t)return 0;var r=Array(256);r=this.CreateLogArrays(!0);Array(256);return this.CreateLogArrays(!1)[(r[e]+r[t])%255]},t.prototype.validateInput=function(e,t){return e},t.prototype.ComputeErrorCorrection=function(){var t=this.encodedCodeword.length;this.mSymbolAttribute=this.PdfDataMatrixSymbolAttribute(0,0,0,0,0,0,0,0);var r=this.getmSymbolAttributes();if(this.size)this.mSymbolAttribute=r[this.size-1];else{r=this.getmSymbolAttributes();for(g=0;g<r.length;g++){var i=r[g];if(i.DataCodewords>=t){this.mSymbolAttribute=i;break}}}var a;if(this.mSymbolAttribute.DataCodewords>t)a=this.PadCodewords(this.mSymbolAttribute.DataCodewords,this.encodedCodeword,a),this.encodedCodeword=Array(a.length),this.encodedCodeword=a,t=this.encodedCodeword.length;else{if(0===this.mSymbolAttribute.DataCodewords)return this.validateInput("Data cannot be encoded as barcode",void 0);if(this.mSymbolAttribute.DataCodewords<t){this.mSymbolAttribute.SymbolRow.toString(),this.mSymbolAttribute.SymbolColumn.toString();return"Data too long for {0}x{1} barcode."}}var o=this.mSymbolAttribute.CorrectionCodewords,s=[];s=this.create1DMatrixArray(o+this.mSymbolAttribute.DataCodewords,s);var n=this.mSymbolAttribute.InterleavedBlock,c=this.mSymbolAttribute.DataCodewords,h=this.mSymbolAttribute.CorrectionCodewords/n,l=c+h*n,u=this.CreateRSPolynomial(n,this.mSymbolAttribute),d=[];d=this.create1DMatrixArray(68,d);for(var p=0;p<n;p++){for(var m=0;m<d.length;m++)d[m]=0;for(g=p;g<c;g+=n){for(var b=this.EccSum(d[h-1],this.encodedCodeword[g]),f=h-1;f>0;f--)d[f]=this.EccSum(d[f-1],this.EccProduct(u[f],b));d[0]=this.EccProduct(u[0],b)}var y=0;if(p>=8&&this.size&e.DataMatrixSize.Size144x144)y=this.mSymbolAttribute.DataCodewords/n;else{for(var v=h,g=p+n*(y=this.mSymbolAttribute.InterleavedDataBlock);g<l;g+=n)s[g]=d[--v];if(0!==v)return"Error in error correction code generation!"}}if(s.length>o){var k=s;s=[],s=this.create1DMatrixArray(o,s);for(var C=0,g=k.length-1;g>this.mSymbolAttribute.DataCodewords;g--)s[C++]=k[g]}return s.reverse()},t.prototype.CreateLogArrays=function(e){var t=Array(256),r=Array(256);t[0]=-255,r[0]=1;for(var i=1;i<=255;i++)r[i]=2*r[i-1],r[i]>=256&&(r[i]=301^r[i]),t[r[i]]=i;return e?t:r},t.prototype.EccSum=function(e,t){return e^t},t.prototype.EccDoublify=function(e,t){if(0===e)return 0;if(0===t)return e;var r=Array(256);r=this.CreateLogArrays(!0);Array(256);return this.CreateLogArrays(!1)[(r[e]+t)%255]},t.prototype.CreateRSPolynomial=function(e,t){for(var r=Array(69),i=t.CorrectionCodewords/e,a=0;a<r.length;a++)r[a]=1;for(a=1;a<=i;a++)for(var o=a-1;o>=0;o--)r[o]=this.EccDoublify(r[o],a),o>0&&(r[o]=this.EccSum(r[o],r[o-1]));return r},t.prototype.PrepareCodeword=function(e){if(this.encodedCodeword=this.PrepareDataCodeword(e),isNaN(this.encodedCodeword[0]))return this.encodedCodeword;var t=this.ComputeErrorCorrection();if(isNaN(t[0]))return t;this.encodedCodeword=this.encodedCodeword;var r=Array(this.encodedCodeword.length+t.length);return this.copyArray(r,0,this.encodedCodeword),this.copyArray(r,this.encodedCodeword.length,t),r},t.prototype.copyArray=function(e,t,r){for(var i=0;i<r.length;i++)e[t+i]=r[i]},t.prototype.ecc200placementbit=function(e,t,r,i,a,o,s){i<0&&(i+=t,a+=4-(t+4)%8),a<0&&(a+=r,i+=4-(r+4)%8),e[i*r+a]=(o<<3)+s},t.prototype.ecc200placementblock=function(e,t,r,i,a,o){this.ecc200placementbit(e,t,r,i-2,a-2,o,7),this.ecc200placementbit(e,t,r,i-2,a-1,o,6),this.ecc200placementbit(e,t,r,i-1,a-2,o,5),this.ecc200placementbit(e,t,r,i-1,a-1,o,4),this.ecc200placementbit(e,t,r,i-1,a-0,o,3),this.ecc200placementbit(e,t,r,i-0,a-2,o,2),this.ecc200placementbit(e,t,r,i-0,a-1,o,1),this.ecc200placementbit(e,t,r,i-0,a-0,o,0)},t.prototype.ecc200placementcornerD=function(e,t,r,i){this.ecc200placementbit(e,t,r,t-1,0,i,7),this.ecc200placementbit(e,t,r,t-1,r-1,i,6),this.ecc200placementbit(e,t,r,0,r-3,i,5),this.ecc200placementbit(e,t,r,0,r-2,i,4),this.ecc200placementbit(e,t,r,0,r-1,i,3),this.ecc200placementbit(e,t,r,1,r-3,i,2),this.ecc200placementbit(e,t,r,1,r-2,i,1),this.ecc200placementbit(e,t,r,1,r-1,i,0)},t.prototype.ecc200placementcornerA=function(e,t,r,i){this.ecc200placementbit(e,t,r,t-1,0,i,7),this.ecc200placementbit(e,t,r,t-1,1,i,6),this.ecc200placementbit(e,t,r,t-1,2,i,5);this.ecc200placementbit(e,t,r,0,r-2,i,4),this.ecc200placementbit(e,t,r,0,r-1,i,3);this.ecc200placementbit(e,t,r,1,r-1,i,2),this.ecc200placementbit(e,t,r,2,r-1,i,1),this.ecc200placementbit(e,t,r,3,r-1,i,0)},t.prototype.ecc200placementcornerB=function(e,t,r,i){this.ecc200placementbit(e,t,r,t-3,0,i,7),this.ecc200placementbit(e,t,r,t-2,0,i,6),this.ecc200placementbit(e,t,r,t-1,0,i,5),this.ecc200placementbit(e,t,r,0,r-4,i,4),this.ecc200placementbit(e,t,r,0,r-3,i,3),this.ecc200placementbit(e,t,r,0,r-2,i,2),this.ecc200placementbit(e,t,r,0,r-1,i,1),this.ecc200placementbit(e,t,r,1,r-1,i,0)},t.prototype.ecc200placementcornerC=function(e,t,r,i){this.ecc200placementbit(e,t,r,t-3,0,i,7),this.ecc200placementbit(e,t,r,t-2,0,i,6),this.ecc200placementbit(e,t,r,t-1,0,i,5),this.ecc200placementbit(e,t,r,0,r-2,i,4),this.ecc200placementbit(e,t,r,0,r-1,i,3),this.ecc200placementbit(e,t,r,1,r-1,i,2),this.ecc200placementbit(e,t,r,2,r-1,i,1),this.ecc200placementbit(e,t,r,3,r-1,i,0)},t.prototype.ecc200placement=function(e,t,r){for(var i,a,o,s=0;s<t;s++)for(var n=0;n<r;n++)e[s*r+n]=0;o=1,i=4,a=0;do{i===t&&0===a&&this.ecc200placementcornerA(e,t,r,o++),i===t-2&&0===a&&r%4!=0&&this.ecc200placementcornerB(e,t,r,o++),i===t-2&&0===a&&r%8==4&&this.ecc200placementcornerC(e,t,r,o++),i===t+4&&2===a&&r%8==0&&this.ecc200placementcornerD(e,t,r,o++);do{i<t&&a>=0&&0===e[i*r+a]&&this.ecc200placementblock(e,t,r,i,a,o++),i-=2,a+=2}while(i>=0&&a<r);i++,a+=3;do{i>=0&&a<r&&0===e[i*r+a]&&this.ecc200placementblock(e,t,r,i,a,o++),i+=2,a-=2}while(i<t&&a>=0);i+=3,a++}while(i<t||a<r);0===e[t*r-1]&&(e[t*r-1]=e[t*r-r-2]=1)},t.prototype.getActualRows=function(){return this.mSymbolAttribute.SymbolRow+e.QuietZone.All},t.prototype.getActualColumns=function(){return this.mSymbolAttribute.SymbolColumn+e.QuietZone.All},t.prototype.AddQuiteZone=function(t){this.actualRows=this.getActualRows(),this.actualColumns=this.getActualColumns();var r=this.actualRows,i=this.actualColumns,a=e.QuietZone.All-1;this.mDataMatrixArray=this.create2DMartixArray(r,i,this.mDataMatrixArray);for(s=0;s<i;s++)this.mDataMatrixArray[0][s]=0;for(s=a;s<r-a;s++){this.mDataMatrixArray[s][0]=0;for(var o=a;o<i-a;o++)this.mDataMatrixArray[s][o]=t[s-a][o-a];this.mDataMatrixArray[s][i-a]=0}for(var s=0;s<i;s++)this.mDataMatrixArray[r-a][s]=0},t.prototype.drawImage=function(e,t){for(var r=this.getInstance(e.id),i=0;i<t.length;i++)r.renderRectElement(e,t[i])},t.prototype.CreateMatrix=function(e){var t,r,i,a,o,s=this.mSymbolAttribute.SymbolColumn,n=this.mSymbolAttribute.SymbolRow,c=s/this.mSymbolAttribute.HorizontalDataRegion,h=n/this.mSymbolAttribute.VerticalDataRegion;i=s-s/c*2,a=n-n/h*2,o=Array(i*a),this.ecc200placement(o,a,i);var l=[];l=this.create1DMatrixArray(s*n,l);for(var u=0;u<n;u+=h){for(var d=0;d<s;d++)l[u*s+d]=1;for(var p=0;p<s;p+=2)l[(u+h-1)*s+p]=1}for(t=0;t<s;t+=c){for(r=0;r<n;r++)l[r*s+t]=1;for(r=0;r<n;r+=2)l[r*s+t+c-1]=1}for(var m=0;m<a;m++)for(var b=0;b<i;b++){var f=o[(a-m-1)*i+b];(1===f||f>7&&0!=(e[(f>>3)-1]&1<<(7&f)))&&(l[(1+Math.floor(m)+2*Math.floor(Math.floor(m)/Math.floor(h-2)))*Math.floor(s)+1+Math.floor(b)+2*Math.floor(Math.floor(b)/Math.floor(c-2))]=1)}var y=this.mSymbolAttribute.SymbolColumn,v=this.mSymbolAttribute.SymbolRow,g=[];g=this.create2DMartixArray(y,v,g);for(var k=0;k<y;k++)for(var C=0;C<v;C++)g[k][C]=l[y*C+k];var w=[];w=this.create2DMartixArray(y,v,w);for(var x=0;x<v;x++)for(var V=0;V<y;V++)w[v-1-x][V]=g[V][x];this.AddQuiteZone(w)},t.prototype.create1DMatrixArray=function(e,t){for(var r=0;r<e;r++)t[r]=0;return t},t.prototype.create2DMartixArray=function(e,t,r){for(var i=0;i<e;i++){r.push([i]);for(var a=0;a<t;a++)r[i][a]=0}return r},t.prototype.BuildDataMatrix=function(){var e=[];return e=this.PrepareCodeword(this.GetData()),isNaN(e[0])?e:(this.CreateMatrix(e),this.mDataMatrixArray[0])},t.prototype.drawText=function(e,t){this.getInstance(e.id).renderTextElement(e,t)},t.prototype.getInstance=function(e){var t=document.getElementById(e);return new b(t.id,this.isSvgMode)},t.prototype.drawDisplayText=function(e,t,r,i,o,s,c){var l=this.displayText;n();var u=h(i,o,t,r,"black");u.string=l.text?l.text:this.value,u.fontStyle=l.font,u.color=c,u.stringSize=l.size,u.visibility=l.visibility;var d=a(u);this.isSvgMode||(d={width:d.width*s,height:d.height*s});var p=d.height/2+(this.isSvgMode?2:3);return u.height=p,i>d.width&&("Center"===this.displayText.alignment?u.x+=(t+i-t)/2-.5*d.width:"Left"===this.displayText.alignment?u.x=t+this.displayText.margin.left:u.x=this.width-this.margin.left-d.width-this.displayText.margin.right),u.x<t&&(u.x=t),"Bottom"===this.displayText.position?(this.displayText.margin.top>0&&(u.y=r+o),this.displayText.margin.bottom>0?u.y=r+o-l.margin.bottom:this.margin.top<10?u.y=o+d.height/2:u.y=o+this.margin.top):this.displayText.margin.top>0?u.y=r+this.displayText.margin.top+d.height/2:u.y=r+d.height/2,this.displayText.visibility&&(this.isSvgMode||(u.stringSize=1.5*u.stringSize),this.drawText(e,u)),u},t.prototype.getDrawableSize=function(e,t,r){return t>=r?r:t},t.prototype.draw=function(e){var t,r,i=this.isSvgMode,a=this.size<25,o=this.mDataMatrixArray.length,s=this.width,n=this.height,c=this.margin.left,l=this.margin.right,u=this.margin.top,d=this.margin.bottom,p=s-((i?c:1.5*c)+(i?l:1.5*l)),m=n-((i?u:1.5*u)+(i?d:1.5*d)),b=this.getDrawableSize(this.margin,p,m),f=(p-(b=p>=m?m:p))/2,y=(m-b)/2;y+=i?this.margin.top:1.5*this.margin.top,f+=i?this.margin.left:1.5*this.margin.left;var v=this.drawDisplayText(e,f,y,b,m,1.5,this.foreColor);m-=v.height,this.displayText.margin.bottom>0&&("Top"===this.displayText.position?(y+=this.displayText.margin.bottom,m-=this.displayText.margin.bottom):m-=this.displayText.margin.bottom),this.displayText.margin.top>0&&("Top"===this.displayText.position?(y+=this.displayText.margin.top,m-=this.displayText.margin.top):m-=this.displayText.margin.top),b=p>=m?m:p,a||(t=b/this.mDataMatrixArray[0].length,r=b/this.mDataMatrixArray.length),o=b/this.mDataMatrixArray.length;for(var g,k=this.actualRows,C=this.actualColumns,w=[],x=0;x<k;x++){for(var V=0;V<C;V++){var S=void 0;"white"!==(S=1===this.mDataMatrixArray[x][V]?this.foreColor:"white")&&(g=h(a?o:t,a?o:r,f,"Bottom"===this.displayText.position?y:y+v.height/2,S),w.push(g)),f+=a?o:t}y+=a?o:r,f=(p-b)/2+(i?this.margin.left:1.5*this.margin.left)}this.drawImage(e,w),this.mDataMatrixArray=void 0},t}(),ye=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ve=function(e,t,r,i){var a,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(o<3?a(s):o>3?a(t,r,s):a(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},ge=function(r){function i(e,t){return r.call(this,e,t)||this}return ye(i,r),i.prototype.destroy=function(){this.notify("destroy",{}),r.prototype.destroy.call(this)},i.prototype.initializePrivateVariables=function(){this.defaultLocale={}},i.prototype.getPersistData=function(){var e=["loaded"];return this.addOnPersist(e)},i.prototype.getModuleName=function(){return"DataMatrixGenerator"},i.prototype.setCulture=function(){this.localeObj=new t.L10n(this.getModuleName(),this.defaultLocale,this.locale)},i.prototype.getElementSize=function(e,t){return e.toString().indexOf("px")>0||e.toString().indexOf("%")>0?e.toString():e.toString()+"px"},i.prototype.initialize=function(){this.element.style.width=this.getElementSize(this.width),this.element.style.height=this.getElementSize(this.height);var e=this.mode;this.barcodeCanvas=this.barcodeRenderer.renderRootElement({id:this.element.id+"content",height:"SVG"===e?this.element.offsetHeight:1.5*this.element.offsetHeight,width:"SVG"===e?this.element.offsetWidth:1.5*this.element.offsetWidth},this.backgroundColor,this.element.offsetWidth,this.element.offsetHeight),this.element.appendChild(this.barcodeCanvas)},i.prototype.triggerEvent=function(t,r){var i={message:r};this.trigger(e.BarcodeEvent[t],i)},i.prototype.preRender=function(){this.element.classList.add("e-datamatrix"),this.barcodeRenderer=new b(this.element.id,"SVG"===this.mode),this.initialize(),this.initializePrivateVariables(),this.setCulture()},i.prototype.onPropertyChanged=function(e,t){var r,i;"Canvas"===this.mode&&"Canvas"!==e.mode?u(this,this.barcodeCanvas):this.barcodeRenderer=c(e,this.barcodeCanvas,this.mode,this.element.id),e.width&&(r="Canvas"===this.mode&&"Canvas"!==e.mode?1.5*e.width:e.width,this.barcodeCanvas.setAttribute("width",String(r))),e.height&&(i="Canvas"===this.mode&&"Canvas"!==e.mode?1.5*e.height:e.height,this.barcodeCanvas.setAttribute("height",String(i)));for(var a=0,o=Object.keys(e);a<o.length;a++)switch(o[a]){case"mode":this.initialize();break;case"height":this.element.style.height=this.getElementSize(i),this.barcodeCanvas.setAttribute("height",String(this.element.offsetHeight));break;case"width":this.element.style.width=this.getElementSize(r),this.barcodeCanvas.setAttribute("width",String(this.element.offsetWidth));break;case"backgroundColor":this.barcodeCanvas.setAttribute("style","background:"+e.backgroundColor)}this.renderElements()},i.prototype.checkdata=function(e){for(var t=!1,r=0;r<e.length;r++)(e.charCodeAt(r)>=32&&e.charCodeAt(r)<=126||10===e.charCodeAt(r)||13===e.charCodeAt(r))&&(t=!0);return t},i.prototype.renderElements=function(){var t=new fe;t.encodingValue=this.encoding,t.size=this.size,t.value=this.value,t.width=this.barcodeCanvas.getAttribute("width"),t.height=this.barcodeCanvas.getAttribute("height"),t.XDimension=this.xDimension,t.isSvgMode="SVG"===this.mode,t.margin=this.margin,t.displayText=this.displayText,t.foreColor=this.foreColor;var r=this.checkdata(this.value),i=t.BuildDataMatrix();isNaN(i[0])?this.triggerEvent(e.BarcodeEvent.invalid,i):r?t.draw(this.barcodeCanvas):this.triggerEvent(e.BarcodeEvent.invalid,"Invalid input"),"Canvas"===this.mode&&(this.barcodeCanvas.style.transform="scale("+2/3+")",this.barcodeCanvas.style.transformOrigin="0 0")},i.prototype.render=function(){this.notify("initial-load",{}),this.trigger("load"),this.notify("initial-end",{}),this.renderElements(),this.renderComplete()},ve([t.Property("Auto")],i.prototype,"encoding",void 0),ve([t.Property(e.DataMatrixSize.Auto)],i.prototype,"size",void 0),ve([t.Property("SVG")],i.prototype,"mode",void 0),ve([t.Property(void 0)],i.prototype,"value",void 0),ve([t.Property("100%")],i.prototype,"height",void 0),ve([t.Property("100%")],i.prototype,"width",void 0),ve([t.Complex({},O)],i.prototype,"displayText",void 0),ve([t.Complex({},M)],i.prototype,"margin",void 0),ve([t.Property("white")],i.prototype,"backgroundColor",void 0),ve([t.Event()],i.prototype,"invalid",void 0),ve([t.Property("black")],i.prototype,"foreColor",void 0),ve([t.Property(1)],i.prototype,"xDimension",void 0),i}(t.Component);return e.BarcodeGenerator=ae,e.BarcodeBase=f,e.OneDimension=g,e.createHtmlElement=r,e.getChildNode=i,e.measureText=a,e.setAttribute=o,e.createSvgElement=s,e.createMeasureElements=n,e.Point=ne,e.Rect=y,e.Size=d,e.DisplayText=O,e.Margin=M,e.BarcodeCanvasRenderer=p,e.BarcodeRenderer=b,e.BarcodeSVGRenderer=ce,e.CodaBar=_,e.Code128=C,e.Code128A=T,e.Code128B=x,e.Code128C=S,e.Code39=L,e.Ean8=R,e.Ean13=j,e.UpcA=W,e.UpcE=X,e.QRCode=ue,e.ModuleValue=de,e.QRCodeGenerator=be,e.PdfQRBarcodeValues=he,e.ErrorCorrectionCodewords=le,e.DataMatrixGenerator=ge,e.DataMatrix=fe,e}({},ej.base),this.ejs=ej;
  //# sourceMappingURL=ej2-barcode-generator.min.js.map
  