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