diff --git a/CHANGES.md b/CHANGES.md
index b8629d7..41c312d 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,7 @@
+## Version 3.0.1, 2017.06.01
+
+* Correct file sizes of distribution files in README [#82](https://github.com/neocotic/qrious/issues/82)
+
## Version 3.0.0, 2017.06.01
* Reduce size of distribution files [#59](https://github.com/neocotic/qrious/issues/59) (**breaking change**)
diff --git a/README.md b/README.md
index dd3d124..a6ccc96 100644
--- a/README.md
+++ b/README.md
@@ -39,8 +39,8 @@ you want to install that way instead of using `npm`.
If you want to simply download the file to be used in the browser you can find them below:
-* [Development Version](https://cdn.rawgit.com/neocotic/qrious/master/dist/qrious.js) (123kb - [Source Map](https://cdn.rawgit.com/neocotic/qrious/master/dist/qrious.js.map))
-* [Production Version](https://cdn.rawgit.com/neocotic/qrious/master/dist/qrious.min.js) (37kb - [Source Map](https://cdn.rawgit.com/neocotic/qrious/master/dist/qrious.min.js.map))
+* [Development Version](https://cdn.rawgit.com/neocotic/qrious/master/dist/qrious.js) (71kb - [Source Map](https://cdn.rawgit.com/neocotic/qrious/master/dist/qrious.js.map))
+* [Production Version](https://cdn.rawgit.com/neocotic/qrious/master/dist/qrious.min.js) (18kb - [Source Map](https://cdn.rawgit.com/neocotic/qrious/master/dist/qrious.min.js.map))
### Node.js Dependencies
@@ -215,7 +215,7 @@ The current version of `QRious`.
``` javascript
QRious.VERSION;
-//=> "3.0.0"
+//=> "3.0.1"
```
## Migrating from v1
diff --git a/bower.json b/bower.json
index 8f01fe7..f5150b2 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "qrious",
- "version": "3.0.0",
+ "version": "3.0.1",
"description": "Library for QR code generation using canvas",
"homepage": "https://github.com/neocotic/qrious",
"authors": [
diff --git a/dist/qrious.js b/dist/qrious.js
index eac7829..0228526 100644
--- a/dist/qrious.js
+++ b/dist/qrious.js
@@ -1,5 +1,5 @@
/*
- * QRious v3.0.0
+ * QRious v3.0.1
* Copyright (C) 2017 Alasdair Mercer
* Copyright (C) 2010 Tom Zerucha
*
@@ -2291,7 +2291,7 @@
* @type {string}
* @memberof QRious
*/
- VERSION: '3.0.0',
+ VERSION: '3.0.1',
/**
* Configures the service
provided to be used by all {@link QRious} instances.
diff --git a/dist/qrious.js.map b/dist/qrious.js.map
index 9ed2ce2..51254f2 100644
--- a/dist/qrious.js.map
+++ b/dist/qrious.js.map
@@ -1 +1 @@
-{"version":3,"file":"qrious.js","sources":["../node_modules/nevis/src/extend.js","../node_modules/nevis/src/nevis.js","../node_modules/nevis/lite.js","../src/service/Service.js","../src/service/element/ElementService.js","../src/service/element/BrowserElementService.js","../src/renderer/Renderer.js","../src/renderer/CanvasRenderer.js","../src/Alignment.js","../src/ErrorCorrection.js","../src/Galois.js","../src/Version.js","../src/Frame.js","../src/renderer/ImageRenderer.js","../src/option/Option.js","../src/util/Utilities.js","../src/option/OptionManager.js","../src/service/ServiceManager.js","../src/QRious.js","../src/runtime/browser.js"],"sourcesContent":["/*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n'use strict';\n\n/**\n * A bare-bones constructor for surrogate prototype swapping.\n *\n * @private\n * @constructor\n */\nvar Constructor = /* istanbul ignore next */ function() {};\n/**\n * A reference to Object.prototype.hasOwnProperty
.\n *\n * @private\n * @type {Function}\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * A reference to Array.prototype.slice
.\n *\n * @private\n * @type {Function}\n */\nvar slice = Array.prototype.slice;\n\n/**\n * Creates an object which inherits the given prototype
.\n *\n * Optionally, the created object can be extended further with the specified properties
.\n *\n * @param {Object} prototype - the prototype to be inherited by the created object\n * @param {Object} [properties] - the optional properties to be extended by the created object\n * @return {Object} The newly created object.\n * @private\n */\nfunction createObject(prototype, properties) {\n var result;\n /* istanbul ignore next */\n if (typeof Object.create === 'function') {\n result = Object.create(prototype);\n } else {\n Constructor.prototype = prototype;\n result = new Constructor();\n Constructor.prototype = null;\n }\n\n if (properties) {\n extendObject(true, result, properties);\n }\n\n return result;\n}\n\n/**\n * Extends the constructor to which this method is associated with the prototype
and/or\n * statics
provided.\n *\n * If name
is provided, it will be used as the class name and can be accessed via a special\n * class_
property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString
), but this is not applicable to the lite version of Nevis.\n *\n * If constructor
is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_
property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor
provided or the one created if none was given.\n * @public\n */\nfunction extend(name, constructor, prototype, statics) {\n var superConstructor = this;\n\n if (typeof name !== 'string') {\n statics = prototype;\n prototype = constructor;\n constructor = name;\n name = null;\n }\n\n if (typeof constructor !== 'function') {\n statics = prototype;\n prototype = constructor;\n constructor = function() {\n return superConstructor.apply(this, arguments);\n };\n }\n\n extendObject(false, constructor, superConstructor, statics);\n\n constructor.prototype = createObject(superConstructor.prototype, prototype);\n constructor.prototype.constructor = constructor;\n\n constructor.class_ = name || superConstructor.class_;\n constructor.super_ = superConstructor;\n\n return constructor;\n}\n\n/**\n * Extends the specified target
object with the properties in each of the sources
provided.\n *\n * if any source is null
it will be ignored.\n *\n * @param {boolean} own - true
to only copy own properties from sources
onto\n * target
; otherwise false
\n * @param {Object} target - the target object which should be extended\n * @param {...Object} [sources] - the source objects whose properties are to be copied onto target
\n * @return {void}\n * @private\n */\nfunction extendObject(own, target, sources) {\n sources = slice.call(arguments, 2);\n\n var property;\n var source;\n\n for (var i = 0, length = sources.length; i < length; i++) {\n source = sources[i];\n\n for (property in source) {\n if (!own || hasOwnProperty.call(source, property)) {\n target[property] = source[property];\n }\n }\n }\n}\n\nmodule.exports = extend;\n","/*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n'use strict';\n\nvar extend = require('./extend');\n\n/**\n * The base class from which all others should extend.\n *\n * @public\n * @constructor\n */\nfunction Nevis() {}\nNevis.class_ = 'Nevis';\nNevis.super_ = Object;\n\n/**\n * Extends the constructor to which this method is associated with the prototype
and/or\n * statics
provided.\n *\n * If name
is provided, it will be used as the class name and can be accessed via a special\n * class_
property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString
), but this is not applicable to the lite version of Nevis.\n *\n * If constructor
is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_
property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor
provided or the one created if none was given.\n * @public\n * @static\n * @memberof Nevis\n */\nNevis.extend = extend;\n\nmodule.exports = Nevis;\n","/*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n'use strict';\n\nmodule.exports = require('./src/nevis');\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Service = Nevis.extend({\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {string} The service name.\n * @public\n * @abstract\n * @memberof Service#\n */\n getName: function() {}\n\n});\n\nmodule.exports = Service;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Service = require('../Service');\n\n/**\n * A service for working with elements.\n *\n * @public\n * @class\n * @extends Service\n */\nvar ElementService = Service.extend({\n\n /**\n * Creates an instance of a canvas element.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @return {*} The newly created canvas element.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n createCanvas: function() {},\n\n /**\n * Creates an instance of a image element.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @return {*} The newly created image element.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n createImage: function() {},\n\n /**\n * @override\n */\n getName: function() {\n return 'element';\n },\n\n /**\n * Returns whether the specified element
is a canvas.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @param {*} element - the element to be checked\n * @return {boolean} true
if element
is a canvas; otherwise false
.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n isCanvas: function(element) {},\n\n /**\n * Returns whether the specified element
is an image.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @param {*} element - the element to be checked\n * @return {boolean} true
if element
is an image; otherwise false
.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n isImage: function(element) {}\n\n});\n\nmodule.exports = ElementService;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar ElementService = require('./ElementService');\n\n/**\n * An implementation of {@link ElementService} intended for use within a browser environment.\n *\n * @public\n * @class\n * @extends ElementService\n */\nvar BrowserElementService = ElementService.extend({\n\n /**\n * @override\n */\n createCanvas: function() {\n return document.createElement('canvas');\n },\n\n /**\n * @override\n */\n createImage: function() {\n return document.createElement('img');\n },\n\n /**\n * @override\n */\n isCanvas: function(element) {\n return element instanceof HTMLCanvasElement;\n },\n\n /**\n * @override\n */\n isImage: function(element) {\n return element instanceof HTMLImageElement;\n }\n\n});\n\nmodule.exports = BrowserElementService;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so the ordering of their execution is important.\n *\n * The rendering of a element can be deferred by disabling the renderer initially, however, any attempt get the element\n * from the renderer will result in it being immediately enabled and the element being rendered.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @param {*} element - the element onto which the QR code is to be rendered\n * @param {boolean} [enabled] - true
this {@link Renderer} is enabled; otherwise false
.\n * @public\n * @class\n * @extends Nevis\n */\nvar Renderer = Nevis.extend(function(qrious, element, enabled) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n * @memberof Renderer#\n */\n this.qrious = qrious;\n\n /**\n * The element onto which this {@link Renderer} is rendering the QR code.\n *\n * @protected\n * @type {*}\n * @memberof Renderer#\n */\n this.element = element;\n this.element.qrious = qrious;\n\n /**\n * Whether this {@link Renderer} is enabled.\n *\n * @protected\n * @type {boolean}\n * @memberof Renderer#\n */\n this.enabled = Boolean(enabled);\n}, {\n\n /**\n * Draws the specified QR code frame
on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n draw: function(frame) {},\n\n /**\n * Returns the element onto which this {@link Renderer} is rendering the QR code.\n *\n * If this method is called while this {@link Renderer} is disabled, it will be immediately enabled and rendered\n * before the element is returned.\n *\n * @return {*} The element.\n * @public\n * @memberof Renderer#\n */\n getElement: function() {\n if (!this.enabled) {\n this.enabled = true;\n this.render();\n }\n\n return this.element;\n },\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame
provided.\n *\n * Any configured padding will be excluded from the returned size.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n * @memberof Renderer#\n */\n getModuleSize: function(frame) {\n var qrious = this.qrious;\n var padding = qrious.padding || 0;\n var pixels = Math.floor((qrious.size - (padding * 2)) / frame.width);\n\n return Math.max(1, pixels);\n },\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame
\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n * @memberof Renderer#\n */\n getOffset: function(frame) {\n var qrious = this.qrious;\n var padding = qrious.padding;\n\n if (padding != null) {\n return padding;\n }\n\n var moduleSize = this.getModuleSize(frame);\n var offset = Math.floor((qrious.size - (moduleSize * frame.width)) / 2);\n\n return Math.max(0, offset);\n },\n\n /**\n * Renders a QR code on the underlying element based on the frame
provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @return {void}\n * @public\n * @memberof Renderer#\n */\n render: function(frame) {\n if (this.enabled) {\n this.resize();\n this.reset();\n this.draw(frame);\n }\n },\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n reset: function() {},\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n resize: function() {}\n\n});\n\nmodule.exports = Renderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Renderer = require('./Renderer');\n\n/**\n * An implementation of {@link Renderer} for working with canvas
elements.\n *\n * @public\n * @class\n * @extends Renderer\n */\nvar CanvasRenderer = Renderer.extend({\n\n /**\n * @override\n */\n draw: function(frame) {\n var i, j;\n var qrious = this.qrious;\n var moduleSize = this.getModuleSize(frame);\n var offset = this.getOffset(frame);\n var context = this.element.getContext('2d');\n\n context.fillStyle = qrious.foreground;\n context.globalAlpha = qrious.foregroundAlpha;\n\n for (i = 0; i < frame.width; i++) {\n for (j = 0; j < frame.width; j++) {\n if (frame.buffer[(j * frame.width) + i]) {\n context.fillRect((moduleSize * i) + offset, (moduleSize * j) + offset, moduleSize, moduleSize);\n }\n }\n }\n },\n\n /**\n * @override\n */\n reset: function() {\n var qrious = this.qrious;\n var context = this.element.getContext('2d');\n var size = qrious.size;\n\n context.lineWidth = 1;\n context.clearRect(0, 0, size, size);\n context.fillStyle = qrious.background;\n context.globalAlpha = qrious.backgroundAlpha;\n context.fillRect(0, 0, size, size);\n },\n\n /**\n * @override\n */\n resize: function() {\n var element = this.element;\n\n element.width = element.height = this.qrious.size;\n }\n\n});\n\nmodule.exports = CanvasRenderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\n/* eslint no-multi-spaces: \"off\" */\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Alignment = Nevis.extend(null, {\n\n /**\n * The alignment pattern block.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Alignment\n */\n BLOCK: [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n\n});\n\nmodule.exports = Alignment;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\n/* eslint no-multi-spaces: \"off\" */\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains error correction information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar ErrorCorrection = Nevis.extend(null, {\n\n /**\n * The error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof ErrorCorrection\n */\n BLOCKS: [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ],\n\n /**\n * The final format bits with mask (level << 3 | mask).\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof ErrorCorrection\n */\n FINAL_FORMAT: [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ],\n\n /**\n * A map of human-readable ECC levels.\n *\n * @public\n * @static\n * @type {Object.}\n * @memberof ErrorCorrection\n */\n LEVELS: {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n\n});\n\nmodule.exports = ErrorCorrection;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains Galois field information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Galois = Nevis.extend(null, {\n\n /**\n * The Galois field exponent table.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Galois\n */\n EXPONENT: [\n 0x01, 0x02, 0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, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,\n 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,\n 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ],\n\n /**\n * The Galois field log table.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Galois\n */\n LOG: [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6,\n 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88,\n 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40,\n 0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d,\n 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57,\n 0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18,\n 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e,\n 0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61,\n 0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2,\n 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6,\n 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a,\n 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n\n});\n\nmodule.exports = Galois;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains version pattern information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Version = Nevis.extend(null, {\n\n /**\n * The version pattern block.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Version\n */\n BLOCK: [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n\n});\n\nmodule.exports = Version;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar Alignment = require('./Alignment');\nvar ErrorCorrection = require('./ErrorCorrection');\nvar Galois = require('./Galois');\nvar Version = require('./Version');\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar Frame = Nevis.extend(function(options) {\n var dataBlock, eccBlock, index, neccBlock1, neccBlock2;\n var valueLength = options.value.length;\n\n this._badness = [];\n this._level = ErrorCorrection.LEVELS[options.level];\n this._polynomial = [];\n this._value = options.value;\n this._version = 0;\n this._stringBuffer = [];\n\n while (this._version < 40) {\n this._version++;\n\n index = ((this._level - 1) * 4) + ((this._version - 1) * 16);\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++];\n neccBlock2 = ErrorCorrection.BLOCKS[index++];\n dataBlock = ErrorCorrection.BLOCKS[index++];\n eccBlock = ErrorCorrection.BLOCKS[index];\n\n index = (dataBlock * (neccBlock1 + neccBlock2)) + neccBlock2 - 3 + (this._version <= 9);\n\n if (valueLength <= index) {\n break;\n }\n }\n\n this._dataBlock = dataBlock;\n this._eccBlock = eccBlock;\n this._neccBlock1 = neccBlock1;\n this._neccBlock2 = neccBlock2;\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {number}\n * @memberof Frame#\n */\n // FIXME: Ensure that it fits instead of being truncated.\n var width = this.width = 17 + (4 * this._version);\n\n /**\n * The image buffer.\n *\n * @public\n * @type {number[]}\n * @memberof Frame#\n */\n this.buffer = Frame._createArray(width * width);\n\n this._ecc = Frame._createArray(dataBlock + ((dataBlock + eccBlock) * (neccBlock1 + neccBlock2)) + neccBlock2);\n this._mask = Frame._createArray(((width * (width + 1)) + 1) / 2);\n\n this._insertFinders();\n this._insertAlignments();\n\n // Insert single foreground cell.\n this.buffer[8 + (width * (width - 8))] = 1;\n\n this._insertTimingGap();\n this._reverseMask();\n this._insertTimingRowAndColumn();\n this._insertVersion();\n this._syncMask();\n this._convertBitStream(valueLength);\n this._calculatePolynomial();\n this._appendEccToData();\n this._interleaveBlocks();\n this._pack();\n this._finish();\n}, {\n\n _addAlignment: function(x, y) {\n var i;\n var buffer = this.buffer;\n var width = this.width;\n\n buffer[x + (width * y)] = 1;\n\n for (i = -2; i < 2; i++) {\n buffer[x + i + (width * (y - 2))] = 1;\n buffer[x - 2 + (width * (y + i + 1))] = 1;\n buffer[x + 2 + (width * (y + i))] = 1;\n buffer[x + i + 1 + (width * (y + 2))] = 1;\n }\n\n for (i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i);\n this._setMask(x + 1, y - i);\n this._setMask(x - i, y - 1);\n this._setMask(x + i, y + 1);\n }\n },\n\n _appendData: function(data, dataLength, ecc, eccLength) {\n var bit, i, j;\n var polynomial = this._polynomial;\n var stringBuffer = this._stringBuffer;\n\n for (i = 0; i < eccLength; i++) {\n stringBuffer[ecc + i] = 0;\n }\n\n for (i = 0; i < dataLength; i++) {\n bit = Galois.LOG[stringBuffer[data + i] ^ stringBuffer[ecc]];\n\n if (bit !== 255) {\n for (j = 1; j < eccLength; j++) {\n stringBuffer[ecc + j - 1] = stringBuffer[ecc + j] ^\n Galois.EXPONENT[Frame._modN(bit + polynomial[eccLength - j])];\n }\n } else {\n for (j = ecc; j < ecc + eccLength; j++) {\n stringBuffer[j] = stringBuffer[j + 1];\n }\n }\n\n stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + polynomial[0])];\n }\n },\n\n _appendEccToData: function() {\n var i;\n var data = 0;\n var dataBlock = this._dataBlock;\n var ecc = this._calculateMaxLength();\n var eccBlock = this._eccBlock;\n\n for (i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, dataBlock, ecc, eccBlock);\n\n data += dataBlock;\n ecc += eccBlock;\n }\n\n for (i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, dataBlock + 1, ecc, eccBlock);\n\n data += dataBlock + 1;\n ecc += eccBlock;\n }\n },\n\n _applyMask: function(mask) {\n var r3x, r3y, x, y;\n var buffer = this.buffer;\n var width = this.width;\n\n switch (mask) {\n case 0:\n for (y = 0; y < width; y++) {\n for (x = 0; x < width; x++) {\n if (!((x + y) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 1:\n for (y = 0; y < width; y++) {\n for (x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 2:\n for (y = 0; y < width; y++) {\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 3:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 4:\n for (y = 0; y < width; y++) {\n for (r3x = 0, r3y = (y >> 1) & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n r3y = !r3y;\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 5:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 6:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((x & y & 1) + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 7:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n }\n },\n\n _calculateMaxLength: function() {\n return (this._dataBlock * (this._neccBlock1 + this._neccBlock2)) + this._neccBlock2;\n },\n\n _calculatePolynomial: function() {\n var i, j;\n var eccBlock = this._eccBlock;\n var polynomial = this._polynomial;\n\n polynomial[0] = 1;\n\n for (i = 0; i < eccBlock; i++) {\n polynomial[i + 1] = 1;\n\n for (j = i; j > 0; j--) {\n polynomial[j] = polynomial[j] ? polynomial[j - 1] ^\n Galois.EXPONENT[Frame._modN(Galois.LOG[polynomial[j]] + i)] : polynomial[j - 1];\n }\n\n polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[polynomial[0]] + i)];\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (i = 0; i <= eccBlock; i++) {\n polynomial[i] = Galois.LOG[polynomial[i]];\n }\n },\n\n _checkBadness: function() {\n var b, b1, h, x, y;\n var bad = 0;\n var badness = this._badness;\n var buffer = this.buffer;\n var width = this.width;\n\n // Blocks of same colour.\n for (y = 0; y < width - 1; y++) {\n for (x = 0; x < width - 1; x++) {\n // All foreground colour.\n if ((buffer[x + (width * y)] &&\n buffer[x + 1 + (width * y)] &&\n buffer[x + (width * (y + 1))] &&\n buffer[x + 1 + (width * (y + 1))]) ||\n // All background colour.\n !(buffer[x + (width * y)] ||\n buffer[x + 1 + (width * y)] ||\n buffer[x + (width * (y + 1))] ||\n buffer[x + 1 + (width * (y + 1))])) {\n bad += Frame.N2;\n }\n }\n }\n\n var bw = 0;\n\n // X runs.\n for (y = 0; y < width; y++) {\n h = 0;\n\n badness[0] = 0;\n\n for (b = 0, x = 0; x < width; x++) {\n b1 = buffer[x + (width * y)];\n\n if (b === b1) {\n badness[h]++;\n } else {\n badness[++h] = 1;\n }\n\n b = b1;\n bw += b ? 1 : -1;\n }\n\n bad += this._getBadness(h);\n }\n\n if (bw < 0) {\n bw = -bw;\n }\n\n var count = 0;\n var big = bw;\n big += big << 2;\n big <<= 1;\n\n while (big > width * width) {\n big -= width * width;\n count++;\n }\n\n bad += count * Frame.N4;\n\n // Y runs.\n for (x = 0; x < width; x++) {\n h = 0;\n\n badness[0] = 0;\n\n for (b = 0, y = 0; y < width; y++) {\n b1 = buffer[x + (width * y)];\n\n if (b === b1) {\n badness[h]++;\n } else {\n badness[++h] = 1;\n }\n\n b = b1;\n }\n\n bad += this._getBadness(h);\n }\n\n return bad;\n },\n\n _convertBitStream: function(length) {\n var bit, i;\n var ecc = this._ecc;\n var version = this._version;\n\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanumeric, or kanji not supported).\n for (i = 0; i < length; i++) {\n ecc[i] = this._value.charCodeAt(i);\n }\n\n var stringBuffer = this._stringBuffer = ecc.slice();\n var maxLength = this._calculateMaxLength();\n\n if (length >= maxLength - 2) {\n length = maxLength - 2;\n\n if (version > 9) {\n length--;\n }\n }\n\n // Shift and re-pack to insert length prefix.\n var index = length;\n\n if (version > 9) {\n stringBuffer[index + 2] = 0;\n stringBuffer[index + 3] = 0;\n\n while (index--) {\n bit = stringBuffer[index];\n\n stringBuffer[index + 3] |= 255 & (bit << 4);\n stringBuffer[index + 2] = bit >> 4;\n }\n\n stringBuffer[2] |= 255 & (length << 4);\n stringBuffer[1] = length >> 4;\n stringBuffer[0] = 0x40 | (length >> 12);\n } else {\n stringBuffer[index + 1] = 0;\n stringBuffer[index + 2] = 0;\n\n while (index--) {\n bit = stringBuffer[index];\n\n stringBuffer[index + 2] |= 255 & (bit << 4);\n stringBuffer[index + 1] = bit >> 4;\n }\n\n stringBuffer[1] |= 255 & (length << 4);\n stringBuffer[0] = 0x40 | (length >> 4);\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (version < 10);\n\n while (index < maxLength) {\n stringBuffer[index++] = 0xec;\n stringBuffer[index++] = 0x11;\n }\n },\n\n _getBadness: function(length) {\n var i;\n var badRuns = 0;\n var badness = this._badness;\n\n for (i = 0; i <= length; i++) {\n if (badness[i] >= 5) {\n badRuns += Frame.N1 + badness[i] - 5;\n }\n }\n\n // FBFFFBF as in finder.\n for (i = 3; i < length - 1; i += 2) {\n if (badness[i - 2] === badness[i + 2] &&\n badness[i + 2] === badness[i - 1] &&\n badness[i - 1] === badness[i + 1] &&\n badness[i - 1] * 3 === badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (badness[i - 3] === 0 || i + 3 > length ||\n badness[i - 3] * 3 >= badness[i] * 4 ||\n badness[i + 3] * 3 >= badness[i] * 4)) {\n badRuns += Frame.N3;\n }\n }\n\n return badRuns;\n },\n\n _finish: function() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice();\n\n var currentMask, i;\n var bit = 0;\n var mask = 30000;\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i);\n\n currentMask = this._checkBadness();\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask;\n bit = i;\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break;\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice();\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit);\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)];\n\n var buffer = this.buffer;\n var width = this.width;\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n buffer[width - 1 - i + (width * 8)] = 1;\n\n if (i < 6) {\n buffer[8 + (width * i)] = 1;\n } else {\n buffer[8 + (width * (i + 1))] = 1;\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n buffer[8 + (width * (width - 7 + i))] = 1;\n\n if (i) {\n buffer[6 - i + (width * 8)] = 1;\n } else {\n buffer[7 + (width * 8)] = 1;\n }\n }\n }\n },\n\n _interleaveBlocks: function() {\n var i, j;\n var dataBlock = this._dataBlock;\n var ecc = this._ecc;\n var eccBlock = this._eccBlock;\n var k = 0;\n var maxLength = this._calculateMaxLength();\n var neccBlock1 = this._neccBlock1;\n var neccBlock2 = this._neccBlock2;\n var stringBuffer = this._stringBuffer;\n\n for (i = 0; i < dataBlock; i++) {\n for (j = 0; j < neccBlock1; j++) {\n ecc[k++] = stringBuffer[i + (j * dataBlock)];\n }\n\n for (j = 0; j < neccBlock2; j++) {\n ecc[k++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];\n }\n }\n\n for (j = 0; j < neccBlock2; j++) {\n ecc[k++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];\n }\n\n for (i = 0; i < eccBlock; i++) {\n for (j = 0; j < neccBlock1 + neccBlock2; j++) {\n ecc[k++] = stringBuffer[maxLength + i + (j * eccBlock)];\n }\n }\n\n this._stringBuffer = ecc;\n },\n\n _insertAlignments: function() {\n var i, x, y;\n var version = this._version;\n var width = this.width;\n\n if (version > 1) {\n i = Alignment.BLOCK[version];\n y = width - 7;\n\n for (;;) {\n x = width - 7;\n\n while (x > i - 3) {\n this._addAlignment(x, y);\n\n if (x < i) {\n break;\n }\n\n x -= i;\n }\n\n if (y <= i + 9) {\n break;\n }\n\n y -= i;\n\n this._addAlignment(6, y);\n this._addAlignment(y, 6);\n }\n }\n },\n\n _insertFinders: function() {\n var i, j, x, y;\n var buffer = this.buffer;\n var width = this.width;\n\n for (i = 0; i < 3; i++) {\n j = 0;\n y = 0;\n\n if (i === 1) {\n j = width - 7;\n }\n if (i === 2) {\n y = width - 7;\n }\n\n buffer[y + 3 + (width * (j + 3))] = 1;\n\n for (x = 0; x < 6; x++) {\n buffer[y + x + (width * j)] = 1;\n buffer[y + (width * (j + x + 1))] = 1;\n buffer[y + 6 + (width * (j + x))] = 1;\n buffer[y + x + 1 + (width * (j + 6))] = 1;\n }\n\n for (x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1);\n this._setMask(y + 1, j + x + 1);\n this._setMask(y + 5, j + x);\n this._setMask(y + x + 1, j + 5);\n }\n\n for (x = 2; x < 4; x++) {\n buffer[y + x + (width * (j + 2))] = 1;\n buffer[y + 2 + (width * (j + x + 1))] = 1;\n buffer[y + 4 + (width * (j + x))] = 1;\n buffer[y + x + 1 + (width * (j + 4))] = 1;\n }\n }\n },\n\n _insertTimingGap: function() {\n var x, y;\n var width = this.width;\n\n for (y = 0; y < 7; y++) {\n this._setMask(7, y);\n this._setMask(width - 8, y);\n this._setMask(7, y + width - 7);\n }\n\n for (x = 0; x < 8; x++) {\n this._setMask(x, 7);\n this._setMask(x + width - 8, 7);\n this._setMask(x, width - 8);\n }\n },\n\n _insertTimingRowAndColumn: function() {\n var x;\n var buffer = this.buffer;\n var width = this.width;\n\n for (x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6);\n this._setMask(6, 8 + x);\n } else {\n buffer[8 + x + (width * 6)] = 1;\n buffer[6 + (width * (8 + x))] = 1;\n }\n }\n },\n\n _insertVersion: function() {\n var i, j, x, y;\n var buffer = this.buffer;\n var version = this._version;\n var width = this.width;\n\n if (version > 6) {\n i = Version.BLOCK[version - 7];\n j = 17;\n\n for (x = 0; x < 6; x++) {\n for (y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? version >> j - 12 : i >> j)) {\n buffer[5 - x + (width * (2 - y + width - 11))] = 1;\n buffer[2 - y + width - 11 + (width * (5 - x))] = 1;\n } else {\n this._setMask(5 - x, 2 - y + width - 11);\n this._setMask(2 - y + width - 11, 5 - x);\n }\n }\n }\n }\n },\n\n _isMasked: function(x, y) {\n var bit = Frame._getMaskBit(x, y);\n\n return this._mask[bit] === 1;\n },\n\n _pack: function() {\n var bit, i, j;\n var k = 1;\n var v = 1;\n var width = this.width;\n var x = width - 1;\n var y = width - 1;\n\n // Interleaved data and ECC codes.\n var length = ((this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2)) + this._neccBlock2;\n\n for (i = 0; i < length; i++) {\n bit = this._stringBuffer[i];\n\n for (j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + (width * y)] = 1;\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--;\n } else {\n x++;\n\n if (k) {\n if (y !== 0) {\n y--;\n } else {\n x -= 2;\n k = !k;\n\n if (x === 6) {\n x--;\n y = 9;\n }\n }\n } else if (y !== width - 1) {\n y++;\n } else {\n x -= 2;\n k = !k;\n\n if (x === 6) {\n x--;\n y -= 8;\n }\n }\n }\n\n v = !v;\n } while (this._isMasked(x, y));\n }\n }\n },\n\n _reverseMask: function() {\n var x, y;\n var width = this.width;\n\n for (x = 0; x < 9; x++) {\n this._setMask(x, 8);\n }\n\n for (x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8);\n this._setMask(8, x);\n }\n\n for (y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7);\n }\n },\n\n _setMask: function(x, y) {\n var bit = Frame._getMaskBit(x, y);\n\n this._mask[bit] = 1;\n },\n\n _syncMask: function() {\n var x, y;\n var width = this.width;\n\n for (y = 0; y < width; y++) {\n for (x = 0; x <= y; x++) {\n if (this.buffer[x + (width * y)]) {\n this._setMask(x, y);\n }\n }\n }\n }\n\n}, {\n\n _createArray: function(length) {\n var i;\n var array = [];\n\n for (i = 0; i < length; i++) {\n array[i] = 0;\n }\n\n return array;\n },\n\n _getMaskBit: function(x, y) {\n var bit;\n\n if (x > y) {\n bit = x;\n x = y;\n y = bit;\n }\n\n bit = y;\n bit += y * y;\n bit >>= 1;\n bit += x;\n\n return bit;\n },\n\n _modN: function(x) {\n while (x >= 255) {\n x -= 255;\n x = (x >> 8) + (x & 255);\n }\n\n return x;\n },\n\n // *Badness* coefficients.\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n\n});\n\nmodule.exports = Frame;\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {string} level - The ECC level to be used.\n * @property {string} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Renderer = require('./Renderer');\n\n/**\n * An implementation of {@link Renderer} for working with img
elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas
element as the src
for the img
element being rendered.\n *\n * @public\n * @class\n * @extends Renderer\n */\nvar ImageRenderer = Renderer.extend({\n\n /**\n * @override\n */\n draw: function() {\n this.element.src = this.qrious.toDataURL();\n },\n\n /**\n * @override\n */\n reset: function() {\n this.element.src = '';\n },\n\n /**\n * @override\n */\n resize: function() {\n var element = this.element;\n\n element.width = element.height = this.qrious.size;\n }\n\n});\n\nmodule.exports = ImageRenderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Defines an available option while also configuring how values are applied to the target object.\n *\n * Optionally, a default value can be specified as well a value transformer for greater control over how the option\n * value is applied.\n *\n * If no value transformer is specified, then any specified option will be applied directly. All values are maintained\n * on the target object itself as a field using the option name prefixed with a single underscore.\n *\n * When an option is specified as modifiable, the {@link OptionManager} will be required to include a setter for the\n * property that is defined on the target object that uses the option name.\n *\n * @param {string} name - the name to be used\n * @param {boolean} [modifiable] - true
if the property defined on target objects should include a setter;\n * otherwise false
\n * @param {*} [defaultValue] - the default value to be used\n * @param {Option~ValueTransformer} [valueTransformer] - the value transformer to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar Option = Nevis.extend(function(name, modifiable, defaultValue, valueTransformer) {\n /**\n * The name for this {@link Option}.\n *\n * @public\n * @type {string}\n * @memberof Option#\n */\n this.name = name;\n\n /**\n * Whether a setter should be included on the property defined on target objects for this {@link Option}.\n *\n * @public\n * @type {boolean}\n * @memberof Option#\n */\n this.modifiable = Boolean(modifiable);\n\n /**\n * The default value for this {@link Option}.\n *\n * @public\n * @type {*}\n * @memberof Option#\n */\n this.defaultValue = defaultValue;\n\n this._valueTransformer = valueTransformer;\n}, {\n\n /**\n * Transforms the specified value
so that it can be applied for this {@link Option}.\n *\n * If a value transformer has been specified for this {@link Option}, it will be called upon to transform\n * value
. Otherwise, value
will be returned directly.\n *\n * @param {*} value - the value to be transformed\n * @return {*} The transformed value or value
if no value transformer is specified.\n * @public\n * @memberof Option#\n */\n transform: function(value) {\n var transformer = this._valueTransformer;\n if (typeof transformer === 'function') {\n return transformer(value, this);\n }\n\n return value;\n }\n\n});\n\nmodule.exports = Option;\n\n/**\n * Returns a transformed value for the specified value
to be applied for the option
provided.\n *\n * @callback Option~ValueTransformer\n * @param {*} value - the value to be transformed\n * @param {Option} option - the {@link Option} for which value
is being transformed\n * @return {*} The transform value.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Utilities = Nevis.extend(null, {\n\n /**\n * Returns the absolute value of a given number.\n *\n * This method is simply a convenient shorthand for Math.abs
while ensuring that nulls are returned as\n * null
instead of zero.\n *\n * @param {number} value - the number whose absolute value is to be returned\n * @return {number} The absolute value of value
or null
if value
is\n * null
.\n * @public\n * @static\n * @memberof Utilities\n */\n abs: function(value) {\n return value != null ? Math.abs(value) : null;\n },\n\n /**\n * Returns whether the specified object
has a property with the specified name
as an own\n * (not inherited) property.\n *\n * @param {Object} object - the object on which the property is to be checked\n * @param {string} name - the name of the property to be checked\n * @return {boolean} true
if object
has an own property with name
.\n * @public\n * @static\n * @memberof Utilities\n */\n hasOwn: function(object, name) {\n return Object.prototype.hasOwnProperty.call(object, name);\n },\n\n /**\n * A non-operation method that does absolutely nothing.\n *\n * @return {void}\n * @public\n * @static\n * @memberof Utilities\n */\n noop: function() {},\n\n /**\n * Transforms the specified string
to upper case while remaining null-safe.\n *\n * @param {string} string - the string to be transformed to upper case\n * @return {string} string
transformed to upper case if string
is not null
.\n * @public\n * @static\n * @memberof Utilities\n */\n toUpperCase: function(string) {\n return string != null ? string.toUpperCase() : null;\n }\n\n});\n\nmodule.exports = Utilities;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar Utilities = require('../util/Utilities');\n\n/**\n * Manages multiple {@link Option} instances that are intended to be used by multiple implementations.\n *\n * Although the option definitions are shared between targets, the values are maintained on the targets themselves.\n *\n * @param {Option[]} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar OptionManager = Nevis.extend(function(options) {\n /**\n * The available options for this {@link OptionManager}.\n *\n * @public\n * @type {Object.}\n * @memberof OptionManager#\n */\n this.options = {};\n\n options.forEach(function(option) {\n this.options[option.name] = option;\n }, this);\n}, {\n\n /**\n * Returns whether an option with the specified name
is available.\n *\n * @param {string} name - the name of the {@link Option} whose existence is to be checked\n * @return {boolean} true
if an {@link Option} exists with name
; otherwise\n * false
.\n * @public\n * @memberof OptionManager#\n */\n exists: function(name) {\n return this.options[name] != null;\n },\n\n /**\n * Returns the value of the option with the specified name
on the target
object provided.\n *\n * @param {string} name - the name of the {@link Option} whose value on target
is to be returned\n * @param {Object} target - the object from which the value of the named {@link Option} is to be returned\n * @return {*} The value of the {@link Option} with name
on target
.\n * @public\n * @memberof OptionManager#\n */\n get: function(name, target) {\n return OptionManager._get(this.options[name], target);\n },\n\n /**\n * Returns a copy of all of the available options on the target
object provided.\n *\n * @param {Object} target - the object from which the option name/value pairs are to be returned\n * @return {Object.} A hash containing the name/value pairs of all options on target
.\n * @public\n * @memberof OptionManager#\n */\n getAll: function(target) {\n var name;\n var options = this.options;\n var result = {};\n\n for (name in options) {\n if (Utilities.hasOwn(options, name)) {\n result[name] = OptionManager._get(options[name], target);\n }\n }\n\n return result;\n },\n\n /**\n * Initializes the available options for the target
object provided and then applies the initial values\n * within the speciifed options
.\n *\n * This method will throw an error if any of the names within options
does not match an available option.\n *\n * This involves setting the default values and defining properties for all of the available options on\n * target
before finally calling {@link OptionMananger#setAll} with options
and\n * target
. Any options that are configured to be modifiable will have a setter included in their defined\n * property that will allow its corresponding value to be modified.\n *\n * If a change handler is specified, it will be called whenever the value changes on target
for a\n * modifiable option, but only when done so via the defined property's setter.\n *\n * @param {Object.} options - the name/value pairs of the initial options to be set\n * @param {Object} target - the object on which the options are to be initialized\n * @param {Function} [changeHandler] - the function to be called whenever the value of an modifiable option changes on\n * target
\n * @return {void}\n * @throws {Error} If options
contains an invalid option name.\n * @public\n * @memberof OptionManager#\n */\n init: function(options, target, changeHandler) {\n if (typeof changeHandler !== 'function') {\n changeHandler = Utilities.noop;\n }\n\n var name, option;\n\n for (name in this.options) {\n if (Utilities.hasOwn(this.options, name)) {\n option = this.options[name];\n\n OptionManager._set(option, option.defaultValue, target);\n OptionManager._createAccessor(option, target, changeHandler);\n }\n }\n\n this._setAll(options, target, true);\n },\n\n /**\n * Sets the value of the option with the specified name
on the target
object provided to\n * value
.\n *\n * This method will throw an error if name
does not match an available option or matches an option that\n * cannot be modified.\n *\n * If value
is null
and the {@link Option} has a default value configured, then that default\n * value will be used instead. If the {@link Option} also has a value transformer configured, it will be used to\n * transform whichever value was determined to be used.\n *\n * This method returns whether the value of the underlying field on target
was changed as a result.\n *\n * @param {string} name - the name of the {@link Option} whose value is to be set\n * @param {*} value - the value to be set for the named {@link Option} on target
\n * @param {Object} target - the object on which value
is to be set for the named {@link Option}\n * @return {boolean} true
if the underlying field on target
was changed; otherwise\n * false
.\n * @throws {Error} If name
is invalid or is for an option that cannot be modified.\n * @public\n * @memberof OptionManager#\n */\n set: function(name, value, target) {\n return this._set(name, value, target);\n },\n\n /**\n * Sets all of the specified options
on the target
object provided to their corresponding\n * values.\n *\n * This method will throw an error if any of the names within options
does not match an available option\n * or matches an option that cannot be modified.\n *\n * If any value within options
is null
and the corresponding {@link Option} has a default\n * value configured, then that default value will be used instead. If an {@link Option} also has a value transformer\n * configured, it will be used to transform whichever value was determined to be used.\n *\n * This method returns whether the value for any of the underlying fields on target
were changed as a\n * result.\n *\n * @param {Object.} options - the name/value pairs of options to be set\n * @param {Object} target - the object on which the options are to be set\n * @return {boolean} true
if any of the underlying fields on target
were changed; otherwise\n * false
.\n * @throws {Error} If options
contains an invalid option name or an option that cannot be modiifed.\n * @public\n * @memberof OptionManager#\n */\n setAll: function(options, target) {\n return this._setAll(options, target);\n },\n\n _set: function(name, value, target, allowUnmodifiable) {\n var option = this.options[name];\n if (!option) {\n throw new Error('Invalid option: ' + name);\n }\n if (!option.modifiable && !allowUnmodifiable) {\n throw new Error('Option cannot be modified: ' + name);\n }\n\n return OptionManager._set(option, value, target);\n },\n\n _setAll: function(options, target, allowUnmodifiable) {\n if (!options) {\n return false;\n }\n\n var name;\n var changed = false;\n\n for (name in options) {\n if (Utilities.hasOwn(options, name) && this._set(name, options[name], target, allowUnmodifiable)) {\n changed = true;\n }\n }\n\n return changed;\n }\n\n}, {\n\n _createAccessor: function(option, target, changeHandler) {\n var descriptor = {\n get: function() {\n return OptionManager._get(option, target);\n }\n };\n\n if (option.modifiable) {\n descriptor.set = function(value) {\n if (OptionManager._set(option, value, target)) {\n changeHandler(value, option);\n }\n };\n }\n\n Object.defineProperty(target, option.name, descriptor);\n },\n\n _get: function(option, target) {\n return target['_' + option.name];\n },\n\n _set: function(option, value, target) {\n var fieldName = '_' + option.name;\n var oldValue = target[fieldName];\n var newValue = option.transform(value != null ? value : option.defaultValue);\n\n target[fieldName] = newValue;\n\n return newValue !== oldValue;\n }\n\n});\n\nmodule.exports = OptionManager;\n\n/**\n * Called whenever the value of a modifiable {@link Option} is changed on a target object via the defined property's\n * setter.\n *\n * @callback OptionManager~ChangeHandler\n * @param {*} value - the new value for option
on the target object\n * @param {Option} option - the modifable {@link Option} whose value has changed on the target object.\n * @return {void}\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar ServiceManager = Nevis.extend(function() {\n this._services = {};\n}, {\n\n /**\n * Returns the {@link Service} being managed with the specified name
.\n *\n * @param {string} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name
.\n * @throws {Error} If no {@link Service} is being managed with name
.\n * @public\n * @memberof ServiceManager#\n */\n getService: function(name) {\n var service = this._services[name];\n if (!service) {\n throw new Error('Service is not being managed with name: ' + name);\n }\n\n return service;\n },\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name
to the\n * service
provided.\n *\n * @param {string} name - the name of the {@link Service} to be managed with name
\n * @param {Service} service - the {@link Service} implementation to be managed\n * @return {void}\n * @throws {Error} If a {@link Service} is already being managed with the same name
.\n * @public\n * @memberof ServiceManager#\n */\n setService: function(name, service) {\n if (this._services[name]) {\n throw new Error('Service is already managed with name: ' + name);\n }\n\n if (service) {\n this._services[name] = service;\n }\n }\n\n});\n\nmodule.exports = ServiceManager;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar CanvasRenderer = require('./renderer/CanvasRenderer');\nvar Frame = require('./Frame');\nvar ImageRenderer = require('./renderer/ImageRenderer');\nvar Option = require('./option/Option');\nvar OptionManager = require('./option/OptionManager');\nvar ServiceManager = require('./service/ServiceManager');\nvar Utilities = require('./util/Utilities');\n\nvar optionManager = new OptionManager([\n new Option('background', true, 'white'),\n new Option('backgroundAlpha', true, 1, Utilities.abs),\n new Option('element'),\n new Option('foreground', true, 'black'),\n new Option('foregroundAlpha', true, 1, Utilities.abs),\n new Option('level', true, 'L', Utilities.toUpperCase),\n new Option('mime', true, 'image/png'),\n new Option('padding', true, null, Utilities.abs),\n new Option('size', true, 100, Utilities.abs),\n new Option('value', true, '')\n]);\nvar serviceManager = new ServiceManager();\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas
for rendering.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @throws {Error} If any options
are invalid.\n * @public\n * @class\n * @extends Nevis\n */\nvar QRious = Nevis.extend(function(options) {\n optionManager.init(options, this, this.update.bind(this));\n\n var element = optionManager.get('element', this);\n var elementService = serviceManager.getService('element');\n var canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas();\n var image = element && elementService.isImage(element) ? element : elementService.createImage();\n\n this._canvasRenderer = new CanvasRenderer(this, canvas, true);\n this._imageRenderer = new ImageRenderer(this, image, image === element);\n\n this.update();\n}, {\n\n /**\n * Returns all of the options configured for this {@link QRious}.\n *\n * Any changes made to the returned object will not be reflected in the options themselves or their corresponding\n * underlying fields.\n *\n * @return {Object.} A copy of the applied options.\n * @public\n * @memberof QRious#\n */\n get: function() {\n return optionManager.getAll(this);\n },\n\n /**\n * Sets all of the specified options
and automatically updates this {@link QRious} if any of the\n * underlying fields are changed as a result.\n *\n * This is the preferred method for updating multiple options at one time to avoid unnecessary updates between\n * changes.\n *\n * @param {QRious~Options} options - the options to be set\n * @return {void}\n * @throws {Error} If any options
are invalid or cannot be modified.\n * @public\n * @memberof QRious#\n */\n set: function(options) {\n if (optionManager.setAll(options, this)) {\n this.update();\n }\n },\n\n /**\n * Returns the image data URI for the generated QR code using the mime
provided.\n *\n * @param {string} [mime] - the MIME type for the image\n * @return {string} The image data URI for the QR code.\n * @public\n * @memberof QRious#\n */\n toDataURL: function(mime) {\n return this.canvas.toDataURL(mime || this.mime);\n },\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @return {void}\n * @protected\n * @memberof QRious#\n */\n update: function() {\n var frame = new Frame({\n level: this.level,\n value: this.value\n });\n\n this._canvasRenderer.render(frame);\n this._imageRenderer.render(frame);\n }\n\n}, {\n\n /**\n * The current version of {@link QRious}.\n *\n * @public\n * @static\n * @type {string}\n * @memberof QRious\n */\n VERSION: '3.0.0',\n\n /**\n * Configures the service
provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @return {void}\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n * @memberof QRious\n */\n use: function(service) {\n serviceManager.setService(service.getName(), service);\n }\n\n});\n\nObject.defineProperties(QRious.prototype, {\n\n canvas: {\n /**\n * Returns the canvas
element being used to render the QR code for this {@link QRious}.\n *\n * @return {*} The canvas
element.\n * @public\n * @memberof QRious#\n * @alias canvas\n */\n get: function() {\n return this._canvasRenderer.getElement();\n }\n },\n\n image: {\n /**\n * Returns the img
element being used to render the QR code for this {@link QRious}.\n *\n * @return {*} The img
element.\n * @public\n * @memberof QRious#\n * @alias image\n */\n get: function() {\n return this._imageRenderer.getElement();\n }\n }\n\n});\n\nmodule.exports = QRious;\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {string} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {number} [backgroundAlpha=1] - The background alpha to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas
or\n * img
. The element(s) will be created if needed.\n * @property {string} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {number} [foregroundAlpha=1] - The foreground alpha to be applied to the QR code.\n * @property {string} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {string} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {number} [padding] - The padding for the QR code in pixels.\n * @property {number} [size=100] - The size of the QR code in pixels.\n * @property {string} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar BrowserElementService = require('../service/element/BrowserElementService');\nvar QRious = require('../QRious');\n\nQRious.use(new BrowserElementService());\n\nmodule.exports = QRious;\n"],"names":["extend","require$$0","Nevis","Service","ElementService","Renderer","ErrorCorrection","Galois","Alignment","Version","Utilities","OptionManager","Option","ServiceManager","CanvasRenderer","ImageRenderer","Frame","QRious","BrowserElementService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAAA;;;;;;;;;;;;;;;;;;;;;;AAsBA;;;;;;AAQA,MAAI,WAAW,8BAA8B,WAAW,EAAE,CAAC;;;;;;;AAO3D,MAAI,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;;;;;;;AAOrD,MAAI,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;;;;;;;;;;;;AAYlC,EAAA,SAAS,YAAY,CAAC,SAAS,EAAE,UAAU,EAAE;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O,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;KACvD;;GAEF,CAAC,CAAC;;AAEH,EAAA,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,EAAE;;IAExC,MAAM,EAAE;;;;;;;;;MASN,GAAG,EAAE,WAAW;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;OAC1C;KACF;;IAED,KAAK,EAAE;;;;;;;;;MASL,GAAG,EAAE,WAAW;QACd,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;OACzC;KACF;;GAEF,CAAC,CAAC;;AAEH,cAAc,GAAG,MAAM,CAAC;;;;;;;;;;;;;;;;;KAiBrB;;ACvLHC,UAAM,CAAC,GAAG,CAAC,IAAIC,uBAAqB,EAAE,CAAC,CAAC;;AAExC,aAAc,GAAGD,QAAM,CAAC;;;;"}
\ No newline at end of file
+{"version":3,"file":"qrious.js","sources":["../node_modules/nevis/src/extend.js","../node_modules/nevis/src/nevis.js","../node_modules/nevis/lite.js","../src/service/Service.js","../src/service/element/ElementService.js","../src/service/element/BrowserElementService.js","../src/renderer/Renderer.js","../src/renderer/CanvasRenderer.js","../src/Alignment.js","../src/ErrorCorrection.js","../src/Galois.js","../src/Version.js","../src/Frame.js","../src/renderer/ImageRenderer.js","../src/option/Option.js","../src/util/Utilities.js","../src/option/OptionManager.js","../src/service/ServiceManager.js","../src/QRious.js","../src/runtime/browser.js"],"sourcesContent":["/*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n'use strict';\n\n/**\n * A bare-bones constructor for surrogate prototype swapping.\n *\n * @private\n * @constructor\n */\nvar Constructor = /* istanbul ignore next */ function() {};\n/**\n * A reference to Object.prototype.hasOwnProperty
.\n *\n * @private\n * @type {Function}\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * A reference to Array.prototype.slice
.\n *\n * @private\n * @type {Function}\n */\nvar slice = Array.prototype.slice;\n\n/**\n * Creates an object which inherits the given prototype
.\n *\n * Optionally, the created object can be extended further with the specified properties
.\n *\n * @param {Object} prototype - the prototype to be inherited by the created object\n * @param {Object} [properties] - the optional properties to be extended by the created object\n * @return {Object} The newly created object.\n * @private\n */\nfunction createObject(prototype, properties) {\n var result;\n /* istanbul ignore next */\n if (typeof Object.create === 'function') {\n result = Object.create(prototype);\n } else {\n Constructor.prototype = prototype;\n result = new Constructor();\n Constructor.prototype = null;\n }\n\n if (properties) {\n extendObject(true, result, properties);\n }\n\n return result;\n}\n\n/**\n * Extends the constructor to which this method is associated with the prototype
and/or\n * statics
provided.\n *\n * If name
is provided, it will be used as the class name and can be accessed via a special\n * class_
property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString
), but this is not applicable to the lite version of Nevis.\n *\n * If constructor
is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_
property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor
provided or the one created if none was given.\n * @public\n */\nfunction extend(name, constructor, prototype, statics) {\n var superConstructor = this;\n\n if (typeof name !== 'string') {\n statics = prototype;\n prototype = constructor;\n constructor = name;\n name = null;\n }\n\n if (typeof constructor !== 'function') {\n statics = prototype;\n prototype = constructor;\n constructor = function() {\n return superConstructor.apply(this, arguments);\n };\n }\n\n extendObject(false, constructor, superConstructor, statics);\n\n constructor.prototype = createObject(superConstructor.prototype, prototype);\n constructor.prototype.constructor = constructor;\n\n constructor.class_ = name || superConstructor.class_;\n constructor.super_ = superConstructor;\n\n return constructor;\n}\n\n/**\n * Extends the specified target
object with the properties in each of the sources
provided.\n *\n * if any source is null
it will be ignored.\n *\n * @param {boolean} own - true
to only copy own properties from sources
onto\n * target
; otherwise false
\n * @param {Object} target - the target object which should be extended\n * @param {...Object} [sources] - the source objects whose properties are to be copied onto target
\n * @return {void}\n * @private\n */\nfunction extendObject(own, target, sources) {\n sources = slice.call(arguments, 2);\n\n var property;\n var source;\n\n for (var i = 0, length = sources.length; i < length; i++) {\n source = sources[i];\n\n for (property in source) {\n if (!own || hasOwnProperty.call(source, property)) {\n target[property] = source[property];\n }\n }\n }\n}\n\nmodule.exports = extend;\n","/*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n'use strict';\n\nvar extend = require('./extend');\n\n/**\n * The base class from which all others should extend.\n *\n * @public\n * @constructor\n */\nfunction Nevis() {}\nNevis.class_ = 'Nevis';\nNevis.super_ = Object;\n\n/**\n * Extends the constructor to which this method is associated with the prototype
and/or\n * statics
provided.\n *\n * If name
is provided, it will be used as the class name and can be accessed via a special\n * class_
property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString
), but this is not applicable to the lite version of Nevis.\n *\n * If constructor
is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_
property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor
provided or the one created if none was given.\n * @public\n * @static\n * @memberof Nevis\n */\nNevis.extend = extend;\n\nmodule.exports = Nevis;\n","/*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n'use strict';\n\nmodule.exports = require('./src/nevis');\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Service = Nevis.extend({\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {string} The service name.\n * @public\n * @abstract\n * @memberof Service#\n */\n getName: function() {}\n\n});\n\nmodule.exports = Service;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Service = require('../Service');\n\n/**\n * A service for working with elements.\n *\n * @public\n * @class\n * @extends Service\n */\nvar ElementService = Service.extend({\n\n /**\n * Creates an instance of a canvas element.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @return {*} The newly created canvas element.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n createCanvas: function() {},\n\n /**\n * Creates an instance of a image element.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @return {*} The newly created image element.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n createImage: function() {},\n\n /**\n * @override\n */\n getName: function() {\n return 'element';\n },\n\n /**\n * Returns whether the specified element
is a canvas.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @param {*} element - the element to be checked\n * @return {boolean} true
if element
is a canvas; otherwise false
.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n isCanvas: function(element) {},\n\n /**\n * Returns whether the specified element
is an image.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @param {*} element - the element to be checked\n * @return {boolean} true
if element
is an image; otherwise false
.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n isImage: function(element) {}\n\n});\n\nmodule.exports = ElementService;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar ElementService = require('./ElementService');\n\n/**\n * An implementation of {@link ElementService} intended for use within a browser environment.\n *\n * @public\n * @class\n * @extends ElementService\n */\nvar BrowserElementService = ElementService.extend({\n\n /**\n * @override\n */\n createCanvas: function() {\n return document.createElement('canvas');\n },\n\n /**\n * @override\n */\n createImage: function() {\n return document.createElement('img');\n },\n\n /**\n * @override\n */\n isCanvas: function(element) {\n return element instanceof HTMLCanvasElement;\n },\n\n /**\n * @override\n */\n isImage: function(element) {\n return element instanceof HTMLImageElement;\n }\n\n});\n\nmodule.exports = BrowserElementService;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so the ordering of their execution is important.\n *\n * The rendering of a element can be deferred by disabling the renderer initially, however, any attempt get the element\n * from the renderer will result in it being immediately enabled and the element being rendered.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @param {*} element - the element onto which the QR code is to be rendered\n * @param {boolean} [enabled] - true
this {@link Renderer} is enabled; otherwise false
.\n * @public\n * @class\n * @extends Nevis\n */\nvar Renderer = Nevis.extend(function(qrious, element, enabled) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n * @memberof Renderer#\n */\n this.qrious = qrious;\n\n /**\n * The element onto which this {@link Renderer} is rendering the QR code.\n *\n * @protected\n * @type {*}\n * @memberof Renderer#\n */\n this.element = element;\n this.element.qrious = qrious;\n\n /**\n * Whether this {@link Renderer} is enabled.\n *\n * @protected\n * @type {boolean}\n * @memberof Renderer#\n */\n this.enabled = Boolean(enabled);\n}, {\n\n /**\n * Draws the specified QR code frame
on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n draw: function(frame) {},\n\n /**\n * Returns the element onto which this {@link Renderer} is rendering the QR code.\n *\n * If this method is called while this {@link Renderer} is disabled, it will be immediately enabled and rendered\n * before the element is returned.\n *\n * @return {*} The element.\n * @public\n * @memberof Renderer#\n */\n getElement: function() {\n if (!this.enabled) {\n this.enabled = true;\n this.render();\n }\n\n return this.element;\n },\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame
provided.\n *\n * Any configured padding will be excluded from the returned size.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n * @memberof Renderer#\n */\n getModuleSize: function(frame) {\n var qrious = this.qrious;\n var padding = qrious.padding || 0;\n var pixels = Math.floor((qrious.size - (padding * 2)) / frame.width);\n\n return Math.max(1, pixels);\n },\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame
\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n * @memberof Renderer#\n */\n getOffset: function(frame) {\n var qrious = this.qrious;\n var padding = qrious.padding;\n\n if (padding != null) {\n return padding;\n }\n\n var moduleSize = this.getModuleSize(frame);\n var offset = Math.floor((qrious.size - (moduleSize * frame.width)) / 2);\n\n return Math.max(0, offset);\n },\n\n /**\n * Renders a QR code on the underlying element based on the frame
provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @return {void}\n * @public\n * @memberof Renderer#\n */\n render: function(frame) {\n if (this.enabled) {\n this.resize();\n this.reset();\n this.draw(frame);\n }\n },\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n reset: function() {},\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n resize: function() {}\n\n});\n\nmodule.exports = Renderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Renderer = require('./Renderer');\n\n/**\n * An implementation of {@link Renderer} for working with canvas
elements.\n *\n * @public\n * @class\n * @extends Renderer\n */\nvar CanvasRenderer = Renderer.extend({\n\n /**\n * @override\n */\n draw: function(frame) {\n var i, j;\n var qrious = this.qrious;\n var moduleSize = this.getModuleSize(frame);\n var offset = this.getOffset(frame);\n var context = this.element.getContext('2d');\n\n context.fillStyle = qrious.foreground;\n context.globalAlpha = qrious.foregroundAlpha;\n\n for (i = 0; i < frame.width; i++) {\n for (j = 0; j < frame.width; j++) {\n if (frame.buffer[(j * frame.width) + i]) {\n context.fillRect((moduleSize * i) + offset, (moduleSize * j) + offset, moduleSize, moduleSize);\n }\n }\n }\n },\n\n /**\n * @override\n */\n reset: function() {\n var qrious = this.qrious;\n var context = this.element.getContext('2d');\n var size = qrious.size;\n\n context.lineWidth = 1;\n context.clearRect(0, 0, size, size);\n context.fillStyle = qrious.background;\n context.globalAlpha = qrious.backgroundAlpha;\n context.fillRect(0, 0, size, size);\n },\n\n /**\n * @override\n */\n resize: function() {\n var element = this.element;\n\n element.width = element.height = this.qrious.size;\n }\n\n});\n\nmodule.exports = CanvasRenderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\n/* eslint no-multi-spaces: \"off\" */\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Alignment = Nevis.extend(null, {\n\n /**\n * The alignment pattern block.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Alignment\n */\n BLOCK: [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n\n});\n\nmodule.exports = Alignment;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\n/* eslint no-multi-spaces: \"off\" */\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains error correction information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar ErrorCorrection = Nevis.extend(null, {\n\n /**\n * The error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof ErrorCorrection\n */\n BLOCKS: [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ],\n\n /**\n * The final format bits with mask (level << 3 | mask).\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof ErrorCorrection\n */\n FINAL_FORMAT: [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ],\n\n /**\n * A map of human-readable ECC levels.\n *\n * @public\n * @static\n * @type {Object.}\n * @memberof ErrorCorrection\n */\n LEVELS: {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n\n});\n\nmodule.exports = ErrorCorrection;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains Galois field information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Galois = Nevis.extend(null, {\n\n /**\n * The Galois field exponent table.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Galois\n */\n EXPONENT: [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,\n 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,\n 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,\n 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,\n 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2,\n 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce,\n 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc,\n 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54,\n 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,\n 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff,\n 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,\n 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,\n 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ],\n\n /**\n * The Galois field log table.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Galois\n */\n LOG: [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27,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 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n\n});\n\nmodule.exports = Galois;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains version pattern information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Version = Nevis.extend(null, {\n\n /**\n * The version pattern block.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Version\n */\n BLOCK: [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n\n});\n\nmodule.exports = Version;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar Alignment = require('./Alignment');\nvar ErrorCorrection = require('./ErrorCorrection');\nvar Galois = require('./Galois');\nvar Version = require('./Version');\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar Frame = Nevis.extend(function(options) {\n var dataBlock, eccBlock, index, neccBlock1, neccBlock2;\n var valueLength = options.value.length;\n\n this._badness = [];\n this._level = ErrorCorrection.LEVELS[options.level];\n this._polynomial = [];\n this._value = options.value;\n this._version = 0;\n this._stringBuffer = [];\n\n while (this._version < 40) {\n this._version++;\n\n index = ((this._level - 1) * 4) + ((this._version - 1) * 16);\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++];\n neccBlock2 = ErrorCorrection.BLOCKS[index++];\n dataBlock = ErrorCorrection.BLOCKS[index++];\n eccBlock = ErrorCorrection.BLOCKS[index];\n\n index = (dataBlock * (neccBlock1 + neccBlock2)) + neccBlock2 - 3 + (this._version <= 9);\n\n if (valueLength <= index) {\n break;\n }\n }\n\n this._dataBlock = dataBlock;\n this._eccBlock = eccBlock;\n this._neccBlock1 = neccBlock1;\n this._neccBlock2 = neccBlock2;\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {number}\n * @memberof Frame#\n */\n // FIXME: Ensure that it fits instead of being truncated.\n var width = this.width = 17 + (4 * this._version);\n\n /**\n * The image buffer.\n *\n * @public\n * @type {number[]}\n * @memberof Frame#\n */\n this.buffer = Frame._createArray(width * width);\n\n this._ecc = Frame._createArray(dataBlock + ((dataBlock + eccBlock) * (neccBlock1 + neccBlock2)) + neccBlock2);\n this._mask = Frame._createArray(((width * (width + 1)) + 1) / 2);\n\n this._insertFinders();\n this._insertAlignments();\n\n // Insert single foreground cell.\n this.buffer[8 + (width * (width - 8))] = 1;\n\n this._insertTimingGap();\n this._reverseMask();\n this._insertTimingRowAndColumn();\n this._insertVersion();\n this._syncMask();\n this._convertBitStream(valueLength);\n this._calculatePolynomial();\n this._appendEccToData();\n this._interleaveBlocks();\n this._pack();\n this._finish();\n}, {\n\n _addAlignment: function(x, y) {\n var i;\n var buffer = this.buffer;\n var width = this.width;\n\n buffer[x + (width * y)] = 1;\n\n for (i = -2; i < 2; i++) {\n buffer[x + i + (width * (y - 2))] = 1;\n buffer[x - 2 + (width * (y + i + 1))] = 1;\n buffer[x + 2 + (width * (y + i))] = 1;\n buffer[x + i + 1 + (width * (y + 2))] = 1;\n }\n\n for (i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i);\n this._setMask(x + 1, y - i);\n this._setMask(x - i, y - 1);\n this._setMask(x + i, y + 1);\n }\n },\n\n _appendData: function(data, dataLength, ecc, eccLength) {\n var bit, i, j;\n var polynomial = this._polynomial;\n var stringBuffer = this._stringBuffer;\n\n for (i = 0; i < eccLength; i++) {\n stringBuffer[ecc + i] = 0;\n }\n\n for (i = 0; i < dataLength; i++) {\n bit = Galois.LOG[stringBuffer[data + i] ^ stringBuffer[ecc]];\n\n if (bit !== 255) {\n for (j = 1; j < eccLength; j++) {\n stringBuffer[ecc + j - 1] = stringBuffer[ecc + j] ^\n Galois.EXPONENT[Frame._modN(bit + polynomial[eccLength - j])];\n }\n } else {\n for (j = ecc; j < ecc + eccLength; j++) {\n stringBuffer[j] = stringBuffer[j + 1];\n }\n }\n\n stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + polynomial[0])];\n }\n },\n\n _appendEccToData: function() {\n var i;\n var data = 0;\n var dataBlock = this._dataBlock;\n var ecc = this._calculateMaxLength();\n var eccBlock = this._eccBlock;\n\n for (i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, dataBlock, ecc, eccBlock);\n\n data += dataBlock;\n ecc += eccBlock;\n }\n\n for (i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, dataBlock + 1, ecc, eccBlock);\n\n data += dataBlock + 1;\n ecc += eccBlock;\n }\n },\n\n _applyMask: function(mask) {\n var r3x, r3y, x, y;\n var buffer = this.buffer;\n var width = this.width;\n\n switch (mask) {\n case 0:\n for (y = 0; y < width; y++) {\n for (x = 0; x < width; x++) {\n if (!((x + y) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 1:\n for (y = 0; y < width; y++) {\n for (x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 2:\n for (y = 0; y < width; y++) {\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 3:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 4:\n for (y = 0; y < width; y++) {\n for (r3x = 0, r3y = (y >> 1) & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n r3y = !r3y;\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 5:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 6:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((x & y & 1) + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 7:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n }\n },\n\n _calculateMaxLength: function() {\n return (this._dataBlock * (this._neccBlock1 + this._neccBlock2)) + this._neccBlock2;\n },\n\n _calculatePolynomial: function() {\n var i, j;\n var eccBlock = this._eccBlock;\n var polynomial = this._polynomial;\n\n polynomial[0] = 1;\n\n for (i = 0; i < eccBlock; i++) {\n polynomial[i + 1] = 1;\n\n for (j = i; j > 0; j--) {\n polynomial[j] = polynomial[j] ? polynomial[j - 1] ^\n Galois.EXPONENT[Frame._modN(Galois.LOG[polynomial[j]] + i)] : polynomial[j - 1];\n }\n\n polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[polynomial[0]] + i)];\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (i = 0; i <= eccBlock; i++) {\n polynomial[i] = Galois.LOG[polynomial[i]];\n }\n },\n\n _checkBadness: function() {\n var b, b1, h, x, y;\n var bad = 0;\n var badness = this._badness;\n var buffer = this.buffer;\n var width = this.width;\n\n // Blocks of same colour.\n for (y = 0; y < width - 1; y++) {\n for (x = 0; x < width - 1; x++) {\n // All foreground colour.\n if ((buffer[x + (width * y)] &&\n buffer[x + 1 + (width * y)] &&\n buffer[x + (width * (y + 1))] &&\n buffer[x + 1 + (width * (y + 1))]) ||\n // All background colour.\n !(buffer[x + (width * y)] ||\n buffer[x + 1 + (width * y)] ||\n buffer[x + (width * (y + 1))] ||\n buffer[x + 1 + (width * (y + 1))])) {\n bad += Frame.N2;\n }\n }\n }\n\n var bw = 0;\n\n // X runs.\n for (y = 0; y < width; y++) {\n h = 0;\n\n badness[0] = 0;\n\n for (b = 0, x = 0; x < width; x++) {\n b1 = buffer[x + (width * y)];\n\n if (b === b1) {\n badness[h]++;\n } else {\n badness[++h] = 1;\n }\n\n b = b1;\n bw += b ? 1 : -1;\n }\n\n bad += this._getBadness(h);\n }\n\n if (bw < 0) {\n bw = -bw;\n }\n\n var count = 0;\n var big = bw;\n big += big << 2;\n big <<= 1;\n\n while (big > width * width) {\n big -= width * width;\n count++;\n }\n\n bad += count * Frame.N4;\n\n // Y runs.\n for (x = 0; x < width; x++) {\n h = 0;\n\n badness[0] = 0;\n\n for (b = 0, y = 0; y < width; y++) {\n b1 = buffer[x + (width * y)];\n\n if (b === b1) {\n badness[h]++;\n } else {\n badness[++h] = 1;\n }\n\n b = b1;\n }\n\n bad += this._getBadness(h);\n }\n\n return bad;\n },\n\n _convertBitStream: function(length) {\n var bit, i;\n var ecc = this._ecc;\n var version = this._version;\n\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanumeric, or kanji not supported).\n for (i = 0; i < length; i++) {\n ecc[i] = this._value.charCodeAt(i);\n }\n\n var stringBuffer = this._stringBuffer = ecc.slice();\n var maxLength = this._calculateMaxLength();\n\n if (length >= maxLength - 2) {\n length = maxLength - 2;\n\n if (version > 9) {\n length--;\n }\n }\n\n // Shift and re-pack to insert length prefix.\n var index = length;\n\n if (version > 9) {\n stringBuffer[index + 2] = 0;\n stringBuffer[index + 3] = 0;\n\n while (index--) {\n bit = stringBuffer[index];\n\n stringBuffer[index + 3] |= 255 & (bit << 4);\n stringBuffer[index + 2] = bit >> 4;\n }\n\n stringBuffer[2] |= 255 & (length << 4);\n stringBuffer[1] = length >> 4;\n stringBuffer[0] = 0x40 | (length >> 12);\n } else {\n stringBuffer[index + 1] = 0;\n stringBuffer[index + 2] = 0;\n\n while (index--) {\n bit = stringBuffer[index];\n\n stringBuffer[index + 2] |= 255 & (bit << 4);\n stringBuffer[index + 1] = bit >> 4;\n }\n\n stringBuffer[1] |= 255 & (length << 4);\n stringBuffer[0] = 0x40 | (length >> 4);\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (version < 10);\n\n while (index < maxLength) {\n stringBuffer[index++] = 0xec;\n stringBuffer[index++] = 0x11;\n }\n },\n\n _getBadness: function(length) {\n var i;\n var badRuns = 0;\n var badness = this._badness;\n\n for (i = 0; i <= length; i++) {\n if (badness[i] >= 5) {\n badRuns += Frame.N1 + badness[i] - 5;\n }\n }\n\n // FBFFFBF as in finder.\n for (i = 3; i < length - 1; i += 2) {\n if (badness[i - 2] === badness[i + 2] &&\n badness[i + 2] === badness[i - 1] &&\n badness[i - 1] === badness[i + 1] &&\n badness[i - 1] * 3 === badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (badness[i - 3] === 0 || i + 3 > length ||\n badness[i - 3] * 3 >= badness[i] * 4 ||\n badness[i + 3] * 3 >= badness[i] * 4)) {\n badRuns += Frame.N3;\n }\n }\n\n return badRuns;\n },\n\n _finish: function() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice();\n\n var currentMask, i;\n var bit = 0;\n var mask = 30000;\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i);\n\n currentMask = this._checkBadness();\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask;\n bit = i;\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break;\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice();\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit);\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)];\n\n var buffer = this.buffer;\n var width = this.width;\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n buffer[width - 1 - i + (width * 8)] = 1;\n\n if (i < 6) {\n buffer[8 + (width * i)] = 1;\n } else {\n buffer[8 + (width * (i + 1))] = 1;\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n buffer[8 + (width * (width - 7 + i))] = 1;\n\n if (i) {\n buffer[6 - i + (width * 8)] = 1;\n } else {\n buffer[7 + (width * 8)] = 1;\n }\n }\n }\n },\n\n _interleaveBlocks: function() {\n var i, j;\n var dataBlock = this._dataBlock;\n var ecc = this._ecc;\n var eccBlock = this._eccBlock;\n var k = 0;\n var maxLength = this._calculateMaxLength();\n var neccBlock1 = this._neccBlock1;\n var neccBlock2 = this._neccBlock2;\n var stringBuffer = this._stringBuffer;\n\n for (i = 0; i < dataBlock; i++) {\n for (j = 0; j < neccBlock1; j++) {\n ecc[k++] = stringBuffer[i + (j * dataBlock)];\n }\n\n for (j = 0; j < neccBlock2; j++) {\n ecc[k++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];\n }\n }\n\n for (j = 0; j < neccBlock2; j++) {\n ecc[k++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];\n }\n\n for (i = 0; i < eccBlock; i++) {\n for (j = 0; j < neccBlock1 + neccBlock2; j++) {\n ecc[k++] = stringBuffer[maxLength + i + (j * eccBlock)];\n }\n }\n\n this._stringBuffer = ecc;\n },\n\n _insertAlignments: function() {\n var i, x, y;\n var version = this._version;\n var width = this.width;\n\n if (version > 1) {\n i = Alignment.BLOCK[version];\n y = width - 7;\n\n for (;;) {\n x = width - 7;\n\n while (x > i - 3) {\n this._addAlignment(x, y);\n\n if (x < i) {\n break;\n }\n\n x -= i;\n }\n\n if (y <= i + 9) {\n break;\n }\n\n y -= i;\n\n this._addAlignment(6, y);\n this._addAlignment(y, 6);\n }\n }\n },\n\n _insertFinders: function() {\n var i, j, x, y;\n var buffer = this.buffer;\n var width = this.width;\n\n for (i = 0; i < 3; i++) {\n j = 0;\n y = 0;\n\n if (i === 1) {\n j = width - 7;\n }\n if (i === 2) {\n y = width - 7;\n }\n\n buffer[y + 3 + (width * (j + 3))] = 1;\n\n for (x = 0; x < 6; x++) {\n buffer[y + x + (width * j)] = 1;\n buffer[y + (width * (j + x + 1))] = 1;\n buffer[y + 6 + (width * (j + x))] = 1;\n buffer[y + x + 1 + (width * (j + 6))] = 1;\n }\n\n for (x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1);\n this._setMask(y + 1, j + x + 1);\n this._setMask(y + 5, j + x);\n this._setMask(y + x + 1, j + 5);\n }\n\n for (x = 2; x < 4; x++) {\n buffer[y + x + (width * (j + 2))] = 1;\n buffer[y + 2 + (width * (j + x + 1))] = 1;\n buffer[y + 4 + (width * (j + x))] = 1;\n buffer[y + x + 1 + (width * (j + 4))] = 1;\n }\n }\n },\n\n _insertTimingGap: function() {\n var x, y;\n var width = this.width;\n\n for (y = 0; y < 7; y++) {\n this._setMask(7, y);\n this._setMask(width - 8, y);\n this._setMask(7, y + width - 7);\n }\n\n for (x = 0; x < 8; x++) {\n this._setMask(x, 7);\n this._setMask(x + width - 8, 7);\n this._setMask(x, width - 8);\n }\n },\n\n _insertTimingRowAndColumn: function() {\n var x;\n var buffer = this.buffer;\n var width = this.width;\n\n for (x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6);\n this._setMask(6, 8 + x);\n } else {\n buffer[8 + x + (width * 6)] = 1;\n buffer[6 + (width * (8 + x))] = 1;\n }\n }\n },\n\n _insertVersion: function() {\n var i, j, x, y;\n var buffer = this.buffer;\n var version = this._version;\n var width = this.width;\n\n if (version > 6) {\n i = Version.BLOCK[version - 7];\n j = 17;\n\n for (x = 0; x < 6; x++) {\n for (y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? version >> j - 12 : i >> j)) {\n buffer[5 - x + (width * (2 - y + width - 11))] = 1;\n buffer[2 - y + width - 11 + (width * (5 - x))] = 1;\n } else {\n this._setMask(5 - x, 2 - y + width - 11);\n this._setMask(2 - y + width - 11, 5 - x);\n }\n }\n }\n }\n },\n\n _isMasked: function(x, y) {\n var bit = Frame._getMaskBit(x, y);\n\n return this._mask[bit] === 1;\n },\n\n _pack: function() {\n var bit, i, j;\n var k = 1;\n var v = 1;\n var width = this.width;\n var x = width - 1;\n var y = width - 1;\n\n // Interleaved data and ECC codes.\n var length = ((this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2)) + this._neccBlock2;\n\n for (i = 0; i < length; i++) {\n bit = this._stringBuffer[i];\n\n for (j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + (width * y)] = 1;\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--;\n } else {\n x++;\n\n if (k) {\n if (y !== 0) {\n y--;\n } else {\n x -= 2;\n k = !k;\n\n if (x === 6) {\n x--;\n y = 9;\n }\n }\n } else if (y !== width - 1) {\n y++;\n } else {\n x -= 2;\n k = !k;\n\n if (x === 6) {\n x--;\n y -= 8;\n }\n }\n }\n\n v = !v;\n } while (this._isMasked(x, y));\n }\n }\n },\n\n _reverseMask: function() {\n var x, y;\n var width = this.width;\n\n for (x = 0; x < 9; x++) {\n this._setMask(x, 8);\n }\n\n for (x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8);\n this._setMask(8, x);\n }\n\n for (y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7);\n }\n },\n\n _setMask: function(x, y) {\n var bit = Frame._getMaskBit(x, y);\n\n this._mask[bit] = 1;\n },\n\n _syncMask: function() {\n var x, y;\n var width = this.width;\n\n for (y = 0; y < width; y++) {\n for (x = 0; x <= y; x++) {\n if (this.buffer[x + (width * y)]) {\n this._setMask(x, y);\n }\n }\n }\n }\n\n}, {\n\n _createArray: function(length) {\n var i;\n var array = [];\n\n for (i = 0; i < length; i++) {\n array[i] = 0;\n }\n\n return array;\n },\n\n _getMaskBit: function(x, y) {\n var bit;\n\n if (x > y) {\n bit = x;\n x = y;\n y = bit;\n }\n\n bit = y;\n bit += y * y;\n bit >>= 1;\n bit += x;\n\n return bit;\n },\n\n _modN: function(x) {\n while (x >= 255) {\n x -= 255;\n x = (x >> 8) + (x & 255);\n }\n\n return x;\n },\n\n // *Badness* coefficients.\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n\n});\n\nmodule.exports = Frame;\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {string} level - The ECC level to be used.\n * @property {string} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Renderer = require('./Renderer');\n\n/**\n * An implementation of {@link Renderer} for working with img
elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas
element as the src
for the img
element being rendered.\n *\n * @public\n * @class\n * @extends Renderer\n */\nvar ImageRenderer = Renderer.extend({\n\n /**\n * @override\n */\n draw: function() {\n this.element.src = this.qrious.toDataURL();\n },\n\n /**\n * @override\n */\n reset: function() {\n this.element.src = '';\n },\n\n /**\n * @override\n */\n resize: function() {\n var element = this.element;\n\n element.width = element.height = this.qrious.size;\n }\n\n});\n\nmodule.exports = ImageRenderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Defines an available option while also configuring how values are applied to the target object.\n *\n * Optionally, a default value can be specified as well a value transformer for greater control over how the option\n * value is applied.\n *\n * If no value transformer is specified, then any specified option will be applied directly. All values are maintained\n * on the target object itself as a field using the option name prefixed with a single underscore.\n *\n * When an option is specified as modifiable, the {@link OptionManager} will be required to include a setter for the\n * property that is defined on the target object that uses the option name.\n *\n * @param {string} name - the name to be used\n * @param {boolean} [modifiable] - true
if the property defined on target objects should include a setter;\n * otherwise false
\n * @param {*} [defaultValue] - the default value to be used\n * @param {Option~ValueTransformer} [valueTransformer] - the value transformer to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar Option = Nevis.extend(function(name, modifiable, defaultValue, valueTransformer) {\n /**\n * The name for this {@link Option}.\n *\n * @public\n * @type {string}\n * @memberof Option#\n */\n this.name = name;\n\n /**\n * Whether a setter should be included on the property defined on target objects for this {@link Option}.\n *\n * @public\n * @type {boolean}\n * @memberof Option#\n */\n this.modifiable = Boolean(modifiable);\n\n /**\n * The default value for this {@link Option}.\n *\n * @public\n * @type {*}\n * @memberof Option#\n */\n this.defaultValue = defaultValue;\n\n this._valueTransformer = valueTransformer;\n}, {\n\n /**\n * Transforms the specified value
so that it can be applied for this {@link Option}.\n *\n * If a value transformer has been specified for this {@link Option}, it will be called upon to transform\n * value
. Otherwise, value
will be returned directly.\n *\n * @param {*} value - the value to be transformed\n * @return {*} The transformed value or value
if no value transformer is specified.\n * @public\n * @memberof Option#\n */\n transform: function(value) {\n var transformer = this._valueTransformer;\n if (typeof transformer === 'function') {\n return transformer(value, this);\n }\n\n return value;\n }\n\n});\n\nmodule.exports = Option;\n\n/**\n * Returns a transformed value for the specified value
to be applied for the option
provided.\n *\n * @callback Option~ValueTransformer\n * @param {*} value - the value to be transformed\n * @param {Option} option - the {@link Option} for which value
is being transformed\n * @return {*} The transform value.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Utilities = Nevis.extend(null, {\n\n /**\n * Returns the absolute value of a given number.\n *\n * This method is simply a convenient shorthand for Math.abs
while ensuring that nulls are returned as\n * null
instead of zero.\n *\n * @param {number} value - the number whose absolute value is to be returned\n * @return {number} The absolute value of value
or null
if value
is\n * null
.\n * @public\n * @static\n * @memberof Utilities\n */\n abs: function(value) {\n return value != null ? Math.abs(value) : null;\n },\n\n /**\n * Returns whether the specified object
has a property with the specified name
as an own\n * (not inherited) property.\n *\n * @param {Object} object - the object on which the property is to be checked\n * @param {string} name - the name of the property to be checked\n * @return {boolean} true
if object
has an own property with name
.\n * @public\n * @static\n * @memberof Utilities\n */\n hasOwn: function(object, name) {\n return Object.prototype.hasOwnProperty.call(object, name);\n },\n\n /**\n * A non-operation method that does absolutely nothing.\n *\n * @return {void}\n * @public\n * @static\n * @memberof Utilities\n */\n noop: function() {},\n\n /**\n * Transforms the specified string
to upper case while remaining null-safe.\n *\n * @param {string} string - the string to be transformed to upper case\n * @return {string} string
transformed to upper case if string
is not null
.\n * @public\n * @static\n * @memberof Utilities\n */\n toUpperCase: function(string) {\n return string != null ? string.toUpperCase() : null;\n }\n\n});\n\nmodule.exports = Utilities;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar Utilities = require('../util/Utilities');\n\n/**\n * Manages multiple {@link Option} instances that are intended to be used by multiple implementations.\n *\n * Although the option definitions are shared between targets, the values are maintained on the targets themselves.\n *\n * @param {Option[]} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar OptionManager = Nevis.extend(function(options) {\n /**\n * The available options for this {@link OptionManager}.\n *\n * @public\n * @type {Object.}\n * @memberof OptionManager#\n */\n this.options = {};\n\n options.forEach(function(option) {\n this.options[option.name] = option;\n }, this);\n}, {\n\n /**\n * Returns whether an option with the specified name
is available.\n *\n * @param {string} name - the name of the {@link Option} whose existence is to be checked\n * @return {boolean} true
if an {@link Option} exists with name
; otherwise\n * false
.\n * @public\n * @memberof OptionManager#\n */\n exists: function(name) {\n return this.options[name] != null;\n },\n\n /**\n * Returns the value of the option with the specified name
on the target
object provided.\n *\n * @param {string} name - the name of the {@link Option} whose value on target
is to be returned\n * @param {Object} target - the object from which the value of the named {@link Option} is to be returned\n * @return {*} The value of the {@link Option} with name
on target
.\n * @public\n * @memberof OptionManager#\n */\n get: function(name, target) {\n return OptionManager._get(this.options[name], target);\n },\n\n /**\n * Returns a copy of all of the available options on the target
object provided.\n *\n * @param {Object} target - the object from which the option name/value pairs are to be returned\n * @return {Object.} A hash containing the name/value pairs of all options on target
.\n * @public\n * @memberof OptionManager#\n */\n getAll: function(target) {\n var name;\n var options = this.options;\n var result = {};\n\n for (name in options) {\n if (Utilities.hasOwn(options, name)) {\n result[name] = OptionManager._get(options[name], target);\n }\n }\n\n return result;\n },\n\n /**\n * Initializes the available options for the target
object provided and then applies the initial values\n * within the speciifed options
.\n *\n * This method will throw an error if any of the names within options
does not match an available option.\n *\n * This involves setting the default values and defining properties for all of the available options on\n * target
before finally calling {@link OptionMananger#setAll} with options
and\n * target
. Any options that are configured to be modifiable will have a setter included in their defined\n * property that will allow its corresponding value to be modified.\n *\n * If a change handler is specified, it will be called whenever the value changes on target
for a\n * modifiable option, but only when done so via the defined property's setter.\n *\n * @param {Object.} options - the name/value pairs of the initial options to be set\n * @param {Object} target - the object on which the options are to be initialized\n * @param {Function} [changeHandler] - the function to be called whenever the value of an modifiable option changes on\n * target
\n * @return {void}\n * @throws {Error} If options
contains an invalid option name.\n * @public\n * @memberof OptionManager#\n */\n init: function(options, target, changeHandler) {\n if (typeof changeHandler !== 'function') {\n changeHandler = Utilities.noop;\n }\n\n var name, option;\n\n for (name in this.options) {\n if (Utilities.hasOwn(this.options, name)) {\n option = this.options[name];\n\n OptionManager._set(option, option.defaultValue, target);\n OptionManager._createAccessor(option, target, changeHandler);\n }\n }\n\n this._setAll(options, target, true);\n },\n\n /**\n * Sets the value of the option with the specified name
on the target
object provided to\n * value
.\n *\n * This method will throw an error if name
does not match an available option or matches an option that\n * cannot be modified.\n *\n * If value
is null
and the {@link Option} has a default value configured, then that default\n * value will be used instead. If the {@link Option} also has a value transformer configured, it will be used to\n * transform whichever value was determined to be used.\n *\n * This method returns whether the value of the underlying field on target
was changed as a result.\n *\n * @param {string} name - the name of the {@link Option} whose value is to be set\n * @param {*} value - the value to be set for the named {@link Option} on target
\n * @param {Object} target - the object on which value
is to be set for the named {@link Option}\n * @return {boolean} true
if the underlying field on target
was changed; otherwise\n * false
.\n * @throws {Error} If name
is invalid or is for an option that cannot be modified.\n * @public\n * @memberof OptionManager#\n */\n set: function(name, value, target) {\n return this._set(name, value, target);\n },\n\n /**\n * Sets all of the specified options
on the target
object provided to their corresponding\n * values.\n *\n * This method will throw an error if any of the names within options
does not match an available option\n * or matches an option that cannot be modified.\n *\n * If any value within options
is null
and the corresponding {@link Option} has a default\n * value configured, then that default value will be used instead. If an {@link Option} also has a value transformer\n * configured, it will be used to transform whichever value was determined to be used.\n *\n * This method returns whether the value for any of the underlying fields on target
were changed as a\n * result.\n *\n * @param {Object.} options - the name/value pairs of options to be set\n * @param {Object} target - the object on which the options are to be set\n * @return {boolean} true
if any of the underlying fields on target
were changed; otherwise\n * false
.\n * @throws {Error} If options
contains an invalid option name or an option that cannot be modiifed.\n * @public\n * @memberof OptionManager#\n */\n setAll: function(options, target) {\n return this._setAll(options, target);\n },\n\n _set: function(name, value, target, allowUnmodifiable) {\n var option = this.options[name];\n if (!option) {\n throw new Error('Invalid option: ' + name);\n }\n if (!option.modifiable && !allowUnmodifiable) {\n throw new Error('Option cannot be modified: ' + name);\n }\n\n return OptionManager._set(option, value, target);\n },\n\n _setAll: function(options, target, allowUnmodifiable) {\n if (!options) {\n return false;\n }\n\n var name;\n var changed = false;\n\n for (name in options) {\n if (Utilities.hasOwn(options, name) && this._set(name, options[name], target, allowUnmodifiable)) {\n changed = true;\n }\n }\n\n return changed;\n }\n\n}, {\n\n _createAccessor: function(option, target, changeHandler) {\n var descriptor = {\n get: function() {\n return OptionManager._get(option, target);\n }\n };\n\n if (option.modifiable) {\n descriptor.set = function(value) {\n if (OptionManager._set(option, value, target)) {\n changeHandler(value, option);\n }\n };\n }\n\n Object.defineProperty(target, option.name, descriptor);\n },\n\n _get: function(option, target) {\n return target['_' + option.name];\n },\n\n _set: function(option, value, target) {\n var fieldName = '_' + option.name;\n var oldValue = target[fieldName];\n var newValue = option.transform(value != null ? value : option.defaultValue);\n\n target[fieldName] = newValue;\n\n return newValue !== oldValue;\n }\n\n});\n\nmodule.exports = OptionManager;\n\n/**\n * Called whenever the value of a modifiable {@link Option} is changed on a target object via the defined property's\n * setter.\n *\n * @callback OptionManager~ChangeHandler\n * @param {*} value - the new value for option
on the target object\n * @param {Option} option - the modifable {@link Option} whose value has changed on the target object.\n * @return {void}\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar ServiceManager = Nevis.extend(function() {\n this._services = {};\n}, {\n\n /**\n * Returns the {@link Service} being managed with the specified name
.\n *\n * @param {string} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name
.\n * @throws {Error} If no {@link Service} is being managed with name
.\n * @public\n * @memberof ServiceManager#\n */\n getService: function(name) {\n var service = this._services[name];\n if (!service) {\n throw new Error('Service is not being managed with name: ' + name);\n }\n\n return service;\n },\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name
to the\n * service
provided.\n *\n * @param {string} name - the name of the {@link Service} to be managed with name
\n * @param {Service} service - the {@link Service} implementation to be managed\n * @return {void}\n * @throws {Error} If a {@link Service} is already being managed with the same name
.\n * @public\n * @memberof ServiceManager#\n */\n setService: function(name, service) {\n if (this._services[name]) {\n throw new Error('Service is already managed with name: ' + name);\n }\n\n if (service) {\n this._services[name] = service;\n }\n }\n\n});\n\nmodule.exports = ServiceManager;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar CanvasRenderer = require('./renderer/CanvasRenderer');\nvar Frame = require('./Frame');\nvar ImageRenderer = require('./renderer/ImageRenderer');\nvar Option = require('./option/Option');\nvar OptionManager = require('./option/OptionManager');\nvar ServiceManager = require('./service/ServiceManager');\nvar Utilities = require('./util/Utilities');\n\nvar optionManager = new OptionManager([\n new Option('background', true, 'white'),\n new Option('backgroundAlpha', true, 1, Utilities.abs),\n new Option('element'),\n new Option('foreground', true, 'black'),\n new Option('foregroundAlpha', true, 1, Utilities.abs),\n new Option('level', true, 'L', Utilities.toUpperCase),\n new Option('mime', true, 'image/png'),\n new Option('padding', true, null, Utilities.abs),\n new Option('size', true, 100, Utilities.abs),\n new Option('value', true, '')\n]);\nvar serviceManager = new ServiceManager();\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas
for rendering.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @throws {Error} If any options
are invalid.\n * @public\n * @class\n * @extends Nevis\n */\nvar QRious = Nevis.extend(function(options) {\n optionManager.init(options, this, this.update.bind(this));\n\n var element = optionManager.get('element', this);\n var elementService = serviceManager.getService('element');\n var canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas();\n var image = element && elementService.isImage(element) ? element : elementService.createImage();\n\n this._canvasRenderer = new CanvasRenderer(this, canvas, true);\n this._imageRenderer = new ImageRenderer(this, image, image === element);\n\n this.update();\n}, {\n\n /**\n * Returns all of the options configured for this {@link QRious}.\n *\n * Any changes made to the returned object will not be reflected in the options themselves or their corresponding\n * underlying fields.\n *\n * @return {Object.} A copy of the applied options.\n * @public\n * @memberof QRious#\n */\n get: function() {\n return optionManager.getAll(this);\n },\n\n /**\n * Sets all of the specified options
and automatically updates this {@link QRious} if any of the\n * underlying fields are changed as a result.\n *\n * This is the preferred method for updating multiple options at one time to avoid unnecessary updates between\n * changes.\n *\n * @param {QRious~Options} options - the options to be set\n * @return {void}\n * @throws {Error} If any options
are invalid or cannot be modified.\n * @public\n * @memberof QRious#\n */\n set: function(options) {\n if (optionManager.setAll(options, this)) {\n this.update();\n }\n },\n\n /**\n * Returns the image data URI for the generated QR code using the mime
provided.\n *\n * @param {string} [mime] - the MIME type for the image\n * @return {string} The image data URI for the QR code.\n * @public\n * @memberof QRious#\n */\n toDataURL: function(mime) {\n return this.canvas.toDataURL(mime || this.mime);\n },\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @return {void}\n * @protected\n * @memberof QRious#\n */\n update: function() {\n var frame = new Frame({\n level: this.level,\n value: this.value\n });\n\n this._canvasRenderer.render(frame);\n this._imageRenderer.render(frame);\n }\n\n}, {\n\n /**\n * The current version of {@link QRious}.\n *\n * @public\n * @static\n * @type {string}\n * @memberof QRious\n */\n VERSION: '3.0.1',\n\n /**\n * Configures the service
provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @return {void}\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n * @memberof QRious\n */\n use: function(service) {\n serviceManager.setService(service.getName(), service);\n }\n\n});\n\nObject.defineProperties(QRious.prototype, {\n\n canvas: {\n /**\n * Returns the canvas
element being used to render the QR code for this {@link QRious}.\n *\n * @return {*} The canvas
element.\n * @public\n * @memberof QRious#\n * @alias canvas\n */\n get: function() {\n return this._canvasRenderer.getElement();\n }\n },\n\n image: {\n /**\n * Returns the img
element being used to render the QR code for this {@link QRious}.\n *\n * @return {*} The img
element.\n * @public\n * @memberof QRious#\n * @alias image\n */\n get: function() {\n return this._imageRenderer.getElement();\n }\n }\n\n});\n\nmodule.exports = QRious;\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {string} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {number} [backgroundAlpha=1] - The background alpha to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas
or\n * img
. The element(s) will be created if needed.\n * @property {string} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {number} [foregroundAlpha=1] - The foreground alpha to be applied to the QR code.\n * @property {string} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {string} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {number} [padding] - The padding for the QR code in pixels.\n * @property {number} [size=100] - The size of the QR code in pixels.\n * @property {string} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar BrowserElementService = require('../service/element/BrowserElementService');\nvar QRious = require('../QRious');\n\nQRious.use(new BrowserElementService());\n\nmodule.exports = QRious;\n"],"names":["extend","require$$0","Nevis","Service","ElementService","Renderer","ErrorCorrection","Galois","Alignment","Version","Utilities","OptionManager","Option","ServiceManager","CanvasRenderer","ImageRenderer","Frame","QRious","BrowserElementService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA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I,CAAC,KAAK;OAClB,CAAC,CAAC;;MAEH,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;MACnC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KACnC;;GAEF,EAAE;;;;;;;;;;IAUD,OAAO,EAAE,OAAO;;;;;;;;;;;;IAYhB,GAAG,EAAE,SAAS,OAAO,EAAE;MACrB,cAAc,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;KACvD;;GAEF,CAAC,CAAC;;AAEH,EAAA,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,EAAE;;IAExC,MAAM,EAAE;;;;;;;;;MASN,GAAG,EAAE,WAAW;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;OAC1C;KACF;;IAED,KAAK,EAAE;;;;;;;;;MASL,GAAG,EAAE,WAAW;QACd,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;OACzC;KACF;;GAEF,CAAC,CAAC;;AAEH,cAAc,GAAG,MAAM,CAAC;;;;;;;;;;;;;;;;;KAiBrB;;ACvLHC,UAAM,CAAC,GAAG,CAAC,IAAIC,uBAAqB,EAAE,CAAC,CAAC;;AAExC,aAAc,GAAGD,QAAM,CAAC;;;;"}
\ No newline at end of file
diff --git a/dist/qrious.min.js b/dist/qrious.min.js
index 03dcce1..f72e53e 100644
--- a/dist/qrious.min.js
+++ b/dist/qrious.min.js
@@ -1,6 +1,6 @@
-/*! QRious v3.0.0 | (C) 2017 Alasdair Mercer | GPL v3 License
+/*! QRious v3.0.1 | (C) 2017 Alasdair Mercer | GPL v3 License
Based on jsqrencode | (C) 2010 tz@execpc.com | GPL v3 License
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("qrious",e):t.QRious=e()}(this,function(){"use strict";function t(t,e){var n;return"function"==typeof Object.create?n=Object.create(t):(s.prototype=t,n=new s,s.prototype=null),e&&i(!0,n,e),n}function e(e,n,s,r){var o=this;return"string"!=typeof e&&(r=s,s=n,n=e,e=null),"function"!=typeof n&&(r=s,s=n,n=function(){return o.apply(this,arguments)}),i(!1,n,o,r),n.prototype=t(o.prototype,s),n.prototype.constructor=n,n.class_=e||o.class_,n.super_=o,n}function i(t,e,i){for(var n,s,a=0,h=(i=o.call(arguments,2)).length;a>1&1,n=0;n0;e--)n[e]=n[e]?n[e-1]^d.EXPONENT[p._modN(d.LOG[n[e]]+t)]:n[e-1];n[0]=d.EXPONENT[p._modN(d.LOG[n[0]]+t)]}for(t=0;t<=i;t++)n[t]=d.LOG[n[t]]},_checkBadness:function(){var t,e,i,n,s,r=0,o=this._badness,a=this.buffer,h=this.width;for(s=0;sh*h;)u-=h*h,c++;for(r+=c*p.N4,n=0;n=o-2&&(t=o-2,s>9&&t--);var a=t;if(s>9){for(r[a+2]=0,r[a+3]=0;a--;)e=r[a],r[a+3]|=255&e<<4,r[a+2]=e>>4;r[2]|=255&t<<4,r[1]=t>>4,r[0]=64|t>>12}else{for(r[a+1]=0,r[a+2]=0;a--;)e=r[a],r[a+2]|=255&e<<4,r[a+1]=e>>4;r[1]|=255&t<<4,r[0]=64|t>>4}for(a=t+3-(s<10);a=5&&(i+=p.N1+n[e]-5);for(e=3;et||3*n[e-3]>=4*n[e]||3*n[e+3]>=4*n[e])&&(i+=p.N3);return i},_finish:function(){this._stringBuffer=this.buffer.slice();var t,e,i=0,n=3e4;for(e=0;e<8&&(this._applyMask(e),(t=this._checkBadness())>=1)1&n&&(s[r-1-e+8*r]=1,e<6?s[8+r*e]=1:s[8+r*(e+1)]=1);for(e=0;e<7;e++,n>>=1)1&n&&(s[8+r*(r-7+e)]=1,e?s[6-e+8*r]=1:s[7+8*r]=1)},_interleaveBlocks:function(){var t,e,i=this._dataBlock,n=this._ecc,s=this._eccBlock,r=0,o=this._calculateMaxLength(),a=this._neccBlock1,h=this._neccBlock2,f=this._stringBuffer;for(t=0;t1)for(t=l.BLOCK[n],i=s-7;;){for(e=s-7;e>t-3&&(this._addAlignment(e,i),!(e6)for(t=v.BLOCK[r-7],e=17,i=0;i<6;i++)for(n=0;n<3;n++,e--)1&(e>11?r>>e-12:t>>e)?(s[5-i+o*(2-n+o-11)]=1,s[2-n+o-11+o*(5-i)]=1):(this._setMask(5-i,2-n+o-11),this._setMask(2-n+o-11,5-i))},_isMasked:function(t,e){var i=p._getMaskBit(t,e);return 1===this._mask[i]},_pack:function(){var t,e,i,n=1,s=1,r=this.width,o=r-1,a=r-1,h=(this._dataBlock+this._eccBlock)*(this._neccBlock1+this._neccBlock2)+this._neccBlock2;for(e=0;ee&&(i=t,t=e,e=i),i=e,i+=e*e,i>>=1,i+=t},_modN:function(t){for(;t>=255;)t=((t-=255)>>8)+(255&t);return t},N1:3,N2:3,N3:40,N4:10}),m=p,g=c.extend({draw:function(){this.element.src=this.qrious.toDataURL()},reset:function(){this.element.src=""},resize:function(){var t=this.element;t.width=t.height=this.qrious.size}}),k=h.extend(function(t,e,i,n){this.name=t,this.modifiable=Boolean(e),this.defaultValue=i,this._valueTransformer=n},{transform:function(t){var e=this._valueTransformer;return"function"==typeof e?e(t,this):t}}),w=h.extend(null,{abs:function(t){return null!=t?Math.abs(t):null},hasOwn:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},noop:function(){},toUpperCase:function(t){return null!=t?t.toUpperCase():null}}),M=h.extend(function(t){this.options={},t.forEach(function(t){this.options[t.name]=t},this)},{exists:function(t){return null!=this.options[t]},get:function(t,e){return M._get(this.options[t],e)},getAll:function(t){var e,i=this.options,n={};for(e in i)w.hasOwn(i,e)&&(n[e]=M._get(i[e],t));return n},init:function(t,e,i){"function"!=typeof i&&(i=w.noop);var n,s;for(n in this.options)w.hasOwn(this.options,n)&&(s=this.options[n],M._set(s,s.defaultValue,e),M._createAccessor(s,e,i));this._setAll(t,e,!0)},set:function(t,e,i){return this._set(t,e,i)},setAll:function(t,e){return this._setAll(t,e)},_set:function(t,e,i,n){var s=this.options[t];if(!s)throw new Error("Invalid option: "+t);if(!s.modifiable&&!n)throw new Error("Option cannot be modified: "+t);return M._set(s,e,i)},_setAll:function(t,e,i){if(!t)return!1;var n,s=!1;for(n in t)w.hasOwn(t,n)&&this._set(n,t[n],e,i)&&(s=!0);return s}},{_createAccessor:function(t,e,i){var n={get:function(){return M._get(t,e)}};t.modifiable&&(n.set=function(n){M._set(t,n,e)&&i(n,t)}),Object.defineProperty(e,t.name,n)},_get:function(t,e){return e["_"+t.name]},_set:function(t,e,i){var n="_"+t.name,s=i[n],r=t.transform(null!=e?e:t.defaultValue);return i[n]=r,r!==s}}),b=M,B=h.extend(function(){this._services={}},{getService:function(t){var e=this._services[t];if(!e)throw new Error("Service is not being managed with name: "+t);return e},setService:function(t,e){if(this._services[t])throw new Error("Service is already managed with name: "+t);e&&(this._services[t]=e)}}),y=new b([new k("background",!0,"white"),new k("backgroundAlpha",!0,1,w.abs),new k("element"),new k("foreground",!0,"black"),new k("foregroundAlpha",!0,1,w.abs),new k("level",!0,"L",w.toUpperCase),new k("mime",!0,"image/png"),new k("padding",!0,null,w.abs),new k("size",!0,100,w.abs),new k("value",!0,"")]),O=new B,A=h.extend(function(t){y.init(t,this,this.update.bind(this));var e=y.get("element",this),i=O.getService("element"),n=e&&i.isCanvas(e)?e:i.createCanvas(),s=e&&i.isImage(e)?e:i.createImage();this._canvasRenderer=new u(this,n,!0),this._imageRenderer=new g(this,s,s===e),this.update()},{get:function(){return y.getAll(this)},set:function(t){y.setAll(t,this)&&this.update()},toDataURL:function(t){return this.canvas.toDataURL(t||this.mime)},update:function(){var t=new m({level:this.level,value:this.value});this._canvasRenderer.render(t),this._imageRenderer.render(t)}},{VERSION:"3.0.0",use:function(t){O.setService(t.getName(),t)}});Object.defineProperties(A.prototype,{canvas:{get:function(){return this._canvasRenderer.getElement()}},image:{get:function(){return this._imageRenderer.getElement()}}});var L=A;return L.use(new f),L});
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("qrious",e):t.QRious=e()}(this,function(){"use strict";function t(t,e){var n;return"function"==typeof Object.create?n=Object.create(t):(s.prototype=t,n=new s,s.prototype=null),e&&i(!0,n,e),n}function e(e,n,s,r){var o=this;return"string"!=typeof e&&(r=s,s=n,n=e,e=null),"function"!=typeof n&&(r=s,s=n,n=function(){return o.apply(this,arguments)}),i(!1,n,o,r),n.prototype=t(o.prototype,s),n.prototype.constructor=n,n.class_=e||o.class_,n.super_=o,n}function i(t,e,i){for(var n,s,a=0,h=(i=o.call(arguments,2)).length;a>1&1,n=0;n0;e--)n[e]=n[e]?n[e-1]^d.EXPONENT[p._modN(d.LOG[n[e]]+t)]:n[e-1];n[0]=d.EXPONENT[p._modN(d.LOG[n[0]]+t)]}for(t=0;t<=i;t++)n[t]=d.LOG[n[t]]},_checkBadness:function(){var t,e,i,n,s,r=0,o=this._badness,a=this.buffer,h=this.width;for(s=0;sh*h;)u-=h*h,c++;for(r+=c*p.N4,n=0;n=o-2&&(t=o-2,s>9&&t--);var a=t;if(s>9){for(r[a+2]=0,r[a+3]=0;a--;)e=r[a],r[a+3]|=255&e<<4,r[a+2]=e>>4;r[2]|=255&t<<4,r[1]=t>>4,r[0]=64|t>>12}else{for(r[a+1]=0,r[a+2]=0;a--;)e=r[a],r[a+2]|=255&e<<4,r[a+1]=e>>4;r[1]|=255&t<<4,r[0]=64|t>>4}for(a=t+3-(s<10);a=5&&(i+=p.N1+n[e]-5);for(e=3;et||3*n[e-3]>=4*n[e]||3*n[e+3]>=4*n[e])&&(i+=p.N3);return i},_finish:function(){this._stringBuffer=this.buffer.slice();var t,e,i=0,n=3e4;for(e=0;e<8&&(this._applyMask(e),(t=this._checkBadness())>=1)1&n&&(s[r-1-e+8*r]=1,e<6?s[8+r*e]=1:s[8+r*(e+1)]=1);for(e=0;e<7;e++,n>>=1)1&n&&(s[8+r*(r-7+e)]=1,e?s[6-e+8*r]=1:s[7+8*r]=1)},_interleaveBlocks:function(){var t,e,i=this._dataBlock,n=this._ecc,s=this._eccBlock,r=0,o=this._calculateMaxLength(),a=this._neccBlock1,h=this._neccBlock2,f=this._stringBuffer;for(t=0;t1)for(t=l.BLOCK[n],i=s-7;;){for(e=s-7;e>t-3&&(this._addAlignment(e,i),!(e6)for(t=v.BLOCK[r-7],e=17,i=0;i<6;i++)for(n=0;n<3;n++,e--)1&(e>11?r>>e-12:t>>e)?(s[5-i+o*(2-n+o-11)]=1,s[2-n+o-11+o*(5-i)]=1):(this._setMask(5-i,2-n+o-11),this._setMask(2-n+o-11,5-i))},_isMasked:function(t,e){var i=p._getMaskBit(t,e);return 1===this._mask[i]},_pack:function(){var t,e,i,n=1,s=1,r=this.width,o=r-1,a=r-1,h=(this._dataBlock+this._eccBlock)*(this._neccBlock1+this._neccBlock2)+this._neccBlock2;for(e=0;ee&&(i=t,t=e,e=i),i=e,i+=e*e,i>>=1,i+=t},_modN:function(t){for(;t>=255;)t=((t-=255)>>8)+(255&t);return t},N1:3,N2:3,N3:40,N4:10}),m=p,g=c.extend({draw:function(){this.element.src=this.qrious.toDataURL()},reset:function(){this.element.src=""},resize:function(){var t=this.element;t.width=t.height=this.qrious.size}}),k=h.extend(function(t,e,i,n){this.name=t,this.modifiable=Boolean(e),this.defaultValue=i,this._valueTransformer=n},{transform:function(t){var e=this._valueTransformer;return"function"==typeof e?e(t,this):t}}),w=h.extend(null,{abs:function(t){return null!=t?Math.abs(t):null},hasOwn:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},noop:function(){},toUpperCase:function(t){return null!=t?t.toUpperCase():null}}),M=h.extend(function(t){this.options={},t.forEach(function(t){this.options[t.name]=t},this)},{exists:function(t){return null!=this.options[t]},get:function(t,e){return M._get(this.options[t],e)},getAll:function(t){var e,i=this.options,n={};for(e in i)w.hasOwn(i,e)&&(n[e]=M._get(i[e],t));return n},init:function(t,e,i){"function"!=typeof i&&(i=w.noop);var n,s;for(n in this.options)w.hasOwn(this.options,n)&&(s=this.options[n],M._set(s,s.defaultValue,e),M._createAccessor(s,e,i));this._setAll(t,e,!0)},set:function(t,e,i){return this._set(t,e,i)},setAll:function(t,e){return this._setAll(t,e)},_set:function(t,e,i,n){var s=this.options[t];if(!s)throw new Error("Invalid option: "+t);if(!s.modifiable&&!n)throw new Error("Option cannot be modified: "+t);return M._set(s,e,i)},_setAll:function(t,e,i){if(!t)return!1;var n,s=!1;for(n in t)w.hasOwn(t,n)&&this._set(n,t[n],e,i)&&(s=!0);return s}},{_createAccessor:function(t,e,i){var n={get:function(){return M._get(t,e)}};t.modifiable&&(n.set=function(n){M._set(t,n,e)&&i(n,t)}),Object.defineProperty(e,t.name,n)},_get:function(t,e){return e["_"+t.name]},_set:function(t,e,i){var n="_"+t.name,s=i[n],r=t.transform(null!=e?e:t.defaultValue);return i[n]=r,r!==s}}),b=M,B=h.extend(function(){this._services={}},{getService:function(t){var e=this._services[t];if(!e)throw new Error("Service is not being managed with name: "+t);return e},setService:function(t,e){if(this._services[t])throw new Error("Service is already managed with name: "+t);e&&(this._services[t]=e)}}),y=new b([new k("background",!0,"white"),new k("backgroundAlpha",!0,1,w.abs),new k("element"),new k("foreground",!0,"black"),new k("foregroundAlpha",!0,1,w.abs),new k("level",!0,"L",w.toUpperCase),new k("mime",!0,"image/png"),new k("padding",!0,null,w.abs),new k("size",!0,100,w.abs),new k("value",!0,"")]),O=new B,A=h.extend(function(t){y.init(t,this,this.update.bind(this));var e=y.get("element",this),i=O.getService("element"),n=e&&i.isCanvas(e)?e:i.createCanvas(),s=e&&i.isImage(e)?e:i.createImage();this._canvasRenderer=new u(this,n,!0),this._imageRenderer=new g(this,s,s===e),this.update()},{get:function(){return y.getAll(this)},set:function(t){y.setAll(t,this)&&this.update()},toDataURL:function(t){return this.canvas.toDataURL(t||this.mime)},update:function(){var t=new m({level:this.level,value:this.value});this._canvasRenderer.render(t),this._imageRenderer.render(t)}},{VERSION:"3.0.1",use:function(t){O.setService(t.getName(),t)}});Object.defineProperties(A.prototype,{canvas:{get:function(){return this._canvasRenderer.getElement()}},image:{get:function(){return this._imageRenderer.getElement()}}});var L=A;return L.use(new f),L});
//# sourceMappingURL=qrious.min.js.map
\ No newline at end of file
diff --git a/dist/qrious.min.js.map b/dist/qrious.min.js.map
index bfbf4a0..3ff6ffa 100644
--- a/dist/qrious.min.js.map
+++ b/dist/qrious.min.js.map
@@ -1 +1 @@
-{"version":3,"file":"qrious.min.js","sources":["../node_modules/nevis/src/extend.js","../node_modules/nevis/src/nevis.js","../src/service/Service.js","../src/service/element/ElementService.js","../src/service/element/BrowserElementService.js","../src/renderer/Renderer.js","../src/renderer/CanvasRenderer.js","../src/Alignment.js","../src/ErrorCorrection.js","../src/Galois.js","../src/Version.js","../src/Frame.js","../src/renderer/ImageRenderer.js","../src/option/Option.js","../src/util/Utilities.js","../src/option/OptionManager.js","../src/service/ServiceManager.js","../src/QRious.js","../src/runtime/browser.js"],"sourcesContent":["/*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n'use strict';\n\n/**\n * A bare-bones constructor for surrogate prototype swapping.\n *\n * @private\n * @constructor\n */\nvar Constructor = /* istanbul ignore next */ function() {};\n/**\n * A reference to Object.prototype.hasOwnProperty
.\n *\n * @private\n * @type {Function}\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * A reference to Array.prototype.slice
.\n *\n * @private\n * @type {Function}\n */\nvar slice = Array.prototype.slice;\n\n/**\n * Creates an object which inherits the given prototype
.\n *\n * Optionally, the created object can be extended further with the specified properties
.\n *\n * @param {Object} prototype - the prototype to be inherited by the created object\n * @param {Object} [properties] - the optional properties to be extended by the created object\n * @return {Object} The newly created object.\n * @private\n */\nfunction createObject(prototype, properties) {\n var result;\n /* istanbul ignore next */\n if (typeof Object.create === 'function') {\n result = Object.create(prototype);\n } else {\n Constructor.prototype = prototype;\n result = new Constructor();\n Constructor.prototype = null;\n }\n\n if (properties) {\n extendObject(true, result, properties);\n }\n\n return result;\n}\n\n/**\n * Extends the constructor to which this method is associated with the prototype
and/or\n * statics
provided.\n *\n * If name
is provided, it will be used as the class name and can be accessed via a special\n * class_
property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString
), but this is not applicable to the lite version of Nevis.\n *\n * If constructor
is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_
property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor
provided or the one created if none was given.\n * @public\n */\nfunction extend(name, constructor, prototype, statics) {\n var superConstructor = this;\n\n if (typeof name !== 'string') {\n statics = prototype;\n prototype = constructor;\n constructor = name;\n name = null;\n }\n\n if (typeof constructor !== 'function') {\n statics = prototype;\n prototype = constructor;\n constructor = function() {\n return superConstructor.apply(this, arguments);\n };\n }\n\n extendObject(false, constructor, superConstructor, statics);\n\n constructor.prototype = createObject(superConstructor.prototype, prototype);\n constructor.prototype.constructor = constructor;\n\n constructor.class_ = name || superConstructor.class_;\n constructor.super_ = superConstructor;\n\n return constructor;\n}\n\n/**\n * Extends the specified target
object with the properties in each of the sources
provided.\n *\n * if any source is null
it will be ignored.\n *\n * @param {boolean} own - true
to only copy own properties from sources
onto\n * target
; otherwise false
\n * @param {Object} target - the target object which should be extended\n * @param {...Object} [sources] - the source objects whose properties are to be copied onto target
\n * @return {void}\n * @private\n */\nfunction extendObject(own, target, sources) {\n sources = slice.call(arguments, 2);\n\n var property;\n var source;\n\n for (var i = 0, length = sources.length; i < length; i++) {\n source = sources[i];\n\n for (property in source) {\n if (!own || hasOwnProperty.call(source, property)) {\n target[property] = source[property];\n }\n }\n }\n}\n\nmodule.exports = extend;\n","/*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n'use strict';\n\nvar extend = require('./extend');\n\n/**\n * The base class from which all others should extend.\n *\n * @public\n * @constructor\n */\nfunction Nevis() {}\nNevis.class_ = 'Nevis';\nNevis.super_ = Object;\n\n/**\n * Extends the constructor to which this method is associated with the prototype
and/or\n * statics
provided.\n *\n * If name
is provided, it will be used as the class name and can be accessed via a special\n * class_
property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString
), but this is not applicable to the lite version of Nevis.\n *\n * If constructor
is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_
property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor
provided or the one created if none was given.\n * @public\n * @static\n * @memberof Nevis\n */\nNevis.extend = extend;\n\nmodule.exports = Nevis;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Service = Nevis.extend({\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {string} The service name.\n * @public\n * @abstract\n * @memberof Service#\n */\n getName: function() {}\n\n});\n\nmodule.exports = Service;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Service = require('../Service');\n\n/**\n * A service for working with elements.\n *\n * @public\n * @class\n * @extends Service\n */\nvar ElementService = Service.extend({\n\n /**\n * Creates an instance of a canvas element.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @return {*} The newly created canvas element.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n createCanvas: function() {},\n\n /**\n * Creates an instance of a image element.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @return {*} The newly created image element.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n createImage: function() {},\n\n /**\n * @override\n */\n getName: function() {\n return 'element';\n },\n\n /**\n * Returns whether the specified element
is a canvas.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @param {*} element - the element to be checked\n * @return {boolean} true
if element
is a canvas; otherwise false
.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n isCanvas: function(element) {},\n\n /**\n * Returns whether the specified element
is an image.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @param {*} element - the element to be checked\n * @return {boolean} true
if element
is an image; otherwise false
.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n isImage: function(element) {}\n\n});\n\nmodule.exports = ElementService;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar ElementService = require('./ElementService');\n\n/**\n * An implementation of {@link ElementService} intended for use within a browser environment.\n *\n * @public\n * @class\n * @extends ElementService\n */\nvar BrowserElementService = ElementService.extend({\n\n /**\n * @override\n */\n createCanvas: function() {\n return document.createElement('canvas');\n },\n\n /**\n * @override\n */\n createImage: function() {\n return document.createElement('img');\n },\n\n /**\n * @override\n */\n isCanvas: function(element) {\n return element instanceof HTMLCanvasElement;\n },\n\n /**\n * @override\n */\n isImage: function(element) {\n return element instanceof HTMLImageElement;\n }\n\n});\n\nmodule.exports = BrowserElementService;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so the ordering of their execution is important.\n *\n * The rendering of a element can be deferred by disabling the renderer initially, however, any attempt get the element\n * from the renderer will result in it being immediately enabled and the element being rendered.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @param {*} element - the element onto which the QR code is to be rendered\n * @param {boolean} [enabled] - true
this {@link Renderer} is enabled; otherwise false
.\n * @public\n * @class\n * @extends Nevis\n */\nvar Renderer = Nevis.extend(function(qrious, element, enabled) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n * @memberof Renderer#\n */\n this.qrious = qrious;\n\n /**\n * The element onto which this {@link Renderer} is rendering the QR code.\n *\n * @protected\n * @type {*}\n * @memberof Renderer#\n */\n this.element = element;\n this.element.qrious = qrious;\n\n /**\n * Whether this {@link Renderer} is enabled.\n *\n * @protected\n * @type {boolean}\n * @memberof Renderer#\n */\n this.enabled = Boolean(enabled);\n}, {\n\n /**\n * Draws the specified QR code frame
on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n draw: function(frame) {},\n\n /**\n * Returns the element onto which this {@link Renderer} is rendering the QR code.\n *\n * If this method is called while this {@link Renderer} is disabled, it will be immediately enabled and rendered\n * before the element is returned.\n *\n * @return {*} The element.\n * @public\n * @memberof Renderer#\n */\n getElement: function() {\n if (!this.enabled) {\n this.enabled = true;\n this.render();\n }\n\n return this.element;\n },\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame
provided.\n *\n * Any configured padding will be excluded from the returned size.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n * @memberof Renderer#\n */\n getModuleSize: function(frame) {\n var qrious = this.qrious;\n var padding = qrious.padding || 0;\n var pixels = Math.floor((qrious.size - (padding * 2)) / frame.width);\n\n return Math.max(1, pixels);\n },\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame
\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n * @memberof Renderer#\n */\n getOffset: function(frame) {\n var qrious = this.qrious;\n var padding = qrious.padding;\n\n if (padding != null) {\n return padding;\n }\n\n var moduleSize = this.getModuleSize(frame);\n var offset = Math.floor((qrious.size - (moduleSize * frame.width)) / 2);\n\n return Math.max(0, offset);\n },\n\n /**\n * Renders a QR code on the underlying element based on the frame
provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @return {void}\n * @public\n * @memberof Renderer#\n */\n render: function(frame) {\n if (this.enabled) {\n this.resize();\n this.reset();\n this.draw(frame);\n }\n },\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n reset: function() {},\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n resize: function() {}\n\n});\n\nmodule.exports = Renderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Renderer = require('./Renderer');\n\n/**\n * An implementation of {@link Renderer} for working with canvas
elements.\n *\n * @public\n * @class\n * @extends Renderer\n */\nvar CanvasRenderer = Renderer.extend({\n\n /**\n * @override\n */\n draw: function(frame) {\n var i, j;\n var qrious = this.qrious;\n var moduleSize = this.getModuleSize(frame);\n var offset = this.getOffset(frame);\n var context = this.element.getContext('2d');\n\n context.fillStyle = qrious.foreground;\n context.globalAlpha = qrious.foregroundAlpha;\n\n for (i = 0; i < frame.width; i++) {\n for (j = 0; j < frame.width; j++) {\n if (frame.buffer[(j * frame.width) + i]) {\n context.fillRect((moduleSize * i) + offset, (moduleSize * j) + offset, moduleSize, moduleSize);\n }\n }\n }\n },\n\n /**\n * @override\n */\n reset: function() {\n var qrious = this.qrious;\n var context = this.element.getContext('2d');\n var size = qrious.size;\n\n context.lineWidth = 1;\n context.clearRect(0, 0, size, size);\n context.fillStyle = qrious.background;\n context.globalAlpha = qrious.backgroundAlpha;\n context.fillRect(0, 0, size, size);\n },\n\n /**\n * @override\n */\n resize: function() {\n var element = this.element;\n\n element.width = element.height = this.qrious.size;\n }\n\n});\n\nmodule.exports = CanvasRenderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\n/* eslint no-multi-spaces: \"off\" */\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Alignment = Nevis.extend(null, {\n\n /**\n * The alignment pattern block.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Alignment\n */\n BLOCK: [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n\n});\n\nmodule.exports = Alignment;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\n/* eslint no-multi-spaces: \"off\" */\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains error correction information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar ErrorCorrection = Nevis.extend(null, {\n\n /**\n * The error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof ErrorCorrection\n */\n BLOCKS: [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ],\n\n /**\n * The final format bits with mask (level << 3 | mask).\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof ErrorCorrection\n */\n FINAL_FORMAT: [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ],\n\n /**\n * A map of human-readable ECC levels.\n *\n * @public\n * @static\n * @type {Object.}\n * @memberof ErrorCorrection\n */\n LEVELS: {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n\n});\n\nmodule.exports = ErrorCorrection;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains Galois field information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Galois = Nevis.extend(null, {\n\n /**\n * The Galois field exponent table.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Galois\n */\n EXPONENT: [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,\n 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,\n 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,\n 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,\n 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2,\n 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce,\n 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc,\n 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54,\n 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,\n 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff,\n 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,\n 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,\n 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ],\n\n /**\n * The Galois field log table.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Galois\n */\n LOG: [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81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 0x0c, 0x6f, 0xf6,\n 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a,\n 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n\n});\n\nmodule.exports = Galois;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains version pattern information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Version = Nevis.extend(null, {\n\n /**\n * The version pattern block.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Version\n */\n BLOCK: [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n\n});\n\nmodule.exports = Version;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar Alignment = require('./Alignment');\nvar ErrorCorrection = require('./ErrorCorrection');\nvar Galois = require('./Galois');\nvar Version = require('./Version');\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar Frame = Nevis.extend(function(options) {\n var dataBlock, eccBlock, index, neccBlock1, neccBlock2;\n var valueLength = options.value.length;\n\n this._badness = [];\n this._level = ErrorCorrection.LEVELS[options.level];\n this._polynomial = [];\n this._value = options.value;\n this._version = 0;\n this._stringBuffer = [];\n\n while (this._version < 40) {\n this._version++;\n\n index = ((this._level - 1) * 4) + ((this._version - 1) * 16);\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++];\n neccBlock2 = ErrorCorrection.BLOCKS[index++];\n dataBlock = ErrorCorrection.BLOCKS[index++];\n eccBlock = ErrorCorrection.BLOCKS[index];\n\n index = (dataBlock * (neccBlock1 + neccBlock2)) + neccBlock2 - 3 + (this._version <= 9);\n\n if (valueLength <= index) {\n break;\n }\n }\n\n this._dataBlock = dataBlock;\n this._eccBlock = eccBlock;\n this._neccBlock1 = neccBlock1;\n this._neccBlock2 = neccBlock2;\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {number}\n * @memberof Frame#\n */\n // FIXME: Ensure that it fits instead of being truncated.\n var width = this.width = 17 + (4 * this._version);\n\n /**\n * The image buffer.\n *\n * @public\n * @type {number[]}\n * @memberof Frame#\n */\n this.buffer = Frame._createArray(width * width);\n\n this._ecc = Frame._createArray(dataBlock + ((dataBlock + eccBlock) * (neccBlock1 + neccBlock2)) + neccBlock2);\n this._mask = Frame._createArray(((width * (width + 1)) + 1) / 2);\n\n this._insertFinders();\n this._insertAlignments();\n\n // Insert single foreground cell.\n this.buffer[8 + (width * (width - 8))] = 1;\n\n this._insertTimingGap();\n this._reverseMask();\n this._insertTimingRowAndColumn();\n this._insertVersion();\n this._syncMask();\n this._convertBitStream(valueLength);\n this._calculatePolynomial();\n this._appendEccToData();\n this._interleaveBlocks();\n this._pack();\n this._finish();\n}, {\n\n _addAlignment: function(x, y) {\n var i;\n var buffer = this.buffer;\n var width = this.width;\n\n buffer[x + (width * y)] = 1;\n\n for (i = -2; i < 2; i++) {\n buffer[x + i + (width * (y - 2))] = 1;\n buffer[x - 2 + (width * (y + i + 1))] = 1;\n buffer[x + 2 + (width * (y + i))] = 1;\n buffer[x + i + 1 + (width * (y + 2))] = 1;\n }\n\n for (i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i);\n this._setMask(x + 1, y - i);\n this._setMask(x - i, y - 1);\n this._setMask(x + i, y + 1);\n }\n },\n\n _appendData: function(data, dataLength, ecc, eccLength) {\n var bit, i, j;\n var polynomial = this._polynomial;\n var stringBuffer = this._stringBuffer;\n\n for (i = 0; i < eccLength; i++) {\n stringBuffer[ecc + i] = 0;\n }\n\n for (i = 0; i < dataLength; i++) {\n bit = Galois.LOG[stringBuffer[data + i] ^ stringBuffer[ecc]];\n\n if (bit !== 255) {\n for (j = 1; j < eccLength; j++) {\n stringBuffer[ecc + j - 1] = stringBuffer[ecc + j] ^\n Galois.EXPONENT[Frame._modN(bit + polynomial[eccLength - j])];\n }\n } else {\n for (j = ecc; j < ecc + eccLength; j++) {\n stringBuffer[j] = stringBuffer[j + 1];\n }\n }\n\n stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + polynomial[0])];\n }\n },\n\n _appendEccToData: function() {\n var i;\n var data = 0;\n var dataBlock = this._dataBlock;\n var ecc = this._calculateMaxLength();\n var eccBlock = this._eccBlock;\n\n for (i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, dataBlock, ecc, eccBlock);\n\n data += dataBlock;\n ecc += eccBlock;\n }\n\n for (i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, dataBlock + 1, ecc, eccBlock);\n\n data += dataBlock + 1;\n ecc += eccBlock;\n }\n },\n\n _applyMask: function(mask) {\n var r3x, r3y, x, y;\n var buffer = this.buffer;\n var width = this.width;\n\n switch (mask) {\n case 0:\n for (y = 0; y < width; y++) {\n for (x = 0; x < width; x++) {\n if (!((x + y) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 1:\n for (y = 0; y < width; y++) {\n for (x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 2:\n for (y = 0; y < width; y++) {\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 3:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 4:\n for (y = 0; y < width; y++) {\n for (r3x = 0, r3y = (y >> 1) & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n r3y = !r3y;\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 5:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 6:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((x & y & 1) + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 7:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n }\n },\n\n _calculateMaxLength: function() {\n return (this._dataBlock * (this._neccBlock1 + this._neccBlock2)) + this._neccBlock2;\n },\n\n _calculatePolynomial: function() {\n var i, j;\n var eccBlock = this._eccBlock;\n var polynomial = this._polynomial;\n\n polynomial[0] = 1;\n\n for (i = 0; i < eccBlock; i++) {\n polynomial[i + 1] = 1;\n\n for (j = i; j > 0; j--) {\n polynomial[j] = polynomial[j] ? polynomial[j - 1] ^\n Galois.EXPONENT[Frame._modN(Galois.LOG[polynomial[j]] + i)] : polynomial[j - 1];\n }\n\n polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[polynomial[0]] + i)];\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (i = 0; i <= eccBlock; i++) {\n polynomial[i] = Galois.LOG[polynomial[i]];\n }\n },\n\n _checkBadness: function() {\n var b, b1, h, x, y;\n var bad = 0;\n var badness = this._badness;\n var buffer = this.buffer;\n var width = this.width;\n\n // Blocks of same colour.\n for (y = 0; y < width - 1; y++) {\n for (x = 0; x < width - 1; x++) {\n // All foreground colour.\n if ((buffer[x + (width * y)] &&\n buffer[x + 1 + (width * y)] &&\n buffer[x + (width * (y + 1))] &&\n buffer[x + 1 + (width * (y + 1))]) ||\n // All background colour.\n !(buffer[x + (width * y)] ||\n buffer[x + 1 + (width * y)] ||\n buffer[x + (width * (y + 1))] ||\n buffer[x + 1 + (width * (y + 1))])) {\n bad += Frame.N2;\n }\n }\n }\n\n var bw = 0;\n\n // X runs.\n for (y = 0; y < width; y++) {\n h = 0;\n\n badness[0] = 0;\n\n for (b = 0, x = 0; x < width; x++) {\n b1 = buffer[x + (width * y)];\n\n if (b === b1) {\n badness[h]++;\n } else {\n badness[++h] = 1;\n }\n\n b = b1;\n bw += b ? 1 : -1;\n }\n\n bad += this._getBadness(h);\n }\n\n if (bw < 0) {\n bw = -bw;\n }\n\n var count = 0;\n var big = bw;\n big += big << 2;\n big <<= 1;\n\n while (big > width * width) {\n big -= width * width;\n count++;\n }\n\n bad += count * Frame.N4;\n\n // Y runs.\n for (x = 0; x < width; x++) {\n h = 0;\n\n badness[0] = 0;\n\n for (b = 0, y = 0; y < width; y++) {\n b1 = buffer[x + (width * y)];\n\n if (b === b1) {\n badness[h]++;\n } else {\n badness[++h] = 1;\n }\n\n b = b1;\n }\n\n bad += this._getBadness(h);\n }\n\n return bad;\n },\n\n _convertBitStream: function(length) {\n var bit, i;\n var ecc = this._ecc;\n var version = this._version;\n\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanumeric, or kanji not supported).\n for (i = 0; i < length; i++) {\n ecc[i] = this._value.charCodeAt(i);\n }\n\n var stringBuffer = this._stringBuffer = ecc.slice();\n var maxLength = this._calculateMaxLength();\n\n if (length >= maxLength - 2) {\n length = maxLength - 2;\n\n if (version > 9) {\n length--;\n }\n }\n\n // Shift and re-pack to insert length prefix.\n var index = length;\n\n if (version > 9) {\n stringBuffer[index + 2] = 0;\n stringBuffer[index + 3] = 0;\n\n while (index--) {\n bit = stringBuffer[index];\n\n stringBuffer[index + 3] |= 255 & (bit << 4);\n stringBuffer[index + 2] = bit >> 4;\n }\n\n stringBuffer[2] |= 255 & (length << 4);\n stringBuffer[1] = length >> 4;\n stringBuffer[0] = 0x40 | (length >> 12);\n } else {\n stringBuffer[index + 1] = 0;\n stringBuffer[index + 2] = 0;\n\n while (index--) {\n bit = stringBuffer[index];\n\n stringBuffer[index + 2] |= 255 & (bit << 4);\n stringBuffer[index + 1] = bit >> 4;\n }\n\n stringBuffer[1] |= 255 & (length << 4);\n stringBuffer[0] = 0x40 | (length >> 4);\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (version < 10);\n\n while (index < maxLength) {\n stringBuffer[index++] = 0xec;\n stringBuffer[index++] = 0x11;\n }\n },\n\n _getBadness: function(length) {\n var i;\n var badRuns = 0;\n var badness = this._badness;\n\n for (i = 0; i <= length; i++) {\n if (badness[i] >= 5) {\n badRuns += Frame.N1 + badness[i] - 5;\n }\n }\n\n // FBFFFBF as in finder.\n for (i = 3; i < length - 1; i += 2) {\n if (badness[i - 2] === badness[i + 2] &&\n badness[i + 2] === badness[i - 1] &&\n badness[i - 1] === badness[i + 1] &&\n badness[i - 1] * 3 === badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (badness[i - 3] === 0 || i + 3 > length ||\n badness[i - 3] * 3 >= badness[i] * 4 ||\n badness[i + 3] * 3 >= badness[i] * 4)) {\n badRuns += Frame.N3;\n }\n }\n\n return badRuns;\n },\n\n _finish: function() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice();\n\n var currentMask, i;\n var bit = 0;\n var mask = 30000;\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i);\n\n currentMask = this._checkBadness();\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask;\n bit = i;\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break;\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice();\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit);\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)];\n\n var buffer = this.buffer;\n var width = this.width;\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n buffer[width - 1 - i + (width * 8)] = 1;\n\n if (i < 6) {\n buffer[8 + (width * i)] = 1;\n } else {\n buffer[8 + (width * (i + 1))] = 1;\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n buffer[8 + (width * (width - 7 + i))] = 1;\n\n if (i) {\n buffer[6 - i + (width * 8)] = 1;\n } else {\n buffer[7 + (width * 8)] = 1;\n }\n }\n }\n },\n\n _interleaveBlocks: function() {\n var i, j;\n var dataBlock = this._dataBlock;\n var ecc = this._ecc;\n var eccBlock = this._eccBlock;\n var k = 0;\n var maxLength = this._calculateMaxLength();\n var neccBlock1 = this._neccBlock1;\n var neccBlock2 = this._neccBlock2;\n var stringBuffer = this._stringBuffer;\n\n for (i = 0; i < dataBlock; i++) {\n for (j = 0; j < neccBlock1; j++) {\n ecc[k++] = stringBuffer[i + (j * dataBlock)];\n }\n\n for (j = 0; j < neccBlock2; j++) {\n ecc[k++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];\n }\n }\n\n for (j = 0; j < neccBlock2; j++) {\n ecc[k++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];\n }\n\n for (i = 0; i < eccBlock; i++) {\n for (j = 0; j < neccBlock1 + neccBlock2; j++) {\n ecc[k++] = stringBuffer[maxLength + i + (j * eccBlock)];\n }\n }\n\n this._stringBuffer = ecc;\n },\n\n _insertAlignments: function() {\n var i, x, y;\n var version = this._version;\n var width = this.width;\n\n if (version > 1) {\n i = Alignment.BLOCK[version];\n y = width - 7;\n\n for (;;) {\n x = width - 7;\n\n while (x > i - 3) {\n this._addAlignment(x, y);\n\n if (x < i) {\n break;\n }\n\n x -= i;\n }\n\n if (y <= i + 9) {\n break;\n }\n\n y -= i;\n\n this._addAlignment(6, y);\n this._addAlignment(y, 6);\n }\n }\n },\n\n _insertFinders: function() {\n var i, j, x, y;\n var buffer = this.buffer;\n var width = this.width;\n\n for (i = 0; i < 3; i++) {\n j = 0;\n y = 0;\n\n if (i === 1) {\n j = width - 7;\n }\n if (i === 2) {\n y = width - 7;\n }\n\n buffer[y + 3 + (width * (j + 3))] = 1;\n\n for (x = 0; x < 6; x++) {\n buffer[y + x + (width * j)] = 1;\n buffer[y + (width * (j + x + 1))] = 1;\n buffer[y + 6 + (width * (j + x))] = 1;\n buffer[y + x + 1 + (width * (j + 6))] = 1;\n }\n\n for (x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1);\n this._setMask(y + 1, j + x + 1);\n this._setMask(y + 5, j + x);\n this._setMask(y + x + 1, j + 5);\n }\n\n for (x = 2; x < 4; x++) {\n buffer[y + x + (width * (j + 2))] = 1;\n buffer[y + 2 + (width * (j + x + 1))] = 1;\n buffer[y + 4 + (width * (j + x))] = 1;\n buffer[y + x + 1 + (width * (j + 4))] = 1;\n }\n }\n },\n\n _insertTimingGap: function() {\n var x, y;\n var width = this.width;\n\n for (y = 0; y < 7; y++) {\n this._setMask(7, y);\n this._setMask(width - 8, y);\n this._setMask(7, y + width - 7);\n }\n\n for (x = 0; x < 8; x++) {\n this._setMask(x, 7);\n this._setMask(x + width - 8, 7);\n this._setMask(x, width - 8);\n }\n },\n\n _insertTimingRowAndColumn: function() {\n var x;\n var buffer = this.buffer;\n var width = this.width;\n\n for (x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6);\n this._setMask(6, 8 + x);\n } else {\n buffer[8 + x + (width * 6)] = 1;\n buffer[6 + (width * (8 + x))] = 1;\n }\n }\n },\n\n _insertVersion: function() {\n var i, j, x, y;\n var buffer = this.buffer;\n var version = this._version;\n var width = this.width;\n\n if (version > 6) {\n i = Version.BLOCK[version - 7];\n j = 17;\n\n for (x = 0; x < 6; x++) {\n for (y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? version >> j - 12 : i >> j)) {\n buffer[5 - x + (width * (2 - y + width - 11))] = 1;\n buffer[2 - y + width - 11 + (width * (5 - x))] = 1;\n } else {\n this._setMask(5 - x, 2 - y + width - 11);\n this._setMask(2 - y + width - 11, 5 - x);\n }\n }\n }\n }\n },\n\n _isMasked: function(x, y) {\n var bit = Frame._getMaskBit(x, y);\n\n return this._mask[bit] === 1;\n },\n\n _pack: function() {\n var bit, i, j;\n var k = 1;\n var v = 1;\n var width = this.width;\n var x = width - 1;\n var y = width - 1;\n\n // Interleaved data and ECC codes.\n var length = ((this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2)) + this._neccBlock2;\n\n for (i = 0; i < length; i++) {\n bit = this._stringBuffer[i];\n\n for (j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + (width * y)] = 1;\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--;\n } else {\n x++;\n\n if (k) {\n if (y !== 0) {\n y--;\n } else {\n x -= 2;\n k = !k;\n\n if (x === 6) {\n x--;\n y = 9;\n }\n }\n } else if (y !== width - 1) {\n y++;\n } else {\n x -= 2;\n k = !k;\n\n if (x === 6) {\n x--;\n y -= 8;\n }\n }\n }\n\n v = !v;\n } while (this._isMasked(x, y));\n }\n }\n },\n\n _reverseMask: function() {\n var x, y;\n var width = this.width;\n\n for (x = 0; x < 9; x++) {\n this._setMask(x, 8);\n }\n\n for (x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8);\n this._setMask(8, x);\n }\n\n for (y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7);\n }\n },\n\n _setMask: function(x, y) {\n var bit = Frame._getMaskBit(x, y);\n\n this._mask[bit] = 1;\n },\n\n _syncMask: function() {\n var x, y;\n var width = this.width;\n\n for (y = 0; y < width; y++) {\n for (x = 0; x <= y; x++) {\n if (this.buffer[x + (width * y)]) {\n this._setMask(x, y);\n }\n }\n }\n }\n\n}, {\n\n _createArray: function(length) {\n var i;\n var array = [];\n\n for (i = 0; i < length; i++) {\n array[i] = 0;\n }\n\n return array;\n },\n\n _getMaskBit: function(x, y) {\n var bit;\n\n if (x > y) {\n bit = x;\n x = y;\n y = bit;\n }\n\n bit = y;\n bit += y * y;\n bit >>= 1;\n bit += x;\n\n return bit;\n },\n\n _modN: function(x) {\n while (x >= 255) {\n x -= 255;\n x = (x >> 8) + (x & 255);\n }\n\n return x;\n },\n\n // *Badness* coefficients.\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n\n});\n\nmodule.exports = Frame;\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {string} level - The ECC level to be used.\n * @property {string} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Renderer = require('./Renderer');\n\n/**\n * An implementation of {@link Renderer} for working with img
elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas
element as the src
for the img
element being rendered.\n *\n * @public\n * @class\n * @extends Renderer\n */\nvar ImageRenderer = Renderer.extend({\n\n /**\n * @override\n */\n draw: function() {\n this.element.src = this.qrious.toDataURL();\n },\n\n /**\n * @override\n */\n reset: function() {\n this.element.src = '';\n },\n\n /**\n * @override\n */\n resize: function() {\n var element = this.element;\n\n element.width = element.height = this.qrious.size;\n }\n\n});\n\nmodule.exports = ImageRenderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Defines an available option while also configuring how values are applied to the target object.\n *\n * Optionally, a default value can be specified as well a value transformer for greater control over how the option\n * value is applied.\n *\n * If no value transformer is specified, then any specified option will be applied directly. All values are maintained\n * on the target object itself as a field using the option name prefixed with a single underscore.\n *\n * When an option is specified as modifiable, the {@link OptionManager} will be required to include a setter for the\n * property that is defined on the target object that uses the option name.\n *\n * @param {string} name - the name to be used\n * @param {boolean} [modifiable] - true
if the property defined on target objects should include a setter;\n * otherwise false
\n * @param {*} [defaultValue] - the default value to be used\n * @param {Option~ValueTransformer} [valueTransformer] - the value transformer to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar Option = Nevis.extend(function(name, modifiable, defaultValue, valueTransformer) {\n /**\n * The name for this {@link Option}.\n *\n * @public\n * @type {string}\n * @memberof Option#\n */\n this.name = name;\n\n /**\n * Whether a setter should be included on the property defined on target objects for this {@link Option}.\n *\n * @public\n * @type {boolean}\n * @memberof Option#\n */\n this.modifiable = Boolean(modifiable);\n\n /**\n * The default value for this {@link Option}.\n *\n * @public\n * @type {*}\n * @memberof Option#\n */\n this.defaultValue = defaultValue;\n\n this._valueTransformer = valueTransformer;\n}, {\n\n /**\n * Transforms the specified value
so that it can be applied for this {@link Option}.\n *\n * If a value transformer has been specified for this {@link Option}, it will be called upon to transform\n * value
. Otherwise, value
will be returned directly.\n *\n * @param {*} value - the value to be transformed\n * @return {*} The transformed value or value
if no value transformer is specified.\n * @public\n * @memberof Option#\n */\n transform: function(value) {\n var transformer = this._valueTransformer;\n if (typeof transformer === 'function') {\n return transformer(value, this);\n }\n\n return value;\n }\n\n});\n\nmodule.exports = Option;\n\n/**\n * Returns a transformed value for the specified value
to be applied for the option
provided.\n *\n * @callback Option~ValueTransformer\n * @param {*} value - the value to be transformed\n * @param {Option} option - the {@link Option} for which value
is being transformed\n * @return {*} The transform value.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Utilities = Nevis.extend(null, {\n\n /**\n * Returns the absolute value of a given number.\n *\n * This method is simply a convenient shorthand for Math.abs
while ensuring that nulls are returned as\n * null
instead of zero.\n *\n * @param {number} value - the number whose absolute value is to be returned\n * @return {number} The absolute value of value
or null
if value
is\n * null
.\n * @public\n * @static\n * @memberof Utilities\n */\n abs: function(value) {\n return value != null ? Math.abs(value) : null;\n },\n\n /**\n * Returns whether the specified object
has a property with the specified name
as an own\n * (not inherited) property.\n *\n * @param {Object} object - the object on which the property is to be checked\n * @param {string} name - the name of the property to be checked\n * @return {boolean} true
if object
has an own property with name
.\n * @public\n * @static\n * @memberof Utilities\n */\n hasOwn: function(object, name) {\n return Object.prototype.hasOwnProperty.call(object, name);\n },\n\n /**\n * A non-operation method that does absolutely nothing.\n *\n * @return {void}\n * @public\n * @static\n * @memberof Utilities\n */\n noop: function() {},\n\n /**\n * Transforms the specified string
to upper case while remaining null-safe.\n *\n * @param {string} string - the string to be transformed to upper case\n * @return {string} string
transformed to upper case if string
is not null
.\n * @public\n * @static\n * @memberof Utilities\n */\n toUpperCase: function(string) {\n return string != null ? string.toUpperCase() : null;\n }\n\n});\n\nmodule.exports = Utilities;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar Utilities = require('../util/Utilities');\n\n/**\n * Manages multiple {@link Option} instances that are intended to be used by multiple implementations.\n *\n * Although the option definitions are shared between targets, the values are maintained on the targets themselves.\n *\n * @param {Option[]} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar OptionManager = Nevis.extend(function(options) {\n /**\n * The available options for this {@link OptionManager}.\n *\n * @public\n * @type {Object.}\n * @memberof OptionManager#\n */\n this.options = {};\n\n options.forEach(function(option) {\n this.options[option.name] = option;\n }, this);\n}, {\n\n /**\n * Returns whether an option with the specified name
is available.\n *\n * @param {string} name - the name of the {@link Option} whose existence is to be checked\n * @return {boolean} true
if an {@link Option} exists with name
; otherwise\n * false
.\n * @public\n * @memberof OptionManager#\n */\n exists: function(name) {\n return this.options[name] != null;\n },\n\n /**\n * Returns the value of the option with the specified name
on the target
object provided.\n *\n * @param {string} name - the name of the {@link Option} whose value on target
is to be returned\n * @param {Object} target - the object from which the value of the named {@link Option} is to be returned\n * @return {*} The value of the {@link Option} with name
on target
.\n * @public\n * @memberof OptionManager#\n */\n get: function(name, target) {\n return OptionManager._get(this.options[name], target);\n },\n\n /**\n * Returns a copy of all of the available options on the target
object provided.\n *\n * @param {Object} target - the object from which the option name/value pairs are to be returned\n * @return {Object.} A hash containing the name/value pairs of all options on target
.\n * @public\n * @memberof OptionManager#\n */\n getAll: function(target) {\n var name;\n var options = this.options;\n var result = {};\n\n for (name in options) {\n if (Utilities.hasOwn(options, name)) {\n result[name] = OptionManager._get(options[name], target);\n }\n }\n\n return result;\n },\n\n /**\n * Initializes the available options for the target
object provided and then applies the initial values\n * within the speciifed options
.\n *\n * This method will throw an error if any of the names within options
does not match an available option.\n *\n * This involves setting the default values and defining properties for all of the available options on\n * target
before finally calling {@link OptionMananger#setAll} with options
and\n * target
. Any options that are configured to be modifiable will have a setter included in their defined\n * property that will allow its corresponding value to be modified.\n *\n * If a change handler is specified, it will be called whenever the value changes on target
for a\n * modifiable option, but only when done so via the defined property's setter.\n *\n * @param {Object.} options - the name/value pairs of the initial options to be set\n * @param {Object} target - the object on which the options are to be initialized\n * @param {Function} [changeHandler] - the function to be called whenever the value of an modifiable option changes on\n * target
\n * @return {void}\n * @throws {Error} If options
contains an invalid option name.\n * @public\n * @memberof OptionManager#\n */\n init: function(options, target, changeHandler) {\n if (typeof changeHandler !== 'function') {\n changeHandler = Utilities.noop;\n }\n\n var name, option;\n\n for (name in this.options) {\n if (Utilities.hasOwn(this.options, name)) {\n option = this.options[name];\n\n OptionManager._set(option, option.defaultValue, target);\n OptionManager._createAccessor(option, target, changeHandler);\n }\n }\n\n this._setAll(options, target, true);\n },\n\n /**\n * Sets the value of the option with the specified name
on the target
object provided to\n * value
.\n *\n * This method will throw an error if name
does not match an available option or matches an option that\n * cannot be modified.\n *\n * If value
is null
and the {@link Option} has a default value configured, then that default\n * value will be used instead. If the {@link Option} also has a value transformer configured, it will be used to\n * transform whichever value was determined to be used.\n *\n * This method returns whether the value of the underlying field on target
was changed as a result.\n *\n * @param {string} name - the name of the {@link Option} whose value is to be set\n * @param {*} value - the value to be set for the named {@link Option} on target
\n * @param {Object} target - the object on which value
is to be set for the named {@link Option}\n * @return {boolean} true
if the underlying field on target
was changed; otherwise\n * false
.\n * @throws {Error} If name
is invalid or is for an option that cannot be modified.\n * @public\n * @memberof OptionManager#\n */\n set: function(name, value, target) {\n return this._set(name, value, target);\n },\n\n /**\n * Sets all of the specified options
on the target
object provided to their corresponding\n * values.\n *\n * This method will throw an error if any of the names within options
does not match an available option\n * or matches an option that cannot be modified.\n *\n * If any value within options
is null
and the corresponding {@link Option} has a default\n * value configured, then that default value will be used instead. If an {@link Option} also has a value transformer\n * configured, it will be used to transform whichever value was determined to be used.\n *\n * This method returns whether the value for any of the underlying fields on target
were changed as a\n * result.\n *\n * @param {Object.} options - the name/value pairs of options to be set\n * @param {Object} target - the object on which the options are to be set\n * @return {boolean} true
if any of the underlying fields on target
were changed; otherwise\n * false
.\n * @throws {Error} If options
contains an invalid option name or an option that cannot be modiifed.\n * @public\n * @memberof OptionManager#\n */\n setAll: function(options, target) {\n return this._setAll(options, target);\n },\n\n _set: function(name, value, target, allowUnmodifiable) {\n var option = this.options[name];\n if (!option) {\n throw new Error('Invalid option: ' + name);\n }\n if (!option.modifiable && !allowUnmodifiable) {\n throw new Error('Option cannot be modified: ' + name);\n }\n\n return OptionManager._set(option, value, target);\n },\n\n _setAll: function(options, target, allowUnmodifiable) {\n if (!options) {\n return false;\n }\n\n var name;\n var changed = false;\n\n for (name in options) {\n if (Utilities.hasOwn(options, name) && this._set(name, options[name], target, allowUnmodifiable)) {\n changed = true;\n }\n }\n\n return changed;\n }\n\n}, {\n\n _createAccessor: function(option, target, changeHandler) {\n var descriptor = {\n get: function() {\n return OptionManager._get(option, target);\n }\n };\n\n if (option.modifiable) {\n descriptor.set = function(value) {\n if (OptionManager._set(option, value, target)) {\n changeHandler(value, option);\n }\n };\n }\n\n Object.defineProperty(target, option.name, descriptor);\n },\n\n _get: function(option, target) {\n return target['_' + option.name];\n },\n\n _set: function(option, value, target) {\n var fieldName = '_' + option.name;\n var oldValue = target[fieldName];\n var newValue = option.transform(value != null ? value : option.defaultValue);\n\n target[fieldName] = newValue;\n\n return newValue !== oldValue;\n }\n\n});\n\nmodule.exports = OptionManager;\n\n/**\n * Called whenever the value of a modifiable {@link Option} is changed on a target object via the defined property's\n * setter.\n *\n * @callback OptionManager~ChangeHandler\n * @param {*} value - the new value for option
on the target object\n * @param {Option} option - the modifable {@link Option} whose value has changed on the target object.\n * @return {void}\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar ServiceManager = Nevis.extend(function() {\n this._services = {};\n}, {\n\n /**\n * Returns the {@link Service} being managed with the specified name
.\n *\n * @param {string} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name
.\n * @throws {Error} If no {@link Service} is being managed with name
.\n * @public\n * @memberof ServiceManager#\n */\n getService: function(name) {\n var service = this._services[name];\n if (!service) {\n throw new Error('Service is not being managed with name: ' + name);\n }\n\n return service;\n },\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name
to the\n * service
provided.\n *\n * @param {string} name - the name of the {@link Service} to be managed with name
\n * @param {Service} service - the {@link Service} implementation to be managed\n * @return {void}\n * @throws {Error} If a {@link Service} is already being managed with the same name
.\n * @public\n * @memberof ServiceManager#\n */\n setService: function(name, service) {\n if (this._services[name]) {\n throw new Error('Service is already managed with name: ' + name);\n }\n\n if (service) {\n this._services[name] = service;\n }\n }\n\n});\n\nmodule.exports = ServiceManager;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar CanvasRenderer = require('./renderer/CanvasRenderer');\nvar Frame = require('./Frame');\nvar ImageRenderer = require('./renderer/ImageRenderer');\nvar Option = require('./option/Option');\nvar OptionManager = require('./option/OptionManager');\nvar ServiceManager = require('./service/ServiceManager');\nvar Utilities = require('./util/Utilities');\n\nvar optionManager = new OptionManager([\n new Option('background', true, 'white'),\n new Option('backgroundAlpha', true, 1, Utilities.abs),\n new Option('element'),\n new Option('foreground', true, 'black'),\n new Option('foregroundAlpha', true, 1, Utilities.abs),\n new Option('level', true, 'L', Utilities.toUpperCase),\n new Option('mime', true, 'image/png'),\n new Option('padding', true, null, Utilities.abs),\n new Option('size', true, 100, Utilities.abs),\n new Option('value', true, '')\n]);\nvar serviceManager = new ServiceManager();\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas
for rendering.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @throws {Error} If any options
are invalid.\n * @public\n * @class\n * @extends Nevis\n */\nvar QRious = Nevis.extend(function(options) {\n optionManager.init(options, this, this.update.bind(this));\n\n var element = optionManager.get('element', this);\n var elementService = serviceManager.getService('element');\n var canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas();\n var image = element && elementService.isImage(element) ? element : elementService.createImage();\n\n this._canvasRenderer = new CanvasRenderer(this, canvas, true);\n this._imageRenderer = new ImageRenderer(this, image, image === element);\n\n this.update();\n}, {\n\n /**\n * Returns all of the options configured for this {@link QRious}.\n *\n * Any changes made to the returned object will not be reflected in the options themselves or their corresponding\n * underlying fields.\n *\n * @return {Object.} A copy of the applied options.\n * @public\n * @memberof QRious#\n */\n get: function() {\n return optionManager.getAll(this);\n },\n\n /**\n * Sets all of the specified options
and automatically updates this {@link QRious} if any of the\n * underlying fields are changed as a result.\n *\n * This is the preferred method for updating multiple options at one time to avoid unnecessary updates between\n * changes.\n *\n * @param {QRious~Options} options - the options to be set\n * @return {void}\n * @throws {Error} If any options
are invalid or cannot be modified.\n * @public\n * @memberof QRious#\n */\n set: function(options) {\n if (optionManager.setAll(options, this)) {\n this.update();\n }\n },\n\n /**\n * Returns the image data URI for the generated QR code using the mime
provided.\n *\n * @param {string} [mime] - the MIME type for the image\n * @return {string} The image data URI for the QR code.\n * @public\n * @memberof QRious#\n */\n toDataURL: function(mime) {\n return this.canvas.toDataURL(mime || this.mime);\n },\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @return {void}\n * @protected\n * @memberof QRious#\n */\n update: function() {\n var frame = new Frame({\n level: this.level,\n value: this.value\n });\n\n this._canvasRenderer.render(frame);\n this._imageRenderer.render(frame);\n }\n\n}, {\n\n /**\n * The current version of {@link QRious}.\n *\n * @public\n * @static\n * @type {string}\n * @memberof QRious\n */\n VERSION: '3.0.0',\n\n /**\n * Configures the service
provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @return {void}\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n * @memberof QRious\n */\n use: function(service) {\n serviceManager.setService(service.getName(), service);\n }\n\n});\n\nObject.defineProperties(QRious.prototype, {\n\n canvas: {\n /**\n * Returns the canvas
element being used to render the QR code for this {@link QRious}.\n *\n * @return {*} The canvas
element.\n * @public\n * @memberof QRious#\n * @alias canvas\n */\n get: function() {\n return this._canvasRenderer.getElement();\n }\n },\n\n image: {\n /**\n * Returns the img
element being used to render the QR code for this {@link QRious}.\n *\n * @return {*} The img
element.\n * @public\n * @memberof QRious#\n * @alias image\n */\n get: function() {\n return this._imageRenderer.getElement();\n }\n }\n\n});\n\nmodule.exports = QRious;\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {string} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {number} [backgroundAlpha=1] - The background alpha to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas
or\n * img
. The element(s) will be created if needed.\n * @property {string} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {number} [foregroundAlpha=1] - The foreground alpha to be applied to the QR code.\n * @property {string} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {string} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {number} [padding] - The padding for the QR code in pixels.\n * @property {number} [size=100] - The size of the QR code in pixels.\n * @property {string} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar BrowserElementService = require('../service/element/BrowserElementService');\nvar QRious = require('../QRious');\n\nQRious.use(new BrowserElementService());\n\nmodule.exports = QRious;\n"],"names":["createObject","prototype","properties","result","Object","create","Constructor","extendObject","extend","name","constructor","statics","superConstructor","this","apply","arguments","class_","super_","own","target","sources","property","source","i","length","slice","call","hasOwnProperty","Nevis","Array","getName","createCanvas","createImage","isCanvas","element","isImage","document","createElement","HTMLCanvasElement","HTMLImageElement","qrious","enabled","Boolean","draw","frame","getElement","render","getModuleSize","padding","pixels","Math","floor","size","width","max","getOffset","moduleSize","offset","resize","reset","Renderer","j","context","getContext","fillStyle","foreground","globalAlpha","foregroundAlpha","buffer","fillRect","lineWidth","clearRect","background","backgroundAlpha","height","BLOCK","BLOCKS","FINAL_FORMAT","LEVELS","L","M","Q","H","EXPONENT","LOG","Frame","options","dataBlock","eccBlock","index","neccBlock1","neccBlock2","valueLength","value","_badness","_level","ErrorCorrection","level","_polynomial","_value","_version","_stringBuffer","_dataBlock","_eccBlock","_neccBlock1","_neccBlock2","_createArray","_ecc","_mask","_insertFinders","_insertAlignments","_insertTimingGap","_reverseMask","_insertTimingRowAndColumn","_insertVersion","_syncMask","_convertBitStream","_calculatePolynomial","_appendEccToData","_interleaveBlocks","_pack","_finish","_addAlignment","x","y","_setMask","_appendData","data","dataLength","ecc","eccLength","bit","polynomial","stringBuffer","Galois","_modN","_calculateMaxLength","_applyMask","mask","r3x","r3y","_isMasked","_checkBadness","b","b1","h","bad","badness","N2","bw","_getBadness","count","big","N4","version","charCodeAt","maxLength","badRuns","N1","N3","currentMask","k","Alignment","Version","_getMaskBit","v","array","src","toDataURL","modifiable","defaultValue","valueTransformer","_valueTransformer","transform","transformer","abs","hasOwn","object","noop","toUpperCase","string","OptionManager","forEach","option","exists","get","_get","getAll","Utilities","init","changeHandler","_set","_createAccessor","_setAll","set","setAll","allowUnmodifiable","Error","changed","descriptor","defineProperty","fieldName","oldValue","newValue","_services","getService","service","setService","optionManager","Option","serviceManager","ServiceManager","QRious","update","bind","elementService","canvas","image","_canvasRenderer","CanvasRenderer","_image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iB,IAAIC,EAWrBC,EAASxL,EAAMpB,OAAO,SAAS8E,GACjC0H,EAAcnB,KAAKvG,EAASzE,KAAMA,KAAKwM,OAAOC,KAAKzM,OAEnD,IAAIqB,EAAU8K,EAAcvB,IAAI,UAAW5K,MACvC0M,EAAiBL,EAAeL,WAAW,WAC3CW,EAAStL,GAAWqL,EAAetL,SAASC,GAAWA,EAAUqL,EAAexL,eAChF0L,EAAQvL,GAAWqL,EAAepL,QAAQD,GAAWA,EAAUqL,EAAevL,cAElFnB,KAAK6M,gBAAkB,IAAIC,EAAe9M,KAAM2M,GAAQ,GACxD3M,KAAK+M,eAAiB,IAAIC,EAAchN,KAAM4M,EAAOA,IAAUvL,GAE/DrB,KAAKwM,WAaL5B,IAAK,WACH,OAAOuB,EAAcrB,OAAO9K,OAgB9BqL,IAAK,SAAS5G,GACR0H,EAAcb,OAAO7G,EAASzE,OAChCA,KAAKwM,UAYT7C,UAAW,SAASsD,GAClB,OAAOjN,KAAK2M,OAAOhD,UAAUsD,GAAQjN,KAAKiN,OAU5CT,OAAQ,WACN,IAAIzK,EAAQ,IAAIyC,GACdY,MAAOpF,KAAKoF,MACZJ,MAAOhF,KAAKgF,QAGdhF,KAAK6M,gBAAgB5K,OAAOF,GAC5B/B,KAAK+M,eAAe9K,OAAOF,MAa7BmL,QAAS,QAYTC,IAAK,SAASlB,GACZI,EAAeH,WAAWD,EAAQhL,UAAWgL,MAKjD1M,OAAO6N,iBAAiBb,EAAOnN,WAE7BuN,QASE/B,IAAK,WACH,OAAO5K,KAAK6M,gBAAgB7K,eAIhC4K,OASEhC,IAAK,WACH,OAAO5K,KAAK+M,eAAe/K,uBAMhBuK,WCtKVY,IAAI,IAAIE,GAEEd"}
\ No newline at end of file
+{"version":3,"file":"qrious.min.js","sources":["../node_modules/nevis/src/extend.js","../node_modules/nevis/src/nevis.js","../src/service/Service.js","../src/service/element/ElementService.js","../src/service/element/BrowserElementService.js","../src/renderer/Renderer.js","../src/renderer/CanvasRenderer.js","../src/Alignment.js","../src/ErrorCorrection.js","../src/Galois.js","../src/Version.js","../src/Frame.js","../src/renderer/ImageRenderer.js","../src/option/Option.js","../src/util/Utilities.js","../src/option/OptionManager.js","../src/service/ServiceManager.js","../src/QRious.js","../src/runtime/browser.js"],"sourcesContent":["/*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n'use strict';\n\n/**\n * A bare-bones constructor for surrogate prototype swapping.\n *\n * @private\n * @constructor\n */\nvar Constructor = /* istanbul ignore next */ function() {};\n/**\n * A reference to Object.prototype.hasOwnProperty
.\n *\n * @private\n * @type {Function}\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * A reference to Array.prototype.slice
.\n *\n * @private\n * @type {Function}\n */\nvar slice = Array.prototype.slice;\n\n/**\n * Creates an object which inherits the given prototype
.\n *\n * Optionally, the created object can be extended further with the specified properties
.\n *\n * @param {Object} prototype - the prototype to be inherited by the created object\n * @param {Object} [properties] - the optional properties to be extended by the created object\n * @return {Object} The newly created object.\n * @private\n */\nfunction createObject(prototype, properties) {\n var result;\n /* istanbul ignore next */\n if (typeof Object.create === 'function') {\n result = Object.create(prototype);\n } else {\n Constructor.prototype = prototype;\n result = new Constructor();\n Constructor.prototype = null;\n }\n\n if (properties) {\n extendObject(true, result, properties);\n }\n\n return result;\n}\n\n/**\n * Extends the constructor to which this method is associated with the prototype
and/or\n * statics
provided.\n *\n * If name
is provided, it will be used as the class name and can be accessed via a special\n * class_
property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString
), but this is not applicable to the lite version of Nevis.\n *\n * If constructor
is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_
property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor
provided or the one created if none was given.\n * @public\n */\nfunction extend(name, constructor, prototype, statics) {\n var superConstructor = this;\n\n if (typeof name !== 'string') {\n statics = prototype;\n prototype = constructor;\n constructor = name;\n name = null;\n }\n\n if (typeof constructor !== 'function') {\n statics = prototype;\n prototype = constructor;\n constructor = function() {\n return superConstructor.apply(this, arguments);\n };\n }\n\n extendObject(false, constructor, superConstructor, statics);\n\n constructor.prototype = createObject(superConstructor.prototype, prototype);\n constructor.prototype.constructor = constructor;\n\n constructor.class_ = name || superConstructor.class_;\n constructor.super_ = superConstructor;\n\n return constructor;\n}\n\n/**\n * Extends the specified target
object with the properties in each of the sources
provided.\n *\n * if any source is null
it will be ignored.\n *\n * @param {boolean} own - true
to only copy own properties from sources
onto\n * target
; otherwise false
\n * @param {Object} target - the target object which should be extended\n * @param {...Object} [sources] - the source objects whose properties are to be copied onto target
\n * @return {void}\n * @private\n */\nfunction extendObject(own, target, sources) {\n sources = slice.call(arguments, 2);\n\n var property;\n var source;\n\n for (var i = 0, length = sources.length; i < length; i++) {\n source = sources[i];\n\n for (property in source) {\n if (!own || hasOwnProperty.call(source, property)) {\n target[property] = source[property];\n }\n }\n }\n}\n\nmodule.exports = extend;\n","/*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n'use strict';\n\nvar extend = require('./extend');\n\n/**\n * The base class from which all others should extend.\n *\n * @public\n * @constructor\n */\nfunction Nevis() {}\nNevis.class_ = 'Nevis';\nNevis.super_ = Object;\n\n/**\n * Extends the constructor to which this method is associated with the prototype
and/or\n * statics
provided.\n *\n * If name
is provided, it will be used as the class name and can be accessed via a special\n * class_
property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString
), but this is not applicable to the lite version of Nevis.\n *\n * If constructor
is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_
property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor
provided or the one created if none was given.\n * @public\n * @static\n * @memberof Nevis\n */\nNevis.extend = extend;\n\nmodule.exports = Nevis;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Service = Nevis.extend({\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {string} The service name.\n * @public\n * @abstract\n * @memberof Service#\n */\n getName: function() {}\n\n});\n\nmodule.exports = Service;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Service = require('../Service');\n\n/**\n * A service for working with elements.\n *\n * @public\n * @class\n * @extends Service\n */\nvar ElementService = Service.extend({\n\n /**\n * Creates an instance of a canvas element.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @return {*} The newly created canvas element.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n createCanvas: function() {},\n\n /**\n * Creates an instance of a image element.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @return {*} The newly created image element.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n createImage: function() {},\n\n /**\n * @override\n */\n getName: function() {\n return 'element';\n },\n\n /**\n * Returns whether the specified element
is a canvas.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @param {*} element - the element to be checked\n * @return {boolean} true
if element
is a canvas; otherwise false
.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n isCanvas: function(element) {},\n\n /**\n * Returns whether the specified element
is an image.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @param {*} element - the element to be checked\n * @return {boolean} true
if element
is an image; otherwise false
.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n isImage: function(element) {}\n\n});\n\nmodule.exports = ElementService;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar ElementService = require('./ElementService');\n\n/**\n * An implementation of {@link ElementService} intended for use within a browser environment.\n *\n * @public\n * @class\n * @extends ElementService\n */\nvar BrowserElementService = ElementService.extend({\n\n /**\n * @override\n */\n createCanvas: function() {\n return document.createElement('canvas');\n },\n\n /**\n * @override\n */\n createImage: function() {\n return document.createElement('img');\n },\n\n /**\n * @override\n */\n isCanvas: function(element) {\n return element instanceof HTMLCanvasElement;\n },\n\n /**\n * @override\n */\n isImage: function(element) {\n return element instanceof HTMLImageElement;\n }\n\n});\n\nmodule.exports = BrowserElementService;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so the ordering of their execution is important.\n *\n * The rendering of a element can be deferred by disabling the renderer initially, however, any attempt get the element\n * from the renderer will result in it being immediately enabled and the element being rendered.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @param {*} element - the element onto which the QR code is to be rendered\n * @param {boolean} [enabled] - true
this {@link Renderer} is enabled; otherwise false
.\n * @public\n * @class\n * @extends Nevis\n */\nvar Renderer = Nevis.extend(function(qrious, element, enabled) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n * @memberof Renderer#\n */\n this.qrious = qrious;\n\n /**\n * The element onto which this {@link Renderer} is rendering the QR code.\n *\n * @protected\n * @type {*}\n * @memberof Renderer#\n */\n this.element = element;\n this.element.qrious = qrious;\n\n /**\n * Whether this {@link Renderer} is enabled.\n *\n * @protected\n * @type {boolean}\n * @memberof Renderer#\n */\n this.enabled = Boolean(enabled);\n}, {\n\n /**\n * Draws the specified QR code frame
on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n draw: function(frame) {},\n\n /**\n * Returns the element onto which this {@link Renderer} is rendering the QR code.\n *\n * If this method is called while this {@link Renderer} is disabled, it will be immediately enabled and rendered\n * before the element is returned.\n *\n * @return {*} The element.\n * @public\n * @memberof Renderer#\n */\n getElement: function() {\n if (!this.enabled) {\n this.enabled = true;\n this.render();\n }\n\n return this.element;\n },\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame
provided.\n *\n * Any configured padding will be excluded from the returned size.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n * @memberof Renderer#\n */\n getModuleSize: function(frame) {\n var qrious = this.qrious;\n var padding = qrious.padding || 0;\n var pixels = Math.floor((qrious.size - (padding * 2)) / frame.width);\n\n return Math.max(1, pixels);\n },\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame
\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n * @memberof Renderer#\n */\n getOffset: function(frame) {\n var qrious = this.qrious;\n var padding = qrious.padding;\n\n if (padding != null) {\n return padding;\n }\n\n var moduleSize = this.getModuleSize(frame);\n var offset = Math.floor((qrious.size - (moduleSize * frame.width)) / 2);\n\n return Math.max(0, offset);\n },\n\n /**\n * Renders a QR code on the underlying element based on the frame
provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @return {void}\n * @public\n * @memberof Renderer#\n */\n render: function(frame) {\n if (this.enabled) {\n this.resize();\n this.reset();\n this.draw(frame);\n }\n },\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n reset: function() {},\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n resize: function() {}\n\n});\n\nmodule.exports = Renderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Renderer = require('./Renderer');\n\n/**\n * An implementation of {@link Renderer} for working with canvas
elements.\n *\n * @public\n * @class\n * @extends Renderer\n */\nvar CanvasRenderer = Renderer.extend({\n\n /**\n * @override\n */\n draw: function(frame) {\n var i, j;\n var qrious = this.qrious;\n var moduleSize = this.getModuleSize(frame);\n var offset = this.getOffset(frame);\n var context = this.element.getContext('2d');\n\n context.fillStyle = qrious.foreground;\n context.globalAlpha = qrious.foregroundAlpha;\n\n for (i = 0; i < frame.width; i++) {\n for (j = 0; j < frame.width; j++) {\n if (frame.buffer[(j * frame.width) + i]) {\n context.fillRect((moduleSize * i) + offset, (moduleSize * j) + offset, moduleSize, moduleSize);\n }\n }\n }\n },\n\n /**\n * @override\n */\n reset: function() {\n var qrious = this.qrious;\n var context = this.element.getContext('2d');\n var size = qrious.size;\n\n context.lineWidth = 1;\n context.clearRect(0, 0, size, size);\n context.fillStyle = qrious.background;\n context.globalAlpha = qrious.backgroundAlpha;\n context.fillRect(0, 0, size, size);\n },\n\n /**\n * @override\n */\n resize: function() {\n var element = this.element;\n\n element.width = element.height = this.qrious.size;\n }\n\n});\n\nmodule.exports = CanvasRenderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\n/* eslint no-multi-spaces: \"off\" */\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Alignment = Nevis.extend(null, {\n\n /**\n * The alignment pattern block.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Alignment\n */\n BLOCK: [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n\n});\n\nmodule.exports = Alignment;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\n/* eslint no-multi-spaces: \"off\" */\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains error correction information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar ErrorCorrection = Nevis.extend(null, {\n\n /**\n * The error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof ErrorCorrection\n */\n BLOCKS: [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ],\n\n /**\n * The final format bits with mask (level << 3 | mask).\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof ErrorCorrection\n */\n FINAL_FORMAT: [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ],\n\n /**\n * A map of human-readable ECC levels.\n *\n * @public\n * @static\n * @type {Object.}\n * @memberof ErrorCorrection\n */\n LEVELS: {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n\n});\n\nmodule.exports = ErrorCorrection;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains Galois field information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Galois = Nevis.extend(null, {\n\n /**\n * The Galois field exponent table.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Galois\n */\n EXPONENT: [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,\n 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,\n 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,\n 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,\n 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2,\n 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce,\n 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc,\n 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54,\n 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,\n 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff,\n 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,\n 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,\n 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ],\n\n /**\n * The Galois field log table.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Galois\n */\n LOG: [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6,\n 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88,\n 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96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air Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains version pattern information.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Version = Nevis.extend(null, {\n\n /**\n * The version pattern block.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Version\n */\n BLOCK: [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n\n});\n\nmodule.exports = Version;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar Alignment = require('./Alignment');\nvar ErrorCorrection = require('./ErrorCorrection');\nvar Galois = require('./Galois');\nvar Version = require('./Version');\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar Frame = Nevis.extend(function(options) {\n var dataBlock, eccBlock, index, neccBlock1, neccBlock2;\n var valueLength = options.value.length;\n\n this._badness = [];\n this._level = ErrorCorrection.LEVELS[options.level];\n this._polynomial = [];\n this._value = options.value;\n this._version = 0;\n this._stringBuffer = [];\n\n while (this._version < 40) {\n this._version++;\n\n index = ((this._level - 1) * 4) + ((this._version - 1) * 16);\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++];\n neccBlock2 = ErrorCorrection.BLOCKS[index++];\n dataBlock = ErrorCorrection.BLOCKS[index++];\n eccBlock = ErrorCorrection.BLOCKS[index];\n\n index = (dataBlock * (neccBlock1 + neccBlock2)) + neccBlock2 - 3 + (this._version <= 9);\n\n if (valueLength <= index) {\n break;\n }\n }\n\n this._dataBlock = dataBlock;\n this._eccBlock = eccBlock;\n this._neccBlock1 = neccBlock1;\n this._neccBlock2 = neccBlock2;\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {number}\n * @memberof Frame#\n */\n // FIXME: Ensure that it fits instead of being truncated.\n var width = this.width = 17 + (4 * this._version);\n\n /**\n * The image buffer.\n *\n * @public\n * @type {number[]}\n * @memberof Frame#\n */\n this.buffer = Frame._createArray(width * width);\n\n this._ecc = Frame._createArray(dataBlock + ((dataBlock + eccBlock) * (neccBlock1 + neccBlock2)) + neccBlock2);\n this._mask = Frame._createArray(((width * (width + 1)) + 1) / 2);\n\n this._insertFinders();\n this._insertAlignments();\n\n // Insert single foreground cell.\n this.buffer[8 + (width * (width - 8))] = 1;\n\n this._insertTimingGap();\n this._reverseMask();\n this._insertTimingRowAndColumn();\n this._insertVersion();\n this._syncMask();\n this._convertBitStream(valueLength);\n this._calculatePolynomial();\n this._appendEccToData();\n this._interleaveBlocks();\n this._pack();\n this._finish();\n}, {\n\n _addAlignment: function(x, y) {\n var i;\n var buffer = this.buffer;\n var width = this.width;\n\n buffer[x + (width * y)] = 1;\n\n for (i = -2; i < 2; i++) {\n buffer[x + i + (width * (y - 2))] = 1;\n buffer[x - 2 + (width * (y + i + 1))] = 1;\n buffer[x + 2 + (width * (y + i))] = 1;\n buffer[x + i + 1 + (width * (y + 2))] = 1;\n }\n\n for (i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i);\n this._setMask(x + 1, y - i);\n this._setMask(x - i, y - 1);\n this._setMask(x + i, y + 1);\n }\n },\n\n _appendData: function(data, dataLength, ecc, eccLength) {\n var bit, i, j;\n var polynomial = this._polynomial;\n var stringBuffer = this._stringBuffer;\n\n for (i = 0; i < eccLength; i++) {\n stringBuffer[ecc + i] = 0;\n }\n\n for (i = 0; i < dataLength; i++) {\n bit = Galois.LOG[stringBuffer[data + i] ^ stringBuffer[ecc]];\n\n if (bit !== 255) {\n for (j = 1; j < eccLength; j++) {\n stringBuffer[ecc + j - 1] = stringBuffer[ecc + j] ^\n Galois.EXPONENT[Frame._modN(bit + polynomial[eccLength - j])];\n }\n } else {\n for (j = ecc; j < ecc + eccLength; j++) {\n stringBuffer[j] = stringBuffer[j + 1];\n }\n }\n\n stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + polynomial[0])];\n }\n },\n\n _appendEccToData: function() {\n var i;\n var data = 0;\n var dataBlock = this._dataBlock;\n var ecc = this._calculateMaxLength();\n var eccBlock = this._eccBlock;\n\n for (i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, dataBlock, ecc, eccBlock);\n\n data += dataBlock;\n ecc += eccBlock;\n }\n\n for (i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, dataBlock + 1, ecc, eccBlock);\n\n data += dataBlock + 1;\n ecc += eccBlock;\n }\n },\n\n _applyMask: function(mask) {\n var r3x, r3y, x, y;\n var buffer = this.buffer;\n var width = this.width;\n\n switch (mask) {\n case 0:\n for (y = 0; y < width; y++) {\n for (x = 0; x < width; x++) {\n if (!((x + y) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 1:\n for (y = 0; y < width; y++) {\n for (x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 2:\n for (y = 0; y < width; y++) {\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 3:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 4:\n for (y = 0; y < width; y++) {\n for (r3x = 0, r3y = (y >> 1) & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n r3y = !r3y;\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 5:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 6:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((x & y & 1) + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n case 7:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n\n break;\n }\n },\n\n _calculateMaxLength: function() {\n return (this._dataBlock * (this._neccBlock1 + this._neccBlock2)) + this._neccBlock2;\n },\n\n _calculatePolynomial: function() {\n var i, j;\n var eccBlock = this._eccBlock;\n var polynomial = this._polynomial;\n\n polynomial[0] = 1;\n\n for (i = 0; i < eccBlock; i++) {\n polynomial[i + 1] = 1;\n\n for (j = i; j > 0; j--) {\n polynomial[j] = polynomial[j] ? polynomial[j - 1] ^\n Galois.EXPONENT[Frame._modN(Galois.LOG[polynomial[j]] + i)] : polynomial[j - 1];\n }\n\n polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[polynomial[0]] + i)];\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (i = 0; i <= eccBlock; i++) {\n polynomial[i] = Galois.LOG[polynomial[i]];\n }\n },\n\n _checkBadness: function() {\n var b, b1, h, x, y;\n var bad = 0;\n var badness = this._badness;\n var buffer = this.buffer;\n var width = this.width;\n\n // Blocks of same colour.\n for (y = 0; y < width - 1; y++) {\n for (x = 0; x < width - 1; x++) {\n // All foreground colour.\n if ((buffer[x + (width * y)] &&\n buffer[x + 1 + (width * y)] &&\n buffer[x + (width * (y + 1))] &&\n buffer[x + 1 + (width * (y + 1))]) ||\n // All background colour.\n !(buffer[x + (width * y)] ||\n buffer[x + 1 + (width * y)] ||\n buffer[x + (width * (y + 1))] ||\n buffer[x + 1 + (width * (y + 1))])) {\n bad += Frame.N2;\n }\n }\n }\n\n var bw = 0;\n\n // X runs.\n for (y = 0; y < width; y++) {\n h = 0;\n\n badness[0] = 0;\n\n for (b = 0, x = 0; x < width; x++) {\n b1 = buffer[x + (width * y)];\n\n if (b === b1) {\n badness[h]++;\n } else {\n badness[++h] = 1;\n }\n\n b = b1;\n bw += b ? 1 : -1;\n }\n\n bad += this._getBadness(h);\n }\n\n if (bw < 0) {\n bw = -bw;\n }\n\n var count = 0;\n var big = bw;\n big += big << 2;\n big <<= 1;\n\n while (big > width * width) {\n big -= width * width;\n count++;\n }\n\n bad += count * Frame.N4;\n\n // Y runs.\n for (x = 0; x < width; x++) {\n h = 0;\n\n badness[0] = 0;\n\n for (b = 0, y = 0; y < width; y++) {\n b1 = buffer[x + (width * y)];\n\n if (b === b1) {\n badness[h]++;\n } else {\n badness[++h] = 1;\n }\n\n b = b1;\n }\n\n bad += this._getBadness(h);\n }\n\n return bad;\n },\n\n _convertBitStream: function(length) {\n var bit, i;\n var ecc = this._ecc;\n var version = this._version;\n\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanumeric, or kanji not supported).\n for (i = 0; i < length; i++) {\n ecc[i] = this._value.charCodeAt(i);\n }\n\n var stringBuffer = this._stringBuffer = ecc.slice();\n var maxLength = this._calculateMaxLength();\n\n if (length >= maxLength - 2) {\n length = maxLength - 2;\n\n if (version > 9) {\n length--;\n }\n }\n\n // Shift and re-pack to insert length prefix.\n var index = length;\n\n if (version > 9) {\n stringBuffer[index + 2] = 0;\n stringBuffer[index + 3] = 0;\n\n while (index--) {\n bit = stringBuffer[index];\n\n stringBuffer[index + 3] |= 255 & (bit << 4);\n stringBuffer[index + 2] = bit >> 4;\n }\n\n stringBuffer[2] |= 255 & (length << 4);\n stringBuffer[1] = length >> 4;\n stringBuffer[0] = 0x40 | (length >> 12);\n } else {\n stringBuffer[index + 1] = 0;\n stringBuffer[index + 2] = 0;\n\n while (index--) {\n bit = stringBuffer[index];\n\n stringBuffer[index + 2] |= 255 & (bit << 4);\n stringBuffer[index + 1] = bit >> 4;\n }\n\n stringBuffer[1] |= 255 & (length << 4);\n stringBuffer[0] = 0x40 | (length >> 4);\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (version < 10);\n\n while (index < maxLength) {\n stringBuffer[index++] = 0xec;\n stringBuffer[index++] = 0x11;\n }\n },\n\n _getBadness: function(length) {\n var i;\n var badRuns = 0;\n var badness = this._badness;\n\n for (i = 0; i <= length; i++) {\n if (badness[i] >= 5) {\n badRuns += Frame.N1 + badness[i] - 5;\n }\n }\n\n // FBFFFBF as in finder.\n for (i = 3; i < length - 1; i += 2) {\n if (badness[i - 2] === badness[i + 2] &&\n badness[i + 2] === badness[i - 1] &&\n badness[i - 1] === badness[i + 1] &&\n badness[i - 1] * 3 === badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (badness[i - 3] === 0 || i + 3 > length ||\n badness[i - 3] * 3 >= badness[i] * 4 ||\n badness[i + 3] * 3 >= badness[i] * 4)) {\n badRuns += Frame.N3;\n }\n }\n\n return badRuns;\n },\n\n _finish: function() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice();\n\n var currentMask, i;\n var bit = 0;\n var mask = 30000;\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i);\n\n currentMask = this._checkBadness();\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask;\n bit = i;\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break;\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice();\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit);\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)];\n\n var buffer = this.buffer;\n var width = this.width;\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n buffer[width - 1 - i + (width * 8)] = 1;\n\n if (i < 6) {\n buffer[8 + (width * i)] = 1;\n } else {\n buffer[8 + (width * (i + 1))] = 1;\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n buffer[8 + (width * (width - 7 + i))] = 1;\n\n if (i) {\n buffer[6 - i + (width * 8)] = 1;\n } else {\n buffer[7 + (width * 8)] = 1;\n }\n }\n }\n },\n\n _interleaveBlocks: function() {\n var i, j;\n var dataBlock = this._dataBlock;\n var ecc = this._ecc;\n var eccBlock = this._eccBlock;\n var k = 0;\n var maxLength = this._calculateMaxLength();\n var neccBlock1 = this._neccBlock1;\n var neccBlock2 = this._neccBlock2;\n var stringBuffer = this._stringBuffer;\n\n for (i = 0; i < dataBlock; i++) {\n for (j = 0; j < neccBlock1; j++) {\n ecc[k++] = stringBuffer[i + (j * dataBlock)];\n }\n\n for (j = 0; j < neccBlock2; j++) {\n ecc[k++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];\n }\n }\n\n for (j = 0; j < neccBlock2; j++) {\n ecc[k++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];\n }\n\n for (i = 0; i < eccBlock; i++) {\n for (j = 0; j < neccBlock1 + neccBlock2; j++) {\n ecc[k++] = stringBuffer[maxLength + i + (j * eccBlock)];\n }\n }\n\n this._stringBuffer = ecc;\n },\n\n _insertAlignments: function() {\n var i, x, y;\n var version = this._version;\n var width = this.width;\n\n if (version > 1) {\n i = Alignment.BLOCK[version];\n y = width - 7;\n\n for (;;) {\n x = width - 7;\n\n while (x > i - 3) {\n this._addAlignment(x, y);\n\n if (x < i) {\n break;\n }\n\n x -= i;\n }\n\n if (y <= i + 9) {\n break;\n }\n\n y -= i;\n\n this._addAlignment(6, y);\n this._addAlignment(y, 6);\n }\n }\n },\n\n _insertFinders: function() {\n var i, j, x, y;\n var buffer = this.buffer;\n var width = this.width;\n\n for (i = 0; i < 3; i++) {\n j = 0;\n y = 0;\n\n if (i === 1) {\n j = width - 7;\n }\n if (i === 2) {\n y = width - 7;\n }\n\n buffer[y + 3 + (width * (j + 3))] = 1;\n\n for (x = 0; x < 6; x++) {\n buffer[y + x + (width * j)] = 1;\n buffer[y + (width * (j + x + 1))] = 1;\n buffer[y + 6 + (width * (j + x))] = 1;\n buffer[y + x + 1 + (width * (j + 6))] = 1;\n }\n\n for (x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1);\n this._setMask(y + 1, j + x + 1);\n this._setMask(y + 5, j + x);\n this._setMask(y + x + 1, j + 5);\n }\n\n for (x = 2; x < 4; x++) {\n buffer[y + x + (width * (j + 2))] = 1;\n buffer[y + 2 + (width * (j + x + 1))] = 1;\n buffer[y + 4 + (width * (j + x))] = 1;\n buffer[y + x + 1 + (width * (j + 4))] = 1;\n }\n }\n },\n\n _insertTimingGap: function() {\n var x, y;\n var width = this.width;\n\n for (y = 0; y < 7; y++) {\n this._setMask(7, y);\n this._setMask(width - 8, y);\n this._setMask(7, y + width - 7);\n }\n\n for (x = 0; x < 8; x++) {\n this._setMask(x, 7);\n this._setMask(x + width - 8, 7);\n this._setMask(x, width - 8);\n }\n },\n\n _insertTimingRowAndColumn: function() {\n var x;\n var buffer = this.buffer;\n var width = this.width;\n\n for (x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6);\n this._setMask(6, 8 + x);\n } else {\n buffer[8 + x + (width * 6)] = 1;\n buffer[6 + (width * (8 + x))] = 1;\n }\n }\n },\n\n _insertVersion: function() {\n var i, j, x, y;\n var buffer = this.buffer;\n var version = this._version;\n var width = this.width;\n\n if (version > 6) {\n i = Version.BLOCK[version - 7];\n j = 17;\n\n for (x = 0; x < 6; x++) {\n for (y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? version >> j - 12 : i >> j)) {\n buffer[5 - x + (width * (2 - y + width - 11))] = 1;\n buffer[2 - y + width - 11 + (width * (5 - x))] = 1;\n } else {\n this._setMask(5 - x, 2 - y + width - 11);\n this._setMask(2 - y + width - 11, 5 - x);\n }\n }\n }\n }\n },\n\n _isMasked: function(x, y) {\n var bit = Frame._getMaskBit(x, y);\n\n return this._mask[bit] === 1;\n },\n\n _pack: function() {\n var bit, i, j;\n var k = 1;\n var v = 1;\n var width = this.width;\n var x = width - 1;\n var y = width - 1;\n\n // Interleaved data and ECC codes.\n var length = ((this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2)) + this._neccBlock2;\n\n for (i = 0; i < length; i++) {\n bit = this._stringBuffer[i];\n\n for (j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + (width * y)] = 1;\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--;\n } else {\n x++;\n\n if (k) {\n if (y !== 0) {\n y--;\n } else {\n x -= 2;\n k = !k;\n\n if (x === 6) {\n x--;\n y = 9;\n }\n }\n } else if (y !== width - 1) {\n y++;\n } else {\n x -= 2;\n k = !k;\n\n if (x === 6) {\n x--;\n y -= 8;\n }\n }\n }\n\n v = !v;\n } while (this._isMasked(x, y));\n }\n }\n },\n\n _reverseMask: function() {\n var x, y;\n var width = this.width;\n\n for (x = 0; x < 9; x++) {\n this._setMask(x, 8);\n }\n\n for (x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8);\n this._setMask(8, x);\n }\n\n for (y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7);\n }\n },\n\n _setMask: function(x, y) {\n var bit = Frame._getMaskBit(x, y);\n\n this._mask[bit] = 1;\n },\n\n _syncMask: function() {\n var x, y;\n var width = this.width;\n\n for (y = 0; y < width; y++) {\n for (x = 0; x <= y; x++) {\n if (this.buffer[x + (width * y)]) {\n this._setMask(x, y);\n }\n }\n }\n }\n\n}, {\n\n _createArray: function(length) {\n var i;\n var array = [];\n\n for (i = 0; i < length; i++) {\n array[i] = 0;\n }\n\n return array;\n },\n\n _getMaskBit: function(x, y) {\n var bit;\n\n if (x > y) {\n bit = x;\n x = y;\n y = bit;\n }\n\n bit = y;\n bit += y * y;\n bit >>= 1;\n bit += x;\n\n return bit;\n },\n\n _modN: function(x) {\n while (x >= 255) {\n x -= 255;\n x = (x >> 8) + (x & 255);\n }\n\n return x;\n },\n\n // *Badness* coefficients.\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n\n});\n\nmodule.exports = Frame;\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {string} level - The ECC level to be used.\n * @property {string} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Renderer = require('./Renderer');\n\n/**\n * An implementation of {@link Renderer} for working with img
elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas
element as the src
for the img
element being rendered.\n *\n * @public\n * @class\n * @extends Renderer\n */\nvar ImageRenderer = Renderer.extend({\n\n /**\n * @override\n */\n draw: function() {\n this.element.src = this.qrious.toDataURL();\n },\n\n /**\n * @override\n */\n reset: function() {\n this.element.src = '';\n },\n\n /**\n * @override\n */\n resize: function() {\n var element = this.element;\n\n element.width = element.height = this.qrious.size;\n }\n\n});\n\nmodule.exports = ImageRenderer;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Defines an available option while also configuring how values are applied to the target object.\n *\n * Optionally, a default value can be specified as well a value transformer for greater control over how the option\n * value is applied.\n *\n * If no value transformer is specified, then any specified option will be applied directly. All values are maintained\n * on the target object itself as a field using the option name prefixed with a single underscore.\n *\n * When an option is specified as modifiable, the {@link OptionManager} will be required to include a setter for the\n * property that is defined on the target object that uses the option name.\n *\n * @param {string} name - the name to be used\n * @param {boolean} [modifiable] - true
if the property defined on target objects should include a setter;\n * otherwise false
\n * @param {*} [defaultValue] - the default value to be used\n * @param {Option~ValueTransformer} [valueTransformer] - the value transformer to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar Option = Nevis.extend(function(name, modifiable, defaultValue, valueTransformer) {\n /**\n * The name for this {@link Option}.\n *\n * @public\n * @type {string}\n * @memberof Option#\n */\n this.name = name;\n\n /**\n * Whether a setter should be included on the property defined on target objects for this {@link Option}.\n *\n * @public\n * @type {boolean}\n * @memberof Option#\n */\n this.modifiable = Boolean(modifiable);\n\n /**\n * The default value for this {@link Option}.\n *\n * @public\n * @type {*}\n * @memberof Option#\n */\n this.defaultValue = defaultValue;\n\n this._valueTransformer = valueTransformer;\n}, {\n\n /**\n * Transforms the specified value
so that it can be applied for this {@link Option}.\n *\n * If a value transformer has been specified for this {@link Option}, it will be called upon to transform\n * value
. Otherwise, value
will be returned directly.\n *\n * @param {*} value - the value to be transformed\n * @return {*} The transformed value or value
if no value transformer is specified.\n * @public\n * @memberof Option#\n */\n transform: function(value) {\n var transformer = this._valueTransformer;\n if (typeof transformer === 'function') {\n return transformer(value, this);\n }\n\n return value;\n }\n\n});\n\nmodule.exports = Option;\n\n/**\n * Returns a transformed value for the specified value
to be applied for the option
provided.\n *\n * @callback Option~ValueTransformer\n * @param {*} value - the value to be transformed\n * @param {Option} option - the {@link Option} for which value
is being transformed\n * @return {*} The transform value.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar Utilities = Nevis.extend(null, {\n\n /**\n * Returns the absolute value of a given number.\n *\n * This method is simply a convenient shorthand for Math.abs
while ensuring that nulls are returned as\n * null
instead of zero.\n *\n * @param {number} value - the number whose absolute value is to be returned\n * @return {number} The absolute value of value
or null
if value
is\n * null
.\n * @public\n * @static\n * @memberof Utilities\n */\n abs: function(value) {\n return value != null ? Math.abs(value) : null;\n },\n\n /**\n * Returns whether the specified object
has a property with the specified name
as an own\n * (not inherited) property.\n *\n * @param {Object} object - the object on which the property is to be checked\n * @param {string} name - the name of the property to be checked\n * @return {boolean} true
if object
has an own property with name
.\n * @public\n * @static\n * @memberof Utilities\n */\n hasOwn: function(object, name) {\n return Object.prototype.hasOwnProperty.call(object, name);\n },\n\n /**\n * A non-operation method that does absolutely nothing.\n *\n * @return {void}\n * @public\n * @static\n * @memberof Utilities\n */\n noop: function() {},\n\n /**\n * Transforms the specified string
to upper case while remaining null-safe.\n *\n * @param {string} string - the string to be transformed to upper case\n * @return {string} string
transformed to upper case if string
is not null
.\n * @public\n * @static\n * @memberof Utilities\n */\n toUpperCase: function(string) {\n return string != null ? string.toUpperCase() : null;\n }\n\n});\n\nmodule.exports = Utilities;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar Utilities = require('../util/Utilities');\n\n/**\n * Manages multiple {@link Option} instances that are intended to be used by multiple implementations.\n *\n * Although the option definitions are shared between targets, the values are maintained on the targets themselves.\n *\n * @param {Option[]} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\nvar OptionManager = Nevis.extend(function(options) {\n /**\n * The available options for this {@link OptionManager}.\n *\n * @public\n * @type {Object.}\n * @memberof OptionManager#\n */\n this.options = {};\n\n options.forEach(function(option) {\n this.options[option.name] = option;\n }, this);\n}, {\n\n /**\n * Returns whether an option with the specified name
is available.\n *\n * @param {string} name - the name of the {@link Option} whose existence is to be checked\n * @return {boolean} true
if an {@link Option} exists with name
; otherwise\n * false
.\n * @public\n * @memberof OptionManager#\n */\n exists: function(name) {\n return this.options[name] != null;\n },\n\n /**\n * Returns the value of the option with the specified name
on the target
object provided.\n *\n * @param {string} name - the name of the {@link Option} whose value on target
is to be returned\n * @param {Object} target - the object from which the value of the named {@link Option} is to be returned\n * @return {*} The value of the {@link Option} with name
on target
.\n * @public\n * @memberof OptionManager#\n */\n get: function(name, target) {\n return OptionManager._get(this.options[name], target);\n },\n\n /**\n * Returns a copy of all of the available options on the target
object provided.\n *\n * @param {Object} target - the object from which the option name/value pairs are to be returned\n * @return {Object.} A hash containing the name/value pairs of all options on target
.\n * @public\n * @memberof OptionManager#\n */\n getAll: function(target) {\n var name;\n var options = this.options;\n var result = {};\n\n for (name in options) {\n if (Utilities.hasOwn(options, name)) {\n result[name] = OptionManager._get(options[name], target);\n }\n }\n\n return result;\n },\n\n /**\n * Initializes the available options for the target
object provided and then applies the initial values\n * within the speciifed options
.\n *\n * This method will throw an error if any of the names within options
does not match an available option.\n *\n * This involves setting the default values and defining properties for all of the available options on\n * target
before finally calling {@link OptionMananger#setAll} with options
and\n * target
. Any options that are configured to be modifiable will have a setter included in their defined\n * property that will allow its corresponding value to be modified.\n *\n * If a change handler is specified, it will be called whenever the value changes on target
for a\n * modifiable option, but only when done so via the defined property's setter.\n *\n * @param {Object.} options - the name/value pairs of the initial options to be set\n * @param {Object} target - the object on which the options are to be initialized\n * @param {Function} [changeHandler] - the function to be called whenever the value of an modifiable option changes on\n * target
\n * @return {void}\n * @throws {Error} If options
contains an invalid option name.\n * @public\n * @memberof OptionManager#\n */\n init: function(options, target, changeHandler) {\n if (typeof changeHandler !== 'function') {\n changeHandler = Utilities.noop;\n }\n\n var name, option;\n\n for (name in this.options) {\n if (Utilities.hasOwn(this.options, name)) {\n option = this.options[name];\n\n OptionManager._set(option, option.defaultValue, target);\n OptionManager._createAccessor(option, target, changeHandler);\n }\n }\n\n this._setAll(options, target, true);\n },\n\n /**\n * Sets the value of the option with the specified name
on the target
object provided to\n * value
.\n *\n * This method will throw an error if name
does not match an available option or matches an option that\n * cannot be modified.\n *\n * If value
is null
and the {@link Option} has a default value configured, then that default\n * value will be used instead. If the {@link Option} also has a value transformer configured, it will be used to\n * transform whichever value was determined to be used.\n *\n * This method returns whether the value of the underlying field on target
was changed as a result.\n *\n * @param {string} name - the name of the {@link Option} whose value is to be set\n * @param {*} value - the value to be set for the named {@link Option} on target
\n * @param {Object} target - the object on which value
is to be set for the named {@link Option}\n * @return {boolean} true
if the underlying field on target
was changed; otherwise\n * false
.\n * @throws {Error} If name
is invalid or is for an option that cannot be modified.\n * @public\n * @memberof OptionManager#\n */\n set: function(name, value, target) {\n return this._set(name, value, target);\n },\n\n /**\n * Sets all of the specified options
on the target
object provided to their corresponding\n * values.\n *\n * This method will throw an error if any of the names within options
does not match an available option\n * or matches an option that cannot be modified.\n *\n * If any value within options
is null
and the corresponding {@link Option} has a default\n * value configured, then that default value will be used instead. If an {@link Option} also has a value transformer\n * configured, it will be used to transform whichever value was determined to be used.\n *\n * This method returns whether the value for any of the underlying fields on target
were changed as a\n * result.\n *\n * @param {Object.} options - the name/value pairs of options to be set\n * @param {Object} target - the object on which the options are to be set\n * @return {boolean} true
if any of the underlying fields on target
were changed; otherwise\n * false
.\n * @throws {Error} If options
contains an invalid option name or an option that cannot be modiifed.\n * @public\n * @memberof OptionManager#\n */\n setAll: function(options, target) {\n return this._setAll(options, target);\n },\n\n _set: function(name, value, target, allowUnmodifiable) {\n var option = this.options[name];\n if (!option) {\n throw new Error('Invalid option: ' + name);\n }\n if (!option.modifiable && !allowUnmodifiable) {\n throw new Error('Option cannot be modified: ' + name);\n }\n\n return OptionManager._set(option, value, target);\n },\n\n _setAll: function(options, target, allowUnmodifiable) {\n if (!options) {\n return false;\n }\n\n var name;\n var changed = false;\n\n for (name in options) {\n if (Utilities.hasOwn(options, name) && this._set(name, options[name], target, allowUnmodifiable)) {\n changed = true;\n }\n }\n\n return changed;\n }\n\n}, {\n\n _createAccessor: function(option, target, changeHandler) {\n var descriptor = {\n get: function() {\n return OptionManager._get(option, target);\n }\n };\n\n if (option.modifiable) {\n descriptor.set = function(value) {\n if (OptionManager._set(option, value, target)) {\n changeHandler(value, option);\n }\n };\n }\n\n Object.defineProperty(target, option.name, descriptor);\n },\n\n _get: function(option, target) {\n return target['_' + option.name];\n },\n\n _set: function(option, value, target) {\n var fieldName = '_' + option.name;\n var oldValue = target[fieldName];\n var newValue = option.transform(value != null ? value : option.defaultValue);\n\n target[fieldName] = newValue;\n\n return newValue !== oldValue;\n }\n\n});\n\nmodule.exports = OptionManager;\n\n/**\n * Called whenever the value of a modifiable {@link Option} is changed on a target object via the defined property's\n * setter.\n *\n * @callback OptionManager~ChangeHandler\n * @param {*} value - the new value for option
on the target object\n * @param {Option} option - the modifable {@link Option} whose value has changed on the target object.\n * @return {void}\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n * @class\n * @extends Nevis\n */\nvar ServiceManager = Nevis.extend(function() {\n this._services = {};\n}, {\n\n /**\n * Returns the {@link Service} being managed with the specified name
.\n *\n * @param {string} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name
.\n * @throws {Error} If no {@link Service} is being managed with name
.\n * @public\n * @memberof ServiceManager#\n */\n getService: function(name) {\n var service = this._services[name];\n if (!service) {\n throw new Error('Service is not being managed with name: ' + name);\n }\n\n return service;\n },\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name
to the\n * service
provided.\n *\n * @param {string} name - the name of the {@link Service} to be managed with name
\n * @param {Service} service - the {@link Service} implementation to be managed\n * @return {void}\n * @throws {Error} If a {@link Service} is already being managed with the same name
.\n * @public\n * @memberof ServiceManager#\n */\n setService: function(name, service) {\n if (this._services[name]) {\n throw new Error('Service is already managed with name: ' + name);\n }\n\n if (service) {\n this._services[name] = service;\n }\n }\n\n});\n\nmodule.exports = ServiceManager;\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar Nevis = require('nevis/lite');\n\nvar CanvasRenderer = require('./renderer/CanvasRenderer');\nvar Frame = require('./Frame');\nvar ImageRenderer = require('./renderer/ImageRenderer');\nvar Option = require('./option/Option');\nvar OptionManager = require('./option/OptionManager');\nvar ServiceManager = require('./service/ServiceManager');\nvar Utilities = require('./util/Utilities');\n\nvar optionManager = new OptionManager([\n new Option('background', true, 'white'),\n new Option('backgroundAlpha', true, 1, Utilities.abs),\n new Option('element'),\n new Option('foreground', true, 'black'),\n new Option('foregroundAlpha', true, 1, Utilities.abs),\n new Option('level', true, 'L', Utilities.toUpperCase),\n new Option('mime', true, 'image/png'),\n new Option('padding', true, null, Utilities.abs),\n new Option('size', true, 100, Utilities.abs),\n new Option('value', true, '')\n]);\nvar serviceManager = new ServiceManager();\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas
for rendering.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @throws {Error} If any options
are invalid.\n * @public\n * @class\n * @extends Nevis\n */\nvar QRious = Nevis.extend(function(options) {\n optionManager.init(options, this, this.update.bind(this));\n\n var element = optionManager.get('element', this);\n var elementService = serviceManager.getService('element');\n var canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas();\n var image = element && elementService.isImage(element) ? element : elementService.createImage();\n\n this._canvasRenderer = new CanvasRenderer(this, canvas, true);\n this._imageRenderer = new ImageRenderer(this, image, image === element);\n\n this.update();\n}, {\n\n /**\n * Returns all of the options configured for this {@link QRious}.\n *\n * Any changes made to the returned object will not be reflected in the options themselves or their corresponding\n * underlying fields.\n *\n * @return {Object.} A copy of the applied options.\n * @public\n * @memberof QRious#\n */\n get: function() {\n return optionManager.getAll(this);\n },\n\n /**\n * Sets all of the specified options
and automatically updates this {@link QRious} if any of the\n * underlying fields are changed as a result.\n *\n * This is the preferred method for updating multiple options at one time to avoid unnecessary updates between\n * changes.\n *\n * @param {QRious~Options} options - the options to be set\n * @return {void}\n * @throws {Error} If any options
are invalid or cannot be modified.\n * @public\n * @memberof QRious#\n */\n set: function(options) {\n if (optionManager.setAll(options, this)) {\n this.update();\n }\n },\n\n /**\n * Returns the image data URI for the generated QR code using the mime
provided.\n *\n * @param {string} [mime] - the MIME type for the image\n * @return {string} The image data URI for the QR code.\n * @public\n * @memberof QRious#\n */\n toDataURL: function(mime) {\n return this.canvas.toDataURL(mime || this.mime);\n },\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @return {void}\n * @protected\n * @memberof QRious#\n */\n update: function() {\n var frame = new Frame({\n level: this.level,\n value: this.value\n });\n\n this._canvasRenderer.render(frame);\n this._imageRenderer.render(frame);\n }\n\n}, {\n\n /**\n * The current version of {@link QRious}.\n *\n * @public\n * @static\n * @type {string}\n * @memberof QRious\n */\n VERSION: '3.0.1',\n\n /**\n * Configures the service
provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @return {void}\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n * @memberof QRious\n */\n use: function(service) {\n serviceManager.setService(service.getName(), service);\n }\n\n});\n\nObject.defineProperties(QRious.prototype, {\n\n canvas: {\n /**\n * Returns the canvas
element being used to render the QR code for this {@link QRious}.\n *\n * @return {*} The canvas
element.\n * @public\n * @memberof QRious#\n * @alias canvas\n */\n get: function() {\n return this._canvasRenderer.getElement();\n }\n },\n\n image: {\n /**\n * Returns the img
element being used to render the QR code for this {@link QRious}.\n *\n * @return {*} The img
element.\n * @public\n * @memberof QRious#\n * @alias image\n */\n get: function() {\n return this._imageRenderer.getElement();\n }\n }\n\n});\n\nmodule.exports = QRious;\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {string} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {number} [backgroundAlpha=1] - The background alpha to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas
or\n * img
. The element(s) will be created if needed.\n * @property {string} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {number} [foregroundAlpha=1] - The foreground alpha to be applied to the QR code.\n * @property {string} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {string} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {number} [padding] - The padding for the QR code in pixels.\n * @property {number} [size=100] - The size of the QR code in pixels.\n * @property {string} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n'use strict';\n\nvar BrowserElementService = require('../service/element/BrowserElementService');\nvar QRious = require('../QRious');\n\nQRious.use(new BrowserElementService());\n\nmodule.exports = QRious;\n"],"names":["createObject","prototype","properties","result","Object","create","Constructor","extendObject","extend","name","constructor","statics","superConstructor","this","apply","arguments","class_","super_","own","target","sources","property","source","i","length","slice","call","hasOwnProperty","Nevis","Array","getName","createCanvas","createImage","isCanvas","element","isImage","document","createElement","HTMLCanvasElement","HTMLImageElement","qrious","enabled","Boolean","draw","frame","getElement","render","getModuleSize","padding","pixels","Math","floor","size","width","max","getOffset","moduleSize","offset","resize","reset","Renderer","j","context","getContext","fillStyle","foreground","globalAlpha","foregroundAlpha","buffer","fillRect","lineWidth","clearRect","background","backgroundAlpha","height","BLOCK","BLOCKS","FINAL_FORMAT","LEVELS","L","M","Q","H","EXPONENT","LOG","Frame","options","dataBlock","eccBlock","index","neccBlock1","neccBlock2","valueLength","value","_badness","_level","ErrorCorrection","level","_polynomial","_value","_version","_stringBuffer","_dataBlock","_eccBlock","_neccBlock1","_neccBlock2","_createArray","_ecc","_mask","_insertFinders","_insertAlignments","_insertTimingGap","_reverseMask","_insertTimingRowAndColumn","_insertVersion","_syncMask","_convertBitStream","_calculatePolynomial","_appendEccToData","_interleaveBlocks","_pack","_finish","_addAlignment","x","y","_setMask","_appendData","data","dataLength","ecc","eccLength","bit","polynomial","stringBuffer","Galois","_modN","_calculateMaxLength","_applyMask","mask","r3x","r3y","_isMasked","_checkBadness","b","b1","h","bad","badness","N2","bw","_getBadness","count","big","N4","version","charCodeAt","maxLength","badRuns","N1","N3","currentMask","k","Alignment","Version","_getMaskBit","v","array","src","toDataURL","modifiable","defaultValue","valueTransformer","_valueTransformer","transform","transformer","abs","hasOwn","object","noop","toUpperCase","string","OptionManager","forEach","option","exists","get","_get","getAll","Utilities","init","changeHandler","_set","_createAccessor","_setAll","set","setAll","allowUnmodifiable","Error","changed","descriptor","defineProperty","fieldName","oldValue","newValue","_services","getService","service","setService","optionManager","Option","serviceManager","ServiceManager","QRious","update","bind","elementService","canvas","image","_canvasRenderer","CanvasRenderer","_imageRenderer","ImageRenderer","mime","VERSION","use","defineProperties","BrowserElementService"],"mappings":";;;2LAwDA,SAASA,EAAaC,EAAWC,GAC/B,IAAIC,EAcJ,MAZ6B,mBAAlBC,OAAOC,OAChBF,EAASC,OAAOC,OAAOJ,IAEvBK,EAAYL,UAAYA,EACxBE,EAAS,IAAIG,EACbA,EAAYL,UAAY,MAGtBC,GACFK,GAAa,EAAMJ,EAAQD,GAGtBC,EAwBT,SAASK,EAAOC,EAAMC,EAAaT,EAAWU,GAC5C,IAAIC,EAAmBC,KAyBvB,MAvBoB,iBAATJ,IACTE,EAAUV,EACVA,EAAYS,EACZA,EAAcD,EACdA,EAAO,MAGkB,mBA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OA,IAAUvL,GAE/DrB,KAAKwM,WAaL5B,IAAK,WACH,OAAOuB,EAAcrB,OAAO9K,OAgB9BqL,IAAK,SAAS5G,GACR0H,EAAcb,OAAO7G,EAASzE,OAChCA,KAAKwM,UAYT7C,UAAW,SAASsD,GAClB,OAAOjN,KAAK2M,OAAOhD,UAAUsD,GAAQjN,KAAKiN,OAU5CT,OAAQ,WACN,IAAIzK,EAAQ,IAAIyC,GACdY,MAAOpF,KAAKoF,MACZJ,MAAOhF,KAAKgF,QAGdhF,KAAK6M,gBAAgB5K,OAAOF,GAC5B/B,KAAK+M,eAAe9K,OAAOF,MAa7BmL,QAAS,QAYTC,IAAK,SAASlB,GACZI,EAAeH,WAAWD,EAAQhL,UAAWgL,MAKjD1M,OAAO6N,iBAAiBb,EAAOnN,WAE7BuN,QASE/B,IAAK,WACH,OAAO5K,KAAK6M,gBAAgB7K,eAIhC4K,OASEhC,IAAK,WACH,OAAO5K,KAAK+M,eAAe/K,uBAMhBuK,WCtKVY,IAAI,IAAIE,GAEEd"}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 962500c..7d06078 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "qrious",
- "version": "3.0.0",
+ "version": "3.0.1",
"lockfileVersion": 1,
"dependencies": {
"abbrev": {
diff --git a/package.json b/package.json
index 979f9c6..18ca98e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "qrious",
- "version": "3.0.0",
+ "version": "3.0.1",
"description": "Library for QR code generation using canvas",
"homepage": "https://github.com/neocotic/qrious",
"bugs": {
diff --git a/src/QRious.js b/src/QRious.js
index 3149b23..01c3579 100644
--- a/src/QRious.js
+++ b/src/QRious.js
@@ -138,7 +138,7 @@ var QRious = Nevis.extend(function(options) {
* @type {string}
* @memberof QRious
*/
- VERSION: '3.0.0',
+ VERSION: '3.0.1',
/**
* Configures the service
provided to be used by all {@link QRious} instances.