rax-barcode
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -1,1 +0,1 @@ | ||
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define)define("rax-barcode",function(e,n,o){o.exports=t()});else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this,e.RaxBarcode=t()}}(function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=20)}([function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n){o(this,t),this.data=e,this.text=n.text||e,this.options=n};e.default=r,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function(){function t(){o(this,t),this.startBin="101",this.endBin="101",this.middleBin="01010",this.Lbinary=["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],this.Gbinary=["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],this.Rbinary=["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"]}return r(t,[{key:"encode",value:function(t,e,n){var o="";n=n||"";for(var r=0;r<t.length;r++)"L"==e[r]?o+=this.Lbinary[t[r]]:"G"==e[r]?o+=this.Gbinary[t[r]]:"R"==e[r]&&(o+=this.Rbinary[t[r]]),r<t.length-1&&(o+=n);return o}}]),t}();e.default=i,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=n(0),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=function(t){function e(t,n){o(this,e);var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));i.bytes=[];for(var a=0;a<t.length;++a)i.bytes.push(t.charCodeAt(a));return i.encodings=[740,644,638,176,164,100,224,220,124,608,604,572,436,244,230,484,260,254,650,628,614,764,652,902,868,836,830,892,844,842,752,734,590,304,112,94,416,128,122,672,576,570,464,422,134,496,478,142,910,678,582,768,762,774,880,862,814,896,890,818,914,602,930,328,292,200,158,68,62,424,412,232,218,76,74,554,616,978,556,146,340,212,182,508,268,266,956,940,938,758,782,974,400,310,118,512,506,960,954,502,518,886,966,668,680,692,5379],i}return i(e,t),a(e,[{key:"encode",value:function(){var t,e=this.bytes,n=e.shift()-105;if(103===n)t=this.nextA(e,1);else if(104===n)t=this.nextB(e,1);else{if(105!==n)throw new f;t=this.nextC(e,1)}return{text:this.text==this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:this.getEncoding(n)+t.result+this.getEncoding((t.checksum+n)%103)+this.getEncoding(106)}}},{key:"getEncoding",value:function(t){return this.encodings[t]?(this.encodings[t]+1e3).toString(2):""}},{key:"valid",value:function(){return-1!==this.data.search(/^[\x00-\x7F\xC8-\xD3]+$/)}},{key:"nextA",value:function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,o;if(t[0]>=200)o=t[0]-105,t.shift(),99===o?n=this.nextC(t,e+1):100===o?n=this.nextB(t,e+1):98===o?(t[0]=t[0]>95?t[0]-96:t[0],n=this.nextA(t,e+1)):n=this.nextA(t,e+1);else{var r=t[0];o=r<32?r+64:r-32,t.shift(),n=this.nextA(t,e+1)}var i=this.getEncoding(o),a=o*e;return{result:i+n.result,checksum:a+n.checksum}}},{key:"nextB",value:function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,o;t[0]>=200?(o=t[0]-105,t.shift(),99===o?n=this.nextC(t,e+1):101===o?n=this.nextA(t,e+1):98===o?(t[0]=t[0]<32?t[0]+96:t[0],n=this.nextB(t,e+1)):n=this.nextB(t,e+1)):(o=t[0]-32,t.shift(),n=this.nextB(t,e+1));var r=this.getEncoding(o),i=o*e;return{result:r+n.result,checksum:i+n.checksum}}},{key:"nextC",value:function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,o;t[0]>=200?(o=t[0]-105,t.shift(),n=100===o?this.nextB(t,e+1):101===o?this.nextA(t,e+1):this.nextC(t,e+1)):(o=10*(t[0]-48)+t[1]-48,t.shift(),t.shift(),n=this.nextC(t,e+1));var r=this.getEncoding(o),i=o*e;return{result:r+n.result,checksum:i+n.checksum}}}]),e}(u.default),f=function(t){function e(){o(this,e);var t=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.name="InvalidStartCharacterException",t.message="The encoding does not start with a start character.",t}return i(e,t),e}(Error);e.default=c,t.exports=e.default},function(t,e,n){var o,r=n(26).GLog,i="undefined"!=typeof callNative;o="undefined"!=typeof weex&&weex.requireModule?weex.requireModule("gcanvas"):__weex_require__("@weex-module/gcanvas");var a={callRender:function(t){i&&(r.d("bridge#callRender() commands is "+t),o.render([t]))},preLoadImage:function(t,e){i&&(r.d("bridge#preLoadImage() image url is "+t),o.preLoadImage(t,function(t){e&&e(t)}))},callEnable:function(t,e,n){if(i){var a={componentId:t,config:e};o.enable(a,function(t){r.d("bridge#callEnable() return val:"+JSON.stringify(t)),n&&n(t)})}},callDisable:function(){if(i){var t={};o.disable(t,function(t){r.d("bridge#callDisable() return val:"+JSON.stringify(t))})}},getDeviceInfo:function(t){i&&o.getDeviceInfo({},function(e){r.d("bridge#getDeviceInfo() return val:"+JSON.stringify(e)),t&&t(e)})},setContextType:function(t){if(0!=t&&1!=t)return void r.d("bridge#setContextType(): invalid context type===>"+t);r.d("bridge#setContextType(): context type is "+t),o.setContextType(t)},setLogLevel:function(t){r.d("bridge#setLogLevel(): native logLevel "+t),o.setLogLevel(t)},setHiQuality:function(t){r.d("bridge#setHiQuality(): quality: "+t),o.setHiQuality(t)}};t.exports={GBridge:a,GLog:r}},function(t,e){t.exports=function(){var t;if(!t)try{t=require("rax")}catch(t){}return t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(13),r=n(12),i=n(19);e.default={CODE39:o.CODE39,CODE128:r.CODE128,CODE128A:r.CODE128A,CODE128B:r.CODE128B,CODE128C:r.CODE128C,EAN13:i.EAN13,EAN8:i.EAN8,EAN5:i.EAN5,EAN2:i.EAN2,UPC:i.UPC},t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":a(e))&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":a(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(4),f=n(22),l=null;f.isWeex&&(l=n(21));var d=function(t){function e(){var t,n,i,a;o(this,e);for(var s=arguments.length,u=Array(s),d=0;d<s;d++)u[d]=arguments[d];return n=i=r(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(u))),i.getContext=function(){var t=(0,c.findDOMNode)(i.refs.canvas);return f.isWeex?l.init(t):new Promise(function(e,n){if(t&&t.getContext){var o=t.getContext("2d");o.render=function(){},e(o)}})},a=n,r(i,a)}return i(e,t),u(e,[{key:"render",value:function(){var t=this.props.style,e=void 0===t?{}:t;return f.isWeex?(0,c.createElement)("gcanvas",s({},this.props,{ref:"canvas"})):(0,c.createElement)("canvas",s({},this.props,{width:e.width,height:e.height,ref:"canvas"}))}}]),e}(c.Component);e.default=d,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(23),r=function(t){return t&&t.__esModule?t:{default:t}}(o),i={position:"absolute",left:0,right:0,top:0,bottom:0};e.default={hairlineWidth:1,absoluteFillObject:i,flatten:r.default,create:function(t){return t}},t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=n(2),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=function(t){function e(t,n){return o(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,String.fromCharCode(208)+t,n))}return i(e,t),a(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[\x00-\x5F\xC8-\xCF]+$/)}}]),e}(u.default);e.default=c,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=n(2),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=function(t){function e(t,n){return o(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,String.fromCharCode(209)+t,n))}return i(e,t),a(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[\x20-\x7F\xC8-\xCF]+$/)}}]),e}(u.default);e.default=c,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=n(2),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=function(t){function e(t,n){return o(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,String.fromCharCode(210)+t,n))}return i(e,t),a(e,[{key:"valid",value:function(){return-1!==this.data.search(/^(\xCF*[0-9]{2}\xCF*)+$/)}}]),e}(u.default);e.default=c,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){var e,n=t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length,o=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length,r=t.match(/^(\xCF*[0-9]{2}\xCF*)*/)[0].length;return e=r>=2?String.fromCharCode(210)+c(t):n>o?String.fromCharCode(208)+s(t):String.fromCharCode(209)+u(t),e=e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}function s(t){var e=t.match(/^([\x00-\x5F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x00-\x5F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(205)+u(t.substring(n[0].length))}function u(t){var e=t.match(/^([\x20-\x7F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x20-\x7F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(206)+s(t.substring(n[0].length))}function c(t){var e=t.match(/^(\xCF*[0-9]{2}\xCF*)+/)[0],n=e.length;return n===t.length?t:(t=t.substring(n),t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length>=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length?e+String.fromCharCode(206)+s(t):e+String.fromCharCode(205)+u(t))}Object.defineProperty(e,"__esModule",{value:!0});var f=n(2),l=function(t){return t&&t.__esModule?t:{default:t}}(f),d=function(t){function e(t,n){if(o(this,e),-1!==t.search(/^[\x00-\x7F\xC8-\xD3]+$/))var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a(t),n));else var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r(i)}return i(e,t),e}(l.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var r=n(11),i=o(r),a=n(8),s=o(a),u=n(9),c=o(u),f=n(10),l=o(f);e.CODE128=i.default,e.CODE128A=s.default,e.CODE128B=c.default,e.CODE128C=l.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){return s(c(t))}function s(t){return y[t].toString(2)}function u(t){return _[t]}function c(t){return _.indexOf(t)}function f(t){for(var e=0,n=0;n<t.length;n++)e+=c(t[n]);return e%=43}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE39=void 0;var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),d=n(0),h=function(t){return t&&t.__esModule?t:{default:t}}(d),p=function(t){function e(t,n){return o(this,e),t=t.toUpperCase(),n.mod43&&(t+=u(f(t))),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return i(e,t),l(e,[{key:"encode",value:function(){for(var t=a("*"),e=0;e<this.data.length;e++)t+=a(this.data[e])+"0";return t+=a("*"),{data:t,text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),e}(h.default),_=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],y=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];e.CODE39=p},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e,n=0;for(e=0;e<12;e+=2)n+=parseInt(t[e]);for(e=1;e<12;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(1),f=o(c),l=n(0),d=o(l),h=function(t){function e(t,n){r(this,e),-1!==t.search(/^[0-9]{12}$/)&&(t+=s(t));var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return!n.flat&&n.fontSize>10*n.width?o.fontSize=10*n.width:o.fontSize=n.fontSize,o.guardHeight=n.height+o.fontSize/2+n.textMargin,o.lastChar=n.lastChar,o}return a(e,t),u(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&this.data[12]==s(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"getStructure",value:function(){return["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]}},{key:"guardedEncoding",value:function(){var t=new f.default,e=[],n=this.getStructure()[this.data[0]],o=this.data.substr(1,6),r=this.data.substr(7,6);return this.options.displayValue&&e.push({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:t.encode(o,n),text:this.text.substr(1,6),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(r,"RRRRRR"),text:this.text.substr(7,6),options:{fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),this.options.lastChar&&this.options.displayValue&&(e.push({data:"00"}),e.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}})),e}},{key:"flatEncoding",value:function(){var t=new f.default,e="",n=this.getStructure()[this.data[0]];return e+="101",e+=t.encode(this.data.substr(1,6),n),e+="01010",e+=t.encode(this.data.substr(7,6),"RRRRRR"),e+="101",{data:e,text:this.text}}}]),e}(d.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),u=n(1),c=o(u),f=n(0),l=o(f),d=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.structure=["LL","LG","GL","GG"],o}return a(e,t),s(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=new c.default,e=this.structure[parseInt(this.data)%4],n="1011";return n+=t.encode(this.data,e,"01"),{data:n,text:this.text}}}]),e}(l.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),u=n(1),c=o(u),f=n(0),l=o(f),d=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.structure=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],o}return a(e,t),s(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t=new c.default,e=this.checksum(),n="1011";return n+=t.encode(this.data,this.structure[e],"01"),{data:n,text:this.text}}},{key:"checksum",value:function(){var t=0;return t+=3*parseInt(this.data[0]),t+=9*parseInt(this.data[1]),t+=3*parseInt(this.data[2]),t+=9*parseInt(this.data[3]),(t+=3*parseInt(this.data[4]))%10}}]),e}(l.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e,n=0;for(e=0;e<7;e+=2)n+=3*parseInt(t[e]);for(e=1;e<7;e+=2)n+=parseInt(t[e]);return(10-n%10)%10}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(1),f=o(c),l=n(0),d=o(l),h=function(t){function e(t,n){return r(this,e),-1!==t.search(/^[0-9]{7}$/)&&(t+=s(t)),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return a(e,t),u(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&this.data[7]==s(this.data)}},{key:"encode",value:function(){var t=new f.default,e="",n=this.data.substr(0,4),o=this.data.substr(4,4);return e+=t.startBin,e+=t.encode(n,"LLLL"),e+=t.middleBin,e+=t.encode(o,"RRRR"),e+=t.endBin,{data:e,text:this.text}}}]),e}(d.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(1),f=o(c),l=n(0),d=o(l),h=function(t){function e(t,n){r(this,e),-1!==t.search(/^[0-9]{11}$/)&&(t+=s(t));var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.displayValue=n.displayValue,n.fontSize>10*n.width?o.fontSize=10*n.width:o.fontSize=n.fontSize,o.guardHeight=n.height+o.fontSize/2+n.textMargin,o}return a(e,t),u(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==s(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t=new f.default,e="";return e+="101",e+=t.encode(this.data.substr(0,6),"LLLLLL"),e+="01010",e+=t.encode(this.data.substr(6,6),"RRRRRR"),e+="101",{data:e,text:this.text}}},{key:"guardedEncoding",value:function(){var t=new f.default,e=[];return this.displayValue&&e.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+t.encode(this.data[0],"L"),options:{height:this.guardHeight}}),e.push({data:t.encode(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:t.encode(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),e}}]),e}(d.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var r=n(14),i=o(r),a=n(17),s=o(a),u=n(16),c=o(u),f=n(15),l=o(f),d=n(18),h=o(d);e.EAN13=i.default,e.EAN8=s.default,e.EAN5=c.default,e.EAN2=l.default,e.UPC=h.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),u=n(4),c=n(6),f=o(c),l=n(7),d=o(l),h=n(5),p=o(h),_=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));n.canvasRef=function(t){n.canvas=t},n.drawCode=function(t,e,o){if(null!==n.canvas){var r=p.default[t],i=new r(e,o),a=o.fillColor,s=void 0===a?"#000000":a;n.canvas.getContext().then(function(t){var e=i.encode().data;t.clearRect(0,0,n.width,n.height),t.fillStyle=s;for(var o=0;o<e.length;o++){var r=2*o;"1"===e[o]?t.fillRect(r,0,2,n.height):e[o]&&t.fillRect(r,0,2,n.height*e[o])}})}};var o=t.style,a=void 0===o?{}:o,s=a.width,u=void 0===s?500:s,c=a.height,f=void 0===c?200:c;return n.width=u,n.height=f,n.canvas=null,n}return a(e,t),s(e,[{key:"componentDidMount",value:function(){var t=this.props,e=t.type,n=void 0===e?"CODE128":e,o=t.data,r=void 0===o?"":o,i=t.options,a=void 0===i?{}:i;""!==r&&this.drawCode(n,r,a)}},{key:"componentWillReceiveProps",value:function(t){var e=t.type,n=void 0===e?"CODE128":e,o=t.data,r=void 0===o?"":o,i=t.options,a=void 0===i?{}:i;r===this.props.data&&n===this.props.type||this.drawCode(n,r,a)}},{key:"render",value:function(){var t=this.props.style;return(0,u.createElement)(f.default,{style:[y.barCode,t],ref:this.canvasRef})}}]),e}(u.Component),y=d.default.create({barCode:{width:500,height:200}});e.default=_,t.exports=e.default},function(t,e,n){"use strict";function o(){a.default.disable()}function r(t){return new Promise(function(e){a.default.start(t.ref,function(){e(a.default.getContext("2d"))})})}Object.defineProperty(e,"__esModule",{value:!0}),e.disable=o,e.init=r;var i=n(24),a=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,n){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)};e.isWeb="object"===("undefined"==typeof navigator?"undefined":r(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),e.isNode="undefined"!=typeof process&&!(!process.versions||!process.versions.node),e.isWeex="function"==typeof callNative,e.isReactNative="undefined"!=typeof __fbBatchedBridgeConfig},function(t,e,n){"use strict";function o(t){if(t){if(Array.isArray(t)){for(var e={},n=0;n<t.length;++n){var r=o(t[n]);if(r)for(var i in r)e[i]=r[i]}return e}return t}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o,t.exports=e.default},function(t,e,n){var o=n(3).GBridge,r=n(3).GLog,i=n(25),a={};a.renderMode=0,a.hybridLayerType=-1,a.checkType=0,a.nativeVer=0,a.defaultHiQualityMode=!0,a.supportScroll=!1,a.newCanvasMode=!1,a.sameLevel=!1,a.clearColor="white",a.WHITE_LIST=[[function(t){return"GT-I9300"==t.MODEL},function(t){return"GT-I9500"==t.MODEL},function(t){return"GT-N7108"==t.MODEL},function(t){return"HIKe 848A"==t.MODEL},function(t){return"HTC 601e"==t.MODEL},function(t){return"HUAWEI C8813"==t.MODEL},function(t){return"Lenovo K900"==t.MODEL},function(t){return"M351"==t.MODEL},function(t){return"M51w"==t.MODEL},function(t){return"MI 3"==t.MODEL},function(t){return"MI 3W"==t.MODEL},function(t){return"SM-G9006V"==t.MODEL},function(t){return"SM-N9006"==t.MODEL}],[function(t){return r.d("info.OS_RELEASE="+t.OS_RELEASE),!1},function(t){return t.OS_RELEASE>="4.1.0"&&t.OS_RELEASE<="4.4.2"}]],a.checkList=function(t,e){var n=a.checkType;if(r.d("[checkList] checkType:"+n),1==n)for(var o=a.WHITE_LIST,i=o.length,u=0;u<i;u++){for(var c=o[u].length,f=!1,l=0;l<c;l++)if(o[u][l](s)){f=!0;break}if(!f)return r.d("the device is not supported, "+s.MODEL),void(e&&e())}t&&t()};var s={},u=null,c=0,f=2,l={start:function(t,e,n){r.d("gcanvas#start=====>>>");var i=[];i.push(a.renderMode),i.push(a.hybridLayerType),i.push(a.supportScroll),i.push(a.newCanvasMode),i.push(1),i.push(a.clearColor),i.push(a.sameLevel),o.callEnable(t,i,function(t){}),o.getDeviceInfo(function(t){f=t.data&&"iOS"==t.data.platform?1:2,console.log("GCanvasPlatform = "+f),e()})},getContext:function(t){return r.d("gcanvas#getContext=====>>>"),u||(t.match(/webgl/i)?(u=new GContextWebGL,c=1):(u=new i,c=0),o.setContextType(c),u.timer||(u.timer=setInterval(this.render.bind(this),16)),u)},render:function(){u.render("auto")},disable:function(){r.d("gcanvas#disable=====>>>"),o.callDisable()},setHiQuality:function(t){r.d("gcanvas#setHiQuality=====>>>"+t),o.setHiQuality(t)},setLogLevel:function(t){r.d("gcanvas#setLogLevel=====>>> "+t),o.setLogLevel(t)}};t.exports=l},function(t,e,n){function o(){this._drawCommands="",this._globalAlpha=1,this._fillStyle="rgb(0,0,0)",this._strokeStyle="rgb(0,0,0)",this._lineWidth=1,this._lineCap="butt",this._lineJoin="miter",this._miterLimit=10,this._globalCompositeOperation="source-over",this._textAlign="start",this._textBaseline="alphabetic",this._font="10px sans-serif",this._images={},this._canvases1={},this._canvases2={},this._getImageData=new Array,this._savedGlobalAlpha=[],this.timer=null}function r(t,e){this._style=e,this._img=t}function i(t,e,n,o){this._start_pos={_x:t,_y:e},this._end_pos={_x:n,_y:o},this._stop_count=0,this._stops=[0,0,0,0,0]}function a(t,e,n,o,r,i){this._start_pos={_x:t,_y:e,_r:n},this._end_pos={_x:o,_y:r,_r:i},this._stop_count=0,this._stops=[0,0,0,0,0]}function s(t){for(var e="",n=new Uint8Array(t),o=n.byteLength,r=0;r<o;r++)e+=String.fromCharCode(n[r]);return window.btoa(e)}function u(t,e){f.d("GImageData wh="+t+","+e),this.width=t,this.height=e,this.data=new Uint8Array(t*e*4)}var c=n(3).GBridge,f=n(3).GLog;i.prototype.addColorStop=function(t,e){this._stop_count<5&&0<=t&&t<=1&&(this._stops[this._stop_count]={_pos:t,_color:e},this._stop_count++)},a.prototype.addColorStop=function(t,e){this._stop_count<5&&0<=t&&t<=1&&(this._stops[this._stop_count]={_pos:t,_color:e},this._stop_count++)},Object.defineProperty(o.prototype,"globalAlpha",{get:function(){return this._globalAlpha},set:function(t){this._globalAlpha=t,this._drawCommands=this._drawCommands.concat("a"+t.toFixed(6)+";")}}),Object.defineProperty(o.prototype,"fillStyle",{get:function(){return this._fillStyle},set:function(t){if(this._fillStyle=t,"string"==typeof t)this._drawCommands=this._drawCommands.concat("F"+t+";");else if(t instanceof r)if(t._img instanceof Image)if(t._img.src in this._images)this._drawCommands=this._drawCommands.concat("G"+this._images[t._img.src]._id+","+t._style+";");else{var e=GCanvas.createImage();e.width=t._img.width,e.height=t._img.height,e.src=t._img.src,e.complete=t._img.complete,this._images[t._img.src]=e}else t._img instanceof GCanvasImage&&(this._drawCommands=this._drawCommands.concat("G"+t._img._id+","+t._style+";"));else if(t instanceof i){for(var n="D"+t._start_pos._x+","+t._start_pos._y+","+t._end_pos._x+","+t._end_pos._y+","+t._stop_count,o=0;o<t._stop_count;++o)n+=","+t._stops[o]._pos+","+t._stops[o]._color;this._drawCommands=this._drawCommands.concat(n+";")}else if(t instanceof a){for(var n="H"+t._start_pos._x+","+t._start_pos._y+","+t._start_pos._r+","+t._end_pos._x+","+t._end_pos._y+","+t._end_pos._r+","+t._stop_count,o=0;o<t._stop_count;++o)n+=","+t._stops[o]._pos+","+t._stops[o]._color;this._drawCommands=this._drawCommands.concat(n+";")}}}),Object.defineProperty(o.prototype,"strokeStyle",{get:function(){return this._strokeStyle},set:function(t){if(this._strokeStyle=t,"string"==typeof t)this._drawCommands=this._drawCommands.concat("S"+t+";");else if(t instanceof r)if(t._img instanceof Image)if(t._img.src in this._images)this._drawCommands=this._drawCommands.concat("G"+this._images[t._img.src]._id+","+t._style+";");else{var e=GCanvas.createImage();e.width=t._img.width,e.height=t._img.height,e.src=t._img.src,e.complete=t._img.complete,this._images[t._img.src]=e}else t._img instanceof GCanvasImage&&(this._drawCommands=this._drawCommands.concat("G"+t._img._id+","+t._style+";"));else if(t instanceof i){for(var n="D"+t._start_pos._x+","+t._start_pos._y+","+t._end_pos._x+","+t._end_pos._y+","+t._stop_count,o=0;o<t._stop_count;++o)n+=","+t._stops[o]._pos+","+t._stops[o]._color;this._drawCommands=this._drawCommands.concat(n+";")}else if(t instanceof a){for(var n="H"+t._start_pos._x+","+t._start_pos._y+","+t._start_pos._r+","+t._end_pos._x+","+t._end_pos._y+","+t._end_pos._r+","+t._stop_count,o=0;o<t._stop_count;++o)n+=","+t._stops[o]._pos+","+t._stops[o]._color;this._drawCommands=this._drawCommands.concat(n+";")}}}),Object.defineProperty(o.prototype,"lineWidth",{get:function(){return this._lineWidth},set:function(t){this._lineWidth=t,this._drawCommands=this._drawCommands.concat("W"+t+";")}}),Object.defineProperty(o.prototype,"lineCap",{get:function(){return this._lineCap},set:function(t){this._lineCap=t,this._drawCommands=this._drawCommands.concat("C"+t+";")}}),Object.defineProperty(o.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(t){this._lineJoin=t,this._drawCommands=this._drawCommands.concat("J"+t+";")}}),Object.defineProperty(o.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(t){this._miterLimit=t,this._drawCommands=this._drawCommands.concat("M"+t+";")}}),Object.defineProperty(o.prototype,"globalCompositeOperation",{get:function(){return this._globalCompositeOperation},set:function(t){this._globalCompositeOperation=t;var e=0;switch(t){case"source-over":e=0;break;case"source-atop":e=5;break;case"source-in":e=0;break;case"source-out":e=2;break;case"destination-over":case"destination-atop":case"destination-in":e=4;break;case"destination-out":e=3;break;case"lighter":e=1;break;case"copy":e=2;break;case"xor":e=6;break;default:e=0}this._drawCommands=this._drawCommands.concat("B"+e+";")}}),Object.defineProperty(o.prototype,"textAlign",{get:function(){return this._textAlign},set:function(t){this._textAlign=t;var e=0;switch(t){case"start":e=0;break;case"end":e=1;break;case"left":e=2;break;case"center":e=3;break;case"right":e=4;break;default:e=0}this._drawCommands=this._drawCommands.concat("A"+e+";")}}),Object.defineProperty(o.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(t){this._textBaseline=t;var e=0;switch(t){case"alphabetic":e=0;break;case"middle":e=1;break;case"top":e=2;break;case"hanging":e=3;break;case"bottom":e=4;break;case"ideographic":e=5;break;default:e=0}this._drawCommands=this._drawCommands.concat("E"+e+";")}}),Object.defineProperty(o.prototype,"font",{get:function(){return this._font},set:function(t){this._font=t,this._drawCommands=this._drawCommands.concat("j"+t+";")}}),o.prototype.loadTexture=function(t,e,n){},o.prototype.unloadTexture=function(t){},o.prototype.setTransform=function(t,e,n,o,r,i){this._drawCommands=this._drawCommands.concat("t"+(1===t?"1":t.toFixed(6))+","+(0===e?"0":e.toFixed(6))+","+(0===n?"0":n.toFixed(6))+","+(1===o?"1":o.toFixed(6))+","+r+","+i+";")},o.prototype.transform=function(t,e,n,o,r,i){this._drawCommands=this._drawCommands.concat("f"+(1===t?"1":t.toFixed(6))+","+(0===e?"0":e.toFixed(6))+","+(0===n?"0":n.toFixed(6))+","+(1===o?"1":o.toFixed(6))+","+r+","+i+";")},o.prototype.resetTransform=function(){this._drawCommands=this._drawCommands.concat("m;")},o.prototype.scale=function(t,e){this._drawCommands=this._drawCommands.concat("k"+t.toFixed(6)+","+e.toFixed(6)+";")},o.prototype.rotate=function(t){this._drawCommands=this._drawCommands.concat("r"+t.toFixed(6)+";")},o.prototype.translate=function(t,e){this._drawCommands=this._drawCommands.concat("l"+t+","+e+";")},o.prototype.save=function(){this._savedGlobalAlpha.push(this._globalAlpha),this._drawCommands=this._drawCommands.concat("v;")},o.prototype.restore=function(){this._drawCommands=this._drawCommands.concat("e;"),this._globalAlpha=this._savedGlobalAlpha.pop()},o.prototype.drawImage=function(t,e,n,o,r,i,a,s,u){f.d("[GContext2D.drawImage] start..."),"string"!=typeof t&&(t=t.src),c.preLoadImage(t);var l=arguments.length;this._drawCommands+="d"+l+","+t+","+e+","+n+","+o+","+r+","+i+","+a+","+s+","+u+";"},o.prototype.render=function(t){void 0===t&&(clearInterval(this.timer),this.timer=null);var e=this._drawCommands;this._drawCommands="",null!=e&&""!=e&&(f.d("GContext2D#render() called, commands is "+e),c.callRender(e))},o.prototype.capture=function(t,e,n,o,r,i,a){},o.prototype.createPattern=function(t,e){return new r(t,e)},o.prototype.createLinearGradient=function(t,e,n,o){return new i(t,e,n,o)},o.prototype.createRadialGradient=function(t,e,n,o,r,i){return new a(t,e,n,o,r,i)},o.prototype.strokeRect=function(t,e,n,o,r,i){this._drawCommands=this._drawCommands.concat("s"+t+","+e+","+n+","+o+";")},o.prototype.clearRect=function(t,e,n,o,r,i){this._drawCommands=this._drawCommands.concat("c"+t+","+e+","+n+","+o+";")},o.prototype.clip=function(t,e){this._drawCommands=this._drawCommands.concat("p;")},o.prototype.resetClip=function(t,e){this._drawCommands=this._drawCommands.concat("q;")},o.prototype.closePath=function(t,e){this._drawCommands=this._drawCommands.concat("o;")},o.prototype.moveTo=function(t,e,n,o){this._drawCommands=this._drawCommands.concat("g"+t.toFixed(6)+","+e.toFixed(6)+";")},o.prototype.lineTo=function(t,e,n,o){this._drawCommands=this._drawCommands.concat("i"+t.toFixed(6)+","+e.toFixed(6)+";")},o.prototype.quadraticCurveTo=function(t,e,n,o,r,i){this._drawCommands=this._drawCommands.concat("u"+t+","+e+","+n+","+o+";")},o.prototype.bezierCurveTo=function(t,e,n,o,r,i,a,s){this._drawCommands=this._drawCommands.concat("z"+t+","+e+","+n+","+o+","+r+","+i+";")},o.prototype.arcTo=function(t,e,n,o,r,i,a){this._drawCommands=this._drawCommands.concat("h"+t+","+e+","+n+","+o+","+r+";")},o.prototype.beginPath=function(){this._drawCommands=this._drawCommands.concat("b;")},o.prototype.fillRect=function(t,e,n,o){this._drawCommands=this._drawCommands.concat("n"+t+","+e+","+n+","+o+";")},o.prototype.rect=function(t,e,n,o){this._drawCommands=this._drawCommands.concat("w"+t+","+e+","+n+","+o+";")},o.prototype.fill=function(t){this._drawCommands=this._drawCommands.concat("L;")},o.prototype.stroke=function(t){this._drawCommands=this._drawCommands.concat("x;")},o.prototype.arc=function(t,e,n,o,r,i){var a=0;i&&(a=1),this._drawCommands=this._drawCommands.concat("y"+t+","+e+","+n+","+o+","+r+","+a+";")},o.prototype.fillText=function(t,e,n){var o=t.replace(/!/g,"!!");o=o.replace(/,/g,"!,"),o=o.replace(/;/g,"!;"),this._drawCommands=this._drawCommands.concat("T"+o+","+e+","+n+",0.0;")},o.prototype.strokeText=function(t,e,n){this._drawCommands=this._drawCommands.concat("U"+t+","+e+","+n+",0.0;")},o.prototype.measureText=function(t){return-1},o.prototype.isPointInPath=function(t,e){return!0},o.prototype.createImageData=function(t,e){return f.d("GContext2D::createImageData wh="+t+","+e),new u(t,e)},o.prototype._putImageData=function(t,e,n,o,r,i,a){this._drawCommands=this._drawCommands.concat("P"+e+","+n+","+o+","+r+","+i+","+a+","+s(t)+";")},o.prototype.putImageData=function(t,e,n,o,r,i,a){if(f.d("GContext2D::putImageData ["+arguments.length+"] dest_xy=("+e+","+n+") dirty_xy=("+o+","+r+") dirty_wh=("+i+","+a+") "),arguments.length<=3)this._putImageData(t.data,e,n,t.width,t.height,t.width,t.height);else{for(var s,u=new Uint8Array(i*a*4),c=0,l=0;l<a;l++){s=4*(t.width*(r+l)+o);for(var d=0;d<i;++d)u[c++]=t.data[s++],u[c++]=t.data[s++],u[c++]=t.data[s++],u[c++]=t.data[s++]}this._putImageData(u,e+o,n+r,i,a,i,a)}},o.prototype.getImageDataAsyn=function(t,e,n,o){return""},t.exports=o},function(t,e){var n={};n._nullFunc=function(){},n.d=n._nullFunc,n.i=n._nullFunc,n.w=n._nullFunc,n.e=n._nullFunc,n._nativeEnable=!1,n._setNativeLevel=function(t){},n._refresh=function(){0==this.enable?(this._setNativeLevel(-1),this.d=this._nullFunc,this.i=this._nullFunc,this.w=this._nullFunc,this.e=this._nullFunc):(this.level<=3?this.e=function(t){console.error(t)}:this.e=this._nullFunc,this.level<=2?this.w=function(t){console.warn(t)}:this.w=this._nullFunc,this.level<=1?this.i=function(t){console.info(t)}:this.i=this._nullFunc,this.level<=0?this.d=function(t){console.info(t)}:this.d=this._nullFunc,this._setNativeLevel(this.level))},n.enable=function(){this.enable=!0,this._refresh()},n.disable=function(){this.enable=!1,this._refresh()},n.setLevel=function(t){console.info("[setLevel] "+this.level+"=>"+t),this.level=t,this.enable=!0,this._refresh()},n.setLevel(0),t.exports.GLog=n}])}); | ||
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define)define("rax-barcode",function(e,n,o){o.exports=t()});else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this,e.RaxBarcode=t()}}(function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=21)}([function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n){o(this,t),this.data=e,this.text=n.text||e,this.options=n};e.default=r,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function(){function t(){o(this,t),this.startBin="101",this.endBin="101",this.middleBin="01010",this.Lbinary=["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],this.Gbinary=["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],this.Rbinary=["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"]}return r(t,[{key:"encode",value:function(t,e,n){var o="";n=n||"";for(var r=0;r<t.length;r++)"L"==e[r]?o+=this.Lbinary[t[r]]:"G"==e[r]?o+=this.Gbinary[t[r]]:"R"==e[r]&&(o+=this.Rbinary[t[r]]),r<t.length-1&&(o+=n);return o}}]),t}();e.default=i,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=n(0),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=function(t){function e(t,n){o(this,e);var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));i.bytes=[];for(var a=0;a<t.length;++a)i.bytes.push(t.charCodeAt(a));return i.encodings=[740,644,638,176,164,100,224,220,124,608,604,572,436,244,230,484,260,254,650,628,614,764,652,902,868,836,830,892,844,842,752,734,590,304,112,94,416,128,122,672,576,570,464,422,134,496,478,142,910,678,582,768,762,774,880,862,814,896,890,818,914,602,930,328,292,200,158,68,62,424,412,232,218,76,74,554,616,978,556,146,340,212,182,508,268,266,956,940,938,758,782,974,400,310,118,512,506,960,954,502,518,886,966,668,680,692,5379],i}return i(e,t),a(e,[{key:"encode",value:function(){var t,e=this.bytes,n=e.shift()-105;if(103===n)t=this.nextA(e,1);else if(104===n)t=this.nextB(e,1);else{if(105!==n)throw new f;t=this.nextC(e,1)}return{text:this.text==this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:this.getEncoding(n)+t.result+this.getEncoding((t.checksum+n)%103)+this.getEncoding(106)}}},{key:"getEncoding",value:function(t){return this.encodings[t]?(this.encodings[t]+1e3).toString(2):""}},{key:"valid",value:function(){return-1!==this.data.search(/^[\x00-\x7F\xC8-\xD3]+$/)}},{key:"nextA",value:function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,o;if(t[0]>=200)o=t[0]-105,t.shift(),99===o?n=this.nextC(t,e+1):100===o?n=this.nextB(t,e+1):98===o?(t[0]=t[0]>95?t[0]-96:t[0],n=this.nextA(t,e+1)):n=this.nextA(t,e+1);else{var r=t[0];o=r<32?r+64:r-32,t.shift(),n=this.nextA(t,e+1)}var i=this.getEncoding(o),a=o*e;return{result:i+n.result,checksum:a+n.checksum}}},{key:"nextB",value:function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,o;t[0]>=200?(o=t[0]-105,t.shift(),99===o?n=this.nextC(t,e+1):101===o?n=this.nextA(t,e+1):98===o?(t[0]=t[0]<32?t[0]+96:t[0],n=this.nextB(t,e+1)):n=this.nextB(t,e+1)):(o=t[0]-32,t.shift(),n=this.nextB(t,e+1));var r=this.getEncoding(o),i=o*e;return{result:r+n.result,checksum:i+n.checksum}}},{key:"nextC",value:function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,o;t[0]>=200?(o=t[0]-105,t.shift(),n=100===o?this.nextB(t,e+1):101===o?this.nextA(t,e+1):this.nextC(t,e+1)):(o=10*(t[0]-48)+t[1]-48,t.shift(),t.shift(),n=this.nextC(t,e+1));var r=this.getEncoding(o),i=o*e;return{result:r+n.result,checksum:i+n.checksum}}}]),e}(u.default),f=function(t){function e(){o(this,e);var t=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.name="InvalidStartCharacterException",t.message="The encoding does not start with a start character.",t}return i(e,t),e}(Error);e.default=c,t.exports=e.default},function(t,e,n){var o,r=n(28).GLog,i="undefined"!=typeof callNative;o="undefined"!=typeof weex&&weex.requireModule?weex.requireModule("gcanvas"):__weex_require__("@weex-module/gcanvas");var a={callRender:function(t){i&&o.render([t])},callRenderAndroid:function(t){i&&o.render(t)},callSetDevPixelRatio:function(){i&&o.setDevicePixelRatio&&o.setDevicePixelRatio()},callSetup:function(t,e){if(i){var n=t||{};o.setup&&o.setup(JSON.stringify(n),e)}},preLoadImage:function(t,e){i&&(r.d("bridge#preLoadImage() image url is "+t),o.preLoadImage(t,function(n){n.url=t,r.d("bridge#callcb()"),e&&e(n)}))},callEnable:function(t,e,n){if(i){var a={componentId:t,config:e};o.enable(a,function(t){r.d("bridge#callEnable() return val:"+JSON.stringify(t)),n&&n(t)})}},callDisable:function(){if(i){var t={};o.disable(t,function(t){r.d("bridge#callDisable() return val:"+JSON.stringify(t))})}},getDeviceInfo:function(t){i&&o.getDeviceInfo({},function(e){r.d("bridge#getDeviceInfo() return val:"+JSON.stringify(e)),t&&t(e)})},setContextType:function(t){if(0!=t&&1!=t)return void r.d("bridge#setContextType(): invalid context type===>"+t);r.d("bridge#setContextType(): context type is "+t),o.setContextType(t)},setLogLevel:function(t){r.d("bridge#setLogLevel(): native logLevel "+t),o.setLogLevel(t)},setHiQuality:function(t){r.d("bridge#setHiQuality(): quality: "+t),o.setHiQuality(t)}};t.exports={GBridge:a,GLog:r}},function(t,e){t.exports=function(){var t;if(!t)try{t=require("rax")}catch(t){}return t}()},function(t,e,n){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)};e.isWeb="object"===("undefined"==typeof navigator?"undefined":r(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),e.isNode="undefined"!=typeof process&&!(!process.versions||!process.versions.node),e.isWeex="function"==typeof callNative,e.isReactNative="undefined"!=typeof __fbBatchedBridgeConfig},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(14),r=n(13),i=n(20);e.default={CODE39:o.CODE39,CODE128:r.CODE128,CODE128A:r.CODE128A,CODE128B:r.CODE128B,CODE128C:r.CODE128C,EAN13:i.EAN13,EAN8:i.EAN8,EAN5:i.EAN5,EAN2:i.EAN2,UPC:i.UPC},t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":a(e))&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":a(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(4),f=n(5),l=null;f.isWeex&&(l=n(22));var d=function(t){function e(){var t,n,i,a;o(this,e);for(var s=arguments.length,u=Array(s),d=0;d<s;d++)u[d]=arguments[d];return n=i=r(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(u))),i.getContext=function(){var t=(0,c.findDOMNode)(i.refs.canvas);return f.isWeex?new Promise(function(e,n){requestAnimationFrame(function(){e(l.init(t))})}):new Promise(function(e,n){if(t&&t.getContext){var o=t.getContext("2d");o.render=function(){},e(o)}})},a=n,r(i,a)}return i(e,t),u(e,[{key:"render",value:function(){var t=this.props.style,e=void 0===t?{}:t;return f.isWeex?(0,c.createElement)("gcanvas",s({},this.props,{ref:"canvas"})):(0,c.createElement)("canvas",s({},this.props,{width:e.width,height:e.height,ref:"canvas"}))}}]),e}(c.Component);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(23),i=o(r),a=n(24),s=o(a),u={position:"absolute",left:0,right:0,top:0,bottom:0};e.default={hairlineWidth:(0,s.default)(),absoluteFillObject:u,flatten:i.default,create:function(t){return t}},t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=n(2),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=function(t){function e(t,n){return o(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,String.fromCharCode(208)+t,n))}return i(e,t),a(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[\x00-\x5F\xC8-\xCF]+$/)}}]),e}(u.default);e.default=c,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=n(2),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=function(t){function e(t,n){return o(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,String.fromCharCode(209)+t,n))}return i(e,t),a(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[\x20-\x7F\xC8-\xCF]+$/)}}]),e}(u.default);e.default=c,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=n(2),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=function(t){function e(t,n){return o(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,String.fromCharCode(210)+t,n))}return i(e,t),a(e,[{key:"valid",value:function(){return-1!==this.data.search(/^(\xCF*[0-9]{2}\xCF*)+$/)}}]),e}(u.default);e.default=c,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){var e,n=t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length,o=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length,r=t.match(/^(\xCF*[0-9]{2}\xCF*)*/)[0].length;return e=r>=2?String.fromCharCode(210)+c(t):n>o?String.fromCharCode(208)+s(t):String.fromCharCode(209)+u(t),e=e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}function s(t){var e=t.match(/^([\x00-\x5F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x00-\x5F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(205)+u(t.substring(n[0].length))}function u(t){var e=t.match(/^([\x20-\x7F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x20-\x7F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(206)+s(t.substring(n[0].length))}function c(t){var e=t.match(/^(\xCF*[0-9]{2}\xCF*)+/)[0],n=e.length;return n===t.length?t:(t=t.substring(n),t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length>=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length?e+String.fromCharCode(206)+s(t):e+String.fromCharCode(205)+u(t))}Object.defineProperty(e,"__esModule",{value:!0});var f=n(2),l=function(t){return t&&t.__esModule?t:{default:t}}(f),d=function(t){function e(t,n){if(o(this,e),-1!==t.search(/^[\x00-\x7F\xC8-\xD3]+$/))var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a(t),n));else var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r(i)}return i(e,t),e}(l.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var r=n(12),i=o(r),a=n(9),s=o(a),u=n(10),c=o(u),f=n(11),l=o(f);e.CODE128=i.default,e.CODE128A=s.default,e.CODE128B=c.default,e.CODE128C=l.default},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){return s(c(t))}function s(t){return y[t].toString(2)}function u(t){return _[t]}function c(t){return _.indexOf(t)}function f(t){for(var e=0,n=0;n<t.length;n++)e+=c(t[n]);return e%=43}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE39=void 0;var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),d=n(0),h=function(t){return t&&t.__esModule?t:{default:t}}(d),p=function(t){function e(t,n){return o(this,e),t=t.toUpperCase(),n.mod43&&(t+=u(f(t))),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return i(e,t),l(e,[{key:"encode",value:function(){for(var t=a("*"),e=0;e<this.data.length;e++)t+=a(this.data[e])+"0";return t+=a("*"),{data:t,text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),e}(h.default),_=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],y=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];e.CODE39=p},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e,n=0;for(e=0;e<12;e+=2)n+=parseInt(t[e]);for(e=1;e<12;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(1),f=o(c),l=n(0),d=o(l),h=function(t){function e(t,n){r(this,e),-1!==t.search(/^[0-9]{12}$/)&&(t+=s(t));var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return!n.flat&&n.fontSize>10*n.width?o.fontSize=10*n.width:o.fontSize=n.fontSize,o.guardHeight=n.height+o.fontSize/2+n.textMargin,o.lastChar=n.lastChar,o}return a(e,t),u(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&this.data[12]==s(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"getStructure",value:function(){return["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]}},{key:"guardedEncoding",value:function(){var t=new f.default,e=[],n=this.getStructure()[this.data[0]],o=this.data.substr(1,6),r=this.data.substr(7,6);return this.options.displayValue&&e.push({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:t.encode(o,n),text:this.text.substr(1,6),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(r,"RRRRRR"),text:this.text.substr(7,6),options:{fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),this.options.lastChar&&this.options.displayValue&&(e.push({data:"00"}),e.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}})),e}},{key:"flatEncoding",value:function(){var t=new f.default,e="",n=this.getStructure()[this.data[0]];return e+="101",e+=t.encode(this.data.substr(1,6),n),e+="01010",e+=t.encode(this.data.substr(7,6),"RRRRRR"),e+="101",{data:e,text:this.text}}}]),e}(d.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),u=n(1),c=o(u),f=n(0),l=o(f),d=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.structure=["LL","LG","GL","GG"],o}return a(e,t),s(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=new c.default,e=this.structure[parseInt(this.data)%4],n="1011";return n+=t.encode(this.data,e,"01"),{data:n,text:this.text}}}]),e}(l.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),u=n(1),c=o(u),f=n(0),l=o(f),d=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.structure=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],o}return a(e,t),s(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t=new c.default,e=this.checksum(),n="1011";return n+=t.encode(this.data,this.structure[e],"01"),{data:n,text:this.text}}},{key:"checksum",value:function(){var t=0;return t+=3*parseInt(this.data[0]),t+=9*parseInt(this.data[1]),t+=3*parseInt(this.data[2]),t+=9*parseInt(this.data[3]),(t+=3*parseInt(this.data[4]))%10}}]),e}(l.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e,n=0;for(e=0;e<7;e+=2)n+=3*parseInt(t[e]);for(e=1;e<7;e+=2)n+=parseInt(t[e]);return(10-n%10)%10}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(1),f=o(c),l=n(0),d=o(l),h=function(t){function e(t,n){return r(this,e),-1!==t.search(/^[0-9]{7}$/)&&(t+=s(t)),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return a(e,t),u(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&this.data[7]==s(this.data)}},{key:"encode",value:function(){var t=new f.default,e="",n=this.data.substr(0,4),o=this.data.substr(4,4);return e+=t.startBin,e+=t.encode(n,"LLLL"),e+=t.middleBin,e+=t.encode(o,"RRRR"),e+=t.endBin,{data:e,text:this.text}}}]),e}(d.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(1),f=o(c),l=n(0),d=o(l),h=function(t){function e(t,n){r(this,e),-1!==t.search(/^[0-9]{11}$/)&&(t+=s(t));var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.displayValue=n.displayValue,n.fontSize>10*n.width?o.fontSize=10*n.width:o.fontSize=n.fontSize,o.guardHeight=n.height+o.fontSize/2+n.textMargin,o}return a(e,t),u(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==s(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t=new f.default,e="";return e+="101",e+=t.encode(this.data.substr(0,6),"LLLLLL"),e+="01010",e+=t.encode(this.data.substr(6,6),"RRRRRR"),e+="101",{data:e,text:this.text}}},{key:"guardedEncoding",value:function(){var t=new f.default,e=[];return this.displayValue&&e.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+t.encode(this.data[0],"L"),options:{height:this.guardHeight}}),e.push({data:t.encode(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:t.encode(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),e}}]),e}(d.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var r=n(15),i=o(r),a=n(18),s=o(a),u=n(17),c=o(u),f=n(16),l=o(f),d=n(19),h=o(d);e.EAN13=i.default,e.EAN8=s.default,e.EAN5=c.default,e.EAN2=l.default,e.UPC=h.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),u=n(4),c=n(7),f=o(c),l=n(8),d=o(l),h=n(6),p=o(h),_=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));n.canvasRef=function(t){n.canvas=t},n.drawCode=function(t,e,o){if(null!==n.canvas){var r=p.default[t],i=new r(e,o),a=o.fillColor,s=void 0===a?"#000000":a;n.canvas.getContext().then(function(t){var e=i.encode().data;t.clearRect(0,0,n.width,n.height),t.fillStyle=s;for(var o=0;o<e.length;o++){var r=2*o;"1"===e[o]?t.fillRect(r,0,2,n.height):e[o]&&t.fillRect(r,0,2,n.height*e[o])}})}};var o=t.style,a=void 0===o?{}:o,s=a.width,u=void 0===s?500:s,c=a.height,f=void 0===c?200:c;return n.width=u,n.height=f,n.canvas=null,n}return a(e,t),s(e,[{key:"componentDidMount",value:function(){var t=this.props,e=t.type,n=void 0===e?"CODE128":e,o=t.data,r=void 0===o?"":o,i=t.options,a=void 0===i?{}:i;""!==r&&this.drawCode(n,r,a)}},{key:"componentWillReceiveProps",value:function(t){var e=t.type,n=void 0===e?"CODE128":e,o=t.data,r=void 0===o?"":o,i=t.options,a=void 0===i?{}:i;r===this.props.data&&n===this.props.type||this.drawCode(n,r,a)}},{key:"render",value:function(){var t=this.props.style;return(0,u.createElement)(f.default,{style:[y.barCode,t],ref:this.canvasRef})}}]),e}(u.Component),y=d.default.create({barCode:{width:500,height:200}});e.default=_,t.exports=e.default},function(t,e,n){"use strict";function o(){a.default.disable()}function r(t){return new Promise(function(e){a.default.start(t.ref,function(){a.default.setDevicePixelRatio();var t=a.default.getContext("2d");a.default.startLoop(),a.default.render(function(){e(t)})})})}Object.defineProperty(e,"__esModule",{value:!0}),e.disable=o,e.init=r;var i=n(26),a=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,n){"use strict";function o(t){if(t){if(Array.isArray(t)){for(var e={},n=0;n<t.length;++n){var r=o(t[n]);if(r)for(var i in r)e[i]=r[i]}return e}return t}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return r};var o=n(5),r=function(t){return Math.round(t*window.devicePixelRatio)/window.devicePixelRatio}(1);0===r&&(r=1/window.devicePixelRatio),o.isWeb&&(r="1px"),t.exports=e.default},function(t,e){function n(){var t=0,e=new Object;this.put=function(n,o){this.containsKey(n)||(t++,e[n]=o)},this.get=function(t){return this.containsKey(t)?e[t]:null},this.remove=function(n){this.containsKey(n)&&delete e[n]&&t--},this.containsKey=function(t){return t in e},this.containsValue=function(t){for(var n in e)if(e[n]==t)return!0;return!1},this.values=function(){var t=new Array;for(var n in e)t.push(e[n]);return t},this.keys=function(){var t=new Array;for(var n in e)t.push(n);return t},this.size=function(){return t},this.clear=function(){t=0,e=new Object}}t.exports=n},function(t,e,n){var o=n(3).GBridge,r=n(3).GLog,i=n(27),a={};a.renderMode=0,a.hybridLayerType=-1,a.checkType=0,a.nativeVer=0,a.defaultHiQualityMode=!0,a.supportScroll=!1,a.newCanvasMode=!1,a.sameLevel=!1,a.clearColor="white",a.WHITE_LIST=[[function(t){return"GT-I9300"==t.MODEL},function(t){return"GT-I9500"==t.MODEL},function(t){return"GT-N7108"==t.MODEL},function(t){return"HIKe 848A"==t.MODEL},function(t){return"HTC 601e"==t.MODEL},function(t){return"HUAWEI C8813"==t.MODEL},function(t){return"Lenovo K900"==t.MODEL},function(t){return"M351"==t.MODEL},function(t){return"M51w"==t.MODEL},function(t){return"MI 3"==t.MODEL},function(t){return"MI 3W"==t.MODEL},function(t){return"SM-G9006V"==t.MODEL},function(t){return"SM-N9006"==t.MODEL}],[function(t){return r.d("info.OS_RELEASE="+t.OS_RELEASE),!1},function(t){return t.OS_RELEASE>="4.1.0"&&t.OS_RELEASE<="4.4.2"}]],a.checkList=function(t,e){var n=a.checkType;if(r.d("[checkList] checkType:"+n),1==n)for(var o=a.WHITE_LIST,i=o.length,u=0;u<i;u++){for(var c=o[u].length,f=!1,l=0;l<c;l++)if(o[u][l](s)){f=!0;break}if(!f)return r.d("the device is not supported, "+s.MODEL),void(e&&e())}t&&t()};var s={},u=null,c=0,f=2,l={setup:function(t){r.d("setup#start=====>>>");var e=[],n=t||a;for(var i in a)void 0!=n[i]&&(a[i]=n[i]);var e={renderMode:a.renderMode,hybridLayerType:a.hybridLayerType,supportScroll:a.supportScroll,sameLevel:a.sameLevel,newCanvasMode:a.newCanvasMode,clearColor:a.clearColor};o.callSetup(e,function(t){})},start:function(t,e,n){r.d("gcanvas#start=====>>>");var i=[];i.push(a.renderMode),i.push(a.hybridLayerType),i.push(a.supportScroll),i.push(a.newCanvasMode),i.push(1),i.push(a.clearColor),i.push(a.sameLevel),o.callEnable(t,i,function(t){}),o.getDeviceInfo(function(t){f=t.data&&"iOS"==t.data.platform?1:2,console.log("GCanvasPlatform = "+f),e()})},getContext:function(t){return r.d("gcanvas#getContext=====>>>"),u||(t.match(/webgl/i)?(u=new GContextWebGL,c=1):(u=new i,c=0),o.setContextType(c),u)},startLoop:function(t){if(!u)return void r.d("context not initialize. call setContextType first");t=parseFloat(t)||16,u.timer||(u.timer=setInterval(this.render.bind(this),t))},setDevicePixelRatio:function(){r.d("gcanvas#disable=====>>>"),o.callSetDevPixelRatio()},stopLoop:function(){u&&u.timer&&(clearInterval(u.timer),u.timer=null)},render:function(t){console.log(u),u.render("auto",f,t)},disable:function(){r.d("gcanvas#disable=====>>>"),o.callDisable()},setHiQuality:function(t){r.d("gcanvas#setHiQuality=====>>>"+t),o.setHiQuality(t)},setLogLevel:function(t){r.d("gcanvas#setLogLevel=====>>> "+t),o.setLogLevel(t)}};t.exports=l},function(t,e,n){function o(){this._drawCommands="",this._globalAlpha=1,this._fillStyle="rgb(0,0,0)",this._strokeStyle="rgb(0,0,0)",this._lineWidth=1,this._lineCap="butt",this._lineJoin="miter",this._miterLimit=10,this._globalCompositeOperation="source-over",this._textAlign="start",this._textBaseline="alphabetic",this._font="10px sans-serif",this._images={},this._canvases1={},this._canvases2={},this._getImageData=new Array,this._savedGlobalAlpha=[],this.timer=null}function r(t,e){this._style=e,this._img=t}function i(t,e,n,o){this._start_pos={_x:t,_y:e},this._end_pos={_x:n,_y:o},this._stop_count=0,this._stops=[0,0,0,0,0]}function a(t,e,n,o,r,i){this._start_pos={_x:t,_y:e,_r:n},this._end_pos={_x:o,_y:r,_r:i},this._stop_count=0,this._stops=[0,0,0,0,0]}function s(t){if(h)return t?void(t.url&&h.put(t.url,t.id)):void l.d("GContext2D maintainPicurlToTextureidMap callback error! ")}function u(t){for(var e="",n=new Uint8Array(t),o=n.byteLength,r=0;r<o;r++)e+=String.fromCharCode(n[r]);return window.btoa(e)}function c(t,e){l.d("GImageData wh="+t+","+e),this.width=t,this.height=e,this.data=new Uint8Array(t*e*4)}var f=n(3).GBridge,l=n(3).GLog,d=n(25),h=new d;i.prototype.addColorStop=function(t,e){this._stop_count<5&&0<=t&&t<=1&&(this._stops[this._stop_count]={_pos:t,_color:e},this._stop_count++)},a.prototype.addColorStop=function(t,e){this._stop_count<5&&0<=t&&t<=1&&(this._stops[this._stop_count]={_pos:t,_color:e},this._stop_count++)},Object.defineProperty(o.prototype,"globalAlpha",{get:function(){return this._globalAlpha},set:function(t){this._globalAlpha=t,this._drawCommands=this._drawCommands.concat("a"+t.toFixed(6)+";")}}),Object.defineProperty(o.prototype,"fillStyle",{get:function(){return this._fillStyle},set:function(t){if(this._fillStyle=t,"string"==typeof t)this._drawCommands=this._drawCommands.concat("F"+t+";");else if(t instanceof r)if(t._img instanceof Image)if(t._img.src in this._images)this._drawCommands=this._drawCommands.concat("G"+this._images[t._img.src]._id+","+t._style+";");else{var e=GCanvas.createImage();e.width=t._img.width,e.height=t._img.height,e.src=t._img.src,e.complete=t._img.complete,this._images[t._img.src]=e}else t._img instanceof GCanvasImage&&(this._drawCommands=this._drawCommands.concat("G"+t._img._id+","+t._style+";"));else if(t instanceof i){for(var n="D"+t._start_pos._x+","+t._start_pos._y+","+t._end_pos._x+","+t._end_pos._y+","+t._stop_count,o=0;o<t._stop_count;++o)n+=","+t._stops[o]._pos+","+t._stops[o]._color;this._drawCommands=this._drawCommands.concat(n+";")}else if(t instanceof a){for(var n="H"+t._start_pos._x+","+t._start_pos._y+","+t._start_pos._r+","+t._end_pos._x+","+t._end_pos._y+","+t._end_pos._r+","+t._stop_count,o=0;o<t._stop_count;++o)n+=","+t._stops[o]._pos+","+t._stops[o]._color;this._drawCommands=this._drawCommands.concat(n+";")}}}),Object.defineProperty(o.prototype,"strokeStyle",{get:function(){return this._strokeStyle},set:function(t){if(this._strokeStyle=t,"string"==typeof t)this._drawCommands=this._drawCommands.concat("S"+t+";");else if(t instanceof r)if(t._img instanceof Image)if(t._img.src in this._images)this._drawCommands=this._drawCommands.concat("G"+this._images[t._img.src]._id+","+t._style+";");else{var e=GCanvas.createImage();e.width=t._img.width,e.height=t._img.height,e.src=t._img.src,e.complete=t._img.complete,this._images[t._img.src]=e}else t._img instanceof GCanvasImage&&(this._drawCommands=this._drawCommands.concat("G"+t._img._id+","+t._style+";"));else if(t instanceof i){for(var n="D"+t._start_pos._x+","+t._start_pos._y+","+t._end_pos._x+","+t._end_pos._y+","+t._stop_count,o=0;o<t._stop_count;++o)n+=","+t._stops[o]._pos+","+t._stops[o]._color;this._drawCommands=this._drawCommands.concat(n+";")}else if(t instanceof a){for(var n="H"+t._start_pos._x+","+t._start_pos._y+","+t._start_pos._r+","+t._end_pos._x+","+t._end_pos._y+","+t._end_pos._r+","+t._stop_count,o=0;o<t._stop_count;++o)n+=","+t._stops[o]._pos+","+t._stops[o]._color;this._drawCommands=this._drawCommands.concat(n+";")}}}),Object.defineProperty(o.prototype,"lineWidth",{get:function(){return this._lineWidth},set:function(t){this._lineWidth=t,this._drawCommands=this._drawCommands.concat("W"+t+";")}}),Object.defineProperty(o.prototype,"lineCap",{get:function(){return this._lineCap},set:function(t){this._lineCap=t,this._drawCommands=this._drawCommands.concat("C"+t+";")}}),Object.defineProperty(o.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(t){this._lineJoin=t,this._drawCommands=this._drawCommands.concat("J"+t+";")}}),Object.defineProperty(o.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(t){this._miterLimit=t,this._drawCommands=this._drawCommands.concat("M"+t+";")}}),Object.defineProperty(o.prototype,"globalCompositeOperation",{get:function(){return this._globalCompositeOperation},set:function(t){this._globalCompositeOperation=t;var e=0;switch(t){case"source-over":e=0;break;case"source-atop":e=5;break;case"source-in":e=0;break;case"source-out":e=2;break;case"destination-over":case"destination-atop":case"destination-in":e=4;break;case"destination-out":e=3;break;case"lighter":e=1;break;case"copy":e=2;break;case"xor":e=6;break;default:e=0}this._drawCommands=this._drawCommands.concat("B"+e+";")}}),Object.defineProperty(o.prototype,"textAlign",{get:function(){return this._textAlign},set:function(t){this._textAlign=t;var e=0;switch(t){case"start":e=0;break;case"end":e=1;break;case"left":e=2;break;case"center":e=3;break;case"right":e=4;break;default:e=0}this._drawCommands=this._drawCommands.concat("A"+e+";")}}),Object.defineProperty(o.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(t){this._textBaseline=t;var e=0;switch(t){case"alphabetic":e=0;break;case"middle":e=1;break;case"top":e=2;break;case"hanging":e=3;break;case"bottom":e=4;break;case"ideographic":e=5;break;default:e=0}this._drawCommands=this._drawCommands.concat("E"+e+";")}}),Object.defineProperty(o.prototype,"font",{get:function(){return this._font},set:function(t){this._font=t,this._drawCommands=this._drawCommands.concat("j"+t+";")}}),o.prototype.loadTexture=function(t,e,n){f.preLoadImage(t,function(t){t?(s(t),e&&e(t)):(l.d("GContext2D loadTexture errorCallback!"),n&&n(t))})},o.prototype.unloadTexture=function(t){},o.prototype.setTransform=function(t,e,n,o,r,i){this._drawCommands=this._drawCommands.concat("t"+(1===t?"1":t.toFixed(6))+","+(0===e?"0":e.toFixed(6))+","+(0===n?"0":n.toFixed(6))+","+(1===o?"1":o.toFixed(6))+","+r+","+i+";")},o.prototype.transform=function(t,e,n,o,r,i){this._drawCommands=this._drawCommands.concat("f"+(1===t?"1":t.toFixed(6))+","+(0===e?"0":e.toFixed(6))+","+(0===n?"0":n.toFixed(6))+","+(1===o?"1":o.toFixed(6))+","+r+","+i+";")},o.prototype.resetTransform=function(){this._drawCommands=this._drawCommands.concat("m;")},o.prototype.scale=function(t,e){this._drawCommands=this._drawCommands.concat("k"+t.toFixed(6)+","+e.toFixed(6)+";")},o.prototype.rotate=function(t){this._drawCommands=this._drawCommands.concat("r"+t.toFixed(6)+";")},o.prototype.translate=function(t,e){this._drawCommands=this._drawCommands.concat("l"+t+","+e+";")},o.prototype.save=function(){this._savedGlobalAlpha.push(this._globalAlpha),this._drawCommands=this._drawCommands.concat("v;")},o.prototype.restore=function(){this._drawCommands=this._drawCommands.concat("e;"),this._globalAlpha=this._savedGlobalAlpha.pop()},o.prototype.drawImage=function(t,e,n,o,r,i,a,u,c){"string"!=typeof t&&(t=t.src);var d=h.get(t),p=function(e){s(e),d=h.get(t),y(d)},_=this,y=function(s){var f=arguments.length;_._drawCommands+=null==d?"d"+f+","+t+","+e+","+n+","+o+","+r+","+i+","+a+","+u+","+c+";":"d"+d+","+e+","+n+","+o+","+r+","+i+","+a+","+u+","+c+";",console.log("==========================="+_._drawCommands),l.d("[GContext2D.drawImage]==========================="+_._drawCommands)};null==d?f.preLoadImage(t,p):(l.d("[GContext2D.drawImage] image is cached, pass"),y(d))},o.prototype.render=function(t,e,n){n&&"function"==typeof n&&n();var o=this._drawCommands;this._drawCommands="",null!==o&&""!==o&&(1===e?f.callRender(o):f.callRenderAndroid(o))},o.prototype.capture=function(t,e,n,o,r,i,a){},o.prototype.createPattern=function(t,e){return new r(t,e)},o.prototype.createLinearGradient=function(t,e,n,o){return new i(t,e,n,o)},o.prototype.createRadialGradient=function(t,e,n,o,r,i){return new a(t,e,n,o,r,i)},o.prototype.strokeRect=function(t,e,n,o,r,i){this._drawCommands=this._drawCommands.concat("s"+t+","+e+","+n+","+o+";")},o.prototype.clearRect=function(t,e,n,o,r,i){this._drawCommands=this._drawCommands.concat("c"+t+","+e+","+n+","+o+";")},o.prototype.clip=function(t,e){this._drawCommands=this._drawCommands.concat("p;")},o.prototype.resetClip=function(t,e){this._drawCommands=this._drawCommands.concat("q;")},o.prototype.closePath=function(t,e){this._drawCommands=this._drawCommands.concat("o;")},o.prototype.moveTo=function(t,e,n,o){this._drawCommands=this._drawCommands.concat("g"+t.toFixed(6)+","+e.toFixed(6)+";")},o.prototype.lineTo=function(t,e,n,o){this._drawCommands=this._drawCommands.concat("i"+t.toFixed(6)+","+e.toFixed(6)+";")},o.prototype.quadraticCurveTo=function(t,e,n,o,r,i){this._drawCommands=this._drawCommands.concat("u"+t+","+e+","+n+","+o+";")},o.prototype.bezierCurveTo=function(t,e,n,o,r,i,a,s){this._drawCommands=this._drawCommands.concat("z"+t+","+e+","+n+","+o+","+r+","+i+";")},o.prototype.arcTo=function(t,e,n,o,r,i,a){this._drawCommands=this._drawCommands.concat("h"+t+","+e+","+n+","+o+","+r+";")},o.prototype.beginPath=function(){this._drawCommands=this._drawCommands.concat("b;")},o.prototype.fillRect=function(t,e,n,o){this._drawCommands=this._drawCommands.concat("n"+t+","+e+","+n+","+o+";")},o.prototype.rect=function(t,e,n,o){this._drawCommands=this._drawCommands.concat("w"+t+","+e+","+n+","+o+";")},o.prototype.fill=function(t){this._drawCommands=this._drawCommands.concat("L;")},o.prototype.stroke=function(t){this._drawCommands=this._drawCommands.concat("x;")},o.prototype.arc=function(t,e,n,o,r,i){var a=0;i&&(a=1),this._drawCommands=this._drawCommands.concat("y"+t+","+e+","+n+","+o+","+r+","+a+";")},o.prototype.fillText=function(t,e,n){var o=t.replace(/!/g,"!!");o=o.replace(/,/g,"!,"),o=o.replace(/;/g,"!;"),this._drawCommands=this._drawCommands.concat("T"+o+","+e+","+n+",0.0;")},o.prototype.strokeText=function(t,e,n){this._drawCommands=this._drawCommands.concat("U"+t+","+e+","+n+",0.0;")},o.prototype.measureText=function(t){return-1},o.prototype.isPointInPath=function(t,e){return!0},o.prototype.createImageData=function(t,e){return l.d("GContext2D::createImageData wh="+t+","+e),new c(t,e)},o.prototype._putImageData=function(t,e,n,o,r,i,a){this._drawCommands=this._drawCommands.concat("P"+e+","+n+","+o+","+r+","+i+","+a+","+u(t)+";")},o.prototype.putImageData=function(t,e,n,o,r,i,a){if(l.d("GContext2D::putImageData ["+arguments.length+"] dest_xy=("+e+","+n+") dirty_xy=("+o+","+r+") dirty_wh=("+i+","+a+") "),arguments.length<=3)this._putImageData(t.data,e,n,t.width,t.height,t.width,t.height);else{for(var s,u=new Uint8Array(i*a*4),c=0,f=0;f<a;f++){s=4*(t.width*(r+f)+o);for(var d=0;d<i;++d)u[c++]=t.data[s++],u[c++]=t.data[s++],u[c++]=t.data[s++],u[c++]=t.data[s++]}this._putImageData(u,e+o,n+r,i,a,i,a)}},o.prototype.getImageDataAsyn=function(t,e,n,o){return""},t.exports=o},function(t,e){var n={};n._nullFunc=function(){},n.d=n._nullFunc,n.i=n._nullFunc,n.w=n._nullFunc,n.e=n._nullFunc,n._nativeEnable=!1,n._setNativeLevel=function(t){},n._refresh=function(){0==this.enable?(this._setNativeLevel(-1),this.d=this._nullFunc,this.i=this._nullFunc,this.w=this._nullFunc,this.e=this._nullFunc):(this.level<=3?this.e=function(t){console.error(t)}:this.e=this._nullFunc,this.level<=2?this.w=function(t){console.warn(t)}:this.w=this._nullFunc,this.level<=1?this.i=function(t){console.info(t)}:this.i=this._nullFunc,this.level<=0?this.d=function(t){console.info(t)}:this.d=this._nullFunc,this._setNativeLevel(this.level))},n.enable=function(){this.enable=!0,this._refresh()},n.disable=function(){this.enable=!1,this._refresh()},n.setLevel=function(t){console.info("[setLevel] "+this.level+"=>"+t),this.level=t,this.enable=!0,this._refresh()},n.setLevel(0),t.exports.GLog=n}])}); |
{ | ||
"name": "rax-barcode", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "barcode component for Rax.", | ||
@@ -26,4 +26,4 @@ "license": "BSD-3-Clause", | ||
"dependencies": { | ||
"rax-canvas": "^0.3.5", | ||
"universal-stylesheet": "^0.3.5" | ||
"rax-canvas": "^0.3.6", | ||
"universal-stylesheet": "^0.3.6" | ||
}, | ||
@@ -34,4 +34,4 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"rax-test-renderer": "^0.3.5" | ||
"rax-test-renderer": "^0.3.6" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
660442
8059
Updatedrax-canvas@^0.3.6
Updateduniversal-stylesheet@^0.3.6