|
- (self["webpackChunk"] = self["webpackChunk"] || []).push([["canvg"],{
-
- /***/ "./node_modules/@amcharts/amcharts4/.internal/canvg/index.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@amcharts/amcharts4/.internal/canvg/index.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
- /* harmony export */ "AElement": () => (/* binding */ AElement),
- /* harmony export */ "AnimateColorElement": () => (/* binding */ AnimateColorElement),
- /* harmony export */ "AnimateElement": () => (/* binding */ AnimateElement),
- /* harmony export */ "AnimateTransformElement": () => (/* binding */ AnimateTransformElement),
- /* harmony export */ "BoundingBox": () => (/* binding */ BoundingBox),
- /* harmony export */ "CB1": () => (/* binding */ CB1),
- /* harmony export */ "CB2": () => (/* binding */ CB2),
- /* harmony export */ "CB3": () => (/* binding */ CB3),
- /* harmony export */ "CB4": () => (/* binding */ CB4),
- /* harmony export */ "Canvg": () => (/* binding */ Canvg),
- /* harmony export */ "CircleElement": () => (/* binding */ CircleElement),
- /* harmony export */ "ClipPathElement": () => (/* binding */ ClipPathElement),
- /* harmony export */ "DefsElement": () => (/* binding */ DefsElement),
- /* harmony export */ "DescElement": () => (/* binding */ DescElement),
- /* harmony export */ "Document": () => (/* binding */ Document),
- /* harmony export */ "Element": () => (/* binding */ Element),
- /* harmony export */ "EllipseElement": () => (/* binding */ EllipseElement),
- /* harmony export */ "FeColorMatrixElement": () => (/* binding */ FeColorMatrixElement),
- /* harmony export */ "FeCompositeElement": () => (/* binding */ FeCompositeElement),
- /* harmony export */ "FeDropShadowElement": () => (/* binding */ FeDropShadowElement),
- /* harmony export */ "FeGaussianBlurElement": () => (/* binding */ FeGaussianBlurElement),
- /* harmony export */ "FeMorphologyElement": () => (/* binding */ FeMorphologyElement),
- /* harmony export */ "FilterElement": () => (/* binding */ FilterElement),
- /* harmony export */ "Font": () => (/* binding */ Font),
- /* harmony export */ "FontElement": () => (/* binding */ FontElement),
- /* harmony export */ "FontFaceElement": () => (/* binding */ FontFaceElement),
- /* harmony export */ "GElement": () => (/* binding */ GElement),
- /* harmony export */ "GlyphElement": () => (/* binding */ GlyphElement),
- /* harmony export */ "GradientElement": () => (/* binding */ GradientElement),
- /* harmony export */ "ImageElement": () => (/* binding */ ImageElement),
- /* harmony export */ "LineElement": () => (/* binding */ LineElement),
- /* harmony export */ "LinearGradientElement": () => (/* binding */ LinearGradientElement),
- /* harmony export */ "MarkerElement": () => (/* binding */ MarkerElement),
- /* harmony export */ "MaskElement": () => (/* binding */ MaskElement),
- /* harmony export */ "Matrix": () => (/* binding */ Matrix),
- /* harmony export */ "MissingGlyphElement": () => (/* binding */ MissingGlyphElement),
- /* harmony export */ "Mouse": () => (/* binding */ Mouse),
- /* harmony export */ "PSEUDO_ZERO": () => (/* binding */ PSEUDO_ZERO),
- /* harmony export */ "Parser": () => (/* binding */ Parser),
- /* harmony export */ "PathElement": () => (/* binding */ PathElement),
- /* harmony export */ "PathParser": () => (/* binding */ PathParser),
- /* harmony export */ "PatternElement": () => (/* binding */ PatternElement),
- /* harmony export */ "Point": () => (/* binding */ Point),
- /* harmony export */ "PolygonElement": () => (/* binding */ PolygonElement),
- /* harmony export */ "PolylineElement": () => (/* binding */ PolylineElement),
- /* harmony export */ "Property": () => (/* binding */ Property),
- /* harmony export */ "QB1": () => (/* binding */ QB1),
- /* harmony export */ "QB2": () => (/* binding */ QB2),
- /* harmony export */ "QB3": () => (/* binding */ QB3),
- /* harmony export */ "RadialGradientElement": () => (/* binding */ RadialGradientElement),
- /* harmony export */ "RectElement": () => (/* binding */ RectElement),
- /* harmony export */ "RenderedElement": () => (/* binding */ RenderedElement),
- /* harmony export */ "Rotate": () => (/* binding */ Rotate),
- /* harmony export */ "SVGElement": () => (/* binding */ SVGElement),
- /* harmony export */ "SVGFontLoader": () => (/* binding */ SVGFontLoader),
- /* harmony export */ "Scale": () => (/* binding */ Scale),
- /* harmony export */ "Screen": () => (/* binding */ Screen),
- /* harmony export */ "Skew": () => (/* binding */ Skew),
- /* harmony export */ "SkewX": () => (/* binding */ SkewX),
- /* harmony export */ "SkewY": () => (/* binding */ SkewY),
- /* harmony export */ "StopElement": () => (/* binding */ StopElement),
- /* harmony export */ "StyleElement": () => (/* binding */ StyleElement),
- /* harmony export */ "SymbolElement": () => (/* binding */ SymbolElement),
- /* harmony export */ "TRefElement": () => (/* binding */ TRefElement),
- /* harmony export */ "TSpanElement": () => (/* binding */ TSpanElement),
- /* harmony export */ "TextElement": () => (/* binding */ TextElement),
- /* harmony export */ "TextPathElement": () => (/* binding */ TextPathElement),
- /* harmony export */ "TitleElement": () => (/* binding */ TitleElement),
- /* harmony export */ "Transform": () => (/* binding */ Transform),
- /* harmony export */ "Translate": () => (/* binding */ Translate),
- /* harmony export */ "UnknownElement": () => (/* binding */ UnknownElement),
- /* harmony export */ "UseElement": () => (/* binding */ UseElement),
- /* harmony export */ "ViewPort": () => (/* binding */ ViewPort),
- /* harmony export */ "compressSpaces": () => (/* binding */ compressSpaces),
- /* harmony export */ "getSelectorSpecificity": () => (/* binding */ getSelectorSpecificity),
- /* harmony export */ "normalizeAttributeName": () => (/* binding */ normalizeAttributeName),
- /* harmony export */ "normalizeColor": () => (/* binding */ normalizeColor),
- /* harmony export */ "parseExternalUrl": () => (/* binding */ parseExternalUrl),
- /* harmony export */ "presets": () => (/* binding */ index),
- /* harmony export */ "toNumbers": () => (/* binding */ toNumbers),
- /* harmony export */ "trimLeft": () => (/* binding */ trimLeft),
- /* harmony export */ "trimRight": () => (/* binding */ trimRight),
- /* harmony export */ "vectorMagnitude": () => (/* binding */ vectorMagnitude),
- /* harmony export */ "vectorsAngle": () => (/* binding */ vectorsAngle),
- /* harmony export */ "vectorsRatio": () => (/* binding */ vectorsRatio)
- /* harmony export */ });
- /* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.map */ "./node_modules/core-js/modules/es.array.map.js");
- /* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ "./node_modules/core-js/modules/es.regexp.exec.js");
- /* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.match */ "./node_modules/core-js/modules/es.string.match.js");
- /* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.replace */ "./node_modules/core-js/modules/es.string.replace.js");
- /* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.starts-with */ "./node_modules/core-js/modules/es.string.starts-with.js");
- /* harmony import */ var core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_4__);
- /* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.join */ "./node_modules/core-js/modules/es.array.join.js");
- /* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_5__);
- /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
- /* harmony import */ var core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol */ "./node_modules/core-js/modules/es.symbol.js");
- /* harmony import */ var core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_7__);
- /* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.filter */ "./node_modules/core-js/modules/es.array.filter.js");
- /* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_8__);
- /* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.for-each */ "./node_modules/core-js/modules/es.array.for-each.js");
- /* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_9__);
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_10__);
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_11__);
- /* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.keys */ "./node_modules/core-js/modules/es.object.keys.js");
- /* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_12__);
- /* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
- /* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13__);
- /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
- /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14__);
- /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
- /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
- /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
- /* harmony import */ var core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.array.concat */ "./node_modules/core-js/modules/es.array.concat.js");
- /* harmony import */ var core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_19__);
- /* harmony import */ var core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.every */ "./node_modules/core-js/modules/es.array.every.js");
- /* harmony import */ var core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_20__);
- /* harmony import */ var core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.array.reduce */ "./node_modules/core-js/modules/es.array.reduce.js");
- /* harmony import */ var core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_21__);
- /* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ "./node_modules/core-js/modules/es.object.to-string.js");
- /* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_22__);
- /* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.promise */ "./node_modules/core-js/modules/es.promise.js");
- /* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_23__);
- /* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.string.split */ "./node_modules/core-js/modules/es.string.split.js");
- /* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_24__);
- /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! raf */ "./node_modules/raf/index.js");
- /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_25__);
- /* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.function.name */ "./node_modules/core-js/modules/es.function.name.js");
- /* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_26__);
- /* harmony import */ var rgbcolor__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! rgbcolor */ "./node_modules/rgbcolor/index.js");
- /* harmony import */ var rgbcolor__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(rgbcolor__WEBPACK_IMPORTED_MODULE_27__);
- /* harmony import */ var core_js_modules_es_reflect_construct__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.reflect.construct */ "./node_modules/core-js/modules/es.reflect.construct.js");
- /* harmony import */ var core_js_modules_es_reflect_construct__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct__WEBPACK_IMPORTED_MODULE_28__);
- /* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ "./node_modules/core-js/modules/es.regexp.to-string.js");
- /* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_29__);
- /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");
- /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
- /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js");
- /* harmony import */ var core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! core-js/modules/es.array.from */ "./node_modules/core-js/modules/es.array.from.js");
- /* harmony import */ var core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_33__);
- /* harmony import */ var core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! core-js/modules/es.array.includes */ "./node_modules/core-js/modules/es.array.includes.js");
- /* harmony import */ var core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_34__);
- /* harmony import */ var core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! core-js/modules/es.array.some */ "./node_modules/core-js/modules/es.array.some.js");
- /* harmony import */ var core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_35__);
- /* harmony import */ var core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! core-js/modules/es.string.includes */ "./node_modules/core-js/modules/es.string.includes.js");
- /* harmony import */ var core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_36__);
- /* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! core-js/modules/es.string.iterator */ "./node_modules/core-js/modules/es.string.iterator.js");
- /* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_37__);
- /* harmony import */ var core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! core-js/modules/es.string.trim */ "./node_modules/core-js/modules/es.string.trim.js");
- /* harmony import */ var core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_38__);
- /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
- /* harmony import */ var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! core-js/modules/es.array.index-of */ "./node_modules/core-js/modules/es.array.index-of.js");
- /* harmony import */ var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_40__);
- /* harmony import */ var core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! core-js/modules/es.array.reverse */ "./node_modules/core-js/modules/es.array.reverse.js");
- /* harmony import */ var core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_41__);
- /* harmony import */ var _babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! @babel/runtime/helpers/get */ "./node_modules/@babel/runtime/helpers/esm/get.js");
- /* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! core-js/modules/es.number.constructor */ "./node_modules/core-js/modules/es.number.constructor.js");
- /* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_43___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_43__);
- /* harmony import */ var core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! core-js/modules/es.array.fill */ "./node_modules/core-js/modules/es.array.fill.js");
- /* harmony import */ var core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_44___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_44__);
- /* harmony import */ var core_js_modules_es_reflect_delete_property__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! core-js/modules/es.reflect.delete-property */ "./node_modules/core-js/modules/es.reflect.delete-property.js");
- /* harmony import */ var core_js_modules_es_reflect_delete_property__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_delete_property__WEBPACK_IMPORTED_MODULE_45__);
- /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
- /* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! core-js/modules/es.array.iterator */ "./node_modules/core-js/modules/es.array.iterator.js");
- /* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_47___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_47__);
- /* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
- /* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_48___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_48__);
- /* harmony import */ var core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! core-js/modules/es.symbol.description */ "./node_modules/core-js/modules/es.symbol.description.js");
- /* harmony import */ var core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_49___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_49__);
- /* harmony import */ var core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator */ "./node_modules/core-js/modules/es.symbol.iterator.js");
- /* harmony import */ var core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_50___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_50__);
- /* harmony import */ var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! core-js/modules/es.array.slice */ "./node_modules/core-js/modules/es.array.slice.js");
- /* harmony import */ var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_51___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_51__);
- /* harmony import */ var core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! core-js/modules/es.map */ "./node_modules/core-js/modules/es.map.js");
- /* harmony import */ var core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_52___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_52__);
- /* harmony import */ var core_js_modules_es_reflect_apply__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! core-js/modules/es.reflect.apply */ "./node_modules/core-js/modules/es.reflect.apply.js");
- /* harmony import */ var core_js_modules_es_reflect_apply__WEBPACK_IMPORTED_MODULE_53___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_apply__WEBPACK_IMPORTED_MODULE_53__);
- /* harmony import */ var core_js_modules_es_reflect_get_prototype_of__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! core-js/modules/es.reflect.get-prototype-of */ "./node_modules/core-js/modules/es.reflect.get-prototype-of.js");
- /* harmony import */ var core_js_modules_es_reflect_get_prototype_of__WEBPACK_IMPORTED_MODULE_54___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_prototype_of__WEBPACK_IMPORTED_MODULE_54__);
- /* harmony import */ var stackblur_canvas__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! stackblur-canvas */ "./node_modules/stackblur-canvas/dist/stackblur-es.js");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /**
- * HTML-safe compress white-spaces.
- * @param str - String to compress.
- */
- function compressSpaces(str) {
- return str.replace(/(?!\u3000)\s+/gm, ' ');
- }
- /**
- * HTML-safe left trim.
- * @param str - String to trim.
- */
-
- function trimLeft(str) {
- return str.replace(/^[\n \t]+/, '');
- }
- /**
- * HTML-safe right trim.
- * @param str - String to trim.
- */
-
- function trimRight(str) {
- return str.replace(/[\n \t]+$/, '');
- }
- /**
- * String to numbers array.
- * @param str - Numbers string.
- */
-
- function toNumbers(str) {
- var matches = (str || '').match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || [];
- return matches.map(parseFloat);
- } // Microsoft Edge fix
-
- var allUppercase = /^[A-Z-]+$/;
- /**
- * Normalize attribute name.
- * @param name - Attribute name.
- */
-
- function normalizeAttributeName(name) {
- if (allUppercase.test(name)) {
- return name.toLowerCase();
- }
-
- return name;
- }
- /**
- * Parse external URL.
- * @param url - CSS url string.
- */
-
- function parseExternalUrl(url) {
- // single quotes [2]
- // v double quotes [3]
- // v v no quotes [4]
- // v v v
- var urlMatch = url.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/) || [];
- return urlMatch[2] || urlMatch[3] || urlMatch[4];
- }
- /**
- * Transform floats to integers in rgb colors.
- * @param color - Color to normalize.
- */
-
- function normalizeColor(color) {
- if (!color.startsWith('rgb')) {
- return color;
- }
-
- var rgbParts = 3;
- var normalizedColor = color.replace(/\d+(\.\d+)?/g, function (num, isFloat) {
- return rgbParts-- && isFloat ? String(Math.round(parseFloat(num))) : num;
- });
- return normalizedColor;
- }
-
- // slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
- var attributeRegex = /(\[[^\]]+\])/g;
- var idRegex = /(#[^\s\+>~\.\[:]+)/g;
- var classRegex = /(\.[^\s\+>~\.\[:]+)/g;
- var pseudoElementRegex = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi;
- var pseudoClassWithBracketsRegex = /(:[\w-]+\([^\)]*\))/gi;
- var pseudoClassRegex = /(:[^\s\+>~\.\[:]+)/g;
- var elementRegex = /([^\s\+>~\.\[:]+)/g;
-
- function findSelectorMatch(selector, regex) {
- var matches = selector.match(regex);
-
- if (!matches) {
- return [selector, 0];
- }
-
- return [selector.replace(regex, ' '), matches.length];
- }
- /**
- * Measure selector specificity.
- * @param selector - Selector to measure.
- */
-
-
- function getSelectorSpecificity(selector) {
- var specificity = [0, 0, 0];
- var currentSelector = selector.replace(/:not\(([^\)]*)\)/g, ' $1 ').replace(/{[\s\S]*/gm, ' ');
- var delta = 0;
-
- var _findSelectorMatch = findSelectorMatch(currentSelector, attributeRegex);
-
- var _findSelectorMatch2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch, 2);
-
- currentSelector = _findSelectorMatch2[0];
- delta = _findSelectorMatch2[1];
- specificity[1] += delta;
-
- var _findSelectorMatch3 = findSelectorMatch(currentSelector, idRegex);
-
- var _findSelectorMatch4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch3, 2);
-
- currentSelector = _findSelectorMatch4[0];
- delta = _findSelectorMatch4[1];
- specificity[0] += delta;
-
- var _findSelectorMatch5 = findSelectorMatch(currentSelector, classRegex);
-
- var _findSelectorMatch6 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch5, 2);
-
- currentSelector = _findSelectorMatch6[0];
- delta = _findSelectorMatch6[1];
- specificity[1] += delta;
-
- var _findSelectorMatch7 = findSelectorMatch(currentSelector, pseudoElementRegex);
-
- var _findSelectorMatch8 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch7, 2);
-
- currentSelector = _findSelectorMatch8[0];
- delta = _findSelectorMatch8[1];
- specificity[2] += delta;
-
- var _findSelectorMatch9 = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);
-
- var _findSelectorMatch10 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch9, 2);
-
- currentSelector = _findSelectorMatch10[0];
- delta = _findSelectorMatch10[1];
- specificity[1] += delta;
-
- var _findSelectorMatch11 = findSelectorMatch(currentSelector, pseudoClassRegex);
-
- var _findSelectorMatch12 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch11, 2);
-
- currentSelector = _findSelectorMatch12[0];
- delta = _findSelectorMatch12[1];
- specificity[1] += delta;
- currentSelector = currentSelector.replace(/[\*\s\+>~]/g, ' ').replace(/[#\.]/g, ' ');
-
- var _findSelectorMatch13 = findSelectorMatch(currentSelector, elementRegex);
-
- var _findSelectorMatch14 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch13, 2);
-
- currentSelector = _findSelectorMatch14[0];
- delta = _findSelectorMatch14[1];
- // lgtm [js/useless-assignment-to-local]
- specificity[2] += delta;
- return specificity.join('');
- }
-
- var PSEUDO_ZERO = .00000001;
- /**
- * Vector magnitude.
- */
-
- function vectorMagnitude(v) {
- return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
- }
- /**
- * Ratio between two vectors.
- */
-
- function vectorsRatio(u, v) {
- return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));
- }
- /**
- * Angle between two vectors.
- */
-
- function vectorsAngle(u, v) {
- return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));
- }
- function CB1(t) {
- return t * t * t;
- }
- function CB2(t) {
- return 3 * t * t * (1 - t);
- }
- function CB3(t) {
- return 3 * t * (1 - t) * (1 - t);
- }
- function CB4(t) {
- return (1 - t) * (1 - t) * (1 - t);
- }
- function QB1(t) {
- return t * t;
- }
- function QB2(t) {
- return 2 * t * (1 - t);
- }
- function QB3(t) {
- return (1 - t) * (1 - t);
- }
-
- function createCommonjsModule(fn, module) {
- return module = { exports: {} }, fn(module, module.exports), module.exports;
- }
-
- var runtime_1 = createCommonjsModule(function (module) {
- /**
- * Copyright (c) 2014-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var runtime = function (exports) {
-
- var Op = Object.prototype;
- var hasOwn = Op.hasOwnProperty;
- var undefined$1; // More compressible than void 0.
-
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
-
- function wrap(innerFn, outerFn, self, tryLocsList) {
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
- var generator = Object.create(protoGenerator.prototype);
- var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
- // .throw, and .return methods.
-
- generator._invoke = makeInvokeMethod(innerFn, self, context);
- return generator;
- }
-
- exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
- // record like context.tryEntries[i].completion. This interface could
- // have been (and was previously) designed to take a closure to be
- // invoked without arguments, but in all the cases we care about we
- // already have an existing method we want to call, so there's no need
- // to create a new function object. We can even get away with assuming
- // the method takes exactly one argument, since that happens to be true
- // in every case, so we don't have to touch the arguments object. The
- // only additional allocation required is the completion record, which
- // has a stable shape and so hopefully should be cheap to allocate.
-
- function tryCatch(fn, obj, arg) {
- try {
- return {
- type: "normal",
- arg: fn.call(obj, arg)
- };
- } catch (err) {
- return {
- type: "throw",
- arg: err
- };
- }
- }
-
- var GenStateSuspendedStart = "suspendedStart";
- var GenStateSuspendedYield = "suspendedYield";
- var GenStateExecuting = "executing";
- var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
- // breaking out of the dispatch switch statement.
-
- var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
- // .constructor.prototype properties for functions that return Generator
- // objects. For full spec compliance, you may wish to configure your
- // minifier not to mangle the names of these two functions.
-
- function Generator() {}
-
- function GeneratorFunction() {}
-
- function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
- // don't natively support it.
-
-
- var IteratorPrototype = {};
-
- IteratorPrototype[iteratorSymbol] = function () {
- return this;
- };
-
- var getProto = Object.getPrototypeOf;
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
-
- if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
- // This environment has a native %IteratorPrototype%; use it instead
- // of the polyfill.
- IteratorPrototype = NativeIteratorPrototype;
- }
-
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
- GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
- // Iterator interface in terms of a single ._invoke method.
-
- function defineIteratorMethods(prototype) {
- ["next", "throw", "return"].forEach(function (method) {
- prototype[method] = function (arg) {
- return this._invoke(method, arg);
- };
- });
- }
-
- exports.isGeneratorFunction = function (genFun) {
- var ctor = typeof genFun === "function" && genFun.constructor;
- return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
- // do is to check its .name property.
- (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
- };
-
- exports.mark = function (genFun) {
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
- } else {
- genFun.__proto__ = GeneratorFunctionPrototype;
-
- if (!(toStringTagSymbol in genFun)) {
- genFun[toStringTagSymbol] = "GeneratorFunction";
- }
- }
-
- genFun.prototype = Object.create(Gp);
- return genFun;
- }; // Within the body of any async function, `await x` is transformed to
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
- // meant to be awaited.
-
-
- exports.awrap = function (arg) {
- return {
- __await: arg
- };
- };
-
- function AsyncIterator(generator, PromiseImpl) {
- function invoke(method, arg, resolve, reject) {
- var record = tryCatch(generator[method], generator, arg);
-
- if (record.type === "throw") {
- reject(record.arg);
- } else {
- var result = record.arg;
- var value = result.value;
-
- if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
- return PromiseImpl.resolve(value.__await).then(function (value) {
- invoke("next", value, resolve, reject);
- }, function (err) {
- invoke("throw", err, resolve, reject);
- });
- }
-
- return PromiseImpl.resolve(value).then(function (unwrapped) {
- // When a yielded Promise is resolved, its final value becomes
- // the .value of the Promise<{value,done}> result for the
- // current iteration.
- result.value = unwrapped;
- resolve(result);
- }, function (error) {
- // If a rejected Promise was yielded, throw the rejection back
- // into the async generator function so it can be handled there.
- return invoke("throw", error, resolve, reject);
- });
- }
- }
-
- var previousPromise;
-
- function enqueue(method, arg) {
- function callInvokeWithMethodAndArg() {
- return new PromiseImpl(function (resolve, reject) {
- invoke(method, arg, resolve, reject);
- });
- }
-
- return previousPromise = // If enqueue has been called before, then we want to wait until
- // all previous Promises have been resolved before calling invoke,
- // so that results are always delivered in the correct order. If
- // enqueue has not been called before, then it is important to
- // call invoke immediately, without waiting on a callback to fire,
- // so that the async generator function has the opportunity to do
- // any necessary setup in a predictable way. This predictability
- // is why the Promise constructor synchronously invokes its
- // executor callback, and why async functions synchronously
- // execute code before the first await. Since we implement simple
- // async functions in terms of async generators, it is especially
- // important to get this right, even though it requires care.
- previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
- // invocations of the iterator.
- callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
- } // Define the unified helper method that is used to implement .next,
- // .throw, and .return (see defineIteratorMethods).
-
-
- this._invoke = enqueue;
- }
-
- defineIteratorMethods(AsyncIterator.prototype);
-
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
- return this;
- };
-
- exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
- // AsyncIterator objects; they just return a Promise for the value of
- // the final result produced by the iterator.
-
- exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
- if (PromiseImpl === void 0) PromiseImpl = Promise;
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
- return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
- : iter.next().then(function (result) {
- return result.done ? result.value : iter.next();
- });
- };
-
- function makeInvokeMethod(innerFn, self, context) {
- var state = GenStateSuspendedStart;
- return function invoke(method, arg) {
- if (state === GenStateExecuting) {
- throw new Error("Generator is already running");
- }
-
- if (state === GenStateCompleted) {
- if (method === "throw") {
- throw arg;
- } // Be forgiving, per 25.3.3.3.3 of the spec:
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
-
-
- return doneResult();
- }
-
- context.method = method;
- context.arg = arg;
-
- while (true) {
- var delegate = context.delegate;
-
- if (delegate) {
- var delegateResult = maybeInvokeDelegate(delegate, context);
-
- if (delegateResult) {
- if (delegateResult === ContinueSentinel) continue;
- return delegateResult;
- }
- }
-
- if (context.method === "next") {
- // Setting context._sent for legacy support of Babel's
- // function.sent implementation.
- context.sent = context._sent = context.arg;
- } else if (context.method === "throw") {
- if (state === GenStateSuspendedStart) {
- state = GenStateCompleted;
- throw context.arg;
- }
-
- context.dispatchException(context.arg);
- } else if (context.method === "return") {
- context.abrupt("return", context.arg);
- }
-
- state = GenStateExecuting;
- var record = tryCatch(innerFn, self, context);
-
- if (record.type === "normal") {
- // If an exception is thrown from innerFn, we leave state ===
- // GenStateExecuting and loop back for another invocation.
- state = context.done ? GenStateCompleted : GenStateSuspendedYield;
-
- if (record.arg === ContinueSentinel) {
- continue;
- }
-
- return {
- value: record.arg,
- done: context.done
- };
- } else if (record.type === "throw") {
- state = GenStateCompleted; // Dispatch the exception by looping back around to the
- // context.dispatchException(context.arg) call above.
-
- context.method = "throw";
- context.arg = record.arg;
- }
- }
- };
- } // Call delegate.iterator[context.method](context.arg) and handle the
- // result, either by returning a { value, done } result from the
- // delegate iterator, or by modifying context.method and context.arg,
- // setting context.delegate to null, and returning the ContinueSentinel.
-
-
- function maybeInvokeDelegate(delegate, context) {
- var method = delegate.iterator[context.method];
-
- if (method === undefined$1) {
- // A .throw or .return when the delegate iterator has no .throw
- // method always terminates the yield* loop.
- context.delegate = null;
-
- if (context.method === "throw") {
- // Note: ["return"] must be used for ES3 parsing compatibility.
- if (delegate.iterator["return"]) {
- // If the delegate iterator has a return method, give it a
- // chance to clean up.
- context.method = "return";
- context.arg = undefined$1;
- maybeInvokeDelegate(delegate, context);
-
- if (context.method === "throw") {
- // If maybeInvokeDelegate(context) changed context.method from
- // "return" to "throw", let that override the TypeError below.
- return ContinueSentinel;
- }
- }
-
- context.method = "throw";
- context.arg = new TypeError("The iterator does not provide a 'throw' method");
- }
-
- return ContinueSentinel;
- }
-
- var record = tryCatch(method, delegate.iterator, context.arg);
-
- if (record.type === "throw") {
- context.method = "throw";
- context.arg = record.arg;
- context.delegate = null;
- return ContinueSentinel;
- }
-
- var info = record.arg;
-
- if (!info) {
- context.method = "throw";
- context.arg = new TypeError("iterator result is not an object");
- context.delegate = null;
- return ContinueSentinel;
- }
-
- if (info.done) {
- // Assign the result of the finished delegate to the temporary
- // variable specified by delegate.resultName (see delegateYield).
- context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
-
- context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
- // exception, let the outer generator proceed normally. If
- // context.method was "next", forget context.arg since it has been
- // "consumed" by the delegate iterator. If context.method was
- // "return", allow the original .return call to continue in the
- // outer generator.
-
- if (context.method !== "return") {
- context.method = "next";
- context.arg = undefined$1;
- }
- } else {
- // Re-yield the result returned by the delegate method.
- return info;
- } // The delegate iterator is finished, so forget it and continue with
- // the outer generator.
-
-
- context.delegate = null;
- return ContinueSentinel;
- } // Define Generator.prototype.{next,throw,return} in terms of the
- // unified ._invoke helper method.
-
-
- defineIteratorMethods(Gp);
- Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
- // @@iterator function is called on it. Some browsers' implementations of the
- // iterator prototype chain incorrectly implement this, causing the Generator
- // object to not be returned from this call. This ensures that doesn't happen.
- // See https://github.com/facebook/regenerator/issues/274 for more details.
-
- Gp[iteratorSymbol] = function () {
- return this;
- };
-
- Gp.toString = function () {
- return "[object Generator]";
- };
-
- function pushTryEntry(locs) {
- var entry = {
- tryLoc: locs[0]
- };
-
- if (1 in locs) {
- entry.catchLoc = locs[1];
- }
-
- if (2 in locs) {
- entry.finallyLoc = locs[2];
- entry.afterLoc = locs[3];
- }
-
- this.tryEntries.push(entry);
- }
-
- function resetTryEntry(entry) {
- var record = entry.completion || {};
- record.type = "normal";
- delete record.arg;
- entry.completion = record;
- }
-
- function Context(tryLocsList) {
- // The root entry object (effectively a try statement without a catch
- // or a finally block) gives us a place to store values thrown from
- // locations where there is no enclosing try statement.
- this.tryEntries = [{
- tryLoc: "root"
- }];
- tryLocsList.forEach(pushTryEntry, this);
- this.reset(true);
- }
-
- exports.keys = function (object) {
- var keys = [];
-
- for (var key in object) {
- keys.push(key);
- }
-
- keys.reverse(); // Rather than returning an object with a next method, we keep
- // things simple and return the next function itself.
-
- return function next() {
- while (keys.length) {
- var key = keys.pop();
-
- if (key in object) {
- next.value = key;
- next.done = false;
- return next;
- }
- } // To avoid creating an additional object, we just hang the .value
- // and .done properties off the next function object itself. This
- // also ensures that the minifier will not anonymize the function.
-
-
- next.done = true;
- return next;
- };
- };
-
- function values(iterable) {
- if (iterable) {
- var iteratorMethod = iterable[iteratorSymbol];
-
- if (iteratorMethod) {
- return iteratorMethod.call(iterable);
- }
-
- if (typeof iterable.next === "function") {
- return iterable;
- }
-
- if (!isNaN(iterable.length)) {
- var i = -1,
- next = function next() {
- while (++i < iterable.length) {
- if (hasOwn.call(iterable, i)) {
- next.value = iterable[i];
- next.done = false;
- return next;
- }
- }
-
- next.value = undefined$1;
- next.done = true;
- return next;
- };
-
- return next.next = next;
- }
- } // Return an iterator with no values.
-
-
- return {
- next: doneResult
- };
- }
-
- exports.values = values;
-
- function doneResult() {
- return {
- value: undefined$1,
- done: true
- };
- }
-
- Context.prototype = {
- constructor: Context,
- reset: function (skipTempReset) {
- this.prev = 0;
- this.next = 0; // Resetting context._sent for legacy support of Babel's
- // function.sent implementation.
-
- this.sent = this._sent = undefined$1;
- this.done = false;
- this.delegate = null;
- this.method = "next";
- this.arg = undefined$1;
- this.tryEntries.forEach(resetTryEntry);
-
- if (!skipTempReset) {
- for (var name in this) {
- // Not sure about the optimal order of these conditions:
- if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
- this[name] = undefined$1;
- }
- }
- }
- },
- stop: function () {
- this.done = true;
- var rootEntry = this.tryEntries[0];
- var rootRecord = rootEntry.completion;
-
- if (rootRecord.type === "throw") {
- throw rootRecord.arg;
- }
-
- return this.rval;
- },
- dispatchException: function (exception) {
- if (this.done) {
- throw exception;
- }
-
- var context = this;
-
- function handle(loc, caught) {
- record.type = "throw";
- record.arg = exception;
- context.next = loc;
-
- if (caught) {
- // If the dispatched exception was caught by a catch block,
- // then let that catch block handle the exception normally.
- context.method = "next";
- context.arg = undefined$1;
- }
-
- return !!caught;
- }
-
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- var record = entry.completion;
-
- if (entry.tryLoc === "root") {
- // Exception thrown outside of any try block that could handle
- // it, so set the completion value of the entire function to
- // throw the exception.
- return handle("end");
- }
-
- if (entry.tryLoc <= this.prev) {
- var hasCatch = hasOwn.call(entry, "catchLoc");
- var hasFinally = hasOwn.call(entry, "finallyLoc");
-
- if (hasCatch && hasFinally) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- } else if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
- } else if (hasCatch) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- }
- } else if (hasFinally) {
- if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
- } else {
- throw new Error("try statement without catch or finally");
- }
- }
- }
- },
- abrupt: function (type, arg) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
-
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
- var finallyEntry = entry;
- break;
- }
- }
-
- if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
- // Ignore the finally entry if control is not jumping to a
- // location outside the try/catch block.
- finallyEntry = null;
- }
-
- var record = finallyEntry ? finallyEntry.completion : {};
- record.type = type;
- record.arg = arg;
-
- if (finallyEntry) {
- this.method = "next";
- this.next = finallyEntry.finallyLoc;
- return ContinueSentinel;
- }
-
- return this.complete(record);
- },
- complete: function (record, afterLoc) {
- if (record.type === "throw") {
- throw record.arg;
- }
-
- if (record.type === "break" || record.type === "continue") {
- this.next = record.arg;
- } else if (record.type === "return") {
- this.rval = this.arg = record.arg;
- this.method = "return";
- this.next = "end";
- } else if (record.type === "normal" && afterLoc) {
- this.next = afterLoc;
- }
-
- return ContinueSentinel;
- },
- finish: function (finallyLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
-
- if (entry.finallyLoc === finallyLoc) {
- this.complete(entry.completion, entry.afterLoc);
- resetTryEntry(entry);
- return ContinueSentinel;
- }
- }
- },
- "catch": function (tryLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
-
- if (entry.tryLoc === tryLoc) {
- var record = entry.completion;
-
- if (record.type === "throw") {
- var thrown = record.arg;
- resetTryEntry(entry);
- }
-
- return thrown;
- }
- } // The context.catch method must only be called with a location
- // argument that corresponds to a known catch block.
-
-
- throw new Error("illegal catch attempt");
- },
- delegateYield: function (iterable, resultName, nextLoc) {
- this.delegate = {
- iterator: values(iterable),
- resultName: resultName,
- nextLoc: nextLoc
- };
-
- if (this.method === "next") {
- // Deliberately forget the last sent value so that we don't
- // accidentally pass it on to the delegate.
- this.arg = undefined$1;
- }
-
- return ContinueSentinel;
- }
- }; // Regardless of whether this script is executing as a CommonJS module
- // or not, return the runtime object so that we can declare the variable
- // regeneratorRuntime in the outer scope, which allows this module to be
- // injected easily by `bin/regenerator --include-runtime script.js`.
-
- return exports;
- }( // If this script is executing as a CommonJS module, use module.exports
- // as the regeneratorRuntime namespace. Otherwise create a new empty
- // object. Either way, the resulting object will be used to initialize
- // the regeneratorRuntime variable at the top of this file.
- module.exports );
-
- try {
- regeneratorRuntime = runtime;
- } catch (accidentalStrictMode) {
- // This module should not be running in strict mode, so the above
- // assignment should always work unless something is misconfigured. Just
- // in case runtime.js accidentally runs in strict mode, we can escape
- // strict mode using a global Function call. This could conceivably fail
- // if a Content Security Policy forbids using Function, but in that case
- // the proper solution is to fix the accidental strict mode problem. If
- // you've misconfigured your bundler to force strict mode and applied a
- // CSP to forbid Function, and you're not willing to fix either of those
- // problems, please detail your unique predicament in a GitHub issue.
- Function("r", "regeneratorRuntime = r")(runtime);
- }
- });
-
- var Property = /*#__PURE__*/function () {
- function Property(document, name, value) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Property);
-
- this.document = document;
- this.name = name;
- this.value = value;
- this.isNormalizedColor = false;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Property, [{
- key: "hasValue",
- value: function hasValue() {
- var value = this.value;
- return value !== null && value !== '' && value !== 0 && typeof value !== 'undefined';
- }
- }, {
- key: "isString",
- value: function isString(regexp) {
- var value = this.value;
- var result = typeof value === 'string';
-
- if (!result || !regexp) {
- return result;
- }
-
- return regexp.test(value);
- }
- }, {
- key: "isUrlDefinition",
- value: function isUrlDefinition() {
- return this.isString(/^url\(/);
- }
- }, {
- key: "isPixels",
- value: function isPixels() {
- if (!this.hasValue()) {
- return false;
- }
-
- var asString = this.getString();
-
- switch (true) {
- case /px$/.test(asString):
- case /^[0-9]+$/.test(asString):
- return true;
-
- default:
- return false;
- }
- }
- }, {
- key: "setValue",
- value: function setValue(value) {
- this.value = value;
- return this;
- }
- }, {
- key: "getValue",
- value: function getValue(def) {
- if (typeof def === 'undefined' || this.hasValue()) {
- return this.value;
- }
-
- return def;
- }
- }, {
- key: "getNumber",
- value: function getNumber(def) {
- if (!this.hasValue()) {
- if (typeof def === 'undefined') {
- return 0;
- }
-
- return parseFloat(def);
- }
-
- var value = this.value;
- var n = parseFloat(value);
-
- if (this.isString(/%$/)) {
- n = n / 100.0;
- }
-
- return n;
- }
- }, {
- key: "getString",
- value: function getString(def) {
- if (typeof def === 'undefined' || this.hasValue()) {
- return typeof this.value === 'undefined' ? '' : String(this.value);
- }
-
- return String(def);
- }
- }, {
- key: "getColor",
- value: function getColor(def) {
- var color = this.getString(def);
-
- if (this.isNormalizedColor) {
- return color;
- }
-
- this.isNormalizedColor = true;
- color = normalizeColor(color);
- this.value = color;
- return color;
- }
- }, {
- key: "getDpi",
- value: function getDpi() {
- return 96.0; // TODO: compute?
- }
- }, {
- key: "getRem",
- value: function getRem() {
- return this.document.rootEmSize;
- }
- }, {
- key: "getEm",
- value: function getEm() {
- return this.document.emSize;
- }
- }, {
- key: "getUnits",
- value: function getUnits() {
- return this.getString().replace(/[0-9\.\-]/g, '');
- }
- }, {
- key: "getPixels",
- value: function getPixels(axisOrIsFontSize) {
- var processPercent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
-
- if (!this.hasValue()) {
- return 0;
- }
-
- var _ref = typeof axisOrIsFontSize === 'boolean' ? [undefined, axisOrIsFontSize] : [axisOrIsFontSize],
- _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_ref, 2),
- axis = _ref2[0],
- isFontSize = _ref2[1];
-
- var viewPort = this.document.screen.viewPort;
-
- switch (true) {
- case this.isString(/vmin$/):
- return this.getNumber() / 100.0 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));
-
- case this.isString(/vmax$/):
- return this.getNumber() / 100.0 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));
-
- case this.isString(/vw$/):
- return this.getNumber() / 100.0 * viewPort.computeSize('x');
-
- case this.isString(/vh$/):
- return this.getNumber() / 100.0 * viewPort.computeSize('y');
-
- case this.isString(/rem$/):
- return this.getNumber() * this.getRem();
-
- case this.isString(/em$/):
- return this.getNumber() * this.getEm();
-
- case this.isString(/ex$/):
- return this.getNumber() * this.getEm() / 2.0;
-
- case this.isString(/px$/):
- return this.getNumber();
-
- case this.isString(/pt$/):
- return this.getNumber() * this.getDpi() * (1.0 / 72.0);
-
- case this.isString(/pc$/):
- return this.getNumber() * 15;
-
- case this.isString(/cm$/):
- return this.getNumber() * this.getDpi() / 2.54;
-
- case this.isString(/mm$/):
- return this.getNumber() * this.getDpi() / 25.4;
-
- case this.isString(/in$/):
- return this.getNumber() * this.getDpi();
-
- case this.isString(/%$/) && isFontSize:
- return this.getNumber() * this.getEm();
-
- case this.isString(/%$/):
- return this.getNumber() * viewPort.computeSize(axis);
-
- default:
- {
- var n = this.getNumber();
-
- if (processPercent && n < 1.0) {
- return n * viewPort.computeSize(axis);
- }
-
- return n;
- }
- }
- }
- }, {
- key: "getMilliseconds",
- value: function getMilliseconds() {
- if (!this.hasValue()) {
- return 0;
- }
-
- if (this.isString(/ms$/)) {
- return this.getNumber();
- }
-
- return this.getNumber() * 1000;
- }
- }, {
- key: "getRadians",
- value: function getRadians() {
- if (!this.hasValue()) {
- return 0;
- }
-
- switch (true) {
- case this.isString(/deg$/):
- return this.getNumber() * (Math.PI / 180.0);
-
- case this.isString(/grad$/):
- return this.getNumber() * (Math.PI / 200.0);
-
- case this.isString(/rad$/):
- return this.getNumber();
-
- default:
- return this.getNumber() * (Math.PI / 180.0);
- }
- }
- }, {
- key: "getDefinition",
- value: function getDefinition() {
- var asString = this.getString();
- var name = asString.match(/#([^\)'"]+)/);
-
- if (name) {
- name = name[1];
- }
-
- if (!name) {
- name = asString;
- }
-
- return this.document.definitions[name];
- }
- }, {
- key: "getFillStyleDefinition",
- value: function getFillStyleDefinition(element, opacity) {
- var def = this.getDefinition();
-
- if (!def) {
- return null;
- } // gradient
-
-
- if (typeof def.createGradient === 'function') {
- return def.createGradient(this.document.ctx, element, opacity);
- } // pattern
-
-
- if (typeof def.createPattern === 'function') {
- if (def.getHrefAttribute().hasValue()) {
- var patternTransform = def.getAttribute('patternTransform');
- def = def.getHrefAttribute().getDefinition();
-
- if (patternTransform.hasValue()) {
- def.getAttribute('patternTransform', true).setValue(patternTransform.value);
- }
- }
-
- return def.createPattern(this.document.ctx, element, opacity);
- }
-
- return null;
- }
- }, {
- key: "getTextBaseline",
- value: function getTextBaseline() {
- if (!this.hasValue()) {
- return null;
- }
-
- return Property.textBaselineMapping[this.getString()];
- }
- }, {
- key: "addOpacity",
- value: function addOpacity(opacity) {
- var value = this.getColor();
- var len = value.length;
- var commas = 0; // Simulate old RGBColor version, which can't parse rgba.
-
- for (var i = 0; i < len; i++) {
- if (value[i] === ',') {
- commas++;
- }
-
- if (commas === 3) {
- break;
- }
- }
-
- if (opacity.hasValue() && this.isString() && commas !== 3) {
- var color = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(value);
-
- if (color.ok) {
- color.alpha = opacity.getNumber();
- value = color.toRGBA();
- }
- }
-
- return new Property(this.document, this.name, value);
- }
- }], [{
- key: "empty",
- value: function empty(document) {
- return new Property(document, 'EMPTY', '');
- }
- }]);
-
- return Property;
- }();
- Property.textBaselineMapping = {
- 'baseline': 'alphabetic',
- 'before-edge': 'top',
- 'text-before-edge': 'top',
- 'middle': 'middle',
- 'central': 'middle',
- 'after-edge': 'bottom',
- 'text-after-edge': 'bottom',
- 'ideographic': 'ideographic',
- 'alphabetic': 'alphabetic',
- 'hanging': 'hanging',
- 'mathematical': 'alphabetic'
- };
-
- var ViewPort = /*#__PURE__*/function () {
- function ViewPort() {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ViewPort);
-
- this.viewPorts = [];
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ViewPort, [{
- key: "clear",
- value: function clear() {
- this.viewPorts = [];
- }
- }, {
- key: "setCurrent",
- value: function setCurrent(width, height) {
- this.viewPorts.push({
- width: width,
- height: height
- });
- }
- }, {
- key: "removeCurrent",
- value: function removeCurrent() {
- this.viewPorts.pop();
- }
- }, {
- key: "getCurrent",
- value: function getCurrent() {
- var viewPorts = this.viewPorts;
- return viewPorts[viewPorts.length - 1];
- }
- }, {
- key: "computeSize",
- value: function computeSize(d) {
- if (typeof d === 'number') {
- return d;
- }
-
- if (d === 'x') {
- return this.width;
- }
-
- if (d === 'y') {
- return this.height;
- }
-
- return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);
- }
- }, {
- key: "width",
- get: function get() {
- return this.getCurrent().width;
- }
- }, {
- key: "height",
- get: function get() {
- return this.getCurrent().height;
- }
- }]);
-
- return ViewPort;
- }();
-
- var Point = /*#__PURE__*/function () {
- function Point(x, y) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Point);
-
- this.x = x;
- this.y = y;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Point, [{
- key: "angleTo",
- value: function angleTo(point) {
- return Math.atan2(point.y - this.y, point.x - this.x);
- }
- }, {
- key: "applyTransform",
- value: function applyTransform(transform) {
- var x = this.x,
- y = this.y;
- var xp = x * transform[0] + y * transform[2] + transform[4];
- var yp = x * transform[1] + y * transform[3] + transform[5];
- this.x = xp;
- this.y = yp;
- }
- }], [{
- key: "parse",
- value: function parse(point) {
- var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
-
- var _toNumbers = toNumbers(point),
- _toNumbers2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_toNumbers, 2),
- _toNumbers2$ = _toNumbers2[0],
- x = _toNumbers2$ === void 0 ? defaultValue : _toNumbers2$,
- _toNumbers2$2 = _toNumbers2[1],
- y = _toNumbers2$2 === void 0 ? defaultValue : _toNumbers2$2;
-
- return new Point(x, y);
- }
- }, {
- key: "parseScale",
- value: function parseScale(scale) {
- var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
-
- var _toNumbers3 = toNumbers(scale),
- _toNumbers4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_toNumbers3, 2),
- _toNumbers4$ = _toNumbers4[0],
- x = _toNumbers4$ === void 0 ? defaultValue : _toNumbers4$,
- _toNumbers4$2 = _toNumbers4[1],
- y = _toNumbers4$2 === void 0 ? x : _toNumbers4$2;
-
- return new Point(x, y);
- }
- }, {
- key: "parsePath",
- value: function parsePath(path) {
- var points = toNumbers(path);
- var len = points.length;
- var pathPoints = [];
-
- for (var i = 0; i < len; i += 2) {
- pathPoints.push(new Point(points[i], points[i + 1]));
- }
-
- return pathPoints;
- }
- }]);
-
- return Point;
- }();
-
- var Mouse = /*#__PURE__*/function () {
- function Mouse(screen) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Mouse);
-
- this.screen = screen;
- this.working = false;
- this.events = [];
- this.eventElements = [];
- this.onClick = this.onClick.bind(this);
- this.onMouseMove = this.onMouseMove.bind(this);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Mouse, [{
- key: "isWorking",
- value: function isWorking() {
- return this.working;
- }
- }, {
- key: "start",
- value: function start() {
- if (this.working) {
- return;
- }
-
- var screen = this.screen,
- onClick = this.onClick,
- onMouseMove = this.onMouseMove;
- var canvas = screen.ctx.canvas;
- canvas.onclick = onClick;
- canvas.onmousemove = onMouseMove;
- this.working = true;
- }
- }, {
- key: "stop",
- value: function stop() {
- if (!this.working) {
- return;
- }
-
- var canvas = this.screen.ctx.canvas;
- this.working = false;
- canvas.onclick = null;
- canvas.onmousemove = null;
- }
- }, {
- key: "hasEvents",
- value: function hasEvents() {
- return this.working && this.events.length > 0;
- }
- }, {
- key: "runEvents",
- value: function runEvents() {
- if (!this.working) {
- return;
- }
-
- var document = this.screen,
- events = this.events,
- eventElements = this.eventElements;
- var style = document.ctx.canvas.style;
-
- if (style) {
- style.cursor = '';
- }
-
- events.forEach(function (_ref, i) {
- var run = _ref.run;
- var element = eventElements[i];
-
- while (element) {
- run(element);
- element = element.parent;
- }
- }); // done running, clear
-
- this.events = [];
- this.eventElements = [];
- }
- }, {
- key: "checkPath",
- value: function checkPath(element, ctx) {
- if (!this.working || !ctx) {
- return;
- }
-
- var events = this.events,
- eventElements = this.eventElements;
- events.forEach(function (_ref2, i) {
- var x = _ref2.x,
- y = _ref2.y;
-
- if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {
- eventElements[i] = element;
- }
- });
- }
- }, {
- key: "checkBoundingBox",
- value: function checkBoundingBox(element, boundingBox) {
- if (!this.working || !boundingBox) {
- return;
- }
-
- var events = this.events,
- eventElements = this.eventElements;
- events.forEach(function (_ref3, i) {
- var x = _ref3.x,
- y = _ref3.y;
-
- if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {
- eventElements[i] = element;
- }
- });
- }
- }, {
- key: "mapXY",
- value: function mapXY(x, y) {
- var _this$screen = this.screen,
- window = _this$screen.window,
- ctx = _this$screen.ctx;
- var point = new Point(x, y);
- var element = ctx.canvas;
-
- while (element) {
- point.x -= element.offsetLeft;
- point.y -= element.offsetTop;
- element = element.offsetParent;
- }
-
- if (window.scrollX) {
- point.x += window.scrollX;
- }
-
- if (window.scrollY) {
- point.y += window.scrollY;
- }
-
- return point;
- }
- }, {
- key: "onClick",
- value: function onClick(evt) {
- var _this$mapXY = this.mapXY((evt || event).clientX, (evt || event).clientY),
- x = _this$mapXY.x,
- y = _this$mapXY.y;
-
- this.events.push({
- type: 'onclick',
- x: x,
- y: y,
- run: function run(event) {
- if (event.onClick) {
- event.onClick();
- }
- }
- });
- }
- }, {
- key: "onMouseMove",
- value: function onMouseMove(evt) {
- var _this$mapXY2 = this.mapXY((evt || event).clientX, (evt || event).clientY),
- x = _this$mapXY2.x,
- y = _this$mapXY2.y;
-
- this.events.push({
- type: 'onmousemove',
- x: x,
- y: y,
- run: function run(event) {
- if (event.onMouseMove) {
- event.onMouseMove();
- }
- }
- });
- }
- }]);
-
- return Mouse;
- }();
-
- var defaultWindow = typeof window !== 'undefined' ? window : null;
- var defaultFetch = typeof fetch !== 'undefined' ? fetch.bind(void 0) // `fetch` depends on context: `someObject.fetch(...)` will throw error.
- : null;
-
- var Screen = /*#__PURE__*/function () {
- function Screen(ctx) {
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- _ref$fetch = _ref.fetch,
- fetch = _ref$fetch === void 0 ? defaultFetch : _ref$fetch,
- _ref$window = _ref.window,
- window = _ref$window === void 0 ? defaultWindow : _ref$window;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Screen);
-
- this.ctx = ctx;
- this.FRAMERATE = 30;
- this.MAX_VIRTUAL_PIXELS = 30000;
- this.CLIENT_WIDTH = 800;
- this.CLIENT_HEIGHT = 600;
- this.viewPort = new ViewPort();
- this.mouse = new Mouse(this);
- this.animations = [];
- this.waits = [];
- this.frameDuration = 0;
- this.isReadyLock = false;
- this.isFirstRender = true;
- this.intervalId = null;
- this.window = window;
- this.fetch = fetch;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Screen, [{
- key: "wait",
- value: function wait(checker) {
- this.waits.push(checker);
- }
- }, {
- key: "ready",
- value: function ready() {
- if (!this.readyPromise) {
- return Promise.resolve();
- }
-
- return this.readyPromise;
- }
- }, {
- key: "isReady",
- value: function isReady() {
- if (this.isReadyLock) {
- return true;
- }
-
- var isReadyLock = this.waits.every(function (_) {
- return _();
- });
-
- if (isReadyLock) {
- this.waits = [];
-
- if (this.resolveReady) {
- this.resolveReady();
- }
- }
-
- this.isReadyLock = isReadyLock;
- return isReadyLock;
- }
- }, {
- key: "setDefaults",
- value: function setDefaults(ctx) {
- // initial values and defaults
- ctx.strokeStyle = 'rgba(0,0,0,0)';
- ctx.lineCap = 'butt';
- ctx.lineJoin = 'miter';
- ctx.miterLimit = 4;
- }
- }, {
- key: "setViewBox",
- value: function setViewBox(_ref2) {
- var document = _ref2.document,
- ctx = _ref2.ctx,
- aspectRatio = _ref2.aspectRatio,
- width = _ref2.width,
- desiredWidth = _ref2.desiredWidth,
- height = _ref2.height,
- desiredHeight = _ref2.desiredHeight,
- _ref2$minX = _ref2.minX,
- minX = _ref2$minX === void 0 ? 0 : _ref2$minX,
- _ref2$minY = _ref2.minY,
- minY = _ref2$minY === void 0 ? 0 : _ref2$minY,
- refX = _ref2.refX,
- refY = _ref2.refY,
- _ref2$clip = _ref2.clip,
- clip = _ref2$clip === void 0 ? false : _ref2$clip,
- _ref2$clipX = _ref2.clipX,
- clipX = _ref2$clipX === void 0 ? 0 : _ref2$clipX,
- _ref2$clipY = _ref2.clipY,
- clipY = _ref2$clipY === void 0 ? 0 : _ref2$clipY;
- // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
- var cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\s/, ''); // ignore defer
-
- var _cleanAspectRatio$spl = cleanAspectRatio.split(' '),
- _cleanAspectRatio$spl2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_cleanAspectRatio$spl, 2),
- aspectRatioAlign = _cleanAspectRatio$spl2[0],
- aspectRatioMeetOrSlice = _cleanAspectRatio$spl2[1];
-
- var align = aspectRatioAlign || 'xMidYMid';
- var meetOrSlice = aspectRatioMeetOrSlice || 'meet'; // calculate scale
-
- var scaleX = width / desiredWidth;
- var scaleY = height / desiredHeight;
- var scaleMin = Math.min(scaleX, scaleY);
- var scaleMax = Math.max(scaleX, scaleY);
- var finalDesiredWidth = desiredWidth;
- var finalDesiredHeight = desiredHeight;
-
- if (meetOrSlice === 'meet') {
- finalDesiredWidth *= scaleMin;
- finalDesiredHeight *= scaleMin;
- }
-
- if (meetOrSlice === 'slice') {
- finalDesiredWidth *= scaleMax;
- finalDesiredHeight *= scaleMax;
- }
-
- var refXProp = new Property(document, 'refX', refX);
- var refYProp = new Property(document, 'refY', refY);
- var hasRefs = refXProp.hasValue() && refYProp.hasValue();
-
- if (hasRefs) {
- ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));
- }
-
- if (clip) {
- var scaledClipX = scaleMin * clipX;
- var scaledClipY = scaleMin * clipY;
- ctx.beginPath();
- ctx.moveTo(scaledClipX, scaledClipY);
- ctx.lineTo(width, scaledClipY);
- ctx.lineTo(width, height);
- ctx.lineTo(scaledClipX, height);
- ctx.closePath();
- ctx.clip();
- }
-
- if (!hasRefs) {
- var isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;
- var isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;
- var isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;
- var isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;
-
- if (/^xMid/.test(align) && (isMeetMinY || isSliceMaxY)) {
- ctx.translate(width / 2.0 - finalDesiredWidth / 2.0, 0);
- }
-
- if (/YMid$/.test(align) && (isMeetMinX || isSliceMaxX)) {
- ctx.translate(0, height / 2.0 - finalDesiredHeight / 2.0);
- }
-
- if (/^xMax/.test(align) && (isMeetMinY || isSliceMaxY)) {
- ctx.translate(width - finalDesiredWidth, 0);
- }
-
- if (/YMax$/.test(align) && (isMeetMinX || isSliceMaxX)) {
- ctx.translate(0, height - finalDesiredHeight);
- }
- } // scale
-
-
- switch (true) {
- case align === 'none':
- ctx.scale(scaleX, scaleY);
- break;
-
- case meetOrSlice === 'meet':
- ctx.scale(scaleMin, scaleMin);
- break;
-
- case meetOrSlice === 'slice':
- ctx.scale(scaleMax, scaleMax);
- break;
- } // translate
-
-
- ctx.translate(-minX, -minY);
- }
- }, {
- key: "start",
- value: function start(element) {
- var _this = this;
-
- var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- _ref3$enableRedraw = _ref3.enableRedraw,
- enableRedraw = _ref3$enableRedraw === void 0 ? false : _ref3$enableRedraw,
- _ref3$ignoreMouse = _ref3.ignoreMouse,
- ignoreMouse = _ref3$ignoreMouse === void 0 ? false : _ref3$ignoreMouse,
- _ref3$ignoreAnimation = _ref3.ignoreAnimation,
- ignoreAnimation = _ref3$ignoreAnimation === void 0 ? false : _ref3$ignoreAnimation,
- _ref3$ignoreDimension = _ref3.ignoreDimensions,
- ignoreDimensions = _ref3$ignoreDimension === void 0 ? false : _ref3$ignoreDimension,
- _ref3$ignoreClear = _ref3.ignoreClear,
- ignoreClear = _ref3$ignoreClear === void 0 ? false : _ref3$ignoreClear,
- forceRedraw = _ref3.forceRedraw,
- scaleWidth = _ref3.scaleWidth,
- scaleHeight = _ref3.scaleHeight,
- offsetX = _ref3.offsetX,
- offsetY = _ref3.offsetY;
-
- var FRAMERATE = this.FRAMERATE,
- mouse = this.mouse;
- var frameDuration = 1000 / FRAMERATE;
- this.frameDuration = frameDuration;
- this.readyPromise = new Promise(function (resolve) {
- _this.resolveReady = resolve;
- });
-
- if (this.isReady()) {
- this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
- }
-
- if (!enableRedraw) {
- return;
- }
-
- var now = Date.now();
- var then = now;
- var delta = 0;
-
- var tick = function tick() {
- now = Date.now();
- delta = now - then;
-
- if (delta >= frameDuration) {
- then = now - delta % frameDuration;
-
- if (_this.shouldUpdate(ignoreAnimation, forceRedraw)) {
- _this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
-
- mouse.runEvents();
- }
- }
-
- _this.intervalId = raf__WEBPACK_IMPORTED_MODULE_25___default()(tick);
- };
-
- if (!ignoreMouse) {
- mouse.start();
- }
-
- this.intervalId = raf__WEBPACK_IMPORTED_MODULE_25___default()(tick);
- }
- }, {
- key: "stop",
- value: function stop() {
- if (this.intervalId) {
- raf__WEBPACK_IMPORTED_MODULE_25___default().cancel(this.intervalId);
- this.intervalId = null;
- }
-
- this.mouse.stop();
- }
- }, {
- key: "shouldUpdate",
- value: function shouldUpdate(ignoreAnimation, forceRedraw) {
- // need update from animations?
- if (!ignoreAnimation) {
- var frameDuration = this.frameDuration;
- var shouldUpdate = this.animations.reduce(function (shouldUpdate, animation) {
- return animation.update(frameDuration) || shouldUpdate;
- }, false);
-
- if (shouldUpdate) {
- return true;
- }
- } // need update from redraw?
-
-
- if (typeof forceRedraw === 'function' && forceRedraw()) {
- return true;
- }
-
- if (!this.isReadyLock && this.isReady()) {
- return true;
- } // need update from mouse events?
-
-
- if (this.mouse.hasEvents()) {
- return true;
- }
-
- return false;
- }
- }, {
- key: "render",
- value: function render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {
- var CLIENT_WIDTH = this.CLIENT_WIDTH,
- CLIENT_HEIGHT = this.CLIENT_HEIGHT,
- viewPort = this.viewPort,
- ctx = this.ctx,
- isFirstRender = this.isFirstRender;
- var canvas = ctx.canvas;
- viewPort.clear();
-
- if (canvas.width && canvas.height) {
- viewPort.setCurrent(canvas.width, canvas.height);
- } else {
- viewPort.setCurrent(CLIENT_WIDTH, CLIENT_HEIGHT);
- }
-
- var widthStyle = element.getStyle('width');
- var heightStyle = element.getStyle('height');
-
- if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {
- // set canvas size
- if (widthStyle.hasValue()) {
- canvas.width = widthStyle.getPixels('x');
-
- if (canvas.style) {
- canvas.style.width = "".concat(canvas.width, "px");
- }
- }
-
- if (heightStyle.hasValue()) {
- canvas.height = heightStyle.getPixels('y');
-
- if (canvas.style) {
- canvas.style.height = "".concat(canvas.height, "px");
- }
- }
- }
-
- var cWidth = canvas.clientWidth || canvas.width;
- var cHeight = canvas.clientHeight || canvas.height;
-
- if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {
- cWidth = widthStyle.getPixels('x');
- cHeight = heightStyle.getPixels('y');
- }
-
- viewPort.setCurrent(cWidth, cHeight);
-
- if (typeof offsetX === 'number') {
- element.getAttribute('x', true).setValue(offsetX);
- }
-
- if (typeof offsetY === 'number') {
- element.getAttribute('y', true).setValue(offsetY);
- }
-
- if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {
- var viewBox = toNumbers(element.getAttribute('viewBox').getString());
- var xRatio = 0;
- var yRatio = 0;
-
- if (typeof scaleWidth === 'number') {
- var _widthStyle = element.getStyle('width');
-
- if (_widthStyle.hasValue()) {
- xRatio = _widthStyle.getPixels('x') / scaleWidth;
- } else if (!isNaN(viewBox[2])) {
- xRatio = viewBox[2] / scaleWidth;
- }
- }
-
- if (typeof scaleHeight === 'number') {
- var _heightStyle = element.getStyle('height');
-
- if (_heightStyle.hasValue()) {
- yRatio = _heightStyle.getPixels('y') / scaleHeight;
- } else if (!isNaN(viewBox[3])) {
- yRatio = viewBox[3] / scaleHeight;
- }
- }
-
- if (!xRatio) {
- xRatio = yRatio;
- }
-
- if (!yRatio) {
- yRatio = xRatio;
- }
-
- element.getAttribute('width', true).setValue(scaleWidth);
- element.getAttribute('height', true).setValue(scaleHeight);
- var transformStyle = element.getStyle('transform', true, true);
- transformStyle.setValue("".concat(transformStyle.getString(), " scale(").concat(1.0 / xRatio, ", ").concat(1.0 / yRatio, ")"));
- } // clear and render
-
-
- if (!ignoreClear) {
- ctx.clearRect(0, 0, cWidth, cHeight);
- }
-
- element.render(ctx);
-
- if (isFirstRender) {
- this.isFirstRender = false;
- }
- }
- }]);
-
- return Screen;
- }();
- Screen.defaultWindow = defaultWindow;
- Screen.defaultFetch = defaultFetch;
-
- var defaultFetch$1 = Screen.defaultFetch;
- var DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : null;
-
- var Parser = /*#__PURE__*/function () {
- function Parser() {
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
- _ref$fetch = _ref.fetch,
- fetch = _ref$fetch === void 0 ? defaultFetch$1 : _ref$fetch,
- _ref$DOMParser = _ref.DOMParser,
- DOMParser = _ref$DOMParser === void 0 ? DefaultDOMParser : _ref$DOMParser;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Parser);
-
- this.fetch = fetch;
- this.DOMParser = DOMParser;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Parser, [{
- key: "parse",
- value: function () {
- var _parse = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(resource) {
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- if (!/^</.test(resource)) {
- _context.next = 2;
- break;
- }
-
- return _context.abrupt("return", this.parseFromString(resource));
-
- case 2:
- return _context.abrupt("return", this.load(resource));
-
- case 3:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this);
- }));
-
- function parse(_x) {
- return _parse.apply(this, arguments);
- }
-
- return parse;
- }()
- }, {
- key: "parseFromString",
- value: function parseFromString(xml) {
- var parser = new this.DOMParser();
-
- try {
- return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));
- } catch (err) {
- return this.checkDocument(parser.parseFromString(xml, 'text/xml'));
- }
- }
- }, {
- key: "checkDocument",
- value: function checkDocument(document) {
- var parserError = document.getElementsByTagName('parsererror')[0];
-
- if (parserError) {
- throw new Error(parserError.textContent);
- }
-
- return document;
- }
- }, {
- key: "load",
- value: function () {
- var _load = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee2(url) {
- var response, xml;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
- while (1) {
- switch (_context2.prev = _context2.next) {
- case 0:
- _context2.next = 2;
- return this.fetch(url);
-
- case 2:
- response = _context2.sent;
- _context2.next = 5;
- return response.text();
-
- case 5:
- xml = _context2.sent;
- return _context2.abrupt("return", this.parseFromString(xml));
-
- case 7:
- case "end":
- return _context2.stop();
- }
- }
- }, _callee2, this);
- }));
-
- function load(_x2) {
- return _load.apply(this, arguments);
- }
-
- return load;
- }()
- }]);
-
- return Parser;
- }();
-
- var Translate = /*#__PURE__*/function () {
- function Translate(_, point) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Translate);
-
- this.type = 'translate';
- this.point = null;
- this.point = Point.parse(point);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Translate, [{
- key: "apply",
- value: function apply(ctx) {
- var _this$point = this.point,
- x = _this$point.x,
- y = _this$point.y;
- ctx.translate(x || 0.0, y || 0.0);
- }
- }, {
- key: "unapply",
- value: function unapply(ctx) {
- var _this$point2 = this.point,
- x = _this$point2.x,
- y = _this$point2.y;
- ctx.translate(-1.0 * x || 0.0, -1.0 * y || 0.0);
- }
- }, {
- key: "applyToPoint",
- value: function applyToPoint(point) {
- var _this$point3 = this.point,
- x = _this$point3.x,
- y = _this$point3.y;
- point.applyTransform([1, 0, 0, 1, x || 0.0, y || 0.0]);
- }
- }]);
-
- return Translate;
- }();
-
- var Rotate = /*#__PURE__*/function () {
- function Rotate(document, rotate) {
- var transformOrigin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Rotate);
-
- this.type = 'rotate';
- this.angle = null;
- this.cx = 0;
- this.cy = 0;
- var numbers = toNumbers(rotate);
- this.angle = new Property(document, 'angle', numbers[0]);
- this.cx = (numbers[1] || 0) + (transformOrigin[0] || 0);
- this.cy = (numbers[2] || 0) + (transformOrigin[1] || 0);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Rotate, [{
- key: "apply",
- value: function apply(ctx) {
- var cx = this.cx,
- cy = this.cy,
- angle = this.angle;
- ctx.translate(cx, cy);
- ctx.rotate(angle.getRadians());
- ctx.translate(-cx, -cy);
- }
- }, {
- key: "unapply",
- value: function unapply(ctx) {
- var cx = this.cx,
- cy = this.cy,
- angle = this.angle;
- ctx.translate(cx, cy);
- ctx.rotate(-1.0 * angle.getRadians());
- ctx.translate(-cx, -cy);
- }
- }, {
- key: "applyToPoint",
- value: function applyToPoint(point) {
- var cx = this.cx,
- cy = this.cy,
- angle = this.angle;
- var rad = angle.getRadians();
- point.applyTransform([1, 0, 0, 1, cx || 0.0, cy || 0.0 // this.p.y
- ]);
- point.applyTransform([Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0]);
- point.applyTransform([1, 0, 0, 1, -cx || 0.0, -cy || 0.0 // -this.p.y
- ]);
- }
- }]);
-
- return Rotate;
- }();
-
- var Scale = /*#__PURE__*/function () {
- function Scale(_, scale) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Scale);
-
- this.type = 'scale';
- this.scale = null;
- var scaleSize = Point.parseScale(scale); // Workaround for node-canvas
-
- if (scaleSize.x === 0 || scaleSize.y === 0) {
- scaleSize.x = PSEUDO_ZERO;
- scaleSize.y = PSEUDO_ZERO;
- }
-
- this.scale = scaleSize;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Scale, [{
- key: "apply",
- value: function apply(ctx) {
- var _this$scale = this.scale,
- x = _this$scale.x,
- y = _this$scale.y;
- ctx.scale(x, y || x);
- }
- }, {
- key: "unapply",
- value: function unapply(ctx) {
- var _this$scale2 = this.scale,
- x = _this$scale2.x,
- y = _this$scale2.y;
- ctx.scale(1.0 / x, 1.0 / y || x);
- }
- }, {
- key: "applyToPoint",
- value: function applyToPoint(point) {
- var _this$scale3 = this.scale,
- x = _this$scale3.x,
- y = _this$scale3.y;
- point.applyTransform([x || 0.0, 0, 0, y || 0.0, 0, 0]);
- }
- }]);
-
- return Scale;
- }();
-
- var Matrix = /*#__PURE__*/function () {
- function Matrix(_, matrix) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Matrix);
-
- this.type = 'matrix';
- this.matrix = [];
- this.matrix = toNumbers(matrix);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Matrix, [{
- key: "apply",
- value: function apply(ctx) {
- var matrix = this.matrix;
- ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
- }
- }, {
- key: "unapply",
- value: function unapply(ctx) {
- var matrix = this.matrix;
- var a = matrix[0];
- var b = matrix[2];
- var c = matrix[4];
- var d = matrix[1];
- var e = matrix[3];
- var f = matrix[5];
- var g = 0.0;
- var h = 0.0;
- var i = 1.0;
- var det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));
- ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));
- }
- }, {
- key: "applyToPoint",
- value: function applyToPoint(point) {
- point.applyTransform(this.matrix);
- }
- }]);
-
- return Matrix;
- }();
-
- function _createSuper(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var Skew = /*#__PURE__*/function (_Matrix) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(Skew, _Matrix);
-
- var _super = _createSuper(Skew);
-
- function Skew(document, skew) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Skew);
-
- _this = _super.call(this, document, skew);
- _this.type = 'skew';
- _this.angle = null;
- _this.angle = new Property(document, 'angle', skew);
- return _this;
- }
-
- return Skew;
- }(Matrix);
-
- function _createSuper$1(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$1()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var SkewX = /*#__PURE__*/function (_Skew) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SkewX, _Skew);
-
- var _super = _createSuper$1(SkewX);
-
- function SkewX(document, skew) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SkewX);
-
- _this = _super.call(this, document, skew);
- _this.type = 'skewX';
- _this.matrix = [1, 0, Math.tan(_this.angle.getRadians()), 1, 0, 0];
- return _this;
- }
-
- return SkewX;
- }(Skew);
-
- function _createSuper$2(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$2()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var SkewY = /*#__PURE__*/function (_Skew) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SkewY, _Skew);
-
- var _super = _createSuper$2(SkewY);
-
- function SkewY(document, skew) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SkewY);
-
- _this = _super.call(this, document, skew);
- _this.type = 'skewY';
- _this.matrix = [1, Math.tan(_this.angle.getRadians()), 0, 1, 0, 0];
- return _this;
- }
-
- return SkewY;
- }(Skew);
-
- function parseTransforms(transform) {
- return compressSpaces(transform).trim().replace(/\)([a-zA-Z])/g, ') $1').replace(/\)(\s?,\s?)/g, ') ').split(/\s(?=[a-z])/);
- }
-
- function parseTransform(transform) {
- var _transform$split = transform.split('('),
- _transform$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_transform$split, 2),
- type = _transform$split2[0],
- value = _transform$split2[1];
-
- return [type.trim(), value.trim().replace(')', '')];
- }
-
- var Transform = /*#__PURE__*/function () {
- function Transform(document, transform, transformOrigin) {
- var _this = this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Transform);
-
- this.document = document;
- this.transforms = [];
- var data = parseTransforms(transform);
- var originCoords = transformOrigin ? toNumbers(transformOrigin) : [];
- data.forEach(function (transform) {
- if (transform === 'none') {
- return;
- }
-
- var _parseTransform = parseTransform(transform),
- _parseTransform2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_parseTransform, 2),
- type = _parseTransform2[0],
- value = _parseTransform2[1];
-
- var TransformType = Transform.transformTypes[type];
-
- if (typeof TransformType !== 'undefined') {
- _this.transforms.push(new TransformType(_this.document, value, originCoords));
- }
- });
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Transform, [{
- key: "apply",
- value: function apply(ctx) {
- var transforms = this.transforms;
- var len = transforms.length;
-
- for (var i = 0; i < len; i++) {
- transforms[i].apply(ctx);
- }
- }
- }, {
- key: "unapply",
- value: function unapply(ctx) {
- var transforms = this.transforms;
- var len = transforms.length;
-
- for (var i = len - 1; i >= 0; i--) {
- transforms[i].unapply(ctx);
- }
- } // TODO: applyToPoint unused ... remove?
-
- }, {
- key: "applyToPoint",
- value: function applyToPoint(point) {
- var transforms = this.transforms;
- var len = transforms.length;
-
- for (var i = 0; i < len; i++) {
- transforms[i].applyToPoint(point);
- }
- }
- }], [{
- key: "fromElement",
- value: function fromElement(document, element) {
- var transformStyle = element.getStyle('transform', false, true);
- var transformOriginStyle = element.getStyle('transform-origin', false, true);
-
- if (transformStyle.hasValue()) {
- return new Transform(document, transformStyle.getString(), transformOriginStyle.getString());
- }
-
- return null;
- }
- }]);
-
- return Transform;
- }();
- Transform.transformTypes = {
- translate: Translate,
- rotate: Rotate,
- scale: Scale,
- matrix: Matrix,
- skewX: SkewX,
- skewY: SkewY
- };
-
- var Element = /*#__PURE__*/function () {
- function Element(document, node) {
- var _this = this;
-
- var captureTextNodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Element);
-
- this.document = document;
- this.node = node;
- this.captureTextNodes = captureTextNodes;
- this.attributes = {};
- this.styles = {};
- this.stylesSpecificity = {};
- this.animationFrozen = false;
- this.animationFrozenValue = '';
- this.parent = null;
- this.children = [];
-
- if (!node || node.nodeType !== 1) {
- // ELEMENT_NODE
- return;
- } // add attributes
-
-
- Array.from(node.attributes).forEach(function (attribute) {
- var nodeName = normalizeAttributeName(attribute.nodeName);
- _this.attributes[nodeName] = new Property(document, nodeName, attribute.value);
- });
- this.addStylesFromStyleDefinition(); // add inline styles
-
- if (this.getAttribute('style').hasValue()) {
- var styles = this.getAttribute('style').getString().split(';').map(function (_) {
- return _.trim();
- });
- styles.forEach(function (style) {
- if (!style) {
- return;
- }
-
- var _style$split$map = style.split(':').map(function (_) {
- return _.trim();
- }),
- _style$split$map2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_style$split$map, 2),
- name = _style$split$map2[0],
- value = _style$split$map2[1];
-
- _this.styles[name] = new Property(document, name, value);
- });
- }
-
- var definitions = document.definitions;
- var id = this.getAttribute('id'); // add id
-
- if (id.hasValue()) {
- if (!definitions[id.getValue()]) {
- definitions[id.getValue()] = this;
- }
- }
-
- Array.from(node.childNodes).forEach(function (childNode) {
- if (childNode.nodeType === 1) {
- _this.addChild(childNode); // ELEMENT_NODE
-
- } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {
- var textNode = document.createTextNode(childNode);
-
- if (textNode.getText().length > 0) {
- _this.addChild(textNode); // TEXT_NODE
-
- }
- }
- });
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Element, [{
- key: "getAttribute",
- value: function getAttribute(name) {
- var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- var attr = this.attributes[name];
-
- if (!attr && createIfNotExists) {
- var _attr = new Property(this.document, name, '');
-
- this.attributes[name] = _attr;
- return _attr;
- }
-
- return attr || Property.empty(this.document);
- }
- }, {
- key: "getHrefAttribute",
- value: function getHrefAttribute() {
- for (var key in this.attributes) {
- if (key === 'href' || /:href$/.test(key)) {
- return this.attributes[key];
- }
- }
-
- return Property.empty(this.document);
- }
- }, {
- key: "getStyle",
- value: function getStyle(name) {
- var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- var skipAncestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- var style = this.styles[name];
-
- if (style) {
- return style;
- }
-
- var attr = this.getAttribute(name);
-
- if (attr && attr.hasValue()) {
- this.styles[name] = attr; // move up to me to cache
-
- return attr;
- }
-
- if (!skipAncestors) {
- var parent = this.parent;
-
- if (parent) {
- var parentStyle = parent.getStyle(name);
-
- if (parentStyle && parentStyle.hasValue()) {
- return parentStyle;
- }
- }
- }
-
- if (createIfNotExists) {
- var _style = new Property(this.document, name, '');
-
- this.styles[name] = _style;
- return _style;
- }
-
- return style || Property.empty(this.document);
- }
- }, {
- key: "render",
- value: function render(ctx) {
- // don't render display=none
- // don't render visibility=hidden
- if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {
- return;
- }
-
- ctx.save();
-
- if (this.getStyle('mask').hasValue()) {
- // mask
- var mask = this.getStyle('mask').getDefinition();
-
- if (mask) {
- this.applyEffects(ctx);
- mask.apply(ctx, this);
- }
- } else if (this.getStyle('filter').getValue('none') !== 'none') {
- // filter
- var filter = this.getStyle('filter').getDefinition();
-
- if (filter) {
- this.applyEffects(ctx);
- filter.apply(ctx, this);
- }
- } else {
- this.setContext(ctx);
- this.renderChildren(ctx);
- this.clearContext(ctx);
- }
-
- ctx.restore();
- }
- }, {
- key: "setContext",
- value: function setContext(_) {}
- }, {
- key: "applyEffects",
- value: function applyEffects(ctx) {
- // transform
- var transform = Transform.fromElement(this.document, this);
-
- if (transform) {
- transform.apply(ctx);
- } // clip
-
-
- var clipPathStyleProp = this.getStyle('clip-path', false, true);
-
- if (clipPathStyleProp.hasValue()) {
- var clip = clipPathStyleProp.getDefinition();
-
- if (clip) {
- clip.apply(ctx);
- }
- }
- }
- }, {
- key: "clearContext",
- value: function clearContext(_) {}
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- this.children.forEach(function (child) {
- child.render(ctx);
- });
- }
- }, {
- key: "addChild",
- value: function addChild(childNode) {
- var child = childNode instanceof Element ? childNode : this.document.createElement(childNode);
- child.parent = this;
-
- if (!Element.ignoreChildTypes.includes(child.type)) {
- this.children.push(child);
- }
- }
- }, {
- key: "matchesSelector",
- value: function matchesSelector(selector) {
- var node = this.node;
-
- if (typeof node.matches === 'function') {
- return node.matches(selector);
- }
-
- var styleClasses = node.getAttribute('class');
-
- if (!styleClasses || styleClasses === '') {
- return false;
- }
-
- return styleClasses.split(' ').some(function (styleClass) {
- if (".".concat(styleClass) === selector) {
- return true;
- }
- });
- }
- }, {
- key: "addStylesFromStyleDefinition",
- value: function addStylesFromStyleDefinition() {
- var _this$document = this.document,
- styles = _this$document.styles,
- stylesSpecificity = _this$document.stylesSpecificity;
-
- for (var selector in styles) {
- if (selector[0] !== '@' && this.matchesSelector(selector)) {
- var style = styles[selector];
- var specificity = stylesSpecificity[selector];
-
- if (style) {
- for (var name in style) {
- var existingSpecificity = this.stylesSpecificity[name];
-
- if (typeof existingSpecificity === 'undefined') {
- existingSpecificity = '000';
- }
-
- if (specificity >= existingSpecificity) {
- this.styles[name] = style[name];
- this.stylesSpecificity[name] = specificity;
- }
- }
- }
- }
- }
- }
- }, {
- key: "removeStyles",
- value: function removeStyles(element, ignoreStyles) {
- var toRestore = ignoreStyles.reduce(function (toRestore, name) {
- var styleProp = element.getStyle(name);
-
- if (!styleProp.hasValue()) {
- return toRestore;
- }
-
- var value = styleProp.getString();
- styleProp.setValue('');
- return [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_39__.default)(toRestore), [[name, value]]);
- }, []);
- return toRestore;
- }
- }, {
- key: "restoreStyles",
- value: function restoreStyles(element, styles) {
- styles.forEach(function (_ref) {
- var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_ref, 2),
- name = _ref2[0],
- value = _ref2[1];
-
- element.getStyle(name, true).setValue(value);
- });
- }
- }]);
-
- return Element;
- }();
- Element.ignoreChildTypes = ['title'];
-
- function _createSuper$3(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$3()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var UnknownElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(UnknownElement, _Element);
-
- var _super = _createSuper$3(UnknownElement);
-
- function UnknownElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, UnknownElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
-
- return _this;
- }
-
- return UnknownElement;
- }(Element);
-
- function wrapFontFamily(fontFamily) {
- var trimmed = fontFamily.trim();
- return /^('|")/.test(trimmed) ? trimmed : "\"".concat(trimmed, "\"");
- }
-
- function prepareFontFamily(fontFamily) {
- return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');
- }
- /**
- * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
- */
-
-
- function prepareFontStyle(fontStyle) {
- if (!fontStyle) {
- return '';
- }
-
- var targetFontStyle = fontStyle.trim().toLowerCase();
-
- switch (targetFontStyle) {
- case 'normal':
- case 'italic':
- case 'oblique':
- case 'inherit':
- case 'initial':
- case 'unset':
- return targetFontStyle;
-
- default:
- if (/^oblique\s+(-|)\d+deg$/.test(targetFontStyle)) {
- return targetFontStyle;
- }
-
- return '';
- }
- }
- /**
- * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
- */
-
-
- function prepareFontWeight(fontWeight) {
- if (!fontWeight) {
- return '';
- }
-
- var targetFontWeight = fontWeight.trim().toLowerCase();
-
- switch (targetFontWeight) {
- case 'normal':
- case 'bold':
- case 'lighter':
- case 'bolder':
- case 'inherit':
- case 'initial':
- case 'unset':
- return targetFontWeight;
-
- default:
- if (/^[\d.]+$/.test(targetFontWeight)) {
- return targetFontWeight;
- }
-
- return '';
- }
- }
-
- var Font = /*#__PURE__*/function () {
- function Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Font);
-
- var inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};
- this.fontFamily = fontFamily || inheritFont.fontFamily;
- this.fontSize = fontSize || inheritFont.fontSize;
- this.fontStyle = fontStyle || inheritFont.fontStyle;
- this.fontWeight = fontWeight || inheritFont.fontWeight;
- this.fontVariant = fontVariant || inheritFont.fontVariant;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Font, [{
- key: "toString",
- value: function toString() {
- return [prepareFontStyle(this.fontStyle), this.fontVariant, prepareFontWeight(this.fontWeight), this.fontSize, // Wrap fontFamily only on nodejs and only for canvas.ctx
- prepareFontFamily(this.fontFamily)].join(' ').trim();
- }
- }], [{
- key: "parse",
- value: function parse() {
- var font = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
- var inherit = arguments.length > 1 ? arguments[1] : undefined;
- var fontStyle = '';
- var fontVariant = '';
- var fontWeight = '';
- var fontSize = '';
- var fontFamily = '';
- var parts = compressSpaces(font).trim().split(' ');
- var set = {
- fontSize: false,
- fontStyle: false,
- fontWeight: false,
- fontVariant: false
- };
- parts.forEach(function (part) {
- switch (true) {
- case !set.fontStyle && Font.styles.includes(part):
- if (part !== 'inherit') {
- fontStyle = part;
- }
-
- set.fontStyle = true;
- break;
-
- case !set.fontVariant && Font.variants.includes(part):
- if (part !== 'inherit') {
- fontVariant = part;
- }
-
- set.fontStyle = true;
- set.fontVariant = true;
- break;
-
- case !set.fontWeight && Font.weights.includes(part):
- if (part !== 'inherit') {
- fontWeight = part;
- }
-
- set.fontStyle = true;
- set.fontVariant = true;
- set.fontWeight = true;
- break;
-
- case !set.fontSize:
- if (part !== 'inherit') {
- var _part$split = part.split('/');
-
- var _part$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_part$split, 1);
-
- fontSize = _part$split2[0];
- }
-
- set.fontStyle = true;
- set.fontVariant = true;
- set.fontWeight = true;
- set.fontSize = true;
- break;
-
- default:
- if (part !== 'inherit') {
- fontFamily += part;
- }
-
- }
- });
- return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);
- }
- }]);
-
- return Font;
- }();
- Font.styles = 'normal|italic|oblique|inherit';
- Font.variants = 'normal|small-caps|inherit';
- Font.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
-
- var BoundingBox = /*#__PURE__*/function () {
- function BoundingBox() {
- var x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.NaN;
- var y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.NaN;
- var x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.NaN;
- var y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Number.NaN;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, BoundingBox);
-
- this.x1 = x1;
- this.y1 = y1;
- this.x2 = x2;
- this.y2 = y2;
- this.addPoint(x1, y1);
- this.addPoint(x2, y2);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(BoundingBox, [{
- key: "addPoint",
- value: function addPoint(x, y) {
- if (typeof x !== 'undefined') {
- if (isNaN(this.x1) || isNaN(this.x2)) {
- this.x1 = x;
- this.x2 = x;
- }
-
- if (x < this.x1) {
- this.x1 = x;
- }
-
- if (x > this.x2) {
- this.x2 = x;
- }
- }
-
- if (typeof y !== 'undefined') {
- if (isNaN(this.y1) || isNaN(this.y2)) {
- this.y1 = y;
- this.y2 = y;
- }
-
- if (y < this.y1) {
- this.y1 = y;
- }
-
- if (y > this.y2) {
- this.y2 = y;
- }
- }
- }
- }, {
- key: "addX",
- value: function addX(x) {
- this.addPoint(x, null);
- }
- }, {
- key: "addY",
- value: function addY(y) {
- this.addPoint(null, y);
- }
- }, {
- key: "addBoundingBox",
- value: function addBoundingBox(boundingBox) {
- if (!boundingBox) {
- return;
- }
-
- var x1 = boundingBox.x1,
- y1 = boundingBox.y1,
- x2 = boundingBox.x2,
- y2 = boundingBox.y2;
- this.addPoint(x1, y1);
- this.addPoint(x2, y2);
- }
- }, {
- key: "sumCubic",
- value: function sumCubic(t, p0, p1, p2, p3) {
- return Math.pow(1 - t, 3) * p0 + 3 * Math.pow(1 - t, 2) * t * p1 + 3 * (1 - t) * Math.pow(t, 2) * p2 + Math.pow(t, 3) * p3;
- }
- }, {
- key: "bezierCurveAdd",
- value: function bezierCurveAdd(forX, p0, p1, p2, p3) {
- var b = 6 * p0 - 12 * p1 + 6 * p2;
- var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;
- var c = 3 * p1 - 3 * p0;
-
- if (a === 0) {
- if (b === 0) {
- return;
- }
-
- var t = -c / b;
-
- if (0 < t && t < 1) {
- if (forX) {
- this.addX(this.sumCubic(t, p0, p1, p2, p3));
- } else {
- this.addY(this.sumCubic(t, p0, p1, p2, p3));
- }
- }
-
- return;
- }
-
- var b2ac = Math.pow(b, 2) - 4 * c * a;
-
- if (b2ac < 0) {
- return;
- }
-
- var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
-
- if (0 < t1 && t1 < 1) {
- if (forX) {
- this.addX(this.sumCubic(t1, p0, p1, p2, p3));
- } else {
- this.addY(this.sumCubic(t1, p0, p1, p2, p3));
- }
- }
-
- var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
-
- if (0 < t2 && t2 < 1) {
- if (forX) {
- this.addX(this.sumCubic(t2, p0, p1, p2, p3));
- } else {
- this.addY(this.sumCubic(t2, p0, p1, p2, p3));
- }
- }
- } // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
-
- }, {
- key: "addBezierCurve",
- value: function addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
- this.addPoint(p0x, p0y);
- this.addPoint(p3x, p3y);
- this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);
- this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);
- }
- }, {
- key: "addQuadraticCurve",
- value: function addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {
- var cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
-
- var cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
-
- var cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
-
- var cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
-
- this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
- }
- }, {
- key: "isPointInBox",
- value: function isPointInBox(x, y) {
- var x1 = this.x1,
- y1 = this.y1,
- x2 = this.x2,
- y2 = this.y2;
- return x1 <= x && x <= x2 && y1 <= y && y <= y2;
- }
- }, {
- key: "x",
- get: function get() {
- return this.x1;
- }
- }, {
- key: "y",
- get: function get() {
- return this.y1;
- }
- }, {
- key: "width",
- get: function get() {
- return this.x2 - this.x1;
- }
- }, {
- key: "height",
- get: function get() {
- return this.y2 - this.y1;
- }
- }]);
-
- return BoundingBox;
- }();
-
- function _createSuper$4(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$4()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var RenderedElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RenderedElement, _Element);
-
- var _super = _createSuper$4(RenderedElement);
-
- function RenderedElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RenderedElement);
-
- _this = _super.apply(this, arguments);
- _this.modifiedEmSizeStack = false;
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RenderedElement, [{
- key: "calculateOpacity",
- value: function calculateOpacity() {
- var opacity = 1.0; // tslint:disable-next-line: no-this-assignment
-
- var element = this;
-
- while (element) {
- var opacityStyle = element.getStyle('opacity', false, true); // no ancestors on style call
-
- if (opacityStyle.hasValue()) {
- opacity *= opacityStyle.getNumber();
- }
-
- element = element.parent;
- }
-
- return opacity;
- }
- }, {
- key: "setContext",
- value: function setContext(ctx) {
- var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
-
- if (!fromMeasure) {
- // causes stack overflow when measuring text with gradients
- // fill
- var fillStyleProp = this.getStyle('fill');
- var fillOpacityStyleProp = this.getStyle('fill-opacity');
- var strokeStyleProp = this.getStyle('stroke');
- var strokeOpacityProp = this.getStyle('stroke-opacity');
-
- if (fillStyleProp.isUrlDefinition()) {
- var fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);
-
- if (fillStyle) {
- ctx.fillStyle = fillStyle;
- }
- } else if (fillStyleProp.hasValue()) {
- if (fillStyleProp.getString() === 'currentColor') {
- fillStyleProp.setValue(this.getStyle('color').getColor());
- }
-
- var _fillStyle = fillStyleProp.getColor();
-
- if (_fillStyle !== 'inherit') {
- ctx.fillStyle = _fillStyle === 'none' ? 'rgba(0,0,0,0)' : _fillStyle;
- }
- }
-
- if (fillOpacityStyleProp.hasValue()) {
- var _fillStyle2 = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();
-
- ctx.fillStyle = _fillStyle2;
- } // stroke
-
-
- if (strokeStyleProp.isUrlDefinition()) {
- var strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);
-
- if (strokeStyle) {
- ctx.strokeStyle = strokeStyle;
- }
- } else if (strokeStyleProp.hasValue()) {
- if (strokeStyleProp.getString() === 'currentColor') {
- strokeStyleProp.setValue(this.getStyle('color').getColor());
- }
-
- var _strokeStyle = strokeStyleProp.getString();
-
- if (_strokeStyle !== 'inherit') {
- ctx.strokeStyle = _strokeStyle === 'none' ? 'rgba(0,0,0,0)' : _strokeStyle;
- }
- }
-
- if (strokeOpacityProp.hasValue()) {
- var _strokeStyle2 = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();
-
- ctx.strokeStyle = _strokeStyle2;
- }
-
- var strokeWidthStyleProp = this.getStyle('stroke-width');
-
- if (strokeWidthStyleProp.hasValue()) {
- var newLineWidth = strokeWidthStyleProp.getPixels();
- ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)
- : newLineWidth;
- }
-
- var strokeLinecapStyleProp = this.getStyle('stroke-linecap');
- var strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');
- var strokeMiterlimitProp = this.getStyle('stroke-miterlimit');
- var pointOrderStyleProp = this.getStyle('paint-order');
- var strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');
- var strokeDashoffsetProp = this.getStyle('stroke-dashoffset');
-
- if (strokeLinecapStyleProp.hasValue()) {
- ctx.lineCap = strokeLinecapStyleProp.getString();
- }
-
- if (strokeLinejoinStyleProp.hasValue()) {
- ctx.lineJoin = strokeLinejoinStyleProp.getString();
- }
-
- if (strokeMiterlimitProp.hasValue()) {
- ctx.miterLimit = strokeMiterlimitProp.getNumber();
- }
-
- if (pointOrderStyleProp.hasValue()) {
- // ?
- ctx.paintOrder = pointOrderStyleProp.getValue();
- }
-
- if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {
- var gaps = toNumbers(strokeDasharrayStyleProp.getString());
-
- if (typeof ctx.setLineDash !== 'undefined') {
- ctx.setLineDash(gaps);
- } else if (typeof ctx.webkitLineDash !== 'undefined') {
- ctx.webkitLineDash = gaps;
- } else if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {
- ctx.mozDash = gaps;
- }
-
- var offset = strokeDashoffsetProp.getPixels();
-
- if (typeof ctx.lineDashOffset !== 'undefined') {
- ctx.lineDashOffset = offset;
- } else if (typeof ctx.webkitLineDashOffset !== 'undefined') {
- ctx.webkitLineDashOffset = offset;
- } else if (typeof ctx.mozDashOffset !== 'undefined') {
- ctx.mozDashOffset = offset;
- }
- }
- } // font
-
-
- this.modifiedEmSizeStack = false;
-
- if (typeof ctx.font !== 'undefined') {
- var fontStyleProp = this.getStyle('font');
- var fontStyleStyleProp = this.getStyle('font-style');
- var fontVariantStyleProp = this.getStyle('font-variant');
- var fontWeightStyleProp = this.getStyle('font-weight');
- var fontSizeStyleProp = this.getStyle('font-size');
- var fontFamilyStyleProp = this.getStyle('font-family');
- var font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue() ? "".concat(fontSizeStyleProp.getPixels(true), "px") : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));
- fontStyleStyleProp.setValue(font.fontStyle);
- fontVariantStyleProp.setValue(font.fontVariant);
- fontWeightStyleProp.setValue(font.fontWeight);
- fontSizeStyleProp.setValue(font.fontSize);
- fontFamilyStyleProp.setValue(font.fontFamily);
- ctx.font = font.toString();
-
- if (fontSizeStyleProp.isPixels()) {
- this.document.emSize = fontSizeStyleProp.getPixels();
- this.modifiedEmSizeStack = true;
- }
- }
-
- if (!fromMeasure) {
- // effects
- this.applyEffects(ctx); // opacity
-
- ctx.globalAlpha = this.calculateOpacity();
- }
- }
- }, {
- key: "clearContext",
- value: function clearContext(ctx) {
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(RenderedElement.prototype), "clearContext", this).call(this, ctx);
-
- if (this.modifiedEmSizeStack) {
- this.document.popEmSize();
- }
- }
- }]);
-
- return RenderedElement;
- }(Element);
-
- function _createSuper$5(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$5()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TextElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextElement, _RenderedElement);
-
- var _super = _createSuper$5(TextElement);
-
- function TextElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextElement);
-
- _this = _super.call(this, document, node, (this instanceof TextElement ? this.constructor : void 0) === TextElement ? true : captureTextNodes);
- _this.type = 'text';
- _this.x = 0;
- _this.y = 0;
- _this.measureCache = -1;
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TextElement, [{
- key: "setContext",
- value: function setContext(ctx) {
- var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
-
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(TextElement.prototype), "setContext", this).call(this, ctx, fromMeasure);
-
- var textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();
-
- if (textBaseline) {
- ctx.textBaseline = textBaseline;
- }
- }
- }, {
- key: "initializeCoordinates",
- value: function initializeCoordinates(ctx) {
- this.x = this.getAttribute('x').getPixels('x');
- this.y = this.getAttribute('y').getPixels('y');
- var dxAttr = this.getAttribute('dx');
- var dyAttr = this.getAttribute('dy');
-
- if (dxAttr.hasValue()) {
- this.x += dxAttr.getPixels('x');
- }
-
- if (dyAttr.hasValue()) {
- this.y += dyAttr.getPixels('y');
- }
-
- this.x += this.getAnchorDelta(ctx, this, 0);
- }
- }, {
- key: "getBoundingBox",
- value: function getBoundingBox(ctx) {
- var _this2 = this;
-
- if (this.type !== 'text') {
- return this.getTElementBoundingBox(ctx);
- }
-
- this.initializeCoordinates(ctx);
- var boundingBox = null;
- this.children.forEach(function (_, i) {
- var childBoundingBox = _this2.getChildBoundingBox(ctx, _this2, _this2, i);
-
- if (!boundingBox) {
- boundingBox = childBoundingBox;
- } else {
- boundingBox.addBoundingBox(childBoundingBox);
- }
- });
- return boundingBox;
- }
- }, {
- key: "getFontSize",
- value: function getFontSize() {
- var document = this.document,
- parent = this.parent;
- var inheritFontSize = Font.parse(document.ctx.font).fontSize;
- var fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);
- return fontSize;
- }
- }, {
- key: "getTElementBoundingBox",
- value: function getTElementBoundingBox(ctx) {
- var fontSize = this.getFontSize();
- return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);
- }
- }, {
- key: "getGlyph",
- value: function getGlyph(font, text, i) {
- var char = text[i];
- var glyph = null;
-
- if (font.isArabic) {
- var len = text.length;
- var prevChar = text[i - 1];
- var nextChar = text[i + 1];
- var arabicForm = 'isolated';
-
- if ((i === 0 || prevChar === ' ') && i < len - 2 && nextChar !== ' ') {
- arabicForm = 'terminal';
- }
-
- if (i > 0 && prevChar !== ' ' && i < len - 2 && nextChar !== ' ') {
- arabicForm = 'medial';
- }
-
- if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {
- arabicForm = 'initial';
- }
-
- if (typeof font.glyphs[char] !== 'undefined') {
- glyph = font.glyphs[char][arabicForm];
-
- if (!glyph && font.glyphs[char].type === 'glyph') {
- glyph = font.glyphs[char];
- }
- }
- } else {
- glyph = font.glyphs[char];
- }
-
- if (!glyph) {
- glyph = font.missingGlyph;
- }
-
- return glyph;
- }
- }, {
- key: "getText",
- value: function getText() {
- return '';
- }
- }, {
- key: "getTextFromNode",
- value: function getTextFromNode(node) {
- var textNode = node || this.node;
- var childNodes = Array.from(textNode.parentNode.childNodes);
- var index = childNodes.indexOf(textNode);
- var lastIndex = childNodes.length - 1;
- var text = compressSpaces(textNode.value || textNode.text || textNode.textContent || '');
-
- if (index === 0) {
- text = trimLeft(text);
- }
-
- if (index === lastIndex) {
- text = trimRight(text);
- }
-
- return text;
- }
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- var _this3 = this;
-
- if (this.type !== 'text') {
- this.renderTElementChildren(ctx);
- return;
- }
-
- this.initializeCoordinates(ctx);
- this.children.forEach(function (_, i) {
- _this3.renderChild(ctx, _this3, _this3, i);
- });
- var mouse = this.document.screen.mouse; // Do not calc bounding box if mouse is not working.
-
- if (mouse.isWorking()) {
- mouse.checkBoundingBox(this, this.getBoundingBox(ctx));
- }
- }
- }, {
- key: "renderTElementChildren",
- value: function renderTElementChildren(ctx) {
- var document = this.document,
- parent = this.parent;
- var renderText = this.getText();
- var customFont = parent.getStyle('font-family').getDefinition();
-
- if (customFont) {
- var unitsPerEm = customFont.fontFace.unitsPerEm;
- var ctxFont = Font.parse(document.ctx.font);
- var fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);
- var fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);
- var scale = fontSize / unitsPerEm;
- var text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;
- var dx = toNumbers(parent.getAttribute('dx').getString());
- var len = text.length;
-
- for (var i = 0; i < len; i++) {
- var glyph = this.getGlyph(customFont, text, i);
- ctx.translate(this.x, this.y);
- ctx.scale(scale, -scale);
- var lw = ctx.lineWidth;
- ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;
-
- if (fontStyle === 'italic') {
- ctx.transform(1, 0, .4, 1, 0, 0);
- }
-
- glyph.render(ctx);
-
- if (fontStyle === 'italic') {
- ctx.transform(1, 0, -.4, 1, 0, 0);
- }
-
- ctx.lineWidth = lw;
- ctx.scale(1 / scale, -1 / scale);
- ctx.translate(-this.x, -this.y);
- this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;
-
- if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
- this.x += dx[i];
- }
- }
-
- return;
- }
-
- var x = this.x,
- y = this.y;
-
- if (ctx.paintOrder === 'stroke') {
- if (ctx.strokeStyle) {
- ctx.strokeText(renderText, x, y);
- }
-
- if (ctx.fillStyle) {
- ctx.fillText(renderText, x, y);
- }
- } else {
- if (ctx.fillStyle) {
- ctx.fillText(renderText, x, y);
- }
-
- if (ctx.strokeStyle) {
- ctx.strokeText(renderText, x, y);
- }
- }
- }
- }, {
- key: "getAnchorDelta",
- value: function getAnchorDelta(ctx, parent, startI) {
- var textAnchor = this.getStyle('text-anchor').getString('start');
-
- if (textAnchor !== 'start') {
- var children = parent.children;
- var len = children.length;
- var child = null;
- var width = 0;
-
- for (var i = startI; i < len; i++) {
- child = children[i];
-
- if (i > startI && child.getAttribute('x').hasValue() || child.getAttribute('text-anchor').hasValue()) {
- break; // new group
- }
-
- width += child.measureTextRecursive(ctx);
- }
-
- return -1 * (textAnchor === 'end' ? width : width / 2.0);
- }
-
- return 0;
- }
- }, {
- key: "adjustChildCoordinates",
- value: function adjustChildCoordinates(ctx, textParent, parent, i) {
- var child = parent.children[i];
-
- if (typeof child.measureText !== 'function') {
- return child;
- }
-
- ctx.save();
- child.setContext(ctx, true);
- var xAttr = child.getAttribute('x');
- var yAttr = child.getAttribute('y');
- var dxAttr = child.getAttribute('dx');
- var dyAttr = child.getAttribute('dy');
- var textAnchor = child.getAttribute('text-anchor').getString('start');
-
- if (i === 0 && child.type !== 'textNode') {
- if (!xAttr.hasValue()) {
- xAttr.setValue(textParent.getAttribute('x').getValue('0'));
- }
-
- if (!yAttr.hasValue()) {
- yAttr.setValue(textParent.getAttribute('y').getValue('0'));
- }
-
- if (!dxAttr.hasValue()) {
- dxAttr.setValue(textParent.getAttribute('dx').getValue('0'));
- }
-
- if (!dyAttr.hasValue()) {
- dyAttr.setValue(textParent.getAttribute('dy').getValue('0'));
- }
- }
-
- if (xAttr.hasValue()) {
- child.x = xAttr.getPixels('x') + textParent.getAnchorDelta(ctx, parent, i);
-
- if (textAnchor !== 'start') {
- var width = child.measureTextRecursive(ctx);
- child.x += -1 * (textAnchor === 'end' ? width : width / 2.0);
- }
-
- if (dxAttr.hasValue()) {
- child.x += dxAttr.getPixels('x');
- }
- } else {
- if (textAnchor !== 'start') {
- var _width = child.measureTextRecursive(ctx);
-
- textParent.x += -1 * (textAnchor === 'end' ? _width : _width / 2.0);
- }
-
- if (dxAttr.hasValue()) {
- textParent.x += dxAttr.getPixels('x');
- }
-
- child.x = textParent.x;
- }
-
- textParent.x = child.x + child.measureText(ctx);
-
- if (yAttr.hasValue()) {
- child.y = yAttr.getPixels('y');
-
- if (dyAttr.hasValue()) {
- child.y += dyAttr.getPixels('y');
- }
- } else {
- if (dyAttr.hasValue()) {
- textParent.y += dyAttr.getPixels('y');
- }
-
- child.y = textParent.y;
- }
-
- textParent.y = child.y;
- child.clearContext(ctx);
- ctx.restore();
- return child;
- }
- }, {
- key: "getChildBoundingBox",
- value: function getChildBoundingBox(ctx, textParent, parent, i) {
- var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
- var boundingBox = child.getBoundingBox(ctx);
-
- if (!boundingBox) {
- return null;
- }
-
- child.children.forEach(function (_, i) {
- var childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);
- boundingBox.addBoundingBox(childBoundingBox);
- });
- return boundingBox;
- }
- }, {
- key: "renderChild",
- value: function renderChild(ctx, textParent, parent, i) {
- var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
- child.render(ctx);
- child.children.forEach(function (_, i) {
- textParent.renderChild(ctx, textParent, child, i);
- });
- }
- }, {
- key: "measureTextRecursive",
- value: function measureTextRecursive(ctx) {
- var width = this.children.reduce(function (width, child) {
- return width + child.measureTextRecursive(ctx);
- }, this.measureText(ctx));
- return width;
- }
- }, {
- key: "measureText",
- value: function measureText(ctx) {
- var measureCache = this.measureCache;
-
- if (~measureCache) {
- return measureCache;
- }
-
- var renderText = this.getText();
- var measure = this.measureTargetText(ctx, renderText);
- this.measureCache = measure;
- return measure;
- }
- }, {
- key: "measureTargetText",
- value: function measureTargetText(ctx, targetText) {
- if (!targetText.length) {
- return 0;
- }
-
- var parent = this.parent;
- var customFont = parent.getStyle('font-family').getDefinition();
-
- if (customFont) {
- var fontSize = this.getFontSize();
- var text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;
- var dx = toNumbers(parent.getAttribute('dx').getString());
- var len = text.length;
- var _measure = 0;
-
- for (var i = 0; i < len; i++) {
- var glyph = this.getGlyph(customFont, text, i);
- _measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
-
- if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
- _measure += dx[i];
- }
- }
-
- return _measure;
- }
-
- if (!ctx.measureText) {
- return targetText.length * 10;
- }
-
- ctx.save();
- this.setContext(ctx, true);
-
- var _ctx$measureText = ctx.measureText(targetText),
- measure = _ctx$measureText.width;
-
- this.clearContext(ctx);
- ctx.restore();
- return measure;
- }
- }]);
-
- return TextElement;
- }(RenderedElement);
-
- function _createSuper$6(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$6()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TSpanElement = /*#__PURE__*/function (_TextElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TSpanElement, _TextElement);
-
- var _super = _createSuper$6(TSpanElement);
-
- function TSpanElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TSpanElement);
-
- _this = _super.call(this, document, node, (this instanceof TSpanElement ? this.constructor : void 0) === TSpanElement ? true : captureTextNodes);
- _this.type = 'tspan'; // if this node has children, then they own the text
-
- _this.text = _this.children.length > 0 ? '' : _this.getTextFromNode();
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TSpanElement, [{
- key: "getText",
- value: function getText() {
- return this.text;
- }
- }]);
-
- return TSpanElement;
- }(TextElement);
-
- function _createSuper$7(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$7()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TextNode = /*#__PURE__*/function (_TSpanElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextNode, _TSpanElement);
-
- var _super = _createSuper$7(TextNode);
-
- function TextNode() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextNode);
-
- _this = _super.apply(this, arguments);
- _this.type = 'textNode';
- return _this;
- }
-
- return TextNode;
- }(TSpanElement);
-
- function preparePath(path) {
- var d = path.replace(/,/gm, ' ') // get rid of all commas
- // As the end of a match can also be the start of the next match, we need to run this replace twice.
- .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2') // suffix commands with spaces
- .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2') // suffix commands with spaces
- .replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2') // prefix commands with spaces
- .replace(/([0-9])([+\-])/gm, '$1 $2') // separate digits on +- signs
- // Again, we need to run this twice to find all occurances
- .replace(/(\.[0-9]*)(\.)/gm, '$1 $2') // separate digits when they start with a comma
- .replace(/(\.[0-9]*)(\.)/gm, '$1 $2') // separate digits when they start with a comma
- .replace(/([Aa](?:\s+(?:[0-9]*\.)?[0-9]+){3})\s+([01])\s*([01])/gm, '$1 $2 $3 '); // shorthand elliptical arc path syntax
-
- return compressSpaces(d).trim();
- }
-
- var PathParser = /*#__PURE__*/function () {
- function PathParser(path) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PathParser);
-
- this.control = null;
- this.start = null;
- this.current = null;
- this.command = '';
- this.tokens = [];
- this.i = -1;
- this.previousCommand = '';
- this.points = [];
- this.angles = [];
- this.tokens = preparePath(path).split(' ');
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PathParser, [{
- key: "reset",
- value: function reset() {
- this.i = -1;
- this.command = '';
- this.previousCommand = '';
- this.start = new Point(0, 0);
- this.control = new Point(0, 0);
- this.current = new Point(0, 0);
- this.points = [];
- this.angles = [];
- }
- }, {
- key: "isEnd",
- value: function isEnd() {
- var i = this.i,
- tokens = this.tokens;
- return i >= tokens.length - 1;
- }
- }, {
- key: "isCommandOrEnd",
- value: function isCommandOrEnd() {
- if (this.isEnd()) {
- return true;
- }
-
- var i = this.i,
- tokens = this.tokens;
- return /^[A-Za-z]$/.test(tokens[i + 1]);
- }
- }, {
- key: "isRelativeCommand",
- value: function isRelativeCommand() {
- switch (this.command) {
- case 'm':
- case 'l':
- case 'h':
- case 'v':
- case 'c':
- case 's':
- case 'q':
- case 't':
- case 'a':
- case 'z':
- return true;
-
- default:
- return false;
- }
- }
- }, {
- key: "getToken",
- value: function getToken() {
- this.i++;
- return this.tokens[this.i];
- }
- }, {
- key: "getScalar",
- value: function getScalar() {
- return parseFloat(this.getToken());
- }
- }, {
- key: "nextCommand",
- value: function nextCommand() {
- this.previousCommand = this.command;
- this.command = this.getToken();
- }
- }, {
- key: "getPoint",
- value: function getPoint() {
- var point = new Point(this.getScalar(), this.getScalar());
- return this.makeAbsolute(point);
- }
- }, {
- key: "getAsControlPoint",
- value: function getAsControlPoint() {
- var point = this.getPoint();
- this.control = point;
- return point;
- }
- }, {
- key: "getAsCurrentPoint",
- value: function getAsCurrentPoint() {
- var point = this.getPoint();
- this.current = point;
- return point;
- }
- }, {
- key: "getReflectedControlPoint",
- value: function getReflectedControlPoint() {
- var previousCommand = this.previousCommand.toLowerCase();
-
- if (previousCommand !== 'c' && previousCommand !== 's' && previousCommand !== 'q' && previousCommand !== 't') {
- return this.current;
- } // reflect point
-
-
- var _this$current = this.current,
- cx = _this$current.x,
- cy = _this$current.y,
- _this$control = this.control,
- ox = _this$control.x,
- oy = _this$control.y;
- var point = new Point(2 * cx - ox, 2 * cy - oy);
- return point;
- }
- }, {
- key: "makeAbsolute",
- value: function makeAbsolute(point) {
- if (this.isRelativeCommand()) {
- var _this$current2 = this.current,
- x = _this$current2.x,
- y = _this$current2.y;
- point.x += x;
- point.y += y;
- }
-
- return point;
- }
- }, {
- key: "addMarker",
- value: function addMarker(point, from, priorTo) {
- var points = this.points,
- angles = this.angles; // if the last angle isn't filled in because we didn't have this point yet ...
-
- if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {
- angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);
- }
-
- this.addMarkerAngle(point, from ? from.angleTo(point) : null);
- }
- }, {
- key: "addMarkerAngle",
- value: function addMarkerAngle(point, angle) {
- this.points.push(point);
- this.angles.push(angle);
- }
- }, {
- key: "getMarkerPoints",
- value: function getMarkerPoints() {
- return this.points;
- }
- }, {
- key: "getMarkerAngles",
- value: function getMarkerAngles() {
- var angles = this.angles;
- var len = angles.length;
-
- for (var i = 0; i < len; i++) {
- if (!angles[i]) {
- for (var j = i + 1; j < len; j++) {
- if (angles[j]) {
- angles[i] = angles[j];
- break;
- }
- }
- }
- }
-
- return angles;
- }
- }]);
-
- return PathParser;
- }();
-
- function _createSuper$8(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$8()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var PathElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PathElement, _RenderedElement);
-
- var _super = _createSuper$8(PathElement);
-
- function PathElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PathElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'path';
- _this.pathParser = null;
- _this.pathParser = new PathParser(_this.getAttribute('d').getString());
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PathElement, [{
- key: "path",
- value: function path(ctx) {
- var pathParser = this.pathParser;
- var boundingBox = new BoundingBox();
- pathParser.reset();
-
- if (ctx) {
- ctx.beginPath();
- }
-
- while (!pathParser.isEnd()) {
- pathParser.nextCommand();
-
- switch (pathParser.command) {
- case 'M':
- case 'm':
- this.pathM(ctx, boundingBox);
- break;
-
- case 'L':
- case 'l':
- this.pathL(ctx, boundingBox);
- break;
-
- case 'H':
- case 'h':
- this.pathH(ctx, boundingBox);
- break;
-
- case 'V':
- case 'v':
- this.pathV(ctx, boundingBox);
- break;
-
- case 'C':
- case 'c':
- this.pathC(ctx, boundingBox);
- break;
-
- case 'S':
- case 's':
- this.pathS(ctx, boundingBox);
- break;
-
- case 'Q':
- case 'q':
- this.pathQ(ctx, boundingBox);
- break;
-
- case 'T':
- case 't':
- this.pathT(ctx, boundingBox);
- break;
-
- case 'A':
- case 'a':
- this.pathA(ctx, boundingBox);
- break;
-
- case 'Z':
- case 'z':
- this.pathZ(ctx, boundingBox);
- break;
- }
- }
-
- return boundingBox;
- }
- }, {
- key: "getBoundingBox",
- value: function getBoundingBox(_) {
- return this.path();
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- var pathParser = this.pathParser;
- var points = pathParser.getMarkerPoints();
- var angles = pathParser.getMarkerAngles();
- var markers = points.map(function (point, i) {
- return [point, angles[i]];
- });
- return markers;
- }
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- this.path(ctx);
- this.document.screen.mouse.checkPath(this, ctx);
- var fillRuleStyleProp = this.getStyle('fill-rule');
-
- if (ctx.fillStyle !== '') {
- if (fillRuleStyleProp.getString('inherit') !== 'inherit') {
- ctx.fill(fillRuleStyleProp.getString());
- } else {
- ctx.fill();
- }
- }
-
- if (ctx.strokeStyle !== '') {
- ctx.stroke();
- }
-
- var markers = this.getMarkers();
-
- if (markers) {
- var markersLastIndex = markers.length - 1;
- var markerStartStyleProp = this.getStyle('marker-start');
- var markerMidStyleProp = this.getStyle('marker-mid');
- var markerEndStyleProp = this.getStyle('marker-end');
-
- if (markerStartStyleProp.isUrlDefinition()) {
- var marker = markerStartStyleProp.getDefinition();
-
- var _markers$ = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[0], 2),
- point = _markers$[0],
- angle = _markers$[1];
-
- marker.render(ctx, point, angle);
- }
-
- if (markerMidStyleProp.isUrlDefinition()) {
- var _marker = markerMidStyleProp.getDefinition();
-
- for (var i = 1; i < markersLastIndex; i++) {
- var _markers$i = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[i], 2),
- _point = _markers$i[0],
- _angle = _markers$i[1];
-
- _marker.render(ctx, _point, _angle);
- }
- }
-
- if (markerEndStyleProp.isUrlDefinition()) {
- var _marker2 = markerEndStyleProp.getDefinition();
-
- var _markers$markersLastI = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[markersLastIndex], 2),
- _point2 = _markers$markersLastI[0],
- _angle2 = _markers$markersLastI[1];
-
- _marker2.render(ctx, _point2, _angle2);
- }
- }
- }
- }, {
- key: "pathM",
- value: function pathM(ctx, boundingBox) {
- var pathParser = this.pathParser;
- var point = pathParser.getAsCurrentPoint();
- var x = point.x,
- y = point.y;
- pathParser.addMarker(point);
- boundingBox.addPoint(x, y);
-
- if (ctx) {
- ctx.moveTo(x, y);
- }
-
- pathParser.start = pathParser.current;
-
- while (!pathParser.isCommandOrEnd()) {
- var _point3 = pathParser.getAsCurrentPoint();
-
- var _x = _point3.x,
- _y = _point3.y;
- pathParser.addMarker(_point3, pathParser.start);
- boundingBox.addPoint(_x, _y);
-
- if (ctx) {
- ctx.lineTo(_x, _y);
- }
- }
- }
- }, {
- key: "pathL",
- value: function pathL(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = pathParser.getAsCurrentPoint();
- var x = point.x,
- y = point.y;
- pathParser.addMarker(point, current);
- boundingBox.addPoint(x, y);
-
- if (ctx) {
- ctx.lineTo(x, y);
- }
- }
- }
- }, {
- key: "pathH",
- value: function pathH(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = new Point((pathParser.isRelativeCommand() ? current.x : 0) + pathParser.getScalar(), current.y);
- pathParser.addMarker(point, current);
- pathParser.current = point;
- boundingBox.addPoint(point.x, point.y);
-
- if (ctx) {
- ctx.lineTo(point.x, point.y);
- }
- }
- }
- }, {
- key: "pathV",
- value: function pathV(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = new Point(current.x, (pathParser.isRelativeCommand() ? current.y : 0) + pathParser.getScalar());
- pathParser.addMarker(point, current);
- pathParser.current = point;
- boundingBox.addPoint(point.x, point.y);
-
- if (ctx) {
- ctx.lineTo(point.x, point.y);
- }
- }
- }
- }, {
- key: "pathC",
- value: function pathC(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = pathParser.getPoint();
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- pathParser.addMarker(currentPoint, controlPoint, point);
- boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
-
- if (ctx) {
- ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }
- }, {
- key: "pathS",
- value: function pathS(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = pathParser.getReflectedControlPoint();
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- pathParser.addMarker(currentPoint, controlPoint, point);
- boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
-
- if (ctx) {
- ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }
- }, {
- key: "pathQ",
- value: function pathQ(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- pathParser.addMarker(currentPoint, controlPoint, controlPoint);
- boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
-
- if (ctx) {
- ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }
- }, {
- key: "pathT",
- value: function pathT(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var controlPoint = pathParser.getReflectedControlPoint();
- pathParser.control = controlPoint;
- var currentPoint = pathParser.getAsCurrentPoint();
- pathParser.addMarker(currentPoint, controlPoint, controlPoint);
- boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
-
- if (ctx) {
- ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }
- }, {
- key: "pathA",
- value: function pathA(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var rx = pathParser.getScalar();
- var ry = pathParser.getScalar();
- var xAxisRotation = pathParser.getScalar() * (Math.PI / 180.0);
- var largeArcFlag = pathParser.getScalar();
- var sweepFlag = pathParser.getScalar();
- var currentPoint = pathParser.getAsCurrentPoint(); // Conversion from endpoint to center parameterization
- // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
- // x1', y1'
-
- var currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2.0, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2.0); // adjust radii
-
- var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
-
- if (l > 1) {
- rx *= Math.sqrt(l);
- ry *= Math.sqrt(l);
- } // cx', cy'
-
-
- var s = (largeArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rx, 2) * Math.pow(ry, 2) - Math.pow(rx, 2) * Math.pow(currp.y, 2) - Math.pow(ry, 2) * Math.pow(currp.x, 2)) / (Math.pow(rx, 2) * Math.pow(currp.y, 2) + Math.pow(ry, 2) * Math.pow(currp.x, 2)));
-
- if (isNaN(s)) {
- s = 0;
- }
-
- var cpp = new Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy
-
- var centp = new Point((current.x + currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y); // initial angle
-
- var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // angle delta
-
- var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
- var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
- var ad = vectorsAngle(u, v);
-
- if (vectorsRatio(u, v) <= -1) {
- ad = Math.PI;
- }
-
- if (vectorsRatio(u, v) >= 1) {
- ad = 0;
- } // for markers
-
-
- var dir = 1 - sweepFlag ? 1.0 : -1.0;
- var ah = a1 + dir * (ad / 2.0);
- var halfWay = new Point(centp.x + rx * Math.cos(ah), centp.y + ry * Math.sin(ah));
- pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
- pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);
- boundingBox.addPoint(currentPoint.x, currentPoint.y); // TODO: this is too naive, make it better
-
- if (ctx && !isNaN(a1) && !isNaN(ad)) {
- var r = rx > ry ? rx : ry;
- var sx = rx > ry ? 1 : rx / ry;
- var sy = rx > ry ? ry / rx : 1;
- ctx.translate(centp.x, centp.y);
- ctx.rotate(xAxisRotation);
- ctx.scale(sx, sy);
- ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));
- ctx.scale(1 / sx, 1 / sy);
- ctx.rotate(-xAxisRotation);
- ctx.translate(-centp.x, -centp.y);
- }
- }
- }
- }, {
- key: "pathZ",
- value: function pathZ(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- if (ctx) {
- // only close path if it is not a straight line
- if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {
- ctx.closePath();
- }
- }
-
- pathParser.current = pathParser.start;
- }
- }]);
-
- return PathElement;
- }(RenderedElement);
-
- function _createSuper$9(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$9()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var SVGElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SVGElement, _RenderedElement);
-
- var _super = _createSuper$9(SVGElement);
-
- function SVGElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SVGElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'svg';
- _this.root = false;
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SVGElement, [{
- key: "clearContext",
- value: function clearContext(ctx) {
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(SVGElement.prototype), "clearContext", this).call(this, ctx);
-
- this.document.screen.viewPort.removeCurrent();
- }
- }, {
- key: "setContext",
- value: function setContext(ctx) {
- var document = this.document;
- var screen = document.screen,
- window = document.window;
- var canvas = ctx.canvas;
- screen.setDefaults(ctx);
-
- if (canvas.style && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {
- ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');
- var fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);
-
- if (fontSizeProp.hasValue()) {
- document.rootEmSize = fontSizeProp.getPixels('y');
- document.emSize = document.rootEmSize;
- }
- }
-
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(SVGElement.prototype), "setContext", this).call(this, ctx); // create new view port
-
-
- if (!this.getAttribute('x').hasValue()) {
- this.getAttribute('x', true).setValue(0);
- }
-
- if (!this.getAttribute('y').hasValue()) {
- this.getAttribute('y', true).setValue(0);
- }
-
- ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));
- var _screen$viewPort = screen.viewPort,
- width = _screen$viewPort.width,
- height = _screen$viewPort.height;
-
- if (!this.getStyle('width').hasValue()) {
- this.getStyle('width', true).setValue('100%');
- }
-
- if (!this.getStyle('height').hasValue()) {
- this.getStyle('height', true).setValue('100%');
- }
-
- if (!this.getStyle('color').hasValue()) {
- this.getStyle('color', true).setValue('black');
- }
-
- var refXAttr = this.getAttribute('refX');
- var refYAttr = this.getAttribute('refY');
- var viewBoxAttr = this.getAttribute('viewBox');
- var viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;
- var clip = !this.root && this.getAttribute('overflow').getValue('hidden') !== 'visible';
- var minX = 0;
- var minY = 0;
- var clipX = 0;
- var clipY = 0;
-
- if (viewBox) {
- minX = viewBox[0];
- minY = viewBox[1];
- }
-
- if (!this.root) {
- width = this.getStyle('width').getPixels('x');
- height = this.getStyle('height').getPixels('y');
-
- if (this.type === 'marker') {
- clipX = minX;
- clipY = minY;
- minX = 0;
- minY = 0;
- }
- }
-
- screen.viewPort.setCurrent(width, height);
-
- if (viewBox) {
- width = viewBox[2];
- height = viewBox[3];
- }
-
- document.setViewBox({
- ctx: ctx,
- aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
- width: screen.viewPort.width,
- desiredWidth: width,
- height: screen.viewPort.height,
- desiredHeight: height,
- minX: minX,
- minY: minY,
- refX: refXAttr.getValue(),
- refY: refYAttr.getValue(),
- clip: clip,
- clipX: clipX,
- clipY: clipY
- });
-
- if (viewBox) {
- screen.viewPort.removeCurrent();
- screen.viewPort.setCurrent(width, height);
- }
- }
- /**
- * Resize SVG to fit in given size.
- * @param width
- * @param height
- * @param preserveAspectRatio
- */
-
- }, {
- key: "resize",
- value: function resize(width) {
- var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
- var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- var widthAttr = this.getAttribute('width', true);
- var heightAttr = this.getAttribute('height', true);
- var viewBoxAttr = this.getAttribute('viewBox');
- var styleAttr = this.getAttribute('style');
- var originWidth = widthAttr.getNumber(0);
- var originHeight = heightAttr.getNumber(0);
-
- if (preserveAspectRatio) {
- if (typeof preserveAspectRatio === 'string') {
- this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);
- } else {
- var preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');
-
- if (preserveAspectRatioAttr.hasValue()) {
- preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\s*(\S.*\S)\s*$/, '$1'));
- }
- }
- }
-
- widthAttr.setValue(width);
- heightAttr.setValue(height);
-
- if (!viewBoxAttr.hasValue()) {
- viewBoxAttr.setValue("0 0 ".concat(originWidth || width, " ").concat(originHeight || height));
- }
-
- if (styleAttr.hasValue()) {
- var widthStyle = this.getStyle('width');
- var heightStyle = this.getStyle('height');
-
- if (widthStyle.hasValue()) {
- widthStyle.setValue("".concat(width, "px"));
- }
-
- if (heightStyle.hasValue()) {
- heightStyle.setValue("".concat(height, "px"));
- }
- }
- }
- }]);
-
- return SVGElement;
- }(RenderedElement);
-
- function _createSuper$a(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$a()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var RectElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RectElement, _PathElement);
-
- var _super = _createSuper$a(RectElement);
-
- function RectElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RectElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'rect';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RectElement, [{
- key: "path",
- value: function path(ctx) {
- var x = this.getAttribute('x').getPixels('x');
- var y = this.getAttribute('y').getPixels('y');
- var width = this.getStyle('width').getPixels('x');
- var height = this.getStyle('height').getPixels('y');
- var rxAttr = this.getAttribute('rx');
- var ryAttr = this.getAttribute('ry');
- var rx = rxAttr.getPixels('x');
- var ry = ryAttr.getPixels('y');
-
- if (rxAttr.hasValue() && !ryAttr.hasValue()) {
- ry = rx;
- }
-
- if (ryAttr.hasValue() && !rxAttr.hasValue()) {
- rx = ry;
- }
-
- rx = Math.min(rx, width / 2.0);
- ry = Math.min(ry, height / 2.0);
-
- if (ctx) {
- var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
- ctx.beginPath(); // always start the path so we don't fill prior paths
-
- if (height > 0 && width > 0) {
- ctx.moveTo(x + rx, y);
- ctx.lineTo(x + width - rx, y);
- ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);
- ctx.lineTo(x + width, y + height - ry);
- ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);
- ctx.lineTo(x + rx, y + height);
- ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);
- ctx.lineTo(x, y + ry);
- ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);
- ctx.closePath();
- }
- }
-
- return new BoundingBox(x, y, x + width, y + height);
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- return null;
- }
- }]);
-
- return RectElement;
- }(PathElement);
-
- function _createSuper$b(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$b()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var CircleElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(CircleElement, _PathElement);
-
- var _super = _createSuper$b(CircleElement);
-
- function CircleElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, CircleElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'circle';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(CircleElement, [{
- key: "path",
- value: function path(ctx) {
- var cx = this.getAttribute('cx').getPixels('x');
- var cy = this.getAttribute('cy').getPixels('y');
- var r = this.getAttribute('r').getPixels();
-
- if (ctx && r > 0) {
- ctx.beginPath();
- ctx.arc(cx, cy, r, 0, Math.PI * 2, false);
- ctx.closePath();
- }
-
- return new BoundingBox(cx - r, cy - r, cx + r, cy + r);
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- return null;
- }
- }]);
-
- return CircleElement;
- }(PathElement);
-
- function _createSuper$c(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$c()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var EllipseElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(EllipseElement, _PathElement);
-
- var _super = _createSuper$c(EllipseElement);
-
- function EllipseElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, EllipseElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'ellipse';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(EllipseElement, [{
- key: "path",
- value: function path(ctx) {
- var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
- var rx = this.getAttribute('rx').getPixels('x');
- var ry = this.getAttribute('ry').getPixels('y');
- var cx = this.getAttribute('cx').getPixels('x');
- var cy = this.getAttribute('cy').getPixels('y');
-
- if (ctx && rx > 0 && ry > 0) {
- ctx.beginPath();
- ctx.moveTo(cx + rx, cy);
- ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);
- ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);
- ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);
- ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);
- ctx.closePath();
- }
-
- return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- return null;
- }
- }]);
-
- return EllipseElement;
- }(PathElement);
-
- function _createSuper$d(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$d()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var LineElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(LineElement, _PathElement);
-
- var _super = _createSuper$d(LineElement);
-
- function LineElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, LineElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'line';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(LineElement, [{
- key: "getPoints",
- value: function getPoints() {
- return [new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')), new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))];
- }
- }, {
- key: "path",
- value: function path(ctx) {
- var _this$getPoints = this.getPoints(),
- _this$getPoints2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_this$getPoints, 2),
- _this$getPoints2$ = _this$getPoints2[0],
- x0 = _this$getPoints2$.x,
- y0 = _this$getPoints2$.y,
- _this$getPoints2$2 = _this$getPoints2[1],
- x1 = _this$getPoints2$2.x,
- y1 = _this$getPoints2$2.y;
-
- if (ctx) {
- ctx.beginPath();
- ctx.moveTo(x0, y0);
- ctx.lineTo(x1, y1);
- }
-
- return new BoundingBox(x0, y0, x1, y1);
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- var _this$getPoints3 = this.getPoints(),
- _this$getPoints4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_this$getPoints3, 2),
- p0 = _this$getPoints4[0],
- p1 = _this$getPoints4[1];
-
- var a = p0.angleTo(p1);
- return [[p0, a], [p1, a]];
- }
- }]);
-
- return LineElement;
- }(PathElement);
-
- function _createSuper$e(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$e()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var PolylineElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PolylineElement, _PathElement);
-
- var _super = _createSuper$e(PolylineElement);
-
- function PolylineElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PolylineElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'polyline';
- _this.points = [];
- _this.points = Point.parsePath(_this.getAttribute('points').getString());
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PolylineElement, [{
- key: "path",
- value: function path(ctx) {
- var points = this.points;
-
- var _points = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(points, 1),
- _points$ = _points[0],
- x0 = _points$.x,
- y0 = _points$.y;
-
- var boundingBox = new BoundingBox(x0, y0);
-
- if (ctx) {
- ctx.beginPath();
- ctx.moveTo(x0, y0);
- }
-
- points.forEach(function (_ref) {
- var x = _ref.x,
- y = _ref.y;
- boundingBox.addPoint(x, y);
-
- if (ctx) {
- ctx.lineTo(x, y);
- }
- });
- return boundingBox;
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- var points = this.points;
- var lastIndex = points.length - 1;
- var markers = [];
- points.forEach(function (point, i) {
- if (i === lastIndex) {
- return;
- }
-
- markers.push([point, point.angleTo(points[i + 1])]);
- });
-
- if (markers.length > 0) {
- markers.push([points[points.length - 1], markers[markers.length - 1][1]]);
- }
-
- return markers;
- }
- }]);
-
- return PolylineElement;
- }(PathElement);
-
- function _createSuper$f(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$f()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var PolygonElement = /*#__PURE__*/function (_PolylineElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PolygonElement, _PolylineElement);
-
- var _super = _createSuper$f(PolygonElement);
-
- function PolygonElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PolygonElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'polygon';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PolygonElement, [{
- key: "path",
- value: function path(ctx) {
- var boundingBox = (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(PolygonElement.prototype), "path", this).call(this, ctx);
-
- var _this$points = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(this.points, 1),
- _this$points$ = _this$points[0],
- x = _this$points$.x,
- y = _this$points$.y;
-
- if (ctx) {
- ctx.lineTo(x, y);
- ctx.closePath();
- }
-
- return boundingBox;
- }
- }]);
-
- return PolygonElement;
- }(PolylineElement);
-
- function _createSuper$g(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$g()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var PatternElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PatternElement, _Element);
-
- var _super = _createSuper$g(PatternElement);
-
- function PatternElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PatternElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'pattern';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PatternElement, [{
- key: "createPattern",
- value: function createPattern(ctx, _, parentOpacityProp) {
- var width = this.getStyle('width').getPixels('x', true);
- var height = this.getStyle('height').getPixels('y', true); // render me using a temporary svg element
-
- var patternSvg = new SVGElement(this.document, null);
- patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
- patternSvg.attributes.width = new Property(this.document, 'width', "".concat(width, "px"));
- patternSvg.attributes.height = new Property(this.document, 'height', "".concat(height, "px"));
- patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());
- patternSvg.children = this.children;
- var patternCanvas = this.document.createCanvas(width, height);
- var patternCtx = patternCanvas.getContext('2d');
- var xAttr = this.getAttribute('x');
- var yAttr = this.getAttribute('y');
-
- if (xAttr.hasValue() && yAttr.hasValue()) {
- patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));
- }
-
- if (parentOpacityProp.hasValue()) {
- this.styles['fill-opacity'] = parentOpacityProp;
- } else {
- Reflect.deleteProperty(this.styles, 'fill-opacity');
- } // render 3x3 grid so when we transform there's no white space on edges
-
-
- for (var x = -1; x <= 1; x++) {
- for (var y = -1; y <= 1; y++) {
- patternCtx.save();
- patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);
- patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);
- patternSvg.render(patternCtx);
- patternCtx.restore();
- }
- }
-
- var pattern = ctx.createPattern(patternCanvas, 'repeat');
- return pattern;
- }
- }]);
-
- return PatternElement;
- }(Element);
-
- function _createSuper$h(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$h()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var MarkerElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MarkerElement, _Element);
-
- var _super = _createSuper$h(MarkerElement);
-
- function MarkerElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MarkerElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'marker';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(MarkerElement, [{
- key: "render",
- value: function render(ctx, point, angle) {
- if (!point) {
- return;
- }
-
- var x = point.x,
- y = point.y;
- var orient = this.getAttribute('orient').getValue('auto');
- var markerUnits = this.getAttribute('markerUnits').getValue('strokeWidth');
- ctx.translate(x, y);
-
- if (orient === 'auto') {
- ctx.rotate(angle);
- }
-
- if (markerUnits === 'strokeWidth') {
- ctx.scale(ctx.lineWidth, ctx.lineWidth);
- }
-
- ctx.save(); // render me using a temporary svg element
-
- var markerSvg = new SVGElement(this.document, null);
- markerSvg.type = this.type;
- markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
- markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());
- markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());
- markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());
- markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());
- markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());
- markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));
- markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));
- markerSvg.children = this.children;
- markerSvg.render(ctx);
- ctx.restore();
-
- if (markerUnits === 'strokeWidth') {
- ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);
- }
-
- if (orient === 'auto') {
- ctx.rotate(-angle);
- }
-
- ctx.translate(-x, -y);
- }
- }]);
-
- return MarkerElement;
- }(Element);
-
- function _createSuper$i(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$i()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var DefsElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(DefsElement, _Element);
-
- var _super = _createSuper$i(DefsElement);
-
- function DefsElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, DefsElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'defs';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(DefsElement, [{
- key: "render",
- value: function render() {// NOOP
- }
- }]);
-
- return DefsElement;
- }(Element);
-
- function _createSuper$j(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$j()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var GElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GElement, _RenderedElement);
-
- var _super = _createSuper$j(GElement);
-
- function GElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'g';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(GElement, [{
- key: "getBoundingBox",
- value: function getBoundingBox(ctx) {
- var boundingBox = new BoundingBox();
- this.children.forEach(function (child) {
- boundingBox.addBoundingBox(child.getBoundingBox(ctx));
- });
- return boundingBox;
- }
- }]);
-
- return GElement;
- }(RenderedElement);
-
- function _createSuper$k(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$k()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var GradientElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GradientElement, _Element);
-
- var _super = _createSuper$k(GradientElement);
-
- function GradientElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GradientElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.attributesToInherit = ['gradientUnits'];
- _this.stops = [];
-
- var _assertThisInitialize = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this),
- stops = _assertThisInitialize.stops,
- children = _assertThisInitialize.children;
-
- children.forEach(function (child) {
- if (child.type === 'stop') {
- stops.push(child);
- }
- });
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(GradientElement, [{
- key: "getGradientUnits",
- value: function getGradientUnits() {
- return this.getAttribute('gradientUnits').getString('objectBoundingBox');
- }
- }, {
- key: "createGradient",
- value: function createGradient(ctx, element, parentOpacityProp) {
- var _this2 = this;
-
- // tslint:disable-next-line: no-this-assignment
- var stopsContainer = this;
-
- if (this.getHrefAttribute().hasValue()) {
- stopsContainer = this.getHrefAttribute().getDefinition();
- this.inheritStopContainer(stopsContainer);
- }
-
- var _stopsContainer = stopsContainer,
- stops = _stopsContainer.stops;
- var gradient = this.getGradient(ctx, element);
-
- if (!gradient) {
- return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);
- }
-
- stops.forEach(function (stop) {
- gradient.addColorStop(stop.offset, _this2.addParentOpacity(parentOpacityProp, stop.color));
- });
-
- if (this.getAttribute('gradientTransform').hasValue()) {
- // render as transformed pattern on temporary canvas
- var document = this.document;
- var _document$screen = document.screen,
- MAX_VIRTUAL_PIXELS = _document$screen.MAX_VIRTUAL_PIXELS,
- viewPort = _document$screen.viewPort;
-
- var _viewPort$viewPorts = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(viewPort.viewPorts, 1),
- rootView = _viewPort$viewPorts[0];
-
- var rect = new RectElement(document, null);
- rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3.0);
- rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3.0);
- rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);
- rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);
- var group = new GElement(document, null);
- group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());
- group.children = [rect];
- var patternSvg = new SVGElement(document, null);
- patternSvg.attributes.x = new Property(document, 'x', 0);
- patternSvg.attributes.y = new Property(document, 'y', 0);
- patternSvg.attributes.width = new Property(document, 'width', rootView.width);
- patternSvg.attributes.height = new Property(document, 'height', rootView.height);
- patternSvg.children = [group];
- var patternCanvas = document.createCanvas(rootView.width, rootView.height);
- var patternCtx = patternCanvas.getContext('2d');
- patternCtx.fillStyle = gradient;
- patternSvg.render(patternCtx);
- return patternCtx.createPattern(patternCanvas, 'no-repeat');
- }
-
- return gradient;
- }
- }, {
- key: "inheritStopContainer",
- value: function inheritStopContainer(stopsContainer) {
- var _this3 = this;
-
- this.attributesToInherit.forEach(function (attributeToInherit) {
- if (!_this3.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {
- _this3.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());
- }
- });
- }
- }, {
- key: "addParentOpacity",
- value: function addParentOpacity(parentOpacityProp, color) {
- if (parentOpacityProp.hasValue()) {
- var colorProp = new Property(this.document, 'color', color);
- return colorProp.addOpacity(parentOpacityProp).getColor();
- }
-
- return color;
- }
- }]);
-
- return GradientElement;
- }(Element);
-
- function _createSuper$l(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$l()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var LinearGradientElement = /*#__PURE__*/function (_GradientElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(LinearGradientElement, _GradientElement);
-
- var _super = _createSuper$l(LinearGradientElement);
-
- function LinearGradientElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, LinearGradientElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'linearGradient';
-
- _this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');
-
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(LinearGradientElement, [{
- key: "getGradient",
- value: function getGradient(ctx, element) {
- var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
- var boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;
-
- if (isBoundingBoxUnits && !boundingBox) {
- return null;
- }
-
- if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {
- this.getAttribute('x1', true).setValue(0);
- this.getAttribute('y1', true).setValue(0);
- this.getAttribute('x2', true).setValue(1);
- this.getAttribute('y2', true).setValue(0);
- }
-
- var x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');
- var y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');
- var x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');
- var y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');
-
- if (x1 === x2 && y1 === y2) {
- return null;
- }
-
- return ctx.createLinearGradient(x1, y1, x2, y2);
- }
- }]);
-
- return LinearGradientElement;
- }(GradientElement);
-
- function _createSuper$m(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$m()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var RadialGradientElement = /*#__PURE__*/function (_GradientElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RadialGradientElement, _GradientElement);
-
- var _super = _createSuper$m(RadialGradientElement);
-
- function RadialGradientElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RadialGradientElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'radialGradient';
-
- _this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');
-
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RadialGradientElement, [{
- key: "getGradient",
- value: function getGradient(ctx, element) {
- var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
- var boundingBox = element.getBoundingBox(ctx);
-
- if (isBoundingBoxUnits && !boundingBox) {
- return null;
- }
-
- if (!this.getAttribute('cx').hasValue()) {
- this.getAttribute('cx', true).setValue('50%');
- }
-
- if (!this.getAttribute('cy').hasValue()) {
- this.getAttribute('cy', true).setValue('50%');
- }
-
- if (!this.getAttribute('r').hasValue()) {
- this.getAttribute('r', true).setValue('50%');
- }
-
- var cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');
- var cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');
- var fx = cx;
- var fy = cy;
-
- if (this.getAttribute('fx').hasValue()) {
- fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');
- }
-
- if (this.getAttribute('fy').hasValue()) {
- fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');
- }
-
- var r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2.0 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();
- var fr = this.getAttribute('fr').getPixels();
- return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);
- }
- }]);
-
- return RadialGradientElement;
- }(GradientElement);
-
- function _createSuper$n(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$n()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var StopElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(StopElement, _Element);
-
- var _super = _createSuper$n(StopElement);
-
- function StopElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, StopElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'stop';
- var offset = Math.max(0, Math.min(1, _this.getAttribute('offset').getNumber()));
-
- var stopOpacity = _this.getStyle('stop-opacity');
-
- var stopColor = _this.getStyle('stop-color', true);
-
- if (stopColor.getString() === '') {
- stopColor.setValue('#000');
- }
-
- if (stopOpacity.hasValue()) {
- stopColor = stopColor.addOpacity(stopOpacity);
- }
-
- _this.offset = offset;
- _this.color = stopColor.getColor();
- return _this;
- }
-
- return StopElement;
- }(Element);
-
- function _createSuper$o(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$o()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var AnimateElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateElement, _Element);
-
- var _super = _createSuper$o(AnimateElement);
-
- function AnimateElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'animate';
- _this.duration = 0;
- _this.initialValue = null;
- _this.initialUnits = '';
- _this.removed = false;
- _this.frozen = false;
- document.screen.animations.push((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this));
- _this.begin = _this.getAttribute('begin').getMilliseconds();
- _this.maxDuration = _this.begin + _this.getAttribute('dur').getMilliseconds();
- _this.from = _this.getAttribute('from');
- _this.to = _this.getAttribute('to');
- _this.values = _this.getAttribute('values');
-
- if (_this.values.hasValue()) {
- _this.values.setValue(_this.values.getString().split(';'));
- }
-
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateElement, [{
- key: "getProperty",
- value: function getProperty() {
- var attributeType = this.getAttribute('attributeType').getString();
- var attributeName = this.getAttribute('attributeName').getString();
-
- if (attributeType === 'CSS') {
- return this.parent.getStyle(attributeName, true);
- }
-
- return this.parent.getAttribute(attributeName, true);
- }
- }, {
- key: "calcValue",
- value: function calcValue() {
- var initialUnits = this.initialUnits;
-
- var _this$getProgress = this.getProgress(),
- progress = _this$getProgress.progress,
- from = _this$getProgress.from,
- to = _this$getProgress.to; // tween value linearly
-
-
- var newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;
-
- if (initialUnits === '%') {
- newValue *= 100.0; // numValue() returns 0-1 whereas properties are 0-100
- }
-
- return "".concat(newValue).concat(initialUnits);
- }
- }, {
- key: "update",
- value: function update(delta) {
- var parent = this.parent;
- var prop = this.getProperty(); // set initial value
-
- if (!this.initialValue) {
- this.initialValue = prop.getString();
- this.initialUnits = prop.getUnits();
- } // if we're past the end time
-
-
- if (this.duration > this.maxDuration) {
- var fill = this.getAttribute('fill').getString('remove'); // loop for indefinitely repeating animations
-
- if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {
- this.duration = 0;
- } else if (fill === 'freeze' && !this.frozen) {
- this.frozen = true;
- parent.animationFrozen = true;
- parent.animationFrozenValue = prop.getString();
- } else if (fill === 'remove' && !this.removed) {
- this.removed = true;
- prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);
- return true;
- }
-
- return false;
- }
-
- this.duration += delta; // if we're past the begin time
-
- var updated = false;
-
- if (this.begin < this.duration) {
- var newValue = this.calcValue(); // tween
-
- var typeAttr = this.getAttribute('type');
-
- if (typeAttr.hasValue()) {
- // for transform, etc.
- var type = typeAttr.getString();
- newValue = "".concat(type, "(").concat(newValue, ")");
- }
-
- prop.setValue(newValue);
- updated = true;
- }
-
- return updated;
- }
- }, {
- key: "getProgress",
- value: function getProgress() {
- var document = this.document,
- values = this.values;
- var result = {
- progress: (this.duration - this.begin) / (this.maxDuration - this.begin)
- };
-
- if (values.hasValue()) {
- var p = result.progress * (values.getValue().length - 1);
- var lb = Math.floor(p);
- var ub = Math.ceil(p);
- result.from = new Property(document, 'from', parseFloat(values.getValue()[lb]));
- result.to = new Property(document, 'to', parseFloat(values.getValue()[ub]));
- result.progress = (p - lb) / (ub - lb);
- } else {
- result.from = this.from;
- result.to = this.to;
- }
-
- return result;
- }
- }]);
-
- return AnimateElement;
- }(Element);
-
- function _createSuper$p(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$p()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var AnimateColorElement = /*#__PURE__*/function (_AnimateElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateColorElement, _AnimateElement);
-
- var _super = _createSuper$p(AnimateColorElement);
-
- function AnimateColorElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateColorElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'animateColor';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateColorElement, [{
- key: "calcValue",
- value: function calcValue() {
- var _this$getProgress = this.getProgress(),
- progress = _this$getProgress.progress,
- from = _this$getProgress.from,
- to = _this$getProgress.to;
-
- var colorFrom = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(from.getColor());
- var colorTo = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(to.getColor());
-
- if (colorFrom.ok && colorTo.ok) {
- // tween color linearly
- var r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;
- var g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;
- var b = colorFrom.b + (colorTo.b - colorFrom.b) * progress; // ? alpha
-
- return "rgb(".concat(parseInt(r, 10), ", ").concat(parseInt(g, 10), ", ").concat(parseInt(b, 10), ")");
- }
-
- return this.getAttribute('from').getColor();
- }
- }]);
-
- return AnimateColorElement;
- }(AnimateElement);
-
- function _createSuper$q(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$q()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var AnimateTransformElement = /*#__PURE__*/function (_AnimateElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateTransformElement, _AnimateElement);
-
- var _super = _createSuper$q(AnimateTransformElement);
-
- function AnimateTransformElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateTransformElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'animateTransform';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateTransformElement, [{
- key: "calcValue",
- value: function calcValue() {
- var _this$getProgress = this.getProgress(),
- progress = _this$getProgress.progress,
- from = _this$getProgress.from,
- to = _this$getProgress.to; // tween value linearly
-
-
- var transformFrom = toNumbers(from.getString());
- var transformTo = toNumbers(to.getString());
- var newValue = transformFrom.map(function (from, i) {
- var to = transformTo[i];
- return from + (to - from) * progress;
- }).join(' ');
- return newValue;
- }
- }]);
-
- return AnimateTransformElement;
- }(AnimateElement);
-
- function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
-
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
-
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
-
- function _createSuper$r(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$r()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FontElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FontElement, _Element);
-
- var _super = _createSuper$r(FontElement);
-
- function FontElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FontElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'font';
- _this.glyphs = {};
- _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
- var definitions = document.definitions;
-
- var _assertThisInitialize = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this),
- children = _assertThisInitialize.children;
-
- var _iterator = _createForOfIteratorHelper(children),
- _step;
-
- try {
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
- var child = _step.value;
-
- switch (child.type) {
- case 'font-face':
- {
- _this.fontFace = child;
- var fontFamilyStyle = child.getStyle('font-family');
-
- if (fontFamilyStyle.hasValue()) {
- definitions[fontFamilyStyle.getString()] = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this);
- }
-
- break;
- }
-
- case 'missing-glyph':
- _this.missingGlyph = child;
- break;
-
- case 'glyph':
- {
- var glyph = child;
-
- if (glyph.arabicForm) {
- _this.isRTL = true;
- _this.isArabic = true;
-
- if (typeof _this.glyphs[glyph.unicode] === 'undefined') {
- _this.glyphs[glyph.unicode] = {};
- }
-
- _this.glyphs[glyph.unicode][glyph.arabicForm] = glyph;
- } else {
- _this.glyphs[glyph.unicode] = glyph;
- }
-
- break;
- }
-
- default:
- }
- }
- } catch (err) {
- _iterator.e(err);
- } finally {
- _iterator.f();
- }
-
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FontElement, [{
- key: "render",
- value: function render() {// NO RENDER
- }
- }]);
-
- return FontElement;
- }(Element);
-
- function _createSuper$s(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$s()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FontFaceElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FontFaceElement, _Element);
-
- var _super = _createSuper$s(FontFaceElement);
-
- function FontFaceElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FontFaceElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'font-face';
- _this.ascent = _this.getAttribute('ascent').getNumber();
- _this.descent = _this.getAttribute('descent').getNumber();
- _this.unitsPerEm = _this.getAttribute('units-per-em').getNumber();
- return _this;
- }
-
- return FontFaceElement;
- }(Element);
-
- function _createSuper$t(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$t()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var MissingGlyphElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MissingGlyphElement, _PathElement);
-
- var _super = _createSuper$t(MissingGlyphElement);
-
- function MissingGlyphElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MissingGlyphElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'missing-glyph';
- _this.horizAdvX = 0;
- return _this;
- }
-
- return MissingGlyphElement;
- }(PathElement);
-
- function _createSuper$u(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$u()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var GlyphElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GlyphElement, _PathElement);
-
- var _super = _createSuper$u(GlyphElement);
-
- function GlyphElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GlyphElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'glyph';
- _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
- _this.unicode = _this.getAttribute('unicode').getString();
- _this.arabicForm = _this.getAttribute('arabic-form').getString();
- return _this;
- }
-
- return GlyphElement;
- }(PathElement);
-
- function _createSuper$v(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$v()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TRefElement = /*#__PURE__*/function (_TextElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TRefElement, _TextElement);
-
- var _super = _createSuper$v(TRefElement);
-
- function TRefElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TRefElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'tref';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TRefElement, [{
- key: "getText",
- value: function getText() {
- var element = this.getHrefAttribute().getDefinition();
-
- if (element) {
- var firstChild = element.children[0];
-
- if (firstChild) {
- return firstChild.getText();
- }
- }
-
- return '';
- }
- }]);
-
- return TRefElement;
- }(TextElement);
-
- function _createSuper$w(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$w()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var AElement = /*#__PURE__*/function (_TextElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AElement, _TextElement);
-
- var _super = _createSuper$w(AElement);
-
- function AElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'a';
- var childNodes = node.childNodes;
- var firstChild = childNodes[0];
- var hasText = childNodes.length > 0 && Array.from(childNodes).every(function (node) {
- return node.nodeType === 3;
- });
- _this.hasText = hasText;
- _this.text = hasText ? _this.getTextFromNode(firstChild) : '';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AElement, [{
- key: "getText",
- value: function getText() {
- return this.text;
- }
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- if (this.hasText) {
- // render as text element
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(AElement.prototype), "renderChildren", this).call(this, ctx);
-
- var document = this.document,
- x = this.x,
- y = this.y;
- var mouse = document.screen.mouse;
- var fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize); // Do not calc bounding box if mouse is not working.
-
- if (mouse.isWorking()) {
- mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));
- }
- } else if (this.children.length > 0) {
- // render as temporary group
- var g = new GElement(this.document, null);
- g.children = this.children;
- g.parent = this;
- g.render(ctx);
- }
- }
- }, {
- key: "onClick",
- value: function onClick() {
- var window = this.document.window;
-
- if (window) {
- window.open(this.getHrefAttribute().getString());
- }
- }
- }, {
- key: "onMouseMove",
- value: function onMouseMove() {
- var ctx = this.document.ctx;
- ctx.canvas.style.cursor = 'pointer';
- }
- }]);
-
- return AElement;
- }(TextElement);
-
- function _createForOfIteratorHelper$1(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray$1(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
-
- function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
-
- function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
-
- function _createSuper$x(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$x()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TextPathElement = /*#__PURE__*/function (_TextElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextPathElement, _TextElement);
-
- var _super = _createSuper$x(TextPathElement);
-
- function TextPathElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextPathElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'textPath';
- _this.textWidth = 0;
- _this.textHeight = 0;
- _this.pathLength = -1;
- _this.glyphInfo = null;
- _this.letterSpacingCache = [];
- _this.measuresCache = new Map([['', 0]]);
-
- var pathElement = _this.getHrefAttribute().getDefinition();
-
- _this.text = _this.getTextFromNode();
- _this.dataArray = _this.parsePathData(pathElement);
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TextPathElement, [{
- key: "getText",
- value: function getText() {
- return this.text;
- }
- }, {
- key: "path",
- value: function path(ctx) {
- var dataArray = this.dataArray;
-
- if (ctx) {
- ctx.beginPath();
- }
-
- dataArray.forEach(function (_ref) {
- var command = _ref.command,
- points = _ref.points;
-
- switch (command) {
- case 'L':
- if (ctx) {
- ctx.lineTo(points[0], points[1]);
- }
-
- break;
-
- case 'M':
- if (ctx) {
- ctx.moveTo(points[0], points[1]);
- }
-
- break;
-
- case 'C':
- if (ctx) {
- ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);
- }
-
- break;
-
- case 'Q':
- if (ctx) {
- ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);
- }
-
- break;
-
- case 'A':
- {
- var cx = points[0];
- var cy = points[1];
- var rx = points[2];
- var ry = points[3];
- var theta = points[4];
- var dTheta = points[5];
- var psi = points[6];
- var fs = points[7];
- var r = rx > ry ? rx : ry;
- var scaleX = rx > ry ? 1 : rx / ry;
- var scaleY = rx > ry ? ry / rx : 1;
-
- if (ctx) {
- ctx.translate(cx, cy);
- ctx.rotate(psi);
- ctx.scale(scaleX, scaleY);
- ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));
- ctx.scale(1 / scaleX, 1 / scaleY);
- ctx.rotate(-psi);
- ctx.translate(-cx, -cy);
- }
-
- break;
- }
-
- case 'z':
- if (ctx) {
- ctx.closePath();
- }
-
- break;
- }
- });
- }
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- this.setTextData(ctx);
- ctx.save();
- var textDecoration = this.parent.getStyle('text-decoration').getString();
- var fontSize = this.getFontSize();
- var glyphInfo = this.glyphInfo;
- var fill = ctx.fillStyle;
-
- if (textDecoration === 'underline') {
- ctx.beginPath();
- }
-
- glyphInfo.forEach(function (glyph, i) {
- var p0 = glyph.p0,
- p1 = glyph.p1,
- partialText = glyph.text;
- ctx.save();
- ctx.translate(p0.x, p0.y);
- ctx.rotate(glyphInfo[i].rotation);
-
- if (ctx.fillStyle) {
- ctx.fillText(partialText, 0, 0);
- }
-
- if (ctx.strokeStyle) {
- ctx.strokeText(partialText, 0, 0);
- }
-
- ctx.restore();
-
- if (textDecoration === 'underline') {
- if (i === 0) {
- ctx.moveTo(p0.x, p0.y + fontSize / 8);
- }
-
- ctx.lineTo(p1.x, p1.y + fontSize / 5);
- } //// To assist with debugging visually, uncomment following
- //
- // ctx.beginPath();
- // if (i % 2)
- // ctx.strokeStyle = 'red';
- // else
- // ctx.strokeStyle = 'green';
- // ctx.moveTo(p0.x, p0.y);
- // ctx.lineTo(p1.x, p1.y);
- // ctx.stroke();
- // ctx.closePath();
-
- });
-
- if (textDecoration === 'underline') {
- ctx.lineWidth = fontSize / 20;
- ctx.strokeStyle = fill;
- ctx.stroke();
- ctx.closePath();
- }
-
- ctx.restore();
- }
- }, {
- key: "getLetterSpacingAt",
- value: function getLetterSpacingAt() {
- var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
- return this.letterSpacingCache[idx] || 0;
- }
- }, {
- key: "findSegmentToFitChar",
- value: function findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, c, charI) {
- var offset = inputOffset;
- var glyphWidth = this.measureText(ctx, c);
-
- if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {
- glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;
- }
-
- if (charI > -1) {
- offset += this.getLetterSpacingAt(charI);
- }
-
- var splineStep = this.textHeight / 20;
- var segment = {
- p0: this.getEquidistantPointOnPath(offset, splineStep),
- p1: this.getEquidistantPointOnPath(offset + glyphWidth, splineStep)
- };
- offset += glyphWidth;
- return {
- offset: offset,
- segment: segment
- };
- }
- }, {
- key: "measureText",
- value: function measureText(ctx, text) {
- var measuresCache = this.measuresCache;
- var targetText = text || this.getText();
-
- if (measuresCache.has(targetText)) {
- return measuresCache.get(targetText);
- }
-
- var measure = this.measureTargetText(ctx, targetText);
- measuresCache.set(targetText, measure);
- return measure;
- } // This method supposes what all custom fonts already loaded.
- // If some font will be loaded after this method call, <textPath> will not be rendered correctly.
- // You need to call this method manually to update glyphs cache.
-
- }, {
- key: "setTextData",
- value: function setTextData(ctx) {
- var _this2 = this;
-
- if (this.glyphInfo) {
- return;
- }
-
- var renderText = this.getText();
- var chars = renderText.split('');
- var spacesNumber = renderText.split(' ').length - 1;
- var dx = toNumbers(this.parent.getAttribute('dx').getString('0'));
- var anchor = this.parent.getStyle('text-anchor').getString('start');
- var thisSpacing = this.getStyle('letter-spacing');
- var parentSpacing = this.parent.getStyle('letter-spacing');
- var letterSpacing = 0;
-
- if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {
- letterSpacing = parentSpacing.getPixels();
- } else if (thisSpacing.hasValue()) {
- if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {
- letterSpacing = thisSpacing.getPixels();
- }
- } // fill letter-spacing cache
-
-
- var letterSpacingCache = [];
- var textLen = renderText.length;
- this.letterSpacingCache = letterSpacingCache;
-
- for (var i = 0; i < textLen; i++) {
- letterSpacingCache.push(typeof dx[i] !== 'undefined' ? dx[i] : letterSpacing);
- }
-
- var dxSum = letterSpacingCache.reduce(function (acc, cur) {
- return acc + cur || 0;
- }, 0);
- this.textWidth = this.measureText(ctx);
- this.textHeight = this.getFontSize();
- var textFullWidth = Math.max(this.textWidth + dxSum, 0);
- this.glyphInfo = [];
- var fullPathWidth = this.getPathLength();
- var startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;
- var offset = 0;
-
- if (anchor === 'middle' || anchor === 'center') {
- offset = -textFullWidth / 2;
- }
-
- if (anchor === 'end' || anchor === 'right') {
- offset = -textFullWidth;
- }
-
- offset += startOffset;
- chars.forEach(function (char, i) {
- // Find such segment what distance between p0 and p1 is approx. width of glyph
- var _this2$findSegmentToF = _this2.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, char, i),
- nextOffset = _this2$findSegmentToF.offset,
- segment = _this2$findSegmentToF.segment;
-
- offset = nextOffset;
-
- if (!segment.p0 || !segment.p1) {
- return;
- }
-
- var width = _this2.getLineLength(segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y); // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.
- // Can foresee having a rough pair table built in that the developer can override as needed.
- // Or use "dx" attribute of the <text> node as a naive replacement
-
-
- var kern = 0; // placeholder for future implementation
-
- var midpoint = _this2.getPointOnLine(kern + width / 2.0, segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y);
-
- var rotation = Math.atan2(segment.p1.y - segment.p0.y, segment.p1.x - segment.p0.x);
-
- _this2.glyphInfo.push({
- transposeX: midpoint.x,
- transposeY: midpoint.y,
- text: chars[i],
- p0: segment.p0,
- p1: segment.p1,
- rotation: rotation
- });
- });
- }
- }, {
- key: "parsePathData",
- value: function parsePathData(path) {
- this.pathLength = -1; // reset path length
-
- if (!path) {
- return [];
- }
-
- var pathCommands = [];
- var pathParser = path.pathParser;
- pathParser.reset(); // convert l, H, h, V, and v to L
-
- while (!pathParser.isEnd()) {
- var current = pathParser.current;
- var startX = current ? current.x : 0;
- var startY = current ? current.y : 0;
- var cmd = '';
- var points = [];
- pathParser.nextCommand();
- var upperCommand = pathParser.command.toUpperCase();
-
- switch (pathParser.command) {
- case 'M':
- case 'm':
- cmd = this.pathM(pathParser, points);
- break;
-
- case 'L':
- case 'l':
- cmd = this.pathL(pathParser, points);
- break;
-
- case 'H':
- case 'h':
- cmd = this.pathH(pathParser, points);
- break;
-
- case 'V':
- case 'v':
- cmd = this.pathV(pathParser, points);
- break;
-
- case 'C':
- case 'c':
- this.pathC(pathParser, points);
- break;
-
- case 'S':
- case 's':
- cmd = this.pathS(pathParser, points);
- break;
-
- case 'Q':
- case 'q':
- this.pathQ(pathParser, points);
- break;
-
- case 'T':
- case 't':
- cmd = this.pathT(pathParser, points);
- break;
-
- case 'A':
- case 'a':
- points = this.pathA(pathParser);
- break;
-
- case 'Z':
- case 'z':
- pathParser.current = pathParser.start;
- break;
- }
-
- if (upperCommand !== 'Z') {
- pathCommands.push({
- command: cmd || upperCommand,
- points: points,
- start: {
- x: startX,
- y: startY
- },
- pathLength: this.calcLength(startX, startY, cmd || upperCommand, points)
- });
- } else {
- pathCommands.push({
- command: 'z',
- points: [],
- pathLength: 0
- });
- }
- }
-
- return pathCommands;
- }
- }, {
- key: "pathM",
- value: function pathM(pathParser, points) {
- var p = pathParser.getAsCurrentPoint(); // pathParser.addMarker(p);
-
- points.push(p.x, p.y);
- pathParser.start = pathParser.current;
-
- while (!pathParser.isCommandOrEnd()) {
- var _p = pathParser.getAsCurrentPoint();
-
- points.push(_p.x, _p.y);
- return 'L';
- }
- }
- }, {
- key: "pathL",
- value: function pathL(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var p = pathParser.getAsCurrentPoint();
- points.push(p.x, p.y);
- }
-
- return 'L';
- }
- }, {
- key: "pathH",
- value: function pathH(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = new Point((pathParser.isRelativeCommand() ? current.x : 0) + pathParser.getScalar(), current.y);
- points.push(point.x, point.y);
- pathParser.current = point;
- }
-
- return 'L';
- }
- }, {
- key: "pathV",
- value: function pathV(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = new Point(current.x, (pathParser.isRelativeCommand() ? current.y : 0) + pathParser.getScalar());
- points.push(point.x, point.y);
- pathParser.current = point;
- }
-
- return 'L';
- }
- }, {
- key: "pathC",
- value: function pathC(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var point = pathParser.getPoint();
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }, {
- key: "pathS",
- value: function pathS(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var point = pathParser.getReflectedControlPoint();
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
-
- return 'C';
- }
- }, {
- key: "pathQ",
- value: function pathQ(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }, {
- key: "pathT",
- value: function pathT(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var controlPoint = pathParser.getReflectedControlPoint();
- pathParser.control = controlPoint;
- var currentPoint = pathParser.getAsCurrentPoint();
- points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
-
- return 'Q';
- }
- }, {
- key: "pathA",
- value: function pathA(pathParser) {
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current; // x1, y1
-
- var rx = pathParser.getScalar();
- var ry = pathParser.getScalar();
- var xAxisRotation = pathParser.getScalar() * (Math.PI / 180.0); // φ
-
- var largeArcFlag = pathParser.getScalar(); // fA
-
- var sweepFlag = pathParser.getScalar(); // fS
-
- var currentPoint = pathParser.getAsCurrentPoint(); // x2, y2
- // Conversion from endpoint to center parameterization
- // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
- // x1', y1'
-
- var currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2.0, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2.0); // adjust radii
-
- var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
-
- if (l > 1) {
- rx *= Math.sqrt(l);
- ry *= Math.sqrt(l);
- } // cx', cy'
-
-
- var s = (largeArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rx, 2) * Math.pow(ry, 2) - Math.pow(rx, 2) * Math.pow(currp.y, 2) - Math.pow(ry, 2) * Math.pow(currp.x, 2)) / (Math.pow(rx, 2) * Math.pow(currp.y, 2) + Math.pow(ry, 2) * Math.pow(currp.x, 2)));
-
- if (isNaN(s)) {
- s = 0;
- }
-
- var cpp = new Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy
-
- var centp = new Point((current.x + currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y); // initial angle
-
- var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // θ1
- // angle delta
-
- var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
- var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
- var ad = vectorsAngle(u, v); // Δθ
-
- if (vectorsRatio(u, v) <= -1) {
- ad = Math.PI;
- }
-
- if (vectorsRatio(u, v) >= 1) {
- ad = 0;
- }
-
- if (sweepFlag === 0 && ad > 0) {
- ad = ad - 2 * Math.PI;
- }
-
- if (sweepFlag === 1 && ad < 0) {
- ad = ad + 2 * Math.PI;
- }
-
- return [centp.x, centp.y, rx, ry, a1, ad, xAxisRotation, sweepFlag];
- }
- }
- }, {
- key: "calcLength",
- value: function calcLength(x, y, cmd, points) {
- var len = 0;
- var p1 = null;
- var p2 = null;
- var t = 0;
-
- switch (cmd) {
- case 'L':
- return this.getLineLength(x, y, points[0], points[1]);
-
- case 'C':
- // Approximates by breaking curve into 100 line segments
- len = 0.0;
- p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
-
- for (t = 0.01; t <= 1; t += 0.01) {
- p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
- len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
- p1 = p2;
- }
-
- return len;
-
- case 'Q':
- // Approximates by breaking curve into 100 line segments
- len = 0.0;
- p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);
-
- for (t = 0.01; t <= 1; t += 0.01) {
- p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);
- len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
- p1 = p2;
- }
-
- return len;
-
- case 'A':
- // Approximates by breaking curve into line segments
- len = 0.0;
- var start = points[4]; // 4 = theta
-
- var dTheta = points[5]; // 5 = dTheta
-
- var end = points[4] + dTheta;
- var inc = Math.PI / 180.0; // 1 degree resolution
-
- if (Math.abs(start - end) < inc) {
- inc = Math.abs(start - end);
- } // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi
-
-
- p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);
-
- if (dTheta < 0) {
- // clockwise
- for (t = start - inc; t > end; t -= inc) {
- p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
- len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
- p1 = p2;
- }
- } else {
- // counter-clockwise
- for (t = start + inc; t < end; t += inc) {
- p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
- len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
- p1 = p2;
- }
- }
-
- p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);
- len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
- return len;
- }
-
- return 0;
- }
- }, {
- key: "getPointOnLine",
- value: function getPointOnLine(dist, P1x, P1y, P2x, P2y) {
- var fromX = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : P1x;
- var fromY = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : P1y;
- var m = (P2y - P1y) / (P2x - P1x + PSEUDO_ZERO);
- var run = Math.sqrt(dist * dist / (1 + m * m));
-
- if (P2x < P1x) {
- run *= -1;
- }
-
- var rise = m * run;
- var pt = null;
-
- if (P2x === P1x) {
- // vertical line
- pt = {
- x: fromX,
- y: fromY + rise
- };
- } else if ((fromY - P1y) / (fromX - P1x + PSEUDO_ZERO) === m) {
- pt = {
- x: fromX + run,
- y: fromY + rise
- };
- } else {
- var ix = 0;
- var iy = 0;
- var len = this.getLineLength(P1x, P1y, P2x, P2y);
-
- if (len < PSEUDO_ZERO) {
- return null;
- }
-
- var u = (fromX - P1x) * (P2x - P1x) + (fromY - P1y) * (P2y - P1y);
- u = u / (len * len);
- ix = P1x + u * (P2x - P1x);
- iy = P1y + u * (P2y - P1y);
- var pRise = this.getLineLength(fromX, fromY, ix, iy);
- var pRun = Math.sqrt(dist * dist - pRise * pRise);
- run = Math.sqrt(pRun * pRun / (1 + m * m));
-
- if (P2x < P1x) {
- run *= -1;
- }
-
- rise = m * run;
- pt = {
- x: ix + run,
- y: iy + rise
- };
- }
-
- return pt;
- }
- }, {
- key: "getPointOnPath",
- value: function getPointOnPath(distance) {
- var fullLen = this.getPathLength();
- var cumulativePathLength = 0;
- var p = null;
-
- if (distance < -0.00005 || distance - 0.00005 > fullLen) {
- return null;
- }
-
- var dataArray = this.dataArray;
-
- var _iterator = _createForOfIteratorHelper$1(dataArray),
- _step;
-
- try {
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
- var pathCmd = _step.value;
-
- if (pathCmd && (pathCmd.pathLength < 0.00005 || cumulativePathLength + pathCmd.pathLength + 0.00005 < distance)) {
- cumulativePathLength += pathCmd.pathLength;
- continue;
- }
-
- var delta = distance - cumulativePathLength;
- var currentT = 0;
-
- switch (pathCmd.command) {
- case 'L':
- p = this.getPointOnLine(delta, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.start.x, pathCmd.start.y);
- break;
-
- case 'A':
- var start = pathCmd.points[4]; // 4 = theta
-
- var dTheta = pathCmd.points[5]; // 5 = dTheta
-
- var end = pathCmd.points[4] + dTheta;
- currentT = start + delta / pathCmd.pathLength * dTheta;
-
- if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {
- break;
- }
-
- p = this.getPointOnEllipticalArc(pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], currentT, pathCmd.points[6]);
- break;
-
- case 'C':
- currentT = delta / pathCmd.pathLength;
-
- if (currentT > 1) {
- currentT = 1;
- }
-
- p = this.getPointOnCubicBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], pathCmd.points[4], pathCmd.points[5]);
- break;
-
- case 'Q':
- currentT = delta / pathCmd.pathLength;
-
- if (currentT > 1) {
- currentT = 1;
- }
-
- p = this.getPointOnQuadraticBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3]);
- break;
-
- default:
- }
-
- if (p) {
- return p;
- }
-
- break;
- }
- } catch (err) {
- _iterator.e(err);
- } finally {
- _iterator.f();
- }
-
- return null;
- }
- }, {
- key: "getLineLength",
- value: function getLineLength(x1, y1, x2, y2) {
- return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
- }
- }, {
- key: "getPathLength",
- value: function getPathLength() {
- if (this.pathLength === -1) {
- this.pathLength = this.dataArray.reduce(function (length, command) {
- return command.pathLength > 0 ? length + command.pathLength : length;
- }, 0);
- }
-
- return this.pathLength;
- }
- }, {
- key: "getPointOnCubicBezier",
- value: function getPointOnCubicBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y, P4x, P4y) {
- var x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);
- var y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);
- return {
- x: x,
- y: y
- };
- }
- }, {
- key: "getPointOnQuadraticBezier",
- value: function getPointOnQuadraticBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y) {
- var x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);
- var y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);
- return {
- x: x,
- y: y
- };
- }
- }, {
- key: "getPointOnEllipticalArc",
- value: function getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
- var cosPsi = Math.cos(psi);
- var sinPsi = Math.sin(psi);
- var pt = {
- x: rx * Math.cos(theta),
- y: ry * Math.sin(theta)
- };
- return {
- x: cx + (pt.x * cosPsi - pt.y * sinPsi),
- y: cy + (pt.x * sinPsi + pt.y * cosPsi)
- };
- } // TODO need some optimisations. possibly build cache only for curved segments?
-
- }, {
- key: "buildEquidistantCache",
- value: function buildEquidistantCache(inputStep, inputPrecision) {
- var fullLen = this.getPathLength();
- var precision = inputPrecision || 0.25; // accuracy vs performance
-
- var step = inputStep || fullLen / 100;
-
- if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {
- // Prepare cache
- this.equidistantCache = {
- step: step,
- precision: precision,
- points: []
- }; // Calculate points
-
- var s = 0;
-
- for (var l = 0; l <= fullLen; l += precision) {
- var p0 = this.getPointOnPath(l);
- var p1 = this.getPointOnPath(l + precision);
-
- if (!p0 || !p1) {
- continue;
- }
-
- s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);
-
- if (s >= step) {
- this.equidistantCache.points.push({
- x: p0.x,
- y: p0.y,
- distance: l
- });
- s -= step;
- }
- }
- }
- }
- }, {
- key: "getEquidistantPointOnPath",
- value: function getEquidistantPointOnPath(targetDistance, step, precision) {
- this.buildEquidistantCache(step, precision);
-
- if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {
- return null;
- }
-
- var idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));
- return this.equidistantCache.points[idx] || null;
- }
- }]);
-
- return TextPathElement;
- }(TextElement);
-
- function _createSuper$y(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$y()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var ImageElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(ImageElement, _RenderedElement);
-
- var _super = _createSuper$y(ImageElement);
-
- function ImageElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ImageElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'image';
- _this.loaded = false;
-
- var href = _this.getHrefAttribute().getString();
-
- if (!href) {
- return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(_this);
- }
-
- var isSvg = /\.svg$/.test(href);
- document.images.push((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this));
-
- if (!isSvg) {
- _this.loadImage(href);
- } else {
- _this.loadSvg(href);
- }
-
- _this.isSvg = isSvg;
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ImageElement, [{
- key: "loadImage",
- value: function () {
- var _loadImage = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(href) {
- var image;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _context.prev = 0;
- _context.next = 3;
- return this.document.createImage(href);
-
- case 3:
- image = _context.sent;
- this.image = image;
- _context.next = 10;
- break;
-
- case 7:
- _context.prev = 7;
- _context.t0 = _context["catch"](0);
- // tslint:disable-next-line: no-console
- console.error("Error while loading image \"".concat(href, "\":"), _context.t0);
-
- case 10:
- this.loaded = true;
-
- case 11:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this, [[0, 7]]);
- }));
-
- function loadImage(_x) {
- return _loadImage.apply(this, arguments);
- }
-
- return loadImage;
- }()
- }, {
- key: "loadSvg",
- value: function () {
- var _loadSvg = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee2(href) {
- var response, svg;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
- while (1) {
- switch (_context2.prev = _context2.next) {
- case 0:
- _context2.prev = 0;
- _context2.next = 3;
- return this.document.fetch(href);
-
- case 3:
- response = _context2.sent;
- _context2.next = 6;
- return response.text();
-
- case 6:
- svg = _context2.sent;
- this.image = svg;
- _context2.next = 13;
- break;
-
- case 10:
- _context2.prev = 10;
- _context2.t0 = _context2["catch"](0);
- // tslint:disable-next-line: no-console
- console.error("Error while loading image \"".concat(href, "\":"), _context2.t0);
-
- case 13:
- this.loaded = true;
-
- case 14:
- case "end":
- return _context2.stop();
- }
- }
- }, _callee2, this, [[0, 10]]);
- }));
-
- function loadSvg(_x2) {
- return _loadSvg.apply(this, arguments);
- }
-
- return loadSvg;
- }()
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- var document = this.document,
- image = this.image,
- loaded = this.loaded;
- var x = this.getAttribute('x').getPixels('x');
- var y = this.getAttribute('y').getPixels('y');
- var width = this.getStyle('width').getPixels('x');
- var height = this.getStyle('height').getPixels('y');
-
- if (!loaded || !image || !width || !height) {
- return;
- }
-
- ctx.save();
-
- if (this.isSvg) {
- document.canvg.forkString(ctx, this.image, {
- ignoreMouse: true,
- ignoreAnimation: true,
- ignoreDimensions: true,
- ignoreClear: true,
- offsetX: x,
- offsetY: y,
- scaleWidth: width,
- scaleHeight: height
- }).render();
- } else {
- var _image = this.image;
- ctx.translate(x, y);
- document.setViewBox({
- ctx: ctx,
- aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
- width: width,
- desiredWidth: _image.width,
- height: height,
- desiredHeight: _image.height
- });
-
- if (this.loaded) {
- if (typeof _image.complete === 'undefined' || _image.complete) {
- ctx.drawImage(_image, 0, 0);
- }
- }
- }
-
- ctx.restore();
- }
- }, {
- key: "getBoundingBox",
- value: function getBoundingBox() {
- var x = this.getAttribute('x').getPixels('x');
- var y = this.getAttribute('y').getPixels('y');
- var width = this.getStyle('width').getPixels('x');
- var height = this.getStyle('height').getPixels('y');
- return new BoundingBox(x, y, x + width, y + height);
- }
- }]);
-
- return ImageElement;
- }(RenderedElement);
-
- function _createSuper$z(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$z()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$z() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var SymbolElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SymbolElement, _RenderedElement);
-
- var _super = _createSuper$z(SymbolElement);
-
- function SymbolElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SymbolElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'symbol';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SymbolElement, [{
- key: "render",
- value: function render(_) {// NO RENDER
- }
- }]);
-
- return SymbolElement;
- }(RenderedElement);
-
- var SVGFontLoader = /*#__PURE__*/function () {
- function SVGFontLoader(document) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SVGFontLoader);
-
- this.document = document;
- this.loaded = false;
- document.fonts.push(this);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SVGFontLoader, [{
- key: "load",
- value: function () {
- var _load = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(fontFamily, url) {
- var document, svgDocument, fonts;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _context.prev = 0;
- document = this.document;
- _context.next = 4;
- return document.canvg.parser.load(url);
-
- case 4:
- svgDocument = _context.sent;
- fonts = svgDocument.getElementsByTagName('font');
- Array.from(fonts).forEach(function (fontNode) {
- var font = document.createElement(fontNode);
- document.definitions[fontFamily] = font;
- });
- _context.next = 12;
- break;
-
- case 9:
- _context.prev = 9;
- _context.t0 = _context["catch"](0);
- // tslint:disable-next-line: no-console
- console.error("Error while loading font \"".concat(url, "\":"), _context.t0);
-
- case 12:
- this.loaded = true;
-
- case 13:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this, [[0, 9]]);
- }));
-
- function load(_x, _x2) {
- return _load.apply(this, arguments);
- }
-
- return load;
- }()
- }]);
-
- return SVGFontLoader;
- }();
-
- function _createSuper$A(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$A()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$A() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var StyleElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(StyleElement, _Element);
-
- var _super = _createSuper$A(StyleElement);
-
- function StyleElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, StyleElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'style';
- var css = compressSpaces(Array.from(node.childNodes).map(function (_) {
- return _.data;
- }).join('').replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, '') // remove comments
- .replace(/@import.*;/g, '') // remove imports
- );
- var cssDefs = css.split('}');
- cssDefs.forEach(function (_) {
- var def = _.trim();
-
- if (!def) {
- return;
- }
-
- var cssParts = def.split('{');
- var cssClasses = cssParts[0].split(',');
- var cssProps = cssParts[1].split(';');
- cssClasses.forEach(function (_) {
- var cssClass = _.trim();
-
- if (!cssClass) {
- return;
- }
-
- var props = document.styles[cssClass] || {};
- cssProps.forEach(function (cssProp) {
- var prop = cssProp.indexOf(':');
- var name = cssProp.substr(0, prop).trim();
- var value = cssProp.substr(prop + 1, cssProp.length - prop).trim();
-
- if (name && value) {
- props[name] = new Property(document, name, value);
- }
- });
- document.styles[cssClass] = props;
- document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
-
- if (cssClass === '@font-face') {
- // && !nodeEnv
- var fontFamily = props['font-family'].getString().replace(/"|'/g, '');
- var srcs = props.src.getString().split(',');
- srcs.forEach(function (src) {
- if (src.indexOf('format("svg")') > 0) {
- var url = parseExternalUrl(src);
-
- if (url) {
- new SVGFontLoader(document).load(fontFamily, url);
- }
- }
- });
- }
- });
- });
- return _this;
- }
-
- return StyleElement;
- }(Element);
- StyleElement.parseExternalUrl = parseExternalUrl;
-
- function _createSuper$B(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$B()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$B() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var UseElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(UseElement, _RenderedElement);
-
- var _super = _createSuper$B(UseElement);
-
- function UseElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, UseElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'use';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(UseElement, [{
- key: "setContext",
- value: function setContext(ctx) {
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(UseElement.prototype), "setContext", this).call(this, ctx);
-
- var xAttr = this.getAttribute('x');
- var yAttr = this.getAttribute('y');
-
- if (xAttr.hasValue()) {
- ctx.translate(xAttr.getPixels('x'), 0);
- }
-
- if (yAttr.hasValue()) {
- ctx.translate(0, yAttr.getPixels('y'));
- }
- }
- }, {
- key: "path",
- value: function path(ctx) {
- var element = this.element;
-
- if (element) {
- element.path(ctx);
- }
- }
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- var document = this.document,
- element = this.element;
-
- if (element) {
- var tempSvg = element;
-
- if (element.type === 'symbol') {
- // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
- tempSvg = new SVGElement(document, null);
- tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());
- tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());
- tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());
- tempSvg.children = element.children;
- }
-
- if (tempSvg.type === 'svg') {
- var widthStyle = this.getStyle('width', false, true);
- var heightStyle = this.getStyle('height', false, true); // if symbol or svg, inherit width/height from me
-
- if (widthStyle.hasValue()) {
- tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());
- }
-
- if (heightStyle.hasValue()) {
- tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());
- }
- }
-
- var oldParent = tempSvg.parent;
- tempSvg.parent = this;
- tempSvg.render(ctx);
- tempSvg.parent = oldParent;
- }
- }
- }, {
- key: "getBoundingBox",
- value: function getBoundingBox(ctx) {
- var element = this.element;
-
- if (element) {
- return element.getBoundingBox(ctx);
- }
-
- return null;
- }
- }, {
- key: "elementTransform",
- value: function elementTransform() {
- var document = this.document,
- element = this.element;
- return Transform.fromElement(document, element);
- }
- }, {
- key: "element",
- get: function get() {
- if (!this._element) {
- this._element = this.getHrefAttribute().getDefinition();
- }
-
- return this._element;
- }
- }]);
-
- return UseElement;
- }(RenderedElement);
-
- function _createSuper$C(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$C()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$C() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- function imGet(img, x, y, width, _, rgba) {
- return img[y * width * 4 + x * 4 + rgba];
- }
-
- function imSet(img, x, y, width, _, rgba, val) {
- img[y * width * 4 + x * 4 + rgba] = val;
- }
-
- function m(matrix, i, v) {
- var mi = matrix[i];
- return mi * (mi < 0 ? v - 255 : v);
- }
-
- function c(a, m1, m2, m3) {
- return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;
- }
-
- var FeColorMatrixElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeColorMatrixElement, _Element);
-
- var _super = _createSuper$C(FeColorMatrixElement);
-
- function FeColorMatrixElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeColorMatrixElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'feColorMatrix';
- var matrix = toNumbers(_this.getAttribute('values').getString());
-
- switch (_this.getAttribute('type').getString('matrix')) {
- // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
- case 'saturate':
- {
- var s = matrix[0];
- matrix = [0.213 + 0.787 * s, 0.715 - 0.715 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 + 0.285 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 - 0.715 * s, 0.072 + 0.928 * s, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
- break;
- }
-
- case 'hueRotate':
- {
- var a = matrix[0] * Math.PI / 180.0;
- matrix = [c(a, 0.213, 0.787, -0.213), c(a, 0.715, -0.715, -0.715), c(a, 0.072, -0.072, 0.928), 0, 0, c(a, 0.213, -0.213, 0.143), c(a, 0.715, 0.285, 0.140), c(a, 0.072, -0.072, -0.283), 0, 0, c(a, 0.213, -0.213, -0.787), c(a, 0.715, -0.715, 0.715), c(a, 0.072, 0.928, 0.072), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
- break;
- }
-
- case 'luminanceToAlpha':
- matrix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2125, 0.7154, 0.0721, 0, 0, 0, 0, 0, 0, 1];
- break;
- }
-
- _this.matrix = matrix;
- _this.includeOpacity = _this.getAttribute('includeOpacity').hasValue();
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeColorMatrixElement, [{
- key: "apply",
- value: function apply(ctx, _, __, width, height) {
- // assuming x==0 && y==0 for now
- var includeOpacity = this.includeOpacity,
- matrix = this.matrix;
- var srcData = ctx.getImageData(0, 0, width, height);
-
- for (var y = 0; y < height; y++) {
- for (var x = 0; x < width; x++) {
- var r = imGet(srcData.data, x, y, width, height, 0);
- var g = imGet(srcData.data, x, y, width, height, 1);
- var b = imGet(srcData.data, x, y, width, height, 2);
- var a = imGet(srcData.data, x, y, width, height, 3);
- var nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);
- var ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);
- var nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);
- var na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);
-
- if (includeOpacity) {
- nr = ng = nb = 0;
- na *= a / 255;
- }
-
- imSet(srcData.data, x, y, width, height, 0, nr);
- imSet(srcData.data, x, y, width, height, 1, ng);
- imSet(srcData.data, x, y, width, height, 2, nb);
- imSet(srcData.data, x, y, width, height, 3, na);
- }
- }
-
- ctx.clearRect(0, 0, width, height);
- ctx.putImageData(srcData, 0, 0);
- }
- }]);
-
- return FeColorMatrixElement;
- }(Element);
-
- function _createSuper$D(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$D()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$D() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var MaskElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MaskElement, _Element);
-
- var _super = _createSuper$D(MaskElement);
-
- function MaskElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MaskElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'mask';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(MaskElement, [{
- key: "apply",
- value: function apply(ctx, element) {
- var document = this.document; // render as temp svg
-
- var x = this.getAttribute('x').getPixels('x');
- var y = this.getAttribute('y').getPixels('y');
- var width = this.getStyle('width').getPixels('x');
- var height = this.getStyle('height').getPixels('y');
-
- if (!width && !height) {
- var boundingBox = new BoundingBox();
- this.children.forEach(function (child) {
- boundingBox.addBoundingBox(child.getBoundingBox(ctx));
- });
- x = Math.floor(boundingBox.x1);
- y = Math.floor(boundingBox.y1);
- width = Math.floor(boundingBox.width);
- height = Math.floor(boundingBox.height);
- }
-
- var ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);
- var maskCanvas = document.createCanvas(x + width, y + height);
- var maskCtx = maskCanvas.getContext('2d');
- document.screen.setDefaults(maskCtx);
- this.renderChildren(maskCtx); // convert mask to alpha with a fake node
- // TODO: refactor out apply from feColorMatrix
-
- new FeColorMatrixElement(document, {
- nodeType: 1,
- childNodes: [],
- attributes: [{
- nodeName: 'type',
- value: 'luminanceToAlpha'
- }, {
- nodeName: 'includeOpacity',
- value: 'true'
- }]
- }).apply(maskCtx, 0, 0, x + width, y + height);
- var tmpCanvas = document.createCanvas(x + width, y + height);
- var tmpCtx = tmpCanvas.getContext('2d');
- document.screen.setDefaults(tmpCtx);
- element.render(tmpCtx);
- tmpCtx.globalCompositeOperation = 'destination-in';
- tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');
- tmpCtx.fillRect(0, 0, x + width, y + height);
- ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');
- ctx.fillRect(0, 0, x + width, y + height); // reassign mask
-
- this.restoreStyles(element, ignoredStyles);
- }
- }, {
- key: "render",
- value: function render(_) {// NO RENDER
- }
- }]);
-
- return MaskElement;
- }(Element);
- MaskElement.ignoreStyles = ['mask', 'transform', 'clip-path'];
-
- function _createSuper$E(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$E()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$E() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var noop = function noop() {};
-
- var ClipPathElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(ClipPathElement, _Element);
-
- var _super = _createSuper$E(ClipPathElement);
-
- function ClipPathElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ClipPathElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'clipPath';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ClipPathElement, [{
- key: "apply",
- value: function apply(ctx) {
- var document = this.document;
- var contextProto = Reflect.getPrototypeOf(ctx);
- var beginPath = ctx.beginPath,
- closePath = ctx.closePath;
-
- if (contextProto) {
- contextProto.beginPath = noop;
- contextProto.closePath = noop;
- }
-
- Reflect.apply(beginPath, ctx, []);
- this.children.forEach(function (child) {
- if (typeof child.path === 'undefined') {
- return;
- }
-
- var transform = typeof child.elementTransform !== 'undefined' ? child.elementTransform() : null; // handle <use />
-
- if (!transform) {
- transform = Transform.fromElement(document, child);
- }
-
- if (transform) {
- transform.apply(ctx);
- }
-
- child.path(ctx);
-
- if (contextProto) {
- contextProto.closePath = closePath;
- }
-
- if (transform) {
- transform.unapply(ctx);
- }
- });
- Reflect.apply(closePath, ctx, []);
- ctx.clip();
-
- if (contextProto) {
- contextProto.beginPath = beginPath;
- contextProto.closePath = closePath;
- }
- }
- }, {
- key: "render",
- value: function render(_) {// NO RENDER
- }
- }]);
-
- return ClipPathElement;
- }(Element);
-
- function _createSuper$F(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$F()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$F() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FilterElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FilterElement, _Element);
-
- var _super = _createSuper$F(FilterElement);
-
- function FilterElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FilterElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'filter';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FilterElement, [{
- key: "apply",
- value: function apply(ctx, element) {
- // render as temp svg
- var document = this.document,
- children = this.children;
- var boundingBox = element.getBoundingBox(ctx);
-
- if (!boundingBox) {
- return;
- }
-
- var px = 0;
- var py = 0;
- children.forEach(function (child) {
- var efd = child.extraFilterDistance || 0;
- px = Math.max(px, efd);
- py = Math.max(py, efd);
- });
- var width = Math.floor(boundingBox.width);
- var height = Math.floor(boundingBox.height);
- var tmpCanvasWidth = width + 2 * px;
- var tmpCanvasHeight = height + 2 * py;
-
- if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {
- return;
- }
-
- var x = Math.floor(boundingBox.x);
- var y = Math.floor(boundingBox.y);
- var ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);
- var tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);
- var tmpCtx = tmpCanvas.getContext('2d');
- document.screen.setDefaults(tmpCtx);
- tmpCtx.translate(-x + px, -y + py);
- element.render(tmpCtx); // apply filters
-
- children.forEach(function (child) {
- if (typeof child.apply === 'function') {
- child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);
- }
- }); // render on me
-
- ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);
- this.restoreStyles(element, ignoredStyles);
- }
- }, {
- key: "render",
- value: function render(_) {// NO RENDER
- }
- }]);
-
- return FilterElement;
- }(Element);
- FilterElement.ignoreStyles = ['filter', 'transform', 'clip-path'];
-
- function _createSuper$G(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$G()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$G() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FeDropShadowElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeDropShadowElement, _Element);
-
- var _super = _createSuper$G(FeDropShadowElement);
-
- function FeDropShadowElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeDropShadowElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'feDropShadow';
-
- _this.addStylesFromStyleDefinition();
-
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeDropShadowElement, [{
- key: "apply",
- value: function apply(_, __, ___, ____, _____) {// TODO: implement
- }
- }]);
-
- return FeDropShadowElement;
- }(Element);
-
- function _createSuper$H(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$H()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$H() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FeMorphologyElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeMorphologyElement, _Element);
-
- var _super = _createSuper$H(FeMorphologyElement);
-
- function FeMorphologyElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeMorphologyElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'feMorphology';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeMorphologyElement, [{
- key: "apply",
- value: function apply(_, __, ___, ____, _____) {// TODO: implement
- }
- }]);
-
- return FeMorphologyElement;
- }(Element);
-
- function _createSuper$I(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$I()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$I() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FeCompositeElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeCompositeElement, _Element);
-
- var _super = _createSuper$I(FeCompositeElement);
-
- function FeCompositeElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeCompositeElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'feComposite';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeCompositeElement, [{
- key: "apply",
- value: function apply(_, __, ___, ____, _____) {// TODO: implement
- }
- }]);
-
- return FeCompositeElement;
- }(Element);
-
- function _createSuper$J(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$J()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$J() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FeGaussianBlurElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeGaussianBlurElement, _Element);
-
- var _super = _createSuper$J(FeGaussianBlurElement);
-
- function FeGaussianBlurElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeGaussianBlurElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'feGaussianBlur';
- _this.blurRadius = Math.floor(_this.getAttribute('stdDeviation').getNumber());
- _this.extraFilterDistance = _this.blurRadius;
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeGaussianBlurElement, [{
- key: "apply",
- value: function apply(ctx, x, y, width, height) {
- var document = this.document,
- blurRadius = this.blurRadius;
- var body = document.window ? document.window.document.body : null;
- var canvas = ctx.canvas; // StackBlur requires canvas be on document
-
- canvas.id = document.getUniqueId();
-
- if (body) {
- canvas.style.display = 'none';
- body.appendChild(canvas);
- }
-
- (0,stackblur_canvas__WEBPACK_IMPORTED_MODULE_55__.canvasRGBA)(canvas, x, y, width, height, blurRadius);
-
- if (body) {
- body.removeChild(canvas);
- }
- }
- }]);
-
- return FeGaussianBlurElement;
- }(Element);
-
- function _createSuper$K(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$K()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$K() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TitleElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TitleElement, _Element);
-
- var _super = _createSuper$K(TitleElement);
-
- function TitleElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TitleElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'title';
- return _this;
- }
-
- return TitleElement;
- }(Element);
-
- function _createSuper$L(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$L()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$L() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var DescElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(DescElement, _Element);
-
- var _super = _createSuper$L(DescElement);
-
- function DescElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, DescElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'desc';
- return _this;
- }
-
- return DescElement;
- }(Element);
-
- var elementTypes = {
- 'svg': SVGElement,
- 'rect': RectElement,
- 'circle': CircleElement,
- 'ellipse': EllipseElement,
- 'line': LineElement,
- 'polyline': PolylineElement,
- 'polygon': PolygonElement,
- 'path': PathElement,
- 'pattern': PatternElement,
- 'marker': MarkerElement,
- 'defs': DefsElement,
- 'linearGradient': LinearGradientElement,
- 'radialGradient': RadialGradientElement,
- 'stop': StopElement,
- 'animate': AnimateElement,
- 'animateColor': AnimateColorElement,
- 'animateTransform': AnimateTransformElement,
- 'font': FontElement,
- 'font-face': FontFaceElement,
- 'missing-glyph': MissingGlyphElement,
- 'glyph': GlyphElement,
- 'text': TextElement,
- 'tspan': TSpanElement,
- 'tref': TRefElement,
- 'a': AElement,
- 'textPath': TextPathElement,
- 'image': ImageElement,
- 'g': GElement,
- 'symbol': SymbolElement,
- 'style': StyleElement,
- 'use': UseElement,
- 'mask': MaskElement,
- 'clipPath': ClipPathElement,
- 'filter': FilterElement,
- 'feDropShadow': FeDropShadowElement,
- 'feMorphology': FeMorphologyElement,
- 'feComposite': FeCompositeElement,
- 'feColorMatrix': FeColorMatrixElement,
- 'feGaussianBlur': FeGaussianBlurElement,
- 'title': TitleElement,
- 'desc': DescElement
- };
-
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
-
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
-
- function createCanvas(width, height) {
- var canvas = document.createElement('canvas');
- canvas.width = width;
- canvas.height = height;
- return canvas;
- }
-
- function createImage(_x) {
- return _createImage.apply(this, arguments);
- }
-
- function _createImage() {
- _createImage = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(src) {
- var anonymousCrossOrigin,
- image,
- _args = arguments;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- anonymousCrossOrigin = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
- image = document.createElement('img');
-
- if (anonymousCrossOrigin) {
- image.crossOrigin = 'Anonymous';
- }
-
- return _context.abrupt("return", new Promise(function (resolve, reject) {
- image.onload = function () {
- resolve(image);
- };
-
- image.onerror = function () {
- reject();
- };
-
- image.src = src;
- }));
-
- case 4:
- case "end":
- return _context.stop();
- }
- }
- }, _callee);
- }));
- return _createImage.apply(this, arguments);
- }
-
- var Document = /*#__PURE__*/function () {
- function Document(canvg) {
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- _ref$rootEmSize = _ref.rootEmSize,
- rootEmSize = _ref$rootEmSize === void 0 ? 12 : _ref$rootEmSize,
- _ref$emSize = _ref.emSize,
- emSize = _ref$emSize === void 0 ? 12 : _ref$emSize,
- _ref$createCanvas = _ref.createCanvas,
- createCanvas = _ref$createCanvas === void 0 ? Document.createCanvas : _ref$createCanvas,
- _ref$createImage = _ref.createImage,
- createImage = _ref$createImage === void 0 ? Document.createImage : _ref$createImage,
- anonymousCrossOrigin = _ref.anonymousCrossOrigin;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Document);
-
- this.canvg = canvg;
- this.definitions = {};
- this.styles = {};
- this.stylesSpecificity = {};
- this.images = [];
- this.fonts = [];
- this.emSizeStack = [];
- this.uniqueId = 0;
- this.screen = canvg.screen;
- this.rootEmSize = rootEmSize;
- this.emSize = emSize;
- this.createCanvas = createCanvas;
- this.createImage = this.bindCreateImage(createImage, anonymousCrossOrigin);
- this.screen.wait(this.isImagesLoaded.bind(this));
- this.screen.wait(this.isFontsLoaded.bind(this));
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Document, [{
- key: "bindCreateImage",
- value: function bindCreateImage(createImage, anonymousCrossOrigin) {
- if (typeof anonymousCrossOrigin === 'boolean') {
- return function (source, forceAnonymousCrossOrigin) {
- return createImage(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin);
- };
- }
-
- return createImage;
- }
- }, {
- key: "popEmSize",
- value: function popEmSize() {
- var emSizeStack = this.emSizeStack;
- emSizeStack.pop();
- }
- }, {
- key: "getUniqueId",
- value: function getUniqueId() {
- return "canvg".concat(++this.uniqueId);
- }
- }, {
- key: "isImagesLoaded",
- value: function isImagesLoaded() {
- return this.images.every(function (_) {
- return _.loaded;
- });
- }
- }, {
- key: "isFontsLoaded",
- value: function isFontsLoaded() {
- return this.fonts.every(function (_) {
- return _.loaded;
- });
- }
- }, {
- key: "createDocumentElement",
- value: function createDocumentElement(document) {
- var documentElement = this.createElement(document.documentElement);
- documentElement.root = true;
- documentElement.addStylesFromStyleDefinition();
- this.documentElement = documentElement;
- return documentElement;
- }
- }, {
- key: "createElement",
- value: function createElement(node) {
- var elementType = node.nodeName.replace(/^[^:]+:/, '');
- var ElementType = Document.elementTypes[elementType];
-
- if (typeof ElementType !== 'undefined') {
- return new ElementType(this, node);
- }
-
- return new UnknownElement(this, node);
- }
- }, {
- key: "createTextNode",
- value: function createTextNode(node) {
- return new TextNode(this, node);
- }
- }, {
- key: "setViewBox",
- value: function setViewBox(config) {
- this.screen.setViewBox(_objectSpread({
- document: this
- }, config));
- }
- }, {
- key: "window",
- get: function get() {
- return this.screen.window;
- }
- }, {
- key: "fetch",
- get: function get() {
- return this.screen.fetch;
- }
- }, {
- key: "ctx",
- get: function get() {
- return this.screen.ctx;
- }
- }, {
- key: "emSize",
- get: function get() {
- var emSizeStack = this.emSizeStack;
- return emSizeStack[emSizeStack.length - 1];
- },
- set: function set(value) {
- var emSizeStack = this.emSizeStack;
- emSizeStack.push(value);
- }
- }]);
-
- return Document;
- }();
- Document.createCanvas = createCanvas;
- Document.createImage = createImage;
- Document.elementTypes = elementTypes;
-
- function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
-
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
- /**
- * SVG renderer on canvas.
- */
-
- var Canvg = /*#__PURE__*/function () {
- /**
- * Main constructor.
- * @param ctx - Rendering context.
- * @param svg - SVG Document.
- * @param options - Rendering options.
- */
- function Canvg(ctx, svg) {
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Canvg);
-
- this.parser = new Parser(options);
- this.screen = new Screen(ctx, options);
- this.options = options;
- var document = new Document(this, options);
- var documentElement = document.createDocumentElement(svg);
- this.document = document;
- this.documentElement = documentElement;
- }
- /**
- * Create Canvg isntance from SVG source string or URL.
- * @param ctx - Rendering context.
- * @param svg - SVG source string or URL.
- * @param options - Rendering options.
- */
-
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Canvg, [{
- key: "fork",
-
- /**
- * Create new Canvg instance with inherited options.
- * @param ctx - Rendering context.
- * @param svg - SVG source string or URL.
- * @param options - Rendering options.
- */
- value: function fork(ctx, svg) {
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- return Canvg.from(ctx, svg, _objectSpread$1({}, this.options, {}, options));
- }
- /**
- * Create new Canvg instance with inherited options.
- * @param ctx - Rendering context.
- * @param svg - SVG source string.
- * @param options - Rendering options.
- */
-
- }, {
- key: "forkString",
- value: function forkString(ctx, svg) {
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- return Canvg.fromString(ctx, svg, _objectSpread$1({}, this.options, {}, options));
- }
- /**
- * Document is ready promise.
- */
-
- }, {
- key: "ready",
- value: function ready() {
- return this.screen.ready();
- }
- /**
- * Document is ready value.
- */
-
- }, {
- key: "isReady",
- value: function isReady() {
- return this.screen.isReady();
- }
- /**
- * Render only first frame, ignoring animations and mouse.
- * @param options - Rendering options.
- */
-
- }, {
- key: "render",
- value: function () {
- var _render = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee() {
- var options,
- _args = arguments;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
- this.start(_objectSpread$1({
- enableRedraw: true,
- ignoreAnimation: true,
- ignoreMouse: true
- }, options));
- _context.next = 4;
- return this.ready();
-
- case 4:
- this.stop();
-
- case 5:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this);
- }));
-
- function render() {
- return _render.apply(this, arguments);
- }
-
- return render;
- }()
- /**
- * Start rendering.
- * @param options - Render options.
- */
-
- }, {
- key: "start",
- value: function start() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- var documentElement = this.documentElement,
- screen = this.screen,
- baseOptions = this.options;
- screen.start(documentElement, _objectSpread$1({
- enableRedraw: true
- }, baseOptions, {}, options));
- }
- /**
- * Stop rendering.
- */
-
- }, {
- key: "stop",
- value: function stop() {
- this.screen.stop();
- }
- /**
- * Resize SVG to fit in given size.
- * @param width
- * @param height
- * @param preserveAspectRatio
- */
-
- }, {
- key: "resize",
- value: function resize(width) {
- var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
- var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- this.documentElement.resize(width, height, preserveAspectRatio);
- }
- }], [{
- key: "from",
- value: function () {
- var _from = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee2(ctx, svg) {
- var options,
- parser,
- svgDocument,
- _args2 = arguments;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
- while (1) {
- switch (_context2.prev = _context2.next) {
- case 0:
- options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
- parser = new Parser(options);
- _context2.next = 4;
- return parser.parse(svg);
-
- case 4:
- svgDocument = _context2.sent;
- return _context2.abrupt("return", new Canvg(ctx, svgDocument, options));
-
- case 6:
- case "end":
- return _context2.stop();
- }
- }
- }, _callee2);
- }));
-
- function from(_x, _x2) {
- return _from.apply(this, arguments);
- }
-
- return from;
- }()
- /**
- * Create Canvg isntance from SVG source string.
- * @param ctx - Rendering context.
- * @param svg - SVG source string.
- * @param options - Rendering options.
- */
-
- }, {
- key: "fromString",
- value: function fromString(ctx, svg) {
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- var parser = new Parser(options);
- var svgDocument = parser.parseFromString(svg);
- return new Canvg(ctx, svgDocument, options);
- }
- }]);
-
- return Canvg;
- }();
-
- /**
- * Options preset for `OffscreenCanvas`.
- * @param config - Preset requirements.
- * @param config.DOMParser - XML/HTML parser from string into DOM Document.
- */
- function offscreen() {
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
- DOMParserFallback = _ref.DOMParser;
-
- var preset = {
- window: null,
- ignoreAnimation: true,
- ignoreMouse: true,
- DOMParser: DOMParserFallback,
- createCanvas: function createCanvas(width, height) {
- return new OffscreenCanvas(width, height);
- },
- createImage: function createImage(url) {
- return (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee() {
- var response, blob, img;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _context.next = 2;
- return fetch(url);
-
- case 2:
- response = _context.sent;
- _context.next = 5;
- return response.blob();
-
- case 5:
- blob = _context.sent;
- _context.next = 8;
- return createImageBitmap(blob);
-
- case 8:
- img = _context.sent;
- return _context.abrupt("return", img);
-
- case 10:
- case "end":
- return _context.stop();
- }
- }
- }, _callee);
- }))();
- }
- };
-
- if (typeof DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {
- Reflect.deleteProperty(preset, 'DOMParser');
- }
-
- return preset;
- }
-
- /**
- * Options preset for `node-canvas`.
- * @param config - Preset requirements.
- * @param config.DOMParser - XML/HTML parser from string into DOM Document.
- * @param config.canvas - `node-canvas` exports.
- * @param config.fetch - WHATWG-compatible `fetch` function.
- */
- function node(_ref) {
- var DOMParser = _ref.DOMParser,
- canvas = _ref.canvas,
- fetch = _ref.fetch;
- return {
- window: null,
- ignoreAnimation: true,
- ignoreMouse: true,
- DOMParser: DOMParser,
- fetch: fetch,
- createCanvas: canvas.createCanvas,
- createImage: canvas.loadImage
- };
- }
-
-
-
- var index = /*#__PURE__*/Object.freeze({
- __proto__: null,
- offscreen: offscreen,
- node: node
- });
-
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Canvg);
-
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9yZWdlbmVyYXRvci1ydW50aW1lL3J1bnRpbWUuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTQtcHJlc2VudCwgRmFjZWJvb2ssIEluYy5cbiAq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ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgICAgICBkb25lOiBjb250ZXh0LmRvbmVcbiAgICAgICAgICB9O1xuXG4gICAgICAgIH0gZWxzZSBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgLy8gRGlzcGF0Y2ggdGhlIGV4Y2VwdGlvbiBieSBsb29waW5nIGJhY2sgYXJvdW5kIHRvIHRoZVxuICAgICAgICAgIC8vIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpIGNhbGwgYWJvdmUuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAg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hIHJldHVybiBtZXRob2QsIGdpdmUgaXQgYVxuICAgICAgICAgIC8vIGNoYW5jZSB0byBjbGVhbiB1cC5cbiAgICAgICAgICBjb250ZXh0Lm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbWF5YmVJbnZva2VEZWxlZ2F0ZShkZWxlZ2F0ZSwgY29udGV4dCk7XG5cbiAgICAgICAgICBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgLy8gSWYgbWF5YmVJbnZva2VEZWxlZ2F0ZShjb250ZXh0KSBjaGFuZ2VkIGNvbnRleHQubWV0aG9kIGZyb21cbiAgICAgICAgICAgIC8vIFwicmV0dXJuXCIgdG8gXCJ0aHJvd1wiLCBsZXQgdGhhdCBvdmVycmlkZSB0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICBcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5cbiAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICBjb250ZXh0LmFyZyA9IHJlY29yZC5hcmc7XG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnV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lvbi5cbiAgICAgICAgICByZXR1cm4gaGFuZGxlKFwiZW5kXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYpIHtcbiAgICAgICAgICB2YXIgaGFzQ2F0Y2ggPSBoYXNPd24uY2FsbChlbnRyeSwgXCJjYXRjaExvY1wiKTtcbiAgICAgICAgICB2YXIgaGFzRmluYWxseSA9IGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIik7XG5cbiAgICAgICAgICBpZiAoaGFzQ2F0Y2ggJiYgaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSB0cnlMb2MpIHtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgdmFyIHRocm93biA9IHJlY29yZC5hcmc7XG4gICAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRocm93bjtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgY29udGV4dC5jYXRjaCBtZXRob2QgbXVzdCBvbmx5IGJlIGNhbGxlZCB3aXRoIGEgbG9jYXRpb25cbiAgICAgIC8vIGFyZ3VtZW50IHRoYXQgY29ycmVzcG9uZHMgdG8gYSBrbm93biBjYXRjaCBibG9jay5cbiAgICAgIHRocm93IG5ldyBFcnJvcihcImlsbGVnYWwgY2F0Y2ggYXR0ZW1wdFwiKTtcbiAgIC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7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
-
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
- \*********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _arrayLikeToArray)
- /* harmony export */ });
- function _arrayLikeToArray(arr, len) {
- if (len == null || len > arr.length) len = arr.length;
-
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
- arr2[i] = arr[i];
- }
-
- return arr2;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _arrayWithHoles)
- /* harmony export */ });
- function _arrayWithHoles(arr) {
- if (Array.isArray(arr)) return arr;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***!
- \**********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _arrayWithoutHoles)
- /* harmony export */ });
- /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
-
- function _arrayWithoutHoles(arr) {
- if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
- /*!**************************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
- \**************************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _assertThisInitialized)
- /* harmony export */ });
- function _assertThisInitialized(self) {
- if (self === void 0) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
-
- return self;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***!
- \*********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _asyncToGenerator)
- /* harmony export */ });
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
- try {
- var info = gen[key](arg);
- var value = info.value;
- } catch (error) {
- reject(error);
- return;
- }
-
- if (info.done) {
- resolve(value);
- } else {
- Promise.resolve(value).then(_next, _throw);
- }
- }
-
- function _asyncToGenerator(fn) {
- return function () {
- var self = this,
- args = arguments;
- return new Promise(function (resolve, reject) {
- var gen = fn.apply(self, args);
-
- function _next(value) {
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
- }
-
- function _throw(err) {
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
- }
-
- _next(undefined);
- });
- };
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _classCallCheck)
- /* harmony export */ });
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js":
- /*!****************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***!
- \****************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _createClass)
- /* harmony export */ });
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
-
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _defineProperty)
- /* harmony export */ });
- function _defineProperty(obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
-
- return obj;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/get.js":
- /*!********************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/get.js ***!
- \********************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _get)
- /* harmony export */ });
- /* harmony import */ var _superPropBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superPropBase.js */ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js");
-
- function _get(target, property, receiver) {
- if (typeof Reflect !== "undefined" && Reflect.get) {
- _get = Reflect.get;
- } else {
- _get = function _get(target, property, receiver) {
- var base = (0,_superPropBase_js__WEBPACK_IMPORTED_MODULE_0__.default)(target, property);
- if (!base) return;
- var desc = Object.getOwnPropertyDescriptor(base, property);
-
- if (desc.get) {
- return desc.get.call(receiver);
- }
-
- return desc.value;
- };
- }
-
- return _get(target, property, receiver || target);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _getPrototypeOf)
- /* harmony export */ });
- function _getPrototypeOf(o) {
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
- return o.__proto__ || Object.getPrototypeOf(o);
- };
- return _getPrototypeOf(o);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js":
- /*!*************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***!
- \*************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _inherits)
- /* harmony export */ });
- /* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
-
- function _inherits(subClass, superClass) {
- if (typeof superClass !== "function" && superClass !== null) {
- throw new TypeError("Super expression must either be null or a function");
- }
-
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- writable: true,
- configurable: true
- }
- });
- if (superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(subClass, superClass);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
- /*!********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
- \********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _iterableToArray)
- /* harmony export */ });
- function _iterableToArray(iter) {
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":
- /*!*************************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***!
- \*************************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _iterableToArrayLimit)
- /* harmony export */ });
- function _iterableToArrayLimit(arr, i) {
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
-
- if (_i == null) return;
- var _arr = [];
- var _n = true;
- var _d = false;
-
- var _s, _e;
-
- try {
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
- _arr.push(_s.value);
-
- if (i && _arr.length === i) break;
- }
- } catch (err) {
- _d = true;
- _e = err;
- } finally {
- try {
- if (!_n && _i["return"] != null) _i["return"]();
- } finally {
- if (_d) throw _e;
- }
- }
-
- return _arr;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
- /*!********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
- \********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _nonIterableRest)
- /* harmony export */ });
- function _nonIterableRest() {
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***!
- \**********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _nonIterableSpread)
- /* harmony export */ });
- function _nonIterableSpread() {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
- /*!******************************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
- \******************************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _possibleConstructorReturn)
- /* harmony export */ });
- /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
- /* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
-
-
- function _possibleConstructorReturn(self, call) {
- if (call && ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__.default)(call) === "object" || typeof call === "function")) {
- return call;
- } else if (call !== void 0) {
- throw new TypeError("Derived constructors may only return object or undefined");
- }
-
- return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__.default)(self);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _setPrototypeOf)
- /* harmony export */ });
- function _setPrototypeOf(o, p) {
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
- o.__proto__ = p;
- return o;
- };
-
- return _setPrototypeOf(o, p);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
- /*!******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***!
- \******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _slicedToArray)
- /* harmony export */ });
- /* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
- /* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js");
- /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
- /* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
-
-
-
-
- function _slicedToArray(arr, i) {
- return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr) || (0,_iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__.default)(arr, i) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__.default)(arr, i) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__.default)();
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js":
- /*!******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/superPropBase.js ***!
- \******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _superPropBase)
- /* harmony export */ });
- /* harmony import */ var _getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
-
- function _superPropBase(object, property) {
- while (!Object.prototype.hasOwnProperty.call(object, property)) {
- object = (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(object);
- if (object === null) break;
- }
-
- return object;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***!
- \**********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _toConsumableArray)
- /* harmony export */ });
- /* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js");
- /* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
- /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
- /* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js");
-
-
-
-
- function _toConsumableArray(arr) {
- return (0,_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__.default)(arr) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__.default)(arr) || (0,_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__.default)();
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
- /*!***********************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
- \***********************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _typeof)
- /* harmony export */ });
- function _typeof(obj) {
- "@babel/helpers - typeof";
-
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
- _typeof = function _typeof(obj) {
- return typeof obj;
- };
- } else {
- _typeof = function _typeof(obj) {
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
- };
- }
-
- return _typeof(obj);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
- /*!*******************************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
- \*******************************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
- /* harmony export */ });
- /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
-
- function _unsupportedIterableToArray(o, minLen) {
- if (!o) return;
- if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor) n = o.constructor.name;
- if (n === "Map" || n === "Set") return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/regenerator/index.js":
- /*!**********************************************************!*\
- !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
- \**********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/a-function.js":
- /*!******************************************************!*\
- !*** ./node_modules/core-js/internals/a-function.js ***!
- \******************************************************/
- /***/ ((module) => {
-
- module.exports = function (it) {
- if (typeof it != 'function') {
- throw TypeError(String(it) + ' is not a function');
- } return it;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/a-possible-prototype.js":
- /*!****************************************************************!*\
- !*** ./node_modules/core-js/internals/a-possible-prototype.js ***!
- \****************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
-
- module.exports = function (it) {
- if (!isObject(it) && it !== null) {
- throw TypeError("Can't set " + String(it) + ' as a prototype');
- } return it;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/add-to-unscopables.js":
- /*!**************************************************************!*\
- !*** ./node_modules/core-js/internals/add-to-unscopables.js ***!
- \**************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
- var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
-
- var UNSCOPABLES = wellKnownSymbol('unscopables');
- var ArrayPrototype = Array.prototype;
-
- // Array.prototype[@@unscopables]
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
- definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
- configurable: true,
- value: create(null)
- });
- }
-
- // add a key to Array.prototype[@@unscopables]
- module.exports = function (key) {
- ArrayPrototype[UNSCOPABLES][key] = true;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/an-instance.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/internals/an-instance.js ***!
- \*******************************************************/
- /***/ ((module) => {
-
- module.exports = function (it, Constructor, name) {
- if (!(it instanceof Constructor)) {
- throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
- } return it;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/array-fill.js":
- /*!******************************************************!*\
- !*** ./node_modules/core-js/internals/array-fill.js ***!
- \******************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
-
- // `Array.prototype.fill` method implementation
- // https://tc39.es/ecma262/#sec-array.prototype.fill
- module.exports = function fill(value /* , start = 0, end = @length */) {
- var O = toObject(this);
- var length = toLength(O.length);
- var argumentsLength = arguments.length;
- var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
- var end = argumentsLength > 2 ? arguments[2] : undefined;
- var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
- while (endPos > index) O[index++] = value;
- return O;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/array-for-each.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/internals/array-for-each.js ***!
- \**********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").forEach;
- var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
-
- var STRICT_METHOD = arrayMethodIsStrict('forEach');
-
- // `Array.prototype.forEach` method implementation
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
- module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
- return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- // eslint-disable-next-line es/no-array-prototype-foreach -- safe
- } : [].forEach;
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/array-from.js":
- /*!******************************************************!*\
- !*** ./node_modules/core-js/internals/array-from.js ***!
- \******************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js");
- var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
- var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
-
- // `Array.from` method implementation
- // https://tc39.es/ecma262/#sec-array.from
- module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
- var O = toObject(arrayLike);
- var C = typeof this == 'function' ? this : Array;
- var argumentsLength = arguments.length;
- var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
- var mapping = mapfn !== undefined;
- var iteratorMethod = getIteratorMethod(O);
- var index = 0;
- var length, result, step, iterator, next, value;
- if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
- // if the target is not iterable or it's an array with the default iterator - use a simple case
- if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
- iterator = iteratorMethod.call(O);
- next = iterator.next;
- result = new C();
- for (;!(step = next.call(iterator)).done; index++) {
- value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
- createProperty(result, index, value);
- }
- } else {
- length = toLength(O.length);
- result = new C(length);
- for (;length > index; index++) {
- value = mapping ? mapfn(O[index], index) : O[index];
- createProperty(result, index, value);
- }
- }
- result.length = index;
- return result;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/array-iteration.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/internals/array-iteration.js ***!
- \***********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
- var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
-
- var push = [].push;
-
- // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
- var createMethod = function (TYPE) {
- var IS_MAP = TYPE == 1;
- var IS_FILTER = TYPE == 2;
- var IS_SOME = TYPE == 3;
- var IS_EVERY = TYPE == 4;
- var IS_FIND_INDEX = TYPE == 6;
- var IS_FILTER_OUT = TYPE == 7;
- var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
- return function ($this, callbackfn, that, specificCreate) {
- var O = toObject($this);
- var self = IndexedObject(O);
- var boundFunction = bind(callbackfn, that, 3);
- var length = toLength(self.length);
- var index = 0;
- var create = specificCreate || arraySpeciesCreate;
- var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
- var value, result;
- for (;length > index; index++) if (NO_HOLES || index in self) {
- value = self[index];
- result = boundFunction(value, index, O);
- if (TYPE) {
- if (IS_MAP) target[index] = result; // map
- else if (result) switch (TYPE) {
- case 3: return true; // some
- case 5: return value; // find
- case 6: return index; // findIndex
- case 2: push.call(target, value); // filter
- } else switch (TYPE) {
- case 4: return false; // every
- case 7: push.call(target, value); // filterOut
- }
- }
- }
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
- };
- };
-
- module.exports = {
- // `Array.prototype.forEach` method
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
- forEach: createMethod(0),
- // `Array.prototype.map` method
- // https://tc39.es/ecma262/#sec-array.prototype.map
- map: createMethod(1),
- // `Array.prototype.filter` method
- // https://tc39.es/ecma262/#sec-array.prototype.filter
- filter: createMethod(2),
- // `Array.prototype.some` method
- // https://tc39.es/ecma262/#sec-array.prototype.some
- some: createMethod(3),
- // `Array.prototype.every` method
- // https://tc39.es/ecma262/#sec-array.prototype.every
- every: createMethod(4),
- // `Array.prototype.find` method
- // https://tc39.es/ecma262/#sec-array.prototype.find
- find: createMethod(5),
- // `Array.prototype.findIndex` method
- // https://tc39.es/ecma262/#sec-array.prototype.findIndex
- findIndex: createMethod(6),
- // `Array.prototype.filterOut` method
- // https://github.com/tc39/proposal-array-filtering
- filterOut: createMethod(7)
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/array-reduce.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/internals/array-reduce.js ***!
- \********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
-
- // `Array.prototype.{ reduce, reduceRight }` methods implementation
- var createMethod = function (IS_RIGHT) {
- return function (that, callbackfn, argumentsLength, memo) {
- aFunction(callbackfn);
- var O = toObject(that);
- var self = IndexedObject(O);
- var length = toLength(O.length);
- var index = IS_RIGHT ? length - 1 : 0;
- var i = IS_RIGHT ? -1 : 1;
- if (argumentsLength < 2) while (true) {
- if (index in self) {
- memo = self[index];
- index += i;
- break;
- }
- index += i;
- if (IS_RIGHT ? index < 0 : length <= index) {
- throw TypeError('Reduce of empty array with no initial value');
- }
- }
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
- memo = callbackfn(memo, self[index], index, O);
- }
- return memo;
- };
- };
-
- module.exports = {
- // `Array.prototype.reduce` method
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
- left: createMethod(false),
- // `Array.prototype.reduceRight` method
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
- right: createMethod(true)
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/array-species-create.js":
- /*!****************************************************************!*\
- !*** ./node_modules/core-js/internals/array-species-create.js ***!
- \****************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- var SPECIES = wellKnownSymbol('species');
-
- // `ArraySpeciesCreate` abstract operation
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
- module.exports = function (originalArray, length) {
- var C;
- if (isArray(originalArray)) {
- C = originalArray.constructor;
- // cross-realm fallback
- if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
- else if (isObject(C)) {
- C = C[SPECIES];
- if (C === null) C = undefined;
- }
- } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js":
- /*!****************************************************************************!*\
- !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
- \****************************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
-
- // call something on iterator step with safe closing on error
- module.exports = function (iterator, fn, value, ENTRIES) {
- try {
- return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
- } catch (error) {
- iteratorClose(iterator);
- throw error;
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/check-correctness-of-iteration.js":
- /*!**************************************************************************!*\
- !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***!
- \**************************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- var ITERATOR = wellKnownSymbol('iterator');
- var SAFE_CLOSING = false;
-
- try {
- var called = 0;
- var iteratorWithReturn = {
- next: function () {
- return { done: !!called++ };
- },
- 'return': function () {
- SAFE_CLOSING = true;
- }
- };
- iteratorWithReturn[ITERATOR] = function () {
- return this;
- };
- // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
- Array.from(iteratorWithReturn, function () { throw 2; });
- } catch (error) { /* empty */ }
-
- module.exports = function (exec, SKIP_CLOSING) {
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
- var ITERATION_SUPPORT = false;
- try {
- var object = {};
- object[ITERATOR] = function () {
- return {
- next: function () {
- return { done: ITERATION_SUPPORT = true };
- }
- };
- };
- exec(object);
- } catch (error) { /* empty */ }
- return ITERATION_SUPPORT;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/collection-strong.js":
- /*!*************************************************************!*\
- !*** ./node_modules/core-js/internals/collection-strong.js ***!
- \*************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
- var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
- var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
- var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
- var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
- var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
- var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
- var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
- var fastKey = __webpack_require__(/*! ../internals/internal-metadata */ "./node_modules/core-js/internals/internal-metadata.js").fastKey;
- var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
-
- var setInternalState = InternalStateModule.set;
- var internalStateGetterFor = InternalStateModule.getterFor;
-
- module.exports = {
- getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
- var C = wrapper(function (that, iterable) {
- anInstance(that, C, CONSTRUCTOR_NAME);
- setInternalState(that, {
- type: CONSTRUCTOR_NAME,
- index: create(null),
- first: undefined,
- last: undefined,
- size: 0
- });
- if (!DESCRIPTORS) that.size = 0;
- if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
- });
-
- var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
-
- var define = function (that, key, value) {
- var state = getInternalState(that);
- var entry = getEntry(that, key);
- var previous, index;
- // change existing entry
- if (entry) {
- entry.value = value;
- // create new entry
- } else {
- state.last = entry = {
- index: index = fastKey(key, true),
- key: key,
- value: value,
- previous: previous = state.last,
- next: undefined,
- removed: false
- };
- if (!state.first) state.first = entry;
- if (previous) previous.next = entry;
- if (DESCRIPTORS) state.size++;
- else that.size++;
- // add to index
- if (index !== 'F') state.index[index] = entry;
- } return that;
- };
-
- var getEntry = function (that, key) {
- var state = getInternalState(that);
- // fast case
- var index = fastKey(key);
- var entry;
- if (index !== 'F') return state.index[index];
- // frozen object case
- for (entry = state.first; entry; entry = entry.next) {
- if (entry.key == key) return entry;
- }
- };
-
- redefineAll(C.prototype, {
- // `{ Map, Set }.prototype.clear()` methods
- // https://tc39.es/ecma262/#sec-map.prototype.clear
- // https://tc39.es/ecma262/#sec-set.prototype.clear
- clear: function clear() {
- var that = this;
- var state = getInternalState(that);
- var data = state.index;
- var entry = state.first;
- while (entry) {
- entry.removed = true;
- if (entry.previous) entry.previous = entry.previous.next = undefined;
- delete data[entry.index];
- entry = entry.next;
- }
- state.first = state.last = undefined;
- if (DESCRIPTORS) state.size = 0;
- else that.size = 0;
- },
- // `{ Map, Set }.prototype.delete(key)` methods
- // https://tc39.es/ecma262/#sec-map.prototype.delete
- // https://tc39.es/ecma262/#sec-set.prototype.delete
- 'delete': function (key) {
- var that = this;
- var state = getInternalState(that);
- var entry = getEntry(that, key);
- if (entry) {
- var next = entry.next;
- var prev = entry.previous;
- delete state.index[entry.index];
- entry.removed = true;
- if (prev) prev.next = next;
- if (next) next.previous = prev;
- if (state.first == entry) state.first = next;
- if (state.last == entry) state.last = prev;
- if (DESCRIPTORS) state.size--;
- else that.size--;
- } return !!entry;
- },
- // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
- // https://tc39.es/ecma262/#sec-map.prototype.foreach
- // https://tc39.es/ecma262/#sec-set.prototype.foreach
- forEach: function forEach(callbackfn /* , that = undefined */) {
- var state = getInternalState(this);
- var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
- var entry;
- while (entry = entry ? entry.next : state.first) {
- boundFunction(entry.value, entry.key, this);
- // revert to the last existing entry
- while (entry && entry.removed) entry = entry.previous;
- }
- },
- // `{ Map, Set}.prototype.has(key)` methods
- // https://tc39.es/ecma262/#sec-map.prototype.has
- // https://tc39.es/ecma262/#sec-set.prototype.has
- has: function has(key) {
- return !!getEntry(this, key);
- }
- });
-
- redefineAll(C.prototype, IS_MAP ? {
- // `Map.prototype.get(key)` method
- // https://tc39.es/ecma262/#sec-map.prototype.get
- get: function get(key) {
- var entry = getEntry(this, key);
- return entry && entry.value;
- },
- // `Map.prototype.set(key, value)` method
- // https://tc39.es/ecma262/#sec-map.prototype.set
- set: function set(key, value) {
- return define(this, key === 0 ? 0 : key, value);
- }
- } : {
- // `Set.prototype.add(value)` method
- // https://tc39.es/ecma262/#sec-set.prototype.add
- add: function add(value) {
- return define(this, value = value === 0 ? 0 : value, value);
- }
- });
- if (DESCRIPTORS) defineProperty(C.prototype, 'size', {
- get: function () {
- return getInternalState(this).size;
- }
- });
- return C;
- },
- setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
- var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
- var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
- var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
- // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
- // https://tc39.es/ecma262/#sec-map.prototype.entries
- // https://tc39.es/ecma262/#sec-map.prototype.keys
- // https://tc39.es/ecma262/#sec-map.prototype.values
- // https://tc39.es/ecma262/#sec-map.prototype-@@iterator
- // https://tc39.es/ecma262/#sec-set.prototype.entries
- // https://tc39.es/ecma262/#sec-set.prototype.keys
- // https://tc39.es/ecma262/#sec-set.prototype.values
- // https://tc39.es/ecma262/#sec-set.prototype-@@iterator
- defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
- setInternalState(this, {
- type: ITERATOR_NAME,
- target: iterated,
- state: getInternalCollectionState(iterated),
- kind: kind,
- last: undefined
- });
- }, function () {
- var state = getInternalIteratorState(this);
- var kind = state.kind;
- var entry = state.last;
- // revert to the last existing entry
- while (entry && entry.removed) entry = entry.previous;
- // get next entry
- if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
- // or finish the iteration
- state.target = undefined;
- return { value: undefined, done: true };
- }
- // return step by kind
- if (kind == 'keys') return { value: entry.key, done: false };
- if (kind == 'values') return { value: entry.value, done: false };
- return { value: [entry.key, entry.value], done: false };
- }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
-
- // `{ Map, Set }.prototype[@@species]` accessors
- // https://tc39.es/ecma262/#sec-get-map-@@species
- // https://tc39.es/ecma262/#sec-get-set-@@species
- setSpecies(CONSTRUCTOR_NAME);
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/collection.js":
- /*!******************************************************!*\
- !*** ./node_modules/core-js/internals/collection.js ***!
- \******************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "./node_modules/core-js/internals/internal-metadata.js");
- var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
- var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
- var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
- var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js");
-
- module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
- var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
- var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
- var ADDER = IS_MAP ? 'set' : 'add';
- var NativeConstructor = global[CONSTRUCTOR_NAME];
- var NativePrototype = NativeConstructor && NativeConstructor.prototype;
- var Constructor = NativeConstructor;
- var exported = {};
-
- var fixMethod = function (KEY) {
- var nativeMethod = NativePrototype[KEY];
- redefine(NativePrototype, KEY,
- KEY == 'add' ? function add(value) {
- nativeMethod.call(this, value === 0 ? 0 : value);
- return this;
- } : KEY == 'delete' ? function (key) {
- return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
- } : KEY == 'get' ? function get(key) {
- return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
- } : KEY == 'has' ? function has(key) {
- return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
- } : function set(key, value) {
- nativeMethod.call(this, key === 0 ? 0 : key, value);
- return this;
- }
- );
- };
-
- var REPLACE = isForced(
- CONSTRUCTOR_NAME,
- typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
- new NativeConstructor().entries().next();
- }))
- );
-
- if (REPLACE) {
- // create collection constructor
- Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
- InternalMetadataModule.REQUIRED = true;
- } else if (isForced(CONSTRUCTOR_NAME, true)) {
- var instance = new Constructor();
- // early implementations not supports chaining
- var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
- // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
- var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
- // most early implementations doesn't supports iterables, most modern - not close it correctly
- // eslint-disable-next-line no-new -- required for testing
- var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
- // for early implementations -0 and +0 not the same
- var BUGGY_ZERO = !IS_WEAK && fails(function () {
- // V8 ~ Chromium 42- fails only with 5+ elements
- var $instance = new NativeConstructor();
- var index = 5;
- while (index--) $instance[ADDER](index, index);
- return !$instance.has(-0);
- });
-
- if (!ACCEPT_ITERABLES) {
- Constructor = wrapper(function (dummy, iterable) {
- anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
- var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
- if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
- return that;
- });
- Constructor.prototype = NativePrototype;
- NativePrototype.constructor = Constructor;
- }
-
- if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
- fixMethod('delete');
- fixMethod('has');
- IS_MAP && fixMethod('get');
- }
-
- if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
-
- // weak collections should not contains .clear method
- if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
- }
-
- exported[CONSTRUCTOR_NAME] = Constructor;
- $({ global: true, forced: Constructor != NativeConstructor }, exported);
-
- setToStringTag(Constructor, CONSTRUCTOR_NAME);
-
- if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
-
- return Constructor;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/correct-is-regexp-logic.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/core-js/internals/correct-is-regexp-logic.js ***!
- \*******************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- var MATCH = wellKnownSymbol('match');
-
- module.exports = function (METHOD_NAME) {
- var regexp = /./;
- try {
- '/./'[METHOD_NAME](regexp);
- } catch (error1) {
- try {
- regexp[MATCH] = false;
- return '/./'[METHOD_NAME](regexp);
- } catch (error2) { /* empty */ }
- } return false;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/correct-prototype-getter.js":
- /*!********************************************************************!*\
- !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
- \********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
-
- module.exports = !fails(function () {
- function F() { /* empty */ }
- F.prototype.constructor = null;
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
- return Object.getPrototypeOf(new F()) !== F.prototype;
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/create-iterator-constructor.js":
- /*!***********************************************************************!*\
- !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***!
- \***********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js").IteratorPrototype;
- var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
- var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
- var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
- var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
-
- var returnThis = function () { return this; };
-
- module.exports = function (IteratorConstructor, NAME, next) {
- var TO_STRING_TAG = NAME + ' Iterator';
- IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
- setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
- Iterators[TO_STRING_TAG] = returnThis;
- return IteratorConstructor;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/create-property.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/internals/create-property.js ***!
- \***********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
- var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
- var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
-
- module.exports = function (object, key, value) {
- var propertyKey = toPrimitive(key);
- if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
- else object[propertyKey] = value;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/define-iterator.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/internals/define-iterator.js ***!
- \***********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "./node_modules/core-js/internals/create-iterator-constructor.js");
- var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
- var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
- var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
- var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
- var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
- var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js");
-
- var IteratorPrototype = IteratorsCore.IteratorPrototype;
- var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
- var ITERATOR = wellKnownSymbol('iterator');
- var KEYS = 'keys';
- var VALUES = 'values';
- var ENTRIES = 'entries';
-
- var returnThis = function () { return this; };
-
- module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
- createIteratorConstructor(IteratorConstructor, NAME, next);
-
- var getIterationMethod = function (KIND) {
- if (KIND === DEFAULT && defaultIterator) return defaultIterator;
- if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
- switch (KIND) {
- case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
- case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
- case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
- } return function () { return new IteratorConstructor(this); };
- };
-
- var TO_STRING_TAG = NAME + ' Iterator';
- var INCORRECT_VALUES_NAME = false;
- var IterablePrototype = Iterable.prototype;
- var nativeIterator = IterablePrototype[ITERATOR]
- || IterablePrototype['@@iterator']
- || DEFAULT && IterablePrototype[DEFAULT];
- var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
- var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
- var CurrentIteratorPrototype, methods, KEY;
-
- // fix native
- if (anyNativeIterator) {
- CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
- if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
- if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
- if (setPrototypeOf) {
- setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
- } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
- createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
- }
- }
- // Set @@toStringTag to native iterators
- setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
- if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
- }
- }
-
- // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
- if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
- INCORRECT_VALUES_NAME = true;
- defaultIterator = function values() { return nativeIterator.call(this); };
- }
-
- // define iterator
- if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
- createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
- }
- Iterators[NAME] = defaultIterator;
-
- // export additional methods
- if (DEFAULT) {
- methods = {
- values: getIterationMethod(VALUES),
- keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
- entries: getIterationMethod(ENTRIES)
- };
- if (FORCED) for (KEY in methods) {
- if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
- redefine(IterablePrototype, KEY, methods[KEY]);
- }
- } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
- }
-
- return methods;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/define-well-known-symbol.js":
- /*!********************************************************************!*\
- !*** ./node_modules/core-js/internals/define-well-known-symbol.js ***!
- \********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var path = __webpack_require__(/*! ../internals/path */ "./node_modules/core-js/internals/path.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
-
- module.exports = function (NAME) {
- var Symbol = path.Symbol || (path.Symbol = {});
- if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
- value: wrappedWellKnownSymbolModule.f(NAME)
- });
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/dom-iterables.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/internals/dom-iterables.js ***!
- \*********************************************************/
- /***/ ((module) => {
-
- // iterable DOM collections
- // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
- module.exports = {
- CSSRuleList: 0,
- CSSStyleDeclaration: 0,
- CSSValueList: 0,
- ClientRectList: 0,
- DOMRectList: 0,
- DOMStringList: 0,
- DOMTokenList: 1,
- DataTransferItemList: 0,
- FileList: 0,
- HTMLAllCollection: 0,
- HTMLCollection: 0,
- HTMLFormElement: 0,
- HTMLSelectElement: 0,
- MediaList: 0,
- MimeTypeArray: 0,
- NamedNodeMap: 0,
- NodeList: 1,
- PaintRequestList: 0,
- Plugin: 0,
- PluginArray: 0,
- SVGLengthList: 0,
- SVGNumberList: 0,
- SVGPathSegList: 0,
- SVGPointList: 0,
- SVGStringList: 0,
- SVGTransformList: 0,
- SourceBufferList: 0,
- StyleSheetList: 0,
- TextTrackCueList: 0,
- TextTrackList: 0,
- TouchList: 0
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/engine-is-browser.js":
- /*!*************************************************************!*\
- !*** ./node_modules/core-js/internals/engine-is-browser.js ***!
- \*************************************************************/
- /***/ ((module) => {
-
- module.exports = typeof window == 'object';
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/engine-is-ios.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/internals/engine-is-ios.js ***!
- \*********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
-
- module.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/engine-is-node.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/internals/engine-is-node.js ***!
- \**********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
-
- module.exports = classof(global.process) == 'process';
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/engine-is-webos-webkit.js":
- /*!******************************************************************!*\
- !*** ./node_modules/core-js/internals/engine-is-webos-webkit.js ***!
- \******************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
-
- module.exports = /web0s(?!.*chrome)/i.test(userAgent);
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/freezing.js":
- /*!****************************************************!*\
- !*** ./node_modules/core-js/internals/freezing.js ***!
- \****************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
-
- module.exports = !fails(function () {
- // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
- return Object.isExtensible(Object.preventExtensions({}));
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/function-bind-context.js":
- /*!*****************************************************************!*\
- !*** ./node_modules/core-js/internals/function-bind-context.js ***!
- \*****************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
-
- // optional / simple context binding
- module.exports = function (fn, that, length) {
- aFunction(fn);
- if (that === undefined) return fn;
- switch (length) {
- case 0: return function () {
- return fn.call(that);
- };
- case 1: return function (a) {
- return fn.call(that, a);
- };
- case 2: return function (a, b) {
- return fn.call(that, a, b);
- };
- case 3: return function (a, b, c) {
- return fn.call(that, a, b, c);
- };
- }
- return function (/* ...args */) {
- return fn.apply(that, arguments);
- };
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/function-bind.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/internals/function-bind.js ***!
- \*********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
-
- var slice = [].slice;
- var factories = {};
-
- var construct = function (C, argsLength, args) {
- if (!(argsLength in factories)) {
- for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
- // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
- factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
- } return factories[argsLength](C, args);
- };
-
- // `Function.prototype.bind` method implementation
- // https://tc39.es/ecma262/#sec-function.prototype.bind
- module.exports = Function.bind || function bind(that /* , ...args */) {
- var fn = aFunction(this);
- var partArgs = slice.call(arguments, 1);
- var boundFunction = function bound(/* args... */) {
- var args = partArgs.concat(slice.call(arguments));
- return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
- };
- if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
- return boundFunction;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/get-iterator-method.js":
- /*!***************************************************************!*\
- !*** ./node_modules/core-js/internals/get-iterator-method.js ***!
- \***************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js");
- var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- var ITERATOR = wellKnownSymbol('iterator');
-
- module.exports = function (it) {
- if (it != undefined) return it[ITERATOR]
- || it['@@iterator']
- || Iterators[classof(it)];
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/host-report-errors.js":
- /*!**************************************************************!*\
- !*** ./node_modules/core-js/internals/host-report-errors.js ***!
- \**************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
-
- module.exports = function (a, b) {
- var console = global.console;
- if (console && console.error) {
- arguments.length === 1 ? console.error(a) : console.error(a, b);
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/html.js":
- /*!************************************************!*\
- !*** ./node_modules/core-js/internals/html.js ***!
- \************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
-
- module.exports = getBuiltIn('document', 'documentElement');
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/inherit-if-required.js":
- /*!***************************************************************!*\
- !*** ./node_modules/core-js/internals/inherit-if-required.js ***!
- \***************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
-
- // makes subclassing work correct for wrapped built-ins
- module.exports = function ($this, dummy, Wrapper) {
- var NewTarget, NewTargetPrototype;
- if (
- // it can work only with native `setPrototypeOf`
- setPrototypeOf &&
- // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
- typeof (NewTarget = dummy.constructor) == 'function' &&
- NewTarget !== Wrapper &&
- isObject(NewTargetPrototype = NewTarget.prototype) &&
- NewTargetPrototype !== Wrapper.prototype
- ) setPrototypeOf($this, NewTargetPrototype);
- return $this;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/internal-metadata.js":
- /*!*************************************************************!*\
- !*** ./node_modules/core-js/internals/internal-metadata.js ***!
- \*************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
- var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
- var FREEZING = __webpack_require__(/*! ../internals/freezing */ "./node_modules/core-js/internals/freezing.js");
-
- var METADATA = uid('meta');
- var id = 0;
-
- // eslint-disable-next-line es/no-object-isextensible -- safe
- var isExtensible = Object.isExtensible || function () {
- return true;
- };
-
- var setMetadata = function (it) {
- defineProperty(it, METADATA, { value: {
- objectID: 'O' + ++id, // object ID
- weakData: {} // weak collections IDs
- } });
- };
-
- var fastKey = function (it, create) {
- // return a primitive with prefix
- if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if (!has(it, METADATA)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return 'F';
- // not necessary to add metadata
- if (!create) return 'E';
- // add missing metadata
- setMetadata(it);
- // return object ID
- } return it[METADATA].objectID;
- };
-
- var getWeakData = function (it, create) {
- if (!has(it, METADATA)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return true;
- // not necessary to add metadata
- if (!create) return false;
- // add missing metadata
- setMetadata(it);
- // return the store of weak collections IDs
- } return it[METADATA].weakData;
- };
-
- // add metadata on freeze-family methods calling
- var onFreeze = function (it) {
- if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
- return it;
- };
-
- var meta = module.exports = {
- REQUIRED: false,
- fastKey: fastKey,
- getWeakData: getWeakData,
- onFreeze: onFreeze
- };
-
- hiddenKeys[METADATA] = true;
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/is-array-iterator-method.js":
- /*!********************************************************************!*\
- !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***!
- \********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
-
- var ITERATOR = wellKnownSymbol('iterator');
- var ArrayPrototype = Array.prototype;
-
- // check on default Array iterator
- module.exports = function (it) {
- return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/is-array.js":
- /*!****************************************************!*\
- !*** ./node_modules/core-js/internals/is-array.js ***!
- \****************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
-
- // `IsArray` abstract operation
- // https://tc39.es/ecma262/#sec-isarray
- // eslint-disable-next-line es/no-array-isarray -- safe
- module.exports = Array.isArray || function isArray(arg) {
- return classof(arg) == 'Array';
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/iterate.js":
- /*!***************************************************!*\
- !*** ./node_modules/core-js/internals/iterate.js ***!
- \***************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
- var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
- var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
-
- var Result = function (stopped, result) {
- this.stopped = stopped;
- this.result = result;
- };
-
- module.exports = function (iterable, unboundFunction, options) {
- var that = options && options.that;
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
- var INTERRUPTED = !!(options && options.INTERRUPTED);
- var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
- var iterator, iterFn, index, length, result, next, step;
-
- var stop = function (condition) {
- if (iterator) iteratorClose(iterator);
- return new Result(true, condition);
- };
-
- var callFn = function (value) {
- if (AS_ENTRIES) {
- anObject(value);
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
- } return INTERRUPTED ? fn(value, stop) : fn(value);
- };
-
- if (IS_ITERATOR) {
- iterator = iterable;
- } else {
- iterFn = getIteratorMethod(iterable);
- if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
- // optimisation for array iterators
- if (isArrayIteratorMethod(iterFn)) {
- for (index = 0, length = toLength(iterable.length); length > index; index++) {
- result = callFn(iterable[index]);
- if (result && result instanceof Result) return result;
- } return new Result(false);
- }
- iterator = iterFn.call(iterable);
- }
-
- next = iterator.next;
- while (!(step = next.call(iterator)).done) {
- try {
- result = callFn(step.value);
- } catch (error) {
- iteratorClose(iterator);
- throw error;
- }
- if (typeof result == 'object' && result && result instanceof Result) return result;
- } return new Result(false);
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/iterator-close.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/internals/iterator-close.js ***!
- \**********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
-
- module.exports = function (iterator) {
- var returnMethod = iterator['return'];
- if (returnMethod !== undefined) {
- return anObject(returnMethod.call(iterator)).value;
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/iterators-core.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/internals/iterators-core.js ***!
- \**********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
- var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
-
- var ITERATOR = wellKnownSymbol('iterator');
- var BUGGY_SAFARI_ITERATORS = false;
-
- var returnThis = function () { return this; };
-
- // `%IteratorPrototype%` object
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
- var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
-
- /* eslint-disable es/no-array-prototype-keys -- safe */
- if ([].keys) {
- arrayIterator = [].keys();
- // Safari 8 has buggy iterators w/o `next`
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
- else {
- PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
- }
- }
-
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
- var test = {};
- // FF44- legacy iterators case
- return IteratorPrototype[ITERATOR].call(test) !== test;
- });
-
- if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
-
- // `%IteratorPrototype%[@@iterator]()` method
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
- if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
- createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
- }
-
- module.exports = {
- IteratorPrototype: IteratorPrototype,
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/iterators.js":
- /*!*****************************************************!*\
- !*** ./node_modules/core-js/internals/iterators.js ***!
- \*****************************************************/
- /***/ ((module) => {
-
- module.exports = {};
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/microtask.js":
- /*!*****************************************************!*\
- !*** ./node_modules/core-js/internals/microtask.js ***!
- \*****************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
- var macrotask = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
- var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
- var IS_WEBOS_WEBKIT = __webpack_require__(/*! ../internals/engine-is-webos-webkit */ "./node_modules/core-js/internals/engine-is-webos-webkit.js");
- var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
-
- var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
- var document = global.document;
- var process = global.process;
- var Promise = global.Promise;
- // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
- var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
-
- var flush, head, last, notify, toggle, node, promise, then;
-
- // modern engines have queueMicrotask method
- if (!queueMicrotask) {
- flush = function () {
- var parent, fn;
- if (IS_NODE && (parent = process.domain)) parent.exit();
- while (head) {
- fn = head.fn;
- head = head.next;
- try {
- fn();
- } catch (error) {
- if (head) notify();
- else last = undefined;
- throw error;
- }
- } last = undefined;
- if (parent) parent.enter();
- };
-
- // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
- // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
- if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
- toggle = true;
- node = document.createTextNode('');
- new MutationObserver(flush).observe(node, { characterData: true });
- notify = function () {
- node.data = toggle = !toggle;
- };
- // environments with maybe non-completely correct, but existent Promise
- } else if (Promise && Promise.resolve) {
- // Promise.resolve without an argument throws an error in LG WebOS 2
- promise = Promise.resolve(undefined);
- // workaround of WebKit ~ iOS Safari 10.1 bug
- promise.constructor = Promise;
- then = promise.then;
- notify = function () {
- then.call(promise, flush);
- };
- // Node.js without promises
- } else if (IS_NODE) {
- notify = function () {
- process.nextTick(flush);
- };
- // for other environments - macrotask based on:
- // - setImmediate
- // - MessageChannel
- // - window.postMessag
- // - onreadystatechange
- // - setTimeout
- } else {
- notify = function () {
- // strange IE + webpack dev server bug - use .call(global)
- macrotask.call(global, flush);
- };
- }
- }
-
- module.exports = queueMicrotask || function (fn) {
- var task = { fn: fn, next: undefined };
- if (last) last.next = task;
- if (!head) {
- head = task;
- notify();
- } last = task;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/native-promise-constructor.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/core-js/internals/native-promise-constructor.js ***!
- \**********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
-
- module.exports = global.Promise;
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/new-promise-capability.js":
- /*!******************************************************************!*\
- !*** ./node_modules/core-js/internals/new-promise-capability.js ***!
- \******************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
-
- var PromiseCapability = function (C) {
- var resolve, reject;
- this.promise = new C(function ($$resolve, $$reject) {
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
- resolve = $$resolve;
- reject = $$reject;
- });
- this.resolve = aFunction(resolve);
- this.reject = aFunction(reject);
- };
-
- // `NewPromiseCapability` abstract operation
- // https://tc39.es/ecma262/#sec-newpromisecapability
- module.exports.f = function (C) {
- return new PromiseCapability(C);
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/not-a-regexp.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/internals/not-a-regexp.js ***!
- \********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "./node_modules/core-js/internals/is-regexp.js");
-
- module.exports = function (it) {
- if (isRegExp(it)) {
- throw TypeError("The method doesn't accept regular expressions");
- } return it;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/object-create.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/internals/object-create.js ***!
- \*********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "./node_modules/core-js/internals/object-define-properties.js");
- var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
- var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
- var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
- var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
- var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
-
- var GT = '>';
- var LT = '<';
- var PROTOTYPE = 'prototype';
- var SCRIPT = 'script';
- var IE_PROTO = sharedKey('IE_PROTO');
-
- var EmptyConstructor = function () { /* empty */ };
-
- var scriptTag = function (content) {
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
- };
-
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
- var NullProtoObjectViaActiveX = function (activeXDocument) {
- activeXDocument.write(scriptTag(''));
- activeXDocument.close();
- var temp = activeXDocument.parentWindow.Object;
- activeXDocument = null; // avoid memory leak
- return temp;
- };
-
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
- var NullProtoObjectViaIFrame = function () {
- // Thrash, waste and sodomy: IE GC bug
- var iframe = documentCreateElement('iframe');
- var JS = 'java' + SCRIPT + ':';
- var iframeDocument;
- iframe.style.display = 'none';
- html.appendChild(iframe);
- // https://github.com/zloirock/core-js/issues/475
- iframe.src = String(JS);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(scriptTag('document.F=Object'));
- iframeDocument.close();
- return iframeDocument.F;
- };
-
- // Check for document.domain and active x support
- // No need to use active x approach when document.domain is not set
- // see https://github.com/es-shims/es5-shim/issues/150
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
- // avoid IE GC bug
- var activeXDocument;
- var NullProtoObject = function () {
- try {
- /* global ActiveXObject -- old IE */
- activeXDocument = document.domain && new ActiveXObject('htmlfile');
- } catch (error) { /* ignore */ }
- NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
- var length = enumBugKeys.length;
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
- return NullProtoObject();
- };
-
- hiddenKeys[IE_PROTO] = true;
-
- // `Object.create` method
- // https://tc39.es/ecma262/#sec-object.create
- module.exports = Object.create || function create(O, Properties) {
- var result;
- if (O !== null) {
- EmptyConstructor[PROTOTYPE] = anObject(O);
- result = new EmptyConstructor();
- EmptyConstructor[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = NullProtoObject();
- return Properties === undefined ? result : defineProperties(result, Properties);
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/object-define-properties.js":
- /*!********************************************************************!*\
- !*** ./node_modules/core-js/internals/object-define-properties.js ***!
- \********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
- var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
-
- // `Object.defineProperties` method
- // https://tc39.es/ecma262/#sec-object.defineproperties
- // eslint-disable-next-line es/no-object-defineproperties -- safe
- module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
- anObject(O);
- var keys = objectKeys(Properties);
- var length = keys.length;
- var index = 0;
- var key;
- while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
- return O;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/object-get-own-property-names-external.js":
- /*!**********************************************************************************!*\
- !*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***!
- \**********************************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- /* eslint-disable es/no-object-getownpropertynames -- safe */
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var $getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;
-
- var toString = {}.toString;
-
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
-
- var getWindowNames = function (it) {
- try {
- return $getOwnPropertyNames(it);
- } catch (error) {
- return windowNames.slice();
- }
- };
-
- // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
- module.exports.f = function getOwnPropertyNames(it) {
- return windowNames && toString.call(it) == '[object Window]'
- ? getWindowNames(it)
- : $getOwnPropertyNames(toIndexedObject(it));
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/object-get-prototype-of.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
- \*******************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
- var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");
-
- var IE_PROTO = sharedKey('IE_PROTO');
- var ObjectPrototype = Object.prototype;
-
- // `Object.getPrototypeOf` method
- // https://tc39.es/ecma262/#sec-object.getprototypeof
- // eslint-disable-next-line es/no-object-getprototypeof -- safe
- module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
- O = toObject(O);
- if (has(O, IE_PROTO)) return O[IE_PROTO];
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectPrototype : null;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/object-keys.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/internals/object-keys.js ***!
- \*******************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js");
- var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
-
- // `Object.keys` method
- // https://tc39.es/ecma262/#sec-object.keys
- // eslint-disable-next-line es/no-object-keys -- safe
- module.exports = Object.keys || function keys(O) {
- return internalObjectKeys(O, enumBugKeys);
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/object-set-prototype-of.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***!
- \*******************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- /* eslint-disable no-proto -- safe */
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "./node_modules/core-js/internals/a-possible-prototype.js");
-
- // `Object.setPrototypeOf` method
- // https://tc39.es/ecma262/#sec-object.setprototypeof
- // Works with __proto__ only. Old v8 can't work with null proto objects.
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
- module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
- var CORRECT_SETTER = false;
- var test = {};
- var setter;
- try {
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
- setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
- setter.call(test, []);
- CORRECT_SETTER = test instanceof Array;
- } catch (error) { /* empty */ }
- return function setPrototypeOf(O, proto) {
- anObject(O);
- aPossiblePrototype(proto);
- if (CORRECT_SETTER) setter.call(O, proto);
- else O.__proto__ = proto;
- return O;
- };
- }() : undefined);
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/perform.js":
- /*!***************************************************!*\
- !*** ./node_modules/core-js/internals/perform.js ***!
- \***************************************************/
- /***/ ((module) => {
-
- module.exports = function (exec) {
- try {
- return { error: false, value: exec() };
- } catch (error) {
- return { error: true, value: error };
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/promise-resolve.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/internals/promise-resolve.js ***!
- \***********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
-
- module.exports = function (C, x) {
- anObject(C);
- if (isObject(x) && x.constructor === C) return x;
- var promiseCapability = newPromiseCapability.f(C);
- var resolve = promiseCapability.resolve;
- resolve(x);
- return promiseCapability.promise;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/redefine-all.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/internals/redefine-all.js ***!
- \********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
-
- module.exports = function (target, src, options) {
- for (var key in src) redefine(target, key, src[key], options);
- return target;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/set-species.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/internals/set-species.js ***!
- \*******************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
- var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
-
- var SPECIES = wellKnownSymbol('species');
-
- module.exports = function (CONSTRUCTOR_NAME) {
- var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
- var defineProperty = definePropertyModule.f;
-
- if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
- defineProperty(Constructor, SPECIES, {
- configurable: true,
- get: function () { return this; }
- });
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/set-to-string-tag.js":
- /*!*************************************************************!*\
- !*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
- \*************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
-
- module.exports = function (it, TAG, STATIC) {
- if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
- defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/string-trim-forced.js":
- /*!**************************************************************!*\
- !*** ./node_modules/core-js/internals/string-trim-forced.js ***!
- \**************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");
-
- var non = '\u200B\u0085\u180E';
-
- // check that a method works with the correct list
- // of whitespaces and has a correct name
- module.exports = function (METHOD_NAME) {
- return fails(function () {
- return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
- });
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/string-trim.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/internals/string-trim.js ***!
- \*******************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
- var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");
-
- var whitespace = '[' + whitespaces + ']';
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
- var rtrim = RegExp(whitespace + whitespace + '*$');
-
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
- var createMethod = function (TYPE) {
- return function ($this) {
- var string = String(requireObjectCoercible($this));
- if (TYPE & 1) string = string.replace(ltrim, '');
- if (TYPE & 2) string = string.replace(rtrim, '');
- return string;
- };
- };
-
- module.exports = {
- // `String.prototype.{ trimLeft, trimStart }` methods
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
- start: createMethod(1),
- // `String.prototype.{ trimRight, trimEnd }` methods
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
- end: createMethod(2),
- // `String.prototype.trim` method
- // https://tc39.es/ecma262/#sec-string.prototype.trim
- trim: createMethod(3)
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/task.js":
- /*!************************************************!*\
- !*** ./node_modules/core-js/internals/task.js ***!
- \************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
- var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
- var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
- var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
- var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
-
- var location = global.location;
- var set = global.setImmediate;
- var clear = global.clearImmediate;
- var process = global.process;
- var MessageChannel = global.MessageChannel;
- var Dispatch = global.Dispatch;
- var counter = 0;
- var queue = {};
- var ONREADYSTATECHANGE = 'onreadystatechange';
- var defer, channel, port;
-
- var run = function (id) {
- // eslint-disable-next-line no-prototype-builtins -- safe
- if (queue.hasOwnProperty(id)) {
- var fn = queue[id];
- delete queue[id];
- fn();
- }
- };
-
- var runner = function (id) {
- return function () {
- run(id);
- };
- };
-
- var listener = function (event) {
- run(event.data);
- };
-
- var post = function (id) {
- // old engines have not location.origin
- global.postMessage(id + '', location.protocol + '//' + location.host);
- };
-
- // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
- if (!set || !clear) {
- set = function setImmediate(fn) {
- var args = [];
- var i = 1;
- while (arguments.length > i) args.push(arguments[i++]);
- queue[++counter] = function () {
- // eslint-disable-next-line no-new-func -- spec requirement
- (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
- };
- defer(counter);
- return counter;
- };
- clear = function clearImmediate(id) {
- delete queue[id];
- };
- // Node.js 0.8-
- if (IS_NODE) {
- defer = function (id) {
- process.nextTick(runner(id));
- };
- // Sphere (JS game engine) Dispatch API
- } else if (Dispatch && Dispatch.now) {
- defer = function (id) {
- Dispatch.now(runner(id));
- };
- // Browsers with MessageChannel, includes WebWorkers
- // except iOS - https://github.com/zloirock/core-js/issues/624
- } else if (MessageChannel && !IS_IOS) {
- channel = new MessageChannel();
- port = channel.port2;
- channel.port1.onmessage = listener;
- defer = bind(port.postMessage, port, 1);
- // Browsers with postMessage, skip WebWorkers
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
- } else if (
- global.addEventListener &&
- typeof postMessage == 'function' &&
- !global.importScripts &&
- location && location.protocol !== 'file:' &&
- !fails(post)
- ) {
- defer = post;
- global.addEventListener('message', listener, false);
- // IE8-
- } else if (ONREADYSTATECHANGE in createElement('script')) {
- defer = function (id) {
- html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
- html.removeChild(this);
- run(id);
- };
- };
- // Rest old browsers
- } else {
- defer = function (id) {
- setTimeout(runner(id), 0);
- };
- }
- }
-
- module.exports = {
- set: set,
- clear: clear
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/well-known-symbol-wrapped.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***!
- \*********************************************************************/
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
-
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- exports.f = wellKnownSymbol;
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/whitespaces.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/internals/whitespaces.js ***!
- \*******************************************************/
- /***/ ((module) => {
-
- // a string of all valid unicode whitespaces
- module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.concat.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.concat.js ***!
- \*********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
- var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
- var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
-
- var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
- var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
- var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
-
- // We can't use this feature detection in V8 since it causes
- // deoptimization and serious performance degradation
- // https://github.com/zloirock/core-js/issues/679
- var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
- var array = [];
- array[IS_CONCAT_SPREADABLE] = false;
- return array.concat()[0] !== array;
- });
-
- var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
-
- var isConcatSpreadable = function (O) {
- if (!isObject(O)) return false;
- var spreadable = O[IS_CONCAT_SPREADABLE];
- return spreadable !== undefined ? !!spreadable : isArray(O);
- };
-
- var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
-
- // `Array.prototype.concat` method
- // https://tc39.es/ecma262/#sec-array.prototype.concat
- // with adding support of @@isConcatSpreadable and @@species
- $({ target: 'Array', proto: true, forced: FORCED }, {
- // eslint-disable-next-line no-unused-vars -- required for `.length`
- concat: function concat(arg) {
- var O = toObject(this);
- var A = arraySpeciesCreate(O, 0);
- var n = 0;
- var i, k, length, len, E;
- for (i = -1, length = arguments.length; i < length; i++) {
- E = i === -1 ? O : arguments[i];
- if (isConcatSpreadable(E)) {
- len = toLength(E.length);
- if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
- for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
- } else {
- if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
- createProperty(A, n++, E);
- }
- }
- A.length = n;
- return A;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.every.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.every.js ***!
- \********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $every = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").every;
- var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
-
- var STRICT_METHOD = arrayMethodIsStrict('every');
-
- // `Array.prototype.every` method
- // https://tc39.es/ecma262/#sec-array.prototype.every
- $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
- every: function every(callbackfn /* , thisArg */) {
- return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.fill.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.fill.js ***!
- \*******************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var fill = __webpack_require__(/*! ../internals/array-fill */ "./node_modules/core-js/internals/array-fill.js");
- var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
-
- // `Array.prototype.fill` method
- // https://tc39.es/ecma262/#sec-array.prototype.fill
- $({ target: 'Array', proto: true }, {
- fill: fill
- });
-
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
- addToUnscopables('fill');
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.for-each.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.for-each.js ***!
- \***********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var forEach = __webpack_require__(/*! ../internals/array-for-each */ "./node_modules/core-js/internals/array-for-each.js");
-
- // `Array.prototype.forEach` method
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
- // eslint-disable-next-line es/no-array-prototype-foreach -- safe
- $({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
- forEach: forEach
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.from.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.from.js ***!
- \*******************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var from = __webpack_require__(/*! ../internals/array-from */ "./node_modules/core-js/internals/array-from.js");
- var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
-
- var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
- // eslint-disable-next-line es/no-array-from -- required for testing
- Array.from(iterable);
- });
-
- // `Array.from` method
- // https://tc39.es/ecma262/#sec-array.from
- $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
- from: from
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.includes.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.includes.js ***!
- \***********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $includes = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").includes;
- var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
-
- // `Array.prototype.includes` method
- // https://tc39.es/ecma262/#sec-array.prototype.includes
- $({ target: 'Array', proto: true }, {
- includes: function includes(el /* , fromIndex = 0 */) {
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
- addToUnscopables('includes');
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.iterator.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.iterator.js ***!
- \***********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
- var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
- var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
- var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
-
- var ARRAY_ITERATOR = 'Array Iterator';
- var setInternalState = InternalStateModule.set;
- var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
-
- // `Array.prototype.entries` method
- // https://tc39.es/ecma262/#sec-array.prototype.entries
- // `Array.prototype.keys` method
- // https://tc39.es/ecma262/#sec-array.prototype.keys
- // `Array.prototype.values` method
- // https://tc39.es/ecma262/#sec-array.prototype.values
- // `Array.prototype[@@iterator]` method
- // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
- // `CreateArrayIterator` internal method
- // https://tc39.es/ecma262/#sec-createarrayiterator
- module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
- setInternalState(this, {
- type: ARRAY_ITERATOR,
- target: toIndexedObject(iterated), // target
- index: 0, // next index
- kind: kind // kind
- });
- // `%ArrayIteratorPrototype%.next` method
- // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
- }, function () {
- var state = getInternalState(this);
- var target = state.target;
- var kind = state.kind;
- var index = state.index++;
- if (!target || index >= target.length) {
- state.target = undefined;
- return { value: undefined, done: true };
- }
- if (kind == 'keys') return { value: index, done: false };
- if (kind == 'values') return { value: target[index], done: false };
- return { value: [index, target[index]], done: false };
- }, 'values');
-
- // argumentsList[@@iterator] is %ArrayProto_values%
- // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
- // https://tc39.es/ecma262/#sec-createmappedargumentsobject
- Iterators.Arguments = Iterators.Array;
-
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
- addToUnscopables('keys');
- addToUnscopables('values');
- addToUnscopables('entries');
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.map.js":
- /*!******************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.map.js ***!
- \******************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $map = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").map;
- var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
-
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
-
- // `Array.prototype.map` method
- // https://tc39.es/ecma262/#sec-array.prototype.map
- // with adding support of @@species
- $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
- map: function map(callbackfn /* , thisArg */) {
- return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.reduce.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.reduce.js ***!
- \*********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "./node_modules/core-js/internals/array-reduce.js").left;
- var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
- var CHROME_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
- var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
-
- var STRICT_METHOD = arrayMethodIsStrict('reduce');
- // Chrome 80-82 has a critical bug
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
- var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
-
- // `Array.prototype.reduce` method
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
- $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
- reduce: function reduce(callbackfn /* , initialValue */) {
- return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.reverse.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.reverse.js ***!
- \**********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
-
- var nativeReverse = [].reverse;
- var test = [1, 2];
-
- // `Array.prototype.reverse` method
- // https://tc39.es/ecma262/#sec-array.prototype.reverse
- // fix for Safari 12.0 bug
- // https://bugs.webkit.org/show_bug.cgi?id=188794
- $({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
- reverse: function reverse() {
- // eslint-disable-next-line no-self-assign -- dirty hack
- if (isArray(this)) this.length = this.length;
- return nativeReverse.call(this);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.slice.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.slice.js ***!
- \********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
- var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
-
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
-
- var SPECIES = wellKnownSymbol('species');
- var nativeSlice = [].slice;
- var max = Math.max;
-
- // `Array.prototype.slice` method
- // https://tc39.es/ecma262/#sec-array.prototype.slice
- // fallback for not array-like ES3 strings and DOM objects
- $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
- slice: function slice(start, end) {
- var O = toIndexedObject(this);
- var length = toLength(O.length);
- var k = toAbsoluteIndex(start, length);
- var fin = toAbsoluteIndex(end === undefined ? length : end, length);
- // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
- var Constructor, result, n;
- if (isArray(O)) {
- Constructor = O.constructor;
- // cross-realm fallback
- if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
- Constructor = undefined;
- } else if (isObject(Constructor)) {
- Constructor = Constructor[SPECIES];
- if (Constructor === null) Constructor = undefined;
- }
- if (Constructor === Array || Constructor === undefined) {
- return nativeSlice.call(O, k, fin);
- }
- }
- result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
- for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
- result.length = n;
- return result;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.some.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.some.js ***!
- \*******************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $some = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").some;
- var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
-
- var STRICT_METHOD = arrayMethodIsStrict('some');
-
- // `Array.prototype.some` method
- // https://tc39.es/ecma262/#sec-array.prototype.some
- $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
- some: function some(callbackfn /* , thisArg */) {
- return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.map.js":
- /*!************************************************!*\
- !*** ./node_modules/core-js/modules/es.map.js ***!
- \************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var collection = __webpack_require__(/*! ../internals/collection */ "./node_modules/core-js/internals/collection.js");
- var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ "./node_modules/core-js/internals/collection-strong.js");
-
- // `Map` constructor
- // https://tc39.es/ecma262/#sec-map-objects
- module.exports = collection('Map', function (init) {
- return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
- }, collectionStrong);
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.number.constructor.js":
- /*!***************************************************************!*\
- !*** ./node_modules/core-js/modules/es.number.constructor.js ***!
- \***************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
- var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js");
- var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
- var getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;
- var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
- var trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
-
- var NUMBER = 'Number';
- var NativeNumber = global[NUMBER];
- var NumberPrototype = NativeNumber.prototype;
-
- // Opera ~12 has broken Object#toString
- var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;
-
- // `ToNumber` abstract operation
- // https://tc39.es/ecma262/#sec-tonumber
- var toNumber = function (argument) {
- var it = toPrimitive(argument, false);
- var first, third, radix, maxCode, digits, length, index, code;
- if (typeof it == 'string' && it.length > 2) {
- it = trim(it);
- first = it.charCodeAt(0);
- if (first === 43 || first === 45) {
- third = it.charCodeAt(2);
- if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
- } else if (first === 48) {
- switch (it.charCodeAt(1)) {
- case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
- case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
- default: return +it;
- }
- digits = it.slice(2);
- length = digits.length;
- for (index = 0; index < length; index++) {
- code = digits.charCodeAt(index);
- // parseInt parses a string to a first unavailable symbol
- // but ToNumber should return NaN if a string contains unavailable symbols
- if (code < 48 || code > maxCode) return NaN;
- } return parseInt(digits, radix);
- }
- } return +it;
- };
-
- // `Number` constructor
- // https://tc39.es/ecma262/#sec-number-constructor
- if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
- var NumberWrapper = function Number(value) {
- var it = arguments.length < 1 ? 0 : value;
- var dummy = this;
- return dummy instanceof NumberWrapper
- // check on 1..constructor(foo) case
- && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)
- ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
- };
- for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
- // ES3:
- 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
- // ES2015 (in case, if modules with ES2015 Number statics required before):
- 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
- 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
- // ESNext
- 'fromString,range'
- ).split(','), j = 0, key; keys.length > j; j++) {
- if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {
- defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
- }
- }
- NumberWrapper.prototype = NumberPrototype;
- NumberPrototype.constructor = NumberWrapper;
- redefine(global, NUMBER, NumberWrapper);
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js":
- /*!*******************************************************************************!*\
- !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***!
- \*******************************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
-
- var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
- var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
-
- // `Object.getOwnPropertyDescriptor` method
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
- $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
- getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
- return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js":
- /*!********************************************************************************!*\
- !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js ***!
- \********************************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
- var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js");
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
- var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
-
- // `Object.getOwnPropertyDescriptors` method
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
- $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
- getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
- var O = toIndexedObject(object);
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
- var keys = ownKeys(O);
- var result = {};
- var index = 0;
- var key, descriptor;
- while (keys.length > index) {
- descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
- if (descriptor !== undefined) createProperty(result, key, descriptor);
- }
- return result;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.object.keys.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/modules/es.object.keys.js ***!
- \********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var nativeKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
-
- var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
-
- // `Object.keys` method
- // https://tc39.es/ecma262/#sec-object.keys
- $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
- keys: function keys(it) {
- return nativeKeys(toObject(it));
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.promise.js":
- /*!****************************************************!*\
- !*** ./node_modules/core-js/modules/es.promise.js ***!
- \****************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
- var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "./node_modules/core-js/internals/native-promise-constructor.js");
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
- var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
- var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
- var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
- var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
- var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
- var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
- var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
- var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "./node_modules/core-js/internals/species-constructor.js");
- var task = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
- var microtask = __webpack_require__(/*! ../internals/microtask */ "./node_modules/core-js/internals/microtask.js");
- var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "./node_modules/core-js/internals/promise-resolve.js");
- var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ "./node_modules/core-js/internals/host-report-errors.js");
- var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
- var perform = __webpack_require__(/*! ../internals/perform */ "./node_modules/core-js/internals/perform.js");
- var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
- var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var IS_BROWSER = __webpack_require__(/*! ../internals/engine-is-browser */ "./node_modules/core-js/internals/engine-is-browser.js");
- var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
- var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
-
- var SPECIES = wellKnownSymbol('species');
- var PROMISE = 'Promise';
- var getInternalState = InternalStateModule.get;
- var setInternalState = InternalStateModule.set;
- var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
- var NativePromisePrototype = NativePromise && NativePromise.prototype;
- var PromiseConstructor = NativePromise;
- var PromiseConstructorPrototype = NativePromisePrototype;
- var TypeError = global.TypeError;
- var document = global.document;
- var process = global.process;
- var newPromiseCapability = newPromiseCapabilityModule.f;
- var newGenericPromiseCapability = newPromiseCapability;
- var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
- var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
- var UNHANDLED_REJECTION = 'unhandledrejection';
- var REJECTION_HANDLED = 'rejectionhandled';
- var PENDING = 0;
- var FULFILLED = 1;
- var REJECTED = 2;
- var HANDLED = 1;
- var UNHANDLED = 2;
- var SUBCLASSING = false;
- var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
-
- var FORCED = isForced(PROMISE, function () {
- var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
- // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
- // We can't detect it synchronously, so just check versions
- if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
- // We need Promise#finally in the pure version for preventing prototype pollution
- if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;
- // We can't use @@species feature detection in V8 since it causes
- // deoptimization and performance degradation
- // https://github.com/zloirock/core-js/issues/679
- if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
- // Detect correctness of subclassing with @@species support
- var promise = new PromiseConstructor(function (resolve) { resolve(1); });
- var FakePromise = function (exec) {
- exec(function () { /* empty */ }, function () { /* empty */ });
- };
- var constructor = promise.constructor = {};
- constructor[SPECIES] = FakePromise;
- SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
- if (!SUBCLASSING) return true;
- // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
- });
-
- var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
- PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
- });
-
- // helpers
- var isThenable = function (it) {
- var then;
- return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
- };
-
- var notify = function (state, isReject) {
- if (state.notified) return;
- state.notified = true;
- var chain = state.reactions;
- microtask(function () {
- var value = state.value;
- var ok = state.state == FULFILLED;
- var index = 0;
- // variable length - can't use forEach
- while (chain.length > index) {
- var reaction = chain[index++];
- var handler = ok ? reaction.ok : reaction.fail;
- var resolve = reaction.resolve;
- var reject = reaction.reject;
- var domain = reaction.domain;
- var result, then, exited;
- try {
- if (handler) {
- if (!ok) {
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
- state.rejection = HANDLED;
- }
- if (handler === true) result = value;
- else {
- if (domain) domain.enter();
- result = handler(value); // can throw
- if (domain) {
- domain.exit();
- exited = true;
- }
- }
- if (result === reaction.promise) {
- reject(TypeError('Promise-chain cycle'));
- } else if (then = isThenable(result)) {
- then.call(result, resolve, reject);
- } else resolve(result);
- } else reject(value);
- } catch (error) {
- if (domain && !exited) domain.exit();
- reject(error);
- }
- }
- state.reactions = [];
- state.notified = false;
- if (isReject && !state.rejection) onUnhandled(state);
- });
- };
-
- var dispatchEvent = function (name, promise, reason) {
- var event, handler;
- if (DISPATCH_EVENT) {
- event = document.createEvent('Event');
- event.promise = promise;
- event.reason = reason;
- event.initEvent(name, false, true);
- global.dispatchEvent(event);
- } else event = { promise: promise, reason: reason };
- if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
- else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
- };
-
- var onUnhandled = function (state) {
- task.call(global, function () {
- var promise = state.facade;
- var value = state.value;
- var IS_UNHANDLED = isUnhandled(state);
- var result;
- if (IS_UNHANDLED) {
- result = perform(function () {
- if (IS_NODE) {
- process.emit('unhandledRejection', value, promise);
- } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
- });
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
- state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
- if (result.error) throw result.value;
- }
- });
- };
-
- var isUnhandled = function (state) {
- return state.rejection !== HANDLED && !state.parent;
- };
-
- var onHandleUnhandled = function (state) {
- task.call(global, function () {
- var promise = state.facade;
- if (IS_NODE) {
- process.emit('rejectionHandled', promise);
- } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
- });
- };
-
- var bind = function (fn, state, unwrap) {
- return function (value) {
- fn(state, value, unwrap);
- };
- };
-
- var internalReject = function (state, value, unwrap) {
- if (state.done) return;
- state.done = true;
- if (unwrap) state = unwrap;
- state.value = value;
- state.state = REJECTED;
- notify(state, true);
- };
-
- var internalResolve = function (state, value, unwrap) {
- if (state.done) return;
- state.done = true;
- if (unwrap) state = unwrap;
- try {
- if (state.facade === value) throw TypeError("Promise can't be resolved itself");
- var then = isThenable(value);
- if (then) {
- microtask(function () {
- var wrapper = { done: false };
- try {
- then.call(value,
- bind(internalResolve, wrapper, state),
- bind(internalReject, wrapper, state)
- );
- } catch (error) {
- internalReject(wrapper, error, state);
- }
- });
- } else {
- state.value = value;
- state.state = FULFILLED;
- notify(state, false);
- }
- } catch (error) {
- internalReject({ done: false }, error, state);
- }
- };
-
- // constructor polyfill
- if (FORCED) {
- // 25.4.3.1 Promise(executor)
- PromiseConstructor = function Promise(executor) {
- anInstance(this, PromiseConstructor, PROMISE);
- aFunction(executor);
- Internal.call(this);
- var state = getInternalState(this);
- try {
- executor(bind(internalResolve, state), bind(internalReject, state));
- } catch (error) {
- internalReject(state, error);
- }
- };
- PromiseConstructorPrototype = PromiseConstructor.prototype;
- // eslint-disable-next-line no-unused-vars -- required for `.length`
- Internal = function Promise(executor) {
- setInternalState(this, {
- type: PROMISE,
- done: false,
- notified: false,
- parent: false,
- reactions: [],
- rejection: false,
- state: PENDING,
- value: undefined
- });
- };
- Internal.prototype = redefineAll(PromiseConstructorPrototype, {
- // `Promise.prototype.then` method
- // https://tc39.es/ecma262/#sec-promise.prototype.then
- then: function then(onFulfilled, onRejected) {
- var state = getInternalPromiseState(this);
- var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
- reaction.fail = typeof onRejected == 'function' && onRejected;
- reaction.domain = IS_NODE ? process.domain : undefined;
- state.parent = true;
- state.reactions.push(reaction);
- if (state.state != PENDING) notify(state, false);
- return reaction.promise;
- },
- // `Promise.prototype.catch` method
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
- 'catch': function (onRejected) {
- return this.then(undefined, onRejected);
- }
- });
- OwnPromiseCapability = function () {
- var promise = new Internal();
- var state = getInternalState(promise);
- this.promise = promise;
- this.resolve = bind(internalResolve, state);
- this.reject = bind(internalReject, state);
- };
- newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
- return C === PromiseConstructor || C === PromiseWrapper
- ? new OwnPromiseCapability(C)
- : newGenericPromiseCapability(C);
- };
-
- if (!IS_PURE && typeof NativePromise == 'function' && NativePromisePrototype !== Object.prototype) {
- nativeThen = NativePromisePrototype.then;
-
- if (!SUBCLASSING) {
- // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
- redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
- var that = this;
- return new PromiseConstructor(function (resolve, reject) {
- nativeThen.call(that, resolve, reject);
- }).then(onFulfilled, onRejected);
- // https://github.com/zloirock/core-js/issues/640
- }, { unsafe: true });
-
- // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
- redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });
- }
-
- // make `.constructor === Promise` work for native promise-based APIs
- try {
- delete NativePromisePrototype.constructor;
- } catch (error) { /* empty */ }
-
- // make `instanceof Promise` work for native promise-based APIs
- if (setPrototypeOf) {
- setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);
- }
- }
- }
-
- $({ global: true, wrap: true, forced: FORCED }, {
- Promise: PromiseConstructor
- });
-
- setToStringTag(PromiseConstructor, PROMISE, false, true);
- setSpecies(PROMISE);
-
- PromiseWrapper = getBuiltIn(PROMISE);
-
- // statics
- $({ target: PROMISE, stat: true, forced: FORCED }, {
- // `Promise.reject` method
- // https://tc39.es/ecma262/#sec-promise.reject
- reject: function reject(r) {
- var capability = newPromiseCapability(this);
- capability.reject.call(undefined, r);
- return capability.promise;
- }
- });
-
- $({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
- // `Promise.resolve` method
- // https://tc39.es/ecma262/#sec-promise.resolve
- resolve: function resolve(x) {
- return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
- }
- });
-
- $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
- // `Promise.all` method
- // https://tc39.es/ecma262/#sec-promise.all
- all: function all(iterable) {
- var C = this;
- var capability = newPromiseCapability(C);
- var resolve = capability.resolve;
- var reject = capability.reject;
- var result = perform(function () {
- var $promiseResolve = aFunction(C.resolve);
- var values = [];
- var counter = 0;
- var remaining = 1;
- iterate(iterable, function (promise) {
- var index = counter++;
- var alreadyCalled = false;
- values.push(undefined);
- remaining++;
- $promiseResolve.call(C, promise).then(function (value) {
- if (alreadyCalled) return;
- alreadyCalled = true;
- values[index] = value;
- --remaining || resolve(values);
- }, reject);
- });
- --remaining || resolve(values);
- });
- if (result.error) reject(result.value);
- return capability.promise;
- },
- // `Promise.race` method
- // https://tc39.es/ecma262/#sec-promise.race
- race: function race(iterable) {
- var C = this;
- var capability = newPromiseCapability(C);
- var reject = capability.reject;
- var result = perform(function () {
- var $promiseResolve = aFunction(C.resolve);
- iterate(iterable, function (promise) {
- $promiseResolve.call(C, promise).then(capability.resolve, reject);
- });
- });
- if (result.error) reject(result.value);
- return capability.promise;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.reflect.apply.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/modules/es.reflect.apply.js ***!
- \**********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
-
- var nativeApply = getBuiltIn('Reflect', 'apply');
- var functionApply = Function.apply;
-
- // MS Edge argumentsList argument is optional
- var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
- nativeApply(function () { /* empty */ });
- });
-
- // `Reflect.apply` method
- // https://tc39.es/ecma262/#sec-reflect.apply
- $({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
- apply: function apply(target, thisArgument, argumentsList) {
- aFunction(target);
- anObject(argumentsList);
- return nativeApply
- ? nativeApply(target, thisArgument, argumentsList)
- : functionApply.call(target, thisArgument, argumentsList);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.reflect.construct.js":
- /*!**************************************************************!*\
- !*** ./node_modules/core-js/modules/es.reflect.construct.js ***!
- \**************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
- var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
-
- var nativeConstruct = getBuiltIn('Reflect', 'construct');
-
- // `Reflect.construct` method
- // https://tc39.es/ecma262/#sec-reflect.construct
- // MS Edge supports only 2 arguments and argumentsList argument is optional
- // FF Nightly sets third argument as `new.target`, but does not create `this` from it
- var NEW_TARGET_BUG = fails(function () {
- function F() { /* empty */ }
- return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
- });
- var ARGS_BUG = !fails(function () {
- nativeConstruct(function () { /* empty */ });
- });
- var FORCED = NEW_TARGET_BUG || ARGS_BUG;
-
- $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
- construct: function construct(Target, args /* , newTarget */) {
- aFunction(Target);
- anObject(args);
- var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
- if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
- if (Target == newTarget) {
- // w/o altered newTarget, optimization for 0-4 arguments
- switch (args.length) {
- case 0: return new Target();
- case 1: return new Target(args[0]);
- case 2: return new Target(args[0], args[1]);
- case 3: return new Target(args[0], args[1], args[2]);
- case 4: return new Target(args[0], args[1], args[2], args[3]);
- }
- // w/o altered newTarget, lot of arguments case
- var $args = [null];
- $args.push.apply($args, args);
- return new (bind.apply(Target, $args))();
- }
- // with altered newTarget, not support built-in constructors
- var proto = newTarget.prototype;
- var instance = create(isObject(proto) ? proto : Object.prototype);
- var result = Function.apply.call(Target, instance, args);
- return isObject(result) ? result : instance;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.reflect.delete-property.js":
- /*!********************************************************************!*\
- !*** ./node_modules/core-js/modules/es.reflect.delete-property.js ***!
- \********************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
-
- // `Reflect.deleteProperty` method
- // https://tc39.es/ecma262/#sec-reflect.deleteproperty
- $({ target: 'Reflect', stat: true }, {
- deleteProperty: function deleteProperty(target, propertyKey) {
- var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
- return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.reflect.get-prototype-of.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/core-js/modules/es.reflect.get-prototype-of.js ***!
- \*********************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var objectGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
- var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");
-
- // `Reflect.getPrototypeOf` method
- // https://tc39.es/ecma262/#sec-reflect.getprototypeof
- $({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {
- getPrototypeOf: function getPrototypeOf(target) {
- return objectGetPrototypeOf(anObject(target));
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.string.includes.js":
- /*!************************************************************!*\
- !*** ./node_modules/core-js/modules/es.string.includes.js ***!
- \************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "./node_modules/core-js/internals/not-a-regexp.js");
- var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
- var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "./node_modules/core-js/internals/correct-is-regexp-logic.js");
-
- // `String.prototype.includes` method
- // https://tc39.es/ecma262/#sec-string.prototype.includes
- $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
- includes: function includes(searchString /* , position = 0 */) {
- return !!~String(requireObjectCoercible(this))
- .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.string.iterator.js":
- /*!************************************************************!*\
- !*** ./node_modules/core-js/modules/es.string.iterator.js ***!
- \************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "./node_modules/core-js/internals/string-multibyte.js").charAt;
- var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
- var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
-
- var STRING_ITERATOR = 'String Iterator';
- var setInternalState = InternalStateModule.set;
- var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
-
- // `String.prototype[@@iterator]` method
- // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
- defineIterator(String, 'String', function (iterated) {
- setInternalState(this, {
- type: STRING_ITERATOR,
- string: String(iterated),
- index: 0
- });
- // `%StringIteratorPrototype%.next` method
- // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
- }, function next() {
- var state = getInternalState(this);
- var string = state.string;
- var index = state.index;
- var point;
- if (index >= string.length) return { value: undefined, done: true };
- point = charAt(string, index);
- state.index += point.length;
- return { value: point, done: false };
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.string.match.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/modules/es.string.match.js ***!
- \*********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
- var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js");
- var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js");
-
- // @@match logic
- fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
- return [
- // `String.prototype.match` method
- // https://tc39.es/ecma262/#sec-string.prototype.match
- function match(regexp) {
- var O = requireObjectCoercible(this);
- var matcher = regexp == undefined ? undefined : regexp[MATCH];
- return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
- },
- // `RegExp.prototype[@@match]` method
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
- function (regexp) {
- var res = maybeCallNative(nativeMatch, regexp, this);
- if (res.done) return res.value;
-
- var rx = anObject(regexp);
- var S = String(this);
-
- if (!rx.global) return regExpExec(rx, S);
-
- var fullUnicode = rx.unicode;
- rx.lastIndex = 0;
- var A = [];
- var n = 0;
- var result;
- while ((result = regExpExec(rx, S)) !== null) {
- var matchStr = String(result[0]);
- A[n] = matchStr;
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
- n++;
- }
- return n === 0 ? null : A;
- }
- ];
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.string.starts-with.js":
- /*!***************************************************************!*\
- !*** ./node_modules/core-js/modules/es.string.starts-with.js ***!
- \***************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "./node_modules/core-js/internals/not-a-regexp.js");
- var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
- var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "./node_modules/core-js/internals/correct-is-regexp-logic.js");
- var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
-
- // eslint-disable-next-line es/no-string-prototype-startswith -- safe
- var $startsWith = ''.startsWith;
- var min = Math.min;
-
- var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
- // https://github.com/zloirock/core-js/pull/702
- var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
- var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
- return descriptor && !descriptor.writable;
- }();
-
- // `String.prototype.startsWith` method
- // https://tc39.es/ecma262/#sec-string.prototype.startswith
- $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
- startsWith: function startsWith(searchString /* , position = 0 */) {
- var that = String(requireObjectCoercible(this));
- notARegExp(searchString);
- var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
- var search = String(searchString);
- return $startsWith
- ? $startsWith.call(that, search, index)
- : that.slice(index, index + search.length) === search;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.string.trim.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/modules/es.string.trim.js ***!
- \********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
- var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "./node_modules/core-js/internals/string-trim-forced.js");
-
- // `String.prototype.trim` method
- // https://tc39.es/ecma262/#sec-string.prototype.trim
- $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
- trim: function trim() {
- return $trim(this);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.symbol.description.js":
- /*!***************************************************************!*\
- !*** ./node_modules/core-js/modules/es.symbol.description.js ***!
- \***************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
- // `Symbol.prototype.description` getter
- // https://tc39.es/ecma262/#sec-symbol.prototype.description
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
- var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js");
-
- var NativeSymbol = global.Symbol;
-
- if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
- // Safari 12 bug
- NativeSymbol().description !== undefined
- )) {
- var EmptyStringDescriptionStore = {};
- // wrap Symbol constructor for correct work with undefined description
- var SymbolWrapper = function Symbol() {
- var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
- var result = this instanceof SymbolWrapper
- ? new NativeSymbol(description)
- // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
- : description === undefined ? NativeSymbol() : NativeSymbol(description);
- if (description === '') EmptyStringDescriptionStore[result] = true;
- return result;
- };
- copyConstructorProperties(SymbolWrapper, NativeSymbol);
- var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
- symbolPrototype.constructor = SymbolWrapper;
-
- var symbolToString = symbolPrototype.toString;
- var native = String(NativeSymbol('test')) == 'Symbol(test)';
- var regexp = /^Symbol\((.*)\)[^)]+$/;
- defineProperty(symbolPrototype, 'description', {
- configurable: true,
- get: function description() {
- var symbol = isObject(this) ? this.valueOf() : this;
- var string = symbolToString.call(symbol);
- if (has(EmptyStringDescriptionStore, symbol)) return '';
- var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
- return desc === '' ? undefined : desc;
- }
- });
-
- $({ global: true, forced: true }, {
- Symbol: SymbolWrapper
- });
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.symbol.iterator.js":
- /*!************************************************************!*\
- !*** ./node_modules/core-js/modules/es.symbol.iterator.js ***!
- \************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
-
- // `Symbol.iterator` well-known symbol
- // https://tc39.es/ecma262/#sec-symbol.iterator
- defineWellKnownSymbol('iterator');
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.symbol.js":
- /*!***************************************************!*\
- !*** ./node_modules/core-js/modules/es.symbol.js ***!
- \***************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
- var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
- var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js");
- var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
- var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
- var nativeObjectCreate = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
- var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
- var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js");
- var getOwnPropertyNamesExternal = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ "./node_modules/core-js/internals/object-get-own-property-names-external.js");
- var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js");
- var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
- var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
- var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js");
- var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
- var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
- var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
- var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
- var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
- var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
- var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
- var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").forEach;
-
- var HIDDEN = sharedKey('hidden');
- var SYMBOL = 'Symbol';
- var PROTOTYPE = 'prototype';
- var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
- var setInternalState = InternalStateModule.set;
- var getInternalState = InternalStateModule.getterFor(SYMBOL);
- var ObjectPrototype = Object[PROTOTYPE];
- var $Symbol = global.Symbol;
- var $stringify = getBuiltIn('JSON', 'stringify');
- var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
- var nativeDefineProperty = definePropertyModule.f;
- var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
- var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
- var AllSymbols = shared('symbols');
- var ObjectPrototypeSymbols = shared('op-symbols');
- var StringToSymbolRegistry = shared('string-to-symbol-registry');
- var SymbolToStringRegistry = shared('symbol-to-string-registry');
- var WellKnownSymbolsStore = shared('wks');
- var QObject = global.QObject;
- // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
- var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
-
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
- var setSymbolDescriptor = DESCRIPTORS && fails(function () {
- return nativeObjectCreate(nativeDefineProperty({}, 'a', {
- get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
- })).a != 7;
- }) ? function (O, P, Attributes) {
- var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
- if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
- nativeDefineProperty(O, P, Attributes);
- if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
- nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
- }
- } : nativeDefineProperty;
-
- var wrap = function (tag, description) {
- var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
- setInternalState(symbol, {
- type: SYMBOL,
- tag: tag,
- description: description
- });
- if (!DESCRIPTORS) symbol.description = description;
- return symbol;
- };
-
- var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
- return typeof it == 'symbol';
- } : function (it) {
- return Object(it) instanceof $Symbol;
- };
-
- var $defineProperty = function defineProperty(O, P, Attributes) {
- if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
- anObject(O);
- var key = toPrimitive(P, true);
- anObject(Attributes);
- if (has(AllSymbols, key)) {
- if (!Attributes.enumerable) {
- if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
- O[HIDDEN][key] = true;
- } else {
- if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
- Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
- } return setSymbolDescriptor(O, key, Attributes);
- } return nativeDefineProperty(O, key, Attributes);
- };
-
- var $defineProperties = function defineProperties(O, Properties) {
- anObject(O);
- var properties = toIndexedObject(Properties);
- var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
- $forEach(keys, function (key) {
- if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
- });
- return O;
- };
-
- var $create = function create(O, Properties) {
- return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
- };
-
- var $propertyIsEnumerable = function propertyIsEnumerable(V) {
- var P = toPrimitive(V, true);
- var enumerable = nativePropertyIsEnumerable.call(this, P);
- if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
- return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
- };
-
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
- var it = toIndexedObject(O);
- var key = toPrimitive(P, true);
- if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
- var descriptor = nativeGetOwnPropertyDescriptor(it, key);
- if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
- descriptor.enumerable = true;
- }
- return descriptor;
- };
-
- var $getOwnPropertyNames = function getOwnPropertyNames(O) {
- var names = nativeGetOwnPropertyNames(toIndexedObject(O));
- var result = [];
- $forEach(names, function (key) {
- if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
- });
- return result;
- };
-
- var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
- var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
- var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
- var result = [];
- $forEach(names, function (key) {
- if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
- result.push(AllSymbols[key]);
- }
- });
- return result;
- };
-
- // `Symbol` constructor
- // https://tc39.es/ecma262/#sec-symbol-constructor
- if (!NATIVE_SYMBOL) {
- $Symbol = function Symbol() {
- if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
- var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
- var tag = uid(description);
- var setter = function (value) {
- if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
- if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
- setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
- };
- if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
- return wrap(tag, description);
- };
-
- redefine($Symbol[PROTOTYPE], 'toString', function toString() {
- return getInternalState(this).tag;
- });
-
- redefine($Symbol, 'withoutSetter', function (description) {
- return wrap(uid(description), description);
- });
-
- propertyIsEnumerableModule.f = $propertyIsEnumerable;
- definePropertyModule.f = $defineProperty;
- getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
- getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
- getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
-
- wrappedWellKnownSymbolModule.f = function (name) {
- return wrap(wellKnownSymbol(name), name);
- };
-
- if (DESCRIPTORS) {
- // https://github.com/tc39/proposal-Symbol-description
- nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
- configurable: true,
- get: function description() {
- return getInternalState(this).description;
- }
- });
- if (!IS_PURE) {
- redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
- }
- }
- }
-
- $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
- Symbol: $Symbol
- });
-
- $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
- defineWellKnownSymbol(name);
- });
-
- $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
- // `Symbol.for` method
- // https://tc39.es/ecma262/#sec-symbol.for
- 'for': function (key) {
- var string = String(key);
- if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
- var symbol = $Symbol(string);
- StringToSymbolRegistry[string] = symbol;
- SymbolToStringRegistry[symbol] = string;
- return symbol;
- },
- // `Symbol.keyFor` method
- // https://tc39.es/ecma262/#sec-symbol.keyfor
- keyFor: function keyFor(sym) {
- if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
- if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
- },
- useSetter: function () { USE_SETTER = true; },
- useSimple: function () { USE_SETTER = false; }
- });
-
- $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
- // `Object.create` method
- // https://tc39.es/ecma262/#sec-object.create
- create: $create,
- // `Object.defineProperty` method
- // https://tc39.es/ecma262/#sec-object.defineproperty
- defineProperty: $defineProperty,
- // `Object.defineProperties` method
- // https://tc39.es/ecma262/#sec-object.defineproperties
- defineProperties: $defineProperties,
- // `Object.getOwnPropertyDescriptor` method
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor
- });
-
- $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
- // `Object.getOwnPropertyNames` method
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
- getOwnPropertyNames: $getOwnPropertyNames,
- // `Object.getOwnPropertySymbols` method
- // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
- getOwnPropertySymbols: $getOwnPropertySymbols
- });
-
- // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
- // https://bugs.chromium.org/p/v8/issues/detail?id=3443
- $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
- getOwnPropertySymbols: function getOwnPropertySymbols(it) {
- return getOwnPropertySymbolsModule.f(toObject(it));
- }
- });
-
- // `JSON.stringify` method behavior with symbols
- // https://tc39.es/ecma262/#sec-json.stringify
- if ($stringify) {
- var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
- var symbol = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- return $stringify([symbol]) != '[null]'
- // WebKit converts symbol values to JSON as null
- || $stringify({ a: symbol }) != '{}'
- // V8 throws on boxed symbols
- || $stringify(Object(symbol)) != '{}';
- });
-
- $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
- // eslint-disable-next-line no-unused-vars -- required for `.length`
- stringify: function stringify(it, replacer, space) {
- var args = [it];
- var index = 1;
- var $replacer;
- while (arguments.length > index) args.push(arguments[index++]);
- $replacer = replacer;
- if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
- if (!isArray(replacer)) replacer = function (key, value) {
- if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
- if (!isSymbol(value)) return value;
- };
- args[1] = replacer;
- return $stringify.apply(null, args);
- }
- });
- }
-
- // `Symbol.prototype[@@toPrimitive]` method
- // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
- if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
- createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
- }
- // `Symbol.prototype[@@toStringTag]` property
- // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
- setToStringTag($Symbol, SYMBOL);
-
- hiddenKeys[HIDDEN] = true;
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/web.dom-collections.for-each.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***!
- \**********************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js");
- var forEach = __webpack_require__(/*! ../internals/array-for-each */ "./node_modules/core-js/internals/array-for-each.js");
- var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
-
- for (var COLLECTION_NAME in DOMIterables) {
- var Collection = global[COLLECTION_NAME];
- var CollectionPrototype = Collection && Collection.prototype;
- // some Chrome versions have non-configurable methods on DOMTokenList
- if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
- createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
- } catch (error) {
- CollectionPrototype.forEach = forEach;
- }
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/web.dom-collections.iterator.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***!
- \**********************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js");
- var ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ "./node_modules/core-js/modules/es.array.iterator.js");
- var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- var ITERATOR = wellKnownSymbol('iterator');
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
- var ArrayValues = ArrayIteratorMethods.values;
-
- for (var COLLECTION_NAME in DOMIterables) {
- var Collection = global[COLLECTION_NAME];
- var CollectionPrototype = Collection && Collection.prototype;
- if (CollectionPrototype) {
- // some Chrome versions have non-configurable methods on DOMTokenList
- if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
- createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
- } catch (error) {
- CollectionPrototype[ITERATOR] = ArrayValues;
- }
- if (!CollectionPrototype[TO_STRING_TAG]) {
- createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
- }
- if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
- // some Chrome versions have non-configurable methods on DOMTokenList
- if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
- createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
- } catch (error) {
- CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
- }
- }
- }
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/performance-now/lib/performance-now.js":
- /*!*************************************************************!*\
- !*** ./node_modules/performance-now/lib/performance-now.js ***!
- \*************************************************************/
- /***/ (function(module) {
-
- // Generated by CoffeeScript 1.12.2
- (function() {
- var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
-
- if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
- module.exports = function() {
- return performance.now();
- };
- } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
- module.exports = function() {
- return (getNanoSeconds() - nodeLoadTime) / 1e6;
- };
- hrtime = process.hrtime;
- getNanoSeconds = function() {
- var hr;
- hr = hrtime();
- return hr[0] * 1e9 + hr[1];
- };
- moduleLoadTime = getNanoSeconds();
- upTime = process.uptime() * 1e9;
- nodeLoadTime = moduleLoadTime - upTime;
- } else if (Date.now) {
- module.exports = function() {
- return Date.now() - loadTime;
- };
- loadTime = Date.now();
- } else {
- module.exports = function() {
- return new Date().getTime() - loadTime;
- };
- loadTime = new Date().getTime();
- }
-
- }).call(this);
-
- //# sourceMappingURL=performance-now.js.map
-
-
- /***/ }),
-
- /***/ "./node_modules/raf/index.js":
- /*!***********************************!*\
- !*** ./node_modules/raf/index.js ***!
- \***********************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var now = __webpack_require__(/*! performance-now */ "./node_modules/performance-now/lib/performance-now.js")
- , root = typeof window === 'undefined' ? __webpack_require__.g : window
- , vendors = ['moz', 'webkit']
- , suffix = 'AnimationFrame'
- , raf = root['request' + suffix]
- , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
-
- for(var i = 0; !raf && i < vendors.length; i++) {
- raf = root[vendors[i] + 'Request' + suffix]
- caf = root[vendors[i] + 'Cancel' + suffix]
- || root[vendors[i] + 'CancelRequest' + suffix]
- }
-
- // Some versions of FF have rAF but not cAF
- if(!raf || !caf) {
- var last = 0
- , id = 0
- , queue = []
- , frameDuration = 1000 / 60
-
- raf = function(callback) {
- if(queue.length === 0) {
- var _now = now()
- , next = Math.max(0, frameDuration - (_now - last))
- last = next + _now
- setTimeout(function() {
- var cp = queue.slice(0)
- // Clear queue here to prevent
- // callbacks from appending listeners
- // to the current frame's queue
- queue.length = 0
- for(var i = 0; i < cp.length; i++) {
- if(!cp[i].cancelled) {
- try{
- cp[i].callback(last)
- } catch(e) {
- setTimeout(function() { throw e }, 0)
- }
- }
- }
- }, Math.round(next))
- }
- queue.push({
- handle: ++id,
- callback: callback,
- cancelled: false
- })
- return id
- }
-
- caf = function(handle) {
- for(var i = 0; i < queue.length; i++) {
- if(queue[i].handle === handle) {
- queue[i].cancelled = true
- }
- }
- }
- }
-
- module.exports = function(fn) {
- // Wrap in a new function to prevent
- // `cancel` potentially being assigned
- // to the native rAF function
- return raf.call(root, fn)
- }
- module.exports.cancel = function() {
- caf.apply(root, arguments)
- }
- module.exports.polyfill = function(object) {
- if (!object) {
- object = root;
- }
- object.requestAnimationFrame = raf
- object.cancelAnimationFrame = caf
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/regenerator-runtime/runtime.js":
- /*!*****************************************************!*\
- !*** ./node_modules/regenerator-runtime/runtime.js ***!
- \*****************************************************/
- /***/ ((module) => {
-
- /**
- * Copyright (c) 2014-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
- var runtime = (function (exports) {
- "use strict";
-
- var Op = Object.prototype;
- var hasOwn = Op.hasOwnProperty;
- var undefined; // More compressible than void 0.
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
-
- function define(obj, key, value) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- return obj[key];
- }
- try {
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
- define({}, "");
- } catch (err) {
- define = function(obj, key, value) {
- return obj[key] = value;
- };
- }
-
- function wrap(innerFn, outerFn, self, tryLocsList) {
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
- var generator = Object.create(protoGenerator.prototype);
- var context = new Context(tryLocsList || []);
-
- // The ._invoke method unifies the implementations of the .next,
- // .throw, and .return methods.
- generator._invoke = makeInvokeMethod(innerFn, self, context);
-
- return generator;
- }
- exports.wrap = wrap;
-
- // Try/catch helper to minimize deoptimizations. Returns a completion
- // record like context.tryEntries[i].completion. This interface could
- // have been (and was previously) designed to take a closure to be
- // invoked without arguments, but in all the cases we care about we
- // already have an existing method we want to call, so there's no need
- // to create a new function object. We can even get away with assuming
- // the method takes exactly one argument, since that happens to be true
- // in every case, so we don't have to touch the arguments object. The
- // only additional allocation required is the completion record, which
- // has a stable shape and so hopefully should be cheap to allocate.
- function tryCatch(fn, obj, arg) {
- try {
- return { type: "normal", arg: fn.call(obj, arg) };
- } catch (err) {
- return { type: "throw", arg: err };
- }
- }
-
- var GenStateSuspendedStart = "suspendedStart";
- var GenStateSuspendedYield = "suspendedYield";
- var GenStateExecuting = "executing";
- var GenStateCompleted = "completed";
-
- // Returning this object from the innerFn has the same effect as
- // breaking out of the dispatch switch statement.
- var ContinueSentinel = {};
-
- // Dummy constructor functions that we use as the .constructor and
- // .constructor.prototype properties for functions that return Generator
- // objects. For full spec compliance, you may wish to configure your
- // minifier not to mangle the names of these two functions.
- function Generator() {}
- function GeneratorFunction() {}
- function GeneratorFunctionPrototype() {}
-
- // This is a polyfill for %IteratorPrototype% for environments that
- // don't natively support it.
- var IteratorPrototype = {};
- IteratorPrototype[iteratorSymbol] = function () {
- return this;
- };
-
- var getProto = Object.getPrototypeOf;
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
- if (NativeIteratorPrototype &&
- NativeIteratorPrototype !== Op &&
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
- // This environment has a native %IteratorPrototype%; use it instead
- // of the polyfill.
- IteratorPrototype = NativeIteratorPrototype;
- }
-
- var Gp = GeneratorFunctionPrototype.prototype =
- Generator.prototype = Object.create(IteratorPrototype);
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
- GeneratorFunction.displayName = define(
- GeneratorFunctionPrototype,
- toStringTagSymbol,
- "GeneratorFunction"
- );
-
- // Helper for defining the .next, .throw, and .return methods of the
- // Iterator interface in terms of a single ._invoke method.
- function defineIteratorMethods(prototype) {
- ["next", "throw", "return"].forEach(function(method) {
- define(prototype, method, function(arg) {
- return this._invoke(method, arg);
- });
- });
- }
-
- exports.isGeneratorFunction = function(genFun) {
- var ctor = typeof genFun === "function" && genFun.constructor;
- return ctor
- ? ctor === GeneratorFunction ||
- // For the native GeneratorFunction constructor, the best we can
- // do is to check its .name property.
- (ctor.displayName || ctor.name) === "GeneratorFunction"
- : false;
- };
-
- exports.mark = function(genFun) {
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
- } else {
- genFun.__proto__ = GeneratorFunctionPrototype;
- define(genFun, toStringTagSymbol, "GeneratorFunction");
- }
- genFun.prototype = Object.create(Gp);
- return genFun;
- };
-
- // Within the body of any async function, `await x` is transformed to
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
- // meant to be awaited.
- exports.awrap = function(arg) {
- return { __await: arg };
- };
-
- function AsyncIterator(generator, PromiseImpl) {
- function invoke(method, arg, resolve, reject) {
- var record = tryCatch(generator[method], generator, arg);
- if (record.type === "throw") {
- reject(record.arg);
- } else {
- var result = record.arg;
- var value = result.value;
- if (value &&
- typeof value === "object" &&
- hasOwn.call(value, "__await")) {
- return PromiseImpl.resolve(value.__await).then(function(value) {
- invoke("next", value, resolve, reject);
- }, function(err) {
- invoke("throw", err, resolve, reject);
- });
- }
-
- return PromiseImpl.resolve(value).then(function(unwrapped) {
- // When a yielded Promise is resolved, its final value becomes
- // the .value of the Promise<{value,done}> result for the
- // current iteration.
- result.value = unwrapped;
- resolve(result);
- }, function(error) {
- // If a rejected Promise was yielded, throw the rejection back
- // into the async generator function so it can be handled there.
- return invoke("throw", error, resolve, reject);
- });
- }
- }
-
- var previousPromise;
-
- function enqueue(method, arg) {
- function callInvokeWithMethodAndArg() {
- return new PromiseImpl(function(resolve, reject) {
- invoke(method, arg, resolve, reject);
- });
- }
-
- return previousPromise =
- // If enqueue has been called before, then we want to wait until
- // all previous Promises have been resolved before calling invoke,
- // so that results are always delivered in the correct order. If
- // enqueue has not been called before, then it is important to
- // call invoke immediately, without waiting on a callback to fire,
- // so that the async generator function has the opportunity to do
- // any necessary setup in a predictable way. This predictability
- // is why the Promise constructor synchronously invokes its
- // executor callback, and why async functions synchronously
- // execute code before the first await. Since we implement simple
- // async functions in terms of async generators, it is especially
- // important to get this right, even though it requires care.
- previousPromise ? previousPromise.then(
- callInvokeWithMethodAndArg,
- // Avoid propagating failures to Promises returned by later
- // invocations of the iterator.
- callInvokeWithMethodAndArg
- ) : callInvokeWithMethodAndArg();
- }
-
- // Define the unified helper method that is used to implement .next,
- // .throw, and .return (see defineIteratorMethods).
- this._invoke = enqueue;
- }
-
- defineIteratorMethods(AsyncIterator.prototype);
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
- return this;
- };
- exports.AsyncIterator = AsyncIterator;
-
- // Note that simple async functions are implemented on top of
- // AsyncIterator objects; they just return a Promise for the value of
- // the final result produced by the iterator.
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
- if (PromiseImpl === void 0) PromiseImpl = Promise;
-
- var iter = new AsyncIterator(
- wrap(innerFn, outerFn, self, tryLocsList),
- PromiseImpl
- );
-
- return exports.isGeneratorFunction(outerFn)
- ? iter // If outerFn is a generator, return the full iterator.
- : iter.next().then(function(result) {
- return result.done ? result.value : iter.next();
- });
- };
-
- function makeInvokeMethod(innerFn, self, context) {
- var state = GenStateSuspendedStart;
-
- return function invoke(method, arg) {
- if (state === GenStateExecuting) {
- throw new Error("Generator is already running");
- }
-
- if (state === GenStateCompleted) {
- if (method === "throw") {
- throw arg;
- }
-
- // Be forgiving, per 25.3.3.3.3 of the spec:
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
- return doneResult();
- }
-
- context.method = method;
- context.arg = arg;
-
- while (true) {
- var delegate = context.delegate;
- if (delegate) {
- var delegateResult = maybeInvokeDelegate(delegate, context);
- if (delegateResult) {
- if (delegateResult === ContinueSentinel) continue;
- return delegateResult;
- }
- }
-
- if (context.method === "next") {
- // Setting context._sent for legacy support of Babel's
- // function.sent implementation.
- context.sent = context._sent = context.arg;
-
- } else if (context.method === "throw") {
- if (state === GenStateSuspendedStart) {
- state = GenStateCompleted;
- throw context.arg;
- }
-
- context.dispatchException(context.arg);
-
- } else if (context.method === "return") {
- context.abrupt("return", context.arg);
- }
-
- state = GenStateExecuting;
-
- var record = tryCatch(innerFn, self, context);
- if (record.type === "normal") {
- // If an exception is thrown from innerFn, we leave state ===
- // GenStateExecuting and loop back for another invocation.
- state = context.done
- ? GenStateCompleted
- : GenStateSuspendedYield;
-
- if (record.arg === ContinueSentinel) {
- continue;
- }
-
- return {
- value: record.arg,
- done: context.done
- };
-
- } else if (record.type === "throw") {
- state = GenStateCompleted;
- // Dispatch the exception by looping back around to the
- // context.dispatchException(context.arg) call above.
- context.method = "throw";
- context.arg = record.arg;
- }
- }
- };
- }
-
- // Call delegate.iterator[context.method](context.arg) and handle the
- // result, either by returning a { value, done } result from the
- // delegate iterator, or by modifying context.method and context.arg,
- // setting context.delegate to null, and returning the ContinueSentinel.
- function maybeInvokeDelegate(delegate, context) {
- var method = delegate.iterator[context.method];
- if (method === undefined) {
- // A .throw or .return when the delegate iterator has no .throw
- // method always terminates the yield* loop.
- context.delegate = null;
-
- if (context.method === "throw") {
- // Note: ["return"] must be used for ES3 parsing compatibility.
- if (delegate.iterator["return"]) {
- // If the delegate iterator has a return method, give it a
- // chance to clean up.
- context.method = "return";
- context.arg = undefined;
- maybeInvokeDelegate(delegate, context);
-
- if (context.method === "throw") {
- // If maybeInvokeDelegate(context) changed context.method from
- // "return" to "throw", let that override the TypeError below.
- return ContinueSentinel;
- }
- }
-
- context.method = "throw";
- context.arg = new TypeError(
- "The iterator does not provide a 'throw' method");
- }
-
- return ContinueSentinel;
- }
-
- var record = tryCatch(method, delegate.iterator, context.arg);
-
- if (record.type === "throw") {
- context.method = "throw";
- context.arg = record.arg;
- context.delegate = null;
- return ContinueSentinel;
- }
-
- var info = record.arg;
-
- if (! info) {
- context.method = "throw";
- context.arg = new TypeError("iterator result is not an object");
- context.delegate = null;
- return ContinueSentinel;
- }
-
- if (info.done) {
- // Assign the result of the finished delegate to the temporary
- // variable specified by delegate.resultName (see delegateYield).
- context[delegate.resultName] = info.value;
-
- // Resume execution at the desired location (see delegateYield).
- context.next = delegate.nextLoc;
-
- // If context.method was "throw" but the delegate handled the
- // exception, let the outer generator proceed normally. If
- // context.method was "next", forget context.arg since it has been
- // "consumed" by the delegate iterator. If context.method was
- // "return", allow the original .return call to continue in the
- // outer generator.
- if (context.method !== "return") {
- context.method = "next";
- context.arg = undefined;
- }
-
- } else {
- // Re-yield the result returned by the delegate method.
- return info;
- }
-
- // The delegate iterator is finished, so forget it and continue with
- // the outer generator.
- context.delegate = null;
- return ContinueSentinel;
- }
-
- // Define Generator.prototype.{next,throw,return} in terms of the
- // unified ._invoke helper method.
- defineIteratorMethods(Gp);
-
- define(Gp, toStringTagSymbol, "Generator");
-
- // A Generator should always return itself as the iterator object when the
- // @@iterator function is called on it. Some browsers' implementations of the
- // iterator prototype chain incorrectly implement this, causing the Generator
- // object to not be returned from this call. This ensures that doesn't happen.
- // See https://github.com/facebook/regenerator/issues/274 for more details.
- Gp[iteratorSymbol] = function() {
- return this;
- };
-
- Gp.toString = function() {
- return "[object Generator]";
- };
-
- function pushTryEntry(locs) {
- var entry = { tryLoc: locs[0] };
-
- if (1 in locs) {
- entry.catchLoc = locs[1];
- }
-
- if (2 in locs) {
- entry.finallyLoc = locs[2];
- entry.afterLoc = locs[3];
- }
-
- this.tryEntries.push(entry);
- }
-
- function resetTryEntry(entry) {
- var record = entry.completion || {};
- record.type = "normal";
- delete record.arg;
- entry.completion = record;
- }
-
- function Context(tryLocsList) {
- // The root entry object (effectively a try statement without a catch
- // or a finally block) gives us a place to store values thrown from
- // locations where there is no enclosing try statement.
- this.tryEntries = [{ tryLoc: "root" }];
- tryLocsList.forEach(pushTryEntry, this);
- this.reset(true);
- }
-
- exports.keys = function(object) {
- var keys = [];
- for (var key in object) {
- keys.push(key);
- }
- keys.reverse();
-
- // Rather than returning an object with a next method, we keep
- // things simple and return the next function itself.
- return function next() {
- while (keys.length) {
- var key = keys.pop();
- if (key in object) {
- next.value = key;
- next.done = false;
- return next;
- }
- }
-
- // To avoid creating an additional object, we just hang the .value
- // and .done properties off the next function object itself. This
- // also ensures that the minifier will not anonymize the function.
- next.done = true;
- return next;
- };
- };
-
- function values(iterable) {
- if (iterable) {
- var iteratorMethod = iterable[iteratorSymbol];
- if (iteratorMethod) {
- return iteratorMethod.call(iterable);
- }
-
- if (typeof iterable.next === "function") {
- return iterable;
- }
-
- if (!isNaN(iterable.length)) {
- var i = -1, next = function next() {
- while (++i < iterable.length) {
- if (hasOwn.call(iterable, i)) {
- next.value = iterable[i];
- next.done = false;
- return next;
- }
- }
-
- next.value = undefined;
- next.done = true;
-
- return next;
- };
-
- return next.next = next;
- }
- }
-
- // Return an iterator with no values.
- return { next: doneResult };
- }
- exports.values = values;
-
- function doneResult() {
- return { value: undefined, done: true };
- }
-
- Context.prototype = {
- constructor: Context,
-
- reset: function(skipTempReset) {
- this.prev = 0;
- this.next = 0;
- // Resetting context._sent for legacy support of Babel's
- // function.sent implementation.
- this.sent = this._sent = undefined;
- this.done = false;
- this.delegate = null;
-
- this.method = "next";
- this.arg = undefined;
-
- this.tryEntries.forEach(resetTryEntry);
-
- if (!skipTempReset) {
- for (var name in this) {
- // Not sure about the optimal order of these conditions:
- if (name.charAt(0) === "t" &&
- hasOwn.call(this, name) &&
- !isNaN(+name.slice(1))) {
- this[name] = undefined;
- }
- }
- }
- },
-
- stop: function() {
- this.done = true;
-
- var rootEntry = this.tryEntries[0];
- var rootRecord = rootEntry.completion;
- if (rootRecord.type === "throw") {
- throw rootRecord.arg;
- }
-
- return this.rval;
- },
-
- dispatchException: function(exception) {
- if (this.done) {
- throw exception;
- }
-
- var context = this;
- function handle(loc, caught) {
- record.type = "throw";
- record.arg = exception;
- context.next = loc;
-
- if (caught) {
- // If the dispatched exception was caught by a catch block,
- // then let that catch block handle the exception normally.
- context.method = "next";
- context.arg = undefined;
- }
-
- return !! caught;
- }
-
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- var record = entry.completion;
-
- if (entry.tryLoc === "root") {
- // Exception thrown outside of any try block that could handle
- // it, so set the completion value of the entire function to
- // throw the exception.
- return handle("end");
- }
-
- if (entry.tryLoc <= this.prev) {
- var hasCatch = hasOwn.call(entry, "catchLoc");
- var hasFinally = hasOwn.call(entry, "finallyLoc");
-
- if (hasCatch && hasFinally) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- } else if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
-
- } else if (hasCatch) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- }
-
- } else if (hasFinally) {
- if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
-
- } else {
- throw new Error("try statement without catch or finally");
- }
- }
- }
- },
-
- abrupt: function(type, arg) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc <= this.prev &&
- hasOwn.call(entry, "finallyLoc") &&
- this.prev < entry.finallyLoc) {
- var finallyEntry = entry;
- break;
- }
- }
-
- if (finallyEntry &&
- (type === "break" ||
- type === "continue") &&
- finallyEntry.tryLoc <= arg &&
- arg <= finallyEntry.finallyLoc) {
- // Ignore the finally entry if control is not jumping to a
- // location outside the try/catch block.
- finallyEntry = null;
- }
-
- var record = finallyEntry ? finallyEntry.completion : {};
- record.type = type;
- record.arg = arg;
-
- if (finallyEntry) {
- this.method = "next";
- this.next = finallyEntry.finallyLoc;
- return ContinueSentinel;
- }
-
- return this.complete(record);
- },
-
- complete: function(record, afterLoc) {
- if (record.type === "throw") {
- throw record.arg;
- }
-
- if (record.type === "break" ||
- record.type === "continue") {
- this.next = record.arg;
- } else if (record.type === "return") {
- this.rval = this.arg = record.arg;
- this.method = "return";
- this.next = "end";
- } else if (record.type === "normal" && afterLoc) {
- this.next = afterLoc;
- }
-
- return ContinueSentinel;
- },
-
- finish: function(finallyLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.finallyLoc === finallyLoc) {
- this.complete(entry.completion, entry.afterLoc);
- resetTryEntry(entry);
- return ContinueSentinel;
- }
- }
- },
-
- "catch": function(tryLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc === tryLoc) {
- var record = entry.completion;
- if (record.type === "throw") {
- var thrown = record.arg;
- resetTryEntry(entry);
- }
- return thrown;
- }
- }
-
- // The context.catch method must only be called with a location
- // argument that corresponds to a known catch block.
- throw new Error("illegal catch attempt");
- },
-
- delegateYield: function(iterable, resultName, nextLoc) {
- this.delegate = {
- iterator: values(iterable),
- resultName: resultName,
- nextLoc: nextLoc
- };
-
- if (this.method === "next") {
- // Deliberately forget the last sent value so that we don't
- // accidentally pass it on to the delegate.
- this.arg = undefined;
- }
-
- return ContinueSentinel;
- }
- };
-
- // Regardless of whether this script is executing as a CommonJS module
- // or not, return the runtime object so that we can declare the variable
- // regeneratorRuntime in the outer scope, which allows this module to be
- // injected easily by `bin/regenerator --include-runtime script.js`.
- return exports;
-
- }(
- // If this script is executing as a CommonJS module, use module.exports
- // as the regeneratorRuntime namespace. Otherwise create a new empty
- // object. Either way, the resulting object will be used to initialize
- // the regeneratorRuntime variable at the top of this file.
- true ? module.exports : 0
- ));
-
- try {
- regeneratorRuntime = runtime;
- } catch (accidentalStrictMode) {
- // This module should not be running in strict mode, so the above
- // assignment should always work unless something is misconfigured. Just
- // in case runtime.js accidentally runs in strict mode, we can escape
- // strict mode using a global Function call. This could conceivably fail
- // if a Content Security Policy forbids using Function, but in that case
- // the proper solution is to fix the accidental strict mode problem. If
- // you've misconfigured your bundler to force strict mode and applied a
- // CSP to forbid Function, and you're not willing to fix either of those
- // problems, please detail your unique predicament in a GitHub issue.
- Function("r", "regeneratorRuntime = r")(runtime);
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/rgbcolor/index.js":
- /*!****************************************!*\
- !*** ./node_modules/rgbcolor/index.js ***!
- \****************************************/
- /***/ ((module) => {
-
- /*
- Based on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>
- http://www.phpied.com/rgb-color-parser-in-javascript/
- */
-
- module.exports = function(color_string) {
- this.ok = false;
- this.alpha = 1.0;
-
- // strip any leading #
- if (color_string.charAt(0) == '#') { // remove # if any
- color_string = color_string.substr(1,6);
- }
-
- color_string = color_string.replace(/ /g,'');
- color_string = color_string.toLowerCase();
-
- // before getting into regexps, try simple matches
- // and overwrite the input
- var simple_colors = {
- aliceblue: 'f0f8ff',
- antiquewhite: 'faebd7',
- aqua: '00ffff',
- aquamarine: '7fffd4',
- azure: 'f0ffff',
- beige: 'f5f5dc',
- bisque: 'ffe4c4',
- black: '000000',
- blanchedalmond: 'ffebcd',
- blue: '0000ff',
- blueviolet: '8a2be2',
- brown: 'a52a2a',
- burlywood: 'deb887',
- cadetblue: '5f9ea0',
- chartreuse: '7fff00',
- chocolate: 'd2691e',
- coral: 'ff7f50',
- cornflowerblue: '6495ed',
- cornsilk: 'fff8dc',
- crimson: 'dc143c',
- cyan: '00ffff',
- darkblue: '00008b',
- darkcyan: '008b8b',
- darkgoldenrod: 'b8860b',
- darkgray: 'a9a9a9',
- darkgreen: '006400',
- darkkhaki: 'bdb76b',
- darkmagenta: '8b008b',
- darkolivegreen: '556b2f',
- darkorange: 'ff8c00',
- darkorchid: '9932cc',
- darkred: '8b0000',
- darksalmon: 'e9967a',
- darkseagreen: '8fbc8f',
- darkslateblue: '483d8b',
- darkslategray: '2f4f4f',
- darkturquoise: '00ced1',
- darkviolet: '9400d3',
- deeppink: 'ff1493',
- deepskyblue: '00bfff',
- dimgray: '696969',
- dodgerblue: '1e90ff',
- feldspar: 'd19275',
- firebrick: 'b22222',
- floralwhite: 'fffaf0',
- forestgreen: '228b22',
- fuchsia: 'ff00ff',
- gainsboro: 'dcdcdc',
- ghostwhite: 'f8f8ff',
- gold: 'ffd700',
- goldenrod: 'daa520',
- gray: '808080',
- green: '008000',
- greenyellow: 'adff2f',
- honeydew: 'f0fff0',
- hotpink: 'ff69b4',
- indianred : 'cd5c5c',
- indigo : '4b0082',
- ivory: 'fffff0',
- khaki: 'f0e68c',
- lavender: 'e6e6fa',
- lavenderblush: 'fff0f5',
- lawngreen: '7cfc00',
- lemonchiffon: 'fffacd',
- lightblue: 'add8e6',
- lightcoral: 'f08080',
- lightcyan: 'e0ffff',
- lightgoldenrodyellow: 'fafad2',
- lightgrey: 'd3d3d3',
- lightgreen: '90ee90',
- lightpink: 'ffb6c1',
- lightsalmon: 'ffa07a',
- lightseagreen: '20b2aa',
- lightskyblue: '87cefa',
- lightslateblue: '8470ff',
- lightslategray: '778899',
- lightsteelblue: 'b0c4de',
- lightyellow: 'ffffe0',
- lime: '00ff00',
- limegreen: '32cd32',
- linen: 'faf0e6',
- magenta: 'ff00ff',
- maroon: '800000',
- mediumaquamarine: '66cdaa',
- mediumblue: '0000cd',
- mediumorchid: 'ba55d3',
- mediumpurple: '9370d8',
- mediumseagreen: '3cb371',
- mediumslateblue: '7b68ee',
- mediumspringgreen: '00fa9a',
- mediumturquoise: '48d1cc',
- mediumvioletred: 'c71585',
- midnightblue: '191970',
- mintcream: 'f5fffa',
- mistyrose: 'ffe4e1',
- moccasin: 'ffe4b5',
- navajowhite: 'ffdead',
- navy: '000080',
- oldlace: 'fdf5e6',
- olive: '808000',
- olivedrab: '6b8e23',
- orange: 'ffa500',
- orangered: 'ff4500',
- orchid: 'da70d6',
- palegoldenrod: 'eee8aa',
- palegreen: '98fb98',
- paleturquoise: 'afeeee',
- palevioletred: 'd87093',
- papayawhip: 'ffefd5',
- peachpuff: 'ffdab9',
- peru: 'cd853f',
- pink: 'ffc0cb',
- plum: 'dda0dd',
- powderblue: 'b0e0e6',
- purple: '800080',
- rebeccapurple: '663399',
- red: 'ff0000',
- rosybrown: 'bc8f8f',
- royalblue: '4169e1',
- saddlebrown: '8b4513',
- salmon: 'fa8072',
- sandybrown: 'f4a460',
- seagreen: '2e8b57',
- seashell: 'fff5ee',
- sienna: 'a0522d',
- silver: 'c0c0c0',
- skyblue: '87ceeb',
- slateblue: '6a5acd',
- slategray: '708090',
- snow: 'fffafa',
- springgreen: '00ff7f',
- steelblue: '4682b4',
- tan: 'd2b48c',
- teal: '008080',
- thistle: 'd8bfd8',
- tomato: 'ff6347',
- turquoise: '40e0d0',
- violet: 'ee82ee',
- violetred: 'd02090',
- wheat: 'f5deb3',
- white: 'ffffff',
- whitesmoke: 'f5f5f5',
- yellow: 'ffff00',
- yellowgreen: '9acd32'
- };
- color_string = simple_colors[color_string] || color_string;
- // emd of simple type-in colors
-
- // array of color definition objects
- var color_defs = [
- {
- re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,
- example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],
- process: function (bits){
- return [
- parseInt(bits[1]),
- parseInt(bits[2]),
- parseInt(bits[3]),
- parseFloat(bits[4])
- ];
- }
- },
- {
- re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
- example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
- process: function (bits){
- return [
- parseInt(bits[1]),
- parseInt(bits[2]),
- parseInt(bits[3])
- ];
- }
- },
- {
- re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
- example: ['#00ff00', '336699'],
- process: function (bits){
- return [
- parseInt(bits[1], 16),
- parseInt(bits[2], 16),
- parseInt(bits[3], 16)
- ];
- }
- },
- {
- re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- example: ['#fb0', 'f0f'],
- process: function (bits){
- return [
- parseInt(bits[1] + bits[1], 16),
- parseInt(bits[2] + bits[2], 16),
- parseInt(bits[3] + bits[3], 16)
- ];
- }
- }
- ];
-
- // search through the definitions to find a match
- for (var i = 0; i < color_defs.length; i++) {
- var re = color_defs[i].re;
- var processor = color_defs[i].process;
- var bits = re.exec(color_string);
- if (bits) {
- var channels = processor(bits);
- this.r = channels[0];
- this.g = channels[1];
- this.b = channels[2];
- if (channels.length > 3) {
- this.alpha = channels[3];
- }
- this.ok = true;
- }
-
- }
-
- // validate/cleanup values
- this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
- this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
- this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
- this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);
-
- // some getters
- this.toRGB = function () {
- return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
- }
- this.toRGBA = function () {
- return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';
- }
- this.toHex = function () {
- var r = this.r.toString(16);
- var g = this.g.toString(16);
- var b = this.b.toString(16);
- if (r.length == 1) r = '0' + r;
- if (g.length == 1) g = '0' + g;
- if (b.length == 1) b = '0' + b;
- return '#' + r + g + b;
- }
-
- // help
- this.getHelpXML = function () {
-
- var examples = new Array();
- // add regexps
- for (var i = 0; i < color_defs.length; i++) {
- var example = color_defs[i].example;
- for (var j = 0; j < example.length; j++) {
- examples[examples.length] = example[j];
- }
- }
- // add type-in colors
- for (var sc in simple_colors) {
- examples[examples.length] = sc;
- }
-
- var xml = document.createElement('ul');
- xml.setAttribute('id', 'rgbcolor-examples');
- for (var i = 0; i < examples.length; i++) {
- try {
- var list_item = document.createElement('li');
- var list_color = new RGBColor(examples[i]);
- var example_div = document.createElement('div');
- example_div.style.cssText =
- 'margin: 3px; '
- + 'border: 1px solid black; '
- + 'background:' + list_color.toHex() + '; '
- + 'color:' + list_color.toHex()
- ;
- example_div.appendChild(document.createTextNode('test'));
- var list_item_value = document.createTextNode(
- ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
- );
- list_item.appendChild(example_div);
- list_item.appendChild(list_item_value);
- xml.appendChild(list_item);
-
- } catch(e){}
- }
- return xml;
-
- }
-
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/stackblur-canvas/dist/stackblur-es.js":
- /*!************************************************************!*\
- !*** ./node_modules/stackblur-canvas/dist/stackblur-es.js ***!
- \************************************************************/
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "BlurStack": () => (/* binding */ BlurStack),
- /* harmony export */ "canvasRGB": () => (/* binding */ processCanvasRGB),
- /* harmony export */ "canvasRGBA": () => (/* binding */ processCanvasRGBA),
- /* harmony export */ "image": () => (/* binding */ processImage),
- /* harmony export */ "imageDataRGB": () => (/* binding */ processImageDataRGB),
- /* harmony export */ "imageDataRGBA": () => (/* binding */ processImageDataRGBA)
- /* harmony export */ });
- function _typeof(obj) {
- "@babel/helpers - typeof";
-
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
- _typeof = function (obj) {
- return typeof obj;
- };
- } else {
- _typeof = function (obj) {
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
- };
- }
-
- return _typeof(obj);
- }
-
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
-
- /* eslint-disable no-bitwise -- used for calculations */
-
- /* eslint-disable unicorn/prefer-query-selector -- aiming at
- backward-compatibility */
-
- /**
- * StackBlur - a fast almost Gaussian Blur For Canvas
- *
- * In case you find this class useful - especially in commercial projects -
- * I am not totally unhappy for a small donation to my PayPal account
- * mario@quasimondo.de
- *
- * Or support me on flattr:
- * {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.
- *
- * @module StackBlur
- * @author Mario Klingemann
- * Contact: mario@quasimondo.com
- * Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}
- * Twitter: @quasimondo
- *
- * @copyright (c) 2010 Mario Klingemann
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
- var mulTable = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];
- var shgTable = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];
- /**
- * @param {string|HTMLImageElement} img
- * @param {string|HTMLCanvasElement} canvas
- * @param {Float} radius
- * @param {boolean} blurAlphaChannel
- * @param {boolean} useOffset
- * @param {boolean} skipStyles
- * @returns {undefined}
- */
-
- function processImage(img, canvas, radius, blurAlphaChannel, useOffset, skipStyles) {
- if (typeof img === 'string') {
- img = document.getElementById(img);
- }
-
- if (!img || !('naturalWidth' in img)) {
- return;
- }
-
- var dimensionType = useOffset ? 'offset' : 'natural';
- var w = img[dimensionType + 'Width'];
- var h = img[dimensionType + 'Height'];
-
- if (typeof canvas === 'string') {
- canvas = document.getElementById(canvas);
- }
-
- if (!canvas || !('getContext' in canvas)) {
- return;
- }
-
- if (!skipStyles) {
- canvas.style.width = w + 'px';
- canvas.style.height = h + 'px';
- }
-
- canvas.width = w;
- canvas.height = h;
- var context = canvas.getContext('2d');
- context.clearRect(0, 0, w, h);
- context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, w, h);
-
- if (isNaN(radius) || radius < 1) {
- return;
- }
-
- if (blurAlphaChannel) {
- processCanvasRGBA(canvas, 0, 0, w, h, radius);
- } else {
- processCanvasRGB(canvas, 0, 0, w, h, radius);
- }
- }
- /**
- * @param {string|HTMLCanvasElement} canvas
- * @param {Integer} topX
- * @param {Integer} topY
- * @param {Integer} width
- * @param {Integer} height
- * @throws {Error|TypeError}
- * @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}
- */
-
-
- function getImageDataFromCanvas(canvas, topX, topY, width, height) {
- if (typeof canvas === 'string') {
- canvas = document.getElementById(canvas);
- }
-
- if (!canvas || _typeof(canvas) !== 'object' || !('getContext' in canvas)) {
- throw new TypeError('Expecting canvas with `getContext` method ' + 'in processCanvasRGB(A) calls!');
- }
-
- var context = canvas.getContext('2d');
-
- try {
- return context.getImageData(topX, topY, width, height);
- } catch (e) {
- throw new Error('unable to access image data: ' + e);
- }
- }
- /**
- * @param {HTMLCanvasElement} canvas
- * @param {Integer} topX
- * @param {Integer} topY
- * @param {Integer} width
- * @param {Integer} height
- * @param {Float} radius
- * @returns {undefined}
- */
-
-
- function processCanvasRGBA(canvas, topX, topY, width, height, radius) {
- if (isNaN(radius) || radius < 1) {
- return;
- }
-
- radius |= 0;
- var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);
- imageData = processImageDataRGBA(imageData, topX, topY, width, height, radius);
- canvas.getContext('2d').putImageData(imageData, topX, topY);
- }
- /**
- * @param {ImageData} imageData
- * @param {Integer} topX
- * @param {Integer} topY
- * @param {Integer} width
- * @param {Integer} height
- * @param {Float} radius
- * @returns {ImageData}
- */
-
-
- function processImageDataRGBA(imageData, topX, topY, width, height, radius) {
- var pixels = imageData.data;
- var div = 2 * radius + 1; // const w4 = width << 2;
-
- var widthMinus1 = width - 1;
- var heightMinus1 = height - 1;
- var radiusPlus1 = radius + 1;
- var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
- var stackStart = new BlurStack();
- var stack = stackStart;
- var stackEnd;
-
- for (var i = 1; i < div; i++) {
- stack = stack.next = new BlurStack();
-
- if (i === radiusPlus1) {
- stackEnd = stack;
- }
- }
-
- stack.next = stackStart;
- var stackIn = null,
- stackOut = null,
- yw = 0,
- yi = 0;
- var mulSum = mulTable[radius];
- var shgSum = shgTable[radius];
-
- for (var y = 0; y < height; y++) {
- stack = stackStart;
- var pr = pixels[yi],
- pg = pixels[yi + 1],
- pb = pixels[yi + 2],
- pa = pixels[yi + 3];
-
- for (var _i = 0; _i < radiusPlus1; _i++) {
- stack.r = pr;
- stack.g = pg;
- stack.b = pb;
- stack.a = pa;
- stack = stack.next;
- }
-
- var rInSum = 0,
- gInSum = 0,
- bInSum = 0,
- aInSum = 0,
- rOutSum = radiusPlus1 * pr,
- gOutSum = radiusPlus1 * pg,
- bOutSum = radiusPlus1 * pb,
- aOutSum = radiusPlus1 * pa,
- rSum = sumFactor * pr,
- gSum = sumFactor * pg,
- bSum = sumFactor * pb,
- aSum = sumFactor * pa;
-
- for (var _i2 = 1; _i2 < radiusPlus1; _i2++) {
- var p = yi + ((widthMinus1 < _i2 ? widthMinus1 : _i2) << 2);
- var r = pixels[p],
- g = pixels[p + 1],
- b = pixels[p + 2],
- a = pixels[p + 3];
- var rbs = radiusPlus1 - _i2;
- rSum += (stack.r = r) * rbs;
- gSum += (stack.g = g) * rbs;
- bSum += (stack.b = b) * rbs;
- aSum += (stack.a = a) * rbs;
- rInSum += r;
- gInSum += g;
- bInSum += b;
- aInSum += a;
- stack = stack.next;
- }
-
- stackIn = stackStart;
- stackOut = stackEnd;
-
- for (var x = 0; x < width; x++) {
- var paInitial = aSum * mulSum >> shgSum;
- pixels[yi + 3] = paInitial;
-
- if (paInitial !== 0) {
- var _a2 = 255 / paInitial;
-
- pixels[yi] = (rSum * mulSum >> shgSum) * _a2;
- pixels[yi + 1] = (gSum * mulSum >> shgSum) * _a2;
- pixels[yi + 2] = (bSum * mulSum >> shgSum) * _a2;
- } else {
- pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;
- }
-
- rSum -= rOutSum;
- gSum -= gOutSum;
- bSum -= bOutSum;
- aSum -= aOutSum;
- rOutSum -= stackIn.r;
- gOutSum -= stackIn.g;
- bOutSum -= stackIn.b;
- aOutSum -= stackIn.a;
-
- var _p = x + radius + 1;
-
- _p = yw + (_p < widthMinus1 ? _p : widthMinus1) << 2;
- rInSum += stackIn.r = pixels[_p];
- gInSum += stackIn.g = pixels[_p + 1];
- bInSum += stackIn.b = pixels[_p + 2];
- aInSum += stackIn.a = pixels[_p + 3];
- rSum += rInSum;
- gSum += gInSum;
- bSum += bInSum;
- aSum += aInSum;
- stackIn = stackIn.next;
- var _stackOut = stackOut,
- _r = _stackOut.r,
- _g = _stackOut.g,
- _b = _stackOut.b,
- _a = _stackOut.a;
- rOutSum += _r;
- gOutSum += _g;
- bOutSum += _b;
- aOutSum += _a;
- rInSum -= _r;
- gInSum -= _g;
- bInSum -= _b;
- aInSum -= _a;
- stackOut = stackOut.next;
- yi += 4;
- }
-
- yw += width;
- }
-
- for (var _x = 0; _x < width; _x++) {
- yi = _x << 2;
-
- var _pr = pixels[yi],
- _pg = pixels[yi + 1],
- _pb = pixels[yi + 2],
- _pa = pixels[yi + 3],
- _rOutSum = radiusPlus1 * _pr,
- _gOutSum = radiusPlus1 * _pg,
- _bOutSum = radiusPlus1 * _pb,
- _aOutSum = radiusPlus1 * _pa,
- _rSum = sumFactor * _pr,
- _gSum = sumFactor * _pg,
- _bSum = sumFactor * _pb,
- _aSum = sumFactor * _pa;
-
- stack = stackStart;
-
- for (var _i3 = 0; _i3 < radiusPlus1; _i3++) {
- stack.r = _pr;
- stack.g = _pg;
- stack.b = _pb;
- stack.a = _pa;
- stack = stack.next;
- }
-
- var yp = width;
- var _gInSum = 0,
- _bInSum = 0,
- _aInSum = 0,
- _rInSum = 0;
-
- for (var _i4 = 1; _i4 <= radius; _i4++) {
- yi = yp + _x << 2;
-
- var _rbs = radiusPlus1 - _i4;
-
- _rSum += (stack.r = _pr = pixels[yi]) * _rbs;
- _gSum += (stack.g = _pg = pixels[yi + 1]) * _rbs;
- _bSum += (stack.b = _pb = pixels[yi + 2]) * _rbs;
- _aSum += (stack.a = _pa = pixels[yi + 3]) * _rbs;
- _rInSum += _pr;
- _gInSum += _pg;
- _bInSum += _pb;
- _aInSum += _pa;
- stack = stack.next;
-
- if (_i4 < heightMinus1) {
- yp += width;
- }
- }
-
- yi = _x;
- stackIn = stackStart;
- stackOut = stackEnd;
-
- for (var _y = 0; _y < height; _y++) {
- var _p2 = yi << 2;
-
- pixels[_p2 + 3] = _pa = _aSum * mulSum >> shgSum;
-
- if (_pa > 0) {
- _pa = 255 / _pa;
- pixels[_p2] = (_rSum * mulSum >> shgSum) * _pa;
- pixels[_p2 + 1] = (_gSum * mulSum >> shgSum) * _pa;
- pixels[_p2 + 2] = (_bSum * mulSum >> shgSum) * _pa;
- } else {
- pixels[_p2] = pixels[_p2 + 1] = pixels[_p2 + 2] = 0;
- }
-
- _rSum -= _rOutSum;
- _gSum -= _gOutSum;
- _bSum -= _bOutSum;
- _aSum -= _aOutSum;
- _rOutSum -= stackIn.r;
- _gOutSum -= stackIn.g;
- _bOutSum -= stackIn.b;
- _aOutSum -= stackIn.a;
- _p2 = _x + ((_p2 = _y + radiusPlus1) < heightMinus1 ? _p2 : heightMinus1) * width << 2;
- _rSum += _rInSum += stackIn.r = pixels[_p2];
- _gSum += _gInSum += stackIn.g = pixels[_p2 + 1];
- _bSum += _bInSum += stackIn.b = pixels[_p2 + 2];
- _aSum += _aInSum += stackIn.a = pixels[_p2 + 3];
- stackIn = stackIn.next;
- _rOutSum += _pr = stackOut.r;
- _gOutSum += _pg = stackOut.g;
- _bOutSum += _pb = stackOut.b;
- _aOutSum += _pa = stackOut.a;
- _rInSum -= _pr;
- _gInSum -= _pg;
- _bInSum -= _pb;
- _aInSum -= _pa;
- stackOut = stackOut.next;
- yi += width;
- }
- }
-
- return imageData;
- }
- /**
- * @param {HTMLCanvasElement} canvas
- * @param {Integer} topX
- * @param {Integer} topY
- * @param {Integer} width
- * @param {Integer} height
- * @param {Float} radius
- * @returns {undefined}
- */
-
-
- function processCanvasRGB(canvas, topX, topY, width, height, radius) {
- if (isNaN(radius) || radius < 1) {
- return;
- }
-
- radius |= 0;
- var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);
- imageData = processImageDataRGB(imageData, topX, topY, width, height, radius);
- canvas.getContext('2d').putImageData(imageData, topX, topY);
- }
- /**
- * @param {ImageData} imageData
- * @param {Integer} topX
- * @param {Integer} topY
- * @param {Integer} width
- * @param {Integer} height
- * @param {Float} radius
- * @returns {ImageData}
- */
-
-
- function processImageDataRGB(imageData, topX, topY, width, height, radius) {
- var pixels = imageData.data;
- var div = 2 * radius + 1; // const w4 = width << 2;
-
- var widthMinus1 = width - 1;
- var heightMinus1 = height - 1;
- var radiusPlus1 = radius + 1;
- var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
- var stackStart = new BlurStack();
- var stack = stackStart;
- var stackEnd;
-
- for (var i = 1; i < div; i++) {
- stack = stack.next = new BlurStack();
-
- if (i === radiusPlus1) {
- stackEnd = stack;
- }
- }
-
- stack.next = stackStart;
- var stackIn = null;
- var stackOut = null;
- var mulSum = mulTable[radius];
- var shgSum = shgTable[radius];
- var p, rbs;
- var yw = 0,
- yi = 0;
-
- for (var y = 0; y < height; y++) {
- var pr = pixels[yi],
- pg = pixels[yi + 1],
- pb = pixels[yi + 2],
- rOutSum = radiusPlus1 * pr,
- gOutSum = radiusPlus1 * pg,
- bOutSum = radiusPlus1 * pb,
- rSum = sumFactor * pr,
- gSum = sumFactor * pg,
- bSum = sumFactor * pb;
- stack = stackStart;
-
- for (var _i5 = 0; _i5 < radiusPlus1; _i5++) {
- stack.r = pr;
- stack.g = pg;
- stack.b = pb;
- stack = stack.next;
- }
-
- var rInSum = 0,
- gInSum = 0,
- bInSum = 0;
-
- for (var _i6 = 1; _i6 < radiusPlus1; _i6++) {
- p = yi + ((widthMinus1 < _i6 ? widthMinus1 : _i6) << 2);
- rSum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - _i6);
- gSum += (stack.g = pg = pixels[p + 1]) * rbs;
- bSum += (stack.b = pb = pixels[p + 2]) * rbs;
- rInSum += pr;
- gInSum += pg;
- bInSum += pb;
- stack = stack.next;
- }
-
- stackIn = stackStart;
- stackOut = stackEnd;
-
- for (var x = 0; x < width; x++) {
- pixels[yi] = rSum * mulSum >> shgSum;
- pixels[yi + 1] = gSum * mulSum >> shgSum;
- pixels[yi + 2] = bSum * mulSum >> shgSum;
- rSum -= rOutSum;
- gSum -= gOutSum;
- bSum -= bOutSum;
- rOutSum -= stackIn.r;
- gOutSum -= stackIn.g;
- bOutSum -= stackIn.b;
- p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;
- rInSum += stackIn.r = pixels[p];
- gInSum += stackIn.g = pixels[p + 1];
- bInSum += stackIn.b = pixels[p + 2];
- rSum += rInSum;
- gSum += gInSum;
- bSum += bInSum;
- stackIn = stackIn.next;
- rOutSum += pr = stackOut.r;
- gOutSum += pg = stackOut.g;
- bOutSum += pb = stackOut.b;
- rInSum -= pr;
- gInSum -= pg;
- bInSum -= pb;
- stackOut = stackOut.next;
- yi += 4;
- }
-
- yw += width;
- }
-
- for (var _x2 = 0; _x2 < width; _x2++) {
- yi = _x2 << 2;
-
- var _pr2 = pixels[yi],
- _pg2 = pixels[yi + 1],
- _pb2 = pixels[yi + 2],
- _rOutSum2 = radiusPlus1 * _pr2,
- _gOutSum2 = radiusPlus1 * _pg2,
- _bOutSum2 = radiusPlus1 * _pb2,
- _rSum2 = sumFactor * _pr2,
- _gSum2 = sumFactor * _pg2,
- _bSum2 = sumFactor * _pb2;
-
- stack = stackStart;
-
- for (var _i7 = 0; _i7 < radiusPlus1; _i7++) {
- stack.r = _pr2;
- stack.g = _pg2;
- stack.b = _pb2;
- stack = stack.next;
- }
-
- var _rInSum2 = 0,
- _gInSum2 = 0,
- _bInSum2 = 0;
-
- for (var _i8 = 1, yp = width; _i8 <= radius; _i8++) {
- yi = yp + _x2 << 2;
- _rSum2 += (stack.r = _pr2 = pixels[yi]) * (rbs = radiusPlus1 - _i8);
- _gSum2 += (stack.g = _pg2 = pixels[yi + 1]) * rbs;
- _bSum2 += (stack.b = _pb2 = pixels[yi + 2]) * rbs;
- _rInSum2 += _pr2;
- _gInSum2 += _pg2;
- _bInSum2 += _pb2;
- stack = stack.next;
-
- if (_i8 < heightMinus1) {
- yp += width;
- }
- }
-
- yi = _x2;
- stackIn = stackStart;
- stackOut = stackEnd;
-
- for (var _y2 = 0; _y2 < height; _y2++) {
- p = yi << 2;
- pixels[p] = _rSum2 * mulSum >> shgSum;
- pixels[p + 1] = _gSum2 * mulSum >> shgSum;
- pixels[p + 2] = _bSum2 * mulSum >> shgSum;
- _rSum2 -= _rOutSum2;
- _gSum2 -= _gOutSum2;
- _bSum2 -= _bOutSum2;
- _rOutSum2 -= stackIn.r;
- _gOutSum2 -= stackIn.g;
- _bOutSum2 -= stackIn.b;
- p = _x2 + ((p = _y2 + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;
- _rSum2 += _rInSum2 += stackIn.r = pixels[p];
- _gSum2 += _gInSum2 += stackIn.g = pixels[p + 1];
- _bSum2 += _bInSum2 += stackIn.b = pixels[p + 2];
- stackIn = stackIn.next;
- _rOutSum2 += _pr2 = stackOut.r;
- _gOutSum2 += _pg2 = stackOut.g;
- _bOutSum2 += _pb2 = stackOut.b;
- _rInSum2 -= _pr2;
- _gInSum2 -= _pg2;
- _bInSum2 -= _pb2;
- stackOut = stackOut.next;
- yi += width;
- }
- }
-
- return imageData;
- }
- /**
- *
- */
-
-
- var BlurStack =
- /**
- * Set properties.
- */
- function BlurStack() {
- _classCallCheck(this, BlurStack);
-
- this.r = 0;
- this.g = 0;
- this.b = 0;
- this.a = 0;
- this.next = null;
- };
-
-
-
-
- /***/ })
-
- }]);
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvQGFtY2hhcnRzL2FtY2hhcnRzNC8uaW50ZXJuYWwvY2FudmcvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lL2hlbHBlcnMvZXNtL2FycmF5TGlrZVRvQXJyYXkuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lL2hlbHBlcnMvZXNtL2FycmF5V2l0aEhvbGVzLmpzIiwid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9AYmFiZWwvcnVudGltZS9oZWxwZXJzL2VzbS9hcnJheVdpdGhvdXRIb2xlcy5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUvaGVscGVycy9lc20vYXNzZXJ0VGhpc0luaXRpYWxpemVkLmpzIiwid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9AYmFiZWwvcnVudGltZS9oZWxwZXJzL2VzbS9hc3luY1RvR2VuZXJhdG9yLmpzIiwid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9AYmFiZWwvcnVudGltZS9oZWxwZXJzL2VzbS9jbGFzc0NhbGxDaGVjay5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvQGJhYm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GZpbmFsIHZhbHVlIGJlY29tZXNcbiAgICAgICAgICAgIC8vIHRoZSAudmFsdWUgb2YgdGhlIFByb21pc2U8e3ZhbHVlLGRvbmV9PiByZXN1bHQgZm9yIHRoZVxuICAgICAgICAgICAgLy8gY3VycmVudCBpdGVyYXRpb24uXG4gICAgICAgICAgICByZXN1bHQudmFsdWUgPSB1bndyYXBwZWQ7XG4gICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgICAgfSwgZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAvLyBJZiBhIHJlamVjdGVkIFByb21pc2Ugd2FzIHlpZWxkZWQsIHRocm93IHRoZSByZWplY3Rpb24gYmFja1xuICAgICAgICAgICAgLy8gaW50byB0aGUgYXN5bmMgZ2VuZXJhdG9yIGZ1bmN0aW9uIHNvIGl0IGNhbiBiZSBoYW5kbGVkIHRoZXJlLlxuICAgICAgICAgICAgcmV0dXJuIGludm9rZShcInRocm93XCIsIGVycm9yLCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHZhciBwcmV2aW91c1Byb21pc2U7XG5cbiAgICAgIGZ1bmN0aW9uIGVucXVldWUobWV0aG9kLCBhcmcpIHtcbiAgICAgICAgZnVuY3Rpb24gY2FsbEludm9rZVdpdGhNZXRob2RBbmRBcmcoKSB7XG4gICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlSW1wbChmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICBpbnZva2UobWV0aG9kLCBhcmcsIHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcHJldmlvdXNQcm9taXNlID0gLy8gSWYgZW5xdWV1ZSBoYXMgYmVlbiBjYWxsZWQgYmVmb3JlLCB0aGVuIHdlIHdhbnQgdG8gd2FpdCB1bnRpbFxuICAgIC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GNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29udGV4dC5kaXNwYXRjaEV4Y2VwdGlvbihjb250ZXh0LmFyZyk7XG4gICAgICAgICAgfSBlbHNlIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG4gICAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgICBzdGF0ZSA9IGNvbnRleHQuZG9uZSA/IEdlblN0YXRlQ29tcGxldGVkIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgICAgaWYgKHJlY29yZC5hcmcgPT09IENvbnRpbnVlU2VudGluZWwpIHtcbiAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgIHZhbH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ICAgLy8gYW5kIC5kb25lIHByb3BlcnRpZXMgb2ZmIHRoZSBuZXh0IGZ1bmN0aW9uIG9iamVjdCBpdHNlbGYuIFRoaXNcbiAgICAgICAgLy8gYWxzbyBlbnN1cmVzIHRoYXQgdGhlIG1pbmlmaWVyIHdpbGwgbm90IGFub255bWl6ZSB0aGUgZnVuY3Rpb24uXG5cblxuICAgICAgICBuZXh0LmRvbmUgPSB0cnVlO1xuICAgICAgICByZXR1cm4gbmV4dDtcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGZ1bmN0aW9uIHZhbHVlcyhpdGVyYWJsZSkge1xuICAgICAgaWYgKGl0ZXJhYmxlKSB7XG4gICAgICAgIHZhciBpdGVyYXRvck1ldGhvZCA9IGl0ZXJhYmxlW2l0ZXJhdG9yU3ltYm9sXTtcblxuICAgICAgICBpZiAoaXRlcmF0b3JNZXRob2QpIHtcbiAgICAgICAgICByZXR1cm4gaXRlcmF0b3JNZXRob2QuY2FsbChpdGVyYWJsZSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZW9mIGl0ZXJhYmxlLm5leHQgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgIHJldHVybiBpdGVyYWJsZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghaXNOYU4oaXRlcmFibGUubGVuZ3RoKSkge1xuICAgICAgICAgIHZhciBpID0gLTEsXG4gICAgICAgICAgICAgIG5leHQgPSBmdW5jdGlvbiBuZXh0KCkge1xuICAgICAgICAgICAgd2hpbGUgKCsraSA8IGl0ZXJhYmxlLmxlbmd0aCkge1xuICAgICAgICAgICAgICBpZiAoaGFzT3duLmNhbGwoaXRlcmFibGUsIGkpKSB7XG4gICAgICAgICAgICAgICAgbmV4dC52YWx1ZSA9IGl0ZXJhYmxlW2ldO1xuICAgICAgICAgICAgICAgIG5leHQuZG9uZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgICB9XG4gICA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mluZWQkMTtcbiAgICAgICAgdGhpcy50cnlFbnRyaWVzLmZvckVhY2gocmVzZXRUcnlFbnRyeSk7XG5cbiAgICAgICAgaWYgKCFza2lwVGVtcFJlc2V0KSB7XG4gICAgICAgICAgZm9yICh2YXIgbmFtZSBpbiB0aGlzKSB7XG4gICAgICAgICAgICAvLyBOb3Qgc3VyZSBhYm91dCB0aGUgb3B0aW1hbCBvcmRlciBvZiB0aGVzZSBjb25kaXRpb25zOlxuICAgICAgICAgICAgaWYgKG5hbWUuY2hhckF0KDApID09PSBcInRcIiAmJiBoYXNPd24uY2FsbCh0aGlzLCBuYW1lKSAmJiAhaXNOYU4oK25hbWUuc2xpY2UoMSkpKSB7XG4gICAgICAgICAgICAgIHRoaXNbbmFtZV0gPSB1bmRlZmluZWQkMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBzdG9wOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRoaXMuZG9uZSA9IHRydWU7XG4gICAgICAgIHZhciByb290RW50cnkgPSB0aGlzLnRyeUVudHJpZXNbMF07XG4gICAgICAgIHZhciByb290UmVjb3JkID0gcm9vdEVudHJ5LmNvbXBsZXRpb247XG5cbiAgICAgICAgaWYgKHJvb3RSZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgdGhyb3cgcm9vdFJlY29yZC5hcmc7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5ydmFsO1xuICAgICAgfSxcbiAgICAgIGRpc3BhdGNoRXhjZXB0aW9uOiBmdW5jdGlvbiAoZXhjZXB0aW9uKSB7XG4gICAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgICB0aHJvdyBleGNlcHRpb247XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG5cbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlKGxvYywgY2F1Z2h0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AgfVxuXG4gICAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYpIHtcbiAgICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgICAgdmFyIGhhc0ZpbmFsbHkgPSBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpO1xuXG4gICAgICAgICAgICBpZiAoaGFzQ2F0Y2ggJiYgaGFzRmluYWxseSkge1xuICAgICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgYWJydXB0OiBmdW5jdGlvbiAodHlwZSwgYXJnKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG5cbiAgICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJiBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmaW5hbGx5RW50cnkgJiYgKHR5cGUgPT09IFwiYnJlYWtcIiB8fCB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgICByZWNvcmQudHlwZSA9IHR5cGU7XG4gICAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgICAgfSxcbiAgICAgIGNvbXBsZXRlOiBmdW5jdGlvbiAocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIHRocm93IHJlY29yZC5hcmc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwiYnJlYWtcIiB8fCByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gcmVjb3JkLmFyZztcbiAgICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgICB0aGlzLm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gXCJlbmRcIjtcbiAgICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9LFxuICAgICAgZmluaXNoOiBmdW5jdGlvbiAoZmluYWxseUxvYykge1xuICAgICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuXG4gICAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgIHRoaXMuY29tcGxldGUoZW50cnkuY29tcGxldGlvbiwgZW50cnkuYWZ0ZXJMb2MpO1xuICAgICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBcImNhdGNoXCI6IGZ1bmN0aW9uICh0cnlMb2MpIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcblxuICAgICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgICAgdmFyIHJlY29yZCA9IGVudHJ5LmNvbXBsZXRpb247XG5cbiAgICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICAgIHZhciB0aHJvd24gPSByZWNvcmQuYXJnO1xuICAgICAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRocm93bjtcbiAgICAgICAgICB9XG4gICAgICAgIH0gLy8gVGhlIGNvbnRleHQuY2F0Y2ggbWV0aG9kIG11c3Qgb25seSBiZSBjYWxsZWQgd2l0aCBhIGxvY2F0aW9uXG4gICAgICAgIC8vIGFyZ3VtZW50IHRoYXQgY29ycmVzcG9uZHMgdG8gYSBrbm93biBjYXRjaCBibG9jay5cblxuXG4gICAgICAgIHRocm93IG5ldyBFcnJ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IChlbGVtZW50KSB7XG4gICAgICAgICAgcnVuKGVsZW1lbnQpO1xuICAgICAgICAgIGVsZW1lbnQgPSBlbGVtZW50LnBhcmVudDtcbiAgICAgICAgfVxuICAgICAgfSk7IC8vIGRvbmUgcnVubmluZywgY2xlYXJcblxuICAgICAgdGhpcy5ldmVudHMgPSBbXTtcbiAgICAgIHRoaXMuZXZlbnRFbGVtZW50cyA9IFtdO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJjaGVja1BhdGhcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gY2hlY2tQYXRoKGVsZW1lbnQsIGN0eCkge1xuICAgICAgaWYgKCF0aGlzLndvcmtpbmcgfHwgIWN0eCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciBldmVudHMgPSB0aGlzLmV2ZW50cyxcbiAgICAgICAgICBldmVudEVsZW1lbnRzID0gdGhpcy5ldmVudEVsZW1lbnRzO1xuICAgICAgZXZlbnRzLmZvckVhY2goZnVuY3Rpb24gKF9yZWYyLCBpKSB7XG4gICAgICAgIHZhciB4ID0gX3JlZjIueCxcbiAgICAgICAgICAgIHkgPSBfcmVmMi55O1xuXG4gICAgICAgIGlmICghZXZlbnRFbGVtZW50c1tpXSAmJiBjdHguaXNQb2ludEluUGF0aCAmJiBjdHguaXNQb2ludEluUGF0aCh4LCB5KSkge1xuICAgICAgICAgIGV2ZW50RWxlbWVudHNbaV0gPSBlbGVtZW50O1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiY2hlY2tCb3VuZGluZ0JveFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBjaGVja0JvdW5kaW5nQm94KGVsZW1lbnQsIGJvdW5kaW5nQm94KSB7XG4gICAgICBpZiAoIXRoaXMud29ya2luZyB8fCAhYm91bmRpbmdCb3gpIHtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICB2YXIgZXZlbnR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7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBwb2ludDtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwib25DbGlja1wiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBvbkNsaWNrKGV2dCkge1xuICAgICAgdmFyIF90aGlzJG1hcFhZID0gdGhpcy5tYXBYWSgoZXZ0IHx8IGV2ZW50KS5jbGllbnRYLCAoZXZ0IHx8IGV2ZW50KS5jbGllbnRZKSxcbiAgICAgICAgICB4ID0gX3RoaXMkbWFwWFkueCxcbiAgICAgICAgICB5ID0gX3RoaXMkbWFwWFkueTtcblxuICAgICAgdGhpcy5ldmVudHMucHVzaCh7XG4gICAgICAgIHR5cGU6ICdvbmNsaWNrJyxcbiAgICAgICAgeDogeCxcbiAgICAgICAgeTogeSxcbiAgICAgICAgcnVuOiBmdW5jdGlvbiBydW4oZXZlbnQpIHtcbiAgICAgICAgICBpZiAoZXZlbnQub25DbGljaykge1xuICAgICAgICAgICAgZXZlbnQub25DbGljaygpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcIm9uTW91c2VNb3ZlXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIG9uTW91c2VNb3ZlKGV2dCkge1xuICAgICAgdmFyIF90aGlzJG1hcFhZMiA9IHRoaXMubWFwWFkoKGV2dCB8fCBldmVudCkuY2xpZW50WCwgKGV2dCB8fCBldmVudCkuY2xpZW50WSksXG4gICAgICAgICAgeCA9IF90aGlzJG1hcFhZMi54LFxuICAgICAgICAgIHkgPSBfdGhpcyRtYXBYWTIueTtcblxuICAgICAgdGhpcy5ldmVudHMucHVzaCh7XG4gICAgICAgIHR5cGU6ICdvbm1vdXNlbW92ZScsXG4gICAgICAgIHg6IHgsXG4gICAgICAgIHk6IHksXG4gICAgICAgIHJ1bjogZnVuY3Rpb24gcnVuKGV2ZW50KSB7XG4gICAgICAgICAgaWYgKGV2ZW50Lm9uT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HtcbiAgICAgICAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAyO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LmFicnVwdChcInJldHVyblwiLCB0aGlzLnBhcnNlRnJvbVN0cmluZyhyZXNvdXJjZSkpO1xuXG4gICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIHRoaXMubG9hZChyZXNvdXJjZSkpO1xuXG4gICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBfY2FsbGVlLCB0aGlzKTtcbiAgICAgIH0pKTtcblxuICAgICAgZnVuY3Rpb24gcGFyc2UoX3gpIHtcbiAgICAgICAgcmV0dXJuIF9wYXJzZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gcGFyc2U7XG4gICAgfSgpXG4gIH0sIHtcbiAgICBrZXk6IFwicGFyc2VGcm9tU3RyaW5nXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHBhcnNlRnJvbVN0cmluZyh4bWwpIHtcbiAgICAgIHZhciBwYXJzZXIgPSBuZXcgdGhpcy5ET01QYXJzZXIoKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY2hlY2tEb2N1bWVudChwYXJzZXIucGFyc2VGcm9tU3RyaW5nKHhtbCwgJ2ltYWdlL3N2Zyt4bWwnKSk7XG4gICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY2hlY2tEb2N1bWVudChwYXJzZXIucGFyc2VGcm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3NTcGFjZXMoZm9udCkudHJpbSgpLnNwbGl0KCcgJyk7XG4gICAgICB2YXIgc2V0ID0ge1xuICAgICAgICBmb250U2l6ZTogZmFsc2UsXG4gICAgICAgIGZvbnRTdHlsZTogZmFsc2UsXG4gICAgICAgIGZvbnRXZWlnaHQ6IGZhbHNlLFxuICAgICAgICBmb250VmFyaWFudDogZmFsc2VcbiAgICAgIH07XG4gICAgICBwYXJ0cy5mb3JFYWNoKGZ1bmN0aW9uIChwYXJ0KSB7XG4gICAgICAgIHN3aXRjaCAodHJ1ZSkge1xuICAgICAgICAgIGNhc2UgIXNldC5mb250U3R5bGUgJiYgRm9udC5zdHlsZXMuaW5jbHVkZXMocGFydCk6XG4gICAgICAgICAgICBpZiAocGFydCAhPT0gJ2luaGVyaXQnKSB7XG4gICAgICAgICAgICAgIGZvbnRTdHlsZSA9IHBhcnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNldC5mb250U3R5bGUgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICFzZXQuZm9udFZhcmlhbnQgJiYgRm9udC52YXJpYW50cy5pbmNsdWRlcyhwYXJ0KTpcbiAgICAgICAgICAgIGlmIChwYXJ0ICE9PSAnaW5oZXJpdCcpIHtcbiAgICAgICAgICAgICAgZm9udFZhcmlhbnQgPSBwYXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzZXQuZm9udFN0eWxlID0gdHJ1ZTtcbiAgICAgICAgICAgIHNldC5mb250VmFyaWFudCA9IHRydWU7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgIXNldC5mb250V2VpZ2h0ICYmIEZvbnQud2VpZ2h0cy5pbmNsdWRlcyhwYXJ0KTpcbiAgICAgICAgICAgIGlmIChwYXJ0ICE9PSAnaW5oZXJpdCcpIHtcbiAgICAgICAgICAgICAgZm9udFdlaWdodCA9IHBhcnQ7XG4gICAgICAgICAgICB9XG5cbi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wgW3tcbiAgICBrZXk6IFwiYWRkUG9pbnRcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gYWRkUG9pbnQoeCwgeSkge1xuICAgICAgaWYgKHR5cGVvZiB4ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICBpZiAoaXNOYU4odGhpcy54MSkgfHwgaXNOYU4odGhpcy54MikpIHtcbiAgICAgICAgICB0aGlzLngxID0geDtcbiAgICAgICAgICB0aGlzLngyID0geDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh4IDwgdGhpcy54MSkge1xuICAgICAgICAgIHRoaXMueDEgPSB4O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHggPiB0aGlzLngyKSB7XG4gICAgICAgICAgdGhpcy54MiA9IHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKHR5cGVvZiB5ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICBpZiAoaXNOYU4odGhpcy55MSkgfHwgaXNOYU4odGhpcy55MikpIHtcbiAgICAgICAgICB0aGlzLnkxID0geTtcbiAgICAgICAgICB0aGlzLnkyID0geTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh5IDwgdGhpcy55MSkge1xuICAgICAgICAgIHRoaXMueTEgPSB5O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHkgPiB0aGlzLnkyKSB7XG4gICAgICAgICAgdGhpcy55MiA9IHk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiYWRkWFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRYKHgpIHtcbiAgICAgIHRoaXMuYWRkUG9pbnQoeCwgbnVsbCk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImFkZFlcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gYWRkWSh5KSB7XG4gICAgICB0aGlzLmFkZFBvaW50KG51bGwsIHkpO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJhZGRCb3VuZGluZ0JveFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRCb3VuZGluZ0JveChib3VuZGluZ0JveCkge1xuICAgICAgaWYgKCFib3VuZGluZ0JveCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciB4MSA9IGJvdW5kaW5nQm94LngxLFxuICAgICAgICAgIHkxID0gYm91bmRpbmdCb3gueTEsXG4gICAgICAgICAgeDIgPSBib3VuZGluZ0JveC54MixcbiAgICAgICAgICB5MiA9IGJvdW5kaW5nQm94LnkyO1xuICAgICAgdGhpcy5hZGRQb2ludCh4MSwgeTEpO1xuICAgICAgdGhpcy5hZGRQb2ludCh4MiwgeTIpO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJzdW1DdWJpY1wiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBzdW1DdWJpYyh0LCBwMCwgcDEsIHAyLCBwMykge1xuICAgICAgcmV0dXJuIE1hdGgucG93KDEgLSB0LCAzKSAqIHAwICsgMyAqIE1hdGgucG93KDEgLSB0LCAyKSAqIHQgKiBwMSArIDMgKiAoMSAtIHQpICogTWF0aC5wb3codCwgMikgKiBwMiArIE1hdGgucG93KHQsIDMpICogcDM7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImJlemllckN1cnZlQWRkXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIGJlemllckN1cnZlQWRkKGZvclgsIHAwLCBwMSwgcDIsIHAzKSB7XG4gICAgICB2YXIgYiA9IDYgKiBwMCAtIDEyICogcDEgKyA2ICogcDI7XG4gICAgICB2YXIgYSA9IC0zICogcDAgKyA5ICogcDEgLSA5ICogcDIgKyAzICogcDM7XG4gICAgICB2YXIgYyA9IDMgKiBwMSAtIDMgKiBwMDtcblxuICAgICAgaWYgKGEgPT09IDApIHtcbiAgICAgICAgaWYgKGIgPT09IDApIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdCA9IC1jIC8gYjtcblxuICAgICAgICBpZiAoMCA8IHQgJiYgdCA8IDEpIHtcbiAgICAgICAgICBpZiAoZm9yWCkge1xuICAgICAgICAgICAgdGhpcy5hZGRYKHRoaXMuc3VtQ3ViaWModCwgcDAsIHAxLCBwMiwgcDMpKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5hZGRZKHRoaXMuc3VtQ3ViaWModCwgcDAsIHAxLCBwMiwgcDMpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciBiMmFjID0gTWF0aC5wb3coYiwgMikgLSA0ICogYyAqIGE7XG5cbiAgICAgIGlmIChiMmFjIDwgMCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciB0MSA9ICgtYiArIE1hdGguc3FydChiMmFjKSkgLyAoMiAqIGEpO1xuXG4gICAgICBpZiAoMCA8IHQxICYmIHQxIDwgMSkge1xuICAgICAgICBpZiAoZm9yWCkge1xuICAgICAgICAgIHRoaXMuYWRkWCh0aGlzLnN1bUN1YmljKHQxLCBwMCwgcDEsIHAyLCBwMykpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRoaXMuYWRkWSh0aGlzLnN1bUN1YmljKHQxLCBwMCwgcDEsIHAyLCBwMykpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHZhciB0MiA9ICgtYiAtIE1hdGguc3FydChiMmFjKSkgLyAoMiAqIGEpO1xuXG4gICAgICBpZiAoMCA8IHQyICYmIHQyIDwgMSkge1xuICAgICAgICBpZiAoZm9yWCkge1xuICAgICAgICAgIHRoaXMuYWRkWCh0aGlzLnN1bUN1YmljKHQyLCBwMCwgcDEsIHAyLCBwMykpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRoaXMuYWRkWSh0aGlzLnN1bUN1YmljKHQyLCBwMCwgcDEsIHAyLCBwM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bnQuZm9udFNpemUpO1xuICAgICAgICB2YXIgZm9udFN0eWxlID0gcGFyZW50LmdldFN0eWxlKCdmb250LXN0eWxlJykuZ2V0U3RyaW5nKGN0eEZvbnQuZm9udFN0eWxlKTtcbiAgICAgICAgdmFyIHNjYWxlID0gZm9udFNpemUgLyB1bml0c1BlckVtO1xuICAgICAgICB2YXIgdGV4dCA9IGN1c3RvbUZvbnQuaXNSVEwgPyByZW5kZXJUZXh0LnNwbGl0KCcnKS5yZXZlcnNlKCkuam9pbignJykgOiByZW5kZXJUZXh0O1xuICAgICAgICB2YXIgZHggPSB0b051bWJlcnMocGFyZW50LmdldEF0dHJpYnV0ZSgnZHgnKS5nZXRTdHJpbmcoKSk7XG4gICAgICAgIHZhciBsZW4gPSB0ZXh0Lmxlbmd0aDtcblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICAgICAgdmFyIGdseXBoID0gdGhpcy5nZXRHbHlwaChjdXN0b21Gb250LCB0ZXh0LCBpKTtcbiAgICAgICAgICBjdHgudHJhbnNsYXRlKHRoaXMueCwgdGhpcy55KTtcbiAgICAgICAgICBjdHguc2NhbGUoc2NhbGUsIC1zY2FsZSk7XG4gICAgICAgICAgdmFyIGx3ID0gY3R4LmxpbmVXaWR0aDtcbiAgICAgICAgICBjdHgubGluZVdpZHRoID0gY3R4LmxpbmVXaWR0aCAqIHVuaXRzUGVyRW0gLyBmb250U2l6ZTtcblxuICAgICAgICAgIGlmIChmb250U3R5bGUgPT09ICdpdGFsaWMnKSB7XG4gICAgICAgICAgICBjdHgudHJhbnNmb3JtKDEsIDAsIC40LCAxLCAwLCAwKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBnbHlwaC5yZW5kZXIoY3R4KTtcblxuICAgICAgICAgIGlmIChmb250U3R5bGUgPT09ICdpdGFsaWMnKSB7XG4gICAgICAgICAgICBjdHgudHJhbnNmb3JtKDEsIDAsIC0uNCwgMSwgMCwgMCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY3R4LmxpbmVXaWR0aCA9IGx3O1xuICAgICAgICAgIGN0eC5zY2FsZSgxIC8gc2NhbGUsIC0xIC8gc2NhbGUpO1xuICAgICAgICAgIGN0eC50cmFuc2xhdGUoLXRoaXMueCwgLXRoaXMueSk7XG4gICAgICAgICAgdGhpcy54ICs9IGZvbnRTaXplICogKGdseXBoLmhvcml6QWR2WCB8fCBjdXN0b21Gb250Lmhvcml6QWR2WCkgLyB1bml0c1BlckVtO1xuXG4gICAgICAgICAgaWYgKHR5cGVvZiBkeFtpXSAhPT0gJ3VuZGVmaW5lZCcgJiYgIWlzTmFOKGR4W2ldKSkge1xuICAgICAgICAgICAgdGhpcy54ICs9IGR4W2ldO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgdmFyIHggPSB0aGlzLngsXG4gICAgICAgICAgeSA9IHRoaXMueTtcblxuICAgICAgaWYgKGN0eC5wYWludE9yZGVyID09PSAnc3Ryb2tlJykge1xuICAgICAgICBpZiAoY3R4LnN0cm9rZVN0eWxlKSB7XG4gICAgICAgICAgY3R4LnN0cm9rZVRleHQocmVuZGVyVGV4dCwgeCwgeSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY3R4LmZpbGxTdHlsZSkge1xuICAgICAgICAgIGN0eC5maWxsVGV4dChyZW5kZXJUZXh0LCB4LCB5KTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKGN0eC5maWxsU3R5bGUpIHtcbiAgICAgICAgICBjdHguZmlsbFRleHQocmVuZGVyVGV4dCwgeCwgeSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY3R4LnN0cm9rZVN0eWxlKSB7XG4gICAgICAgICAgY3R4LnN0cm9rZVRleHQocmVuZGVyVGV4dCwgeCwgeSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbi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tJzpcbiAgICAgICAgICAgIHRoaXMucGF0aE0oY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0wnOlxuICAgICAgICAgIGNhc2UgJ2wnOlxuICAgICAgICAgICAgdGhpcy5wYXRoTChjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnSCc6XG4gICAgICAgICAgY2FzZSAnaCc6XG4gICAgICAgICAgICB0aGlzLnBhdGhIKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdWJzpcbiAgICAgICAgICBjYXNlICd2JzpcbiAgICAgICAgICAgIHRoaXMucGF0aFYoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0MnOlxuICAgICAgICAgIGNhc2UgJ2MnOlxuICAgICAgICAgICAgdGhpcy5wYXRoQyhjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnUyc6XG4gICAgICAgICAgY2FzZSAncyc6XG4gICAgICAgICAgICB0aGlzLnBhdGhTKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdRJzpcbiAgICAgICAgICBjYXNlICdxJzpcbiAgICAgICAgICAgIHRoaXMucGF0aFEoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1QnOlxuICAgICAgICAgIGNhc2UgJ3QnOlxuICAgICAgICAgICAgdGhpcy5wYXRoVChjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnQSc6XG4gICAgICAgICAgY2FzZSAnYSc6XG4gICAgICA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iksXG4gICAgICAgICAgICAgIHBvaW50ID0gX21hcmtlcnMkWzBdLFxuICAgICAgICAgICAgICBhbmdsZSA9IF9tYXJrZXJzJFsxXTtcblxuICAgICAgICAgIG1hcmtlci5yZW5kZXIoY3R4LCBwb2ludCwgYW5nbGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hcmtlck1pZFN0eWxlUHJvcC5pc1VybERlZmluaXRpb24oKSkge1xuICAgICAgICAgIHZhciBfbWFya2VyID0gbWFya2VyTWlkU3R5bGVQcm9wLmdldERlZmluaXRpb24oKTtcblxuICAgICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgbWFya2Vyc0xhc3RJbmRleDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgX21hcmtlcnMkaSA9IF9zbGljZWRUb0FycmF5KG1hcmtlcnNbaV0sIDIpLFxuICAgICAgICAgICAgICAgIF9wb2ludCA9IF9tYXJrZXJzJGlbMF0sXG4gICAgICAgICAgICAgICAgX2FuZ2xlID0gX21hcmtlcnMkaVsxXTtcblxuICAgICAgICAgICAgX21hcmtlci5yZW5kZXIoY3R4LCBfcG9pbnQsIF9hbmdsZSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hcmtlckVuZFN0eWxlUHJvcC5pc1VybERlZmluaXRpb24oKSkge1xuICAgICAgICAgIHZhciBfbWFya2VyMiA9IG1hcmtlckVuZFN0eWxlUHJvcC5nZXREZWZpbml0aW9uKCk7XG5cbiAgICAgICAgICB2YXIgX21hcmtlcnMkbWFya2Vyc0xhc3RJID0gX3NsaWNlZFRvQXJyYXkobWFya2Vyc1ttYXJrZXJzTGFzdEluZGV4XSwgMiksXG4gICAgICAgICAgICAgIF9wb2ludDIgPSBfbWFya2VycyRtYXJrZXJzTGFzdElbMF0sXG4gICAgICAgICAgICAgIF9hbmdsZTIgPSBfbWFya2VycyRtYXJrZXJzTGFzdElbMV07XG5cbiAgICAgICAgICBfbWFya2VyMi5yZW5k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uICAgICAgICBib3VuZGluZ0JveC5hZGRQb2ludChwb2ludC54LCBwb2ludC55KTtcblxuICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgY3R4LmxpbmVUbyhwb2ludC54LCBwb2ludC55KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJwYXRoVlwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBwYXRoVihjdHgsIGJvdW5kaW5nQm94KSB7XG4gICAgICB2YXIgcGF0aFBhcnNlciA9IHRoaXMucGF0aFBhcnNlcjtcblxuICAgICAgd2hpbGUgKCFwYXRoUGFyc2VyLmlzQ29tbWFuZE9yRW5kKCkpIHtcbiAgICAgICAgdmFyIGN1cnJlbnQgPSBwYXRoUGFyc2VyLmN1cnJlbnQ7XG4gICAgICAgIHZhciBwb2ludCA9IG5ldyBQb2ludChjdXJyZW50LngsIChwYXRoUGFyc2VyLmlzUmVsYXRpdmVDb21tYW5kKCkgPyBjdXJyZW50LnkgOiAwKSArIHBhdGhQYXJzZXIuZ2V0U2NhbGFyKCkpO1xuICAgICAgICBwYXRoUGFyc2VyLmFkZE1hcmtlcihwb2ludCwgY3VycmVudCk7XG4gICAgICAgIHBhdGhQYXJzZXIuY3VycmVudCA9IHBvaW50O1xuICAgICAgICBib3VuZGluZ0JveC5hZGRQb2ludChwb2ludC54LCBwb2ludC55KTtcblxuICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgY3R4LmxpbmVUbyhwb2ludC54LCBwb2ludC55KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJwYXRoQ1wiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBwYXRoQyhjdHgsIGJvdW5kaW5nQm94KSB7XG4gICAgICB2YXIgcGF0aFBhcnNlciA9IHRoaXMucGF0aFBhcnNlcjtcblxuICAgICAgd2hpbGUgKCFwYXRoUGFyc2VyLmlzQ29tbWFuZE9yRW5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1wbG5vdGUuaHRtbCNBcmNJbXBsZW1lbnRhdGlvbk5vdGVzXG4gICAgICAgIC8vIHgxJywgeTEnXG5cbiAgICAgICAgdmFyIGN1cnJwID0gbmV3IFBvaW50KE1hdGguY29zKHhBeGlzUm90YXRpb24pICogKGN1cnJlbnQueCAtIGN1cnJlbnRQb2ludC54KSAvIDIuMCArIE1hdGguc2luKHhBeGlzUm90YXRpb24pICogKGN1cnJlbnQueSAtIGN1cnJlbnRQb2ludC55KSAvIDIuMCwgLU1hdGguc2luKHhBeGlzUm90YXRpb24pICogKGN1cnJlbnQueCAtIGN1cnJlbnRQb2ludC54KSAvIDIuMCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogKGN1cnJlbnQueSAtIGN1cnJlbnRQb2ludC55KSAvIDIuMCk7IC8vIGFkanVzdCByYWRpaVxuXG4gICAgICAgIHZhciBsID0gTWF0aC5wb3coY3VycnAueCwgMikgLyBNYXRoLnBvdyhyeCwgMikgKyBNYXRoLnBvdyhjdXJycC55LCAyKSAvIE1hdGgucG93KHJ5LCAyKTtcblxuICAgICAgICBpZiAobCA+IDEpIHtcbiAgICAgICAgICByeCAqPSBNYXRoLnNxcnQobCk7XG4gICAgICAgICAgcnkgKj0gTWF0aC5zcXJ0KGwpO1xuICAgICAgICB9IC8vIGN4JywgY3knXG5cblxuICAgICAgICB2YXIgcyA9IChsYXJnZUFyY0ZsYWcgPT09IHN3ZWVwRmxhZyA/IC0xIDogMSkgKiBNYXRoLnNxcnQoKE1hdGgucG93KHJ4LCAyKSAqIE1hdGgucG93KHJ5LCAyKSAtIE1hdGgucG93KHJ4LCAyKSAqIE1hdGgucG93KGN1cnJwLnksIDIpIC0gTWF0aC5wb3cocnksIDIpICogTWF0aC5wb3coY3VycnAueCwgMikpIC8gKE1hdGgucG93KHJ4LCAyKSAqIE1hdGgucG93KGN1cnJwLnksIDIpICsgTWF0aC5wb3cocnksIDIpICogTWF0aC5wb3coY3VycnAueCwgMikpKTtcblxuICAgICAgIC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kKF90aGlzKSxcbiAgICAgICAgY2hpbGRyZW4gPSBfYXNzZXJ0VGhpc0luaXRpYWxpemUuY2hpbGRyZW47XG5cbiAgICB2YXIgX2l0ZXJhdG9yID0gX2NyZWF0ZUZvck9mSXRlcmF0b3JIZWxwZXIoY2hpbGRyZW4pLFxuICAgICAgICBfc3RlcDtcblxuICAgIHRyeSB7XG4gICAgICBmb3IgKF9pdGVyYXRvci5zKCk7ICEoX3N0ZXAgPSBfaXRlcmF0b3IubigpKS5kb25lOykge1xuICAgICAgICB2YXIgY2hpbGQgPSBfc3RlcC52YWx1ZTtcblxuICAgICAgICBzd2l0Y2ggKGNoaWxkLnR5cGUpIHtcbiAgICAgICAgICBjYXNlICdmb250LWZhY2UnOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBfdGhpcy5mb250RmFjZSA9IGNoaWxkO1xuICAgICAgICAgICAgICB2YXIgZm9udEZhbWlseVN0eWxlID0gY2hpbGQuZ2V0U3R5bGUoJ2ZvbnQtZmFtaWx5Jyk7XG5cbiAgICAgICAgICAgICAgaWYgKGZvbnRGYW1pbHlTdHlsZS5oYXNWYWx1ZSgpKSB7XG4gICAgICAgICAgICAgICAgZGVmaW5pdGlvbnNbZm9udEZhbWlseVN0eWxlLmdldFN0cmluZygpXSA9IF9hc3NlcnRUaGlzSW5pdGlhbGl6ZWQoX3RoaXMpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICdtaXNzaW5nLWdseXBoJzpcbiAgICAgICAgICAgIF90aGlzLm1pc3NpbmdHbHlwaCA9IGNoaWxkO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdnbHlwaCc6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBnbHlwaCA9IGNoaWxkO1xuXG4gICAgICAgICAgICAgIGlmIChnbHlwaC5hcmFiaWNGb3JtKSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuaXNSVEwgPSB0cnVlO1xuICAgICAgICAgICAgICAgIF90aGlzLmlzQXJhYmljID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgICAgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdID0ge307XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdW2dseXBoLmFyYWJpY0Zvcm1dID0gZ2x5cGg7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdID0gZ2x5cGg7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgIF9pdGVyYXRvci5lKGVycik7XG4gICAgfSBmaW5hbGx5IHtcbiAgICAgIF9pdGVyYXRvci5mKCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIF90aGlzO1xuICB9XG5cbiAgX2NyZWF0ZUNsYXNzKEZvbnRFbGVtZW50LCBbe1xuICAgIGtleTogXCJyZW5kZXJcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gcmVuZGVyKCkgey8vIE5PIFJFTkRFUlxuICAgIH1cbiAgfV0pO1xuXG4gIHJldHVybiBGb250RWxlbWVudDtcbn0oRWxlbWVudCk7XG5cbmZ1bmN0aW9uIF9jcmVhdGVTdXBlciRzKERlcml2ZWQpIHsgcmV0dXJuIGZ1bmN0aW9uICgpIHsgdmFyIFN1cGVyID0gX2dldFByb3RvdHlwZU9mKERlcml2ZWQpLCByZXN1b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GNoIChjb21tYW5kKSB7XG4gICAgICAgICAgY2FzZSAnTCc6XG4gICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgIGN0eC5saW5lVG8ocG9pbnRzWzBdLCBwb2ludHNbMV0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgICAgaWYgKGN0eCkge1xuICAgICAgICAgICAgICBjdHgubW92ZVRvKHBvaW50c1swXSwgcG9pbnRzWzFdKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdDJzpcbiAgICAgICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICAgICAgY3R4LmJlemllckN1cnZlVG8ocG9pbnRzWzBdLCBwb2ludHNbMV0sIHBvaW50c1syXSwgcG9pbnRzWzNdLCBwb2ludHNbNF0sIHBvaW50c1s1XSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgIGN0eC5xdWFkcmF0aWNDdXJ2ZVRvKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnQSc6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBjeCA9IHBvaW50c1swXTtcbiAgICAgICAgICAgICAgdmFyIGN5ID0gcG9pbnRzWzFdO1xuICAgICAgICAgICAgICB2YXIgcnggPSBwb2ludHNbMl07XG4gICAgICAgICAgICAgIHZhciByeSA9IHBvaW50c1szXTtcbiAgICAgICAgICAgICAgdmFyIHRoZXRhID0gcG9pbnRzWzRdO1xuICAgICAgICAgICAgICB2YXIgZFRoZXRhID0gcG9pbnRzWzVdO1xuICAgICAgICAgICAgICB2YXIgcHNpID0gcG9pbnRzWzZdO1xuICAgICAgICAgICAgICB2YXIgZnMgPSBwb2ludHNbN107XG4gICAgICAgICAgICAgIHZhciByID0gcnggPiByeSA/IHJ4IDogcnk7XG4gICAgICAgICAgICAgIHZhciBzY2FsZVggPSByeCA+IHJ5ID8gMSA6IHJ4IC8gcnk7XG4gICAgICAgICAgICAgIHZhciBzY2FsZVkgPSByeCA+IHJ5ID8gcnkgLyByeCA6IDE7XG5cbiAgICAgICAgICAgICAgaWYgKGN0eCkge1xuICAgICAgICAgICAgICAgIGN0eC50cmFuc2xhdGUoY3gsIGN5KTtcbiAgICAgICAgICAgICAgICBjdHgucm90YXRlKHBzaSk7XG4gICAgICAgICAgICAgICAgY3R4LnNjYWxlKHNjYWxlWCwgc2NhbGVZKTtcbiAgICAgICAgICAgICAgICBjdHguYXJjKDAsIDAsIHIsIHRoZXRhLCB0aGV0YSArIGRUaGV0YSwgQm9vbGVhbigxIC0gZnMpKTtcbiAgICAgICAgICAgICAgICBjdHguc2NhbGUoMSAvIHNjYWxlWCwgMSAvIHNjYWxlWSk7XG4gICAgICAgICAgICAgICAgY3R4LnJvdGF0ZSgtcHNpKTtcbiAgICAgICAgICAgICAgICBjdHgudHJhbnNsYXRlKC1jeCwgLWN5KTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgY2FzZSAneic6XG4gICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgIGN0eC5jbG9zZVBhdGgoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJyZW5kZXJDaGlsZHJlblwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiByZW5kZXJDaGlsZHJlbihjdHgpIHtcbiAgICAgIHRoaXMuc2V0VGV4dERhdGEoY3R4KTtcbiAgICAgIGN0eC5zYXZlKCk7XG4gICAgICB2YXIgdGV4dERlY29yYXRpb24gPSB0aGlzLnBhcmVudC5nZXRTdHlsZSgndGV4dC1kZWNvcmF0aW9uJykuZ2V0U3RyaW5nKCk7XG4gICAgICB2YXIgZm9udFNpemUgPSB0aGlzLmdldEZvbnRTaXplKCk7XG4gICAgICB2YXIgZ2x5cGhJbmZvID0gdGhpcy5nbHlwaEluZm87XG4gICAgICB2YXIgZmlsbCA9IGN0eC5maWxsU3R5bGU7XG5cbiAgICAgIGlmICh0ZXh0RGVjb3JhdGlvbiA9PT0gJ3VuZGVybGluZScpIHtcbiAgICAgICAgY3R4LmJlZ2luUGF0aCgpO1xuICAgICAgfVxuXG4gICAgICBnbHlwaEluZm8uZm9yRWFjaChmdW5jdGlvbiAoZ2x5cGgsIGkpIHtcbiAgICAgICAgdmFyIHAwID0gZ2x5cGgucDAsXG4gICAgICAgICAgICBwMSA9IGdseXBoLnAxLFxuICAgICAgICAgICAgcGFydGlhbFRleHQgPSBnbHlwaC50ZXh0O1xuICAgICAgICBjdHguc2F2ZSgpO1xuICAgICAgICBjdHgudHJhbnNsYXRlKHAwLngsIHAwLnkpO1xuICAgICAgICBjdHgucm90YXRlKGdseXBoSW5mb1tpXS5yb3RhdGlvbik7XG5cbiAgICAgICAgaWYgKGN0eC5maWxsU3R5bGUpIHtcbiAgICAgICAgICBjdHguZmlsbFRleHQocGFydGlhbFRleHQsIDAsIDApO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGN0eC5zdHJva2VTdHlsZSkge1xuICAgICAgICAgIGN0eC5zdHJva2VUZXh0KHBhcnRpYWxUZXh0LCAwLCAwKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGN0eC5yZXN0b3JlKCk7XG5cbiAgICAgICAgaWYgKHRleHREZWNvcmF0aW9uID09PSAndW5kZXJsaW5lJykge1xuICAgICAgICAgIGlmIChpID09PSAwKSB7XG4gICA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xuICAgICAgICAgIGNhc2UgJ2wnOlxuICAgICAgICAgICAgY21kID0gdGhpcy5wYXRoTChwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdIJzpcbiAgICAgICAgICBjYXNlICdoJzpcbiAgICAgICAgICAgIGNtZCA9IHRoaXMucGF0aEgocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnVic6XG4gICAgICAgICAgY2FzZSAndic6XG4gICAgICAgICAgICBjbWQgPSB0aGlzLnBhdGhWKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0MnOlxuICAgICAgICAgIGNhc2UgJ2MnOlxuICAgICAgICAgICAgdGhpcy5wYXRoQyhwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdTJzpcbiAgICAgICAgICBjYXNlICdzJzpcbiAgICAgICAgICAgIGNtZCA9IHRoaXMucGF0aFMocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgY2FzZSAncSc6XG4gICAgICAgICAgICB0aGlzLnBhdGhRKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1QnOlxuICAgICAgICAgIGNhc2UgJ3QnOlxuICAgICAgICAgICAgY21kID0gdGhpcy5wYXRoVChwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdBJzpcbiAgICAgICAgICBjYXNlICdhJzpcbiAgICAgICAgICAgIHBvaW50cyA9IHRoaXMucGF0aEEocGF0aFBhcnNlcik7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1onOlxuICAgICAgICAgIGNhc2UgJ3onOlxuICAgICAgICAgICAgcGF0aFBhcnNlci5jdXJyZW50ID0gcGF0aFBhcnNlci5zdGFydDtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHVwcGVyQ29tbWFuZCAhPT0gJ1onKSB7XG4gICAgICAgICAgcGF0aENvbW1hbmRzLnB1c2goe1xuICAgICAgICAgICAgY29tbWFuZDogY21kIHx8IHVwcGVyQ29tbWFuZCxcbiAgICAgICAgICAgIHBvaW50czogcG9pbnRzLFxuICAgICAgICAgICAgc3RhcnQ6IHtcbiAgICAgICAgICAgICAgeDogc3RhcnRYLFxuICAgICAgICAgICAgICB5OiBzdGFydFlcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBwYXRoTGVuZ3RoOiB0aGlzLmNhbGNMZW5ndGgoc3RhcnRYLCBzdGFydFksIGNtZCB8fCB1cHBlckNvbW1hbmQsIHBvaW50cylcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBwYXRoQ29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICBjb21tYW5kOiAneicsXG4gICAgICAgICAgICBwb2ludHM6IFtdLFxuICAgICAgICAgICAgcGF0aExlbmd0aDogMFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBwYXRoQ29tbWFuZHM7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcInBhdGhNXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHBhdGhNKHBhdGhQYXJzZXIsIHBvaW50cykge1xuICAgICAgdmFyIHAgPSBwYXRoUGFyc2VyLmdldEFzQ3VycmVudFBvaW50KCk7IC8vIHBhdGhQYXJzZXIuYWRkTWFya2VyKHApO1xuXG4gICAgICBwb2ludHMucHVzaChwLngsIHAueSk7XG4gICAgICBwYXRo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b3coY3VycnAueSwgMikgLSBNYXRoLnBvdyhyeSwgMikgKiBNYXRoLnBvdyhjdXJycC54LCAyKSkgLyAoTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3coY3VycnAueSwgMikgKyBNYXRoLnBvdyhyeSwgMikgKiBNYXRoLnBvdyhjdXJycC54LCAyKSkpO1xuXG4gICAgICAgIGlmIChpc05hTihzKSkge1xuICAgICAgICAgIHMgPSAwO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGNwcCA9IG5ldyBQb2ludChzICogcnggKiBjdXJycC55IC8gcnksIHMgKiAtcnkgKiBjdXJycC54IC8gcngpOyAvLyBjeCwgY3lcblxuICAgICAgICB2YXIgY2VudHAgPSBuZXcgUG9pbnQoKGN1cnJlbnQueCArIGN1cnJlbnRQb2ludC54KSAvIDIuMCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogY3BwLnggLSBNYXRoLnNpbih4QXhpc1JvdGF0aW9uKSAqIGNwcC55LCAoY3VycmVudC55ICsgY3VycmVudFBvaW50LnkpIC8gMi4wICsgTWF0aC5zaW4oeEF4aXNSb3RhdGlvbikgKiBjcHAueCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogY3BwLnkpOyAvLyBpbml0aWFsIGFuZ2xlXG5cbiAgICAgICAgdmFyIGExID0gdmVjdG9yc0FuZ2xlKFsxLCAwXSwgWyhjdXJycC54IC0gY3BwLngpIC8gcngsIChjdXJycC55IC0gY3BwLnkpIC8gcnldKTsgLy8gzrgxXG4gICAgICAgIC8vIGFuZ2xlIGRlbHRhXG5cbiAgICAgICAgdmFyIHUgPSBbKGN1cnJwLnggLSBjcHAueCkgLyByeCwgKGN1cnJwLnkgLSBjcHAueSkgLyByeV07XG4gICAgICAgIHZhciB2ID0gWygtY3VycnAueCAtIGNwcC54KSAvIHJ4LCAoLWN1cnJwLnkgLSBjcHAueSkgLyByeV07XG4gICAgICAgIHZhciBhZCA9IHZlY3RvcnNBbmdsZSh1LCB2KTsgLy8gzpTOuFxuXG4gICAgICAgIGlmICh2ZWN0b3JzUmF0aW8odSwgdikgPD0gLTEpIHtcbiAgICAgICAgICBhZCA9IE1hdGguUEk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodmVjdG9yc1JhdGlvKHUsIHYpID49IDEpIHtcbiAgICAgICAgICBhZCA9IDA7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc3dlZXBGbGFnID09PSAwICYmIGFkID4gMCkge1xuICAgICAgICAgIGFkID0gYWQgLSAyICogTWF0aC5QSTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChzd2VlcEZsYWcgPT09IDEgJiYgYWQgPCAwKSB7XG4gICAgICAgICAgYWQgPSBhZCArIDIgKiBNYXRoLlBJO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIFtjZW50cC54LCBjZW50cC55LCByeCwgcnksIGExLCBhZCwgeEF4aXNSb3RhdGlvbiwgc3dlZXBGbGFnXTtcbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiY2FsY0xlbmd0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBjYWxjTGVuZ3RoKHgsIHksIGNtZCwgcG9pbnRzKSB7XG4gICAgICB2YXIgbGVuID0gMDtcbiAgICAgIHZhciBwMSA9IG51bGw7XG4gICAgICB2YXIgcDIgPSBudWxsO1xuICAgICAgdmFyIHQgPSAwO1xuXG4gICAgICBzd2l0Y2ggKGNtZCkge1xuICAgICAgICBjYXNlICdMJzpcbiAgICAgICAgICByZXR1cm4gdGhpcy5nZXRMaW5lTGVuZ3RoKHgsIHksIHBvaW50c1swXSwgcG9pbnRzWzFdKTtcblxuICAgICAgICBjYXNlICdDJzpcbiAgICAgICAgICAvLyBBcHByb3hpbWF0ZXMgYnkgYnJlYWtpbmcgY3VydmUgaW50byAxMDAgbGluZSBzZWdtZW50c1xuICAgICAgICAgIGxlbiA9IDAuMDtcbiAgICAgICAgICBwMSA9IHRoaXMuZ2V0UG9pbn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LCBwb2ludHNbMl0sIHBvaW50c1szXSwgdCwgMCk7XG4gICAgICAgICAgICAgIGxlbiArPSB0aGlzLmdldExpbmVMZW5ndGgocDEueCwgcDEueSwgcDIueCwgcDIueSk7XG4gICAgICAgICAgICAgIHAxID0gcDI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vIGNvdW50ZXItY2xvY2t3aXNlXG4gICAgICAgICAgICBmb3IgKHQgPSBzdGFydCArIGluYzsgdCA8IGVuZDsgdCArPSBpbmMpIHtcbiAgICAgICAgICAgICAgcDIgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSwgdCwgMCk7XG4gICAgICAgICAgICAgIGxlbiArPSB0aGlzLmdldExpbmVMZW5ndGgocDEueCwgcDEueSwgcDIueCwgcDIueSk7XG4gICAgICAgICAgICAgIHAxID0gcDI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcDIgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSwgZW5kLCAwKTtcbiAgICAgICAgICBsZW4gKz0gdGhpcy5nZXRMaW5lTGVuZ3RoKHAxLngsIHAxLnksIHAyLngsIHAyLnkpO1xuICAgICAgICAgIHJldHVybiBsZW47XG4gICAgICB9XG5cbiAgICAgIHJldHVybiAwO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJnZXRQb2ludE9uTGluZVwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRQb2ludE9uTGluZShkaXN0LCBQMXgsIFAxeSwgUDJ4LCBQMnkpIHtcbiAgICAgIHZhciBmcm9tWCA9IGFyZ3VtZW50cy5sZW5ndGggPiA1ICYmIGFyZ3VtZW50c1s1XSAhPT0gdW5kZWZpbmVkID8gYXJndW1lbnRzWzVdIDogUDF4O1xuICAgICAgdmFyIGZyb21ZID0gYXJndW1lbnRzLmxlbmd0aCA+IDYgJiYgYXJndW1lbnRzWzZdICE9PSB1bmRlZmluZWQgPyBhcmd1bWVudHNbNl0gOiBQMXk7XG4gICAgICB2YXIgbSA9IChQMnkgLSBQMXkpIC8gKFAyeCAtIFAxeCArIFBTRVVET19aRVJPKTtcbiAgICAgIHZhciBydW4gPSBNYXRoLnNxcnQoZGlzdCAqIGRpc3QgLyAoMSArIG0gKiBtKSk7XG5cbiAgICAgIGlmIChQMnggPCBQMXgpIHtcbiAgICAgICAgcnVuICo9IC0xO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmlzZSA9IG0gKiBydW47XG4gICAgICB2YXIgcHQgPSBudWxsO1xuXG4gICAgICBpZiAoUDJ4ID09PSBQMXgpIHtcbiAgICAgICAgLy8gdmVydGljYWwgbGluZVxuICAgICAgICBwdCA9IHtcbiAgICAgICAgICB4OiBmcm9tWCxcbiAgICAgICAgICB5OiBmcm9tWSArIHJpc2VcbiAgICAgICAgfTtcbiAgICAgIH0gZWxzZSBpZiAoKGZyb21ZIC0gUDF5KSAvIChmcm9tWCAtIFAxeCArIFBTRVVET19aRVJPKSA9PT0gbSkge1xuICAgICAgICBwdCA9IHtcbiAgICAgICAgICB4OiBmcm9tWCArIHJ1bixcbiAgICAgICAgICB5OiBmcm9tWSArIHJpc2VcbiAgICAgICAgfTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBpeCA9IDA7XG4gICAgICAgIHZhciBpeSA9IDA7XG4gICAgICAgIHZhciBsZW4gPSB0aGlzLmdldExpbmVMZW5ndGgoUDF4LCBQMXksIFAyeCwgUDJ5KTtcblxuICAgICAgICBpZiAobGVuIDwgUFNFVURPX1pFUk8pIHtcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciB1ID0gKGZyb21YIC0gUDF4KSAqIChQMnggLSB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biAgICAgICAgICAgICAgdmFyIGRUaGV0YSA9IHBhdGhDbWQucG9pbnRzWzVdOyAvLyA1ID0gZFRoZXRhXG5cbiAgICAgICAgICAgICAgdmFyIGVuZCA9IHBhdGhDbWQucG9pbnRzWzRdICsgZFRoZXRhO1xuICAgICAgICAgICAgICBjdXJyZW50VCA9IHN0YXJ0ICsgZGVsdGEgLyBwYXRoQ21kLnBhdGhMZW5ndGggKiBkVGhldGE7XG5cbiAgICAgICAgICAgICAgaWYgKGRUaGV0YSA8IDAgJiYgY3VycmVudFQgPCBlbmQgfHwgZFRoZXRhID49IDAgJiYgY3VycmVudFQgPiBlbmQpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHAgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBhdGhDbWQucG9pbnRzWzBdLCBwYXRoQ21kLnBvaW50c1sxXSwgcGF0aENtZC5wb2ludHNbMl0sIHBhdGhDbWQucG9pbnRzWzNdLCBjdXJyZW50VCwgcGF0aENtZC5wb2ludHNbNl0pO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnQyc6XG4gICAgICAgICAgICAgIGN1cnJlbnRUID0gZGVsdGEgLyBwYXRoQ21kLnBhdGhMZW5ndGg7XG5cbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnRUID4gMSkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRUID0gMTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHAgPSB0aGlzLmdldFBvaW50T25DdWJpY0JlemllcihjdXJyZW50VCwgcGF0aENtZC5zdGFydC54LCBwYXRoQ21kLnN0YXJ0LnksIHBhdGhDbWQucG9pbnRzWzBdLCBwYXRoQ21kLnBvaW50c1sxXSwgcGF0aENtZC5wb2ludHNbMl0sIHBhdGhDbWQucG9pbnRzWzNdLCBwYXRoQ21kLnBvaW50c1s0XSwgcGF0aENtZC5wb2ludHNbNV0pO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgICAgIGN1cnJlbnRUID0gZGVsdGEgLyBwYXRoQ21kLnBhdGhMZW5ndGg7XG5cbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnRUID4gMSkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRUID0gMTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHAgPSB0aGlzLmdldFBvaW50T25RdWFkcmF0aWNCZXppZXIoY3VycmVudFQsIHBhdGhDbWQuc3RhcnQueCwgcGF0aENtZC5zdGFydC55LCBwYXRoQ21kLnBvaW50c1swXSwgcGF0aENtZC5wb2ludHNbMV0sIHBhdGhDbWQucG9pbnRzWzJdLCBwYXRoQ21kLnBvaW50c1szXSk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChwKSB7XG4gICAgICAgICAgICByZXR1cm4gcDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIF9pdGVyYXRvci5lKGVycik7XG4gICAgICB9IGZpbmFsbHkge1xuICAgICAgICBfaXRlcmF0b3IuZigpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiZ2V0TGluZUxlbmd0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRMaW5lTGVuZ3RoKHgxLCB5MSwgeDIsIHkyKSB7XG4gICAgICByZXR1cm4gTWF0aC5zcXJ0KCh4MiAtIHgxKSAqICh4MiAtIHgxKSArICh5MiAtIHkxKSAqICh5MiAtIHkxKSk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImdldFBhdGhMZW5ndGhcIixc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hciBwcmVjaXNpb24gPSBpbnB1dFByZWNpc2lvbiB8fCAwLjI1OyAvLyBhY2N1cmFjeSB2cyBwZXJmb3JtYW5jZVxuXG4gICAgICB2YXIgc3RlcCA9IGlucHV0U3RlcCB8fCBmdWxsTGVuIC8gMTAwO1xuXG4gICAgICBpZiAoIXRoaXMuZXF1aWRpc3RhbnRDYWNoZSB8fCB0aGlzLmVxdWlkaXN0YW50Q2FjaGUuc3RlcCAhPT0gc3RlcCB8fCB0aGlzLmVxdWlkaXN0YW50Q2FjaGUucHJlY2lzaW9uICE9PSBwcmVjaXNpb24pIHtcbiAgICAgICAgLy8gUHJlcGFyZSBjYWNoZVxuICAgICAgICB0aGlzLmVxdWlkaXN0YW50Q2FjaGUgPSB7XG4gICAgICAgICAgc3RlcDogc3RlcCxcbiAgICAgICAgICBwcmVjaXNpb246IHByZWNpc2lvbixcbiAgICAgICAgICBwb2ludHM6IFtdXG4gICAgICAgIH07IC8vIENhbGN1bGF0ZSBwb2ludHNcblxuICAgICAgICB2YXIgcyA9IDA7XG5cbiAgICAgICAgZm9yICh2YXIgbCA9IDA7IGwgPD0gZnVsbExlbjsgbCArPSBwcmVjaXNpb24pIHtcbiAgICAgICAgICB2YXIgcDAgPSB0aGlzLmdldFBvaW50T25QYXRoKGwpO1xuICAgICAgICAgIHZhciBwMSA9IHRoaXMuZ2V0UG9pbnRPblBhdGgobCArIHByZWNpc2lvbik7XG5cbiAgICAgICAgICBpZiAoIXAwIHx8ICFwMSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcyArPSB0aGlzLmdldExpbmVMZW5ndGgocDAueCwgcDAueSwgcDEueCwgcDEueSk7XG5cbiAgICAgICAgICBpZiAocyA+PSBzdGVwKSB7XG4gICAgICAgICAgICB0aGlzLmVxdWlkaXN0YW50Q2FjaGUucG9pbnRzLnB1c2goe1xuICAgICAgICAgICAgICB4OiBwMC54LFxuICAgICAgICAgICAgICB5OiBwMC55LF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GNoIChfY29udGV4dC5wcmV2ID0gX2NvbnRleHQubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQucHJldiA9IDA7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDM7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZG9jdW1lbnQuY3JlYXRlSW1hZ2UoaHJlZik7XG5cbiAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgIGltYWdlID0gX2NvbnRleHQuc2VudDtcbiAgICAgICAgICAgICAgICB0aGlzLmltYWdlID0gaW1hZ2U7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDEwO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgICBfY29udGV4dC5wcmV2ID0gNztcbiAgICAgICAgICAgICAgICBfY29udGV4dC50MCA9IF9jb250ZXh0W1wiY2F0Y2hcIl0oMCk7XG4gICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOiBuby1jb25zb2xlXG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkVycm9yIHdoaWxlIGxvYWRpbmcgaW1hZ2UgXFxcIlwiLmNvbmNhdChocmVmLCBcIlxcXCI6XCIpLCBfY29udGV4dC50MCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICB0aGlzLmxvYWRlZCA9IHRydWU7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBfY2FsbGVlLCB0aGlzLCBbWzAsIDddXSk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIGxvYWRJbWFnZShfeCkge1xuICAgICAgICByZXR1cm4gX2xvYWRJbWFnZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbG9hZEltYWdlO1xuICAgIH0oKVxuICB9LCB7XG4gICAga2V5OiBcImxvYWRTdmdcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gKCkge1xuICAgICAgdmFyIF9sb2FkU3ZnID0gX2FzeW5jVG9HZW5lcmF0b3IoIC8qI19fUFVSRV9fKi9fcmVnZW5lcmF0b3JSdW50aW1lLm1hcmsoZnVuY3Rpb24gX2NhbGxlZTIoaHJlZikge1xuICAgICAgICB2YXIgcmVzcG9uc2UsIHN2ZztcbiAgICAgICAgcmV0dXJuIF9yZWdlbmVyYXRvclJ1bnRpbWUud3JhcChmdW5jdGlvbiBfY2FsbGVlMiQoX2NvbnRleHQyKSB7XG4gICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgIHN3aXRjaCAoX2NvbnRleHQyLnByZXYgPSBfY29udGV4dDIubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLnByZXYgPSAwO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gMztcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kb2N1bWVudC5mZXRjaChocmVmKTtcblxuICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBfY29udGV4dDIuc2VudDtcbiAgICAgICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDY7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLnRleHQoKTtcblxuICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgc3ZnID0gX2NvbnRleHQyLnNlbnQ7XG4gICAgICAgICAgICAgICAgdGhpcy5pbWFnZSA9IHN2ZztcbiAgICAgICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDEzO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLnByZXYgPSAxMDtcbiAgICAgICAgICAgICAgICBfY29udGV4dDIudDAgPSBfY29udGV4dDJbXCJjYXRjaFwiXSgwKTtcbiAgICAgICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6IG5vLWNvbnNvbGVcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRXJyb3Igd2hpbGUgbG9hZGluZyBpbWFnZSBcXFwiXCIuY29uY2F0KGhyZWYsIFwiXFxcIjpcIiksIF9jb250ZXh0Mi50MCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICB0aGlzLmxvYWRlZCA9IHRydWU7XG5cbiAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dDIuc3RvcCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSwgX2NhbGxlZTIsIHRoaXMsIFtbMCwgMTBdXSk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIGxvYWRTdmcoX3gyKSB7XG4gICAgICAgIHJldHVybiBfbG9hZFN2Zy5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbG9hZFN2ZztcbiAgICB9KClcbiAgfSwge1xuICAgIGtleTogXCJyZW5kZXJDaGlsZHJlblwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiByZW5kZXJDaGlsZHJlbihjdHgpIHtcbiAgICAgIHZhciBkb2N1bWVudCA9IHRoaXMuZG9jdW1lbnQsXG4gICAgICAgICAgaW1hZ2UgPSB0aGlzLm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dG9yUnVudGltZS5tYXJrKGZ1bmN0aW9uIF9jYWxsZWUoZm9udEZhbWlseSwgdXJsKSB7XG4gICAgICAgIHZhciBkb2N1bWVudCwgc3ZnRG9jdW1lbnQsIGZvbnRzO1xuICAgICAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZS53cmFwKGZ1bmN0aW9uIF9jYWxsZWUkKF9jb250ZXh0KSB7XG4gICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgIHN3aXRjaCAoX2NvbnRleHQucHJldiA9IF9jb250ZXh0Lm5leHQpIHtcbiAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgIF9jb250ZXh0LnByZXYgPSAwO1xuICAgICAgICAgICAgICAgIGRvY3VtZW50ID0gdGhpcy5kb2N1bWVudDtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gNDtcbiAgICAgICAgICAgICAgICByZXR1cm4gZG9jdW1lbnQuY2FudmcucGFyc2VyLmxvYWQodXJsKTtcblxuICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgc3ZnRG9jdW1lbnQgPSBfY29udGV4dC5zZW50O1xuICAgICAgICAgICAgICAgIGZvbnRzID0gc3ZnRG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2ZvbnQnKTtcbiAgICAgICAgICAgICAgICBBcnJheS5mcm9tKGZvbnRzKS5mb3JFYWNoKGZ1bmN0aW9uIChmb250Tm9kZSkge1xuICAgICAgICAgICAgICAgICAgdmFyIGZvbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KGZvbnROb2RlKTtcbiAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmRlZmluaXRpb25zW2ZvbnRGYW1pbHldID0gZm9udDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMTI7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAg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O1xuICAgIHJldHVybiBfcmVnZW5lcmF0b3JSdW50aW1lLndyYXAoZnVuY3Rpb24gX2NhbGxlZSQoX2NvbnRleHQpIHtcbiAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgIHN3aXRjaCAoX2NvbnRleHQucHJldiA9IF9jb250ZXh0Lm5leHQpIHtcbiAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICBhbm9ueW1vdXNDcm9zc09yaWdpbiA9IF9hcmdzLmxlbmd0aCA+IDEgJiYgX2FyZ3NbMV0gIT09IHVuZGVmaW5lZCA/IF9hcmdzWzFdIDogZmFsc2U7XG4gICAgICAgICAgICBpbWFnZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2ltZycpO1xuXG4gICAgICAgICAgICBpZiAoYW5vbnltb3VzQ3Jvc3NPcmlnaW4pIHtcbiAgICAgICAgICAgICAgaW1hZ2UuY3Jvc3NPcmlnaW4gPSAnQW5vbnltb3VzJztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LmFicnVwdChcInJldHVyblwiLCBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICAgIGltYWdlLm9ubG9hZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXNvbHZlKGltYWdlKTtcbiAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICBpbWFnZS5vbmVycm9yID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHJlamVjdCgpO1xuICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgIGltYWdlLnNyYyA9IHNyYztcbiAgICAgICAgICAgIH0pKTtcblxuICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuc3RvcCgpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgf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Aga2V5OiBcInJlbmRlclwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiAoKSB7XG4gICAgICB2YXIgX3JlbmRlciA9IF9hc3luY1RvR2VuZXJhdG9yKCAvKiNfX1BVUkVfXyovX3JlZ2VuZXJhdG9yUnVudGltZS5tYXJrKGZ1bmN0aW9uIF9jYWxsZWUoKSB7XG4gICAgICAgIHZhciBvcHRpb25zLFxuICAgICAgICAgICAgX2FyZ3MgPSBhcmd1bWVudHM7XG4gICAgICAgIHJldHVybiBfcmVnZW5lcmF0b3JSdW50aW1lLndyYXAoZnVuY3Rpb24gX2NhbGxlZSQoX2NvbnRleHQpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dC5wcmV2ID0gX2NvbnRleHQubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgb3B0aW9ucyA9IF9hcmdzLmxlbmd0aCA+IDAgJiYgX2FyZ3NbMF0gIT09IHVuZGVmaW5lZCA/IF9hcmdzWzBdIDoge307XG4gICAgICAgICAgICAgICAgdGhpcy5zdGFydChfb2JqZWN0U3ByZWFkJDEoe1xuICAgICAgICAgICAgICAgICAgZW5hYmxlUmVkcmF3OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgaWdub3JlQW5pbWF0aW9uOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgaWdub3JlTW91c2U6IHRydWVcbiAgICAgICAgICAgICAgICB9LCBvcHRpb25zKSk7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVhZHkoKTtcblxuICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgdGhpcy5zdG9wKCk7XG5cbiAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9j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tTjBhVzl1SWwwc0ltMWhjSEJwYm1keklqb2lPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPMEZCUVVFN096czdPenRCUVU5QkxFMUJRVWxCTEU5QlFVOHNSMEZCU1N4VlFVRlZReXhQUVVGV0xFVkJRVzFDTzBGQlEyaERPMEZCUlVFc1VVRkJTVU1zUlVGQlJTeEhRVUZIUXl4TlFVRk5MRU5CUVVORExGTkJRV2hDTzBGQlEwRXNVVUZCU1VNc1RVRkJUU3hIUVVGSFNDeEZRVUZGTEVOQlFVTkpMR05CUVdoQ08wRkJRMEVzVVVGQlNVTXNWMEZCU2l4RFFVeG5RenM3UVVGTmFFTXNVVUZCU1VNc1QwRkJUeXhIUVVGSExFOUJRVTlETEUxQlFWQXNTMEZCYTBJc1ZVRkJiRUlzUjBGQkswSkJMRTFCUVM5Q0xFZEJRWGRETEVWQlFYUkVPMEZCUTBFc1VVRkJTVU1zWTBGQll5eEhRVUZIUml4UFFVRlBMRU5CUVVOSExGRkJRVklzU1VGQmIwSXNXVUZCZWtNN1FVRkRRU3hSUVVGSlF5eHRRa0ZCYlVJc1IwRkJSMG9zVDBGQlR5eERRVUZEU3l4aFFVRlNMRWxCUVhsQ0xHbENRVUZ1UkR0QlFVTkJMRkZCUVVsRExHbENRVUZwUWl4SFFVRkhUaXhQUVVGUExFTkJRVU5QTEZ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PenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPeUo5XG4iLCJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBfYXJyYXlMaWtlVG9BcnJheShhcnIsIGxlbikge1xuICBpZiAobGVuID09IG51bGwgfHwgbGVuID4gYXJyLmxlbmd0aCkgbGVuID0gYXJyLmxlbmd0aDtcblxuICBmb3IgKHZhciBpID0gMCwgYXJyMiA9IG5ldyBBcnJheShsZW4pOyBpIDwgbGVuOyBpKyspIHtcbiAgICBhcnIyW2ldID0gYXJyW2ldO1xuICB9XG5cbiAgcmV0dXJuIGFycjI7XG59IiwiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gX2FycmF5V2l0aEhvbGVzKGFycikge1xuICBpZiAo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aWYgKGNvbnRleHQubWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgIC8vIFNldHRpbmcgY29udGV4dC5fc2VudCBmb3IgbGVnYWN5IHN1cHBvcnQgb2YgQmFiZWwnc1xuICAgICAgICAgIC8vIGZ1bmN0aW9uLnNlbnQgaW1wbGVtZW50YXRpb24uXG4gICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZSA9IEdlblN0YXRlRXhlY3V0aW5nO1xuXG4gICAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChpbm5lckZuLCBzZWxmLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgLy8gSWYgYW4gZXhjZXB0aW9uIGlzIHRocm93biBmcm9tIGlubmVyRm4sIHdlIGxlYXZlIHN0YXRlID09PVxuICAgICAgICAgIC8vIEdlblN0YXRlRXhlY3V0aW5nIGFuZCBsb29wIGJhY2sgZm9yIGFub3RoZXIgaW52b2NhdGlvbi5cbiAgICAgICAgICBz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BpZiAoaGFzQ2F0Y2ggJiYgaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4g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xuICAgICAgICB5ZWxsb3dncmVlbjogJzlhY2QzMidcbiAgICB9O1xuICAgIGNvbG9yX3N0cmluZyA9IHNpbXBsZV9jb2xvcnNbY29sb3Jfc3RyaW5nXSB8fCBjb2xvcl9zdHJpbmc7XG4gICAgLy8gZW1kIG9mIHNpbXBsZSB0eXBlLWluIGNvbG9yc1xuXG4gICAgLy8gYXJyYXkgb2YgY29sb3IgZGVmaW5pdGlvbiBvYmplY3RzXG4gICAgdmFyIGNvbG9yX2RlZnMgPSBbXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJlOiAvXnJnYmFcXCgoXFxkezEsM30pLFxccyooXFxkezEsM30pLFxccyooXFxkezEsM30pLFxccyooKD86XFxkP1xcLik/XFxkKVxcKSQvLFxuICAgICAgICAgICAgZXhhbXBsZTogWydyZ2JhKDEyMywgMjM0LCA0NSwgMC44KScsICdyZ2JhKDI1NSwyMzQsMjQ1LDEuMCknXSxcbiAgICAgICAgICAgIHByb2Nlc3M6IGZ1bmN0aW9uIChiaXRzKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzFdKSxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1syXSksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10pLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUZsb2F0KGJpdHNbNF0pXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgcmU6IC9ecmdiXFwoKFxcZHsxLDN9KSxcXHMqKFxcZHsxLDN9KSxcXHMqKFxcZHsxLDN9KVxcKSQvLFxuICAgICAgICAgICAgZXhhbXBsZTogWydyZ2IoMTIzLCAyMzQsIDQ1KScsICdyZ2IoMjU1LDIzNCwyNDUpJ10sXG4gICAgICAgICAgICBwcm9jZXNzOiBmdW5jdGlvbiAoYml0cyl7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1sxXSksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMl0pLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzNdKVxuICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJlOiAvXihbMC05YS1mQS1GXXsyfSkoWzAtOWEtZkEtRl17Mn0pKFswLTlhLWZBLUZdezJ9KSQvLFxuICAgICAgICAgICAgZXhhbXBsZTogWycjMDBmZjAwJywgJzMzNjY5OSddLFxuICAgICAgICAgICAgcHJvY2VzczogZnVuY3Rpb24gKGJpdHMpe1xuICAgICAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMV0sIDE2KSxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1syXSwgMTYpLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzNdLCAxNilcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICByZTogL14oWzAtOWEtZkEtRl17MX0pKFswLTlhLWZBLUZdezF9KShbMC05YS1mQS1GXXsxfSkkLyxcbiAgICAgICAgICAgIGV4YW1wbGU6IFsnI2ZiMCcsICdmMGYnXSxcbiAgICAgICAgICAgIHByb2Nlc3M6IGZ1bmN0aW9uIChiaXRzKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzFdICsgYml0c1sxXSwgMTYpLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzJdICsgYml0c1syXSwgMTYpLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzNdICsgY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cbiAgICAgICAgICAgICAgICAgICAgICAgICsgJ2JvcmRlcjogMXB4IHNvbGlkIGJsYWNrOyAnXG4gICAgICAgICAgICAgICAgICAgICAgICArICdiYWNrZ3JvdW5kOicgKyBsaXN0X2NvbG9yLnRvSGV4KCkgKyAnOyAnXG4gICAgICAgICAgICAgICAgICAgICAgICArICdjb2xvcjonICsgbGlzdF9jb2xvci50b0hleCgpXG4gICAgICAgICAgICAgICAgO1xuICAgICAgICAgICAgICAgIGV4YW1wbGVfZGl2LmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKCd0ZXN0JykpO1xuICAgICAgICAgICAgICAgIHZhciBsaXN0X2l0ZW1fdmFsdWUgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShcbiAgICAgICAgICAgICAgICAgICAgJyAnICsgZXhhbXBsZXNbaV0gKyAnIC0+ICcgKyBsaXN0X2NvbG9yLnRvUkdCKCkgKyAnIC0+ICcgKyBsaXN0X2NvbG9yLnRvSGV4KClcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGxpc3RfaXRlbS5hcHBlbmRDaGlsZChleGFtcGxlX2Rpdik7XG4gICAgICAgICAgICAgICAgbGlzdF9pdGVtLmFwcGVuZENoaWxkKGxpc3RfaXRlbV92YWx1ZSk7XG4gICAgICAgICAgICAgICAgeG1sLmFwcGVuZENoaWxkKGxpc3RfaXRlbSk7XG5cbiAgICAgICAgICAgIH0gY2F0Y2goZSl7fVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB4bWw7XG5cbiAgICB9XG5cbn1cbiIsImZ1bmN0aW9uIF90eXBlb2Yob2JqKSB7XG4gIFwiQGJhYmVsL2hlbHBlcnMgLSB0eXBlb2ZcIjtcblxuICBpZiAodHlwZW9mIFN5bWJvbCA9PT0gXCJmdW5jdGlvblwiICYmIHR5cGVvZiBTeW1ib2wuaXRlcmF0b3IgPT09IFwic3ltYm9sXCIpIHtcbiAgICBfdHlwZW9mID0g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iAgICAgICAgYk91dFN1bSA9IHJhZGl1c1BsdXMxICogcGIsXG4gICAgICAgIGFPdXRTdW0gPSByYWRpdXNQbHVzMSAqIHBhLFxuICAgICAgICByU3VtID0gc3VtRmFjdG9yICogcHIsXG4gICAgICAgIGdTdW0gPSBzdW1GYWN0b3IgKiBwZyxcbiAgICAgICAgYlN1bSA9IHN1bUZhY3RvciAqIHBiLFxuICAgICAgICBhU3VtID0gc3VtRmFjdG9yICogcGE7XG5cbiAgICBmb3IgKHZhciBfaTIgPSAxOyBfaTIgPCByYWRpdXNQbHVzMTsgX2kyKyspIHtcbiAgICAgIHZhciBwID0geWkgKyAoKHdpZHRoTWludXMxIDwgX2kyID8gd2lkdGhNaW51czEgOiBfaTIpIDw8IDIpO1xuICAgICAgdmFyIHIgPSBwaXhlbHNbcF0sXG4gICAgICAgICAgZyA9IHBpeGVsc1twICsgMV0sXG4gICAgICAgICAgYiA9IHBpeGVsc1twICsgMl0sXG4gICAgICAgICAgYSA9IHBpeGVsc1twICsgM107XG4gICAgICB2YXIgcmJzID0gcmFkaXVzUGx1czEgLSBfaTI7XG4gICAgICByU3VtICs9IChzdGFjay5yID0gcikgKiByYnM7XG4gICAgICBnU3VtICs9IChzdGFjay5nID0gZykgKiByYnM7XG4gICAgICBiU3VtICs9IChzdGFjay5iID0gYikgKiByYnM7XG4gICAgICBhU3VtICs9IChzdGFjay5hID0gYSkgKiByYnM7XG4gICAgICBySW5TdW0gKz0gcjtcbiAgICAgIGdJblN1bSArPSBnO1xuICAgICAgYkluU3VtICs9IGI7XG4gICAgICBhSW5TdW0gKz0gYTtcbiAgICAgIHN0YWNrID0gc3RhY2submV4dDtcbiAgICB9XG5cbiAgICBzdGFja0luID0gc3RhY2tTdGFydDtcbiAgICBzdGFja091dCA9IHN0YWNrRW5kO1xuXG4gICAgZm9yICh2YXIgeCA9IDA7IHggPCB3aWR0aDsgeCsrKSB7XG4gICAgICB2YXIgcGFJbml0aWFsID0gYVN1bSAqIG11bFN1bS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RhY2tTdGFydDtcbiAgICBzdGFja091dCA9IHN0YWNrRW5kO1xuXG4gICAgZm9yICh2YXIgeCA9IDA7IHggPCB3aWR0aDsgeCsrKSB7XG4gICAgICBwaXhlbHNbeWldID0gclN1bSAqIG11bFN1bSA+PiBzaGdTdW07XG4gICAgICBwaXhlbHNbeWkgKyAxXSA9IGdTdW0gKiBtdWxTdW0gPj4gc2hnU3VtO1xuICAgICAgcGl4ZWxzW3lpICsgMl0gPSBiU3VtICogbXVsU3VtID4+IHNoZ1N1bTtcbiAgICAgIHJTdW0gLT0gck91dFN1bTtcbiAgICAgIGdTdW0gLT0gZ091dFN1bTtcbiAgICAgIGJTdW0gLT0gYk91dFN1bTtcbiAgICAgIHJPdXRTdW0gLT0gc3RhY2tJbi5yO1xuICAgICAgZ091dFN1bSAtPSBzdGFja0luLmc7XG4gICAgICBiT3V0U3VtIC09IHN0YWNrSW4uYjtcbiAgICAgIHAgPSB5dyArICgocCA9IHggKyByYWRpdXMgKyAxKSA8IHdpZHRoTWludXMxID8gcCA6IHdpZHRoTWludXMxKSA8PCAyO1xuICAgICAgckluU3VtICs9IHN0YWNrSW4uciA9IHBpeGVsc1twXTtcbiAgICAgIGdJblN1bSArPSBzdGFja0luLmcgPSBwaXhlbHNbcCArIDFdO1xuICAgICAgYkluU3VtICs9IHN0YWNrSW4uYiA9IHBpeGVsc1twICsgMl07XG4gICAgICByU3VtICs9IHJJblN1bTtcbiAgICAgIGdTdW0gKz0gZ0luU3VtO1xuICAgICAgYlN1bSArPSBiSW5TdW07XG4gICAgICBzdGFja0luID0gc3RhY2tJbi5uZXh0O1xuICAgICAgck91dFN1bSArPSBwciA9IHN0YWNrT3V0LnI7XG4gICAgICBnT3V0U3VtICs9IHBnID0gc3RhY2tPdXQuZztcbiAgICAgIGJPdXRTdW0gKz0gcGIgPSBzdGFja091dC5iO1xuICAgICAgckluU3VtIC09IHByO1xuICAgICAgZ0luU3VtIC09IHBnO1xuICAgICAgYkluU3VtIC09IHBiO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