|
1060 | 1060 | };
|
1061 | 1061 | }
|
1062 | 1062 |
|
1063 |
| - function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } |
| 1063 | + function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } |
1064 | 1064 |
|
1065 | 1065 | function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
1066 | 1066 |
|
|
1168 | 1168 | }
|
1169 | 1169 |
|
1170 | 1170 | function isDataURI(fontFilePath) {
|
1171 |
| - return !!fontFilePath.match(dataURIRegex); |
| 1171 | + return !!fontFilePath.replace(/\s+/g, ' ').match(dataURIRegex); |
1172 | 1172 | }
|
1173 | 1173 |
|
1174 | 1174 | function generateFileReferences(fontFilePath, fileFormats, formatHint) {
|
|
1418 | 1418 | return template.trim();
|
1419 | 1419 | }
|
1420 | 1420 |
|
1421 |
| - function _templateObject() { |
1422 |
| - var data = _taggedTemplateLiteralLoose__default['default'](["linear-gradient(", "", ")"]); |
1423 |
| - |
1424 |
| - _templateObject = function _templateObject() { |
1425 |
| - return data; |
1426 |
| - }; |
1427 |
| - |
1428 |
| - return data; |
1429 |
| - } |
| 1421 | + var _templateObject; |
1430 | 1422 |
|
1431 | 1423 | /**
|
1432 | 1424 | * CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.
|
|
1469 | 1461 |
|
1470 | 1462 | return {
|
1471 | 1463 | backgroundColor: fallback || colorStops[0].replace(/,\s+/g, ',').split(' ')[0].replace(/,(?=\S)/g, ', '),
|
1472 |
| - backgroundImage: constructGradientValue(_templateObject(), toDirection, colorStops.join(', ').replace(/,(?=\S)/g, ', ')) |
| 1464 | + backgroundImage: constructGradientValue(_templateObject || (_templateObject = _taggedTemplateLiteralLoose__default['default'](["linear-gradient(", "", ")"])), toDirection, colorStops.join(', ').replace(/,(?=\S)/g, ', ')) |
1473 | 1465 | };
|
1474 | 1466 | }
|
1475 | 1467 |
|
|
1601 | 1593 | }];
|
1602 | 1594 | }
|
1603 | 1595 |
|
1604 |
| - function _templateObject$1() { |
1605 |
| - var data = _taggedTemplateLiteralLoose__default['default'](["radial-gradient(", "", "", "", ")"]); |
1606 |
| - |
1607 |
| - _templateObject$1 = function _templateObject() { |
1608 |
| - return data; |
1609 |
| - }; |
1610 |
| - |
1611 |
| - return data; |
1612 |
| - } |
| 1596 | + var _templateObject$1; |
1613 | 1597 |
|
1614 | 1598 | /**
|
1615 | 1599 | * CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.
|
|
1658 | 1642 |
|
1659 | 1643 | return {
|
1660 | 1644 | backgroundColor: fallback || colorStops[0].split(' ')[0],
|
1661 |
| - backgroundImage: constructGradientValue(_templateObject$1(), position, shape, extent, colorStops.join(', ')) |
| 1645 | + backgroundImage: constructGradientValue(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose__default['default'](["radial-gradient(", "", "", "", ")"])), position, shape, extent, colorStops.join(', ')) |
1662 | 1646 | };
|
1663 | 1647 | }
|
1664 | 1648 |
|
|
2214 | 2198 | };
|
2215 | 2199 | }
|
2216 | 2200 |
|
2217 |
| - var rgbaMatched = rgbaRegex.exec(normalizedColor); |
| 2201 | + var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50)); |
2218 | 2202 |
|
2219 | 2203 | if (rgbaMatched) {
|
2220 | 2204 | return {
|
|
2245 | 2229 | };
|
2246 | 2230 | }
|
2247 | 2231 |
|
2248 |
| - var hslaMatched = hslaRegex.exec(normalizedColor); |
| 2232 | + var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50)); |
2249 | 2233 |
|
2250 | 2234 | if (hslaMatched) {
|
2251 | 2235 | var _hue = parseInt("" + hslaMatched[1], 10);
|
|
0 commit comments