fl-web-component 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -12
- package/dist/fl-web-component.common.1.js +191 -137
- package/dist/fl-web-component.common.2.js +26 -21
- package/dist/fl-web-component.common.js +73 -67
- package/package.json +1 -1
- package/src/utils/flgltf-parser.js +5 -1
- package/src/utils/instance-parser.js +11 -5
|
@@ -391,7 +391,8 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
391
391
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
392
392
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
393
393
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
394
|
-
function
|
|
394
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
395
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
|
|
395
396
|
|
|
396
397
|
|
|
397
398
|
|
|
@@ -429,27 +430,24 @@ function offscreen() {
|
|
|
429
430
|
return new OffscreenCanvas(width, height);
|
|
430
431
|
},
|
|
431
432
|
createImage: function createImage(url) {
|
|
432
|
-
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/
|
|
433
|
+
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
433
434
|
var response, blob, img;
|
|
434
|
-
return
|
|
435
|
-
while (1) switch (_context.
|
|
435
|
+
return _regenerator().w(function (_context) {
|
|
436
|
+
while (1) switch (_context.n) {
|
|
436
437
|
case 0:
|
|
437
|
-
_context.
|
|
438
|
+
_context.n = 1;
|
|
438
439
|
return fetch(url);
|
|
439
|
-
case
|
|
440
|
-
response = _context.
|
|
441
|
-
_context.
|
|
440
|
+
case 1:
|
|
441
|
+
response = _context.v;
|
|
442
|
+
_context.n = 2;
|
|
442
443
|
return response.blob();
|
|
443
|
-
case
|
|
444
|
-
blob = _context.
|
|
445
|
-
_context.
|
|
444
|
+
case 2:
|
|
445
|
+
blob = _context.v;
|
|
446
|
+
_context.n = 3;
|
|
446
447
|
return createImageBitmap(blob);
|
|
447
|
-
case
|
|
448
|
-
img = _context.
|
|
449
|
-
return _context.
|
|
450
|
-
case 10:
|
|
451
|
-
case "end":
|
|
452
|
-
return _context.stop();
|
|
448
|
+
case 3:
|
|
449
|
+
img = _context.v;
|
|
450
|
+
return _context.a(2, img);
|
|
453
451
|
}
|
|
454
452
|
}, _callee);
|
|
455
453
|
}))();
|
|
@@ -1611,20 +1609,17 @@ var Parser = /*#__PURE__*/function () {
|
|
|
1611
1609
|
key: "parse",
|
|
1612
1610
|
value: function parse(resource) {
|
|
1613
1611
|
var _this = this;
|
|
1614
|
-
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/
|
|
1615
|
-
return
|
|
1616
|
-
while (1) switch (_context2.
|
|
1612
|
+
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
1613
|
+
return _regenerator().w(function (_context2) {
|
|
1614
|
+
while (1) switch (_context2.n) {
|
|
1617
1615
|
case 0:
|
|
1618
1616
|
if (!resource.startsWith('<')) {
|
|
1619
|
-
_context2.
|
|
1617
|
+
_context2.n = 1;
|
|
1620
1618
|
break;
|
|
1621
1619
|
}
|
|
1622
|
-
return _context2.
|
|
1623
|
-
case
|
|
1624
|
-
return _context2.
|
|
1625
|
-
case 3:
|
|
1626
|
-
case "end":
|
|
1627
|
-
return _context2.stop();
|
|
1620
|
+
return _context2.a(2, _this.parseFromString(resource));
|
|
1621
|
+
case 1:
|
|
1622
|
+
return _context2.a(2, _this.load(resource));
|
|
1628
1623
|
}
|
|
1629
1624
|
}, _callee2);
|
|
1630
1625
|
}))();
|
|
@@ -1652,23 +1647,20 @@ var Parser = /*#__PURE__*/function () {
|
|
|
1652
1647
|
key: "load",
|
|
1653
1648
|
value: function load(url) {
|
|
1654
1649
|
var _this2 = this;
|
|
1655
|
-
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/
|
|
1650
|
+
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
1656
1651
|
var response, xml;
|
|
1657
|
-
return
|
|
1658
|
-
while (1) switch (_context3.
|
|
1652
|
+
return _regenerator().w(function (_context3) {
|
|
1653
|
+
while (1) switch (_context3.n) {
|
|
1659
1654
|
case 0:
|
|
1660
|
-
_context3.
|
|
1655
|
+
_context3.n = 1;
|
|
1661
1656
|
return _this2.fetch(url);
|
|
1662
|
-
case
|
|
1663
|
-
response = _context3.
|
|
1664
|
-
_context3.
|
|
1657
|
+
case 1:
|
|
1658
|
+
response = _context3.v;
|
|
1659
|
+
_context3.n = 2;
|
|
1665
1660
|
return response.text();
|
|
1666
|
-
case
|
|
1667
|
-
xml = _context3.
|
|
1668
|
-
return _context3.
|
|
1669
|
-
case 7:
|
|
1670
|
-
case "end":
|
|
1671
|
-
return _context3.stop();
|
|
1661
|
+
case 2:
|
|
1662
|
+
xml = _context3.v;
|
|
1663
|
+
return _context3.a(2, _this2.parseFromString(xml));
|
|
1672
1664
|
}
|
|
1673
1665
|
}, _callee3);
|
|
1674
1666
|
}))();
|
|
@@ -5622,44 +5614,43 @@ var ImageElement = /*#__PURE__*/function (_RenderedElement5) {
|
|
|
5622
5614
|
key: "loadImage",
|
|
5623
5615
|
value: function loadImage(href) {
|
|
5624
5616
|
var _this = this;
|
|
5625
|
-
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/
|
|
5626
|
-
var image;
|
|
5627
|
-
return
|
|
5628
|
-
while (1) switch (_context4.
|
|
5617
|
+
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_regenerator().m(function _callee4() {
|
|
5618
|
+
var image, _t;
|
|
5619
|
+
return _regenerator().w(function (_context4) {
|
|
5620
|
+
while (1) switch (_context4.n) {
|
|
5629
5621
|
case 0:
|
|
5630
|
-
_context4.
|
|
5631
|
-
_context4.
|
|
5622
|
+
_context4.p = 0;
|
|
5623
|
+
_context4.n = 1;
|
|
5632
5624
|
return _this.document.createImage(href);
|
|
5633
|
-
case
|
|
5634
|
-
image = _context4.
|
|
5625
|
+
case 1:
|
|
5626
|
+
image = _context4.v;
|
|
5635
5627
|
_this.image = image;
|
|
5636
|
-
_context4.
|
|
5628
|
+
_context4.n = 3;
|
|
5637
5629
|
break;
|
|
5638
|
-
case
|
|
5639
|
-
_context4.
|
|
5640
|
-
|
|
5641
|
-
console.error("Error while loading image \"".concat(href, "\":"),
|
|
5642
|
-
case
|
|
5630
|
+
case 2:
|
|
5631
|
+
_context4.p = 2;
|
|
5632
|
+
_t = _context4.v;
|
|
5633
|
+
console.error("Error while loading image \"".concat(href, "\":"), _t);
|
|
5634
|
+
case 3:
|
|
5643
5635
|
_this.loaded = true;
|
|
5644
|
-
case
|
|
5645
|
-
|
|
5646
|
-
return _context4.stop();
|
|
5636
|
+
case 4:
|
|
5637
|
+
return _context4.a(2);
|
|
5647
5638
|
}
|
|
5648
|
-
}, _callee4, null, [[0,
|
|
5639
|
+
}, _callee4, null, [[0, 2]]);
|
|
5649
5640
|
}))();
|
|
5650
5641
|
}
|
|
5651
5642
|
}, {
|
|
5652
5643
|
key: "loadSvg",
|
|
5653
5644
|
value: function loadSvg(href) {
|
|
5654
5645
|
var _this2 = this;
|
|
5655
|
-
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/
|
|
5656
|
-
var match, data, response, svg;
|
|
5657
|
-
return
|
|
5658
|
-
while (1) switch (_context5.
|
|
5646
|
+
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_regenerator().m(function _callee5() {
|
|
5647
|
+
var match, data, response, svg, _t2;
|
|
5648
|
+
return _regenerator().w(function (_context5) {
|
|
5649
|
+
while (1) switch (_context5.n) {
|
|
5659
5650
|
case 0:
|
|
5660
5651
|
match = dataUriRegex.exec(href);
|
|
5661
5652
|
if (!match) {
|
|
5662
|
-
_context5.
|
|
5653
|
+
_context5.n = 1;
|
|
5663
5654
|
break;
|
|
5664
5655
|
}
|
|
5665
5656
|
data = match[5];
|
|
@@ -5668,32 +5659,31 @@ var ImageElement = /*#__PURE__*/function (_RenderedElement5) {
|
|
|
5668
5659
|
} else {
|
|
5669
5660
|
_this2.image = decodeURIComponent(data);
|
|
5670
5661
|
}
|
|
5671
|
-
_context5.
|
|
5662
|
+
_context5.n = 5;
|
|
5672
5663
|
break;
|
|
5673
|
-
case
|
|
5674
|
-
_context5.
|
|
5675
|
-
_context5.
|
|
5664
|
+
case 1:
|
|
5665
|
+
_context5.p = 1;
|
|
5666
|
+
_context5.n = 2;
|
|
5676
5667
|
return _this2.document.fetch(href);
|
|
5677
|
-
case
|
|
5678
|
-
response = _context5.
|
|
5679
|
-
_context5.
|
|
5668
|
+
case 2:
|
|
5669
|
+
response = _context5.v;
|
|
5670
|
+
_context5.n = 3;
|
|
5680
5671
|
return response.text();
|
|
5681
|
-
case
|
|
5682
|
-
svg = _context5.
|
|
5672
|
+
case 3:
|
|
5673
|
+
svg = _context5.v;
|
|
5683
5674
|
_this2.image = svg;
|
|
5684
|
-
_context5.
|
|
5675
|
+
_context5.n = 5;
|
|
5685
5676
|
break;
|
|
5686
|
-
case
|
|
5687
|
-
_context5.
|
|
5688
|
-
|
|
5689
|
-
console.error("Error while loading image \"".concat(href, "\":"),
|
|
5690
|
-
case
|
|
5677
|
+
case 4:
|
|
5678
|
+
_context5.p = 4;
|
|
5679
|
+
_t2 = _context5.v;
|
|
5680
|
+
console.error("Error while loading image \"".concat(href, "\":"), _t2);
|
|
5681
|
+
case 5:
|
|
5691
5682
|
_this2.loaded = true;
|
|
5692
|
-
case
|
|
5693
|
-
|
|
5694
|
-
return _context5.stop();
|
|
5683
|
+
case 6:
|
|
5684
|
+
return _context5.a(2);
|
|
5695
5685
|
}
|
|
5696
|
-
}, _callee5, null, [[
|
|
5686
|
+
}, _callee5, null, [[1, 4]]);
|
|
5697
5687
|
}))();
|
|
5698
5688
|
}
|
|
5699
5689
|
}, {
|
|
@@ -5779,35 +5769,34 @@ var SVGFontLoader = /*#__PURE__*/function () {
|
|
|
5779
5769
|
key: "load",
|
|
5780
5770
|
value: function load(fontFamily, url) {
|
|
5781
5771
|
var _this = this;
|
|
5782
|
-
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/
|
|
5783
|
-
var document, svgDocument, fonts;
|
|
5784
|
-
return
|
|
5785
|
-
while (1) switch (_context6.
|
|
5772
|
+
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_regenerator().m(function _callee6() {
|
|
5773
|
+
var document, svgDocument, fonts, _t3;
|
|
5774
|
+
return _regenerator().w(function (_context6) {
|
|
5775
|
+
while (1) switch (_context6.n) {
|
|
5786
5776
|
case 0:
|
|
5787
|
-
_context6.
|
|
5777
|
+
_context6.p = 0;
|
|
5788
5778
|
document = _this.document;
|
|
5789
|
-
_context6.
|
|
5779
|
+
_context6.n = 1;
|
|
5790
5780
|
return document.canvg.parser.load(url);
|
|
5791
|
-
case
|
|
5792
|
-
svgDocument = _context6.
|
|
5781
|
+
case 1:
|
|
5782
|
+
svgDocument = _context6.v;
|
|
5793
5783
|
fonts = svgDocument.getElementsByTagName('font');
|
|
5794
5784
|
Array.from(fonts).forEach(function (fontNode) {
|
|
5795
5785
|
var font = document.createElement(fontNode);
|
|
5796
5786
|
document.definitions[fontFamily] = font;
|
|
5797
5787
|
});
|
|
5798
|
-
_context6.
|
|
5788
|
+
_context6.n = 3;
|
|
5799
5789
|
break;
|
|
5800
|
-
case
|
|
5801
|
-
_context6.
|
|
5802
|
-
|
|
5803
|
-
console.error("Error while loading font \"".concat(url, "\":"),
|
|
5804
|
-
case
|
|
5790
|
+
case 2:
|
|
5791
|
+
_context6.p = 2;
|
|
5792
|
+
_t3 = _context6.v;
|
|
5793
|
+
console.error("Error while loading font \"".concat(url, "\":"), _t3);
|
|
5794
|
+
case 3:
|
|
5805
5795
|
_this.loaded = true;
|
|
5806
|
-
case
|
|
5807
|
-
|
|
5808
|
-
return _context6.stop();
|
|
5796
|
+
case 4:
|
|
5797
|
+
return _context6.a(2);
|
|
5809
5798
|
}
|
|
5810
|
-
}, _callee6, null, [[0,
|
|
5799
|
+
}, _callee6, null, [[0, 2]]);
|
|
5811
5800
|
}))();
|
|
5812
5801
|
}
|
|
5813
5802
|
}]);
|
|
@@ -6409,19 +6398,19 @@ function createImage(_x) {
|
|
|
6409
6398
|
return _createImage.apply(this, arguments);
|
|
6410
6399
|
}
|
|
6411
6400
|
function _createImage() {
|
|
6412
|
-
_createImage = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/
|
|
6401
|
+
_createImage = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_regenerator().m(function _callee7(src) {
|
|
6413
6402
|
var anonymousCrossOrigin,
|
|
6414
6403
|
image,
|
|
6415
6404
|
_args6 = arguments;
|
|
6416
|
-
return
|
|
6417
|
-
while (1) switch (_context7.
|
|
6405
|
+
return _regenerator().w(function (_context7) {
|
|
6406
|
+
while (1) switch (_context7.n) {
|
|
6418
6407
|
case 0:
|
|
6419
6408
|
anonymousCrossOrigin = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : false;
|
|
6420
6409
|
image = document.createElement('img');
|
|
6421
6410
|
if (anonymousCrossOrigin) {
|
|
6422
6411
|
image.crossOrigin = 'Anonymous';
|
|
6423
6412
|
}
|
|
6424
|
-
return _context7.
|
|
6413
|
+
return _context7.a(2, new Promise(function (resolve, reject) {
|
|
6425
6414
|
image.onload = function () {
|
|
6426
6415
|
resolve(image);
|
|
6427
6416
|
};
|
|
@@ -6430,9 +6419,6 @@ function _createImage() {
|
|
|
6430
6419
|
};
|
|
6431
6420
|
image.src = src;
|
|
6432
6421
|
}));
|
|
6433
|
-
case 4:
|
|
6434
|
-
case "end":
|
|
6435
|
-
return _context7.stop();
|
|
6436
6422
|
}
|
|
6437
6423
|
}, _callee7);
|
|
6438
6424
|
}));
|
|
@@ -6676,10 +6662,10 @@ var Canvg = /*#__PURE__*/function () {
|
|
|
6676
6662
|
value: function render() {
|
|
6677
6663
|
var _arguments2 = arguments,
|
|
6678
6664
|
_this = this;
|
|
6679
|
-
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/
|
|
6665
|
+
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_regenerator().m(function _callee8() {
|
|
6680
6666
|
var options;
|
|
6681
|
-
return
|
|
6682
|
-
while (1) switch (_context8.
|
|
6667
|
+
return _regenerator().w(function (_context8) {
|
|
6668
|
+
while (1) switch (_context8.n) {
|
|
6683
6669
|
case 0:
|
|
6684
6670
|
options = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : {};
|
|
6685
6671
|
_this.start(_objectSpread({
|
|
@@ -6687,13 +6673,12 @@ var Canvg = /*#__PURE__*/function () {
|
|
|
6687
6673
|
ignoreAnimation: true,
|
|
6688
6674
|
ignoreMouse: true
|
|
6689
6675
|
}, options));
|
|
6690
|
-
_context8.
|
|
6676
|
+
_context8.n = 1;
|
|
6691
6677
|
return _this.ready();
|
|
6692
|
-
case
|
|
6678
|
+
case 1:
|
|
6693
6679
|
_this.stop();
|
|
6694
|
-
case
|
|
6695
|
-
|
|
6696
|
-
return _context8.stop();
|
|
6680
|
+
case 2:
|
|
6681
|
+
return _context8.a(2);
|
|
6697
6682
|
}
|
|
6698
6683
|
}, _callee8);
|
|
6699
6684
|
}))();
|
|
@@ -6738,21 +6723,18 @@ var Canvg = /*#__PURE__*/function () {
|
|
|
6738
6723
|
key: "from",
|
|
6739
6724
|
value: function from(ctx, svg) {
|
|
6740
6725
|
var _arguments = arguments;
|
|
6741
|
-
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/
|
|
6726
|
+
return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_regenerator().m(function _callee9() {
|
|
6742
6727
|
var options, parser, svgDocument;
|
|
6743
|
-
return
|
|
6744
|
-
while (1) switch (_context9.
|
|
6728
|
+
return _regenerator().w(function (_context9) {
|
|
6729
|
+
while (1) switch (_context9.n) {
|
|
6745
6730
|
case 0:
|
|
6746
6731
|
options = _arguments.length > 2 && _arguments[2] !== undefined ? _arguments[2] : {};
|
|
6747
6732
|
parser = new Parser(options);
|
|
6748
|
-
_context9.
|
|
6733
|
+
_context9.n = 1;
|
|
6749
6734
|
return parser.parse(svg);
|
|
6750
|
-
case
|
|
6751
|
-
svgDocument = _context9.
|
|
6752
|
-
return _context9.
|
|
6753
|
-
case 6:
|
|
6754
|
-
case "end":
|
|
6755
|
-
return _context9.stop();
|
|
6735
|
+
case 1:
|
|
6736
|
+
svgDocument = _context9.v;
|
|
6737
|
+
return _context9.a(2, new Canvg(ctx, svgDocument, options));
|
|
6756
6738
|
}
|
|
6757
6739
|
}, _callee9);
|
|
6758
6740
|
}))();
|
|
@@ -6779,6 +6761,57 @@ var Canvg = /*#__PURE__*/function () {
|
|
|
6779
6761
|
|
|
6780
6762
|
/***/ }),
|
|
6781
6763
|
|
|
6764
|
+
/***/ "0f33":
|
|
6765
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6766
|
+
|
|
6767
|
+
"use strict";
|
|
6768
|
+
|
|
6769
|
+
|
|
6770
|
+
var globalThis = __webpack_require__("cfe9");
|
|
6771
|
+
var fails = __webpack_require__("d039");
|
|
6772
|
+
|
|
6773
|
+
// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError
|
|
6774
|
+
var RegExp = globalThis.RegExp;
|
|
6775
|
+
var FLAGS_GETTER_IS_CORRECT = !fails(function () {
|
|
6776
|
+
var INDICES_SUPPORT = true;
|
|
6777
|
+
try {
|
|
6778
|
+
RegExp('.', 'd');
|
|
6779
|
+
} catch (error) {
|
|
6780
|
+
INDICES_SUPPORT = false;
|
|
6781
|
+
}
|
|
6782
|
+
var O = {};
|
|
6783
|
+
// modern V8 bug
|
|
6784
|
+
var calls = '';
|
|
6785
|
+
var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';
|
|
6786
|
+
var addGetter = function addGetter(key, chr) {
|
|
6787
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
6788
|
+
Object.defineProperty(O, key, {
|
|
6789
|
+
get: function get() {
|
|
6790
|
+
calls += chr;
|
|
6791
|
+
return true;
|
|
6792
|
+
}
|
|
6793
|
+
});
|
|
6794
|
+
};
|
|
6795
|
+
var pairs = {
|
|
6796
|
+
dotAll: 's',
|
|
6797
|
+
global: 'g',
|
|
6798
|
+
ignoreCase: 'i',
|
|
6799
|
+
multiline: 'm',
|
|
6800
|
+
sticky: 'y'
|
|
6801
|
+
};
|
|
6802
|
+
if (INDICES_SUPPORT) pairs.hasIndices = 'd';
|
|
6803
|
+
for (var key in pairs) addGetter(key, pairs[key]);
|
|
6804
|
+
|
|
6805
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
6806
|
+
var result = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.call(O);
|
|
6807
|
+
return result !== expected || calls !== expected;
|
|
6808
|
+
});
|
|
6809
|
+
module.exports = {
|
|
6810
|
+
correct: FLAGS_GETTER_IS_CORRECT
|
|
6811
|
+
};
|
|
6812
|
+
|
|
6813
|
+
/***/ }),
|
|
6814
|
+
|
|
6782
6815
|
/***/ "107c":
|
|
6783
6816
|
/***/ (function(module, exports, __webpack_require__) {
|
|
6784
6817
|
|
|
@@ -7317,7 +7350,7 @@ module.exports = function (iterable, unboundFunction, options) {
|
|
|
7317
7350
|
var fn = bind(unboundFunction, that);
|
|
7318
7351
|
var iterator, iterFn, index, length, result, next, step;
|
|
7319
7352
|
var stop = function stop(condition) {
|
|
7320
|
-
if (iterator) iteratorClose(iterator, 'normal'
|
|
7353
|
+
if (iterator) iteratorClose(iterator, 'normal');
|
|
7321
7354
|
return new Result(true, condition);
|
|
7322
7355
|
};
|
|
7323
7356
|
var callFn = function callFn(value) {
|
|
@@ -7895,6 +7928,17 @@ module.exports = !fails(function () {
|
|
|
7895
7928
|
|
|
7896
7929
|
/***/ }),
|
|
7897
7930
|
|
|
7931
|
+
/***/ "428f":
|
|
7932
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
7933
|
+
|
|
7934
|
+
"use strict";
|
|
7935
|
+
|
|
7936
|
+
|
|
7937
|
+
var globalThis = __webpack_require__("cfe9");
|
|
7938
|
+
module.exports = globalThis;
|
|
7939
|
+
|
|
7940
|
+
/***/ }),
|
|
7941
|
+
|
|
7898
7942
|
/***/ "4362":
|
|
7899
7943
|
/***/ (function(module, exports, __webpack_require__) {
|
|
7900
7944
|
|
|
@@ -8039,6 +8083,7 @@ module.exports = function (fn) {
|
|
|
8039
8083
|
|
|
8040
8084
|
|
|
8041
8085
|
var call = __webpack_require__("c65b");
|
|
8086
|
+
var uncurryThis = __webpack_require__("e330");
|
|
8042
8087
|
var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
|
|
8043
8088
|
var anObject = __webpack_require__("825a");
|
|
8044
8089
|
var isObject = __webpack_require__("861d6");
|
|
@@ -8047,7 +8092,9 @@ var toString = __webpack_require__("577e");
|
|
|
8047
8092
|
var requireObjectCoercible = __webpack_require__("1d80");
|
|
8048
8093
|
var getMethod = __webpack_require__("dc4a");
|
|
8049
8094
|
var advanceStringIndex = __webpack_require__("8aa5");
|
|
8095
|
+
var getRegExpFlags = __webpack_require__("90d8");
|
|
8050
8096
|
var regExpExec = __webpack_require__("14c3");
|
|
8097
|
+
var stringIndexOf = uncurryThis(''.indexOf);
|
|
8051
8098
|
|
|
8052
8099
|
// @@match logic
|
|
8053
8100
|
fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
|
|
@@ -8066,8 +8113,9 @@ fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNa
|
|
|
8066
8113
|
var S = toString(string);
|
|
8067
8114
|
var res = maybeCallNative(nativeMatch, rx, S);
|
|
8068
8115
|
if (res.done) return res.value;
|
|
8069
|
-
|
|
8070
|
-
|
|
8116
|
+
var flags = toString(getRegExpFlags(rx));
|
|
8117
|
+
if (stringIndexOf(flags, 'g') === -1) return regExpExec(rx, S);
|
|
8118
|
+
var fullUnicode = stringIndexOf(flags, 'u') !== -1;
|
|
8071
8119
|
rx.lastIndex = 0;
|
|
8072
8120
|
var A = [];
|
|
8073
8121
|
var n = 0;
|
|
@@ -8337,6 +8385,7 @@ var requireObjectCoercible = __webpack_require__("1d80");
|
|
|
8337
8385
|
var advanceStringIndex = __webpack_require__("8aa5");
|
|
8338
8386
|
var getMethod = __webpack_require__("dc4a");
|
|
8339
8387
|
var getSubstitution = __webpack_require__("0cb2");
|
|
8388
|
+
var getRegExpFlags = __webpack_require__("90d8");
|
|
8340
8389
|
var regExpExec = __webpack_require__("14c3");
|
|
8341
8390
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
8342
8391
|
var REPLACE = wellKnownSymbol('replace');
|
|
@@ -8399,10 +8448,11 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
8399
8448
|
}
|
|
8400
8449
|
var functionalReplace = isCallable(replaceValue);
|
|
8401
8450
|
if (!functionalReplace) replaceValue = toString(replaceValue);
|
|
8402
|
-
var
|
|
8451
|
+
var flags = toString(getRegExpFlags(rx));
|
|
8452
|
+
var global = stringIndexOf(flags, 'g') !== -1;
|
|
8403
8453
|
var fullUnicode;
|
|
8404
8454
|
if (global) {
|
|
8405
|
-
fullUnicode =
|
|
8455
|
+
fullUnicode = stringIndexOf(flags, 'u') !== -1;
|
|
8406
8456
|
rx.lastIndex = 0;
|
|
8407
8457
|
}
|
|
8408
8458
|
var results = [];
|
|
@@ -8922,6 +8972,7 @@ var $ = __webpack_require__("23e7");
|
|
|
8922
8972
|
var IS_PURE = __webpack_require__("c430");
|
|
8923
8973
|
var IS_NODE = __webpack_require__("9adc");
|
|
8924
8974
|
var globalThis = __webpack_require__("cfe9");
|
|
8975
|
+
var path = __webpack_require__("428f");
|
|
8925
8976
|
var call = __webpack_require__("c65b");
|
|
8926
8977
|
var defineBuiltIn = __webpack_require__("cb2d");
|
|
8927
8978
|
var setPrototypeOf = __webpack_require__("d2bb");
|
|
@@ -9193,6 +9244,7 @@ $({
|
|
|
9193
9244
|
}, {
|
|
9194
9245
|
Promise: PromiseConstructor
|
|
9195
9246
|
});
|
|
9247
|
+
PromiseWrapper = path.Promise;
|
|
9196
9248
|
setToStringTag(PromiseConstructor, PROMISE, false, true);
|
|
9197
9249
|
setSpecies(PROMISE);
|
|
9198
9250
|
|
|
@@ -10391,11 +10443,13 @@ module.exports = function (S, index, unicode) {
|
|
|
10391
10443
|
var call = __webpack_require__("c65b");
|
|
10392
10444
|
var hasOwn = __webpack_require__("1a2d");
|
|
10393
10445
|
var isPrototypeOf = __webpack_require__("3a9b");
|
|
10394
|
-
var
|
|
10446
|
+
var regExpFlagsDetection = __webpack_require__("0f33");
|
|
10447
|
+
var regExpFlagsGetterImplementation = __webpack_require__("ad6d");
|
|
10395
10448
|
var RegExpPrototype = RegExp.prototype;
|
|
10396
|
-
module.exports = function (
|
|
10397
|
-
|
|
10398
|
-
|
|
10449
|
+
module.exports = regExpFlagsDetection.correct ? function (it) {
|
|
10450
|
+
return it.flags;
|
|
10451
|
+
} : function (it) {
|
|
10452
|
+
return !regExpFlagsDetection.correct && isPrototypeOf(RegExpPrototype, it) && !hasOwn(it, 'flags') ? call(regExpFlagsGetterImplementation, it) : it.flags;
|
|
10399
10453
|
};
|
|
10400
10454
|
|
|
10401
10455
|
/***/ }),
|
|
@@ -10409,7 +10463,7 @@ module.exports = function (R) {
|
|
|
10409
10463
|
var uncurryThis = __webpack_require__("e330");
|
|
10410
10464
|
var id = 0;
|
|
10411
10465
|
var postfix = Math.random();
|
|
10412
|
-
var toString = uncurryThis(1.
|
|
10466
|
+
var toString = uncurryThis(1.1.toString);
|
|
10413
10467
|
module.exports = function (key) {
|
|
10414
10468
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
10415
10469
|
};
|
|
@@ -11202,10 +11256,10 @@ var defineGlobalProperty = __webpack_require__("6374");
|
|
|
11202
11256
|
var SHARED = '__core-js_shared__';
|
|
11203
11257
|
var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
|
|
11204
11258
|
(store.versions || (store.versions = [])).push({
|
|
11205
|
-
version: '3.
|
|
11259
|
+
version: '3.43.0',
|
|
11206
11260
|
mode: IS_PURE ? 'pure' : 'global',
|
|
11207
11261
|
copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru)',
|
|
11208
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
11262
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE',
|
|
11209
11263
|
source: 'https://github.com/zloirock/core-js'
|
|
11210
11264
|
});
|
|
11211
11265
|
|