@carbon/charts-vue 1.3.0 → 1.4.0

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/charts-vue.umd.js CHANGED
@@ -691,7 +691,7 @@ var RenderTypes;
691
691
  */
692
692
  var ChartTheme;
693
693
  (function (ChartTheme) {
694
- ChartTheme["DEFAULT"] = "default";
694
+ ChartTheme["WHITE"] = "white";
695
695
  ChartTheme["G100"] = "g100";
696
696
  ChartTheme["G90"] = "g90";
697
697
  ChartTheme["G10"] = "g10";
@@ -8477,6 +8477,7 @@ var chart = {
8477
8477
  width: null,
8478
8478
  height: null,
8479
8479
  resizable: true,
8480
+ theme: ChartTheme.WHITE,
8480
8481
  tooltip: baseTooltip,
8481
8482
  legend: configuration_legend,
8482
8483
  style: {
@@ -11263,8 +11264,8 @@ Selection.prototype = selection_selection.prototype = {
11263
11264
  // EXTERNAL MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
11264
11265
  var ResizeObserver_es = __webpack_require__("2da1");
11265
11266
 
11266
- // EXTERNAL MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/dom-to-image/src/dom-to-image.js
11267
- var dom_to_image = __webpack_require__("eeea");
11267
+ // EXTERNAL MODULE: ./node_modules/@carbon/charts/services/essentials/dom-to-image.js
11268
+ var dom_to_image = __webpack_require__("b1b0");
11268
11269
  var dom_to_image_default = /*#__PURE__*/__webpack_require__.n(dom_to_image);
11269
11270
 
11270
11271
  // CONCATENATED MODULE: ./node_modules/@carbon/charts/services/essentials/dom-utils.js
@@ -11468,12 +11469,10 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
11468
11469
  };
11469
11470
  DOMUtils.prototype.styleHolderElement = function () {
11470
11471
  var holderElement = this.getHolder();
11471
- // Add class to chart holder
11472
- src_select(this.getHolder()).classed(carbonPrefix + "--chart-holder", true);
11473
11472
  // In order for resize events to not clash with these updates
11474
11473
  // We'll check if the width & height values passed in options
11475
11474
  // Have changed, before setting them to the holder
11476
- var _a = this.model.getOptions(), width = _a.width, height = _a.height;
11475
+ var _a = this.model.getOptions(), width = _a.width, height = _a.height, theme = _a.theme;
11477
11476
  if (width !== this.width) {
11478
11477
  // Apply formatted width attribute to chart
11479
11478
  holderElement.style.width = width;
@@ -11484,6 +11483,10 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
11484
11483
  holderElement.style.height = height;
11485
11484
  this.height = height;
11486
11485
  }
11486
+ // Add class to chart holder
11487
+ src_select(this.getHolder())
11488
+ .classed(carbonPrefix + "--chart-holder", true)
11489
+ .attr('data-carbon-theme', theme);
11487
11490
  };
11488
11491
  DOMUtils.prototype.getHolder = function () {
11489
11492
  return this.model.get('holder');
@@ -36287,6 +36290,8 @@ var axis_Axis = /** @class */ (function (_super) {
36287
36290
  }
36288
36291
  lastStartPosition_1 = xTransformation;
36289
36292
  });
36293
+ // Cleanup mock text piece
36294
+ mockTextPiece.remove();
36290
36295
  }
36291
36296
  }
36292
36297
  if (shouldRotateTicks_1) {
@@ -49445,447 +49450,1173 @@ module.exports = [
49445
49450
 
49446
49451
  /***/ }),
49447
49452
 
49448
- /***/ "b489":
49453
+ /***/ "b1b0":
49449
49454
  /***/ (function(module, exports, __webpack_require__) {
49450
49455
 
49451
- "use strict";
49452
-
49456
+ /**
49457
+ The MIT License (MIT)
49453
49458
 
49454
- Object.defineProperty(exports, "__esModule", {
49455
- value: true
49456
- });
49457
- exports.default = buildLocalizeFn;
49459
+ Copyright 2015 Anatolii Saienko
49460
+ https://github.com/tsayen
49458
49461
 
49459
- function buildLocalizeFn(args) {
49460
- return function (dirtyIndex, dirtyOptions) {
49461
- var options = dirtyOptions || {};
49462
- var context = options.context ? String(options.context) : 'standalone';
49463
- var valuesArray;
49462
+ Copyright 2012 Paul Bakaus
49463
+ http://paulbakaus.com/
49464
49464
 
49465
- if (context === 'formatting' && args.formattingValues) {
49466
- var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
49467
- var width = options.width ? String(options.width) : defaultWidth;
49468
- valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
49469
- } else {
49470
- var _defaultWidth = args.defaultWidth;
49465
+ Permission is hereby granted, free of charge, to any person obtaining
49466
+ a copy of this software and associated documentation files (the
49467
+ "Software"), to deal in the Software without restriction, including
49468
+ without limitation the rights to use, copy, modify, merge, publish,
49469
+ distribute, sublicense, and/or sell copies of the Software, and to
49470
+ permit persons to whom the Software is furnished to do so, subject to
49471
+ the following conditions:
49471
49472
 
49472
- var _width = options.width ? String(options.width) : args.defaultWidth;
49473
+ The above copyright notice and this permission notice shall be
49474
+ included in all copies or substantial portions of the Software.
49473
49475
 
49474
- valuesArray = args.values[_width] || args.values[_defaultWidth];
49476
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
49477
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
49478
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
49479
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
49480
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
49481
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
49482
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49483
+ */
49484
+ (function (global) {
49485
+ 'use strict';
49486
+ var util = newUtil();
49487
+ var inliner = newInliner();
49488
+ var fontFaces = newFontFaces();
49489
+ var images = newImages();
49490
+ // Default impl options
49491
+ var defaultOptions = {
49492
+ // Default is to fail on error, no placeholder
49493
+ imagePlaceholder: undefined,
49494
+ // Default cache bust is false, it will use the cache
49495
+ cacheBust: false,
49496
+ };
49497
+ var domtoimage = {
49498
+ toSvg: toSvg,
49499
+ toPng: toPng,
49500
+ toJpeg: toJpeg,
49501
+ toBlob: toBlob,
49502
+ toPixelData: toPixelData,
49503
+ impl: {
49504
+ fontFaces: fontFaces,
49505
+ images: images,
49506
+ util: util,
49507
+ inliner: inliner,
49508
+ options: {},
49509
+ },
49510
+ };
49511
+ if (true)
49512
+ module.exports = domtoimage;
49513
+ else
49514
+ {}
49515
+ /**
49516
+ * @param {Node} node - The DOM Node object to render
49517
+ * @param {Object} options - Rendering options
49518
+ * @param {Function} options.filter - Should return true if passed node should be included in the output
49519
+ * (excluding node means excluding it's children as well). Not called on the root node.
49520
+ * @param {String} options.bgcolor - color for the background, any valid CSS color value.
49521
+ * @param {Number} options.width - width to be applied to node before rendering.
49522
+ * @param {Number} options.height - height to be applied to node before rendering.
49523
+ * @param {Object} options.style - an object whose properties to be copied to node's style before rendering.
49524
+ * @param {Number} options.quality - a Number between 0 and 1 indicating image quality (applicable to JPEG only),
49525
+ defaults to 1.0.
49526
+ * @param {String} options.imagePlaceholder - dataURL to use as a placeholder for failed images, default behaviour is to fail fast on images we can't fetch
49527
+ * @param {Boolean} options.cacheBust - set to true to cache bust by appending the time to the request url
49528
+ * @return {Promise} - A promise that is fulfilled with a SVG image data URL
49529
+ * */
49530
+ function toSvg(node, options) {
49531
+ options = options || {};
49532
+ copyOptions(options);
49533
+ return Promise.resolve(node)
49534
+ .then(function (node) {
49535
+ return cloneNode(node, options.filter, true);
49536
+ })
49537
+ .then(embedFonts)
49538
+ .then(inlineImages)
49539
+ .then(applyOptions)
49540
+ .then(function (clone) {
49541
+ return makeSvgDataUri(clone, options.width || util.width(node), options.height || util.height(node));
49542
+ });
49543
+ function applyOptions(clone) {
49544
+ if (options.bgcolor)
49545
+ clone.style.backgroundColor = options.bgcolor;
49546
+ if (options.width)
49547
+ clone.style.width = options.width + 'px';
49548
+ if (options.height)
49549
+ clone.style.height = options.height + 'px';
49550
+ if (options.style)
49551
+ Object.keys(options.style).forEach(function (property) {
49552
+ clone.style[property] = options.style[property];
49553
+ });
49554
+ return clone;
49555
+ }
49475
49556
  }
49476
-
49477
- var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
49478
- return valuesArray[index];
49479
- };
49480
- }
49481
-
49482
- module.exports = exports.default;
49483
-
49484
- /***/ }),
49485
-
49486
- /***/ "b495":
49487
- /***/ (function(module, exports, __webpack_require__) {
49488
-
49489
- var toInteger = __webpack_require__("8bb2");
49490
-
49491
- var min = Math.min;
49492
-
49493
- // `ToLength` abstract operation
49494
- // https://tc39.github.io/ecma262/#sec-tolength
49495
- module.exports = function (argument) {
49496
- return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
49497
- };
49498
-
49499
-
49500
- /***/ }),
49501
-
49502
- /***/ "b634":
49503
- /***/ (function(module, exports, __webpack_require__) {
49504
-
49505
- var has = __webpack_require__("f1a7");
49506
- var ownKeys = __webpack_require__("a03e");
49507
- var getOwnPropertyDescriptorModule = __webpack_require__("185a");
49508
- var definePropertyModule = __webpack_require__("abdf");
49509
-
49510
- module.exports = function (target, source) {
49511
- var keys = ownKeys(source);
49512
- var defineProperty = definePropertyModule.f;
49513
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
49514
- for (var i = 0; i < keys.length; i++) {
49515
- var key = keys[i];
49516
- if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
49517
- }
49518
- };
49519
-
49520
-
49521
- /***/ }),
49522
-
49523
- /***/ "b7fb":
49524
- /***/ (function(module, exports, __webpack_require__) {
49525
-
49526
- var toInteger = __webpack_require__("8bb2");
49527
- var requireObjectCoercible = __webpack_require__("730c");
49528
-
49529
- // `String.prototype.{ codePointAt, at }` methods implementation
49530
- var createMethod = function (CONVERT_TO_STRING) {
49531
- return function ($this, pos) {
49532
- var S = String(requireObjectCoercible($this));
49533
- var position = toInteger(pos);
49534
- var size = S.length;
49535
- var first, second;
49536
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
49537
- first = S.charCodeAt(position);
49538
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
49539
- || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
49540
- ? CONVERT_TO_STRING ? S.charAt(position) : first
49541
- : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
49542
- };
49543
- };
49544
-
49545
- module.exports = {
49546
- // `String.prototype.codePointAt` method
49547
- // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
49548
- codeAt: createMethod(false),
49549
- // `String.prototype.at` method
49550
- // https://github.com/mathiasbynens/String.prototype.at
49551
- charAt: createMethod(true)
49552
- };
49553
-
49554
-
49555
- /***/ }),
49556
-
49557
- /***/ "b8ba":
49558
- /***/ (function(module, exports, __webpack_require__) {
49559
-
49560
- var global = __webpack_require__("f498");
49561
- var createNonEnumerableProperty = __webpack_require__("5b12");
49562
- var has = __webpack_require__("f1a7");
49563
- var setGlobal = __webpack_require__("3e34");
49564
- var inspectSource = __webpack_require__("df6f");
49565
- var InternalStateModule = __webpack_require__("cdcd");
49566
-
49567
- var getInternalState = InternalStateModule.get;
49568
- var enforceInternalState = InternalStateModule.enforce;
49569
- var TEMPLATE = String(String).split('String');
49570
-
49571
- (module.exports = function (O, key, value, options) {
49572
- var unsafe = options ? !!options.unsafe : false;
49573
- var simple = options ? !!options.enumerable : false;
49574
- var noTargetGet = options ? !!options.noTargetGet : false;
49575
- if (typeof value == 'function') {
49576
- if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
49577
- enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
49578
- }
49579
- if (O === global) {
49580
- if (simple) O[key] = value;
49581
- else setGlobal(key, value);
49582
- return;
49583
- } else if (!unsafe) {
49584
- delete O[key];
49585
- } else if (!noTargetGet && O[key]) {
49586
- simple = true;
49587
- }
49588
- if (simple) O[key] = value;
49589
- else createNonEnumerableProperty(O, key, value);
49590
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
49591
- })(Function.prototype, 'toString', function toString() {
49592
- return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
49593
- });
49594
-
49595
-
49596
- /***/ }),
49597
-
49598
- /***/ "b99b":
49599
- /***/ (function(module, exports, __webpack_require__) {
49600
-
49601
- var DESCRIPTORS = __webpack_require__("d4cb");
49602
- var definePropertyModule = __webpack_require__("abdf");
49603
- var anObject = __webpack_require__("157c");
49604
- var objectKeys = __webpack_require__("0c47");
49605
-
49606
- // `Object.defineProperties` method
49607
- // https://tc39.github.io/ecma262/#sec-object.defineproperties
49608
- module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
49609
- anObject(O);
49610
- var keys = objectKeys(Properties);
49611
- var length = keys.length;
49612
- var index = 0;
49613
- var key;
49614
- while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
49615
- return O;
49616
- };
49617
-
49618
-
49619
- /***/ }),
49620
-
49621
- /***/ "c1a2":
49622
- /***/ (function(module, exports, __webpack_require__) {
49623
-
49624
- var anObject = __webpack_require__("157c");
49625
- var aPossiblePrototype = __webpack_require__("f3e4");
49626
-
49627
- // `Object.setPrototypeOf` method
49628
- // https://tc39.github.io/ecma262/#sec-object.setprototypeof
49629
- // Works with __proto__ only. Old v8 can't work with null proto objects.
49630
- /* eslint-disable no-proto */
49631
- module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
49632
- var CORRECT_SETTER = false;
49633
- var test = {};
49634
- var setter;
49635
- try {
49636
- setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
49637
- setter.call(test, []);
49638
- CORRECT_SETTER = test instanceof Array;
49639
- } catch (error) { /* empty */ }
49640
- return function setPrototypeOf(O, proto) {
49641
- anObject(O);
49642
- aPossiblePrototype(proto);
49643
- if (CORRECT_SETTER) setter.call(O, proto);
49644
- else O.__proto__ = proto;
49645
- return O;
49646
- };
49647
- }() : undefined);
49648
-
49649
-
49650
- /***/ }),
49651
-
49652
- /***/ "c607":
49653
- /***/ (function(module, exports, __webpack_require__) {
49654
-
49655
- var global = __webpack_require__("f498");
49656
- var setGlobal = __webpack_require__("3e34");
49657
-
49658
- var SHARED = '__core-js_shared__';
49659
- var store = global[SHARED] || setGlobal(SHARED, {});
49660
-
49661
- module.exports = store;
49662
-
49663
-
49664
- /***/ }),
49665
-
49666
- /***/ "c6de":
49667
- /***/ (function(module, exports, __webpack_require__) {
49668
-
49669
- var classof = __webpack_require__("6a61");
49670
-
49671
- // `IsArray` abstract operation
49672
- // https://tc39.github.io/ecma262/#sec-isarray
49673
- module.exports = Array.isArray || function isArray(arg) {
49674
- return classof(arg) == 'Array';
49675
- };
49676
-
49677
-
49678
- /***/ }),
49679
-
49680
- /***/ "c78b":
49681
- /***/ (function(module, exports, __webpack_require__) {
49682
-
49683
- "use strict";
49684
-
49685
- var $ = __webpack_require__("6b1d");
49686
- var notARegExp = __webpack_require__("9eea");
49687
- var requireObjectCoercible = __webpack_require__("730c");
49688
- var correctIsRegExpLogic = __webpack_require__("3e32");
49689
-
49690
- // `String.prototype.includes` method
49691
- // https://tc39.github.io/ecma262/#sec-string.prototype.includes
49692
- $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
49693
- includes: function includes(searchString /* , position = 0 */) {
49694
- return !!~String(requireObjectCoercible(this))
49695
- .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
49696
- }
49697
- });
49698
-
49699
-
49700
- /***/ }),
49701
-
49702
- /***/ "c91c":
49703
- /***/ (function(module, exports, __webpack_require__) {
49704
-
49705
- var has = __webpack_require__("f1a7");
49706
- var toIndexedObject = __webpack_require__("378c");
49707
- var indexOf = __webpack_require__("1f5e").indexOf;
49708
- var hiddenKeys = __webpack_require__("d687");
49709
-
49710
- module.exports = function (object, names) {
49711
- var O = toIndexedObject(object);
49712
- var i = 0;
49713
- var result = [];
49714
- var key;
49715
- for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
49716
- // Don't enum bug & hidden keys
49717
- while (names.length > i) if (has(O, key = names[i++])) {
49718
- ~indexOf(result, key) || result.push(key);
49719
- }
49720
- return result;
49721
- };
49722
-
49723
-
49724
- /***/ }),
49725
-
49726
- /***/ "c9c9":
49727
- /***/ (function(module, exports, __webpack_require__) {
49728
-
49729
- "use strict";
49730
-
49731
-
49732
- Object.defineProperty(exports, "__esModule", {
49733
- value: true
49734
- });
49735
- exports.default = void 0;
49736
-
49737
- var _index = _interopRequireDefault(__webpack_require__("5ae7"));
49738
-
49739
- var _index2 = _interopRequireDefault(__webpack_require__("3606"));
49740
-
49741
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
49742
-
49743
- var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
49744
- var parseOrdinalNumberPattern = /\d+/i;
49745
- var matchEraPatterns = {
49746
- narrow: /^(b|a)/i,
49747
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
49748
- wide: /^(before christ|before common era|anno domini|common era)/i
49749
- };
49750
- var parseEraPatterns = {
49751
- any: [/^b/i, /^(a|c)/i]
49752
- };
49753
- var matchQuarterPatterns = {
49754
- narrow: /^[1234]/i,
49755
- abbreviated: /^q[1234]/i,
49756
- wide: /^[1234](th|st|nd|rd)? quarter/i
49757
- };
49758
- var parseQuarterPatterns = {
49759
- any: [/1/i, /2/i, /3/i, /4/i]
49760
- };
49761
- var matchMonthPatterns = {
49762
- narrow: /^[jfmasond]/i,
49763
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
49764
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
49765
- };
49766
- var parseMonthPatterns = {
49767
- narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
49768
- any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
49769
- };
49770
- var matchDayPatterns = {
49771
- narrow: /^[smtwf]/i,
49772
- short: /^(su|mo|tu|we|th|fr|sa)/i,
49773
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
49774
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
49775
- };
49776
- var parseDayPatterns = {
49777
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
49778
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
49779
- };
49780
- var matchDayPeriodPatterns = {
49781
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
49782
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
49783
- };
49784
- var parseDayPeriodPatterns = {
49785
- any: {
49786
- am: /^a/i,
49787
- pm: /^p/i,
49788
- midnight: /^mi/i,
49789
- noon: /^no/i,
49790
- morning: /morning/i,
49791
- afternoon: /afternoon/i,
49792
- evening: /evening/i,
49793
- night: /night/i
49794
- }
49795
- };
49796
- var match = {
49797
- ordinalNumber: (0, _index.default)({
49798
- matchPattern: matchOrdinalNumberPattern,
49799
- parsePattern: parseOrdinalNumberPattern,
49800
- valueCallback: function (value) {
49801
- return parseInt(value, 10);
49557
+ /**
49558
+ * @param {Node} node - The DOM Node object to render
49559
+ * @param {Object} options - Rendering options, @see {@link toSvg}
49560
+ * @return {Promise} - A promise that is fulfilled with a Uint8Array containing RGBA pixel data.
49561
+ * */
49562
+ function toPixelData(node, options) {
49563
+ return draw(node, options || {}).then(function (canvas) {
49564
+ return canvas
49565
+ .getContext('2d')
49566
+ .getImageData(0, 0, util.width(node), util.height(node)).data;
49567
+ });
49802
49568
  }
49803
- }),
49804
- era: (0, _index2.default)({
49805
- matchPatterns: matchEraPatterns,
49806
- defaultMatchWidth: 'wide',
49807
- parsePatterns: parseEraPatterns,
49808
- defaultParseWidth: 'any'
49809
- }),
49810
- quarter: (0, _index2.default)({
49811
- matchPatterns: matchQuarterPatterns,
49812
- defaultMatchWidth: 'wide',
49813
- parsePatterns: parseQuarterPatterns,
49814
- defaultParseWidth: 'any',
49815
- valueCallback: function (index) {
49816
- return index + 1;
49569
+ /**
49570
+ * @param {Node} node - The DOM Node object to render
49571
+ * @param {Object} options - Rendering options, @see {@link toSvg}
49572
+ * @return {Promise} - A promise that is fulfilled with a PNG image data URL
49573
+ * */
49574
+ function toPng(node, options) {
49575
+ return draw(node, options || {}).then(function (canvas) {
49576
+ return canvas.toDataURL();
49577
+ });
49817
49578
  }
49818
- }),
49819
- month: (0, _index2.default)({
49820
- matchPatterns: matchMonthPatterns,
49821
- defaultMatchWidth: 'wide',
49822
- parsePatterns: parseMonthPatterns,
49823
- defaultParseWidth: 'any'
49824
- }),
49825
- day: (0, _index2.default)({
49826
- matchPatterns: matchDayPatterns,
49827
- defaultMatchWidth: 'wide',
49828
- parsePatterns: parseDayPatterns,
49829
- defaultParseWidth: 'any'
49830
- }),
49831
- dayPeriod: (0, _index2.default)({
49832
- matchPatterns: matchDayPeriodPatterns,
49833
- defaultMatchWidth: 'any',
49834
- parsePatterns: parseDayPeriodPatterns,
49835
- defaultParseWidth: 'any'
49836
- })
49837
- };
49838
- var _default = match;
49839
- exports.default = _default;
49840
- module.exports = exports.default;
49841
-
49842
- /***/ }),
49843
-
49844
- /***/ "cdcd":
49845
- /***/ (function(module, exports, __webpack_require__) {
49846
-
49847
- var NATIVE_WEAK_MAP = __webpack_require__("7297");
49848
- var global = __webpack_require__("f498");
49849
- var isObject = __webpack_require__("7526");
49850
- var createNonEnumerableProperty = __webpack_require__("5b12");
49851
- var objectHas = __webpack_require__("f1a7");
49852
- var sharedKey = __webpack_require__("332c");
49853
- var hiddenKeys = __webpack_require__("d687");
49854
-
49855
- var WeakMap = global.WeakMap;
49856
- var set, get, has;
49857
-
49858
- var enforce = function (it) {
49859
- return has(it) ? get(it) : set(it, {});
49860
- };
49861
-
49862
- var getterFor = function (TYPE) {
49863
- return function (it) {
49864
- var state;
49865
- if (!isObject(it) || (state = get(it)).type !== TYPE) {
49866
- throw TypeError('Incompatible receiver, ' + TYPE + ' required');
49867
- } return state;
49868
- };
49869
- };
49870
-
49871
- if (NATIVE_WEAK_MAP) {
49872
- var store = new WeakMap();
49873
- var wmget = store.get;
49874
- var wmhas = store.has;
49875
- var wmset = store.set;
49876
- set = function (it, metadata) {
49877
- wmset.call(store, it, metadata);
49878
- return metadata;
49879
- };
49880
- get = function (it) {
49881
- return wmget.call(store, it) || {};
49882
- };
49883
- has = function (it) {
49884
- return wmhas.call(store, it);
49885
- };
49886
- } else {
49887
- var STATE = sharedKey('state');
49888
- hiddenKeys[STATE] = true;
49579
+ /**
49580
+ * @param {Node} node - The DOM Node object to render
49581
+ * @param {Object} options - Rendering options, @see {@link toSvg}
49582
+ * @return {Promise} - A promise that is fulfilled with a JPEG image data URL
49583
+ * */
49584
+ function toJpeg(node, options) {
49585
+ options = options || {};
49586
+ return draw(node, options).then(function (canvas) {
49587
+ return canvas.toDataURL('image/jpeg', options.quality || 1.0);
49588
+ });
49589
+ }
49590
+ /**
49591
+ * @param {Node} node - The DOM Node object to render
49592
+ * @param {Object} options - Rendering options, @see {@link toSvg}
49593
+ * @return {Promise} - A promise that is fulfilled with a PNG image blob
49594
+ * */
49595
+ function toBlob(node, options) {
49596
+ return draw(node, options || {}).then(util.canvasToBlob);
49597
+ }
49598
+ function copyOptions(options) {
49599
+ // Copy options to impl options for use in impl
49600
+ if (typeof options.imagePlaceholder === 'undefined') {
49601
+ domtoimage.impl.options.imagePlaceholder =
49602
+ defaultOptions.imagePlaceholder;
49603
+ }
49604
+ else {
49605
+ domtoimage.impl.options.imagePlaceholder = options.imagePlaceholder;
49606
+ }
49607
+ if (typeof options.cacheBust === 'undefined') {
49608
+ domtoimage.impl.options.cacheBust = defaultOptions.cacheBust;
49609
+ }
49610
+ else {
49611
+ domtoimage.impl.options.cacheBust = options.cacheBust;
49612
+ }
49613
+ }
49614
+ function draw(domNode, options) {
49615
+ return toSvg(domNode, options)
49616
+ .then(util.makeImage)
49617
+ .then(util.delay(100))
49618
+ .then(function (image) {
49619
+ var canvas = newCanvas(domNode);
49620
+ canvas.getContext('2d').drawImage(image, 0, 0);
49621
+ return canvas;
49622
+ });
49623
+ function newCanvas(domNode) {
49624
+ var canvas = document.createElement('canvas');
49625
+ canvas.width = options.width || util.width(domNode);
49626
+ canvas.height = options.height || util.height(domNode);
49627
+ if (options.bgcolor) {
49628
+ var ctx = canvas.getContext('2d');
49629
+ ctx.fillStyle = options.bgcolor;
49630
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
49631
+ }
49632
+ return canvas;
49633
+ }
49634
+ }
49635
+ function cloneNode(node, filter, root) {
49636
+ if (!root && filter && !filter(node))
49637
+ return Promise.resolve();
49638
+ return Promise.resolve(node)
49639
+ .then(makeNodeCopy)
49640
+ .then(function (clone) {
49641
+ return cloneChildren(node, clone, filter);
49642
+ })
49643
+ .then(function (clone) {
49644
+ return processClone(node, clone);
49645
+ });
49646
+ function makeNodeCopy(node) {
49647
+ if (node instanceof HTMLCanvasElement)
49648
+ return util.makeImage(node.toDataURL());
49649
+ return node.cloneNode(false);
49650
+ }
49651
+ function cloneChildren(original, clone, filter) {
49652
+ var children = original.childNodes;
49653
+ if (children.length === 0)
49654
+ return Promise.resolve(clone);
49655
+ return cloneChildrenInOrder(clone, util.asArray(children), filter).then(function () {
49656
+ return clone;
49657
+ });
49658
+ function cloneChildrenInOrder(parent, children, filter) {
49659
+ var done = Promise.resolve();
49660
+ children.forEach(function (child) {
49661
+ done = done
49662
+ .then(function () {
49663
+ return cloneNode(child, filter);
49664
+ })
49665
+ .then(function (childClone) {
49666
+ if (childClone)
49667
+ parent.appendChild(childClone);
49668
+ });
49669
+ });
49670
+ return done;
49671
+ }
49672
+ }
49673
+ function processClone(original, clone) {
49674
+ if (!(clone instanceof Element))
49675
+ return clone;
49676
+ return Promise.resolve()
49677
+ .then(cloneStyle)
49678
+ .then(clonePseudoElements)
49679
+ .then(copyUserInput)
49680
+ .then(fixSvg)
49681
+ .then(function () {
49682
+ return clone;
49683
+ });
49684
+ function cloneStyle() {
49685
+ copyStyle(window.getComputedStyle(original), clone.style);
49686
+ function copyStyle(source, target) {
49687
+ if (source.cssText)
49688
+ target.cssText = source.cssText;
49689
+ else
49690
+ copyProperties(source, target);
49691
+ function copyProperties(source, target) {
49692
+ util.asArray(source).forEach(function (name) {
49693
+ target.setProperty(name, source.getPropertyValue(name), source.getPropertyPriority(name));
49694
+ });
49695
+ }
49696
+ }
49697
+ }
49698
+ function clonePseudoElements() {
49699
+ [':before', ':after'].forEach(function (element) {
49700
+ clonePseudoElement(element);
49701
+ });
49702
+ function clonePseudoElement(element) {
49703
+ var style = window.getComputedStyle(original, element);
49704
+ var content = style.getPropertyValue('content');
49705
+ if (content === '' || content === 'none')
49706
+ return;
49707
+ var className = util.uid();
49708
+ clone.className = clone.className + ' ' + className;
49709
+ var styleElement = document.createElement('style');
49710
+ styleElement.appendChild(formatPseudoElementStyle(className, element, style));
49711
+ clone.appendChild(styleElement);
49712
+ function formatPseudoElementStyle(className, element, style) {
49713
+ var selector = '.' + className + ':' + element;
49714
+ var cssText = style.cssText
49715
+ ? formatCssText(style)
49716
+ : formatCssProperties(style);
49717
+ return document.createTextNode(selector + '{' + cssText + '}');
49718
+ function formatCssText(style) {
49719
+ var content = style.getPropertyValue('content');
49720
+ return style.cssText + ' content: ' + content + ';';
49721
+ }
49722
+ function formatCssProperties(style) {
49723
+ return (util
49724
+ .asArray(style)
49725
+ .map(formatProperty)
49726
+ .join('; ') + ';');
49727
+ function formatProperty(name) {
49728
+ return (name +
49729
+ ': ' +
49730
+ style.getPropertyValue(name) +
49731
+ (style.getPropertyPriority(name)
49732
+ ? ' !important'
49733
+ : ''));
49734
+ }
49735
+ }
49736
+ }
49737
+ }
49738
+ }
49739
+ function copyUserInput() {
49740
+ if (original instanceof HTMLTextAreaElement)
49741
+ clone.innerHTML = original.value;
49742
+ if (original instanceof HTMLInputElement)
49743
+ clone.setAttribute('value', original.value);
49744
+ }
49745
+ function fixSvg() {
49746
+ if (!(clone instanceof SVGElement))
49747
+ return;
49748
+ clone.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
49749
+ if (!(clone instanceof SVGRectElement))
49750
+ return;
49751
+ ['width', 'height'].forEach(function (attribute) {
49752
+ var value = clone.getAttribute(attribute);
49753
+ if (!value)
49754
+ return;
49755
+ clone.style.setProperty(attribute, value);
49756
+ });
49757
+ }
49758
+ }
49759
+ }
49760
+ function embedFonts(node) {
49761
+ return fontFaces.resolveAll().then(function (cssText) {
49762
+ var styleNode = document.createElement('style');
49763
+ node.appendChild(styleNode);
49764
+ styleNode.appendChild(document.createTextNode(cssText));
49765
+ return node;
49766
+ });
49767
+ }
49768
+ function inlineImages(node) {
49769
+ return images.inlineAll(node).then(function () {
49770
+ return node;
49771
+ });
49772
+ }
49773
+ function makeSvgDataUri(node, width, height) {
49774
+ return Promise.resolve(node)
49775
+ .then(function (node) {
49776
+ node.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');
49777
+ return new XMLSerializer().serializeToString(node);
49778
+ })
49779
+ .then(util.escapeXhtml)
49780
+ .then(function (xhtml) {
49781
+ return ('<foreignObject x="0" y="0" width="100%" height="100%">' +
49782
+ xhtml +
49783
+ '</foreignObject>');
49784
+ })
49785
+ .then(function (foreignObject) {
49786
+ return ('<svg xmlns="http://www.w3.org/2000/svg" width="' +
49787
+ width +
49788
+ '" height="' +
49789
+ height +
49790
+ '">' +
49791
+ foreignObject +
49792
+ '</svg>');
49793
+ })
49794
+ .then(function (svg) {
49795
+ return 'data:image/svg+xml;charset=utf-8,' + svg;
49796
+ });
49797
+ }
49798
+ function newUtil() {
49799
+ return {
49800
+ escape: escape,
49801
+ parseExtension: parseExtension,
49802
+ mimeType: mimeType,
49803
+ dataAsUrl: dataAsUrl,
49804
+ isDataUrl: isDataUrl,
49805
+ canvasToBlob: canvasToBlob,
49806
+ resolveUrl: resolveUrl,
49807
+ getAndEncode: getAndEncode,
49808
+ uid: uid(),
49809
+ delay: delay,
49810
+ asArray: asArray,
49811
+ escapeXhtml: escapeXhtml,
49812
+ makeImage: makeImage,
49813
+ width: width,
49814
+ height: height,
49815
+ };
49816
+ function mimes() {
49817
+ /*
49818
+ * Only WOFF and EOT mime types for fonts are 'real'
49819
+ * see http://www.iana.org/assignments/media-types/media-types.xhtml
49820
+ */
49821
+ var WOFF = 'application/font-woff';
49822
+ var JPEG = 'image/jpeg';
49823
+ return {
49824
+ woff: WOFF,
49825
+ woff2: WOFF,
49826
+ ttf: 'application/font-truetype',
49827
+ eot: 'application/vnd.ms-fontobject',
49828
+ png: 'image/png',
49829
+ jpg: JPEG,
49830
+ jpeg: JPEG,
49831
+ gif: 'image/gif',
49832
+ tiff: 'image/tiff',
49833
+ svg: 'image/svg+xml',
49834
+ };
49835
+ }
49836
+ function parseExtension(url) {
49837
+ var match = /\.([^\.\/]*?)$/g.exec(url);
49838
+ if (match)
49839
+ return match[1];
49840
+ else
49841
+ return '';
49842
+ }
49843
+ function mimeType(url) {
49844
+ var extension = parseExtension(url).toLowerCase();
49845
+ return mimes()[extension] || '';
49846
+ }
49847
+ function isDataUrl(url) {
49848
+ return url.search(/^(data:)/) !== -1;
49849
+ }
49850
+ function toBlob(canvas) {
49851
+ return new Promise(function (resolve) {
49852
+ var binaryString = window.atob(canvas.toDataURL().split(',')[1]);
49853
+ var length = binaryString.length;
49854
+ var binaryArray = new Uint8Array(length);
49855
+ for (var i = 0; i < length; i++)
49856
+ binaryArray[i] = binaryString.charCodeAt(i);
49857
+ resolve(new Blob([binaryArray], {
49858
+ type: 'image/png',
49859
+ }));
49860
+ });
49861
+ }
49862
+ function canvasToBlob(canvas) {
49863
+ if (canvas.toBlob)
49864
+ return new Promise(function (resolve) {
49865
+ canvas.toBlob(resolve);
49866
+ });
49867
+ return toBlob(canvas);
49868
+ }
49869
+ function resolveUrl(url, baseUrl) {
49870
+ var doc = document.implementation.createHTMLDocument();
49871
+ var base = doc.createElement('base');
49872
+ doc.head.appendChild(base);
49873
+ var a = doc.createElement('a');
49874
+ doc.body.appendChild(a);
49875
+ base.href = baseUrl;
49876
+ a.href = url;
49877
+ return a.href;
49878
+ }
49879
+ function uid() {
49880
+ var index = 0;
49881
+ return function () {
49882
+ return 'u' + fourRandomChars() + index++;
49883
+ function fourRandomChars() {
49884
+ /* see http://stackoverflow.com/a/6248722/2519373 */
49885
+ return ('0000' +
49886
+ ((Math.random() * Math.pow(36, 4)) << 0).toString(36)).slice(-4);
49887
+ }
49888
+ };
49889
+ }
49890
+ function makeImage(uri) {
49891
+ return new Promise(function (resolve, reject) {
49892
+ var image = new Image();
49893
+ image.onload = function () {
49894
+ resolve(image);
49895
+ };
49896
+ image.onerror = reject;
49897
+ image.src = uri;
49898
+ });
49899
+ }
49900
+ function getAndEncode(url) {
49901
+ var TIMEOUT = 30000;
49902
+ if (domtoimage.impl.options.cacheBust) {
49903
+ // Cache bypass so we dont have CORS issues with cached images
49904
+ // Source: https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache
49905
+ url += (/\?/.test(url) ? '&' : '?') + new Date().getTime();
49906
+ }
49907
+ return new Promise(function (resolve) {
49908
+ var request = new XMLHttpRequest();
49909
+ request.onreadystatechange = done;
49910
+ request.ontimeout = timeout;
49911
+ request.responseType = 'blob';
49912
+ request.timeout = TIMEOUT;
49913
+ request.open('GET', url, true);
49914
+ request.send();
49915
+ var placeholder;
49916
+ if (domtoimage.impl.options.imagePlaceholder) {
49917
+ var split = domtoimage.impl.options.imagePlaceholder.split(/,/);
49918
+ if (split && split[1]) {
49919
+ placeholder = split[1];
49920
+ }
49921
+ }
49922
+ function done() {
49923
+ if (request.readyState !== 4)
49924
+ return;
49925
+ if (request.status !== 200) {
49926
+ if (placeholder) {
49927
+ resolve(placeholder);
49928
+ }
49929
+ else {
49930
+ fail('cannot fetch resource: ' +
49931
+ url +
49932
+ ', status: ' +
49933
+ request.status);
49934
+ }
49935
+ return;
49936
+ }
49937
+ var encoder = new FileReader();
49938
+ encoder.onloadend = function () {
49939
+ var content = encoder.result.split(/,/)[1];
49940
+ resolve(content);
49941
+ };
49942
+ encoder.readAsDataURL(request.response);
49943
+ }
49944
+ function timeout() {
49945
+ if (placeholder) {
49946
+ resolve(placeholder);
49947
+ }
49948
+ else {
49949
+ fail('timeout of ' +
49950
+ TIMEOUT +
49951
+ 'ms occured while fetching resource: ' +
49952
+ url);
49953
+ }
49954
+ }
49955
+ function fail(message) {
49956
+ console.error(message);
49957
+ resolve('');
49958
+ }
49959
+ });
49960
+ }
49961
+ function dataAsUrl(content, type) {
49962
+ return 'data:' + type + ';base64,' + content;
49963
+ }
49964
+ function escape(string) {
49965
+ return string.replace(/([.*+?^${}()|\[\]\/\\])/g, '\\$1');
49966
+ }
49967
+ function delay(ms) {
49968
+ return function (arg) {
49969
+ return new Promise(function (resolve) {
49970
+ setTimeout(function () {
49971
+ resolve(arg);
49972
+ }, ms);
49973
+ });
49974
+ };
49975
+ }
49976
+ function asArray(arrayLike) {
49977
+ var array = [];
49978
+ var length = arrayLike.length;
49979
+ for (var i = 0; i < length; i++)
49980
+ array.push(arrayLike[i]);
49981
+ return array;
49982
+ }
49983
+ function escapeXhtml(string) {
49984
+ return string.replace(/#/g, '%23').replace(/\n/g, '%0A');
49985
+ }
49986
+ function width(node) {
49987
+ var leftBorder = px(node, 'border-left-width');
49988
+ var rightBorder = px(node, 'border-right-width');
49989
+ return node.scrollWidth + leftBorder + rightBorder;
49990
+ }
49991
+ function height(node) {
49992
+ var topBorder = px(node, 'border-top-width');
49993
+ var bottomBorder = px(node, 'border-bottom-width');
49994
+ return node.scrollHeight + topBorder + bottomBorder;
49995
+ }
49996
+ function px(node, styleProperty) {
49997
+ var value = window
49998
+ .getComputedStyle(node)
49999
+ .getPropertyValue(styleProperty);
50000
+ return parseFloat(value.replace('px', ''));
50001
+ }
50002
+ }
50003
+ function newInliner() {
50004
+ var URL_REGEX = /url\(['"]?([^'"]+?)['"]?\)/g;
50005
+ return {
50006
+ inlineAll: inlineAll,
50007
+ shouldProcess: shouldProcess,
50008
+ impl: {
50009
+ readUrls: readUrls,
50010
+ inline: inline,
50011
+ },
50012
+ };
50013
+ function shouldProcess(string) {
50014
+ return string.search(URL_REGEX) !== -1;
50015
+ }
50016
+ function readUrls(string) {
50017
+ var result = [];
50018
+ var match;
50019
+ while ((match = URL_REGEX.exec(string)) !== null) {
50020
+ result.push(match[1]);
50021
+ }
50022
+ return result.filter(function (url) {
50023
+ return !util.isDataUrl(url);
50024
+ });
50025
+ }
50026
+ function inline(string, url, baseUrl, get) {
50027
+ return Promise.resolve(url)
50028
+ .then(function (url) {
50029
+ return baseUrl ? util.resolveUrl(url, baseUrl) : url;
50030
+ })
50031
+ .then(get || util.getAndEncode)
50032
+ .then(function (data) {
50033
+ return util.dataAsUrl(data, util.mimeType(url));
50034
+ })
50035
+ .then(function (dataUrl) {
50036
+ return string.replace(urlAsRegex(url), '$1' + dataUrl + '$3');
50037
+ });
50038
+ function urlAsRegex(url) {
50039
+ return new RegExp('(url\\([\'"]?)(' + util.escape(url) + ')([\'"]?\\))', 'g');
50040
+ }
50041
+ }
50042
+ function inlineAll(string, baseUrl, get) {
50043
+ if (nothingToInline())
50044
+ return Promise.resolve(string);
50045
+ return Promise.resolve(string)
50046
+ .then(readUrls)
50047
+ .then(function (urls) {
50048
+ var done = Promise.resolve(string);
50049
+ urls.forEach(function (url) {
50050
+ done = done.then(function (string) {
50051
+ return inline(string, url, baseUrl, get);
50052
+ });
50053
+ });
50054
+ return done;
50055
+ });
50056
+ function nothingToInline() {
50057
+ return !shouldProcess(string);
50058
+ }
50059
+ }
50060
+ }
50061
+ function newFontFaces() {
50062
+ return {
50063
+ resolveAll: resolveAll,
50064
+ impl: {
50065
+ readAll: readAll,
50066
+ },
50067
+ };
50068
+ function resolveAll() {
50069
+ return readAll(document)
50070
+ .then(function (webFonts) {
50071
+ return Promise.all(webFonts.map(function (webFont) {
50072
+ return webFont.resolve();
50073
+ }));
50074
+ })
50075
+ .then(function (cssStrings) {
50076
+ return cssStrings.join('\n');
50077
+ });
50078
+ }
50079
+ function readAll() {
50080
+ return Promise.resolve(util.asArray(document.styleSheets))
50081
+ .then(getCssRules)
50082
+ .then(selectWebFontRules)
50083
+ .then(function (rules) {
50084
+ return rules.map(newWebFont);
50085
+ });
50086
+ function selectWebFontRules(cssRules) {
50087
+ return cssRules
50088
+ .filter(function (rule) {
50089
+ return rule.type === CSSRule.FONT_FACE_RULE;
50090
+ })
50091
+ .filter(function (rule) {
50092
+ return inliner.shouldProcess(rule.style.getPropertyValue('src'));
50093
+ });
50094
+ }
50095
+ function getCssRules(styleSheets) {
50096
+ var cssRules = [];
50097
+ styleSheets.forEach(function (sheet) {
50098
+ try {
50099
+ util.asArray(sheet.cssRules || []).forEach(cssRules.push.bind(cssRules));
50100
+ }
50101
+ catch (e) {
50102
+ console.log('Error while reading CSS rules from ' + sheet.href, e.toString());
50103
+ }
50104
+ });
50105
+ return cssRules;
50106
+ }
50107
+ function newWebFont(webFontRule) {
50108
+ return {
50109
+ resolve: function resolve() {
50110
+ var baseUrl = (webFontRule.parentStyleSheet || {}).href;
50111
+ return inliner.inlineAll(webFontRule.cssText, baseUrl);
50112
+ },
50113
+ src: function () {
50114
+ return webFontRule.style.getPropertyValue('src');
50115
+ },
50116
+ };
50117
+ }
50118
+ }
50119
+ }
50120
+ function newImages() {
50121
+ return {
50122
+ inlineAll: inlineAll,
50123
+ impl: {
50124
+ newImage: newImage,
50125
+ },
50126
+ };
50127
+ function newImage(element) {
50128
+ return {
50129
+ inline: inline,
50130
+ };
50131
+ function inline(get) {
50132
+ if (util.isDataUrl(element.src))
50133
+ return Promise.resolve();
50134
+ return Promise.resolve(element.src)
50135
+ .then(get || util.getAndEncode)
50136
+ .then(function (data) {
50137
+ return util.dataAsUrl(data, util.mimeType(element.src));
50138
+ })
50139
+ .then(function (dataUrl) {
50140
+ return new Promise(function (resolve, reject) {
50141
+ element.onload = resolve;
50142
+ element.onerror = reject;
50143
+ element.src = dataUrl;
50144
+ });
50145
+ });
50146
+ }
50147
+ }
50148
+ function inlineAll(node) {
50149
+ if (!(node instanceof Element))
50150
+ return Promise.resolve(node);
50151
+ return inlineBackground(node).then(function () {
50152
+ if (node instanceof HTMLImageElement)
50153
+ return newImage(node).inline();
50154
+ else
50155
+ return Promise.all(util.asArray(node.childNodes).map(function (child) {
50156
+ return inlineAll(child);
50157
+ }));
50158
+ });
50159
+ function inlineBackground(node) {
50160
+ var background = node.style.getPropertyValue('background');
50161
+ if (!background)
50162
+ return Promise.resolve(node);
50163
+ return inliner
50164
+ .inlineAll(background)
50165
+ .then(function (inlined) {
50166
+ node.style.setProperty('background', inlined, node.style.getPropertyPriority('background'));
50167
+ })
50168
+ .then(function () {
50169
+ return node;
50170
+ });
50171
+ }
50172
+ }
50173
+ }
50174
+ })(this);
50175
+ //# sourceMappingURL=../../../src/services/essentials/dom-to-image.js.map
50176
+
50177
+ /***/ }),
50178
+
50179
+ /***/ "b489":
50180
+ /***/ (function(module, exports, __webpack_require__) {
50181
+
50182
+ "use strict";
50183
+
50184
+
50185
+ Object.defineProperty(exports, "__esModule", {
50186
+ value: true
50187
+ });
50188
+ exports.default = buildLocalizeFn;
50189
+
50190
+ function buildLocalizeFn(args) {
50191
+ return function (dirtyIndex, dirtyOptions) {
50192
+ var options = dirtyOptions || {};
50193
+ var context = options.context ? String(options.context) : 'standalone';
50194
+ var valuesArray;
50195
+
50196
+ if (context === 'formatting' && args.formattingValues) {
50197
+ var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
50198
+ var width = options.width ? String(options.width) : defaultWidth;
50199
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
50200
+ } else {
50201
+ var _defaultWidth = args.defaultWidth;
50202
+
50203
+ var _width = options.width ? String(options.width) : args.defaultWidth;
50204
+
50205
+ valuesArray = args.values[_width] || args.values[_defaultWidth];
50206
+ }
50207
+
50208
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
50209
+ return valuesArray[index];
50210
+ };
50211
+ }
50212
+
50213
+ module.exports = exports.default;
50214
+
50215
+ /***/ }),
50216
+
50217
+ /***/ "b495":
50218
+ /***/ (function(module, exports, __webpack_require__) {
50219
+
50220
+ var toInteger = __webpack_require__("8bb2");
50221
+
50222
+ var min = Math.min;
50223
+
50224
+ // `ToLength` abstract operation
50225
+ // https://tc39.github.io/ecma262/#sec-tolength
50226
+ module.exports = function (argument) {
50227
+ return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
50228
+ };
50229
+
50230
+
50231
+ /***/ }),
50232
+
50233
+ /***/ "b634":
50234
+ /***/ (function(module, exports, __webpack_require__) {
50235
+
50236
+ var has = __webpack_require__("f1a7");
50237
+ var ownKeys = __webpack_require__("a03e");
50238
+ var getOwnPropertyDescriptorModule = __webpack_require__("185a");
50239
+ var definePropertyModule = __webpack_require__("abdf");
50240
+
50241
+ module.exports = function (target, source) {
50242
+ var keys = ownKeys(source);
50243
+ var defineProperty = definePropertyModule.f;
50244
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
50245
+ for (var i = 0; i < keys.length; i++) {
50246
+ var key = keys[i];
50247
+ if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
50248
+ }
50249
+ };
50250
+
50251
+
50252
+ /***/ }),
50253
+
50254
+ /***/ "b7fb":
50255
+ /***/ (function(module, exports, __webpack_require__) {
50256
+
50257
+ var toInteger = __webpack_require__("8bb2");
50258
+ var requireObjectCoercible = __webpack_require__("730c");
50259
+
50260
+ // `String.prototype.{ codePointAt, at }` methods implementation
50261
+ var createMethod = function (CONVERT_TO_STRING) {
50262
+ return function ($this, pos) {
50263
+ var S = String(requireObjectCoercible($this));
50264
+ var position = toInteger(pos);
50265
+ var size = S.length;
50266
+ var first, second;
50267
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
50268
+ first = S.charCodeAt(position);
50269
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size
50270
+ || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
50271
+ ? CONVERT_TO_STRING ? S.charAt(position) : first
50272
+ : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
50273
+ };
50274
+ };
50275
+
50276
+ module.exports = {
50277
+ // `String.prototype.codePointAt` method
50278
+ // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
50279
+ codeAt: createMethod(false),
50280
+ // `String.prototype.at` method
50281
+ // https://github.com/mathiasbynens/String.prototype.at
50282
+ charAt: createMethod(true)
50283
+ };
50284
+
50285
+
50286
+ /***/ }),
50287
+
50288
+ /***/ "b8ba":
50289
+ /***/ (function(module, exports, __webpack_require__) {
50290
+
50291
+ var global = __webpack_require__("f498");
50292
+ var createNonEnumerableProperty = __webpack_require__("5b12");
50293
+ var has = __webpack_require__("f1a7");
50294
+ var setGlobal = __webpack_require__("3e34");
50295
+ var inspectSource = __webpack_require__("df6f");
50296
+ var InternalStateModule = __webpack_require__("cdcd");
50297
+
50298
+ var getInternalState = InternalStateModule.get;
50299
+ var enforceInternalState = InternalStateModule.enforce;
50300
+ var TEMPLATE = String(String).split('String');
50301
+
50302
+ (module.exports = function (O, key, value, options) {
50303
+ var unsafe = options ? !!options.unsafe : false;
50304
+ var simple = options ? !!options.enumerable : false;
50305
+ var noTargetGet = options ? !!options.noTargetGet : false;
50306
+ if (typeof value == 'function') {
50307
+ if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
50308
+ enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
50309
+ }
50310
+ if (O === global) {
50311
+ if (simple) O[key] = value;
50312
+ else setGlobal(key, value);
50313
+ return;
50314
+ } else if (!unsafe) {
50315
+ delete O[key];
50316
+ } else if (!noTargetGet && O[key]) {
50317
+ simple = true;
50318
+ }
50319
+ if (simple) O[key] = value;
50320
+ else createNonEnumerableProperty(O, key, value);
50321
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
50322
+ })(Function.prototype, 'toString', function toString() {
50323
+ return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
50324
+ });
50325
+
50326
+
50327
+ /***/ }),
50328
+
50329
+ /***/ "b99b":
50330
+ /***/ (function(module, exports, __webpack_require__) {
50331
+
50332
+ var DESCRIPTORS = __webpack_require__("d4cb");
50333
+ var definePropertyModule = __webpack_require__("abdf");
50334
+ var anObject = __webpack_require__("157c");
50335
+ var objectKeys = __webpack_require__("0c47");
50336
+
50337
+ // `Object.defineProperties` method
50338
+ // https://tc39.github.io/ecma262/#sec-object.defineproperties
50339
+ module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
50340
+ anObject(O);
50341
+ var keys = objectKeys(Properties);
50342
+ var length = keys.length;
50343
+ var index = 0;
50344
+ var key;
50345
+ while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
50346
+ return O;
50347
+ };
50348
+
50349
+
50350
+ /***/ }),
50351
+
50352
+ /***/ "c1a2":
50353
+ /***/ (function(module, exports, __webpack_require__) {
50354
+
50355
+ var anObject = __webpack_require__("157c");
50356
+ var aPossiblePrototype = __webpack_require__("f3e4");
50357
+
50358
+ // `Object.setPrototypeOf` method
50359
+ // https://tc39.github.io/ecma262/#sec-object.setprototypeof
50360
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
50361
+ /* eslint-disable no-proto */
50362
+ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
50363
+ var CORRECT_SETTER = false;
50364
+ var test = {};
50365
+ var setter;
50366
+ try {
50367
+ setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
50368
+ setter.call(test, []);
50369
+ CORRECT_SETTER = test instanceof Array;
50370
+ } catch (error) { /* empty */ }
50371
+ return function setPrototypeOf(O, proto) {
50372
+ anObject(O);
50373
+ aPossiblePrototype(proto);
50374
+ if (CORRECT_SETTER) setter.call(O, proto);
50375
+ else O.__proto__ = proto;
50376
+ return O;
50377
+ };
50378
+ }() : undefined);
50379
+
50380
+
50381
+ /***/ }),
50382
+
50383
+ /***/ "c607":
50384
+ /***/ (function(module, exports, __webpack_require__) {
50385
+
50386
+ var global = __webpack_require__("f498");
50387
+ var setGlobal = __webpack_require__("3e34");
50388
+
50389
+ var SHARED = '__core-js_shared__';
50390
+ var store = global[SHARED] || setGlobal(SHARED, {});
50391
+
50392
+ module.exports = store;
50393
+
50394
+
50395
+ /***/ }),
50396
+
50397
+ /***/ "c6de":
50398
+ /***/ (function(module, exports, __webpack_require__) {
50399
+
50400
+ var classof = __webpack_require__("6a61");
50401
+
50402
+ // `IsArray` abstract operation
50403
+ // https://tc39.github.io/ecma262/#sec-isarray
50404
+ module.exports = Array.isArray || function isArray(arg) {
50405
+ return classof(arg) == 'Array';
50406
+ };
50407
+
50408
+
50409
+ /***/ }),
50410
+
50411
+ /***/ "c78b":
50412
+ /***/ (function(module, exports, __webpack_require__) {
50413
+
50414
+ "use strict";
50415
+
50416
+ var $ = __webpack_require__("6b1d");
50417
+ var notARegExp = __webpack_require__("9eea");
50418
+ var requireObjectCoercible = __webpack_require__("730c");
50419
+ var correctIsRegExpLogic = __webpack_require__("3e32");
50420
+
50421
+ // `String.prototype.includes` method
50422
+ // https://tc39.github.io/ecma262/#sec-string.prototype.includes
50423
+ $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
50424
+ includes: function includes(searchString /* , position = 0 */) {
50425
+ return !!~String(requireObjectCoercible(this))
50426
+ .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
50427
+ }
50428
+ });
50429
+
50430
+
50431
+ /***/ }),
50432
+
50433
+ /***/ "c91c":
50434
+ /***/ (function(module, exports, __webpack_require__) {
50435
+
50436
+ var has = __webpack_require__("f1a7");
50437
+ var toIndexedObject = __webpack_require__("378c");
50438
+ var indexOf = __webpack_require__("1f5e").indexOf;
50439
+ var hiddenKeys = __webpack_require__("d687");
50440
+
50441
+ module.exports = function (object, names) {
50442
+ var O = toIndexedObject(object);
50443
+ var i = 0;
50444
+ var result = [];
50445
+ var key;
50446
+ for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
50447
+ // Don't enum bug & hidden keys
50448
+ while (names.length > i) if (has(O, key = names[i++])) {
50449
+ ~indexOf(result, key) || result.push(key);
50450
+ }
50451
+ return result;
50452
+ };
50453
+
50454
+
50455
+ /***/ }),
50456
+
50457
+ /***/ "c9c9":
50458
+ /***/ (function(module, exports, __webpack_require__) {
50459
+
50460
+ "use strict";
50461
+
50462
+
50463
+ Object.defineProperty(exports, "__esModule", {
50464
+ value: true
50465
+ });
50466
+ exports.default = void 0;
50467
+
50468
+ var _index = _interopRequireDefault(__webpack_require__("5ae7"));
50469
+
50470
+ var _index2 = _interopRequireDefault(__webpack_require__("3606"));
50471
+
50472
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50473
+
50474
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
50475
+ var parseOrdinalNumberPattern = /\d+/i;
50476
+ var matchEraPatterns = {
50477
+ narrow: /^(b|a)/i,
50478
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
50479
+ wide: /^(before christ|before common era|anno domini|common era)/i
50480
+ };
50481
+ var parseEraPatterns = {
50482
+ any: [/^b/i, /^(a|c)/i]
50483
+ };
50484
+ var matchQuarterPatterns = {
50485
+ narrow: /^[1234]/i,
50486
+ abbreviated: /^q[1234]/i,
50487
+ wide: /^[1234](th|st|nd|rd)? quarter/i
50488
+ };
50489
+ var parseQuarterPatterns = {
50490
+ any: [/1/i, /2/i, /3/i, /4/i]
50491
+ };
50492
+ var matchMonthPatterns = {
50493
+ narrow: /^[jfmasond]/i,
50494
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
50495
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
50496
+ };
50497
+ var parseMonthPatterns = {
50498
+ narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
50499
+ any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
50500
+ };
50501
+ var matchDayPatterns = {
50502
+ narrow: /^[smtwf]/i,
50503
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
50504
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
50505
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
50506
+ };
50507
+ var parseDayPatterns = {
50508
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
50509
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
50510
+ };
50511
+ var matchDayPeriodPatterns = {
50512
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
50513
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
50514
+ };
50515
+ var parseDayPeriodPatterns = {
50516
+ any: {
50517
+ am: /^a/i,
50518
+ pm: /^p/i,
50519
+ midnight: /^mi/i,
50520
+ noon: /^no/i,
50521
+ morning: /morning/i,
50522
+ afternoon: /afternoon/i,
50523
+ evening: /evening/i,
50524
+ night: /night/i
50525
+ }
50526
+ };
50527
+ var match = {
50528
+ ordinalNumber: (0, _index.default)({
50529
+ matchPattern: matchOrdinalNumberPattern,
50530
+ parsePattern: parseOrdinalNumberPattern,
50531
+ valueCallback: function (value) {
50532
+ return parseInt(value, 10);
50533
+ }
50534
+ }),
50535
+ era: (0, _index2.default)({
50536
+ matchPatterns: matchEraPatterns,
50537
+ defaultMatchWidth: 'wide',
50538
+ parsePatterns: parseEraPatterns,
50539
+ defaultParseWidth: 'any'
50540
+ }),
50541
+ quarter: (0, _index2.default)({
50542
+ matchPatterns: matchQuarterPatterns,
50543
+ defaultMatchWidth: 'wide',
50544
+ parsePatterns: parseQuarterPatterns,
50545
+ defaultParseWidth: 'any',
50546
+ valueCallback: function (index) {
50547
+ return index + 1;
50548
+ }
50549
+ }),
50550
+ month: (0, _index2.default)({
50551
+ matchPatterns: matchMonthPatterns,
50552
+ defaultMatchWidth: 'wide',
50553
+ parsePatterns: parseMonthPatterns,
50554
+ defaultParseWidth: 'any'
50555
+ }),
50556
+ day: (0, _index2.default)({
50557
+ matchPatterns: matchDayPatterns,
50558
+ defaultMatchWidth: 'wide',
50559
+ parsePatterns: parseDayPatterns,
50560
+ defaultParseWidth: 'any'
50561
+ }),
50562
+ dayPeriod: (0, _index2.default)({
50563
+ matchPatterns: matchDayPeriodPatterns,
50564
+ defaultMatchWidth: 'any',
50565
+ parsePatterns: parseDayPeriodPatterns,
50566
+ defaultParseWidth: 'any'
50567
+ })
50568
+ };
50569
+ var _default = match;
50570
+ exports.default = _default;
50571
+ module.exports = exports.default;
50572
+
50573
+ /***/ }),
50574
+
50575
+ /***/ "cdcd":
50576
+ /***/ (function(module, exports, __webpack_require__) {
50577
+
50578
+ var NATIVE_WEAK_MAP = __webpack_require__("7297");
50579
+ var global = __webpack_require__("f498");
50580
+ var isObject = __webpack_require__("7526");
50581
+ var createNonEnumerableProperty = __webpack_require__("5b12");
50582
+ var objectHas = __webpack_require__("f1a7");
50583
+ var sharedKey = __webpack_require__("332c");
50584
+ var hiddenKeys = __webpack_require__("d687");
50585
+
50586
+ var WeakMap = global.WeakMap;
50587
+ var set, get, has;
50588
+
50589
+ var enforce = function (it) {
50590
+ return has(it) ? get(it) : set(it, {});
50591
+ };
50592
+
50593
+ var getterFor = function (TYPE) {
50594
+ return function (it) {
50595
+ var state;
50596
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
50597
+ throw TypeError('Incompatible receiver, ' + TYPE + ' required');
50598
+ } return state;
50599
+ };
50600
+ };
50601
+
50602
+ if (NATIVE_WEAK_MAP) {
50603
+ var store = new WeakMap();
50604
+ var wmget = store.get;
50605
+ var wmhas = store.has;
50606
+ var wmset = store.set;
50607
+ set = function (it, metadata) {
50608
+ wmset.call(store, it, metadata);
50609
+ return metadata;
50610
+ };
50611
+ get = function (it) {
50612
+ return wmget.call(store, it) || {};
50613
+ };
50614
+ has = function (it) {
50615
+ return wmhas.call(store, it);
50616
+ };
50617
+ } else {
50618
+ var STATE = sharedKey('state');
50619
+ hiddenKeys[STATE] = true;
49889
50620
  set = function (it, metadata) {
49890
50621
  createNonEnumerableProperty(it, STATE, metadata);
49891
50622
  return metadata;
@@ -50310,1039 +51041,263 @@ $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymb
50310
51041
  });
50311
51042
 
50312
51043
  // `JSON.stringify` method behavior with symbols
50313
- // https://tc39.github.io/ecma262/#sec-json.stringify
50314
- if ($stringify) {
50315
- var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
50316
- var symbol = $Symbol();
50317
- // MS Edge converts symbol values to JSON as {}
50318
- return $stringify([symbol]) != '[null]'
50319
- // WebKit converts symbol values to JSON as null
50320
- || $stringify({ a: symbol }) != '{}'
50321
- // V8 throws on boxed symbols
50322
- || $stringify(Object(symbol)) != '{}';
50323
- });
50324
-
50325
- $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
50326
- // eslint-disable-next-line no-unused-vars
50327
- stringify: function stringify(it, replacer, space) {
50328
- var args = [it];
50329
- var index = 1;
50330
- var $replacer;
50331
- while (arguments.length > index) args.push(arguments[index++]);
50332
- $replacer = replacer;
50333
- if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
50334
- if (!isArray(replacer)) replacer = function (key, value) {
50335
- if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
50336
- if (!isSymbol(value)) return value;
50337
- };
50338
- args[1] = replacer;
50339
- return $stringify.apply(null, args);
50340
- }
50341
- });
50342
- }
50343
-
50344
- // `Symbol.prototype[@@toPrimitive]` method
50345
- // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
50346
- if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
50347
- createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
50348
- }
50349
- // `Symbol.prototype[@@toStringTag]` property
50350
- // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
50351
- setToStringTag($Symbol, SYMBOL);
50352
-
50353
- hiddenKeys[HIDDEN] = true;
50354
-
50355
-
50356
- /***/ }),
50357
-
50358
- /***/ "d6f0":
50359
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
50360
-
50361
- "use strict";
50362
- /* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7f0d");
50363
-
50364
-
50365
- /** Detect free variable `exports`. */
50366
- var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
50367
-
50368
- /** Detect free variable `module`. */
50369
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
50370
-
50371
- /** Detect the popular CommonJS extension `module.exports`. */
50372
- var moduleExports = freeModule && freeModule.exports === freeExports;
50373
-
50374
- /** Built-in value references. */
50375
- var Buffer = moduleExports ? _root_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Buffer : undefined,
50376
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
50377
-
50378
- /**
50379
- * Creates a clone of `buffer`.
50380
- *
50381
- * @private
50382
- * @param {Buffer} buffer The buffer to clone.
50383
- * @param {boolean} [isDeep] Specify a deep clone.
50384
- * @returns {Buffer} Returns the cloned buffer.
50385
- */
50386
- function cloneBuffer(buffer, isDeep) {
50387
- if (isDeep) {
50388
- return buffer.slice();
50389
- }
50390
- var length = buffer.length,
50391
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
50392
-
50393
- buffer.copy(result);
50394
- return result;
50395
- }
50396
-
50397
- /* harmony default export */ __webpack_exports__["a"] = (cloneBuffer);
50398
-
50399
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("7326")(module)))
50400
-
50401
- /***/ }),
50402
-
50403
- /***/ "da06":
50404
- /***/ (function(module, exports, __webpack_require__) {
50405
-
50406
- var TO_STRING_TAG_SUPPORT = __webpack_require__("3cec");
50407
- var classofRaw = __webpack_require__("6a61");
50408
- var wellKnownSymbol = __webpack_require__("7d53");
50409
-
50410
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
50411
- // ES3 wrong here
50412
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
50413
-
50414
- // fallback for IE11 Script Access Denied error
50415
- var tryGet = function (it, key) {
50416
- try {
50417
- return it[key];
50418
- } catch (error) { /* empty */ }
50419
- };
50420
-
50421
- // getting tag from ES6+ `Object.prototype.toString`
50422
- module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
50423
- var O, tag, result;
50424
- return it === undefined ? 'Undefined' : it === null ? 'Null'
50425
- // @@toStringTag case
50426
- : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
50427
- // builtinTag case
50428
- : CORRECT_ARGUMENTS ? classofRaw(O)
50429
- // ES3 arguments fallback
50430
- : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
50431
- };
50432
-
50433
-
50434
- /***/ }),
50435
-
50436
- /***/ "df6f":
50437
- /***/ (function(module, exports, __webpack_require__) {
50438
-
50439
- var store = __webpack_require__("c607");
50440
-
50441
- var functionToString = Function.toString;
50442
-
50443
- // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
50444
- if (typeof store.inspectSource != 'function') {
50445
- store.inspectSource = function (it) {
50446
- return functionToString.call(it);
50447
- };
50448
- }
50449
-
50450
- module.exports = store.inspectSource;
50451
-
50452
-
50453
- /***/ }),
50454
-
50455
- /***/ "e129":
50456
- /***/ (function(module, exports, __webpack_require__) {
50457
-
50458
- "use strict";
50459
-
50460
- var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
50461
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
50462
-
50463
- // Nashorn ~ JDK8 bug
50464
- var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
50465
-
50466
- // `Object.prototype.propertyIsEnumerable` method implementation
50467
- // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
50468
- exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
50469
- var descriptor = getOwnPropertyDescriptor(this, V);
50470
- return !!descriptor && descriptor.enumerable;
50471
- } : nativePropertyIsEnumerable;
50472
-
50473
-
50474
- /***/ }),
50475
-
50476
- /***/ "e7a0":
50477
- /***/ (function(module, exports, __webpack_require__) {
50478
-
50479
- var fails = __webpack_require__("72df");
50480
-
50481
- module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
50482
- // Chrome 38 Symbol has incorrect toString conversion
50483
- // eslint-disable-next-line no-undef
50484
- return !String(Symbol());
50485
- });
50486
-
50487
-
50488
- /***/ }),
50489
-
50490
- /***/ "ebac":
50491
- /***/ (function(module, exports, __webpack_require__) {
50492
-
50493
- var fails = __webpack_require__("72df");
50494
-
50495
- var replacement = /#|\.prototype\./;
50496
-
50497
- var isForced = function (feature, detection) {
50498
- var value = data[normalize(feature)];
50499
- return value == POLYFILL ? true
50500
- : value == NATIVE ? false
50501
- : typeof detection == 'function' ? fails(detection)
50502
- : !!detection;
50503
- };
50504
-
50505
- var normalize = isForced.normalize = function (string) {
50506
- return String(string).replace(replacement, '.').toLowerCase();
50507
- };
50508
-
50509
- var data = isForced.data = {};
50510
- var NATIVE = isForced.NATIVE = 'N';
50511
- var POLYFILL = isForced.POLYFILL = 'P';
50512
-
50513
- module.exports = isForced;
50514
-
50515
-
50516
- /***/ }),
50517
-
50518
- /***/ "ed2b":
50519
- /***/ (function(module, exports, __webpack_require__) {
50520
-
50521
- var wellKnownSymbol = __webpack_require__("7d53");
50522
- var create = __webpack_require__("82e8");
50523
- var definePropertyModule = __webpack_require__("abdf");
50524
-
50525
- var UNSCOPABLES = wellKnownSymbol('unscopables');
50526
- var ArrayPrototype = Array.prototype;
50527
-
50528
- // Array.prototype[@@unscopables]
50529
- // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
50530
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
50531
- definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
50532
- configurable: true,
50533
- value: create(null)
50534
- });
50535
- }
50536
-
50537
- // add a key to Array.prototype[@@unscopables]
50538
- module.exports = function (key) {
50539
- ArrayPrototype[UNSCOPABLES][key] = true;
50540
- };
50541
-
50542
-
50543
- /***/ }),
50544
-
50545
- /***/ "ee58":
50546
- /***/ (function(module, exports, __webpack_require__) {
50547
-
50548
- var toIndexedObject = __webpack_require__("378c");
50549
- var nativeGetOwnPropertyNames = __webpack_require__("65d0").f;
50550
-
50551
- var toString = {}.toString;
50552
-
50553
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
50554
- ? Object.getOwnPropertyNames(window) : [];
50555
-
50556
- var getWindowNames = function (it) {
50557
- try {
50558
- return nativeGetOwnPropertyNames(it);
50559
- } catch (error) {
50560
- return windowNames.slice();
50561
- }
50562
- };
50563
-
50564
- // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
50565
- module.exports.f = function getOwnPropertyNames(it) {
50566
- return windowNames && toString.call(it) == '[object Window]'
50567
- ? getWindowNames(it)
50568
- : nativeGetOwnPropertyNames(toIndexedObject(it));
50569
- };
50570
-
50571
-
50572
- /***/ }),
50573
-
50574
- /***/ "eeea":
50575
- /***/ (function(module, exports, __webpack_require__) {
50576
-
50577
- (function (global) {
50578
- 'use strict';
50579
-
50580
- var util = newUtil();
50581
- var inliner = newInliner();
50582
- var fontFaces = newFontFaces();
50583
- var images = newImages();
50584
-
50585
- // Default impl options
50586
- var defaultOptions = {
50587
- // Default is to fail on error, no placeholder
50588
- imagePlaceholder: undefined,
50589
- // Default cache bust is false, it will use the cache
50590
- cacheBust: false
50591
- };
50592
-
50593
- var domtoimage = {
50594
- toSvg: toSvg,
50595
- toPng: toPng,
50596
- toJpeg: toJpeg,
50597
- toBlob: toBlob,
50598
- toPixelData: toPixelData,
50599
- impl: {
50600
- fontFaces: fontFaces,
50601
- images: images,
50602
- util: util,
50603
- inliner: inliner,
50604
- options: {}
50605
- }
50606
- };
50607
-
50608
- if (true)
50609
- module.exports = domtoimage;
50610
- else
50611
- {}
50612
-
50613
-
50614
- /**
50615
- * @param {Node} node - The DOM Node object to render
50616
- * @param {Object} options - Rendering options
50617
- * @param {Function} options.filter - Should return true if passed node should be included in the output
50618
- * (excluding node means excluding it's children as well). Not called on the root node.
50619
- * @param {String} options.bgcolor - color for the background, any valid CSS color value.
50620
- * @param {Number} options.width - width to be applied to node before rendering.
50621
- * @param {Number} options.height - height to be applied to node before rendering.
50622
- * @param {Object} options.style - an object whose properties to be copied to node's style before rendering.
50623
- * @param {Number} options.quality - a Number between 0 and 1 indicating image quality (applicable to JPEG only),
50624
- defaults to 1.0.
50625
- * @param {String} options.imagePlaceholder - dataURL to use as a placeholder for failed images, default behaviour is to fail fast on images we can't fetch
50626
- * @param {Boolean} options.cacheBust - set to true to cache bust by appending the time to the request url
50627
- * @return {Promise} - A promise that is fulfilled with a SVG image data URL
50628
- * */
50629
- function toSvg(node, options) {
50630
- options = options || {};
50631
- copyOptions(options);
50632
- return Promise.resolve(node)
50633
- .then(function (node) {
50634
- return cloneNode(node, options.filter, true);
50635
- })
50636
- .then(embedFonts)
50637
- .then(inlineImages)
50638
- .then(applyOptions)
50639
- .then(function (clone) {
50640
- return makeSvgDataUri(clone,
50641
- options.width || util.width(node),
50642
- options.height || util.height(node)
50643
- );
50644
- });
50645
-
50646
- function applyOptions(clone) {
50647
- if (options.bgcolor) clone.style.backgroundColor = options.bgcolor;
50648
-
50649
- if (options.width) clone.style.width = options.width + 'px';
50650
- if (options.height) clone.style.height = options.height + 'px';
50651
-
50652
- if (options.style)
50653
- Object.keys(options.style).forEach(function (property) {
50654
- clone.style[property] = options.style[property];
50655
- });
50656
-
50657
- return clone;
50658
- }
50659
- }
50660
-
50661
- /**
50662
- * @param {Node} node - The DOM Node object to render
50663
- * @param {Object} options - Rendering options, @see {@link toSvg}
50664
- * @return {Promise} - A promise that is fulfilled with a Uint8Array containing RGBA pixel data.
50665
- * */
50666
- function toPixelData(node, options) {
50667
- return draw(node, options || {})
50668
- .then(function (canvas) {
50669
- return canvas.getContext('2d').getImageData(
50670
- 0,
50671
- 0,
50672
- util.width(node),
50673
- util.height(node)
50674
- ).data;
50675
- });
50676
- }
50677
-
50678
- /**
50679
- * @param {Node} node - The DOM Node object to render
50680
- * @param {Object} options - Rendering options, @see {@link toSvg}
50681
- * @return {Promise} - A promise that is fulfilled with a PNG image data URL
50682
- * */
50683
- function toPng(node, options) {
50684
- return draw(node, options || {})
50685
- .then(function (canvas) {
50686
- return canvas.toDataURL();
50687
- });
50688
- }
50689
-
50690
- /**
50691
- * @param {Node} node - The DOM Node object to render
50692
- * @param {Object} options - Rendering options, @see {@link toSvg}
50693
- * @return {Promise} - A promise that is fulfilled with a JPEG image data URL
50694
- * */
50695
- function toJpeg(node, options) {
50696
- options = options || {};
50697
- return draw(node, options)
50698
- .then(function (canvas) {
50699
- return canvas.toDataURL('image/jpeg', options.quality || 1.0);
50700
- });
50701
- }
50702
-
50703
- /**
50704
- * @param {Node} node - The DOM Node object to render
50705
- * @param {Object} options - Rendering options, @see {@link toSvg}
50706
- * @return {Promise} - A promise that is fulfilled with a PNG image blob
50707
- * */
50708
- function toBlob(node, options) {
50709
- return draw(node, options || {})
50710
- .then(util.canvasToBlob);
50711
- }
50712
-
50713
- function copyOptions(options) {
50714
- // Copy options to impl options for use in impl
50715
- if(typeof(options.imagePlaceholder) === 'undefined') {
50716
- domtoimage.impl.options.imagePlaceholder = defaultOptions.imagePlaceholder;
50717
- } else {
50718
- domtoimage.impl.options.imagePlaceholder = options.imagePlaceholder;
50719
- }
50720
-
50721
- if(typeof(options.cacheBust) === 'undefined') {
50722
- domtoimage.impl.options.cacheBust = defaultOptions.cacheBust;
50723
- } else {
50724
- domtoimage.impl.options.cacheBust = options.cacheBust;
50725
- }
50726
- }
50727
-
50728
- function draw(domNode, options) {
50729
- return toSvg(domNode, options)
50730
- .then(util.makeImage)
50731
- .then(util.delay(100))
50732
- .then(function (image) {
50733
- var canvas = newCanvas(domNode);
50734
- canvas.getContext('2d').drawImage(image, 0, 0);
50735
- return canvas;
50736
- });
50737
-
50738
- function newCanvas(domNode) {
50739
- var canvas = document.createElement('canvas');
50740
- canvas.width = options.width || util.width(domNode);
50741
- canvas.height = options.height || util.height(domNode);
50742
-
50743
- if (options.bgcolor) {
50744
- var ctx = canvas.getContext('2d');
50745
- ctx.fillStyle = options.bgcolor;
50746
- ctx.fillRect(0, 0, canvas.width, canvas.height);
50747
- }
50748
-
50749
- return canvas;
50750
- }
50751
- }
50752
-
50753
- function cloneNode(node, filter, root) {
50754
- if (!root && filter && !filter(node)) return Promise.resolve();
50755
-
50756
- return Promise.resolve(node)
50757
- .then(makeNodeCopy)
50758
- .then(function (clone) {
50759
- return cloneChildren(node, clone, filter);
50760
- })
50761
- .then(function (clone) {
50762
- return processClone(node, clone);
50763
- });
50764
-
50765
- function makeNodeCopy(node) {
50766
- if (node instanceof HTMLCanvasElement) return util.makeImage(node.toDataURL());
50767
- return node.cloneNode(false);
50768
- }
50769
-
50770
- function cloneChildren(original, clone, filter) {
50771
- var children = original.childNodes;
50772
- if (children.length === 0) return Promise.resolve(clone);
50773
-
50774
- return cloneChildrenInOrder(clone, util.asArray(children), filter)
50775
- .then(function () {
50776
- return clone;
50777
- });
50778
-
50779
- function cloneChildrenInOrder(parent, children, filter) {
50780
- var done = Promise.resolve();
50781
- children.forEach(function (child) {
50782
- done = done
50783
- .then(function () {
50784
- return cloneNode(child, filter);
50785
- })
50786
- .then(function (childClone) {
50787
- if (childClone) parent.appendChild(childClone);
50788
- });
50789
- });
50790
- return done;
50791
- }
50792
- }
50793
-
50794
- function processClone(original, clone) {
50795
- if (!(clone instanceof Element)) return clone;
50796
-
50797
- return Promise.resolve()
50798
- .then(cloneStyle)
50799
- .then(clonePseudoElements)
50800
- .then(copyUserInput)
50801
- .then(fixSvg)
50802
- .then(function () {
50803
- return clone;
50804
- });
50805
-
50806
- function cloneStyle() {
50807
- copyStyle(window.getComputedStyle(original), clone.style);
50808
-
50809
- function copyStyle(source, target) {
50810
- if (source.cssText) target.cssText = source.cssText;
50811
- else copyProperties(source, target);
50812
-
50813
- function copyProperties(source, target) {
50814
- util.asArray(source).forEach(function (name) {
50815
- target.setProperty(
50816
- name,
50817
- source.getPropertyValue(name),
50818
- source.getPropertyPriority(name)
50819
- );
50820
- });
50821
- }
50822
- }
50823
- }
50824
-
50825
- function clonePseudoElements() {
50826
- [':before', ':after'].forEach(function (element) {
50827
- clonePseudoElement(element);
50828
- });
50829
-
50830
- function clonePseudoElement(element) {
50831
- var style = window.getComputedStyle(original, element);
50832
- var content = style.getPropertyValue('content');
50833
-
50834
- if (content === '' || content === 'none') return;
50835
-
50836
- var className = util.uid();
50837
- clone.className = clone.className + ' ' + className;
50838
- var styleElement = document.createElement('style');
50839
- styleElement.appendChild(formatPseudoElementStyle(className, element, style));
50840
- clone.appendChild(styleElement);
50841
-
50842
- function formatPseudoElementStyle(className, element, style) {
50843
- var selector = '.' + className + ':' + element;
50844
- var cssText = style.cssText ? formatCssText(style) : formatCssProperties(style);
50845
- return document.createTextNode(selector + '{' + cssText + '}');
50846
-
50847
- function formatCssText(style) {
50848
- var content = style.getPropertyValue('content');
50849
- return style.cssText + ' content: ' + content + ';';
50850
- }
50851
-
50852
- function formatCssProperties(style) {
50853
-
50854
- return util.asArray(style)
50855
- .map(formatProperty)
50856
- .join('; ') + ';';
50857
-
50858
- function formatProperty(name) {
50859
- return name + ': ' +
50860
- style.getPropertyValue(name) +
50861
- (style.getPropertyPriority(name) ? ' !important' : '');
50862
- }
50863
- }
50864
- }
50865
- }
50866
- }
51044
+ // https://tc39.github.io/ecma262/#sec-json.stringify
51045
+ if ($stringify) {
51046
+ var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
51047
+ var symbol = $Symbol();
51048
+ // MS Edge converts symbol values to JSON as {}
51049
+ return $stringify([symbol]) != '[null]'
51050
+ // WebKit converts symbol values to JSON as null
51051
+ || $stringify({ a: symbol }) != '{}'
51052
+ // V8 throws on boxed symbols
51053
+ || $stringify(Object(symbol)) != '{}';
51054
+ });
50867
51055
 
50868
- function copyUserInput() {
50869
- if (original instanceof HTMLTextAreaElement) clone.innerHTML = original.value;
50870
- if (original instanceof HTMLInputElement) clone.setAttribute("value", original.value);
50871
- }
51056
+ $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
51057
+ // eslint-disable-next-line no-unused-vars
51058
+ stringify: function stringify(it, replacer, space) {
51059
+ var args = [it];
51060
+ var index = 1;
51061
+ var $replacer;
51062
+ while (arguments.length > index) args.push(arguments[index++]);
51063
+ $replacer = replacer;
51064
+ if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
51065
+ if (!isArray(replacer)) replacer = function (key, value) {
51066
+ if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
51067
+ if (!isSymbol(value)) return value;
51068
+ };
51069
+ args[1] = replacer;
51070
+ return $stringify.apply(null, args);
51071
+ }
51072
+ });
51073
+ }
50872
51074
 
50873
- function fixSvg() {
50874
- if (!(clone instanceof SVGElement)) return;
50875
- clone.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
51075
+ // `Symbol.prototype[@@toPrimitive]` method
51076
+ // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
51077
+ if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
51078
+ createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
51079
+ }
51080
+ // `Symbol.prototype[@@toStringTag]` property
51081
+ // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
51082
+ setToStringTag($Symbol, SYMBOL);
50876
51083
 
50877
- if (!(clone instanceof SVGRectElement)) return;
50878
- ['width', 'height'].forEach(function (attribute) {
50879
- var value = clone.getAttribute(attribute);
50880
- if (!value) return;
51084
+ hiddenKeys[HIDDEN] = true;
50881
51085
 
50882
- clone.style.setProperty(attribute, value);
50883
- });
50884
- }
50885
- }
50886
- }
50887
51086
 
50888
- function embedFonts(node) {
50889
- return fontFaces.resolveAll()
50890
- .then(function (cssText) {
50891
- var styleNode = document.createElement('style');
50892
- node.appendChild(styleNode);
50893
- styleNode.appendChild(document.createTextNode(cssText));
50894
- return node;
50895
- });
50896
- }
51087
+ /***/ }),
50897
51088
 
50898
- function inlineImages(node) {
50899
- return images.inlineAll(node)
50900
- .then(function () {
50901
- return node;
50902
- });
50903
- }
51089
+ /***/ "d6f0":
51090
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
50904
51091
 
50905
- function makeSvgDataUri(node, width, height) {
50906
- return Promise.resolve(node)
50907
- .then(function (node) {
50908
- node.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');
50909
- return new XMLSerializer().serializeToString(node);
50910
- })
50911
- .then(util.escapeXhtml)
50912
- .then(function (xhtml) {
50913
- return '<foreignObject x="0" y="0" width="100%" height="100%">' + xhtml + '</foreignObject>';
50914
- })
50915
- .then(function (foreignObject) {
50916
- return '<svg xmlns="http://www.w3.org/2000/svg" width="' + width + '" height="' + height + '">' +
50917
- foreignObject + '</svg>';
50918
- })
50919
- .then(function (svg) {
50920
- return 'data:image/svg+xml;charset=utf-8,' + svg;
50921
- });
50922
- }
51092
+ "use strict";
51093
+ /* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7f0d");
50923
51094
 
50924
- function newUtil() {
50925
- return {
50926
- escape: escape,
50927
- parseExtension: parseExtension,
50928
- mimeType: mimeType,
50929
- dataAsUrl: dataAsUrl,
50930
- isDataUrl: isDataUrl,
50931
- canvasToBlob: canvasToBlob,
50932
- resolveUrl: resolveUrl,
50933
- getAndEncode: getAndEncode,
50934
- uid: uid(),
50935
- delay: delay,
50936
- asArray: asArray,
50937
- escapeXhtml: escapeXhtml,
50938
- makeImage: makeImage,
50939
- width: width,
50940
- height: height
50941
- };
50942
51095
 
50943
- function mimes() {
50944
- /*
50945
- * Only WOFF and EOT mime types for fonts are 'real'
50946
- * see http://www.iana.org/assignments/media-types/media-types.xhtml
50947
- */
50948
- var WOFF = 'application/font-woff';
50949
- var JPEG = 'image/jpeg';
51096
+ /** Detect free variable `exports`. */
51097
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
50950
51098
 
50951
- return {
50952
- 'woff': WOFF,
50953
- 'woff2': WOFF,
50954
- 'ttf': 'application/font-truetype',
50955
- 'eot': 'application/vnd.ms-fontobject',
50956
- 'png': 'image/png',
50957
- 'jpg': JPEG,
50958
- 'jpeg': JPEG,
50959
- 'gif': 'image/gif',
50960
- 'tiff': 'image/tiff',
50961
- 'svg': 'image/svg+xml'
50962
- };
50963
- }
51099
+ /** Detect free variable `module`. */
51100
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
50964
51101
 
50965
- function parseExtension(url) {
50966
- var match = /\.([^\.\/]*?)$/g.exec(url);
50967
- if (match) return match[1];
50968
- else return '';
50969
- }
51102
+ /** Detect the popular CommonJS extension `module.exports`. */
51103
+ var moduleExports = freeModule && freeModule.exports === freeExports;
50970
51104
 
50971
- function mimeType(url) {
50972
- var extension = parseExtension(url).toLowerCase();
50973
- return mimes()[extension] || '';
50974
- }
51105
+ /** Built-in value references. */
51106
+ var Buffer = moduleExports ? _root_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Buffer : undefined,
51107
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
50975
51108
 
50976
- function isDataUrl(url) {
50977
- return url.search(/^(data:)/) !== -1;
50978
- }
51109
+ /**
51110
+ * Creates a clone of `buffer`.
51111
+ *
51112
+ * @private
51113
+ * @param {Buffer} buffer The buffer to clone.
51114
+ * @param {boolean} [isDeep] Specify a deep clone.
51115
+ * @returns {Buffer} Returns the cloned buffer.
51116
+ */
51117
+ function cloneBuffer(buffer, isDeep) {
51118
+ if (isDeep) {
51119
+ return buffer.slice();
51120
+ }
51121
+ var length = buffer.length,
51122
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
50979
51123
 
50980
- function toBlob(canvas) {
50981
- return new Promise(function (resolve) {
50982
- var binaryString = window.atob(canvas.toDataURL().split(',')[1]);
50983
- var length = binaryString.length;
50984
- var binaryArray = new Uint8Array(length);
51124
+ buffer.copy(result);
51125
+ return result;
51126
+ }
50985
51127
 
50986
- for (var i = 0; i < length; i++)
50987
- binaryArray[i] = binaryString.charCodeAt(i);
51128
+ /* harmony default export */ __webpack_exports__["a"] = (cloneBuffer);
50988
51129
 
50989
- resolve(new Blob([binaryArray], {
50990
- type: 'image/png'
50991
- }));
50992
- });
50993
- }
51130
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("7326")(module)))
50994
51131
 
50995
- function canvasToBlob(canvas) {
50996
- if (canvas.toBlob)
50997
- return new Promise(function (resolve) {
50998
- canvas.toBlob(resolve);
50999
- });
51132
+ /***/ }),
51000
51133
 
51001
- return toBlob(canvas);
51002
- }
51134
+ /***/ "da06":
51135
+ /***/ (function(module, exports, __webpack_require__) {
51003
51136
 
51004
- function resolveUrl(url, baseUrl) {
51005
- var doc = document.implementation.createHTMLDocument();
51006
- var base = doc.createElement('base');
51007
- doc.head.appendChild(base);
51008
- var a = doc.createElement('a');
51009
- doc.body.appendChild(a);
51010
- base.href = baseUrl;
51011
- a.href = url;
51012
- return a.href;
51013
- }
51137
+ var TO_STRING_TAG_SUPPORT = __webpack_require__("3cec");
51138
+ var classofRaw = __webpack_require__("6a61");
51139
+ var wellKnownSymbol = __webpack_require__("7d53");
51014
51140
 
51015
- function uid() {
51016
- var index = 0;
51141
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
51142
+ // ES3 wrong here
51143
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
51017
51144
 
51018
- return function () {
51019
- return 'u' + fourRandomChars() + index++;
51145
+ // fallback for IE11 Script Access Denied error
51146
+ var tryGet = function (it, key) {
51147
+ try {
51148
+ return it[key];
51149
+ } catch (error) { /* empty */ }
51150
+ };
51020
51151
 
51021
- function fourRandomChars() {
51022
- /* see http://stackoverflow.com/a/6248722/2519373 */
51023
- return ('0000' + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4);
51024
- }
51025
- };
51026
- }
51152
+ // getting tag from ES6+ `Object.prototype.toString`
51153
+ module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
51154
+ var O, tag, result;
51155
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
51156
+ // @@toStringTag case
51157
+ : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
51158
+ // builtinTag case
51159
+ : CORRECT_ARGUMENTS ? classofRaw(O)
51160
+ // ES3 arguments fallback
51161
+ : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
51162
+ };
51027
51163
 
51028
- function makeImage(uri) {
51029
- return new Promise(function (resolve, reject) {
51030
- var image = new Image();
51031
- image.onload = function () {
51032
- resolve(image);
51033
- };
51034
- image.onerror = reject;
51035
- image.src = uri;
51036
- });
51037
- }
51038
51164
 
51039
- function getAndEncode(url) {
51040
- var TIMEOUT = 30000;
51041
- if(domtoimage.impl.options.cacheBust) {
51042
- // Cache bypass so we dont have CORS issues with cached images
51043
- // Source: https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache
51044
- url += ((/\?/).test(url) ? "&" : "?") + (new Date()).getTime();
51045
- }
51165
+ /***/ }),
51046
51166
 
51047
- return new Promise(function (resolve) {
51048
- var request = new XMLHttpRequest();
51167
+ /***/ "df6f":
51168
+ /***/ (function(module, exports, __webpack_require__) {
51049
51169
 
51050
- request.onreadystatechange = done;
51051
- request.ontimeout = timeout;
51052
- request.responseType = 'blob';
51053
- request.timeout = TIMEOUT;
51054
- request.open('GET', url, true);
51055
- request.send();
51170
+ var store = __webpack_require__("c607");
51056
51171
 
51057
- var placeholder;
51058
- if(domtoimage.impl.options.imagePlaceholder) {
51059
- var split = domtoimage.impl.options.imagePlaceholder.split(/,/);
51060
- if(split && split[1]) {
51061
- placeholder = split[1];
51062
- }
51063
- }
51172
+ var functionToString = Function.toString;
51064
51173
 
51065
- function done() {
51066
- if (request.readyState !== 4) return;
51174
+ // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
51175
+ if (typeof store.inspectSource != 'function') {
51176
+ store.inspectSource = function (it) {
51177
+ return functionToString.call(it);
51178
+ };
51179
+ }
51067
51180
 
51068
- if (request.status !== 200) {
51069
- if(placeholder) {
51070
- resolve(placeholder);
51071
- } else {
51072
- fail('cannot fetch resource: ' + url + ', status: ' + request.status);
51073
- }
51181
+ module.exports = store.inspectSource;
51074
51182
 
51075
- return;
51076
- }
51077
51183
 
51078
- var encoder = new FileReader();
51079
- encoder.onloadend = function () {
51080
- var content = encoder.result.split(/,/)[1];
51081
- resolve(content);
51082
- };
51083
- encoder.readAsDataURL(request.response);
51084
- }
51184
+ /***/ }),
51085
51185
 
51086
- function timeout() {
51087
- if(placeholder) {
51088
- resolve(placeholder);
51089
- } else {
51090
- fail('timeout of ' + TIMEOUT + 'ms occured while fetching resource: ' + url);
51091
- }
51092
- }
51186
+ /***/ "e129":
51187
+ /***/ (function(module, exports, __webpack_require__) {
51093
51188
 
51094
- function fail(message) {
51095
- console.error(message);
51096
- resolve('');
51097
- }
51098
- });
51099
- }
51189
+ "use strict";
51100
51190
 
51101
- function dataAsUrl(content, type) {
51102
- return 'data:' + type + ';base64,' + content;
51103
- }
51191
+ var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
51192
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
51104
51193
 
51105
- function escape(string) {
51106
- return string.replace(/([.*+?^${}()|\[\]\/\\])/g, '\\$1');
51107
- }
51194
+ // Nashorn ~ JDK8 bug
51195
+ var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
51108
51196
 
51109
- function delay(ms) {
51110
- return function (arg) {
51111
- return new Promise(function (resolve) {
51112
- setTimeout(function () {
51113
- resolve(arg);
51114
- }, ms);
51115
- });
51116
- };
51117
- }
51197
+ // `Object.prototype.propertyIsEnumerable` method implementation
51198
+ // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
51199
+ exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
51200
+ var descriptor = getOwnPropertyDescriptor(this, V);
51201
+ return !!descriptor && descriptor.enumerable;
51202
+ } : nativePropertyIsEnumerable;
51118
51203
 
51119
- function asArray(arrayLike) {
51120
- var array = [];
51121
- var length = arrayLike.length;
51122
- for (var i = 0; i < length; i++) array.push(arrayLike[i]);
51123
- return array;
51124
- }
51125
51204
 
51126
- function escapeXhtml(string) {
51127
- return string.replace(/#/g, '%23').replace(/\n/g, '%0A');
51128
- }
51205
+ /***/ }),
51129
51206
 
51130
- function width(node) {
51131
- var leftBorder = px(node, 'border-left-width');
51132
- var rightBorder = px(node, 'border-right-width');
51133
- return node.scrollWidth + leftBorder + rightBorder;
51134
- }
51207
+ /***/ "e7a0":
51208
+ /***/ (function(module, exports, __webpack_require__) {
51135
51209
 
51136
- function height(node) {
51137
- var topBorder = px(node, 'border-top-width');
51138
- var bottomBorder = px(node, 'border-bottom-width');
51139
- return node.scrollHeight + topBorder + bottomBorder;
51140
- }
51210
+ var fails = __webpack_require__("72df");
51141
51211
 
51142
- function px(node, styleProperty) {
51143
- var value = window.getComputedStyle(node).getPropertyValue(styleProperty);
51144
- return parseFloat(value.replace('px', ''));
51145
- }
51146
- }
51212
+ module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
51213
+ // Chrome 38 Symbol has incorrect toString conversion
51214
+ // eslint-disable-next-line no-undef
51215
+ return !String(Symbol());
51216
+ });
51147
51217
 
51148
- function newInliner() {
51149
- var URL_REGEX = /url\(['"]?([^'"]+?)['"]?\)/g;
51150
51218
 
51151
- return {
51152
- inlineAll: inlineAll,
51153
- shouldProcess: shouldProcess,
51154
- impl: {
51155
- readUrls: readUrls,
51156
- inline: inline
51157
- }
51158
- };
51219
+ /***/ }),
51159
51220
 
51160
- function shouldProcess(string) {
51161
- return string.search(URL_REGEX) !== -1;
51162
- }
51221
+ /***/ "ebac":
51222
+ /***/ (function(module, exports, __webpack_require__) {
51163
51223
 
51164
- function readUrls(string) {
51165
- var result = [];
51166
- var match;
51167
- while ((match = URL_REGEX.exec(string)) !== null) {
51168
- result.push(match[1]);
51169
- }
51170
- return result.filter(function (url) {
51171
- return !util.isDataUrl(url);
51172
- });
51173
- }
51224
+ var fails = __webpack_require__("72df");
51174
51225
 
51175
- function inline(string, url, baseUrl, get) {
51176
- return Promise.resolve(url)
51177
- .then(function (url) {
51178
- return baseUrl ? util.resolveUrl(url, baseUrl) : url;
51179
- })
51180
- .then(get || util.getAndEncode)
51181
- .then(function (data) {
51182
- return util.dataAsUrl(data, util.mimeType(url));
51183
- })
51184
- .then(function (dataUrl) {
51185
- return string.replace(urlAsRegex(url), '$1' + dataUrl + '$3');
51186
- });
51226
+ var replacement = /#|\.prototype\./;
51187
51227
 
51188
- function urlAsRegex(url) {
51189
- return new RegExp('(url\\([\'"]?)(' + util.escape(url) + ')([\'"]?\\))', 'g');
51190
- }
51191
- }
51228
+ var isForced = function (feature, detection) {
51229
+ var value = data[normalize(feature)];
51230
+ return value == POLYFILL ? true
51231
+ : value == NATIVE ? false
51232
+ : typeof detection == 'function' ? fails(detection)
51233
+ : !!detection;
51234
+ };
51192
51235
 
51193
- function inlineAll(string, baseUrl, get) {
51194
- if (nothingToInline()) return Promise.resolve(string);
51236
+ var normalize = isForced.normalize = function (string) {
51237
+ return String(string).replace(replacement, '.').toLowerCase();
51238
+ };
51195
51239
 
51196
- return Promise.resolve(string)
51197
- .then(readUrls)
51198
- .then(function (urls) {
51199
- var done = Promise.resolve(string);
51200
- urls.forEach(function (url) {
51201
- done = done.then(function (string) {
51202
- return inline(string, url, baseUrl, get);
51203
- });
51204
- });
51205
- return done;
51206
- });
51240
+ var data = isForced.data = {};
51241
+ var NATIVE = isForced.NATIVE = 'N';
51242
+ var POLYFILL = isForced.POLYFILL = 'P';
51207
51243
 
51208
- function nothingToInline() {
51209
- return !shouldProcess(string);
51210
- }
51211
- }
51212
- }
51244
+ module.exports = isForced;
51213
51245
 
51214
- function newFontFaces() {
51215
- return {
51216
- resolveAll: resolveAll,
51217
- impl: {
51218
- readAll: readAll
51219
- }
51220
- };
51221
51246
 
51222
- function resolveAll() {
51223
- return readAll(document)
51224
- .then(function (webFonts) {
51225
- return Promise.all(
51226
- webFonts.map(function (webFont) {
51227
- return webFont.resolve();
51228
- })
51229
- );
51230
- })
51231
- .then(function (cssStrings) {
51232
- return cssStrings.join('\n');
51233
- });
51234
- }
51247
+ /***/ }),
51235
51248
 
51236
- function readAll() {
51237
- return Promise.resolve(util.asArray(document.styleSheets))
51238
- .then(getCssRules)
51239
- .then(selectWebFontRules)
51240
- .then(function (rules) {
51241
- return rules.map(newWebFont);
51242
- });
51249
+ /***/ "ed2b":
51250
+ /***/ (function(module, exports, __webpack_require__) {
51243
51251
 
51244
- function selectWebFontRules(cssRules) {
51245
- return cssRules
51246
- .filter(function (rule) {
51247
- return rule.type === CSSRule.FONT_FACE_RULE;
51248
- })
51249
- .filter(function (rule) {
51250
- return inliner.shouldProcess(rule.style.getPropertyValue('src'));
51251
- });
51252
- }
51252
+ var wellKnownSymbol = __webpack_require__("7d53");
51253
+ var create = __webpack_require__("82e8");
51254
+ var definePropertyModule = __webpack_require__("abdf");
51253
51255
 
51254
- function getCssRules(styleSheets) {
51255
- var cssRules = [];
51256
- styleSheets.forEach(function (sheet) {
51257
- try {
51258
- util.asArray(sheet.cssRules || []).forEach(cssRules.push.bind(cssRules));
51259
- } catch (e) {
51260
- console.log('Error while reading CSS rules from ' + sheet.href, e.toString());
51261
- }
51262
- });
51263
- return cssRules;
51264
- }
51256
+ var UNSCOPABLES = wellKnownSymbol('unscopables');
51257
+ var ArrayPrototype = Array.prototype;
51265
51258
 
51266
- function newWebFont(webFontRule) {
51267
- return {
51268
- resolve: function resolve() {
51269
- var baseUrl = (webFontRule.parentStyleSheet || {}).href;
51270
- return inliner.inlineAll(webFontRule.cssText, baseUrl);
51271
- },
51272
- src: function () {
51273
- return webFontRule.style.getPropertyValue('src');
51274
- }
51275
- };
51276
- }
51277
- }
51278
- }
51259
+ // Array.prototype[@@unscopables]
51260
+ // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
51261
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
51262
+ definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
51263
+ configurable: true,
51264
+ value: create(null)
51265
+ });
51266
+ }
51279
51267
 
51280
- function newImages() {
51281
- return {
51282
- inlineAll: inlineAll,
51283
- impl: {
51284
- newImage: newImage
51285
- }
51286
- };
51268
+ // add a key to Array.prototype[@@unscopables]
51269
+ module.exports = function (key) {
51270
+ ArrayPrototype[UNSCOPABLES][key] = true;
51271
+ };
51287
51272
 
51288
- function newImage(element) {
51289
- return {
51290
- inline: inline
51291
- };
51292
51273
 
51293
- function inline(get) {
51294
- if (util.isDataUrl(element.src)) return Promise.resolve();
51274
+ /***/ }),
51295
51275
 
51296
- return Promise.resolve(element.src)
51297
- .then(get || util.getAndEncode)
51298
- .then(function (data) {
51299
- return util.dataAsUrl(data, util.mimeType(element.src));
51300
- })
51301
- .then(function (dataUrl) {
51302
- return new Promise(function (resolve, reject) {
51303
- element.onload = resolve;
51304
- element.onerror = reject;
51305
- element.src = dataUrl;
51306
- });
51307
- });
51308
- }
51309
- }
51276
+ /***/ "ee58":
51277
+ /***/ (function(module, exports, __webpack_require__) {
51310
51278
 
51311
- function inlineAll(node) {
51312
- if (!(node instanceof Element)) return Promise.resolve(node);
51279
+ var toIndexedObject = __webpack_require__("378c");
51280
+ var nativeGetOwnPropertyNames = __webpack_require__("65d0").f;
51313
51281
 
51314
- return inlineBackground(node)
51315
- .then(function () {
51316
- if (node instanceof HTMLImageElement)
51317
- return newImage(node).inline();
51318
- else
51319
- return Promise.all(
51320
- util.asArray(node.childNodes).map(function (child) {
51321
- return inlineAll(child);
51322
- })
51323
- );
51324
- });
51282
+ var toString = {}.toString;
51325
51283
 
51326
- function inlineBackground(node) {
51327
- var background = node.style.getPropertyValue('background');
51284
+ var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
51285
+ ? Object.getOwnPropertyNames(window) : [];
51328
51286
 
51329
- if (!background) return Promise.resolve(node);
51287
+ var getWindowNames = function (it) {
51288
+ try {
51289
+ return nativeGetOwnPropertyNames(it);
51290
+ } catch (error) {
51291
+ return windowNames.slice();
51292
+ }
51293
+ };
51330
51294
 
51331
- return inliner.inlineAll(background)
51332
- .then(function (inlined) {
51333
- node.style.setProperty(
51334
- 'background',
51335
- inlined,
51336
- node.style.getPropertyPriority('background')
51337
- );
51338
- })
51339
- .then(function () {
51340
- return node;
51341
- });
51342
- }
51343
- }
51344
- }
51345
- })(this);
51295
+ // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
51296
+ module.exports.f = function getOwnPropertyNames(it) {
51297
+ return windowNames && toString.call(it) == '[object Window]'
51298
+ ? getWindowNames(it)
51299
+ : nativeGetOwnPropertyNames(toIndexedObject(it));
51300
+ };
51346
51301
 
51347
51302
 
51348
51303
  /***/ }),