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AAK,cAChB,EACA,IAAK,SAAU,GACX,KAAK,iBAAmB,CAC5B,EACA,YAAY,EACZ,cAAc,IAElB,OAAO,eAAe,EAAM,UAAW,eAAgB,CACnD,IAAK,WACD,OAAQ,KAAK,aACjB,EACA,IAAK,SAAU,GACX,KAAK,gBAAkB,CAC3B,EACA,YAAY,EACZ,cAAc,IAGlB,EAAM,OAAS,CAEX,EAAC,GAAM,GAAM,GAAM,GAAM,GAAM,GAAM,GACrC,EAAC,GAAO,GAAM,GAAM,GAAO,GAAO,GAAO,GACzC,EAAC,GAAM,GAAM,GAAO,GAAM,GAAM,GAAO,GACvC,EAAC,GAAM,GAAM,GAAM,GAAM,GAAO,GAAO,GACvC,EAAC,GAAO,GAAM,GAAM,GAAO,GAAO,GAAM,GACxC,EAAC,GAAM,GAAO,GAAM,GAAM,GAAO,GAAM,GACvC,EAAC,GAAM,GAAO,GAAM,GAAM,GAAM,GAAM,GACtC,EAAC,GAAM,GAAM,GAAM,GAAO,GAAO,GAAO,GACxC,EAAC,GAAM,GAAM,GAAM,GAAM,GAAM,GAAM,GACrC,EAAC,GAAM,GAAM,GAAM,GAAM,GAAO,GAAM,GACtC,EAAC,GAAO,GAAO,GAAO,GAAO,GAAO,GAAO,GAC3C,EAAC,GAAO,GAAM,GAAM,GAAM,GAAM,GAAO,IAEpC,CACX,CA7XY,GA8XZ,QAAQ,MAAQ","file":"/npm/seven-segment@4.1.3/dist/seven-segment.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/seven-segment@4.1.3/dist/seven-segment.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\";\n(function (Digit) {\n    Digit[Digit[\"ZERO\"] = 0] = \"ZERO\";\n    Digit[Digit[\"ONE\"] = 1] = \"ONE\";\n    Digit[Digit[\"TWO\"] = 2] = \"TWO\";\n    Digit[Digit[\"THREE\"] = 3] = \"THREE\";\n    Digit[Digit[\"FOUR\"] = 4] = \"FOUR\";\n    Digit[Digit[\"FIVE\"] = 5] = \"FIVE\";\n    Digit[Digit[\"SIX\"] = 6] = \"SIX\";\n    Digit[Digit[\"SEVEN\"] = 7] = \"SEVEN\";\n    Digit[Digit[\"EIGHT\"] = 8] = \"EIGHT\";\n    Digit[Digit[\"NINE\"] = 9] = \"NINE\";\n    Digit[Digit[\"BLANK\"] = 10] = \"BLANK\";\n    Digit[Digit[\"D\"] = 11] = \"D\";\n})(exports.Digit || (exports.Digit = {}));\nvar Digit = exports.Digit;\nvar Segment = (function () {\n    function Segment() {\n        this.on = false;\n        this.points = [\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 }\n        ];\n    }\n    Object.defineProperty(Segment.prototype, \"off\", {\n        get: function () {\n            return !this.on;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    return Segment;\n}());\nexports.Segment = Segment;\n/**\n * The Seven class represents the geometry of a seven segment digit.\n * The geometry uses a coordinate system that is a cartesian grid with\n *    -x values to the left of the origin,\n *    +x values to the right of the origin,\n *    +y values below the origin, and\n *    -y values above the origin.\n * This is the coordinate system typically used for computer graphic systems.\n */\nvar Seven = (function () {\n    /**\n     * Construct a new Seven object.\n     * Optionally pass a SevenConfig object to set properties.\n     * Each property of the SevenConfig object is optional.\n     * If the passed in config contains bad values an exception will be thrown.\n     */\n    function Seven(_a) {\n        var _b = _a === void 0 ? {} : _a, height = _b.height, width = _b.width, _c = _b.angle, angle = _c === void 0 ? 10 : _c, _d = _b.ratioLtoW, ratioLtoW = _d === void 0 ? 4 : _d, _e = _b.ratioLtoS, ratioLtoS = _e === void 0 ? 32 : _e, _f = _b.digit, digit = _f === void 0 ? Digit.BLANK : _f;\n        /** The cononical points for a horizontal segment for the given configuration. */\n        this._horizontalSegmentGeometry = [\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 }\n        ];\n        /** The cononical points for a vertical segment for the given configuration. */\n        this._verticalSegmentGeometry = [\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 },\n            { x: 0, y: 0 }\n        ];\n        /** The x and y shifts that must be applied to each segment. */\n        this._translations = [\n            { x: 0, y: 0, a: this._horizontalSegmentGeometry },\n            { x: 0, y: 0, a: this._verticalSegmentGeometry },\n            { x: 0, y: 0, a: this._verticalSegmentGeometry },\n            { x: 0, y: 0, a: this._horizontalSegmentGeometry },\n            { x: 0, y: 0, a: this._verticalSegmentGeometry },\n            { x: 0, y: 0, a: this._verticalSegmentGeometry },\n            { x: 0, y: 0, a: this._horizontalSegmentGeometry }\n        ];\n        /** The segments, A-G of the digit. */\n        this.segments = [new Segment(), new Segment(), new Segment(), new Segment(), new Segment(), new Segment(), new Segment()];\n        this._angleDegree = angle;\n        this.digit = digit;\n        this._ratioLtoW = ratioLtoW;\n        this._ratioLtoS = ratioLtoS;\n        this._height = this._width = 100; //initialize so checkConfig passes, and for default case\n        this._isHeightFixed = true;\n        if (height !== undefined) {\n            this._height = height;\n        }\n        else if (width !== undefined) {\n            this._width = width;\n            this._isHeightFixed = false;\n        } //else - neither specified, default to height=100\n        this._positionSegments();\n    }\n    /**\n     * Check the height, width, angle, ratioLtoH, and ratioLtoS for valid values.\n     * Throws exception on first found issue.\n     *\n     * @private\n     */\n    Seven.prototype._checkConfig = function () {\n        var a;\n        var b;\n        //check height\n        a = this._height;\n        b = a * 1; //convert to a number\n        if (b != a || (typeof a === 'string' && a.toString().trim() === '')) {\n            throw new TypeError(\"Invalid value (\" + a + \") for height, not a number.\");\n        }\n        else if (b <= 0) {\n            throw new RangeError(\"Invalid value (\" + b + \") for height, must be greater than 0.\");\n        }\n        else if (!isFinite(b)) {\n            throw new RangeError(\"Invalid value (\" + b + \") for height, must be finite.\");\n        }\n        this._height = b;\n        //check width\n        a = this._width;\n        b = a * 1; //convert to a number\n        if (b != a || (typeof a === 'string' && a.toString().trim() === '')) {\n            throw new TypeError(\"Invalid value (\" + a + \") for width, not a number.\");\n        }\n        else if (b <= 0) {\n            throw new RangeError(\"Invalid value (\" + b + \") for width, must be greater than 0.\");\n        }\n        else if (!isFinite(b)) {\n            throw new RangeError(\"Invalid value (\" + b + \") for width, must be finite.\");\n        }\n        this._width = b;\n        //Check angle\n        a = this._angleDegree;\n        b = a * 1; //convert to a number\n        if (b != a || (typeof a === 'string' && a.toString().trim() === '')) {\n            throw new TypeError(\"Invalid value (\" + a + \") for angle, not a number.\");\n        }\n        else if (b <= -90 || b >= 90) {\n            throw new RangeError(\"Invalid value (\" + b + \") for angle, must be between 90 and -90 degrees.\");\n        }\n        this._angleDegree = b;\n        //Check ratioLtoW\n        a = this._ratioLtoW;\n        b = a * 1; //convert to a number\n        if (b != a || (typeof a === 'string' && a.toString().trim() === '')) {\n            throw new TypeError(\"Invalid value (\" + a + \") for ratioLtoW, not a number.\");\n        }\n        else if (b < 1) {\n            throw new RangeError(\"Invalid value (\" + b + \") for ratioLtoW, must be at least 1.\");\n        }\n        else if (!isFinite(b)) {\n            throw new RangeError(\"Invalid value (\" + b + \") for ratioLtoW, must be finite.\");\n        }\n        this._ratioLtoW = b;\n        //Check ratioLtoS\n        a = this._ratioLtoS;\n        b = a * 1; //convert to a number\n        if (b != a || (typeof a === 'string' && a.toString().trim() === '')) {\n            throw new TypeError(\"Invalid value (\" + a + \") for ratioLtoS, not a number.\");\n        }\n        else if (b <= 0) {\n            throw new RangeError(\"Invalid value (\" + b + \") for ratioLtoS, must be greater than 0.\");\n        }\n        else if (!isFinite(b)) {\n            throw new RangeError(\"Invalid value (\" + b + \") for ratioLtoS, must be finite.\");\n        }\n        this._ratioLtoS = b;\n    };\n    /**\n     * This method sets the following values for the object.\n     * _segmentLength, _angleRadian, _spacing, _halfSegmentWidth, _height, _width\n     *\n     * This method populates the _horizontalSegmentGeometry array.\n     * The array contains the six points of the horizontal segment's geometry.\n     * The first element in the array is the left most point.\n     * The points are then listed in clockwise order.\n     * All points besides the first have positive x values.\n     * The first point is always at the origin (0,0).\n     * The second and third points have negative y values;\n     * The fourth point is always at (l, 0). where l is the segment length\n     * The fifth and sixth points have positive y values.\n     *\n     * This method populates the _verticalSegmentGeometry array.\n     * The array contains the six points of the vertical segment's geometry.\n     * The first element in the array is the top most point.\n     * The points are then listed in counterclockwise order.\n     * All points besides the first have positive y values.\n     * The first point is always at the origin (0,0).\n     *\n     * This method throws an error if the calculated geometry is unexpected.\n     *\n     * @private\n     */\n    Seven.prototype._calculateSegmentGeometry = function () {\n        this._angleRadian = this._angleDegree * Math.PI / 180;\n        this._segmentEndAngle = (Math.PI / 2 - this._angleRadian) / 2;\n        //These calculations for segmentLength are the same as the height and width calcs below, except solved for segmentLength;\n        if (this._isHeightFixed) {\n            this._segmentLength = this._height / (1 / this._ratioLtoW + 2 * Math.cos(this._angleRadian) + 2 * (Math.sin(this._segmentEndAngle) + Math.cos(this._segmentEndAngle)) / this._ratioLtoS);\n        }\n        else {\n            this._segmentLength = this._width / (2 * Math.sin(Math.abs(this._angleRadian)) + 2 * Math.cos(this._angleDegree >= 0 ? this._segmentEndAngle : Math.PI / 2 - this._segmentEndAngle) / this._ratioLtoS + 1 + Math.tan(this._angleDegree >= 0 ? this._segmentEndAngle : Math.PI / 2 - this._segmentEndAngle) / this._ratioLtoW);\n        }\n        this._spacing = this._segmentLength / this.ratioLtoS;\n        var _segmentWidth = this._segmentLength / this.ratioLtoW;\n        this._halfSegmentWidth = _segmentWidth / 2;\n        this._segmentHorizontalShiftDistance = this._halfSegmentWidth * Math.tan(this._angleDegree >= 0 ? this._segmentEndAngle : Math.PI / 2 - this._segmentEndAngle); //This is the horizontal distance between the left most point in the digit and the nearest point on that same segment.\n        if (this._isHeightFixed) {\n            this._width =\n                2 * this._segmentLength * Math.sin(Math.abs(this._angleRadian)) +\n                    2 * this._spacing * Math.cos(this._angleDegree >= 0 ? this._segmentEndAngle : Math.PI / 2 - this._segmentEndAngle) +\n                    this._segmentLength +\n                    2 * this._segmentHorizontalShiftDistance; //This is the horizontal distance between the outer most (furthest to the left or furthest to the right) point on the 2 outer most segments and the 1st or 4th (whichever is closest) point on that same segment.\n        }\n        else {\n            this._height =\n                _segmentWidth +\n                    2 * this._segmentLength * Math.cos(this._angleRadian) +\n                    2 * this._spacing * (Math.sin(this._segmentEndAngle) + Math.cos(this._segmentEndAngle)); //This is the sum of the vertical distance between the following (1st point of segment A and 1st point of segment F) and (4th point of segment F and 1st point of segment E) and (4th point of segment E and 1st point of segment D).\n        }\n        var h = this._halfSegmentWidth;\n        var l = this._segmentLength;\n        var t = Math.tan(this._segmentEndAngle); //tangent of the segmentEndAngle, used for several point locations\n        this._horizontalSegmentGeometry[1].x = h / t;\n        this._horizontalSegmentGeometry[1].y = this._horizontalSegmentGeometry[2].y = -h;\n        this._horizontalSegmentGeometry[2].x = l - h * t;\n        this._horizontalSegmentGeometry[3].x = l;\n        this._horizontalSegmentGeometry[4].x = l - h / t;\n        this._horizontalSegmentGeometry[4].y = this._horizontalSegmentGeometry[5].y = h;\n        this._horizontalSegmentGeometry[5].x = h * t;\n        if (this._horizontalSegmentGeometry[1].x > this._horizontalSegmentGeometry[2].x) {\n            throw new RangeError(\"This digit configuration produces invalid geometry.  angle: \" + this._angleDegree + \",   ratioLtoW: \" + this._ratioLtoW + \",   ratioLtoS: \" + this._ratioLtoS);\n        }\n        //set vertical segment to horizontal segment mirrored over x axis\n        for (var i = 0, hPoint = void 0, vPoint = void 0; (hPoint = this._horizontalSegmentGeometry[i]) && (vPoint = this._verticalSegmentGeometry[i]); ++i) {\n            vPoint.x = hPoint.x;\n            vPoint.y = -hPoint.y;\n        }\n        //rotate vertical segment, https://en.wikipedia.org/wiki/Cartesian_coordinate_system#Rotation\n        var angle = this._angleRadian + Math.PI / 2; //rotate by 90deg + _angleDeg for proper position\n        for (var _i = 0, _a = this._verticalSegmentGeometry; _i < _a.length; _i++) {\n            var p = _a[_i];\n            var tempX = p.x;\n            var tempY = p.y;\n            p.x = tempX * Math.cos(angle) - tempY * Math.sin(angle);\n            p.y = tempX * Math.sin(angle) + tempY * Math.cos(angle);\n        }\n    };\n    /**\n     * This method first calls _calculateSegmentGeometry to populate the horizontal and vertical geometry arrays.\n     * Then, the x and y translations for each segment are calculated.\n     * Finally, the translations are applied to each segment.\n     *\n     * @private\n     */\n    Seven.prototype._positionSegments = function () {\n        this._checkConfig();\n        this._calculateSegmentGeometry();\n        var l = this._segmentLength;\n        var aC = this._spacing * Math.cos(this._segmentEndAngle); //Used for horizontal spacing calculations\n        var aS = this._spacing * Math.sin(this._segmentEndAngle); //Used for horizontal spacing calculations\n        var x = this._translations;\n        //calculate the x translations\n        x[6].x = this._segmentHorizontalShiftDistance + l * Math.sin(Math.abs(this._angleRadian)) + (this._angleDegree >= 0 ? aC : aS);\n        x[5].x = x[6].x - aS + l * Math.sin(this._angleRadian);\n        x[0].x = x[5].x + aC;\n        x[1].x = x[6].x + l + aC + l * Math.sin(this._angleRadian);\n        x[2].x = x[6].x + l + aS;\n        x[3].x = x[6].x + (aS - aC) - l * Math.sin(this._angleRadian);\n        x[4].x = x[4].x = x[6].x - aC;\n        //calculate the y translations\n        x[0].y = this._halfSegmentWidth;\n        x[1].y = x[0].y + aC;\n        x[5].y = x[0].y + aS;\n        x[6].y = x[5].y + l * Math.cos(this._angleRadian) + aC;\n        x[2].y = x[6].y + aC;\n        x[4].y = x[6].y + aS;\n        x[3].y = x[4].y + l * Math.cos(this._angleRadian) + aC;\n        //update all segment positions\n        for (var i = 0, s = void 0, t = void 0; (s = this.segments[i]) && (t = x[i]); ++i) {\n            for (var j = 0, p = void 0, g = void 0; (p = s.points[j]) && (g = t.a[j]); ++j) {\n                p.x = g.x + t.x;\n                p.y = g.y + t.y;\n            }\n        }\n    };\n    Seven.prototype._set = function (prop, value) {\n        var oldValue = this[prop];\n        try {\n            this[prop] = value;\n            this._positionSegments();\n        }\n        catch (e) {\n            this[prop] = oldValue;\n            this._positionSegments();\n            throw e;\n        }\n    };\n    Object.defineProperty(Seven.prototype, \"angle\", {\n        get: function () {\n            return this._angleDegree;\n        },\n        set: function (value) {\n            this._set('_angleDegree', value);\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Seven.prototype, \"ratioLtoW\", {\n        get: function () {\n            return this._ratioLtoW;\n        },\n        set: function (value) {\n            this._set('_ratioLtoW', value);\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Seven.prototype, \"ratioLtoS\", {\n        get: function () {\n            return this._ratioLtoS;\n        },\n        set: function (value) {\n            this._set('_ratioLtoS', value);\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Seven.prototype, \"digit\", {\n        get: function () {\n            return this._digit;\n        },\n        set: function (value) {\n            //Check digit\n            var newValue = value * 1; //convert to a number\n            if (newValue != value || (typeof value === 'string' && value.toString().trim() === '')) {\n                throw new TypeError(\"Invalid value (\" + value + \") for digit, not a Digit.\");\n            }\n            else if (Digit[newValue] === undefined) {\n                throw new RangeError(\"Invalid value (\" + newValue + \") for digit, must be a Digit.\");\n            }\n            this._digit = newValue;\n            //Set segment's on/off as needed\n            for (var i = 0, s = void 0; s = this.segments[i]; ++i) {\n                s.on = Seven.matrix[this._digit][i];\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Seven.prototype, \"height\", {\n        get: function () {\n            return this._height;\n        },\n        set: function (value) {\n            var orig = this._isHeightFixed;\n            this._isHeightFixed = true;\n            try {\n                this._set('_height', value);\n            }\n            catch (e) {\n                this._isHeightFixed = orig;\n                throw e;\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Seven.prototype, \"width\", {\n        get: function () {\n            return this._width;\n        },\n        set: function (value) {\n            var orig = this._isHeightFixed;\n            this._isHeightFixed = false;\n            try {\n                this._set('_width', value);\n            }\n            catch (e) {\n                this._isHeightFixed = orig;\n                throw e;\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Seven.prototype, \"isHeightFixed\", {\n        get: function () {\n            return this._isHeightFixed;\n        },\n        set: function (value) {\n            this._isHeightFixed = !!value;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Seven.prototype, \"isWidthFixed\", {\n        get: function () {\n            return !this.isHeightFixed;\n        },\n        set: function (value) {\n            this._isHeightFixed = !value;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    /** Lookup between which segments are used for each digit.  */\n    Seven.matrix = [\n        //A     B      C      D      E      F      G\n        [true, true, true, true, true, true, false],\n        [false, true, true, false, false, false, false],\n        [true, true, false, true, true, false, true],\n        [true, true, true, true, false, false, true],\n        [false, true, true, false, false, true, true],\n        [true, false, true, true, false, true, true],\n        [true, false, true, true, true, true, true],\n        [true, true, true, false, false, false, false],\n        [true, true, true, true, true, true, true],\n        [true, true, true, true, false, true, true],\n        [false, false, false, false, false, false, false],\n        [false, true, true, true, true, false, true],\n    ];\n    return Seven;\n}());\nexports.Seven = Seven;\n"]}