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IAAM,CAClB,CACJ,EACA,EAAO,UAAU,OAAS,WACtB,IAAI,EACA,GAAU,KAAK,MAAM,KAAQ,GAAK,KAAK,MAAM,UACjD,OAAO,MAAM,cAAc,SAAU,CAAE,GAA6B,QAAxB,EAAK,KAAK,MAAM,UAAuB,IAAP,EAAgB,EAAK,oBAAqB,OAAQ,EAAQ,MAAO,EAAQ,MAAO,SAAS,CAAE,OAAQ,EAAS,KAAM,MAAO,EAAS,MAAQ,KAAK,MAAM,OAAQ,IAAK,KAAK,WACvP,EACA,EAAO,aAAe,CAClB,MAAO,uBACP,QAAS,IACT,YAAY,EACZ,KAAM,IACN,UAAW,GACX,QAAS,UACT,QAAS,UACT,YAAa,EACb,QAAS,UACT,UAAW,CAAC,EAAG,EAAG,GAClB,iBAAkB,UAEf,CACX,CA9U2B,CA8UzB,MAAM,WACR,QAAQ,OAAS","file":"/npm/react-qrcode-logo@3.0.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-qrcode-logo@3.0.0/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.QRCode = void 0;\nvar isEqual = require(\"lodash.isequal\");\nvar qrGenerator = require(\"qrcode-generator\");\nvar React = require(\"react\");\nvar QRCode = /** @class */ (function (_super) {\n    __extends(QRCode, _super);\n    function QRCode(props) {\n        var _this = _super.call(this, props) || this;\n        _this.canvasRef = React.createRef();\n        return _this;\n    }\n    QRCode.prototype.download = function (fileType, fileName) {\n        if (this.canvasRef.current) {\n            var mimeType = void 0;\n            switch (fileType) {\n                case 'jpg':\n                    mimeType = 'image/jpeg';\n                    break;\n                case 'webp':\n                    mimeType = 'image/webp';\n                    break;\n                case 'png':\n                default:\n                    mimeType = 'image/png';\n                    break;\n            }\n            var url = this.canvasRef.current.toDataURL(mimeType, 1.0);\n            var link = document.createElement('a');\n            link.download = fileName !== null && fileName !== void 0 ? fileName : 'react-qrcode-logo';\n            link.href = url;\n            link.click();\n        }\n    };\n    QRCode.prototype.utf16to8 = function (str) {\n        var out = '', i, c;\n        var len = str.length;\n        for (i = 0; i < len; i++) {\n            c = str.charCodeAt(i);\n            if ((c >= 0x0001) && (c <= 0x007F)) {\n                out += str.charAt(i);\n            }\n            else if (c > 0x07FF) {\n                out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));\n                out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));\n                out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));\n            }\n            else {\n                out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));\n                out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));\n            }\n        }\n        return out;\n    };\n    /**\n     * Draw a rounded square in the canvas\n     */\n    QRCode.prototype.drawRoundedSquare = function (lineWidth, x, y, size, color, radii, fill, ctx) {\n        ctx.lineWidth = lineWidth;\n        ctx.fillStyle = color;\n        ctx.strokeStyle = color;\n        // Adjust coordinates so that the outside of the stroke is aligned to the edges\n        y += lineWidth / 2;\n        x += lineWidth / 2;\n        size -= lineWidth;\n        if (!Array.isArray(radii)) {\n            radii = [radii, radii, radii, radii];\n        }\n        // Radius should not be greater than half the size or less than zero\n        radii = radii.map(function (r) {\n            r = Math.min(r, size / 2);\n            return (r < 0) ? 0 : r;\n        });\n        var rTopLeft = radii[0] || 0;\n        var rTopRight = radii[1] || 0;\n        var rBottomRight = radii[2] || 0;\n        var rBottomLeft = radii[3] || 0;\n        ctx.beginPath();\n        ctx.moveTo(x + rTopLeft, y);\n        ctx.lineTo(x + size - rTopRight, y);\n        if (rTopRight)\n            ctx.quadraticCurveTo(x + size, y, x + size, y + rTopRight);\n        ctx.lineTo(x + size, y + size - rBottomRight);\n        if (rBottomRight)\n            ctx.quadraticCurveTo(x + size, y + size, x + size - rBottomRight, y + size);\n        ctx.lineTo(x + rBottomLeft, y + size);\n        if (rBottomLeft)\n            ctx.quadraticCurveTo(x, y + size, x, y + size - rBottomLeft);\n        ctx.lineTo(x, y + rTopLeft);\n        if (rTopLeft)\n            ctx.quadraticCurveTo(x, y, x + rTopLeft, y);\n        ctx.closePath();\n        ctx.stroke();\n        if (fill) {\n            ctx.fill();\n        }\n    };\n    /**\n     * Draw a single positional pattern eye.\n     */\n    QRCode.prototype.drawPositioningPattern = function (ctx, cellSize, offset, row, col, color, radii) {\n        if (radii === void 0) { radii = [0, 0, 0, 0]; }\n        var lineWidth = Math.ceil(cellSize);\n        var radiiOuter;\n        var radiiInner;\n        if (typeof radii !== 'number' && !Array.isArray(radii)) {\n            radiiOuter = radii.outer || 0;\n            radiiInner = radii.inner || 0;\n        }\n        else {\n            radiiOuter = radii;\n            radiiInner = radiiOuter;\n        }\n        var colorOuter;\n        var colorInner;\n        if (typeof color !== 'string') {\n            colorOuter = color.outer;\n            colorInner = color.inner;\n        }\n        else {\n            colorOuter = color;\n            colorInner = color;\n        }\n        var y = (row * cellSize) + offset;\n        var x = (col * cellSize) + offset;\n        var size = cellSize * 7;\n        // Outer box\n        this.drawRoundedSquare(lineWidth, x, y, size, colorOuter, radiiOuter, false, ctx);\n        // Inner box\n        size = cellSize * 3;\n        y += cellSize * 2;\n        x += cellSize * 2;\n        this.drawRoundedSquare(lineWidth, x, y, size, colorInner, radiiInner, true, ctx);\n    };\n    ;\n    /**\n     * Is this dot inside a positional pattern zone.\n     */\n    QRCode.prototype.isInPositioninZone = function (col, row, zones) {\n        return zones.some(function (zone) { return (row >= zone.row && row <= zone.row + 7 &&\n            col >= zone.col && col <= zone.col + 7); });\n    };\n    QRCode.prototype.transformPixelLengthIntoNumberOfCells = function (pixelLength, cellSize) {\n        return pixelLength / cellSize;\n    };\n    QRCode.prototype.isCoordinateInImage = function (col, row, dWidthLogo, dHeightLogo, dxLogo, dyLogo, cellSize, logoImage) {\n        if (logoImage) {\n            var numberOfCellsMargin = 2;\n            var firstRowOfLogo = this.transformPixelLengthIntoNumberOfCells(dxLogo, cellSize);\n            var firstColumnOfLogo = this.transformPixelLengthIntoNumberOfCells(dyLogo, cellSize);\n            var logoWidthInCells = this.transformPixelLengthIntoNumberOfCells(dWidthLogo, cellSize) - 1;\n            var logoHeightInCells = this.transformPixelLengthIntoNumberOfCells(dHeightLogo, cellSize) - 1;\n            return row >= firstRowOfLogo - numberOfCellsMargin && row <= firstRowOfLogo + logoWidthInCells + numberOfCellsMargin // check rows\n                && col >= firstColumnOfLogo - numberOfCellsMargin && col <= firstColumnOfLogo + logoHeightInCells + numberOfCellsMargin; // check cols\n        }\n        else {\n            return false;\n        }\n    };\n    QRCode.prototype.shouldComponentUpdate = function (nextProps) {\n        return !isEqual(this.props, nextProps);\n    };\n    QRCode.prototype.componentDidMount = function () {\n        this.update();\n    };\n    QRCode.prototype.componentDidUpdate = function () {\n        this.update();\n    };\n    QRCode.prototype.update = function () {\n        var _a;\n        var _b = this.props, value = _b.value, ecLevel = _b.ecLevel, enableCORS = _b.enableCORS, bgColor = _b.bgColor, fgColor = _b.fgColor, logoImage = _b.logoImage, logoOpacity = _b.logoOpacity, logoOnLoad = _b.logoOnLoad, removeQrCodeBehindLogo = _b.removeQrCodeBehindLogo, qrStyle = _b.qrStyle, eyeRadius = _b.eyeRadius, eyeColor = _b.eyeColor, logoPaddingStyle = _b.logoPaddingStyle;\n        // just make sure that these params are passed as numbers\n        var size = +this.props.size;\n        var quietZone = +this.props.quietZone;\n        var logoWidth = this.props.logoWidth ? +this.props.logoWidth : 0;\n        var logoHeight = this.props.logoHeight ? +this.props.logoHeight : 0;\n        var logoPadding = this.props.logoPadding ? +this.props.logoPadding : 0;\n        var qrCode = qrGenerator(0, ecLevel);\n        qrCode.addData(this.utf16to8(value));\n        qrCode.make();\n        var canvas = (_a = this.canvasRef) === null || _a === void 0 ? void 0 : _a.current;\n        var ctx = canvas.getContext('2d');\n        var canvasSize = size + (2 * quietZone);\n        var length = qrCode.getModuleCount();\n        var cellSize = size / length;\n        var scale = (window.devicePixelRatio || 1);\n        canvas.height = canvas.width = canvasSize * scale;\n        ctx.scale(scale, scale);\n        ctx.fillStyle = bgColor;\n        ctx.fillRect(0, 0, canvasSize, canvasSize);\n        var offset = quietZone;\n        var positioningZones = [\n            { row: 0, col: 0 },\n            { row: 0, col: length - 7 },\n            { row: length - 7, col: 0 },\n        ];\n        ctx.strokeStyle = fgColor;\n        if (qrStyle === 'dots') {\n            ctx.fillStyle = fgColor;\n            var radius = cellSize / 2;\n            for (var row = 0; row < length; row++) {\n                for (var col = 0; col < length; col++) {\n                    if (qrCode.isDark(row, col) && !this.isInPositioninZone(row, col, positioningZones)) {\n                        ctx.beginPath();\n                        ctx.arc(Math.round(col * cellSize) + radius + offset, Math.round(row * cellSize) + radius + offset, (radius / 100) * 75, 0, 2 * Math.PI, false);\n                        ctx.closePath();\n                        ctx.fill();\n                    }\n                }\n            }\n        }\n        else if (qrStyle === 'fluid') {\n            var radius = Math.ceil(cellSize / 2);\n            for (var row = 0; row < length; row++) {\n                for (var col = 0; col < length; col++) {\n                    if (qrCode.isDark(row, col) && !this.isInPositioninZone(row, col, positioningZones)) {\n                        var roundedCorners = [false, false, false, false]; // top-left, top-right, bottom-right, bottom-left\n                        if ((row > 0 && !qrCode.isDark(row - 1, col)) && (col > 0 && !qrCode.isDark(row, col - 1)))\n                            roundedCorners[0] = true;\n                        if ((row > 0 && !qrCode.isDark(row - 1, col)) && (col < length - 1 && !qrCode.isDark(row, col + 1)))\n                            roundedCorners[1] = true;\n                        if ((row < length - 1 && !qrCode.isDark(row + 1, col)) && (col < length - 1 && !qrCode.isDark(row, col + 1)))\n                            roundedCorners[2] = true;\n                        if ((row < length - 1 && !qrCode.isDark(row + 1, col)) && (col > 0 && !qrCode.isDark(row, col - 1)))\n                            roundedCorners[3] = true;\n                        var w = (Math.ceil((col + 1) * cellSize) - Math.floor(col * cellSize));\n                        var h = (Math.ceil((row + 1) * cellSize) - Math.floor(row * cellSize));\n                        ctx.fillStyle = fgColor;\n                        ctx.beginPath();\n                        ctx.arc(Math.round(col * cellSize) + radius + offset, Math.round(row * cellSize) + radius + offset, radius, 0, 2 * Math.PI, false);\n                        ctx.closePath();\n                        ctx.fill();\n                        if (!roundedCorners[0])\n                            ctx.fillRect(Math.round(col * cellSize) + offset, Math.round(row * cellSize) + offset, w / 2, h / 2);\n                        if (!roundedCorners[1])\n                            ctx.fillRect(Math.round(col * cellSize) + offset + Math.floor(w / 2), Math.round(row * cellSize) + offset, w / 2, h / 2);\n                        if (!roundedCorners[2])\n                            ctx.fillRect(Math.round(col * cellSize) + offset + Math.floor(w / 2), Math.round(row * cellSize) + offset + Math.floor(h / 2), w / 2, h / 2);\n                        if (!roundedCorners[3])\n                            ctx.fillRect(Math.round(col * cellSize) + offset, Math.round(row * cellSize) + offset + Math.floor(h / 2), w / 2, h / 2);\n                    }\n                }\n            }\n        }\n        else {\n            for (var row = 0; row < length; row++) {\n                for (var col = 0; col < length; col++) {\n                    if (qrCode.isDark(row, col) && !this.isInPositioninZone(row, col, positioningZones)) {\n                        ctx.fillStyle = fgColor;\n                        var w = (Math.ceil((col + 1) * cellSize) - Math.floor(col * cellSize));\n                        var h = (Math.ceil((row + 1) * cellSize) - Math.floor(row * cellSize));\n                        ctx.fillRect(Math.round(col * cellSize) + offset, Math.round(row * cellSize) + offset, w, h);\n                    }\n                }\n            }\n        }\n        // Draw positioning patterns\n        for (var i = 0; i < 3; i++) {\n            var _c = positioningZones[i], row = _c.row, col = _c.col;\n            var radii = eyeRadius;\n            var color = void 0;\n            if (Array.isArray(radii)) {\n                radii = radii[i];\n            }\n            if (typeof radii == 'number') {\n                radii = [radii, radii, radii, radii];\n            }\n            if (!eyeColor) { // if not specified, eye color is the same as foreground, \n                color = fgColor;\n            }\n            else {\n                if (Array.isArray(eyeColor)) { // if array, we pass the single color\n                    color = eyeColor[i];\n                }\n                else {\n                    color = eyeColor;\n                }\n            }\n            this.drawPositioningPattern(ctx, cellSize, offset, row, col, color, radii);\n        }\n        if (logoImage) {\n            var image_1 = new Image();\n            if (enableCORS) {\n                image_1.crossOrigin = 'Anonymous';\n            }\n            image_1.onload = function (e) {\n                ctx.save();\n                var dWidthLogo = logoWidth || size * 0.2;\n                var dHeightLogo = logoHeight || dWidthLogo;\n                var dxLogo = ((size - dWidthLogo) / 2);\n                var dyLogo = ((size - dHeightLogo) / 2);\n                if (removeQrCodeBehindLogo || logoPadding) {\n                    ctx.beginPath();\n                    ctx.strokeStyle = bgColor;\n                    ctx.fillStyle = bgColor;\n                    var dWidthLogoPadding = dWidthLogo + (2 * logoPadding);\n                    var dHeightLogoPadding = dHeightLogo + (2 * logoPadding);\n                    var dxLogoPadding = dxLogo + offset - logoPadding;\n                    var dyLogoPadding = dyLogo + offset - logoPadding;\n                    if (logoPaddingStyle === 'circle') {\n                        var dxCenterLogoPadding = dxLogoPadding + (dWidthLogoPadding / 2);\n                        var dyCenterLogoPadding = dyLogoPadding + (dHeightLogoPadding / 2);\n                        ctx.ellipse(dxCenterLogoPadding, dyCenterLogoPadding, dWidthLogoPadding / 2, dHeightLogoPadding / 2, 0, 0, 2 * Math.PI);\n                        ctx.stroke();\n                        ctx.fill();\n                    }\n                    else {\n                        ctx.fillRect(dxLogoPadding, dyLogoPadding, dWidthLogoPadding, dHeightLogoPadding);\n                    }\n                }\n                ctx.globalAlpha = logoOpacity;\n                ctx.drawImage(image_1, dxLogo + offset, dyLogo + offset, dWidthLogo, dHeightLogo);\n                ctx.restore();\n                if (logoOnLoad) {\n                    logoOnLoad(e);\n                }\n            };\n            image_1.src = logoImage;\n        }\n    };\n    QRCode.prototype.render = function () {\n        var _a;\n        var qrSize = +this.props.size + (2 * +this.props.quietZone);\n        return React.createElement(\"canvas\", { id: (_a = this.props.id) !== null && _a !== void 0 ? _a : 'react-qrcode-logo', height: qrSize, width: qrSize, style: __assign({ height: qrSize + 'px', width: qrSize + 'px' }, this.props.style), ref: this.canvasRef });\n    };\n    QRCode.defaultProps = {\n        value: 'https://reactjs.org/',\n        ecLevel: 'M',\n        enableCORS: false,\n        size: 150,\n        quietZone: 10,\n        bgColor: '#FFFFFF',\n        fgColor: '#000000',\n        logoOpacity: 1,\n        qrStyle: 'squares',\n        eyeRadius: [0, 0, 0],\n        logoPaddingStyle: 'square'\n    };\n    return QRCode;\n}(React.Component));\nexports.QRCode = QRCode;\n"]}